/** * [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/types.ts — 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 type { TextareaHTMLAttributes, ReactNode } from 'react'; export type InputPropsWithWebkitDirectory = React.InputHTMLAttributes & { webkitdirectory?: string; }; export interface FolderPermissionConfig { enable?: boolean; projectName?: string; } export interface GenerationStatusConfig { content?: ReactNode; icon?: ReactNode; time?: string; } export interface FooterLeftModelSwitchItem { value: string; label: string; icon?: ReactNode; } export interface FooterLeftModelSwitchConfig { modeSwitch: { icon?: ReactNode; label: string; value: string; options: FooterLeftModelSwitchItem[]; onChange: (value: string) => void; }; modelSwitch: { label: string; value: string; options: FooterLeftModelSwitchItem[]; onChange: (value: string) => void; }; consumptionMultiplier: { value: string; options?: FooterLeftModelSwitchItem[]; onChange?: (value: string) => void; }; } export interface ChatInputProps extends Omit, 'onChange' | 'value'> { value?: string; onChange?: (value: string) => void; onSend?: (value: string) => void; placeholder?: string; disabled?: boolean; maxRows?: number; form?: string; attachments?: { files?: ReactNode; images?: ReactNode; } | ReactNode; showFooter?: boolean; showFolderButton?: boolean; folderButtonLabel?: string; onFolderButtonClick?: () => void; onFolderClear?: () => void; folderPermission?: FolderPermissionConfig; showMoreButton?: boolean; onMoreButtonClick?: () => void; footerLeftConfig?: FooterLeftModelSwitchConfig; sendButtonStatus?: 'normal' | 'generating'; showGenerationStatus?: boolean; generationStatus?: GenerationStatusConfig; addLargeIcon?: ReactNode; folderIcon?: ReactNode; folderOpenIcon?: ReactNode; historyIcon?: ReactNode; arrowDownIcon?: ReactNode; subMenuArrowIcon?: ReactNode; folderFillIcon?: ReactNode; closeIcon?: ReactNode; /** 供 Portal 浮层继承(Showcase 预览区等场景),不传则由 dropdown-menu 使用 getThemeFromDocument() 兜底 */ dataStyle?: string; dataTheme?: string; }