@uploadcare/file-uploader 1.27.0 → 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 +10 -4
- 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,492 @@
|
|
|
1
|
+
import { PasteScope } from '../abstract/features/ClipboardLayer';
|
|
2
|
+
import { LocaleDefinition } from '../abstract/localeRegistry';
|
|
3
|
+
import { UploaderPlugin } from '../abstract/managers/plugin';
|
|
4
|
+
import { FileValidator, FileValidatorDescriptor, FuncCollectionValidator, FuncFileValidator } from '../abstract/managers/ValidationManager';
|
|
5
|
+
import { CameraMode } from '../blocks/CameraSource/CameraSource';
|
|
6
|
+
import { complexConfigKeys } from '../blocks/Config/Config';
|
|
7
|
+
import { FilesViewMode } from '../blocks/UploadList/UploadList';
|
|
8
|
+
import { Metadata, NetworkError, UploadcareFile, UploadcareGroup, UploadError } from '@uploadcare/upload-client';
|
|
9
|
+
import { SourceTypes } from '../utils/UploadSource';
|
|
10
|
+
import { EventPayload, EventType } from '../blocks/UploadCtxProvider/EventEmitter';
|
|
11
|
+
export { Metadata, NetworkError, UploadcareError, UploadcareFile, UploadcareGroup, UploadError, } from '@uploadcare/upload-client';
|
|
12
|
+
export type { FuncFileValidator, FuncCollectionValidator, FileValidator, FileValidatorDescriptor };
|
|
13
|
+
export type { UploaderPlugin } from '../abstract/managers/plugin';
|
|
14
|
+
export type { ApiAddFileCommonOptions, UploaderPublicApi } from '../abstract/UploaderPublicApi';
|
|
15
|
+
export type { SourceTypes };
|
|
16
|
+
export type MetadataCallback = (fileEntry: OutputFileEntry) => Promise<Metadata> | Metadata;
|
|
17
|
+
export type LocaleDefinitionOverride = Record<string, Partial<LocaleDefinition>>;
|
|
18
|
+
export type SecureDeliveryProxyUrlResolver = (previewUrl: string, urlParts: {
|
|
19
|
+
uuid: string;
|
|
20
|
+
cdnUrlModifiers: string;
|
|
21
|
+
fileName: string;
|
|
22
|
+
}) => Promise<string> | string;
|
|
23
|
+
export type SecureUploadsSignatureAndExpire = {
|
|
24
|
+
secureSignature: string;
|
|
25
|
+
secureExpire: string;
|
|
26
|
+
};
|
|
27
|
+
export type SecureUploadsSignatureResolver = () => Promise<SecureUploadsSignatureAndExpire | null>;
|
|
28
|
+
export type IconHrefResolver = (iconName: string) => string;
|
|
29
|
+
export type FileValidators = FileValidator[];
|
|
30
|
+
export type CollectionValidators = FuncCollectionValidator[];
|
|
31
|
+
export type ConfigType = {
|
|
32
|
+
/**
|
|
33
|
+
* Your project’s Public Key.
|
|
34
|
+
*/
|
|
35
|
+
pubkey: string;
|
|
36
|
+
/**
|
|
37
|
+
* Allow multiple file uploads.
|
|
38
|
+
*/
|
|
39
|
+
multiple: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Minimum number of files to upload.
|
|
42
|
+
*/
|
|
43
|
+
multipleMin: number;
|
|
44
|
+
/**
|
|
45
|
+
* Maximum number of files to upload.
|
|
46
|
+
*/
|
|
47
|
+
multipleMax: number;
|
|
48
|
+
/**
|
|
49
|
+
* Require user confirmation before uploading.
|
|
50
|
+
*/
|
|
51
|
+
confirmUpload: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Allow only image files.
|
|
54
|
+
*/
|
|
55
|
+
imgOnly: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Native file input accept attribute value. Also affects client validation settings.
|
|
58
|
+
*/
|
|
59
|
+
accept: string;
|
|
60
|
+
/**
|
|
61
|
+
* Preferred types for external sources.
|
|
62
|
+
* See [here](https://uploadcare.com/docs/file-uploader/options/#external-sources-preferred-types)
|
|
63
|
+
*/
|
|
64
|
+
externalSourcesPreferredTypes: string;
|
|
65
|
+
/**
|
|
66
|
+
* Provide custom CSS to the social sources iframe
|
|
67
|
+
*/
|
|
68
|
+
externalSourcesEmbedCss: string;
|
|
69
|
+
/**
|
|
70
|
+
* Store uploaded files.
|
|
71
|
+
*/
|
|
72
|
+
store: boolean | 'auto';
|
|
73
|
+
/**
|
|
74
|
+
* Mirror the camera view.
|
|
75
|
+
*/
|
|
76
|
+
cameraMirror: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Default camera capture mode.
|
|
79
|
+
*/
|
|
80
|
+
cameraCapture: 'user' | 'environment' | '';
|
|
81
|
+
/**
|
|
82
|
+
* List of sources for file uploads.
|
|
83
|
+
*/
|
|
84
|
+
sourceList: string;
|
|
85
|
+
/**
|
|
86
|
+
* Top-level origin for the uploader.
|
|
87
|
+
* This is used for Google Drive Picker if there is no access to the origin due to the cross-origin policy.
|
|
88
|
+
*/
|
|
89
|
+
topLevelOrigin: string;
|
|
90
|
+
/**
|
|
91
|
+
* Maximum size of local files in bytes.
|
|
92
|
+
*/
|
|
93
|
+
maxLocalFileSizeBytes: number;
|
|
94
|
+
/**
|
|
95
|
+
* Thumbnail size.
|
|
96
|
+
*/
|
|
97
|
+
thumbSize: number;
|
|
98
|
+
/**
|
|
99
|
+
* Show the upload list even if it is empty.
|
|
100
|
+
*/
|
|
101
|
+
showEmptyList: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Use local image editor.
|
|
104
|
+
*/
|
|
105
|
+
useLocalImageEditor: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Enable cloud image editing.
|
|
108
|
+
*/
|
|
109
|
+
useCloudImageEditor: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Tabs to show in the cloud image editor.
|
|
112
|
+
*
|
|
113
|
+
* @default 'crop, tuning, filters'
|
|
114
|
+
*/
|
|
115
|
+
cloudImageEditorTabs: string;
|
|
116
|
+
/**
|
|
117
|
+
* Remove copyright information.
|
|
118
|
+
*/
|
|
119
|
+
removeCopyright: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Defines the crop behavior. When uploading images, your users can select a crop area with a defined aspect ratio.
|
|
122
|
+
*/
|
|
123
|
+
cropPreset: string;
|
|
124
|
+
/**
|
|
125
|
+
* Image shrink options.
|
|
126
|
+
*/
|
|
127
|
+
imageShrink: string;
|
|
128
|
+
/**
|
|
129
|
+
* Lock scroll when modal is open.
|
|
130
|
+
*/
|
|
131
|
+
modalScrollLock: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Show strokes on modal backdrop.
|
|
134
|
+
*/
|
|
135
|
+
modalBackdropStrokes: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Wrap the source list.
|
|
138
|
+
*/
|
|
139
|
+
sourceListWrap: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* Key to revoke Custom OAuth access. See [OAuth docs](https://uploadcare.com/docs/upload-sources/#oauth) for details.
|
|
142
|
+
*/
|
|
143
|
+
remoteTabSessionKey: string;
|
|
144
|
+
/**
|
|
145
|
+
* Set custom CNAME.
|
|
146
|
+
*/
|
|
147
|
+
cdnCname: string;
|
|
148
|
+
/**
|
|
149
|
+
* Set CNAME base domain for prefixed CDN URLs.
|
|
150
|
+
*/
|
|
151
|
+
cdnCnamePrefixed: string;
|
|
152
|
+
/**
|
|
153
|
+
* Set a custom upload URL.
|
|
154
|
+
*/
|
|
155
|
+
baseUrl: string;
|
|
156
|
+
/**
|
|
157
|
+
* Set a custom social sources URL.
|
|
158
|
+
*/
|
|
159
|
+
socialBaseUrl: string;
|
|
160
|
+
/**
|
|
161
|
+
* Secure signature for uploads.
|
|
162
|
+
*/
|
|
163
|
+
secureSignature: string;
|
|
164
|
+
/**
|
|
165
|
+
* Expiry time for secure uploads.
|
|
166
|
+
*/
|
|
167
|
+
secureExpire: string;
|
|
168
|
+
/**
|
|
169
|
+
* Proxy URL for secure delivery.
|
|
170
|
+
*/
|
|
171
|
+
secureDeliveryProxy: string;
|
|
172
|
+
/**
|
|
173
|
+
* Maximum number of retry attempts for throttled requests.
|
|
174
|
+
*/
|
|
175
|
+
retryThrottledRequestMaxTimes: number;
|
|
176
|
+
/**
|
|
177
|
+
* Maximum number of retry attempts for network errors.
|
|
178
|
+
*/
|
|
179
|
+
retryNetworkErrorMaxTimes: number;
|
|
180
|
+
/**
|
|
181
|
+
* Minimum file size for multipart uploads.
|
|
182
|
+
*/
|
|
183
|
+
multipartMinFileSize: number;
|
|
184
|
+
/**
|
|
185
|
+
* Chunk size for multipart uploads.
|
|
186
|
+
*/
|
|
187
|
+
multipartChunkSize: number;
|
|
188
|
+
/**
|
|
189
|
+
* Maximum number of concurrent requests.
|
|
190
|
+
*/
|
|
191
|
+
maxConcurrentRequests: number;
|
|
192
|
+
/**
|
|
193
|
+
* Maximum number of concurrent multipart requests.
|
|
194
|
+
*/
|
|
195
|
+
multipartMaxConcurrentRequests: number;
|
|
196
|
+
/**
|
|
197
|
+
* Maximum number of attempts for multipart uploads.
|
|
198
|
+
*/
|
|
199
|
+
multipartMaxAttempts: number;
|
|
200
|
+
/**
|
|
201
|
+
* Check for URL duplicates.
|
|
202
|
+
*/
|
|
203
|
+
checkForUrlDuplicates: boolean;
|
|
204
|
+
/**
|
|
205
|
+
* Save URL for recurrent uploads.
|
|
206
|
+
*/
|
|
207
|
+
saveUrlForRecurrentUploads: boolean;
|
|
208
|
+
/**
|
|
209
|
+
* Group output files.
|
|
210
|
+
*/
|
|
211
|
+
groupOutput: boolean;
|
|
212
|
+
/**
|
|
213
|
+
* User agent integration string.
|
|
214
|
+
*/
|
|
215
|
+
userAgentIntegration: string;
|
|
216
|
+
/**
|
|
217
|
+
* Enable debug mode.
|
|
218
|
+
*/
|
|
219
|
+
debug: boolean;
|
|
220
|
+
/**
|
|
221
|
+
* Locale name for the uploader.
|
|
222
|
+
*/
|
|
223
|
+
localeName: string;
|
|
224
|
+
/**
|
|
225
|
+
* Expiry threshold for secure uploads.
|
|
226
|
+
*/
|
|
227
|
+
secureUploadsExpireThreshold: number;
|
|
228
|
+
/**
|
|
229
|
+
* Array of plugins to register with the uploader instance.
|
|
230
|
+
*/
|
|
231
|
+
plugins: UploaderPlugin[];
|
|
232
|
+
/**
|
|
233
|
+
* Metadata for the file.
|
|
234
|
+
*/
|
|
235
|
+
metadata: Metadata | MetadataCallback | null;
|
|
236
|
+
/**
|
|
237
|
+
* Override locale definitions.
|
|
238
|
+
*/
|
|
239
|
+
localeDefinitionOverride: LocaleDefinitionOverride | null;
|
|
240
|
+
/**
|
|
241
|
+
* Resolver for secure uploads signature.
|
|
242
|
+
*/
|
|
243
|
+
secureUploadsSignatureResolver: SecureUploadsSignatureResolver | null;
|
|
244
|
+
/**
|
|
245
|
+
* Resolver for secure delivery proxy URL.
|
|
246
|
+
*/
|
|
247
|
+
secureDeliveryProxyUrlResolver: SecureDeliveryProxyUrlResolver | null;
|
|
248
|
+
/**
|
|
249
|
+
* Resolver for icon href.
|
|
250
|
+
*/
|
|
251
|
+
iconHrefResolver: IconHrefResolver | null;
|
|
252
|
+
/**
|
|
253
|
+
* Validators for individual files.
|
|
254
|
+
*/
|
|
255
|
+
fileValidators: FileValidators;
|
|
256
|
+
/**
|
|
257
|
+
* Validators for file collections.
|
|
258
|
+
*/
|
|
259
|
+
collectionValidators: CollectionValidators;
|
|
260
|
+
/**
|
|
261
|
+
* Timeout for async validation functions, in milliseconds.
|
|
262
|
+
*/
|
|
263
|
+
validationTimeout: number;
|
|
264
|
+
/**
|
|
265
|
+
* The number of files to validate concurrently.
|
|
266
|
+
*/
|
|
267
|
+
validationConcurrency: number;
|
|
268
|
+
/**
|
|
269
|
+
* The camera modes to enable in the camera modal,
|
|
270
|
+
* it is possible to select photo or video capture.
|
|
271
|
+
* The first mode is the default mode.
|
|
272
|
+
* @default 'photo,video'
|
|
273
|
+
*/
|
|
274
|
+
cameraModes: string;
|
|
275
|
+
/**
|
|
276
|
+
* The default tab to open in the camera modal,
|
|
277
|
+
* it is possible to select video or photo capture
|
|
278
|
+
* @default 'null'
|
|
279
|
+
* @deprecated - use `cameraModes` instead
|
|
280
|
+
*/
|
|
281
|
+
defaultCameraMode: CameraMode | null;
|
|
282
|
+
/**
|
|
283
|
+
* Enable audio recording.
|
|
284
|
+
* @default true
|
|
285
|
+
*/
|
|
286
|
+
enableAudioRecording: boolean;
|
|
287
|
+
/**
|
|
288
|
+
* Enable video recording.
|
|
289
|
+
* @deprecated - use `cameraModes` instead
|
|
290
|
+
* @default null
|
|
291
|
+
*/
|
|
292
|
+
enableVideoRecording: boolean | null;
|
|
293
|
+
/**
|
|
294
|
+
* The maximum duration of the video recording in seconds
|
|
295
|
+
* @default null
|
|
296
|
+
*/
|
|
297
|
+
maxVideoRecordingDuration: number | null;
|
|
298
|
+
/**
|
|
299
|
+
* A dictionary object that can contain
|
|
300
|
+
* the following properties from MediaRecorderOptions
|
|
301
|
+
*/
|
|
302
|
+
mediaRecorderOptions: MediaRecorderOptions | null;
|
|
303
|
+
filesViewMode: FilesViewMode;
|
|
304
|
+
gridShowFileNames: boolean;
|
|
305
|
+
cloudImageEditorAutoOpen: boolean;
|
|
306
|
+
qualityInsights: boolean;
|
|
307
|
+
cloudImageEditorMaskHref: string | null;
|
|
308
|
+
/**
|
|
309
|
+
* Adds data-testid attributes to the each block. Needed for testing purposes.
|
|
310
|
+
* @default false
|
|
311
|
+
*/
|
|
312
|
+
testMode: boolean;
|
|
313
|
+
/**
|
|
314
|
+
* Define the clipboard paste scope.
|
|
315
|
+
*/
|
|
316
|
+
pasteScope: PasteScope;
|
|
317
|
+
};
|
|
318
|
+
export type ConfigComplexType = Pick<ConfigType, (typeof complexConfigKeys)[number]>;
|
|
319
|
+
export type ConfigPlainType = Omit<ConfigType, keyof ConfigComplexType>;
|
|
320
|
+
export type ConfigAttributesType = KebabCaseKeys<ConfigPlainType> & LowerCaseKeys<ConfigPlainType>;
|
|
321
|
+
export type KebabCase<S extends string> = S extends `${infer C}${infer T}` ? T extends Uncapitalize<T> ? `${Uncapitalize<C>}${KebabCase<T>}` : `${Uncapitalize<C>}-${KebabCase<T>}` : S;
|
|
322
|
+
export type KebabCaseKeys<T extends Record<string, unknown>> = {
|
|
323
|
+
[Key in keyof T as KebabCase<Key & string>]: T[Key];
|
|
324
|
+
};
|
|
325
|
+
export type LowerCase<S extends string> = Lowercase<S>;
|
|
326
|
+
export type LowerCaseKeys<T extends Record<string, unknown>> = {
|
|
327
|
+
[Key in keyof T as Lowercase<Key & string>]: T[Key];
|
|
328
|
+
};
|
|
329
|
+
export type OutputFileStatus = 'idle' | 'uploading' | 'success' | 'failed' | 'removed';
|
|
330
|
+
export type OutputCustomErrorType = 'CUSTOM_ERROR';
|
|
331
|
+
export type OutputFileErrorType = OutputCustomErrorType | 'NOT_AN_IMAGE' | 'FORBIDDEN_FILE_TYPE' | 'FILE_SIZE_EXCEEDED' | 'UPLOAD_ERROR' | 'NETWORK_ERROR' | 'UNKNOWN_ERROR';
|
|
332
|
+
export type OutputCollectionErrorType = OutputCustomErrorType | 'SOME_FILES_HAS_ERRORS' | 'TOO_MANY_FILES' | 'TOO_FEW_FILES';
|
|
333
|
+
export type OutputFileErrorPayload = {
|
|
334
|
+
entry: OutputFileEntry;
|
|
335
|
+
};
|
|
336
|
+
export type OutputErrorTypePayload = {
|
|
337
|
+
NOT_AN_IMAGE: OutputFileErrorPayload;
|
|
338
|
+
FORBIDDEN_FILE_TYPE: OutputFileErrorPayload;
|
|
339
|
+
FILE_SIZE_EXCEEDED: OutputFileErrorPayload;
|
|
340
|
+
SOME_FILES_HAS_ERRORS: {
|
|
341
|
+
[k: string]: never;
|
|
342
|
+
};
|
|
343
|
+
TOO_MANY_FILES: {
|
|
344
|
+
min: number;
|
|
345
|
+
max: number;
|
|
346
|
+
total: number;
|
|
347
|
+
};
|
|
348
|
+
TOO_FEW_FILES: {
|
|
349
|
+
min: number;
|
|
350
|
+
max: number;
|
|
351
|
+
total: number;
|
|
352
|
+
};
|
|
353
|
+
UPLOAD_ERROR: OutputFileErrorPayload & {
|
|
354
|
+
error: UploadError;
|
|
355
|
+
};
|
|
356
|
+
NETWORK_ERROR: OutputFileErrorPayload & {
|
|
357
|
+
error: NetworkError;
|
|
358
|
+
};
|
|
359
|
+
UNKNOWN_ERROR: OutputFileErrorPayload & {
|
|
360
|
+
error?: Error;
|
|
361
|
+
};
|
|
362
|
+
CUSTOM_ERROR: Record<string, unknown>;
|
|
363
|
+
};
|
|
364
|
+
export type OutputError<T extends OutputFileErrorType | OutputCollectionErrorType> = T extends OutputCustomErrorType ? {
|
|
365
|
+
type?: T;
|
|
366
|
+
message: string;
|
|
367
|
+
payload?: OutputErrorTypePayload[T];
|
|
368
|
+
} : T extends keyof OutputErrorTypePayload ? {
|
|
369
|
+
type: T;
|
|
370
|
+
message: string;
|
|
371
|
+
payload?: OutputErrorTypePayload[T];
|
|
372
|
+
} : never;
|
|
373
|
+
export type OutputErrorFile = OutputError<OutputFileErrorType>;
|
|
374
|
+
export type OutputErrorCollection = OutputError<OutputCollectionErrorType>;
|
|
375
|
+
export type OutputFileEntry<TStatus extends OutputFileStatus = OutputFileStatus> = {
|
|
376
|
+
status: TStatus;
|
|
377
|
+
internalId: string;
|
|
378
|
+
name: string;
|
|
379
|
+
size: number;
|
|
380
|
+
isImage: boolean;
|
|
381
|
+
mimeType: string;
|
|
382
|
+
metadata: Metadata | null;
|
|
383
|
+
file: File | Blob | null;
|
|
384
|
+
externalUrl: string | null;
|
|
385
|
+
uploadProgress: number;
|
|
386
|
+
fullPath: string | null;
|
|
387
|
+
source: SourceTypes | null;
|
|
388
|
+
isValidationPending: boolean;
|
|
389
|
+
} & ({
|
|
390
|
+
status: 'success';
|
|
391
|
+
fileInfo: UploadcareFile;
|
|
392
|
+
uuid: string;
|
|
393
|
+
cdnUrl: string;
|
|
394
|
+
cdnUrlModifiers: string;
|
|
395
|
+
isUploading: false;
|
|
396
|
+
isSuccess: true;
|
|
397
|
+
isFailed: false;
|
|
398
|
+
isRemoved: false;
|
|
399
|
+
errors: [];
|
|
400
|
+
} | {
|
|
401
|
+
status: 'failed';
|
|
402
|
+
fileInfo: UploadcareFile | null;
|
|
403
|
+
uuid: string | null;
|
|
404
|
+
cdnUrl: string | null;
|
|
405
|
+
cdnUrlModifiers: string | null;
|
|
406
|
+
isUploading: false;
|
|
407
|
+
isSuccess: false;
|
|
408
|
+
isFailed: true;
|
|
409
|
+
isRemoved: false;
|
|
410
|
+
errors: OutputError<OutputFileErrorType>[];
|
|
411
|
+
} | {
|
|
412
|
+
status: 'uploading';
|
|
413
|
+
fileInfo: null;
|
|
414
|
+
uuid: null;
|
|
415
|
+
cdnUrl: null;
|
|
416
|
+
cdnUrlModifiers: null;
|
|
417
|
+
isUploading: true;
|
|
418
|
+
isSuccess: false;
|
|
419
|
+
isFailed: false;
|
|
420
|
+
isRemoved: false;
|
|
421
|
+
errors: [];
|
|
422
|
+
} | {
|
|
423
|
+
status: 'removed';
|
|
424
|
+
fileInfo: UploadcareFile | null;
|
|
425
|
+
uuid: string | null;
|
|
426
|
+
cdnUrl: string | null;
|
|
427
|
+
cdnUrlModifiers: string | null;
|
|
428
|
+
isUploading: false;
|
|
429
|
+
isSuccess: false;
|
|
430
|
+
isFailed: false;
|
|
431
|
+
isRemoved: true;
|
|
432
|
+
errors: OutputError<OutputFileErrorType>[];
|
|
433
|
+
} | {
|
|
434
|
+
status: 'idle';
|
|
435
|
+
fileInfo: null;
|
|
436
|
+
uuid: null;
|
|
437
|
+
cdnUrl: null;
|
|
438
|
+
cdnUrlModifiers: null;
|
|
439
|
+
isUploading: false;
|
|
440
|
+
isSuccess: false;
|
|
441
|
+
isFailed: false;
|
|
442
|
+
isRemoved: false;
|
|
443
|
+
errors: [];
|
|
444
|
+
});
|
|
445
|
+
export type OutputCollectionStatus = 'idle' | 'uploading' | 'success' | 'failed';
|
|
446
|
+
export type GroupFlag = 'has-group' | 'maybe-has-group';
|
|
447
|
+
export type OutputCollectionState<TStatus extends OutputCollectionStatus = OutputCollectionStatus, TGroupFlag extends GroupFlag = 'maybe-has-group'> = {
|
|
448
|
+
status: TStatus;
|
|
449
|
+
totalCount: number;
|
|
450
|
+
successCount: number;
|
|
451
|
+
failedCount: number;
|
|
452
|
+
uploadingCount: number;
|
|
453
|
+
progress: number;
|
|
454
|
+
successEntries: OutputFileEntry<'success'>[];
|
|
455
|
+
failedEntries: OutputFileEntry<'failed'>[];
|
|
456
|
+
uploadingEntries: OutputFileEntry<'uploading'>[];
|
|
457
|
+
idleEntries: OutputFileEntry<'idle'>[];
|
|
458
|
+
} & (TGroupFlag extends 'has-group' ? {
|
|
459
|
+
group: UploadcareGroup;
|
|
460
|
+
} : TGroupFlag extends 'maybe-has-group' ? {
|
|
461
|
+
group: UploadcareGroup | null;
|
|
462
|
+
} : never) & ({
|
|
463
|
+
status: 'idle';
|
|
464
|
+
isFailed: false;
|
|
465
|
+
isUploading: false;
|
|
466
|
+
isSuccess: false;
|
|
467
|
+
errors: [];
|
|
468
|
+
allEntries: OutputFileEntry<'idle' | 'success'>[];
|
|
469
|
+
} | {
|
|
470
|
+
status: 'uploading';
|
|
471
|
+
isFailed: false;
|
|
472
|
+
isUploading: true;
|
|
473
|
+
isSuccess: false;
|
|
474
|
+
errors: [];
|
|
475
|
+
allEntries: OutputFileEntry[];
|
|
476
|
+
} | {
|
|
477
|
+
status: 'success';
|
|
478
|
+
isFailed: false;
|
|
479
|
+
isUploading: false;
|
|
480
|
+
isSuccess: true;
|
|
481
|
+
errors: [];
|
|
482
|
+
allEntries: OutputFileEntry<'success'>[];
|
|
483
|
+
} | {
|
|
484
|
+
status: 'failed';
|
|
485
|
+
isFailed: true;
|
|
486
|
+
isUploading: false;
|
|
487
|
+
isSuccess: false;
|
|
488
|
+
errors: OutputError<OutputCollectionErrorType>[];
|
|
489
|
+
allEntries: OutputFileEntry[];
|
|
490
|
+
});
|
|
491
|
+
export { EventType };
|
|
492
|
+
export type { EventPayload };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { CustomConfig, CustomConfigDefinition } from '../abstract/customConfigOptions';
|
|
2
|
+
export type { CustomActivities } from '../lit/LitActivityBlock';
|
|
3
|
+
export type { PluginActivityApi, PluginApi, PluginConfigApi, PluginExports, PluginFileActionRegistration, PluginRegistryApi, PluginRegistrySnapshot, UploaderPlugin, } from '../abstract/managers/plugin/PluginTypes';
|
|
4
|
+
export type * from './events';
|
|
5
|
+
export type * from './exported';
|
|
@@ -0,0 +1,8 @@
|
|
|
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 { t as urlSourcePlugin } from "./plugins-DxjsQUa8.js";
|
|
8
|
+
export { urlSourcePlugin };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const ExternalUploadSource: Readonly<{
|
|
2
|
+
readonly FACEBOOK: "facebook";
|
|
3
|
+
readonly DROPBOX: "dropbox";
|
|
4
|
+
readonly GDRIVE: "gdrive";
|
|
5
|
+
readonly GPHOTOS: "gphotos";
|
|
6
|
+
readonly FLICKR: "flickr";
|
|
7
|
+
readonly VK: "vk";
|
|
8
|
+
readonly EVERNOTE: "evernote";
|
|
9
|
+
readonly BOX: "box";
|
|
10
|
+
readonly ONEDRIVE: "onedrive";
|
|
11
|
+
readonly HUDDLE: "huddle";
|
|
12
|
+
}>;
|
|
13
|
+
export declare const UploadSourceMobile: Readonly<{
|
|
14
|
+
readonly MOBILE_VIDEO_CAMERA: "mobile-video-camera";
|
|
15
|
+
readonly MOBILE_PHOTO_CAMERA: "mobile-photo-camera";
|
|
16
|
+
}>;
|
|
17
|
+
export declare const UploadSource: Readonly<{
|
|
18
|
+
readonly FACEBOOK: "facebook";
|
|
19
|
+
readonly DROPBOX: "dropbox";
|
|
20
|
+
readonly GDRIVE: "gdrive";
|
|
21
|
+
readonly GPHOTOS: "gphotos";
|
|
22
|
+
readonly FLICKR: "flickr";
|
|
23
|
+
readonly VK: "vk";
|
|
24
|
+
readonly EVERNOTE: "evernote";
|
|
25
|
+
readonly BOX: "box";
|
|
26
|
+
readonly ONEDRIVE: "onedrive";
|
|
27
|
+
readonly HUDDLE: "huddle";
|
|
28
|
+
readonly MOBILE_VIDEO_CAMERA: "mobile-video-camera";
|
|
29
|
+
readonly MOBILE_PHOTO_CAMERA: "mobile-photo-camera";
|
|
30
|
+
readonly LOCAL: "local";
|
|
31
|
+
readonly DROP_AREA: "drop-area";
|
|
32
|
+
readonly CAMERA: "camera";
|
|
33
|
+
readonly EXTERNAL: "external";
|
|
34
|
+
readonly API: "js-api";
|
|
35
|
+
readonly URL: "url";
|
|
36
|
+
}>;
|
|
37
|
+
export type SourceTypes = (typeof UploadSource)[keyof typeof UploadSource];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LitBlock } from '../lit/LitBlock';
|
|
2
|
+
export declare class WindowHeightTracker {
|
|
3
|
+
private static clientsRegistry;
|
|
4
|
+
private static flush;
|
|
5
|
+
static registerClient(client: LitBlock): void;
|
|
6
|
+
static unregisterClient(client: LitBlock): void;
|
|
7
|
+
private static attachTracker;
|
|
8
|
+
private static detachTracker;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const canUsePermissionsApi: () => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function applyStyles<T extends SVGElement | HTMLElement>(el: T, styleMap: Record<string, string | number>): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const calcBrowserInfo: () => {
|
|
2
|
+
safariDesktop: boolean;
|
|
3
|
+
};
|
|
4
|
+
export declare const calcBrowserFeatures: () => {
|
|
5
|
+
htmlMediaCapture: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const browserInfo: {
|
|
8
|
+
safariDesktop: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const browserFeatures: {
|
|
11
|
+
htmlMediaCapture: boolean;
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trim leading `-/`, `/` and trailing `/` from CDN operation
|
|
3
|
+
*/
|
|
4
|
+
export declare const normalizeCdnOperation: (operation?: unknown) => string;
|
|
5
|
+
/**
|
|
6
|
+
* Join multiple CDN operations into one string without trailing or leading delimeters
|
|
7
|
+
*/
|
|
8
|
+
export declare const joinCdnOperations: (...operations: unknown[]) => string;
|
|
9
|
+
/**
|
|
10
|
+
* Create string with leading `-/` from passed CDN operations. Do the same as `joinCdnOperations` but adds leading `-/`
|
|
11
|
+
* and trailing `/`
|
|
12
|
+
*/
|
|
13
|
+
export declare const createCdnUrlModifiers: (...cdnOperations: unknown[]) => string;
|
|
14
|
+
/**
|
|
15
|
+
* Extract filename or file URL
|
|
16
|
+
*/
|
|
17
|
+
export declare function extractFilename(cdnUrl: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* Extract UUID from CDN URL
|
|
20
|
+
*/
|
|
21
|
+
export declare function extractUuid(cdnUrl: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Extract operations string from CDN URL
|
|
24
|
+
*/
|
|
25
|
+
export declare function extractCdnUrlModifiers(cdnUrl: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* Extract UUID from CDN URL
|
|
28
|
+
*/
|
|
29
|
+
export declare function extractOperations(cdnUrl: string): string[];
|
|
30
|
+
/**
|
|
31
|
+
* Trim filename or file URL
|
|
32
|
+
*/
|
|
33
|
+
export declare function trimFilename(cdnUrl: string): string;
|
|
34
|
+
/**
|
|
35
|
+
* Detect if filename is actually file URL
|
|
36
|
+
*/
|
|
37
|
+
export declare function isFileUrl(filename: string): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Split file URL into the path and search parts
|
|
40
|
+
*/
|
|
41
|
+
export declare function splitFileUrl(fileUrl: string): {
|
|
42
|
+
pathname: string;
|
|
43
|
+
search: string;
|
|
44
|
+
hash: string;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Create a final CDN URL with CDN modifiers and filename
|
|
48
|
+
*/
|
|
49
|
+
export declare const createCdnUrl: (baseCdnUrl: string, cdnModifiers?: string, filename?: string) => string;
|
|
50
|
+
/**
|
|
51
|
+
* Create URL for an original file on CDN
|
|
52
|
+
*/
|
|
53
|
+
export declare const createOriginalUrl: (cdnUrl: string, uuid: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const delay: (ms: number) => Promise<void>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const BASIC_IMAGE_WILDCARD: "image/*";
|
|
2
|
+
export declare const BASIC_VIDEO_WILDCARD: "video/*";
|
|
3
|
+
export declare const HEIC_IMAGE_MIME_LIST: readonly ["image/heif", "image/heif-sequence", "image/heic", "image/heic-sequence", "image/avif", "image/avif-sequence", ".heif", ".heifs", ".heic", ".heics", ".avif", ".avifs"];
|
|
4
|
+
export declare const calcImageAcceptList: () => string[];
|
|
5
|
+
export declare const IMAGE_ACCEPT_LIST: string[];
|
|
6
|
+
export declare const mergeFileTypes: (fileTypes?: string[]) => string[];
|
|
7
|
+
export declare const matchMimeType: (mimeType: string, allowedFileTypes: string[]) => boolean;
|
|
8
|
+
export declare const matchExtension: (fileName: string, allowedFileTypes: string[]) => boolean;
|
|
9
|
+
export declare const fileIsImage: (file: File | Blob) => boolean;
|
|
10
|
+
export declare const isBlob: (data: unknown) => data is Blob;
|
|
11
|
+
export declare const isFile: (data: unknown) => data is File;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getTopLevelOrigin: () => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getLocaleDirection: (localeId: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getPluralForm: (locale: string, count: number) => Intl.LDMLPluralRule;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|