import type { ActionFieldDef } from './types'; export interface UploadFieldProps { field: ActionFieldDef; value: any; onChange: (v: any) => void; } /** * Pulls the stored file url/path out of an upload response envelope, tolerating * the common key shapes a host might return. Pure — exported for tests. */ export declare function extractUploadedValue(payload: any): string; /** Short, human display name for an already-stored file value (a url/path). */ export declare function uploadedDisplayName(value: unknown): string; /** * True when `file` satisfies an HTML-style accept list (`"image/*,.pdf,image/png"`). * Tokens: `type/*` (prefix), `type/sub` (exact MIME) and `.ext` (filename suffix), * case-insensitive. An empty/absent list accepts everything. Pure — exported for tests. */ export declare function fileMatchesAccept(file: { name: string; type: string; }, accept?: string): boolean; /** * Client-side gate shared by the upload widgets: `'type'` when the file does not * match `accept`, `'size'` when it exceeds `maxSize` (bytes), else null. Pure. */ export declare function validateUploadFile(file: { name: string; type: string; size: number; }, opts: { accept?: string; maxSize?: number; }): 'type' | 'size' | null; export declare function UploadField({ field, value, onChange }: UploadFieldProps): import("react").JSX.Element; //# sourceMappingURL=upload-field.d.ts.map