@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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Uploadcare (hello@uploadcare.com). All rights reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://uploadcare.com/?ref=github-readme">
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: light)" srcset="https://ucarecdn.com/1b4714cd-53be-447b-bbde-e061f1e5a22f/logosafespacetransparent.svg">
|
|
5
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://ucarecdn.com/3b610a0a-780c-4750-a8b4-3bf4a8c90389/logotransparentinverted.svg">
|
|
6
|
+
<img width=250 alt="Uploadcare logo" src="https://ucarecdn.com/1b4714cd-53be-447b-bbde-e061f1e5a22f/logosafespacetransparent.svg">
|
|
7
|
+
</picture>
|
|
8
|
+
</a>
|
|
9
|
+
</p>
|
|
10
|
+
<p align="center">
|
|
11
|
+
<a href="https://uploadcare.com?ref=github-readme">Website</a> •
|
|
12
|
+
<a href="https://uploadcare.com/docs/start/quickstart?ref=github-readme">Quick Start</a> •
|
|
13
|
+
<a href="https://uploadcare.com/docs?ref=github-readme">Docs</a> •
|
|
14
|
+
<a href="https://uploadcare.com/blog?ref=github-readme">Blog</a> •
|
|
15
|
+
<a href="https://discord.gg/mKWRgRsVz8?ref=github-readme">Discord</a> •
|
|
16
|
+
<a href="https://twitter.com/Uploadcare?ref=github-readme">Twitter</a>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
# 📦 Uploadcare Blocks: stack-agnostic library for uploading, processing, and editing images on-the-fly
|
|
20
|
+
|
|
21
|
+
[](https://www.npmjs.com/package/@uploadcare/blocks)
|
|
22
|
+
[](https://github.com/uploadcare/blocks/actions?query=workflow%3ABuild+branch%3Amaster)
|
|
23
|
+
[](https://opensource.org/licenses/MIT)
|
|
24
|
+
|
|
25
|
+
_Uploadcare Blocks_ is a powerful JavaScript library for creating custom file-handling services.
|
|
26
|
+
It includes various interactive and customizable UI components to enhance users' file uploading
|
|
27
|
+
and processing experience. As a bonus, you receive all the
|
|
28
|
+
[Uploadcare's](https://uploadcare.com/?ref=github-readme) versatile file-handling capabilities,
|
|
29
|
+
including [smart CDN](https://uploadcare.com/docs/delivery/cdn/#content-delivery-network/?ref=github-readme),
|
|
30
|
+
[MIME-type filtering](https://uploadcare.com/docs/moderation/#file-types/?ref=github-readme),
|
|
31
|
+
[signed uploads](https://uploadcare.com/docs/security/secure-uploads/?ref=github-readme),
|
|
32
|
+
and [even more](<(https://uploadcare.com/features/?ref=github-readme)>).
|
|
33
|
+
|
|
34
|
+
See Uploadcare Blocks [in action](https://codesandbox.io/p/devbox/github/uploadcare/blocks-examples/tree/main/examples/js-uploader)!
|
|
35
|
+
|
|
36
|
+
<img alt="Uploadcare Blocks examples" src="https://ucarecdn.com/2883da9f-6962-49db-9947-f91a3e25be2f/-/preview/">
|
|
37
|
+
|
|
38
|
+
## Core features
|
|
39
|
+
|
|
40
|
+
- [File Uploader](https://uploadcare.com/docs/file-uploader/?ref=github-readme) — implement file-managing functionality with minimal or comprehensive interfaces in just a few minutes.
|
|
41
|
+
<!-- - [Advanced Customization](/blocks/) — create unique file-uploading interfaces by reorganizing pre-built components and styles with custom based on your needs. -->
|
|
42
|
+
- [Adaptive Images](https://uploadcare.com/docs/adaptive-image/?ref=github-readme) — build responsive user interfaces that adapt to various screen sizes and devices, ensuring a performant experience across platforms.
|
|
43
|
+
- [Cloud Image Editor](https://uploadcare.com/docs/file-uploader/image-editor/?ref=github-readme) — edit, transform, and process images right from a browser on-the-fly.
|
|
44
|
+
- [Uploadcare power and features](https://uploadcare.com/features/?ref=github-readme) — upload, process, deliver, and manage images without building custom infrastructure.
|
|
45
|
+
|
|
46
|
+
* **Coming soon!** Web Components for any media content management like audio, video, image galleries, and more.
|
|
47
|
+
|
|
48
|
+
## Why Uploadcare Blocks?
|
|
49
|
+
|
|
50
|
+
### Rapid integration
|
|
51
|
+
|
|
52
|
+
We provide a ready-to-use set of UI components for file handling. It saves you valuable development time and effort, allowing you to focus on other core aspects of your application. You even don't need to build a stage while developing — just run the code directly from the browser.
|
|
53
|
+
|
|
54
|
+
### Cross-platform compatibility
|
|
55
|
+
|
|
56
|
+
Uploadcare Blocks are designed to work seamlessly across various platforms and frameworks. Whether you're building a web application using React, Vue.js, Angular, Svelte, or other frameworks, you get [integrations and support](https://uploadcare.com/docs/integrations/?ref=github-readme) for various development environments.
|
|
57
|
+
|
|
58
|
+
### Developer-friendly
|
|
59
|
+
|
|
60
|
+
The library comes with modern technologies at your fingertips, like [Web Components](https://developer.mozilla.org/en-US/docs/Web/API/Web_components), [ESM-level](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) code sharing, and other cutting-edge web standards. _Uploadcare Blocks_ is designed lightweight with minimum external dependencies for a cheap security audit.
|
|
61
|
+
|
|
62
|
+
### Typescript support
|
|
63
|
+
|
|
64
|
+
We use [JSDoc type annotations](https://www.typescriptlang.org/docs/handbook/intro-to-js-ts.html) and type definitions ([\*.d.ts files](https://www.typescriptlang.org/docs/handbook/declaration-files/dts-from-js.html)) for TypeScript static analysis support during development.
|
|
65
|
+
|
|
66
|
+
## 🚀 Getting started
|
|
67
|
+
|
|
68
|
+
### From CDN
|
|
69
|
+
|
|
70
|
+
1. Connect Uploadcare Blocks directly from your document replacing `{{PACKAGE_VERSION}}` with the [latest version](https://github.com/uploadcare/blocks/releases) of the package:
|
|
71
|
+
|
|
72
|
+
```html
|
|
73
|
+
<script type="module">
|
|
74
|
+
import * as UC from 'https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@{{PACKAGE_VERSION}}/web/blocks.min.js';
|
|
75
|
+
|
|
76
|
+
UC.registerBlocks(UC);
|
|
77
|
+
</script>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
2. Start using Uploadcare Blocks in your application markup (don't forget to specify `{{PACKAGE_VERSION}}` with the [latest one](https://github.com/uploadcare/file-uploader/releases)):
|
|
81
|
+
|
|
82
|
+
```html
|
|
83
|
+
<link
|
|
84
|
+
rel="stylesheet"
|
|
85
|
+
href="https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@{{PACKAGE_VERSION}}/web/uc-file-uploader-regular.min.css"
|
|
86
|
+
/>
|
|
87
|
+
|
|
88
|
+
<uc-file-uploader-regular ctx-name="my-uploader"> </uc-file-uploader-regular>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
3. Configure Uploadcare Blocks and add your personal public key to the project. Discover the instructions in the [following section](#configuration).
|
|
92
|
+
|
|
93
|
+
### From NPM
|
|
94
|
+
|
|
95
|
+
1. Install Uploadcare Blocks package: `npm i --save-exact @uploadcare/file-uploader`
|
|
96
|
+
2. Connect `Blocks` from your script file:
|
|
97
|
+
|
|
98
|
+
```js
|
|
99
|
+
import * as UC from '@uploadcare/file-uploader';
|
|
100
|
+
|
|
101
|
+
UC.registerBlocks(UC);
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
3. Start using Uploadcare Blocks in your application markup and replace `{{PACKAGE_VERSION}}` with the [latest version](https://github.com/uploadcare/file-uploader/releases) of the package:
|
|
105
|
+
|
|
106
|
+
```html
|
|
107
|
+
<link
|
|
108
|
+
rel="stylesheet"
|
|
109
|
+
href="https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@{{PACKAGE_VERSION}}/web/uc-file-uploader-regular.min.css"
|
|
110
|
+
/>
|
|
111
|
+
|
|
112
|
+
<uc-file-uploader-inline ctx-name="my-uploader"> </uc-file-uploader-inline>
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
4. Configure Uploadcare Blocks and add your personal public key to the project. Discover the instructions in the [following section](#configuration).
|
|
116
|
+
|
|
117
|
+
### Configuration
|
|
118
|
+
|
|
119
|
+
All configurations in Uploadcare Blocks are managed from `uc-config` block.
|
|
120
|
+
|
|
121
|
+
1. Sign up to [Uploadcare](https://app.uploadcare.com/accounts/signup/?ref=github-readme).
|
|
122
|
+
2. Get a Public API key in [Uploadcare project's dashboard](https://app.uploadcare.com/projects/-/api-keys/?ref=github-readme).
|
|
123
|
+
3. Add a `uc-config` block to your markup and replace `YOUR_PUBLIC_KEY` with your own public key:
|
|
124
|
+
|
|
125
|
+
```html
|
|
126
|
+
<uc-config ctx-name="my-uploader" pubkey="YOUR_PUBLIC_KEY"></uc-config>
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
4. Make sure that your config block uses the same `ctx-name` attribute value as your solution block.
|
|
130
|
+
|
|
131
|
+
Discover more about Uploadcare Blocks configuration in [our documentation](https://uploadcare.com/docs/file-uploader/configuration/?ref=github-readme).
|
|
132
|
+
|
|
133
|
+
### Deep dive in Uploadcare Blocks 🛠
|
|
134
|
+
|
|
135
|
+
Follow our [step-by-step installation guide](https://uploadcare.com/docs/file-uploader/installation/?ref=github-readme) to launch Uploadcare Blocks in a few minutes and set it up based on your needs.
|
|
136
|
+
|
|
137
|
+
## Browser support
|
|
138
|
+
|
|
139
|
+
Latest desktop and mobile stable versions of Chrome, Edge, Firefox, Opera, and Safari are supported.
|
|
140
|
+
|
|
141
|
+
Internet Explorer is outdated and [not supported anymore](https://uploadcare.com/blog/uploadcare-stops-internet-explorer-support/?ref=github-readme).
|
|
142
|
+
|
|
143
|
+
## Framework support
|
|
144
|
+
|
|
145
|
+
_Uploadcare Blocks_ is a framework-agnostic solution, so you can use it with **any** runtime you like. Discover the integration examples:
|
|
146
|
+
<br/>
|
|
147
|
+
|
|
148
|
+
- [React](https://github.com/uploadcare/uc-blocks-examples/tree/main/examples/react-uploader)
|
|
149
|
+
- [Vue](https://github.com/uploadcare/uc-blocks-examples/tree/main/examples/vue-uploader)
|
|
150
|
+
- [Angular](https://github.com/uploadcare/uc-blocks-examples/tree/main/examples/angular-uploader)
|
|
151
|
+
- [Svelte](https://github.com/uploadcare/uc-blocks-examples/tree/main/examples/svelte-uploader)
|
|
152
|
+
|
|
153
|
+
All the source code is accessible and works in raw mode. Use _developer tools_ to dive into details.
|
|
154
|
+
|
|
155
|
+
## Contribution
|
|
156
|
+
|
|
157
|
+
You’re always welcome to contribute:
|
|
158
|
+
|
|
159
|
+
- Create [issues](https://github.com/uploadcare/file-uploader/issues) every time you feel something is missing or goes wrong.
|
|
160
|
+
- Provide your feedback or drop us a support request at <a href="mailto:hello@uploadcare.com">hello@uploadcare.com</a>.
|
|
161
|
+
- Ask questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/uploadcare) with "uploadcare" tag if others can have these questions as well.
|
|
162
|
+
- Fork project, make changes and send it as pull request. For launching the developing mode follow these commands:
|
|
163
|
+
- Install dependencies: `npm install`.
|
|
164
|
+
- Start local dev-server: `npm run dev`.
|
|
165
|
+
- Star this repo if you like it ⭐️
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export class ActivityBlock extends Block {
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
* @type {Map<
|
|
5
|
+
* ActivityBlock,
|
|
6
|
+
* { activateCallback: (() => void) | undefined; deactivateCallback: (() => void) | undefined }
|
|
7
|
+
* >}
|
|
8
|
+
*/
|
|
9
|
+
private static _activityCallbacks;
|
|
10
|
+
/** @protected */
|
|
11
|
+
protected historyTracked: boolean;
|
|
12
|
+
init$: {
|
|
13
|
+
'*currentActivity': null;
|
|
14
|
+
'*currentActivityParams': {};
|
|
15
|
+
'*history': never[];
|
|
16
|
+
'*historyBack': null;
|
|
17
|
+
'*closeModal': () => void;
|
|
18
|
+
};
|
|
19
|
+
_debouncedHistoryFlush: (() => void) & {
|
|
20
|
+
cancel: () => void;
|
|
21
|
+
};
|
|
22
|
+
/** @private */
|
|
23
|
+
private _deactivate;
|
|
24
|
+
/** @private */
|
|
25
|
+
private _activate;
|
|
26
|
+
/** @private */
|
|
27
|
+
private _historyFlush;
|
|
28
|
+
/** @private */
|
|
29
|
+
private _isActivityRegistered;
|
|
30
|
+
get isActivityActive(): boolean | undefined;
|
|
31
|
+
get couldOpenActivity(): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* TODO: remove name argument
|
|
34
|
+
*
|
|
35
|
+
* @param {String} name
|
|
36
|
+
* @param {Object} [options]
|
|
37
|
+
* @param {() => void} [options.onActivate]
|
|
38
|
+
* @param {() => void} [options.onDeactivate]
|
|
39
|
+
*/
|
|
40
|
+
registerActivity(name: string, options?: {
|
|
41
|
+
onActivate?: (() => void) | undefined;
|
|
42
|
+
onDeactivate?: (() => void) | undefined;
|
|
43
|
+
} | undefined): void;
|
|
44
|
+
unregisterActivity(): void;
|
|
45
|
+
get activityKey(): string;
|
|
46
|
+
get activityParams(): any;
|
|
47
|
+
/** @type {String} */
|
|
48
|
+
get initActivity(): string;
|
|
49
|
+
/** @type {String} */
|
|
50
|
+
get doneActivity(): string;
|
|
51
|
+
historyBack(): void;
|
|
52
|
+
___ACTIVITY_IS_ACTIVE___: boolean | undefined;
|
|
53
|
+
}
|
|
54
|
+
export namespace ActivityBlock {
|
|
55
|
+
let activities: Readonly<{
|
|
56
|
+
START_FROM: "start-from";
|
|
57
|
+
CAMERA: "camera";
|
|
58
|
+
DRAW: "draw";
|
|
59
|
+
UPLOAD_LIST: "upload-list";
|
|
60
|
+
URL: "url";
|
|
61
|
+
CLOUD_IMG_EDIT: "cloud-image-edit";
|
|
62
|
+
EXTERNAL: "external";
|
|
63
|
+
DETAILS: "details";
|
|
64
|
+
}>;
|
|
65
|
+
}
|
|
66
|
+
export type ActivityType = (typeof ActivityBlock)['activities'][keyof (typeof ActivityBlock)['activities']] | (string & {}) | null;
|
|
67
|
+
import { Block } from './Block.js';
|
|
68
|
+
//# sourceMappingURL=ActivityBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActivityBlock.d.ts","sourceRoot":"","sources":["ActivityBlock.js"],"names":[],"mappings":"AASA;IAuFE;;;;;;OAMG;IACH,kCAAsC;IA7FtC,iBAAiB;IACjB,kCAAuB;IAEvB;;;;;;MAA+B;IAE/B;;MAAqE;IAErE,eAAe;IACf,oBAKC;IAED,eAAe;IACf,kBAaC;IAsCD,eAAe;IACf,sBAWC;IAED,eAAe;IACf,8BAEC;IAWD,4CAEC;IAED,iCAEC;IAED;;;;;;;OAOG;IACH;4BAHiB,IAAI;8BACJ,IAAI;yBAQpB;IAED,2BAKC;IAoBD,0BAEC;IAED,0BAEC;IAED,qBAAqB;IACrB,2BAEC;IAED,qBAAqB;IACrB,2BAEC;IAED,oBAoBC;IA5KC,8CAAyB;CA6K5B;;;;;;;;;;;;;2BAaa,CAAC,oBAAoB,CAAC,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,IAAI;sBA3M/F,YAAY"}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
import { debounce } from '../blocks/utils/debounce.js';
|
|
3
|
+
import { EventType } from '../blocks/UploadCtxProvider/EventEmitter.js';
|
|
4
|
+
import { Block } from './Block.js';
|
|
5
|
+
import { activityBlockCtx } from './CTX.js';
|
|
6
|
+
|
|
7
|
+
const ACTIVE_ATTR = 'active';
|
|
8
|
+
const ACTIVE_PROP = '___ACTIVITY_IS_ACTIVE___';
|
|
9
|
+
|
|
10
|
+
export class ActivityBlock extends Block {
|
|
11
|
+
/** @protected */
|
|
12
|
+
historyTracked = false;
|
|
13
|
+
|
|
14
|
+
init$ = activityBlockCtx(this);
|
|
15
|
+
|
|
16
|
+
_debouncedHistoryFlush = debounce(this._historyFlush.bind(this), 10);
|
|
17
|
+
|
|
18
|
+
/** @private */
|
|
19
|
+
_deactivate() {
|
|
20
|
+
let actDesc = ActivityBlock._activityCallbacks.get(this);
|
|
21
|
+
this[ACTIVE_PROP] = false;
|
|
22
|
+
this.removeAttribute(ACTIVE_ATTR);
|
|
23
|
+
actDesc?.deactivateCallback?.();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** @private */
|
|
27
|
+
_activate() {
|
|
28
|
+
let actDesc = ActivityBlock._activityCallbacks.get(this);
|
|
29
|
+
this.$['*historyBack'] = this.historyBack.bind(this);
|
|
30
|
+
/** @private */
|
|
31
|
+
this[ACTIVE_PROP] = true;
|
|
32
|
+
this.setAttribute(ACTIVE_ATTR, '');
|
|
33
|
+
actDesc?.activateCallback?.();
|
|
34
|
+
|
|
35
|
+
this._debouncedHistoryFlush();
|
|
36
|
+
|
|
37
|
+
this.emit(EventType.ACTIVITY_CHANGE, {
|
|
38
|
+
activity: this.activityType,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** @protected */
|
|
43
|
+
initCallback() {
|
|
44
|
+
super.initCallback();
|
|
45
|
+
if (this.hasAttribute('current-activity')) {
|
|
46
|
+
this.sub('*currentActivity', (/** @type {String} */ val) => {
|
|
47
|
+
this.setAttribute('current-activity', val);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// TODO: rename activityType to activityId
|
|
52
|
+
if (this.activityType) {
|
|
53
|
+
if (!this.hasAttribute('activity')) {
|
|
54
|
+
this.setAttribute('activity', this.activityType);
|
|
55
|
+
}
|
|
56
|
+
this.sub('*currentActivity', (/** @type {String} */ val) => {
|
|
57
|
+
if (this.activityType !== val && this[ACTIVE_PROP]) {
|
|
58
|
+
this._deactivate();
|
|
59
|
+
} else if (this.activityType === val && !this[ACTIVE_PROP]) {
|
|
60
|
+
this._activate();
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (!val) {
|
|
64
|
+
this.$['*history'] = [];
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
if (this.has('*modalActive')) {
|
|
69
|
+
this.sub('*modalActive', (modalActive) => {
|
|
70
|
+
if (!modalActive && this.activityType === this.$['*currentActivity']) {
|
|
71
|
+
this.$['*currentActivity'] = null;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** @private */
|
|
79
|
+
_historyFlush() {
|
|
80
|
+
let history = this.$['*history'];
|
|
81
|
+
if (history) {
|
|
82
|
+
if (history.length > 10) {
|
|
83
|
+
history = history.slice(history.length - 11, history.length - 1);
|
|
84
|
+
}
|
|
85
|
+
if (this.historyTracked && history[history.length - 1] !== this.activityType) {
|
|
86
|
+
history.push(this.activityType);
|
|
87
|
+
}
|
|
88
|
+
this.$['*history'] = history;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/** @private */
|
|
93
|
+
_isActivityRegistered() {
|
|
94
|
+
return this.activityType && ActivityBlock._activityCallbacks.has(this);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* @private
|
|
99
|
+
* @type {Map<
|
|
100
|
+
* ActivityBlock,
|
|
101
|
+
* { activateCallback: (() => void) | undefined; deactivateCallback: (() => void) | undefined }
|
|
102
|
+
* >}
|
|
103
|
+
*/
|
|
104
|
+
static _activityCallbacks = new Map();
|
|
105
|
+
|
|
106
|
+
get isActivityActive() {
|
|
107
|
+
return this[ACTIVE_PROP];
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
get couldOpenActivity() {
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* TODO: remove name argument
|
|
116
|
+
*
|
|
117
|
+
* @param {String} name
|
|
118
|
+
* @param {Object} [options]
|
|
119
|
+
* @param {() => void} [options.onActivate]
|
|
120
|
+
* @param {() => void} [options.onDeactivate]
|
|
121
|
+
*/
|
|
122
|
+
registerActivity(name, options = {}) {
|
|
123
|
+
const { onActivate, onDeactivate } = options;
|
|
124
|
+
ActivityBlock._activityCallbacks.set(this, {
|
|
125
|
+
activateCallback: onActivate,
|
|
126
|
+
deactivateCallback: onDeactivate,
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
unregisterActivity() {
|
|
131
|
+
if (this.isActivityActive) {
|
|
132
|
+
this._deactivate();
|
|
133
|
+
}
|
|
134
|
+
ActivityBlock._activityCallbacks.delete(this);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** @protected */
|
|
138
|
+
destroyCallback() {
|
|
139
|
+
super.destroyCallback();
|
|
140
|
+
this._isActivityRegistered() && this.unregisterActivity();
|
|
141
|
+
|
|
142
|
+
/** @type {string | null} */
|
|
143
|
+
const currentActivity = this.$['*currentActivity'];
|
|
144
|
+
|
|
145
|
+
const hasCurrentActivityInCtx = !![...this.blocksRegistry].find(
|
|
146
|
+
(block) => block instanceof ActivityBlock && block.activityType === currentActivity,
|
|
147
|
+
);
|
|
148
|
+
|
|
149
|
+
if (!hasCurrentActivityInCtx) {
|
|
150
|
+
this.$['*currentActivity'] = null;
|
|
151
|
+
this.setOrAddState('*modalActive', false);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
get activityKey() {
|
|
156
|
+
return this.ctxName + this.activityType;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
get activityParams() {
|
|
160
|
+
return this.$['*currentActivityParams'];
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/** @type {String} */
|
|
164
|
+
get initActivity() {
|
|
165
|
+
return this.getCssData('--cfg-init-activity');
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/** @type {String} */
|
|
169
|
+
get doneActivity() {
|
|
170
|
+
return this.getCssData('--cfg-done-activity');
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
historyBack() {
|
|
174
|
+
/** @type {String[]} */
|
|
175
|
+
let history = this.$['*history'];
|
|
176
|
+
if (history) {
|
|
177
|
+
let nextActivity = history.pop();
|
|
178
|
+
while (nextActivity === this.activityType) {
|
|
179
|
+
nextActivity = history.pop();
|
|
180
|
+
}
|
|
181
|
+
let couldOpenActivity = !!nextActivity;
|
|
182
|
+
if (nextActivity) {
|
|
183
|
+
const nextActivityBlock = [...this.blocksRegistry].find((block) => block.activityType === nextActivity);
|
|
184
|
+
couldOpenActivity = /** @type {ActivityBlock} */ (nextActivityBlock)?.couldOpenActivity ?? false;
|
|
185
|
+
}
|
|
186
|
+
nextActivity = couldOpenActivity ? nextActivity : undefined;
|
|
187
|
+
this.$['*currentActivity'] = nextActivity;
|
|
188
|
+
this.$['*history'] = history;
|
|
189
|
+
if (!nextActivity) {
|
|
190
|
+
this.setOrAddState('*modalActive', false);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
ActivityBlock.activities = Object.freeze({
|
|
197
|
+
START_FROM: 'start-from',
|
|
198
|
+
CAMERA: 'camera',
|
|
199
|
+
DRAW: 'draw',
|
|
200
|
+
UPLOAD_LIST: 'upload-list',
|
|
201
|
+
URL: 'url',
|
|
202
|
+
CLOUD_IMG_EDIT: 'cloud-image-edit',
|
|
203
|
+
EXTERNAL: 'external',
|
|
204
|
+
DETAILS: 'details',
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
/** @typedef {(typeof ActivityBlock)['activities'][keyof (typeof ActivityBlock)['activities']] | (string & {}) | null} ActivityType */
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
export class Block extends BaseComponent<any> {
|
|
2
|
+
/** @type {string | null} */
|
|
3
|
+
static StateConsumerScope: string | null;
|
|
4
|
+
/** @type {string[]} */
|
|
5
|
+
static styleAttrs: string[];
|
|
6
|
+
constructor();
|
|
7
|
+
/** @protected */
|
|
8
|
+
protected requireCtxName: boolean;
|
|
9
|
+
/** @type {import('./ActivityBlock.js').ActivityType} */
|
|
10
|
+
activityType: import('./ActivityBlock.js').ActivityType;
|
|
11
|
+
init$: {};
|
|
12
|
+
/**
|
|
13
|
+
* @param {String} str
|
|
14
|
+
* @param {{ [key: string]: string | number }} variables
|
|
15
|
+
* @returns {String}
|
|
16
|
+
*/
|
|
17
|
+
l10n(str: string, variables?: {
|
|
18
|
+
[key: string]: string | number;
|
|
19
|
+
}): string;
|
|
20
|
+
/**
|
|
21
|
+
* @private
|
|
22
|
+
* @param {string} key
|
|
23
|
+
* @param {number} count
|
|
24
|
+
* @returns {string}
|
|
25
|
+
*/
|
|
26
|
+
private pluralize;
|
|
27
|
+
/**
|
|
28
|
+
* @param {string} key
|
|
29
|
+
* @param {() => void} resolver
|
|
30
|
+
* @protected
|
|
31
|
+
*/
|
|
32
|
+
protected bindL10n(key: string, resolver: () => void): void;
|
|
33
|
+
/** @type {Map<string, Set<{ remove: () => void }>>} */
|
|
34
|
+
l10nProcessorSubs: Map<string, Set<{
|
|
35
|
+
remove: () => void;
|
|
36
|
+
}>>;
|
|
37
|
+
/**
|
|
38
|
+
* @param {Parameters<import('../blocks/UploadCtxProvider/EventEmitter.js').EventEmitter['emit']>[0]} type
|
|
39
|
+
* @param {Parameters<import('../blocks/UploadCtxProvider/EventEmitter.js').EventEmitter['emit']>[1]} [payload]
|
|
40
|
+
* @param {Parameters<import('../blocks/UploadCtxProvider/EventEmitter.js').EventEmitter['emit']>[2]} [options]
|
|
41
|
+
*/
|
|
42
|
+
emit(type: [type: "change" | "file-added" | "file-removed" | "file-upload-start" | "file-upload-progress" | "file-upload-success" | "file-upload-failed" | "file-url-changed" | "modal-open" | "modal-close" | "done-click" | "upload-click" | "activity-change" | "common-upload-start" | "common-upload-progress" | "common-upload-success" | "common-upload-failed" | "group-created", payload?: unknown, ({
|
|
43
|
+
debounce?: number | boolean | undefined;
|
|
44
|
+
} | undefined)?][0], payload?: [type: "change" | "file-added" | "file-removed" | "file-upload-start" | "file-upload-progress" | "file-upload-success" | "file-upload-failed" | "file-url-changed" | "modal-open" | "modal-close" | "done-click" | "upload-click" | "activity-change" | "common-upload-start" | "common-upload-progress" | "common-upload-success" | "common-upload-failed" | "group-created", payload?: unknown, ({
|
|
45
|
+
debounce?: number | boolean | undefined;
|
|
46
|
+
} | undefined)?][1], options?: [type: "change" | "file-added" | "file-removed" | "file-upload-start" | "file-upload-progress" | "file-upload-success" | "file-upload-failed" | "file-url-changed" | "modal-open" | "modal-close" | "done-click" | "upload-click" | "activity-change" | "common-upload-start" | "common-upload-progress" | "common-upload-success" | "common-upload-failed" | "group-created", payload?: unknown, ({
|
|
47
|
+
debounce?: number | boolean | undefined;
|
|
48
|
+
} | undefined)?][2]): void;
|
|
49
|
+
/**
|
|
50
|
+
* @param {(block: Block) => boolean} callback
|
|
51
|
+
* @returns {Boolean}
|
|
52
|
+
*/
|
|
53
|
+
hasBlockInCtx(callback: (block: Block) => boolean): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* @param {String} prop
|
|
56
|
+
* @param {any} newVal
|
|
57
|
+
*/
|
|
58
|
+
setOrAddState(prop: string, newVal: any): void;
|
|
59
|
+
/**
|
|
60
|
+
* @private
|
|
61
|
+
* @returns {LocaleManager | null}
|
|
62
|
+
*/
|
|
63
|
+
private get localeManager();
|
|
64
|
+
/**
|
|
65
|
+
* @returns {A11y | null}
|
|
66
|
+
* @protected
|
|
67
|
+
*/
|
|
68
|
+
protected get a11y(): A11y | null;
|
|
69
|
+
/** @type {Set<Block>} */
|
|
70
|
+
get blocksRegistry(): Set<Block>;
|
|
71
|
+
/**
|
|
72
|
+
* Called when the last block is removed from the context. Note that inheritors must run their callback before that.
|
|
73
|
+
*
|
|
74
|
+
* @protected
|
|
75
|
+
*/
|
|
76
|
+
protected destroyCtxCallback(): void;
|
|
77
|
+
/**
|
|
78
|
+
* @param {String} url
|
|
79
|
+
* @returns {String}
|
|
80
|
+
* @protected
|
|
81
|
+
*/
|
|
82
|
+
protected proxyUrl(url: string): string;
|
|
83
|
+
/** @returns {import('../types').ConfigType} } */
|
|
84
|
+
get cfg(): import("../types").ConfigType;
|
|
85
|
+
/** @private */
|
|
86
|
+
private __cfgProxy;
|
|
87
|
+
/**
|
|
88
|
+
* @template {keyof import('../types').ConfigType} T
|
|
89
|
+
* @param {T} key
|
|
90
|
+
* @param {(value: import('../types').ConfigType[T]) => void} callback
|
|
91
|
+
*/
|
|
92
|
+
subConfigValue<T extends keyof import("../types").ConfigType>(key: T, callback: (value: import("../types").ConfigType[T]) => void): void;
|
|
93
|
+
/** @param {unknown[]} args */
|
|
94
|
+
debugPrint(...args: unknown[]): void;
|
|
95
|
+
}
|
|
96
|
+
export { BaseComponent };
|
|
97
|
+
import { BaseComponent } from '@symbiotejs/symbiote';
|
|
98
|
+
import { A11y } from './a11y.js';
|
|
99
|
+
//# sourceMappingURL=Block.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Block.d.ts","sourceRoot":"","sources":["Block.js"],"names":[],"mappings":"AAoBA;IACE,4BAA4B;IAC5B,2BADW,MAAM,GAAG,IAAI,CACS;IAEjC,uBAAuB;IACvB,mBADW,MAAM,EAAE,CACI;IAoDvB,cAMC;IAxDD,iBAAiB;IACjB,kCAAuB;IAEvB,wDAAwD;IACxD,cADW,OAAO,oBAAoB,EAAE,YAAY,CAChC;IAEpB,UAAmB;IAEnB;;;;OAIG;IACH;;eAcC;IAED;;;;;OAKG;IACH,kBAIC;IAED;;;;OAIG;IACH,wBAJW,MAAM,YACN,MAAM,IAAI,QAKpB;IAIC,uDAAuD;IACvD,mBADW,IAAI,MAAM,EAAE,IAAI;QAAE,MAAM,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC,CAAC,CACjB;IAKpC;;;;OAIG;IACH,WAJW;;qBAAuF,CAAC,CAAC,YACzF;;qBAAuF,CAAC,CAAC,YACzF;;qBAAuF,CAAC,CAAC,QASnG;IAED;;;OAGG;IACH,gCAHmB,KAAK,KAAK,OAAO,WAUnC;IAED;;;OAGG;IACH,oCAFW,GAAG,QASb;IAkED;;;OAGG;IACH,4BAEC;IAED;;;OAGG;IACH,kCAEC;IAED,yBAAyB;IACzB,iCAEC;IAsBD;;;;OAIG;IACH,qCAKC;IAED;;;;OAIG;IACH,wCAqBC;IAED,iDAAiD;IACjD,yCA8BC;IA3BG,eAAe;IACf,mBAuBE;IAKN;;;;OAIG;IACH,6HAFwD,IAAI,QAQ3D;IAED,8BAA8B;IAC9B,oBADY,OAAO,EAAE,QAWpB;CAmBF;;8BAzVmC,sBAAsB;qBAarC,WAAW"}
|