@uploadcare/file-uploader 1.19.4-alpha.2 → 1.19.4

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/abstract/CTX.d.ts CHANGED
@@ -10,6 +10,7 @@ export function uploaderBlockCtx(fnCtx: import("./Block").Block): {
10
10
  '*commonProgress': number;
11
11
  '*uploadList': never[];
12
12
  '*uploadQueue': Queue;
13
+ /** @type {import('../types').OutputErrorCollection[]} */
13
14
  '*collectionErrors': import("../types").OutputErrorCollection[];
14
15
  /** @type {import('../types').OutputCollectionState | null} */
15
16
  '*collectionState': import("../types").OutputCollectionState | null;
@@ -1 +1 @@
1
- {"version":3,"file":"CTX.d.ts","sourceRoot":"","sources":["CTX.js"],"names":[],"mappings":"AAGO,+BAA2B;AAG3B,wCADK,OAAO,SAAS,EAAE,KAAK;;;;;;EAejC;AAGK,wCADK,OAAO,SAAS,EAAE,KAAK;;;;yBAMD,OAAO,UAAU,EAAE,qBAAqB,EAAE;IAC1E,8DAA8D;wBAAnD,OAAO,UAAU,EAAE,qBAAqB,GAAG,IAAI;IAE1D,yEAAyE;kBAA9D,OAAO,2BAA2B,EAAE,eAAe,GAAG,IAAI;IAErE,0BAA0B;sBAAf,GAAG,CAAC,MAAM,CAAC;IAEtB,8EAA8E;6BAAnE,OAAO,2BAA2B,EAAE,oBAAoB,GAAG,IAAI;;;;;;EAE1E;sBApCoB,2BAA2B"}
1
+ {"version":3,"file":"CTX.d.ts","sourceRoot":"","sources":["CTX.js"],"names":[],"mappings":"AAGO,+BAA2B;AAG3B,wCADK,OAAO,SAAS,EAAE,KAAK;;;;;;EAejC;AAGK,wCADK,OAAO,SAAS,EAAE,KAAK;;;;IAMjC,yDAAyD;yBAA9C,OAAO,UAAU,EAAE,qBAAqB,EAAE;IAErD,8DAA8D;wBAAnD,OAAO,UAAU,EAAE,qBAAqB,GAAG,IAAI;IAE1D,yEAAyE;kBAA9D,OAAO,2BAA2B,EAAE,eAAe,GAAG,IAAI;IAErE,0BAA0B;sBAAf,GAAG,CAAC,MAAM,CAAC;IAEtB,8EAA8E;6BAAnE,OAAO,2BAA2B,EAAE,oBAAoB,GAAG,IAAI;;;;;;EAE1E;sBArCoB,2BAA2B"}
package/abstract/CTX.js CHANGED
@@ -26,7 +26,8 @@ export const uploaderBlockCtx = (fnCtx) => ({
26
26
  '*commonProgress': 0,
27
27
  '*uploadList': [],
28
28
  '*uploadQueue': new Queue(1),
29
- '*collectionErrors': /** @type {import('../types').OutputErrorCollection[]} */ ([]),
29
+ /** @type {import('../types').OutputErrorCollection[]} */
30
+ '*collectionErrors': [],
30
31
  /** @type {import('../types').OutputCollectionState | null} */
31
32
  '*collectionState': null,
32
33
  /** @type {import('@uploadcare/upload-client').UploadcareGroup | null} */
@@ -69,9 +69,9 @@ export class UploaderPublicApi {
69
69
  * @param {string} entryId
70
70
  * @returns {import('../types/exported.js').OutputFileEntry<TStatus>}
71
71
  */
72
- getOutputItem: (entryId: string) => import("../types/exported.js").OutputFileEntry<TStatus>;
72
+ getOutputItem<TStatus extends import("../types").OutputFileStatus>(entryId: string): import("../types/exported.js").OutputFileEntry<TStatus>;
73
73
  /** @template {import('../types').OutputCollectionStatus} TStatus */
74
- getOutputCollectionState: () => ReturnType<typeof buildOutputCollectionState<TStatus>>;
74
+ getOutputCollectionState<TStatus extends import("../types").OutputCollectionStatus>(): ReturnType<typeof buildOutputCollectionState<TStatus>>;
75
75
  /** @param {Boolean} [force] */
76
76
  initFlow: (force?: boolean) => void;
77
77
  doneFlow: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"UploaderPublicApi.d.ts","sourceRoot":"","sources":["UploaderPublicApi.js"],"names":[],"mappings":"AAqBA;IAOE,8DAA8D;IAC9D,iBADY,OAAO,oBAAoB,EAAE,aAAa,EAGrD;IATD;;;OAGG;IACH,aAAK;IAOL,eAAe;IACf,gCAEC;IAED,yCAEC;IAED;;iBAEC;IAED;;;;;;OAMG;IACH,iBAAkB,KAJP,MA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AC,EACnB,GAAO,MAAM,EAAE,CAAC,SAAS,MAAM,OAAO,oBAAoB,EAAE,iBAAiB,GACrE,CAAC,OAAO,oBAAoB,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,GACnD,CAAC,SAAS,OAAO,oBAAoB,EAAE,sBAAsB,GAC3D,CAAC,SAAS,CAAC,CAAC,GACZ,CAAC,GAAG,CAAC,CAAC,KACT,IAAI,CAWV;IAEF,2DAA2D;IAC3D,0BADc,OAAO,oBAAoB,EAAE,YAAY,CAGrD;IAEF,8BAA8B;IAC9B,gBAAiB,QADL,OACW,UAYrB;IAEF;;;OAGG;IACH,0BAOC;CACF;2CA3X0C,iCAAiC"}
@@ -215,7 +215,7 @@ export class UploaderPublicApi {
215
215
  * @param {string} entryId
216
216
  * @returns {import('../types/exported.js').OutputFileEntry<TStatus>}
217
217
  */
218
- getOutputItem = (entryId) => {
218
+ getOutputItem(entryId) {
219
219
  const uploadEntryData = /** @type {import('./uploadEntrySchema.js').UploadEntryData} */ (
220
220
  Data.getCtx(entryId).store
221
221
  );
@@ -260,14 +260,14 @@ export class UploaderPublicApi {
260
260
  };
261
261
 
262
262
  return /** @type {import('../types/exported.js').OutputFileEntry<TStatus>} */ (outputItem);
263
- };
263
+ }
264
264
 
265
265
  /** @template {import('../types').OutputCollectionStatus} TStatus */
266
- getOutputCollectionState = () => {
266
+ getOutputCollectionState() {
267
267
  return /** @type {ReturnType<typeof buildOutputCollectionState<TStatus>>} */ (
268
268
  buildOutputCollectionState(this._ctx)
269
269
  );
270
- };
270
+ }
271
271
 
272
272
  /** @param {Boolean} [force] */
273
273
  initFlow = (force = false) => {
@@ -20,7 +20,7 @@ export class FileItemConfig extends UploaderBlock {
20
20
  * @param {(value: import('../../abstract/uploadEntrySchema.js').UploadEntryData[K]) => void} handler_
21
21
  * @protected
22
22
  */
23
- protected _subEntry: (prop_: K, handler_: (value: import("../../abstract/uploadEntrySchema.js").UploadEntryData[K]) => void) => void;
23
+ protected _subEntry<K extends import("../../abstract/uploadEntrySchema.js").UploadEntryKeys>(prop_: K, handler_: (value: import("../../abstract/uploadEntrySchema.js").UploadEntryData[K]) => void): void;
24
24
  /** @protected */
25
25
  protected _reset(): void;
26
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"FileItemConfig.d.ts","sourceRoot":"","sources":["FileItemConfig.js"],"names":[],"mappings":"AAIA;IACE,iBAAiB;IACjB,+BAAuB;IAEvB;;;OAGG;IACH,kBAHU,OAAO,qCAAqC,EAAE,oBAAoB,GAAG,IAAI,CAGrE;IAEd;;;;;;OAMG;IACH,qBANqB,CAAC,SAAR,GAAG,EAAG,EAC0F,CAAC,SAAlG,CAAE,KAAK,EAAE,OAAO,qCAAqC,EAAE,oBAAoB,EAAE,GAAG,IAAI,EAAE,CAAC,KAAK,GAAI,MAClG,CAAC,GACC,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,CAezC;IAED;;;;;OAKG;IACH,sBAAa,OAJF,CAIO,EAAE,UAHT,CAAC,KAAK,EAAE,OAAO,qCAAqC,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,IAG5D,UAgBP;IAErB,iBAAiB;IACjB,yBAOC;CAMF;8BAvE6B,iCAAiC"}
1
+ {"version":3,"file":"FileItemConfig.d.ts","sourceRoot":"","sources":["FileItemConfig.js"],"names":[],"mappings":"AAGA;IACE,iBAAiB;IACjB,+BAAuB;IAEvB;;;OAGG;IACH,kBAHU,OAAO,qCAAqC,EAAE,oBAAoB,GAAG,IAAI,CAGrE;IAEd;;;;;;OAMG;IACH,qBANqB,CAAC,SAAR,GAAG,EAAG,EAC0F,CAAC,SAAlG,CAAE,KAAK,EAAE,OAAO,qCAAqC,EAAE,oBAAoB,EAAE,GAAG,IAAI,EAAE,CAAC,KAAK,GAAI,MAClG,CAAC,GACC,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,CAezC;IAED;;;;;OAKG;IACH,oBAL6E,CAAC,SAAjE,OAAQ,qCAAqC,EAAE,eAAgB,SACjE,CAAC,YACD,CAAC,KAAK,EAAE,OAAO,qCAAqC,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,IAAI,QAoB3F;IAED,iBAAiB;IACjB,yBAOC;CAMF;8BAxE6B,iCAAiC"}
@@ -1,5 +1,4 @@
1
1
  //@ts-check
2
-
3
2
  import { UploaderBlock } from '../../abstract/UploaderBlock.js';
4
3
 
5
4
  export class FileItemConfig extends UploaderBlock {
@@ -39,8 +38,8 @@ export class FileItemConfig extends UploaderBlock {
39
38
  * @param {(value: import('../../abstract/uploadEntrySchema.js').UploadEntryData[K]) => void} handler_
40
39
  * @protected
41
40
  */
42
- _subEntry = (prop_, handler_) =>
43
- this._withEntry(
41
+ _subEntry(prop_, handler_) {
42
+ return this._withEntry(
44
43
  /**
45
44
  * @template {import('../../abstract/uploadEntrySchema.js').UploadEntryKeys} K
46
45
  * @param {import('../../abstract/uploadEntrySchema.js').UploadEntryTypedData} entry
@@ -56,6 +55,7 @@ export class FileItemConfig extends UploaderBlock {
56
55
  this._entrySubs.add(sub);
57
56
  },
58
57
  )(prop_, handler_);
58
+ }
59
59
 
60
60
  /** @protected */
61
61
  _reset() {
@@ -1 +1 @@
1
- {"version":3,"file":"ImgBase.d.ts","sourceRoot":"","sources":["ImgBase.js"],"names":[],"mappings":"AAgBA;IACE,uBAAmB;IACnB,8BAA0B;IAE1B;;;OAGG;IACH,gBAMC;IAED;;;;;OAKG;IACH,8BAFa,eAAe,CAoB3B;IAED;;;;;OAKG;IACH,uDAWC;IAED;;;;;OAKG;IACH,oBA+DC;IAED;;;;OAIG;IACH,kBAUC;IAED;;;;OAIG;IACH,eAJW,WAAW,8CAcrB;IAED,oCAAoC;IACpC,sBADY,gBAAgB,QAY3B;IAED,+BAA+B;IAC/B,WADW,gBAAgB,CAO1B;IAED;;;;;;MAUC;IAED,2BAEC;IAED,sBAEC;IAED,mCAOC;IAED,4BAEC;IAED,8BAA8B;IAC9B,aADY,WAAW,QAgBtB;IAED,oBAsBC;IAED,cAEC;IAED,yBAEC;IAED,yBAUC;IAED;;;;aAQC;IAED;;aAGC;IAED;;;;qBAqBC;IAED,6BA8DC;IAED,aAMC;CACF;0BApZyB,gBAAgB"}
1
+ {"version":3,"file":"ImgBase.d.ts","sourceRoot":"","sources":["ImgBase.js"],"names":[],"mappings":"AAgBA;IACE,uBAAmB;IACnB,8BAA0B;IAE1B;;;OAGG;IACH,gBAMC;IAED;;;;;OAKG;IACH,8BAFa,eAAe,CAoB3B;IAED;;;;;OAKG;IACH,uDAWC;IAED;;;;;OAKG;IACH,oBA6DC;IAED;;;;OAIG;IACH,kBAUC;IAED;;;;OAIG;IACH,eAJW,WAAW,8CAcrB;IAED,oCAAoC;IACpC,sBADY,gBAAgB,QAY3B;IAED,+BAA+B;IAC/B,WADW,gBAAgB,CAO1B;IAED;;;;;;MAUC;IAED,2BAEC;IAED,sBAEC;IAED,mCAOC;IAED,4BAEC;IAED,8BAA8B;IAC9B,aADY,WAAW,QAgBtB;IAED,oBAsBC;IAED,cAEC;IAED,yBAEC;IAED,yBAUC;IAED;;;;aAQC;IAED;;aAGC;IAED;;;;qBAqBC;IAED,6BA8DC;IAED,aAMC;CACF;0BAlZyB,gBAAgB"}
@@ -87,11 +87,9 @@ export class ImgBase extends ImgConfig {
87
87
  }
88
88
 
89
89
  // Localhost + relative image path (DO NOTHING):
90
- // if (DEV_MODE && this.$$('src') && !this.$$('src').includes('//')) {
91
- // return this._proxyUrl(this.$$('src'));
92
- // }
93
-
94
- console.log({ self: this });
90
+ if (DEV_MODE && this.$$('src') && !this.$$('src').includes('//')) {
91
+ return this._proxyUrl(this.$$('src'));
92
+ }
95
93
 
96
94
  let cdnModifiers = this._getCdnModifiers(size, blur);
97
95
 
package/env.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  /** Do not edit this file manually. It's generated during build process. */
2
2
  export const PACKAGE_NAME: "blocks";
3
- export const PACKAGE_VERSION: "1.19.3";
3
+ export const PACKAGE_VERSION: "1.19.4";
4
4
  //# sourceMappingURL=env.d.ts.map
package/env.js CHANGED
@@ -1,3 +1,3 @@
1
1
  /** Do not edit this file manually. It's generated during build process. */
2
2
  export const PACKAGE_NAME = 'blocks';
3
- export const PACKAGE_VERSION = '1.19.3';
3
+ export const PACKAGE_VERSION = '1.19.4';
package/index.ssr.d.ts CHANGED
@@ -550,7 +550,7 @@ export namespace ModalEvents {
550
550
  let DESTROY: string;
551
551
  }
552
552
  export const PACKAGE_NAME: "blocks";
553
- export const PACKAGE_VERSION: "1.19.3";
553
+ export const PACKAGE_VERSION: "1.19.4";
554
554
  export const PresenceToggle: {
555
555
  new (): {};
556
556
  template: string;
package/index.ssr.js CHANGED
@@ -1070,7 +1070,7 @@ export const ModalEvents = {
1070
1070
  DESTROY: "modal:destroy",
1071
1071
  };
1072
1072
  export const PACKAGE_NAME = `blocks`;
1073
- export const PACKAGE_VERSION = `1.19.3`;
1073
+ export const PACKAGE_VERSION = `1.19.4`;
1074
1074
  export const PresenceToggle = class {
1075
1075
  static template = `<slot></slot> `;
1076
1076
  static reg = () => {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uploadcare/file-uploader",
3
- "version": "1.19.4-alpha.2",
3
+ "version": "1.19.4",
4
4
  "description": "Building blocks for Uploadcare products integration",
5
5
  "keywords": [
6
6
  "web components",
@@ -35,9 +35,7 @@
35
35
  "MIT"
36
36
  ],
37
37
  "type": "module",
38
- "sideEffects": [
39
- "*.css"
40
- ],
38
+ "sideEffects": ["*.css"],
41
39
  "module": "./index.js",
42
40
  "exports": {
43
41
  ".": {
@@ -62,14 +62,9 @@
62
62
  width: 100%;
63
63
  height: unset;
64
64
  padding: 4px;
65
-
66
- background-color: transparent;
67
- /* border: 1px dashed var(--uc-border); */
68
- /* border-radius: calc(var(--uc-radius) * 1.75); */
69
- }
70
-
71
- [uc-file-uploader-minimal] uc-upload-list uc-file-item {
72
65
  background-color: var(--uc-background);
66
+ border: 1px dashed var(--uc-border);
67
+ border-radius: calc(var(--uc-radius) * 1.75);
73
68
  }
74
69
 
75
70
  [uc-file-uploader-minimal] uc-upload-list .uc-files {
@@ -150,10 +145,3 @@
150
145
  [uc-file-uploader-minimal][mode='grid'] uc-upload-list .uc-files .uc-add-more-btn > uc-icon {
151
146
  display: flex;
152
147
  }
153
-
154
- /*
155
- https://86beff04885a8328d3b0.ucr.io/-/resize/100x/-/blur/100/-/@clib/blocks/1.19.3/uc-img/https://cdn.skyledge.com/7c2e222b-1857-4363-b531-408f4a650c99/?token=exp=1753085298~acl=/7c2e222b-1857-4363-b531-408f4a650c99/*~hmac=redacted
156
- */
157
-
158
- /* https://aadfab151dfea016a1b0.ucr.io/https://files.buildwithfern.com/uploadcare.docs.buildwithfern.com/docs/2025-07-18T10:45:26.503Z/assets/logo-light.svg
159
- https://8ffef950a74ff210dafb.ucr.io/https://files.buildwithfern.com/uploadcare.docs.buildwithfern.com/docs/2025-07-18T10:45:26.503Z/assets/logo-light.svg */
@@ -80,7 +80,7 @@ export type ConfigType = {
80
80
  */
81
81
  sourceList: string;
82
82
  /**
83
- * Top-level origin for the uploader.
83
+ * Top-level origin for the uploader.
84
84
  * This is used for Google Drive Picker if there is no access to the origin due to the cross-origin policy.
85
85
  */
86
86
  topLevelOrigin: string;
@@ -302,7 +302,7 @@ export type ConfigType = {
302
302
 
303
303
  cloudImageEditorMaskHref: string | null;
304
304
 
305
- /**
305
+ /**
306
306
  * Adds data-testid attributes to the each block. Needed for testing purposes.
307
307
  * @default false
308
308
  */
@@ -314,8 +314,8 @@ export type ConfigAttributesType = KebabCaseKeys<ConfigPlainType> & LowerCaseKey
314
314
 
315
315
  export type KebabCase<S extends string> = S extends `${infer C}${infer T}`
316
316
  ? T extends Uncapitalize<T>
317
- ? `${Uncapitalize<C>}${KebabCase<T>}`
318
- : `${Uncapitalize<C>}-${KebabCase<T>}`
317
+ ? `${Uncapitalize<C>}${KebabCase<T>}`
318
+ : `${Uncapitalize<C>}-${KebabCase<T>}`
319
319
  : S;
320
320
  export type KebabCaseKeys<T extends Record<string, unknown>> = { [Key in keyof T as KebabCase<Key & string>]: T[Key] };
321
321
  export type LowerCase<S extends string> = Lowercase<S>;
@@ -323,8 +323,10 @@ export type LowerCaseKeys<T extends Record<string, unknown>> = { [Key in keyof T
323
323
 
324
324
  export type OutputFileStatus = 'idle' | 'uploading' | 'success' | 'failed' | 'removed';
325
325
 
326
+ export type OutputCustomErrorType = 'CUSTOM_ERROR';
327
+
326
328
  export type OutputFileErrorType =
327
- | 'CUSTOM_ERROR'
329
+ | OutputCustomErrorType
328
330
  | 'NOT_AN_IMAGE'
329
331
  | 'FORBIDDEN_FILE_TYPE'
330
332
  | 'FILE_SIZE_EXCEEDED'
@@ -332,7 +334,11 @@ export type OutputFileErrorType =
332
334
  | 'NETWORK_ERROR'
333
335
  | 'UNKNOWN_ERROR';
334
336
 
335
- export type OutputCollectionErrorType = 'CUSTOM_ERROR' | 'SOME_FILES_HAS_ERRORS' | 'TOO_MANY_FILES' | 'TOO_FEW_FILES';
337
+ export type OutputCollectionErrorType =
338
+ | OutputCustomErrorType
339
+ | 'SOME_FILES_HAS_ERRORS'
340
+ | 'TOO_MANY_FILES'
341
+ | 'TOO_FEW_FILES';
336
342
 
337
343
  export type OutputFileErrorPayload = {
338
344
  entry: OutputFileEntry;
@@ -366,19 +372,19 @@ export type OutputErrorTypePayload = {
366
372
  CUSTOM_ERROR: Record<string, unknown>;
367
373
  };
368
374
 
369
- export type OutputError<T extends OutputFileErrorType | OutputCollectionErrorType> = T extends 'CUSTOM_ERROR'
375
+ export type OutputError<T extends OutputFileErrorType | OutputCollectionErrorType> = T extends OutputCustomErrorType
370
376
  ? {
371
- type: T;
372
- message: string;
373
- payload?: OutputErrorTypePayload[T];
374
- }
377
+ type?: T;
378
+ message: string;
379
+ payload?: OutputErrorTypePayload[T];
380
+ }
375
381
  : T extends keyof OutputErrorTypePayload
376
- ? {
377
- type: T;
378
- message: string;
379
- payload?: OutputErrorTypePayload[T];
380
- }
381
- : never;
382
+ ? {
383
+ type: T;
384
+ message: string;
385
+ payload?: OutputErrorTypePayload[T];
386
+ }
387
+ : never;
382
388
 
383
389
  export type OutputErrorFile = OutputError<OutputFileErrorType>;
384
390
 
@@ -400,7 +406,7 @@ export type OutputFileEntry<TStatus extends OutputFileStatus = OutputFileStatus>
400
406
  fullPath: string | null;
401
407
  source: SourceTypes | null;
402
408
  } & (
403
- | {
409
+ | {
404
410
  status: 'success';
405
411
  fileInfo: UploadcareFile;
406
412
  uuid: string;
@@ -412,7 +418,7 @@ export type OutputFileEntry<TStatus extends OutputFileStatus = OutputFileStatus>
412
418
  isRemoved: false;
413
419
  errors: [];
414
420
  }
415
- | {
421
+ | {
416
422
  status: 'failed';
417
423
  fileInfo: UploadcareFile | null;
418
424
  uuid: string | null;
@@ -424,7 +430,7 @@ export type OutputFileEntry<TStatus extends OutputFileStatus = OutputFileStatus>
424
430
  isRemoved: false;
425
431
  errors: OutputError<OutputFileErrorType>[];
426
432
  }
427
- | {
433
+ | {
428
434
  status: 'uploading';
429
435
  fileInfo: null;
430
436
  uuid: null;
@@ -436,7 +442,7 @@ export type OutputFileEntry<TStatus extends OutputFileStatus = OutputFileStatus>
436
442
  isRemoved: false;
437
443
  errors: [];
438
444
  }
439
- | {
445
+ | {
440
446
  status: 'removed';
441
447
  fileInfo: UploadcareFile | null;
442
448
  uuid: string | null;
@@ -448,7 +454,7 @@ export type OutputFileEntry<TStatus extends OutputFileStatus = OutputFileStatus>
448
454
  isRemoved: true;
449
455
  errors: OutputError<OutputFileErrorType>[];
450
456
  }
451
- | {
457
+ | {
452
458
  status: 'idle';
453
459
  fileInfo: null;
454
460
  uuid: null;
@@ -460,7 +466,7 @@ export type OutputFileEntry<TStatus extends OutputFileStatus = OutputFileStatus>
460
466
  isRemoved: false;
461
467
  errors: [];
462
468
  }
463
- );
469
+ );
464
470
 
465
471
  export type OutputCollectionStatus = 'idle' | 'uploading' | 'success' | 'failed';
466
472
 
@@ -484,43 +490,43 @@ export type OutputCollectionState<
484
490
  } & (TGroupFlag extends 'has-group'
485
491
  ? { group: UploadcareGroup }
486
492
  : TGroupFlag extends 'maybe-has-group'
487
- ? { group: UploadcareGroup | null }
488
- : never) &
493
+ ? { group: UploadcareGroup | null }
494
+ : never) &
489
495
  (
490
496
  | {
491
- status: 'idle';
492
- isFailed: false;
493
- isUploading: false;
494
- isSuccess: false;
495
- errors: [];
496
- allEntries: OutputFileEntry<'idle' | 'success'>[];
497
- }
497
+ status: 'idle';
498
+ isFailed: false;
499
+ isUploading: false;
500
+ isSuccess: false;
501
+ errors: [];
502
+ allEntries: OutputFileEntry<'idle' | 'success'>[];
503
+ }
498
504
  | {
499
- status: 'uploading';
500
- isFailed: false;
501
- isUploading: true;
502
- isSuccess: false;
503
- errors: [];
504
- allEntries: OutputFileEntry[];
505
- }
505
+ status: 'uploading';
506
+ isFailed: false;
507
+ isUploading: true;
508
+ isSuccess: false;
509
+ errors: [];
510
+ allEntries: OutputFileEntry[];
511
+ }
506
512
  | {
507
- status: 'success';
508
- isFailed: false;
509
- isUploading: false;
510
- isSuccess: true;
511
- errors: [];
512
- allEntries: OutputFileEntry<'success'>[];
513
- }
513
+ status: 'success';
514
+ isFailed: false;
515
+ isUploading: false;
516
+ isSuccess: true;
517
+ errors: [];
518
+ allEntries: OutputFileEntry<'success'>[];
519
+ }
514
520
  | {
515
- status: 'failed';
516
- isFailed: true;
517
- isUploading: false;
518
- isSuccess: false;
519
- errors: OutputError<OutputCollectionErrorType>[];
520
- allEntries: OutputFileEntry[];
521
- }
521
+ status: 'failed';
522
+ isFailed: true;
523
+ isUploading: false;
524
+ isSuccess: false;
525
+ errors: OutputError<OutputCollectionErrorType>[];
526
+ allEntries: OutputFileEntry[];
527
+ }
522
528
  );
523
529
 
524
530
  export { EventType, EventPayload } from '../blocks/UploadCtxProvider/EventEmitter';
525
531
 
526
- export {};
532
+ export { };