@visulima/storage-client 1.0.0-alpha.14 → 1.0.0-alpha.16

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.
Files changed (42) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +23 -0
  3. package/dist/index.d.ts +24 -4
  4. package/dist/index.js +1 -1
  5. package/dist/packem_shared/MemoryUrlStorage-DEJTeeWV.js +1 -0
  6. package/dist/packem_shared/UploadControl-CKU7Tv3Q.js +1 -0
  7. package/dist/packem_shared/createChunkedRestAdapter-DwdZ3iXf.js +1 -0
  8. package/dist/packem_shared/createChunkedRestUpload-DZbjiORY.js +1 -0
  9. package/dist/packem_shared/createChunkedRestUpload-WgfiLIto.js +1 -0
  10. package/dist/packem_shared/createTusAdapter-DMWzJjQ2.js +1 -0
  11. package/dist/packem_shared/createTusUpload-Con3Nqu0.js +1 -0
  12. package/dist/packem_shared/createTusUpload-l00I3jXp.js +1 -0
  13. package/dist/packem_shared/{createUpload-BF6TujIH.js → createUpload-D3_GPTNX.js} +1 -1
  14. package/dist/packem_shared/{createUpload-0qE79TWD.js → createUpload-RIaQluah.js} +1 -1
  15. package/dist/packem_shared/defaultFingerprint-CI2Sdd2s.js +1 -0
  16. package/dist/packem_shared/uploader.d-B1FMsMcN.d.ts +381 -0
  17. package/dist/packem_shared/useChunkedRestUpload-BwOE2zhr.js +1 -0
  18. package/dist/packem_shared/useChunkedRestUpload-DNGNQIIx.js +1 -0
  19. package/dist/packem_shared/useTusUpload-Bz4XE_4p.js +1 -0
  20. package/dist/packem_shared/useTusUpload-Dsq9GGEt.js +1 -0
  21. package/dist/packem_shared/{useUpload-C5ZiPWFM.js → useUpload-B6rd2qkI.js} +1 -1
  22. package/dist/packem_shared/{useUpload-7OjscFW6.js → useUpload-BhLsUgVG.js} +1 -1
  23. package/dist/react/index.d.ts +17 -1
  24. package/dist/react/index.js +1 -1
  25. package/dist/solid/index.d.ts +13 -1
  26. package/dist/solid/index.js +1 -1
  27. package/dist/svelte/index.d.ts +13 -1
  28. package/dist/svelte/index.js +1 -1
  29. package/dist/vue/index.d.ts +13 -1
  30. package/dist/vue/index.js +1 -1
  31. package/package.json +2 -4
  32. package/dist/packem_shared/createChunkedRestAdapter-CWFhVX6x.js +0 -1
  33. package/dist/packem_shared/createChunkedRestUpload-BH_5ZAr2.js +0 -1
  34. package/dist/packem_shared/createChunkedRestUpload-DAoXFznW.js +0 -1
  35. package/dist/packem_shared/createTusAdapter-BbFsUNsP.js +0 -1
  36. package/dist/packem_shared/createTusUpload-DKIIHh2X.js +0 -1
  37. package/dist/packem_shared/createTusUpload-rZKMrL5n.js +0 -1
  38. package/dist/packem_shared/uploader.d-DsC50BbX.d.ts +0 -223
  39. package/dist/packem_shared/useChunkedRestUpload-C9RhEtUt.js +0 -1
  40. package/dist/packem_shared/useChunkedRestUpload-tirJ_5VX.js +0 -1
  41. package/dist/packem_shared/useTusUpload-B5KsdwDR.js +0 -1
  42. package/dist/packem_shared/useTusUpload-BwF0G1LE.js +0 -1
@@ -0,0 +1,381 @@
1
+ /**
2
+ * Identifier for the upload protocol the fingerprint scopes to.
3
+ * Two uploads of the same file to the same endpoint must hash to
4
+ * different values if they use different protocols, so each adapter
5
+ * can only ever resume its own state.
6
+ */
7
+ type FingerprintProtocol = "chunked-rest" | "tus";
8
+ interface FingerprintInput {
9
+ endpoint: string;
10
+ file: File;
11
+ protocol: FingerprintProtocol;
12
+ }
13
+ type FingerprintFunction = (input: FingerprintInput) => Promise<string> | string;
14
+ /**
15
+ * Default fingerprint format — matches tus-js-client's `${name}-${size}-${type}-${lastModified}`
16
+ * shape, prefixed with the protocol + endpoint so the same file uploaded to two different
17
+ * servers (or via two different protocols) does not collide in shared storage.
18
+ *
19
+ * User-controlled string fields (endpoint, file.name, file.type) are percent-encoded so a `::`
20
+ * embedded in any of them cannot collide with the `::` delimiter.
21
+ */
22
+ declare const defaultFingerprint: FingerprintFunction;
23
+ declare const SNAPSHOT_VERSION = 1;
24
+ /**
25
+ * Serializable description of an in-flight upload. Pass `toJSON()` through any
26
+ * transport (localStorage, server, query param) and rehydrate with
27
+ * `UploadControl.from(token)` in a different process to resume the upload.
28
+ */
29
+ interface UploadControlSnapshot {
30
+ /** Endpoint the upload was created against. */
31
+ endpoint: string;
32
+ /** Stable per-file fingerprint — see `defaultFingerprint`. */
33
+ fingerprint: string;
34
+ /** Bytes uploaded at the time of serialization. Advisory — adapters re-query the server. */
35
+ offset?: number;
36
+ /** Adapter that owns the upload. */
37
+ protocol: FingerprintProtocol;
38
+ /**
39
+ * Server-issued resume key. For TUS this is the `Location` header from the
40
+ * initial POST (an absolute or relative URL). For chunked-REST this is the
41
+ * `X-Upload-ID` value (an opaque identifier the adapter slots into
42
+ * `${endpoint}/${id}`). The field is named for the TUS case for historical
43
+ * reasons; treat it as `string` and let the adapter interpret it.
44
+ */
45
+ uploadUrl: string;
46
+ /** Snapshot format version — bumped on incompatible changes. */
47
+ v: typeof SNAPSHOT_VERSION;
48
+ }
49
+ /**
50
+ * Internal contract — every adapter implementation passes one of these to
51
+ * `_attach()` so the control object can drive the in-flight upload.
52
+ */
53
+ interface UploadControlBinding {
54
+ abort: () => void;
55
+ pause: () => void;
56
+ resume: () => Promise<void>;
57
+ }
58
+ interface UploadControlAttachMeta {
59
+ endpoint: string;
60
+ fingerprint: string;
61
+ protocol: FingerprintProtocol;
62
+ uploadUrl: string;
63
+ }
64
+ /**
65
+ * Unified pause/resume/abort handle for an upload.
66
+ *
67
+ * Lifecycle:
68
+ * 1. Construct empty (`new UploadControl()`) and pass into `adapter.upload(file, { control })`.
69
+ * 2. The adapter calls `_attach()` once the upload identifier is known.
70
+ * 3. Callers drive the upload via `pause/resume/abort`.
71
+ * 4. `toJSON()` returns a serializable snapshot.
72
+ * 5. In a future process, `UploadControl.from(snapshot)` returns a control
73
+ * pre-loaded with the snapshot — pass it to `adapter.upload(file, { control })`
74
+ * and the adapter resumes the in-flight upload instead of starting a new one.
75
+ */
76
+ declare class UploadControl {
77
+ #private;
78
+ static from(token: string | UploadControlSnapshot): UploadControl;
79
+ abort(): void;
80
+ get endpoint(): string | undefined;
81
+ get fingerprint(): string | undefined;
82
+ get offset(): number;
83
+ pause(): void;
84
+ get protocol(): FingerprintProtocol | undefined;
85
+ resume(): Promise<void>;
86
+ /**
87
+ * Snapshot loaded via `UploadControl.from(token)` — adapters read this to
88
+ * decide whether to skip the create step and resume an existing upload.
89
+ */
90
+ get snapshot(): UploadControlSnapshot | undefined;
91
+ toJSON(): UploadControlSnapshot;
92
+ get uploadUrl(): string | undefined;
93
+ }
94
+ /**
95
+ * A single persisted upload session — the minimum data an adapter needs to
96
+ * resume the upload in a brand-new process.
97
+ *
98
+ * For TUS, `uploadUrl` is the Location header returned from the initial POST.
99
+ * For chunked-REST, `uploadUrl` carries the server-issued file ID (the same
100
+ * value the adapter slots into `${endpoint}/${fileId}` for PATCH/HEAD).
101
+ */
102
+ interface UrlStorageEntry {
103
+ /** When this entry was added (ms epoch). Lets callers prune stale entries. */
104
+ createdAt: number;
105
+ /** Endpoint the upload was created against. */
106
+ endpoint: string;
107
+ /** Stable per-file identifier — see `defaultFingerprint`. */
108
+ fingerprint: string;
109
+ /** File `lastModified` at the time the upload was created. */
110
+ lastModified?: number;
111
+ /** Which adapter wrote this entry. */
112
+ protocol: FingerprintProtocol;
113
+ /** File size in bytes at the time the upload was created. */
114
+ size?: number;
115
+ /** TUS uploadUrl or chunked-REST fileId. */
116
+ uploadUrl: string;
117
+ }
118
+ interface UrlStorage {
119
+ addEntry: (entry: UrlStorageEntry) => Promise<void>;
120
+ findEntry: (fingerprint: string) => Promise<UrlStorageEntry | undefined>;
121
+ listEntries: () => Promise<UrlStorageEntry[]>;
122
+ removeEntry: (fingerprint: string) => Promise<void>;
123
+ }
124
+ /**
125
+ * In-memory storage — uploads survive within the same process only.
126
+ * Used as the fallback when no persistent storage is available.
127
+ */
128
+ declare class MemoryUrlStorage implements UrlStorage {
129
+ #private;
130
+ addEntry(entry: UrlStorageEntry): Promise<void>;
131
+ findEntry(fingerprint: string): Promise<UrlStorageEntry | undefined>;
132
+ listEntries(): Promise<UrlStorageEntry[]>;
133
+ removeEntry(fingerprint: string): Promise<void>;
134
+ }
135
+ interface LocalStorageLike {
136
+ getItem: (key: string) => string | null;
137
+ key: (index: number) => string | null;
138
+ readonly length: number;
139
+ removeItem: (key: string) => void;
140
+ setItem: (key: string, value: string) => void;
141
+ }
142
+ /**
143
+ * Persists entries to the browser's `localStorage`. One key per fingerprint,
144
+ * prefixed to avoid collisions with the host application.
145
+ */
146
+ declare class LocalStorageUrlStorage implements UrlStorage {
147
+ #private;
148
+ constructor(storage?: LocalStorageLike, prefix?: string);
149
+ addEntry(entry: UrlStorageEntry): Promise<void>;
150
+ findEntry(fingerprint: string): Promise<UrlStorageEntry | undefined>;
151
+ listEntries(): Promise<UrlStorageEntry[]>;
152
+ removeEntry(fingerprint: string): Promise<void>;
153
+ }
154
+ /**
155
+ * Picks the best available storage for the current runtime.
156
+ * Browser → `LocalStorageUrlStorage`. Everywhere else → `MemoryUrlStorage`.
157
+ */
158
+ declare const defaultUrlStorage: () => UrlStorage;
159
+ /**
160
+ * Upload method type for useUpload hook
161
+ */
162
+ type UploadMethod = "auto" | "chunked-rest" | "multipart" | "tus";
163
+ /**
164
+ * File metadata returned from the server (matches OpenAPI FileMeta schema)
165
+ */
166
+ interface FileMeta {
167
+ /** Bytes written to storage */
168
+ bytesWritten?: number;
169
+ /** Content type of the uploaded file */
170
+ contentType?: string;
171
+ /** File creation timestamp */
172
+ createdAt?: string;
173
+ /** Unique identifier for the uploaded file */
174
+ id: string;
175
+ /** Additional metadata associated with the file */
176
+ metadata?: Record<string, unknown>;
177
+ /** Storage name of the file */
178
+ name?: string;
179
+ /** Original filename of the uploaded file */
180
+ originalName?: string;
181
+ /** Size of the uploaded file in bytes */
182
+ size?: number;
183
+ /** Upload status: 'completed', 'part', 'deleted', or 'created' */
184
+ status?: "completed" | "part" | "deleted" | "created";
185
+ }
186
+ /**
187
+ * Result returned after a successful file upload
188
+ * Extends FileMeta with additional client-side fields
189
+ */
190
+ interface UploadResult extends FileMeta {
191
+ /** Original filename of the uploaded file (alias for originalName) */
192
+ filename?: string;
193
+ /** Current upload offset in bytes (TUS only) */
194
+ offset?: number;
195
+ /** URL to access the uploaded file */
196
+ url?: string;
197
+ }
198
+ /**
199
+ * Upload item state
200
+ */
201
+ interface UploadItem {
202
+ /** Batch ID this item belongs to (if part of a batch) */
203
+ batchId?: string;
204
+ /** Upload progress percentage (0-100) */
205
+ completed: number;
206
+ /** Error message if upload failed */
207
+ error?: string;
208
+ /** The file being uploaded */
209
+ file: File;
210
+ /** Unique item ID */
211
+ id: string;
212
+ /** Bytes uploaded so far */
213
+ loaded: number;
214
+ /** Number of retry attempts */
215
+ retryCount?: number;
216
+ /** Total file size in bytes */
217
+ size: number;
218
+ /** Upload status */
219
+ status: "pending" | "uploading" | "completed" | "error" | "aborted";
220
+ /** Upload response data */
221
+ uploadResponse?: {
222
+ data?: unknown;
223
+ response?: string;
224
+ };
225
+ /** File URL after upload */
226
+ url?: string;
227
+ }
228
+ /**
229
+ * Batch state information
230
+ */
231
+ interface BatchState {
232
+ /** Number of completed items */
233
+ completedCount: number;
234
+ /** Number of failed items */
235
+ errorCount: number;
236
+ /** Batch ID */
237
+ id: string;
238
+ /** Item IDs in this batch */
239
+ itemIds: string[];
240
+ /** Aggregate progress (0-100) */
241
+ progress: number;
242
+ /** Batch status */
243
+ status: "pending" | "uploading" | "completed" | "error" | "cancelled";
244
+ /** Total number of items */
245
+ totalCount: number;
246
+ }
247
+ /**
248
+ * Uploader event types
249
+ */
250
+ type UploaderEventType = "BATCH_CANCELLED" | "BATCH_COMPLETE" | "BATCH_ERROR" | "BATCH_FINALIZE" | "BATCH_FINISH" | "BATCH_PROGRESS" | "BATCH_START" | "ITEM_ABORT" | "ITEM_ERROR" | "ITEM_FINISH" | "ITEM_PROGRESS" | "ITEM_START";
251
+ /**
252
+ * Event handler function type
253
+ */
254
+ type UploaderEventHandler<T = UploadItem | BatchState> = (item: T) => void;
255
+ /**
256
+ * Configuration options for the uploader.
257
+ */
258
+ interface UploaderOptions {
259
+ /** Upload endpoint URL */
260
+ endpoint: string;
261
+ /** Maximum number of retry attempts */
262
+ maxRetries?: number;
263
+ /** Additional metadata to include with the upload */
264
+ metadata?: Record<string, string>;
265
+ /** Enable automatic retry on failure */
266
+ retry?: boolean;
267
+ }
268
+ /**
269
+ * Uploader class - event-driven file uploader inspired by rpldy design
270
+ */
271
+ declare class Uploader {
272
+ private readonly options;
273
+ /**
274
+ * Creates FormData for visulima multipart handler.
275
+ */
276
+ private static createFormData;
277
+ /**
278
+ * Parses response as FileMeta.
279
+ */
280
+ private static parseResponse;
281
+ private items;
282
+ private batches;
283
+ private eventHandlers;
284
+ private activeUploads;
285
+ private itemIdCounter;
286
+ private batchIdCounter;
287
+ constructor(options: UploaderOptions);
288
+ /**
289
+ * Subscribes to uploader events.
290
+ */
291
+ on(event: UploaderEventType, handler: UploaderEventHandler): void;
292
+ /**
293
+ * Unsubscribes from uploader events.
294
+ */
295
+ off(event: UploaderEventType, handler: UploaderEventHandler): void;
296
+ /**
297
+ * Adds a file to the upload queue.
298
+ */
299
+ add(file: File, batchId?: string): string;
300
+ /**
301
+ * Adds multiple files to the upload queue as a batch.
302
+ */
303
+ addBatch(files: File[]): string[];
304
+ /**
305
+ * Gets an item by ID.
306
+ */
307
+ getItem(id: string): UploadItem | undefined;
308
+ /**
309
+ * Aborts a specific upload.
310
+ */
311
+ abortItem(id: string): void;
312
+ /**
313
+ * Aborts all uploads in a batch.
314
+ */
315
+ abortBatch(batchId: string): void;
316
+ /**
317
+ * Aborts all uploads.
318
+ */
319
+ abort(): void;
320
+ /**
321
+ * Clears all items and aborts active uploads.
322
+ */
323
+ clear(): void;
324
+ /**
325
+ * Gets all items.
326
+ */
327
+ getItems(): UploadItem[];
328
+ /**
329
+ * Gets all items in a batch.
330
+ */
331
+ getBatchItems(batchId: string): UploadItem[];
332
+ /**
333
+ * Gets batch state by batch ID.
334
+ */
335
+ getBatch(batchId: string): BatchState | undefined;
336
+ /**
337
+ * Gets all batches.
338
+ */
339
+ getBatches(): BatchState[];
340
+ /**
341
+ * Retries a failed upload item.
342
+ */
343
+ retryItem(id: string): void;
344
+ /**
345
+ * Retries all failed items in a batch.
346
+ */
347
+ retryBatch(batchId: string): void;
348
+ /**
349
+ * Generates a unique item ID.
350
+ */
351
+ private generateItemId;
352
+ /**
353
+ * Generates a unique batch ID.
354
+ */
355
+ private generateBatchId;
356
+ /**
357
+ * Calculates aggregate progress for a batch.
358
+ */
359
+ private calculateBatchProgress;
360
+ /**
361
+ * Updates batch state and emits batch progress event.
362
+ */
363
+ private updateBatchProgress;
364
+ /**
365
+ * Emits a batch event to all registered handlers.
366
+ */
367
+ private emitBatch;
368
+ /**
369
+ * Emits an event to all registered handlers.
370
+ */
371
+ private emit;
372
+ /**
373
+ * Uploads a single file.
374
+ */
375
+ private uploadFile;
376
+ }
377
+ /**
378
+ * Creates a new uploader instance.
379
+ */
380
+ declare const createUploader: (options: UploaderOptions) => Uploader;
381
+ export { BatchState as B, FingerprintFunction as F, LocalStorageUrlStorage as L, MemoryUrlStorage as M, UploadControl as U, UrlStorage as a, UploadResult as b, Uploader as c, FileMeta as d, UploaderOptions as e, FingerprintInput as f, FingerprintProtocol as g, UploadControlAttachMeta as h, UploadControlBinding as i, UploadControlSnapshot as j, UploadItem as k, UploaderEventHandler as l, UploaderEventType as m, UrlStorageEntry as n, createUploader as o, defaultFingerprint as p, defaultUrlStorage as q, UploadMethod as r };
@@ -0,0 +1 @@
1
+ var _=Object.defineProperty;var z=(i,a)=>_(i,"name",{value:a,configurable:!0});import{useState as u,useMemo as J,useRef as K,useEffect as C,useCallback as l}from"react";import{createChunkedRestAdapter as L}from"./createChunkedRestAdapter-DwdZ3iXf.js";var N=Object.defineProperty,Q=z((i,a)=>N(i,"name",{value:a,configurable:!0}),"F");const Y=Q(i=>{const{chunkSize:a,control:E,endpoint:w,fingerprint:O,maxRetries:R,metadata:b,onError:g,onPause:p,onProgress:S,onResume:m,onStart:h,onSuccess:v,retry:y,urlStorage:k}=i,[F,d]=u(0),[T,s]=u(!1),[j,o]=u(!1),[A,P]=u(void 0),[I,x]=u(void 0),[M,f]=u(0),e=J(()=>L({chunkSize:a,control:E,endpoint:w,fingerprint:O,maxRetries:R,metadata:b,retry:y,urlStorage:k}),[a,E,w,O,R,b,y,k]),n=K({onError:g,onPause:p,onProgress:S,onResume:m,onStart:h,onSuccess:v});C(()=>{n.current={onError:g,onPause:p,onProgress:S,onResume:m,onStart:h,onSuccess:v}},[g,S,p,m,h,v]),C(()=>{e.setOnStart(()=>{s(!0),o(!1),d(0),P(void 0),f(0),n.current.onStart?.()}),e.setOnProgress((r,U)=>{d(r),f(U),n.current.onProgress?.(r,U)}),e.setOnFinish(r=>{d(100),x(r),s(!1),o(!1),n.current.onSuccess?.(r)}),e.setOnError(r=>{P(r),s(!1),n.current.onError?.(r)});let t=!0;const c=setInterval(()=>{!t||!("window"in globalThis)||(e.getOffset().then(r=>(!t||!("window"in globalThis)||f(r),r)).catch(()=>{}),o(e.isPaused()))},100);return()=>{t=!1,clearInterval(c),e.setOnStart(void 0),e.setOnProgress(void 0),e.setOnFinish(void 0),e.setOnError(void 0)}},[e]);const q=l(async t=>{try{return await e.upload(t)}catch(c){throw c instanceof Error?c:new Error(String(c))}},[e]),B=l(()=>{e.pause(),o(!0),n.current.onPause?.()},[e]),D=l(async()=>{o(!1),s(!0),n.current.onResume?.();try{await e.resume()}catch(t){throw s(!1),t instanceof Error?t:new Error(String(t))}},[e]),G=l(()=>{e.abort(),s(!1),o(!1)},[e]),H=l(()=>{e.clear(),d(0),s(!1),o(!1),P(void 0),x(void 0),f(0)},[e]);return{abort:G,error:A,isPaused:j,isUploading:T,offset:M,pause:B,progress:F,reset:H,result:I,resume:D,upload:q}},"useChunkedRestUpload");export{Y as useChunkedRestUpload};
@@ -0,0 +1 @@
1
+ var C=Object.defineProperty;var m=(v,i)=>C(v,"name",{value:i,configurable:!0});import{ref as n,onMounted as x,onBeforeUnmount as z}from"vue";import{createChunkedRestAdapter as F}from"./createChunkedRestAdapter-DwdZ3iXf.js";var I=Object.defineProperty,l=m((v,i)=>I(v,"name",{value:i,configurable:!0}),"s");const M=l(v=>{const{chunkSize:i,control:g,endpoint:h,fingerprint:O,maxRetries:S,metadata:y,onError:f,onPause:E,onProgress:P,onResume:R,onStart:b,onSuccess:k,retry:w,urlStorage:U}=v,d=n(0),a=n(!1),t=n(!1),o=n(void 0),p=n(void 0),c=n(0),r=F({chunkSize:i,control:g,endpoint:h,fingerprint:O,maxRetries:S,metadata:y,retry:w,urlStorage:U});return x(()=>{r.setOnStart(()=>{a.value=!0,t.value=!1,d.value=0,o.value=void 0,c.value=0,b?.()}),r.setOnProgress((e,u)=>{d.value=e,c.value=u,P?.(e,u)}),r.setOnFinish(e=>{d.value=100,p.value=e,a.value=!1,t.value=!1,k?.(e)}),r.setOnError(e=>{o.value=e,a.value=!1,f?.(e)});const s=setInterval(()=>{r.getOffset().then(e=>(c.value=e,e)).catch(()=>{}),t.value=r.isPaused()},100);z(()=>{clearInterval(s),r.setOnStart(void 0),r.setOnProgress(void 0),r.setOnFinish(void 0),r.setOnError(void 0)})}),{abort:l(()=>{r.abort(),a.value=!1,t.value=!1},"abort"),error:o,isPaused:t,isUploading:a,offset:c,pause:l(()=>{r.pause(),t.value=!0,E?.()},"pause"),progress:d,reset:l(()=>{r.clear(),d.value=0,a.value=!1,t.value=!1,o.value=void 0,p.value=void 0,c.value=0},"reset"),result:p,resume:l(async()=>{t.value=!1,a.value=!0,R?.();try{await r.resume()}catch(s){const e=s instanceof Error?s:new Error(String(s));throw o.value=e,a.value=!1,f?.(e),e}},"resume"),upload:l(async s=>{try{return await r.upload(s)}catch(e){const u=e instanceof Error?e:new Error(String(e));throw o.value=u,f?.(u),u}},"upload")}},"useChunkedRestUpload");export{M as useChunkedRestUpload};
@@ -0,0 +1 @@
1
+ var F=Object.defineProperty;var m=(n,v)=>F(n,"name",{value:v,configurable:!0});import{ref as u,onMounted as T,onBeforeUnmount as k}from"vue";import{createTusAdapter as z}from"./createTusAdapter-DMWzJjQ2.js";var I=Object.defineProperty,l=m((n,v)=>I(n,"name",{value:v,configurable:!0}),"s");const M=l(n=>{const{chunkSize:v,control:g,endpoint:O,fingerprint:S,maxRetries:h,metadata:y,onError:d,onPause:E,onProgress:P,onResume:w,onStart:b,onSuccess:U,retry:R,urlStorage:x}=n,i=u(0),a=u(!1),t=u(!1),o=u(void 0),p=u(void 0),f=u(0),r=z({chunkSize:v,control:g,endpoint:O,fingerprint:S,maxRetries:h,metadata:y,retry:R,urlStorage:x});return T(()=>{r.setOnStart(()=>{a.value=!0,t.value=!1,i.value=0,o.value=void 0,f.value=0,b?.()}),r.setOnProgress((e,c)=>{i.value=e,f.value=c,P?.(e)}),r.setOnFinish(e=>{i.value=100,p.value=e,a.value=!1,t.value=!1,U?.(e)}),r.setOnError(e=>{o.value=e,a.value=!1,d?.(e)});const s=setInterval(()=>{f.value=r.getOffset(),t.value=r.isPaused()},100);k(()=>{clearInterval(s),r.setOnStart(void 0),r.setOnProgress(void 0),r.setOnFinish(void 0),r.setOnError(void 0)})}),{abort:l(()=>{r.abort(),a.value=!1,t.value=!1},"abort"),error:o,isPaused:t,isUploading:a,offset:f,pause:l(()=>{r.pause(),t.value=!0,E?.()},"pause"),progress:i,reset:l(()=>{r.clear(),i.value=0,a.value=!1,t.value=!1,o.value=void 0,p.value=void 0,f.value=0},"reset"),result:p,resume:l(async()=>{t.value=!1,a.value=!0,w?.();try{await r.resume()}catch(s){const e=s instanceof Error?s:new Error(String(s));throw o.value=e,a.value=!1,d?.(e),e}},"resume"),upload:l(async s=>{try{return await r.upload(s)}catch(e){const c=e instanceof Error?e:new Error(String(e));throw o.value=c,d?.(c),c}},"upload")}},"useTusUpload");export{M as useTusUpload};
@@ -0,0 +1 @@
1
+ var _=Object.defineProperty;var z=(i,u)=>_(i,"name",{value:u,configurable:!0});import{useState as c,useMemo as K,useRef as w,useEffect as F,useCallback as f}from"react";import{createTusAdapter as L}from"./createTusAdapter-DMWzJjQ2.js";var Q=Object.defineProperty,V=z((i,u)=>Q(i,"name",{value:u,configurable:!0}),"k");const Z=V(i=>{const{chunkSize:u,control:y,endpoint:R,fingerprint:b,maxRetries:T,metadata:k,onError:g,onPause:S,onProgress:m,onResume:p,onStart:E,onSuccess:P,retry:x,urlStorage:I}=i,[j,d]=c(0),[A,s]=c(!1),[M,a]=c(!1),[q,l]=c(void 0),[B,U]=c(void 0),[C,v]=c(0),r=K(()=>L({chunkSize:u,control:y,endpoint:R,fingerprint:b,maxRetries:T,metadata:k,retry:x,urlStorage:I}),[u,y,R,b,T,k,x,I]),t=w({onError:g,onPause:S,onProgress:m,onResume:p,onStart:E,onSuccess:P}),o=w(void 0),O=w(!0);F(()=>{t.current={onError:g,onPause:S,onProgress:m,onResume:p,onStart:E,onSuccess:P}},[g,m,S,p,E,P]),F(()=>(O.current=!0,r.setOnStart(()=>{s(!0),a(!1),d(0),l(void 0),v(0),t.current.onStart?.()}),r.setOnProgress((e,n)=>{d(e),v(n),t.current.onProgress?.(e)}),r.setOnFinish(e=>{d(100),U(e),s(!1),a(!1),t.current.onSuccess?.(e)}),r.setOnError(e=>{l(e),s(!1),t.current.onError?.(e)}),o.current=setInterval(()=>{O.current&&o.current&&"window"in globalThis&&(v(r.getOffset()),a(r.isPaused()))},100),()=>{O.current=!1,o.current&&(clearInterval(o.current),o.current=void 0),r.setOnStart(void 0),r.setOnProgress(void 0),r.setOnFinish(void 0),r.setOnError(void 0)}),[r]);const D=f(async e=>{try{return await r.upload(e)}catch(n){const h=n instanceof Error?n:new Error(String(n));throw l(h),t.current.onError?.(h),h}},[r]),G=f(()=>{r.pause(),a(!0),t.current.onPause?.()},[r]),H=f(async()=>{a(!1),s(!0),t.current.onResume?.();try{await r.resume()}catch(e){const n=e instanceof Error?e:new Error(String(e));throw l(n),s(!1),t.current.onError?.(n),n}},[r]),J=f(()=>{o.current&&(clearInterval(o.current),o.current=void 0),r.abort(),s(!1),a(!1)},[r]),N=f(()=>{r.clear(),d(0),s(!1),a(!1),l(void 0),U(void 0),v(0)},[r]);return{abort:J,error:q,isPaused:M,isUploading:A,offset:C,pause:G,progress:j,reset:N,result:B,resume:H,upload:D}},"useTusUpload");export{Z as useTusUpload};
@@ -1 +1 @@
1
- var K=Object.defineProperty;var x=(m,a)=>K(m,"name",{value:a,configurable:!0});import{useMemo as k,useCallback as R}from"react";import{useChunkedRestUpload as L}from"./useChunkedRestUpload-tirJ_5VX.js";import{useMultipartUpload as _}from"./useMultipartUpload-CJMa-_Yo.js";import{useTusUpload as q}from"./useTusUpload-BwF0G1LE.js";var G=Object.defineProperty,i=x((m,a)=>G(m,"name",{value:a,configurable:!0}),"s");const Q=10*1024*1024,$=i(m=>{const{chunkSize:a,endpointChunkedRest:s,endpointMultipart:d,endpointTus:n,maxRetries:v,metadata:p,method:E,onError:l,onPause:P,onProgress:f,onResume:U,onStart:c,onSuccess:g,retry:S,tusThreshold:w=Q}=m,h=k(()=>{if(E!==void 0)return E;const u=[s,d,n].filter(Boolean);if(u.length===1)return s?"chunked-rest":n?"tus":"multipart";if(u.length>1)return"auto";throw new Error("At least one endpoint must be provided: endpointChunkedRest, endpointMultipart, or endpointTus")},[E,s,d,n]),b=k(()=>{if(s)return{chunkSize:a,endpoint:s,maxRetries:v,metadata:p,onError:l,onPause:P,onProgress:f,onResume:U,onStart:c,onSuccess:g,retry:S}},[s,a,p,c,g,l,f,P,U,S,v]),T=k(()=>{if(d)return{endpoint:d,metadata:p,onError:l,onProgress:f,onStart:c,onSuccess:g}},[d,p,c,g,l,f]),y=k(()=>{if(n)return{chunkSize:a,endpoint:n,maxRetries:v,metadata:p,onError:l,onPause:P,onProgress:f,onResume:U,onStart:c,onSuccess:g,retry:S}},[n,a,p,c,g,l,f,P,U,S,v]),e=b?L(b):void 0,o=T?_(T):void 0,r=y?q(y):void 0,C=R(u=>{if(h!=="auto")return h;if(u.size>w){if(n)return"tus";if(s)return"chunked-rest"}if(s)return"chunked-rest";if(d)return"multipart";throw new Error("No available endpoint for upload")},[h,w,s,d,n]),z=R(async u=>{const M=C(u);if(M==="tus"){if(!r)throw new Error("TUS endpoint not configured");return r.upload(u)}if(M==="chunked-rest"){if(!e)throw new Error("Chunked REST endpoint not configured");return e.upload(u)}if(!o)throw new Error("Multipart endpoint not configured");return o.upload(u)},[C,r,e,o]),I=R(()=>{r?.abort(),e?.abort(),o?.reset()},[r,e,o]),O=R(()=>{r?.reset(),e?.reset(),o?.reset()},[r,e,o]),t=k(()=>h!=="auto"?h:r&&(r.isUploading||r.result)?"tus":e&&(e.isUploading||e.result)?"chunked-rest":o&&(o.isUploading||o.result)?"multipart":s?"chunked-rest":n?"tus":"multipart",[h,r,e,o,s,d,n]),A=i(()=>t==="tus"?r?.error??void 0:t==="chunked-rest"?e?.error??void 0:o?.error??void 0,"getError"),B=i(()=>{if(t==="tus")return r?.isPaused;if(t==="chunked-rest")return e?.isPaused},"getIsPaused"),N=i(()=>t==="tus"?r?.isUploading??!1:t==="chunked-rest"?e?.isUploading??!1:o?.isUploading??!1,"getIsUploading"),j=i(()=>{if(t==="tus")return r?.offset;if(t==="chunked-rest")return e?.offset},"getOffset"),D=i(()=>{if(t==="tus")return r?.pause;if(t==="chunked-rest")return e?.pause},"getPause"),F=i(()=>t==="tus"?r?.progress??0:t==="chunked-rest"?e?.progress??0:o?.progress??0,"getProgress"),H=i(()=>t==="tus"?r?.result??void 0:t==="chunked-rest"?e?.result??void 0:o?.result??void 0,"getResult"),J=i(()=>{if(t==="tus")return r?.resume;if(t==="chunked-rest")return e?.resume},"getResume");return{abort:I,currentMethod:t,error:A(),isPaused:B(),isUploading:N(),offset:j(),pause:D(),progress:F(),reset:O,result:H(),resume:J(),upload:z}},"useUpload");export{$ as useUpload};
1
+ var K=Object.defineProperty;var x=(m,a)=>K(m,"name",{value:a,configurable:!0});import{useMemo as k,useCallback as R}from"react";import{useChunkedRestUpload as L}from"./useChunkedRestUpload-BwOE2zhr.js";import{useMultipartUpload as _}from"./useMultipartUpload-CJMa-_Yo.js";import{useTusUpload as q}from"./useTusUpload-Dsq9GGEt.js";var G=Object.defineProperty,i=x((m,a)=>G(m,"name",{value:a,configurable:!0}),"s");const Q=10*1024*1024,$=i(m=>{const{chunkSize:a,endpointChunkedRest:s,endpointMultipart:d,endpointTus:n,maxRetries:v,metadata:p,method:E,onError:l,onPause:P,onProgress:f,onResume:U,onStart:c,onSuccess:g,retry:S,tusThreshold:w=Q}=m,h=k(()=>{if(E!==void 0)return E;const u=[s,d,n].filter(Boolean);if(u.length===1)return s?"chunked-rest":n?"tus":"multipart";if(u.length>1)return"auto";throw new Error("At least one endpoint must be provided: endpointChunkedRest, endpointMultipart, or endpointTus")},[E,s,d,n]),b=k(()=>{if(s)return{chunkSize:a,endpoint:s,maxRetries:v,metadata:p,onError:l,onPause:P,onProgress:f,onResume:U,onStart:c,onSuccess:g,retry:S}},[s,a,p,c,g,l,f,P,U,S,v]),T=k(()=>{if(d)return{endpoint:d,metadata:p,onError:l,onProgress:f,onStart:c,onSuccess:g}},[d,p,c,g,l,f]),y=k(()=>{if(n)return{chunkSize:a,endpoint:n,maxRetries:v,metadata:p,onError:l,onPause:P,onProgress:f,onResume:U,onStart:c,onSuccess:g,retry:S}},[n,a,p,c,g,l,f,P,U,S,v]),e=b?L(b):void 0,o=T?_(T):void 0,r=y?q(y):void 0,C=R(u=>{if(h!=="auto")return h;if(u.size>w){if(n)return"tus";if(s)return"chunked-rest"}if(s)return"chunked-rest";if(d)return"multipart";throw new Error("No available endpoint for upload")},[h,w,s,d,n]),z=R(async u=>{const M=C(u);if(M==="tus"){if(!r)throw new Error("TUS endpoint not configured");return r.upload(u)}if(M==="chunked-rest"){if(!e)throw new Error("Chunked REST endpoint not configured");return e.upload(u)}if(!o)throw new Error("Multipart endpoint not configured");return o.upload(u)},[C,r,e,o]),I=R(()=>{r?.abort(),e?.abort(),o?.reset()},[r,e,o]),O=R(()=>{r?.reset(),e?.reset(),o?.reset()},[r,e,o]),t=k(()=>h!=="auto"?h:r&&(r.isUploading||r.result)?"tus":e&&(e.isUploading||e.result)?"chunked-rest":o&&(o.isUploading||o.result)?"multipart":s?"chunked-rest":n?"tus":"multipart",[h,r,e,o,s,d,n]),A=i(()=>t==="tus"?r?.error??void 0:t==="chunked-rest"?e?.error??void 0:o?.error??void 0,"getError"),B=i(()=>{if(t==="tus")return r?.isPaused;if(t==="chunked-rest")return e?.isPaused},"getIsPaused"),N=i(()=>t==="tus"?r?.isUploading??!1:t==="chunked-rest"?e?.isUploading??!1:o?.isUploading??!1,"getIsUploading"),j=i(()=>{if(t==="tus")return r?.offset;if(t==="chunked-rest")return e?.offset},"getOffset"),D=i(()=>{if(t==="tus")return r?.pause;if(t==="chunked-rest")return e?.pause},"getPause"),F=i(()=>t==="tus"?r?.progress??0:t==="chunked-rest"?e?.progress??0:o?.progress??0,"getProgress"),H=i(()=>t==="tus"?r?.result??void 0:t==="chunked-rest"?e?.result??void 0:o?.result??void 0,"getResult"),J=i(()=>{if(t==="tus")return r?.resume;if(t==="chunked-rest")return e?.resume},"getResume");return{abort:I,currentMethod:t,error:A(),isPaused:B(),isUploading:N(),offset:j(),pause:D(),progress:F(),reset:O,result:H(),resume:J(),upload:z}},"useUpload");export{$ as useUpload};
@@ -1 +1 @@
1
- var j=Object.defineProperty;var T=(d,a)=>j(d,"name",{value:a,configurable:!0});import{computed as o}from"vue";import{useChunkedRestUpload as A}from"./useChunkedRestUpload-C9RhEtUt.js";import{useMultipartUpload as B}from"./useMultipartUpload-CbRSpnTb.js";import{useTusUpload as F}from"./useTusUpload-B5KsdwDR.js";var H=Object.defineProperty,l=T((d,a)=>H(d,"name",{value:a,configurable:!0}),"i");const N=10*1024*1024,K=l(d=>{const{chunkSize:a,endpointChunkedRest:s,endpointMultipart:p,endpointTus:i,maxRetries:k,metadata:c,method:S,onError:f,onPause:U,onProgress:h,onResume:P,onStart:m,onSuccess:g,retry:w,tusThreshold:y=N}=d,v=o(()=>{if(S!==void 0)return S;const e=[s,p,i].filter(Boolean);if(e.length===1)return s?"chunked-rest":i?"tus":"multipart";if(e.length>1)return"auto";throw new Error("At least one endpoint must be provided: endpointChunkedRest, endpointMultipart, or endpointTus")}),E=s?{chunkSize:a,endpoint:s,maxRetries:k,metadata:c,onError:f,onPause:U,onProgress:h,onResume:P,onStart:m,onSuccess:g,retry:w}:void 0,R=p?{endpoint:p,metadata:c,onError:f,onProgress:h,onStart:m,onSuccess:g}:void 0,b=i?{chunkSize:a,endpoint:i,maxRetries:k,metadata:c,onError:f,onPause:U,onProgress:h,onResume:P,onStart:m,onSuccess:g,retry:w}:void 0,r=E?A(E):void 0,u=R?B(R):void 0,t=b?F(b):void 0,x=l(e=>{if(v.value!=="auto")return v.value;if(e.size>y){if(i)return"tus";if(s)return"chunked-rest"}if(s)return"chunked-rest";if(p)return"multipart";throw new Error("No available endpoint for upload")},"determineMethod"),C=l(async e=>{const M=x(e);if(M==="tus"){if(!t)throw new Error("TUS endpoint not configured");return t.upload(e)}if(M==="chunked-rest"){if(!r)throw new Error("Chunked REST endpoint not configured");return r.upload(e)}if(!u)throw new Error("Multipart endpoint not configured");return u.upload(e)},"upload"),z=l(()=>{t?.abort(),r?.abort(),u?.reset()},"abort"),O=l(()=>{t?.reset(),r?.reset(),u?.reset()},"reset"),n=o(()=>v.value!=="auto"?v.value:t&&(t.isUploading.value||t.result.value)?"tus":r&&(r.isUploading.value||r.result.value)?"chunked-rest":u&&(u.isUploading.value||u.result.value)?"multipart":s?"chunked-rest":i?"tus":"multipart");return{abort:z,currentMethod:n,error:o(()=>{const e=n.value;return e==="tus"?t?.error.value??void 0:e==="chunked-rest"?r?.error.value??void 0:u?.error.value??void 0}),isPaused:o(()=>{const e=n.value;if(e==="tus")return t?.isPaused.value;if(e==="chunked-rest")return r?.isPaused.value}),isUploading:o(()=>{const e=n.value;return e==="tus"?t?.isUploading.value??!1:e==="chunked-rest"?r?.isUploading.value??!1:u?.isUploading.value??!1}),offset:o(()=>{const e=n.value;if(e==="tus")return t?.offset.value;if(e==="chunked-rest")return r?.offset.value}),pause:o(()=>{const e=n.value;if(e==="tus")return t?.pause;if(e==="chunked-rest")return r?.pause}),progress:o(()=>{const e=n.value;return e==="tus"?t?.progress.value??0:e==="chunked-rest"?r?.progress.value??0:u?.progress.value??0}),reset:O,result:o(()=>{const e=n.value;return e==="tus"?t?.result.value??void 0:e==="chunked-rest"?r?.result.value??void 0:u?.result.value??void 0}),resume:o(()=>{const e=n.value;if(e==="tus")return t?.resume;if(e==="chunked-rest")return r?.resume}),upload:C}},"useUpload");export{K as useUpload};
1
+ var j=Object.defineProperty;var T=(d,a)=>j(d,"name",{value:a,configurable:!0});import{computed as o}from"vue";import{useChunkedRestUpload as A}from"./useChunkedRestUpload-DNGNQIIx.js";import{useMultipartUpload as B}from"./useMultipartUpload-CbRSpnTb.js";import{useTusUpload as F}from"./useTusUpload-Bz4XE_4p.js";var H=Object.defineProperty,l=T((d,a)=>H(d,"name",{value:a,configurable:!0}),"i");const N=10*1024*1024,K=l(d=>{const{chunkSize:a,endpointChunkedRest:s,endpointMultipart:p,endpointTus:i,maxRetries:k,metadata:c,method:S,onError:f,onPause:U,onProgress:h,onResume:P,onStart:m,onSuccess:g,retry:w,tusThreshold:y=N}=d,v=o(()=>{if(S!==void 0)return S;const e=[s,p,i].filter(Boolean);if(e.length===1)return s?"chunked-rest":i?"tus":"multipart";if(e.length>1)return"auto";throw new Error("At least one endpoint must be provided: endpointChunkedRest, endpointMultipart, or endpointTus")}),E=s?{chunkSize:a,endpoint:s,maxRetries:k,metadata:c,onError:f,onPause:U,onProgress:h,onResume:P,onStart:m,onSuccess:g,retry:w}:void 0,R=p?{endpoint:p,metadata:c,onError:f,onProgress:h,onStart:m,onSuccess:g}:void 0,b=i?{chunkSize:a,endpoint:i,maxRetries:k,metadata:c,onError:f,onPause:U,onProgress:h,onResume:P,onStart:m,onSuccess:g,retry:w}:void 0,r=E?A(E):void 0,u=R?B(R):void 0,t=b?F(b):void 0,x=l(e=>{if(v.value!=="auto")return v.value;if(e.size>y){if(i)return"tus";if(s)return"chunked-rest"}if(s)return"chunked-rest";if(p)return"multipart";throw new Error("No available endpoint for upload")},"determineMethod"),C=l(async e=>{const M=x(e);if(M==="tus"){if(!t)throw new Error("TUS endpoint not configured");return t.upload(e)}if(M==="chunked-rest"){if(!r)throw new Error("Chunked REST endpoint not configured");return r.upload(e)}if(!u)throw new Error("Multipart endpoint not configured");return u.upload(e)},"upload"),z=l(()=>{t?.abort(),r?.abort(),u?.reset()},"abort"),O=l(()=>{t?.reset(),r?.reset(),u?.reset()},"reset"),n=o(()=>v.value!=="auto"?v.value:t&&(t.isUploading.value||t.result.value)?"tus":r&&(r.isUploading.value||r.result.value)?"chunked-rest":u&&(u.isUploading.value||u.result.value)?"multipart":s?"chunked-rest":i?"tus":"multipart");return{abort:z,currentMethod:n,error:o(()=>{const e=n.value;return e==="tus"?t?.error.value??void 0:e==="chunked-rest"?r?.error.value??void 0:u?.error.value??void 0}),isPaused:o(()=>{const e=n.value;if(e==="tus")return t?.isPaused.value;if(e==="chunked-rest")return r?.isPaused.value}),isUploading:o(()=>{const e=n.value;return e==="tus"?t?.isUploading.value??!1:e==="chunked-rest"?r?.isUploading.value??!1:u?.isUploading.value??!1}),offset:o(()=>{const e=n.value;if(e==="tus")return t?.offset.value;if(e==="chunked-rest")return r?.offset.value}),pause:o(()=>{const e=n.value;if(e==="tus")return t?.pause;if(e==="chunked-rest")return r?.pause}),progress:o(()=>{const e=n.value;return e==="tus"?t?.progress.value??0:e==="chunked-rest"?r?.progress.value??0:u?.progress.value??0}),reset:O,result:o(()=>{const e=n.value;return e==="tus"?t?.result.value??void 0:e==="chunked-rest"?r?.result.value??void 0:u?.result.value??void 0}),resume:o(()=>{const e=n.value;if(e==="tus")return t?.resume;if(e==="chunked-rest")return r?.resume}),upload:C}},"useUpload");export{K as useUpload};
@@ -1,4 +1,4 @@
1
- import { c as UploadItem, B as BatchState, U as UploadResult, F as FileMeta, g as UploadMethod } from "../packem_shared/uploader.d-DsC50BbX.js";
1
+ import { k as UploadItem, B as BatchState, b as UploadResult, U as UploadControl, F as FingerprintFunction, a as UrlStorage, d as FileMeta, r as UploadMethod } from "../packem_shared/uploader.d-B1FMsMcN.js";
2
2
  interface UseAbortAllOptions {
3
3
  /** Upload endpoint URL (used to create uploader instance) */
4
4
  endpoint: string;
@@ -230,8 +230,12 @@ declare const useBatchUpload: (options: UseBatchUploadOptions) => UseBatchUpload
230
230
  interface UseChunkedRestUploadOptions {
231
231
  /** Chunk size for chunked REST uploads (default: 5MB) */
232
232
  chunkSize?: number;
233
+ /** Unified control handle. See `UploadControl`. */
234
+ control?: UploadControl;
233
235
  /** Chunked REST upload endpoint URL */
234
236
  endpoint: string;
237
+ /** Customise the resume fingerprint. Defaults to `defaultFingerprint`. */
238
+ fingerprint?: FingerprintFunction;
235
239
  /** Maximum number of retry attempts */
236
240
  maxRetries?: number;
237
241
  /** Additional metadata to include with the upload */
@@ -250,6 +254,8 @@ interface UseChunkedRestUploadOptions {
250
254
  onSuccess?: (file: UploadResult) => void;
251
255
  /** Enable automatic retry on failure */
252
256
  retry?: boolean;
257
+ /** Persistent storage for resume identifiers. */
258
+ urlStorage?: UrlStorage;
253
259
  }
254
260
  interface UseChunkedRestUploadReturn {
255
261
  /** Abort the current upload */
@@ -719,8 +725,16 @@ declare const useTransformMetadata: (options: UseTransformMetadataOptions) => Us
719
725
  interface UseTusUploadOptions {
720
726
  /** Chunk size for TUS uploads (default: 1MB) */
721
727
  chunkSize?: number;
728
+ /**
729
+ * Unified control handle. Pass an empty `new UploadControl()` to drive the
730
+ * upload, or `UploadControl.from(token)` to resume an upload that was
731
+ * started in another process / tab.
732
+ */
733
+ control?: UploadControl;
722
734
  /** TUS upload endpoint URL */
723
735
  endpoint: string;
736
+ /** Customise the resume fingerprint. Defaults to `defaultFingerprint`. */
737
+ fingerprint?: FingerprintFunction;
724
738
  /** Maximum number of retry attempts */
725
739
  maxRetries?: number;
726
740
  /** Additional metadata to include with the upload */
@@ -739,6 +753,8 @@ interface UseTusUploadOptions {
739
753
  onSuccess?: (file: UploadResult) => void;
740
754
  /** Enable automatic retry on failure */
741
755
  retry?: boolean;
756
+ /** Persistent storage for resume URLs (e.g. `defaultUrlStorage()` in the browser). */
757
+ urlStorage?: UrlStorage;
742
758
  }
743
759
  interface UseTusUploadReturn {
744
760
  /** Abort the current upload */
@@ -1 +1 @@
1
- import{useAbortAll as o}from"../packem_shared/useAbortAll-Xks2z0Rf.js";import{useAbortBatch as s}from"../packem_shared/useAbortBatch-y-KZjKTY.js";import{useAbortItem as u}from"../packem_shared/useAbortItem-BhdhRgs8.js";import{useAllAbortListener as f}from"../packem_shared/useAllAbortListener-Crsmf1kC.js";import{useBatchCancelledListener as a}from"../packem_shared/useBatchCancelledListener-CVJULtua.js";import{useBatchDeleteFiles as i}from"../packem_shared/useBatchDeleteFiles-BSG8D3Do.js";import{useBatchErrorListener as h}from"../packem_shared/useBatchErrorListener-BAVIRlQE.js";import{useBatchFinalizeListener as F}from"../packem_shared/useBatchFinalizeListener-nA7Qs-Ya.js";import{useBatchFinishListener as B}from"../packem_shared/useBatchFinishListener-C6zS5OI6.js";import{useBatchProgressListener as A}from"../packem_shared/useBatchProgressListener-CdcDM2sa.js";import{useBatchRetry as b}from"../packem_shared/useBatchRetry-B3FQ1DdH.js";import{useBatchStartListener as R}from"../packem_shared/useBatchStartListener-ByQlcF8F.js";import{useBatchUpload as C}from"../packem_shared/useBatchUpload-BJBdu6vh.js";import{useChunkedRestUpload as M}from"../packem_shared/useChunkedRestUpload-tirJ_5VX.js";import{useDeleteFile as k}from"../packem_shared/useDeleteFile-BJnTMMUr.js";import{useFileInput as I}from"../packem_shared/useFileInput-CgqlIlGE.js";import{useGetFile as z}from"../packem_shared/useGetFile-CNOi9ZIM.js";import{useGetFileList as H}from"../packem_shared/useGetFileList-BIGh4thc.js";import{useGetFileMeta as j}from"../packem_shared/useGetFileMeta-CHee8013.js";import{useHeadFile as v}from"../packem_shared/useHeadFile-CdIM_Xi1.js";import{useMultipartUpload as J}from"../packem_shared/useMultipartUpload-CJMa-_Yo.js";import{usePasteUpload as N}from"../packem_shared/usePasteUpload-_YqkCkrL.js";import{usePatchChunk as Q}from"../packem_shared/usePatchChunk-B8ZCd9Th.js";import{usePutFile as W}from"../packem_shared/usePutFile-Db_uVkqT.js";import{useRetry as Y}from"../packem_shared/useRetry-trYC3K_p.js";import{useRetryListener as _}from"../packem_shared/useRetryListener-DC8G9lmY.js";import{useTransformFile as ee}from"../packem_shared/useTransformFile-BMqWIG7J.js";import{useTransformMetadata as oe}from"../packem_shared/useTransformMetadata-CUo8IdKP.js";import{useTusUpload as se}from"../packem_shared/useTusUpload-BwF0G1LE.js";import{useUpload as ue}from"../packem_shared/useUpload-C5ZiPWFM.js";export{o as useAbortAll,s as useAbortBatch,u as useAbortItem,f as useAllAbortListener,a as useBatchCancelledListener,i as useBatchDeleteFiles,h as useBatchErrorListener,F as useBatchFinalizeListener,B as useBatchFinishListener,A as useBatchProgressListener,b as useBatchRetry,R as useBatchStartListener,C as useBatchUpload,M as useChunkedRestUpload,k as useDeleteFile,I as useFileInput,z as useGetFile,H as useGetFileList,j as useGetFileMeta,v as useHeadFile,J as useMultipartUpload,N as usePasteUpload,Q as usePatchChunk,W as usePutFile,Y as useRetry,_ as useRetryListener,ee as useTransformFile,oe as useTransformMetadata,se as useTusUpload,ue as useUpload};
1
+ import{useAbortAll as o}from"../packem_shared/useAbortAll-Xks2z0Rf.js";import{useAbortBatch as s}from"../packem_shared/useAbortBatch-y-KZjKTY.js";import{useAbortItem as u}from"../packem_shared/useAbortItem-BhdhRgs8.js";import{useAllAbortListener as f}from"../packem_shared/useAllAbortListener-Crsmf1kC.js";import{useBatchCancelledListener as a}from"../packem_shared/useBatchCancelledListener-CVJULtua.js";import{useBatchDeleteFiles as i}from"../packem_shared/useBatchDeleteFiles-BSG8D3Do.js";import{useBatchErrorListener as h}from"../packem_shared/useBatchErrorListener-BAVIRlQE.js";import{useBatchFinalizeListener as F}from"../packem_shared/useBatchFinalizeListener-nA7Qs-Ya.js";import{useBatchFinishListener as B}from"../packem_shared/useBatchFinishListener-C6zS5OI6.js";import{useBatchProgressListener as A}from"../packem_shared/useBatchProgressListener-CdcDM2sa.js";import{useBatchRetry as b}from"../packem_shared/useBatchRetry-B3FQ1DdH.js";import{useBatchStartListener as R}from"../packem_shared/useBatchStartListener-ByQlcF8F.js";import{useBatchUpload as C}from"../packem_shared/useBatchUpload-BJBdu6vh.js";import{useChunkedRestUpload as M}from"../packem_shared/useChunkedRestUpload-BwOE2zhr.js";import{useDeleteFile as k}from"../packem_shared/useDeleteFile-BJnTMMUr.js";import{useFileInput as I}from"../packem_shared/useFileInput-CgqlIlGE.js";import{useGetFile as z}from"../packem_shared/useGetFile-CNOi9ZIM.js";import{useGetFileList as H}from"../packem_shared/useGetFileList-BIGh4thc.js";import{useGetFileMeta as j}from"../packem_shared/useGetFileMeta-CHee8013.js";import{useHeadFile as v}from"../packem_shared/useHeadFile-CdIM_Xi1.js";import{useMultipartUpload as J}from"../packem_shared/useMultipartUpload-CJMa-_Yo.js";import{usePasteUpload as N}from"../packem_shared/usePasteUpload-_YqkCkrL.js";import{usePatchChunk as Q}from"../packem_shared/usePatchChunk-B8ZCd9Th.js";import{usePutFile as W}from"../packem_shared/usePutFile-Db_uVkqT.js";import{useRetry as Y}from"../packem_shared/useRetry-trYC3K_p.js";import{useRetryListener as _}from"../packem_shared/useRetryListener-DC8G9lmY.js";import{useTransformFile as ee}from"../packem_shared/useTransformFile-BMqWIG7J.js";import{useTransformMetadata as oe}from"../packem_shared/useTransformMetadata-CUo8IdKP.js";import{useTusUpload as se}from"../packem_shared/useTusUpload-Dsq9GGEt.js";import{useUpload as ue}from"../packem_shared/useUpload-B6rd2qkI.js";export{o as useAbortAll,s as useAbortBatch,u as useAbortItem,f as useAllAbortListener,a as useBatchCancelledListener,i as useBatchDeleteFiles,h as useBatchErrorListener,F as useBatchFinalizeListener,B as useBatchFinishListener,A as useBatchProgressListener,b as useBatchRetry,R as useBatchStartListener,C as useBatchUpload,M as useChunkedRestUpload,k as useDeleteFile,I as useFileInput,z as useGetFile,H as useGetFileList,j as useGetFileMeta,v as useHeadFile,J as useMultipartUpload,N as usePasteUpload,Q as usePatchChunk,W as usePutFile,Y as useRetry,_ as useRetryListener,ee as useTransformFile,oe as useTransformMetadata,se as useTusUpload,ue as useUpload};
@@ -1,4 +1,4 @@
1
- import { c as UploadItem, B as BatchState, U as UploadResult, F as FileMeta, g as UploadMethod } from "../packem_shared/uploader.d-DsC50BbX.js";
1
+ import { k as UploadItem, B as BatchState, b as UploadResult, U as UploadControl, F as FingerprintFunction, a as UrlStorage, d as FileMeta, r as UploadMethod } from "../packem_shared/uploader.d-B1FMsMcN.js";
2
2
  import { Accessor } from 'solid-js';
3
3
  import { QueryClient } from '@tanstack/solid-query';
4
4
  interface CreateAbortAllOptions {
@@ -146,8 +146,12 @@ declare const createBatchUpload: (options: CreateBatchUploadOptions) => CreateBa
146
146
  interface CreateChunkedRestUploadOptions {
147
147
  /** Chunk size for chunked REST uploads (default: 5MB) */
148
148
  chunkSize?: number;
149
+ /** Unified control handle. See `UploadControl`. */
150
+ control?: UploadControl;
149
151
  /** Chunked REST upload endpoint URL */
150
152
  endpoint: string;
153
+ /** Customise the resume fingerprint. */
154
+ fingerprint?: FingerprintFunction;
151
155
  /** Maximum number of retry attempts */
152
156
  maxRetries?: number;
153
157
  /** Additional metadata to include with the upload */
@@ -166,6 +170,8 @@ interface CreateChunkedRestUploadOptions {
166
170
  onSuccess?: (file: UploadResult) => void;
167
171
  /** Enable automatic retry on failure */
168
172
  retry?: boolean;
173
+ /** Persistent storage for resume identifiers. */
174
+ urlStorage?: UrlStorage;
169
175
  }
170
176
  interface CreateChunkedRestUploadReturn {
171
177
  /** Abort the current upload */
@@ -570,8 +576,12 @@ declare const createTransformMetadata: (options: CreateTransformMetadataOptions)
570
576
  interface CreateTusUploadOptions {
571
577
  /** Chunk size for TUS uploads (default: 1MB) */
572
578
  chunkSize?: number;
579
+ /** Unified control handle. See `UploadControl`. */
580
+ control?: UploadControl;
573
581
  /** TUS upload endpoint URL */
574
582
  endpoint: string;
583
+ /** Customise the resume fingerprint. */
584
+ fingerprint?: FingerprintFunction;
575
585
  /** Maximum number of retry attempts */
576
586
  maxRetries?: number;
577
587
  /** Additional metadata to include with the upload */
@@ -590,6 +600,8 @@ interface CreateTusUploadOptions {
590
600
  onSuccess?: (file: UploadResult) => void;
591
601
  /** Enable automatic retry on failure */
592
602
  retry?: boolean;
603
+ /** Persistent storage for resume URLs. */
604
+ urlStorage?: UrlStorage;
593
605
  }
594
606
  interface CreateTusUploadReturn {
595
607
  /** Abort the current upload */
@@ -1 +1 @@
1
- import{createAbortAll as t}from"../packem_shared/createAbortAll-DMUWUL4C.js";import{createAbortBatch as a}from"../packem_shared/createAbortBatch-bMvSBu1k.js";import{createAbortItem as p}from"../packem_shared/createAbortItem-BsqmmxdZ.js";import{createAllAbortListener as f}from"../packem_shared/createAllAbortListener-BF9VhxQA.js";import{createBatchCancelledListener as l}from"../packem_shared/createBatchCancelledListener-FsVlTbYv.js";import{createBatchDeleteFiles as s}from"../packem_shared/createBatchDeleteFiles-CN07ubNE.js";import{createBatchErrorListener as h}from"../packem_shared/createBatchErrorListener-CxEJhGOX.js";import{createBatchFinalizeListener as d}from"../packem_shared/createBatchFinalizeListener-DOK5uoog.js";import{createBatchFinishListener as L}from"../packem_shared/createBatchFinishListener-BbMzJGlN.js";import{createBatchProgressListener as A}from"../packem_shared/createBatchProgressListener-D28nm9Xe.js";import{createBatchRetry as b}from"../packem_shared/createBatchRetry-Bnaf10e9.js";import{createBatchStartListener as R}from"../packem_shared/createBatchStartListener-BwVzPsCB.js";import{createBatchUpload as C}from"../packem_shared/createBatchUpload-Dm5vSg1j.js";import{createChunkedRestUpload as M}from"../packem_shared/createChunkedRestUpload-DAoXFznW.js";import{createDeleteFile as k}from"../packem_shared/createDeleteFile-D07PU21a.js";import{createFileInput as I}from"../packem_shared/createFileInput-DyGrmzbc.js";import{createGetFile as z}from"../packem_shared/createGetFile-cUIB1L1M.js";import{createGetFileList as H}from"../packem_shared/createGetFileList-C3lYvKGY.js";import{createGetFileMeta as j}from"../packem_shared/createGetFileMeta-DZ46CHse.js";import{createHeadFile as v}from"../packem_shared/createHeadFile-Ch80NkDO.js";import{createMultipartUpload as J}from"../packem_shared/createMultipartUpload-BPcFYSwI.js";import{createPasteUpload as N}from"../packem_shared/createPasteUpload-DemCREgp.js";import{createPatchChunk as Q}from"../packem_shared/createPatchChunk-D-N2cYZ7.js";import{createPutFile as W}from"../packem_shared/createPutFile-CamOtR__.js";import{createRetry as Y}from"../packem_shared/createRetry-BInLl1TV.js";import{createRetryListener as _}from"../packem_shared/createRetryListener-hZUkGq7P.js";import{createTransformFile as ee}from"../packem_shared/createTransformFile-BcoA39lM.js";import{createTransformMetadata as te}from"../packem_shared/createTransformMetadata-CqyCBOXk.js";import{createTusUpload as ae}from"../packem_shared/createTusUpload-DKIIHh2X.js";import{createUpload as pe}from"../packem_shared/createUpload-0qE79TWD.js";export{t as createAbortAll,a as createAbortBatch,p as createAbortItem,f as createAllAbortListener,l as createBatchCancelledListener,s as createBatchDeleteFiles,h as createBatchErrorListener,d as createBatchFinalizeListener,L as createBatchFinishListener,A as createBatchProgressListener,b as createBatchRetry,R as createBatchStartListener,C as createBatchUpload,M as createChunkedRestUpload,k as createDeleteFile,I as createFileInput,z as createGetFile,H as createGetFileList,j as createGetFileMeta,v as createHeadFile,J as createMultipartUpload,N as createPasteUpload,Q as createPatchChunk,W as createPutFile,Y as createRetry,_ as createRetryListener,ee as createTransformFile,te as createTransformMetadata,ae as createTusUpload,pe as createUpload};
1
+ import{createAbortAll as t}from"../packem_shared/createAbortAll-BVH_Wo6s.js";import{createAbortBatch as a}from"../packem_shared/createAbortBatch-C3t-Ho9c.js";import{createAbortItem as p}from"../packem_shared/createAbortItem-Bmhqhi8L.js";import{createAllAbortListener as f}from"../packem_shared/createAllAbortListener-BF9VhxQA.js";import{createBatchCancelledListener as l}from"../packem_shared/createBatchCancelledListener-FsVlTbYv.js";import{createBatchDeleteFiles as s}from"../packem_shared/createBatchDeleteFiles-CN07ubNE.js";import{createBatchErrorListener as h}from"../packem_shared/createBatchErrorListener-CxEJhGOX.js";import{createBatchFinalizeListener as d}from"../packem_shared/createBatchFinalizeListener-DOK5uoog.js";import{createBatchFinishListener as L}from"../packem_shared/createBatchFinishListener-BbMzJGlN.js";import{createBatchProgressListener as A}from"../packem_shared/createBatchProgressListener-D28nm9Xe.js";import{createBatchRetry as b}from"../packem_shared/createBatchRetry-Bnaf10e9.js";import{createBatchStartListener as R}from"../packem_shared/createBatchStartListener-BwVzPsCB.js";import{createBatchUpload as C}from"../packem_shared/createBatchUpload-Dm5vSg1j.js";import{createChunkedRestUpload as M}from"../packem_shared/createChunkedRestUpload-DZbjiORY.js";import{createDeleteFile as k}from"../packem_shared/createDeleteFile-D07PU21a.js";import{createFileInput as I}from"../packem_shared/createFileInput-DyGrmzbc.js";import{createGetFile as z}from"../packem_shared/createGetFile-cUIB1L1M.js";import{createGetFileList as H}from"../packem_shared/createGetFileList-C3lYvKGY.js";import{createGetFileMeta as j}from"../packem_shared/createGetFileMeta-DZ46CHse.js";import{createHeadFile as v}from"../packem_shared/createHeadFile-Ch80NkDO.js";import{createMultipartUpload as J}from"../packem_shared/createMultipartUpload-BPcFYSwI.js";import{createPasteUpload as N}from"../packem_shared/createPasteUpload-DemCREgp.js";import{createPatchChunk as Q}from"../packem_shared/createPatchChunk-D-N2cYZ7.js";import{createPutFile as W}from"../packem_shared/createPutFile-CamOtR__.js";import{createRetry as Y}from"../packem_shared/createRetry-BInLl1TV.js";import{createRetryListener as _}from"../packem_shared/createRetryListener-hZUkGq7P.js";import{createTransformFile as ee}from"../packem_shared/createTransformFile-BcoA39lM.js";import{createTransformMetadata as te}from"../packem_shared/createTransformMetadata-CqyCBOXk.js";import{createTusUpload as ae}from"../packem_shared/createTusUpload-Con3Nqu0.js";import{createUpload as pe}from"../packem_shared/createUpload-RIaQluah.js";export{t as createAbortAll,a as createAbortBatch,p as createAbortItem,f as createAllAbortListener,l as createBatchCancelledListener,s as createBatchDeleteFiles,h as createBatchErrorListener,d as createBatchFinalizeListener,L as createBatchFinishListener,A as createBatchProgressListener,b as createBatchRetry,R as createBatchStartListener,C as createBatchUpload,M as createChunkedRestUpload,k as createDeleteFile,I as createFileInput,z as createGetFile,H as createGetFileList,j as createGetFileMeta,v as createHeadFile,J as createMultipartUpload,N as createPasteUpload,Q as createPatchChunk,W as createPutFile,Y as createRetry,_ as createRetryListener,ee as createTransformFile,te as createTransformMetadata,ae as createTusUpload,pe as createUpload};
@@ -1,4 +1,4 @@
1
- import { c as UploadItem, B as BatchState, U as UploadResult, F as FileMeta, g as UploadMethod } from "../packem_shared/uploader.d-DsC50BbX.js";
1
+ import { k as UploadItem, B as BatchState, b as UploadResult, U as UploadControl, F as FingerprintFunction, a as UrlStorage, d as FileMeta, r as UploadMethod } from "../packem_shared/uploader.d-B1FMsMcN.js";
2
2
  import { Readable } from 'svelte/store';
3
3
  interface CreateAbortAllOptions {
4
4
  endpoint: string;
@@ -125,8 +125,12 @@ declare const createBatchUpload: (options: CreateBatchUploadOptions) => CreateBa
125
125
  interface CreateChunkedRestUploadOptions {
126
126
  /** Chunk size for chunked REST uploads (default: 5MB) */
127
127
  chunkSize?: number;
128
+ /** Unified control handle. See `UploadControl`. */
129
+ control?: UploadControl;
128
130
  /** Chunked REST upload endpoint URL */
129
131
  endpoint: string;
132
+ /** Customise the resume fingerprint. */
133
+ fingerprint?: FingerprintFunction;
130
134
  /** Maximum number of retry attempts */
131
135
  maxRetries?: number;
132
136
  /** Additional metadata to include with the upload */
@@ -145,6 +149,8 @@ interface CreateChunkedRestUploadOptions {
145
149
  onSuccess?: (file: UploadResult) => void;
146
150
  /** Enable automatic retry on failure */
147
151
  retry?: boolean;
152
+ /** Persistent storage for resume identifiers. */
153
+ urlStorage?: UrlStorage;
148
154
  }
149
155
  interface CreateChunkedRestUploadReturn {
150
156
  /** Abort the current upload */
@@ -551,8 +557,12 @@ declare const createTransformMetadata: (options: CreateTransformMetadataOptions)
551
557
  interface CreateTusUploadOptions {
552
558
  /** Chunk size for TUS uploads (default: 1MB) */
553
559
  chunkSize?: number;
560
+ /** Unified control handle. See `UploadControl`. */
561
+ control?: UploadControl;
554
562
  /** TUS upload endpoint URL */
555
563
  endpoint: string;
564
+ /** Customise the resume fingerprint. */
565
+ fingerprint?: FingerprintFunction;
556
566
  /** Maximum number of retry attempts */
557
567
  maxRetries?: number;
558
568
  /** Additional metadata to include with the upload */
@@ -571,6 +581,8 @@ interface CreateTusUploadOptions {
571
581
  onSuccess?: (file: UploadResult) => void;
572
582
  /** Enable automatic retry on failure */
573
583
  retry?: boolean;
584
+ /** Persistent storage for resume URLs. */
585
+ urlStorage?: UrlStorage;
574
586
  }
575
587
  interface CreateTusUploadReturn {
576
588
  /** Abort the current upload */
@@ -1 +1 @@
1
- import{createAbortAll as t}from"../packem_shared/createAbortAll-BVH_Wo6s.js";import{createAbortBatch as a}from"../packem_shared/createAbortBatch-C3t-Ho9c.js";import{createAbortItem as p}from"../packem_shared/createAbortItem-Bmhqhi8L.js";import{createAllAbortListener as f}from"../packem_shared/createAllAbortListener-BChF9YcG.js";import{createBatchCancelledListener as l}from"../packem_shared/createBatchCancelledListener-DIHrRDNj.js";import{createBatchDeleteFiles as s}from"../packem_shared/createBatchDeleteFiles-B8bHItyS.js";import{createBatchErrorListener as h}from"../packem_shared/createBatchErrorListener-BNXfdSlM.js";import{createBatchFinalizeListener as d}from"../packem_shared/createBatchFinalizeListener-pjqAl9iM.js";import{createBatchFinishListener as L}from"../packem_shared/createBatchFinishListener-DuMOo7Kn.js";import{createBatchProgressListener as A}from"../packem_shared/createBatchProgressListener-CUpa_7Nv.js";import{createBatchRetry as b}from"../packem_shared/createBatchRetry-DWOdovQt.js";import{createBatchStartListener as R}from"../packem_shared/createBatchStartListener-DejGDAMY.js";import{createBatchUpload as C}from"../packem_shared/createBatchUpload-Z-8vD9Ql.js";import{createChunkedRestUpload as M}from"../packem_shared/createChunkedRestUpload-BH_5ZAr2.js";import{createDeleteFile as k}from"../packem_shared/createDeleteFile-mGIgeCQK.js";import{createFileInput as I}from"../packem_shared/createFileInput-CERPgCpc.js";import{createGetFile as z}from"../packem_shared/createGetFile-dT-EuNKP.js";import{createGetFileList as H}from"../packem_shared/createGetFileList-C_n3HgHG.js";import{createGetFileMeta as j}from"../packem_shared/createGetFileMeta-CSYB0Oj1.js";import{createHeadFile as v}from"../packem_shared/createHeadFile--rl2Ezgb.js";import{createMultipartUpload as J}from"../packem_shared/createMultipartUpload-CFsUjhvG.js";import{createPasteUpload as N}from"../packem_shared/createPasteUpload-BS7pMOvb.js";import{createPatchChunk as Q}from"../packem_shared/createPatchChunk-7y5S60GE.js";import{createPutFile as W}from"../packem_shared/createPutFile-BJcLUSQi.js";import{createRetry as Y}from"../packem_shared/createRetry-D0eddvNY.js";import{createRetryListener as _}from"../packem_shared/createRetryListener-59bXI4qF.js";import{createTransformFile as ee}from"../packem_shared/createTransformFile-BaofH3n5.js";import{createTransformMetadata as te}from"../packem_shared/createTransformMetadata-C9lWyhne.js";import{createTusUpload as ae}from"../packem_shared/createTusUpload-rZKMrL5n.js";import{createUpload as pe}from"../packem_shared/createUpload-BF6TujIH.js";export{t as createAbortAll,a as createAbortBatch,p as createAbortItem,f as createAllAbortListener,l as createBatchCancelledListener,s as createBatchDeleteFiles,h as createBatchErrorListener,d as createBatchFinalizeListener,L as createBatchFinishListener,A as createBatchProgressListener,b as createBatchRetry,R as createBatchStartListener,C as createBatchUpload,M as createChunkedRestUpload,k as createDeleteFile,I as createFileInput,z as createGetFile,H as createGetFileList,j as createGetFileMeta,v as createHeadFile,J as createMultipartUpload,N as createPasteUpload,Q as createPatchChunk,W as createPutFile,Y as createRetry,_ as createRetryListener,ee as createTransformFile,te as createTransformMetadata,ae as createTusUpload,pe as createUpload};
1
+ import{createAbortAll as t}from"../packem_shared/createAbortAll-DMUWUL4C.js";import{createAbortBatch as a}from"../packem_shared/createAbortBatch-bMvSBu1k.js";import{createAbortItem as p}from"../packem_shared/createAbortItem-BsqmmxdZ.js";import{createAllAbortListener as f}from"../packem_shared/createAllAbortListener-BChF9YcG.js";import{createBatchCancelledListener as l}from"../packem_shared/createBatchCancelledListener-DIHrRDNj.js";import{createBatchDeleteFiles as s}from"../packem_shared/createBatchDeleteFiles-B8bHItyS.js";import{createBatchErrorListener as h}from"../packem_shared/createBatchErrorListener-BNXfdSlM.js";import{createBatchFinalizeListener as d}from"../packem_shared/createBatchFinalizeListener-pjqAl9iM.js";import{createBatchFinishListener as L}from"../packem_shared/createBatchFinishListener-DuMOo7Kn.js";import{createBatchProgressListener as A}from"../packem_shared/createBatchProgressListener-CUpa_7Nv.js";import{createBatchRetry as b}from"../packem_shared/createBatchRetry-DWOdovQt.js";import{createBatchStartListener as R}from"../packem_shared/createBatchStartListener-DejGDAMY.js";import{createBatchUpload as C}from"../packem_shared/createBatchUpload-Z-8vD9Ql.js";import{createChunkedRestUpload as M}from"../packem_shared/createChunkedRestUpload-WgfiLIto.js";import{createDeleteFile as k}from"../packem_shared/createDeleteFile-mGIgeCQK.js";import{createFileInput as I}from"../packem_shared/createFileInput-CERPgCpc.js";import{createGetFile as z}from"../packem_shared/createGetFile-dT-EuNKP.js";import{createGetFileList as H}from"../packem_shared/createGetFileList-C_n3HgHG.js";import{createGetFileMeta as j}from"../packem_shared/createGetFileMeta-CSYB0Oj1.js";import{createHeadFile as v}from"../packem_shared/createHeadFile--rl2Ezgb.js";import{createMultipartUpload as J}from"../packem_shared/createMultipartUpload-CFsUjhvG.js";import{createPasteUpload as N}from"../packem_shared/createPasteUpload-BS7pMOvb.js";import{createPatchChunk as Q}from"../packem_shared/createPatchChunk-7y5S60GE.js";import{createPutFile as W}from"../packem_shared/createPutFile-BJcLUSQi.js";import{createRetry as Y}from"../packem_shared/createRetry-D0eddvNY.js";import{createRetryListener as _}from"../packem_shared/createRetryListener-59bXI4qF.js";import{createTransformFile as ee}from"../packem_shared/createTransformFile-BaofH3n5.js";import{createTransformMetadata as te}from"../packem_shared/createTransformMetadata-C9lWyhne.js";import{createTusUpload as ae}from"../packem_shared/createTusUpload-l00I3jXp.js";import{createUpload as pe}from"../packem_shared/createUpload-D3_GPTNX.js";export{t as createAbortAll,a as createAbortBatch,p as createAbortItem,f as createAllAbortListener,l as createBatchCancelledListener,s as createBatchDeleteFiles,h as createBatchErrorListener,d as createBatchFinalizeListener,L as createBatchFinishListener,A as createBatchProgressListener,b as createBatchRetry,R as createBatchStartListener,C as createBatchUpload,M as createChunkedRestUpload,k as createDeleteFile,I as createFileInput,z as createGetFile,H as createGetFileList,j as createGetFileMeta,v as createHeadFile,J as createMultipartUpload,N as createPasteUpload,Q as createPatchChunk,W as createPutFile,Y as createRetry,_ as createRetryListener,ee as createTransformFile,te as createTransformMetadata,ae as createTusUpload,pe as createUpload};