/** * Pure DOM construction for the desktop UI plugin. * * Owns: `buildCenter`, `buildBottomBar`, `buildBottomRow`, `buildShortcutsOverlay`, * `buildKeyboardDecoration`, `applyButtonOrder`, and `iconBtn`. * * No lifecycle wiring, no state mutation beyond building and returning refs. * Matches the free-function + returned-refs pattern of topBar.ts and menus.ts. * * Integration: `DesktopUiPlugin.buildDom()` calls these builders and stores * the returned refs as class fields. */ import type { IVideoPlayer, VideoPlaylistItem } from '../../../index.js'; import type { DesktopUiOptions } from '../index.js'; import type { SliderBarRefs } from './progressBar.js'; import { fluentIcons } from '../data/icons.js'; /** * Create a styled icon button for the control bar. * Wraps `player.createButton` and appends a `.btn-icon` span. */ export declare function iconBtn(player: IVideoPlayer, id: string, iconName: keyof typeof fluentIcons): HTMLButtonElement; export interface CenterRefs { centerWrap: HTMLDivElement; centerBtn: HTMLButtonElement; spinner: HTMLDivElement; } export interface BottomBarRefs { bottomBar: HTMLDivElement; topRow: HTMLDivElement; bottomRow: HTMLDivElement; sliderRefs: SliderBarRefs; } export interface BottomRowRefs { playBtn: HTMLButtonElement; prevBtn: HTMLButtonElement; nextBtn: HTMLButtonElement; rewindBtn: HTMLButtonElement; forwardBtn: HTMLButtonElement; chapBackBtn: HTMLButtonElement; chapFwdBtn: HTMLButtonElement; volBtn: HTMLButtonElement; volSlider: HTMLInputElement; volSliderVertical: HTMLDivElement; /** The raw volume-container element — callers need it to pass to wireVolumeSlider. */ volContainer: HTMLDivElement; /** The raw vertical-popup input — callers need it to pass to wireVolumeSlider. */ volVertInput: HTMLInputElement; volPopupMuteBtn: HTMLButtonElement; currentTimeEl: HTMLDivElement; remainingTimeEl: HTMLDivElement; aspectRatioBtn: HTMLButtonElement; theaterBtn: HTMLButtonElement; theaterConfigHidden: boolean; pipBtn: HTMLButtonElement; speedBtn: HTMLButtonElement; subsBtn: HTMLButtonElement; audioBtn: HTMLButtonElement; qualityBtn: HTMLButtonElement; playlistBtn: HTMLButtonElement; settingsBtn: HTMLButtonElement; fsBtn: HTMLButtonElement; } /** Build the center spinner + big-play button and return named refs. */ export declare function buildCenter(player: IVideoPlayer, parent: HTMLElement): CenterRefs; /** Build the bottom-bar skeleton (shadow + top-row + slider + bottom-row). */ export declare function buildBottomBar(player: IVideoPlayer, parent: HTMLElement, opts: DesktopUiOptions | undefined, listen: (target: EventTarget, event: string, fn: (event: Event) => void) => void, translate: (key: string, params?: Record) => string): BottomBarRefs & BottomRowRefs; /** Build all buttons and controls inside the bottom row. */ export declare function buildBottomRow(player: IVideoPlayer, parent: HTMLElement, opts: DesktopUiOptions | undefined, listen: (target: EventTarget, event: string, fn: (event: Event) => void) => void, translate: (key: string, params?: Record) => string): BottomRowRefs; /** * Apply the consumer's `buttonOrder`: every named button is re-anchored to the * end of the bar in the given sequence; unnamed buttons keep their natural * position. Visual order only — removal priority during resize stays governed * by `buttonPriority`. */ export declare function applyButtonOrder(parent: HTMLElement, opts: DesktopUiOptions | undefined, refs: BottomRowRefs): void; /** * Build the keyboard shortcuts dialog overlay and return it. * The caller stores the element reference and uses `listen` so it gets cleaned * up on dispose. */ export declare function buildShortcutsOverlay(parent: HTMLElement, listen: (target: EventTarget, event: string, fn: (event: Event) => void) => void, translate: (key: string, params?: Record) => string, hideShortcuts: () => void): HTMLDivElement; /** * Build the decorative keyboard SVG shown at the bottom of the shortcuts dialog. * Highlights the keys used by NOMERCY. */ export declare function buildKeyboardDecoration(): HTMLDivElement;