filepond 5.0.0-beta.20 → 5.0.0-beta.21

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 (252) hide show
  1. package/cdn/assets/index.js +1 -1
  2. package/cdn/locales/ar-ar.js +1 -1
  3. package/cdn/locales/bn-bd.js +1 -1
  4. package/cdn/locales/cs-cz.js +1 -1
  5. package/cdn/locales/da-dk.js +1 -1
  6. package/cdn/locales/de-de.js +1 -1
  7. package/cdn/locales/el-gr.js +1 -1
  8. package/cdn/locales/en-gb.js +1 -1
  9. package/cdn/locales/es-es.js +1 -1
  10. package/cdn/locales/fi-fi.js +1 -1
  11. package/cdn/locales/fr-fr.js +1 -1
  12. package/cdn/locales/hi-in.js +1 -1
  13. package/cdn/locales/hu-hu.js +1 -1
  14. package/cdn/locales/index.js +1 -1
  15. package/cdn/locales/is-is.js +1 -1
  16. package/cdn/locales/it-it.js +1 -1
  17. package/cdn/locales/ja-jp.js +1 -1
  18. package/cdn/locales/ko-kr.js +1 -1
  19. package/cdn/locales/nb-no.js +1 -1
  20. package/cdn/locales/nl-nl.js +1 -1
  21. package/cdn/locales/pl-pl.js +1 -1
  22. package/cdn/locales/pt-pt.js +1 -1
  23. package/cdn/locales/sv-se.js +1 -1
  24. package/cdn/locales/tr-tr.js +1 -1
  25. package/cdn/locales/uk-ua.js +1 -1
  26. package/cdn/locales/vi-vn.js +1 -1
  27. package/cdn/locales/zh-cn.js +1 -1
  28. package/cdn/main.js +2 -2
  29. package/cdn/workers/httpRequest.js +45 -0
  30. package/cdn/workers/httpRequestWorker.js +37 -0
  31. package/cdn/workers/readFile.js +14 -0
  32. package/cdn/workers/readFileWorker.js +6 -0
  33. package/cdn/workers/transformImage.js +16 -0
  34. package/cdn/workers/transformImageWorker.js +8 -0
  35. package/esm/assets/index.js +1 -1
  36. package/esm/common/console.js +1 -1
  37. package/esm/common/entry.js +1 -1
  38. package/esm/common/perceivedPerformanceProxy.js +1 -1
  39. package/esm/common/readEntriesFromDataTransfer.js +1 -1
  40. package/esm/common/ssr.js +1 -1
  41. package/esm/common/status.js +1 -1
  42. package/esm/core/entryTree.js +1 -1
  43. package/esm/core/extensionManager.js +28 -28
  44. package/esm/core/taskScheduler.js +78 -97
  45. package/esm/dev/index.js +1 -1
  46. package/esm/elements/FilePondDefault/index.css.js +1 -1
  47. package/esm/elements/FilePondDefault/index.js +46 -45
  48. package/esm/elements/FilePondDropArea/index.css.js +1 -1
  49. package/esm/elements/FilePondDropArea/index.js +1 -1
  50. package/esm/elements/FilePondDropArea/index.svelte.js +1 -1
  51. package/esm/elements/FilePondDropIndicator/index.css.js +1 -1
  52. package/esm/elements/FilePondDropIndicator/index.js +1 -1
  53. package/esm/elements/FilePondDropIndicator/index.svelte.js +1 -1
  54. package/esm/elements/FilePondEntryList/components/Entry/index.css.js +1 -1
  55. package/esm/elements/FilePondEntryList/components/Entry/index.js +1 -1
  56. package/esm/elements/FilePondEntryList/components/Entry/index.svelte.js +1 -1
  57. package/esm/elements/FilePondEntryList/components/EntryActivityIndicator/index.css.js +1 -1
  58. package/esm/elements/FilePondEntryList/components/EntryActivityIndicator/index.js +1 -1
  59. package/esm/elements/FilePondEntryList/components/EntryActivityIndicator/index.svelte.js +80 -80
  60. package/esm/elements/FilePondEntryList/components/EntryList/index.css.js +1 -1
  61. package/esm/elements/FilePondEntryList/components/EntryList/index.js +1 -1
  62. package/esm/elements/FilePondEntryList/components/EntryList/index.svelte.js +1 -1
  63. package/esm/elements/FilePondEntryList/components/EntryListItem/index.css.js +1 -1
  64. package/esm/elements/FilePondEntryList/components/EntryListItem/index.js +1 -1
  65. package/esm/elements/FilePondEntryList/components/EntryListItem/index.svelte.js +1 -1
  66. package/esm/elements/FilePondEntryList/components/EntryListItemPlaceholder/index.svelte.js +1 -1
  67. package/esm/elements/FilePondEntryList/components/EntryStatus/index.css.js +1 -1
  68. package/esm/elements/FilePondEntryList/components/EntryStatus/index.js +1 -1
  69. package/esm/elements/FilePondEntryList/components/EntryStatus/index.svelte.js +1 -1
  70. package/esm/elements/FilePondEntryList/components/MediaImage/components/BitmapRenderer.svelte.js +65 -60
  71. package/esm/elements/FilePondEntryList/components/MediaImage/components/BitmapRendererCache.js +1 -1
  72. package/esm/elements/FilePondEntryList/components/MediaImage/index.css.js +1 -1
  73. package/esm/elements/FilePondEntryList/components/MediaImage/index.js +2 -1
  74. package/esm/elements/FilePondEntryList/components/MediaImage/index.svelte.js +70 -70
  75. package/esm/elements/FilePondEntryList/components/MediaPane/index.css.js +2 -2
  76. package/esm/elements/FilePondEntryList/components/MediaPane/index.js +1 -1
  77. package/esm/elements/FilePondEntryList/components/MediaPane/index.svelte.js +1 -1
  78. package/esm/elements/FilePondEntryList/components/MediaTimeIndicator/index.css.js +1 -1
  79. package/esm/elements/FilePondEntryList/components/MediaTimeIndicator/index.js +1 -1
  80. package/esm/elements/FilePondEntryList/components/MediaTimeIndicator/index.svelte.js +1 -1
  81. package/esm/elements/FilePondEntryList/components/MediaVideo/index.css.js +1 -1
  82. package/esm/elements/FilePondEntryList/components/MediaVideo/index.js +1 -1
  83. package/esm/elements/FilePondEntryList/components/MediaVideo/index.svelte.js +1 -1
  84. package/esm/elements/FilePondEntryList/contexts/appContext.js +1 -1
  85. package/esm/elements/FilePondEntryList/contexts/dragContext.js +1 -1
  86. package/esm/elements/FilePondEntryList/contexts/dropContext.js +1 -1
  87. package/esm/elements/FilePondEntryList/contexts/entryContext.js +1 -1
  88. package/esm/elements/FilePondEntryList/contexts/springElementTreeContext.js +1 -1
  89. package/esm/elements/FilePondEntryList/index.css.js +1 -1
  90. package/esm/elements/FilePondEntryList/index.js +2 -1
  91. package/esm/elements/FilePondEntryList/index.svelte.js +166 -166
  92. package/esm/elements/FilePondInput/index.css.js +1 -1
  93. package/esm/elements/FilePondInput/index.js +15 -11
  94. package/esm/elements/FilePondSvelteComponent/index.svelte.js +1 -1
  95. package/esm/elements/attachments/dragarea.js +1 -1
  96. package/esm/elements/attachments/droparea.js +1 -1
  97. package/esm/elements/attachments/measurable.js +1 -1
  98. package/esm/elements/attachments/resizable.js +1 -1
  99. package/esm/elements/attachments/transitions.js +1 -1
  100. package/esm/elements/common/animationGuard.js +1 -1
  101. package/esm/elements/common/animationPreference.svelte.js +1 -1
  102. package/esm/elements/common/dragDrop.js +1 -1
  103. package/esm/elements/common/event.js +1 -1
  104. package/esm/elements/common/extendStyles.js +1 -1
  105. package/esm/elements/common/getClosestElement.js +1 -1
  106. package/esm/elements/common/html.js +1 -1
  107. package/esm/elements/common/nodeTree.js +9 -9
  108. package/esm/elements/common/store.svelte.js +1 -1
  109. package/esm/elements/common/string.js +1 -1
  110. package/esm/elements/common/transition.js +1 -1
  111. package/esm/elements/components/BooleanInput/index.css.js +1 -1
  112. package/esm/elements/components/BooleanInput/index.js +1 -1
  113. package/esm/elements/components/BooleanInput/index.svelte.js +1 -1
  114. package/esm/elements/components/Button/index.css.js +1 -1
  115. package/esm/elements/components/Button/index.js +1 -1
  116. package/esm/elements/components/Button/index.svelte.js +1 -1
  117. package/esm/elements/components/ElementPane/index.css.js +1 -1
  118. package/esm/elements/components/ElementPane/index.js +1 -1
  119. package/esm/elements/components/ElementPane/index.svelte.js +1 -1
  120. package/esm/elements/components/ElementSkeleton/index.css.js +1 -1
  121. package/esm/elements/components/ElementSkeleton/index.js +1 -1
  122. package/esm/elements/components/ElementSkeleton/index.svelte.js +1 -1
  123. package/esm/elements/components/FilenameInput/index.css.js +1 -1
  124. package/esm/elements/components/FilenameInput/index.js +1 -1
  125. package/esm/elements/components/FilenameInput/index.svelte.js +1 -1
  126. package/esm/elements/components/NodeList/index.svelte.js +1 -1
  127. package/esm/elements/components/ProgressIndicator/index.css.js +2 -2
  128. package/esm/elements/components/ProgressIndicator/index.js +1 -1
  129. package/esm/elements/components/ProgressIndicator/index.svelte.js +70 -70
  130. package/esm/elements/components/RangeInput/index.css.js +1 -1
  131. package/esm/elements/components/RangeInput/index.js +1 -1
  132. package/esm/elements/components/RangeInput/index.svelte.js +1 -1
  133. package/esm/elements/components/SpringElement/index.svelte.js +1 -1
  134. package/esm/elements/components/TextInput/index.css.js +1 -1
  135. package/esm/elements/components/TextInput/index.js +1 -1
  136. package/esm/elements/components/TextInput/index.svelte.js +1 -1
  137. package/esm/extensions/blob-loader.js +1 -1
  138. package/esm/extensions/canvas-loader.js +1 -1
  139. package/esm/extensions/chunked-upload-store.js +1 -1
  140. package/esm/extensions/clipboard-source.js +1 -1
  141. package/esm/extensions/common/createExtension.js +1 -1
  142. package/esm/extensions/common/createStoreExtension.js +1 -1
  143. package/esm/extensions/common/createTransformExtension.js +1 -1
  144. package/esm/extensions/common/createValidatorExtension.js +1 -1
  145. package/esm/extensions/console-view.js +1 -1
  146. package/esm/extensions/data-transfer-loader.js +1 -1
  147. package/esm/extensions/data-url-store.js +24 -19
  148. package/esm/extensions/drag-drop-source.js +1 -1
  149. package/esm/extensions/dropbox-source.js +1 -1
  150. package/esm/extensions/entry-list-view.js +1 -1
  151. package/esm/extensions/file-extension-validator.js +1 -1
  152. package/esm/extensions/file-input-source.js +1 -1
  153. package/esm/extensions/file-input-store.js +1 -1
  154. package/esm/extensions/file-mime-type-validator.js +1 -1
  155. package/esm/extensions/file-name-transform.js +1 -1
  156. package/esm/extensions/file-name-validator.js +1 -1
  157. package/esm/extensions/file-size-validator.js +1 -1
  158. package/esm/extensions/form-post-store.js +1 -1
  159. package/esm/extensions/image-bitmap-transform.js +56 -54
  160. package/esm/extensions/index.js +1 -1
  161. package/esm/extensions/list-count-validator.js +1 -1
  162. package/esm/extensions/list-size-validator.js +1 -1
  163. package/esm/extensions/media-resolution-validator.js +1 -1
  164. package/esm/extensions/object-url-store.js +1 -1
  165. package/esm/extensions/simulated-loader.js +74 -65
  166. package/esm/extensions/simulated-store.js +1 -1
  167. package/esm/extensions/text-input-store.js +1 -1
  168. package/esm/extensions/url-loader.js +74 -71
  169. package/esm/extensions/value-callback-store.js +1 -1
  170. package/esm/index.js +1 -1
  171. package/esm/locales/ar-ar.js +1 -1
  172. package/esm/locales/bn-bd.js +1 -1
  173. package/esm/locales/cs-cz.js +1 -1
  174. package/esm/locales/da-dk.js +1 -1
  175. package/esm/locales/de-de.js +1 -1
  176. package/esm/locales/el-gr.js +1 -1
  177. package/esm/locales/en-gb.js +1 -1
  178. package/esm/locales/es-es.js +1 -1
  179. package/esm/locales/fi-fi.js +1 -1
  180. package/esm/locales/fr-fr.js +1 -1
  181. package/esm/locales/hi-in.js +1 -1
  182. package/esm/locales/hu-hu.js +1 -1
  183. package/esm/locales/index.js +1 -1
  184. package/esm/locales/is-is.js +1 -1
  185. package/esm/locales/it-it.js +1 -1
  186. package/esm/locales/ja-jp.js +1 -1
  187. package/esm/locales/ko-kr.js +1 -1
  188. package/esm/locales/nb-no.js +1 -1
  189. package/esm/locales/nl-nl.js +1 -1
  190. package/esm/locales/pl-pl.js +1 -1
  191. package/esm/locales/pt-pt.js +1 -1
  192. package/esm/locales/sv-se.js +1 -1
  193. package/esm/locales/tr-tr.js +1 -1
  194. package/esm/locales/uk-ua.js +1 -1
  195. package/esm/locales/vi-vn.js +1 -1
  196. package/esm/locales/zh-cn.js +1 -1
  197. package/esm/templates/entry.js +2 -2
  198. package/esm/templates/helpers.js +1 -1
  199. package/esm/templates/index.js +1 -1
  200. package/esm/templates/media.js +119 -111
  201. package/esm/utils/array.js +1 -1
  202. package/esm/utils/bounds.js +1 -1
  203. package/esm/utils/cache.js +1 -1
  204. package/esm/utils/canvasToBlob.js +1 -1
  205. package/esm/utils/date.js +1 -1
  206. package/esm/utils/debounce.js +1 -1
  207. package/esm/utils/dom.js +1 -1
  208. package/esm/utils/file.js +1 -1
  209. package/esm/utils/functionToBlob.js +1 -1
  210. package/esm/utils/keyboard.js +1 -1
  211. package/esm/utils/math.js +1 -1
  212. package/esm/utils/media.js +1 -1
  213. package/esm/utils/number.js +1 -1
  214. package/esm/utils/object.js +1 -1
  215. package/esm/utils/objectURL.js +1 -1
  216. package/esm/utils/placeholder.js +1 -1
  217. package/esm/utils/poly.js +1 -1
  218. package/esm/utils/pubsub.js +1 -1
  219. package/esm/utils/rect.js +1 -1
  220. package/esm/utils/size.js +1 -1
  221. package/esm/utils/sleep.js +1 -1
  222. package/esm/utils/string.js +1 -1
  223. package/esm/utils/support.js +1 -1
  224. package/esm/utils/test.js +1 -1
  225. package/esm/utils/thread.js +47 -42
  226. package/esm/utils/tree.js +1 -1
  227. package/esm/utils/url.js +1 -1
  228. package/esm/utils/vector.js +1 -1
  229. package/esm/utils/window.js +1 -1
  230. package/esm/utils/xhr.js +88 -113
  231. package/esm/workers/httpRequest.js +45 -0
  232. package/esm/workers/httpRequestWorker.js +37 -0
  233. package/esm/workers/readFile.js +14 -0
  234. package/esm/workers/readFileWorker.js +6 -0
  235. package/esm/workers/transformImage.js +16 -0
  236. package/esm/workers/transformImageWorker.js +8 -0
  237. package/package.json +5 -1
  238. package/types/core/taskScheduler.d.ts +2 -2
  239. package/types/elements/FilePondDefault/index.d.ts +2 -0
  240. package/types/elements/FilePondInput/index.d.ts +2 -0
  241. package/types/elements/common/nodeTree.d.ts +1 -1
  242. package/types/extensions/data-url-store.d.ts +2 -0
  243. package/types/extensions/image-bitmap-transform.d.ts +2 -0
  244. package/types/extensions/simulated-loader.d.ts +2 -0
  245. package/types/extensions/url-loader.d.ts +2 -0
  246. package/types/templates/media.d.ts +14 -0
  247. package/types/types/index.d.ts +5 -11
  248. package/types/utils/thread.d.ts +6 -0
  249. package/types/utils/xhr.d.ts +1 -0
  250. package/types/workers/httpRequest.d.ts +23 -0
  251. package/types/workers/readFile.d.ts +9 -0
  252. package/types/workers/transformImage.d.ts +6 -0
@@ -0,0 +1,45 @@
1
+ /*!
2
+ * FilePond v5.0.0-beta.21
3
+ * Copyright (c) 2017-2026 Pqina B.V.
4
+ * Released under the MIT License
5
+ * https://filepond.com
6
+ */
7
+ function g({
8
+ url: l,
9
+ method: s = "GET",
10
+ formData: a,
11
+ data: p,
12
+ headers: i = [],
13
+ timeout: d = 0,
14
+ withCredentials: f = !1,
15
+ responseType: c = "text"
16
+ }, u, { abortController: E = new AbortController(), onprogress: T, onabort: h }) {
17
+ function n() {
18
+ u(e.status + " (" + e.statusText + ")");
19
+ }
20
+ function q() {
21
+ const t = {
22
+ response: e.response,
23
+ responseHeaders: e.getAllResponseHeaders()
24
+ };
25
+ u(null, t, typeof t.response != "string" ? [t.response] : void 0);
26
+ }
27
+ function H(t) {
28
+ const o = new FormData();
29
+ return t.filter(Boolean).forEach((R) => {
30
+ o.append(...R);
31
+ }), o;
32
+ }
33
+ const e = new XMLHttpRequest();
34
+ e.responseType = c, E.signal.onabort = () => {
35
+ e.abort();
36
+ };
37
+ const r = p || (a ? H(a) : null);
38
+ (r ? e.upload : e).onprogress = T, e.onload = () => {
39
+ e.status >= 200 && e.status < 300 ? q() : n();
40
+ }, e.onerror = n, e.ontimeout = n, e.onabort = h, e.open(r && (s === "GET" || s === "HEAD") ? "POST" : s, l), e.withCredentials = f, e.timeout = d, i.forEach(([t, o]) => e.setRequestHeader(t, o)), e.send(r);
41
+ }
42
+ g.fileName = "httpRequest";
43
+ export {
44
+ g as httpRequest
45
+ };
@@ -0,0 +1,37 @@
1
+ function g({
2
+ url: l,
3
+ method: s = "GET",
4
+ formData: a,
5
+ data: p,
6
+ headers: i = [],
7
+ timeout: d = 0,
8
+ withCredentials: f = !1,
9
+ responseType: c = "text"
10
+ }, u, { abortController: E = new AbortController(), onprogress: T, onabort: h }) {
11
+ function n() {
12
+ u(e.status + " (" + e.statusText + ")");
13
+ }
14
+ function q() {
15
+ const t = {
16
+ response: e.response,
17
+ responseHeaders: e.getAllResponseHeaders()
18
+ };
19
+ u(null, t, typeof t.response != "string" ? [t.response] : void 0);
20
+ }
21
+ function H(t) {
22
+ const o = new FormData();
23
+ return t.filter(Boolean).forEach((R) => {
24
+ o.append(...R);
25
+ }), o;
26
+ }
27
+ const e = new XMLHttpRequest();
28
+ e.responseType = c, E.signal.onabort = () => {
29
+ e.abort();
30
+ };
31
+ const r = p || (a ? H(a) : null);
32
+ (r ? e.upload : e).onprogress = T, e.onload = () => {
33
+ e.status >= 200 && e.status < 300 ? q() : n();
34
+ }, e.onerror = n, e.ontimeout = n, e.onabort = h, e.open(r && (s === "GET" || s === "HEAD") ? "POST" : s, l), e.withCredentials = f, e.timeout = d, i.forEach(([t, o]) => e.setRequestHeader(t, o)), e.send(r);
35
+ }
36
+ g.fileName = "httpRequest";
37
+ self.onmessage = function (message) {g.apply(null, message.data.concat([function (err, response, transferList = []) {const message = { content: response, error: err };return self.postMessage(message, transferList);},{onprogress: function({ lengthComputable, loaded, total }) {self.postMessage({ type: 'progress', content: { lengthComputable, loaded, total }, error: null })}}]))}
@@ -0,0 +1,14 @@
1
+ /*!
2
+ * FilePond v5.0.0-beta.21
3
+ * Copyright (c) 2017-2026 Pqina B.V.
4
+ * Released under the MIT License
5
+ * https://filepond.com
6
+ */
7
+ function d(a, r, { onprogress: n }) {
8
+ const e = new FileReader();
9
+ e.onprogress = n, e.onloadend = () => r(null, { dataURL: e.result }), e.onerror = (o) => r(o), e.readAsDataURL(a);
10
+ }
11
+ d.fileName = "readFile";
12
+ export {
13
+ d as readFile
14
+ };
@@ -0,0 +1,6 @@
1
+ function d(a, r, { onprogress: n }) {
2
+ const e = new FileReader();
3
+ e.onprogress = n, e.onloadend = () => r(null, { dataURL: e.result }), e.onerror = (o) => r(o), e.readAsDataURL(a);
4
+ }
5
+ d.fileName = "readFile";
6
+ self.onmessage = function (message) {d.apply(null, message.data.concat([function (err, response, transferList = []) {const message = { content: response, error: err };return self.postMessage(message, transferList);},{onprogress: function({ lengthComputable, loaded, total }) {self.postMessage({ type: 'progress', content: { lengthComputable, loaded, total }, error: null })}}]))}
@@ -0,0 +1,16 @@
1
+ /*!
2
+ * FilePond v5.0.0-beta.21
3
+ * Copyright (c) 2017-2026 Pqina B.V.
4
+ * Released under the MIT License
5
+ * https://filepond.com
6
+ */
7
+ function r(a, e, m, l) {
8
+ const n = e ? [a, ...Object.values(e), m] : [a, m];
9
+ createImageBitmap.apply(null, n).then((t) => {
10
+ l(null, t, [t]);
11
+ });
12
+ }
13
+ r.fileName = "transformImage";
14
+ export {
15
+ r as transformImage
16
+ };
@@ -0,0 +1,8 @@
1
+ function r(a, e, m, l) {
2
+ const n = e ? [a, ...Object.values(e), m] : [a, m];
3
+ createImageBitmap.apply(null, n).then((t) => {
4
+ l(null, t, [t]);
5
+ });
6
+ }
7
+ r.fileName = "transformImage";
8
+ self.onmessage = function (message) {r.apply(null, message.data.concat([function (err, response, transferList = []) {const message = { content: response, error: err };return self.postMessage(message, transferList);},{onprogress: function({ lengthComputable, loaded, total }) {self.postMessage({ type: 'progress', content: { lengthComputable, loaded, total }, error: null })}}]))}
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * FilePond v5.0.0-beta.20
2
+ * FilePond v5.0.0-beta.21
3
3
  * Copyright (c) 2017-2026 Pqina B.V.
4
4
  * Released under the MIT License
5
5
  * https://filepond.com
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * FilePond v5.0.0-beta.20
2
+ * FilePond v5.0.0-beta.21
3
3
  * Copyright (c) 2017-2026 Pqina B.V.
4
4
  * Released under the MIT License
5
5
  * https://filepond.com
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * FilePond v5.0.0-beta.20
2
+ * FilePond v5.0.0-beta.21
3
3
  * Copyright (c) 2017-2026 Pqina B.V.
4
4
  * Released under the MIT License
5
5
  * https://filepond.com
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * FilePond v5.0.0-beta.20
2
+ * FilePond v5.0.0-beta.21
3
3
  * Copyright (c) 2017-2026 Pqina B.V.
4
4
  * Released under the MIT License
5
5
  * https://filepond.com
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * FilePond v5.0.0-beta.20
2
+ * FilePond v5.0.0-beta.21
3
3
  * Copyright (c) 2017-2026 Pqina B.V.
4
4
  * Released under the MIT License
5
5
  * https://filepond.com
package/esm/common/ssr.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * FilePond v5.0.0-beta.20
2
+ * FilePond v5.0.0-beta.21
3
3
  * Copyright (c) 2017-2026 Pqina B.V.
4
4
  * Released under the MIT License
5
5
  * https://filepond.com
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * FilePond v5.0.0-beta.20
2
+ * FilePond v5.0.0-beta.21
3
3
  * Copyright (c) 2017-2026 Pqina B.V.
4
4
  * Released under the MIT License
5
5
  * https://filepond.com
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * FilePond v5.0.0-beta.20
2
+ * FilePond v5.0.0-beta.21
3
3
  * Copyright (c) 2017-2026 Pqina B.V.
4
4
  * Released under the MIT License
5
5
  * https://filepond.com
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * FilePond v5.0.0-beta.20
2
+ * FilePond v5.0.0-beta.21
3
3
  * Copyright (c) 2017-2026 Pqina B.V.
4
4
  * Released under the MIT License
5
5
  * https://filepond.com
@@ -8,8 +8,8 @@ import { createTaskScheduler as R } from "./taskScheduler.js";
8
8
  import { pubsub as z } from "../utils/pubsub.js";
9
9
  import { isArray as k } from "../utils/test.js";
10
10
  import { arrayItemsEqual as D, arrayRemoveInPlace as G, arraySortByItemProp as H } from "../utils/array.js";
11
- function V(c) {
12
- const { on: I, pub: y } = z(), a = [], { insertEntries: T, replaceEntry: A, updateEntry: v, removeEntries: j } = c, f = R({ logState: !1 }), x = {
11
+ function V(a) {
12
+ const { on: I, pub: y } = z(), c = [], { insertEntries: T, replaceEntry: A, updateEntry: v, removeEntries: j } = a, f = R({ log: void 0 }), x = {
13
13
  extension: {}
14
14
  };
15
15
  function l(n, s) {
@@ -27,12 +27,12 @@ function V(c) {
27
27
  function O(n) {
28
28
  return x.extension[n].status;
29
29
  }
30
- c.on("removeEntry", ({ entry: n }) => {
30
+ a.on("removeEntry", ({ entry: n }) => {
31
31
  f.abortTasks(n.id);
32
32
  });
33
33
  function q(n) {
34
34
  const s = function(e, i) {
35
- return c.on(e, i);
35
+ return a.on(e, i);
36
36
  }, o = [], t = { current: void 0 };
37
37
  t.current = n({
38
38
  // events
@@ -52,11 +52,11 @@ function V(c) {
52
52
  const B = E(
53
53
  t.current.name
54
54
  );
55
- c.findEntries(e) && f.pushTask(e, i, {
55
+ a.findEntries(e) && f.pushTask(e, i, {
56
56
  // set order to factor of 100 so in theory there's plenty room for adding manual order
57
57
  order: B.index * 100,
58
58
  // when params is a function it is called on run task
59
- params: () => [c.findEntries(e)],
59
+ params: () => [a.findEntries(e)],
60
60
  // add custom options
61
61
  ...u
62
62
  });
@@ -68,9 +68,9 @@ function V(c) {
68
68
  f.abortTasks(e);
69
69
  },
70
70
  setEntries: function(e) {
71
- c.entries = e;
71
+ a.entries = e;
72
72
  },
73
- getEntries: () => c.entries,
73
+ getEntries: () => a.entries,
74
74
  // manipulating entry list
75
75
  insertEntries: T,
76
76
  removeEntries: j,
@@ -90,14 +90,14 @@ function V(c) {
90
90
  e(...i);
91
91
  }), t.current;
92
92
  }
93
- function S() {
94
- f.abortTasks(), a.map((n) => n.instance).forEach((n) => n.destroy()), a.length = 0;
93
+ function h() {
94
+ f.abortTasks(), c.map((n) => n.instance).forEach((n) => n.destroy()), c.length = 0;
95
95
  }
96
- const h = {
96
+ const S = {
97
97
  // subscribe to events
98
98
  on: I,
99
99
  get extensions() {
100
- return a.map(({ factory: n }) => n);
100
+ return c.map(({ factory: n }) => n);
101
101
  },
102
102
  set extensions(n) {
103
103
  if (!k(n))
@@ -105,23 +105,23 @@ function V(c) {
105
105
  const s = n.map(
106
106
  (t) => Array.isArray(t) ? t[0] : t
107
107
  );
108
- if (D(s, h.extensions)) {
108
+ if (D(s, S.extensions)) {
109
109
  for (const t of n) {
110
110
  if (!k(t))
111
111
  continue;
112
- const r = a.find((e) => t[0] === e.factory);
112
+ const r = c.find((e) => t[0] === e.factory);
113
113
  p(r, t[1]);
114
114
  }
115
115
  return;
116
116
  }
117
- n.length === 0 && (d.clear(), S());
118
- for (const t of a)
117
+ n.length === 0 && (d.clear(), h());
118
+ for (const t of c)
119
119
  if (!s.includes(t.factory)) {
120
- t.instance.destroy(), G(a, (r) => r === t);
120
+ t.instance.destroy(), G(c, (r) => r === t);
121
121
  continue;
122
122
  }
123
123
  for (const [t, r] of Object.entries(s)) {
124
- const e = parseInt(t, 10), i = a.find((u) => r === u.factory);
124
+ const e = parseInt(t, 10), i = c.find((u) => r === u.factory);
125
125
  if (i) {
126
126
  if (i.index = e, Array.isArray(n[e])) {
127
127
  const u = n[e][1];
@@ -129,24 +129,24 @@ function V(c) {
129
129
  }
130
130
  continue;
131
131
  }
132
- if (a.push({
132
+ if (c.push({
133
133
  index: e,
134
134
  factory: r,
135
135
  instance: q(r)
136
136
  }), Array.isArray(n[e])) {
137
137
  const u = n[e][1];
138
- p(a.at(-1), u);
138
+ p(c.at(-1), u);
139
139
  }
140
140
  }
141
- H(a, "index"), Object.entries(d.get("*") ?? []).forEach(
141
+ H(c, "index"), Object.entries(d.get("*") ?? []).forEach(
142
142
  ([t, r]) => {
143
143
  P(t, r);
144
144
  }
145
145
  );
146
146
  for (const [t, r] of d)
147
147
  t !== "*" && b(t, r);
148
- const o = a.map((t) => t.instance.name);
149
- y("setExtensions", { extensionNames: o }), c.entries = [...c.entries];
148
+ const o = c.map((t) => t.instance.name);
149
+ y("setExtensions", { extensionNames: o }), a.entries = [...a.entries];
150
150
  },
151
151
  propagateExtensionProperty: P,
152
152
  setExtensionProperties: b,
@@ -157,7 +157,7 @@ function V(c) {
157
157
  },
158
158
  // destroy FilePond instance
159
159
  destroy() {
160
- S();
160
+ h();
161
161
  }
162
162
  };
163
163
  function P(n, s) {
@@ -182,13 +182,13 @@ function V(c) {
182
182
  s && (n.instance.setProps(s), m(n.instance.name, s));
183
183
  }
184
184
  function W(n) {
185
- return a.filter((s) => {
185
+ return c.filter((s) => {
186
186
  const o = s.instance.getProps();
187
187
  return Object.keys(o).includes(n);
188
188
  });
189
189
  }
190
190
  function E(n) {
191
- return a.find((s) => s.instance.name === n);
191
+ return c.find((s) => s.instance.name === n);
192
192
  }
193
193
  const d = /* @__PURE__ */ new Map();
194
194
  function m(n, s) {
@@ -197,7 +197,7 @@ function V(c) {
197
197
  ...s
198
198
  });
199
199
  }
200
- return h;
200
+ return S;
201
201
  }
202
202
  export {
203
203
  V as createExtensionManager
@@ -1,194 +1,175 @@
1
1
  /*!
2
- * FilePond v5.0.0-beta.20
2
+ * FilePond v5.0.0-beta.21
3
3
  * Copyright (c) 2017-2026 Pqina B.V.
4
4
  * Released under the MIT License
5
5
  * https://filepond.com
6
6
  */
7
7
  import { arrayRemoveInPlace as T } from "../utils/array.js";
8
- import { pubsub as z } from "../utils/pubsub.js";
9
- import { isString as J, isFunction as U } from "../utils/test.js";
10
- import { log as p } from "../common/console.js";
8
+ import { pubsub as j } from "../utils/pubsub.js";
9
+ import { isString as z, isFunction as D } from "../utils/test.js";
11
10
  const e = {
12
11
  QUEUED: 1,
13
12
  ACTIVE: 2,
14
13
  FAILED: 3,
15
14
  HALTED: 4
16
15
  };
17
- function tt(x) {
18
- const { logState: k = !1 } = x ?? {}, { on: C, pub: f } = z(), a = [], i = /* @__PURE__ */ new Map();
19
- function g() {
20
- p(`Tasks: ${a.length}`);
21
- for (const t of a) {
22
- const { group: n, fn: r, order: o, parallel: s, state: u, ...D } = t;
23
- let j = {
24
- // queued
25
- 1: "📥",
26
- // active
27
- 2: "👉",
28
- // failed
29
- 3: "💥",
30
- // halted
31
- 4: "🖐️"
32
- }[u];
33
- p(j, n, r.name, { parallel: s, order: o });
34
- }
35
- p("");
36
- }
37
- function v(t) {
16
+ function Y(S) {
17
+ const { log: p = void 0 } = S ?? {}, { on: U, pub: f } = j(), s = [], i = /* @__PURE__ */ new Map();
18
+ function h(t) {
38
19
  return t.state === e.QUEUED || t.state === e.ACTIVE;
39
20
  }
40
- function m(t) {
21
+ function k(t) {
41
22
  return t.state === e.QUEUED;
42
23
  }
43
- function Q(t) {
24
+ function x(t) {
44
25
  return t.state === e.ACTIVE;
45
26
  }
46
- function B(t, n) {
47
- return J(t) && U(n);
27
+ function C(t, n) {
28
+ return z(t) && D(n);
48
29
  }
49
- function E(t, n) {
30
+ function g(t, n) {
50
31
  let r = 0;
51
32
  for (let o = 0; o < n.length; o++)
52
33
  t.order >= n[o].order && (r = o + 1);
53
34
  n.splice(r, 0, t);
54
35
  }
55
- function H(t) {
56
- E(t, a);
36
+ function v(t) {
37
+ g(t, s);
57
38
  let n = i.get(t.group);
58
- n || (n = [], i.set(t.group, n)), E(t, n);
39
+ n || (n = [], i.set(t.group, n)), g(t, n);
59
40
  }
60
- function L(t, n) {
41
+ function Q(t, n) {
61
42
  const r = i.get(t);
62
43
  return r ? !!r.find((o) => o.fn === n) : !1;
63
44
  }
64
- function d(t) {
45
+ function m(t) {
65
46
  T(
66
- a,
47
+ s,
67
48
  (r) => r.group === t.group && r.fn === t.fn
68
49
  );
69
50
  const n = i.get(t.group);
70
51
  n && T(n, (r) => r.fn === t.fn);
71
52
  }
72
- function O(t) {
73
- T(a, (n) => n.group === t), i.delete(t);
53
+ function B(t) {
54
+ T(s, (n) => n.group === t), i.delete(t);
74
55
  }
75
56
  function c(t) {
76
57
  return i.get(t) ?? [];
77
58
  }
78
- function b(t, n) {
59
+ function E(t, n) {
79
60
  return c(t)[0].state === n;
80
61
  }
81
- function V(t) {
82
- return c(t).filter(v).length > 0;
62
+ function H(t) {
63
+ return c(t).filter(h).length > 0;
83
64
  }
84
- function q(t) {
65
+ function L(t) {
85
66
  const n = c(t);
86
67
  for (const r of n)
87
- S(r);
68
+ y(r);
88
69
  }
89
- function A(t) {
90
- return c(t).filter(m)[0];
70
+ function d(t) {
71
+ return c(t).filter(k)[0];
91
72
  }
92
- function w(t, n) {
73
+ function O(t, n) {
93
74
  const r = c(t);
94
75
  if (r)
95
76
  return r.find((o) => o.fn === n);
96
77
  }
97
- function I(t, n, r) {
98
- const { ignoreOptional: o = !1 } = r || {}, s = i.get(t) ?? [];
99
- for (const u of s)
78
+ function b(t, n, r) {
79
+ const { ignoreOptional: o = !1 } = r || {}, a = i.get(t) ?? [];
80
+ for (const u of a)
100
81
  o && u.isOptional || (u.state = n);
101
82
  }
102
- function N() {
103
- return Array.from(new Set(a.map((t) => t.group)));
83
+ function V() {
84
+ return Array.from(new Set(s.map((t) => t.group)));
104
85
  }
105
- function R() {
86
+ function q() {
106
87
  return i.keys();
107
88
  }
108
- function F() {
109
- return a.filter(m).length > 0;
89
+ function w() {
90
+ return s.filter(k).length > 0;
110
91
  }
111
- function P() {
112
- return a.filter(Q);
92
+ function N() {
93
+ return s.filter(x);
113
94
  }
114
- function M(t) {
115
- return P().filter((n) => n.fn === t.fn);
95
+ function R(t) {
96
+ return N().filter((n) => n.fn === t.fn);
116
97
  }
117
- function y(t) {
118
- return t ? t.parallel === 1 / 0 || M(t).length < t.parallel : !1;
98
+ function A(t) {
99
+ return t ? t.parallel === 1 / 0 || R(t).length < t.parallel : !1;
119
100
  }
120
101
  function l() {
121
- queueMicrotask(W);
102
+ queueMicrotask(F);
122
103
  }
123
- function W() {
124
- if (!F()) {
125
- k && g(), f("idle");
104
+ function F() {
105
+ if (!w()) {
106
+ p?.(s), f("idle");
126
107
  return;
127
108
  }
128
- k && g();
129
- const t = N();
109
+ p?.(s);
110
+ const t = V();
130
111
  for (const n of t) {
131
- if (!b(n, e.QUEUED)) {
132
- if (b(n, e.HALTED)) {
133
- const o = A(n);
134
- if (!o || !y(o))
112
+ if (!E(n, e.QUEUED)) {
113
+ if (E(n, e.HALTED)) {
114
+ const o = d(n);
115
+ if (!o || !A(o))
135
116
  continue;
136
- G(o);
117
+ I(o);
137
118
  }
138
119
  continue;
139
120
  }
140
- const r = A(n);
141
- y(r) && G(r);
121
+ const r = d(n);
122
+ A(r) && I(r);
142
123
  }
143
124
  }
144
- async function G(t) {
125
+ async function I(t) {
145
126
  const { group: n, fn: r, params: o } = t;
146
127
  t.state = e.ACTIVE;
147
128
  try {
148
- const s = U(o) ? o() : o, u = await r(...s, {
129
+ const a = D(o) ? o() : o, u = await r(...a, {
149
130
  abortController: t.abortController
150
131
  });
151
- d(t), u === !1 && I(n, e.HALTED, { ignoreOptional: !0 });
152
- } catch (s) {
153
- t.state = e.FAILED, f("error", s), I(n, e.HALTED);
132
+ m(t), u === !1 && b(n, e.HALTED, { ignoreOptional: !0 });
133
+ } catch (a) {
134
+ t.state = e.FAILED, f("error", a), b(n, e.HALTED);
154
135
  }
155
- V(n) || f("complete", n), l();
136
+ H(n) || f("complete", n), l();
156
137
  }
157
- function S(t) {
138
+ function y(t) {
158
139
  t.abortController.signal.aborted || t.abortController.abort();
159
140
  }
160
- function _(t, n, r) {
161
- const { parallel: o = 1 / 0, order: s = 0, params: u = [], isOptional: D = !1 } = r ?? {};
162
- !B(t, n) || L(t, n) || (H({
141
+ function P(t, n, r) {
142
+ const { parallel: o = 1 / 0, order: a = 0, params: u = [], isOptional: W = !1 } = r ?? {};
143
+ !C(t, n) || Q(t, n) || (v({
163
144
  group: t,
164
145
  fn: n,
165
146
  params: u,
166
- order: s,
147
+ order: a,
167
148
  parallel: o,
168
- isOptional: D,
149
+ isOptional: W,
169
150
  state: e.QUEUED,
170
151
  abortController: new AbortController()
171
152
  }), l());
172
153
  }
173
- function $(t, n) {
174
- const r = w(t, n);
175
- r && (S(r), d(r), l());
154
+ function M(t, n) {
155
+ const r = O(t, n);
156
+ r && (y(r), m(r), l());
176
157
  }
177
- function h(t) {
158
+ function G(t) {
178
159
  if (!t) {
179
- for (const n of R())
180
- h(n);
160
+ for (const n of q())
161
+ G(n);
181
162
  return;
182
163
  }
183
- q(t), O(t), f("abort", t), f("complete", t), l();
164
+ L(t), B(t), f("abort", t), f("complete", t), l();
184
165
  }
185
166
  return {
186
- on: C,
187
- pushTask: _,
188
- abortTask: $,
189
- abortTasks: h
167
+ on: U,
168
+ pushTask: P,
169
+ abortTask: M,
170
+ abortTasks: G
190
171
  };
191
172
  }
192
173
  export {
193
- tt as createTaskScheduler
174
+ Y as createTaskScheduler
194
175
  };
package/esm/dev/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * FilePond v5.0.0-beta.20
2
+ * FilePond v5.0.0-beta.21
3
3
  * Copyright (c) 2017-2026 Pqina B.V.
4
4
  * Released under the MIT License
5
5
  * https://filepond.com
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * FilePond v5.0.0-beta.20
2
+ * FilePond v5.0.0-beta.21
3
3
  * Copyright (c) 2017-2026 Pqina B.V.
4
4
  * Released under the MIT License
5
5
  * https://filepond.com