@uploadcare/file-uploader 1.13.0-alpha.2 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/abstract/UploaderPublicApi.d.ts.map +1 -1
- package/abstract/UploaderPublicApi.js +4 -11
- package/blocks/CameraSource/CameraSource.d.ts +12 -22
- package/blocks/CameraSource/CameraSource.d.ts.map +1 -1
- package/blocks/CameraSource/CameraSource.js +81 -83
- package/blocks/CameraSource/camera-source.css +1 -0
- package/blocks/CameraSource/constants.d.ts +15 -0
- package/blocks/CameraSource/constants.d.ts.map +1 -0
- package/blocks/CameraSource/constants.js +17 -0
- package/blocks/CloudImageEditor/src/lib/parseTabs.js +2 -2
- package/blocks/Config/Config.d.ts +3 -3
- package/blocks/Config/Config.d.ts.map +1 -1
- package/blocks/Config/Config.js +13 -3
- package/blocks/Config/assertions.d.ts +5 -0
- package/blocks/Config/assertions.d.ts.map +1 -0
- package/blocks/Config/assertions.js +37 -0
- package/blocks/Config/initialConfig.d.ts.map +1 -1
- package/blocks/Config/initialConfig.js +4 -3
- package/blocks/Config/normalizeConfigValue.d.ts.map +1 -1
- package/blocks/Config/normalizeConfigValue.js +20 -7
- package/blocks/Config/side-effects.d.ts +7 -0
- package/blocks/Config/side-effects.d.ts.map +1 -0
- package/blocks/Config/side-effects.js +32 -0
- package/blocks/utils/comma-separated.d.ts +1 -1
- package/blocks/utils/comma-separated.d.ts.map +1 -1
- package/blocks/utils/comma-separated.js +5 -2
- package/env.d.ts +1 -1
- package/env.js +1 -1
- package/index.ssr.d.ts +1 -15
- package/index.ssr.d.ts.map +1 -1
- package/index.ssr.js +6 -15
- package/package.json +3 -5
- package/types/exported.d.ts +81 -64
- package/web/file-uploader.iife.min.js +4 -4
- package/web/file-uploader.min.js +4 -4
- package/web/uc-basic.min.css +1 -1
- package/web/uc-cloud-image-editor.min.js +4 -4
- package/web/uc-file-uploader-inline.min.css +1 -1
- package/web/uc-file-uploader-inline.min.js +4 -4
- package/web/uc-file-uploader-minimal.min.js +3 -3
- package/web/uc-file-uploader-regular.min.css +1 -1
- package/web/uc-file-uploader-regular.min.js +4 -4
- package/web/uc-img.min.js +1 -1
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* 'iconHrefResolver',
|
|
10
10
|
* 'fileValidators',
|
|
11
11
|
* 'collectionValidators',
|
|
12
|
-
* '
|
|
12
|
+
* 'mediaRecorderOptions',
|
|
13
13
|
* ]}
|
|
14
14
|
*/
|
|
15
15
|
export const complexConfigKeys: [
|
|
@@ -20,7 +20,7 @@ export const complexConfigKeys: [
|
|
|
20
20
|
'iconHrefResolver',
|
|
21
21
|
'fileValidators',
|
|
22
22
|
'collectionValidators',
|
|
23
|
-
'
|
|
23
|
+
'mediaRecorderOptions'
|
|
24
24
|
];
|
|
25
25
|
export type Config = import('../../utils/mixinClass.js').MixinClass<typeof ConfigClass, import('../../types').ConfigType>;
|
|
26
26
|
/** @typedef {import('../../utils/mixinClass.js').MixinClass<typeof ConfigClass, import('../../types').ConfigType>} Config */
|
|
@@ -64,6 +64,6 @@ declare class ConfigClass extends Block {
|
|
|
64
64
|
}
|
|
65
65
|
import { Block } from '../../abstract/Block.js';
|
|
66
66
|
/** Mapping of attribute names to state */
|
|
67
|
-
declare const attrStateMapping: Record<"
|
|
67
|
+
declare const attrStateMapping: Record<"accept" | "pubkey" | "multiple" | "store" | "debug" | "crop-preset" | "secure-expire" | "max-local-file-size-bytes" | "multiple-min" | "multiple-max" | "confirm-upload" | "img-only" | "external-sources-preferred-types" | "external-sources-embed-css" | "camera-mirror" | "camera-capture" | "source-list" | "thumb-size" | "show-empty-list" | "use-local-image-editor" | "use-cloud-image-editor" | "cloud-image-editor-tabs" | "remove-copyright" | "image-shrink" | "modal-scroll-lock" | "modal-backdrop-strokes" | "source-list-wrap" | "remote-tab-session-key" | "cdn-cname" | "base-url" | "social-base-url" | "secure-signature" | "secure-delivery-proxy" | "retry-throttled-request-max-times" | "multipart-min-file-size" | "multipart-chunk-size" | "max-concurrent-requests" | "multipart-max-concurrent-requests" | "multipart-max-attempts" | "check-for-url-duplicates" | "save-url-for-recurrent-uploads" | "group-output" | "user-agent-integration" | "locale-name" | "secure-uploads-expire-threshold" | "camera-modes" | "default-camera-mode" | "enable-audio-recording" | "enable-video-recording" | "max-video-recording-duration" | "secureexpire" | "croppreset" | "maxlocalfilesizebytes" | "multiplemin" | "multiplemax" | "confirmupload" | "imgonly" | "externalsourcespreferredtypes" | "externalsourcesembedcss" | "cameramirror" | "cameracapture" | "sourcelist" | "thumbsize" | "showemptylist" | "uselocalimageeditor" | "usecloudimageeditor" | "cloudimageeditortabs" | "removecopyright" | "imageshrink" | "modalscrolllock" | "modalbackdropstrokes" | "sourcelistwrap" | "remotetabsessionkey" | "cdncname" | "baseurl" | "socialbaseurl" | "securesignature" | "securedeliveryproxy" | "retrythrottledrequestmaxtimes" | "multipartminfilesize" | "multipartchunksize" | "maxconcurrentrequests" | "multipartmaxconcurrentrequests" | "multipartmaxattempts" | "checkforurlduplicates" | "saveurlforrecurrentuploads" | "groupoutput" | "useragentintegration" | "localename" | "secureuploadsexpirethreshold" | "cameramodes" | "defaultcameramode" | "enableaudiorecording" | "enablevideorecording" | "maxvideorecordingduration", string>;
|
|
68
68
|
export {};
|
|
69
69
|
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["Config.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["Config.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;GAaG;AACH,gCAXU;IACT,UAAc;IACd,0BAA8B;IAC9B,gCAAoC;IACpC,gCAAoC;IACpC,kBAAsB;IACtB,gBAAoB;IACpB,sBAA0B;IAC1B,sBAA0B;CACvB,CAWF;qBAyNY,OAAO,2BAA2B,EAAE,UAAU,CAAC,kBAAkB,EAAE,OAAO,aAAa,EAAE,UAAU,CAAC;AAAlH,6HAA6H;AAG7H,4BAAmF;AA/LnF;IAkBE;;;;OAIG;IACH,+BAYC;IAED;;;;OAIG;IACH,2BAQC;IAED;;;;OAIG;IACH,kBAyBC;IAED;;;OAGG;IACH,kBAIC;IAED;;;;OAIG;IACH,wCAJW,MAAM,iBACN,OAAO,aACP,OAAO,QAoBjB;IA0CD;;;;OAIG;IACH,+BAJW,MAAM,uBAAuB,UAC7B,MAAM,UACN,MAAM,QAahB;CACF;sBAjPqB,yBAAyB;AAwD/C,0CAA0C;AAC1C,smEAGG"}
|
package/blocks/Config/Config.js
CHANGED
|
@@ -4,6 +4,8 @@ import { initialConfig } from './initialConfig.js';
|
|
|
4
4
|
import { sharedConfigKey } from '../../abstract/sharedConfigKey.js';
|
|
5
5
|
import { toKebabCase } from '../../utils/toKebabCase.js';
|
|
6
6
|
import { normalizeConfigValue } from './normalizeConfigValue.js';
|
|
7
|
+
import { runAssertions } from './assertions.js';
|
|
8
|
+
import { runSideEffects } from './side-effects.js';
|
|
7
9
|
|
|
8
10
|
const allConfigKeys = /** @type {(keyof import('../../types').ConfigType)[]} */ ([
|
|
9
11
|
// "debug" option should go first to be able to print debug messages from the very beginning
|
|
@@ -21,7 +23,7 @@ const allConfigKeys = /** @type {(keyof import('../../types').ConfigType)[]} */
|
|
|
21
23
|
* 'iconHrefResolver',
|
|
22
24
|
* 'fileValidators',
|
|
23
25
|
* 'collectionValidators',
|
|
24
|
-
* '
|
|
26
|
+
* 'mediaRecorderOptions',
|
|
25
27
|
* ]}
|
|
26
28
|
*/
|
|
27
29
|
export const complexConfigKeys = [
|
|
@@ -32,7 +34,7 @@ export const complexConfigKeys = [
|
|
|
32
34
|
'iconHrefResolver',
|
|
33
35
|
'fileValidators',
|
|
34
36
|
'collectionValidators',
|
|
35
|
-
'
|
|
37
|
+
'mediaRecorderOptions',
|
|
36
38
|
];
|
|
37
39
|
|
|
38
40
|
/** @type {(key: keyof import('../../types').ConfigType) => key is keyof import('../../types').ConfigComplexType} */
|
|
@@ -136,6 +138,14 @@ class ConfigClass extends Block {
|
|
|
136
138
|
this._flushValueToState(key, normalizedValue);
|
|
137
139
|
|
|
138
140
|
this.debugPrint(`[uc-config] "${key}"`, normalizedValue);
|
|
141
|
+
|
|
142
|
+
runAssertions(this.cfg);
|
|
143
|
+
runSideEffects({
|
|
144
|
+
key,
|
|
145
|
+
value: normalizedValue ?? null,
|
|
146
|
+
setValue: this._setValue.bind(this),
|
|
147
|
+
getValue: this._getValue.bind(this),
|
|
148
|
+
});
|
|
139
149
|
}
|
|
140
150
|
|
|
141
151
|
/**
|
|
@@ -145,7 +155,7 @@ class ConfigClass extends Block {
|
|
|
145
155
|
_getValue(key) {
|
|
146
156
|
const anyThis = /** @type {typeof this & any} */ (this);
|
|
147
157
|
const localPropName = getLocalPropName(key);
|
|
148
|
-
return anyThis[localPropName];
|
|
158
|
+
return anyThis[localPropName] ?? this.$[sharedConfigKey(key)];
|
|
149
159
|
}
|
|
150
160
|
|
|
151
161
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assertions.d.ts","sourceRoot":"","sources":["assertions.js"],"names":[],"mappings":"AAyBA,oEAAoE;AACpE,mCACc,OAAO,aAAa,EAAE,UAAU;;EAS5C"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { warnOnce } from '../../utils/warnOnce.js';
|
|
2
|
+
import { debounce } from '../utils/debounce.js';
|
|
3
|
+
|
|
4
|
+
const ASSERTIONS = [
|
|
5
|
+
{
|
|
6
|
+
test: (cfg) => cfg.accept && !!cfg.imgOnly,
|
|
7
|
+
message:
|
|
8
|
+
'There could be a mistake.\n' +
|
|
9
|
+
'Both `accept` and `imgOnly` parameters are set.\n' +
|
|
10
|
+
'The value of `accept` will be concatenated with the internal image mime types list.',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
test: (cfg) => cfg.enableVideoRecording !== null,
|
|
14
|
+
message:
|
|
15
|
+
'The `enableVideoRecording` parameter is deprecated and will be removed in the next major release.\n' +
|
|
16
|
+
'Please use the `cameraModes` parameter instead.',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
test: (cfg) => cfg.defaultCameraMode !== null,
|
|
20
|
+
message:
|
|
21
|
+
'The `defaultCameraMode` parameter is deprecated and will be removed in the next major release.\n' +
|
|
22
|
+
'Please use the `cameraModes` parameter instead.',
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
/** Runs on every config change and warns about potential issues. */
|
|
27
|
+
export const runAssertions = debounce(
|
|
28
|
+
/** @param {import('../../types').ConfigType} cfg */
|
|
29
|
+
(cfg) => {
|
|
30
|
+
for (const { test, message } of ASSERTIONS) {
|
|
31
|
+
if (test(cfg)) {
|
|
32
|
+
warnOnce(message);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
0,
|
|
37
|
+
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initialConfig.d.ts","sourceRoot":"","sources":["initialConfig.js"],"names":[],"mappings":"AAKA,uDAAwD;AACxD,+DAAgE;AAChE,sEAAuE;AAEvE,wDAAwD;AACxD,4BADW,OAAO,sBAAsB,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"initialConfig.d.ts","sourceRoot":"","sources":["initialConfig.js"],"names":[],"mappings":"AAKA,uDAAwD;AACxD,+DAAgE;AAChE,sEAAuE;AAEvE,wDAAwD;AACxD,4BADW,OAAO,sBAAsB,EAAE,UAAU,CAmElD"}
|
|
@@ -68,9 +68,10 @@ export const initialConfig = {
|
|
|
68
68
|
fileValidators: [],
|
|
69
69
|
collectionValidators: [],
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
cameraModes: 'photo, video',
|
|
72
|
+
defaultCameraMode: null,
|
|
72
73
|
enableAudioRecording: true,
|
|
73
|
-
enableVideoRecording:
|
|
74
|
+
enableVideoRecording: null,
|
|
74
75
|
maxVideoRecordingDuration: null,
|
|
75
|
-
|
|
76
|
+
mediaRecorderOptions: null,
|
|
76
77
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeConfigValue.d.ts","sourceRoot":"","sources":["normalizeConfigValue.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"normalizeConfigValue.d.ts","sourceRoot":"","sources":["normalizeConfigValue.js"],"names":[],"mappings":"AAiBO,iCADK,OAAO,WAWlB;AAwKM,sGAHI,OAAO,mDAcjB"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
|
|
3
|
+
import { CameraSourceTypes } from '../CameraSource/constants.js';
|
|
4
|
+
import { deserializeCsv } from '../utils/comma-separated.js';
|
|
3
5
|
import { initialConfig } from './initialConfig.js';
|
|
4
6
|
|
|
5
7
|
/** @param {unknown} value */
|
|
@@ -31,18 +33,28 @@ const asStore = (value) => (value === 'auto' ? value : asBoolean(value));
|
|
|
31
33
|
const asCameraCapture = (value) => {
|
|
32
34
|
const strValue = asString(value);
|
|
33
35
|
if (strValue !== 'user' && strValue !== 'environment' && strValue !== '') {
|
|
34
|
-
throw new Error(`Invalid
|
|
36
|
+
throw new Error(`Invalid value: "${strValue}"`);
|
|
35
37
|
}
|
|
36
38
|
return strValue;
|
|
37
39
|
};
|
|
38
40
|
|
|
39
41
|
/** @param {unknown} value */
|
|
40
|
-
const
|
|
42
|
+
const asCameraMode = (value) => {
|
|
41
43
|
const strValue = asString(value);
|
|
42
|
-
if (strValue
|
|
43
|
-
throw new Error(`Invalid
|
|
44
|
+
if (!Object.values(CameraSourceTypes).includes(strValue)) {
|
|
45
|
+
throw new Error(`Invalid value: "${strValue}"`);
|
|
44
46
|
}
|
|
45
|
-
return strValue;
|
|
47
|
+
return /** @type {import('../CameraSource/CameraSource.js').CameraMode} */ (strValue);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/** @param {unknown} value */
|
|
51
|
+
const asCameraModes = (value) => {
|
|
52
|
+
const str = asString(value);
|
|
53
|
+
const array = deserializeCsv(str);
|
|
54
|
+
if (array.some((item) => !Object.values(CameraSourceTypes).includes(item))) {
|
|
55
|
+
throw new Error(`Invalid value: "${JSON.stringify(array)}"`);
|
|
56
|
+
}
|
|
57
|
+
return str;
|
|
46
58
|
};
|
|
47
59
|
|
|
48
60
|
/** @param {unknown} value */
|
|
@@ -166,10 +178,11 @@ const mapping = {
|
|
|
166
178
|
fileValidators: /** @type {typeof asArray<import('../../types').FileValidators>} */ (asArray),
|
|
167
179
|
collectionValidators: /** @type {typeof asArray<import('../../types').CollectionValidators>} */ (asArray),
|
|
168
180
|
|
|
169
|
-
|
|
181
|
+
cameraModes: asCameraModes,
|
|
182
|
+
defaultCameraMode: asCameraMode,
|
|
170
183
|
enableAudioRecording: asBoolean,
|
|
171
184
|
enableVideoRecording: asBoolean,
|
|
172
|
-
|
|
185
|
+
mediaRecorderOptions: asObject,
|
|
173
186
|
|
|
174
187
|
maxVideoRecordingDuration: asNumber,
|
|
175
188
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export function runSideEffects<T extends keyof import("../../types").ConfigType>({ key, value, setValue, getValue }: {
|
|
2
|
+
key: T;
|
|
3
|
+
value: import("../../types").ConfigType[T];
|
|
4
|
+
setValue: (key: T, value: import("../../types").ConfigType[T]) => void;
|
|
5
|
+
getValue: (key: T) => import("../../types").ConfigType[T];
|
|
6
|
+
}): void;
|
|
7
|
+
//# sourceMappingURL=side-effects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"side-effects.d.ts","sourceRoot":"","sources":["side-effects.js"],"names":[],"mappings":"AAWO;;;sEAJgE,IAAI;;SAwB1E"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { deserializeCsv, serializeCsv } from '../utils/comma-separated.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @template {keyof import('../../types').ConfigType} T
|
|
5
|
+
* @param {{
|
|
6
|
+
* key: T;
|
|
7
|
+
* value: import('../../types').ConfigType[T];
|
|
8
|
+
* setValue: (key: T, value: import('../../types').ConfigType[T]) => void;
|
|
9
|
+
* getValue: (key: T) => import('../../types').ConfigType[T];
|
|
10
|
+
* }} options
|
|
11
|
+
*/
|
|
12
|
+
export const runSideEffects = ({ key, value, setValue, getValue }) => {
|
|
13
|
+
if (key === 'enableVideoRecording' && value !== null) {
|
|
14
|
+
let cameraModes = deserializeCsv(getValue('cameraModes'));
|
|
15
|
+
if (value && !cameraModes.includes('video')) {
|
|
16
|
+
cameraModes = cameraModes.concat('video');
|
|
17
|
+
} else if (!value) {
|
|
18
|
+
cameraModes = cameraModes.filter((mode) => mode !== 'video');
|
|
19
|
+
}
|
|
20
|
+
setValue('cameraModes', serializeCsv(cameraModes));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (key === 'defaultCameraMode' && value !== null) {
|
|
24
|
+
let cameraModes = deserializeCsv(getValue('cameraModes'));
|
|
25
|
+
cameraModes = cameraModes.sort((a, b) => {
|
|
26
|
+
if (a === value) return -1;
|
|
27
|
+
if (b === value) return 1;
|
|
28
|
+
return 0;
|
|
29
|
+
});
|
|
30
|
+
setValue('cameraModes', serializeCsv(cameraModes));
|
|
31
|
+
}
|
|
32
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comma-separated.d.ts","sourceRoot":"","sources":["comma-separated.js"],"names":[],"mappings":"AAGO,sCADK,MAAM,
|
|
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
|
|
4
|
+
export const deserializeCsv = (value) => {
|
|
5
5
|
if (!value) {
|
|
6
6
|
return [];
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
return value
|
|
9
|
+
return value
|
|
10
|
+
.split(',')
|
|
11
|
+
.map((item) => item.trim())
|
|
12
|
+
.filter(Boolean);
|
|
10
13
|
};
|
|
11
14
|
|
|
12
15
|
/** @param {unknown[]} value */
|
package/env.d.ts
CHANGED
package/env.js
CHANGED
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;
|
|
@@ -544,7 +530,7 @@ export const Modal: {
|
|
|
544
530
|
bindAttributes: () => void;
|
|
545
531
|
};
|
|
546
532
|
export const PACKAGE_NAME: "blocks";
|
|
547
|
-
export const PACKAGE_VERSION: "1.
|
|
533
|
+
export const PACKAGE_VERSION: "1.13.0";
|
|
548
534
|
export const PresenceToggle: {
|
|
549
535
|
new (): {};
|
|
550
536
|
template: string;
|
package/index.ssr.d.ts.map
CHANGED
|
@@ -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
|
|
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
|
|
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:
|
|
149
|
-
<uc-icon set="@name:
|
|
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",
|
|
@@ -1035,7 +1026,7 @@ export const Modal = class {
|
|
|
1035
1026
|
static bindAttributes = () => {};
|
|
1036
1027
|
};
|
|
1037
1028
|
export const PACKAGE_NAME = `blocks`;
|
|
1038
|
-
export const PACKAGE_VERSION = `1.
|
|
1029
|
+
export const PACKAGE_VERSION = `1.13.0`;
|
|
1039
1030
|
export const PresenceToggle = class {
|
|
1040
1031
|
static template = `<slot></slot> `;
|
|
1041
1032
|
static reg = () => {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uploadcare/file-uploader",
|
|
3
|
-
"version": "1.13.0
|
|
3
|
+
"version": "1.13.0",
|
|
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
|
".": {
|
|
@@ -118,7 +116,7 @@
|
|
|
118
116
|
"marked": "^4.3.0",
|
|
119
117
|
"node-watch": "^0.7.3",
|
|
120
118
|
"npm-run-all": "^4.1.5",
|
|
121
|
-
"playwright": "^1.
|
|
119
|
+
"playwright": "^1.49.1",
|
|
122
120
|
"postcss": "^8.4.21",
|
|
123
121
|
"prettier": "^3.2.4",
|
|
124
122
|
"prettier-plugin-jsdoc": "1.3.0",
|