import type { SilkeIcons } from '../silke-icon/silke-icon'; import { SilkeFileValue, SilkeImageValue } from './utils'; /** File type category for the acceptedFileTypes prop */ export type SilkeFileCategory = 'image' | 'text'; /** Resolve file categories to a flat list of MIME patterns */ export declare function resolveFileCategories(categories: SilkeFileCategory[]): string[]; /** * Check if a MIME type matches a set of MIME patterns. * Supports exact matches ('text/csv') and wildcard subtypes ('image/*'). */ export declare function matchesMimePattern(mimeType: string, patterns: string[]): boolean; /** * Reads a File and converts it to a SilkeImageValue or SilkeFileValue. * Images produce SilkeImageValue for backward compatibility; other files produce SilkeFileValue. * Returns null if the file type is not in the accepted patterns. */ export declare function fileToAttachmentValue(file: File, acceptedTypes: string[]): Promise; /** * Extract the first matching file from a ClipboardEvent given accepted MIME patterns. */ export declare function getFileFromClipboard(e: React.ClipboardEvent, acceptedTypes: string[]): File | null; /** * Extract the first matching file from a DragEvent given accepted MIME patterns. */ export declare function getFileFromDragEvent(e: DragEvent, acceptedTypes: string[]): File | null; /** * Maps a MIME type to a SilkeIcon key for display. */ export declare function getFileIcon(mimeType: string): SilkeIcons; /** * Truncate a filename for display, preserving the extension. */ export declare function truncateFilename(name: string, maxLength?: number): string;