export interface SpriteCue { start: number; end: number; url: string; x: number; y: number; w: number; h: number; } export interface SpriteSet { cues: SpriteCue[]; /** Sprite image URL — same for every cue in NoMercy's tooling. */ spriteUrl: string; } /** * Parse a sprite VTT into cues. Delegates parsing to core's `parseVttSprite`, * then maps the `CueList` output to the flat `SpriteCue[]` * shape the sprite renderer expects. * * `baseUrl` is the URL of the VTT file itself — used to resolve relative sprite * image paths. */ export declare function parseSpriteVtt(text: string, baseUrl: string): SpriteCue[]; /** * Pluggable transports for sprite loading. Auth-protected backends route both * requests through the plugin's authenticated fetch — a bare `fetch` / `Image` * src can't carry an `Authorization` header. */ export interface SpriteFetchers { /** Fetch the VTT body. Return `null` on failure. */ fetchText?: (url: string) => Promise; /** * Resolve the sprite image to a paintable URL (typically a `blob:` URL * created from an authenticated download). Return `null` to fall back to * the raw URL. */ fetchImageUrl?: (url: string) => Promise; } /** Load + parse a sprite VTT, then preload its sprite image. */ export declare function loadSpriteSet(vttUrl: string, fetchers?: SpriteFetchers): Promise; /** * Find the cue whose [start, end) covers the given time, or the last * cue if time falls past the end of the table. */ export declare function lookupCue(set: SpriteSet, time: number): SpriteCue | null; /** * Compute the scrub time from a pointer/touch event relative to a slider bar. * Returns both the bar-relative percentage (0–100) and the player time (seconds). */ export declare function getScrubTime(event: Event, sliderBar: HTMLDivElement, duration: number): { scrubTime: number; scrubTimePlayer: number; }; /** * Clamp a slider-pop horizontal offset (%) so the pop bubble stays fully * inside the slider-bar bounds. */ export declare function clampPopOffset(pct: number, sliderPop: HTMLDivElement, sliderBar: HTMLDivElement): number; /** Paint the sprite thumbnail cue into `sliderPopImage` for the given time. */ export declare function paintSpriteAt(time: number, spriteSet: SpriteSet | null, sliderPopImage: HTMLDivElement): void; /** * Resolve the sprite VTT URL from a playlist item. * Checks the typed `previewSpriteUrl` field first, then falls back to a * legacy `tracks[].kind === 'thumbnails'` sidecar entry. */ export declare function resolveSpriteUrl(item: unknown): string | undefined;