chore: v5.0.0 release

This commit is contained in:
LuanRT
2023-04-29 05:15:47 +00:00
parent b19d687eed
commit 48dc99e28b
445 changed files with 4076 additions and 3578 deletions

View File

@@ -1,7 +1,8 @@
import NavigationEndpoint from './NavigationEndpoint.ts';
import { YTNode } from '../helpers.ts';
import { YTNode, observe } from '../helpers.ts';
import { type RawNode } from '../index.ts';
class Panel {
export class Panel extends YTNode {
static type = 'Panel';
thumbnail?: {
@@ -42,7 +43,9 @@ class Panel {
state: string;
};
constructor(data: any) {
constructor(data: RawNode) {
super();
if (data.thumbnail) {
this.thumbnail = {
image: data.thumbnail.image.sources,
@@ -74,15 +77,13 @@ class Panel {
}
}
class HighlightsCarousel extends YTNode {
export default class HighlightsCarousel extends YTNode {
static type = 'HighlightsCarousel';
panels: Panel[];
constructor(data: any) {
constructor(data: RawNode) {
super();
this.panels = data.highlightsCarousel.panels.map((el: any) => new Panel(el));
this.panels = observe(data.highlightsCarousel.panels.map((el: RawNode) => new Panel(el)));
}
}
export default HighlightsCarousel;
}