upload-motion 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/LICENSE +21 -0
- package/README.md +198 -2
- package/dist/core-BUWs_ckM.js +1256 -0
- package/dist/core-jiCtXcMo.cjs +1393 -0
- package/dist/core.cjs +26 -0
- package/dist/core.d.cts +3 -0
- package/dist/core.d.ts +3 -0
- package/dist/core.js +2 -0
- package/dist/index-BZJA26zI.d.cts +471 -0
- package/dist/index-BZJA26zI.d.ts +471 -0
- package/dist/index.cjs +4017 -0
- package/dist/index.d.cts +617 -0
- package/dist/index.d.ts +617 -0
- package/dist/index.js +3927 -0
- package/dist/styles.css +3417 -0
- package/dist/styles.css.d.ts +1 -0
- package/package.json +109 -4
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/core/errors.d.ts
|
|
3
|
+
type UploadErrorCode = 'network' | 'timeout' | 'http' | 'aborted' | 'invalid-response' | 'handler';
|
|
4
|
+
declare const BRAND: unique symbol;
|
|
5
|
+
interface UploadErrorInit {
|
|
6
|
+
status?: number;
|
|
7
|
+
retryable?: boolean;
|
|
8
|
+
response?: unknown;
|
|
9
|
+
cause?: unknown;
|
|
10
|
+
}
|
|
11
|
+
/** Error type produced by built-in transports and by the store when wrapping handler failures. */
|
|
12
|
+
declare class UploadError extends Error {
|
|
13
|
+
readonly code: UploadErrorCode;
|
|
14
|
+
readonly status: number | undefined;
|
|
15
|
+
readonly retryable: boolean;
|
|
16
|
+
readonly response: unknown;
|
|
17
|
+
readonly [BRAND] = true;
|
|
18
|
+
constructor(code: UploadErrorCode, message: string, init?: UploadErrorInit);
|
|
19
|
+
}
|
|
20
|
+
/** Works across bundle copies (no `instanceof` pitfalls). */
|
|
21
|
+
declare function isUploadError(value: unknown): value is UploadError;
|
|
22
|
+
declare function httpErrorMessage(status: number): string;
|
|
23
|
+
declare function toUploadError(error: unknown): UploadError;
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/core/types.d.ts
|
|
26
|
+
type FileKind = 'image' | 'video' | 'audio' | 'pdf' | 'document' | 'spreadsheet' | 'presentation' | 'archive' | 'code' | 'data' | 'text' | 'unknown';
|
|
27
|
+
/**
|
|
28
|
+
* Lifecycle of a single file in the queue.
|
|
29
|
+
*
|
|
30
|
+
* - `pending` selected locally, waiting for `start()` (manual mode or no handler)
|
|
31
|
+
* - `queued` waiting for a free concurrency slot
|
|
32
|
+
* - `uploading` request in flight
|
|
33
|
+
* - `paused` request aborted by `pause()`; `resume()` re-queues it
|
|
34
|
+
* - `success` handler resolved
|
|
35
|
+
* - `error` handler rejected (see `item.error`)
|
|
36
|
+
* - `canceled` aborted by `cancel()`; can be retried
|
|
37
|
+
*/
|
|
38
|
+
type UploadStatus = 'pending' | 'queued' | 'uploading' | 'paused' | 'success' | 'error' | 'canceled';
|
|
39
|
+
interface UploadItem<TResponse = unknown> {
|
|
40
|
+
readonly id: string;
|
|
41
|
+
readonly file: File;
|
|
42
|
+
readonly name: string;
|
|
43
|
+
readonly size: number;
|
|
44
|
+
readonly type: string;
|
|
45
|
+
/** Lower-case extension without the dot, e.g. `"pdf"`. Empty string when absent. */
|
|
46
|
+
readonly extension: string;
|
|
47
|
+
readonly kind: FileKind;
|
|
48
|
+
readonly status: UploadStatus;
|
|
49
|
+
/** 0..1 fraction of bytes reported as sent by the upload handler. */
|
|
50
|
+
readonly progress: number;
|
|
51
|
+
readonly loaded: number;
|
|
52
|
+
/** Smoothed transfer speed in bytes per second (0 when idle). */
|
|
53
|
+
readonly speed: number;
|
|
54
|
+
/** Estimated seconds remaining, or `null` when unknown. */
|
|
55
|
+
readonly eta: number | null;
|
|
56
|
+
/** Number of times an upload has been attempted. */
|
|
57
|
+
readonly attempts: number;
|
|
58
|
+
readonly error: UploadError | null;
|
|
59
|
+
readonly response: TResponse | undefined;
|
|
60
|
+
readonly addedAt: number;
|
|
61
|
+
readonly startedAt: number | null;
|
|
62
|
+
readonly completedAt: number | null;
|
|
63
|
+
/** Timestamp of the next automatic retry, when one is scheduled. */
|
|
64
|
+
readonly retryAt: number | null;
|
|
65
|
+
}
|
|
66
|
+
type RejectionCode = 'file-invalid-type' | 'file-too-large' | 'file-too-small' | 'too-many-files' | 'custom';
|
|
67
|
+
interface RejectionReason {
|
|
68
|
+
code: RejectionCode;
|
|
69
|
+
message: string;
|
|
70
|
+
}
|
|
71
|
+
interface FileRejection {
|
|
72
|
+
readonly id: string;
|
|
73
|
+
readonly file: File;
|
|
74
|
+
readonly errors: readonly RejectionReason[];
|
|
75
|
+
readonly at: number;
|
|
76
|
+
}
|
|
77
|
+
interface UploadContext<TResponse = unknown> {
|
|
78
|
+
file: File;
|
|
79
|
+
item: UploadItem<TResponse>;
|
|
80
|
+
/** Aborted when the upload is canceled, paused, removed or the store is disposed. */
|
|
81
|
+
signal: AbortSignal;
|
|
82
|
+
/** 1-based attempt number. */
|
|
83
|
+
attempt: number;
|
|
84
|
+
/** Report bytes sent. `total` defaults to `file.size`. */
|
|
85
|
+
onProgress: (loaded: number, total?: number) => void;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Sends one file somewhere and resolves with the server response.
|
|
89
|
+
* Reject (or throw) to mark the upload as failed. Must honour `ctx.signal`.
|
|
90
|
+
*/
|
|
91
|
+
type UploadHandler<TResponse = unknown> = ((ctx: UploadContext<TResponse>) => Promise<TResponse>) & {
|
|
92
|
+
/** Set by `createSimulatedUploader` so UIs can label fake progress honestly. */
|
|
93
|
+
readonly simulated?: boolean;
|
|
94
|
+
};
|
|
95
|
+
type CustomValidator = (file: File, context: {
|
|
96
|
+
items: readonly UploadItem[];
|
|
97
|
+
}) => string | null | undefined | false;
|
|
98
|
+
interface RetryOptions {
|
|
99
|
+
/** Automatic retries for retryable errors (network, timeout, 5xx). Default 0. */
|
|
100
|
+
attempts?: number;
|
|
101
|
+
/** Base delay in ms, doubled each attempt. Default 800. */
|
|
102
|
+
delay?: number;
|
|
103
|
+
}
|
|
104
|
+
interface UploaderOptions<TResponse = unknown> {
|
|
105
|
+
/** Transport. Without one, files stay `pending` – nothing is ever claimed as uploaded. */
|
|
106
|
+
upload?: UploadHandler<TResponse>;
|
|
107
|
+
/** Same syntax as the `accept` attribute: `"image/*,.pdf"` or `['image/*', '.pdf']`. */
|
|
108
|
+
accept?: string | readonly string[];
|
|
109
|
+
/** Max bytes per file. */
|
|
110
|
+
maxSize?: number;
|
|
111
|
+
/** Min bytes per file. */
|
|
112
|
+
minSize?: number;
|
|
113
|
+
/** Max files held in the queue at once (canceled/failed files count until removed). */
|
|
114
|
+
maxFiles?: number;
|
|
115
|
+
/** Allow selecting several files. `false` replaces the current file. Default true. */
|
|
116
|
+
multiple?: boolean;
|
|
117
|
+
validate?: CustomValidator;
|
|
118
|
+
/** Start uploading as soon as files are added. Default true. */
|
|
119
|
+
autoUpload?: boolean;
|
|
120
|
+
/** Parallel uploads. Default 3. */
|
|
121
|
+
concurrency?: number;
|
|
122
|
+
retry?: number | RetryOptions;
|
|
123
|
+
onFilesAdded?: (items: UploadItem<TResponse>[]) => void;
|
|
124
|
+
onFilesRejected?: (rejections: FileRejection[]) => void;
|
|
125
|
+
onUploadStart?: (item: UploadItem<TResponse>) => void;
|
|
126
|
+
onUploadProgress?: (item: UploadItem<TResponse>) => void;
|
|
127
|
+
onUploadSuccess?: (item: UploadItem<TResponse>, response: TResponse) => void;
|
|
128
|
+
onUploadError?: (item: UploadItem<TResponse>, error: UploadError) => void;
|
|
129
|
+
onUploadCancel?: (item: UploadItem<TResponse>) => void;
|
|
130
|
+
onFileRemoved?: (item: UploadItem<TResponse>) => void;
|
|
131
|
+
/** Fires once every started upload has settled (success, error or canceled). */
|
|
132
|
+
onQueueComplete?: (items: UploadItem<TResponse>[]) => void;
|
|
133
|
+
onChange?: (items: UploadItem<TResponse>[]) => void;
|
|
134
|
+
}
|
|
135
|
+
interface UploadTotals {
|
|
136
|
+
count: number;
|
|
137
|
+
/** 0..1 across files that are in flight or done (excludes pending, failed, canceled). */
|
|
138
|
+
progress: number;
|
|
139
|
+
loaded: number;
|
|
140
|
+
size: number;
|
|
141
|
+
speed: number;
|
|
142
|
+
eta: number | null;
|
|
143
|
+
pending: number;
|
|
144
|
+
queued: number;
|
|
145
|
+
uploading: number;
|
|
146
|
+
paused: number;
|
|
147
|
+
success: number;
|
|
148
|
+
error: number;
|
|
149
|
+
canceled: number;
|
|
150
|
+
/** queued + uploading */
|
|
151
|
+
active: number;
|
|
152
|
+
isUploading: boolean;
|
|
153
|
+
/** At least one success and nothing pending, queued, uploading or paused. */
|
|
154
|
+
isComplete: boolean;
|
|
155
|
+
}
|
|
156
|
+
interface UploadSnapshot<TResponse = unknown> {
|
|
157
|
+
readonly items: readonly UploadItem<TResponse>[];
|
|
158
|
+
readonly rejections: readonly FileRejection[];
|
|
159
|
+
readonly totals: UploadTotals;
|
|
160
|
+
/** `'simulated'` when the handler fakes progress, `'none'` without a handler. */
|
|
161
|
+
readonly transport: 'network' | 'simulated' | 'none';
|
|
162
|
+
}
|
|
163
|
+
interface UploadEventMap<TResponse = unknown> {
|
|
164
|
+
added: UploadItem<TResponse>[];
|
|
165
|
+
rejected: FileRejection[];
|
|
166
|
+
start: UploadItem<TResponse>;
|
|
167
|
+
success: UploadItem<TResponse>;
|
|
168
|
+
error: UploadItem<TResponse>;
|
|
169
|
+
cancel: UploadItem<TResponse>;
|
|
170
|
+
removed: UploadItem<TResponse>;
|
|
171
|
+
complete: UploadItem<TResponse>[];
|
|
172
|
+
}
|
|
173
|
+
type ClearFilter = 'all' | 'completed' | 'failed' | 'canceled';
|
|
174
|
+
//#endregion
|
|
175
|
+
//#region src/core/store.d.ts
|
|
176
|
+
type Ids = string | readonly string[] | undefined;
|
|
177
|
+
interface AddFilesResult<TResponse = unknown> {
|
|
178
|
+
accepted: UploadItem<TResponse>[];
|
|
179
|
+
rejected: FileRejection[];
|
|
180
|
+
}
|
|
181
|
+
interface UploadStore<TResponse = unknown> {
|
|
182
|
+
/** Immutable snapshot; identity changes only when something changed. */
|
|
183
|
+
getSnapshot(): UploadSnapshot<TResponse>;
|
|
184
|
+
/** `useSyncExternalStore`-compatible subscription. Progress is batched per animation frame. */
|
|
185
|
+
subscribe(listener: () => void): () => void;
|
|
186
|
+
on<K extends keyof UploadEventMap<TResponse>>(event: K, handler: (payload: UploadEventMap<TResponse>[K]) => void): () => void;
|
|
187
|
+
setOptions(options: UploaderOptions<TResponse>): void;
|
|
188
|
+
getOptions(): UploaderOptions<TResponse>;
|
|
189
|
+
/** The options passed to `createUploadStore` (UI layers merge their props over these). */
|
|
190
|
+
getInitialOptions(): UploaderOptions<TResponse>;
|
|
191
|
+
/** Validates and enqueues files. Returns what was accepted and rejected. */
|
|
192
|
+
addFiles(files: Iterable<File> | ArrayLike<File>): AddFilesResult<TResponse>;
|
|
193
|
+
/** Starts `pending` files (manual mode). No ids = all pending. */
|
|
194
|
+
start(ids?: Ids): void;
|
|
195
|
+
/** Aborts in-flight or waiting uploads; they become `canceled`. No ids = all. */
|
|
196
|
+
cancel(ids?: Ids): void;
|
|
197
|
+
/** Re-queues `error`/`canceled` files. No ids = all of them. */
|
|
198
|
+
retry(ids?: Ids): void;
|
|
199
|
+
/** Aborts and parks uploads as `paused`. No ids = all active. */
|
|
200
|
+
pause(ids?: Ids): void;
|
|
201
|
+
/** Re-queues `paused` files. Transfers restart unless your handler supports resumption. */
|
|
202
|
+
resume(ids?: Ids): void;
|
|
203
|
+
/** Aborts (if needed) and removes files from the queue. */
|
|
204
|
+
remove(ids: string | readonly string[]): void;
|
|
205
|
+
clear(filter?: ClearFilter): void;
|
|
206
|
+
dismissRejection(id?: string): void;
|
|
207
|
+
getItem(id: string): UploadItem<TResponse> | undefined;
|
|
208
|
+
/** Aborts everything and clears timers. The store stays usable afterwards. */
|
|
209
|
+
dispose(): void;
|
|
210
|
+
}
|
|
211
|
+
declare function computeTotals(items: readonly UploadItem[]): UploadTotals;
|
|
212
|
+
declare function createUploadStore<TResponse = unknown>(initialOptions?: UploaderOptions<TResponse>): UploadStore<TResponse>;
|
|
213
|
+
//#endregion
|
|
214
|
+
//#region src/core/transports.d.ts
|
|
215
|
+
type MaybePromise<T> = T | Promise<T>;
|
|
216
|
+
type PerItem<T> = T | ((item: UploadItem) => MaybePromise<T>);
|
|
217
|
+
interface XhrUploaderOptions<TResponse = unknown> {
|
|
218
|
+
/** Endpoint, or a function returning one (e.g. a presigned URL). */
|
|
219
|
+
url: PerItem<string>;
|
|
220
|
+
/** Default `POST`. Use `PUT` with `body: 'raw'` for S3/GCS presigned URLs. */
|
|
221
|
+
method?: 'POST' | 'PUT' | 'PATCH';
|
|
222
|
+
headers?: PerItem<Record<string, string>>;
|
|
223
|
+
/** `form-data` (default) sends multipart; `raw` sends the file bytes as the body. */
|
|
224
|
+
body?: 'form-data' | 'raw';
|
|
225
|
+
/** Multipart field name for the file. Default `"file"`. */
|
|
226
|
+
fieldName?: string;
|
|
227
|
+
/** Extra multipart fields. */
|
|
228
|
+
formData?: PerItem<Record<string, string | Blob>>;
|
|
229
|
+
withCredentials?: boolean;
|
|
230
|
+
/** Request timeout in ms. 0 / undefined disables it. */
|
|
231
|
+
timeout?: number;
|
|
232
|
+
/** Turn the finished XHR into your response type. Defaults to JSON when possible, else text. */
|
|
233
|
+
parseResponse?: (xhr: XMLHttpRequest) => TResponse;
|
|
234
|
+
/** Which statuses count as success. Default 2xx. */
|
|
235
|
+
isSuccess?: (status: number) => boolean;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Real network transport built on `XMLHttpRequest`, the only browser API that
|
|
239
|
+
* reports upload progress for request bodies on HTTP/1.1.
|
|
240
|
+
*/
|
|
241
|
+
declare function createXhrUploader<TResponse = unknown>(options: XhrUploaderOptions<TResponse>): UploadHandler<TResponse>;
|
|
242
|
+
interface SimulatedUploaderOptions {
|
|
243
|
+
/** Simulated throughput in bytes per second. A `[min, max]` range picks a random speed per file. Default `[1.5 MB, 6 MB]`. */
|
|
244
|
+
speed?: number | readonly [number, number];
|
|
245
|
+
/** Minimum duration in ms so tiny files still show motion. Default 1400. */
|
|
246
|
+
minDuration?: number;
|
|
247
|
+
/** 0..1 probability that an attempt fails midway. Default 0. */
|
|
248
|
+
failureRate?: number;
|
|
249
|
+
/** Delay before the first byte, in ms. Default 250. */
|
|
250
|
+
latency?: number;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Demo transport: no bytes leave the browser. The returned handler is flagged
|
|
254
|
+
* `simulated: true` so built-in components display a "Simulated" badge.
|
|
255
|
+
*/
|
|
256
|
+
declare function createSimulatedUploader(options?: SimulatedUploaderOptions): UploadHandler<{
|
|
257
|
+
simulated: true;
|
|
258
|
+
name: string;
|
|
259
|
+
size: number;
|
|
260
|
+
}>;
|
|
261
|
+
//#endregion
|
|
262
|
+
//#region src/core/validation.d.ts
|
|
263
|
+
/** Normalises `accept` to lower-case tokens: `['image/*', '.pdf', 'application/json']`. */
|
|
264
|
+
declare function parseAccept(accept: string | readonly string[] | undefined): string[];
|
|
265
|
+
/** Mirrors the browser's `accept` matching rules. An empty list accepts everything. */
|
|
266
|
+
declare function isFileAccepted(file: {
|
|
267
|
+
name: string;
|
|
268
|
+
type?: string;
|
|
269
|
+
}, accept: readonly string[]): boolean;
|
|
270
|
+
/** Human description of an accept list: `"Images, PDF"`. */
|
|
271
|
+
declare function describeAccept(accept: readonly string[]): string;
|
|
272
|
+
interface ValidationRules {
|
|
273
|
+
accept: readonly string[];
|
|
274
|
+
maxSize?: number;
|
|
275
|
+
minSize?: number;
|
|
276
|
+
validate?: CustomValidator;
|
|
277
|
+
}
|
|
278
|
+
declare function validateFile(file: File, rules: ValidationRules, items: readonly UploadItem[]): RejectionReason[];
|
|
279
|
+
//#endregion
|
|
280
|
+
//#region src/core/file-kind.d.ts
|
|
281
|
+
declare function getExtension(name: string): string;
|
|
282
|
+
/** Classifies a file by extension first (more specific), then MIME type. */
|
|
283
|
+
declare function getFileKind(file: {
|
|
284
|
+
name: string;
|
|
285
|
+
type?: string;
|
|
286
|
+
}): FileKind;
|
|
287
|
+
/** Short badge label such as `PDF`, `DOCX`, `MP4`. Falls back to the kind. */
|
|
288
|
+
declare function getFileLabel(file: {
|
|
289
|
+
name: string;
|
|
290
|
+
type?: string;
|
|
291
|
+
}): string;
|
|
292
|
+
/** Kinds that browsers can render as an `<img>` without extra libraries. */
|
|
293
|
+
declare function isPreviewableImage(file: {
|
|
294
|
+
name: string;
|
|
295
|
+
type?: string;
|
|
296
|
+
}): boolean;
|
|
297
|
+
//#endregion
|
|
298
|
+
//#region src/core/format.d.ts
|
|
299
|
+
/**
|
|
300
|
+
* `25 * 1024 * 1024` → `"25 MB"`. Uses 1024-based units so limits written the
|
|
301
|
+
* usual way (`n * 1024 * 1024`) read back exactly as configured.
|
|
302
|
+
*/
|
|
303
|
+
declare function formatBytes(bytes: number, fractionDigits?: number): string;
|
|
304
|
+
declare function formatSpeed(bytesPerSecond: number): string;
|
|
305
|
+
/** `5` → `"5 seconds"`, `90` → `"2 minutes"`, `3900` → `"1 hour"` */
|
|
306
|
+
declare function formatDuration(seconds: number): string;
|
|
307
|
+
declare function formatPercent(fraction: number): string;
|
|
308
|
+
declare function clamp01(value: number): number;
|
|
309
|
+
//#endregion
|
|
310
|
+
//#region src/core/preset-catalog.d.ts
|
|
311
|
+
/**
|
|
312
|
+
* Plain-data descriptions of the built-in presets. No React here, so this is
|
|
313
|
+
* importable from servers (docs pages, sitemaps, CMS schemas) via
|
|
314
|
+
* `upload-motion/core`. The React entry attaches a Component to each entry.
|
|
315
|
+
*/
|
|
316
|
+
type PresetId = 'card-fan' | 'wave-bar' | 'hoop-shot' | 'essential' | 'magnetic' | 'portal' | 'liquid' | 'segment-ring' | 'stack' | 'orbit' | 'bloom' | 'page-reveal' | 'filmstrip' | 'waveform' | 'pixel' | 'beam' | 'adaptive';
|
|
317
|
+
type PresetCategory = 'reference' | 'professional' | 'expressive' | 'media';
|
|
318
|
+
interface PresetInfo {
|
|
319
|
+
id: PresetId;
|
|
320
|
+
name: string;
|
|
321
|
+
description: string;
|
|
322
|
+
category: PresetCategory;
|
|
323
|
+
/** Short list of use cases, shown in docs and galleries. */
|
|
324
|
+
bestFor: readonly string[];
|
|
325
|
+
/** Options the preset defaults to (user props still win). */
|
|
326
|
+
defaults?: {
|
|
327
|
+
autoUpload?: boolean;
|
|
328
|
+
progressVariant?: 'bar' | 'ring' | 'wave' | 'beam';
|
|
329
|
+
layout?: 'list' | 'grid';
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
declare const PRESET_INFO: {
|
|
333
|
+
'card-fan': {
|
|
334
|
+
id: "card-fan";
|
|
335
|
+
name: string;
|
|
336
|
+
description: string;
|
|
337
|
+
category: "reference";
|
|
338
|
+
bestFor: string[];
|
|
339
|
+
defaults: {
|
|
340
|
+
autoUpload: false;
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
'wave-bar': {
|
|
344
|
+
id: "wave-bar";
|
|
345
|
+
name: string;
|
|
346
|
+
description: string;
|
|
347
|
+
category: "reference";
|
|
348
|
+
bestFor: string[];
|
|
349
|
+
defaults: {
|
|
350
|
+
progressVariant: "wave";
|
|
351
|
+
};
|
|
352
|
+
};
|
|
353
|
+
'hoop-shot': {
|
|
354
|
+
id: "hoop-shot";
|
|
355
|
+
name: string;
|
|
356
|
+
description: string;
|
|
357
|
+
category: "reference";
|
|
358
|
+
bestFor: string[];
|
|
359
|
+
defaults: {
|
|
360
|
+
autoUpload: false;
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
essential: {
|
|
364
|
+
id: "essential";
|
|
365
|
+
name: string;
|
|
366
|
+
description: string;
|
|
367
|
+
category: "professional";
|
|
368
|
+
bestFor: string[];
|
|
369
|
+
};
|
|
370
|
+
'segment-ring': {
|
|
371
|
+
id: "segment-ring";
|
|
372
|
+
name: string;
|
|
373
|
+
description: string;
|
|
374
|
+
category: "professional";
|
|
375
|
+
bestFor: string[];
|
|
376
|
+
defaults: {
|
|
377
|
+
progressVariant: "ring";
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
beam: {
|
|
381
|
+
id: "beam";
|
|
382
|
+
name: string;
|
|
383
|
+
description: string;
|
|
384
|
+
category: "expressive";
|
|
385
|
+
bestFor: string[];
|
|
386
|
+
defaults: {
|
|
387
|
+
progressVariant: "beam";
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
magnetic: {
|
|
391
|
+
id: "magnetic";
|
|
392
|
+
name: string;
|
|
393
|
+
description: string;
|
|
394
|
+
category: "expressive";
|
|
395
|
+
bestFor: string[];
|
|
396
|
+
};
|
|
397
|
+
portal: {
|
|
398
|
+
id: "portal";
|
|
399
|
+
name: string;
|
|
400
|
+
description: string;
|
|
401
|
+
category: "expressive";
|
|
402
|
+
bestFor: string[];
|
|
403
|
+
};
|
|
404
|
+
liquid: {
|
|
405
|
+
id: "liquid";
|
|
406
|
+
name: string;
|
|
407
|
+
description: string;
|
|
408
|
+
category: "expressive";
|
|
409
|
+
bestFor: string[];
|
|
410
|
+
};
|
|
411
|
+
stack: {
|
|
412
|
+
id: "stack";
|
|
413
|
+
name: string;
|
|
414
|
+
description: string;
|
|
415
|
+
category: "expressive";
|
|
416
|
+
bestFor: string[];
|
|
417
|
+
};
|
|
418
|
+
orbit: {
|
|
419
|
+
id: "orbit";
|
|
420
|
+
name: string;
|
|
421
|
+
description: string;
|
|
422
|
+
category: "expressive";
|
|
423
|
+
bestFor: string[];
|
|
424
|
+
};
|
|
425
|
+
bloom: {
|
|
426
|
+
id: "bloom";
|
|
427
|
+
name: string;
|
|
428
|
+
description: string;
|
|
429
|
+
category: "media";
|
|
430
|
+
bestFor: string[];
|
|
431
|
+
};
|
|
432
|
+
'page-reveal': {
|
|
433
|
+
id: "page-reveal";
|
|
434
|
+
name: string;
|
|
435
|
+
description: string;
|
|
436
|
+
category: "media";
|
|
437
|
+
bestFor: string[];
|
|
438
|
+
};
|
|
439
|
+
filmstrip: {
|
|
440
|
+
id: "filmstrip";
|
|
441
|
+
name: string;
|
|
442
|
+
description: string;
|
|
443
|
+
category: "media";
|
|
444
|
+
bestFor: string[];
|
|
445
|
+
};
|
|
446
|
+
waveform: {
|
|
447
|
+
id: "waveform";
|
|
448
|
+
name: string;
|
|
449
|
+
description: string;
|
|
450
|
+
category: "media";
|
|
451
|
+
bestFor: string[];
|
|
452
|
+
};
|
|
453
|
+
pixel: {
|
|
454
|
+
id: "pixel";
|
|
455
|
+
name: string;
|
|
456
|
+
description: string;
|
|
457
|
+
category: "media";
|
|
458
|
+
bestFor: string[];
|
|
459
|
+
};
|
|
460
|
+
adaptive: {
|
|
461
|
+
id: "adaptive";
|
|
462
|
+
name: string;
|
|
463
|
+
description: string;
|
|
464
|
+
category: "media";
|
|
465
|
+
bestFor: string[];
|
|
466
|
+
};
|
|
467
|
+
};
|
|
468
|
+
/** Built-in presets in gallery order. */
|
|
469
|
+
declare const presetCatalog: readonly PresetInfo[];
|
|
470
|
+
//#endregion
|
|
471
|
+
export { FileRejection as A, UploadTotals as B, AddFilesResult as C, ClearFilter as D, createUploadStore as E, UploadEventMap as F, isUploadError as G, UploadError as H, UploadHandler as I, toUploadError as K, UploadItem as L, RejectionReason as M, RetryOptions as N, CustomValidator as O, UploadContext as P, UploadSnapshot as R, createXhrUploader as S, computeTotals as T, UploadErrorCode as U, UploaderOptions as V, httpErrorMessage as W, parseAccept as _, presetCatalog as a, XhrUploaderOptions as b, formatDuration as c, getExtension as d, getFileKind as f, isFileAccepted as g, describeAccept as h, PresetInfo as i, RejectionCode as j, FileKind as k, formatPercent as l, isPreviewableImage as m, PresetCategory as n, clamp01 as o, getFileLabel as p, PresetId as r, formatBytes as s, PRESET_INFO as t, formatSpeed as u, validateFile as v, UploadStore as w, createSimulatedUploader as x, SimulatedUploaderOptions as y, UploadStatus as z };
|