@uploadcare/file-uploader 1.28.0-alpha.0 → 1.28.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ActivityHeader-R6Mlx-dA.js +9 -0
- package/dist/ActivityHeader.css +23 -0
- package/dist/ActivityHeader.layered.css +24 -0
- package/dist/{CameraSource-DbyO6GoK.js → CameraSource-DDwj1jCV.js} +106 -76
- package/dist/CameraSource-n1tun2Df.js +10 -0
- package/dist/CameraSource.css +180 -0
- package/dist/CameraSource.layered.css +209 -0
- package/dist/{CloudImageEditor-BIxf1V4M.js → CloudImageEditor-DcVoIRb3.js} +66 -65
- package/dist/{CloudImageEditorActivity-d4DpK6fQ.js → CloudImageEditorActivity-Csij4nlC.js} +4 -4
- package/dist/{CloudImageEditorActivity-CJxP5N0S.js → CloudImageEditorActivity-DD4NdU0P.js} +4 -4
- package/dist/CloudImageEditorActivity.css +14 -0
- package/dist/CloudImageEditorActivity.layered.css +15 -0
- package/dist/{Config-DuWre5p3.js → Config-DKOromHY.js} +27 -27
- package/dist/Config.css +4 -0
- package/dist/Config.layered.css +5 -0
- package/dist/ExternalSource-6MSUgxqy.js +10 -0
- package/dist/{ExternalSource-BKTFp95O.js → ExternalSource-DVEjSkPB.js} +56 -51
- package/dist/ExternalSource.css +98 -0
- package/dist/ExternalSource.layered.css +116 -0
- package/dist/{Icon-CqTVC82Q.js → Icon-tXRTvEF2.js} +7 -8
- package/dist/Icon.css +14 -0
- package/dist/Icon.layered.css +15 -0
- package/dist/{LitUploaderBlock-BA34rzeU.js → LitUploaderBlock-LxeOZ0ya.js} +65 -65
- package/dist/{UrlSource-DZK5EBwT.js → UrlSource-BkyX00I2.js} +5 -5
- package/dist/UrlSource-RI8TSD48.js +10 -0
- package/dist/UrlSource.css +17 -0
- package/dist/UrlSource.layered.css +18 -0
- package/dist/abstract/loadFileUploaderFrom.js +3 -3
- package/dist/cameraPlugin-weRKO7eG.js +8 -0
- package/dist/{cloud-image-editor-fNswWrI4.js → cloud-image-editor-hhbyNWLG.js} +6 -6
- package/dist/cloud-image-editor.css +1380 -0
- package/dist/cloud-image-editor.layered.css +1549 -0
- package/dist/cloudImageEditorPlugin-FjUgbMK3.js +8 -0
- package/dist/{en-DNCwRJsB.js → en-8OWEmZim.js} +2 -2
- package/dist/env-mM-ksNPq.js +8 -0
- package/dist/env.js +3 -3
- package/dist/externalSourcesPlugin-CMBmLT8S.js +8 -0
- package/dist/imageShrinkPlugin-BN6loiP2.js +8 -0
- package/dist/index-base.css +2497 -0
- package/dist/index-base.layered.css +2837 -0
- package/dist/index.css +9 -3964
- package/dist/index.d.ts +13 -0
- package/dist/index.js +827 -42
- package/dist/index.layered.css +9 -4478
- package/dist/instagramPlugin-CXRm8MGL.js +8 -0
- package/dist/{loadFileUploaderFrom-BWJM43Yq.js → loadFileUploaderFrom-Bfz8L3VB.js} +3 -3
- package/dist/locales/file-uploader/ar.js +2 -2
- package/dist/locales/file-uploader/az.js +2 -2
- package/dist/locales/file-uploader/ca.js +2 -2
- package/dist/locales/file-uploader/cs.js +2 -2
- package/dist/locales/file-uploader/da.js +2 -2
- package/dist/locales/file-uploader/de.js +2 -2
- package/dist/locales/file-uploader/el.js +2 -2
- package/dist/locales/file-uploader/en.js +3 -3
- package/dist/locales/file-uploader/es.js +2 -2
- package/dist/locales/file-uploader/et.js +2 -2
- package/dist/locales/file-uploader/fi.js +2 -2
- package/dist/locales/file-uploader/fr.js +2 -2
- package/dist/locales/file-uploader/he.js +2 -2
- package/dist/locales/file-uploader/hy.js +2 -2
- package/dist/locales/file-uploader/is.js +2 -2
- package/dist/locales/file-uploader/it.js +2 -2
- package/dist/locales/file-uploader/ja.js +2 -2
- package/dist/locales/file-uploader/ka.js +2 -2
- package/dist/locales/file-uploader/kk.js +2 -2
- package/dist/locales/file-uploader/ko.js +2 -2
- package/dist/locales/file-uploader/lv.js +2 -2
- package/dist/locales/file-uploader/nb.js +2 -2
- package/dist/locales/file-uploader/nl.js +2 -2
- package/dist/locales/file-uploader/pl.js +2 -2
- package/dist/locales/file-uploader/pt.js +2 -2
- package/dist/locales/file-uploader/ro.js +2 -2
- package/dist/locales/file-uploader/ru.js +2 -2
- package/dist/locales/file-uploader/sk.js +2 -2
- package/dist/locales/file-uploader/sr.js +2 -2
- package/dist/locales/file-uploader/sv.js +2 -2
- package/dist/locales/file-uploader/tr.js +2 -2
- package/dist/locales/file-uploader/uk.js +2 -2
- package/dist/locales/file-uploader/vi.js +2 -2
- package/dist/locales/file-uploader/zh-TW.js +2 -2
- package/dist/locales/file-uploader/zh.js +2 -2
- package/dist/{plugins-DxjsQUa8.js → plugins-CGUls7EV.js} +6 -6
- package/dist/urlSourcePlugin-_WdbEhq2.js +8 -0
- package/package.json +1 -1
- package/web/ActivityHeader-BFdTdVfD.js +9 -0
- package/web/ActivityHeader-DQy6rII1.js +9 -0
- package/web/ActivityHeader-DvzMl0uj.js +9 -0
- package/web/ActivityHeader-i4x6_Fne.js +9 -0
- package/web/CameraSource-BAWIA4Wm.js +508 -0
- package/web/CameraSource-BqZCQcij.js +11 -0
- package/web/CameraSource-Brxr4tz4.js +508 -0
- package/web/CameraSource-BvBJ5Uzy.js +508 -0
- package/web/CameraSource-CkHzIE-h.js +11 -0
- package/web/CameraSource-D964yPLu.js +508 -0
- package/web/CameraSource-DE48Az-f.js +11 -0
- package/web/CameraSource-DyPebtRF.js +478 -0
- package/web/CameraSource-pj7Xo81m.js +11 -0
- package/web/CloudImageEditor-CTgUWB07.js +2192 -0
- package/web/CloudImageEditor-CxqV9Lwm.js +2192 -0
- package/web/CloudImageEditor-DoLWHpqV.js +2192 -0
- package/web/CloudImageEditor-Drywn265.js +2192 -0
- package/web/CloudImageEditor-MXcaDtMx.js +2187 -0
- package/web/CloudImageEditorActivity-BPzmfaJV.js +85 -0
- package/web/CloudImageEditorActivity-Br8pU5gd.js +11 -0
- package/web/CloudImageEditorActivity-Cw8b2CEz.js +11 -0
- package/web/CloudImageEditorActivity-Df1ySGq0.js +86 -0
- package/web/CloudImageEditorActivity-DinG5r0y.js +11 -0
- package/web/CloudImageEditorActivity-DmnLLINR.js +85 -0
- package/web/CloudImageEditorActivity-U90BGCek.js +85 -0
- package/web/CloudImageEditorActivity-dNLQZRZI.js +11 -0
- package/web/CloudImageEditorActivity-ur-hQ-6p.js +85 -0
- package/web/Config-8hlBNhvs.js +455 -0
- package/web/Config-BDZhPIyz.js +455 -0
- package/web/Config-CJVNrrjj.js +455 -0
- package/web/Config-DvkVtlQ7.js +455 -0
- package/web/ExternalSource-B9ycBFiD.js +10 -0
- package/web/ExternalSource-BE7HX47E.js +250 -0
- package/web/ExternalSource-BL5GSlol.js +250 -0
- package/web/ExternalSource-BXQY6Dlc.js +10 -0
- package/web/ExternalSource-BXxH3JCD.js +250 -0
- package/web/ExternalSource-BYSS-PPV.js +245 -0
- package/web/ExternalSource-C57a61QN.js +10 -0
- package/web/ExternalSource-CKfMtOgU.js +250 -0
- package/web/ExternalSource-DP6q8ylB.js +10 -0
- package/web/LitUploaderBlock-AX6jOdAS.js +996 -0
- package/web/LitUploaderBlock-BjAaoLl2.js +996 -0
- package/web/LitUploaderBlock-D8E5HuwH.js +996 -0
- package/web/LitUploaderBlock-Dl3ce0Tc.js +996 -0
- package/web/LitUploaderBlock-Oi33U0uf.js +996 -0
- package/web/UrlSource-B9SX3K0L.js +10 -0
- package/web/UrlSource-C3zB1rCb.js +70 -0
- package/web/UrlSource-C7bEU6Xv.js +10 -0
- package/web/UrlSource-CE389CBz.js +70 -0
- package/web/UrlSource-CnvAJ58Y.js +10 -0
- package/web/UrlSource-CqF0h6B-.js +10 -0
- package/web/UrlSource-D-971Nut.js +70 -0
- package/web/UrlSource-DhI3YCt5.js +70 -0
- package/web/UrlSource-hWV7jtB2.js +70 -0
- package/web/abstract/CTX.d.ts +40 -0
- package/web/abstract/TypedCollection.d.ts +47 -0
- package/web/abstract/TypedCollection.test.d.ts +1 -0
- package/web/abstract/TypedData.d.ts +12 -0
- package/web/abstract/TypedData.test.d.ts +1 -0
- package/web/abstract/UploaderPublicApi.d.ts +41 -0
- package/web/abstract/buildOutputCollectionState.d.ts +3 -0
- package/web/abstract/customConfigOptions.d.ts +65 -0
- package/web/abstract/defineComponents.d.ts +1 -0
- package/web/abstract/features/ClipboardLayer.d.ts +12 -0
- package/web/abstract/loadFileUploaderFrom.d.ts +13 -0
- package/web/abstract/localeRegistry.d.ts +5 -0
- package/web/abstract/managers/LocaleManager.d.ts +10 -0
- package/web/abstract/managers/ModalManager.d.ts +53 -0
- package/web/abstract/managers/SecureUploadsManager.d.ts +7 -0
- package/web/abstract/managers/TelemetryManager.d.ts +41 -0
- package/web/abstract/managers/ValidationManager.d.ts +34 -0
- package/web/abstract/managers/__tests__/ModalManager.test.d.ts +13 -0
- package/web/abstract/managers/__tests__/SecureUploadsManager.test.d.ts +1 -0
- package/web/abstract/managers/a11y.d.ts +9 -0
- package/web/abstract/managers/plugin/PluginManager.d.ts +25 -0
- package/web/abstract/managers/plugin/PluginTypes.d.ts +146 -0
- package/web/abstract/managers/plugin/index.d.ts +2 -0
- package/web/abstract/sharedConfigKey.d.ts +2 -0
- package/web/abstract/uploadEntrySchema.d.ts +34 -0
- package/web/blocks/ActivityHeader/ActivityHeader.d.ts +8 -0
- package/web/blocks/CameraSource/CameraSource.d.ts +121 -0
- package/web/blocks/CameraSource/__tests__/calcCameraModes.test.d.ts +1 -0
- package/web/blocks/CameraSource/calcCameraModes.d.ts +5 -0
- package/web/blocks/CameraSource/constants.d.ts +15 -0
- package/web/blocks/CloudImageEditor/index.d.ts +1 -0
- package/web/blocks/CloudImageEditor/src/CloudImageEditorBlock.d.ts +60 -0
- package/web/blocks/CloudImageEditor/src/CropFrame.d.ts +56 -0
- package/web/blocks/CloudImageEditor/src/EditorAspectRatioButtonControl.d.ts +24 -0
- package/web/blocks/CloudImageEditor/src/EditorButtonControl.d.ts +14 -0
- package/web/blocks/CloudImageEditor/src/EditorCropButtonControl.d.ts +13 -0
- package/web/blocks/CloudImageEditor/src/EditorFilterControl.d.ts +35 -0
- package/web/blocks/CloudImageEditor/src/EditorImageCropper.d.ts +56 -0
- package/web/blocks/CloudImageEditor/src/EditorImageFader.d.ts +63 -0
- package/web/blocks/CloudImageEditor/src/EditorOperationControl.d.ts +15 -0
- package/web/blocks/CloudImageEditor/src/EditorScroller.d.ts +15 -0
- package/web/blocks/CloudImageEditor/src/EditorSlider.d.ts +33 -0
- package/web/blocks/CloudImageEditor/src/EditorToolbar.d.ts +68 -0
- package/web/blocks/CloudImageEditor/src/crop-utils.d.ts +36 -0
- package/web/blocks/CloudImageEditor/src/crop-utils.test.d.ts +1 -0
- package/web/blocks/CloudImageEditor/src/cropper-constants.d.ts +10 -0
- package/web/blocks/CloudImageEditor/src/elements/button/BtnUi.d.ts +31 -0
- package/web/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.d.ts +19 -0
- package/web/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.d.ts +27 -0
- package/web/blocks/CloudImageEditor/src/elements/slider/SliderUi.d.ts +38 -0
- package/web/blocks/CloudImageEditor/src/index.d.ts +15 -0
- package/web/blocks/CloudImageEditor/src/lib/classNames.d.ts +5 -0
- package/web/blocks/CloudImageEditor/src/lib/classNames.test.d.ts +1 -0
- package/web/blocks/CloudImageEditor/src/lib/linspace.d.ts +1 -0
- package/web/blocks/CloudImageEditor/src/lib/linspace.test.d.ts +1 -0
- package/web/blocks/CloudImageEditor/src/lib/parseCropPreset.d.ts +4 -0
- package/web/blocks/CloudImageEditor/src/lib/parseCropPreset.test.d.ts +1 -0
- package/web/blocks/CloudImageEditor/src/lib/parseTabs.d.ts +2 -0
- package/web/blocks/CloudImageEditor/src/lib/pick.d.ts +1 -0
- package/web/blocks/CloudImageEditor/src/lib/pick.test.d.ts +1 -0
- package/web/blocks/CloudImageEditor/src/lib/transformationUtils.d.ts +7 -0
- package/web/blocks/CloudImageEditor/src/state.d.ts +20 -0
- package/web/blocks/CloudImageEditor/src/svg-sprite.d.ts +2 -0
- package/web/blocks/CloudImageEditor/src/toolbar-constants.d.ts +61 -0
- package/web/blocks/CloudImageEditor/src/types.d.ts +60 -0
- package/web/blocks/CloudImageEditor/src/util.d.ts +2 -0
- package/web/blocks/CloudImageEditor/src/utils/parseFilterValue.d.ts +7 -0
- package/web/blocks/CloudImageEditor/src/utils/parseFilterValue.test.d.ts +1 -0
- package/web/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts +25 -0
- package/web/blocks/Config/Config.d.ts +60 -0
- package/web/blocks/Config/assertions.d.ts +5 -0
- package/web/blocks/Config/computed-properties.d.ts +24 -0
- package/web/blocks/Config/computed-properties.test.d.ts +1 -0
- package/web/blocks/Config/initialConfig.d.ts +6 -0
- package/web/blocks/Config/normalizeConfigValue.d.ts +2 -0
- package/web/blocks/Config/validatorsType.d.ts +18 -0
- package/web/blocks/Copyright/Copyright.d.ts +10 -0
- package/web/blocks/DropArea/DropArea.d.ts +47 -0
- package/web/blocks/DropArea/addDropzone.d.ts +17 -0
- package/web/blocks/DropArea/getDropItems.d.ts +12 -0
- package/web/blocks/ExternalSource/ExternalSource.d.ts +45 -0
- package/web/blocks/ExternalSource/MessageBridge.d.ts +11 -0
- package/web/blocks/ExternalSource/buildThemeDefinition.d.ts +4 -0
- package/web/blocks/ExternalSource/query-string.d.ts +1 -0
- package/web/blocks/ExternalSource/types.d.ts +105 -0
- package/web/blocks/FileItem/FileItem.d.ts +50 -0
- package/web/blocks/FileItem/FileItemConfig.d.ts +10 -0
- package/web/blocks/FormInput/FormInput.d.ts +18 -0
- package/web/blocks/Icon/Icon.d.ts +19 -0
- package/web/blocks/Img/Img.d.ts +14 -0
- package/web/blocks/Img/ImgBase.d.ts +29 -0
- package/web/blocks/Img/ImgConfig.d.ts +28 -0
- package/web/blocks/Img/configurations.d.ts +11 -0
- package/web/blocks/Img/props-map.d.ts +28 -0
- package/web/blocks/Img/utils/parseObjectToString.d.ts +2 -0
- package/web/blocks/Modal/Modal.d.ts +34 -0
- package/web/blocks/PluginActivityRenderer/PluginActivityRenderer.d.ts +32 -0
- package/web/blocks/PluginActivityRenderer/index.d.ts +1 -0
- package/web/blocks/ProgressBar/ProgressBar.d.ts +21 -0
- package/web/blocks/ProgressBarCommon/ProgressBarCommon.d.ts +17 -0
- package/web/blocks/Select/Select.d.ts +18 -0
- package/web/blocks/SimpleBtn/SimpleBtn.d.ts +15 -0
- package/web/blocks/SourceBtn/SourceBtn.d.ts +23 -0
- package/web/blocks/SourceList/SourceList.d.ts +24 -0
- package/web/blocks/Spinner/Spinner.d.ts +9 -0
- package/web/blocks/StartFrom/StartFrom.d.ts +12 -0
- package/web/blocks/Thumb/Thumb.d.ts +35 -0
- package/web/blocks/UploadCtxProvider/EventEmitter.d.ts +70 -0
- package/web/blocks/UploadCtxProvider/UploadCtxProvider.d.ts +44 -0
- package/web/blocks/UploadList/UploadList.d.ts +39 -0
- package/web/blocks/UrlSource/UrlSource.d.ts +14 -0
- package/web/blocks/svg-backgrounds/svg-backgrounds.d.ts +3 -0
- package/web/blocks/themes/uc-basic/svg-sprite.d.ts +2 -0
- package/web/cameraPlugin-DeedXMWV.js +8 -0
- package/web/cameraPlugin-Duy1QwjB.js +8 -0
- package/web/cameraPlugin-QS9SUOtO.js +8 -0
- package/web/cameraPlugin-bq8ggY04.js +8 -0
- package/web/cameraPlugin-cel9YgP_.js +8 -0
- package/web/cloud-image-editor-8DrVRZ7E.js +12 -0
- package/web/cloud-image-editor-BX50EK1U.js +12 -0
- package/web/cloud-image-editor-DSW3oWq-.js +12 -0
- package/web/cloud-image-editor-DuI2Lx4M.js +12 -0
- package/web/cloudImageEditorPlugin-5my6aD36.js +8 -0
- package/web/cloudImageEditorPlugin-Bk19DmJv.js +8 -0
- package/web/cloudImageEditorPlugin-CcdnmtBW.js +8 -0
- package/web/cloudImageEditorPlugin-DQJmDl03.js +8 -0
- package/web/cloudImageEditorPlugin-kojghfqw.js +8 -0
- package/web/constants-BCfCF0cJ.js +4025 -0
- package/web/core.d.ts +42 -0
- package/web/env.d.ts +2 -0
- package/web/externalSourcesPlugin-BTeRm5C0.js +8 -0
- package/web/externalSourcesPlugin-BXgVeojg.js +8 -0
- package/web/externalSourcesPlugin-BgLpuIK9.js +8 -0
- package/web/externalSourcesPlugin-DMc9zs4T.js +8 -0
- package/web/externalSourcesPlugin-Dm9vnTBv.js +8 -0
- package/web/file-uploader.iife.min.js +697 -0
- package/web/file-uploader.min.js +1859 -0
- package/web/imageShrinkPlugin-BdHgEGZH.js +8 -0
- package/web/imageShrinkPlugin-BjkMGfvT.js +8 -0
- package/web/imageShrinkPlugin-CCkGHL2w.js +8 -0
- package/web/imageShrinkPlugin-D4WjaRGo.js +8 -0
- package/web/imageShrinkPlugin-DqYGutVx.js +8 -0
- package/web/index.d.ts +42 -0
- package/web/instagramPlugin-BTMz0K2a.js +8 -0
- package/web/instagramPlugin-BbIKgTH7.js +8 -0
- package/web/instagramPlugin-CQQhsEJa.js +8 -0
- package/web/instagramPlugin-Cm7lWKae.js +8 -0
- package/web/instagramPlugin-DcclxM_d.js +8 -0
- package/web/lit/BaseComponent.d.ts +12 -0
- package/web/lit/Constructor.d.ts +1 -0
- package/web/lit/CssDataMixin.d.ts +7 -0
- package/web/lit/LightDomMixin.d.ts +8 -0
- package/web/lit/LitActivityBlock.d.ts +53 -0
- package/web/lit/LitBlock.d.ts +83 -0
- package/web/lit/LitSolutionBlock.d.ts +21 -0
- package/web/lit/LitUploaderBlock.d.ts +53 -0
- package/web/lit/PubSubCompat.d.ts +18 -0
- package/web/lit/RegisterableElementMixin.d.ts +7 -0
- package/web/lit/SharedState.d.ts +119 -0
- package/web/lit/SymbioteCompatMixin.d.ts +40 -0
- package/web/lit/TestModeController.d.ts +16 -0
- package/web/lit/Uid.d.ts +3 -0
- package/web/lit/activity-constants.d.ts +11 -0
- package/web/lit/createDebugPrinter.d.ts +3 -0
- package/web/lit/findBlockInCtx.d.ts +3 -0
- package/web/lit/getOutputData.d.ts +2 -0
- package/web/lit/hasBlockInCtx.d.ts +3 -0
- package/web/lit/l10n.d.ts +5 -0
- package/web/lit/parseCssPropertyValue.d.ts +1 -0
- package/web/lit/shared-instances.d.ts +65 -0
- package/web/locales/file-uploader/ar.d.ts +137 -0
- package/web/locales/file-uploader/az.d.ts +129 -0
- package/web/locales/file-uploader/ca.d.ts +131 -0
- package/web/locales/file-uploader/cs.d.ts +133 -0
- package/web/locales/file-uploader/da.d.ts +129 -0
- package/web/locales/file-uploader/de.d.ts +129 -0
- package/web/locales/file-uploader/el.d.ts +129 -0
- package/web/locales/file-uploader/en.d.ts +129 -0
- package/web/locales/file-uploader/es.d.ts +131 -0
- package/web/locales/file-uploader/et.d.ts +129 -0
- package/web/locales/file-uploader/fi.d.ts +129 -0
- package/web/locales/file-uploader/fr.d.ts +131 -0
- package/web/locales/file-uploader/he.d.ts +131 -0
- package/web/locales/file-uploader/hy.d.ts +129 -0
- package/web/locales/file-uploader/is.d.ts +129 -0
- package/web/locales/file-uploader/it.d.ts +131 -0
- package/web/locales/file-uploader/ja.d.ts +129 -0
- package/web/locales/file-uploader/ka.d.ts +129 -0
- package/web/locales/file-uploader/kk.d.ts +129 -0
- package/web/locales/file-uploader/ko.d.ts +129 -0
- package/web/locales/file-uploader/lv.d.ts +131 -0
- package/web/locales/file-uploader/nb.d.ts +129 -0
- package/web/locales/file-uploader/nl.d.ts +129 -0
- package/web/locales/file-uploader/pl.d.ts +133 -0
- package/web/locales/file-uploader/pt.d.ts +131 -0
- package/web/locales/file-uploader/ro.d.ts +131 -0
- package/web/locales/file-uploader/ru.d.ts +133 -0
- package/web/locales/file-uploader/sk.d.ts +133 -0
- package/web/locales/file-uploader/sr.d.ts +131 -0
- package/web/locales/file-uploader/sv.d.ts +129 -0
- package/web/locales/file-uploader/tr.d.ts +129 -0
- package/web/locales/file-uploader/uk.d.ts +133 -0
- package/web/locales/file-uploader/vi.d.ts +129 -0
- package/web/locales/file-uploader/zh-TW.d.ts +129 -0
- package/web/locales/file-uploader/zh.d.ts +129 -0
- package/web/plugins/cameraPlugin.d.ts +2 -0
- package/web/plugins/cloudImageEditorPlugin.d.ts +2 -0
- package/web/plugins/externalSourcesPlugin.d.ts +2 -0
- package/web/plugins/imageShrinkPlugin.d.ts +2 -0
- package/web/plugins/instagramPlugin.d.ts +2 -0
- package/web/plugins/unsplashPlugin.d.ts +16 -0
- package/web/plugins/urlSourcePlugin.d.ts +2 -0
- package/web/plugins-Bt7FXHKx.js +562 -0
- package/web/plugins-CaaolyMk.js +562 -0
- package/web/plugins-Cjgw5oWg.js +562 -0
- package/web/plugins-CzNtrVQB.js +562 -0
- package/web/plugins-DS0hIs2V.js +563 -0
- package/web/ref-BOnG19ns.js +4040 -0
- package/web/ref-BejJFG7m.js +4040 -0
- package/web/ref-DcRg7zo9.js +4040 -0
- package/web/ref-ZWPcLQB9.js +4040 -0
- package/web/solutions/adaptive-image/index.d.ts +2 -0
- package/web/solutions/cloud-image-editor/CloudImageEditor.d.ts +11 -0
- package/web/solutions/cloud-image-editor/index.d.ts +5 -0
- package/web/solutions/file-uploader/inline/FileUploaderInline.d.ts +20 -0
- package/web/solutions/file-uploader/inline/index.d.ts +1 -0
- package/web/solutions/file-uploader/minimal/FileUploaderMinimal.d.ts +23 -0
- package/web/solutions/file-uploader/minimal/index.d.ts +1 -0
- package/web/solutions/file-uploader/regular/FileUploaderRegular.d.ts +17 -0
- package/web/solutions/file-uploader/regular/index.d.ts +1 -0
- package/web/style-map-BmZdux7T.js +37 -0
- package/web/style-map-CZ6fSV6e.js +37 -0
- package/web/style-map-Dk7mLCrB.js +37 -0
- package/web/style-map-HkHnu9oA.js +37 -0
- package/web/style-map-tw1yUEaj.js +37 -0
- package/web/types/dom.d.ts +1 -0
- package/web/types/events.d.ts +4 -0
- package/web/types/exported.d.ts +492 -0
- package/web/types/index.d.ts +5 -0
- package/web/uc-basic.layered.min.css +6046 -0
- package/web/uc-basic.min.css +5487 -0
- package/web/uc-cloud-image-editor.layered.min.css +1884 -0
- package/web/uc-cloud-image-editor.min.css +1675 -0
- package/web/uc-cloud-image-editor.min.js +457 -0
- package/web/uc-file-uploader-inline.layered.min.css +4352 -0
- package/web/uc-file-uploader-inline.min.css +3836 -0
- package/web/uc-file-uploader-inline.min.js +1859 -0
- package/web/uc-file-uploader-minimal.layered.min.css +4352 -0
- package/web/uc-file-uploader-minimal.min.css +3836 -0
- package/web/uc-file-uploader-minimal.min.js +1859 -0
- package/web/uc-file-uploader-regular.layered.min.css +4352 -0
- package/web/uc-file-uploader-regular.min.css +3836 -0
- package/web/uc-file-uploader-regular.min.js +1859 -0
- package/web/uc-img.min.js +895 -0
- package/web/urlSourcePlugin-9lhcr02f.js +8 -0
- package/web/urlSourcePlugin-C-sLGhGb.js +8 -0
- package/web/urlSourcePlugin-DNXDpnRD.js +8 -0
- package/web/urlSourcePlugin-JnD0cnxb.js +8 -0
- package/web/urlSourcePlugin-hcMU2K6T.js +8 -0
- package/web/utils/UID.d.ts +5 -0
- package/web/utils/UID.test.d.ts +1 -0
- package/web/utils/UploadSource.d.ts +37 -0
- package/web/utils/WindowHeightTracker.d.ts +9 -0
- package/web/utils/abilities.d.ts +1 -0
- package/web/utils/applyStyles.d.ts +1 -0
- package/web/utils/browser-info.d.ts +12 -0
- package/web/utils/browser-info.test.d.ts +1 -0
- package/web/utils/cdn-utils.d.ts +53 -0
- package/web/utils/cdn-utils.test.d.ts +1 -0
- package/web/utils/comma-separated.d.ts +2 -0
- package/web/utils/debounce.d.ts +3 -0
- package/web/utils/delay.d.ts +1 -0
- package/web/utils/fileTypes.d.ts +11 -0
- package/web/utils/fileTypes.test.d.ts +1 -0
- package/web/utils/get-top-level-origin.d.ts +1 -0
- package/web/utils/get-top-level-origin.test.d.ts +1 -0
- package/web/utils/getLocaleDirection.d.ts +1 -0
- package/web/utils/getPluralForm.d.ts +1 -0
- package/web/utils/getPluralForm.test.d.ts +1 -0
- package/web/utils/isPromiseLike.d.ts +1 -0
- package/web/utils/isPromiseLike.test.d.ts +1 -0
- package/web/utils/isSecureTokenExpired.d.ts +8 -0
- package/web/utils/isSecureTokenExpired.test.d.ts +1 -0
- package/web/utils/memoize.d.ts +1 -0
- package/web/utils/memoize.test.d.ts +1 -0
- package/web/utils/mixinClass.d.ts +8 -0
- package/web/utils/parseCdnUrl.d.ts +11 -0
- package/web/utils/parseCdnUrl.test.d.ts +1 -0
- package/web/utils/parseShrink.d.ts +7 -0
- package/web/utils/parseShrink.test.d.ts +1 -0
- package/web/utils/preloadImage.d.ts +10 -0
- package/web/utils/prettyBytes.d.ts +11 -0
- package/web/utils/prettyBytes.test.d.ts +1 -0
- package/web/utils/resizeImage.d.ts +1 -0
- package/web/utils/stringToArray.d.ts +1 -0
- package/web/utils/stringToArray.test.d.ts +1 -0
- package/web/utils/template-utils.d.ts +16 -0
- package/web/utils/template-utils.test.d.ts +1 -0
- package/web/utils/throttle.d.ts +3 -0
- package/web/utils/toKebabCase.d.ts +2 -0
- package/web/utils/toKebabCase.test.d.ts +1 -0
- package/web/utils/transparentPixelSrc.d.ts +1 -0
- package/web/utils/uniqueArray.d.ts +1 -0
- package/web/utils/uniqueArray.test.d.ts +1 -0
- package/web/utils/userAgent.d.ts +2 -0
- package/web/utils/validators/collection/index.d.ts +2 -0
- package/web/utils/validators/collection/validateCollectionUploadError.d.ts +2 -0
- package/web/utils/validators/collection/validateMultiple.d.ts +2 -0
- package/web/utils/validators/file/index.d.ts +4 -0
- package/web/utils/validators/file/validateFileType.d.ts +2 -0
- package/web/utils/validators/file/validateIsImage.d.ts +2 -0
- package/web/utils/validators/file/validateMaxSizeLimit.d.ts +2 -0
- package/web/utils/validators/file/validateUploadError.d.ts +2 -0
- package/web/utils/warnOnce.d.ts +1 -0
- package/web/utils/wildcardRegexp.d.ts +1 -0
- package/web/utils/wildcardRegexp.test.d.ts +1 -0
- package/web/utils/withResolvers.d.ts +5 -0
- package/web/utils/withResolvers.test.d.ts +1 -0
- package/dist/CameraSource-px4BzEMI.js +0 -9
- package/dist/ExternalSource-CR5DG0Jv.js +0 -9
- package/dist/UrlSource-BxVL9Pve.js +0 -9
- package/dist/cameraPlugin-dGash48Q.js +0 -8
- package/dist/cloudImageEditorPlugin-2EU0Pm_j.js +0 -8
- package/dist/env-B1nfXy9i.js +0 -8
- package/dist/externalSourcesPlugin-DKQqk3AC.js +0 -8
- package/dist/imageShrinkPlugin-DAx8eRen.js +0 -8
- package/dist/instagramPlugin-k67tMAo3.js +0 -8
- package/dist/urlSourcePlugin-9xdB7Pvw.js +0 -8
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Package: @uploadcare/file-uploader@1.28.0-alpha.1 (MIT)
|
|
4
|
+
* License: https://github.com/uploadcare/blob/main/LICENSE
|
|
5
|
+
* Built: 2026-03-02T20:26:07.910Z
|
|
6
|
+
*/
|
|
7
|
+
import { n as LitActivityBlock } from "./LitUploaderBlock-LxeOZ0ya.js";
|
|
8
|
+
var ActivityHeader = class extends LitActivityBlock {};
|
|
9
|
+
export { ActivityHeader as t };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
uc-activity-header {
|
|
3
|
+
display: flex;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
gap: var(--uc-padding);
|
|
6
|
+
padding: var(--uc-padding);
|
|
7
|
+
color: var(--uc-foreground);
|
|
8
|
+
font-weight: 500;
|
|
9
|
+
font-size: 1em;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
uc-activity-header > * {
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
uc-activity-header > div > uc-icon {
|
|
18
|
+
width: auto;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
uc-activity-header > div {
|
|
22
|
+
gap: var(--uc-padding);
|
|
23
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@layer uc.components {
|
|
2
|
+
uc-activity-header {
|
|
3
|
+
display: flex;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
gap: var(--uc-padding);
|
|
6
|
+
padding: var(--uc-padding);
|
|
7
|
+
color: var(--uc-foreground);
|
|
8
|
+
font-weight: 500;
|
|
9
|
+
font-size: 1em;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
uc-activity-header > * {
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
uc-activity-header > div > uc-icon {
|
|
18
|
+
width: auto;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
uc-activity-header > div {
|
|
22
|
+
gap: var(--uc-padding);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -1,16 +1,46 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Package: @uploadcare/file-uploader@1.28.0-alpha.
|
|
3
|
+
* Package: @uploadcare/file-uploader@1.28.0-alpha.1 (MIT)
|
|
4
4
|
* License: https://github.com/uploadcare/blob/main/LICENSE
|
|
5
|
-
* Built: 2026-03-
|
|
5
|
+
* Built: 2026-03-02T20:26:07.910Z
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
8
|
-
import { c as UploadSource, f as deserializeCsv } from "./plugins-
|
|
9
|
-
import { n as LitActivityBlock, t as LitUploaderBlock } from "./LitUploaderBlock-
|
|
7
|
+
import { $ as stringToArray, A as CameraSourceTypes, I as InternalEventType, j as LitBlock, k as CameraSourceEvents, lt as __decorate, ut as debounce } from "./Icon-tXRTvEF2.js";
|
|
8
|
+
import { c as UploadSource, f as deserializeCsv } from "./plugins-CGUls7EV.js";
|
|
9
|
+
import { n as LitActivityBlock, t as LitUploaderBlock } from "./LitUploaderBlock-LxeOZ0ya.js";
|
|
10
10
|
import { html } from "lit";
|
|
11
|
-
import { state } from "lit/decorators.js";
|
|
11
|
+
import { property, state } from "lit/decorators.js";
|
|
12
12
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
13
13
|
import { styleMap } from "lit/directives/style-map.js";
|
|
14
|
+
var Select = class extends LitBlock {
|
|
15
|
+
constructor(...e) {
|
|
16
|
+
super(...e), this.value = "", this.disabled = !1, this.options = [], this._handleChange = (e) => {
|
|
17
|
+
if (this.disabled) {
|
|
18
|
+
e.preventDefault(), e.stopPropagation();
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
e.preventDefault(), e.stopPropagation();
|
|
22
|
+
let b = e.currentTarget;
|
|
23
|
+
b && (this.value = b.value, this.dispatchEvent(new Event("change")));
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
render() {
|
|
27
|
+
return html`
|
|
28
|
+
<select @change=${this._handleChange} .value=${this.value} ?disabled=${this.disabled}>
|
|
29
|
+
${this.options.map((e) => html`<option value=${e.value}>${e.text}</option>`)}
|
|
30
|
+
</select>
|
|
31
|
+
`;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
__decorate([property({
|
|
35
|
+
type: String,
|
|
36
|
+
attribute: !1
|
|
37
|
+
})], Select.prototype, "value", void 0), __decorate([property({
|
|
38
|
+
type: Boolean,
|
|
39
|
+
reflect: !0
|
|
40
|
+
})], Select.prototype, "disabled", void 0), __decorate([property({
|
|
41
|
+
type: Array,
|
|
42
|
+
attribute: !1
|
|
43
|
+
})], Select.prototype, "options", void 0);
|
|
14
44
|
const canUsePermissionsApi = () => navigator.permissions !== void 0;
|
|
15
45
|
var DEFAULT_VIDEO_CONFIG = {
|
|
16
46
|
width: { ideal: 1920 },
|
|
@@ -21,8 +51,8 @@ function formatTime(e) {
|
|
|
21
51
|
return `${Math.floor(e / 60).toString().padStart(2, "0")}:${Math.floor(e % 60).toString().padStart(2, "0")}`;
|
|
22
52
|
}
|
|
23
53
|
var DEFAULT_PICTURE_FORMAT = "image/jpeg", DEFAULT_VIDEO_FORMAT = "video/webm", CameraSource = class extends LitUploaderBlock {
|
|
24
|
-
constructor(...
|
|
25
|
-
super(...
|
|
54
|
+
constructor(...e) {
|
|
55
|
+
super(...e), this.couldBeCtxOwner = !0, this._unsubPermissions = null, this._capturing = !1, this._chunks = [], this._mediaRecorder = null, this._stream = null, this._selectedAudioId = null, this._selectedCameraId = null, this._activeTab = null, this._options = {}, this._canvas = null, this._ctx = null, this._cameraDevices = [], this._audioDevices = [], this._permissionResponses = {}, this._permissionCleanupFns = [], this._currentVideoSource = null, this._handlePreviewPlay = () => {
|
|
26
56
|
this._startTimeline(), this._currentTimelineIcon = "pause";
|
|
27
57
|
}, this._handlePreviewPause = () => {
|
|
28
58
|
this._currentTimelineIcon = "play", this._stopTimeline();
|
|
@@ -42,11 +72,11 @@ var DEFAULT_PICTURE_FORMAT = "image/jpeg", DEFAULT_VIDEO_FORMAT = "video/webm",
|
|
|
42
72
|
this._startRecording();
|
|
43
73
|
}
|
|
44
74
|
}, this._handleCameraSelectChange = (e) => {
|
|
45
|
-
let
|
|
46
|
-
|
|
75
|
+
let b = e.target;
|
|
76
|
+
b && (this._selectedCameraId = b.value, this._capture());
|
|
47
77
|
}, this._handleAudioSelectChange = (e) => {
|
|
48
|
-
let
|
|
49
|
-
|
|
78
|
+
let b = e.target;
|
|
79
|
+
b && (this._selectedAudioId = b.value, this._capture());
|
|
50
80
|
}, this._handleRequestPermissions = () => {
|
|
51
81
|
this._capture();
|
|
52
82
|
}, this._handleStartCamera = () => {
|
|
@@ -81,22 +111,22 @@ var DEFAULT_PICTURE_FORMAT = "image/jpeg", DEFAULT_VIDEO_FORMAT = "video/webm",
|
|
|
81
111
|
} }
|
|
82
112
|
}), this._accept();
|
|
83
113
|
}, this._handleClickTab = (e) => {
|
|
84
|
-
let
|
|
85
|
-
|
|
114
|
+
let b = e.currentTarget?.getAttribute("data-id");
|
|
115
|
+
b && this._handleActiveTab(b);
|
|
86
116
|
}, this._updateTimer = () => {
|
|
87
117
|
let e = Math.floor((performance.now() - this._startTime + this._elapsedTime) / 1e3);
|
|
88
118
|
if (typeof this.cfg.maxVideoRecordingDuration == "number" && this.cfg.maxVideoRecordingDuration > 0) {
|
|
89
|
-
let
|
|
90
|
-
if (
|
|
119
|
+
let b = this.cfg.maxVideoRecordingDuration - e;
|
|
120
|
+
if (b <= 0) {
|
|
91
121
|
let e = this._timerRef.value;
|
|
92
|
-
e && (e.textContent = formatTime(
|
|
122
|
+
e && (e.textContent = formatTime(b)), this._stopRecording();
|
|
93
123
|
return;
|
|
94
124
|
}
|
|
95
|
-
let
|
|
96
|
-
|
|
125
|
+
let x = this._timerRef.value;
|
|
126
|
+
x && (x.textContent = formatTime(b));
|
|
97
127
|
} else {
|
|
98
|
-
let
|
|
99
|
-
|
|
128
|
+
let b = this._timerRef.value;
|
|
129
|
+
b && (b.textContent = formatTime(e));
|
|
100
130
|
}
|
|
101
131
|
this._animationFrameId = requestAnimationFrame(this._updateTimer);
|
|
102
132
|
}, this._startTimer = () => {
|
|
@@ -106,10 +136,10 @@ var DEFAULT_PICTURE_FORMAT = "image/jpeg", DEFAULT_VIDEO_FORMAT = "video/webm",
|
|
|
106
136
|
}, this._startTimeline = () => {
|
|
107
137
|
let e = this._videoRef.value;
|
|
108
138
|
if (!e) return;
|
|
109
|
-
let
|
|
110
|
-
|
|
111
|
-
let
|
|
112
|
-
|
|
139
|
+
let b = e.currentTime, x = e.duration || 1, S = this._lineRef.value;
|
|
140
|
+
S && (S.style.transform = `scaleX(${b / x})`);
|
|
141
|
+
let C = this._timerRef.value;
|
|
142
|
+
C && (C.textContent = formatTime(b)), this._animationFrameId = requestAnimationFrame(this._startTimeline);
|
|
113
143
|
}, this._stopTimeline = () => {
|
|
114
144
|
this._animationFrameId && cancelAnimationFrame(this._animationFrameId);
|
|
115
145
|
}, this._animationFrameId = null, this._startRecording = () => {
|
|
@@ -143,9 +173,9 @@ var DEFAULT_PICTURE_FORMAT = "image/jpeg", DEFAULT_VIDEO_FORMAT = "video/webm",
|
|
|
143
173
|
});
|
|
144
174
|
}, this._previewVideo = () => {
|
|
145
175
|
try {
|
|
146
|
-
let e = new Blob(this._chunks, { type: this._mediaRecorder?.mimeType }),
|
|
147
|
-
if (!
|
|
148
|
-
|
|
176
|
+
let e = new Blob(this._chunks, { type: this._mediaRecorder?.mimeType }), b = URL.createObjectURL(e), x = this._videoRef.value;
|
|
177
|
+
if (!x) return;
|
|
178
|
+
x.muted = !1, x.volume = 1, this._setVideoSource(null), x.src = b, this._attachPreviewListeners(x);
|
|
149
179
|
} catch (e) {
|
|
150
180
|
console.error("Failed to preview video", e), this.telemetryManager.sendEventError(e, "camera previewing. Failed to preview video");
|
|
151
181
|
}
|
|
@@ -160,48 +190,48 @@ var DEFAULT_PICTURE_FORMAT = "image/jpeg", DEFAULT_VIDEO_FORMAT = "video/webm",
|
|
|
160
190
|
if (this._setCameraState(CameraSourceEvents.ACCEPT), this._activeTab === CameraSourceTypes.PHOTO) {
|
|
161
191
|
this._canvas?.toBlob((e) => {
|
|
162
192
|
if (!e) return;
|
|
163
|
-
let
|
|
164
|
-
this._toSend(
|
|
193
|
+
let b = this._createFile("camera", "jpeg", DEFAULT_PICTURE_FORMAT, e);
|
|
194
|
+
this._toSend(b);
|
|
165
195
|
}, DEFAULT_PICTURE_FORMAT);
|
|
166
196
|
return;
|
|
167
197
|
}
|
|
168
|
-
let
|
|
169
|
-
this._toSend(
|
|
170
|
-
}, this._handlePhoto = (
|
|
171
|
-
|
|
172
|
-
}, this._handleVideo = (
|
|
173
|
-
|
|
174
|
-
}, this._setCameraState = (
|
|
175
|
-
this._activeTab === CameraSourceTypes.PHOTO && (
|
|
176
|
-
}, this._handleActiveTab = (
|
|
177
|
-
this._switcherRef.value?.querySelectorAll("button").forEach((
|
|
178
|
-
|
|
179
|
-
}),
|
|
198
|
+
let e = new Blob(this._chunks, { type: this._mediaRecorder?.mimeType }), x = this._guessExtensionByMime(this._mediaRecorder?.mimeType), S = this._createFile("video", x, `video/${x}`, e);
|
|
199
|
+
this._toSend(S), this._chunks = [];
|
|
200
|
+
}, this._handlePhoto = (e) => {
|
|
201
|
+
e === CameraSourceEvents.SHOT && (this._tabVideoHidden = !0, this._cameraHidden = !0, this._tabCameraHidden = !0, this._cameraActionsHidden = !1, this._cameraSelectHidden = !0), (e === CameraSourceEvents.RETAKE || e === CameraSourceEvents.ACCEPT) && (this._tabVideoHidden = !this._cameraModes.includes(CameraSourceTypes.VIDEO), this._tabCameraHidden = !this._cameraModes.includes(CameraSourceTypes.PHOTO), this._cameraHidden = !1, this._cameraActionsHidden = !0, this._cameraSelectHidden = this._cameraDevices.length <= 1);
|
|
202
|
+
}, this._handleVideo = (e) => {
|
|
203
|
+
e === CameraSourceEvents.PLAY && (this._timerHidden = !1, this._tabCameraHidden = !0, this._cameraSelectHidden = !0, this._audioSelectHidden = !0, this._currentTimelineIcon = "pause", this._currentIcon = "square", this._mutableClassButton = "uc-shot-btn uc-camera-action uc-stop-record"), e === CameraSourceEvents.STOP && (this._timerHidden = !1, this._cameraHidden = !0, this._audioToggleMicrophoneHidden = !0, this._cameraActionsHidden = !1), (e === CameraSourceEvents.RETAKE || e === CameraSourceEvents.ACCEPT) && (this._timerHidden = !0, this._tabVideoHidden = !this._cameraModes.includes(CameraSourceTypes.VIDEO), this._tabCameraHidden = !this._cameraModes.includes(CameraSourceTypes.PHOTO), this._cameraHidden = !1, this._cameraActionsHidden = !0, this._audioToggleMicrophoneHidden = !this.cfg.enableAudioRecording, this._currentIcon = "video-camera-full", this._mutableClassButton = "uc-shot-btn uc-camera-action", this._audioSelectHidden = !this.cfg.enableAudioRecording || this._audioDevices.length <= 1, this._cameraSelectHidden = this._cameraDevices.length <= 1);
|
|
204
|
+
}, this._setCameraState = (e) => {
|
|
205
|
+
this._activeTab === CameraSourceTypes.PHOTO && (e === "shot" || e === "retake" || e === "accept") && this._handlePhoto(e), this._activeTab === CameraSourceTypes.VIDEO && (e === "play" || e === "stop" || e === "retake" || e === "accept" || e === "pause" || e === "resume") && this._handleVideo(e);
|
|
206
|
+
}, this._handleActiveTab = (e) => {
|
|
207
|
+
this._switcherRef.value?.querySelectorAll("button").forEach((b) => {
|
|
208
|
+
b.classList.toggle("uc-active", b.getAttribute("data-id") === e);
|
|
209
|
+
}), e === CameraSourceTypes.PHOTO && (this._currentIcon = "camera-full", this._audioSelectHidden = !0, this._audioToggleMicrophoneHidden = !0), e === CameraSourceTypes.VIDEO && (this._currentTimelineIcon = "play", this._currentIcon = "video-camera-full", this._audioSelectHidden = !this.cfg.enableAudioRecording || this._audioDevices.length <= 1, this._audioToggleMicrophoneHidden = !this.cfg.enableAudioRecording), this.telemetryManager.sendEvent({
|
|
180
210
|
eventType: InternalEventType.ACTION_EVENT,
|
|
181
211
|
payload: { metadata: {
|
|
182
212
|
event: "camera-tab-switch",
|
|
183
213
|
node: this.tagName,
|
|
184
|
-
tabId:
|
|
214
|
+
tabId: e
|
|
185
215
|
} }
|
|
186
|
-
}), this._activeTab =
|
|
187
|
-
}, this._createFile = (e,
|
|
188
|
-
let
|
|
189
|
-
return new File([
|
|
190
|
-
lastModified:
|
|
191
|
-
type:
|
|
216
|
+
}), this._activeTab = e;
|
|
217
|
+
}, this._createFile = (e, b, x, S) => {
|
|
218
|
+
let C = Date.now(), w = `${e}-${C}.${b}`;
|
|
219
|
+
return new File([S], w, {
|
|
220
|
+
lastModified: C,
|
|
221
|
+
type: x
|
|
192
222
|
});
|
|
193
223
|
}, this._toSend = (e) => {
|
|
194
224
|
this.api.addFileFromObject(e, { source: UploadSource.CAMERA }), this.set$({ "*currentActivity": LitActivityBlock.activities.UPLOAD_LIST }), this.modalManager?.open(LitActivityBlock.activities.UPLOAD_LIST);
|
|
195
|
-
}, this._setPermissionsState = debounce((
|
|
196
|
-
this.classList.toggle("uc-initialized",
|
|
197
|
-
let
|
|
198
|
-
|
|
225
|
+
}, this._setPermissionsState = debounce((e) => {
|
|
226
|
+
this.classList.toggle("uc-initialized", e === "granted");
|
|
227
|
+
let x = this._activeTab === CameraSourceTypes.VIDEO && this.cfg.enableAudioRecording, S = this._activeTab === CameraSourceTypes.PHOTO ? "camera-full" : "video-camera-full";
|
|
228
|
+
e === "granted" ? (this._videoHidden = !1, this._cameraHidden = !1, this._tabCameraHidden = !this._cameraModes.includes(CameraSourceTypes.PHOTO), this._tabVideoHidden = !this._cameraModes.includes(CameraSourceTypes.VIDEO), this._messageHidden = !0, this._timerHidden = !0, this._currentIcon = S, this._audioToggleMicrophoneHidden = !x, this._audioSelectHidden = !x) : e === "prompt" ? (this._l10nMessage = "camera-permissions-prompt", this._videoHidden = !0, this._cameraHidden = !0, this._tabCameraHidden = !0, this._messageHidden = !1, this._stopCapture()) : (this._l10nMessage = "camera-permissions-denied", this._videoHidden = !0, this._messageHidden = !1, this._tabCameraHidden = !this._cameraModes.includes(CameraSourceTypes.PHOTO), this._tabVideoHidden = !this._cameraModes.includes(CameraSourceTypes.VIDEO), this._cameraActionsHidden = !0, this._mutableClassButton = "uc-shot-btn uc-camera-action", this._stopCapture());
|
|
199
229
|
}, 300), this._makeStreamInactive = () => {
|
|
200
230
|
if (!this._stream) return !1;
|
|
201
|
-
let e = this._stream?.getAudioTracks(),
|
|
231
|
+
let e = this._stream?.getAudioTracks(), b = this._stream?.getVideoTracks();
|
|
202
232
|
return e.forEach((e) => {
|
|
203
233
|
e.stop();
|
|
204
|
-
}),
|
|
234
|
+
}), b.forEach((e) => {
|
|
205
235
|
e.stop();
|
|
206
236
|
}), !0;
|
|
207
237
|
}, this._stopCapture = () => {
|
|
@@ -225,9 +255,9 @@ var DEFAULT_PICTURE_FORMAT = "image/jpeg", DEFAULT_VIDEO_FORMAT = "video/webm",
|
|
|
225
255
|
try {
|
|
226
256
|
this._teardownPermissionListeners();
|
|
227
257
|
for (let e of DEFAULT_PERMISSIONS) {
|
|
228
|
-
let
|
|
229
|
-
this._permissionResponses[e] =
|
|
230
|
-
|
|
258
|
+
let b = await navigator.permissions.query({ name: e });
|
|
259
|
+
this._permissionResponses[e] = b, b.addEventListener("change", this._handlePermissionsChange), this._permissionCleanupFns.push(() => {
|
|
260
|
+
b.removeEventListener("change", this._handlePermissionsChange);
|
|
231
261
|
});
|
|
232
262
|
}
|
|
233
263
|
this._unsubPermissions = () => {
|
|
@@ -248,8 +278,8 @@ var DEFAULT_PICTURE_FORMAT = "image/jpeg", DEFAULT_VIDEO_FORMAT = "video/webm",
|
|
|
248
278
|
}, this._getDevices = async () => {
|
|
249
279
|
try {
|
|
250
280
|
let e = await navigator.mediaDevices.enumerateDevices();
|
|
251
|
-
this._cameraDevices = e.filter((e) => e.kind === "videoinput").map((e,
|
|
252
|
-
text: e.label.trim() || `${this.l10n("caption-camera")} ${
|
|
281
|
+
this._cameraDevices = e.filter((e) => e.kind === "videoinput").map((e, b) => ({
|
|
282
|
+
text: e.label.trim() || `${this.l10n("caption-camera")} ${b + 1}`,
|
|
253
283
|
value: e.deviceId
|
|
254
284
|
})), this._audioDevices = this.cfg.enableAudioRecording ? e.filter((e) => e.kind === "audioinput").map((e) => ({
|
|
255
285
|
text: e.label.trim(),
|
|
@@ -262,10 +292,10 @@ var DEFAULT_PICTURE_FORMAT = "image/jpeg", DEFAULT_VIDEO_FORMAT = "video/webm",
|
|
|
262
292
|
await this._permissionAccess(), await this._requestDeviceAccess(), await this._capture(), this._handleCameraModes(this._cameraModes);
|
|
263
293
|
}, this._onDeactivate = async () => {
|
|
264
294
|
this._unsubPermissions && this._unsubPermissions(), window.chrome || this._setPermissionsState("denied"), this._stopCapture();
|
|
265
|
-
}, this._handleCameraModes = (
|
|
266
|
-
this._tabVideoHidden = !
|
|
267
|
-
let
|
|
268
|
-
|
|
295
|
+
}, this._handleCameraModes = (e) => {
|
|
296
|
+
this._tabVideoHidden = !e.includes(CameraSourceTypes.VIDEO), this._tabCameraHidden = !e.includes(CameraSourceTypes.PHOTO);
|
|
297
|
+
let x = e[0];
|
|
298
|
+
x && (!this._activeTab || !e.includes(this._activeTab)) && this._handleActiveTab(x);
|
|
269
299
|
};
|
|
270
300
|
}
|
|
271
301
|
_attachPreviewListeners(e) {
|
|
@@ -280,8 +310,8 @@ var DEFAULT_PICTURE_FORMAT = "image/jpeg", DEFAULT_VIDEO_FORMAT = "video/webm",
|
|
|
280
310
|
_applyVideoSource() {
|
|
281
311
|
let e = this._videoRef.value;
|
|
282
312
|
if (!e) return;
|
|
283
|
-
let
|
|
284
|
-
e.srcObject !==
|
|
313
|
+
let b = this._currentVideoSource ?? null;
|
|
314
|
+
e.srcObject !== b && (e.srcObject = b);
|
|
285
315
|
}
|
|
286
316
|
_shot() {
|
|
287
317
|
if (this._setCameraState("shot"), this._canvas = document.createElement("canvas"), this._ctx = this._canvas.getContext("2d"), !this._ctx) throw Error("Failed to get canvas context");
|
|
@@ -290,7 +320,7 @@ var DEFAULT_PICTURE_FORMAT = "image/jpeg", DEFAULT_VIDEO_FORMAT = "video/webm",
|
|
|
290
320
|
this._canvas.height = e.videoHeight, this._canvas.width = e.videoWidth, this.cfg.cameraMirror && (this._ctx.translate(this._canvas.width, 0), this._ctx.scale(-1, 1)), this._ctx.drawImage(e, 0, 0), e.pause();
|
|
291
321
|
}
|
|
292
322
|
_guessExtensionByMime(e) {
|
|
293
|
-
let
|
|
323
|
+
let b = {
|
|
294
324
|
mp4: "mp4",
|
|
295
325
|
ogg: "ogg",
|
|
296
326
|
webm: "webm",
|
|
@@ -299,16 +329,16 @@ var DEFAULT_PICTURE_FORMAT = "image/jpeg", DEFAULT_VIDEO_FORMAT = "video/webm",
|
|
|
299
329
|
};
|
|
300
330
|
if (e === "") return "webm";
|
|
301
331
|
if (e) {
|
|
302
|
-
let
|
|
303
|
-
if (
|
|
304
|
-
let e =
|
|
305
|
-
if (e &&
|
|
332
|
+
let x = e.split("/");
|
|
333
|
+
if (x?.[0] === "video") {
|
|
334
|
+
let e = x.slice(1).join("/")?.split(";")[0];
|
|
335
|
+
if (e && b[e]) return b[e];
|
|
306
336
|
}
|
|
307
337
|
}
|
|
308
338
|
return "avi";
|
|
309
339
|
}
|
|
310
340
|
get _cameraModes() {
|
|
311
|
-
return stringToArray(this.cfg.cameraModes).filter((
|
|
341
|
+
return stringToArray(this.cfg.cameraModes).filter((e) => e === CameraSourceTypes.PHOTO || e === CameraSourceTypes.VIDEO);
|
|
312
342
|
}
|
|
313
343
|
_teardownPermissionListeners() {
|
|
314
344
|
if (this._permissionCleanupFns.length !== 0) {
|
|
@@ -321,10 +351,10 @@ var DEFAULT_PICTURE_FORMAT = "image/jpeg", DEFAULT_VIDEO_FORMAT = "video/webm",
|
|
|
321
351
|
this._videoTransformCss = e ? "scaleX(-1)" : null;
|
|
322
352
|
}), this.subConfigValue("enableAudioRecording", (e) => {
|
|
323
353
|
this._audioToggleMicrophoneHidden = !e, this._audioSelectDisabled = !e;
|
|
324
|
-
}), this.subConfigValue("cameraModes", (
|
|
354
|
+
}), this.subConfigValue("cameraModes", (e) => {
|
|
325
355
|
if (!this.isConnected) return;
|
|
326
|
-
let
|
|
327
|
-
this._handleCameraModes(
|
|
356
|
+
let x = deserializeCsv(e);
|
|
357
|
+
this._handleCameraModes(x.filter((e) => e === CameraSourceTypes.PHOTO || e === CameraSourceTypes.VIDEO));
|
|
328
358
|
}), this._onActivate();
|
|
329
359
|
}
|
|
330
360
|
firstUpdated(e) {
|
|
@@ -478,4 +508,4 @@ var DEFAULT_PICTURE_FORMAT = "image/jpeg", DEFAULT_VIDEO_FORMAT = "video/webm",
|
|
|
478
508
|
}
|
|
479
509
|
};
|
|
480
510
|
__decorate([state()], CameraSource.prototype, "_videoTransformCss", void 0), __decorate([state()], CameraSource.prototype, "_videoHidden", void 0), __decorate([state()], CameraSource.prototype, "_messageHidden", void 0), __decorate([state()], CameraSource.prototype, "_requestBtnHidden", void 0), __decorate([state()], CameraSource.prototype, "_cameraSelectOptions", void 0), __decorate([state()], CameraSource.prototype, "_cameraSelectHidden", void 0), __decorate([state()], CameraSource.prototype, "_l10nMessage", void 0), __decorate([state()], CameraSource.prototype, "_timerHidden", void 0), __decorate([state()], CameraSource.prototype, "_cameraHidden", void 0), __decorate([state()], CameraSource.prototype, "_cameraActionsHidden", void 0), __decorate([state()], CameraSource.prototype, "_audioSelectOptions", void 0), __decorate([state()], CameraSource.prototype, "_audioSelectHidden", void 0), __decorate([state()], CameraSource.prototype, "_audioSelectDisabled", void 0), __decorate([state()], CameraSource.prototype, "_audioToggleMicrophoneHidden", void 0), __decorate([state()], CameraSource.prototype, "_tabCameraHidden", void 0), __decorate([state()], CameraSource.prototype, "_tabVideoHidden", void 0), __decorate([state()], CameraSource.prototype, "_currentIcon", void 0), __decorate([state()], CameraSource.prototype, "_currentTimelineIcon", void 0), __decorate([state()], CameraSource.prototype, "_toggleMicrophoneIcon", void 0), __decorate([state()], CameraSource.prototype, "_mutableClassButton", void 0);
|
|
481
|
-
export { CameraSource as t };
|
|
511
|
+
export { Select as n, CameraSource as t };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Package: @uploadcare/file-uploader@1.28.0-alpha.1 (MIT)
|
|
4
|
+
* License: https://github.com/uploadcare/blob/main/LICENSE
|
|
5
|
+
* Built: 2026-03-02T20:26:07.910Z
|
|
6
|
+
*/
|
|
7
|
+
import "./Icon-tXRTvEF2.js";
|
|
8
|
+
import { t as CameraSource } from "./CameraSource-DDwj1jCV.js";
|
|
9
|
+
import "./ActivityHeader-R6Mlx-dA.js";
|
|
10
|
+
export { CameraSource };
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
|
|
2
|
+
uc-select {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
uc-select select {
|
|
7
|
+
position: relative;
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
height: var(--uc-button-size);
|
|
12
|
+
padding: 0 14px;
|
|
13
|
+
font-size: 1em;
|
|
14
|
+
font-family: inherit;
|
|
15
|
+
white-space: nowrap;
|
|
16
|
+
border: none;
|
|
17
|
+
border-radius: var(--uc-radius);
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
user-select: none;
|
|
20
|
+
transition: background-color var(--uc-transition);
|
|
21
|
+
color: var(--uc-secondary-foreground);
|
|
22
|
+
background-color: var(--uc-secondary);
|
|
23
|
+
}
|
|
24
|
+
uc-camera-source {
|
|
25
|
+
position: relative;
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
width: 100%;
|
|
29
|
+
height: 100%;
|
|
30
|
+
max-height: 100%;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
background-color: var(--uc-background);
|
|
33
|
+
border-radius: var(--uc-radius);
|
|
34
|
+
}
|
|
35
|
+
[uc-modal] > dialog:has([activity="camera"][active]) {
|
|
36
|
+
width: 100%;
|
|
37
|
+
height: 100%;
|
|
38
|
+
}
|
|
39
|
+
uc-camera-source video {
|
|
40
|
+
display: block;
|
|
41
|
+
width: 100%;
|
|
42
|
+
max-height: 100%;
|
|
43
|
+
object-fit: contain;
|
|
44
|
+
object-position: center center;
|
|
45
|
+
background-color: var(--uc-muted);
|
|
46
|
+
border-radius: var(--uc-radius);
|
|
47
|
+
}
|
|
48
|
+
uc-camera-source .uc-toolbar {
|
|
49
|
+
position: absolute;
|
|
50
|
+
bottom: 0;
|
|
51
|
+
display: flex;
|
|
52
|
+
justify-content: space-between;
|
|
53
|
+
width: 100%;
|
|
54
|
+
padding: var(--uc-padding);
|
|
55
|
+
background-color: var(--uc-background);
|
|
56
|
+
}
|
|
57
|
+
uc-camera-source .uc-content {
|
|
58
|
+
display: flex;
|
|
59
|
+
flex: 1;
|
|
60
|
+
justify-content: center;
|
|
61
|
+
width: 100%;
|
|
62
|
+
height: 100%;
|
|
63
|
+
padding: var(--uc-padding);
|
|
64
|
+
padding-top: 0;
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
}
|
|
67
|
+
uc-camera-source .uc-message-box {
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
gap: 40px;
|
|
71
|
+
align-items: center;
|
|
72
|
+
justify-content: center;
|
|
73
|
+
padding: 40px 40px 0;
|
|
74
|
+
color: var(--uc-foreground);
|
|
75
|
+
}
|
|
76
|
+
uc-camera-source .uc-message-box button {
|
|
77
|
+
color: var(--uc-primary-foreground);
|
|
78
|
+
background-color: var(--uc-primary);
|
|
79
|
+
}
|
|
80
|
+
uc-camera-source .uc-shot-btn {
|
|
81
|
+
width: 58px;
|
|
82
|
+
height: 58px;
|
|
83
|
+
color: var(--uc-background);
|
|
84
|
+
background-color: var(--uc-primary-light);
|
|
85
|
+
border-radius: 50%;
|
|
86
|
+
opacity: 0.85;
|
|
87
|
+
transition:
|
|
88
|
+
bottom var(--uc-transition),
|
|
89
|
+
opacity var(--uc-transition),
|
|
90
|
+
transform var(--uc-transition);
|
|
91
|
+
}
|
|
92
|
+
uc-camera-source .uc-shot-btn:hover {
|
|
93
|
+
transform: scale(1.05);
|
|
94
|
+
opacity: 1;
|
|
95
|
+
}
|
|
96
|
+
uc-camera-source .uc-shot-btn:active {
|
|
97
|
+
transform: scale(1);
|
|
98
|
+
opacity: 1;
|
|
99
|
+
}
|
|
100
|
+
uc-camera-source .uc-shot-btn[disabled] {
|
|
101
|
+
bottom: -80px;
|
|
102
|
+
}
|
|
103
|
+
uc-camera-source .uc-shot-btn uc-icon svg {
|
|
104
|
+
width: 20px;
|
|
105
|
+
height: 20px;
|
|
106
|
+
}
|
|
107
|
+
uc-camera-source .uc-controls {
|
|
108
|
+
position: relative;
|
|
109
|
+
display: flex;
|
|
110
|
+
align-items: center;
|
|
111
|
+
flex-wrap: wrap;
|
|
112
|
+
justify-content: space-between;
|
|
113
|
+
padding: 0 var(--uc-padding) var(--uc-padding);
|
|
114
|
+
min-height: 74px;
|
|
115
|
+
}
|
|
116
|
+
uc-camera-source:not(.uc-initialized) .uc-controls {
|
|
117
|
+
display: none;
|
|
118
|
+
}
|
|
119
|
+
uc-camera-source .uc-switcher {
|
|
120
|
+
display: flex;
|
|
121
|
+
gap: calc(var(--uc-padding) / 2);
|
|
122
|
+
}
|
|
123
|
+
uc-camera-source .uc-switch.uc-active {
|
|
124
|
+
background-color: var(--uc-secondary);
|
|
125
|
+
}
|
|
126
|
+
uc-camera-source .uc-camera-actions {
|
|
127
|
+
display: flex;
|
|
128
|
+
justify-content: center;
|
|
129
|
+
align-items: center;
|
|
130
|
+
gap: 5px;
|
|
131
|
+
}
|
|
132
|
+
uc-camera-source .uc-stop-record {
|
|
133
|
+
background-color: var(--uc-destructive-foreground-light);
|
|
134
|
+
opacity: 1;
|
|
135
|
+
}
|
|
136
|
+
:where(uc-camera-source:is(.uc-recording)) .uc-recording-timer uc-icon {
|
|
137
|
+
display: none;
|
|
138
|
+
}
|
|
139
|
+
:where(uc-camera-source:is(.uc-recording)) .uc-recording-timer {
|
|
140
|
+
pointer-events: none;
|
|
141
|
+
}
|
|
142
|
+
uc-camera-source .uc-recording-timer {
|
|
143
|
+
z-index: 1;
|
|
144
|
+
position: relative;
|
|
145
|
+
overflow: hidden;
|
|
146
|
+
}
|
|
147
|
+
:where(uc-camera-source) .uc-recording-timer uc-icon {
|
|
148
|
+
width: 10px;
|
|
149
|
+
height: 10px;
|
|
150
|
+
margin-right: 10px;
|
|
151
|
+
}
|
|
152
|
+
uc-camera-source .uc-recording-timer .uc-line {
|
|
153
|
+
position: absolute;
|
|
154
|
+
content: "";
|
|
155
|
+
bottom: 0;
|
|
156
|
+
left: 0;
|
|
157
|
+
right: 0;
|
|
158
|
+
height: 2px;
|
|
159
|
+
background-color: var(--uc-foreground-light);
|
|
160
|
+
transform: scaleX(0);
|
|
161
|
+
transform-origin: left;
|
|
162
|
+
transition: transform var(--uc-transition);
|
|
163
|
+
}
|
|
164
|
+
uc-camera-source .uc-btn-microphone {
|
|
165
|
+
z-index: 1;
|
|
166
|
+
}
|
|
167
|
+
uc-camera-source .uc-select {
|
|
168
|
+
display: flex;
|
|
169
|
+
}
|
|
170
|
+
uc-camera-source .uc-audio-select {
|
|
171
|
+
width: 98px;
|
|
172
|
+
}
|
|
173
|
+
uc-camera-source .uc-audio-select select {
|
|
174
|
+
width: 100%;
|
|
175
|
+
}
|
|
176
|
+
uc-camera-source .uc-camera-action {
|
|
177
|
+
position: absolute;
|
|
178
|
+
inset: 0 var(--uc-padding) var(--uc-padding);
|
|
179
|
+
margin: 0 auto;
|
|
180
|
+
}
|