@uploadcare/file-uploader 0.50.1-alpha.2
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/LICENSE +21 -0
- package/README.md +165 -0
- package/abstract/ActivityBlock.d.ts +68 -0
- package/abstract/ActivityBlock.d.ts.map +1 -0
- package/abstract/ActivityBlock.js +207 -0
- package/abstract/Block.d.ts +99 -0
- package/abstract/Block.d.ts.map +1 -0
- package/abstract/Block.js +349 -0
- package/abstract/CTX.d.ts +31 -0
- package/abstract/CTX.d.ts.map +1 -0
- package/abstract/CTX.js +38 -0
- package/abstract/LocaleManager.d.ts +38 -0
- package/abstract/LocaleManager.d.ts.map +1 -0
- package/abstract/LocaleManager.js +127 -0
- package/abstract/SecureUploadsManager.d.ts +22 -0
- package/abstract/SecureUploadsManager.d.ts.map +1 -0
- package/abstract/SecureUploadsManager.js +87 -0
- package/abstract/SolutionBlock.d.ts +23 -0
- package/abstract/SolutionBlock.d.ts.map +1 -0
- package/abstract/SolutionBlock.js +23 -0
- package/abstract/TypedCollection.d.ts +127 -0
- package/abstract/TypedCollection.d.ts.map +1 -0
- package/abstract/TypedCollection.js +245 -0
- package/abstract/TypedData.d.ts +47 -0
- package/abstract/TypedData.d.ts.map +1 -0
- package/abstract/TypedData.js +77 -0
- package/abstract/UploaderBlock.d.ts +114 -0
- package/abstract/UploaderBlock.d.ts.map +1 -0
- package/abstract/UploaderBlock.js +444 -0
- package/abstract/UploaderPublicApi.d.ts +90 -0
- package/abstract/UploaderPublicApi.d.ts.map +1 -0
- package/abstract/UploaderPublicApi.js +316 -0
- package/abstract/ValidationManager.d.ts +31 -0
- package/abstract/ValidationManager.d.ts.map +1 -0
- package/abstract/ValidationManager.js +162 -0
- package/abstract/a11y.d.ts +20 -0
- package/abstract/a11y.d.ts.map +1 -0
- package/abstract/a11y.js +118 -0
- package/abstract/buildOutputCollectionState.d.ts +8 -0
- package/abstract/buildOutputCollectionState.d.ts.map +1 -0
- package/abstract/buildOutputCollectionState.js +136 -0
- package/abstract/connectBlocksFrom.d.ts +8 -0
- package/abstract/connectBlocksFrom.d.ts.map +1 -0
- package/abstract/connectBlocksFrom.js +34 -0
- package/abstract/l10nProcessor.d.ts +7 -0
- package/abstract/l10nProcessor.d.ts.map +1 -0
- package/abstract/l10nProcessor.js +80 -0
- package/abstract/localeRegistry.d.ts +5 -0
- package/abstract/localeRegistry.d.ts.map +1 -0
- package/abstract/localeRegistry.js +63 -0
- package/abstract/registerBlocks.d.ts +5 -0
- package/abstract/registerBlocks.d.ts.map +1 -0
- package/abstract/registerBlocks.js +31 -0
- package/abstract/sharedConfigKey.d.ts +2 -0
- package/abstract/sharedConfigKey.d.ts.map +1 -0
- package/abstract/sharedConfigKey.js +8 -0
- package/abstract/uploadEntrySchema.d.ts +64 -0
- package/abstract/uploadEntrySchema.d.ts.map +1 -0
- package/abstract/uploadEntrySchema.js +138 -0
- package/blocks/ActivityHeader/ActivityHeader.d.ts +4 -0
- package/blocks/ActivityHeader/ActivityHeader.d.ts.map +1 -0
- package/blocks/ActivityHeader/ActivityHeader.js +3 -0
- package/blocks/ActivityHeader/activity-header.css +14 -0
- package/blocks/CameraSource/CameraSource.d.ts +39 -0
- package/blocks/CameraSource/CameraSource.d.ts.map +1 -0
- package/blocks/CameraSource/CameraSource.js +253 -0
- package/blocks/CameraSource/camera-source.css +107 -0
- package/blocks/CloudImageEditor/index.css +1 -0
- package/blocks/CloudImageEditor/index.d.ts +2 -0
- package/blocks/CloudImageEditor/index.d.ts.map +1 -0
- package/blocks/CloudImageEditor/index.js +1 -0
- package/blocks/CloudImageEditor/src/CloudImageEditorBlock.d.ts +58 -0
- package/blocks/CloudImageEditor/src/CloudImageEditorBlock.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/CloudImageEditorBlock.js +228 -0
- package/blocks/CloudImageEditor/src/CropFrame.d.ts +146 -0
- package/blocks/CloudImageEditor/src/CropFrame.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/CropFrame.js +511 -0
- package/blocks/CloudImageEditor/src/EditorButtonControl.d.ts +10 -0
- package/blocks/CloudImageEditor/src/EditorButtonControl.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/EditorButtonControl.js +44 -0
- package/blocks/CloudImageEditor/src/EditorCropButtonControl.d.ts +6 -0
- package/blocks/CloudImageEditor/src/EditorCropButtonControl.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/EditorCropButtonControl.js +39 -0
- package/blocks/CloudImageEditor/src/EditorFilterControl.d.ts +18 -0
- package/blocks/CloudImageEditor/src/EditorFilterControl.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/EditorFilterControl.js +155 -0
- package/blocks/CloudImageEditor/src/EditorImageCropper.d.ts +106 -0
- package/blocks/CloudImageEditor/src/EditorImageCropper.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/EditorImageCropper.js +551 -0
- package/blocks/CloudImageEditor/src/EditorImageFader.d.ts +132 -0
- package/blocks/CloudImageEditor/src/EditorImageFader.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/EditorImageFader.js +454 -0
- package/blocks/CloudImageEditor/src/EditorOperationControl.d.ts +9 -0
- package/blocks/CloudImageEditor/src/EditorOperationControl.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/EditorOperationControl.js +39 -0
- package/blocks/CloudImageEditor/src/EditorScroller.d.ts +7 -0
- package/blocks/CloudImageEditor/src/EditorScroller.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/EditorScroller.js +33 -0
- package/blocks/CloudImageEditor/src/EditorSlider.d.ts +24 -0
- package/blocks/CloudImageEditor/src/EditorSlider.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/EditorSlider.js +118 -0
- package/blocks/CloudImageEditor/src/EditorToolbar.d.ts +104 -0
- package/blocks/CloudImageEditor/src/EditorToolbar.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/EditorToolbar.js +441 -0
- package/blocks/CloudImageEditor/src/crop-utils.d.ts +123 -0
- package/blocks/CloudImageEditor/src/crop-utils.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/crop-utils.js +729 -0
- package/blocks/CloudImageEditor/src/cropper-constants.d.ts +11 -0
- package/blocks/CloudImageEditor/src/cropper-constants.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/cropper-constants.js +11 -0
- package/blocks/CloudImageEditor/src/css/common.css +1157 -0
- package/blocks/CloudImageEditor/src/css/icons.css +12 -0
- package/blocks/CloudImageEditor/src/css/index.css +2 -0
- package/blocks/CloudImageEditor/src/elements/button/BtnUi.d.ts +20 -0
- package/blocks/CloudImageEditor/src/elements/button/BtnUi.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/elements/button/BtnUi.js +90 -0
- package/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.d.ts +11 -0
- package/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.js +52 -0
- package/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.d.ts +17 -0
- package/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.js +71 -0
- package/blocks/CloudImageEditor/src/elements/slider/SliderUi.d.ts +16 -0
- package/blocks/CloudImageEditor/src/elements/slider/SliderUi.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/elements/slider/SliderUi.js +178 -0
- package/blocks/CloudImageEditor/src/index.d.ts +15 -0
- package/blocks/CloudImageEditor/src/index.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/index.js +14 -0
- package/blocks/CloudImageEditor/src/lib/FocusVisible.d.ts +15 -0
- package/blocks/CloudImageEditor/src/lib/FocusVisible.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/lib/FocusVisible.js +33 -0
- package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.d.ts +10 -0
- package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.js +256 -0
- package/blocks/CloudImageEditor/src/lib/classNames.d.ts +3 -0
- package/blocks/CloudImageEditor/src/lib/classNames.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/lib/classNames.js +34 -0
- package/blocks/CloudImageEditor/src/lib/linspace.d.ts +8 -0
- package/blocks/CloudImageEditor/src/lib/linspace.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/lib/linspace.js +14 -0
- package/blocks/CloudImageEditor/src/lib/parseCropPreset.d.ts +2 -0
- package/blocks/CloudImageEditor/src/lib/parseCropPreset.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/lib/parseCropPreset.js +14 -0
- package/blocks/CloudImageEditor/src/lib/parseTabs.d.ts +2 -0
- package/blocks/CloudImageEditor/src/lib/parseTabs.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/lib/parseTabs.js +14 -0
- package/blocks/CloudImageEditor/src/lib/pick.d.ts +7 -0
- package/blocks/CloudImageEditor/src/lib/pick.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/lib/pick.js +15 -0
- package/blocks/CloudImageEditor/src/lib/preloadImage.d.ts +11 -0
- package/blocks/CloudImageEditor/src/lib/preloadImage.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/lib/preloadImage.js +38 -0
- package/blocks/CloudImageEditor/src/lib/transformationUtils.d.ts +14 -0
- package/blocks/CloudImageEditor/src/lib/transformationUtils.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/lib/transformationUtils.js +167 -0
- package/blocks/CloudImageEditor/src/state.d.ts +38 -0
- package/blocks/CloudImageEditor/src/state.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/state.js +92 -0
- package/blocks/CloudImageEditor/src/svg-sprite.d.ts +3 -0
- package/blocks/CloudImageEditor/src/svg-sprite.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/svg-sprite.js +1 -0
- package/blocks/CloudImageEditor/src/template.d.ts +2 -0
- package/blocks/CloudImageEditor/src/template.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/template.js +36 -0
- package/blocks/CloudImageEditor/src/toolbar-constants.d.ts +58 -0
- package/blocks/CloudImageEditor/src/toolbar-constants.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/toolbar-constants.js +114 -0
- package/blocks/CloudImageEditor/src/types.d.ts +58 -0
- package/blocks/CloudImageEditor/src/types.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/types.js +61 -0
- package/blocks/CloudImageEditor/src/util.d.ts +2 -0
- package/blocks/CloudImageEditor/src/util.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/util.js +19 -0
- package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts +31 -0
- package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts.map +1 -0
- package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.js +113 -0
- package/blocks/CloudImageEditorActivity/index.css +13 -0
- package/blocks/CloudImageEditorActivity/test.d.ts +2 -0
- package/blocks/CloudImageEditorActivity/test.d.ts.map +1 -0
- package/blocks/CloudImageEditorActivity/test.js +9 -0
- package/blocks/Config/Config.d.ts +67 -0
- package/blocks/Config/Config.d.ts.map +1 -0
- package/blocks/Config/Config.js +246 -0
- package/blocks/Config/config.css +3 -0
- package/blocks/Config/initialConfig.d.ts +6 -0
- package/blocks/Config/initialConfig.d.ts.map +1 -0
- package/blocks/Config/initialConfig.js +69 -0
- package/blocks/Config/normalizeConfigValue.d.ts +3 -0
- package/blocks/Config/normalizeConfigValue.d.ts.map +1 -0
- package/blocks/Config/normalizeConfigValue.js +177 -0
- package/blocks/Copyright/Copyright.d.ts +4 -0
- package/blocks/Copyright/Copyright.d.ts.map +1 -0
- package/blocks/Copyright/Copyright.js +24 -0
- package/blocks/Copyright/copyright.css +31 -0
- package/blocks/DropArea/DropArea.d.ts +49 -0
- package/blocks/DropArea/DropArea.d.ts.map +1 -0
- package/blocks/DropArea/DropArea.js +273 -0
- package/blocks/DropArea/addDropzone.d.ts +21 -0
- package/blocks/DropArea/addDropzone.d.ts.map +1 -0
- package/blocks/DropArea/addDropzone.js +137 -0
- package/blocks/DropArea/drop-area.css +188 -0
- package/blocks/DropArea/getDropItems.d.ts +16 -0
- package/blocks/DropArea/getDropItems.d.ts.map +1 -0
- package/blocks/DropArea/getDropItems.js +167 -0
- package/blocks/ExternalSource/ExternalSource.d.ts +98 -0
- package/blocks/ExternalSource/ExternalSource.d.ts.map +1 -0
- package/blocks/ExternalSource/ExternalSource.js +268 -0
- package/blocks/ExternalSource/buildStyles.d.ts +27 -0
- package/blocks/ExternalSource/buildStyles.d.ts.map +1 -0
- package/blocks/ExternalSource/buildStyles.js +133 -0
- package/blocks/ExternalSource/external-source.css +65 -0
- package/blocks/ExternalSource/messages.d.ts +3 -0
- package/blocks/ExternalSource/messages.d.ts.map +1 -0
- package/blocks/ExternalSource/messages.js +35 -0
- package/blocks/ExternalSource/query-string.d.ts +8 -0
- package/blocks/ExternalSource/query-string.d.ts.map +1 -0
- package/blocks/ExternalSource/query-string.js +14 -0
- package/blocks/FileItem/FileItem.d.ts +97 -0
- package/blocks/FileItem/FileItem.d.ts.map +1 -0
- package/blocks/FileItem/FileItem.js +460 -0
- package/blocks/FileItem/file-item.css +140 -0
- package/blocks/FormInput/FormInput.d.ts +7 -0
- package/blocks/FormInput/FormInput.d.ts.map +1 -0
- package/blocks/FormInput/FormInput.js +92 -0
- package/blocks/Icon/Icon.d.ts +12 -0
- package/blocks/Icon/Icon.d.ts.map +1 -0
- package/blocks/Icon/Icon.js +44 -0
- package/blocks/Icon/icon.css +12 -0
- package/blocks/Img/Img.d.ts +4 -0
- package/blocks/Img/Img.d.ts.map +1 -0
- package/blocks/Img/Img.js +21 -0
- package/blocks/Img/ImgBase.d.ts +80 -0
- package/blocks/Img/ImgBase.d.ts.map +1 -0
- package/blocks/Img/ImgBase.js +408 -0
- package/blocks/Img/ImgConfig.d.ts +31 -0
- package/blocks/Img/ImgConfig.d.ts.map +1 -0
- package/blocks/Img/ImgConfig.js +102 -0
- package/blocks/Img/configurations.d.ts +12 -0
- package/blocks/Img/configurations.d.ts.map +1 -0
- package/blocks/Img/configurations.js +14 -0
- package/blocks/Img/props-map.d.ts +29 -0
- package/blocks/Img/props-map.d.ts.map +1 -0
- package/blocks/Img/props-map.js +34 -0
- package/blocks/Img/test.css +16 -0
- package/blocks/Img/utils/parseObjectToString.d.ts +2 -0
- package/blocks/Img/utils/parseObjectToString.d.ts.map +1 -0
- package/blocks/Img/utils/parseObjectToString.js +13 -0
- package/blocks/Modal/Modal.d.ts +24 -0
- package/blocks/Modal/Modal.d.ts.map +1 -0
- package/blocks/Modal/Modal.js +116 -0
- package/blocks/Modal/modal.css +92 -0
- package/blocks/ProgressBar/ProgressBar.d.ts +10 -0
- package/blocks/ProgressBar/ProgressBar.d.ts.map +1 -0
- package/blocks/ProgressBar/ProgressBar.js +38 -0
- package/blocks/ProgressBar/progress-bar.css +25 -0
- package/blocks/ProgressBarCommon/ProgressBarCommon.d.ts +8 -0
- package/blocks/ProgressBarCommon/ProgressBarCommon.d.ts.map +1 -0
- package/blocks/ProgressBarCommon/ProgressBarCommon.js +44 -0
- package/blocks/ProgressBarCommon/progress-bar-common.css +16 -0
- package/blocks/Range/Range.d.ts +16 -0
- package/blocks/Range/Range.d.ts.map +1 -0
- package/blocks/Range/Range.js +44 -0
- package/blocks/Range/range.css +65 -0
- package/blocks/Select/Select.d.ts +9 -0
- package/blocks/Select/Select.d.ts.map +1 -0
- package/blocks/Select/Select.js +35 -0
- package/blocks/Select/select.css +22 -0
- package/blocks/SimpleBtn/SimpleBtn.d.ts +26 -0
- package/blocks/SimpleBtn/SimpleBtn.d.ts.map +1 -0
- package/blocks/SimpleBtn/SimpleBtn.js +54 -0
- package/blocks/SimpleBtn/simple-btn.css +64 -0
- package/blocks/SourceBtn/SourceBtn.d.ts +58 -0
- package/blocks/SourceBtn/SourceBtn.d.ts.map +1 -0
- package/blocks/SourceBtn/SourceBtn.js +145 -0
- package/blocks/SourceBtn/source-btn.css +45 -0
- package/blocks/SourceList/SourceList.d.ts +4 -0
- package/blocks/SourceList/SourceList.d.ts.map +1 -0
- package/blocks/SourceList/SourceList.js +20 -0
- package/blocks/StartFrom/StartFrom.d.ts +7 -0
- package/blocks/StartFrom/StartFrom.d.ts.map +1 -0
- package/blocks/StartFrom/StartFrom.js +14 -0
- package/blocks/StartFrom/start-from.css +32 -0
- package/blocks/UploadCtxProvider/EventEmitter.d.ts +107 -0
- package/blocks/UploadCtxProvider/EventEmitter.d.ts.map +1 -0
- package/blocks/UploadCtxProvider/EventEmitter.js +132 -0
- package/blocks/UploadCtxProvider/UploadCtxProvider.d.ts +35 -0
- package/blocks/UploadCtxProvider/UploadCtxProvider.d.ts.map +1 -0
- package/blocks/UploadCtxProvider/UploadCtxProvider.js +45 -0
- package/blocks/UploadList/UploadList.d.ts +59 -0
- package/blocks/UploadList/UploadList.d.ts.map +1 -0
- package/blocks/UploadList/UploadList.js +237 -0
- package/blocks/UploadList/upload-list.css +74 -0
- package/blocks/UrlSource/UrlSource.d.ts +9 -0
- package/blocks/UrlSource/UrlSource.d.ts.map +1 -0
- package/blocks/UrlSource/UrlSource.js +61 -0
- package/blocks/UrlSource/url-source.css +24 -0
- package/blocks/svg-backgrounds/svg-backgrounds.d.ts +17 -0
- package/blocks/svg-backgrounds/svg-backgrounds.d.ts.map +1 -0
- package/blocks/svg-backgrounds/svg-backgrounds.js +45 -0
- package/blocks/themes/uc-basic/common.css +116 -0
- package/blocks/themes/uc-basic/config.css +4 -0
- package/blocks/themes/uc-basic/index.css +32 -0
- package/blocks/themes/uc-basic/svg-sprite.d.ts +3 -0
- package/blocks/themes/uc-basic/svg-sprite.d.ts.map +1 -0
- package/blocks/themes/uc-basic/svg-sprite.js +1 -0
- package/blocks/themes/uc-basic/theme.css +232 -0
- package/blocks/utils/UploadSource.d.ts +9 -0
- package/blocks/utils/UploadSource.d.ts.map +1 -0
- package/blocks/utils/UploadSource.js +8 -0
- package/blocks/utils/abilities.d.ts +2 -0
- package/blocks/utils/abilities.d.ts.map +1 -0
- package/blocks/utils/abilities.js +3 -0
- package/blocks/utils/comma-separated.d.ts +3 -0
- package/blocks/utils/comma-separated.d.ts.map +1 -0
- package/blocks/utils/comma-separated.js +19 -0
- package/blocks/utils/debounce.d.ts +10 -0
- package/blocks/utils/debounce.d.ts.map +1 -0
- package/blocks/utils/debounce.js +22 -0
- package/blocks/utils/resizeImage.d.ts +6 -0
- package/blocks/utils/resizeImage.d.ts.map +1 -0
- package/blocks/utils/resizeImage.js +40 -0
- package/blocks/utils/throttle.d.ts +4 -0
- package/blocks/utils/throttle.d.ts.map +1 -0
- package/blocks/utils/throttle.js +45 -0
- package/blocks/utils/userAgent.d.ts +6 -0
- package/blocks/utils/userAgent.d.ts.map +1 -0
- package/blocks/utils/userAgent.js +14 -0
- package/env.d.ts +4 -0
- package/env.d.ts.map +1 -0
- package/env.js +3 -0
- package/index.d.ts +39 -0
- package/index.d.ts.map +1 -0
- package/index.js +51 -0
- package/index.ssr.d.ts +961 -0
- package/index.ssr.d.ts.map +1 -0
- package/index.ssr.js +1461 -0
- package/locales/file-uploader/ar.d.ts +114 -0
- package/locales/file-uploader/ar.d.ts.map +1 -0
- package/locales/file-uploader/ar.js +113 -0
- package/locales/file-uploader/az.d.ts +106 -0
- package/locales/file-uploader/az.d.ts.map +1 -0
- package/locales/file-uploader/az.js +105 -0
- package/locales/file-uploader/ca.d.ts +108 -0
- package/locales/file-uploader/ca.d.ts.map +1 -0
- package/locales/file-uploader/ca.js +108 -0
- package/locales/file-uploader/cs.d.ts +110 -0
- package/locales/file-uploader/cs.d.ts.map +1 -0
- package/locales/file-uploader/cs.js +110 -0
- package/locales/file-uploader/da.d.ts +106 -0
- package/locales/file-uploader/da.d.ts.map +1 -0
- package/locales/file-uploader/da.js +106 -0
- package/locales/file-uploader/de.d.ts +106 -0
- package/locales/file-uploader/de.d.ts.map +1 -0
- package/locales/file-uploader/de.js +107 -0
- package/locales/file-uploader/el.d.ts +106 -0
- package/locales/file-uploader/el.d.ts.map +1 -0
- package/locales/file-uploader/el.js +107 -0
- package/locales/file-uploader/en.d.ts +106 -0
- package/locales/file-uploader/en.d.ts.map +1 -0
- package/locales/file-uploader/en.js +105 -0
- package/locales/file-uploader/es.d.ts +108 -0
- package/locales/file-uploader/es.d.ts.map +1 -0
- package/locales/file-uploader/es.js +108 -0
- package/locales/file-uploader/et.d.ts +106 -0
- package/locales/file-uploader/et.d.ts.map +1 -0
- package/locales/file-uploader/et.js +105 -0
- package/locales/file-uploader/fr.d.ts +108 -0
- package/locales/file-uploader/fr.d.ts.map +1 -0
- package/locales/file-uploader/fr.js +108 -0
- package/locales/file-uploader/he.d.ts +108 -0
- package/locales/file-uploader/he.d.ts.map +1 -0
- package/locales/file-uploader/he.js +107 -0
- package/locales/file-uploader/hy.d.ts +106 -0
- package/locales/file-uploader/hy.d.ts.map +1 -0
- package/locales/file-uploader/hy.js +105 -0
- package/locales/file-uploader/is.d.ts +106 -0
- package/locales/file-uploader/is.d.ts.map +1 -0
- package/locales/file-uploader/is.js +105 -0
- package/locales/file-uploader/it.d.ts +108 -0
- package/locales/file-uploader/it.d.ts.map +1 -0
- package/locales/file-uploader/it.js +108 -0
- package/locales/file-uploader/ja.d.ts +106 -0
- package/locales/file-uploader/ja.d.ts.map +1 -0
- package/locales/file-uploader/ja.js +105 -0
- package/locales/file-uploader/ka.d.ts +106 -0
- package/locales/file-uploader/ka.d.ts.map +1 -0
- package/locales/file-uploader/ka.js +105 -0
- package/locales/file-uploader/kk.d.ts +106 -0
- package/locales/file-uploader/kk.d.ts.map +1 -0
- package/locales/file-uploader/kk.js +105 -0
- package/locales/file-uploader/ko.d.ts +106 -0
- package/locales/file-uploader/ko.d.ts.map +1 -0
- package/locales/file-uploader/ko.js +104 -0
- package/locales/file-uploader/lv.d.ts +108 -0
- package/locales/file-uploader/lv.d.ts.map +1 -0
- package/locales/file-uploader/lv.js +107 -0
- package/locales/file-uploader/nb.d.ts +106 -0
- package/locales/file-uploader/nb.d.ts.map +1 -0
- package/locales/file-uploader/nb.js +105 -0
- package/locales/file-uploader/nl.d.ts +106 -0
- package/locales/file-uploader/nl.d.ts.map +1 -0
- package/locales/file-uploader/nl.js +106 -0
- package/locales/file-uploader/pl.d.ts +110 -0
- package/locales/file-uploader/pl.d.ts.map +1 -0
- package/locales/file-uploader/pl.js +109 -0
- package/locales/file-uploader/pt.d.ts +108 -0
- package/locales/file-uploader/pt.d.ts.map +1 -0
- package/locales/file-uploader/pt.js +108 -0
- package/locales/file-uploader/ro.d.ts +108 -0
- package/locales/file-uploader/ro.d.ts.map +1 -0
- package/locales/file-uploader/ro.js +108 -0
- package/locales/file-uploader/ru.d.ts +110 -0
- package/locales/file-uploader/ru.d.ts.map +1 -0
- package/locales/file-uploader/ru.js +109 -0
- package/locales/file-uploader/sk.d.ts +110 -0
- package/locales/file-uploader/sk.d.ts.map +1 -0
- package/locales/file-uploader/sk.js +109 -0
- package/locales/file-uploader/sr.d.ts +108 -0
- package/locales/file-uploader/sr.d.ts.map +1 -0
- package/locales/file-uploader/sr.js +107 -0
- package/locales/file-uploader/sv.d.ts +106 -0
- package/locales/file-uploader/sv.d.ts.map +1 -0
- package/locales/file-uploader/sv.js +105 -0
- package/locales/file-uploader/tr.d.ts +106 -0
- package/locales/file-uploader/tr.d.ts.map +1 -0
- package/locales/file-uploader/tr.js +105 -0
- package/locales/file-uploader/uk.d.ts +110 -0
- package/locales/file-uploader/uk.d.ts.map +1 -0
- package/locales/file-uploader/uk.js +109 -0
- package/locales/file-uploader/vi.d.ts +106 -0
- package/locales/file-uploader/vi.d.ts.map +1 -0
- package/locales/file-uploader/vi.js +105 -0
- package/locales/file-uploader/zh-TW.d.ts +106 -0
- package/locales/file-uploader/zh-TW.d.ts.map +1 -0
- package/locales/file-uploader/zh-TW.js +105 -0
- package/locales/file-uploader/zh.d.ts +106 -0
- package/locales/file-uploader/zh.d.ts.map +1 -0
- package/locales/file-uploader/zh.js +105 -0
- package/package.json +142 -0
- package/solutions/adaptive-image/index.d.ts +3 -0
- package/solutions/adaptive-image/index.d.ts.map +1 -0
- package/solutions/adaptive-image/index.js +5 -0
- package/solutions/cloud-image-editor/CloudImageEditor.d.ts +4 -0
- package/solutions/cloud-image-editor/CloudImageEditor.d.ts.map +1 -0
- package/solutions/cloud-image-editor/CloudImageEditor.js +12 -0
- package/solutions/cloud-image-editor/index.css +2 -0
- package/solutions/cloud-image-editor/index.d.ts +6 -0
- package/solutions/cloud-image-editor/index.d.ts.map +1 -0
- package/solutions/cloud-image-editor/index.js +11 -0
- package/solutions/file-uploader/inline/FileUploaderInline.d.ts +27 -0
- package/solutions/file-uploader/inline/FileUploaderInline.d.ts.map +1 -0
- package/solutions/file-uploader/inline/FileUploaderInline.js +75 -0
- package/solutions/file-uploader/inline/index.css +54 -0
- package/solutions/file-uploader/inline/index.d.ts +2 -0
- package/solutions/file-uploader/inline/index.d.ts.map +1 -0
- package/solutions/file-uploader/inline/index.js +1 -0
- package/solutions/file-uploader/minimal/FileUploaderMinimal.d.ts +7 -0
- package/solutions/file-uploader/minimal/FileUploaderMinimal.d.ts.map +1 -0
- package/solutions/file-uploader/minimal/FileUploaderMinimal.js +46 -0
- package/solutions/file-uploader/minimal/index.css +137 -0
- package/solutions/file-uploader/minimal/index.d.ts +14 -0
- package/solutions/file-uploader/minimal/index.d.ts.map +1 -0
- package/solutions/file-uploader/minimal/index.js +13 -0
- package/solutions/file-uploader/regular/FileUploaderRegular.d.ts +26 -0
- package/solutions/file-uploader/regular/FileUploaderRegular.d.ts.map +1 -0
- package/solutions/file-uploader/regular/FileUploaderRegular.js +66 -0
- package/solutions/file-uploader/regular/index.css +1 -0
- package/solutions/file-uploader/regular/index.d.ts +2 -0
- package/solutions/file-uploader/regular/index.d.ts.map +1 -0
- package/solutions/file-uploader/regular/index.js +1 -0
- package/types/events.d.ts +5 -0
- package/types/events.js +1 -0
- package/types/exported.d.ts +295 -0
- package/types/exported.js +1 -0
- package/types/global.d.ts +8 -0
- package/types/https.d.ts +1 -0
- package/types/index.d.ts +2 -0
- package/types/index.js +3 -0
- package/types/jsx.d.ts +63 -0
- package/types/jsx.js +1 -0
- package/utils/WindowHeightTracker.d.ts +24 -0
- package/utils/WindowHeightTracker.d.ts.map +1 -0
- package/utils/WindowHeightTracker.js +51 -0
- package/utils/cdn-utils.d.ts +59 -0
- package/utils/cdn-utils.d.ts.map +1 -0
- package/utils/cdn-utils.js +201 -0
- package/utils/cdn-utils.test.d.ts +2 -0
- package/utils/cdn-utils.test.d.ts.map +1 -0
- package/utils/cdn-utils.test.js +227 -0
- package/utils/delay.d.ts +2 -0
- package/utils/delay.d.ts.map +1 -0
- package/utils/delay.js +4 -0
- package/utils/fileTypes.d.ts +8 -0
- package/utils/fileTypes.d.ts.map +1 -0
- package/utils/fileTypes.js +95 -0
- package/utils/fileTypes.test.d.ts +2 -0
- package/utils/fileTypes.test.d.ts.map +1 -0
- package/utils/fileTypes.test.js +89 -0
- package/utils/getLocaleDirection.d.ts +2 -0
- package/utils/getLocaleDirection.d.ts.map +1 -0
- package/utils/getLocaleDirection.js +18 -0
- package/utils/getPluralForm.d.ts +3 -0
- package/utils/getPluralForm.d.ts.map +1 -0
- package/utils/getPluralForm.js +13 -0
- package/utils/getPluralForm.test.d.ts +2 -0
- package/utils/getPluralForm.test.d.ts.map +1 -0
- package/utils/getPluralForm.test.js +16 -0
- package/utils/ifRef.d.ts +7 -0
- package/utils/ifRef.d.ts.map +1 -0
- package/utils/ifRef.js +9 -0
- package/utils/isSecureTokenExpired.d.ts +4 -0
- package/utils/isSecureTokenExpired.d.ts.map +1 -0
- package/utils/isSecureTokenExpired.js +17 -0
- package/utils/isSecureTokenExpired.test.d.ts +2 -0
- package/utils/isSecureTokenExpired.test.d.ts.map +1 -0
- package/utils/isSecureTokenExpired.test.js +33 -0
- package/utils/memoize.d.ts +2 -0
- package/utils/memoize.d.ts.map +1 -0
- package/utils/memoize.js +23 -0
- package/utils/memoize.test.d.ts +2 -0
- package/utils/memoize.test.d.ts.map +1 -0
- package/utils/memoize.test.js +38 -0
- package/utils/mixinClass.d.ts +8 -0
- package/utils/mixinClass.d.ts.map +1 -0
- package/utils/mixinClass.js +18 -0
- package/utils/parseCdnUrl.d.ts +9 -0
- package/utils/parseCdnUrl.d.ts.map +1 -0
- package/utils/parseCdnUrl.js +20 -0
- package/utils/parseCdnUrl.test.d.ts +2 -0
- package/utils/parseCdnUrl.test.d.ts.map +1 -0
- package/utils/parseCdnUrl.test.js +78 -0
- package/utils/parseShrink.d.ts +5 -0
- package/utils/parseShrink.d.ts.map +1 -0
- package/utils/parseShrink.js +34 -0
- package/utils/parseShrink.test.d.ts +2 -0
- package/utils/parseShrink.test.d.ts.map +1 -0
- package/utils/parseShrink.test.js +26 -0
- package/utils/prettyBytes.d.ts +11 -0
- package/utils/prettyBytes.d.ts.map +1 -0
- package/utils/prettyBytes.js +64 -0
- package/utils/prettyBytes.test.d.ts +2 -0
- package/utils/prettyBytes.test.d.ts.map +1 -0
- package/utils/prettyBytes.test.js +99 -0
- package/utils/stringToArray.d.ts +2 -0
- package/utils/stringToArray.d.ts.map +1 -0
- package/utils/stringToArray.js +11 -0
- package/utils/stringToArray.test.d.ts +2 -0
- package/utils/stringToArray.test.d.ts.map +1 -0
- package/utils/stringToArray.test.js +20 -0
- package/utils/template-utils.d.ts +40 -0
- package/utils/template-utils.d.ts.map +1 -0
- package/utils/template-utils.js +50 -0
- package/utils/template-utils.test.d.ts +2 -0
- package/utils/template-utils.test.d.ts.map +1 -0
- package/utils/template-utils.test.js +56 -0
- package/utils/toKebabCase.d.ts +3 -0
- package/utils/toKebabCase.d.ts.map +1 -0
- package/utils/toKebabCase.js +15 -0
- package/utils/toKebabCase.test.d.ts +2 -0
- package/utils/toKebabCase.test.d.ts.map +1 -0
- package/utils/toKebabCase.test.js +11 -0
- package/utils/transparentPixelSrc.d.ts +2 -0
- package/utils/transparentPixelSrc.d.ts.map +1 -0
- package/utils/transparentPixelSrc.js +2 -0
- package/utils/uniqueArray.d.ts +2 -0
- package/utils/uniqueArray.d.ts.map +1 -0
- package/utils/uniqueArray.js +8 -0
- package/utils/uniqueArray.test.d.ts +2 -0
- package/utils/uniqueArray.test.d.ts.map +1 -0
- package/utils/uniqueArray.test.js +8 -0
- package/utils/validators/collection/index.d.ts +3 -0
- package/utils/validators/collection/index.d.ts.map +1 -0
- package/utils/validators/collection/index.js +2 -0
- package/utils/validators/collection/validateCollectionUploadError.d.ts +3 -0
- package/utils/validators/collection/validateCollectionUploadError.d.ts.map +1 -0
- package/utils/validators/collection/validateCollectionUploadError.js +11 -0
- package/utils/validators/collection/validateMultiple.d.ts +3 -0
- package/utils/validators/collection/validateMultiple.d.ts.map +1 -0
- package/utils/validators/collection/validateMultiple.js +43 -0
- package/utils/validators/file/index.d.ts +5 -0
- package/utils/validators/file/index.d.ts.map +1 -0
- package/utils/validators/file/index.js +4 -0
- package/utils/validators/file/validateFileType.d.ts +3 -0
- package/utils/validators/file/validateFileType.d.ts.map +1 -0
- package/utils/validators/file/validateFileType.js +30 -0
- package/utils/validators/file/validateIsImage.d.ts +3 -0
- package/utils/validators/file/validateIsImage.d.ts.map +1 -0
- package/utils/validators/file/validateIsImage.js +25 -0
- package/utils/validators/file/validateMaxSizeLimit.d.ts +3 -0
- package/utils/validators/file/validateMaxSizeLimit.d.ts.map +1 -0
- package/utils/validators/file/validateMaxSizeLimit.js +15 -0
- package/utils/validators/file/validateUploadError.d.ts +3 -0
- package/utils/validators/file/validateUploadError.d.ts.map +1 -0
- package/utils/validators/file/validateUploadError.js +48 -0
- package/utils/waitForAttribute.d.ts +8 -0
- package/utils/waitForAttribute.d.ts.map +1 -0
- package/utils/waitForAttribute.js +43 -0
- package/utils/waitForAttribute.test.d.ts +2 -0
- package/utils/waitForAttribute.test.d.ts.map +1 -0
- package/utils/waitForAttribute.test.js +78 -0
- package/utils/warnOnce.d.ts +3 -0
- package/utils/warnOnce.d.ts.map +1 -0
- package/utils/warnOnce.js +11 -0
- package/utils/wildcardRegexp.d.ts +2 -0
- package/utils/wildcardRegexp.d.ts.map +1 -0
- package/utils/wildcardRegexp.js +17 -0
- package/utils/wildcardRegexp.test.d.ts +2 -0
- package/utils/wildcardRegexp.test.d.ts.map +1 -0
- package/utils/wildcardRegexp.test.js +19 -0
- package/web/blocks.iife.min.js +29 -0
- package/web/blocks.min.js +29 -0
- package/web/lr-basic.min.css +1 -0
- package/web/lr-cloud-image-editor.min.css +1 -0
- package/web/lr-cloud-image-editor.min.js +29 -0
- package/web/lr-file-uploader-inline.min.css +1 -0
- package/web/lr-file-uploader-inline.min.js +29 -0
- package/web/lr-file-uploader-minimal.min.css +1 -0
- package/web/lr-file-uploader-minimal.min.js +28 -0
- package/web/lr-file-uploader-regular.min.css +1 -0
- package/web/lr-file-uploader-regular.min.js +29 -0
- package/web/lr-img.min.js +28 -0
- package/web/uc-basic.min.css +1 -0
- package/web/uc-cloud-image-editor.min.css +1 -0
- package/web/uc-cloud-image-editor.min.js +29 -0
- package/web/uc-file-uploader-inline.min.css +1 -0
- package/web/uc-file-uploader-inline.min.js +29 -0
- package/web/uc-file-uploader-minimal.min.css +1 -0
- package/web/uc-file-uploader-minimal.min.js +28 -0
- package/web/uc-file-uploader-regular.min.css +1 -0
- package/web/uc-file-uploader-regular.min.js +29 -0
- package/web/uc-img.min.js +28 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
import { memoize } from '../utils/memoize.js';
|
|
4
|
+
import { warnOnce } from '../utils/warnOnce.js';
|
|
5
|
+
|
|
6
|
+
/** @param {string} warning */
|
|
7
|
+
function createAsyncAssertWrapper(warning) {
|
|
8
|
+
let isAsync = false;
|
|
9
|
+
setTimeout(() => {
|
|
10
|
+
isAsync = true;
|
|
11
|
+
}, 0);
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @template {any[]} TArgs
|
|
15
|
+
* @template {any} TReturn
|
|
16
|
+
* @template {(...args: TArgs) => TReturn} T
|
|
17
|
+
* @param {T} fn
|
|
18
|
+
* @returns {T}
|
|
19
|
+
*/
|
|
20
|
+
const withAssert = (fn) => {
|
|
21
|
+
return /** @type {T} */ (
|
|
22
|
+
(...args) => {
|
|
23
|
+
if (isAsync) {
|
|
24
|
+
warnOnce(warning);
|
|
25
|
+
}
|
|
26
|
+
return fn(...args);
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
return withAssert;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @template {import('../index.js').OutputCollectionStatus} TCollectionStatus
|
|
36
|
+
* @template {import('../index.js').GroupFlag} [TGroupFlag='maybe-has-group'] Default is `'maybe-has-group'`
|
|
37
|
+
* @param {import('./UploaderBlock.js').UploaderBlock} uploaderBlock
|
|
38
|
+
* @returns {import('../index.js').OutputCollectionState<TCollectionStatus, TGroupFlag>}
|
|
39
|
+
*/
|
|
40
|
+
export function buildOutputCollectionState(uploaderBlock) {
|
|
41
|
+
const getters = {
|
|
42
|
+
/** @returns {number} */
|
|
43
|
+
progress: () => {
|
|
44
|
+
return uploaderBlock.$['*commonProgress'];
|
|
45
|
+
},
|
|
46
|
+
/** @returns {ReturnType<import('../types').OutputErrorFile>[]} */
|
|
47
|
+
errors: () => {
|
|
48
|
+
return uploaderBlock.$['*collectionErrors'];
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
/** @returns {import('@uploadcare/upload-client').UploadcareGroup | null} */
|
|
52
|
+
group: () => {
|
|
53
|
+
return uploaderBlock.$['*groupInfo'];
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
totalCount: () => {
|
|
57
|
+
return uploaderBlock.uploadCollection.size;
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
failedCount: () => {
|
|
61
|
+
return state.failedEntries.length;
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
successCount: () => {
|
|
65
|
+
return state.successEntries.length;
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
uploadingCount: () => {
|
|
69
|
+
return state.uploadingEntries.length;
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
status: () => {
|
|
73
|
+
const status = state.isFailed ? 'failed' : state.isUploading ? 'uploading' : state.isSuccess ? 'success' : 'idle';
|
|
74
|
+
return /** @type {TCollectionStatus} */ (status);
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
isSuccess: () => {
|
|
78
|
+
return (
|
|
79
|
+
state.allEntries.length > 0 &&
|
|
80
|
+
state.errors.length === 0 &&
|
|
81
|
+
state.successEntries.length === state.allEntries.length
|
|
82
|
+
);
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
isUploading: () => {
|
|
86
|
+
return state.allEntries.some((entry) => entry.status === 'uploading');
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
isFailed: () => {
|
|
90
|
+
return state.errors.length > 0 || state.failedEntries.length > 0;
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
allEntries: () => {
|
|
94
|
+
return uploaderBlock.getOutputData();
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
successEntries: () => {
|
|
98
|
+
return state.allEntries.filter((entry) => entry.status === 'success');
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
failedEntries: () => {
|
|
102
|
+
return state.allEntries.filter((entry) => entry.status === 'failed');
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
uploadingEntries: () => {
|
|
106
|
+
return state.allEntries.filter((entry) => entry.status === 'uploading');
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
idleEntries: () => {
|
|
110
|
+
return state.allEntries.filter((entry) => entry.status === 'idle');
|
|
111
|
+
},
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
const state = /** @type {import('../index.js').OutputCollectionState<TCollectionStatus, TGroupFlag>} */ (
|
|
115
|
+
/** @type {unknown} */ ({})
|
|
116
|
+
);
|
|
117
|
+
const withAssert = createAsyncAssertWrapper(
|
|
118
|
+
"You're trying to access the OutputCollectionState asynchronously. " +
|
|
119
|
+
'In this case, the data you retrieve will be newer than it was when the ' +
|
|
120
|
+
'OutputCollectionState was created or when the event was dispatched. If you want ' +
|
|
121
|
+
'to retain the state at a specific moment in time, you should use the spread operator ' +
|
|
122
|
+
'like this: `{...outputCollectionState}` or `{...e.detail}`',
|
|
123
|
+
);
|
|
124
|
+
|
|
125
|
+
for (const [key, value] of Object.entries(getters)) {
|
|
126
|
+
const name = /** @type {keyof typeof getters} */ (key);
|
|
127
|
+
const getter = /** @type {(typeof getters)[name]} */ (value);
|
|
128
|
+
const wrapped = memoize(withAssert(getter));
|
|
129
|
+
Object.defineProperty(state, name, {
|
|
130
|
+
get: wrapped,
|
|
131
|
+
enumerable: true,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return state;
|
|
136
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {String} url Blocks pack url
|
|
3
|
+
* @param {Boolean} [register] Register connected package, if it not registered yet
|
|
4
|
+
* @returns {Promise<import('../index.js')>}
|
|
5
|
+
*/
|
|
6
|
+
export function connectBlocksFrom(url: string, register?: boolean | undefined): Promise<typeof import("../index.js")>;
|
|
7
|
+
export const UC_WINDOW_KEY: "UC";
|
|
8
|
+
//# sourceMappingURL=connectBlocksFrom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connectBlocksFrom.d.ts","sourceRoot":"","sources":["connectBlocksFrom.js"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,gFAFa,qCAA8B,CA0B1C;AA/BD,iCAAkC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { registerBlocks } from './registerBlocks.js';
|
|
2
|
+
|
|
3
|
+
export const UC_WINDOW_KEY = 'UC';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @param {String} url Blocks pack url
|
|
7
|
+
* @param {Boolean} [register] Register connected package, if it not registered yet
|
|
8
|
+
* @returns {Promise<import('../index.js')>}
|
|
9
|
+
*/
|
|
10
|
+
export async function connectBlocksFrom(url, register = false) {
|
|
11
|
+
return new Promise((resolve, reject) => {
|
|
12
|
+
if (typeof document !== 'object') {
|
|
13
|
+
resolve(null);
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (typeof window === 'object' && window[UC_WINDOW_KEY]) {
|
|
17
|
+
resolve(window[UC_WINDOW_KEY]);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
let script = document.createElement('script');
|
|
21
|
+
script.async = true;
|
|
22
|
+
script.src = url;
|
|
23
|
+
script.onerror = () => {
|
|
24
|
+
reject();
|
|
25
|
+
};
|
|
26
|
+
script.onload = () => {
|
|
27
|
+
/** @type {import('../index.js')} */
|
|
28
|
+
let blocks = window[UC_WINDOW_KEY];
|
|
29
|
+
register && registerBlocks(blocks);
|
|
30
|
+
resolve(blocks);
|
|
31
|
+
};
|
|
32
|
+
document.head.appendChild(script);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"l10nProcessor.d.ts","sourceRoot":"","sources":["l10nProcessor.js"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,wEAHW,gBAAgB,kBAyE1B"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
import { localeStateKey } from './LocaleManager.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @template {import('./Block.js').Block} T
|
|
7
|
+
* @param {DocumentFragment} fr
|
|
8
|
+
* @param {T} fnCtx
|
|
9
|
+
*/
|
|
10
|
+
export function l10nProcessor(fr, fnCtx) {
|
|
11
|
+
[...fr.querySelectorAll('[l10n]')].forEach((el) => {
|
|
12
|
+
let key = el.getAttribute('l10n');
|
|
13
|
+
if (!key) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
let elProp = 'textContent';
|
|
17
|
+
let useAttribute = false;
|
|
18
|
+
if (key.includes(':')) {
|
|
19
|
+
const arr = key.split(':');
|
|
20
|
+
elProp = arr[0];
|
|
21
|
+
key = arr[1];
|
|
22
|
+
if (elProp.startsWith('@')) {
|
|
23
|
+
elProp = elProp.slice(1);
|
|
24
|
+
useAttribute = true;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Check if the key is present in the local context
|
|
29
|
+
const localCtxKey = key;
|
|
30
|
+
if (fnCtx.has(localCtxKey)) {
|
|
31
|
+
fnCtx.sub(localCtxKey, (mappedKey) => {
|
|
32
|
+
if (!mappedKey) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
// Store the subscription in a temporary map to be able to unsubscribe later
|
|
36
|
+
if (!fnCtx.l10nProcessorSubs.has(localCtxKey)) {
|
|
37
|
+
fnCtx.l10nProcessorSubs.set(localCtxKey, new Set());
|
|
38
|
+
}
|
|
39
|
+
const keySubs = fnCtx.l10nProcessorSubs.get(localCtxKey);
|
|
40
|
+
keySubs?.forEach(
|
|
41
|
+
/** @param {{ remove: () => void }} sub */
|
|
42
|
+
(sub) => {
|
|
43
|
+
sub.remove();
|
|
44
|
+
keySubs.delete(sub);
|
|
45
|
+
fnCtx.allSubs.delete(sub);
|
|
46
|
+
},
|
|
47
|
+
);
|
|
48
|
+
// We don't need the leading * in the key because we use the key as a local context key relative to the global state
|
|
49
|
+
const nodeStateKey = localeStateKey(mappedKey).replace('*', '');
|
|
50
|
+
// If the key is not present in the node context, add it
|
|
51
|
+
if (!fnCtx.nodeCtx.has(nodeStateKey)) {
|
|
52
|
+
fnCtx.nodeCtx.add(nodeStateKey, mappedKey);
|
|
53
|
+
}
|
|
54
|
+
// Subscribe on the global l10n key change
|
|
55
|
+
const sub = fnCtx.nodeCtx.sub(nodeStateKey, () => {
|
|
56
|
+
el[/** @type {'textContent'} */ (elProp)] = fnCtx.l10n(mappedKey);
|
|
57
|
+
});
|
|
58
|
+
keySubs?.add(sub);
|
|
59
|
+
// Store the subscription in the global context to make able Symbiote to unsubscribe it on destroy
|
|
60
|
+
fnCtx.allSubs.add(sub);
|
|
61
|
+
el.removeAttribute('l10n');
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Otherwise, assume the key is in the global context
|
|
66
|
+
const stateKey = localeStateKey(key);
|
|
67
|
+
if (!fnCtx.has(stateKey)) {
|
|
68
|
+
fnCtx.add(stateKey, '');
|
|
69
|
+
}
|
|
70
|
+
fnCtx.sub(stateKey, () => {
|
|
71
|
+
key = /** @type {string} */ (key);
|
|
72
|
+
if (useAttribute) {
|
|
73
|
+
el.setAttribute(elProp, fnCtx.l10n(key));
|
|
74
|
+
} else {
|
|
75
|
+
el[/** @type {'textContent'} */ (elProp)] = fnCtx.l10n(key);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
el.removeAttribute('l10n');
|
|
79
|
+
});
|
|
80
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export function defineLocale(localeName: string, definitionOrResolver: LocaleDefinition | LocaleDefinitionResolver): void;
|
|
2
|
+
export function resolveLocaleDefinition(localeName: string): Promise<LocaleDefinition>;
|
|
3
|
+
export type LocaleDefinition = Record<string, string>;
|
|
4
|
+
export type LocaleDefinitionResolver = () => Promise<LocaleDefinition>;
|
|
5
|
+
//# sourceMappingURL=localeRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localeRegistry.d.ts","sourceRoot":"","sources":["localeRegistry.js"],"names":[],"mappings":"AAoCO,yCAHI,MAAM,wBACN,gBAAgB,GAAG,wBAAwB,QAQrD;AAMM,oDAHI,MAAM,GACJ,QAAQ,gBAAgB,CAAC,CAcrC;+BAnDa,OAAO,MAAM,EAAE,MAAM,CAAC;uCACtB,MAAM,QAAQ,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
import { default as en } from '../locales/file-uploader/en.js';
|
|
4
|
+
|
|
5
|
+
/** @type {Map<string, LocaleDefinition>} */
|
|
6
|
+
const localeRegistry = new Map();
|
|
7
|
+
/** @type {Map<string, LocaleDefinitionResolver>} */
|
|
8
|
+
const localeResolvers = new Map();
|
|
9
|
+
|
|
10
|
+
/** @typedef {Record<string, string>} LocaleDefinition */
|
|
11
|
+
/** @typedef {() => Promise<LocaleDefinition>} LocaleDefinitionResolver */
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @param {string} localeName
|
|
15
|
+
* @param {LocaleDefinition} definition
|
|
16
|
+
*/
|
|
17
|
+
const defineLocaleSync = (localeName, definition) => {
|
|
18
|
+
if (localeRegistry.has(localeName)) {
|
|
19
|
+
console.log(`Locale ${localeName} is already defined. Overwriting...`);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
localeRegistry.set(localeName, { ...en, ...definition });
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @param {string} localeName
|
|
27
|
+
* @param {LocaleDefinitionResolver} definitionResolver
|
|
28
|
+
*/
|
|
29
|
+
const defineLocaleAsync = (localeName, definitionResolver) => {
|
|
30
|
+
localeResolvers.set(localeName, definitionResolver);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @param {string} localeName
|
|
35
|
+
* @param {LocaleDefinition | LocaleDefinitionResolver} definitionOrResolver
|
|
36
|
+
*/
|
|
37
|
+
export const defineLocale = (localeName, definitionOrResolver) => {
|
|
38
|
+
if (typeof definitionOrResolver === 'function') {
|
|
39
|
+
defineLocaleAsync(localeName, definitionOrResolver);
|
|
40
|
+
} else {
|
|
41
|
+
defineLocaleSync(localeName, definitionOrResolver);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @param {string} localeName
|
|
47
|
+
* @returns {Promise<LocaleDefinition>}
|
|
48
|
+
*/
|
|
49
|
+
export const resolveLocaleDefinition = async (localeName) => {
|
|
50
|
+
if (!localeRegistry.has(localeName)) {
|
|
51
|
+
if (!localeResolvers.has(localeName)) {
|
|
52
|
+
throw new Error(`Locale ${localeName} is not defined`);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const definitionResolver = /** @type {LocaleDefinitionResolver} */ (localeResolvers.get(localeName));
|
|
56
|
+
const definition = await definitionResolver();
|
|
57
|
+
defineLocaleSync(localeName, definition);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return /** @type {LocaleDefinition} */ (localeRegistry.get(localeName));
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
defineLocale('en', en);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerBlocks.d.ts","sourceRoot":"","sources":["registerBlocks.js"],"names":[],"mappings":"AAAA,gDAAgD;AAChD;QADmB,MAAM,GAAE,GAAG;SA4B7B"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** @param {Object<string, any>} blockExports */
|
|
2
|
+
export function registerBlocks(blockExports) {
|
|
3
|
+
for (let blockName in blockExports) {
|
|
4
|
+
let tagName = [...blockName].reduce((name, char) => {
|
|
5
|
+
if (char.toUpperCase() === char) {
|
|
6
|
+
char = '-' + char.toLowerCase();
|
|
7
|
+
}
|
|
8
|
+
return (name += char);
|
|
9
|
+
}, '');
|
|
10
|
+
if (tagName.startsWith('-')) {
|
|
11
|
+
tagName = tagName.replace('-', '');
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let currentTagName = '';
|
|
15
|
+
if (!tagName.startsWith('uc-')) {
|
|
16
|
+
currentTagName = addPrefix('uc-', tagName);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
let legacyTagName = '';
|
|
20
|
+
if (!tagName.startsWith('lr-')) {
|
|
21
|
+
legacyTagName = addPrefix('lr-', tagName);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (blockExports[blockName].reg) {
|
|
25
|
+
blockExports[blockName].reg(currentTagName);
|
|
26
|
+
blockExports[blockName].reg(legacyTagName, true);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const addPrefix = (prefix, name) => prefix + name;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharedConfigKey.d.ts","sourceRoot":"","sources":["sharedConfigKey.js"],"names":[],"mappings":"AAOO,oGAA8C"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Object} UploadEntry
|
|
3
|
+
* @property {File} file
|
|
4
|
+
* @property {String} externalUrl
|
|
5
|
+
* @property {String} fileName
|
|
6
|
+
* @property {number} fileSize
|
|
7
|
+
* @property {number} lastModified
|
|
8
|
+
* @property {number} uploadProgress
|
|
9
|
+
* @property {String} uuid
|
|
10
|
+
* @property {Boolean} isImage
|
|
11
|
+
* @property {String} mimeType
|
|
12
|
+
* @property {String} ctxName
|
|
13
|
+
* @property {String} cdnUrl
|
|
14
|
+
* @property {String} cdnUrlModifiers
|
|
15
|
+
* @property {UploadcareFile} fileInfo
|
|
16
|
+
* @property {Boolean} isUploading
|
|
17
|
+
* @property {String} thumbUrl
|
|
18
|
+
* @property {Boolean} silent
|
|
19
|
+
* @property {({
|
|
20
|
+
* type: import('..').OutputFileErrorType | import('..').OutputCollectionErrorType;
|
|
21
|
+
* message: string;
|
|
22
|
+
* } & Record<string, unknown>)[]} errors
|
|
23
|
+
* @property {Error | null} uploadError
|
|
24
|
+
* @property {string | null} fullPath
|
|
25
|
+
* @property {import('@uploadcare/upload-client').Metadata | null} metadata
|
|
26
|
+
* @property {boolean} isRemoved
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* @template {keyof UploadEntry} K
|
|
30
|
+
* @type {Record<K, { type: Function; value: any; nullable?: Boolean }>}
|
|
31
|
+
*/
|
|
32
|
+
export const uploadEntrySchema: Record<K, {
|
|
33
|
+
type: Function;
|
|
34
|
+
value: any;
|
|
35
|
+
nullable?: boolean;
|
|
36
|
+
}>;
|
|
37
|
+
export type UploadEntry = {
|
|
38
|
+
file: File;
|
|
39
|
+
externalUrl: string;
|
|
40
|
+
fileName: string;
|
|
41
|
+
fileSize: number;
|
|
42
|
+
lastModified: number;
|
|
43
|
+
uploadProgress: number;
|
|
44
|
+
uuid: string;
|
|
45
|
+
isImage: boolean;
|
|
46
|
+
mimeType: string;
|
|
47
|
+
ctxName: string;
|
|
48
|
+
cdnUrl: string;
|
|
49
|
+
cdnUrlModifiers: string;
|
|
50
|
+
fileInfo: UploadcareFile;
|
|
51
|
+
isUploading: boolean;
|
|
52
|
+
thumbUrl: string;
|
|
53
|
+
silent: boolean;
|
|
54
|
+
errors: ({
|
|
55
|
+
type: import('..').OutputFileErrorType | import('..').OutputCollectionErrorType;
|
|
56
|
+
message: string;
|
|
57
|
+
} & Record<string, unknown>)[];
|
|
58
|
+
uploadError: Error | null;
|
|
59
|
+
fullPath: string | null;
|
|
60
|
+
metadata: import('@uploadcare/upload-client').Metadata | null;
|
|
61
|
+
isRemoved: boolean;
|
|
62
|
+
};
|
|
63
|
+
import { UploadcareFile } from '@uploadcare/upload-client';
|
|
64
|
+
//# sourceMappingURL=uploadEntrySchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uploadEntrySchema.d.ts","sourceRoot":"","sources":["uploadEntrySchema.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH;;;GAGG;AACH,gCAFU,OAAO,CAAC,EAAE;IAAE,IAAI,WAAW;IAAC,KAAK,EAAE,GAAG,CAAC;IAAC,QAAQ,CAAC,UAAS;CAAE,CAAC,CAwGpE;;UApIW,IAAI;;;cAGJ,MAAM;kBACN,MAAM;oBACN,MAAM;;;;;;;cAON,cAAc;;;;YAId,CAAC;QACd,IAAQ,EAAE,OAAO,IAAI,EAAE,mBAAmB,GAAG,OAAO,IAAI,EAAE,yBAAyB,CAAC;QACpF,OAAW,EAAE,MAAM,CAAC;KACjB,GAAG,OAAO,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE;iBACnB,KAAK,GAAG,IAAI;cACZ,MAAM,GAAG,IAAI;cACb,OAAO,2BAA2B,EAAE,QAAQ,GAAG,IAAI;eACnD,OAAO;;+BA3BU,2BAA2B"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
import { UploadcareFile } from '@uploadcare/upload-client';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @typedef {Object} UploadEntry
|
|
6
|
+
* @property {File} file
|
|
7
|
+
* @property {String} externalUrl
|
|
8
|
+
* @property {String} fileName
|
|
9
|
+
* @property {number} fileSize
|
|
10
|
+
* @property {number} lastModified
|
|
11
|
+
* @property {number} uploadProgress
|
|
12
|
+
* @property {String} uuid
|
|
13
|
+
* @property {Boolean} isImage
|
|
14
|
+
* @property {String} mimeType
|
|
15
|
+
* @property {String} ctxName
|
|
16
|
+
* @property {String} cdnUrl
|
|
17
|
+
* @property {String} cdnUrlModifiers
|
|
18
|
+
* @property {UploadcareFile} fileInfo
|
|
19
|
+
* @property {Boolean} isUploading
|
|
20
|
+
* @property {String} thumbUrl
|
|
21
|
+
* @property {Boolean} silent
|
|
22
|
+
* @property {({
|
|
23
|
+
* type: import('..').OutputFileErrorType | import('..').OutputCollectionErrorType;
|
|
24
|
+
* message: string;
|
|
25
|
+
* } & Record<string, unknown>)[]} errors
|
|
26
|
+
* @property {Error | null} uploadError
|
|
27
|
+
* @property {string | null} fullPath
|
|
28
|
+
* @property {import('@uploadcare/upload-client').Metadata | null} metadata
|
|
29
|
+
* @property {boolean} isRemoved
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @template {keyof UploadEntry} K
|
|
34
|
+
* @type {Record<K, { type: Function; value: any; nullable?: Boolean }>}
|
|
35
|
+
*/
|
|
36
|
+
export const uploadEntrySchema = Object.freeze({
|
|
37
|
+
file: {
|
|
38
|
+
type: File,
|
|
39
|
+
value: null,
|
|
40
|
+
},
|
|
41
|
+
externalUrl: {
|
|
42
|
+
type: String,
|
|
43
|
+
value: null,
|
|
44
|
+
},
|
|
45
|
+
fileName: {
|
|
46
|
+
type: String,
|
|
47
|
+
value: null,
|
|
48
|
+
nullable: true,
|
|
49
|
+
},
|
|
50
|
+
fileSize: {
|
|
51
|
+
type: Number,
|
|
52
|
+
value: null,
|
|
53
|
+
nullable: true,
|
|
54
|
+
},
|
|
55
|
+
lastModified: {
|
|
56
|
+
type: Number,
|
|
57
|
+
value: Date.now(),
|
|
58
|
+
},
|
|
59
|
+
uploadProgress: {
|
|
60
|
+
type: Number,
|
|
61
|
+
value: 0,
|
|
62
|
+
},
|
|
63
|
+
uuid: {
|
|
64
|
+
type: String,
|
|
65
|
+
value: null,
|
|
66
|
+
},
|
|
67
|
+
isImage: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
value: false,
|
|
70
|
+
},
|
|
71
|
+
mimeType: {
|
|
72
|
+
type: String,
|
|
73
|
+
value: null,
|
|
74
|
+
nullable: true,
|
|
75
|
+
},
|
|
76
|
+
ctxName: {
|
|
77
|
+
type: String,
|
|
78
|
+
value: null,
|
|
79
|
+
},
|
|
80
|
+
cdnUrl: {
|
|
81
|
+
type: String,
|
|
82
|
+
value: null,
|
|
83
|
+
},
|
|
84
|
+
cdnUrlModifiers: {
|
|
85
|
+
type: String,
|
|
86
|
+
value: null,
|
|
87
|
+
},
|
|
88
|
+
fileInfo: {
|
|
89
|
+
type: UploadcareFile,
|
|
90
|
+
value: null,
|
|
91
|
+
},
|
|
92
|
+
isUploading: {
|
|
93
|
+
type: Boolean,
|
|
94
|
+
value: false,
|
|
95
|
+
},
|
|
96
|
+
abortController: {
|
|
97
|
+
type: AbortController,
|
|
98
|
+
value: null,
|
|
99
|
+
nullable: true,
|
|
100
|
+
},
|
|
101
|
+
thumbUrl: {
|
|
102
|
+
type: String,
|
|
103
|
+
value: null,
|
|
104
|
+
nullable: true,
|
|
105
|
+
},
|
|
106
|
+
silent: {
|
|
107
|
+
type: Boolean,
|
|
108
|
+
value: false,
|
|
109
|
+
},
|
|
110
|
+
source: {
|
|
111
|
+
type: String,
|
|
112
|
+
value: false,
|
|
113
|
+
nullable: true,
|
|
114
|
+
},
|
|
115
|
+
fullPath: {
|
|
116
|
+
type: String,
|
|
117
|
+
value: null,
|
|
118
|
+
nullable: true,
|
|
119
|
+
},
|
|
120
|
+
metadata: {
|
|
121
|
+
type: Object,
|
|
122
|
+
value: null,
|
|
123
|
+
nullable: true,
|
|
124
|
+
},
|
|
125
|
+
errors: {
|
|
126
|
+
type: Array,
|
|
127
|
+
value: [],
|
|
128
|
+
},
|
|
129
|
+
uploadError: {
|
|
130
|
+
type: Error,
|
|
131
|
+
value: null,
|
|
132
|
+
nullable: true,
|
|
133
|
+
},
|
|
134
|
+
isRemoved: {
|
|
135
|
+
type: Boolean,
|
|
136
|
+
value: false,
|
|
137
|
+
},
|
|
138
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActivityHeader.d.ts","sourceRoot":"","sources":["ActivityHeader.js"],"names":[],"mappings":"AAEA;CAAoD;8BAFtB,iCAAiC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
uc-activity-header {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: space-between;
|
|
4
|
+
gap: var(--uc-padding);
|
|
5
|
+
padding: var(--uc-padding);
|
|
6
|
+
color: var(--uc-foreground);
|
|
7
|
+
font-weight: 500;
|
|
8
|
+
font-size: 1em;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
uc-activity-header > * {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export class CameraSource extends UploaderBlock {
|
|
2
|
+
activityType: "camera";
|
|
3
|
+
/** @private */
|
|
4
|
+
private _unsubPermissions;
|
|
5
|
+
init$: any;
|
|
6
|
+
/** @type {String} */
|
|
7
|
+
_selectedCameraId: string | undefined;
|
|
8
|
+
/** @private */
|
|
9
|
+
private _onActivate;
|
|
10
|
+
/** @private */
|
|
11
|
+
private _onDeactivate;
|
|
12
|
+
/** @private */
|
|
13
|
+
private _handlePermissionsChange;
|
|
14
|
+
/**
|
|
15
|
+
* @private
|
|
16
|
+
* @param {'granted' | 'denied' | 'prompt'} state
|
|
17
|
+
*/
|
|
18
|
+
private _setPermissionsState;
|
|
19
|
+
/** @private */
|
|
20
|
+
private _subscribePermissions;
|
|
21
|
+
/** @private */
|
|
22
|
+
private _capture;
|
|
23
|
+
/** @private */
|
|
24
|
+
private _canvas;
|
|
25
|
+
/** @private */
|
|
26
|
+
private _ctx;
|
|
27
|
+
/** @private */
|
|
28
|
+
private _capturing;
|
|
29
|
+
/** @private */
|
|
30
|
+
private _stopCapture;
|
|
31
|
+
/** @private */
|
|
32
|
+
private _shot;
|
|
33
|
+
initCallback(): Promise<void>;
|
|
34
|
+
}
|
|
35
|
+
export namespace CameraSource {
|
|
36
|
+
let template: string;
|
|
37
|
+
}
|
|
38
|
+
import { UploaderBlock } from '../../abstract/UploaderBlock.js';
|
|
39
|
+
//# sourceMappingURL=CameraSource.d.ts.map
|