/** * React Hook for DOM-based lyric rendering * * This hook combines lyric highlighting with DOM rendering, * providing a complete solution for React applications. */ import { UseLyricHighlightOptions } from './useLyricHighlight'; import type { LyricLine, LyricTheme } from '../../types/components'; export interface UseLyricRendererOptions extends UseLyricHighlightOptions { /** Theme or theme name */ theme?: LyricTheme | 'default' | 'karaoke' | 'minimal' | 'extreme-karaoke' | 'text-only'; /** Text-only mode: no container styling (default: false) */ textOnly?: boolean; /** Disable background styling (default: false) */ disableBackground?: boolean; /** Custom CSS classes */ classNames?: { container?: string; line?: string; word?: string; current?: string; prev?: string; next?: string; active?: string; inactive?: string; }; } export interface UseLyricRendererReturn { /** Container ref to attach to DOM element */ containerRef: React.RefObject; /** Current line ref */ currentLineRef: React.RefObject; /** Manually trigger re-render */ forceUpdate: () => void; /** Scroll to line */ scrollToLine: (lineIndex: number) => void; } /** * Hook for DOM-based lyric rendering * * @example * ```tsx * function LyricDisplay({ lyrics, currentTime }) { * const { containerRef } = useLyricRenderer(lyrics, currentTime, { * displayMode: 'three-line', * theme: 'karaoke' * }); * * return
; * } * ``` */ export declare function useLyricRenderer(lyrics: LyricLine[], currentTime: number, options?: UseLyricRendererOptions): UseLyricRendererReturn;