import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from '../ui/command'; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem } from '../ui/dropdown-menu'; import { HoverCard, HoverCardContent, HoverCardTrigger } from '../ui/hover-card'; import { InputGroupAddon, InputGroupButton, InputGroupTextarea } from '../ui/input-group'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../ui/select'; import { ChatStatus, FileUIPart } from 'ai'; import { ComponentProps, FormEvent, HTMLAttributes, PropsWithChildren, ReactNode, RefObject } from 'react'; export type AttachmentsContext = { files: (FileUIPart & { id: string; })[]; add: (files: File[] | FileList) => void; remove: (id: string) => void; clear: () => void; openFileDialog: () => void; fileInputRef: RefObject; }; export type TextInputContext = { value: string; setInput: (v: string) => void; clear: () => void; }; export type PromptInputControllerProps = { textInput: TextInputContext; attachments: AttachmentsContext; __registerFileInput: (ref: RefObject, open: () => void) => void; }; export declare const usePromptInputController: () => PromptInputControllerProps; export declare const useProviderAttachments: () => AttachmentsContext; export type PromptInputProviderProps = PropsWithChildren<{ initialInput?: string; }>; export declare function PromptInputProvider({ initialInput: initialTextInput, children, }: PromptInputProviderProps): import("react/jsx-runtime").JSX.Element; export declare const usePromptInputAttachments: () => AttachmentsContext; export type PromptInputAttachmentProps = HTMLAttributes & { data: FileUIPart & { id: string; }; className?: string; }; export declare function PromptInputAttachment({ data, className, ...props }: PromptInputAttachmentProps): import("react/jsx-runtime").JSX.Element; export type PromptInputAttachmentsProps = Omit, "children"> & { children: (attachment: FileUIPart & { id: string; }) => ReactNode; }; export declare function PromptInputAttachments({ className, children, ...props }: PromptInputAttachmentsProps): import("react/jsx-runtime").JSX.Element | null; export type PromptInputActionAddAttachmentsProps = ComponentProps & { label?: string; }; export declare const PromptInputActionAddAttachments: ({ label, ...props }: PromptInputActionAddAttachmentsProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputMessage = { text?: string; files?: FileUIPart[]; }; export type PromptInputProps = Omit, "onSubmit" | "onError"> & { accept?: string; multiple?: boolean; globalDrop?: boolean; syncHiddenInput?: boolean; maxFiles?: number; maxFileSize?: number; onError?: (err: { code: "max_files" | "max_file_size" | "accept"; message: string; }) => void; onSubmit: (message: PromptInputMessage, event: FormEvent) => void | Promise; }; export declare const PromptInput: ({ className, accept, multiple, globalDrop, syncHiddenInput, maxFiles, maxFileSize, onError, onSubmit, children, ...props }: PromptInputProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputBodyProps = HTMLAttributes; export declare const PromptInputBody: ({ className, ...props }: PromptInputBodyProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputTextareaProps = ComponentProps; export declare const PromptInputTextarea: import('react').ForwardRefExoticComponent, HTMLTextAreaElement>, "ref"> & import('react').RefAttributes, "ref"> & import('react').RefAttributes>; export type PromptInputHeaderProps = Omit, "align">; export declare const PromptInputHeader: ({ className, ...props }: PromptInputHeaderProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputFooterProps = Omit, "align">; export declare const PromptInputFooter: ({ className, ...props }: PromptInputFooterProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputToolsProps = HTMLAttributes; export declare const PromptInputTools: ({ className, ...props }: PromptInputToolsProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputButtonProps = ComponentProps; export declare const PromptInputButton: ({ variant, className, size, ...props }: PromptInputButtonProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputActionMenuProps = ComponentProps; export declare const PromptInputActionMenu: (props: PromptInputActionMenuProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputActionMenuTriggerProps = PromptInputButtonProps; export declare const PromptInputActionMenuTrigger: ({ className, children, ...props }: PromptInputActionMenuTriggerProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputActionMenuContentProps = ComponentProps; export declare const PromptInputActionMenuContent: ({ className, ...props }: PromptInputActionMenuContentProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputActionMenuItemProps = ComponentProps; export declare const PromptInputActionMenuItem: ({ className, ...props }: PromptInputActionMenuItemProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputSubmitProps = ComponentProps & { status?: ChatStatus; }; export declare const PromptInputSubmit: ({ className, variant, size, status, children, ...props }: PromptInputSubmitProps) => import("react/jsx-runtime").JSX.Element; interface SpeechRecognition extends EventTarget { continuous: boolean; interimResults: boolean; lang: string; start(): void; stop(): void; onstart: ((this: SpeechRecognition, ev: Event) => any) | null; onend: ((this: SpeechRecognition, ev: Event) => any) | null; onresult: ((this: SpeechRecognition, ev: SpeechRecognitionEvent) => any) | null; onerror: ((this: SpeechRecognition, ev: SpeechRecognitionErrorEvent) => any) | null; } interface SpeechRecognitionEvent extends Event { results: SpeechRecognitionResultList; } type SpeechRecognitionResultList = { readonly length: number; item(index: number): SpeechRecognitionResult; [index: number]: SpeechRecognitionResult; }; type SpeechRecognitionResult = { readonly length: number; item(index: number): SpeechRecognitionAlternative; [index: number]: SpeechRecognitionAlternative; isFinal: boolean; }; type SpeechRecognitionAlternative = { transcript: string; confidence: number; }; interface SpeechRecognitionErrorEvent extends Event { error: string; } declare global { interface Window { SpeechRecognition: { new (): SpeechRecognition; }; webkitSpeechRecognition: { new (): SpeechRecognition; }; } } export type PromptInputSpeechButtonProps = ComponentProps & { textareaRef?: RefObject; onTranscriptionChange?: (text: string) => void; }; export declare const PromptInputSpeechButton: ({ className, textareaRef, onTranscriptionChange, ...props }: PromptInputSpeechButtonProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputModelSelectProps = ComponentProps; export declare const PromptInputModelSelect: (props: PromptInputModelSelectProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputModelSelectTriggerProps = ComponentProps; export declare const PromptInputModelSelectTrigger: ({ className, ...props }: PromptInputModelSelectTriggerProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputModelSelectContentProps = ComponentProps; export declare const PromptInputModelSelectContent: ({ className, ...props }: PromptInputModelSelectContentProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputModelSelectItemProps = ComponentProps; export declare const PromptInputModelSelectItem: ({ className, ...props }: PromptInputModelSelectItemProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputModelSelectValueProps = ComponentProps; export declare const PromptInputModelSelectValue: ({ className, ...props }: PromptInputModelSelectValueProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputHoverCardProps = ComponentProps; export declare const PromptInputHoverCard: ({ openDelay, closeDelay, ...props }: PromptInputHoverCardProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputHoverCardTriggerProps = ComponentProps; export declare const PromptInputHoverCardTrigger: (props: PromptInputHoverCardTriggerProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputHoverCardContentProps = ComponentProps; export declare const PromptInputHoverCardContent: ({ align, ...props }: PromptInputHoverCardContentProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputTabsListProps = HTMLAttributes; export declare const PromptInputTabsList: ({ className, ...props }: PromptInputTabsListProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputTabProps = HTMLAttributes; export declare const PromptInputTab: ({ className, ...props }: PromptInputTabProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputTabLabelProps = HTMLAttributes; export declare const PromptInputTabLabel: ({ className, ...props }: PromptInputTabLabelProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputTabBodyProps = HTMLAttributes; export declare const PromptInputTabBody: ({ className, ...props }: PromptInputTabBodyProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputTabItemProps = HTMLAttributes; export declare const PromptInputTabItem: ({ className, ...props }: PromptInputTabItemProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputCommandProps = ComponentProps; export declare const PromptInputCommand: ({ className, ...props }: PromptInputCommandProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputCommandInputProps = ComponentProps; export declare const PromptInputCommandInput: ({ className, ...props }: PromptInputCommandInputProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputCommandListProps = ComponentProps; export declare const PromptInputCommandList: ({ className, ...props }: PromptInputCommandListProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputCommandEmptyProps = ComponentProps; export declare const PromptInputCommandEmpty: ({ className, ...props }: PromptInputCommandEmptyProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputCommandGroupProps = ComponentProps; export declare const PromptInputCommandGroup: ({ className, ...props }: PromptInputCommandGroupProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputCommandItemProps = ComponentProps; export declare const PromptInputCommandItem: ({ className, ...props }: PromptInputCommandItemProps) => import("react/jsx-runtime").JSX.Element; export type PromptInputCommandSeparatorProps = ComponentProps; export declare const PromptInputCommandSeparator: ({ className, ...props }: PromptInputCommandSeparatorProps) => import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=prompt-input.d.ts.map