/** * [WHO]: Public exports from this file (see implementation below). * [FROM]: See the import block immediately after this header. * [TO]: sparkdesign package consumers; output of CLI `add` when applicable. * [HERE]: registry/chat/chat-input/context.tsx — Spark Design source; keep aligned with the main library. * * [PROTOCOL]: * 1. Keep this P3 header in sync when the public contract changes. * 2. Update module AGENTS.md (P2) and root AGENTS.md (P1) when boundaries change. * 3. Follow design tokens and explicit type exports. */ import React from 'react'; import type { ReactNode } from 'react'; import type { ChatInputProps, FolderPermissionConfig, GenerationStatusConfig, FooterLeftModelSwitchConfig } from './types'; export interface ChatInputContextValue { dataStyle?: string; dataTheme?: string; value: string; onChange: (value: string) => void; onSend?: (value: string) => void; disabled: boolean; placeholder: string; maxRows: number; form?: string; textareaRef: React.RefObject; setTextareaRef: (node: HTMLTextAreaElement | null) => void; handleSend: () => void; handleKeyDown: (e: React.KeyboardEvent) => void; sendButtonStatus: 'normal' | 'generating'; canSend: boolean; hasFolderSelected: boolean; setHasFolderSelected: (v: boolean) => void; handleFolderSelect: (files: FileList) => void; handleFolderClear: () => void; folderPermission?: FolderPermissionConfig; footerLeftConfig?: FooterLeftModelSwitchConfig; showFolderButton: boolean; showMoreButton: boolean; folderButtonLabel: string; onFolderButtonClick?: () => void; onFolderClear?: () => void; onMoreButtonClick?: () => void; addLargeIcon?: ReactNode; folderIcon?: ReactNode; folderOpenIcon?: ReactNode; historyIcon?: ReactNode; arrowDownIcon?: ReactNode; subMenuArrowIcon?: ReactNode; folderFillIcon?: ReactNode; closeIcon?: ReactNode; showGenerationStatus?: boolean; generationStatus?: GenerationStatusConfig; attachments?: { files?: ReactNode; images?: ReactNode; } | ReactNode; showFooter?: boolean; } declare const ChatInputContext: React.Context; export declare function useChatInputContext(): ChatInputContextValue; export type ChatInputRootProps = ChatInputProps & { children?: ReactNode; }; export declare function ChatInputRootProvider({ value: controlledValue, onChange, onSend, placeholder, disabled, maxRows, form, sendButtonStatus, showFooter, showFolderButton, folderButtonLabel, onFolderButtonClick, onFolderClear, folderPermission, showMoreButton, onMoreButtonClick, footerLeftConfig, showGenerationStatus, generationStatus, attachments, addLargeIcon, folderIcon, folderOpenIcon, historyIcon, arrowDownIcon, subMenuArrowIcon, folderFillIcon, closeIcon, dataStyle, dataTheme, children, ...rest }: ChatInputRootProps): import("react/jsx-runtime").JSX.Element; export declare namespace ChatInputRootProvider { var displayName: string; } export { ChatInputContext };