import type { FilesError } from "../internal/errors.js"; import type { NativeFileRef } from "./types.js"; export type FileUploadStatus = "pending" | "uploading" | "success" | "error" | "aborted"; /** * The body a `FileUploadState` tracks. `Uint8Array` and `NativeFileRef` * appear only in React Native — the former on runtimes whose `Blob` cannot * wrap raw bytes, the latter for picker-asset uploads. */ export type UploadStateBody = Blob | Uint8Array | NativeFileRef; export interface FileUploadState { file: UploadStateBody; name: string; size: number; type: string; key?: string; status: FileUploadStatus; loaded: number; total: number; /** 0–1. */ progress: number; error?: FilesError; } export interface AggregateProgress { loaded: number; total: number; /** 0–1 across all files. */ fraction: number; } export declare const aggregate: (states: readonly FileUploadState[]) => AggregateProgress; export declare const fileName: (file: UploadStateBody) => string; export declare const initialState: (file: UploadStateBody) => FileUploadState; //# sourceMappingURL=progress.d.ts.map