@uploadcare/file-uploader 1.13.0-alpha.0 → 1.13.0-alpha.1

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 (170) hide show
  1. package/abstract/ActivityBlock.d.ts +5 -5
  2. package/abstract/ActivityBlock.d.ts.map +1 -1
  3. package/abstract/Block.d.ts +9 -3
  4. package/abstract/Block.d.ts.map +1 -1
  5. package/abstract/CTX.d.ts +6 -6
  6. package/abstract/CTX.d.ts.map +1 -1
  7. package/abstract/LocaleManager.d.ts +3 -3
  8. package/abstract/LocaleManager.d.ts.map +1 -1
  9. package/abstract/SecureUploadsManager.d.ts +2 -2
  10. package/abstract/SecureUploadsManager.d.ts.map +1 -1
  11. package/abstract/SolutionBlock.d.ts +2 -2
  12. package/abstract/SolutionBlock.d.ts.map +1 -1
  13. package/abstract/TypedCollection.d.ts.map +1 -1
  14. package/abstract/TypedData.d.ts +1 -1
  15. package/abstract/TypedData.d.ts.map +1 -1
  16. package/abstract/UploaderBlock.d.ts +5 -5
  17. package/abstract/UploaderBlock.d.ts.map +1 -1
  18. package/abstract/UploaderPublicApi.d.ts +22 -23
  19. package/abstract/UploaderPublicApi.d.ts.map +1 -1
  20. package/abstract/UploaderPublicApi.js +4 -11
  21. package/abstract/ValidationManager.d.ts +4 -4
  22. package/abstract/ValidationManager.d.ts.map +1 -1
  23. package/abstract/a11y.d.ts +2 -2
  24. package/abstract/a11y.d.ts.map +1 -1
  25. package/abstract/buildOutputCollectionState.d.ts +1 -1
  26. package/abstract/buildOutputCollectionState.d.ts.map +1 -1
  27. package/abstract/defineComponents.d.ts.map +1 -1
  28. package/abstract/l10nProcessor.d.ts.map +1 -1
  29. package/abstract/loadFileUploaderFrom.d.ts +1 -1
  30. package/abstract/loadFileUploaderFrom.d.ts.map +1 -1
  31. package/abstract/localeRegistry.d.ts.map +1 -1
  32. package/abstract/sharedConfigKey.d.ts.map +1 -1
  33. package/abstract/uploadEntrySchema.d.ts +2 -2
  34. package/abstract/uploadEntrySchema.d.ts.map +1 -1
  35. package/blocks/CameraSource/CameraSource.d.ts +20 -30
  36. package/blocks/CameraSource/CameraSource.d.ts.map +1 -1
  37. package/blocks/CameraSource/CameraSource.js +81 -83
  38. package/blocks/CameraSource/camera-source.css +1 -0
  39. package/blocks/CameraSource/constants.d.ts +15 -0
  40. package/blocks/CameraSource/constants.d.ts.map +1 -0
  41. package/blocks/CameraSource/constants.js +17 -0
  42. package/blocks/CloudImageEditor/src/CloudImageEditorBlock.d.ts.map +1 -1
  43. package/blocks/CloudImageEditor/src/CropFrame.d.ts +1 -8
  44. package/blocks/CloudImageEditor/src/CropFrame.d.ts.map +1 -1
  45. package/blocks/CloudImageEditor/src/CropFrame.js +0 -45
  46. package/blocks/CloudImageEditor/src/EditorImageCropper.d.ts +3 -3
  47. package/blocks/CloudImageEditor/src/EditorImageFader.d.ts +1 -1
  48. package/blocks/CloudImageEditor/src/EditorImageFader.d.ts.map +1 -1
  49. package/blocks/CloudImageEditor/src/EditorSlider.d.ts +1 -1
  50. package/blocks/CloudImageEditor/src/EditorSlider.d.ts.map +1 -1
  51. package/blocks/CloudImageEditor/src/EditorToolbar.d.ts +1 -1
  52. package/blocks/CloudImageEditor/src/crop-utils.d.ts +14 -14
  53. package/blocks/CloudImageEditor/src/crop-utils.d.ts.map +1 -1
  54. package/blocks/CloudImageEditor/src/cropper-constants.d.ts.map +1 -1
  55. package/blocks/CloudImageEditor/src/css/common.css +0 -4
  56. package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.d.ts +1 -1
  57. package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.d.ts.map +1 -1
  58. package/blocks/CloudImageEditor/src/lib/parseCropPreset.d.ts +1 -1
  59. package/blocks/CloudImageEditor/src/lib/parseTabs.js +2 -2
  60. package/blocks/CloudImageEditor/src/lib/transformationUtils.d.ts +3 -3
  61. package/blocks/CloudImageEditor/src/lib/transformationUtils.d.ts.map +1 -1
  62. package/blocks/CloudImageEditor/src/state.d.ts +4 -4
  63. package/blocks/CloudImageEditor/src/svg-sprite.d.ts.map +1 -1
  64. package/blocks/CloudImageEditor/src/types.d.ts +58 -8
  65. package/blocks/CloudImageEditor/src/types.d.ts.map +1 -1
  66. package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts +1 -1
  67. package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts.map +1 -1
  68. package/blocks/Config/Config.d.ts +13 -5
  69. package/blocks/Config/Config.d.ts.map +1 -1
  70. package/blocks/Config/Config.js +13 -5
  71. package/blocks/Config/assertions.d.ts +5 -0
  72. package/blocks/Config/assertions.d.ts.map +1 -0
  73. package/blocks/Config/assertions.js +37 -0
  74. package/blocks/Config/initialConfig.d.ts +1 -1
  75. package/blocks/Config/initialConfig.d.ts.map +1 -1
  76. package/blocks/Config/initialConfig.js +4 -5
  77. package/blocks/Config/normalizeConfigValue.d.ts.map +1 -1
  78. package/blocks/Config/normalizeConfigValue.js +20 -8
  79. package/blocks/Config/side-effects.d.ts +7 -0
  80. package/blocks/Config/side-effects.d.ts.map +1 -0
  81. package/blocks/Config/side-effects.js +32 -0
  82. package/blocks/DropArea/DropArea.d.ts +2 -2
  83. package/blocks/DropArea/DropArea.d.ts.map +1 -1
  84. package/blocks/DropArea/addDropzone.d.ts.map +1 -1
  85. package/blocks/DropArea/getDropItems.d.ts +2 -2
  86. package/blocks/DropArea/getDropItems.d.ts.map +1 -1
  87. package/blocks/ExternalSource/ExternalSource.d.ts +3 -3
  88. package/blocks/ExternalSource/ExternalSource.d.ts.map +1 -1
  89. package/blocks/ExternalSource/MessageBridge.d.ts +3 -3
  90. package/blocks/ExternalSource/MessageBridge.d.ts.map +1 -1
  91. package/blocks/ExternalSource/query-string.d.ts.map +1 -1
  92. package/blocks/ExternalSource/types.d.ts +64 -64
  93. package/blocks/ExternalSource/types.d.ts.map +1 -1
  94. package/blocks/FileItem/FileItem.d.ts +2 -2
  95. package/blocks/FileItem/FileItem.d.ts.map +1 -1
  96. package/blocks/Img/ImgBase.d.ts +3 -3
  97. package/blocks/Img/ImgBase.d.ts.map +1 -1
  98. package/blocks/Img/ImgConfig.d.ts.map +1 -1
  99. package/blocks/Img/configurations.d.ts.map +1 -1
  100. package/blocks/Range/Range.d.ts.map +1 -1
  101. package/blocks/SimpleBtn/SimpleBtn.d.ts +2 -2
  102. package/blocks/SimpleBtn/SimpleBtn.d.ts.map +1 -1
  103. package/blocks/SourceBtn/SourceBtn.d.ts +2 -2
  104. package/blocks/SourceBtn/SourceBtn.d.ts.map +1 -1
  105. package/blocks/Spinner/Spinner.d.ts.map +1 -1
  106. package/blocks/UploadCtxProvider/EventEmitter.d.ts +20 -20
  107. package/blocks/UploadCtxProvider/EventEmitter.d.ts.map +1 -1
  108. package/blocks/UploadCtxProvider/UploadCtxProvider.d.ts +4 -4
  109. package/blocks/UploadCtxProvider/UploadCtxProvider.d.ts.map +1 -1
  110. package/blocks/UploadList/UploadList.d.ts +2 -2
  111. package/blocks/UploadList/UploadList.d.ts.map +1 -1
  112. package/blocks/svg-backgrounds/svg-backgrounds.d.ts +3 -3
  113. package/blocks/svg-backgrounds/svg-backgrounds.d.ts.map +1 -1
  114. package/blocks/themes/uc-basic/svg-sprite.d.ts.map +1 -1
  115. package/blocks/utils/UploadSource.d.ts.map +1 -1
  116. package/blocks/utils/comma-separated.d.ts +1 -1
  117. package/blocks/utils/comma-separated.d.ts.map +1 -1
  118. package/blocks/utils/comma-separated.js +5 -2
  119. package/blocks/utils/debounce.d.ts +1 -3
  120. package/blocks/utils/debounce.d.ts.map +1 -1
  121. package/blocks/utils/resizeImage.d.ts +1 -1
  122. package/blocks/utils/resizeImage.d.ts.map +1 -1
  123. package/blocks/utils/throttle.d.ts +1 -3
  124. package/blocks/utils/throttle.d.ts.map +1 -1
  125. package/blocks/utils/userAgent.d.ts +1 -1
  126. package/blocks/utils/userAgent.d.ts.map +1 -1
  127. package/env.d.ts.map +1 -1
  128. package/index.ssr.d.ts +0 -14
  129. package/index.ssr.d.ts.map +1 -1
  130. package/index.ssr.js +5 -14
  131. package/package.json +2 -4
  132. package/solutions/file-uploader/inline/FileUploaderInline.d.ts +2 -2
  133. package/solutions/file-uploader/inline/FileUploaderInline.d.ts.map +1 -1
  134. package/solutions/file-uploader/regular/FileUploaderRegular.d.ts +3 -3
  135. package/solutions/file-uploader/regular/FileUploaderRegular.d.ts.map +1 -1
  136. package/types/exported.d.ts +81 -66
  137. package/utils/cdn-utils.d.ts +3 -3
  138. package/utils/cdn-utils.d.ts.map +1 -1
  139. package/utils/fileTypes.d.ts +1 -1
  140. package/utils/fileTypes.d.ts.map +1 -1
  141. package/utils/getPluralForm.d.ts.map +1 -1
  142. package/utils/isSecureTokenExpired.d.ts +1 -1
  143. package/utils/memoize.d.ts.map +1 -1
  144. package/utils/mixinClass.d.ts +1 -3
  145. package/utils/mixinClass.d.ts.map +1 -1
  146. package/utils/prettyBytes.d.ts.map +1 -1
  147. package/utils/template-utils.d.ts +1 -1
  148. package/utils/template-utils.d.ts.map +1 -1
  149. package/utils/toKebabCase.d.ts.map +1 -1
  150. package/utils/transparentPixelSrc.d.ts.map +1 -1
  151. package/utils/uniqueArray.d.ts.map +1 -1
  152. package/utils/validators/collection/validateCollectionUploadError.d.ts +1 -1
  153. package/utils/validators/collection/validateMultiple.d.ts +1 -1
  154. package/utils/validators/file/validateFileType.d.ts +1 -1
  155. package/utils/validators/file/validateIsImage.d.ts +1 -1
  156. package/utils/validators/file/validateMaxSizeLimit.d.ts +1 -1
  157. package/utils/validators/file/validateUploadError.d.ts +1 -1
  158. package/utils/waitForAttribute.d.ts +1 -1
  159. package/utils/waitForAttribute.d.ts.map +1 -1
  160. package/web/file-uploader.iife.min.js +4 -4
  161. package/web/file-uploader.min.js +4 -4
  162. package/web/uc-basic.min.css +1 -1
  163. package/web/uc-cloud-image-editor.min.css +1 -1
  164. package/web/uc-cloud-image-editor.min.js +4 -4
  165. package/web/uc-file-uploader-inline.min.css +1 -1
  166. package/web/uc-file-uploader-inline.min.js +4 -4
  167. package/web/uc-file-uploader-minimal.min.js +3 -3
  168. package/web/uc-file-uploader-regular.min.css +1 -1
  169. package/web/uc-file-uploader-regular.min.js +4 -4
  170. package/web/uc-img.min.js +1 -1
@@ -24,8 +24,8 @@ export class UploadList extends UploaderBlock {
24
24
  '*commonProgress': number;
25
25
  '*uploadList': never[];
26
26
  '*uploadQueue': import("@uploadcare/upload-client").Queue;
27
- '*collectionErrors': ReturnType<import("../../types").OutputErrorCollection>[];
28
- '*collectionState': import("../../types").OutputCollectionState | null;
27
+ '*collectionErrors': any[];
28
+ '*collectionState': import("../../types").OutputCollectionState<import("../../types").OutputCollectionStatus, "maybe-has-group"> | null;
29
29
  '*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
30
30
  '*uploadTrigger': Set<string>;
31
31
  '*secureUploadsManager': import("../../abstract/SecureUploadsManager.js").SecureUploadsManager | null;
@@ -1 +1 @@
1
- {"version":3,"file":"UploadList.d.ts","sourceRoot":"","sources":["UploadList.js"],"names":[],"mappings":"AAMA;;;;;;;GAOG;AAEH;IAKE,4BAAoD;IAKlD;;;;;;;;;;;;;;;;+CAFO,aAEJ;mCAGS,aAAU;6BAGT,2BACL;;wCAON,wCACC;;;;;;MAWF;IAGH,eAAe;IACf,yCASQ;IAER,eAAe;IACf,4BAuCC;IAED;;;OAGG;IACH,uBAmBC;CAoEF;;;;sBAhMY;IACR,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;8BAV0B,iCAAiC"}
1
+ {"version":3,"file":"UploadList.d.ts","sourceRoot":"","sources":["UploadList.js"],"names":[],"mappings":"AAMA;;;;;;;GAOG;AAEH;IAKE,4BAAoD;IAKlD;;;;;;;;;;;;;;;;;;;;;;;;;;MA0BC;IAGH,eAAe;IACf,yCASQ;IAER,eAAe;IACf,4BAuCC;IAED;;;OAGG;IACH,uBAmBC;CAoEF;;;;sBAhMY;IACZ,KAAS,EAAE,MAAM,CAAC;IAClB,OAAW,EAAE,MAAM,CAAC;IACpB,SAAa,EAAE,MAAM,CAAC;IACtB,MAAU,EAAE,MAAM,CAAC;CAChB;8BAV0B,iCAAiC"}
@@ -3,15 +3,15 @@
3
3
  * @param {String} [color2]
4
4
  * @returns {String}
5
5
  */
6
- export function checkerboardCssBg(color1?: string, color2?: string): string;
6
+ export function checkerboardCssBg(color1?: string | undefined, color2?: string | undefined): string;
7
7
  /**
8
8
  * @param {String} [color]
9
9
  * @returns {String}
10
10
  */
11
- export function strokesCssBg(color?: string): string;
11
+ export function strokesCssBg(color?: string | undefined): string;
12
12
  /**
13
13
  * @param {String} [color]
14
14
  * @returns {String}
15
15
  */
16
- export function fileCssBg(color?: string, width?: number, height?: number): string;
16
+ export function fileCssBg(color?: string | undefined, width?: number, height?: number): string;
17
17
  //# sourceMappingURL=svg-backgrounds.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"svg-backgrounds.d.ts","sourceRoot":"","sources":["svg-backgrounds.js"],"names":[],"mappings":"AAWA;;;;GAIG;AACH,4EAMC;AAED;;;GAGG;AACH,qDAIC;AAED;;;GAGG;AACH,mFAMC"}
1
+ {"version":3,"file":"svg-backgrounds.d.ts","sourceRoot":"","sources":["svg-backgrounds.js"],"names":[],"mappings":"AAWA;;;;GAIG;AACH,oGAMC;AAED;;;GAGG;AACH,iEAIC;AAED;;;GAGG;AACH,+FAMC"}
@@ -1 +1 @@
1
- {"version":3,"file":"svg-sprite.d.ts","sourceRoot":"","sources":["svg-sprite.js"],"names":[],"mappings":"wBAAe,4vrBAA4vrB"}
1
+ {"version":3,"file":"svg-sprite.d.ts","sourceRoot":"","sources":["svg-sprite.js"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"UploadSource.d.ts","sourceRoot":"","sources":["UploadSource.js"],"names":[],"mappings":"AACA;;;;;;;;;;;GAWG;AAEH;;;;;;;;;;;;;;;;;;GASG;0BAEW,CAAC,OAAO,YAAY,EAAE,MAAM,OAAO,YAAY,CAAC"}
1
+ {"version":3,"file":"UploadSource.d.ts","sourceRoot":"","sources":["UploadSource.js"],"names":[],"mappings":"AACA;;;;;;;;;;;GAWG;AAEH;;;;;;;;;;;;;;;;;;GASG;0BAEW,CAAC,mBAAmB,CAAC,CAAC,MAAM,mBAAmB,CAAC"}
@@ -1,3 +1,3 @@
1
- export function deserealizeCsv(value: string): string[];
1
+ export function deserializeCsv(value: string): string[];
2
2
  export function serializeCsv(value: unknown[]): string;
3
3
  //# sourceMappingURL=comma-separated.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"comma-separated.d.ts","sourceRoot":"","sources":["comma-separated.js"],"names":[],"mappings":"AAGO,sCADK,MAAM,YAOjB;AAGM,oCADK,OAAO,EAAE,UAOpB"}
1
+ {"version":3,"file":"comma-separated.d.ts","sourceRoot":"","sources":["comma-separated.js"],"names":[],"mappings":"AAGO,sCADK,MAAM,YAUjB;AAGM,oCADK,OAAO,EAAE,UAOpB"}
@@ -1,12 +1,15 @@
1
1
  // @ts-check
2
2
 
3
3
  /** @param {string} value */
4
- export const deserealizeCsv = (value) => {
4
+ export const deserializeCsv = (value) => {
5
5
  if (!value) {
6
6
  return [];
7
7
  }
8
8
 
9
- return value.split(',').map((item) => item.trim());
9
+ return value
10
+ .split(',')
11
+ .map((item) => item.trim())
12
+ .filter(Boolean);
10
13
  };
11
14
 
12
15
  /** @param {unknown[]} value */
@@ -4,9 +4,7 @@
4
4
  * @param {number} wait
5
5
  * @returns {T & { cancel: () => void }} }
6
6
  */
7
- export function debounce<T extends {
8
- (...args: any[]): any;
9
- }>(callback: T, wait: number): T & {
7
+ export function debounce<T extends (...args: any[]) => any>(callback: T, wait: number): T & {
10
8
  cancel: () => void;
11
9
  };
12
10
  //# sourceMappingURL=debounce.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["debounce.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,yBALyC,CAAC,SAA7B;IAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG,CAAA;CAAG,YAC7B,CAAC,QACD,MAAM,GACJ,CAAC,GAAG;IAAE,MAAM,EAAE,MAAM,IAAI,CAAA;CAAE,CAetC"}
1
+ {"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["debounce.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,6CAL0B,GAAG,EAAE,KAAG,GAAG,qBAE1B,MAAM;YACU,MAAM,IAAI;EAepC"}
@@ -2,5 +2,5 @@
2
2
  * @param {File} imgFile
3
3
  * @param {Number} [size]
4
4
  */
5
- export function generateThumb(imgFile: File, size?: number): string | Promise<any>;
5
+ export function generateThumb(imgFile: File, size?: number | undefined): string | Promise<any>;
6
6
  //# sourceMappingURL=resizeImage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resizeImage.d.ts","sourceRoot":"","sources":["resizeImage.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,uCAHW,IAAI,wCAsCd"}
1
+ {"version":3,"file":"resizeImage.d.ts","sourceRoot":"","sources":["resizeImage.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,uCAHW,IAAI,oDAsCd"}
@@ -1,6 +1,4 @@
1
- export function throttle<T extends {
2
- (...args: any[]): void;
3
- }>(fn: T, wait: number): T & {
1
+ export function throttle<T extends (...args: any[]) => void>(fn: T, wait: number): T & {
4
2
  readonly cancel: () => void;
5
3
  };
6
4
  //# sourceMappingURL=throttle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"throttle.d.ts","sourceRoot":"","sources":["throttle.js"],"names":[],"mappings":"AAQO,yBALmC,CAAC,SAA9B;IAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;CAAG,MAC9B,CAAC,QACD,MAAM,GACJ,CAAC,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,CAAA;CAAE,CAsC/C"}
1
+ {"version":3,"file":"throttle.d.ts","sourceRoot":"","sources":["throttle.js"],"names":[],"mappings":"AAQO,6CALmB,GAAG,EAAE,KAAG,IAAI,eAE3B,MAAM;qBACmB,MAAM,IAAI;EAsC7C"}
@@ -2,5 +2,5 @@
2
2
  * @param {import('@uploadcare/upload-client').CustomUserAgentOptions} options
3
3
  * @returns {ReturnType<import('@uploadcare/upload-client').CustomUserAgentFn>}
4
4
  */
5
- export function customUserAgent(options: import("@uploadcare/upload-client").CustomUserAgentOptions): ReturnType<import("@uploadcare/upload-client").CustomUserAgentFn>;
5
+ export function customUserAgent(options: import('@uploadcare/upload-client').CustomUserAgentOptions): ReturnType<import('@uploadcare/upload-client').CustomUserAgentFn>;
6
6
  //# sourceMappingURL=userAgent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"userAgent.d.ts","sourceRoot":"","sources":["userAgent.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,yCAHW,OAAO,2BAA2B,EAAE,sBAAsB,GACxD,UAAU,CAAC,OAAO,2BAA2B,EAAE,iBAAiB,CAAC,CAQ7E"}
1
+ {"version":3,"file":"userAgent.d.ts","sourceRoot":"","sources":["userAgent.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,yCAHW,OAAO,2BAA2B,EAAE,sBAAsB,GACxD,WAAW,OAAO,2BAA2B,EAAE,iBAAiB,CAAC,CAQ7E"}
package/env.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["env.js"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,2BAA4B,QAAQ,CAAC;AACrC,8BAA+B,QAAQ,CAAC"}
1
+ {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["env.js"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,oCAAqC;AACrC,uCAAwC"}
package/index.ssr.d.ts CHANGED
@@ -54,20 +54,6 @@ export const BtnUi: {
54
54
  };
55
55
  export const CameraSource: {
56
56
  new (): {};
57
- types: {
58
- PHOTO: string;
59
- VIDEO: string;
60
- };
61
- events: {
62
- IDLE: string;
63
- SHOT: string;
64
- PLAY: string;
65
- PAUSE: string;
66
- RESUME: string;
67
- STOP: string;
68
- RETAKE: string;
69
- ACCEPT: string;
70
- };
71
57
  template: string;
72
58
  extSrcList: {
73
59
  FACEBOOK: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.ssr.d.ts","sourceRoot":"","sources":["index.ssr.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;EAcE;AACF;;;;;;;;;;;;;;;EAcE;AACF;;;;;EAIE;AACF;;;;;;EAKE;AACF;;;;;;;;EAYE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqJE;AACF;;;;;;;;EAuCE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CE;AACF;;;;;;;;EAuCE;AACF;;;;;;;EAoGE;AACF;;;;;;;EAaE;AACF;;;;;;;EAME;AACF;;;;;;;;;;;;;;;;EAeE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgEE;AACF;;;;;;;EAWE;AACF;;;;;;;EAWE;AACF;;;;;;;EASE;AACF;;;;;;EAKE;AACF;;;;;;;EAWE;AACF;;;;;;;EAME;AACF;;;;;;;EAWE;AACF;;;;;;;EA2IE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwEE;;;;;;;;;;;;;AAaF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiFE;AACF;;;;;;EAKE;AACF;;;;;;EAKE;AACF;;;;;;;EAME;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CE;AACF;;;;;;;;EAWE;AACF;;;;;;EAwBE;AACF;;;;;;;EAUE;AACF;;;;;;;;EAWE;AACF,oCAAqC;AACrC,uCAAwC;AACxC;;;;;;;EAME;AACF;;;;;;;EAME;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8CE;AACF;;;;;;;EAME;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwDE;AACF;;;;;;;EAeE;AACF;;;;;;EAKE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoDE;AACF;;;;;;EAKE;AACF;;;;;;EAKE;AACF;;;;;;;;;;;;;;;;EAeE;AACF;;;;;;;;;;;;EAWE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiEE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4FE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyEE;AACK,yCAAiC;AACjC,qCAA6B;AAC7B,6CAAqC;AACrC,oCAA4B"}
1
+ {"version":3,"file":"index.ssr.d.ts","sourceRoot":"","sources":["index.ssr.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;EAcE;AACF;;;;;;;;;;;;;;;EAcE;AACF;;;;;EAIE;AACF;;;;;;EAKE;AACF;;;;;;;;EAYE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0IE;AACF;;;;;;;;EAuCE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CE;AACF;;;;;;;;EAuCE;AACF;;;;;;;EAsGE;AACF;;;;;;;EAaE;AACF;;;;;;;EAME;AACF;;;;;;;;;;;;;;;;EAeE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgEE;AACF;;;;;;;EAWE;AACF;;;;;;;EAWE;AACF;;;;;;;EASE;AACF;;;;;;EAKE;AACF;;;;;;;EAWE;AACF;;;;;;;EAME;AACF;;;;;;;EAWE;AACF;;;;;;;EA2IE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwEE;;;;;;;;;;;;;AAaF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiFE;AACF;;;;;;EAKE;AACF;;;;;;EAKE;AACF;;;;;;;EAME;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CE;AACF;;;;;;;;EAWE;AACF;;;;;;EAwBE;AACF;;;;;;;EAUE;AACF;;;;;;;;EAWE;AACF,oCAAqC;AACrC,uCAAwC;AACxC;;;;;;;EAME;AACF;;;;;;;EAME;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8CE;AACF;;;;;;;EAME;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwDE;AACF;;;;;;;EAeE;AACF;;;;;;EAKE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoDE;AACF;;;;;;EAKE;AACF;;;;;;EAKE;AACF;;;;;;;;;;;;;;;;EAeE;AACF;;;;;;;;;;;;EAWE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiEE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4FE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyEE;AACK,yCAAiC;AACjC,qCAA6B;AAC7B,6CAAqC;AACrC,oCAA4B"}
package/index.ssr.js CHANGED
@@ -53,17 +53,6 @@ export const BtnUi = class {
53
53
  static bindAttributes = () => {};
54
54
  };
55
55
  export const CameraSource = class {
56
- static types = { PHOTO: "photo", VIDEO: "video" };
57
- static events = {
58
- IDLE: "idle",
59
- SHOT: "shot",
60
- PLAY: "play",
61
- PAUSE: "pause",
62
- RESUME: "resume",
63
- STOP: "stop",
64
- RETAKE: "retake",
65
- ACCEPT: "accept",
66
- };
67
56
  static template = `
68
57
  <uc-activity-header>
69
58
  <button type="button" class="uc-mini-btn" set="onclick: *historyBack" l10n="@title:back">
@@ -118,7 +107,7 @@ export const CameraSource = class {
118
107
  <button
119
108
  data-id="video"
120
109
  type="button"
121
- class="uc-switch uc-mini-btn"
110
+ class="uc-switch uc-mini-btn"
122
111
  set="onclick: onClickTab; @hidden: tabVideoHidden"
123
112
  >
124
113
  <uc-icon name="video-camera"></uc-icon>
@@ -145,8 +134,8 @@ export const CameraSource = class {
145
134
  </button>
146
135
 
147
136
  <div class="uc-select">
148
- <button class="uc-mini-btn uc-btn-microphone" set="onclick: onToggleAudio; @hidden: audioToggleMicorphoneHidden;">
149
- <uc-icon set="@name:toggleMicorphoneIcon"></uc-icon>
137
+ <button class="uc-mini-btn uc-btn-microphone" set="onclick: onToggleAudio; @hidden: audioToggleMicrophoneHidden;">
138
+ <uc-icon set="@name:toggleMicrophoneIcon"></uc-icon>
150
139
  </button>
151
140
 
152
141
  <uc-select
@@ -375,6 +364,7 @@ export const Config = class {
375
364
  "user-agent-integration",
376
365
  "locale-name",
377
366
  "secure-uploads-expire-threshold",
367
+ "camera-modes",
378
368
  "default-camera-mode",
379
369
  "enable-audio-recording",
380
370
  "enable-video-recording",
@@ -419,6 +409,7 @@ export const Config = class {
419
409
  "useragentintegration",
420
410
  "localename",
421
411
  "secureuploadsexpirethreshold",
412
+ "cameramodes",
422
413
  "defaultcameramode",
423
414
  "enableaudiorecording",
424
415
  "enablevideorecording",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uploadcare/file-uploader",
3
- "version": "1.13.0-alpha.0",
3
+ "version": "1.13.0-alpha.1",
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
  ".": {
@@ -5,8 +5,8 @@ export class FileUploaderInline extends SolutionBlock {
5
5
  '*commonProgress': number;
6
6
  '*uploadList': never[];
7
7
  '*uploadQueue': import("@uploadcare/upload-client").Queue;
8
- '*collectionErrors': ReturnType<import("./index.js").OutputErrorCollection>[];
9
- '*collectionState': import("./index.js").OutputCollectionState | null;
8
+ '*collectionErrors': any[];
9
+ '*collectionState': import("./index.js").OutputCollectionState<import("./index.js").OutputCollectionStatus, "maybe-has-group"> | null;
10
10
  '*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
11
11
  '*uploadTrigger': Set<string>;
12
12
  '*secureUploadsManager': import("../../../abstract/SecureUploadsManager.js").SecureUploadsManager | null;
@@ -1 +1 @@
1
- {"version":3,"file":"FileUploaderInline.d.ts","sourceRoot":"","sources":["FileUploaderInline.js"],"names":[],"mappings":"AAIA;IAMI;;;;;;+CAcY,YAAU;mCACuC,YAAS;6BAIhD,2BAA2B;;wCAMS,2CACnD;;;;;;MAhBN;IAGH,gCAGC;IAED,6BAEC;CA0BF;;;;8BAtD6B,oCAAoC"}
1
+ {"version":3,"file":"FileUploaderInline.d.ts","sourceRoot":"","sources":["FileUploaderInline.js"],"names":[],"mappings":"AAIA;IAMI;;;;;;;;;;;;;;;;MAUC;IAGH,gCAGC;IAED,6BAEC;CA0BF;;;;8BAtD6B,oCAAoC"}
@@ -4,9 +4,9 @@ export class FileUploaderRegular extends SolutionBlock {
4
4
  '*commonProgress': number;
5
5
  '*uploadList': never[];
6
6
  '*uploadQueue': import("@uploadcare/upload-client").Queue;
7
- '*collectionErrors': ReturnType<import("./index.js").OutputErrorCollection>[];
8
- '*collectionState': import("./index.js").OutputCollectionState | null;
9
- '*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
7
+ '*collectionErrors': any[];
8
+ '*collectionState': import("./index.js").OutputCollectionState<import("./index.js").OutputCollectionStatus, "maybe-has-group"> | null;
9
+ '*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null; /** @private */
10
10
  '*uploadTrigger': Set<string>;
11
11
  '*secureUploadsManager': import("../../../abstract/SecureUploadsManager.js").SecureUploadsManager | null;
12
12
  '*currentActivity': null;
@@ -1 +1 @@
1
- {"version":3,"file":"FileUploaderRegular.d.ts","sourceRoot":"","sources":["FileUploaderRegular.js"],"names":[],"mappings":"AAKA;IAMI;;;;;+CAaE,YACL;mCAKU,YAAS;6BAC8B,2BAA2B;;wCAMtE,2CAKA;;;;;;MA5BF;IAoBG,eAAe;IACf,yBAAmC;CAK1C;;;;8BAvC6B,oCAAoC"}
1
+ {"version":3,"file":"FileUploaderRegular.d.ts","sourceRoot":"","sources":["FileUploaderRegular.js"],"names":[],"mappings":"AAKA;IAMI;;;;;;;kFAuBI,eAAe;;;;;;;;MApBlB;IAoBG,eAAe;IACf,yBAAmC;CAK1C;;;;8BAvC6B,oCAAoC"}
@@ -1,6 +1,7 @@
1
1
  import type { LocaleDefinition } from '../abstract/localeRegistry';
2
2
  import type { complexConfigKeys } from '../blocks/Config/Config';
3
3
  import type { FuncFileValidator, FuncCollectionValidator } from '../abstract/ValidationManager';
4
+ export type { CameraMode } from '../blocks/CameraSource/CameraSource';
4
5
 
5
6
  export type { FuncFileValidator, FuncCollectionValidator } from '../abstract/ValidationManager';
6
7
  export type { UploaderPublicApi } from '../abstract/UploaderPublicApi';
@@ -21,7 +22,7 @@ export type SecureUploadsSignatureResolver = () => Promise<SecureUploadsSignatur
21
22
  export type IconHrefResolver = (iconName: string) => string;
22
23
  export type FileValidators = FuncFileValidator[];
23
24
  export type CollectionValidators = FuncCollectionValidator[];
24
- export type SourceTypes = import('../blocks/utils/UploadSource').SourceTypes
25
+ export type SourceTypes = import('../blocks/utils/UploadSource').SourceTypes;
25
26
 
26
27
  export type ConfigType = {
27
28
  /**
@@ -240,11 +241,20 @@ export type ConfigType = {
240
241
  collectionValidators: CollectionValidators;
241
242
 
242
243
  /**
243
- * The default tab to open in the camera modal,
244
+ * The camera modes to enable in the camera modal,
245
+ * it is possible to select photo or video capture.
246
+ * The first mode is the default mode.
247
+ * @default 'photo,video'
248
+ */
249
+ cameraModes: string;
250
+
251
+ /**
252
+ * The default tab to open in the camera modal,
244
253
  * it is possible to select video or photo capture
245
- * @default 'photo'
254
+ * @default 'null'
255
+ * @deprecated - use `cameraModes` instead
246
256
  */
247
- defaultCameraMode: 'photo' | 'video';
257
+ defaultCameraMode: CameraMode | null;
248
258
  /**
249
259
  * Enable audio recording.
250
260
  * @default true
@@ -252,23 +262,22 @@ export type ConfigType = {
252
262
  enableAudioRecording: boolean;
253
263
  /**
254
264
  * Enable video recording.
255
- * @default true
265
+ * @deprecated - use `cameraModes` instead
266
+ * @default null
256
267
  */
257
- enableVideoRecording: boolean;
268
+ enableVideoRecording: boolean | null;
258
269
 
259
270
  /**
260
271
  * The maximum duration of the video recording in seconds
261
272
  * @default null
262
273
  */
263
- maxVideoRecordingDuration: number | null
274
+ maxVideoRecordingDuration: number | null;
264
275
 
265
276
  /**
266
- * A dictionary object that can contain
277
+ * A dictionary object that can contain
267
278
  * the following properties from MediaRecorderOptions
268
279
  */
269
- mediaRecorerOptions: MediaRecorderOptions | null
270
-
271
- maskHrefCloudEditor: string | null;
280
+ mediaRecorderOptions: MediaRecorderOptions | null;
272
281
  };
273
282
  export type ConfigComplexType = Pick<ConfigType, (typeof complexConfigKeys)[number]>;
274
283
  export type ConfigPlainType = Omit<ConfigType, keyof ConfigComplexType>;
@@ -276,8 +285,8 @@ export type ConfigAttributesType = KebabCaseKeys<ConfigPlainType> & LowerCaseKey
276
285
 
277
286
  export type KebabCase<S extends string> = S extends `${infer C}${infer T}`
278
287
  ? T extends Uncapitalize<T>
279
- ? `${Uncapitalize<C>}${KebabCase<T>}`
280
- : `${Uncapitalize<C>}-${KebabCase<T>}`
288
+ ? `${Uncapitalize<C>}${KebabCase<T>}`
289
+ : `${Uncapitalize<C>}-${KebabCase<T>}`
281
290
  : S;
282
291
  export type KebabCaseKeys<T extends Record<string, unknown>> = { [Key in keyof T as KebabCase<Key & string>]: T[Key] };
283
292
  export type LowerCase<S extends string> = Lowercase<S>;
@@ -285,9 +294,10 @@ export type LowerCaseKeys<T extends Record<string, unknown>> = { [Key in keyof T
285
294
 
286
295
  export type OutputFileStatus = 'idle' | 'uploading' | 'success' | 'failed' | 'removed';
287
296
 
288
- export type OutputCustomErrorType = 'CUSTOM_ERROR'
297
+ export type OutputCustomErrorType = 'CUSTOM_ERROR';
289
298
 
290
- export type OutputFileErrorType = OutputCustomErrorType
299
+ export type OutputFileErrorType =
300
+ | OutputCustomErrorType
291
301
  | 'NOT_AN_IMAGE'
292
302
  | 'FORBIDDEN_FILE_TYPE'
293
303
  | 'FILE_SIZE_EXCEEDED'
@@ -295,7 +305,11 @@ export type OutputFileErrorType = OutputCustomErrorType
295
305
  | 'NETWORK_ERROR'
296
306
  | 'UNKNOWN_ERROR';
297
307
 
298
- export type OutputCollectionErrorType = OutputCustomErrorType | 'SOME_FILES_HAS_ERRORS' | 'TOO_MANY_FILES' | 'TOO_FEW_FILES';
308
+ export type OutputCollectionErrorType =
309
+ | OutputCustomErrorType
310
+ | 'SOME_FILES_HAS_ERRORS'
311
+ | 'TOO_MANY_FILES'
312
+ | 'TOO_FEW_FILES';
299
313
 
300
314
  export type OutputFileErrorPayload = {
301
315
  entry: OutputFileEntry;
@@ -329,22 +343,23 @@ export type OutputErrorTypePayload = {
329
343
  CUSTOM_ERROR: Record<string, unknown>;
330
344
  };
331
345
 
332
- export type OutputError<T extends OutputFileErrorType | OutputCollectionErrorType> =
333
- T extends OutputCustomErrorType
346
+ export type OutputError<T extends OutputFileErrorType | OutputCollectionErrorType> = T extends OutputCustomErrorType
334
347
  ? {
335
- type?: T;
336
- message: string;
337
- payload?: OutputErrorTypePayload[T];
338
- }
339
- : T extends keyof OutputErrorTypePayload ? {
340
- type: T;
341
- message: string;
342
- payload?: OutputErrorTypePayload[T];
343
- } : never
348
+ type?: T;
349
+ message: string;
350
+ payload?: OutputErrorTypePayload[T];
351
+ }
352
+ : T extends keyof OutputErrorTypePayload
353
+ ? {
354
+ type: T;
355
+ message: string;
356
+ payload?: OutputErrorTypePayload[T];
357
+ }
358
+ : never;
344
359
 
345
- export type OutputErrorFile = OutputError<OutputFileErrorType>
360
+ export type OutputErrorFile = OutputError<OutputFileErrorType>;
346
361
 
347
- export type OutputErrorCollection = OutputError<OutputCollectionErrorType>
362
+ export type OutputErrorCollection = OutputError<OutputCollectionErrorType>;
348
363
 
349
364
  export type OutputFileEntry<TStatus extends OutputFileStatus = OutputFileStatus> = {
350
365
  status: TStatus;
@@ -362,7 +377,7 @@ export type OutputFileEntry<TStatus extends OutputFileStatus = OutputFileStatus>
362
377
  fullPath: string | null;
363
378
  source: SourceTypes | null;
364
379
  } & (
365
- | {
380
+ | {
366
381
  status: 'success';
367
382
  fileInfo: UploadcareFile;
368
383
  uuid: string;
@@ -374,7 +389,7 @@ export type OutputFileEntry<TStatus extends OutputFileStatus = OutputFileStatus>
374
389
  isRemoved: false;
375
390
  errors: [];
376
391
  }
377
- | {
392
+ | {
378
393
  status: 'failed';
379
394
  fileInfo: UploadcareFile | null;
380
395
  uuid: string | null;
@@ -386,7 +401,7 @@ export type OutputFileEntry<TStatus extends OutputFileStatus = OutputFileStatus>
386
401
  isRemoved: false;
387
402
  errors: OutputError<OutputFileErrorType>[];
388
403
  }
389
- | {
404
+ | {
390
405
  status: 'uploading';
391
406
  fileInfo: null;
392
407
  uuid: null;
@@ -398,7 +413,7 @@ export type OutputFileEntry<TStatus extends OutputFileStatus = OutputFileStatus>
398
413
  isRemoved: false;
399
414
  errors: [];
400
415
  }
401
- | {
416
+ | {
402
417
  status: 'removed';
403
418
  fileInfo: UploadcareFile | null;
404
419
  uuid: string | null;
@@ -410,7 +425,7 @@ export type OutputFileEntry<TStatus extends OutputFileStatus = OutputFileStatus>
410
425
  isRemoved: true;
411
426
  errors: OutputError<OutputFileErrorType>[];
412
427
  }
413
- | {
428
+ | {
414
429
  status: 'idle';
415
430
  fileInfo: null;
416
431
  uuid: null;
@@ -422,7 +437,7 @@ export type OutputFileEntry<TStatus extends OutputFileStatus = OutputFileStatus>
422
437
  isRemoved: false;
423
438
  errors: [];
424
439
  }
425
- );
440
+ );
426
441
 
427
442
  export type OutputCollectionStatus = 'idle' | 'uploading' | 'success' | 'failed';
428
443
 
@@ -446,43 +461,43 @@ export type OutputCollectionState<
446
461
  } & (TGroupFlag extends 'has-group'
447
462
  ? { group: UploadcareGroup }
448
463
  : TGroupFlag extends 'maybe-has-group'
449
- ? { group: UploadcareGroup | null }
450
- : never) &
464
+ ? { group: UploadcareGroup | null }
465
+ : never) &
451
466
  (
452
467
  | {
453
- status: 'idle';
454
- isFailed: false;
455
- isUploading: false;
456
- isSuccess: false;
457
- errors: [];
458
- allEntries: OutputFileEntry<'idle' | 'success'>[];
459
- }
468
+ status: 'idle';
469
+ isFailed: false;
470
+ isUploading: false;
471
+ isSuccess: false;
472
+ errors: [];
473
+ allEntries: OutputFileEntry<'idle' | 'success'>[];
474
+ }
460
475
  | {
461
- status: 'uploading';
462
- isFailed: false;
463
- isUploading: true;
464
- isSuccess: false;
465
- errors: [];
466
- allEntries: OutputFileEntry[];
467
- }
476
+ status: 'uploading';
477
+ isFailed: false;
478
+ isUploading: true;
479
+ isSuccess: false;
480
+ errors: [];
481
+ allEntries: OutputFileEntry[];
482
+ }
468
483
  | {
469
- status: 'success';
470
- isFailed: false;
471
- isUploading: false;
472
- isSuccess: true;
473
- errors: [];
474
- allEntries: OutputFileEntry<'success'>[];
475
- }
484
+ status: 'success';
485
+ isFailed: false;
486
+ isUploading: false;
487
+ isSuccess: true;
488
+ errors: [];
489
+ allEntries: OutputFileEntry<'success'>[];
490
+ }
476
491
  | {
477
- status: 'failed';
478
- isFailed: true;
479
- isUploading: false;
480
- isSuccess: false;
481
- errors: OutputError<OutputCollectionErrorType>[];
482
- allEntries: OutputFileEntry[];
483
- }
492
+ status: 'failed';
493
+ isFailed: true;
494
+ isUploading: false;
495
+ isSuccess: false;
496
+ errors: OutputError<OutputCollectionErrorType>[];
497
+ allEntries: OutputFileEntry[];
498
+ }
484
499
  );
485
500
 
486
501
  export { EventType, EventPayload } from '../blocks/UploadCtxProvider/EventEmitter';
487
502
 
488
- export { };
503
+ export {};
@@ -52,8 +52,8 @@ export function splitFileUrl(fileUrl: string): {
52
52
  hash: string;
53
53
  };
54
54
  export function normalizeCdnOperation(operation?: string | unknown): string;
55
- export function joinCdnOperations(...operations?: (string | unknown)[]): string;
56
- export function createCdnUrlModifiers(...cdnOperations?: (string | unknown)[]): string;
57
- export function createCdnUrl(baseCdnUrl: string, cdnModifiers?: string, filename?: string): string;
55
+ export function joinCdnOperations(...operations?: unknown[] | undefined): string;
56
+ export function createCdnUrlModifiers(...cdnOperations?: unknown[] | undefined): string;
57
+ export function createCdnUrl(baseCdnUrl: string, cdnModifiers?: string | undefined, filename?: string | undefined): string;
58
58
  export function createOriginalUrl(cdnUrl: string, uuid: string): string;
59
59
  //# sourceMappingURL=cdn-utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cdn-utils.d.ts","sourceRoot":"","sources":["cdn-utils.js"],"names":[],"mappings":"AAgDA;;;;;GAKG;AACH,wDAcC;AAED;;;;;GAKG;AACH,oCAHW,MAAM,GACJ,MAAM,CAQlB;AAED;;;;;GAKG;AACH,+CAHW,MAAM,GACJ,MAAM,CAYlB;AAED;;;;;GAKG;AACH,0CAHW,MAAM,GACJ,MAAM,EAAE,CASpB;AAED;;;;;GAKG;AACH,qDASC;AAED;;;;;GAKG;AACH,qDAEC;AAED;;;;;GAKG;AACH,+CAFa;IAAE,QAAQ,SAAS;IAAC,MAAM,SAAS;IAAC,IAAI,SAAQ;CAAE,CAS9D;AAvJM,kDAHI,SAAS,OAAO,UAkB1B;AAQM,kDAHO,CAAC,SAAS,OAAO,CAAC,EAAA,UAQ/B;AASM,yDAHO,CAAC,SAAS,OAAO,CAAC,EAAA,UAM/B;AA2HM,mGAgBN;AASM,wEAIN"}
1
+ {"version":3,"file":"cdn-utils.d.ts","sourceRoot":"","sources":["cdn-utils.js"],"names":[],"mappings":"AAgDA;;;;;GAKG;AACH,wDAcC;AAED;;;;;GAKG;AACH,oCAHW,MAAM,GACJ,MAAM,CAQlB;AAED;;;;;GAKG;AACH,+CAHW,MAAM,GACJ,MAAM,CAYlB;AAED;;;;;GAKG;AACH,0CAHW,MAAM,GACJ,MAAM,EAAE,CASpB;AAED;;;;;GAKG;AACH,qDASC;AAED;;;;;GAKG;AACH,qDAEC;AAED;;;;;GAKG;AACH,+CAFa;IAAE,QAAQ,SAAS;IAAC,MAAM,SAAS;IAAC,IAAI,SAAQ;CAAE,CAS9D;AAvJM,kDAHI,SAAS,OAAO,UAkB1B;AAQM,iFAKN;AASM,wFAGN;AA2HM,2HAgBN;AASM,wEAIN"}
@@ -1,5 +1,5 @@
1
1
  export const IMAGE_ACCEPT_LIST: string[];
2
- export function mergeFileTypes(fileTypes?: string[]): string[];
2
+ export function mergeFileTypes(fileTypes?: string[] | undefined): string[];
3
3
  export function matchMimeType(mimeType: string, allowedFileTypes: string[]): boolean;
4
4
  export function matchExtension(fileName: string, allowedFileTypes: string[]): boolean;
5
5
  export function fileIsImage(file: File | Blob): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"fileTypes.d.ts","sourceRoot":"","sources":["fileTypes.js"],"names":[],"mappings":"AAGA,yCAcE;AAMK,2CAHI,MAAM,EAAE,GACN,MAAM,EAAE,CAUpB;AAOM,kEAHI,QAAQ,WAYlB;AAOM,mEAHI,QAAQ,WAWlB;AAMM,kCAHI,IAAI,GAAG,IAAI,WASrB;AAQM,6BAHI,OAAO,GACL,OAAO,CAInB;AAQM,6BAHI,OAAO,GACL,OAAO,CAInB"}
1
+ {"version":3,"file":"fileTypes.d.ts","sourceRoot":"","sources":["fileTypes.js"],"names":[],"mappings":"AAGA,yCAcE;AAMK,kEAFM,MAAM,EAAE,CAUpB;AAOM,kEAHI,QAAQ,WAYlB;AAOM,mEAHI,QAAQ,WAWlB;AAMM,kCAHI,IAAI,GAAG,IAAI,WASrB;AAQM,6BAHI,OAAO,GACL,OAAO,CAInB;AAQM,6BAHI,OAAO,GACL,OAAO,CAInB"}
@@ -1 +1 @@
1
- {"version":3,"file":"getPluralForm.d.ts","sourceRoot":"","sources":["getPluralForm.js"],"names":[],"mappings":"AASO,sCAJI,MAAM,SACN,MAAM,GACJ,UAAU,CAKtB;yBAVa,IAAI,CAAC,cAAc"}
1
+ {"version":3,"file":"getPluralForm.d.ts","sourceRoot":"","sources":["getPluralForm.js"],"names":[],"mappings":"AASO,sCAJI,MAAM,SACN,MAAM,GACJ,UAAU,CAKtB;yBAVa,KAAK,cAAc"}
@@ -1,4 +1,4 @@
1
- export function isSecureTokenExpired(secureToken: import("../types").SecureUploadsSignatureAndExpire, { threshold }: {
1
+ export function isSecureTokenExpired(secureToken: import('../types').SecureUploadsSignatureAndExpire, { threshold }: {
2
2
  threshold?: number;
3
3
  }): boolean;
4
4
  //# sourceMappingURL=isSecureTokenExpired.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"memoize.d.ts","sourceRoot":"","sources":["memoize.js"],"names":[],"mappings":"AASO,wBANc,KAAK,SAAZ,GAAG,EAAG,EACD,OAAO,kBACiB,CAAC,SAA/B,CAAE,GAAG,IAAI,EAAE,KAAK,KAAK,OAAQ,MAC/B,CAAC,GACC,CAAC,CAeb"}
1
+ {"version":3,"file":"memoize.d.ts","sourceRoot":"","sources":["memoize.js"],"names":[],"mappings":"AASO,uHAaN"}
@@ -4,7 +4,5 @@ export type GConstructor<T> = new (...args: any[]) => T;
4
4
  * are some dynamic generated properties or native overrides in the class. We're use it to define dynamic access
5
5
  * properties and events to subscribe to.
6
6
  */
7
- export type MixinClass<Base extends GConstructor<HTMLElement>, InstanceProperties extends Record<string, any> = {}> = {
8
- new (...args: ConstructorParameters<Base>): InstanceProperties & InstanceType<Base>;
9
- } & Omit<Base, "new">;
7
+ export type MixinClass<Base extends GConstructor<HTMLElement>, InstanceProperties extends Record<string, any> = {}> = (new (...args: ConstructorParameters<Base>) => InstanceProperties & InstanceType<Base>) & Omit<Base, "new">;
10
8
  //# sourceMappingURL=mixinClass.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mixinClass.d.ts","sourceRoot":"","sources":["mixinClass.js"],"names":[],"mappings":"yBACa,CAAC,IACD,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC;;;;;;uBAQG,IAAI,SAA/B,YAAY,CAAC,WAAW,CAAE,EACJ,kBAAkB,SAAxC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAE,SACrB;IACZ,KAAS,GAAG,IAAI,EAAE,qBAAqB,CAAC,IAAI,CAAC,GAAG,kBAAkB,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;CACrF,GAAG,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC"}
1
+ {"version":3,"file":"mixinClass.d.ts","sourceRoot":"","sources":["mixinClass.js"],"names":[],"mappings":"4CAE2B,GAAG,EAAE,KAAK,CAAC;;;;;;qIAWnB,sBAAsB,IAAI,CAAC,KAAG,kBAAkB,GAAG,aAAa,IAAI,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"prettyBytes.d.ts","sourceRoot":"","sources":["prettyBytes.js"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AAiBI,mCAJI,MAAM,SACN,CAAC,OAAO,YAAY,EAAE,MAAM,OAAO,YAAY,CAAC,GAC9C,MAAM,CAmClB"}
1
+ {"version":3,"file":"prettyBytes.d.ts","sourceRoot":"","sources":["prettyBytes.js"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AAiBI,mCAJI,MAAM,SACN,CAAC,mBAAmB,CAAC,CAAC,MAAM,mBAAmB,CAAC,GAC9C,MAAM,CAmClB"}