import { type ComponentPropsWithRef, type ReactNode } from 'react'; import { type ChatComposerInputHandle, type ChatComposerSendButtonProps } from './ChatComposer'; import type { ChatComposerToken } from './ChatComposer.types'; export type ChatDensity = 'compact' | 'balanced' | 'spacious'; export type ChatMessageSender = 'user' | 'assistant' | 'system'; export type ChatMessageBubbleVariant = 'filled' | 'ghost'; export type ChatSystemMessageVariant = 'default' | 'divider'; export type ChatMessageStatus = 'sending' | 'sent' | 'delivered' | 'read' | 'error'; export type ChatToolCallStatus = 'pending' | 'running' | 'complete' | 'error'; export type ChatMessageContextValue = { sender: ChatMessageSender; density: ChatDensity; }; export type ChatListContextValue = { density: ChatDensity; }; export type ChatLayoutContextValue = { scrollContainerRef: React.RefObject; contentRef: (element: HTMLElement | null) => void; }; export declare const useChatMessageContext: () => ChatMessageContextValue | null; export declare const useChatListContext: () => ChatListContextValue | null; export declare const useChatLayoutContext: () => ChatLayoutContextValue | null; export type ChatMessageListGap = 0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10; export type ChatMessageProps = Omit, 'children'> & { sender: ChatMessageSender; children: ReactNode; avatar?: ReactNode; name?: ReactNode; metadata?: ReactNode; density?: ChatDensity; }; export declare const ChatMessage: { ({ avatar, children, className, density: densityProp, metadata, name, ref, sender, ...props }: ChatMessageProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; export type ChatMessageBubbleProps = Omit, 'children'> & { children: ReactNode; variant?: ChatMessageBubbleVariant; name?: ReactNode; metadata?: ReactNode; group?: 'first' | 'middle' | 'last'; }; export declare const ChatMessageBubble: { ({ children, className, group, metadata, name, ref, variant, ...props }: ChatMessageBubbleProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; export type ChatMessageListProps = Omit, 'children'> & { children?: ReactNode; emptyState?: ReactNode; scrollToTopAction?: () => Promise; density?: ChatDensity; gap?: ChatMessageListGap; isStreaming?: boolean; }; export declare const ChatMessageList: { ({ children, className, density, emptyState, gap, isStreaming, ref, scrollToTopAction, style, ...props }: ChatMessageListProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; export type ChatMessageMetadataProps = ComponentPropsWithRef<'div'> & { timestamp?: ReactNode; footer?: ReactNode; status?: ChatMessageStatus; }; export declare const ChatMessageMetadata: { ({ className, footer, ref, status, timestamp, ...props }: ChatMessageMetadataProps): import("react/jsx-runtime").JSX.Element | null; displayName: string; }; export type ChatSystemMessageProps = Omit, 'children'> & { children: ReactNode; variant?: ChatSystemMessageVariant; icon?: ReactNode; }; export declare const ChatSystemMessage: { ({ children, className, icon, ref, variant, ...props }: ChatSystemMessageProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; export type ChatTokenizedTextProps = Omit, 'children'> & { children: string; tokens?: ChatComposerToken[]; }; export declare const ChatTokenizedText: { ({ children, className, ref, tokens, ...props }: ChatTokenizedTextProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; export type ChatToolCallItem = { name: string; status?: ChatToolCallStatus; target?: string; duration?: string; node?: string; additions?: number; deletions?: number; stats?: ReactNode; errorMessage?: string; key?: string; data?: unknown; resultDetail?: ReactNode; }; export type ChatToolCallsProps = Omit, 'children'> & { calls: ChatToolCallItem[]; label?: string; isExpanded?: boolean; defaultIsExpanded?: boolean; onExpandedChange?: (isExpanded: boolean) => void; }; export declare const ChatToolCalls: { ({ calls, className, defaultIsExpanded, isExpanded: controlledExpanded, label, onExpandedChange, ref, ...props }: ChatToolCallsProps): import("react/jsx-runtime").JSX.Element | null; displayName: string; }; export type UseChatStreamScrollOptions = { scrollRef: React.RefObject; enabled?: boolean; lockThreshold?: number; buttonThreshold?: number; }; export type UseChatStreamScrollReturn = { isScrolledUp: boolean; isLocked: boolean; scrollToBottom: () => void; scrollToMessage: (element: HTMLElement) => void; scrollToLastMessage: () => void; lock: () => void; unlock: () => void; scrollIfLocked: () => void; }; export declare const useChatStreamScroll: ({ buttonThreshold, enabled, lockThreshold, scrollRef, }: UseChatStreamScrollOptions) => UseChatStreamScrollReturn; export type UseChatNewMessagesOptions = { isLocked: boolean; onResize?: () => void; }; export type UseChatNewMessagesReturn = { hasNewMessages: boolean; dismiss: () => void; contentRef: (element: HTMLElement | null) => void; }; export declare const useChatNewMessages: ({ isLocked, onResize, }: UseChatNewMessagesOptions) => UseChatNewMessagesReturn; export type ChatLayoutProps = Omit, 'children'> & { children?: ReactNode; composer: ReactNode; emptyState?: ReactNode; scrollButton?: ReactNode | null; scrollRef?: React.RefObject; density?: ChatDensity; }; export declare const ChatLayout: { ({ children, className, composer, density, emptyState, ref, scrollButton, scrollRef: externalScrollRef, ...props }: ChatLayoutProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; export type ChatLayoutScrollButtonProps = Omit, 'onClick'> & { isVisible: boolean; label?: string; onClick: () => void; }; export declare const ChatLayoutScrollButton: { ({ className, isVisible, label, onClick, ref, ...props }: ChatLayoutScrollButtonProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; export type UseSpeechRecognitionOptions = { lang?: string; continuous?: boolean; interimResults?: boolean; transformTranscript?: (text: string) => string; onTranscript?: (transcript: string, isFinal: boolean) => void; onResult?: (transcript: string) => void; onError?: (error: { error: string; message?: string; }) => void; onStart?: () => void; onEnd?: () => void; }; export type UseSpeechRecognitionReturn = { isSupported: boolean; isListening: boolean; isSpeaking: boolean; volume: number; bands: number[]; rawBands: number[]; interimTranscript: string; start: () => void; stop: () => void; abort: () => void; toggle: () => void; }; export declare const useSpeechRecognition: (options?: UseSpeechRecognitionOptions) => UseSpeechRecognitionReturn; export type UseChatDictationOptions = UseSpeechRecognitionOptions & { hasSounds?: boolean; inputRef?: React.RefObject; }; export type UseChatDictationReturn = UseSpeechRecognitionReturn; export declare const useChatDictation: ({ inputRef, onResult, ...options }?: UseChatDictationOptions) => UseChatDictationReturn; export type ChatDictationButtonProps = ComponentPropsWithRef<'span'> & { dictation: UseSpeechRecognitionReturn; size?: 'sm' | 'md'; isHiddenWhenUnsupported?: boolean; label?: string; }; export declare const ChatDictationButton: { ({ className, dictation, isHiddenWhenUnsupported, label, ref, size, ...props }: ChatDictationButtonProps): import("react/jsx-runtime").JSX.Element | null; displayName: string; }; export type ChatSendButtonProps = ChatComposerSendButtonProps; export declare const ChatSendButton: ({ className, disabled, isDisabled, isStopShown: isStopShownProp, onClick, onSend, onStop: onStopProp, ref, sendIcon, sendLabel, showLabel, size, stopIcon, stopLabel, type, ...props }: ChatComposerSendButtonProps) => import("react/jsx-runtime").JSX.Element; export declare const Chat: { Composer: (({ children, className, defaultValue, density, drawer, footerActions, headerActions, headerContext, input, isDisabled, isStopShown, onChange, onStop, onSubmit, placeholder, ref, sendActions, sendButton, status, statusPosition, value, ...props }: import("./ChatComposer").ChatComposerProps) => import("react/jsx-runtime").JSX.Element) & { Drawer: ({ children, className, count, defaultIsCollapsed, isCollapsed: controlledCollapsed, label, onCollapsedChange, ref, ...props }: import("./ChatComposer").ChatComposerDrawerProps) => import("react/jsx-runtime").JSX.Element; Input: ({ className, debounceMs, defaultValue, handleRef, hasHistory, isDisabled: isDisabledProp, label, maxRows, onChange, onFiles, onPaste: onPasteProp, onSubmit, pasteAsToken: pasteAsTokenProp, placeholder: placeholderProp, ref, triggers, value: controlledValue, ...props }: import("./ChatComposer").ChatComposerInputProps) => import("react/jsx-runtime").JSX.Element; Options: ({ className, defaultValue, dismissOnSelect, isDisabled, items, label, onSelect, onValueChange, ref, renderItem, value, ...props }: import("./ChatComposer").ChatComposerOptionsProps) => import("react/jsx-runtime").JSX.Element | null; SendButton: ({ className, disabled, isDisabled, isStopShown: isStopShownProp, onClick, onSend, onStop: onStopProp, ref, sendIcon, sendLabel, showLabel, size, stopIcon, stopLabel, type, ...props }: ChatComposerSendButtonProps) => import("react/jsx-runtime").JSX.Element; TokenElement: ({ className, ref, token, ...props }: import("./ChatComposer").ChatComposerTokenElementProps) => import("react/jsx-runtime").JSX.Element; }; ComposerInput: ({ className, debounceMs, defaultValue, handleRef, hasHistory, isDisabled: isDisabledProp, label, maxRows, onChange, onFiles, onPaste: onPasteProp, onSubmit, pasteAsToken: pasteAsTokenProp, placeholder: placeholderProp, ref, triggers, value: controlledValue, ...props }: import("./ChatComposer").ChatComposerInputProps) => import("react/jsx-runtime").JSX.Element; ComposerSendButton: ({ className, disabled, isDisabled, isStopShown: isStopShownProp, onClick, onSend, onStop: onStopProp, ref, sendIcon, sendLabel, showLabel, size, stopIcon, stopLabel, type, ...props }: ChatComposerSendButtonProps) => import("react/jsx-runtime").JSX.Element; DictationButton: { ({ className, dictation, isHiddenWhenUnsupported, label, ref, size, ...props }: ChatDictationButtonProps): import("react/jsx-runtime").JSX.Element | null; displayName: string; }; Layout: { ({ children, className, composer, density, emptyState, ref, scrollButton, scrollRef: externalScrollRef, ...props }: ChatLayoutProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; LayoutScrollButton: { ({ className, isVisible, label, onClick, ref, ...props }: ChatLayoutScrollButtonProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; Message: { ({ avatar, children, className, density: densityProp, metadata, name, ref, sender, ...props }: ChatMessageProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; MessageBubble: { ({ children, className, group, metadata, name, ref, variant, ...props }: ChatMessageBubbleProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; MessageList: { ({ children, className, density, emptyState, gap, isStreaming, ref, scrollToTopAction, style, ...props }: ChatMessageListProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; MessageMetadata: { ({ className, footer, ref, status, timestamp, ...props }: ChatMessageMetadataProps): import("react/jsx-runtime").JSX.Element | null; displayName: string; }; SendButton: ({ className, disabled, isDisabled, isStopShown: isStopShownProp, onClick, onSend, onStop: onStopProp, ref, sendIcon, sendLabel, showLabel, size, stopIcon, stopLabel, type, ...props }: ChatComposerSendButtonProps) => import("react/jsx-runtime").JSX.Element; SystemMessage: { ({ children, className, icon, ref, variant, ...props }: ChatSystemMessageProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; TokenizedText: { ({ children, className, ref, tokens, ...props }: ChatTokenizedTextProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; ToolCalls: { ({ calls, className, defaultIsExpanded, isExpanded: controlledExpanded, label, onExpandedChange, ref, ...props }: ChatToolCallsProps): import("react/jsx-runtime").JSX.Element | null; displayName: string; }; };