@uploadcare/file-uploader 1.27.1 → 1.28.0-alpha.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/dist/CameraSource-DbyO6GoK.js +481 -0
- package/dist/CameraSource-px4BzEMI.js +9 -0
- package/dist/CloudImageEditor-BIxf1V4M.js +2162 -0
- package/dist/CloudImageEditorActivity-CJxP5N0S.js +9 -0
- package/dist/CloudImageEditorActivity-d4DpK6fQ.js +87 -0
- package/dist/Config-DuWre5p3.js +433 -0
- package/dist/ExternalSource-BKTFp95O.js +248 -0
- package/dist/ExternalSource-CR5DG0Jv.js +9 -0
- package/dist/Icon-CqTVC82Q.js +1811 -0
- package/dist/LitUploaderBlock-BA34rzeU.js +998 -0
- package/dist/UrlSource-BxVL9Pve.js +9 -0
- package/dist/UrlSource-DZK5EBwT.js +73 -0
- package/dist/abstract/CTX.d.ts +40 -0
- package/dist/abstract/TypedCollection.d.ts +47 -0
- package/dist/abstract/TypedCollection.test.d.ts +1 -0
- package/dist/abstract/TypedData.d.ts +12 -0
- package/dist/abstract/TypedData.test.d.ts +1 -0
- package/dist/abstract/UploaderPublicApi.d.ts +41 -0
- package/dist/abstract/buildOutputCollectionState.d.ts +3 -0
- package/dist/abstract/customConfigOptions.d.ts +65 -0
- package/dist/abstract/defineComponents.d.ts +1 -0
- package/dist/abstract/features/ClipboardLayer.d.ts +12 -0
- package/dist/abstract/loadFileUploaderFrom.d.ts +3 -4
- package/dist/abstract/loadFileUploaderFrom.js +7 -6
- package/dist/abstract/localeRegistry.d.ts +5 -0
- package/dist/abstract/managers/LocaleManager.d.ts +10 -0
- package/dist/abstract/managers/ModalManager.d.ts +53 -0
- package/dist/abstract/managers/SecureUploadsManager.d.ts +7 -0
- package/dist/abstract/managers/TelemetryManager.d.ts +41 -0
- package/dist/abstract/managers/ValidationManager.d.ts +34 -0
- package/dist/abstract/managers/__tests__/ModalManager.test.d.ts +13 -0
- package/dist/abstract/managers/__tests__/SecureUploadsManager.test.d.ts +1 -0
- package/dist/abstract/managers/a11y.d.ts +9 -0
- package/dist/abstract/managers/plugin/PluginManager.d.ts +25 -0
- package/dist/abstract/managers/plugin/PluginTypes.d.ts +146 -0
- package/dist/abstract/managers/plugin/index.d.ts +2 -0
- package/dist/abstract/sharedConfigKey.d.ts +2 -0
- package/dist/abstract/uploadEntrySchema.d.ts +34 -0
- package/dist/blocks/ActivityHeader/ActivityHeader.d.ts +8 -0
- package/dist/blocks/CameraSource/CameraSource.d.ts +121 -0
- package/dist/blocks/CameraSource/__tests__/calcCameraModes.test.d.ts +1 -0
- package/dist/blocks/CameraSource/calcCameraModes.d.ts +5 -0
- package/dist/blocks/CameraSource/constants.d.ts +15 -0
- package/dist/blocks/CloudImageEditor/index.d.ts +1 -0
- package/dist/blocks/CloudImageEditor/src/CloudImageEditorBlock.d.ts +60 -0
- package/dist/blocks/CloudImageEditor/src/CropFrame.d.ts +56 -0
- package/dist/blocks/CloudImageEditor/src/EditorAspectRatioButtonControl.d.ts +24 -0
- package/dist/blocks/CloudImageEditor/src/EditorButtonControl.d.ts +14 -0
- package/dist/blocks/CloudImageEditor/src/EditorCropButtonControl.d.ts +13 -0
- package/dist/blocks/CloudImageEditor/src/EditorFilterControl.d.ts +35 -0
- package/dist/blocks/CloudImageEditor/src/EditorImageCropper.d.ts +56 -0
- package/dist/blocks/CloudImageEditor/src/EditorImageFader.d.ts +63 -0
- package/dist/blocks/CloudImageEditor/src/EditorOperationControl.d.ts +15 -0
- package/dist/blocks/CloudImageEditor/src/EditorScroller.d.ts +15 -0
- package/dist/blocks/CloudImageEditor/src/EditorSlider.d.ts +33 -0
- package/dist/blocks/CloudImageEditor/src/EditorToolbar.d.ts +68 -0
- package/dist/blocks/CloudImageEditor/src/crop-utils.d.ts +36 -0
- package/dist/blocks/CloudImageEditor/src/crop-utils.test.d.ts +1 -0
- package/dist/blocks/CloudImageEditor/src/cropper-constants.d.ts +10 -0
- package/dist/blocks/CloudImageEditor/src/elements/button/BtnUi.d.ts +31 -0
- package/dist/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.d.ts +19 -0
- package/dist/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.d.ts +27 -0
- package/dist/blocks/CloudImageEditor/src/elements/slider/SliderUi.d.ts +38 -0
- package/dist/blocks/CloudImageEditor/src/index.d.ts +15 -0
- package/dist/blocks/CloudImageEditor/src/lib/classNames.d.ts +5 -0
- package/dist/blocks/CloudImageEditor/src/lib/classNames.test.d.ts +1 -0
- package/dist/blocks/CloudImageEditor/src/lib/linspace.d.ts +1 -0
- package/dist/blocks/CloudImageEditor/src/lib/linspace.test.d.ts +1 -0
- package/dist/blocks/CloudImageEditor/src/lib/parseCropPreset.d.ts +4 -0
- package/dist/blocks/CloudImageEditor/src/lib/parseCropPreset.test.d.ts +1 -0
- package/dist/blocks/CloudImageEditor/src/lib/parseTabs.d.ts +2 -0
- package/dist/blocks/CloudImageEditor/src/lib/pick.d.ts +1 -0
- package/dist/blocks/CloudImageEditor/src/lib/pick.test.d.ts +1 -0
- package/dist/blocks/CloudImageEditor/src/lib/transformationUtils.d.ts +7 -0
- package/dist/blocks/CloudImageEditor/src/state.d.ts +20 -0
- package/dist/blocks/CloudImageEditor/src/svg-sprite.d.ts +2 -0
- package/dist/blocks/CloudImageEditor/src/toolbar-constants.d.ts +61 -0
- package/dist/blocks/CloudImageEditor/src/types.d.ts +60 -0
- package/dist/blocks/CloudImageEditor/src/util.d.ts +2 -0
- package/dist/blocks/CloudImageEditor/src/utils/parseFilterValue.d.ts +7 -0
- package/dist/blocks/CloudImageEditor/src/utils/parseFilterValue.test.d.ts +1 -0
- package/dist/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts +25 -0
- package/dist/blocks/Config/Config.d.ts +60 -0
- package/dist/blocks/Config/assertions.d.ts +5 -0
- package/dist/blocks/Config/computed-properties.d.ts +24 -0
- package/dist/blocks/Config/computed-properties.test.d.ts +1 -0
- package/dist/blocks/Config/initialConfig.d.ts +6 -0
- package/dist/blocks/Config/normalizeConfigValue.d.ts +2 -0
- package/dist/blocks/Config/validatorsType.d.ts +18 -0
- package/dist/blocks/Copyright/Copyright.d.ts +10 -0
- package/dist/blocks/DropArea/DropArea.d.ts +47 -0
- package/dist/blocks/DropArea/addDropzone.d.ts +17 -0
- package/dist/blocks/DropArea/getDropItems.d.ts +12 -0
- package/dist/blocks/ExternalSource/ExternalSource.d.ts +45 -0
- package/dist/blocks/ExternalSource/MessageBridge.d.ts +11 -0
- package/dist/blocks/ExternalSource/buildThemeDefinition.d.ts +4 -0
- package/dist/blocks/ExternalSource/query-string.d.ts +1 -0
- package/dist/blocks/ExternalSource/types.d.ts +105 -0
- package/dist/blocks/FileItem/FileItem.d.ts +50 -0
- package/dist/blocks/FileItem/FileItemConfig.d.ts +10 -0
- package/dist/blocks/FormInput/FormInput.d.ts +18 -0
- package/dist/blocks/Icon/Icon.d.ts +19 -0
- package/dist/blocks/Img/Img.d.ts +14 -0
- package/dist/blocks/Img/ImgBase.d.ts +29 -0
- package/dist/blocks/Img/ImgConfig.d.ts +28 -0
- package/dist/blocks/Img/configurations.d.ts +11 -0
- package/dist/blocks/Img/props-map.d.ts +28 -0
- package/dist/blocks/Img/utils/parseObjectToString.d.ts +2 -0
- package/dist/blocks/Modal/Modal.d.ts +34 -0
- package/dist/blocks/PluginActivityRenderer/PluginActivityRenderer.d.ts +32 -0
- package/dist/blocks/PluginActivityRenderer/index.d.ts +1 -0
- package/dist/blocks/ProgressBar/ProgressBar.d.ts +21 -0
- package/dist/blocks/ProgressBarCommon/ProgressBarCommon.d.ts +17 -0
- package/dist/blocks/Select/Select.d.ts +18 -0
- package/dist/blocks/SimpleBtn/SimpleBtn.d.ts +15 -0
- package/dist/blocks/SourceBtn/SourceBtn.d.ts +23 -0
- package/dist/blocks/SourceList/SourceList.d.ts +24 -0
- package/dist/blocks/Spinner/Spinner.d.ts +9 -0
- package/dist/blocks/StartFrom/StartFrom.d.ts +12 -0
- package/dist/blocks/Thumb/Thumb.d.ts +35 -0
- package/dist/blocks/UploadCtxProvider/EventEmitter.d.ts +70 -0
- package/dist/blocks/UploadCtxProvider/UploadCtxProvider.d.ts +44 -0
- package/dist/blocks/UploadList/UploadList.d.ts +39 -0
- package/dist/blocks/UrlSource/UrlSource.d.ts +14 -0
- package/dist/blocks/svg-backgrounds/svg-backgrounds.d.ts +3 -0
- package/dist/blocks/themes/uc-basic/svg-sprite.d.ts +2 -0
- package/dist/cameraPlugin-dGash48Q.js +8 -0
- package/dist/cloud-image-editor-fNswWrI4.js +11 -0
- package/dist/cloudImageEditorPlugin-2EU0Pm_j.js +8 -0
- package/dist/core.d.ts +42 -0
- package/dist/en-DNCwRJsB.js +135 -0
- package/dist/env-B1nfXy9i.js +8 -0
- package/dist/env.d.ts +2 -4
- package/dist/env.js +7 -6
- package/dist/externalSourcesPlugin-DKQqk3AC.js +8 -0
- package/dist/imageShrinkPlugin-DAx8eRen.js +8 -0
- package/dist/index.css +3964 -6
- package/dist/index.d.ts +29 -2715
- package/dist/index.js +1011 -8
- package/dist/index.layered.css +4478 -7
- package/dist/instagramPlugin-k67tMAo3.js +8 -0
- package/dist/lit/BaseComponent.d.ts +12 -0
- package/dist/lit/Constructor.d.ts +1 -0
- package/dist/lit/CssDataMixin.d.ts +7 -0
- package/dist/lit/LightDomMixin.d.ts +8 -0
- package/dist/lit/LitActivityBlock.d.ts +53 -0
- package/dist/lit/LitBlock.d.ts +83 -0
- package/dist/lit/LitSolutionBlock.d.ts +21 -0
- package/dist/lit/LitUploaderBlock.d.ts +53 -0
- package/dist/lit/PubSubCompat.d.ts +18 -0
- package/dist/lit/RegisterableElementMixin.d.ts +7 -0
- package/dist/lit/SharedState.d.ts +119 -0
- package/dist/lit/SymbioteCompatMixin.d.ts +40 -0
- package/dist/lit/TestModeController.d.ts +16 -0
- package/dist/lit/Uid.d.ts +3 -0
- package/dist/lit/activity-constants.d.ts +11 -0
- package/dist/lit/createDebugPrinter.d.ts +3 -0
- package/dist/lit/findBlockInCtx.d.ts +3 -0
- package/dist/lit/getOutputData.d.ts +2 -0
- package/dist/lit/hasBlockInCtx.d.ts +3 -0
- package/dist/lit/l10n.d.ts +5 -0
- package/dist/lit/parseCssPropertyValue.d.ts +1 -0
- package/dist/lit/shared-instances.d.ts +65 -0
- package/dist/loadFileUploaderFrom-BWJM43Yq.js +28 -0
- package/dist/locales/file-uploader/ar.d.ts +1 -4
- package/dist/locales/file-uploader/ar.js +142 -6
- package/dist/locales/file-uploader/az.d.ts +1 -4
- package/dist/locales/file-uploader/az.js +134 -6
- package/dist/locales/file-uploader/ca.d.ts +1 -4
- package/dist/locales/file-uploader/ca.js +136 -6
- package/dist/locales/file-uploader/cs.d.ts +1 -4
- package/dist/locales/file-uploader/cs.js +138 -6
- package/dist/locales/file-uploader/da.d.ts +1 -4
- package/dist/locales/file-uploader/da.js +134 -6
- package/dist/locales/file-uploader/de.d.ts +1 -4
- package/dist/locales/file-uploader/de.js +134 -6
- package/dist/locales/file-uploader/el.d.ts +1 -4
- package/dist/locales/file-uploader/el.js +134 -6
- package/dist/locales/file-uploader/en.d.ts +1 -4
- package/dist/locales/file-uploader/en.js +7 -6
- package/dist/locales/file-uploader/es.d.ts +1 -4
- package/dist/locales/file-uploader/es.js +136 -6
- package/dist/locales/file-uploader/et.d.ts +1 -4
- package/dist/locales/file-uploader/et.js +134 -6
- package/dist/locales/file-uploader/fi.d.ts +1 -4
- package/dist/locales/file-uploader/fi.js +134 -6
- package/dist/locales/file-uploader/fr.d.ts +1 -4
- package/dist/locales/file-uploader/fr.js +136 -6
- package/dist/locales/file-uploader/he.d.ts +1 -4
- package/dist/locales/file-uploader/he.js +136 -6
- package/dist/locales/file-uploader/hy.d.ts +1 -4
- package/dist/locales/file-uploader/hy.js +134 -6
- package/dist/locales/file-uploader/is.d.ts +1 -4
- package/dist/locales/file-uploader/is.js +134 -6
- package/dist/locales/file-uploader/it.d.ts +1 -4
- package/dist/locales/file-uploader/it.js +136 -6
- package/dist/locales/file-uploader/ja.d.ts +1 -4
- package/dist/locales/file-uploader/ja.js +134 -6
- package/dist/locales/file-uploader/ka.d.ts +1 -4
- package/dist/locales/file-uploader/ka.js +134 -6
- package/dist/locales/file-uploader/kk.d.ts +1 -4
- package/dist/locales/file-uploader/kk.js +134 -6
- package/dist/locales/file-uploader/ko.d.ts +1 -4
- package/dist/locales/file-uploader/ko.js +134 -6
- package/dist/locales/file-uploader/lv.d.ts +1 -4
- package/dist/locales/file-uploader/lv.js +136 -6
- package/dist/locales/file-uploader/nb.d.ts +1 -4
- package/dist/locales/file-uploader/nb.js +134 -6
- package/dist/locales/file-uploader/nl.d.ts +1 -4
- package/dist/locales/file-uploader/nl.js +134 -6
- package/dist/locales/file-uploader/pl.d.ts +1 -4
- package/dist/locales/file-uploader/pl.js +138 -6
- package/dist/locales/file-uploader/pt.d.ts +1 -4
- package/dist/locales/file-uploader/pt.js +136 -6
- package/dist/locales/file-uploader/ro.d.ts +1 -4
- package/dist/locales/file-uploader/ro.js +136 -6
- package/dist/locales/file-uploader/ru.d.ts +1 -4
- package/dist/locales/file-uploader/ru.js +138 -6
- package/dist/locales/file-uploader/sk.d.ts +1 -4
- package/dist/locales/file-uploader/sk.js +138 -6
- package/dist/locales/file-uploader/sr.d.ts +1 -4
- package/dist/locales/file-uploader/sr.js +136 -6
- package/dist/locales/file-uploader/sv.d.ts +1 -4
- package/dist/locales/file-uploader/sv.js +134 -6
- package/dist/locales/file-uploader/tr.d.ts +1 -4
- package/dist/locales/file-uploader/tr.js +134 -6
- package/dist/locales/file-uploader/uk.d.ts +1 -4
- package/dist/locales/file-uploader/uk.js +138 -6
- package/dist/locales/file-uploader/vi.d.ts +1 -4
- package/dist/locales/file-uploader/vi.js +134 -6
- package/dist/locales/file-uploader/zh-TW.d.ts +1 -4
- package/dist/locales/file-uploader/zh-TW.js +134 -6
- package/dist/locales/file-uploader/zh.d.ts +1 -4
- package/dist/locales/file-uploader/zh.js +134 -6
- package/dist/plugins/cameraPlugin.d.ts +2 -0
- package/dist/plugins/cloudImageEditorPlugin.d.ts +2 -0
- package/dist/plugins/externalSourcesPlugin.d.ts +2 -0
- package/dist/plugins/imageShrinkPlugin.d.ts +2 -0
- package/dist/plugins/instagramPlugin.d.ts +2 -0
- package/dist/plugins/unsplashPlugin.d.ts +16 -0
- package/dist/plugins/urlSourcePlugin.d.ts +2 -0
- package/dist/plugins-DxjsQUa8.js +278 -0
- package/dist/solutions/adaptive-image/index.d.ts +2 -0
- package/dist/solutions/cloud-image-editor/CloudImageEditor.d.ts +11 -0
- package/dist/solutions/cloud-image-editor/index.d.ts +5 -0
- package/dist/solutions/file-uploader/inline/FileUploaderInline.d.ts +20 -0
- package/dist/solutions/file-uploader/inline/index.d.ts +1 -0
- package/dist/solutions/file-uploader/minimal/FileUploaderMinimal.d.ts +23 -0
- package/dist/solutions/file-uploader/minimal/index.d.ts +1 -0
- package/dist/solutions/file-uploader/regular/FileUploaderRegular.d.ts +17 -0
- package/dist/solutions/file-uploader/regular/index.d.ts +1 -0
- package/dist/types/dom.d.ts +1 -0
- package/dist/types/events.d.ts +4 -0
- package/dist/types/exported.d.ts +492 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/urlSourcePlugin-9xdB7Pvw.js +8 -0
- package/dist/utils/UID.d.ts +5 -0
- package/dist/utils/UID.test.d.ts +1 -0
- package/dist/utils/UploadSource.d.ts +37 -0
- package/dist/utils/WindowHeightTracker.d.ts +9 -0
- package/dist/utils/abilities.d.ts +1 -0
- package/dist/utils/applyStyles.d.ts +1 -0
- package/dist/utils/browser-info.d.ts +12 -0
- package/dist/utils/browser-info.test.d.ts +1 -0
- package/dist/utils/cdn-utils.d.ts +53 -0
- package/dist/utils/cdn-utils.test.d.ts +1 -0
- package/dist/utils/comma-separated.d.ts +2 -0
- package/dist/utils/debounce.d.ts +3 -0
- package/dist/utils/delay.d.ts +1 -0
- package/dist/utils/fileTypes.d.ts +11 -0
- package/dist/utils/fileTypes.test.d.ts +1 -0
- package/dist/utils/get-top-level-origin.d.ts +1 -0
- package/dist/utils/get-top-level-origin.test.d.ts +1 -0
- package/dist/utils/getLocaleDirection.d.ts +1 -0
- package/dist/utils/getPluralForm.d.ts +1 -0
- package/dist/utils/getPluralForm.test.d.ts +1 -0
- package/dist/utils/isPromiseLike.d.ts +1 -0
- package/dist/utils/isPromiseLike.test.d.ts +1 -0
- package/dist/utils/isSecureTokenExpired.d.ts +8 -0
- package/dist/utils/isSecureTokenExpired.test.d.ts +1 -0
- package/dist/utils/memoize.d.ts +1 -0
- package/dist/utils/memoize.test.d.ts +1 -0
- package/dist/utils/mixinClass.d.ts +8 -0
- package/dist/utils/parseCdnUrl.d.ts +11 -0
- package/dist/utils/parseCdnUrl.test.d.ts +1 -0
- package/dist/utils/parseShrink.d.ts +7 -0
- package/dist/utils/parseShrink.test.d.ts +1 -0
- package/dist/utils/preloadImage.d.ts +10 -0
- package/dist/utils/prettyBytes.d.ts +11 -0
- package/dist/utils/prettyBytes.test.d.ts +1 -0
- package/dist/utils/resizeImage.d.ts +1 -0
- package/dist/utils/stringToArray.d.ts +1 -0
- package/dist/utils/stringToArray.test.d.ts +1 -0
- package/dist/utils/template-utils.d.ts +16 -0
- package/dist/utils/template-utils.test.d.ts +1 -0
- package/dist/utils/throttle.d.ts +3 -0
- package/dist/utils/toKebabCase.d.ts +2 -0
- package/dist/utils/toKebabCase.test.d.ts +1 -0
- package/dist/utils/transparentPixelSrc.d.ts +1 -0
- package/dist/utils/uniqueArray.d.ts +1 -0
- package/dist/utils/uniqueArray.test.d.ts +1 -0
- package/dist/utils/userAgent.d.ts +2 -0
- package/dist/utils/validators/collection/index.d.ts +2 -0
- package/dist/utils/validators/collection/validateCollectionUploadError.d.ts +2 -0
- package/dist/utils/validators/collection/validateMultiple.d.ts +2 -0
- package/dist/utils/validators/file/index.d.ts +4 -0
- package/dist/utils/validators/file/validateFileType.d.ts +2 -0
- package/dist/utils/validators/file/validateIsImage.d.ts +2 -0
- package/dist/utils/validators/file/validateMaxSizeLimit.d.ts +2 -0
- package/dist/utils/validators/file/validateUploadError.d.ts +2 -0
- package/dist/utils/warnOnce.d.ts +1 -0
- package/dist/utils/wildcardRegexp.d.ts +1 -0
- package/dist/utils/wildcardRegexp.test.d.ts +1 -0
- package/dist/utils/withResolvers.d.ts +5 -0
- package/dist/utils/withResolvers.test.d.ts +1 -0
- package/package.json +8 -2
- package/dist/index.ssr.js +0 -1538
- package/web/file-uploader.iife.min.d.ts +0 -2859
- package/web/file-uploader.iife.min.js +0 -8
- package/web/file-uploader.iife.min.js.LEGAL.txt +0 -71
- package/web/file-uploader.min.d.ts +0 -2859
- package/web/file-uploader.min.js +0 -8
- package/web/file-uploader.min.js.LEGAL.txt +0 -71
- package/web/uc-basic.layered.min.css +0 -7
- package/web/uc-basic.min.css +0 -6
- package/web/uc-cloud-image-editor.layered.min.css +0 -7
- package/web/uc-cloud-image-editor.min.css +0 -6
- package/web/uc-cloud-image-editor.min.d.ts +0 -2816
- package/web/uc-cloud-image-editor.min.js +0 -8
- package/web/uc-cloud-image-editor.min.js.LEGAL.txt +0 -70
- package/web/uc-file-uploader-inline.layered.min.css +0 -7
- package/web/uc-file-uploader-inline.min.css +0 -6
- package/web/uc-file-uploader-inline.min.d.ts +0 -2859
- package/web/uc-file-uploader-inline.min.js +0 -8
- package/web/uc-file-uploader-inline.min.js.LEGAL.txt +0 -71
- package/web/uc-file-uploader-minimal.layered.min.css +0 -7
- package/web/uc-file-uploader-minimal.min.css +0 -6
- package/web/uc-file-uploader-minimal.min.d.ts +0 -2859
- package/web/uc-file-uploader-minimal.min.js +0 -8
- package/web/uc-file-uploader-minimal.min.js.LEGAL.txt +0 -71
- package/web/uc-file-uploader-regular.layered.min.css +0 -7
- package/web/uc-file-uploader-regular.min.css +0 -6
- package/web/uc-file-uploader-regular.min.d.ts +0 -2859
- package/web/uc-file-uploader-regular.min.js +0 -8
- package/web/uc-file-uploader-regular.min.js.LEGAL.txt +0 -71
- package/web/uc-img.min.d.ts +0 -75
- package/web/uc-img.min.js +0 -8
- package/web/uc-img.min.js.LEGAL.txt +0 -24
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EditorButtonControl } from './EditorButtonControl.js';
|
|
2
|
+
import { ColorOperation } from './toolbar-constants';
|
|
3
|
+
export declare class EditorOperationControl extends EditorButtonControl {
|
|
4
|
+
private _operation;
|
|
5
|
+
get operation(): ColorOperation | '';
|
|
6
|
+
set operation(value: ColorOperation | '');
|
|
7
|
+
private _updateOperationMetadata;
|
|
8
|
+
initCallback(): void;
|
|
9
|
+
protected onClick(e: MouseEvent): void;
|
|
10
|
+
}
|
|
11
|
+
declare global {
|
|
12
|
+
interface HTMLElementTagNameMap {
|
|
13
|
+
'uc-editor-operation-control': EditorOperationControl;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LitBlock } from '../../../lit/LitBlock';
|
|
2
|
+
export declare class EditorScroller extends LitBlock {
|
|
3
|
+
/**
|
|
4
|
+
* CSS-only attribute
|
|
5
|
+
*/
|
|
6
|
+
hiddenScrollbar: boolean;
|
|
7
|
+
private readonly _handleWheel;
|
|
8
|
+
connectedCallback(): void;
|
|
9
|
+
disconnectedCallback(): void;
|
|
10
|
+
}
|
|
11
|
+
declare global {
|
|
12
|
+
interface HTMLElementTagNameMap {
|
|
13
|
+
'uc-editor-scroller': EditorScroller;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { PropertyValues } from 'lit';
|
|
2
|
+
import { LitBlock } from '../../../lit/LitBlock';
|
|
3
|
+
import { ColorOperation, FilterId } from './toolbar-constants';
|
|
4
|
+
type SliderOperation = ColorOperation | 'filter';
|
|
5
|
+
type SliderFilter = FilterId | typeof FAKE_ORIGINAL_FILTER;
|
|
6
|
+
export declare const FAKE_ORIGINAL_FILTER = "original";
|
|
7
|
+
export declare class EditorSlider extends LitBlock {
|
|
8
|
+
state: {
|
|
9
|
+
operation: SliderOperation;
|
|
10
|
+
filter: SliderFilter | undefined;
|
|
11
|
+
originalUrl: string;
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
min: number;
|
|
14
|
+
max: number;
|
|
15
|
+
value: number;
|
|
16
|
+
defaultValue: number;
|
|
17
|
+
zero: number;
|
|
18
|
+
};
|
|
19
|
+
private _handleInput;
|
|
20
|
+
setOperation(operation: SliderOperation, filter?: SliderFilter): void;
|
|
21
|
+
private _initializeValues;
|
|
22
|
+
apply(): void;
|
|
23
|
+
cancel(): void;
|
|
24
|
+
initCallback(): void;
|
|
25
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
26
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
27
|
+
}
|
|
28
|
+
declare global {
|
|
29
|
+
interface HTMLElementTagNameMap {
|
|
30
|
+
'uc-editor-slider': EditorSlider;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { PropertyValues, TemplateResult } from 'lit';
|
|
2
|
+
import { Ref } from 'lit/directives/ref.js';
|
|
3
|
+
import { LitBlock } from '../../../lit/LitBlock';
|
|
4
|
+
import { TabId } from './toolbar-constants';
|
|
5
|
+
type TabIdValue = (typeof TabId)[keyof typeof TabId];
|
|
6
|
+
export declare class EditorToolbar extends LitBlock {
|
|
7
|
+
private _showLoader;
|
|
8
|
+
showMainToolbar: boolean;
|
|
9
|
+
showSubToolbar: boolean;
|
|
10
|
+
private _showTabToggles;
|
|
11
|
+
tabList: readonly TabIdValue[];
|
|
12
|
+
activeTab: TabIdValue;
|
|
13
|
+
private _useSliderPanel;
|
|
14
|
+
private _tooltipVisible;
|
|
15
|
+
private _operationTooltip;
|
|
16
|
+
private _tabIndicatorOffset;
|
|
17
|
+
private _tabIndicatorWidth;
|
|
18
|
+
private readonly _sliderRef;
|
|
19
|
+
private readonly _tabIndicatorRef;
|
|
20
|
+
protected readonly tabToggleRefs: Record<TabIdValue, Ref<HTMLElement>>;
|
|
21
|
+
private readonly _handleWindowResize;
|
|
22
|
+
private _cropPresets;
|
|
23
|
+
private _cancelPreload?;
|
|
24
|
+
private readonly _debouncedShowLoader;
|
|
25
|
+
private readonly _updateInfoTooltip;
|
|
26
|
+
private readonly _subTopToolbarStyles;
|
|
27
|
+
private readonly _subBottomToolbarStyles;
|
|
28
|
+
private readonly _tabToggleStyles;
|
|
29
|
+
private readonly _tabTogglesStyles;
|
|
30
|
+
init$: Record<string, unknown>;
|
|
31
|
+
private _onSliderClose;
|
|
32
|
+
private _activateTab;
|
|
33
|
+
private _applyTabState;
|
|
34
|
+
private _syncTabIndicator;
|
|
35
|
+
private get _hasAspectRatioPicker();
|
|
36
|
+
private _renderControlsByTab;
|
|
37
|
+
private _renderCropTabControls;
|
|
38
|
+
private _renderFilterTabControls;
|
|
39
|
+
private _renderTuningTabControls;
|
|
40
|
+
private _renderControlGroup;
|
|
41
|
+
private _renderFreeformControl;
|
|
42
|
+
private _renderAspectRatioControl;
|
|
43
|
+
private _renderCropOperationControl;
|
|
44
|
+
private _renderFilterControl;
|
|
45
|
+
private _renderOperationControl;
|
|
46
|
+
private _renderAspectRatioList;
|
|
47
|
+
private _preloadEditedImage;
|
|
48
|
+
initCallback(): void;
|
|
49
|
+
connectedCallback(): void;
|
|
50
|
+
firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
51
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
52
|
+
disconnectedCallback(): void;
|
|
53
|
+
private _assignSharedElements;
|
|
54
|
+
private readonly _handleCancel;
|
|
55
|
+
private readonly _handleApply;
|
|
56
|
+
private readonly _handleApplySlider;
|
|
57
|
+
private readonly _handleCancelSlider;
|
|
58
|
+
private readonly _handleTabClick;
|
|
59
|
+
private _renderTabToggle;
|
|
60
|
+
private _renderTabContent;
|
|
61
|
+
render(): TemplateResult<1>;
|
|
62
|
+
}
|
|
63
|
+
declare global {
|
|
64
|
+
interface HTMLElementTagNameMap {
|
|
65
|
+
'uc-editor-toolbar': EditorToolbar;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Direction, ImageSize, Rectangle } from './types';
|
|
2
|
+
type SvgAttributes = Record<string, string | number>;
|
|
3
|
+
type SideDirection = 'n' | 's' | 'e' | 'w';
|
|
4
|
+
type ResizeOptions = {
|
|
5
|
+
rect: Rectangle;
|
|
6
|
+
delta: [number, number];
|
|
7
|
+
aspectRatio?: number;
|
|
8
|
+
imageBox: Rectangle;
|
|
9
|
+
};
|
|
10
|
+
type MoveRectOptions = {
|
|
11
|
+
rect: Rectangle;
|
|
12
|
+
delta: [number, number];
|
|
13
|
+
imageBox: Rectangle;
|
|
14
|
+
};
|
|
15
|
+
type PathResult = {
|
|
16
|
+
d: string;
|
|
17
|
+
center: [number, number];
|
|
18
|
+
};
|
|
19
|
+
export declare function setSvgNodeAttrs(node: SVGElement, attrs: SvgAttributes): void;
|
|
20
|
+
export declare function createSvgNode(name: string, attrs?: SvgAttributes): SVGElement;
|
|
21
|
+
export declare function cornerPath(rect: Rectangle, direction: Direction, sizeMultiplier: number): PathResult;
|
|
22
|
+
export declare function sidePath(rect: Rectangle, direction: SideDirection, sizeMultiplier: number): PathResult;
|
|
23
|
+
export declare function thumbCursor(direction: Direction): string;
|
|
24
|
+
export declare function moveRect({ rect, delta: [dx, dy], imageBox }: MoveRectOptions): Rectangle;
|
|
25
|
+
export declare function constraintRect(rect1: Rectangle, rect2: Rectangle): Rectangle;
|
|
26
|
+
export declare function resizeRect({ direction, ...rest }: ResizeOptions & {
|
|
27
|
+
direction: Direction;
|
|
28
|
+
}): Rectangle;
|
|
29
|
+
export declare function rectContainsPoint(rect: Rectangle, [x, y]: [number, number]): boolean;
|
|
30
|
+
export declare function isRectInsideRect(rect1: Rectangle, rect2: Rectangle): boolean;
|
|
31
|
+
export declare function isRectMatchesAspectRatio(rect: Rectangle, aspectRatio: number): boolean;
|
|
32
|
+
export declare function rotateSize({ width, height }: ImageSize, angle: number): ImageSize;
|
|
33
|
+
export declare function calculateMaxCenteredCropFrame(width: number, height: number, aspectRatio: number): Rectangle;
|
|
34
|
+
export declare function roundRect(rect: Rectangle): Rectangle;
|
|
35
|
+
export declare function clamp(value: number, min: number, max: number): number;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const CROP_PADDING = 20;
|
|
2
|
+
export declare const THUMB_CORNER_SIZE = 24;
|
|
3
|
+
export declare const THUMB_SIDE_SIZE = 34;
|
|
4
|
+
export declare const THUMB_STROKE_WIDTH = 3;
|
|
5
|
+
export declare const THUMB_OFFSET: number;
|
|
6
|
+
export declare const GUIDE_STROKE_WIDTH = 1;
|
|
7
|
+
export declare const GUIDE_THIRD: number;
|
|
8
|
+
export declare const MIN_CROP_SIZE = 1;
|
|
9
|
+
export declare const MAX_INTERACTION_SIZE = 24;
|
|
10
|
+
export declare const MIN_INTERACTION_SIZE = 6;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { PropertyValues } from 'lit';
|
|
2
|
+
import { LitBlock } from '../../../../../lit/LitBlock';
|
|
3
|
+
import { AriaRole } from '../../../../../types/dom';
|
|
4
|
+
type Theme = string | null;
|
|
5
|
+
export declare class BtnUi extends LitBlock {
|
|
6
|
+
text: string;
|
|
7
|
+
icon: string;
|
|
8
|
+
reverse: boolean;
|
|
9
|
+
theme: Theme;
|
|
10
|
+
ariaRole: AriaRole | undefined;
|
|
11
|
+
ariaControls: string;
|
|
12
|
+
titleProp: string;
|
|
13
|
+
/**
|
|
14
|
+
* CSS-only attribute
|
|
15
|
+
*/
|
|
16
|
+
active: boolean;
|
|
17
|
+
protected firstUpdated(changed: PropertyValues<this>): void;
|
|
18
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
19
|
+
private _applyReverse;
|
|
20
|
+
private _applyThemeClass;
|
|
21
|
+
private get _iconClassMap();
|
|
22
|
+
private get _computedIconHidden();
|
|
23
|
+
private get _computedIconSingle();
|
|
24
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
25
|
+
}
|
|
26
|
+
declare global {
|
|
27
|
+
interface HTMLElementTagNameMap {
|
|
28
|
+
'uc-btn-ui': BtnUi;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PropertyValues } from 'lit';
|
|
2
|
+
import { LitBlock } from '../../../../../lit/LitBlock';
|
|
3
|
+
export declare class LineLoaderUi extends LitBlock {
|
|
4
|
+
active: boolean;
|
|
5
|
+
private readonly _lineRef;
|
|
6
|
+
private _isAnimating;
|
|
7
|
+
private readonly _handleTransitionEndRight;
|
|
8
|
+
protected firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
9
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
10
|
+
private _start;
|
|
11
|
+
private _stop;
|
|
12
|
+
private _resetLine;
|
|
13
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
14
|
+
}
|
|
15
|
+
declare global {
|
|
16
|
+
interface HTMLElementTagNameMap {
|
|
17
|
+
'uc-line-loader-ui': LineLoaderUi;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { LitBlock } from '../../../../../lit/LitBlock';
|
|
2
|
+
type PresenceToggleStyle = {
|
|
3
|
+
transition?: string;
|
|
4
|
+
visible?: string;
|
|
5
|
+
hidden?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare class PresenceToggle extends LitBlock {
|
|
8
|
+
private _visible;
|
|
9
|
+
private _styles;
|
|
10
|
+
private _visibleStyle;
|
|
11
|
+
private _hiddenStyle;
|
|
12
|
+
private _externalTransitions;
|
|
13
|
+
private _initialRenderComplete;
|
|
14
|
+
set visible(value: boolean);
|
|
15
|
+
get visible(): boolean;
|
|
16
|
+
set styles(styles: PresenceToggleStyle);
|
|
17
|
+
get styles(): PresenceToggleStyle;
|
|
18
|
+
private _handleVisible;
|
|
19
|
+
private _dispatchInitialRenderEvent;
|
|
20
|
+
initCallback(): void;
|
|
21
|
+
}
|
|
22
|
+
declare global {
|
|
23
|
+
interface HTMLElementTagNameMap {
|
|
24
|
+
'uc-presence-toggle': PresenceToggle;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { PropertyValues } from 'lit';
|
|
2
|
+
import { LitBlock } from '../../../../../lit/LitBlock';
|
|
3
|
+
export declare class SliderUi extends LitBlock {
|
|
4
|
+
private _observer?;
|
|
5
|
+
private _thumbSize;
|
|
6
|
+
private _zeroDotEl?;
|
|
7
|
+
private _stepsCount?;
|
|
8
|
+
private readonly _inputRef;
|
|
9
|
+
private readonly _thumbRef;
|
|
10
|
+
private readonly _stepsRef;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
min: number;
|
|
13
|
+
max: number;
|
|
14
|
+
defaultValue: number;
|
|
15
|
+
zero: number;
|
|
16
|
+
private _currentValue;
|
|
17
|
+
constructor();
|
|
18
|
+
private _emitSliderEvent;
|
|
19
|
+
private readonly _handleSliderInput;
|
|
20
|
+
private readonly _handleSliderChange;
|
|
21
|
+
private readonly _handleInputFocus;
|
|
22
|
+
private readonly _handleInputBlur;
|
|
23
|
+
protected firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
24
|
+
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
25
|
+
private _updateValue;
|
|
26
|
+
private _updateZeroDot;
|
|
27
|
+
private _updateSteps;
|
|
28
|
+
disconnectedCallback(): void;
|
|
29
|
+
private _setCurrentValue;
|
|
30
|
+
private _syncInputValue;
|
|
31
|
+
private _extractEventValue;
|
|
32
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
33
|
+
}
|
|
34
|
+
declare global {
|
|
35
|
+
interface HTMLElementTagNameMap {
|
|
36
|
+
'uc-slider-ui': SliderUi;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { CloudImageEditorBlock } from './CloudImageEditorBlock';
|
|
2
|
+
export { CropFrame } from './CropFrame';
|
|
3
|
+
export { EditorAspectRatioButtonControl, EditorFreeformButtonControl } from './EditorAspectRatioButtonControl';
|
|
4
|
+
export { EditorCropButtonControl } from './EditorCropButtonControl';
|
|
5
|
+
export { EditorFilterControl } from './EditorFilterControl';
|
|
6
|
+
export { EditorImageCropper } from './EditorImageCropper';
|
|
7
|
+
export { EditorImageFader } from './EditorImageFader';
|
|
8
|
+
export { EditorOperationControl } from './EditorOperationControl';
|
|
9
|
+
export { EditorScroller } from './EditorScroller';
|
|
10
|
+
export { EditorSlider } from './EditorSlider';
|
|
11
|
+
export { EditorToolbar } from './EditorToolbar';
|
|
12
|
+
export { BtnUi } from './elements/button/BtnUi';
|
|
13
|
+
export { LineLoaderUi } from './elements/line-loader/LineLoaderUi';
|
|
14
|
+
export { PresenceToggle } from './elements/presence-toggle/PresenceToggle';
|
|
15
|
+
export { SliderUi } from './elements/slider/SliderUi';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type ClassNameMapping = Record<string, boolean | undefined | null>;
|
|
2
|
+
type ClassNameArg = string | ClassNameMapping;
|
|
3
|
+
export declare function classNames(...args: ClassNameArg[]): string;
|
|
4
|
+
export declare function applyClassNames(element: Element, ...args: ClassNameArg[]): void;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function linspace(a: number, b: number, n: number): number[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ConfigType } from '../../../../types/exported';
|
|
2
|
+
import { CropAspectRatio, CropPresetList } from '../types';
|
|
3
|
+
export declare const parseCropPreset: (cropPreset: ConfigType["cropPreset"]) => CropAspectRatio[];
|
|
4
|
+
export declare const getClosestAspectRatio: (width: number, height: number, ratios: CropPresetList, tolerance?: number) => CropAspectRatio | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function pick<T extends object, K extends keyof T>(obj: T, keys: readonly K[]): Pick<T, K>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Transformations } from '../types';
|
|
2
|
+
type OperationDefaults = Readonly<Record<keyof Transformations, unknown>>;
|
|
3
|
+
export declare const OPERATIONS_DEFAULTS: OperationDefaults;
|
|
4
|
+
export declare function transformationsToOperations(transformations: Transformations): string;
|
|
5
|
+
export declare const COMMON_OPERATIONS: string;
|
|
6
|
+
export declare function operationsToTransformations(operations: string[]): Transformations;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CloudImageEditorBlock } from './CloudImageEditorBlock';
|
|
2
|
+
import { LoadingOperations, Transformations } from './types';
|
|
3
|
+
export declare function initState(fnCtx: CloudImageEditorBlock): {
|
|
4
|
+
'*originalUrl': null;
|
|
5
|
+
'*loadingOperations': LoadingOperations;
|
|
6
|
+
'*faderEl': null;
|
|
7
|
+
'*cropperEl': null;
|
|
8
|
+
'*imgEl': null;
|
|
9
|
+
'*imgContainerEl': null;
|
|
10
|
+
'*networkProblems': boolean;
|
|
11
|
+
'*imageSize': null;
|
|
12
|
+
'*editorTransformations': {};
|
|
13
|
+
'*cropPresetList': never[];
|
|
14
|
+
'*currentAspectRatio': null;
|
|
15
|
+
'*tabList': readonly ["crop", "tuning", "filters"];
|
|
16
|
+
'*tabId': "crop";
|
|
17
|
+
'*on.retryNetwork': () => void;
|
|
18
|
+
'*on.apply': (transformations: Transformations) => void;
|
|
19
|
+
'*on.cancel': () => void;
|
|
20
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: "<svg width='0' height='0' style='position:absolute'><symbol fill='none' viewBox='0 0 9 6' id='uc-icon-arrow-dropdown' xmlns='http://www.w3.org/2000/svg'><path stroke='currentColor' d='m1.5 1.667 3 2.666 3-2.666' opacity='.5'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-aspect-ratio' xmlns='http://www.w3.org/2000/svg'/><symbol viewBox='0 0 20 20' id='uc-icon-brightness' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M15 10a5 5 0 0 1-5 5m5-5a5 5 0 0 0-5-5m5 5h-5m0 5a5 5 0 0 1 0-10m0 10V5m0 15v-3M2.93 2.929 5.05 5.05M0 10h3m-.07 7.071 2.12-2.121M10 0v3m7.07 14.071-2.12-2.121M20 10h-3m.07-7.071L14.95 5.05m-.626 2.45H10m4.324 5H10'/></symbol><symbol fill='currentColor' viewBox='0 0 20 20' id='uc-icon-closeMax' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' d='M8.232 10 3.585 5.353l1.768-1.768L10 8.232l4.648-4.647 1.767 1.768L11.768 10l4.647 4.648-1.767 1.767L10 11.768l-4.647 4.647-1.768-1.767L8.232 10Z' clip-rule='evenodd'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-contrast' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M2 10a8 8 0 1 0 16 0 8 8 0 1 0-16 0m8-8v16m8-8h-8m7.598 2.5H10m6.24 2.5H10m7.6-7.5H10M16.242 5H10'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-crop' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M20 14H7.005C6.45 14 6 13.55 6 12.995V0M0 6h13.067c.515 0 .933.418.933.933V20M14.5.4 13 2l1.5 1.6M13 2h2a3 3 0 0 1 3 3v2M5.5 19.6 7 18l-1.5-1.6M7 18H5a3 3 0 0 1-3-3v-2'/></symbol><symbol fill='currentColor' viewBox='0 0 20 20' id='uc-icon-done' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' d='m18.057 6.333-9.365 9.125a1.25 1.25 0 0 1-1.768-.023L1.92 10.296l1.791-1.744 4.132 4.243 8.47-8.253 1.744 1.79Z' clip-rule='evenodd'/></symbol><symbol fill='currentColor' viewBox='0 0 25 24' id='uc-icon-edit-file' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' d='M18.558 2.804a.78.78 0 0 0-.557.235l-.008.007-2.472 2.46 3.847 3.848 2.46-2.473.004-.003a.78.78 0 0 0 0-1.108l-.004-.003-2.712-2.728a.78.78 0 0 0-.558-.235Zm-.248 7.613-3.852-3.852-8.93 8.887-1.516 5.41 5.41-1.515 8.888-8.93Zm-.636-8.934a2.28 2.28 0 0 1 2.512.505l2.702 2.717.002.002a2.278 2.278 0 0 1 0 3.234l-.002.002-12.541 12.602a.75.75 0 0 1-.33.193l-6.884 1.928a.75.75 0 0 1-.925-.924l1.928-6.885a.75.75 0 0 1 .193-.33l12.603-12.54a2.28 2.28 0 0 1 .742-.504Z' clip-rule='evenodd'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-enhance' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M19 13h-2m0 0a4 4 0 0 1-4-4m4 4a4 4 0 0 0-4 4m0-8V7m0 2a4 4 0 0 1-4 4m-2 0h2m0 0a4 4 0 0 1 4 4m0 0v2M8 8.5H6.5m0 0a2 2 0 0 1-2-2m2 2a2 2 0 0 0-2 2m0-4V5m0 1.5a2 2 0 0 1-2 2M1 8.5h1.5m0 0a2 2 0 0 1 2 2m0 0V12M12 3h-1m0 0a1 1 0 0 1-1-1m1 1a1 1 0 0 0-1 1m0-2V1m0 1a1 1 0 0 1-1 1M8 3h1m0 0a1 1 0 0 1 1 1m0 0v1'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-exposure' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M10 20v-3M2.93 2.929 5.05 5.05M0 10h3m-.07 7.071 2.12-2.121M10 0v3m7.07 14.071-2.12-2.121M20 10h-3m.07-7.071L14.95 5.05M5 10a5 5 0 1 0 10 0 5 5 0 1 0-10 0'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-filters' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M4.5 6.5a5.5 5.5 0 1 0 11 0 5.5 5.5 0 1 0-11 0m-3.5 6a5.5 5.5 0 1 0 11 0 5.5 5.5 0 1 0-11 0m7 0a5.5 5.5 0 1 0 11 0 5.5 5.5 0 1 0-11 0'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-flip' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M19.6 5 18 3.5 16.4 5m3.2 10L18 16.5 16.4 15M18 3.523v12.954M3.3 8.5h10.654c.301 0 .415-.395.159-.554L3.459 1.286A.3.3 0 0 0 3 1.542V8.2a.3.3 0 0 0 .3.3zm0 3h10.654c.301 0 .415.395.159.554l-10.654 6.66A.3.3 0 0 1 3 18.458v-6.66a.3.3 0 0 1 .3-.3z'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-gamma' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M17 3C9 6 2.5 11.5 2.5 17.5m0 0h1m-1 0v-1m14 1h1m-3 0h1m-3 0h1m-3 0h1m-3 0h1m-3 0h1m-3 0h1m-3-14v-1m0 3v-1m0 3v-1m0 3v-1m0 3v-1m0 3v-1m0 3v-1'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-mirror' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M5 .4 3.5 2 5 3.6M15 .4 16.5 2 15 3.6M3.52 2h12.957M8.5 16.7V6.046c0-.301-.394-.415-.554-.159L1.287 16.541a.3.3 0 0 0 .255.459H8.2a.3.3 0 0 0 .3-.3zm3 0V6.046c0-.301.395-.415.555-.159l6.659 10.654a.3.3 0 0 1-.255.459H11.8a.3.3 0 0 1-.3-.3z'/></symbol><symbol viewBox='0 0 40 40' id='uc-icon-original' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.5' d='M0 40 40 0'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-rotate' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M13.5.4 12 2l1.5 1.6M12.023 2H14.4A3.6 3.6 0 0 1 18 5.6V8M4 17h9a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1z'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-sad' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M2 17c4.418-4 11.582-4 16 0M16.5 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-11 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-saturation' xmlns='http://www.w3.org/2000/svg'><defs><linearGradient id='ruc-icon-id__a' x1='10.001' y1='1' x2='10.001' y2='19' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient></defs><circle cx='10.001' cy='10' r='9' transform='rotate(90 10 10)' fill='url(#ruc-icon-id__a)'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-slider' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M0 10h11m0 0a2 2 0 1 0 4 0m-4 0a2 2 0 1 1 4 0m0 0h5'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-tuning' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M8 10h11M1 10h4M1 4.5h11m3 0h4m-18 11h11m3 0h4m-7-11a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0M5 10a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0m7 5.5a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-vibrance' xmlns='http://www.w3.org/2000/svg'><path d='M2.125 5.64A8.96 8.96 0 0 0 1.001 10a8.96 8.96 0 0 0 1.124 4.36V5.64z' fill='url(#uuc-icon-id__a)'/><path d='M2.875 15.499V4.502a9.053 9.053 0 0 1 1.75-1.72v14.437a9.05 9.05 0 0 1-1.75-1.72z' fill='url(#uuc-icon-id__b)'/><path d='M5.375 17.722c.548.33 1.134.601 1.75.809V1.469a8.956 8.956 0 0 0-1.75.81v15.443z' fill='url(#uuc-icon-id__c)'/><path d='M7.875 1.253v17.495c.564.136 1.15.22 1.75.244V1.008a9 9 0 0 0-1.75.245z' fill='url(#uuc-icon-id__d)'/><path d='M10.375 1.008v17.984a9 9 0 0 0 1.75-.244V1.252a9 9 0 0 0-1.75-.244z' fill='url(#uuc-icon-id__e)'/><path d='M12.875 1.469V18.53a8.957 8.957 0 0 0 1.75-.808V2.277a8.957 8.957 0 0 0-1.75-.808z' fill='url(#uuc-icon-id__f)'/><path d='M15.375 2.78v14.44a9.053 9.053 0 0 0 1.75-1.72v-11a9.054 9.054 0 0 0-1.75-1.72z' fill='url(#uuc-icon-id__g)'/><path d='M17.875 5.638v8.724A8.959 8.959 0 0 0 19.001 10a8.96 8.96 0 0 0-1.126-4.362z' fill='url(#uuc-icon-id__h)'/><defs><linearGradient id='uuc-icon-id__a' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__b' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__c' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__d' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__e' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__f' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__g' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__h' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient></defs></symbol><symbol viewBox='0 0 20 20' id='uc-icon-warmth' xmlns='http://www.w3.org/2000/svg'><path d='m7.5 13.05.429.42.171-.175v-.244h-.6zm5 0h-.6v.245l.172.175.428-.42zM8.1 3.5c0-1.05.85-1.9 1.9-1.9V.4a3.1 3.1 0 0 0-3.1 3.1h1.2zm0 9.55V3.5H6.9v9.55h1.2zm-1 2.45c0-.79.315-1.506.829-2.03l-.858-.84A4.088 4.088 0 0 0 5.9 15.5h1.2zm2.9 2.9a2.9 2.9 0 0 1-2.9-2.9H5.9a4.1 4.1 0 0 0 4.1 4.1v-1.2zm2.9-2.9a2.9 2.9 0 0 1-2.9 2.9v1.2a4.1 4.1 0 0 0 4.1-4.1h-1.2zm-.829-2.03c.514.524.829 1.24.829 2.03h1.2c0-1.117-.447-2.13-1.171-2.87l-.858.84zM11.9 3.5v9.55h1.2V3.5h-1.2zM10 1.6c1.05 0 1.9.85 1.9 1.9h1.2A3.1 3.1 0 0 0 10 .4v1.2z' fill='currentColor'/><path d='M10 14V8' stroke='currentColor' stroke-width='1.2' stroke-linecap='round'/><path d='M14 3h3m-3 3h3m-3 3h3m-8 6.5a1 1 0 1 0 2 0 1 1 0 1 0-2 0' stroke='currentColor' stroke-width='1.2'/></symbol></svg>";
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export declare const TabId: Readonly<{
|
|
2
|
+
readonly CROP: "crop";
|
|
3
|
+
readonly TUNING: "tuning";
|
|
4
|
+
readonly FILTERS: "filters";
|
|
5
|
+
}>;
|
|
6
|
+
export type TabIdValue = (typeof TabId)[keyof typeof TabId];
|
|
7
|
+
export declare const ALL_TABS: readonly ["crop", "tuning", "filters"];
|
|
8
|
+
export declare const ALL_COLOR_OPERATIONS: readonly ["brightness", "exposure", "gamma", "contrast", "saturation", "vibrance", "warmth", "enhance"];
|
|
9
|
+
export type ColorOperation = (typeof ALL_COLOR_OPERATIONS)[number];
|
|
10
|
+
export declare const ALL_FILTERS: readonly ["adaris", "briaril", "calarel", "carris", "cynarel", "cyren", "elmet", "elonni", "enzana", "erydark", "fenralan", "ferand", "galen", "gavin", "gethriel", "iorill", "iothari", "iselva", "jadis", "lavra", "misiara", "namala", "nerion", "nethari", "pamaya", "sarnar", "sedis", "sewen", "sorahel", "sorlen", "tarian", "thellassan", "varriel", "varven", "vevera", "virkas", "yedis", "yllara", "zatvel", "zevcen"];
|
|
11
|
+
export type FilterId = (typeof ALL_FILTERS)[number];
|
|
12
|
+
export declare const ALL_CROP_OPERATIONS: readonly ["rotate", "mirror", "flip"];
|
|
13
|
+
export type CropOperation = (typeof ALL_CROP_OPERATIONS)[number];
|
|
14
|
+
/** KeypointsNumber is the number of keypoints loaded from each side of zero, not total number */
|
|
15
|
+
export declare const COLOR_OPERATIONS_CONFIG: Readonly<{
|
|
16
|
+
brightness: {
|
|
17
|
+
zero: number;
|
|
18
|
+
range: readonly [-100, 100];
|
|
19
|
+
keypointsNumber: number;
|
|
20
|
+
};
|
|
21
|
+
exposure: {
|
|
22
|
+
zero: number;
|
|
23
|
+
range: readonly [-500, 500];
|
|
24
|
+
keypointsNumber: number;
|
|
25
|
+
};
|
|
26
|
+
gamma: {
|
|
27
|
+
zero: number;
|
|
28
|
+
range: readonly [0, 1000];
|
|
29
|
+
keypointsNumber: number;
|
|
30
|
+
};
|
|
31
|
+
contrast: {
|
|
32
|
+
zero: number;
|
|
33
|
+
range: readonly [-100, 500];
|
|
34
|
+
keypointsNumber: number;
|
|
35
|
+
};
|
|
36
|
+
saturation: {
|
|
37
|
+
zero: number;
|
|
38
|
+
range: readonly [-100, 500];
|
|
39
|
+
keypointsNumber: number;
|
|
40
|
+
};
|
|
41
|
+
vibrance: {
|
|
42
|
+
zero: number;
|
|
43
|
+
range: readonly [-100, 500];
|
|
44
|
+
keypointsNumber: number;
|
|
45
|
+
};
|
|
46
|
+
warmth: {
|
|
47
|
+
zero: number;
|
|
48
|
+
range: readonly [-100, 100];
|
|
49
|
+
keypointsNumber: number;
|
|
50
|
+
};
|
|
51
|
+
enhance: {
|
|
52
|
+
zero: number;
|
|
53
|
+
range: readonly [0, 100];
|
|
54
|
+
keypointsNumber: number;
|
|
55
|
+
};
|
|
56
|
+
filter: {
|
|
57
|
+
zero: number;
|
|
58
|
+
range: readonly [0, 100];
|
|
59
|
+
keypointsNumber: number;
|
|
60
|
+
};
|
|
61
|
+
}>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mapping of loading resources per operation
|
|
3
|
+
*/
|
|
4
|
+
export type LoadingOperations = Map<string, Map<string, boolean>>;
|
|
5
|
+
/**
|
|
6
|
+
* Image size
|
|
7
|
+
*/
|
|
8
|
+
export interface ImageSize {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
}
|
|
12
|
+
export interface Rectangle {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
}
|
|
18
|
+
export interface Transformations {
|
|
19
|
+
enhance?: number;
|
|
20
|
+
brightness?: number;
|
|
21
|
+
exposure?: number;
|
|
22
|
+
gamma?: number;
|
|
23
|
+
contrast?: number;
|
|
24
|
+
saturation?: number;
|
|
25
|
+
vibrance?: number;
|
|
26
|
+
warmth?: number;
|
|
27
|
+
rotate?: number;
|
|
28
|
+
mirror?: boolean;
|
|
29
|
+
flip?: boolean;
|
|
30
|
+
filter?: {
|
|
31
|
+
name: string;
|
|
32
|
+
amount: number;
|
|
33
|
+
};
|
|
34
|
+
crop?: {
|
|
35
|
+
dimensions: [number, number];
|
|
36
|
+
coords: [number, number];
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export interface ApplyResult {
|
|
40
|
+
originalUrl: string;
|
|
41
|
+
cdnUrlModifiers: string;
|
|
42
|
+
cdnUrl: string;
|
|
43
|
+
transformations: Transformations;
|
|
44
|
+
}
|
|
45
|
+
export type ChangeResult = ApplyResult;
|
|
46
|
+
export interface CropAspectRatio {
|
|
47
|
+
type: 'aspect-ratio';
|
|
48
|
+
width: number;
|
|
49
|
+
height: number;
|
|
50
|
+
id: string;
|
|
51
|
+
hasFreeform?: boolean;
|
|
52
|
+
}
|
|
53
|
+
export type CropPresetList = CropAspectRatio[];
|
|
54
|
+
export type Direction = '' | 'n' | 's' | 'e' | 'w' | 'ne' | 'nw' | 'se' | 'sw';
|
|
55
|
+
export type FrameThumbs = Partial<Record<Direction, {
|
|
56
|
+
direction: Direction;
|
|
57
|
+
pathNode: SVGElement;
|
|
58
|
+
interactionNode: SVGElement;
|
|
59
|
+
groupNode: SVGElement;
|
|
60
|
+
}>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { nothing } from 'lit';
|
|
2
|
+
import { LitUploaderBlock } from '../../lit/LitUploaderBlock';
|
|
3
|
+
import { ChangeResult } from '../CloudImageEditor/src/types';
|
|
4
|
+
export type ActivityParams = {
|
|
5
|
+
internalId: string;
|
|
6
|
+
};
|
|
7
|
+
export declare class CloudImageEditorActivity extends LitUploaderBlock {
|
|
8
|
+
private _entry?;
|
|
9
|
+
private _editorConfig;
|
|
10
|
+
get activityParams(): ActivityParams;
|
|
11
|
+
initCallback(): void;
|
|
12
|
+
disconnectedCallback(): void;
|
|
13
|
+
private _handleApply;
|
|
14
|
+
private _handleCancel;
|
|
15
|
+
handleChange(event: CustomEvent<ChangeResult>): void;
|
|
16
|
+
private _mountEditor;
|
|
17
|
+
private _unmountEditor;
|
|
18
|
+
render(): import('lit-html').TemplateResult<1> | typeof nothing;
|
|
19
|
+
private _createEditorConfig;
|
|
20
|
+
}
|
|
21
|
+
declare global {
|
|
22
|
+
interface HTMLElementTagNameMap {
|
|
23
|
+
'uc-cloud-image-editor-activity': CloudImageEditorActivity;
|
|
24
|
+
}
|
|
25
|
+
}
|