@uploadcare/file-uploader 1.19.4-alpha.1 → 1.19.4-alpha.3
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 +2 -2
- package/abstract/CTX.d.ts.map +1 -1
- package/abstract/CTX.js +1 -1
- package/abstract/SolutionBlock.d.ts +1 -1
- package/abstract/UploaderBlock.d.ts +1 -1
- package/abstract/buildOutputCollectionState.js +1 -1
- package/blocks/CameraSource/CameraSource.d.ts +1 -1
- package/blocks/DropArea/DropArea.d.ts +1 -1
- package/blocks/ExternalSource/ExternalSource.d.ts +1 -1
- package/blocks/FileItem/FileItem.d.ts +1 -1
- package/blocks/Img/ImgBase.d.ts.map +1 -1
- package/blocks/Img/ImgBase.js +3 -5
- package/blocks/SimpleBtn/SimpleBtn.d.ts +1 -1
- package/blocks/SourceBtn/SourceBtn.d.ts +1 -1
- package/blocks/Thumb/Thumb.d.ts +1 -1
- package/blocks/UploadList/UploadList.d.ts +1 -1
- package/package.json +1 -1
- package/solutions/file-uploader/inline/FileUploaderInline.d.ts +1 -1
- package/solutions/file-uploader/minimal/FileUploaderMinimal.d.ts +1 -1
- package/solutions/file-uploader/minimal/index.css +2 -14
- package/solutions/file-uploader/regular/FileUploaderRegular.d.ts +1 -1
- package/types/exported.d.ts +9 -3
- package/web/file-uploader.iife.min.js +4 -4
- package/web/file-uploader.min.js +4 -4
- package/web/uc-file-uploader-inline.min.js +4 -4
- package/web/uc-file-uploader-minimal.min.css +1 -1
- package/web/uc-file-uploader-minimal.min.js +4 -4
- package/web/uc-file-uploader-regular.min.js +4 -4
- package/web/uc-img.min.js +3 -3
package/abstract/CTX.d.ts
CHANGED
|
@@ -10,8 +10,8 @@ export function uploaderBlockCtx(fnCtx: import("./Block").Block): {
|
|
|
10
10
|
'*commonProgress': number;
|
|
11
11
|
'*uploadList': never[];
|
|
12
12
|
'*uploadQueue': Queue;
|
|
13
|
-
/** @type {import('../types').OutputErrorCollection[]} */
|
|
14
|
-
'*collectionErrors': import("../types").OutputErrorCollection[];
|
|
13
|
+
/** @type {ReturnType<() => import('../types').OutputErrorCollection>[]} */
|
|
14
|
+
'*collectionErrors': ReturnType<() => import("../types").OutputErrorCollection>[];
|
|
15
15
|
/** @type {import('../types').OutputCollectionState | null} */
|
|
16
16
|
'*collectionState': import("../types").OutputCollectionState | null;
|
|
17
17
|
/** @type {import('@uploadcare/upload-client').UploadcareGroup | null} */
|
package/abstract/CTX.d.ts.map
CHANGED
|
@@ -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;;;;IAMjC,
|
|
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,2EAA2E;yBAAhE,UAAU,CAAC,MAAM,OAAO,UAAU,EAAE,qBAAqB,CAAC,EAAE;IAEvE,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,7 @@ export const uploaderBlockCtx = (fnCtx) => ({
|
|
|
26
26
|
'*commonProgress': 0,
|
|
27
27
|
'*uploadList': [],
|
|
28
28
|
'*uploadQueue': new Queue(1),
|
|
29
|
-
/** @type {import('../types').OutputErrorCollection[]} */
|
|
29
|
+
/** @type {ReturnType<() => import('../types').OutputErrorCollection>[]} */
|
|
30
30
|
'*collectionErrors': [],
|
|
31
31
|
/** @type {import('../types').OutputCollectionState | null} */
|
|
32
32
|
'*collectionState': null,
|
|
@@ -5,7 +5,7 @@ export class SolutionBlock extends Block {
|
|
|
5
5
|
'*commonProgress': number;
|
|
6
6
|
'*uploadList': never[];
|
|
7
7
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
8
|
-
'*collectionErrors': import("../index.js").OutputErrorCollection[];
|
|
8
|
+
'*collectionErrors': ReturnType<() => import("../index.js").OutputErrorCollection>[];
|
|
9
9
|
'*collectionState': import("../index.js").OutputCollectionState | null;
|
|
10
10
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
11
11
|
'*uploadTrigger': Set<string>;
|
|
@@ -7,7 +7,7 @@ export class UploaderBlock extends ActivityBlock {
|
|
|
7
7
|
'*commonProgress': number;
|
|
8
8
|
'*uploadList': never[];
|
|
9
9
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
10
|
-
'*collectionErrors': import("../types").OutputErrorCollection[];
|
|
10
|
+
'*collectionErrors': ReturnType<() => import("../types").OutputErrorCollection>[];
|
|
11
11
|
'*collectionState': import("../types").OutputCollectionState | null;
|
|
12
12
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
13
13
|
'*uploadTrigger': Set<string>;
|
|
@@ -43,7 +43,7 @@ export function buildOutputCollectionState(uploaderBlock) {
|
|
|
43
43
|
progress: () => {
|
|
44
44
|
return uploaderBlock.$['*commonProgress'];
|
|
45
45
|
},
|
|
46
|
-
/** @returns {ReturnType<import('../types').OutputErrorFile>[]} */
|
|
46
|
+
/** @returns {ReturnType<() => import('../types').OutputErrorFile>[]} */
|
|
47
47
|
errors: () => {
|
|
48
48
|
return uploaderBlock.$['*collectionErrors'];
|
|
49
49
|
},
|
|
@@ -64,7 +64,7 @@ export class CameraSource extends UploaderBlock {
|
|
|
64
64
|
'*commonProgress': number;
|
|
65
65
|
'*uploadList': never[];
|
|
66
66
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
67
|
-
'*collectionErrors': import("../../index.js").OutputErrorCollection[];
|
|
67
|
+
'*collectionErrors': ReturnType<() => import("../../index.js").OutputErrorCollection>[];
|
|
68
68
|
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
69
69
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
70
70
|
'*uploadTrigger': Set<string>;
|
|
@@ -12,7 +12,7 @@ export class DropArea extends UploaderBlock {
|
|
|
12
12
|
'*commonProgress': number;
|
|
13
13
|
'*uploadList': never[];
|
|
14
14
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
15
|
-
'*collectionErrors': import("../../index.js").OutputErrorCollection[];
|
|
15
|
+
'*collectionErrors': ReturnType<() => import("../../index.js").OutputErrorCollection>[];
|
|
16
16
|
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
17
17
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
18
18
|
'*uploadTrigger': Set<string>;
|
|
@@ -22,7 +22,7 @@ export class ExternalSource extends UploaderBlock {
|
|
|
22
22
|
'*commonProgress': number;
|
|
23
23
|
'*uploadList': never[];
|
|
24
24
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
25
|
-
'*collectionErrors': import("../../index.js").OutputErrorCollection[];
|
|
25
|
+
'*collectionErrors': ReturnType<() => import("../../index.js").OutputErrorCollection>[];
|
|
26
26
|
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
27
27
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
28
28
|
'*uploadTrigger': Set<string>;
|
|
@@ -24,7 +24,7 @@ export class FileItem extends FileItemConfig {
|
|
|
24
24
|
'*commonProgress': number;
|
|
25
25
|
'*uploadList': never[];
|
|
26
26
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
27
|
-
'*collectionErrors': import("../../index.js").OutputErrorCollection[];
|
|
27
|
+
'*collectionErrors': ReturnType<() => import("../../index.js").OutputErrorCollection>[];
|
|
28
28
|
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
29
29
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
30
30
|
'*uploadTrigger': Set<string>;
|
|
@@ -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,
|
|
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"}
|
package/blocks/Img/ImgBase.js
CHANGED
|
@@ -87,11 +87,9 @@ export class ImgBase extends ImgConfig {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
// Localhost + relative image path (DO NOTHING):
|
|
90
|
-
|
|
91
|
-
|
|
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
|
|
|
@@ -6,7 +6,7 @@ export class SimpleBtn extends UploaderBlock {
|
|
|
6
6
|
'*commonProgress': number;
|
|
7
7
|
'*uploadList': never[];
|
|
8
8
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
9
|
-
'*collectionErrors': import("../../index.js").OutputErrorCollection[];
|
|
9
|
+
'*collectionErrors': ReturnType<() => import("../../index.js").OutputErrorCollection>[];
|
|
10
10
|
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
11
11
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
12
12
|
'*uploadTrigger': Set<string>;
|
|
@@ -22,7 +22,7 @@ export class SourceBtn extends UploaderBlock {
|
|
|
22
22
|
'*commonProgress': number;
|
|
23
23
|
'*uploadList': never[];
|
|
24
24
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
25
|
-
'*collectionErrors': import("../../index.js").OutputErrorCollection[];
|
|
25
|
+
'*collectionErrors': ReturnType<() => import("../../index.js").OutputErrorCollection>[];
|
|
26
26
|
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
27
27
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
28
28
|
'*uploadTrigger': Set<string>;
|
package/blocks/Thumb/Thumb.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export class Thumb extends FileItemConfig {
|
|
|
15
15
|
'*commonProgress': number;
|
|
16
16
|
'*uploadList': never[];
|
|
17
17
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
18
|
-
'*collectionErrors': import("../../index.js").OutputErrorCollection[];
|
|
18
|
+
'*collectionErrors': ReturnType<() => import("../../index.js").OutputErrorCollection>[];
|
|
19
19
|
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
20
20
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
21
21
|
'*uploadTrigger': Set<string>;
|
|
@@ -25,7 +25,7 @@ export class UploadList extends UploaderBlock {
|
|
|
25
25
|
'*commonProgress': number;
|
|
26
26
|
'*uploadList': never[];
|
|
27
27
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
28
|
-
'*collectionErrors': import("../../types").OutputErrorCollection[];
|
|
28
|
+
'*collectionErrors': ReturnType<() => import("../../types").OutputErrorCollection>[];
|
|
29
29
|
'*collectionState': import("../../types").OutputCollectionState | null;
|
|
30
30
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
31
31
|
'*uploadTrigger': Set<string>;
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ export class FileUploaderInline extends SolutionBlock {
|
|
|
5
5
|
'*commonProgress': number;
|
|
6
6
|
'*uploadList': never[];
|
|
7
7
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
8
|
-
'*collectionErrors': import("./index.js").OutputErrorCollection[];
|
|
8
|
+
'*collectionErrors': ReturnType<() => import("./index.js").OutputErrorCollection>[];
|
|
9
9
|
'*collectionState': import("./index.js").OutputCollectionState | null;
|
|
10
10
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
11
11
|
'*uploadTrigger': Set<string>;
|
|
@@ -7,7 +7,7 @@ export class FileUploaderMinimal extends SolutionBlock {
|
|
|
7
7
|
'*commonProgress': number;
|
|
8
8
|
'*uploadList': never[];
|
|
9
9
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
10
|
-
'*collectionErrors': import("./index.js").OutputErrorCollection[];
|
|
10
|
+
'*collectionErrors': ReturnType<() => import("./index.js").OutputErrorCollection>[];
|
|
11
11
|
'*collectionState': import("./index.js").OutputCollectionState | null;
|
|
12
12
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
13
13
|
'*uploadTrigger': Set<string>;
|
|
@@ -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 */
|
|
@@ -4,7 +4,7 @@ export class FileUploaderRegular extends SolutionBlock {
|
|
|
4
4
|
'*commonProgress': number;
|
|
5
5
|
'*uploadList': never[];
|
|
6
6
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
7
|
-
'*collectionErrors': import("./index.js").OutputErrorCollection[];
|
|
7
|
+
'*collectionErrors': ReturnType<() => import("./index.js").OutputErrorCollection>[];
|
|
8
8
|
'*collectionState': import("./index.js").OutputCollectionState | null;
|
|
9
9
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
10
10
|
'*uploadTrigger': Set<string>;
|
package/types/exported.d.ts
CHANGED
|
@@ -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
|
-
|
|
|
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 =
|
|
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,7 +372,7 @@ export type OutputErrorTypePayload = {
|
|
|
366
372
|
CUSTOM_ERROR: Record<string, unknown>;
|
|
367
373
|
};
|
|
368
374
|
|
|
369
|
-
export type OutputError<T extends OutputFileErrorType | OutputCollectionErrorType> = T extends
|
|
375
|
+
export type OutputError<T extends OutputFileErrorType | OutputCollectionErrorType> = T extends OutputCustomErrorType
|
|
370
376
|
? {
|
|
371
377
|
type: T;
|
|
372
378
|
message: string;
|