@uploadcare/file-uploader 1.13.3-alpha.0 → 1.14.0-alpha.11
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/ActivityBlock.d.ts +5 -5
- package/abstract/ActivityBlock.d.ts.map +1 -1
- package/abstract/ActivityBlock.js +10 -15
- package/abstract/Block.d.ts +9 -9
- package/abstract/Block.d.ts.map +1 -1
- package/abstract/Block.js +15 -0
- package/abstract/CTX.d.ts +6 -6
- package/abstract/CTX.d.ts.map +1 -1
- package/abstract/CTX.js +3 -1
- package/abstract/LocaleManager.d.ts +3 -3
- package/abstract/LocaleManager.d.ts.map +1 -1
- package/abstract/ModalManager.d.ts +124 -0
- package/abstract/ModalManager.d.ts.map +1 -0
- package/abstract/ModalManager.js +227 -0
- package/abstract/SecureUploadsManager.d.ts +2 -2
- package/abstract/SecureUploadsManager.d.ts.map +1 -1
- package/abstract/SolutionBlock.d.ts +2 -2
- package/abstract/SolutionBlock.d.ts.map +1 -1
- package/abstract/TypedCollection.d.ts.map +1 -1
- package/abstract/TypedData.d.ts +1 -1
- package/abstract/TypedData.d.ts.map +1 -1
- package/abstract/UploaderBlock.d.ts +8 -6
- package/abstract/UploaderBlock.d.ts.map +1 -1
- package/abstract/UploaderBlock.js +24 -8
- package/abstract/UploaderPublicApi.d.ts +24 -23
- package/abstract/UploaderPublicApi.d.ts.map +1 -1
- package/abstract/UploaderPublicApi.js +39 -9
- package/abstract/ValidationManager.d.ts +4 -4
- package/abstract/ValidationManager.d.ts.map +1 -1
- package/abstract/a11y.d.ts +2 -2
- package/abstract/a11y.d.ts.map +1 -1
- package/abstract/buildOutputCollectionState.d.ts +1 -1
- package/abstract/buildOutputCollectionState.d.ts.map +1 -1
- package/abstract/defineComponents.d.ts.map +1 -1
- package/abstract/l10nProcessor.d.ts.map +1 -1
- package/abstract/loadFileUploaderFrom.d.ts +1 -1
- package/abstract/loadFileUploaderFrom.d.ts.map +1 -1
- package/abstract/localeRegistry.d.ts.map +1 -1
- package/abstract/sharedConfigKey.d.ts.map +1 -1
- package/abstract/uploadEntrySchema.d.ts +2 -2
- package/abstract/uploadEntrySchema.d.ts.map +1 -1
- package/blocks/CameraSource/CameraSource.d.ts +9 -9
- package/blocks/CameraSource/CameraSource.d.ts.map +1 -1
- package/blocks/CameraSource/CameraSource.js +1 -0
- package/blocks/CameraSource/calcCameraModes.d.ts +1 -1
- package/blocks/CameraSource/constants.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/CloudImageEditorBlock.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/CropFrame.d.ts +1 -1
- package/blocks/CloudImageEditor/src/EditorImageCropper.d.ts +3 -3
- package/blocks/CloudImageEditor/src/EditorImageFader.d.ts +1 -1
- package/blocks/CloudImageEditor/src/EditorImageFader.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorSlider.d.ts +1 -1
- package/blocks/CloudImageEditor/src/EditorSlider.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorToolbar.d.ts +1 -1
- package/blocks/CloudImageEditor/src/crop-utils.d.ts +14 -14
- package/blocks/CloudImageEditor/src/crop-utils.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/cropper-constants.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.d.ts +1 -1
- package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/lib/parseCropPreset.d.ts +1 -1
- package/blocks/CloudImageEditor/src/lib/transformationUtils.d.ts +3 -3
- package/blocks/CloudImageEditor/src/lib/transformationUtils.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/state.d.ts +4 -4
- package/blocks/CloudImageEditor/src/svg-sprite.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/types.d.ts +8 -58
- package/blocks/CloudImageEditor/src/types.d.ts.map +1 -1
- package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts +1 -1
- package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts.map +1 -1
- package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.js +2 -0
- package/blocks/Config/Config.d.ts +3 -12
- package/blocks/Config/Config.d.ts.map +1 -1
- package/blocks/Config/assertions.d.ts +1 -1
- package/blocks/Config/initialConfig.d.ts +1 -1
- package/blocks/Config/initialConfig.d.ts.map +1 -1
- package/blocks/Config/initialConfig.js +4 -0
- package/blocks/Config/normalizeConfigValue.d.ts +2 -1
- package/blocks/Config/normalizeConfigValue.d.ts.map +1 -1
- package/blocks/Config/normalizeConfigValue.js +19 -106
- package/blocks/Config/side-effects.d.ts.map +1 -1
- package/blocks/Config/validatorsType.d.ts +37 -0
- package/blocks/Config/validatorsType.d.ts.map +1 -0
- package/blocks/Config/validatorsType.js +134 -0
- package/blocks/DropArea/DropArea.d.ts +3 -2
- package/blocks/DropArea/DropArea.d.ts.map +1 -1
- package/blocks/DropArea/DropArea.js +21 -2
- package/blocks/DropArea/addDropzone.d.ts.map +1 -1
- package/blocks/DropArea/getDropItems.d.ts +2 -2
- package/blocks/DropArea/getDropItems.d.ts.map +1 -1
- package/blocks/ExternalSource/ExternalSource.d.ts +3 -3
- package/blocks/ExternalSource/ExternalSource.d.ts.map +1 -1
- package/blocks/ExternalSource/ExternalSource.js +2 -1
- package/blocks/ExternalSource/MessageBridge.d.ts +3 -3
- package/blocks/ExternalSource/MessageBridge.d.ts.map +1 -1
- package/blocks/ExternalSource/query-string.d.ts.map +1 -1
- package/blocks/ExternalSource/types.d.ts +64 -64
- package/blocks/ExternalSource/types.d.ts.map +1 -1
- package/blocks/FileItem/FileItem.d.ts +5 -6
- package/blocks/FileItem/FileItem.d.ts.map +1 -1
- package/blocks/FileItem/FileItem.js +40 -42
- package/blocks/FileItem/file-item.css +90 -0
- package/blocks/Img/ImgBase.d.ts +3 -3
- package/blocks/Img/ImgBase.d.ts.map +1 -1
- package/blocks/Img/ImgConfig.d.ts.map +1 -1
- package/blocks/Img/configurations.d.ts.map +1 -1
- package/blocks/Modal/Modal.d.ts +21 -2
- package/blocks/Modal/Modal.d.ts.map +1 -1
- package/blocks/Modal/Modal.js +52 -24
- package/blocks/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/blocks/ProgressBar/ProgressBar.js +1 -0
- package/blocks/ProgressBar/progress-bar.css +1 -0
- package/blocks/Range/Range.d.ts.map +1 -1
- package/blocks/SimpleBtn/SimpleBtn.d.ts +2 -2
- package/blocks/SimpleBtn/SimpleBtn.d.ts.map +1 -1
- package/blocks/SimpleBtn/SimpleBtn.js +1 -1
- package/blocks/SourceBtn/SourceBtn.d.ts +3 -3
- package/blocks/SourceBtn/SourceBtn.d.ts.map +1 -1
- package/blocks/SourceBtn/SourceBtn.js +29 -15
- package/blocks/SourceList/SourceList.d.ts.map +1 -1
- package/blocks/SourceList/SourceList.js +17 -11
- package/blocks/Spinner/Spinner.d.ts.map +1 -1
- package/blocks/StartFrom/StartFrom.js +1 -1
- package/blocks/Thumb/Thumb.d.ts +48 -0
- package/blocks/Thumb/Thumb.d.ts.map +1 -0
- package/blocks/Thumb/Thumb.js +169 -0
- package/blocks/Thumb/thumb.css +4 -0
- package/blocks/UploadCtxProvider/EventEmitter.d.ts +20 -20
- package/blocks/UploadCtxProvider/EventEmitter.d.ts.map +1 -1
- package/blocks/UploadCtxProvider/UploadCtxProvider.d.ts +4 -4
- package/blocks/UploadCtxProvider/UploadCtxProvider.d.ts.map +1 -1
- package/blocks/UploadList/UploadList.d.ts +4 -2
- package/blocks/UploadList/UploadList.d.ts.map +1 -1
- package/blocks/UploadList/UploadList.js +16 -1
- package/blocks/UploadList/upload-list.css +23 -0
- package/blocks/UrlSource/UrlSource.d.ts.map +1 -1
- package/blocks/UrlSource/UrlSource.js +1 -0
- package/blocks/svg-backgrounds/svg-backgrounds.d.ts +3 -3
- package/blocks/svg-backgrounds/svg-backgrounds.d.ts.map +1 -1
- package/blocks/themes/uc-basic/common.css +1 -1
- package/blocks/themes/uc-basic/index.css +1 -0
- package/blocks/themes/uc-basic/svg-sprite.d.ts +1 -1
- package/blocks/themes/uc-basic/svg-sprite.d.ts.map +1 -1
- package/blocks/themes/uc-basic/svg-sprite.js +1 -1
- package/blocks/themes/uc-basic/theme.css +12 -0
- package/blocks/utils/UploadSource.d.ts +6 -1
- package/blocks/utils/UploadSource.d.ts.map +1 -1
- package/blocks/utils/UploadSource.js +7 -1
- package/blocks/utils/debounce.d.ts +3 -1
- package/blocks/utils/debounce.d.ts.map +1 -1
- package/blocks/utils/resizeImage.d.ts +1 -1
- package/blocks/utils/resizeImage.d.ts.map +1 -1
- package/blocks/utils/supportCapture.d.ts +2 -0
- package/blocks/utils/supportCapture.d.ts.map +1 -0
- package/blocks/utils/supportCapture.js +3 -0
- package/blocks/utils/throttle.d.ts +3 -1
- package/blocks/utils/throttle.d.ts.map +1 -1
- package/blocks/utils/userAgent.d.ts +1 -1
- package/blocks/utils/userAgent.d.ts.map +1 -1
- package/env.d.ts +1 -1
- package/env.d.ts.map +1 -1
- package/env.js +1 -1
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/index.ssr.d.ts +88 -15
- package/index.ssr.d.ts.map +1 -1
- package/index.ssr.js +119 -24
- package/locales/file-uploader/ar.d.ts +2 -0
- package/locales/file-uploader/ar.js +2 -0
- package/locales/file-uploader/az.d.ts +2 -0
- package/locales/file-uploader/az.js +2 -0
- package/locales/file-uploader/ca.d.ts +2 -0
- package/locales/file-uploader/ca.js +2 -0
- package/locales/file-uploader/cs.d.ts +2 -0
- package/locales/file-uploader/cs.js +2 -0
- package/locales/file-uploader/da.d.ts +2 -0
- package/locales/file-uploader/da.js +2 -0
- package/locales/file-uploader/de.d.ts +2 -0
- package/locales/file-uploader/de.js +2 -0
- package/locales/file-uploader/el.d.ts +2 -0
- package/locales/file-uploader/el.js +2 -0
- package/locales/file-uploader/en.d.ts +2 -1
- package/locales/file-uploader/en.js +2 -1
- package/locales/file-uploader/es.d.ts +2 -0
- package/locales/file-uploader/es.js +2 -0
- package/locales/file-uploader/et.d.ts +2 -0
- package/locales/file-uploader/et.js +2 -0
- package/locales/file-uploader/fi.d.ts +2 -0
- package/locales/file-uploader/fi.js +2 -0
- package/locales/file-uploader/fr.d.ts +2 -0
- package/locales/file-uploader/fr.js +2 -0
- package/locales/file-uploader/he.d.ts +2 -0
- package/locales/file-uploader/he.js +2 -0
- package/locales/file-uploader/hy.d.ts +2 -0
- package/locales/file-uploader/hy.js +2 -0
- package/locales/file-uploader/is.d.ts +2 -0
- package/locales/file-uploader/is.js +2 -0
- package/locales/file-uploader/it.d.ts +2 -0
- package/locales/file-uploader/it.js +2 -0
- package/locales/file-uploader/ja.d.ts +2 -0
- package/locales/file-uploader/ja.js +2 -0
- package/locales/file-uploader/ka.d.ts +2 -0
- package/locales/file-uploader/ka.js +2 -0
- package/locales/file-uploader/kk.d.ts +2 -0
- package/locales/file-uploader/kk.js +2 -0
- package/locales/file-uploader/ko.d.ts +2 -0
- package/locales/file-uploader/ko.js +2 -0
- package/locales/file-uploader/lv.d.ts +2 -0
- package/locales/file-uploader/lv.js +2 -0
- package/locales/file-uploader/nb.d.ts +2 -0
- package/locales/file-uploader/nb.js +2 -0
- package/locales/file-uploader/nl.d.ts +2 -0
- package/locales/file-uploader/nl.js +2 -0
- package/locales/file-uploader/pl.d.ts +2 -0
- package/locales/file-uploader/pl.js +2 -0
- package/locales/file-uploader/pt.d.ts +2 -0
- package/locales/file-uploader/pt.js +2 -0
- package/locales/file-uploader/ro.d.ts +2 -0
- package/locales/file-uploader/ro.js +2 -0
- package/locales/file-uploader/ru.d.ts +2 -0
- package/locales/file-uploader/ru.js +2 -0
- package/locales/file-uploader/sk.d.ts +2 -0
- package/locales/file-uploader/sk.js +2 -0
- package/locales/file-uploader/sr.d.ts +2 -0
- package/locales/file-uploader/sr.js +2 -0
- package/locales/file-uploader/sv.d.ts +2 -0
- package/locales/file-uploader/sv.js +2 -0
- package/locales/file-uploader/tr.d.ts +2 -0
- package/locales/file-uploader/tr.js +2 -0
- package/locales/file-uploader/uk.d.ts +2 -0
- package/locales/file-uploader/uk.js +2 -0
- package/locales/file-uploader/vi.d.ts +2 -0
- package/locales/file-uploader/vi.js +2 -0
- package/locales/file-uploader/zh-TW.d.ts +2 -0
- package/locales/file-uploader/zh-TW.js +2 -0
- package/locales/file-uploader/zh.d.ts +2 -0
- package/locales/file-uploader/zh.js +2 -0
- package/package.json +4 -2
- package/solutions/file-uploader/inline/FileUploaderInline.d.ts +2 -2
- package/solutions/file-uploader/inline/FileUploaderInline.d.ts.map +1 -1
- package/solutions/file-uploader/minimal/FileUploaderMinimal.d.ts +35 -0
- package/solutions/file-uploader/minimal/FileUploaderMinimal.d.ts.map +1 -1
- package/solutions/file-uploader/minimal/FileUploaderMinimal.js +122 -9
- package/solutions/file-uploader/minimal/index.css +25 -24
- package/solutions/file-uploader/minimal/index.d.ts +1 -13
- package/solutions/file-uploader/minimal/index.js +1 -13
- package/solutions/file-uploader/regular/FileUploaderRegular.d.ts +3 -5
- package/solutions/file-uploader/regular/FileUploaderRegular.d.ts.map +1 -1
- package/solutions/file-uploader/regular/FileUploaderRegular.js +17 -16
- package/types/exported.d.ts +7 -0
- package/utils/cdn-utils.d.ts +3 -3
- package/utils/cdn-utils.d.ts.map +1 -1
- package/utils/fileTypes.d.ts +1 -1
- package/utils/fileTypes.d.ts.map +1 -1
- package/utils/getPluralForm.d.ts.map +1 -1
- package/utils/isSecureTokenExpired.d.ts +1 -1
- package/utils/memoize.d.ts.map +1 -1
- package/utils/mixinClass.d.ts +3 -1
- package/utils/mixinClass.d.ts.map +1 -1
- package/utils/prettyBytes.d.ts.map +1 -1
- package/utils/template-utils.d.ts +1 -1
- package/utils/template-utils.d.ts.map +1 -1
- package/utils/toKebabCase.d.ts.map +1 -1
- package/utils/transparentPixelSrc.d.ts.map +1 -1
- package/utils/uniqueArray.d.ts.map +1 -1
- package/utils/validators/collection/validateCollectionUploadError.d.ts +1 -1
- package/utils/validators/collection/validateMultiple.d.ts +1 -1
- package/utils/validators/file/validateFileType.d.ts +1 -1
- package/utils/validators/file/validateIsImage.d.ts +1 -1
- package/utils/validators/file/validateMaxSizeLimit.d.ts +1 -1
- package/utils/validators/file/validateUploadError.d.ts +1 -1
- package/utils/waitForAttribute.d.ts +1 -1
- package/utils/waitForAttribute.d.ts.map +1 -1
- 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.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.css +1 -1
- package/web/uc-file-uploader-minimal.min.js +4 -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 +2 -2
- package/blocks/utils/checkDevice.d.ts +0 -9
- package/blocks/utils/checkDevice.d.ts.map +0 -1
- package/blocks/utils/checkDevice.js +0 -34
|
@@ -5,9 +5,9 @@ export class EditorImageCropper extends Block {
|
|
|
5
5
|
/** @type {Operations} */
|
|
6
6
|
'*operations': Operations;
|
|
7
7
|
/** @type {import('./types.js').Rectangle} */
|
|
8
|
-
'*imageBox': import(
|
|
8
|
+
'*imageBox': import("./types.js").Rectangle;
|
|
9
9
|
/** @type {import('./types.js').Rectangle} */
|
|
10
|
-
'*cropBox': import(
|
|
10
|
+
'*cropBox': import("./types.js").Rectangle;
|
|
11
11
|
};
|
|
12
12
|
/** @private */
|
|
13
13
|
private _commitDebounced;
|
|
@@ -65,7 +65,7 @@ export class EditorImageCropper extends Block {
|
|
|
65
65
|
* @param {import('./types.js').ImageSize} imageSize
|
|
66
66
|
* @param {{ fromViewer?: boolean }} options
|
|
67
67
|
*/
|
|
68
|
-
activate(imageSize: import(
|
|
68
|
+
activate(imageSize: import("./types.js").ImageSize, { fromViewer }?: {
|
|
69
69
|
fromViewer?: boolean;
|
|
70
70
|
}): Promise<void>;
|
|
71
71
|
_isActive: boolean | undefined;
|
|
@@ -79,7 +79,7 @@ export class EditorImageFader extends Block {
|
|
|
79
79
|
_cancelLastImages: any;
|
|
80
80
|
_container: HTMLDivElement | undefined;
|
|
81
81
|
/** @param {import('./types.js').Transformations} transformations */
|
|
82
|
-
setTransformations(transformations: import(
|
|
82
|
+
setTransformations(transformations: import("./types.js").Transformations): Promise<void>;
|
|
83
83
|
_transformations: import("./types.js").Transformations | undefined;
|
|
84
84
|
/**
|
|
85
85
|
* @param {object} options
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorImageFader.d.ts","sourceRoot":"","sources":["EditorImageFader.js"],"names":[],"mappings":"AA8DA;;;;;;;GAOG;AAEH;IAII;;;OAGG;IACH,kBAAsB;IAEtB;;;OAGG;IACH,gBAAmB;IAEnB,eAAe;IACf,8BAAwE;IAK1E;;;;OAIG;IACH,4BAmBC;IAED,eAAe;IACf,eAWC;IATC,yBAQE;IAGJ;;;;;;;;OAQG;IACH,kBAUC;IAED;;;;;OAKG;IACH,2BASC;IAED;;;;;;;OAOG;IACH,gBAEC;IAED;;;;;OAKG;IACH,qBA0CC;IAED,qCAAqC;IACrC,WADY,eAAe,QAK1B;IAED;;;;OAIG;IACH,gBAgBC;IAfC,+BAA2B;IAC3B,2BAAmB;IAgBrB,eAAe;IACf,4BAKC;IAED,eAAe;IACf,mBAmCC;IAjCC,mBAAqE;IAcrE,uBAGC;IAMC,uCAA2B;IAY/B,oEAAoE;IACpE,oCADY,OAAO,YAAY,EAAE,eAAe,iBAmB/C;IAjBC,mEAAuC;IAmBzC;;;;;;OAMG;IACH;
|
|
1
|
+
{"version":3,"file":"EditorImageFader.d.ts","sourceRoot":"","sources":["EditorImageFader.js"],"names":[],"mappings":"AA8DA;;;;;;;GAOG;AAEH;IAII;;;OAGG;IACH,kBAAsB;IAEtB;;;OAGG;IACH,gBAAmB;IAEnB,eAAe;IACf,8BAAwE;IAK1E;;;;OAIG;IACH,4BAmBC;IAED,eAAe;IACf,eAWC;IATC,yBAQE;IAGJ;;;;;;;;OAQG;IACH,kBAUC;IAED;;;;;OAKG;IACH,2BASC;IAED;;;;;;;OAOG;IACH,gBAEC;IAED;;;;;OAKG;IACH,qBA0CC;IAED,qCAAqC;IACrC,WADY,eAAe,QAK1B;IAED;;;;OAIG;IACH,gBAgBC;IAfC,+BAA2B;IAC3B,2BAAmB;IAgBrB,eAAe;IACf,4BAKC;IAED,eAAe;IACf,mBAmCC;IAjCC,mBAAqE;IAcrE,uBAGC;IAMC,uCAA2B;IAY/B,oEAAoE;IACpE,oCADY,OAAO,YAAY,EAAE,eAAe,iBAmB/C;IAjBC,mEAAuC;IAmBzC;;;;;;OAMG;IACH,2CALG;QAAwB,GAAG;QACH,SAAS;QACT,KAAK;QACJ,MAAM;KAAC,iBAUlC;IADC,8CAAiC;IAGnC,eAAe;IACf,wBA4CC;IAED;;;;;;;OAOG;IACH,wDANG;QAAwB,GAAG;QACF,SAAS;QACT,KAAK;QACL,MAAM;QACL,UAAU;KAAC,iBAwBvC;IAnBC,yBAAe;IAGf,4BAAqB;IACrB,iCAA6B;IAS7B,mCAEC;IAMH,0CAA0C;IAC1C,sBADY;QAAE,IAAI,CAAC,UAAS;KAAE,QA4B7B;CACF;;;;;WApYa,gBAAgB;;;sBAlER,4BAA4B"}
|
|
@@ -5,7 +5,7 @@ export class EditorSlider extends Block {
|
|
|
5
5
|
* @param {String} operation
|
|
6
6
|
* @param {String} [filter]
|
|
7
7
|
*/
|
|
8
|
-
setOperation(operation: string, filter?: string
|
|
8
|
+
setOperation(operation: string, filter?: string): void;
|
|
9
9
|
_controlType: string | undefined;
|
|
10
10
|
_operation: string | undefined;
|
|
11
11
|
_iconName: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorSlider.d.ts","sourceRoot":"","sources":["EditorSlider.js"],"names":[],"mappings":"AAQA,
|
|
1
|
+
{"version":3,"file":"EditorSlider.d.ts","sourceRoot":"","sources":["EditorSlider.js"],"names":[],"mappings":"AAQA,mCAAoC,UAAU,CAAC;AAE/C;IACE,WAYE;IAEF;;;OAGG;IACH,uDAgBC;IAfC,iCAA6F;IAC7F,+BAA2B;IAC3B,8BAA0B;IAC1B,2BAAqC;IACrC,4BAAqB;IAavB,eAAe;IACf,0BAuBC;IAED,cAmBC;IAED,eAEC;IAMG,kBAA+B;CAQpC;;;;sBA9GqB,4BAA4B"}
|
|
@@ -2,7 +2,7 @@ export class EditorToolbar extends Block {
|
|
|
2
2
|
init$: {
|
|
3
3
|
'*sliderEl': null;
|
|
4
4
|
/** @type {import('./types.js').LoadingOperations} */
|
|
5
|
-
'*loadingOperations': import(
|
|
5
|
+
'*loadingOperations': import("./types.js").LoadingOperations;
|
|
6
6
|
'*showSlider': boolean;
|
|
7
7
|
'*currentFilter': string;
|
|
8
8
|
'*currentOperation': null;
|
|
@@ -18,7 +18,7 @@ export function createSvgNode(name: string, attrs?: {
|
|
|
18
18
|
* @param {import('./types.js').Direction} direction
|
|
19
19
|
* @param {number} sizeMultiplier
|
|
20
20
|
*/
|
|
21
|
-
export function cornerPath(rect: import(
|
|
21
|
+
export function cornerPath(rect: import("./types.js").Rectangle, direction: import("./types.js").Direction, sizeMultiplier: number): {
|
|
22
22
|
d: string;
|
|
23
23
|
center: number[];
|
|
24
24
|
};
|
|
@@ -27,12 +27,12 @@ export function cornerPath(rect: import('./types.js').Rectangle, direction: impo
|
|
|
27
27
|
* @param {Extract<import('./types.js').Direction, 'n' | 's' | 'w' | 'e'>} direction
|
|
28
28
|
* @param {number} sizeMultiplier
|
|
29
29
|
*/
|
|
30
|
-
export function sidePath(rect: import(
|
|
30
|
+
export function sidePath(rect: import("./types.js").Rectangle, direction: Extract<import("./types.js").Direction, "n" | "s" | "w" | "e">, sizeMultiplier: number): {
|
|
31
31
|
d: string;
|
|
32
32
|
center: number[];
|
|
33
33
|
};
|
|
34
34
|
/** @param {import('./types.js').Direction} direction */
|
|
35
|
-
export function thumbCursor(direction: import(
|
|
35
|
+
export function thumbCursor(direction: import("./types.js").Direction): "move" | "ew-resize" | "ns-resize" | "nwse-resize" | "nesw-resize";
|
|
36
36
|
/**
|
|
37
37
|
* @param {{
|
|
38
38
|
* rect: import('./types.js').Rectangle;
|
|
@@ -41,9 +41,9 @@ export function thumbCursor(direction: import('./types.js').Direction): "move" |
|
|
|
41
41
|
* }} options
|
|
42
42
|
*/
|
|
43
43
|
export function moveRect({ rect, delta: [dx, dy], imageBox }: {
|
|
44
|
-
rect: import(
|
|
44
|
+
rect: import("./types.js").Rectangle;
|
|
45
45
|
delta: [number, number];
|
|
46
|
-
imageBox: import(
|
|
46
|
+
imageBox: import("./types.js").Rectangle;
|
|
47
47
|
}): {
|
|
48
48
|
x: number;
|
|
49
49
|
y: number;
|
|
@@ -54,7 +54,7 @@ export function moveRect({ rect, delta: [dx, dy], imageBox }: {
|
|
|
54
54
|
* @param {import('./types.js').Rectangle} rect1
|
|
55
55
|
* @param {import('./types.js').Rectangle} rect2
|
|
56
56
|
*/
|
|
57
|
-
export function constraintRect(rect1: import(
|
|
57
|
+
export function constraintRect(rect1: import("./types.js").Rectangle, rect2: import("./types.js").Rectangle): {
|
|
58
58
|
x: number;
|
|
59
59
|
y: number;
|
|
60
60
|
width: number;
|
|
@@ -70,33 +70,33 @@ export function constraintRect(rect1: import('./types.js').Rectangle, rect2: imp
|
|
|
70
70
|
* }} options
|
|
71
71
|
*/
|
|
72
72
|
export function resizeRect({ direction, ...rest }: {
|
|
73
|
-
rect: import(
|
|
73
|
+
rect: import("./types.js").Rectangle;
|
|
74
74
|
delta: [number, number];
|
|
75
|
-
direction: import(
|
|
75
|
+
direction: import("./types.js").Direction;
|
|
76
76
|
aspectRatio?: number;
|
|
77
|
-
imageBox: import(
|
|
77
|
+
imageBox: import("./types.js").Rectangle;
|
|
78
78
|
}): import("./types.js").Rectangle;
|
|
79
79
|
/**
|
|
80
80
|
* @param {import('./types.js').Rectangle} rect
|
|
81
81
|
* @param {[Number, Number]} point
|
|
82
82
|
*/
|
|
83
|
-
export function rectContainsPoint(rect: import(
|
|
83
|
+
export function rectContainsPoint(rect: import("./types.js").Rectangle, [x, y]: [number, number]): boolean;
|
|
84
84
|
/**
|
|
85
85
|
* @param {import('./types.js').Rectangle} rect1
|
|
86
86
|
* @param {import('./types.js').Rectangle} rect2
|
|
87
87
|
*/
|
|
88
|
-
export function isRectInsideRect(rect1: import(
|
|
88
|
+
export function isRectInsideRect(rect1: import("./types.js").Rectangle, rect2: import("./types.js").Rectangle): boolean;
|
|
89
89
|
/**
|
|
90
90
|
* @param {import('./types.js').Rectangle} rect
|
|
91
91
|
* @param {number} aspectRatio
|
|
92
92
|
*/
|
|
93
|
-
export function isRectMatchesAspectRatio(rect: import(
|
|
93
|
+
export function isRectMatchesAspectRatio(rect: import("./types.js").Rectangle, aspectRatio: number): boolean;
|
|
94
94
|
/**
|
|
95
95
|
* @param {import('./types.js').ImageSize} imageSize
|
|
96
96
|
* @param {Number} angle
|
|
97
97
|
* @returns {import('./types.js').ImageSize}
|
|
98
98
|
*/
|
|
99
|
-
export function rotateSize({ width, height }: import(
|
|
99
|
+
export function rotateSize({ width, height }: import("./types.js").ImageSize, angle: number): import("./types.js").ImageSize;
|
|
100
100
|
/**
|
|
101
101
|
* @param {number} width
|
|
102
102
|
* @param {number} height
|
|
@@ -112,7 +112,7 @@ export function calculateMaxCenteredCropFrame(width: number, height: number, asp
|
|
|
112
112
|
* @param {import('./types.js').Rectangle} rect
|
|
113
113
|
* @returns {import('./types.js').Rectangle}
|
|
114
114
|
*/
|
|
115
|
-
export function roundRect(rect: import(
|
|
115
|
+
export function roundRect(rect: import("./types.js").Rectangle): import("./types.js").Rectangle;
|
|
116
116
|
/**
|
|
117
117
|
* @param {Number} value
|
|
118
118
|
* @param {Number} min
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crop-utils.d.ts","sourceRoot":"","sources":["crop-utils.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,sCAHW,UAAU
|
|
1
|
+
{"version":3,"file":"crop-utils.d.ts","sourceRoot":"","sources":["crop-utils.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,sCAHW,UAAU,SACV;IAAE,CAAC,GAAG,QAAQ,GAAG,eAAe,CAAA;CAAE,QAI5C;AAED;;;;GAIG;AACH,oDAHW;IAAE,CAAC,GAAG,QAAQ,GAAG,eAAe,CAAA;CAAE,GAChC,UAAU,CAMtB;AAED;;;;GAIG;AACH,iCAJW,OAAO,YAAY,EAAE,SAAS,aAC9B,OAAO,YAAY,EAAE,SAAS,kBAC9B,MAAM;;;EA2BhB;AAED;;;;GAIG;AACH,+BAJW,OAAO,YAAY,EAAE,SAAS,aAC9B,OAAO,CAAC,OAAO,YAAY,EAAE,SAAS,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,kBAC9D,MAAM;;;EA0BhB;AAED,wDAAwD;AACxD,uCADY,OAAO,YAAY,EAAE,SAAS,sEAezC;AAED;;;;;;GAMG;AACH,8DANW;IACN,IAAI,EAAE,OAAO,YAAY,EAAE,SAAS,CAAC;IACrC,KAAK,EAAE,gBAAgB,CAAC;IACxB,QAAQ,EAAE,OAAO,YAAY,EAAE,SAAS,CAAC;CAC1C;;;;;EAWH;AAED;;;GAGG;AACH,sCAHW,OAAO,YAAY,EAAE,SAAS,SAC9B,OAAO,YAAY,EAAE,SAAS;;;;;EAqBxC;AA8cD;;;;;;;;GAQG;AACH,mDARW;IACN,IAAI,EAAE,OAAO,YAAY,EAAE,SAAS,CAAC;IACrC,KAAK,EAAE,gBAAgB,CAAC;IACxB,SAAS,EAAE,OAAO,YAAY,EAAE,SAAS,CAAC;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,YAAY,EAAE,SAAS,CAAC;CAC1C,kCAuBH;AAED;;;GAGG;AACH,wCAHW,OAAO,YAAY,EAAE,SAAS,UAC9B,gBAAgB,WAI1B;AAED;;;GAGG;AACH,wCAHW,OAAO,YAAY,EAAE,SAAS,SAC9B,OAAO,YAAY,EAAE,SAAS,WASxC;AAED;;;GAGG;AACH,+CAHW,OAAO,YAAY,EAAE,SAAS,eAC9B,MAAM,WAKhB;AAED;;;;GAIG;AACH,8CAJW,OAAO,YAAY,EAAE,SAAS,kBAE5B,OAAO,YAAY,EAAE,SAAS,CAK1C;AAED;;;;GAIG;AACH,qDAJW,MAAM,UACN,MAAM,eACN,MAAM;;;;;EAyBhB;AAED;;;GAGG;AACH,gCAHW,OAAO,YAAY,EAAE,SAAS,GAC5B,OAAO,YAAY,EAAE,SAAS,CAS1C;AAED;;;;;GAKG;AACH,uEAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cropper-constants.d.ts","sourceRoot":"","sources":["cropper-constants.js"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"cropper-constants.d.ts","sourceRoot":"","sources":["cropper-constants.js"],"names":[],"mappings":"AAAA,2BAA4B,EAAE,CAAC;AAC/B,gCAAiC,EAAE,CAAC;AACpC,8BAA+B,EAAE,CAAC;AAClC,iCAAkC,CAAC,CAAC;AACpC,kCAAmD;AAEnD,iCAAkC,CAAC,CAAC;AACpC,iCAAmC;AACnC,4BAA6B,CAAC,CAAC;AAC/B,mCAAoC,EAAE,CAAC;AACvC,mCAAoC,CAAC,CAAC"}
|
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
* @param {(focusVisible: boolean, el: EventTarget) => void} [callback]
|
|
7
7
|
* @see https://github.com/WICG/focus-visible
|
|
8
8
|
*/
|
|
9
|
-
export function applyFocusVisiblePolyfill(scope: Document | ShadowRoot, callback?: (
|
|
9
|
+
export function applyFocusVisiblePolyfill(scope: Document | ShadowRoot, callback?: (focusVisible: boolean, el: EventTarget) => void): () => void;
|
|
10
10
|
//# sourceMappingURL=applyFocusVisiblePolyfill.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyFocusVisiblePolyfill.d.ts","sourceRoot":"","sources":["applyFocusVisiblePolyfill.js"],"names":[],"mappings":"AAgDA;;;;;;;GAOG;AACH,iDAJW,QAAQ,GAAG,UAAU,
|
|
1
|
+
{"version":3,"file":"applyFocusVisiblePolyfill.d.ts","sourceRoot":"","sources":["applyFocusVisiblePolyfill.js"],"names":[],"mappings":"AAgDA;;;;;;;GAOG;AACH,iDAJW,QAAQ,GAAG,UAAU,aACrB,CAAC,YAAY,EAAE,OAAO,EAAE,EAAE,EAAE,WAAW,KAAK,IAAI,cA0M1D"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function parseCropPreset(cropPreset: import(
|
|
1
|
+
export function parseCropPreset(cropPreset: import("../../../../types/exported.d.ts").ConfigType["cropPreset"]): import("../types.js").CropAspectRatio[] | undefined;
|
|
2
2
|
//# sourceMappingURL=parseCropPreset.d.ts.map
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* @param {import('../types').Transformations} transformations
|
|
3
3
|
* @returns {string}
|
|
4
4
|
*/
|
|
5
|
-
export function transformationsToOperations(transformations: import(
|
|
5
|
+
export function transformationsToOperations(transformations: import("../types").Transformations): string;
|
|
6
6
|
/**
|
|
7
7
|
* @param {string[]} operations
|
|
8
8
|
* @returns {import('../types.js').Transformations}
|
|
9
9
|
*/
|
|
10
|
-
export function operationsToTransformations(operations: string[]): import(
|
|
10
|
+
export function operationsToTransformations(operations: string[]): import("../types.js").Transformations;
|
|
11
11
|
/** @type {Record<keyof import('../types').Transformations, unknown>} */
|
|
12
|
-
export const OPERATIONS_DEFAULTS: Record<keyof import(
|
|
12
|
+
export const OPERATIONS_DEFAULTS: Record<keyof import("../types").Transformations, unknown>;
|
|
13
13
|
export const COMMON_OPERATIONS: string;
|
|
14
14
|
//# sourceMappingURL=transformationUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformationUtils.d.ts","sourceRoot":"","sources":["transformationUtils.js"],"names":[],"mappings":"AAsEA;;;GAGG;AACH,6DAHW,OAAO,UAAU,EAAE,eAAe,GAChC,MAAM,CAalB;AAoDD;;;GAGG;AACH,wDAHW,MAAM,EAAE,GACN,OAAO,aAAa,EAAE,eAAe,CA2BjD;AAlKD,wEAAwE;AACxE,kCADW,
|
|
1
|
+
{"version":3,"file":"transformationUtils.d.ts","sourceRoot":"","sources":["transformationUtils.js"],"names":[],"mappings":"AAsEA;;;GAGG;AACH,6DAHW,OAAO,UAAU,EAAE,eAAe,GAChC,MAAM,CAalB;AAoDD;;;GAGG;AACH,wDAHW,MAAM,EAAE,GACN,OAAO,aAAa,EAAE,eAAe,CA2BjD;AAlKD,wEAAwE;AACxE,kCADW,MAAM,CAAC,MAAM,OAAO,UAAU,EAAE,eAAe,EAAE,OAAO,CAAC,CAejE;AAoEH,uCAAqF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @param {import('./CloudImageEditorBlock.js').CloudImageEditorBlock} fnCtx */
|
|
2
|
-
export function initState(fnCtx: import(
|
|
2
|
+
export function initState(fnCtx: import("./CloudImageEditorBlock.js").CloudImageEditorBlock): {
|
|
3
3
|
'*originalUrl': null;
|
|
4
4
|
'*faderEl': null;
|
|
5
5
|
'*cropperEl': null;
|
|
@@ -8,9 +8,9 @@ export function initState(fnCtx: import('./CloudImageEditorBlock.js').CloudImage
|
|
|
8
8
|
'*networkProblems': boolean;
|
|
9
9
|
'*imageSize': null;
|
|
10
10
|
/** @type {import('./types.js').Transformations} */
|
|
11
|
-
'*editorTransformations': import(
|
|
11
|
+
'*editorTransformations': import("./types.js").Transformations;
|
|
12
12
|
/** @type {import('./types.js').CropPresetList} */
|
|
13
|
-
'*cropPresetList': import(
|
|
13
|
+
'*cropPresetList': import("./types.js").CropPresetList;
|
|
14
14
|
'*tabList': ("crop" | "tuning" | "filters")[];
|
|
15
15
|
'*tabId': "crop";
|
|
16
16
|
entry: null;
|
|
@@ -32,7 +32,7 @@ export function initState(fnCtx: import('./CloudImageEditorBlock.js').CloudImage
|
|
|
32
32
|
'presence.viewerToolbar': boolean;
|
|
33
33
|
'*on.retryNetwork': () => void;
|
|
34
34
|
/** @param {import('./types.js').Transformations} transformations */
|
|
35
|
-
'*on.apply': (transformations: import(
|
|
35
|
+
'*on.apply': (transformations: import("./types.js").Transformations) => void;
|
|
36
36
|
'*on.cancel': () => void;
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svg-sprite.d.ts","sourceRoot":"","sources":["svg-sprite.js"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"svg-sprite.d.ts","sourceRoot":"","sources":["svg-sprite.js"],"names":[],"mappings":"wBAAe,++VAA++V"}
|
|
@@ -49,66 +49,16 @@ export type ChangeResult = {
|
|
|
49
49
|
transformations: Transformations;
|
|
50
50
|
};
|
|
51
51
|
export type CropAspectRatio = {
|
|
52
|
-
type:
|
|
52
|
+
type: "aspect-ratio";
|
|
53
53
|
width: number;
|
|
54
54
|
height: number;
|
|
55
55
|
};
|
|
56
56
|
export type CropPresetList = CropAspectRatio[];
|
|
57
|
-
export type FrameThumbs = {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
n?: {
|
|
65
|
-
direction: Direction;
|
|
66
|
-
pathNode: SVGElement;
|
|
67
|
-
interactionNode: SVGElement;
|
|
68
|
-
groupNode: SVGElement;
|
|
69
|
-
} | undefined;
|
|
70
|
-
s?: {
|
|
71
|
-
direction: Direction;
|
|
72
|
-
pathNode: SVGElement;
|
|
73
|
-
interactionNode: SVGElement;
|
|
74
|
-
groupNode: SVGElement;
|
|
75
|
-
} | undefined;
|
|
76
|
-
e?: {
|
|
77
|
-
direction: Direction;
|
|
78
|
-
pathNode: SVGElement;
|
|
79
|
-
interactionNode: SVGElement;
|
|
80
|
-
groupNode: SVGElement;
|
|
81
|
-
} | undefined;
|
|
82
|
-
w?: {
|
|
83
|
-
direction: Direction;
|
|
84
|
-
pathNode: SVGElement;
|
|
85
|
-
interactionNode: SVGElement;
|
|
86
|
-
groupNode: SVGElement;
|
|
87
|
-
} | undefined;
|
|
88
|
-
ne?: {
|
|
89
|
-
direction: Direction;
|
|
90
|
-
pathNode: SVGElement;
|
|
91
|
-
interactionNode: SVGElement;
|
|
92
|
-
groupNode: SVGElement;
|
|
93
|
-
} | undefined;
|
|
94
|
-
nw?: {
|
|
95
|
-
direction: Direction;
|
|
96
|
-
pathNode: SVGElement;
|
|
97
|
-
interactionNode: SVGElement;
|
|
98
|
-
groupNode: SVGElement;
|
|
99
|
-
} | undefined;
|
|
100
|
-
se?: {
|
|
101
|
-
direction: Direction;
|
|
102
|
-
pathNode: SVGElement;
|
|
103
|
-
interactionNode: SVGElement;
|
|
104
|
-
groupNode: SVGElement;
|
|
105
|
-
} | undefined;
|
|
106
|
-
sw?: {
|
|
107
|
-
direction: Direction;
|
|
108
|
-
pathNode: SVGElement;
|
|
109
|
-
interactionNode: SVGElement;
|
|
110
|
-
groupNode: SVGElement;
|
|
111
|
-
} | undefined;
|
|
112
|
-
};
|
|
113
|
-
export type Direction = '' | 'n' | 's' | 'e' | 'w' | 'ne' | 'nw' | 'se' | 'sw';
|
|
57
|
+
export type FrameThumbs = Partial<{ [K in Direction]: {
|
|
58
|
+
direction: Direction;
|
|
59
|
+
pathNode: SVGElement;
|
|
60
|
+
interactionNode: SVGElement;
|
|
61
|
+
groupNode: SVGElement;
|
|
62
|
+
}; }>;
|
|
63
|
+
export type Direction = "" | "n" | "s" | "e" | "w" | "ne" | "nw" | "se" | "sw";
|
|
114
64
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.js"],"names":[],"mappings":";;;gCAGa,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.js"],"names":[],"mappings":";;;gCAGa,GAAG,SAAS,GAAG,SAAS,OAAO,CAAC,CAAC;;;;wBAMjC;IAAE,KAAK,SAAS;IAAC,MAAM,SAAQ;CAAE;;;;;;;8BAYjC;IACR,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1C,IAAI,CAAC,EAAE;QAAE,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,CAAC;CACnE;;iBAKU,MAAM;qBACN,MAAM;YACN,MAAM;qBACN,eAAe;;;iBAKf,MAAM;qBACN,MAAM;YACN,MAAM;qBACN,eAAe;;8BAGf;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE;6BAEvD,eAAe,EAAE;0BAGlB,OAAO,CAAC,GACf,CAAC,IAAI,SAAS,GAAG;IAChB,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,UAAU,CAAC;IACrB,eAAe,EAAE,UAAU,CAAC;IAC5B,SAAS,EAAE,UAAU,CAAC;CACvB,GACF,CAAC;wBAGS,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI"}
|
|
@@ -14,7 +14,7 @@ export class CloudImageEditorActivity extends UploaderBlock {
|
|
|
14
14
|
/** @type {ActivityParams} */
|
|
15
15
|
get activityParams(): ActivityParams;
|
|
16
16
|
/** @param {CustomEvent<import('../CloudImageEditor/src/types.js').ApplyResult>} e */
|
|
17
|
-
handleApply(e: CustomEvent<import(
|
|
17
|
+
handleApply(e: CustomEvent<import("../CloudImageEditor/src/types.js").ApplyResult>): void;
|
|
18
18
|
handleCancel(): void;
|
|
19
19
|
mountEditor(): void;
|
|
20
20
|
unmountEditor(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloudImageEditorActivity.d.ts","sourceRoot":"","sources":["CloudImageEditorActivity.js"],"names":[],"mappings":"AAKA,uDAAuD;AAEvD;IAEE,iCAAuD;IAEvD;;;OAGG;IACH,eAAO;IAEP;;;OAGG;IACH,kBAAU;IAEV,6BAA6B;IAC7B,
|
|
1
|
+
{"version":3,"file":"CloudImageEditorActivity.d.ts","sourceRoot":"","sources":["CloudImageEditorActivity.js"],"names":[],"mappings":"AAKA,uDAAuD;AAEvD;IAEE,iCAAuD;IAEvD;;;OAGG;IACH,eAAO;IAEP;;;OAGG;IACH,kBAAU;IAEV,6BAA6B;IAC7B,sBADW,cAAc,CAOxB;IAuBD,qFAAqF;IACrF,eADY,WAAW,CAAC,OAAO,kCAAkC,EAAE,WAAW,CAAC,QAY9E;IAED,qBAGC;IAED,oBA4CC;IAED,sBAIC;CACF;6BAtHa;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE;8BAHN,iCAAiC"}
|
|
@@ -61,10 +61,12 @@ export class CloudImageEditorActivity extends UploaderBlock {
|
|
|
61
61
|
cdnUrl: result.cdnUrl,
|
|
62
62
|
cdnUrlModifiers: result.cdnUrlModifiers,
|
|
63
63
|
});
|
|
64
|
+
this.modalManager.close(ActivityBlock.activities.CLOUD_IMG_EDIT);
|
|
64
65
|
this.historyBack();
|
|
65
66
|
}
|
|
66
67
|
|
|
67
68
|
handleCancel() {
|
|
69
|
+
this.modalManager.close(ActivityBlock.activities.CLOUD_IMG_EDIT);
|
|
68
70
|
this.historyBack();
|
|
69
71
|
}
|
|
70
72
|
|
|
@@ -12,17 +12,8 @@
|
|
|
12
12
|
* 'mediaRecorderOptions',
|
|
13
13
|
* ]}
|
|
14
14
|
*/
|
|
15
|
-
export const complexConfigKeys: [
|
|
16
|
-
|
|
17
|
-
'localeDefinitionOverride',
|
|
18
|
-
'secureUploadsSignatureResolver',
|
|
19
|
-
'secureDeliveryProxyUrlResolver',
|
|
20
|
-
'iconHrefResolver',
|
|
21
|
-
'fileValidators',
|
|
22
|
-
'collectionValidators',
|
|
23
|
-
'mediaRecorderOptions'
|
|
24
|
-
];
|
|
25
|
-
export type Config = import('../../utils/mixinClass.js').MixinClass<typeof ConfigClass, import('../../types').ConfigType>;
|
|
15
|
+
export const complexConfigKeys: ["metadata", "localeDefinitionOverride", "secureUploadsSignatureResolver", "secureDeliveryProxyUrlResolver", "iconHrefResolver", "fileValidators", "collectionValidators", "mediaRecorderOptions"];
|
|
16
|
+
export type Config = import("../../utils/mixinClass.js").MixinClass<typeof ConfigClass, import("../../types").ConfigType>;
|
|
26
17
|
/** @typedef {import('../../utils/mixinClass.js').MixinClass<typeof ConfigClass, import('../../types').ConfigType>} Config */
|
|
27
18
|
export const Config: Config;
|
|
28
19
|
declare class ConfigClass extends Block {
|
|
@@ -64,6 +55,6 @@ declare class ConfigClass extends Block {
|
|
|
64
55
|
}
|
|
65
56
|
import { Block } from '../../abstract/Block.js';
|
|
66
57
|
/** Mapping of attribute names to state */
|
|
67
|
-
declare const attrStateMapping: Record<
|
|
58
|
+
declare const attrStateMapping: Record<keyof import("../../types").ConfigAttributesType, string>;
|
|
68
59
|
export {};
|
|
69
60
|
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["Config.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;GAaG;AACH,gCAXU
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["Config.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;GAaG;AACH,gCAXU,CACT,UAAc,EACd,0BAA8B,EAC9B,gCAAoC,EACpC,gCAAoC,EACpC,kBAAsB,EACtB,gBAAoB,EACpB,sBAA0B,EAC1B,sBAA0B,CACvB,CAWF;qBAyNY,OAAO,2BAA2B,EAAE,UAAU,CAAC,OAAO,WAAW,EAAE,OAAO,aAAa,EAAE,UAAU,CAAC;AAAlH,6HAA6H;AAG7H,qBAAiC,MAAM,CAA4C;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,OAAO,gBAAgB,UAC7B,MAAM,UACN,MAAM,QAahB;CACF;sBAjPqB,yBAAyB;AAwD/C,0CAA0C;AAC1C,gCAAoC,MAAM,CAAC,MAAM,OAAO,aAAa,EAAE,oBAAoB,EAAE,MAAM,CAAC,CAGjG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Runs on every config change and warns about potential issues. */
|
|
2
|
-
export const runAssertions: ((cfg: import(
|
|
2
|
+
export const runAssertions: ((cfg: import("../../types").ConfigType) => void) & {
|
|
3
3
|
cancel: () => void;
|
|
4
4
|
};
|
|
5
5
|
//# sourceMappingURL=assertions.d.ts.map
|
|
@@ -2,5 +2,5 @@ export const DEFAULT_CDN_CNAME: "https://ucarecdn.com";
|
|
|
2
2
|
export const DEFAULT_BASE_URL: "https://upload.uploadcare.com";
|
|
3
3
|
export const DEFAULT_SOCIAL_BASE_URL: "https://social.uploadcare.com";
|
|
4
4
|
/** @type {import('../../types/exported').ConfigType} */
|
|
5
|
-
export const initialConfig: import(
|
|
5
|
+
export const initialConfig: import("../../types/exported").ConfigType;
|
|
6
6
|
//# sourceMappingURL=initialConfig.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initialConfig.d.ts","sourceRoot":"","sources":["initialConfig.js"],"names":[],"mappings":"AAKA,
|
|
1
|
+
{"version":3,"file":"initialConfig.d.ts","sourceRoot":"","sources":["initialConfig.js"],"names":[],"mappings":"AAKA,gCAAiC,sBAAsB,CAAC;AACxD,+BAAgC,+BAA+B,CAAC;AAChE,sCAAuC,+BAA+B,CAAC;AAEvE,wDAAwD;AACxD,4BADW,OAAO,sBAAsB,EAAE,UAAU,CAuElD"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export function asBoolean(value: unknown): boolean;
|
|
2
1
|
export function normalizeConfigValue<T extends keyof import("../../types").ConfigType>(key: T, value: unknown): import("../../types").ConfigType[T] | undefined;
|
|
2
|
+
export { asBoolean };
|
|
3
|
+
import { asBoolean } from './validatorsType.js';
|
|
3
4
|
//# sourceMappingURL=normalizeConfigValue.d.ts.map
|
|
@@ -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":"AA2GO,qCAL+C,CAAC,SAA1C,MAAO,OAAO,aAAa,EAAE,UAAW,OAC1C,CAAC,SACD,OAAO,GACL,OAAO,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,SAAS,CAa3D;;0BAtGM,qBAAqB"}
|
|
@@ -1,112 +1,20 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
|
|
3
|
-
import { CameraSourceTypes } from '../CameraSource/constants.js';
|
|
4
|
-
import { deserializeCsv } from '../utils/comma-separated.js';
|
|
5
3
|
import { initialConfig } from './initialConfig.js';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (typeof value === 'boolean') return value;
|
|
21
|
-
// for attr like multiple="true" (react will pass it as string)
|
|
22
|
-
if (value === 'true') return true;
|
|
23
|
-
// for attr flags like multiple="" (some other libs will pass it as empty string)
|
|
24
|
-
if (value === '') return true;
|
|
25
|
-
// for attr like multiple="false" (react will pass it as string)
|
|
26
|
-
if (value === 'false') return false;
|
|
27
|
-
throw new Error(`Invalid boolean: "${value}"`);
|
|
28
|
-
};
|
|
29
|
-
/** @param {unknown} value */
|
|
30
|
-
const asStore = (value) => (value === 'auto' ? value : asBoolean(value));
|
|
31
|
-
|
|
32
|
-
/** @param {unknown} value */
|
|
33
|
-
const asCameraCapture = (value) => {
|
|
34
|
-
const strValue = asString(value);
|
|
35
|
-
if (strValue !== 'user' && strValue !== 'environment' && strValue !== '') {
|
|
36
|
-
throw new Error(`Invalid value: "${strValue}"`);
|
|
37
|
-
}
|
|
38
|
-
return strValue;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
/** @param {unknown} value */
|
|
42
|
-
const asCameraMode = (value) => {
|
|
43
|
-
const strValue = asString(value);
|
|
44
|
-
if (!Object.values(CameraSourceTypes).includes(strValue)) {
|
|
45
|
-
throw new Error(`Invalid value: "${strValue}"`);
|
|
46
|
-
}
|
|
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;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
/** @param {unknown} value */
|
|
61
|
-
const asMetadata = (value) => {
|
|
62
|
-
if (typeof value === 'object' && !Array.isArray(value)) {
|
|
63
|
-
return /** @type {import('../../types').Metadata} */ (value);
|
|
64
|
-
}
|
|
65
|
-
if (typeof value === 'function') {
|
|
66
|
-
return /** @type {import('../../types').MetadataCallback} */ (value);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
throw new Error('Invalid metadata value. Must be an object or function.');
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* @template {{}} T
|
|
74
|
-
* @param {unknown} value
|
|
75
|
-
* @returns {T}
|
|
76
|
-
*/
|
|
77
|
-
const asObject = (value) => {
|
|
78
|
-
if (typeof value === 'object') {
|
|
79
|
-
return /** @type {T} */ (value);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
throw new Error('Invalid value. Must be an object.');
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* @template {Function} T
|
|
87
|
-
* @param {unknown} value
|
|
88
|
-
* @returns {T}
|
|
89
|
-
*/
|
|
90
|
-
const asFunction = (value) => {
|
|
91
|
-
if (typeof value === 'function') {
|
|
92
|
-
return /** @type {T} */ (value);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
throw new Error('Invalid value. Must be a function.');
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* @template {Function[] | string | {}} T
|
|
100
|
-
* @param {unknown} value
|
|
101
|
-
* @returns {T}
|
|
102
|
-
*/
|
|
103
|
-
const asArray = (value) => {
|
|
104
|
-
if (Array.isArray(value)) {
|
|
105
|
-
return /** @type {T} */ (value);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
throw new Error('Must be an array.');
|
|
109
|
-
};
|
|
4
|
+
import {
|
|
5
|
+
asString,
|
|
6
|
+
asNumber,
|
|
7
|
+
asFunction,
|
|
8
|
+
asBoolean,
|
|
9
|
+
asObject,
|
|
10
|
+
asArray,
|
|
11
|
+
asMetadata,
|
|
12
|
+
asCameraCapture,
|
|
13
|
+
asCameraMode,
|
|
14
|
+
asCameraModes,
|
|
15
|
+
asStore,
|
|
16
|
+
asFilesViewMode,
|
|
17
|
+
} from './validatorsType.js';
|
|
110
18
|
|
|
111
19
|
/**
|
|
112
20
|
* @type {{
|
|
@@ -185,6 +93,10 @@ const mapping = {
|
|
|
185
93
|
mediaRecorderOptions: asObject,
|
|
186
94
|
|
|
187
95
|
maxVideoRecordingDuration: asNumber,
|
|
96
|
+
|
|
97
|
+
filesViewMode: asFilesViewMode,
|
|
98
|
+
gridShowFileNames: asBoolean,
|
|
99
|
+
cloudImageEditorAutoOpen: asBoolean,
|
|
188
100
|
};
|
|
189
101
|
|
|
190
102
|
/**
|
|
@@ -205,3 +117,4 @@ export const normalizeConfigValue = (key, value) => {
|
|
|
205
117
|
return initialConfig[key];
|
|
206
118
|
}
|
|
207
119
|
};
|
|
120
|
+
export { asBoolean };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"side-effects.d.ts","sourceRoot":"","sources":["side-effects.js"],"names":[],"mappings":"AAWO
|
|
1
|
+
{"version":3,"file":"side-effects.d.ts","sourceRoot":"","sources":["side-effects.js"],"names":[],"mappings":"AAWO,+BAR+C,CAAC,SAA1C,MAAO,OAAO,aAAa,EAAE,UAAW,sCAC1C;IACN,GAAG,EAAE,CAAC,CAAC;IACP,KAAK,EAAE,OAAO,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAC3C,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IACvE,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,OAAO,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;CAC3D,QAsBH"}
|