@uploadcare/file-uploader 1.27.1 → 1.28.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (348) hide show
  1. package/dist/CameraSource-DbyO6GoK.js +481 -0
  2. package/dist/CameraSource-px4BzEMI.js +9 -0
  3. package/dist/CloudImageEditor-BIxf1V4M.js +2162 -0
  4. package/dist/CloudImageEditorActivity-CJxP5N0S.js +9 -0
  5. package/dist/CloudImageEditorActivity-d4DpK6fQ.js +87 -0
  6. package/dist/Config-DuWre5p3.js +433 -0
  7. package/dist/ExternalSource-BKTFp95O.js +248 -0
  8. package/dist/ExternalSource-CR5DG0Jv.js +9 -0
  9. package/dist/Icon-CqTVC82Q.js +1811 -0
  10. package/dist/LitUploaderBlock-BA34rzeU.js +998 -0
  11. package/dist/UrlSource-BxVL9Pve.js +9 -0
  12. package/dist/UrlSource-DZK5EBwT.js +73 -0
  13. package/dist/abstract/CTX.d.ts +40 -0
  14. package/dist/abstract/TypedCollection.d.ts +47 -0
  15. package/dist/abstract/TypedCollection.test.d.ts +1 -0
  16. package/dist/abstract/TypedData.d.ts +12 -0
  17. package/dist/abstract/TypedData.test.d.ts +1 -0
  18. package/dist/abstract/UploaderPublicApi.d.ts +41 -0
  19. package/dist/abstract/buildOutputCollectionState.d.ts +3 -0
  20. package/dist/abstract/customConfigOptions.d.ts +65 -0
  21. package/dist/abstract/defineComponents.d.ts +1 -0
  22. package/dist/abstract/features/ClipboardLayer.d.ts +12 -0
  23. package/dist/abstract/loadFileUploaderFrom.d.ts +3 -4
  24. package/dist/abstract/loadFileUploaderFrom.js +7 -6
  25. package/dist/abstract/localeRegistry.d.ts +5 -0
  26. package/dist/abstract/managers/LocaleManager.d.ts +10 -0
  27. package/dist/abstract/managers/ModalManager.d.ts +53 -0
  28. package/dist/abstract/managers/SecureUploadsManager.d.ts +7 -0
  29. package/dist/abstract/managers/TelemetryManager.d.ts +41 -0
  30. package/dist/abstract/managers/ValidationManager.d.ts +34 -0
  31. package/dist/abstract/managers/__tests__/ModalManager.test.d.ts +13 -0
  32. package/dist/abstract/managers/__tests__/SecureUploadsManager.test.d.ts +1 -0
  33. package/dist/abstract/managers/a11y.d.ts +9 -0
  34. package/dist/abstract/managers/plugin/PluginManager.d.ts +25 -0
  35. package/dist/abstract/managers/plugin/PluginTypes.d.ts +146 -0
  36. package/dist/abstract/managers/plugin/index.d.ts +2 -0
  37. package/dist/abstract/sharedConfigKey.d.ts +2 -0
  38. package/dist/abstract/uploadEntrySchema.d.ts +34 -0
  39. package/dist/blocks/ActivityHeader/ActivityHeader.d.ts +8 -0
  40. package/dist/blocks/CameraSource/CameraSource.d.ts +121 -0
  41. package/dist/blocks/CameraSource/__tests__/calcCameraModes.test.d.ts +1 -0
  42. package/dist/blocks/CameraSource/calcCameraModes.d.ts +5 -0
  43. package/dist/blocks/CameraSource/constants.d.ts +15 -0
  44. package/dist/blocks/CloudImageEditor/index.d.ts +1 -0
  45. package/dist/blocks/CloudImageEditor/src/CloudImageEditorBlock.d.ts +60 -0
  46. package/dist/blocks/CloudImageEditor/src/CropFrame.d.ts +56 -0
  47. package/dist/blocks/CloudImageEditor/src/EditorAspectRatioButtonControl.d.ts +24 -0
  48. package/dist/blocks/CloudImageEditor/src/EditorButtonControl.d.ts +14 -0
  49. package/dist/blocks/CloudImageEditor/src/EditorCropButtonControl.d.ts +13 -0
  50. package/dist/blocks/CloudImageEditor/src/EditorFilterControl.d.ts +35 -0
  51. package/dist/blocks/CloudImageEditor/src/EditorImageCropper.d.ts +56 -0
  52. package/dist/blocks/CloudImageEditor/src/EditorImageFader.d.ts +63 -0
  53. package/dist/blocks/CloudImageEditor/src/EditorOperationControl.d.ts +15 -0
  54. package/dist/blocks/CloudImageEditor/src/EditorScroller.d.ts +15 -0
  55. package/dist/blocks/CloudImageEditor/src/EditorSlider.d.ts +33 -0
  56. package/dist/blocks/CloudImageEditor/src/EditorToolbar.d.ts +68 -0
  57. package/dist/blocks/CloudImageEditor/src/crop-utils.d.ts +36 -0
  58. package/dist/blocks/CloudImageEditor/src/crop-utils.test.d.ts +1 -0
  59. package/dist/blocks/CloudImageEditor/src/cropper-constants.d.ts +10 -0
  60. package/dist/blocks/CloudImageEditor/src/elements/button/BtnUi.d.ts +31 -0
  61. package/dist/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.d.ts +19 -0
  62. package/dist/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.d.ts +27 -0
  63. package/dist/blocks/CloudImageEditor/src/elements/slider/SliderUi.d.ts +38 -0
  64. package/dist/blocks/CloudImageEditor/src/index.d.ts +15 -0
  65. package/dist/blocks/CloudImageEditor/src/lib/classNames.d.ts +5 -0
  66. package/dist/blocks/CloudImageEditor/src/lib/classNames.test.d.ts +1 -0
  67. package/dist/blocks/CloudImageEditor/src/lib/linspace.d.ts +1 -0
  68. package/dist/blocks/CloudImageEditor/src/lib/linspace.test.d.ts +1 -0
  69. package/dist/blocks/CloudImageEditor/src/lib/parseCropPreset.d.ts +4 -0
  70. package/dist/blocks/CloudImageEditor/src/lib/parseCropPreset.test.d.ts +1 -0
  71. package/dist/blocks/CloudImageEditor/src/lib/parseTabs.d.ts +2 -0
  72. package/dist/blocks/CloudImageEditor/src/lib/pick.d.ts +1 -0
  73. package/dist/blocks/CloudImageEditor/src/lib/pick.test.d.ts +1 -0
  74. package/dist/blocks/CloudImageEditor/src/lib/transformationUtils.d.ts +7 -0
  75. package/dist/blocks/CloudImageEditor/src/state.d.ts +20 -0
  76. package/dist/blocks/CloudImageEditor/src/svg-sprite.d.ts +2 -0
  77. package/dist/blocks/CloudImageEditor/src/toolbar-constants.d.ts +61 -0
  78. package/dist/blocks/CloudImageEditor/src/types.d.ts +60 -0
  79. package/dist/blocks/CloudImageEditor/src/util.d.ts +2 -0
  80. package/dist/blocks/CloudImageEditor/src/utils/parseFilterValue.d.ts +7 -0
  81. package/dist/blocks/CloudImageEditor/src/utils/parseFilterValue.test.d.ts +1 -0
  82. package/dist/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts +25 -0
  83. package/dist/blocks/Config/Config.d.ts +60 -0
  84. package/dist/blocks/Config/assertions.d.ts +5 -0
  85. package/dist/blocks/Config/computed-properties.d.ts +24 -0
  86. package/dist/blocks/Config/computed-properties.test.d.ts +1 -0
  87. package/dist/blocks/Config/initialConfig.d.ts +6 -0
  88. package/dist/blocks/Config/normalizeConfigValue.d.ts +2 -0
  89. package/dist/blocks/Config/validatorsType.d.ts +18 -0
  90. package/dist/blocks/Copyright/Copyright.d.ts +10 -0
  91. package/dist/blocks/DropArea/DropArea.d.ts +47 -0
  92. package/dist/blocks/DropArea/addDropzone.d.ts +17 -0
  93. package/dist/blocks/DropArea/getDropItems.d.ts +12 -0
  94. package/dist/blocks/ExternalSource/ExternalSource.d.ts +45 -0
  95. package/dist/blocks/ExternalSource/MessageBridge.d.ts +11 -0
  96. package/dist/blocks/ExternalSource/buildThemeDefinition.d.ts +4 -0
  97. package/dist/blocks/ExternalSource/query-string.d.ts +1 -0
  98. package/dist/blocks/ExternalSource/types.d.ts +105 -0
  99. package/dist/blocks/FileItem/FileItem.d.ts +50 -0
  100. package/dist/blocks/FileItem/FileItemConfig.d.ts +10 -0
  101. package/dist/blocks/FormInput/FormInput.d.ts +18 -0
  102. package/dist/blocks/Icon/Icon.d.ts +19 -0
  103. package/dist/blocks/Img/Img.d.ts +14 -0
  104. package/dist/blocks/Img/ImgBase.d.ts +29 -0
  105. package/dist/blocks/Img/ImgConfig.d.ts +28 -0
  106. package/dist/blocks/Img/configurations.d.ts +11 -0
  107. package/dist/blocks/Img/props-map.d.ts +28 -0
  108. package/dist/blocks/Img/utils/parseObjectToString.d.ts +2 -0
  109. package/dist/blocks/Modal/Modal.d.ts +34 -0
  110. package/dist/blocks/PluginActivityRenderer/PluginActivityRenderer.d.ts +32 -0
  111. package/dist/blocks/PluginActivityRenderer/index.d.ts +1 -0
  112. package/dist/blocks/ProgressBar/ProgressBar.d.ts +21 -0
  113. package/dist/blocks/ProgressBarCommon/ProgressBarCommon.d.ts +17 -0
  114. package/dist/blocks/Select/Select.d.ts +18 -0
  115. package/dist/blocks/SimpleBtn/SimpleBtn.d.ts +15 -0
  116. package/dist/blocks/SourceBtn/SourceBtn.d.ts +23 -0
  117. package/dist/blocks/SourceList/SourceList.d.ts +24 -0
  118. package/dist/blocks/Spinner/Spinner.d.ts +9 -0
  119. package/dist/blocks/StartFrom/StartFrom.d.ts +12 -0
  120. package/dist/blocks/Thumb/Thumb.d.ts +35 -0
  121. package/dist/blocks/UploadCtxProvider/EventEmitter.d.ts +70 -0
  122. package/dist/blocks/UploadCtxProvider/UploadCtxProvider.d.ts +44 -0
  123. package/dist/blocks/UploadList/UploadList.d.ts +39 -0
  124. package/dist/blocks/UrlSource/UrlSource.d.ts +14 -0
  125. package/dist/blocks/svg-backgrounds/svg-backgrounds.d.ts +3 -0
  126. package/dist/blocks/themes/uc-basic/svg-sprite.d.ts +2 -0
  127. package/dist/cameraPlugin-dGash48Q.js +8 -0
  128. package/dist/cloud-image-editor-fNswWrI4.js +11 -0
  129. package/dist/cloudImageEditorPlugin-2EU0Pm_j.js +8 -0
  130. package/dist/core.d.ts +42 -0
  131. package/dist/en-DNCwRJsB.js +135 -0
  132. package/dist/env-B1nfXy9i.js +8 -0
  133. package/dist/env.d.ts +2 -4
  134. package/dist/env.js +7 -6
  135. package/dist/externalSourcesPlugin-DKQqk3AC.js +8 -0
  136. package/dist/imageShrinkPlugin-DAx8eRen.js +8 -0
  137. package/dist/index.css +3964 -6
  138. package/dist/index.d.ts +29 -2715
  139. package/dist/index.js +1011 -8
  140. package/dist/index.layered.css +4478 -7
  141. package/dist/instagramPlugin-k67tMAo3.js +8 -0
  142. package/dist/lit/BaseComponent.d.ts +12 -0
  143. package/dist/lit/Constructor.d.ts +1 -0
  144. package/dist/lit/CssDataMixin.d.ts +7 -0
  145. package/dist/lit/LightDomMixin.d.ts +8 -0
  146. package/dist/lit/LitActivityBlock.d.ts +53 -0
  147. package/dist/lit/LitBlock.d.ts +83 -0
  148. package/dist/lit/LitSolutionBlock.d.ts +21 -0
  149. package/dist/lit/LitUploaderBlock.d.ts +53 -0
  150. package/dist/lit/PubSubCompat.d.ts +18 -0
  151. package/dist/lit/RegisterableElementMixin.d.ts +7 -0
  152. package/dist/lit/SharedState.d.ts +119 -0
  153. package/dist/lit/SymbioteCompatMixin.d.ts +40 -0
  154. package/dist/lit/TestModeController.d.ts +16 -0
  155. package/dist/lit/Uid.d.ts +3 -0
  156. package/dist/lit/activity-constants.d.ts +11 -0
  157. package/dist/lit/createDebugPrinter.d.ts +3 -0
  158. package/dist/lit/findBlockInCtx.d.ts +3 -0
  159. package/dist/lit/getOutputData.d.ts +2 -0
  160. package/dist/lit/hasBlockInCtx.d.ts +3 -0
  161. package/dist/lit/l10n.d.ts +5 -0
  162. package/dist/lit/parseCssPropertyValue.d.ts +1 -0
  163. package/dist/lit/shared-instances.d.ts +65 -0
  164. package/dist/loadFileUploaderFrom-BWJM43Yq.js +28 -0
  165. package/dist/locales/file-uploader/ar.d.ts +1 -4
  166. package/dist/locales/file-uploader/ar.js +142 -6
  167. package/dist/locales/file-uploader/az.d.ts +1 -4
  168. package/dist/locales/file-uploader/az.js +134 -6
  169. package/dist/locales/file-uploader/ca.d.ts +1 -4
  170. package/dist/locales/file-uploader/ca.js +136 -6
  171. package/dist/locales/file-uploader/cs.d.ts +1 -4
  172. package/dist/locales/file-uploader/cs.js +138 -6
  173. package/dist/locales/file-uploader/da.d.ts +1 -4
  174. package/dist/locales/file-uploader/da.js +134 -6
  175. package/dist/locales/file-uploader/de.d.ts +1 -4
  176. package/dist/locales/file-uploader/de.js +134 -6
  177. package/dist/locales/file-uploader/el.d.ts +1 -4
  178. package/dist/locales/file-uploader/el.js +134 -6
  179. package/dist/locales/file-uploader/en.d.ts +1 -4
  180. package/dist/locales/file-uploader/en.js +7 -6
  181. package/dist/locales/file-uploader/es.d.ts +1 -4
  182. package/dist/locales/file-uploader/es.js +136 -6
  183. package/dist/locales/file-uploader/et.d.ts +1 -4
  184. package/dist/locales/file-uploader/et.js +134 -6
  185. package/dist/locales/file-uploader/fi.d.ts +1 -4
  186. package/dist/locales/file-uploader/fi.js +134 -6
  187. package/dist/locales/file-uploader/fr.d.ts +1 -4
  188. package/dist/locales/file-uploader/fr.js +136 -6
  189. package/dist/locales/file-uploader/he.d.ts +1 -4
  190. package/dist/locales/file-uploader/he.js +136 -6
  191. package/dist/locales/file-uploader/hy.d.ts +1 -4
  192. package/dist/locales/file-uploader/hy.js +134 -6
  193. package/dist/locales/file-uploader/is.d.ts +1 -4
  194. package/dist/locales/file-uploader/is.js +134 -6
  195. package/dist/locales/file-uploader/it.d.ts +1 -4
  196. package/dist/locales/file-uploader/it.js +136 -6
  197. package/dist/locales/file-uploader/ja.d.ts +1 -4
  198. package/dist/locales/file-uploader/ja.js +134 -6
  199. package/dist/locales/file-uploader/ka.d.ts +1 -4
  200. package/dist/locales/file-uploader/ka.js +134 -6
  201. package/dist/locales/file-uploader/kk.d.ts +1 -4
  202. package/dist/locales/file-uploader/kk.js +134 -6
  203. package/dist/locales/file-uploader/ko.d.ts +1 -4
  204. package/dist/locales/file-uploader/ko.js +134 -6
  205. package/dist/locales/file-uploader/lv.d.ts +1 -4
  206. package/dist/locales/file-uploader/lv.js +136 -6
  207. package/dist/locales/file-uploader/nb.d.ts +1 -4
  208. package/dist/locales/file-uploader/nb.js +134 -6
  209. package/dist/locales/file-uploader/nl.d.ts +1 -4
  210. package/dist/locales/file-uploader/nl.js +134 -6
  211. package/dist/locales/file-uploader/pl.d.ts +1 -4
  212. package/dist/locales/file-uploader/pl.js +138 -6
  213. package/dist/locales/file-uploader/pt.d.ts +1 -4
  214. package/dist/locales/file-uploader/pt.js +136 -6
  215. package/dist/locales/file-uploader/ro.d.ts +1 -4
  216. package/dist/locales/file-uploader/ro.js +136 -6
  217. package/dist/locales/file-uploader/ru.d.ts +1 -4
  218. package/dist/locales/file-uploader/ru.js +138 -6
  219. package/dist/locales/file-uploader/sk.d.ts +1 -4
  220. package/dist/locales/file-uploader/sk.js +138 -6
  221. package/dist/locales/file-uploader/sr.d.ts +1 -4
  222. package/dist/locales/file-uploader/sr.js +136 -6
  223. package/dist/locales/file-uploader/sv.d.ts +1 -4
  224. package/dist/locales/file-uploader/sv.js +134 -6
  225. package/dist/locales/file-uploader/tr.d.ts +1 -4
  226. package/dist/locales/file-uploader/tr.js +134 -6
  227. package/dist/locales/file-uploader/uk.d.ts +1 -4
  228. package/dist/locales/file-uploader/uk.js +138 -6
  229. package/dist/locales/file-uploader/vi.d.ts +1 -4
  230. package/dist/locales/file-uploader/vi.js +134 -6
  231. package/dist/locales/file-uploader/zh-TW.d.ts +1 -4
  232. package/dist/locales/file-uploader/zh-TW.js +134 -6
  233. package/dist/locales/file-uploader/zh.d.ts +1 -4
  234. package/dist/locales/file-uploader/zh.js +134 -6
  235. package/dist/plugins/cameraPlugin.d.ts +2 -0
  236. package/dist/plugins/cloudImageEditorPlugin.d.ts +2 -0
  237. package/dist/plugins/externalSourcesPlugin.d.ts +2 -0
  238. package/dist/plugins/imageShrinkPlugin.d.ts +2 -0
  239. package/dist/plugins/instagramPlugin.d.ts +2 -0
  240. package/dist/plugins/unsplashPlugin.d.ts +16 -0
  241. package/dist/plugins/urlSourcePlugin.d.ts +2 -0
  242. package/dist/plugins-DxjsQUa8.js +278 -0
  243. package/dist/solutions/adaptive-image/index.d.ts +2 -0
  244. package/dist/solutions/cloud-image-editor/CloudImageEditor.d.ts +11 -0
  245. package/dist/solutions/cloud-image-editor/index.d.ts +5 -0
  246. package/dist/solutions/file-uploader/inline/FileUploaderInline.d.ts +20 -0
  247. package/dist/solutions/file-uploader/inline/index.d.ts +1 -0
  248. package/dist/solutions/file-uploader/minimal/FileUploaderMinimal.d.ts +23 -0
  249. package/dist/solutions/file-uploader/minimal/index.d.ts +1 -0
  250. package/dist/solutions/file-uploader/regular/FileUploaderRegular.d.ts +17 -0
  251. package/dist/solutions/file-uploader/regular/index.d.ts +1 -0
  252. package/dist/types/dom.d.ts +1 -0
  253. package/dist/types/events.d.ts +4 -0
  254. package/dist/types/exported.d.ts +492 -0
  255. package/dist/types/index.d.ts +5 -0
  256. package/dist/urlSourcePlugin-9xdB7Pvw.js +8 -0
  257. package/dist/utils/UID.d.ts +5 -0
  258. package/dist/utils/UID.test.d.ts +1 -0
  259. package/dist/utils/UploadSource.d.ts +37 -0
  260. package/dist/utils/WindowHeightTracker.d.ts +9 -0
  261. package/dist/utils/abilities.d.ts +1 -0
  262. package/dist/utils/applyStyles.d.ts +1 -0
  263. package/dist/utils/browser-info.d.ts +12 -0
  264. package/dist/utils/browser-info.test.d.ts +1 -0
  265. package/dist/utils/cdn-utils.d.ts +53 -0
  266. package/dist/utils/cdn-utils.test.d.ts +1 -0
  267. package/dist/utils/comma-separated.d.ts +2 -0
  268. package/dist/utils/debounce.d.ts +3 -0
  269. package/dist/utils/delay.d.ts +1 -0
  270. package/dist/utils/fileTypes.d.ts +11 -0
  271. package/dist/utils/fileTypes.test.d.ts +1 -0
  272. package/dist/utils/get-top-level-origin.d.ts +1 -0
  273. package/dist/utils/get-top-level-origin.test.d.ts +1 -0
  274. package/dist/utils/getLocaleDirection.d.ts +1 -0
  275. package/dist/utils/getPluralForm.d.ts +1 -0
  276. package/dist/utils/getPluralForm.test.d.ts +1 -0
  277. package/dist/utils/isPromiseLike.d.ts +1 -0
  278. package/dist/utils/isPromiseLike.test.d.ts +1 -0
  279. package/dist/utils/isSecureTokenExpired.d.ts +8 -0
  280. package/dist/utils/isSecureTokenExpired.test.d.ts +1 -0
  281. package/dist/utils/memoize.d.ts +1 -0
  282. package/dist/utils/memoize.test.d.ts +1 -0
  283. package/dist/utils/mixinClass.d.ts +8 -0
  284. package/dist/utils/parseCdnUrl.d.ts +11 -0
  285. package/dist/utils/parseCdnUrl.test.d.ts +1 -0
  286. package/dist/utils/parseShrink.d.ts +7 -0
  287. package/dist/utils/parseShrink.test.d.ts +1 -0
  288. package/dist/utils/preloadImage.d.ts +10 -0
  289. package/dist/utils/prettyBytes.d.ts +11 -0
  290. package/dist/utils/prettyBytes.test.d.ts +1 -0
  291. package/dist/utils/resizeImage.d.ts +1 -0
  292. package/dist/utils/stringToArray.d.ts +1 -0
  293. package/dist/utils/stringToArray.test.d.ts +1 -0
  294. package/dist/utils/template-utils.d.ts +16 -0
  295. package/dist/utils/template-utils.test.d.ts +1 -0
  296. package/dist/utils/throttle.d.ts +3 -0
  297. package/dist/utils/toKebabCase.d.ts +2 -0
  298. package/dist/utils/toKebabCase.test.d.ts +1 -0
  299. package/dist/utils/transparentPixelSrc.d.ts +1 -0
  300. package/dist/utils/uniqueArray.d.ts +1 -0
  301. package/dist/utils/uniqueArray.test.d.ts +1 -0
  302. package/dist/utils/userAgent.d.ts +2 -0
  303. package/dist/utils/validators/collection/index.d.ts +2 -0
  304. package/dist/utils/validators/collection/validateCollectionUploadError.d.ts +2 -0
  305. package/dist/utils/validators/collection/validateMultiple.d.ts +2 -0
  306. package/dist/utils/validators/file/index.d.ts +4 -0
  307. package/dist/utils/validators/file/validateFileType.d.ts +2 -0
  308. package/dist/utils/validators/file/validateIsImage.d.ts +2 -0
  309. package/dist/utils/validators/file/validateMaxSizeLimit.d.ts +2 -0
  310. package/dist/utils/validators/file/validateUploadError.d.ts +2 -0
  311. package/dist/utils/warnOnce.d.ts +1 -0
  312. package/dist/utils/wildcardRegexp.d.ts +1 -0
  313. package/dist/utils/wildcardRegexp.test.d.ts +1 -0
  314. package/dist/utils/withResolvers.d.ts +5 -0
  315. package/dist/utils/withResolvers.test.d.ts +1 -0
  316. package/package.json +8 -2
  317. package/dist/index.ssr.js +0 -1538
  318. package/web/file-uploader.iife.min.d.ts +0 -2859
  319. package/web/file-uploader.iife.min.js +0 -8
  320. package/web/file-uploader.iife.min.js.LEGAL.txt +0 -71
  321. package/web/file-uploader.min.d.ts +0 -2859
  322. package/web/file-uploader.min.js +0 -8
  323. package/web/file-uploader.min.js.LEGAL.txt +0 -71
  324. package/web/uc-basic.layered.min.css +0 -7
  325. package/web/uc-basic.min.css +0 -6
  326. package/web/uc-cloud-image-editor.layered.min.css +0 -7
  327. package/web/uc-cloud-image-editor.min.css +0 -6
  328. package/web/uc-cloud-image-editor.min.d.ts +0 -2816
  329. package/web/uc-cloud-image-editor.min.js +0 -8
  330. package/web/uc-cloud-image-editor.min.js.LEGAL.txt +0 -70
  331. package/web/uc-file-uploader-inline.layered.min.css +0 -7
  332. package/web/uc-file-uploader-inline.min.css +0 -6
  333. package/web/uc-file-uploader-inline.min.d.ts +0 -2859
  334. package/web/uc-file-uploader-inline.min.js +0 -8
  335. package/web/uc-file-uploader-inline.min.js.LEGAL.txt +0 -71
  336. package/web/uc-file-uploader-minimal.layered.min.css +0 -7
  337. package/web/uc-file-uploader-minimal.min.css +0 -6
  338. package/web/uc-file-uploader-minimal.min.d.ts +0 -2859
  339. package/web/uc-file-uploader-minimal.min.js +0 -8
  340. package/web/uc-file-uploader-minimal.min.js.LEGAL.txt +0 -71
  341. package/web/uc-file-uploader-regular.layered.min.css +0 -7
  342. package/web/uc-file-uploader-regular.min.css +0 -6
  343. package/web/uc-file-uploader-regular.min.d.ts +0 -2859
  344. package/web/uc-file-uploader-regular.min.js +0 -8
  345. package/web/uc-file-uploader-regular.min.js.LEGAL.txt +0 -71
  346. package/web/uc-img.min.d.ts +0 -75
  347. package/web/uc-img.min.js +0 -8
  348. package/web/uc-img.min.js.LEGAL.txt +0 -24
@@ -0,0 +1,146 @@
1
+ import { ConfigType, OutputFileEntry } from '../../../types/exported';
2
+ import { CustomConfig, CustomConfigDefinition } from '../../customConfigOptions';
3
+ import { UploaderPublicApi } from '../../UploaderPublicApi';
4
+ export type PluginIconRegistration = {
5
+ name: string;
6
+ svg: string;
7
+ };
8
+ export type PluginI18nRegistration = Record<string, Record<string, string>>;
9
+ export type PluginSourceRegistration = {
10
+ id: string;
11
+ label: string;
12
+ icon?: string;
13
+ /**
14
+ * Optional expansion function. When present, SourceList calls this to determine
15
+ * which source IDs should actually be rendered in place of this source.
16
+ * Useful for sources that map to multiple device-specific variants (e.g. camera
17
+ * expanding to separate photo/video buttons on mobile).
18
+ * Return `[id]` (the source's own id) to render it as-is.
19
+ */
20
+ expand?: () => string[];
21
+ onSelect: () => Promise<void> | void;
22
+ };
23
+ export type PluginRenderDispose = () => void;
24
+ export type PluginRender = (el: HTMLElement, activityParams: Record<string, unknown>) => PluginRenderDispose | undefined;
25
+ export type PluginActivityRegistration = {
26
+ id: string;
27
+ render: PluginRender;
28
+ };
29
+ export type PluginFileActionRegistration = {
30
+ id: string;
31
+ icon: string;
32
+ shouldRender: (fileEntry: OutputFileEntry) => boolean;
33
+ onClick: (fileEntry: OutputFileEntry) => void | Promise<void>;
34
+ };
35
+ export type PluginFileHookContext = {
36
+ /** The file to transform */
37
+ file: File | Blob;
38
+ /** MIME type of the file */
39
+ mimeType: string | null;
40
+ };
41
+ export type PluginFileHookRegistration = {
42
+ /**
43
+ * When the hook is called:
44
+ * - `'beforeUpload'`: called right before the file is uploaded.
45
+ * - `'onAdd'`: called after the file is added to the upload list.
46
+ *
47
+ * Return the modified file and mimeType. Return the originals if no transformation is needed.
48
+ */
49
+ type: 'beforeUpload' | 'onAdd';
50
+ handler: (context: PluginFileHookContext) => PluginFileHookContext | Promise<PluginFileHookContext>;
51
+ };
52
+ export type PluginRegistryApi = {
53
+ registerSource: (source: PluginSourceRegistration) => PluginSourceRegistration;
54
+ registerActivity: (activity: PluginActivityRegistration) => PluginActivityRegistration;
55
+ registerFileAction: (fileAction: PluginFileActionRegistration) => PluginFileActionRegistration;
56
+ registerFileHook: (hook: PluginFileHookRegistration) => PluginFileHookRegistration;
57
+ registerIcon: (icon: PluginIconRegistration) => PluginIconRegistration;
58
+ registerI18n: (i18n: PluginI18nRegistration) => PluginI18nRegistration;
59
+ registerConfig: <T = unknown>(definition: CustomConfigDefinition<T>) => void;
60
+ };
61
+ /**
62
+ * API for managing plugin config subscriptions
63
+ */
64
+ export type PluginConfigApi = {
65
+ get: <TKey extends keyof (ConfigType & CustomConfig)>(configName: TKey) => (ConfigType & CustomConfig)[TKey];
66
+ subscribe: <TKey extends keyof (ConfigType & CustomConfig)>(configName: TKey, callback: (value: (ConfigType & CustomConfig)[TKey]) => void) => () => void;
67
+ };
68
+ /**
69
+ * API for managing plugin activity interactions
70
+ */
71
+ export type PluginActivityApi = {
72
+ /**
73
+ * Get the current activity parameters.
74
+ *
75
+ * @returns The current activity parameters object
76
+ *
77
+ * @example
78
+ * ```typescript
79
+ * const params = pluginApi.activity.getParams();
80
+ * console.log('Current params:', params);
81
+ * ```
82
+ */
83
+ getParams: () => Record<string, unknown>;
84
+ /**
85
+ * Subscribe to changes in activity parameters.
86
+ * The callback will be called immediately with the current params,
87
+ * and then whenever the params change.
88
+ *
89
+ * Subscriptions are automatically cleaned up when the plugin is disposed.
90
+ *
91
+ * @param callback - Function to call with the new params
92
+ * @returns Unsubscribe function
93
+ *
94
+ * @example
95
+ * ```typescript
96
+ * pluginApi.activity.subscribeToParams((params) => {
97
+ * console.log('Activity params changed:', params);
98
+ * });
99
+ * // Cleanup happens automatically on plugin disposal
100
+ * ```
101
+ */
102
+ subscribeToParams: (callback: (params: Record<string, unknown>) => void) => () => void;
103
+ };
104
+ export type PluginFileEntryUpdate = {
105
+ file?: File | Blob;
106
+ cdnUrl?: string | null;
107
+ cdnUrlModifiers?: string | null;
108
+ mimeType?: string | null;
109
+ };
110
+ export type PluginFilesApi = {
111
+ /**
112
+ * Update mutable properties of a file entry by its internalId.
113
+ * `fileSize` is recalculated automatically when `file` is provided.
114
+ */
115
+ update: (internalId: string, changes: PluginFileEntryUpdate) => void;
116
+ };
117
+ export type PluginApi = {
118
+ registry: PluginRegistryApi;
119
+ config: PluginConfigApi;
120
+ activity: PluginActivityApi;
121
+ files: PluginFilesApi;
122
+ };
123
+ export type PluginUploaderApi = UploaderPublicApi;
124
+ export type PluginExports = {
125
+ dispose?: () => void;
126
+ };
127
+ export type PluginSetupResult = PluginExports | void | Promise<PluginExports | void>;
128
+ export type PluginSetupParams = {
129
+ pluginApi: PluginApi;
130
+ uploaderApi: PluginUploaderApi;
131
+ };
132
+ export type UploaderPlugin = {
133
+ id: string;
134
+ setup: (params: PluginSetupParams) => PluginSetupResult;
135
+ };
136
+ export type Owned<T> = T & {
137
+ pluginId: string;
138
+ };
139
+ export type PluginRegistrySnapshot = {
140
+ sources: Owned<PluginSourceRegistration>[];
141
+ activities: Owned<PluginActivityRegistration>[];
142
+ fileActions: Owned<PluginFileActionRegistration>[];
143
+ fileHooks: Owned<PluginFileHookRegistration>[];
144
+ icons: Owned<PluginIconRegistration>[];
145
+ i18n: Owned<PluginI18nRegistration>[];
146
+ };
@@ -0,0 +1,2 @@
1
+ export * from './PluginManager';
2
+ export * from './PluginTypes';
@@ -0,0 +1,2 @@
1
+ import { ConfigType } from '../types';
2
+ export declare const sharedConfigKey: <T extends keyof ConfigType>(key: T) => `*cfg/${T}`;
@@ -0,0 +1,34 @@
1
+ import { Metadata, UploadcareFile } from '@uploadcare/upload-client';
2
+ import { OutputErrorFile } from '../types/index';
3
+ import { TypedData } from './TypedData';
4
+ export interface UploadEntryData extends Record<string, unknown> {
5
+ file: File | null;
6
+ externalUrl: string | null;
7
+ fileName: string | null;
8
+ fileSize: number | null;
9
+ lastModified: number;
10
+ uploadProgress: number;
11
+ uuid: string | null;
12
+ isImage: boolean;
13
+ mimeType: string | null;
14
+ ctxName: string | null;
15
+ cdnUrl: string | null;
16
+ cdnUrlModifiers: string | null;
17
+ fileInfo: UploadcareFile | null;
18
+ isUploading: boolean;
19
+ abortController: AbortController | null;
20
+ thumbUrl: string | null;
21
+ silent: boolean;
22
+ source: string | null;
23
+ fullPath: string | null;
24
+ metadata: Metadata | null;
25
+ errors: OutputErrorFile[];
26
+ uploadError: Error | null;
27
+ isRemoved: boolean;
28
+ isQueuedForUploading: boolean;
29
+ isValidationPending: boolean;
30
+ isQueuedForValidation: boolean;
31
+ }
32
+ export declare const initialUploadEntryData: UploadEntryData;
33
+ export type UploadEntryTypedData = TypedData<UploadEntryData>;
34
+ export type UploadEntryKeys = keyof UploadEntryData;
@@ -0,0 +1,8 @@
1
+ import { LitActivityBlock } from '../../lit/LitActivityBlock';
2
+ export declare class ActivityHeader extends LitActivityBlock {
3
+ }
4
+ declare global {
5
+ interface HTMLElementTagNameMap {
6
+ 'uc-activity-header': ActivityHeader;
7
+ }
8
+ }
@@ -0,0 +1,121 @@
1
+ import { PropertyValues } from 'lit';
2
+ import { LitUploaderBlock } from '../../lit/LitUploaderBlock';
3
+ export type CameraMode = 'photo' | 'video';
4
+ export type CameraStatus = 'shot' | 'retake' | 'accept' | 'play' | 'stop' | 'pause' | 'resume';
5
+ export declare class CameraSource extends LitUploaderBlock {
6
+ couldBeCtxOwner: boolean;
7
+ private _unsubPermissions;
8
+ private _capturing;
9
+ private _chunks;
10
+ private _mediaRecorder;
11
+ private _stream;
12
+ private _selectedAudioId;
13
+ private _selectedCameraId;
14
+ private _activeTab;
15
+ private _options;
16
+ private _canvas;
17
+ private _ctx;
18
+ private _cameraDevices;
19
+ private _audioDevices;
20
+ private _permissionResponses;
21
+ private _permissionCleanupFns;
22
+ private _currentVideoSource;
23
+ private readonly _handlePreviewPlay;
24
+ private readonly _handlePreviewPause;
25
+ private _timerRef;
26
+ private _lineRef;
27
+ private _videoRef;
28
+ private _switcherRef;
29
+ private _startTime;
30
+ private _elapsedTime;
31
+ private _videoTransformCss;
32
+ private _videoHidden;
33
+ private _messageHidden;
34
+ private _requestBtnHidden;
35
+ private _cameraSelectOptions;
36
+ private _cameraSelectHidden;
37
+ private _l10nMessage;
38
+ private _timerHidden;
39
+ private _cameraHidden;
40
+ private _cameraActionsHidden;
41
+ private _audioSelectOptions;
42
+ private _audioSelectHidden;
43
+ private _audioSelectDisabled;
44
+ private _audioToggleMicrophoneHidden;
45
+ private _tabCameraHidden;
46
+ private _tabVideoHidden;
47
+ private _currentIcon;
48
+ private _currentTimelineIcon;
49
+ private _toggleMicrophoneIcon;
50
+ private _mutableClassButton;
51
+ private _chooseActionWithCamera;
52
+ private _handleCameraSelectChange;
53
+ private _handleAudioSelectChange;
54
+ private _handleRequestPermissions;
55
+ private _handleStartCamera;
56
+ private _handleToggleRecording;
57
+ private _handleToggleAudio;
58
+ private _handleRetake;
59
+ private _handleAccept;
60
+ private _handleClickTab;
61
+ private _updateTimer;
62
+ private _startTimer;
63
+ private _stopTimer;
64
+ private _startTimeline;
65
+ private _stopTimeline;
66
+ private _animationFrameId;
67
+ private _startRecording;
68
+ private _stopRecording;
69
+ /** This method is used to toggle recording pause/resume */
70
+ private _toggleRecording;
71
+ private _toggleEnableAudio;
72
+ /**
73
+ * Previewing the video that was recorded on the camera
74
+ */
75
+ private _previewVideo;
76
+ private _attachPreviewListeners;
77
+ private _detachPreviewListeners;
78
+ private _setVideoSource;
79
+ /**
80
+ * Do not bind srcObject directly in the template, because it stops video pausing on shot.
81
+ * I really don'y know why but that's how it is. Assigning srcObject manually fixes the issue.
82
+ */
83
+ private _applyVideoSource;
84
+ private _retake;
85
+ private _accept;
86
+ private _handlePhoto;
87
+ private _handleVideo;
88
+ private _setCameraState;
89
+ private _shot;
90
+ private _handleActiveTab;
91
+ private _createFile;
92
+ private _guessExtensionByMime;
93
+ /**
94
+ * The send file to the server
95
+ */
96
+ private _toSend;
97
+ private get _cameraModes();
98
+ private _setPermissionsState;
99
+ private _makeStreamInactive;
100
+ private _stopCapture;
101
+ private _capture;
102
+ private _handlePermissionsChange;
103
+ private _permissionAccess;
104
+ private _teardownPermissionListeners;
105
+ private _requestDeviceAccess;
106
+ private _getDevices;
107
+ private _onActivate;
108
+ private _onDeactivate;
109
+ private _handleCameraModes;
110
+ initCallback(): void;
111
+ firstUpdated(changedProperties: PropertyValues<this>): void;
112
+ updated(changedProperties: PropertyValues<this>): void;
113
+ private _destroy;
114
+ disconnectedCallback(): void;
115
+ render(): import('lit-html').TemplateResult<1>;
116
+ }
117
+ declare global {
118
+ interface HTMLElementTagNameMap {
119
+ 'uc-camera-source': CameraSource;
120
+ }
121
+ }
@@ -0,0 +1,5 @@
1
+ import { ConfigType } from '../../types/index';
2
+ export declare const calcCameraModes: (cfg: ConfigType) => {
3
+ isVideoRecordingEnabled: boolean;
4
+ isPhotoEnabled: boolean;
5
+ };
@@ -0,0 +1,15 @@
1
+ export declare const CameraSourceTypes: Readonly<{
2
+ PHOTO: "photo";
3
+ VIDEO: "video";
4
+ }>;
5
+ export declare const CameraSourceEvents: Readonly<{
6
+ IDLE: "idle";
7
+ SHOT: "shot";
8
+ PLAY: "play";
9
+ PAUSE: "pause";
10
+ RESUME: "resume";
11
+ STOP: "stop";
12
+ RETAKE: "retake";
13
+ ACCEPT: "accept";
14
+ }>;
15
+ export type ModeCameraType = (typeof CameraSourceTypes)[keyof typeof CameraSourceTypes];
@@ -0,0 +1 @@
1
+ export * from './src/index';
@@ -0,0 +1,60 @@
1
+ import { PropertyValues } from 'lit';
2
+ import { LitBlock } from '../../../lit/LitBlock';
3
+ import { initState } from './state.js';
4
+ export declare class CloudImageEditorBlock extends LitBlock {
5
+ attributesMeta: ({
6
+ uuid: string;
7
+ } | {
8
+ 'cdn-url': string;
9
+ }) & Partial<{
10
+ tabs: string;
11
+ 'crop-preset': string;
12
+ }> & {
13
+ 'ctx-name': string;
14
+ };
15
+ ctxOwner: boolean;
16
+ static styleAttrs: string[];
17
+ private _statusMessage;
18
+ private _imageSrc;
19
+ private _fileType;
20
+ private _showLoader;
21
+ uuid: string | null;
22
+ cdnUrl: string | null;
23
+ cropPreset: string;
24
+ tabs: string | null;
25
+ private _hasNetworkProblems;
26
+ private _isInitialized;
27
+ private _pendingInitUpdate;
28
+ private readonly _debouncedShowLoader;
29
+ private readonly _imgRef;
30
+ private readonly _cropperRef;
31
+ private readonly _faderRef;
32
+ private readonly _imgContainerRef;
33
+ private readonly _handleImageLoad;
34
+ private readonly _handleImageError;
35
+ private readonly _handleRetryNetwork;
36
+ private _scheduleInitialization;
37
+ init$: ReturnType<typeof initState>;
38
+ initCallback(): void;
39
+ private _assignSharedElements;
40
+ private _attachImageListeners;
41
+ private _detachImageListeners;
42
+ private get _imageClassName();
43
+ /**
44
+ * To proper work, we need non-zero size the element. So, we'll wait for it.
45
+ */
46
+ private _waitForSize;
47
+ firstUpdated(changedProperties: PropertyValues<this>): void;
48
+ disconnectedCallback(): void;
49
+ render(): import('lit-html').TemplateResult<1>;
50
+ protected updated(changedProperties: PropertyValues<this>): void;
51
+ private _syncTabListFromProp;
52
+ private _syncCropPresetState;
53
+ updateImage(): Promise<void>;
54
+ initEditor(): Promise<void>;
55
+ }
56
+ declare global {
57
+ interface HTMLElementTagNameMap {
58
+ 'uc-cloud-image-editor-block': CloudImageEditorBlock;
59
+ }
60
+ }
@@ -0,0 +1,56 @@
1
+ import { PropertyValues, TemplateResult } from 'lit';
2
+ import { LitBlock } from '../../../lit/LitBlock';
3
+ export declare class CropFrame extends LitBlock {
4
+ private _backdropMask?;
5
+ private _backdropMaskInner?;
6
+ private readonly _backdropMaskId;
7
+ private _frameThumbs?;
8
+ private _frameGuides?;
9
+ private _draggingThumb?;
10
+ private _hoverThumb?;
11
+ private _dragStartPoint?;
12
+ private _dragStartCrop?;
13
+ private _frameImage?;
14
+ private _guidesHidden;
15
+ private _draggingValue;
16
+ private readonly _svgRef;
17
+ private _svgReady;
18
+ private _pendingMaskHref;
19
+ private get _svgElement();
20
+ private get _dragging();
21
+ private set _dragging(value);
22
+ private _applyGuidesDragState;
23
+ private _shouldThumbBeDisabled;
24
+ private _createBackdrop;
25
+ /**
26
+ * @private Super Tricky workaround for the chromium bug See
27
+ * https://bugs.chromium.org/p/chromium/issues/detail?id=330815
28
+ */
29
+ private _resizeBackdrop;
30
+ private _updateBackdrop;
31
+ private _updateFrame;
32
+ private _createThumb;
33
+ private _createThumbs;
34
+ private _createGuides;
35
+ private _createFrame;
36
+ private _handlePointerDown;
37
+ private readonly _handlePointerUp;
38
+ private readonly _handlePointerMove;
39
+ private _calcCropBox;
40
+ private readonly _handleSvgPointerMove;
41
+ private _updateCursor;
42
+ private _createMask;
43
+ private _updateMask;
44
+ private _render;
45
+ toggleThumbs(visible: boolean): void;
46
+ initCallback(): void;
47
+ protected firstUpdated(changedProperties: PropertyValues<this>): void;
48
+ private _initializeSvg;
49
+ disconnectedCallback(): void;
50
+ render(): TemplateResult;
51
+ }
52
+ declare global {
53
+ interface HTMLElementTagNameMap {
54
+ 'uc-crop-frame': CropFrame;
55
+ }
56
+ }
@@ -0,0 +1,24 @@
1
+ import { EditorButtonControl } from './EditorButtonControl.js';
2
+ import { CropAspectRatio } from './types';
3
+ export declare class EditorFreeformButtonControl extends EditorButtonControl {
4
+ initCallback(): void;
5
+ onClick(): void;
6
+ private _computeTitle;
7
+ render(): import('lit-html').TemplateResult<1>;
8
+ }
9
+ export declare class EditorAspectRatioButtonControl extends EditorButtonControl {
10
+ private _aspectRatio;
11
+ get aspectRatio(): CropAspectRatio | null;
12
+ set aspectRatio(value: CropAspectRatio | null);
13
+ initCallback(): void;
14
+ protected onClick(): void;
15
+ private _updateAspectRatioPresentation;
16
+ private _renderIcon;
17
+ render(): import('lit-html').TemplateResult<1>;
18
+ }
19
+ declare global {
20
+ interface HTMLElementTagNameMap {
21
+ 'uc-editor-freeform-button-control': EditorFreeformButtonControl;
22
+ 'uc-editor-aspect-ratio-button-control': EditorAspectRatioButtonControl;
23
+ }
24
+ }
@@ -0,0 +1,14 @@
1
+ import { PropertyValues } from 'lit';
2
+ import { LitBlock } from '../../../lit/LitBlock';
3
+ export declare class EditorButtonControl extends LitBlock {
4
+ active: boolean;
5
+ title: string;
6
+ protected icon: string;
7
+ protected titleProp: string;
8
+ protected get buttonClasses(): Record<string, boolean>;
9
+ private _updateHostStateClasses;
10
+ protected onClick(_event: MouseEvent): void;
11
+ connectedCallback(): void;
12
+ protected updated(changedProperties: PropertyValues<this>): void;
13
+ render(): import('lit-html').TemplateResult<1>;
14
+ }
@@ -0,0 +1,13 @@
1
+ import { PropertyValues } from 'lit';
2
+ import { EditorButtonControl } from './EditorButtonControl.js';
3
+ import { CropOperation } from './toolbar-constants';
4
+ export declare class EditorCropButtonControl extends EditorButtonControl {
5
+ operation: CropOperation | undefined;
6
+ protected willUpdate(changedProperties: PropertyValues<this>): void;
7
+ protected onClick(e: MouseEvent): void;
8
+ }
9
+ declare global {
10
+ interface HTMLElementTagNameMap {
11
+ 'uc-editor-crop-button-control': EditorCropButtonControl;
12
+ }
13
+ }
@@ -0,0 +1,35 @@
1
+ import { PropertyValues } from 'lit';
2
+ import { EditorButtonControl } from './EditorButtonControl.js';
3
+ export declare class EditorFilterControl extends EditorButtonControl {
4
+ private _operation;
5
+ private _filter;
6
+ private _originalUrl;
7
+ private _observer?;
8
+ private _cancelPreload?;
9
+ private _lastPreviewRequestId;
10
+ private _previewVisibilityCheckRaf?;
11
+ private _previewVisibilityCheckTimeout?;
12
+ private _previewImage;
13
+ private _previewLoaded;
14
+ isOriginal: boolean;
15
+ private _iconSize;
16
+ get filter(): string;
17
+ set filter(value: string);
18
+ onClick(e: MouseEvent): void;
19
+ private _previewSrc;
20
+ private _observerCallback;
21
+ initCallback(): void;
22
+ disconnectedCallback(): void;
23
+ protected updated(changedProperties: PropertyValues<this>): void;
24
+ private _updateFilterLabels;
25
+ private _loadPreview;
26
+ private _schedulePreviewVisibilityCheck;
27
+ private _clearPreviewVisibilityChecks;
28
+ private get _shouldShowPreview();
29
+ render(): import('lit-html').TemplateResult<1>;
30
+ }
31
+ declare global {
32
+ interface HTMLElementTagNameMap {
33
+ 'uc-editor-filter-control': EditorFilterControl;
34
+ }
35
+ }
@@ -0,0 +1,56 @@
1
+ import { PropertyValues, TemplateResult } from 'lit';
2
+ import { LitBlock } from '../../../lit/LitBlock';
3
+ import { ImageSize } from './types';
4
+ type Operations = {
5
+ flip: boolean;
6
+ mirror: boolean;
7
+ rotate: number;
8
+ };
9
+ export declare class EditorImageCropper extends LitBlock {
10
+ ctxOwner: boolean;
11
+ private _commitDebounced;
12
+ private _handleResizeThrottled;
13
+ private _imageSize;
14
+ private _canvas?;
15
+ private _ctx;
16
+ private _isActive;
17
+ private _observer?;
18
+ private _image;
19
+ private _cancelPreload?;
20
+ private readonly _canvasRef;
21
+ private readonly _frameRef;
22
+ constructor();
23
+ protected firstUpdated(changedProperties: PropertyValues<this>): void;
24
+ private _syncTransformations;
25
+ private _initCanvas;
26
+ private _alignImage;
27
+ private _alignCrop;
28
+ private _drawImage;
29
+ private _draw;
30
+ private _animateIn;
31
+ private _getCropDimensions;
32
+ private _getCropTransformation;
33
+ private _commit;
34
+ setValue<K extends keyof Operations>(operation: K, value: Operations[K]): void;
35
+ getValue<K extends keyof Operations>(operation: K): Operations[K];
36
+ activate(imageSize: ImageSize, { fromViewer }?: {
37
+ fromViewer?: boolean;
38
+ }): Promise<void>;
39
+ deactivate({ reset }?: {
40
+ reset?: boolean;
41
+ }): void;
42
+ private _transitionToCrop;
43
+ private _transitionToImage;
44
+ private _reset;
45
+ private _waitForImage;
46
+ private _handleImageLoading;
47
+ initCallback(): void;
48
+ disconnectedCallback(): void;
49
+ render(): TemplateResult;
50
+ }
51
+ declare global {
52
+ interface HTMLElementTagNameMap {
53
+ 'uc-editor-image-cropper': EditorImageCropper;
54
+ }
55
+ }
56
+ export {};
@@ -0,0 +1,63 @@
1
+ import { TemplateResult } from 'lit';
2
+ import { LitBlock } from '../../../lit/LitBlock';
3
+ import { COLOR_OPERATIONS_CONFIG } from './toolbar-constants.js';
4
+ import { Transformations } from './types';
5
+ type OperationKey = keyof typeof COLOR_OPERATIONS_CONFIG;
6
+ export declare class EditorImageFader extends LitBlock {
7
+ private _isActive;
8
+ private _hidden;
9
+ private _operation;
10
+ private _filter;
11
+ private _value?;
12
+ private _transformations;
13
+ private _keypoints;
14
+ private _previewImage?;
15
+ private _cancelLastImages?;
16
+ private _cancelBatchPreload?;
17
+ private _url?;
18
+ private _fromViewer?;
19
+ private _raf;
20
+ private _addKeypointDebounced;
21
+ private readonly _previewHostRef;
22
+ private readonly _layersHostRef;
23
+ constructor();
24
+ private _handleImageLoading;
25
+ private _flush;
26
+ private _imageSrc;
27
+ private _constructKeypoint;
28
+ /**
29
+ * Check if current operation and filter equals passed ones
30
+ */
31
+ private _isSame;
32
+ set(value: string | number): void;
33
+ private _update;
34
+ private _createPreviewImage;
35
+ private _initNodes;
36
+ setTransformations(transformations: Transformations): Promise<void>;
37
+ preload({ url, filter, operation, value, }: {
38
+ url: string;
39
+ filter?: string;
40
+ operation?: OperationKey;
41
+ value?: number;
42
+ }): Promise<void>;
43
+ private _setOriginalSrc;
44
+ activate({ url, operation, value, filter, fromViewer, }: {
45
+ url: string;
46
+ operation?: OperationKey;
47
+ value?: number;
48
+ filter?: string;
49
+ fromViewer?: boolean;
50
+ }): Promise<void>;
51
+ deactivate({ hide }?: {
52
+ hide?: boolean;
53
+ }): void;
54
+ private _ensurePreviewAttached;
55
+ private _clearLayersHost;
56
+ render(): TemplateResult;
57
+ }
58
+ declare global {
59
+ interface HTMLElementTagNameMap {
60
+ 'uc-editor-image-fader': EditorImageFader;
61
+ }
62
+ }
63
+ export {};