@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,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Package: @uploadcare/file-uploader@1.28.0-alpha.0 (MIT)
|
|
4
|
+
* License: https://github.com/uploadcare/blob/main/LICENSE
|
|
5
|
+
* Built: 2026-03-02T14:46:15.080Z
|
|
6
|
+
*/
|
|
7
|
+
import "./Icon-CqTVC82Q.js";
|
|
8
|
+
import { t as UrlSource } from "./UrlSource-DZK5EBwT.js";
|
|
9
|
+
export { UrlSource };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Package: @uploadcare/file-uploader@1.28.0-alpha.0 (MIT)
|
|
4
|
+
* License: https://github.com/uploadcare/blob/main/LICENSE
|
|
5
|
+
* Built: 2026-03-02T14:46:15.080Z
|
|
6
|
+
*/
|
|
7
|
+
import { F as InternalEventType, ct as __decorate } from "./Icon-CqTVC82Q.js";
|
|
8
|
+
import { c as UploadSource } from "./plugins-DxjsQUa8.js";
|
|
9
|
+
import { n as LitActivityBlock, t as LitUploaderBlock } from "./LitUploaderBlock-BA34rzeU.js";
|
|
10
|
+
import { html } from "lit";
|
|
11
|
+
import { state } from "lit/decorators.js";
|
|
12
|
+
import { createRef, ref } from "lit/directives/ref.js";
|
|
13
|
+
var UrlSource = class extends LitUploaderBlock {
|
|
14
|
+
constructor(...c) {
|
|
15
|
+
super(...c), this._formState = { importDisabled: !0 }, this._inputRef = createRef(), this._handleInput = (e) => {
|
|
16
|
+
this._formState = { importDisabled: !(e.target?.value ?? "") };
|
|
17
|
+
}, this._handleUpload = (c) => {
|
|
18
|
+
c.preventDefault(), this.telemetryManager.sendEvent({
|
|
19
|
+
eventType: InternalEventType.ACTION_EVENT,
|
|
20
|
+
payload: { metadata: {
|
|
21
|
+
event: "upload-from-url",
|
|
22
|
+
node: this.tagName
|
|
23
|
+
} }
|
|
24
|
+
});
|
|
25
|
+
let l = this._inputRef.value?.value?.trim();
|
|
26
|
+
l && (this.api.addFileFromUrl(l, { source: UploadSource.URL }), this.$["*currentActivity"] = LitActivityBlock.activities.UPLOAD_LIST, this.modalManager?.open(LitActivityBlock.activities.UPLOAD_LIST));
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
firstUpdated() {
|
|
30
|
+
let e = this._inputRef.value;
|
|
31
|
+
e && (e.value = "", e.focus());
|
|
32
|
+
}
|
|
33
|
+
render() {
|
|
34
|
+
return html`
|
|
35
|
+
<uc-activity-header>
|
|
36
|
+
<button type="button" class="uc-mini-btn" @click=${this.historyBack} title=${this.l10n("back")} aria-label=${this.l10n("back")}>
|
|
37
|
+
<uc-icon name="back"></uc-icon>
|
|
38
|
+
</button>
|
|
39
|
+
<div>
|
|
40
|
+
<uc-icon name="url"></uc-icon>
|
|
41
|
+
<span>${this.l10n("caption-from-url")}</span>
|
|
42
|
+
</div>
|
|
43
|
+
<button
|
|
44
|
+
type="button"
|
|
45
|
+
class="uc-mini-btn uc-close-btn"
|
|
46
|
+
@click=${this.$["*closeModal"]}
|
|
47
|
+
title=${this.l10n("a11y-activity-header-button-close")}
|
|
48
|
+
aria-label=${this.l10n("a11y-activity-header-button-close")}
|
|
49
|
+
>
|
|
50
|
+
<uc-icon name="close"></uc-icon>
|
|
51
|
+
</button>
|
|
52
|
+
</uc-activity-header>
|
|
53
|
+
<form class="uc-content" @submit=${this._handleUpload}>
|
|
54
|
+
<label>
|
|
55
|
+
<input
|
|
56
|
+
${ref(this._inputRef)}
|
|
57
|
+
placeholder="https://"
|
|
58
|
+
class="uc-url-input"
|
|
59
|
+
type="text"
|
|
60
|
+
@input=${this._handleInput}
|
|
61
|
+
/>
|
|
62
|
+
</label>
|
|
63
|
+
<button
|
|
64
|
+
type="submit"
|
|
65
|
+
class="uc-url-upload-btn uc-primary-btn"
|
|
66
|
+
?disabled=${this._formState.importDisabled}
|
|
67
|
+
>${this.l10n("upload-url")}</button>
|
|
68
|
+
</form>
|
|
69
|
+
`;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
__decorate([state()], UrlSource.prototype, "_formState", void 0);
|
|
73
|
+
export { UrlSource as t };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { UploadcareGroup, Queue } from '@uploadcare/upload-client';
|
|
2
|
+
import { LitBlock } from '../lit/LitBlock';
|
|
3
|
+
import { OutputCollectionState, OutputErrorCollection } from '../types/index';
|
|
4
|
+
export declare const blockCtx: () => {};
|
|
5
|
+
export declare const activityBlockCtx: (fnCtx: LitBlock) => {
|
|
6
|
+
'*currentActivity': null;
|
|
7
|
+
'*currentActivityParams': {};
|
|
8
|
+
'*history': never[];
|
|
9
|
+
'*historyBack': null;
|
|
10
|
+
'*closeModal': () => void;
|
|
11
|
+
};
|
|
12
|
+
export declare const uploaderBlockCtx: (fnCtx: LitBlock) => {
|
|
13
|
+
'*commonProgress': number;
|
|
14
|
+
'*uploadList': never[];
|
|
15
|
+
'*uploadQueue': Queue;
|
|
16
|
+
'*collectionErrors': OutputErrorCollection[];
|
|
17
|
+
'*collectionState': OutputCollectionState | null;
|
|
18
|
+
'*groupInfo': UploadcareGroup | null;
|
|
19
|
+
'*uploadTrigger': Set<string>;
|
|
20
|
+
'*currentActivity': null;
|
|
21
|
+
'*currentActivityParams': {};
|
|
22
|
+
'*history': never[];
|
|
23
|
+
'*historyBack': null;
|
|
24
|
+
'*closeModal': () => void;
|
|
25
|
+
};
|
|
26
|
+
export declare const solutionBlockCtx: (fnCtx: LitBlock) => {
|
|
27
|
+
'*solution': string | null;
|
|
28
|
+
'*commonProgress': number;
|
|
29
|
+
'*uploadList': never[];
|
|
30
|
+
'*uploadQueue': Queue;
|
|
31
|
+
'*collectionErrors': OutputErrorCollection[];
|
|
32
|
+
'*collectionState': OutputCollectionState | null;
|
|
33
|
+
'*groupInfo': UploadcareGroup | null;
|
|
34
|
+
'*uploadTrigger': Set<string>;
|
|
35
|
+
'*currentActivity': null;
|
|
36
|
+
'*currentActivityParams': {};
|
|
37
|
+
'*history': never[];
|
|
38
|
+
'*historyBack': null;
|
|
39
|
+
'*closeModal': () => void;
|
|
40
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Uid } from '../lit/Uid';
|
|
2
|
+
import { TypedData } from './TypedData';
|
|
3
|
+
type ChangeMap<T extends Record<string, unknown>> = Record<keyof T, Set<Uid>>;
|
|
4
|
+
type TypedCollectionPropertyObserver<T extends Record<string, unknown>> = (changeMap: ChangeMap<T>) => void;
|
|
5
|
+
export type TypedCollectionObserverHandler<T extends Record<string, unknown>> = (list: Uid[], added: Set<TypedData<T>>, removed: Set<TypedData<T>>) => void;
|
|
6
|
+
type TypedCollectionOptions<T extends Record<string, unknown>> = {
|
|
7
|
+
initialValue: T;
|
|
8
|
+
watchList?: (keyof T)[];
|
|
9
|
+
handler?: TypedCollectionObserverHandler<T>;
|
|
10
|
+
};
|
|
11
|
+
export declare class TypedCollection<T extends Record<string, unknown>> {
|
|
12
|
+
private static readonly _destroyDelayMs;
|
|
13
|
+
private _ctxId;
|
|
14
|
+
private _data;
|
|
15
|
+
private _watchList;
|
|
16
|
+
private _subsMap;
|
|
17
|
+
private _propertyObservers;
|
|
18
|
+
private _collectionObservers;
|
|
19
|
+
private _items;
|
|
20
|
+
private _removed;
|
|
21
|
+
private _added;
|
|
22
|
+
private _markedToDestroy;
|
|
23
|
+
private _observeTimeout?;
|
|
24
|
+
private _notifyTimeout?;
|
|
25
|
+
private _destroyTimeout?;
|
|
26
|
+
private _notifyObservers;
|
|
27
|
+
private _initialValue;
|
|
28
|
+
constructor(options: TypedCollectionOptions<T>);
|
|
29
|
+
private _notify;
|
|
30
|
+
private _scheduleDestroyMarkedItems;
|
|
31
|
+
observeCollection(handler: TypedCollectionObserverHandler<T>): () => void;
|
|
32
|
+
unobserveCollection(handler: TypedCollectionObserverHandler<T>): void;
|
|
33
|
+
add(init: Partial<T>): Uid;
|
|
34
|
+
hasItem(id: Uid): boolean;
|
|
35
|
+
read(id: Uid): TypedData<T> | null;
|
|
36
|
+
readProp<K extends keyof T>(id: Uid, propName: K): T[K];
|
|
37
|
+
publishProp<K extends keyof T>(id: Uid, propName: K, value: T[K]): void;
|
|
38
|
+
remove(id: Uid): void;
|
|
39
|
+
clearAll(): void;
|
|
40
|
+
observeProperties(handler: TypedCollectionPropertyObserver<T>): () => void;
|
|
41
|
+
unobserveProperties(handler: TypedCollectionPropertyObserver<T>): void;
|
|
42
|
+
findItems(checkFn: (item: TypedData<T>) => boolean): Uid[];
|
|
43
|
+
items(): Uid[];
|
|
44
|
+
get size(): number;
|
|
45
|
+
destroy(): void;
|
|
46
|
+
}
|
|
47
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Uid } from '../lit/Uid';
|
|
2
|
+
export declare class TypedData<T extends Record<string, unknown>> {
|
|
3
|
+
private _ctxId;
|
|
4
|
+
private _data;
|
|
5
|
+
constructor(initialValue: T);
|
|
6
|
+
get uid(): Uid;
|
|
7
|
+
setValue<K extends keyof T>(prop: K, value: T[K]): void;
|
|
8
|
+
setMultipleValues(updObj: Partial<T>): void;
|
|
9
|
+
getValue<K extends keyof T>(prop: K): T[K];
|
|
10
|
+
subscribe<K extends keyof T>(prop: K, handler: (newVal: T[K]) => void): import('../lit/PubSubCompat').Unsubscriber;
|
|
11
|
+
destroy(): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ModeCameraType } from '../blocks/CameraSource/constants';
|
|
2
|
+
import { ActivityParamsMap, ActivityType } from '../lit/LitActivityBlock';
|
|
3
|
+
import { SharedInstance } from '../lit/shared-instances';
|
|
4
|
+
import { OutputCollectionStatus, OutputFileEntry, OutputFileStatus } from '../types/index';
|
|
5
|
+
import { buildOutputCollectionState } from './buildOutputCollectionState';
|
|
6
|
+
import { UploadEntryData } from './uploadEntrySchema';
|
|
7
|
+
export type ApiAddFileCommonOptions = {
|
|
8
|
+
silent?: boolean;
|
|
9
|
+
fileName?: string;
|
|
10
|
+
source?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare class UploaderPublicApi extends SharedInstance {
|
|
13
|
+
private _l10n;
|
|
14
|
+
get _uploadCollection(): import('./TypedCollection').TypedCollection<UploadEntryData>;
|
|
15
|
+
get cfg(): Readonly<import('..').ConfigType>;
|
|
16
|
+
get l10n(): (str: string, variables?: Record<string, string | number>) => string;
|
|
17
|
+
/**
|
|
18
|
+
* TODO: Probably we should not allow user to override `source` property
|
|
19
|
+
*/
|
|
20
|
+
addFileFromUrl: (url: string, { silent, fileName, source }?: ApiAddFileCommonOptions) => OutputFileEntry<"idle">;
|
|
21
|
+
addFileFromUuid: (uuid: string, { silent, fileName, source }?: ApiAddFileCommonOptions) => OutputFileEntry<"idle">;
|
|
22
|
+
addFileFromCdnUrl: (cdnUrl: string, { silent, fileName, source }?: ApiAddFileCommonOptions) => OutputFileEntry<"idle">;
|
|
23
|
+
addFileFromObject: (file: File, { silent, fileName, source, fullPath, }?: ApiAddFileCommonOptions & {
|
|
24
|
+
fullPath?: string;
|
|
25
|
+
}) => OutputFileEntry<"idle">;
|
|
26
|
+
removeFileByInternalId: (internalId: string) => void;
|
|
27
|
+
removeAllFiles(): void;
|
|
28
|
+
uploadAll: () => void;
|
|
29
|
+
openSystemDialog: (options?: {
|
|
30
|
+
captureCamera?: boolean;
|
|
31
|
+
modeCamera?: ModeCameraType;
|
|
32
|
+
}) => void;
|
|
33
|
+
getOutputItem<TStatus extends OutputFileStatus>(entryId: string): OutputFileEntry<TStatus>;
|
|
34
|
+
getOutputCollectionState<TStatus extends OutputCollectionStatus>(): ReturnType<typeof buildOutputCollectionState<TStatus>>;
|
|
35
|
+
initFlow: (force?: boolean) => void;
|
|
36
|
+
doneFlow: () => void;
|
|
37
|
+
setCurrentActivity: <T extends ActivityType>(activityType: T, ...params: T extends keyof ActivityParamsMap ? [ActivityParamsMap[T]] extends [never] ? [] : [ActivityParamsMap[T]] : []) => void;
|
|
38
|
+
getCurrentActivity: () => ActivityType;
|
|
39
|
+
setModalState: (opened: boolean) => void;
|
|
40
|
+
private get _sourceList();
|
|
41
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { SharedInstancesBag } from '../lit/shared-instances';
|
|
2
|
+
import { GroupFlag, OutputCollectionState, OutputCollectionStatus } from '../types/index';
|
|
3
|
+
export declare function buildOutputCollectionState<TCollectionStatus extends OutputCollectionStatus, TGroupFlag extends GroupFlag = 'maybe-has-group'>(bag: SharedInstancesBag): OutputCollectionState<TCollectionStatus, TGroupFlag>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom configuration options registration system for plugins
|
|
3
|
+
*/
|
|
4
|
+
export type CustomConfigDefinition<T = unknown> = {
|
|
5
|
+
/**
|
|
6
|
+
* Config option name (will be used as property and optionally as attribute)
|
|
7
|
+
*/
|
|
8
|
+
name: string;
|
|
9
|
+
/**
|
|
10
|
+
* Default value for the config option
|
|
11
|
+
*/
|
|
12
|
+
defaultValue: T;
|
|
13
|
+
/**
|
|
14
|
+
* Whether this config can be set via HTML attribute
|
|
15
|
+
* @default true
|
|
16
|
+
*/
|
|
17
|
+
attribute?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Convert attribute string to config value
|
|
20
|
+
* Only used if attribute is true
|
|
21
|
+
*/
|
|
22
|
+
fromAttribute?: (value: string | null) => T;
|
|
23
|
+
/**
|
|
24
|
+
* Convert config value to attribute string
|
|
25
|
+
* Only used if attribute is true
|
|
26
|
+
*/
|
|
27
|
+
toAttribute?: (value: T) => string | null;
|
|
28
|
+
/**
|
|
29
|
+
* Normalize/validate the config value
|
|
30
|
+
*/
|
|
31
|
+
normalize?: (value: unknown) => T;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Custom config definition with plugin ownership tracking
|
|
35
|
+
*/
|
|
36
|
+
export type OwnedCustomConfigDefinition<T = unknown> = CustomConfigDefinition<T> & {
|
|
37
|
+
pluginId: string;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Registry for custom config options defined by plugins
|
|
41
|
+
* This is managed by the PluginManager as a shared instance property
|
|
42
|
+
*/
|
|
43
|
+
export declare class CustomConfigRegistry {
|
|
44
|
+
private _definitions;
|
|
45
|
+
register<T = unknown>(pluginId: string, definition: CustomConfigDefinition<T>): void;
|
|
46
|
+
unregister(name: string): void;
|
|
47
|
+
unregisterByPlugin(pluginId: string): void;
|
|
48
|
+
get(name: string): CustomConfigDefinition<any> | undefined;
|
|
49
|
+
getAll(): Map<string, CustomConfigDefinition<any>>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Interface for TypeScript module augmentation
|
|
53
|
+
* Plugins should extend this interface to add their custom config types
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```typescript
|
|
57
|
+
* declare module '@uploadcare/file-uploader' {
|
|
58
|
+
* interface CustomConfig {
|
|
59
|
+
* 'my-custom-option': string;
|
|
60
|
+
* }
|
|
61
|
+
* }
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
export interface CustomConfig {
|
|
65
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function defineComponents(blockExports: Record<string, any>): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SharedInstance, SharedInstancesBag } from '../../lit/shared-instances';
|
|
2
|
+
export type PasteScope = 'local' | 'global' | false;
|
|
3
|
+
export declare class ClipboardLayer extends SharedInstance {
|
|
4
|
+
private scopes;
|
|
5
|
+
private listener;
|
|
6
|
+
constructor(sharedInstancesBag: SharedInstancesBag);
|
|
7
|
+
private openUploadList;
|
|
8
|
+
private _listener;
|
|
9
|
+
private handlePaste;
|
|
10
|
+
registerBlock(scope: Node): () => void;
|
|
11
|
+
destroy(): void;
|
|
12
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const UC_WINDOW_KEY = "UC";
|
|
1
|
+
export declare const UC_WINDOW_KEY = "UC";
|
|
2
2
|
type IndexModule = Record<string, any>;
|
|
3
3
|
declare global {
|
|
4
4
|
interface Window {
|
|
@@ -9,6 +9,5 @@ declare global {
|
|
|
9
9
|
* @param url File Uploader pack url
|
|
10
10
|
* @param [register] Register connected package, if it not registered yet
|
|
11
11
|
*/
|
|
12
|
-
declare function loadFileUploaderFrom(url: string, register?: boolean): Promise<IndexModule | null>;
|
|
13
|
-
|
|
14
|
-
export { UC_WINDOW_KEY, loadFileUploaderFrom };
|
|
12
|
+
export declare function loadFileUploaderFrom(url: string, register?: boolean): Promise<IndexModule | null>;
|
|
13
|
+
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
* @license
|
|
3
|
+
* Package: @uploadcare/file-uploader@1.28.0-alpha.0 (MIT)
|
|
4
|
+
* License: https://github.com/uploadcare/blob/main/LICENSE
|
|
5
|
+
* Built: 2026-03-02T14:46:15.080Z
|
|
6
|
+
*/
|
|
7
|
+
import { n as loadFileUploaderFrom, t as UC_WINDOW_KEY } from "../loadFileUploaderFrom-BWJM43Yq.js";
|
|
8
|
+
export { UC_WINDOW_KEY, loadFileUploaderFrom };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as en } from '../locales/file-uploader/en';
|
|
2
|
+
export type LocaleDefinition = typeof en;
|
|
3
|
+
export type LocaleDefinitionResolver = () => Promise<LocaleDefinition>;
|
|
4
|
+
export declare const defineLocale: (localeName: string, definitionOrResolver: LocaleDefinition | LocaleDefinitionResolver) => void;
|
|
5
|
+
export declare const resolveLocaleDefinition: (localeName: string) => Promise<LocaleDefinition>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SharedInstance, SharedInstancesBag } from '../../lit/shared-instances';
|
|
2
|
+
import { LocaleDefinition } from '../localeRegistry';
|
|
3
|
+
export declare const localeStateKey: <T extends keyof LocaleDefinition>(key: T) => `*l10n/${T}`;
|
|
4
|
+
export declare const DEFAULT_LOCALE = "en";
|
|
5
|
+
export declare class LocaleManager extends SharedInstance {
|
|
6
|
+
private _localeName;
|
|
7
|
+
constructor(sharedInstancesBag: SharedInstancesBag);
|
|
8
|
+
private _applyOverrides;
|
|
9
|
+
private _applyPluginLocales;
|
|
10
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Modal as ModalNode } from '../../blocks/Modal/Modal';
|
|
2
|
+
import { ActivityType } from '../../lit/LitActivityBlock';
|
|
3
|
+
import { SharedInstance } from '../../lit/shared-instances';
|
|
4
|
+
export declare const ModalEvents: Readonly<{
|
|
5
|
+
readonly ADD: "modal:add";
|
|
6
|
+
readonly DELETE: "modal:delete";
|
|
7
|
+
readonly OPEN: "modal:open";
|
|
8
|
+
readonly CLOSE: "modal:close";
|
|
9
|
+
readonly CLOSE_ALL: "modal:closeAll";
|
|
10
|
+
readonly DESTROY: "modal:destroy";
|
|
11
|
+
}>;
|
|
12
|
+
export type ModalId = ActivityType;
|
|
13
|
+
export type ModalCb = (data: {
|
|
14
|
+
id: ModalId;
|
|
15
|
+
modal: ModalNode;
|
|
16
|
+
}) => void;
|
|
17
|
+
export type ModalEventType = (typeof ModalEvents)[keyof typeof ModalEvents];
|
|
18
|
+
export declare class ModalManager extends SharedInstance {
|
|
19
|
+
private _modals;
|
|
20
|
+
private _activeModals;
|
|
21
|
+
private _subscribers;
|
|
22
|
+
/**
|
|
23
|
+
* Register a modal with the manager
|
|
24
|
+
* @param id Unique identifier for the modal
|
|
25
|
+
* @param modal Modal component instance
|
|
26
|
+
*/
|
|
27
|
+
registerModal(id: ModalId, modal: ModalNode): void;
|
|
28
|
+
/** Remove a modal by ID. */
|
|
29
|
+
deleteModal(id: ModalId): boolean;
|
|
30
|
+
/** Open a modal by its ID. */
|
|
31
|
+
open(id: ModalId): boolean;
|
|
32
|
+
/** Close a specific modal by ID. */
|
|
33
|
+
close(id: ModalId): boolean;
|
|
34
|
+
/** Toggle a modal - open if closed, close if open. */
|
|
35
|
+
toggle(id: ModalId): boolean;
|
|
36
|
+
/** True if there are any active modals. */
|
|
37
|
+
get hasActiveModals(): boolean;
|
|
38
|
+
/** Close the most recently opened modal and return to the previous one. */
|
|
39
|
+
back(): boolean;
|
|
40
|
+
/** Close all open modals. */
|
|
41
|
+
closeAll(): number;
|
|
42
|
+
/**
|
|
43
|
+
* Subscribe to modal events
|
|
44
|
+
* @returns Unsubscribe function
|
|
45
|
+
*/
|
|
46
|
+
subscribe(event: ModalEventType, callback: ModalCb): () => void;
|
|
47
|
+
/** Unsubscribe from modal events */
|
|
48
|
+
unsubscribe(event: ModalEventType, callback: ModalCb | undefined): void;
|
|
49
|
+
/** Notify all subscribers of a modal event. */
|
|
50
|
+
private _notify;
|
|
51
|
+
/** Destroy the modal manager, clean up resources */
|
|
52
|
+
destroy(): void;
|
|
53
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SharedInstance } from '../../lit/shared-instances';
|
|
2
|
+
import { SecureUploadsSignatureAndExpire } from '../../types/index';
|
|
3
|
+
export declare class SecureUploadsManager extends SharedInstance {
|
|
4
|
+
private _secureToken;
|
|
5
|
+
getSecureToken(): Promise<SecureUploadsSignatureAndExpire | null>;
|
|
6
|
+
destroy(): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { TelemetryRequest } from '@uploadcare/quality-insights';
|
|
2
|
+
import { EventKey, InternalEventKey } from '../../blocks/UploadCtxProvider/EventEmitter';
|
|
3
|
+
import { SharedInstance, SharedInstancesBag } from '../../lit/shared-instances';
|
|
4
|
+
type CommonEventType = InternalEventKey | EventKey;
|
|
5
|
+
type TelemetryState = TelemetryRequest & {
|
|
6
|
+
eventTimestamp: number;
|
|
7
|
+
location: string;
|
|
8
|
+
};
|
|
9
|
+
type TelemetryEventBody = Partial<Pick<TelemetryState, 'payload' | 'config'>> & {
|
|
10
|
+
modalId?: string;
|
|
11
|
+
eventType?: CommonEventType;
|
|
12
|
+
};
|
|
13
|
+
export declare class TelemetryManager extends SharedInstance {
|
|
14
|
+
private readonly _sessionId;
|
|
15
|
+
private readonly _telemetryInstance;
|
|
16
|
+
private _config;
|
|
17
|
+
private _initialized;
|
|
18
|
+
private _lastPayload;
|
|
19
|
+
private readonly _queue;
|
|
20
|
+
private _isEnabled;
|
|
21
|
+
constructor(sharedInstancesBag: SharedInstancesBag);
|
|
22
|
+
private _init;
|
|
23
|
+
private _setConfig;
|
|
24
|
+
private _formattingPayload;
|
|
25
|
+
private _excludedEvents;
|
|
26
|
+
sendEvent(body: TelemetryEventBody): void;
|
|
27
|
+
sendEventError(error: unknown, context?: string): void;
|
|
28
|
+
/**
|
|
29
|
+
* Method to send telemetry event for Cloud Image Editor.
|
|
30
|
+
*/
|
|
31
|
+
sendEventCloudImageEditor(e: MouseEvent, tabId: string, options?: Record<string, unknown>): void;
|
|
32
|
+
/**
|
|
33
|
+
* Deeply compares two objects and returns true if they are equal, false otherwise.
|
|
34
|
+
*/
|
|
35
|
+
private _checkObj;
|
|
36
|
+
private get _timestamp();
|
|
37
|
+
private get _solution();
|
|
38
|
+
private get _activity();
|
|
39
|
+
private get _location();
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SharedInstance, SharedInstancesBag } from '../../lit/shared-instances';
|
|
2
|
+
import { Uid } from '../../lit/Uid';
|
|
3
|
+
import { OutputCollectionStatus, OutputErrorCollection, OutputErrorFile, OutputFileEntry, UploaderPublicApi } from '../../types';
|
|
4
|
+
import { buildOutputCollectionState } from '../buildOutputCollectionState';
|
|
5
|
+
import { TypedData } from '../TypedData';
|
|
6
|
+
import { UploadEntryData } from '../uploadEntrySchema';
|
|
7
|
+
export type FuncFileValidator = (outputEntry: OutputFileEntry, api: UploaderPublicApi, options?: {
|
|
8
|
+
signal?: AbortSignal;
|
|
9
|
+
}) => undefined | OutputErrorFile | Promise<undefined | OutputErrorFile>;
|
|
10
|
+
export type FileValidatorDescriptor = {
|
|
11
|
+
runOn: 'add' | 'upload' | 'change';
|
|
12
|
+
validator: FuncFileValidator;
|
|
13
|
+
};
|
|
14
|
+
export type FileValidator = FileValidatorDescriptor | FuncFileValidator;
|
|
15
|
+
export type FuncCollectionValidator = (collection: ReturnType<typeof buildOutputCollectionState<OutputCollectionStatus>>, api: UploaderPublicApi) => undefined | OutputErrorCollection;
|
|
16
|
+
export declare class ValidationManager extends SharedInstance {
|
|
17
|
+
private get _uploadCollection();
|
|
18
|
+
private _commonFileValidators;
|
|
19
|
+
private _commonCollectionValidators;
|
|
20
|
+
private _queue;
|
|
21
|
+
private _runQueueDebounced;
|
|
22
|
+
private _isDestroyed;
|
|
23
|
+
private _entryValidationState;
|
|
24
|
+
constructor(sharedInstancesBag: SharedInstancesBag);
|
|
25
|
+
runFileValidators(runOn: FileValidatorDescriptor['runOn'], entryIds?: Uid[]): void;
|
|
26
|
+
runCollectionValidators(): void;
|
|
27
|
+
cleanupValidationForEntry(entry: TypedData<UploadEntryData>): void;
|
|
28
|
+
private _runFileValidatorsForEntry;
|
|
29
|
+
private _addCustomTypeToValidationError;
|
|
30
|
+
private _getEntryValidationState;
|
|
31
|
+
private _getValidatorDescriptors;
|
|
32
|
+
private _getValidatorDescriptorsForEntry;
|
|
33
|
+
destroy(): void;
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LitBlock } from '../../lit/LitBlock';
|
|
2
|
+
import { ISharedInstance } from '../../lit/shared-instances';
|
|
3
|
+
export declare class A11y implements ISharedInstance {
|
|
4
|
+
private _destroyKeyUX;
|
|
5
|
+
private readonly _scopedWindow;
|
|
6
|
+
constructor();
|
|
7
|
+
registerBlock(scope: LitBlock): void;
|
|
8
|
+
destroy(): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SharedInstance, SharedInstancesBag } from '../../../lit/shared-instances';
|
|
2
|
+
import { CustomConfigRegistry } from '../../customConfigOptions';
|
|
3
|
+
import { PluginRegistrySnapshot } from './PluginTypes';
|
|
4
|
+
export declare class PluginManager extends SharedInstance {
|
|
5
|
+
private _plugins;
|
|
6
|
+
private _sources;
|
|
7
|
+
private _activities;
|
|
8
|
+
private _fileActions;
|
|
9
|
+
private _fileHooks;
|
|
10
|
+
private _icons;
|
|
11
|
+
private _i18n;
|
|
12
|
+
private _subscribers;
|
|
13
|
+
private _pluginsUpdate;
|
|
14
|
+
readonly configRegistry: CustomConfigRegistry;
|
|
15
|
+
constructor(sharedInstancesBag: SharedInstancesBag);
|
|
16
|
+
onPluginsChange(callback: () => void): () => void;
|
|
17
|
+
private _syncPlugins;
|
|
18
|
+
private _registerPlugin;
|
|
19
|
+
private _unregisterPlugin;
|
|
20
|
+
snapshot(): PluginRegistrySnapshot;
|
|
21
|
+
destroy(): void;
|
|
22
|
+
private _register;
|
|
23
|
+
private _purgeRegistrations;
|
|
24
|
+
private _notifySubscribers;
|
|
25
|
+
}
|