@uploadcare/file-uploader 1.3.0-alpha.3 → 1.3.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 (216) hide show
  1. package/README.md +4 -4
  2. package/abstract/ActivityBlock.d.ts +1 -1
  3. package/abstract/ActivityBlock.d.ts.map +1 -1
  4. package/abstract/ActivityBlock.js +0 -2
  5. package/abstract/Block.d.ts +11 -7
  6. package/abstract/Block.d.ts.map +1 -1
  7. package/abstract/Block.js +18 -52
  8. package/abstract/CTX.d.ts +7 -7
  9. package/abstract/CTX.d.ts.map +1 -1
  10. package/abstract/CTX.js +1 -1
  11. package/abstract/LocaleManager.d.ts +3 -3
  12. package/abstract/SecureUploadsManager.d.ts +2 -2
  13. package/abstract/SecureUploadsManager.d.ts.map +1 -1
  14. package/abstract/SolutionBlock.d.ts +2 -2
  15. package/abstract/SolutionBlock.d.ts.map +1 -1
  16. package/abstract/TypedCollection.d.ts +1 -1
  17. package/abstract/TypedCollection.d.ts.map +1 -1
  18. package/abstract/TypedCollection.js +4 -4
  19. package/abstract/TypedData.d.ts +2 -2
  20. package/abstract/TypedData.d.ts.map +1 -1
  21. package/abstract/TypedData.js +4 -4
  22. package/abstract/UploaderBlock.d.ts +5 -5
  23. package/abstract/UploaderBlock.d.ts.map +1 -1
  24. package/abstract/UploaderBlock.js +5 -5
  25. package/abstract/UploaderPublicApi.d.ts +21 -22
  26. package/abstract/UploaderPublicApi.d.ts.map +1 -1
  27. package/abstract/UploaderPublicApi.js +3 -3
  28. package/abstract/ValidationManager.d.ts +3 -3
  29. package/abstract/ValidationManager.d.ts.map +1 -1
  30. package/abstract/a11y.d.ts +2 -2
  31. package/abstract/a11y.d.ts.map +1 -1
  32. package/abstract/buildOutputCollectionState.d.ts +1 -1
  33. package/abstract/buildOutputCollectionState.d.ts.map +1 -1
  34. package/abstract/defineComponents.d.ts.map +1 -1
  35. package/abstract/defineComponents.js +0 -5
  36. package/abstract/l10nProcessor.d.ts.map +1 -1
  37. package/abstract/l10nProcessor.js +3 -3
  38. package/abstract/loadFileUploaderFrom.d.ts.map +1 -1
  39. package/abstract/localeRegistry.d.ts.map +1 -1
  40. package/abstract/sharedConfigKey.d.ts.map +1 -1
  41. package/abstract/uploadEntrySchema.d.ts +2 -2
  42. package/abstract/uploadEntrySchema.d.ts.map +1 -1
  43. package/abstract/uploadEntrySchema.js +1 -1
  44. package/blocks/CameraSource/CameraSource.d.ts.map +1 -1
  45. package/blocks/CameraSource/CameraSource.js +11 -12
  46. package/blocks/CloudImageEditor/src/CloudImageEditorBlock.d.ts.map +1 -1
  47. package/blocks/CloudImageEditor/src/CropFrame.d.ts +11 -11
  48. package/blocks/CloudImageEditor/src/CropFrame.d.ts.map +1 -1
  49. package/blocks/CloudImageEditor/src/CropFrame.js +1 -2
  50. package/blocks/CloudImageEditor/src/EditorButtonControl.d.ts.map +1 -1
  51. package/blocks/CloudImageEditor/src/EditorButtonControl.js +2 -3
  52. package/blocks/CloudImageEditor/src/EditorCropButtonControl.js +1 -1
  53. package/blocks/CloudImageEditor/src/EditorFilterControl.d.ts.map +1 -1
  54. package/blocks/CloudImageEditor/src/EditorFilterControl.js +8 -4
  55. package/blocks/CloudImageEditor/src/EditorImageCropper.d.ts +3 -3
  56. package/blocks/CloudImageEditor/src/EditorImageCropper.js +2 -2
  57. package/blocks/CloudImageEditor/src/EditorImageFader.d.ts +1 -1
  58. package/blocks/CloudImageEditor/src/EditorImageFader.d.ts.map +1 -1
  59. package/blocks/CloudImageEditor/src/EditorOperationControl.js +1 -1
  60. package/blocks/CloudImageEditor/src/EditorScroller.d.ts.map +1 -1
  61. package/blocks/CloudImageEditor/src/EditorScroller.js +1 -2
  62. package/blocks/CloudImageEditor/src/EditorSlider.d.ts.map +1 -1
  63. package/blocks/CloudImageEditor/src/EditorSlider.js +2 -3
  64. package/blocks/CloudImageEditor/src/EditorToolbar.d.ts +1 -1
  65. package/blocks/CloudImageEditor/src/EditorToolbar.d.ts.map +1 -1
  66. package/blocks/CloudImageEditor/src/EditorToolbar.js +14 -15
  67. package/blocks/CloudImageEditor/src/crop-utils.d.ts +14 -14
  68. package/blocks/CloudImageEditor/src/crop-utils.d.ts.map +1 -1
  69. package/blocks/CloudImageEditor/src/css/common.css +2 -2
  70. package/blocks/CloudImageEditor/src/elements/button/BtnUi.d.ts.map +1 -1
  71. package/blocks/CloudImageEditor/src/elements/button/BtnUi.js +5 -5
  72. package/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.d.ts.map +1 -1
  73. package/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.js +1 -2
  74. package/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.d.ts.map +1 -1
  75. package/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.js +2 -3
  76. package/blocks/CloudImageEditor/src/elements/slider/SliderUi.d.ts.map +1 -1
  77. package/blocks/CloudImageEditor/src/elements/slider/SliderUi.js +2 -3
  78. package/blocks/CloudImageEditor/src/lib/FocusVisible.d.ts +15 -0
  79. package/blocks/CloudImageEditor/src/lib/FocusVisible.d.ts.map +1 -0
  80. package/blocks/CloudImageEditor/src/lib/FocusVisible.js +33 -0
  81. package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.d.ts +10 -0
  82. package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.d.ts.map +1 -0
  83. package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.js +256 -0
  84. package/blocks/CloudImageEditor/src/lib/parseCropPreset.d.ts +1 -1
  85. package/blocks/CloudImageEditor/src/lib/transformationUtils.d.ts +3 -3
  86. package/blocks/CloudImageEditor/src/lib/transformationUtils.d.ts.map +1 -1
  87. package/blocks/CloudImageEditor/src/state.d.ts +4 -4
  88. package/blocks/CloudImageEditor/src/template.d.ts.map +1 -1
  89. package/blocks/CloudImageEditor/src/template.js +4 -5
  90. package/blocks/CloudImageEditor/src/types.d.ts +2 -2
  91. package/blocks/CloudImageEditor/src/types.d.ts.map +1 -1
  92. package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts +3 -3
  93. package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts.map +1 -1
  94. package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.js +1 -2
  95. package/blocks/Config/Config.d.ts +11 -3
  96. package/blocks/Config/Config.d.ts.map +1 -1
  97. package/blocks/Config/initialConfig.d.ts +1 -1
  98. package/blocks/Config/normalizeConfigValue.d.ts.map +1 -1
  99. package/blocks/Copyright/Copyright.d.ts.map +1 -1
  100. package/blocks/Copyright/Copyright.js +1 -2
  101. package/blocks/DropArea/DropArea.d.ts +2 -2
  102. package/blocks/DropArea/DropArea.d.ts.map +1 -1
  103. package/blocks/DropArea/DropArea.js +5 -5
  104. package/blocks/DropArea/addDropzone.d.ts.map +1 -1
  105. package/blocks/DropArea/getDropItems.d.ts +2 -2
  106. package/blocks/DropArea/getDropItems.d.ts.map +1 -1
  107. package/blocks/ExternalSource/ExternalSource.d.ts +5 -5
  108. package/blocks/ExternalSource/ExternalSource.d.ts.map +1 -1
  109. package/blocks/ExternalSource/ExternalSource.js +9 -9
  110. package/blocks/ExternalSource/buildStyles.js +2 -2
  111. package/blocks/ExternalSource/query-string.d.ts.map +1 -1
  112. package/blocks/FileItem/FileItem.d.ts +3 -3
  113. package/blocks/FileItem/FileItem.d.ts.map +1 -1
  114. package/blocks/FileItem/FileItem.js +11 -12
  115. package/blocks/Icon/Icon.d.ts +1 -0
  116. package/blocks/Icon/Icon.d.ts.map +1 -1
  117. package/blocks/Icon/Icon.js +5 -3
  118. package/blocks/Img/ImgBase.js +9 -9
  119. package/blocks/Img/ImgConfig.d.ts +2 -2
  120. package/blocks/Img/ImgConfig.d.ts.map +1 -1
  121. package/blocks/Img/ImgConfig.js +3 -3
  122. package/blocks/Img/utils/parseObjectToString.js +1 -1
  123. package/blocks/Modal/Modal.d.ts.map +1 -1
  124. package/blocks/Modal/Modal.js +1 -2
  125. package/blocks/ProgressBar/ProgressBar.d.ts.map +1 -1
  126. package/blocks/ProgressBar/ProgressBar.js +1 -2
  127. package/blocks/ProgressBarCommon/ProgressBarCommon.d.ts.map +1 -1
  128. package/blocks/ProgressBarCommon/ProgressBarCommon.js +1 -2
  129. package/blocks/Range/Range.d.ts +16 -0
  130. package/blocks/Range/Range.d.ts.map +1 -0
  131. package/blocks/Range/Range.js +44 -0
  132. package/blocks/Range/range.css +65 -0
  133. package/blocks/Select/Select.d.ts.map +1 -1
  134. package/blocks/Select/Select.js +9 -14
  135. package/blocks/SimpleBtn/SimpleBtn.d.ts +2 -2
  136. package/blocks/SimpleBtn/SimpleBtn.d.ts.map +1 -1
  137. package/blocks/SimpleBtn/SimpleBtn.js +3 -4
  138. package/blocks/SourceBtn/SourceBtn.d.ts +2 -2
  139. package/blocks/SourceBtn/SourceBtn.d.ts.map +1 -1
  140. package/blocks/SourceBtn/SourceBtn.js +4 -4
  141. package/blocks/SourceList/SourceList.d.ts.map +1 -1
  142. package/blocks/SourceList/SourceList.js +4 -5
  143. package/blocks/StartFrom/StartFrom.d.ts.map +1 -1
  144. package/blocks/StartFrom/StartFrom.js +1 -2
  145. package/blocks/UploadCtxProvider/EventEmitter.d.ts +19 -19
  146. package/blocks/UploadCtxProvider/EventEmitter.d.ts.map +1 -1
  147. package/blocks/UploadCtxProvider/UploadCtxProvider.d.ts +4 -4
  148. package/blocks/UploadCtxProvider/UploadCtxProvider.d.ts.map +1 -1
  149. package/blocks/UploadList/UploadList.d.ts +2 -2
  150. package/blocks/UploadList/UploadList.d.ts.map +1 -1
  151. package/blocks/UploadList/UploadList.js +11 -10
  152. package/blocks/UrlSource/UrlSource.d.ts.map +1 -1
  153. package/blocks/UrlSource/UrlSource.js +6 -7
  154. package/blocks/themes/uc-basic/index.css +1 -0
  155. package/blocks/utils/debounce.d.ts +1 -3
  156. package/blocks/utils/debounce.d.ts.map +1 -1
  157. package/blocks/utils/throttle.d.ts +1 -3
  158. package/blocks/utils/throttle.d.ts.map +1 -1
  159. package/blocks/utils/userAgent.d.ts +1 -1
  160. package/blocks/utils/userAgent.d.ts.map +1 -1
  161. package/env.d.ts +1 -1
  162. package/env.js +1 -1
  163. package/index.d.ts +1 -1
  164. package/index.js +1 -1
  165. package/index.ssr.d.ts +2 -116
  166. package/index.ssr.d.ts.map +1 -1
  167. package/index.ssr.js +79 -190
  168. package/package.json +9 -13
  169. package/solutions/file-uploader/inline/FileUploaderInline.d.ts +2 -2
  170. package/solutions/file-uploader/inline/FileUploaderInline.d.ts.map +1 -1
  171. package/solutions/file-uploader/inline/FileUploaderInline.js +5 -5
  172. package/solutions/file-uploader/minimal/FileUploaderMinimal.d.ts.map +1 -1
  173. package/solutions/file-uploader/minimal/FileUploaderMinimal.js +1 -2
  174. package/solutions/file-uploader/regular/FileUploaderRegular.d.ts +2 -2
  175. package/solutions/file-uploader/regular/FileUploaderRegular.d.ts.map +1 -1
  176. package/solutions/file-uploader/regular/FileUploaderRegular.js +3 -6
  177. package/types/jsx.d.ts +3 -9
  178. package/utils/getPluralForm.d.ts.map +1 -1
  179. package/utils/isSecureTokenExpired.d.ts +1 -1
  180. package/utils/memoize.d.ts.map +1 -1
  181. package/utils/mixinClass.d.ts +1 -3
  182. package/utils/mixinClass.d.ts.map +1 -1
  183. package/utils/prettyBytes.d.ts.map +1 -1
  184. package/utils/template-utils.d.ts.map +1 -1
  185. package/utils/toKebabCase.d.ts.map +1 -1
  186. package/utils/uniqueArray.d.ts.map +1 -1
  187. package/utils/validators/collection/validateCollectionUploadError.d.ts +1 -1
  188. package/utils/validators/collection/validateMultiple.d.ts +1 -1
  189. package/utils/validators/file/validateFileType.d.ts +1 -1
  190. package/utils/validators/file/validateIsImage.d.ts +1 -1
  191. package/utils/validators/file/validateMaxSizeLimit.d.ts +1 -1
  192. package/utils/validators/file/validateUploadError.d.ts +1 -1
  193. package/utils/waitForAttribute.d.ts +6 -12
  194. package/utils/waitForAttribute.d.ts.map +1 -1
  195. package/utils/waitForAttribute.js +8 -38
  196. package/utils/waitForAttribute.test.js +47 -10
  197. package/web/file-uploader.iife.min.js +4 -4
  198. package/web/file-uploader.min.js +4 -4
  199. package/web/uc-basic.min.css +1 -1
  200. package/web/uc-cloud-image-editor.min.css +1 -1
  201. package/web/uc-cloud-image-editor.min.js +4 -4
  202. package/web/uc-file-uploader-inline.min.css +1 -1
  203. package/web/uc-file-uploader-inline.min.js +4 -4
  204. package/web/uc-file-uploader-minimal.min.js +3 -3
  205. package/web/uc-file-uploader-regular.min.css +1 -1
  206. package/web/uc-file-uploader-regular.min.js +4 -4
  207. package/web/uc-img.min.js +3 -3
  208. package/abstract/bindCompatibilityFallbackProcessor.d.ts +0 -3
  209. package/abstract/bindCompatibilityFallbackProcessor.d.ts.map +0 -1
  210. package/abstract/bindCompatibilityFallbackProcessor.js +0 -16
  211. package/utils/withResolvers.d.ts +0 -7
  212. package/utils/withResolvers.d.ts.map +0 -1
  213. package/utils/withResolvers.js +0 -17
  214. package/utils/withResolvers.test.d.ts +0 -2
  215. package/utils/withResolvers.test.d.ts.map +0 -1
  216. package/utils/withResolvers.test.js +0 -27
@@ -0,0 +1,256 @@
1
+ /**
2
+ * Helper function for legacy browsers and iframes which sometimes focus on elements like document, body, and
3
+ * non-interactive SVG.
4
+ *
5
+ * @param {EventTarget} el
6
+ */
7
+ function isValidFocusTarget(el) {
8
+ if (
9
+ el &&
10
+ el !== document &&
11
+ /** @type {Element} */ (el).nodeName !== 'HTML' &&
12
+ /** @type {Element} */ (el).nodeName !== 'BODY' &&
13
+ 'classList' in el &&
14
+ 'contains' in /** @type {Element} */ (el).classList
15
+ ) {
16
+ return true;
17
+ }
18
+ return false;
19
+ }
20
+
21
+ /**
22
+ * Computes whether the given element should automatically trigger the `focus-visible` class being added, i.e., whether
23
+ * it should always match `:focus-visible` when focused.
24
+ *
25
+ * @param {EventTarget} el
26
+ * @returns {boolean}
27
+ */
28
+ function focusTriggersKeyboardModality(el) {
29
+ let { tagName } = /** @type {Element} */ (el);
30
+
31
+ if (tagName === 'INPUT' && !(/** @type {HTMLInputElement} */ (el).readOnly)) {
32
+ return true;
33
+ }
34
+
35
+ if (tagName === 'TEXTAREA' && !(/** @type {HTMLTextAreaElement} */ (el).readOnly)) {
36
+ return true;
37
+ }
38
+
39
+ if (/** @type {HTMLElement} */ (el).isContentEditable) {
40
+ return true;
41
+ }
42
+
43
+ return false;
44
+ }
45
+
46
+ let hadKeyboardEvent = true;
47
+ let hadFocusVisibleRecently = false;
48
+
49
+ /**
50
+ * Applies the :focus-visible polyfill at the given scope. A scope, in this case, is either the top-level Document or a
51
+ * Shadow Root.
52
+ *
53
+ * @param {Document | ShadowRoot} scope
54
+ * @param {(focusVisible: boolean, el: EventTarget) => void} [callback]
55
+ * @see https://github.com/WICG/focus-visible
56
+ */
57
+ export function applyFocusVisiblePolyfill(scope, callback) {
58
+ let hadFocusVisibleRecentlyTimeout = null;
59
+
60
+ /**
61
+ * Add the `focus-visible` class to the given element if the author did not add it.
62
+ *
63
+ * @param {EventTarget} el
64
+ */
65
+ function addFocusVisibleClass(el) {
66
+ /** @type {Element} */ (el).setAttribute('focus-visible', '');
67
+ callback(true, el);
68
+ }
69
+
70
+ /**
71
+ * Remove the `focus-visible` class from the given element if the author did not originally add it.
72
+ *
73
+ * @param {EventTarget} el
74
+ */
75
+ function removeFocusVisibleClass(el) {
76
+ if (!(/** @type {Element} */ (el).hasAttribute('focus-visible'))) {
77
+ return;
78
+ }
79
+ /** @type {Element} */ (el).removeAttribute('focus-visible');
80
+ callback(false, el);
81
+ }
82
+
83
+ /**
84
+ * If the most recent user interaction was via the keyboard, and the keypress did not include a meta, alt/option, or
85
+ * control key, then the keyboard's modality. Otherwise, the modality is not the keyboard.Apply `focus-visible` to any
86
+ * current active element and keep track of our keyboard modality state with `hadKeyboardEvent`.
87
+ *
88
+ * @param {KeyboardEvent} e
89
+ */
90
+ function onKeyDown(e) {
91
+ if (e.metaKey || e.altKey || e.ctrlKey) {
92
+ return;
93
+ }
94
+
95
+ if (isValidFocusTarget(scope.activeElement)) {
96
+ addFocusVisibleClass(scope.activeElement);
97
+ }
98
+
99
+ hadKeyboardEvent = true;
100
+ }
101
+
102
+ /**
103
+ * If at any point a user clicks with a pointing device, ensure that we change the modality away from the keyboard.
104
+ * This avoids the situation where a user presses a key on an already focused element, and then clicks on a different
105
+ * element focusing it with a pointing device while we still think we're in keyboard modality.
106
+ *
107
+ * @param {Event} e
108
+ */
109
+ function onPointerDown(e) {
110
+ hadKeyboardEvent = false;
111
+ }
112
+
113
+ /**
114
+ * On `focus`, add the `focus-visible` class to the target if: - the target received focus as a result of keyboard
115
+ * navigation or - the event target is an element that will likely require interaction via the keyboard (e.g., a text
116
+ * box).
117
+ *
118
+ * @param {Event} e
119
+ */
120
+ function onFocus(e) {
121
+ // Prevent IE from focusing the document or HTML element.
122
+ if (!isValidFocusTarget(e.target)) {
123
+ return;
124
+ }
125
+
126
+ if (hadKeyboardEvent || focusTriggersKeyboardModality(e.target)) {
127
+ addFocusVisibleClass(e.target);
128
+ }
129
+ }
130
+
131
+ /**
132
+ * On `blur`, remove the `focus-visible` class from the target.
133
+ *
134
+ * @param {Event} e
135
+ */
136
+ function onBlur(e) {
137
+ if (!isValidFocusTarget(e.target)) {
138
+ return;
139
+ }
140
+
141
+ if (/** @type {Element} */ (e.target).hasAttribute('focus-visible')) {
142
+ // To detect a tab/window switch, we look for a blur event followed
143
+ // rapidly by a visibility change.
144
+ // If we don't see a visibility change within 100ms, it's probably a
145
+ // regular focus change.
146
+ hadFocusVisibleRecently = true;
147
+ window.clearTimeout(hadFocusVisibleRecentlyTimeout);
148
+ hadFocusVisibleRecentlyTimeout = window.setTimeout(() => {
149
+ hadFocusVisibleRecently = false;
150
+ }, 100);
151
+ removeFocusVisibleClass(e.target);
152
+ }
153
+ }
154
+
155
+ /**
156
+ * Add a group of listeners to detect usage of any pointing devices. These listeners will be added when the polyfill
157
+ * first loads and anytime the window is blurred so that they are active when the window regains focus.
158
+ */
159
+ function addInitialPointerMoveListeners() {
160
+ /* eslint-disable no-use-before-define */
161
+ document.addEventListener('mousemove', onInitialPointerMove);
162
+ document.addEventListener('mousedown', onInitialPointerMove);
163
+ document.addEventListener('mouseup', onInitialPointerMove);
164
+ document.addEventListener('pointermove', onInitialPointerMove);
165
+ document.addEventListener('pointerdown', onInitialPointerMove);
166
+ document.addEventListener('pointerup', onInitialPointerMove);
167
+ document.addEventListener('touchmove', onInitialPointerMove);
168
+ document.addEventListener('touchstart', onInitialPointerMove);
169
+ document.addEventListener('touchend', onInitialPointerMove);
170
+ /* eslint-enable no-use-before-define */
171
+ }
172
+
173
+ function removeInitialPointerMoveListeners() {
174
+ /* eslint-disable no-use-before-define */
175
+ document.removeEventListener('mousemove', onInitialPointerMove);
176
+ document.removeEventListener('mousedown', onInitialPointerMove);
177
+ document.removeEventListener('mouseup', onInitialPointerMove);
178
+ document.removeEventListener('pointermove', onInitialPointerMove);
179
+ document.removeEventListener('pointerdown', onInitialPointerMove);
180
+ document.removeEventListener('pointerup', onInitialPointerMove);
181
+ document.removeEventListener('touchmove', onInitialPointerMove);
182
+ document.removeEventListener('touchstart', onInitialPointerMove);
183
+ document.removeEventListener('touchend', onInitialPointerMove);
184
+ /* eslint-enable no-use-before-define */
185
+ }
186
+
187
+ /**
188
+ * If the user changes tabs, keep track of whether or not the previously focused element had .focus-visible.
189
+ *
190
+ * @param {Event} e
191
+ */
192
+ function onVisibilityChange(e) {
193
+ if (document.visibilityState === 'hidden') {
194
+ // If the tab becomes active again, the browser will handle calling focus
195
+ // on the element (Safari actually calls it twice).
196
+ // If this tab change caused a blur on an element with focus-visible,
197
+ // re-apply the class when the user switches back to the tab.
198
+ if (hadFocusVisibleRecently) {
199
+ hadKeyboardEvent = true;
200
+ }
201
+ addInitialPointerMoveListeners();
202
+ }
203
+ }
204
+
205
+ /**
206
+ * When the polyfill first loads, assume the user is in keyboard modality. If any event is received from a pointing
207
+ * device (e.g., mouse, pointer, touch), turn off keyboard modality. This accounts for situations where focus enters
208
+ * the page from the URL bar.
209
+ *
210
+ * @param {Event} e
211
+ */
212
+ function onInitialPointerMove(e) {
213
+ // Work around a Safari quirk that fires a mousemove on <html> whenever the
214
+ // window blurs, even if you're tabbing out of the page. ¯\_(ツ)_/¯
215
+ if (
216
+ /** @type {Element} */ (e.target).nodeName &&
217
+ /** @type {Element} */ (e.target).nodeName.toLowerCase() === 'html'
218
+ ) {
219
+ return;
220
+ }
221
+
222
+ hadKeyboardEvent = false;
223
+ removeInitialPointerMoveListeners();
224
+ }
225
+
226
+ // We are interested in changes at the global scope only for some kinds of states.
227
+ // For example, global pointer input, global key presses, and global
228
+ // visibility change should affect the state at every scope:
229
+ document.addEventListener('keydown', onKeyDown, true);
230
+ document.addEventListener('mousedown', onPointerDown, true);
231
+ document.addEventListener('pointerdown', onPointerDown, true);
232
+ document.addEventListener('touchstart', onPointerDown, true);
233
+ document.addEventListener('visibilitychange', onVisibilityChange, true);
234
+
235
+ addInitialPointerMoveListeners();
236
+
237
+ // We specifically care about state changes in the local scope for focus and blur.
238
+ // This is because focus/blur events that originate from within a
239
+ // shadow root are not re-dispatched from the host element if it was already
240
+ // the active element in its own scope:
241
+ scope.addEventListener('focus', onFocus, true);
242
+ scope.addEventListener('blur', onBlur, true);
243
+
244
+ return () => {
245
+ removeInitialPointerMoveListeners();
246
+
247
+ document.removeEventListener('keydown', onKeyDown, true);
248
+ document.removeEventListener('mousedown', onPointerDown, true);
249
+ document.removeEventListener('pointerdown', onPointerDown, true);
250
+ document.removeEventListener('touchstart', onPointerDown, true);
251
+ document.removeEventListener('visibilitychange', onVisibilityChange, true);
252
+
253
+ scope.removeEventListener('focus', onFocus, true);
254
+ scope.removeEventListener('blur', onBlur, true);
255
+ };
256
+ }
@@ -1,2 +1,2 @@
1
- export function parseCropPreset(cropPreset: import("../../../../types/exported.d.ts").ConfigType["cropPreset"]): import("../types.js").CropAspectRatio[] | undefined;
1
+ export function parseCropPreset(cropPreset: import('../../../../types/exported.d.ts').ConfigType['cropPreset']): import("../types.js").CropAspectRatio[] | undefined;
2
2
  //# sourceMappingURL=parseCropPreset.d.ts.map
@@ -2,13 +2,13 @@
2
2
  * @param {import('../types').Transformations} transformations
3
3
  * @returns {string}
4
4
  */
5
- export function transformationsToOperations(transformations: import("../types").Transformations): string;
5
+ export function transformationsToOperations(transformations: import('../types').Transformations): string;
6
6
  /**
7
7
  * @param {string[]} operations
8
8
  * @returns {import('../types.js').Transformations}
9
9
  */
10
- export function operationsToTransformations(operations: string[]): import("../types.js").Transformations;
10
+ export function operationsToTransformations(operations: string[]): import('../types.js').Transformations;
11
11
  /** @type {Record<keyof import('../types').Transformations, unknown>} */
12
- export const OPERATIONS_DEFAULTS: Record<keyof import("../types").Transformations, unknown>;
12
+ export const OPERATIONS_DEFAULTS: Record<keyof import('../types').Transformations, unknown>;
13
13
  export const COMMON_OPERATIONS: string;
14
14
  //# sourceMappingURL=transformationUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transformationUtils.d.ts","sourceRoot":"","sources":["transformationUtils.js"],"names":[],"mappings":"AAsEA;;;GAGG;AACH,6DAHW,OAAO,UAAU,EAAE,eAAe,GAChC,MAAM,CAalB;AAoDD;;;GAGG;AACH,wDAHW,MAAM,EAAE,GACN,OAAO,aAAa,EAAE,eAAe,CA2BjD;AAlKD,wEAAwE;AACxE,kCADW,MAAM,CAAC,MAAM,OAAO,UAAU,EAAE,eAAe,EAAE,OAAO,CAAC,CAejE;AAoEH,uCAAqF"}
1
+ {"version":3,"file":"transformationUtils.d.ts","sourceRoot":"","sources":["transformationUtils.js"],"names":[],"mappings":"AAsEA;;;GAGG;AACH,6DAHW,OAAO,UAAU,EAAE,eAAe,GAChC,MAAM,CAalB;AAoDD;;;GAGG;AACH,wDAHW,MAAM,EAAE,GACN,OAAO,aAAa,EAAE,eAAe,CA2BjD;AAlKD,wEAAwE;AACxE,kCADW,OAAO,MAAM,OAAO,UAAU,EAAE,eAAe,EAAE,OAAO,CAAC,CAejE;AAoEH,uCAAqF"}
@@ -1,5 +1,5 @@
1
1
  /** @param {import('./CloudImageEditorBlock.js').CloudImageEditorBlock} fnCtx */
2
- export function initState(fnCtx: import("./CloudImageEditorBlock.js").CloudImageEditorBlock): {
2
+ export function initState(fnCtx: import('./CloudImageEditorBlock.js').CloudImageEditorBlock): {
3
3
  '*originalUrl': null;
4
4
  '*faderEl': null;
5
5
  '*cropperEl': null;
@@ -8,9 +8,9 @@ export function initState(fnCtx: import("./CloudImageEditorBlock.js").CloudImage
8
8
  '*networkProblems': boolean;
9
9
  '*imageSize': null;
10
10
  /** @type {import('./types.js').Transformations} */
11
- '*editorTransformations': import("./types.js").Transformations;
11
+ '*editorTransformations': import('./types.js').Transformations;
12
12
  /** @type {import('./types.js').CropPresetList} */
13
- '*cropPresetList': import("./types.js").CropPresetList;
13
+ '*cropPresetList': import('./types.js').CropPresetList;
14
14
  '*tabList': ("crop" | "tuning" | "filters")[];
15
15
  '*tabId': "crop";
16
16
  entry: null;
@@ -32,7 +32,7 @@ export function initState(fnCtx: import("./CloudImageEditorBlock.js").CloudImage
32
32
  'presence.viewerToolbar': boolean;
33
33
  '*on.retryNetwork': () => void;
34
34
  /** @param {import('./types.js').Transformations} transformations */
35
- '*on.apply': (transformations: import("./types.js").Transformations) => void;
35
+ '*on.apply': (transformations: import('./types.js').Transformations) => void;
36
36
  '*on.cancel': () => void;
37
37
  };
38
38
  //# sourceMappingURL=state.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["template.js"],"names":[],"mappings":"AAIA,8BAgCE"}
1
+ {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["template.js"],"names":[],"mappings":"AAGA,8BAgCE"}
@@ -1,11 +1,10 @@
1
- import { html } from '@symbiotejs/symbiote';
2
1
  import { TRANSPARENT_PIXEL_SRC } from '../../../utils/transparentPixelSrc.js';
3
2
  import svgIconsSprite from './svg-sprite.js';
4
3
 
5
- export const TEMPLATE = html`
4
+ export const TEMPLATE = /* HTML */ `
6
5
  ${svgIconsSprite}
7
6
  <div class="uc-wrapper uc-wrapper_desktop">
8
- <uc-presence-toggle class="uc-network_problems_splash" bind="visible: presence.networkProblems;">
7
+ <uc-presence-toggle class="uc-network_problems_splash" set="visible: presence.networkProblems;">
9
8
  <div class="uc-network_problems_content">
10
9
  <div class="uc-network_problems_icon">
11
10
  <uc-icon name="sad"></uc-icon>
@@ -13,7 +12,7 @@ export const TEMPLATE = html`
13
12
  <div class="uc-network_problems_text">Network error</div>
14
13
  </div>
15
14
  <div class="uc-network_problems_footer">
16
- <uc-btn-ui theme="primary" text="Retry" bind="onclick: *on.retryNetwork"></uc-btn-ui>
15
+ <uc-btn-ui theme="primary" text="Retry" set="onclick: *on.retryNetwork"></uc-btn-ui>
17
16
  </div>
18
17
  </uc-presence-toggle>
19
18
  <div class="uc-viewport">
@@ -28,7 +27,7 @@ export const TEMPLATE = html`
28
27
  <div class="uc-info_pan">{{msg}}</div>
29
28
  </div>
30
29
  <div class="uc-toolbar">
31
- <uc-line-loader-ui bind="active: showLoader"></uc-line-loader-ui>
30
+ <uc-line-loader-ui set="active: showLoader"></uc-line-loader-ui>
32
31
  <div class="uc-toolbar_content uc-toolbar_content__editor">
33
32
  <uc-editor-toolbar></uc-editor-toolbar>
34
33
  </div>
@@ -49,10 +49,10 @@ export type ChangeResult = {
49
49
  transformations: Transformations;
50
50
  };
51
51
  export type CropAspectRatio = {
52
- type: "aspect-ratio";
52
+ type: 'aspect-ratio';
53
53
  width: number;
54
54
  height: number;
55
55
  };
56
56
  export type CropPresetList = CropAspectRatio[];
57
- export type Direction = "" | "n" | "s" | "e" | "w" | "ne" | "nw" | "se" | "sw";
57
+ export type Direction = '' | 'n' | 's' | 'e' | 'w' | 'ne' | 'nw' | 'se' | 'sw';
58
58
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.js"],"names":[],"mappings":";;;gCAGa,GAAG,SAAS,GAAG,SAAS,OAAO,CAAC,CAAC;;;;wBAMjC;IAAE,KAAK,SAAS;IAAC,MAAM,SAAQ;CAAE;;;;;;;8BAYjC;IACZ,OAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAU,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9C,IAAQ,CAAC,EAAE;QAAE,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,CAAC;CACnE;;iBAKU,MAAM;qBACN,MAAM;YACN,MAAM;qBACN,eAAe;;;iBAKf,MAAM;qBACN,MAAM;YACN,MAAM;qBACN,eAAe;;8BAGf;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE;6BAEvD,eAAe,EAAE;wBAEjB,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.js"],"names":[],"mappings":";;;gCAGa,YAAY,YAAY,OAAO,CAAC,CAAC;;;;wBAMjC;IAAE,KAAK,SAAS;IAAC,MAAM,SAAQ;CAAE;;;;;;;8BAYjC;IACZ,OAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAU,CAAC,EAAE;QAAE,MAAM,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9C,IAAQ,CAAC,EAAE;QAAE,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,CAAC;CACnE;;iBAKU,MAAM;qBACN,MAAM;YACN,MAAM;qBACN,eAAe;;;iBAKf,MAAM;qBACN,MAAM;YACN,MAAM;qBACN,eAAe;;8BAGf;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE;6BAEvD,eAAe,EAAE;wBAEjB,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI"}
@@ -6,8 +6,8 @@ export class CloudImageEditorActivity extends UploaderBlock {
6
6
  '*uploadList': never[];
7
7
  '*focusedEntry': null;
8
8
  '*uploadQueue': import("@uploadcare/upload-client").Queue;
9
- '*collectionErrors': import("../../index.js").OutputErrorCollection[];
10
- '*collectionState': import("../../index.js").OutputCollectionState | null;
9
+ '*collectionErrors': any[];
10
+ '*collectionState': import("../../index.js").OutputCollectionState<import("../../index.js").OutputCollectionStatus, "maybe-has-group"> | null;
11
11
  '*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
12
12
  '*uploadTrigger': Set<string>;
13
13
  '*secureUploadsManager': import("../../abstract/SecureUploadsManager.js").SecureUploadsManager | null;
@@ -19,7 +19,7 @@ export class CloudImageEditorActivity extends UploaderBlock {
19
19
  };
20
20
  entry: import("../../abstract/TypedData.js").TypedData | undefined;
21
21
  /** @param {CustomEvent<import('../CloudImageEditor/src/types.js').ApplyResult>} e */
22
- handleApply(e: CustomEvent<import("../CloudImageEditor/src/types.js").ApplyResult>): void;
22
+ handleApply(e: CustomEvent<import('../CloudImageEditor/src/types.js').ApplyResult>): void;
23
23
  handleCancel(): void;
24
24
  mountEditor(): void;
25
25
  _mounted: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"CloudImageEditorActivity.d.ts","sourceRoot":"","sources":["CloudImageEditorActivity.js"],"names":[],"mappings":"AAMA;IAEE,iCAAuD;IAKrD;;;;;;oCAW2B,gBAAU;mCAGoB,gBAAU;6BAIjE,2BAEF;;wCAOA,wCAAsB;;;;;;MAxBrB;IAeC,mEAAkB;IAsBtB,qFAAqF;IACrF,eADY,WAAW,CAAC,OAAO,kCAAkC,EAAE,WAAW,CAAC,QAW9E;IAED,qBAEC;IAED,oBAqCC;IAJC,8BAAoB;IAEpB,eAAe;IACf,kBAAyB;IAG3B,sBAGC;CACF;8BA9G6B,iCAAiC"}
1
+ {"version":3,"file":"CloudImageEditorActivity.d.ts","sourceRoot":"","sources":["CloudImageEditorActivity.js"],"names":[],"mappings":"AAKA;IAEE,iCAAuD;IAKrD;;;;;;;;;;;;;;;;MAGC;IAeC,mEAAkB;IAsBtB,qFAAqF;IACrF,eADY,YAAY,OAAO,kCAAkC,EAAE,WAAW,CAAC,QAW9E;IAED,qBAEC;IAED,oBAqCC;IAJC,8BAAoB;IAEpB,eAAe;IACf,kBAAyB;IAG3B,sBAGC;CACF;8BA9G6B,iCAAiC"}
@@ -1,5 +1,4 @@
1
1
  // @ts-check
2
- import { DICT } from '@symbiotejs/symbiote';
3
2
  import { ActivityBlock } from '../../abstract/ActivityBlock.js';
4
3
  import { UploaderBlock } from '../../abstract/UploaderBlock.js';
5
4
  import { CloudImageEditorBlock } from '../CloudImageEditor/index.js';
@@ -74,7 +73,7 @@ export class CloudImageEditorActivity extends UploaderBlock {
74
73
  const cropPreset = this.cfg.cropPreset;
75
74
  const tabs = this.cfg.cloudImageEditorTabs;
76
75
 
77
- instance.setAttribute(DICT.CTX_NAME_ATTR, this.ctxName);
76
+ instance.setAttribute('ctx-name', this.ctxName);
78
77
  instance.setAttribute('cdn-url', cdnUrl);
79
78
 
80
79
  if (cropPreset) {
@@ -11,8 +11,16 @@
11
11
  * 'collectionValidators',
12
12
  * ]}
13
13
  */
14
- export const complexConfigKeys: ["metadata", "localeDefinitionOverride", "secureUploadsSignatureResolver", "secureDeliveryProxyUrlResolver", "iconHrefResolver", "fileValidators", "collectionValidators"];
15
- export type Config = import("../../utils/mixinClass.js").MixinClass<typeof ConfigClass, import("../../types").ConfigType>;
14
+ export const complexConfigKeys: [
15
+ 'metadata',
16
+ 'localeDefinitionOverride',
17
+ 'secureUploadsSignatureResolver',
18
+ 'secureDeliveryProxyUrlResolver',
19
+ 'iconHrefResolver',
20
+ 'fileValidators',
21
+ 'collectionValidators'
22
+ ];
23
+ export type Config = import('../../utils/mixinClass.js').MixinClass<typeof ConfigClass, import('../../types').ConfigType>;
16
24
  /** @typedef {import('../../utils/mixinClass.js').MixinClass<typeof ConfigClass, import('../../types').ConfigType>} Config */
17
25
  export const Config: Config;
18
26
  declare class ConfigClass extends Block {
@@ -54,6 +62,6 @@ declare class ConfigClass extends Block {
54
62
  }
55
63
  import { Block } from '../../abstract/Block.js';
56
64
  /** Mapping of attribute names to state */
57
- declare const attrStateMapping: Record<keyof import("../../types").ConfigAttributesType, string>;
65
+ declare const attrStateMapping: Record<"multiple" | "pubkey" | "accept" | "store" | "debug" | "secure-expire" | "crop-preset" | "multiple-min" | "multiple-max" | "confirm-upload" | "img-only" | "external-sources-preferred-types" | "camera-mirror" | "camera-capture" | "source-list" | "max-local-file-size-bytes" | "thumb-size" | "show-empty-list" | "use-local-image-editor" | "use-cloud-image-editor" | "cloud-image-editor-tabs" | "remove-copyright" | "image-shrink" | "modal-scroll-lock" | "modal-backdrop-strokes" | "source-list-wrap" | "remote-tab-session-key" | "cdn-cname" | "base-url" | "social-base-url" | "secure-signature" | "secure-delivery-proxy" | "retry-throttled-request-max-times" | "multipart-min-file-size" | "multipart-chunk-size" | "max-concurrent-requests" | "multipart-max-concurrent-requests" | "multipart-max-attempts" | "check-for-url-duplicates" | "save-url-for-recurrent-uploads" | "group-output" | "user-agent-integration" | "locale-name" | "secure-uploads-expire-threshold" | "secureexpire" | "croppreset" | "multiplemin" | "multiplemax" | "confirmupload" | "imgonly" | "externalsourcespreferredtypes" | "cameramirror" | "cameracapture" | "sourcelist" | "maxlocalfilesizebytes" | "thumbsize" | "showemptylist" | "uselocalimageeditor" | "usecloudimageeditor" | "cloudimageeditortabs" | "removecopyright" | "imageshrink" | "modalscrolllock" | "modalbackdropstrokes" | "sourcelistwrap" | "remotetabsessionkey" | "cdncname" | "baseurl" | "socialbaseurl" | "securesignature" | "securedeliveryproxy" | "retrythrottledrequestmaxtimes" | "multipartminfilesize" | "multipartchunksize" | "maxconcurrentrequests" | "multipartmaxconcurrentrequests" | "multipartmaxattempts" | "checkforurlduplicates" | "saveurlforrecurrentuploads" | "groupoutput" | "useragentintegration" | "localename" | "secureuploadsexpirethreshold", string>;
58
66
  export {};
59
67
  //# sourceMappingURL=Config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["Config.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;GAYG;AACH,gCAVU,CACT,UAAc,EACd,0BAA8B,EAC9B,gCAAoC,EACpC,gCAAoC,EACpC,kBAAsB,EACtB,gBAAoB,EACpB,sBAA0B,CACvB,CAUF;qBAiNY,OAAO,2BAA2B,EAAE,UAAU,CAAC,OAAO,WAAW,EAAE,OAAO,aAAa,EAAE,UAAU,CAAC;AAAlH,6HAA6H;AAG7H,qBAAiC,MAAM,CAA4C;AAvLnF;IAkBE;;;;OAIG;IACH,+BAYC;IAED;;;;OAIG;IACH,2BAQC;IAED;;;;OAIG;IACH,kBAiBC;IAED;;;OAGG;IACH,kBAIC;IAED;;;;OAIG;IACH,wCAJW,MAAM,iBACN,OAAO,aACP,OAAO,QAoBjB;IA0CD;;;;OAIG;IACH,+BAJW,MAAM,OAAO,gBAAgB,UAC7B,MAAM,UACN,MAAM,QAahB;CACF;sBArOqB,yBAAyB;AAoD/C,0CAA0C;AAC1C,gCAAoC,MAAM,CAAC,MAAM,OAAO,aAAa,EAAE,oBAAoB,EAAE,MAAM,CAAC,CAGjG"}
1
+ {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["Config.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;GAYG;AACH,gCAVU;IACT,UAAc;IACd,0BAA8B;IAC9B,gCAAoC;IACpC,gCAAoC;IACpC,kBAAsB;IACtB,gBAAoB;IACpB,sBAA0B;CACvB,CAUF;qBAiNY,OAAO,2BAA2B,EAAE,UAAU,CAAC,kBAAkB,EAAE,OAAO,aAAa,EAAE,UAAU,CAAC;AAAlH,6HAA6H;AAG7H,4BAAmF;AAvLnF;IAkBE;;;;OAIG;IACH,+BAYC;IAED;;;;OAIG;IACH,2BAQC;IAED;;;;OAIG;IACH,kBAiBC;IAED;;;OAGG;IACH,kBAIC;IAED;;;;OAIG;IACH,wCAJW,MAAM,iBACN,OAAO,aACP,OAAO,QAoBjB;IA0CD;;;;OAIG;IACH,+BAJW,MAAM,uBAAuB,UAC7B,MAAM,UACN,MAAM,QAahB;CACF;sBArOqB,yBAAyB;AAoD/C,0CAA0C;AAC1C,qzDAGG"}
@@ -2,5 +2,5 @@ export const DEFAULT_CDN_CNAME: "https://ucarecdn.com";
2
2
  export const DEFAULT_BASE_URL: "https://upload.uploadcare.com";
3
3
  export const DEFAULT_SOCIAL_BASE_URL: "https://social.uploadcare.com";
4
4
  /** @type {import('../../types/exported').ConfigType} */
5
- export const initialConfig: import("../../types/exported").ConfigType;
5
+ export const initialConfig: import('../../types/exported').ConfigType;
6
6
  //# sourceMappingURL=initialConfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"normalizeConfigValue.d.ts","sourceRoot":"","sources":["normalizeConfigValue.js"],"names":[],"mappings":"AAeO,iCADK,OAAO,WAWlB;AA4IM,qCAL+C,CAAC,SAA1C,MAAO,OAAO,aAAa,EAAE,UAAW,OAC1C,CAAC,SACD,OAAO,GACL,OAAO,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,SAAS,CAa3D"}
1
+ {"version":3,"file":"normalizeConfigValue.d.ts","sourceRoot":"","sources":["normalizeConfigValue.js"],"names":[],"mappings":"AAeO,iCADK,OAAO,WAWlB;AA4IM,sGAHI,OAAO,mDAcjB"}
@@ -1 +1 @@
1
- {"version":3,"file":"Copyright.d.ts","sourceRoot":"","sources":["Copyright.js"],"names":[],"mappings":"AAGA;CAqBC;sBAvBqB,yBAAyB"}
1
+ {"version":3,"file":"Copyright.d.ts","sourceRoot":"","sources":["Copyright.js"],"names":[],"mappings":"AAEA;CAqBC;sBAvBqB,yBAAyB"}
@@ -1,4 +1,3 @@
1
- import { html } from '@symbiotejs/symbiote';
2
1
  import { Block } from '../../abstract/Block.js';
3
2
 
4
3
  export class Copyright extends Block {
@@ -14,7 +13,7 @@ export class Copyright extends Block {
14
13
  );
15
14
  }
16
15
 
17
- static template = html`
16
+ static template = /* HTML */ `
18
17
  <a
19
18
  href="https://uploadcare.com/?utm_source=copyright&utm_medium=referral&utm_campaign=v4"
20
19
  target="_blank noopener"
@@ -12,8 +12,8 @@ export class DropArea extends UploaderBlock {
12
12
  '*uploadList': never[];
13
13
  '*focusedEntry': null;
14
14
  '*uploadQueue': import("@uploadcare/upload-client").Queue;
15
- '*collectionErrors': import("../../index.js").OutputErrorCollection[];
16
- '*collectionState': import("../../index.js").OutputCollectionState | null;
15
+ '*collectionErrors': any[];
16
+ '*collectionState': import("../../index.js").OutputCollectionState<import("../../index.js").OutputCollectionStatus, "maybe-has-group"> | null;
17
17
  '*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
18
18
  '*uploadTrigger': Set<string>;
19
19
  '*secureUploadsManager': import("../../abstract/SecureUploadsManager.js").SecureUploadsManager | null;
@@ -1 +1 @@
1
- {"version":3,"file":"DropArea.d.ts","sourceRoot":"","sources":["DropArea.js"],"names":[],"mappings":"AAaA;IAKI;;;;;;;;;;;;;oCAAA,gBAAS;mCAGA,gBACb;6BAGO,2BACI;;wCASM,wCAA0B;;;;;;MAPtC;IAGH,oBAgBC;IAgDC,eAAe;IACf,yBA2BE;IAIA,yDAWE;IA6BF;;;OAGG;IACH,uBASC;IAOL;;;;;OAKG;IACH,sBAeC;IAED,eAAe;IACf,0BAcC;CAqBF;;;;8BAlP6B,iCAAiC"}
1
+ {"version":3,"file":"DropArea.d.ts","sourceRoot":"","sources":["DropArea.js"],"names":[],"mappings":"AAaA;IAKI;;;;;;;;;;;;;;;;;;;;;;;MAUC;IAGH,oBAgBC;IAgDC,eAAe;IACf,yBA2BE;IAIA,yDAWE;IA6BF;;;OAGG;IACH,uBASC;IAOL;;;;;OAKG;IACH,sBAeC;IAED,eAAe;IACf,0BAcC;CAqBF;;;;8BAlP6B,iCAAiC"}
@@ -1,6 +1,6 @@
1
1
  // @ts-check
2
2
 
3
- import { PubSub, html } from '@symbiotejs/symbiote';
3
+ import { Data } from '@symbiotejs/symbiote';
4
4
  import { ActivityBlock } from '../../abstract/ActivityBlock.js';
5
5
  import { UploaderBlock } from '../../abstract/UploaderBlock.js';
6
6
  import { stringToArray } from '../../utils/stringToArray.js';
@@ -233,7 +233,7 @@ export class DropArea extends UploaderBlock {
233
233
  if (registry) {
234
234
  registry.delete(this);
235
235
  if (registry.size === 0) {
236
- PubSub.deleteCtx(GLOBAL_CTX_NAME);
236
+ Data.deleteCtx(GLOBAL_CTX_NAME);
237
237
  }
238
238
  }
239
239
 
@@ -246,11 +246,11 @@ export class DropArea extends UploaderBlock {
246
246
  }
247
247
  }
248
248
 
249
- DropArea.template = html`
249
+ DropArea.template = /* HTML */ `
250
250
  <slot>
251
251
  <div data-default-slot hidden></div>
252
- <div ref="content-wrapper" class="uc-content-wrapper" bind="@hidden: !isVisible">
253
- <div class="uc-icon-container" bind="@hidden: !withIcon">
252
+ <div ref="content-wrapper" class="uc-content-wrapper" set="@hidden: !isVisible">
253
+ <div class="uc-icon-container" set="@hidden: !withIcon">
254
254
  <uc-icon name="default"></uc-icon>
255
255
  <uc-icon name="arrow-down"></uc-icon>
256
256
  </div>
@@ -1 +1 @@
1
- {"version":3,"file":"addDropzone.d.ts","sourceRoot":"","sources":["addDropzone.js"],"names":[],"mappings":"AA0BA;;;;;;GAMG;AACH,kCALG;IAA0B,OAAO,EAAzB,WAAW;IACI,QAAQ;IACR,OAAO;IACF,YAAY,EAAhC,aAAa;CACvB,cAwGA"}
1
+ {"version":3,"file":"addDropzone.d.ts","sourceRoot":"","sources":["addDropzone.js"],"names":[],"mappings":"AA0BA;;;;;;GAMG;AACH;IAL6B,OAAO,EAAzB,WAAW;IACI,QAAQ;IACR,OAAO;IACF,YAAY,EAAhC,aAAa;eAyGvB"}
@@ -6,11 +6,11 @@
6
6
  */
7
7
  export function getDropItems(dataTransfer: DataTransfer): Promise<DropItem[]>;
8
8
  export type DropItem = {
9
- type: "file";
9
+ type: 'file';
10
10
  file: File;
11
11
  fullPath?: string;
12
12
  } | {
13
- type: "url";
13
+ type: 'url';
14
14
  url: string;
15
15
  };
16
16
  //# sourceMappingURL=getDropItems.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getDropItems.d.ts","sourceRoot":"","sources":["getDropItems.js"],"names":[],"mappings":"AAwGA;;;;;GAKG;AACH,2CAHW,YAAY,GACV,OAAO,CAAC,QAAQ,EAAE,CAAC,CA0D/B;uBAnKY;IACZ,IAAY,EAAE,MAAM,CAAC;IACrB,IAAY,EAAE,IAAI,CAAC;IACnB,QAAgB,CAAC,EAAE,MAAM,CAAC;CACnB,GACD;IACN,IAAY,EAAE,KAAK,CAAC;IACpB,GAAW,EAAE,MAAM,CAAC;CACb"}
1
+ {"version":3,"file":"getDropItems.d.ts","sourceRoot":"","sources":["getDropItems.js"],"names":[],"mappings":"AAwGA;;;;;GAKG;AACH,2CAHW,YAAY,GACV,QAAQ,QAAQ,EAAE,CAAC,CA0D/B;uBAnKY;IACZ,IAAY,EAAE,MAAM,CAAC;IACrB,IAAY,EAAE,IAAI,CAAC;IACnB,QAAgB,CAAC,EAAE,MAAM,CAAC;CACnB,GACD;IACN,IAAY,EAAE,KAAK,CAAC;IACpB,GAAW,EAAE,MAAM,CAAC;CACb"}
@@ -29,8 +29,8 @@ export class ExternalSource extends UploaderBlock {
29
29
  '*uploadList': never[];
30
30
  '*focusedEntry': null;
31
31
  '*uploadQueue': import("@uploadcare/upload-client").Queue;
32
- '*collectionErrors': import("../../index.js").OutputErrorCollection[];
33
- '*collectionState': import("../../index.js").OutputCollectionState | null;
32
+ '*collectionErrors': any[];
33
+ '*collectionState': import("../../index.js").OutputCollectionState<import("../../index.js").OutputCollectionStatus, "maybe-has-group"> | null;
34
34
  '*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
35
35
  '*uploadTrigger': Set<string>;
36
36
  '*secureUploadsManager': import("../../abstract/SecureUploadsManager.js").SecureUploadsManager | null;
@@ -83,14 +83,14 @@ export type ActivityParams = {
83
83
  externalSourceType: string;
84
84
  };
85
85
  export type SelectedFileMessage = {
86
- type: "file-selected";
87
- obj_type: "selected_file";
86
+ type: 'file-selected';
87
+ obj_type: 'selected_file';
88
88
  filename: string;
89
89
  url: string;
90
90
  alternatives?: Record<string, string>;
91
91
  };
92
92
  export type EmbedCssMessage = {
93
- type: "embed-css";
93
+ type: 'embed-css';
94
94
  style: string;
95
95
  };
96
96
  export type Message = SelectedFileMessage | EmbedCssMessage;
@@ -1 +1 @@
1
- {"version":3,"file":"ExternalSource.d.ts","sourceRoot":"","sources":["ExternalSource.js"],"names":[],"mappings":"AAWA,+DAA+D;AAE/D;;;;;;;;GAQG;AAEH;;;;;GAKG;AAEH,+DAA+D;AAE/D;IAEE,yBAAiD;IAK/C;;;;;;;;;;;;oCApBC,gBAAS;mCAKF,gBACL;6BAKY,2BAA2B;;wCAIZ,wCAE1B;;;;;;MAuBH;IAGH;;;OAGG;IACH,gBAAe;IA2Cf;;;OAGG;IACH,8BAcC;IAED;;;OAGG;IACH,oBAEC;IAED;;;OAGG;IACH,2BAUC;IAED,eAAe;IACf,yBAEC;IAED;;;OAGG;IACH,oBAGC;IAED,eAAe;IACf,oBAkBC;IAED,eAAe;IACf,kBAcC;IAED,eAAe;IACf,oBAsBC;IAED,eAAe;IACf,sBAMC;CACF;;;;6BAnOa;IAAE,kBAAkB,EAAE,MAAM,CAAA;CAAE;kCAG/B;IACZ,IAAQ,EAAE,eAAe,CAAC;IAC1B,QAAY,EAAE,eAAe,CAAC;IAC9B,QAAY,EAAE,MAAM,CAAC;IACrB,GAAO,EAAE,MAAM,CAAC;IAChB,YAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC;8BAIS;IACZ,IAAQ,EAAE,WAAW,CAAC;IACtB,KAAS,EAAE,MAAM,CAAC;CACf;sBAGU,mBAAmB,GAAG,eAAe;8BA1BrB,iCAAiC"}
1
+ {"version":3,"file":"ExternalSource.d.ts","sourceRoot":"","sources":["ExternalSource.js"],"names":[],"mappings":"AAWA,+DAA+D;AAE/D;;;;;;;;GAQG;AAEH;;;;;GAKG;AAEH,+DAA+D;AAE/D;IAEE,yBAAiD;IAK/C;;;;;;;;;;;;;;;;;;;;;;MAoBC;IAGH;;;OAGG;IACH,gBAAe;IA2Cf;;;OAGG;IACH,8BAcC;IAED;;;OAGG;IACH,oBAEC;IAED;;;OAGG;IACH,2BAUC;IAED,eAAe;IACf,yBAEC;IAED;;;OAGG;IACH,oBAGC;IAED,eAAe;IACf,oBAkBC;IAED,eAAe;IACf,kBAcC;IAED,eAAe;IACf,oBAsBC;IAED,eAAe;IACf,sBAMC;CACF;;;;6BAnOa;IAAE,kBAAkB,EAAE,MAAM,CAAA;CAAE;kCAG/B;IACZ,IAAQ,EAAE,eAAe,CAAC;IAC1B,QAAY,EAAE,eAAe,CAAC;IAC9B,QAAY,EAAE,MAAM,CAAC;IACrB,GAAO,EAAE,MAAM,CAAC;IAChB,YAAgB,CAAC,EAAE,OAAO,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC;8BAIS;IACZ,IAAQ,EAAE,WAAW,CAAC;IACtB,KAAS,EAAE,MAAM,CAAC;CACf;sBAGU,mBAAmB,GAAG,eAAe;8BA1BrB,iCAAiC"}