/** * LyricHighlighter - Headless lyric highlighting logic * * This is a framework-agnostic implementation that provides * the core logic for lyric highlighting without any UI dependencies. */ import type { LyricLine, LyricHighlightState, LyricDisplayOptions } from '../types/components'; export declare class LyricHighlighter { private lyrics; private options; constructor(options?: Partial); /** * Set lyrics data */ setLyrics(lyrics: LyricLine[]): void; /** * Update display options */ setOptions(options: Partial): void; /** * Get current lyric state at given time */ getState(currentTime: number): LyricHighlightState; /** * Find current line index using binary search */ private getCurrentLineIndex; /** * Get lines to display based on display mode */ private getDisplayLines; /** * Get highlighted words for current line with progress * Supports wipe effect (gradient progress per word) */ private getHighlightedWords; /** * Get word progress for wipe effect (0-1) * Returns progress for each word to create smooth gradient wipe */ getWordProgress(lineIndex: number, wordIndex: number, currentMs: number): number; /** * Calculate progress through current line (0-1) */ private getProgress; /** * Check if Thai vowel or diacritic (for Thai language support) */ isThaiVowelOrDiacritic(char: string): boolean; /** * Check if text contains only Thai vowels */ isOnlyThaiVowels(text: string): boolean; } /** * Utility functions for lyric manipulation */ /** * Get lyric line at specific time */ export declare function getLyricAtTime(lyrics: LyricLine[], time: number): LyricLine | null; /** * Get all lyrics within time range */ export declare function getLyricsInRange(lyrics: LyricLine[], startTime: number, endTime: number): LyricLine[]; /** * Calculate total duration of lyrics */ export declare function getLyricsDuration(lyrics: LyricLine[]): number; /** * Search lyrics by text */ export declare function searchLyrics(lyrics: LyricLine[], query: string): LyricLine[];