chore: improve readability

This commit is contained in:
Su-Yong
2025-10-12 14:28:29 +09:00
parent 4f716d8e0b
commit ffa61687bf
137 changed files with 2625 additions and 2626 deletions

View File

@ -1116,7 +1116,7 @@ export interface LinkAlternate {
export interface PageOwnerDetails {
name: string;
externalChannelId: string;
youtubeProfileUrl: string;
['\u0079\u006f\u0075\u0074\u0075\u0062\u0065ProfileUrl']: string;
}
export interface MicroformatDataRendererVideoDetails {

View File

@ -202,7 +202,7 @@ export interface LinkAlternate {
export interface PageOwnerDetails {
name: string;
externalChannelId: string;
youtubeProfileUrl: string;
['\u0079\u006f\u0075\u0074\u0075\u0062\u0065ProfileUrl']: string;
}
export interface MicroformatDataRendererVideoDetails {
@ -470,6 +470,6 @@ export interface GetPlayerResponseVideoDetails {
elapsedSeconds: number;
isPaused: boolean;
// youtube-music only
// music only
album?: string | null;
}

View File

@ -305,7 +305,7 @@ export type GeneralIcons =
| 'icons:watch-later'
| 'icons:weekend'
| 'icons:work'
| 'icons:youtube-searched-for'
| 'icons:\u0079\u006f\u0075\u0074\u0075\u0062\u0065-searched-for'
| 'icons:zoom-in'
| 'icons:zoom-out';
export type PaperDropDownMenuIcons =
@ -381,8 +381,8 @@ export type SocialNetworkIcons =
| 'socialNetworksRound:whatsapp'
| 'socialNetworksRound:wykop'
| 'socialNetworksRound:yahoo'
| 'socialNetworksRound:youtube_community_post'
| 'socialNetworksRound:youtube_community_repost';
| 'socialNetworksRound:\u0079\u006f\u0075\u0074\u0075\u0062\u0065_community_post'
| 'socialNetworksRound:\u0079\u006f\u0075\u0074\u0075\u0062\u0065_community_repost';
export type HashtagLandingPageIcons =
| 'hashtag-landing-page:hashtag_landing_page_empty'
| 'hashtag-landing-page:hashtag_landing_page_empty_dark_mode'
@ -781,7 +781,7 @@ export type YtIcons =
| 'yt-icons:video_camera'
| 'yt-icons:video_camera_disabled'
| 'yt-icons:video_library_white'
| 'yt-icons:video_youtube'
| 'yt-icons:video_\u0079\u006f\u0075\u0074\u0075\u0062\u0065'
| 'yt-icons:videogame_asset'
| 'yt-icons:view_list'
| 'yt-icons:view_module'
@ -802,18 +802,18 @@ export type YtIcons =
| 'yt-icons:wifi_status_bar_three'
| 'yt-icons:wifi_status_bar_zero'
| 'yt-icons:work_off'
| 'yt-icons:youtube_ad'
| 'yt-icons:youtube_kids'
| 'yt-icons:youtube_kids_round'
| 'yt-icons:youtube_logo'
| 'yt-icons:youtube_music'
| 'yt-icons:youtube_music_logo_short'
| 'yt-icons:youtube_music_monochrome'
| 'yt-icons:youtube_premiere_logo_short'
| 'yt-icons:youtube_red_logo'
| 'yt-icons:youtube_red_logo_short'
| 'yt-icons:youtube_round'
| 'yt-icons:youtube_shorts_brand_24'
| 'yt-icons:\u0079\u006f\u0075\u0074\u0075\u0062\u0065_ad'
| 'yt-icons:\u0079\u006f\u0075\u0074\u0075\u0062\u0065_kids'
| 'yt-icons:\u0079\u006f\u0075\u0074\u0075\u0062\u0065_kids_round'
| 'yt-icons:\u0079\u006f\u0075\u0074\u0075\u0062\u0065_logo'
| 'yt-icons:\u0079\u006f\u0075\u0074\u0075\u0062\u0065_music'
| 'yt-icons:\u0079\u006f\u0075\u0074\u0075\u0062\u0065_music_logo_short'
| 'yt-icons:\u0079\u006f\u0075\u0074\u0075\u0062\u0065_music_monochrome'
| 'yt-icons:\u0079\u006f\u0075\u0074\u0075\u0062\u0065_premiere_logo_short'
| 'yt-icons:\u0079\u006f\u0075\u0074\u0075\u0062\u0065_red_logo'
| 'yt-icons:\u0079\u006f\u0075\u0074\u0075\u0062\u0065_red_logo_short'
| 'yt-icons:\u0079\u006f\u0075\u0074\u0075\u0062\u0065_round'
| 'yt-icons:\u0079\u006f\u0075\u0074\u0075\u0062\u0065_shorts_brand_24'
| 'yt-icons:zoom_in'
| 'yt-icons:zoom_out';
export type YtLogos =
@ -1279,14 +1279,14 @@ export type YtSysIcons =
| 'yt-sys-icons:x_circle'
| 'yt-sys-icons:x_octagon'
| 'yt-sys-icons:yen_sign_container'
| 'yt-sys-icons:youtube_improve_tv'
| 'yt-sys-icons:youtube_linked_tv'
| 'yt-sys-icons:youtube_music_monochrome'
| 'yt-sys-icons:youtube_shorts_fill_no_triangle_red_16'
| 'yt-sys-icons:youtube_shorts_no_triangle-filled'
| 'yt-sys-icons:youtube_shorts_no_triangle'
| 'yt-sys-icons:youtube_studio_arrow_down-filled'
| 'yt-sys-icons:youtube_studio_arrow_up-filled'
| 'yt-sys-icons:\u0079\u006f\u0075\u0074\u0075\u0062\u0065_improve_tv'
| 'yt-sys-icons:\u0079\u006f\u0075\u0074\u0075\u0062\u0065_linked_tv'
| 'yt-sys-icons:\u0079\u006f\u0075\u0074\u0075\u0062\u0065_music_monochrome'
| 'yt-sys-icons:\u0079\u006f\u0075\u0074\u0075\u0062\u0065_shorts_fill_no_triangle_red_16'
| 'yt-sys-icons:\u0079\u006f\u0075\u0074\u0075\u0062\u0065_shorts_no_triangle-filled'
| 'yt-sys-icons:\u0079\u006f\u0075\u0074\u0075\u0062\u0065_shorts_no_triangle'
| 'yt-sys-icons:\u0079\u006f\u0075\u0074\u0075\u0062\u0065_studio_arrow_down-filled'
| 'yt-sys-icons:\u0079\u006f\u0075\u0074\u0075\u0062\u0065_studio_arrow_up-filled'
| 'yt-sys-icons:zoom_in-filled'
| 'yt-sys-icons:zoom_in'
| 'yt-sys-icons:zoom_out-filled'
@ -1348,8 +1348,8 @@ export type YtSysIcons16 =
| 'yt-sys-icons16:super_sticker'
| 'yt-sys-icons16:transcript'
| 'yt-sys-icons16:transcript_search'
| 'yt-sys-icons16:youtube_shorts_no_triangle-filled'
| 'yt-sys-icons16:youtube_shorts_no_triangle';
| 'yt-sys-icons16:\u0079\u006f\u0075\u0074\u0075\u0062\u0065_shorts_no_triangle-filled'
| 'yt-sys-icons16:\u0079\u006f\u0075\u0074\u0075\u0062\u0065_shorts_no_triangle';
export type YtSysIcons18 =
| 'yt-sys-icons18:arrow_circle_right'
| 'yt-sys-icons18:heart_circle'

View File

@ -1,4 +1,4 @@
export interface YouTubeMusicAppElement extends HTMLElement {
export interface MusicPlayerAppElement extends HTMLElement {
navigate(page: string): void;
networkManager: {
fetch: <ReturnType, Data>(url: string, data: Data) => Promise<ReturnType>;

View File

@ -1,11 +1,11 @@
// TODO: fully type definitions for youtube-player
// TODO: fully type definitions for music-player
import type { VideoDetails } from './video-details';
import type { GetPlayerResponse } from './get-player-response';
import type { PlayerAPIEvents } from './player-api-events';
import type { WatchNextResponse } from '@/types/youtube-music-desktop-internal';
import type { WatchNextResponse } from '@/types/music-player-desktop-internal';
export interface YoutubePlayer {
export interface MusicPlayer {
getInternalApiInterface: <Parameters extends unknown[], Return>(
...params: Parameters
) => Return;

View File

@ -1,4 +1,4 @@
import type { WatchNextResponse } from '@/types/youtube-music-desktop-internal';
import type { WatchNextResponse } from '@/types/music-player-desktop-internal';
export interface AlbumDetails {
responseContext: ResponseContext;
@ -256,7 +256,7 @@ export type VideoDataChangeValue = Record<string, unknown> & {
lengthSeconds: number;
/**
* YouTube Music Desktop internal variable (for album data)
* Internal variable (for album data)
**/
ytmdWatchNextResponse?: WatchNextResponse;
};

View File

@ -1,4 +1,4 @@
import type { YoutubePlayer } from '@/types/youtube-player';
import type { MusicPlayer } from '@/types/music-player';
import type {
BackendContext,
@ -26,7 +26,7 @@ export type RendererPluginLifecycleExtra<Config, Context, This> = This &
PluginLifecycleExtra<Config, Context, This> & {
onPlayerApiReady?: (
this: This,
playerApi: YoutubePlayer,
playerApi: MusicPlayer,
context: Context,
) => void | Promise<void>;
};

View File

@ -1,4 +1,4 @@
import type { YoutubePlayer } from '@/types/youtube-player';
import type { MusicPlayer } from '@/types/music-player';
import type { GetState, QueueItem } from '@/types/datahost-get-state';
type StoreState = GetState;
@ -52,7 +52,7 @@ export interface ToastService {
export type AppElement = HTMLElement & AppAPI;
export type AppAPI = {
queue: QueueAPI;
playerApi: YoutubePlayer;
playerApi: MusicPlayer;
toastService: ToastService;