/** * React Hook for lyric highlighting * * This hook provides a simple way to integrate lyric highlighting * in React applications with automatic state management. */ import type { LyricLine, LyricDisplayOptions, LyricHighlightState, HighlightedLine } from '../../types/components'; export interface UseLyricHighlightOptions extends Partial { /** Callback when line changes */ onLineChange?: (lineIndex: number, line: LyricLine) => void; /** Callback when word highlights */ onWordHighlight?: (lineIndex: number, wordIndex: number) => void; } export interface UseLyricHighlightReturn { /** Current lyric state */ state: LyricHighlightState; /** Lines to display */ displayLines: HighlightedLine[]; /** Current line */ currentLine: LyricLine | null; /** Is word highlighted at index */ isWordHighlighted: (wordIndex: number) => boolean; /** Get highlighted words as array of indices */ getHighlightedWordIndices: () => number[]; /** Get word progress for wipe effect (0-1) */ getWordProgress: (wordIndex: number) => number; /** Update display options */ setOptions: (options: Partial) => void; /** Progress through current line (0-1) */ progress: number; } /** * Hook for lyric highlighting * * @example * ```tsx * const { displayLines, isWordHighlighted, progress } = useLyricHighlight( * lyrics, * currentTime, * { * displayMode: 'three-line', * highlightMode: 'word', * onLineChange: (index, line) => console.log('Line changed:', line) * } * ); * ``` */ export declare function useLyricHighlight(lyrics: LyricLine[], currentTime: number, options?: UseLyricHighlightOptions): UseLyricHighlightReturn;