UNPKG

@cossistant/next

Version:

Next.js-ready SDK for building AI-powered support/chat widgets. Hooks + primitives, WS-driven, TypeScript-first. Next.js-ready, Tailwind optional.

40 lines 1.15 kB
//#region ../react/src/hooks/private/use-multimodal-input.d.ts type UseMultimodalInputOptions = { onSubmit?: (data: { message: string; files: File[]; }) => void | Promise<void>; onError?: (error: Error) => void; maxFileSize?: number; maxFiles?: number; allowedFileTypes?: string[]; }; type UseMultimodalInputReturn = { message: string; files: File[]; isSubmitting: boolean; error: Error | null; setMessage: (message: string) => void; addFiles: (files: File[]) => void; removeFile: (index: number) => void; clearFiles: () => void; submit: () => Promise<void>; reset: () => void; isValid: boolean; canSubmit: boolean; }; /** * Manages message text, file attachments and validation for the multimodal * composer component. Provides ergonomic helpers for submit flows and error * reporting. */ declare const useMultimodalInput: ({ onSubmit, onError, maxFileSize, maxFiles, allowedFileTypes }?: UseMultimodalInputOptions) => UseMultimodalInputReturn; //#endregion export { UseMultimodalInputOptions, UseMultimodalInputReturn, useMultimodalInput }; //# sourceMappingURL=use-multimodal-input.d.ts.map