feat: add FeedNudge (#533)

* feat: add `FeedNudge`

see https://github.com/LuanRT/YouTube.js/actions/runs/6679090140/job/18150827068?pr=532

* fix: lint

* fix: update parser-map
This commit is contained in:
JellyBrick
2023-10-29 21:51:25 +09:00
committed by GitHub
parent db7f6209b2
commit e02139532b
2 changed files with 26 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import { YTNode } from '../helpers.js';
import { NavigationEndpoint } from '../nodes.js';
import type { RawNode } from '../types/index.js';
export default class FeedNudge extends YTNode {
static type = 'FeedNudge';
title: Text;
subtitle: Text;
endpoint: NavigationEndpoint;
apply_modernized_style: boolean;
trim_style: string;
background_style: string;
constructor(data: RawNode) {
super();
this.title = new Text(data.title);
this.subtitle = new Text(data.subtitle);
this.endpoint = new NavigationEndpoint(data.impressionEndpoint);
this.apply_modernized_style = data.applyModernizedStyle;
this.trim_style = data.trimStyle;
this.background_style = data.backgroundStyle;
}
}

View File

@@ -105,6 +105,7 @@ export { default as ExpandedShelfContents } from './classes/ExpandedShelfContent
export { default as Factoid } from './classes/Factoid.js';
export { default as FancyDismissibleDialog } from './classes/FancyDismissibleDialog.js';
export { default as FeedFilterChipBar } from './classes/FeedFilterChipBar.js';
export { default as FeedNudge } from './classes/FeedNudge.js';
export { default as FeedTabbedHeader } from './classes/FeedTabbedHeader.js';
export { default as GameCard } from './classes/GameCard.js';
export { default as GameDetails } from './classes/GameDetails.js';