interface UseTypewriterOptions { /** Characters revealed per second (default: `500`). */ speed?: number; /** When true, reveal the full text immediately (and snap to it if it grows). */ skipAnimation?: boolean; } interface UseTypewriterResult { /** The portion of `fullText` revealed so far. */ displayedText: string; /** `true` while characters are still being revealed. */ isTyping: boolean; } /** * Reveals a string character-by-character at a steady rate via * `requestAnimationFrame`. Designed for bursty, streamed agent text: as * `fullText` grows the reveal keeps chasing the new end, and flipping * `skipAnimation` to `true` (e.g. once generation finishes) snaps to the full * text. Pair it with `ChatAgentMessage`. * * @example * ```tsx * const { displayedText, isTyping } = useTypewriter(message) * return ( * * {displayedText} * {isTyping ? : null} * * ) * ``` */ export declare function useTypewriter(fullText: string, options?: UseTypewriterOptions): UseTypewriterResult; export {};