filepond 5.0.0-beta.2 → 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 (368) hide show
  1. package/README.md +27 -4
  2. package/cdn/assets/index.js +1 -1
  3. package/cdn/dev/index.js +1 -0
  4. package/cdn/extensions/blob-loader.js +1 -1
  5. package/cdn/extensions/canvas-loader.js +1 -1
  6. package/cdn/extensions/chunked-upload-store.js +1 -1
  7. package/cdn/extensions/clipboard-source.js +1 -1
  8. package/cdn/extensions/console-view.js +1 -1
  9. package/cdn/extensions/data-transfer-loader.js +1 -1
  10. package/cdn/extensions/data-url-store.js +1 -1
  11. package/cdn/extensions/drag-drop-source.js +1 -1
  12. package/cdn/extensions/dropbox-source.js +1 -1
  13. package/cdn/extensions/entry-list-view.js +1 -1
  14. package/cdn/extensions/file-extension-validator.js +1 -1
  15. package/cdn/extensions/file-input-source.js +1 -1
  16. package/cdn/extensions/file-input-store.js +1 -1
  17. package/cdn/extensions/file-mime-type-validator.js +1 -1
  18. package/cdn/extensions/file-name-transform.js +1 -1
  19. package/cdn/extensions/file-name-validator.js +1 -1
  20. package/cdn/extensions/file-size-validator.js +1 -1
  21. package/cdn/extensions/form-post-store.js +1 -1
  22. package/cdn/extensions/image-bitmap-transform.js +1 -0
  23. package/cdn/extensions/index.js +1 -1
  24. package/cdn/extensions/list-count-validator.js +1 -1
  25. package/cdn/extensions/list-size-validator.js +1 -1
  26. package/cdn/extensions/media-resolution-validator.js +1 -1
  27. package/cdn/extensions/object-url-store.js +1 -1
  28. package/cdn/extensions/simulated-loader.js +1 -1
  29. package/cdn/extensions/simulated-store.js +1 -1
  30. package/cdn/extensions/text-input-store.js +1 -1
  31. package/cdn/extensions/url-loader.js +1 -1
  32. package/cdn/extensions/value-callback-store.js +1 -1
  33. package/cdn/index.js +1 -7
  34. package/cdn/locales/ar-ar.js +72 -48
  35. package/cdn/locales/bn-bd.js +72 -48
  36. package/cdn/locales/cs-cz.js +83 -59
  37. package/cdn/locales/da-dk.js +74 -50
  38. package/cdn/locales/de-de.js +72 -42
  39. package/cdn/locales/el-gr.js +72 -48
  40. package/cdn/locales/en-gb.js +85 -62
  41. package/cdn/locales/es-es.js +69 -39
  42. package/cdn/locales/fi-fi.js +69 -45
  43. package/cdn/locales/fr-fr.js +78 -48
  44. package/cdn/locales/hi-in.js +72 -42
  45. package/cdn/locales/hu-hu.js +66 -42
  46. package/cdn/locales/index.js +1 -1
  47. package/cdn/locales/is-is.js +71 -47
  48. package/cdn/locales/it-it.js +73 -43
  49. package/cdn/locales/ja-jp.js +72 -42
  50. package/cdn/locales/ko-kr.js +72 -42
  51. package/cdn/locales/nb-no.js +74 -44
  52. package/cdn/locales/nl-nl.js +71 -48
  53. package/cdn/locales/pl-pl.js +76 -52
  54. package/cdn/locales/pt-pt.js +71 -41
  55. package/cdn/locales/sv-se.js +73 -43
  56. package/cdn/locales/tr-tr.js +83 -59
  57. package/cdn/locales/uk-ua.js +72 -48
  58. package/cdn/locales/vi-vn.js +82 -58
  59. package/cdn/locales/zh-cn.js +72 -42
  60. package/cdn/main.js +7 -0
  61. package/cdn/templates/entry.js +1 -1
  62. package/cdn/templates/helpers.js +1 -1
  63. package/cdn/templates/index.js +1 -1
  64. package/cdn/templates/media.js +1 -1
  65. package/cdn/workers/httpRequest.js +45 -0
  66. package/cdn/workers/httpRequestWorker.js +37 -0
  67. package/cdn/workers/readFile.js +14 -0
  68. package/cdn/workers/readFileWorker.js +6 -0
  69. package/cdn/workers/transformImage.js +16 -0
  70. package/cdn/workers/transformImageWorker.js +8 -0
  71. package/esm/assets/index.js +1 -1
  72. package/esm/common/console.js +1 -1
  73. package/esm/common/entry.js +1 -1
  74. package/esm/common/perceivedPerformanceProxy.js +1 -1
  75. package/esm/common/readEntriesFromDataTransfer.js +1 -1
  76. package/esm/common/ssr.js +1 -1
  77. package/esm/common/status.js +1 -1
  78. package/esm/core/entryTree.js +142 -133
  79. package/esm/core/extensionManager.js +89 -86
  80. package/esm/core/taskScheduler.js +78 -97
  81. package/esm/dev/index.js +122 -0
  82. package/esm/elements/FilePondDefault/index.css.js +2 -2
  83. package/esm/elements/FilePondDefault/index.js +164 -125
  84. package/esm/elements/FilePondDropArea/index.css.js +1 -1
  85. package/esm/elements/FilePondDropArea/index.js +1 -1
  86. package/esm/elements/FilePondDropArea/index.svelte.js +38 -40
  87. package/esm/elements/FilePondDropIndicator/index.css.js +1 -1
  88. package/esm/elements/FilePondDropIndicator/index.js +1 -1
  89. package/esm/elements/FilePondDropIndicator/index.svelte.js +65 -67
  90. package/esm/elements/FilePondEntryList/components/Entry/index.css.js +2 -2
  91. package/esm/elements/FilePondEntryList/components/Entry/index.js +1 -1
  92. package/esm/elements/FilePondEntryList/components/Entry/index.svelte.js +37 -37
  93. package/esm/elements/FilePondEntryList/components/EntryActivityIndicator/index.css.js +2 -2
  94. package/esm/elements/FilePondEntryList/components/EntryActivityIndicator/index.js +1 -2
  95. package/esm/elements/FilePondEntryList/components/EntryActivityIndicator/index.svelte.js +115 -86
  96. package/esm/elements/FilePondEntryList/components/EntryList/index.css.js +1 -1
  97. package/esm/elements/FilePondEntryList/components/EntryList/index.js +1 -1
  98. package/esm/elements/FilePondEntryList/components/EntryList/index.svelte.js +159 -154
  99. package/esm/elements/FilePondEntryList/components/EntryListItem/index.css.js +1 -1
  100. package/esm/elements/FilePondEntryList/components/EntryListItem/index.js +1 -2
  101. package/esm/elements/FilePondEntryList/components/EntryListItem/index.svelte.js +70 -46
  102. package/esm/elements/FilePondEntryList/components/EntryListItemPlaceholder/index.svelte.js +1 -1
  103. package/esm/elements/FilePondEntryList/components/EntryStatus/index.css.js +1 -1
  104. package/esm/elements/FilePondEntryList/components/EntryStatus/index.js +1 -2
  105. package/esm/elements/FilePondEntryList/components/EntryStatus/index.svelte.js +62 -62
  106. package/esm/elements/FilePondEntryList/components/MediaImage/components/BitmapRenderer.svelte.js +65 -60
  107. package/esm/elements/FilePondEntryList/components/MediaImage/components/BitmapRendererCache.js +1 -1
  108. package/esm/elements/FilePondEntryList/components/MediaImage/index.css.js +1 -1
  109. package/esm/elements/FilePondEntryList/components/MediaImage/index.js +2 -1
  110. package/esm/elements/FilePondEntryList/components/MediaImage/index.svelte.js +91 -83
  111. package/esm/elements/FilePondEntryList/components/MediaPane/index.css.js +2 -2
  112. package/esm/elements/FilePondEntryList/components/MediaPane/index.js +1 -1
  113. package/esm/elements/FilePondEntryList/components/MediaPane/index.svelte.js +33 -35
  114. package/esm/elements/FilePondEntryList/components/MediaTimeIndicator/index.css.js +1 -1
  115. package/esm/elements/FilePondEntryList/components/MediaTimeIndicator/index.js +1 -1
  116. package/esm/elements/FilePondEntryList/components/MediaTimeIndicator/index.svelte.js +1 -1
  117. package/esm/elements/FilePondEntryList/components/MediaVideo/index.css.js +1 -1
  118. package/esm/elements/FilePondEntryList/components/MediaVideo/index.js +1 -1
  119. package/esm/elements/FilePondEntryList/components/MediaVideo/index.svelte.js +88 -88
  120. package/esm/elements/FilePondEntryList/contexts/appContext.js +1 -1
  121. package/esm/elements/FilePondEntryList/contexts/dragContext.js +1 -1
  122. package/esm/elements/FilePondEntryList/contexts/dropContext.js +1 -1
  123. package/esm/elements/FilePondEntryList/contexts/entryContext.js +1 -1
  124. package/esm/elements/FilePondEntryList/contexts/springElementTreeContext.js +1 -1
  125. package/esm/elements/FilePondEntryList/index.css.js +2 -2
  126. package/esm/elements/FilePondEntryList/index.js +11 -14
  127. package/esm/elements/FilePondEntryList/index.svelte.js +351 -271
  128. package/esm/elements/FilePondInput/index.css.js +3 -3
  129. package/esm/elements/FilePondInput/index.js +252 -191
  130. package/esm/elements/FilePondSvelteComponent/index.svelte.js +11 -11
  131. package/esm/elements/attachments/dragarea.js +62 -63
  132. package/esm/elements/attachments/droparea.js +1 -1
  133. package/esm/elements/attachments/measurable.js +1 -1
  134. package/esm/elements/attachments/resizable.js +1 -1
  135. package/esm/elements/attachments/transitions.js +1 -1
  136. package/esm/elements/common/animationGuard.js +1 -1
  137. package/esm/elements/common/animationPreference.svelte.js +35 -41
  138. package/esm/elements/common/dragDrop.js +1 -1
  139. package/esm/elements/common/event.js +1 -1
  140. package/esm/elements/common/extendStyles.js +1 -1
  141. package/esm/elements/common/getClosestElement.js +1 -1
  142. package/esm/elements/common/html.js +4 -4
  143. package/esm/elements/common/nodeTree.js +9 -9
  144. package/esm/elements/common/store.svelte.js +1 -1
  145. package/esm/elements/common/string.js +75 -55
  146. package/esm/elements/common/transition.js +1 -1
  147. package/esm/elements/components/BooleanInput/index.css.js +1 -1
  148. package/esm/elements/components/BooleanInput/index.js +1 -1
  149. package/esm/elements/components/BooleanInput/index.svelte.js +31 -33
  150. package/esm/elements/components/Button/index.css.js +2 -2
  151. package/esm/elements/components/Button/index.js +1 -1
  152. package/esm/elements/components/Button/index.svelte.js +49 -49
  153. package/esm/elements/components/ElementPane/index.css.js +1 -1
  154. package/esm/elements/components/ElementPane/index.js +1 -1
  155. package/esm/elements/components/ElementPane/index.svelte.js +1 -1
  156. package/esm/elements/components/ElementSkeleton/index.css.js +1 -1
  157. package/esm/elements/components/ElementSkeleton/index.js +1 -1
  158. package/esm/elements/components/ElementSkeleton/index.svelte.js +1 -1
  159. package/esm/elements/components/FilenameInput/index.css.js +2 -2
  160. package/esm/elements/components/FilenameInput/index.js +1 -1
  161. package/esm/elements/components/FilenameInput/index.svelte.js +1 -1
  162. package/esm/elements/components/NodeList/index.svelte.js +174 -200
  163. package/esm/elements/components/ProgressIndicator/index.css.js +2 -2
  164. package/esm/elements/components/ProgressIndicator/index.js +1 -1
  165. package/esm/elements/components/ProgressIndicator/index.svelte.js +98 -124
  166. package/esm/elements/components/RangeInput/index.css.js +2 -2
  167. package/esm/elements/components/RangeInput/index.js +1 -1
  168. package/esm/elements/components/RangeInput/index.svelte.js +86 -85
  169. package/esm/elements/components/SpringElement/index.svelte.js +91 -90
  170. package/esm/elements/components/TextInput/index.css.js +1 -1
  171. package/esm/elements/components/TextInput/index.js +1 -1
  172. package/esm/elements/components/TextInput/index.svelte.js +25 -27
  173. package/esm/extensions/blob-loader.js +1 -1
  174. package/esm/extensions/canvas-loader.js +1 -1
  175. package/esm/extensions/chunked-upload-store.js +1 -1
  176. package/esm/extensions/clipboard-source.js +1 -1
  177. package/esm/extensions/common/createExtension.js +38 -37
  178. package/esm/extensions/common/createStoreExtension.js +1 -1
  179. package/esm/extensions/common/createTransformExtension.js +1 -1
  180. package/esm/extensions/common/createValidatorExtension.js +1 -1
  181. package/esm/extensions/console-view.js +36 -33
  182. package/esm/extensions/data-transfer-loader.js +1 -1
  183. package/esm/extensions/data-url-store.js +24 -19
  184. package/esm/extensions/drag-drop-source.js +1 -1
  185. package/esm/extensions/dropbox-source.js +1 -1
  186. package/esm/extensions/entry-list-view.js +35 -29
  187. package/esm/extensions/file-extension-validator.js +1 -1
  188. package/esm/extensions/file-input-source.js +1 -1
  189. package/esm/extensions/file-input-store.js +1 -1
  190. package/esm/extensions/file-mime-type-validator.js +21 -17
  191. package/esm/extensions/file-name-transform.js +1 -1
  192. package/esm/extensions/file-name-validator.js +1 -1
  193. package/esm/extensions/file-size-validator.js +33 -22
  194. package/esm/extensions/form-post-store.js +1 -1
  195. package/esm/extensions/image-bitmap-transform.js +109 -0
  196. package/esm/extensions/index.js +23 -21
  197. package/esm/extensions/list-count-validator.js +21 -21
  198. package/esm/extensions/list-size-validator.js +42 -31
  199. package/esm/extensions/media-resolution-validator.js +57 -47
  200. package/esm/extensions/object-url-store.js +1 -1
  201. package/esm/extensions/simulated-loader.js +74 -65
  202. package/esm/extensions/simulated-store.js +1 -1
  203. package/esm/extensions/text-input-store.js +1 -1
  204. package/esm/extensions/url-loader.js +74 -71
  205. package/esm/extensions/value-callback-store.js +1 -1
  206. package/esm/index.js +1 -1
  207. package/esm/locales/ar-ar.js +72 -48
  208. package/esm/locales/bn-bd.js +72 -48
  209. package/esm/locales/cs-cz.js +83 -59
  210. package/esm/locales/da-dk.js +74 -50
  211. package/esm/locales/de-de.js +72 -42
  212. package/esm/locales/el-gr.js +72 -48
  213. package/esm/locales/en-gb.js +85 -62
  214. package/esm/locales/es-es.js +69 -39
  215. package/esm/locales/fi-fi.js +69 -45
  216. package/esm/locales/fr-fr.js +78 -48
  217. package/esm/locales/hi-in.js +72 -42
  218. package/esm/locales/hu-hu.js +66 -42
  219. package/esm/locales/index.js +1 -1
  220. package/esm/locales/is-is.js +71 -47
  221. package/esm/locales/it-it.js +73 -43
  222. package/esm/locales/ja-jp.js +72 -42
  223. package/esm/locales/ko-kr.js +72 -42
  224. package/esm/locales/nb-no.js +74 -44
  225. package/esm/locales/nl-nl.js +71 -48
  226. package/esm/locales/pl-pl.js +76 -52
  227. package/esm/locales/pt-pt.js +71 -41
  228. package/esm/locales/sv-se.js +73 -43
  229. package/esm/locales/tr-tr.js +83 -59
  230. package/esm/locales/uk-ua.js +72 -48
  231. package/esm/locales/vi-vn.js +82 -58
  232. package/esm/locales/zh-cn.js +72 -42
  233. package/esm/svelte/svelte/src/constants.js +13 -12
  234. package/esm/svelte/svelte/src/internal/client/constants.js +29 -24
  235. package/esm/svelte/svelte/src/internal/client/context.js +33 -28
  236. package/esm/svelte/svelte/src/internal/client/dom/blocks/boundary.js +185 -126
  237. package/esm/svelte/svelte/src/internal/client/dom/blocks/branches.js +42 -43
  238. package/esm/svelte/svelte/src/internal/client/dom/blocks/each.js +175 -150
  239. package/esm/svelte/svelte/src/internal/client/dom/blocks/html.js +55 -32
  240. package/esm/svelte/svelte/src/internal/client/dom/blocks/if.js +12 -12
  241. package/esm/svelte/svelte/src/internal/client/dom/blocks/svelte-element.js +17 -17
  242. package/esm/svelte/svelte/src/internal/client/dom/elements/attributes.js +111 -113
  243. package/esm/svelte/svelte/src/internal/client/dom/elements/bindings/this.js +29 -16
  244. package/esm/svelte/svelte/src/internal/client/dom/elements/events.js +65 -60
  245. package/esm/svelte/svelte/src/internal/client/dom/elements/transitions.js +54 -54
  246. package/esm/svelte/svelte/src/internal/client/dom/operations.js +30 -22
  247. package/esm/svelte/svelte/src/internal/client/dom/reconciler.js +19 -4
  248. package/esm/svelte/svelte/src/internal/client/error-handling.js +17 -17
  249. package/esm/svelte/svelte/src/internal/client/errors.js +24 -20
  250. package/esm/svelte/svelte/src/internal/client/proxy.js +1 -1
  251. package/esm/svelte/svelte/src/internal/client/reactivity/async.js +60 -40
  252. package/esm/svelte/svelte/src/internal/client/reactivity/batch.js +273 -236
  253. package/esm/svelte/svelte/src/internal/client/reactivity/deriveds.js +110 -84
  254. package/esm/svelte/svelte/src/internal/client/reactivity/effects.js +160 -157
  255. package/esm/svelte/svelte/src/internal/client/reactivity/props.js +2 -1
  256. package/esm/svelte/svelte/src/internal/client/reactivity/sources.js +69 -70
  257. package/esm/svelte/svelte/src/internal/client/reactivity/status.js +12 -0
  258. package/esm/svelte/svelte/src/internal/client/reactivity/utils.js +16 -0
  259. package/esm/svelte/svelte/src/internal/client/render.js +68 -64
  260. package/esm/svelte/svelte/src/internal/client/runtime.js +174 -170
  261. package/esm/svelte/svelte/src/internal/shared/attributes.js +32 -32
  262. package/esm/svelte/svelte/src/internal/shared/utils.js +16 -15
  263. package/esm/svelte/svelte/src/motion/spring.js +7 -7
  264. package/esm/svelte/svelte/src/reactivity/map.js +17 -21
  265. package/esm/templates/entry.js +194 -159
  266. package/esm/templates/helpers.js +85 -75
  267. package/esm/templates/index.js +1 -1
  268. package/esm/templates/media.js +163 -131
  269. package/esm/utils/array.js +1 -1
  270. package/esm/utils/bounds.js +1 -1
  271. package/esm/utils/cache.js +1 -1
  272. package/esm/utils/canvasToBlob.js +1 -1
  273. package/esm/utils/date.js +1 -1
  274. package/esm/utils/debounce.js +1 -1
  275. package/esm/utils/dom.js +84 -74
  276. package/esm/utils/file.js +82 -69
  277. package/esm/utils/functionToBlob.js +1 -1
  278. package/esm/utils/keyboard.js +34 -0
  279. package/esm/utils/math.js +14 -7
  280. package/esm/utils/media.js +1 -1
  281. package/esm/utils/number.js +11 -16
  282. package/esm/utils/object.js +1 -1
  283. package/esm/utils/objectURL.js +1 -1
  284. package/esm/utils/placeholder.js +1 -1
  285. package/esm/utils/poly.js +1 -1
  286. package/esm/utils/pubsub.js +1 -1
  287. package/esm/utils/rect.js +39 -30
  288. package/esm/utils/size.js +1 -1
  289. package/esm/utils/sleep.js +1 -1
  290. package/esm/utils/string.js +25 -21
  291. package/esm/utils/support.js +5 -6
  292. package/esm/utils/test.js +1 -1
  293. package/esm/utils/thread.js +50 -43
  294. package/esm/utils/tree.js +1 -1
  295. package/esm/utils/url.js +2 -2
  296. package/esm/utils/vector.js +1 -1
  297. package/esm/utils/window.js +1 -1
  298. package/esm/utils/xhr.js +88 -113
  299. package/esm/workers/httpRequest.js +45 -0
  300. package/esm/workers/httpRequestWorker.js +37 -0
  301. package/esm/workers/readFile.js +14 -0
  302. package/esm/workers/readFileWorker.js +6 -0
  303. package/esm/workers/transformImage.js +16 -0
  304. package/esm/workers/transformImageWorker.js +8 -0
  305. package/package.json +17 -12
  306. package/types/core/entryTree.d.ts +6 -2
  307. package/types/core/extensionManager.d.ts +16 -2
  308. package/types/core/taskScheduler.d.ts +2 -2
  309. package/types/dev/index.d.ts +11 -3
  310. package/types/elements/FilePondDefault/index.d.ts +15 -5
  311. package/types/elements/FilePondEntryList/components/MediaImage/index.d.ts +1 -1
  312. package/types/elements/FilePondEntryList/components/MediaVideo/index.d.ts +1 -1
  313. package/types/elements/FilePondEntryList/contexts/appContext.d.ts +1 -0
  314. package/types/elements/FilePondEntryList/contexts/entryContext.d.ts +1 -0
  315. package/types/elements/FilePondEntryList/index.d.ts +10 -11
  316. package/types/elements/FilePondInput/index.d.ts +22 -11
  317. package/types/elements/common/animationPreference.svelte.d.ts +6 -3
  318. package/types/elements/common/nodeTree.d.ts +1 -1
  319. package/types/elements/common/string.d.ts +1 -1
  320. package/types/extensions/common/createTransformExtension.d.ts +1 -1
  321. package/types/extensions/data-url-store.d.ts +2 -0
  322. package/types/extensions/file-name-transform.d.ts +1 -1
  323. package/types/extensions/file-size-validator.d.ts +2 -0
  324. package/types/extensions/image-bitmap-transform.d.ts +32 -0
  325. package/types/extensions/index.d.ts +1 -0
  326. package/types/extensions/list-size-validator.d.ts +2 -0
  327. package/types/extensions/simulated-loader.d.ts +2 -0
  328. package/types/extensions/simulated-store.d.ts +1 -1
  329. package/types/extensions/url-loader.d.ts +2 -0
  330. package/types/locales/ar-ar.d.ts +101 -76
  331. package/types/locales/bn-bd.d.ts +101 -76
  332. package/types/locales/cs-cz.d.ts +101 -76
  333. package/types/locales/da-dk.d.ts +101 -76
  334. package/types/locales/de-de.d.ts +101 -76
  335. package/types/locales/el-gr.d.ts +101 -76
  336. package/types/locales/en-gb.d.ts +102 -82
  337. package/types/locales/es-es.d.ts +101 -76
  338. package/types/locales/fi-fi.d.ts +101 -76
  339. package/types/locales/fr-fr.d.ts +101 -76
  340. package/types/locales/hi-in.d.ts +101 -76
  341. package/types/locales/hu-hu.d.ts +101 -76
  342. package/types/locales/is-is.d.ts +101 -76
  343. package/types/locales/it-it.d.ts +101 -76
  344. package/types/locales/ja-jp.d.ts +101 -76
  345. package/types/locales/ko-kr.d.ts +101 -76
  346. package/types/locales/nb-no.d.ts +101 -76
  347. package/types/locales/nl-nl.d.ts +101 -76
  348. package/types/locales/pl-pl.d.ts +101 -76
  349. package/types/locales/pt-pt.d.ts +101 -76
  350. package/types/locales/sv-se.d.ts +101 -76
  351. package/types/locales/tr-tr.d.ts +101 -76
  352. package/types/locales/uk-ua.d.ts +101 -76
  353. package/types/locales/vi-vn.d.ts +101 -76
  354. package/types/locales/zh-cn.d.ts +101 -76
  355. package/types/templates/entry.d.ts +15 -16
  356. package/types/templates/helpers.d.ts +5 -1
  357. package/types/templates/media.d.ts +43 -6
  358. package/types/types/index.d.ts +9 -15
  359. package/types/utils/file.d.ts +7 -15
  360. package/types/utils/keyboard.d.ts +5 -0
  361. package/types/utils/rect.d.ts +5 -0
  362. package/types/utils/string.d.ts +1 -0
  363. package/types/utils/thread.d.ts +6 -0
  364. package/types/utils/xhr.d.ts +1 -0
  365. package/types/workers/httpRequest.d.ts +23 -0
  366. package/types/workers/readFile.d.ts +9 -0
  367. package/types/workers/transformImage.d.ts +6 -0
  368. package/types/elements/FilePondEntryList/components/EntryContext/index.d.ts +0 -1
@@ -1,46 +1,55 @@
1
- import { EFFECT_TRANSPARENT as y, EFFECT_PRESERVED as b, BOUNDARY_EFFECT as E } from "../../constants.js";
2
- import { set_component_context as p, component_context as F } from "../../context.js";
3
- import { handle_error as x, invoke_error_boundary as d } from "../../error-handling.js";
4
- import { block as R, branch as r, pause_effect as f, move_effect as T, destroy_effect as l } from "../../reactivity/effects.js";
5
- import { active_effect as c, set_active_effect as m, set_active_reaction as h, active_reaction as g, get as k } from "../../runtime.js";
6
- import { svelte_boundary_reset_noop as w } from "../../warnings.js";
1
+ import { BOUNDARY_EFFECT as m, EFFECT_TRANSPARENT as E, EFFECT_PRESERVED as F } from "../../constants.js";
2
+ import { set_component_context as g, component_context as x } from "../../context.js";
3
+ import { handle_error as R, invoke_error_boundary as a } from "../../error-handling.js";
4
+ import { block as S, branch as h, pause_effect as _, move_effect as T, destroy_effect as u } from "../../reactivity/effects.js";
5
+ import { active_effect as c, set_active_effect as v, set_active_reaction as y, active_reaction as w, get as D } from "../../runtime.js";
6
+ import { svelte_boundary_reset_noop as k } from "../../warnings.js";
7
7
  import { create_text as A } from "../operations.js";
8
- import { queue_micro_task as B } from "../task.js";
9
- import { svelte_boundary_reset_onerror as C } from "../../errors.js";
10
- import { Batch as o } from "../../reactivity/batch.js";
11
- import { internal_set as D, source as N } from "../../reactivity/sources.js";
12
- import { createSubscriber as S } from "../../../../reactivity/create-subscriber.js";
13
- var q = y | b | E;
14
- function M(u, t, i) {
15
- new P(u, t, i);
8
+ import { queue_micro_task as l } from "../task.js";
9
+ import { svelte_boundary_reset_onerror as B } from "../../errors.js";
10
+ import { current_batch as b, Batch as C } from "../../reactivity/batch.js";
11
+ import { internal_set as N, source as q } from "../../reactivity/sources.js";
12
+ import { createSubscriber as P } from "../../../../reactivity/create-subscriber.js";
13
+ import { defer_effect as j } from "../../reactivity/utils.js";
14
+ var O = E | F;
15
+ function Z(p, t, e, r) {
16
+ new U(p, t, e, r);
16
17
  }
17
- class P {
18
+ class U {
18
19
  /** @type {Boundary | null} */
19
20
  parent;
20
- #i = !1;
21
+ is_pending = !1;
22
+ /**
23
+ * API-level transformError transform function. Transforms errors before they reach the `failed` snippet.
24
+ * Inherited from parent boundary, or defaults to identity.
25
+ * @type {(error: unknown) => unknown}
26
+ */
27
+ transform_error;
21
28
  /** @type {TemplateNode} */
22
- #e;
29
+ #r;
23
30
  /** @type {TemplateNode | null} */
24
31
  #y = null;
25
32
  /** @type {BoundaryProps} */
26
- #r;
33
+ #s;
27
34
  /** @type {((anchor: Node) => void)} */
28
- #c;
35
+ #a;
29
36
  /** @type {Effect} */
30
- #n;
37
+ #t;
31
38
  /** @type {Effect | null} */
32
- #s = null;
39
+ #n = null;
33
40
  /** @type {Effect | null} */
34
- #t = null;
41
+ #e = null;
35
42
  /** @type {Effect | null} */
36
- #h = null;
43
+ #i = null;
37
44
  /** @type {DocumentFragment | null} */
38
- #o = null;
39
- /** @type {TemplateNode | null} */
40
- #a = null;
41
- #u = 0;
45
+ #h = null;
46
+ #c = 0;
42
47
  #f = 0;
43
48
  #_ = !1;
49
+ /** @type {Set<Effect>} */
50
+ #p = /* @__PURE__ */ new Set();
51
+ /** @type {Set<Effect>} */
52
+ #d = /* @__PURE__ */ new Set();
44
53
  /**
45
54
  * A source containing the number of pending async deriveds/expressions.
46
55
  * Only created if `$effect.pending()` is used inside the boundary,
@@ -48,171 +57,221 @@ class P {
48
57
  * calls followed by no-op flushes
49
58
  * @type {Source<number> | null}
50
59
  */
51
- #l = null;
52
- #v = S(() => (this.#l = N(this.#u), () => {
53
- this.#l = null;
60
+ #o = null;
61
+ #v = P(() => (this.#o = q(this.#c), () => {
62
+ this.#o = null;
54
63
  }));
55
64
  /**
56
65
  * @param {TemplateNode} node
57
66
  * @param {BoundaryProps} props
58
67
  * @param {((anchor: Node) => void)} children
68
+ * @param {((error: unknown) => unknown) | undefined} [transform_error]
59
69
  */
60
- constructor(t, i, e) {
61
- this.#e = t, this.#r = i, this.#c = e, this.parent = /** @type {Effect} */
62
- c.b, this.#i = !!this.#r.pending, this.#n = R(() => {
63
- c.b = this;
64
- {
65
- var n = this.#m();
66
- try {
67
- this.#s = r(() => e(n));
68
- } catch (s) {
69
- this.error(s);
70
- }
71
- this.#f > 0 ? this.#d() : this.#i = !1;
72
- }
73
- return () => {
74
- this.#a?.remove();
75
- };
76
- }, q);
70
+ constructor(t, e, r, o) {
71
+ this.#r = t, this.#s = e, this.#a = (s) => {
72
+ var f = (
73
+ /** @type {Effect} */
74
+ c
75
+ );
76
+ f.b = this, f.f |= m, r(s);
77
+ }, this.parent = /** @type {Effect} */
78
+ c.b, this.transform_error = o ?? this.parent?.transform_error ?? ((s) => s), this.#t = S(() => {
79
+ this.#m();
80
+ }, O);
77
81
  }
78
82
  #b() {
79
83
  try {
80
- this.#s = r(() => this.#c(this.#e));
84
+ this.#n = h(() => this.#a(this.#r));
81
85
  } catch (t) {
82
86
  this.error(t);
83
87
  }
84
- this.#i = !1;
85
88
  }
86
- #E() {
87
- const t = this.#r.pending;
88
- t && (this.#t = r(() => t(this.#e)), o.enqueue(() => {
89
- var i = this.#m();
90
- this.#s = this.#p(() => (o.ensure(), r(() => this.#c(i)))), this.#f > 0 ? this.#d() : (f(
89
+ /**
90
+ * @param {unknown} error The deserialized error from the server's hydration comment
91
+ */
92
+ #E(t) {
93
+ const e = this.#s.failed;
94
+ e && (this.#i = h(() => {
95
+ e(
96
+ this.#r,
97
+ () => t,
98
+ () => () => {
99
+ }
100
+ );
101
+ }));
102
+ }
103
+ #F() {
104
+ const t = this.#s.pending;
105
+ t && (this.is_pending = !0, this.#e = h(() => t(this.#r)), l(() => {
106
+ var e = this.#h = document.createDocumentFragment(), r = A();
107
+ e.append(r), this.#n = this.#l(() => h(() => this.#a(r))), this.#f === 0 && (this.#r.before(e), this.#h = null, _(
91
108
  /** @type {Effect} */
92
- this.#t,
109
+ this.#e,
93
110
  () => {
94
- this.#t = null;
111
+ this.#e = null;
95
112
  }
96
- ), this.#i = !1);
113
+ ), this.#u(
114
+ /** @type {Batch} */
115
+ b
116
+ ));
97
117
  }));
98
118
  }
99
119
  #m() {
100
- var t = this.#e;
101
- return this.#i && (this.#a = A(), this.#e.before(this.#a), t = this.#a), t;
120
+ try {
121
+ if (this.is_pending = this.has_pending_snippet(), this.#f = 0, this.#c = 0, this.#n = h(() => {
122
+ this.#a(this.#r);
123
+ }), this.#f > 0) {
124
+ var t = this.#h = document.createDocumentFragment();
125
+ T(this.#n, t);
126
+ const e = (
127
+ /** @type {(anchor: Node) => void} */
128
+ this.#s.pending
129
+ );
130
+ this.#e = h(() => e(this.#r));
131
+ } else
132
+ this.#u(
133
+ /** @type {Batch} */
134
+ b
135
+ );
136
+ } catch (e) {
137
+ this.error(e);
138
+ }
102
139
  }
103
140
  /**
104
- * Returns `true` if the effect exists inside a boundary whose pending snippet is shown
141
+ * @param {Batch} batch
142
+ */
143
+ #u(t) {
144
+ this.is_pending = !1, t.transfer_effects(this.#p, this.#d);
145
+ }
146
+ /**
147
+ * Defer an effect inside a pending boundary until the boundary resolves
148
+ * @param {Effect} effect
149
+ */
150
+ defer_effect(t) {
151
+ j(t, this.#p, this.#d);
152
+ }
153
+ /**
154
+ * Returns `false` if the effect exists inside a boundary whose pending snippet is shown
105
155
  * @returns {boolean}
106
156
  */
107
- is_pending() {
108
- return this.#i || !!this.parent && this.parent.is_pending();
157
+ is_rendered() {
158
+ return !this.is_pending && (!this.parent || this.parent.is_rendered());
109
159
  }
110
160
  has_pending_snippet() {
111
- return !!this.#r.pending;
161
+ return !!this.#s.pending;
112
162
  }
113
163
  /**
114
- * @param {() => Effect | null} fn
164
+ * @template T
165
+ * @param {() => T} fn
115
166
  */
116
- #p(t) {
117
- var i = c, e = g, n = F;
118
- m(this.#n), h(this.#n), p(this.#n.ctx);
167
+ #l(t) {
168
+ var e = c, r = w, o = x;
169
+ v(this.#t), y(this.#t), g(this.#t.ctx);
119
170
  try {
120
- return t();
171
+ return C.ensure(), t();
121
172
  } catch (s) {
122
- return x(s), null;
173
+ return R(s), null;
123
174
  } finally {
124
- m(i), h(e), p(n);
175
+ v(e), y(r), g(o);
125
176
  }
126
177
  }
127
- #d() {
128
- const t = (
129
- /** @type {(anchor: Node) => void} */
130
- this.#r.pending
131
- );
132
- this.#s !== null && (this.#o = document.createDocumentFragment(), this.#o.append(
133
- /** @type {TemplateNode} */
134
- this.#a
135
- ), T(this.#s, this.#o)), this.#t === null && (this.#t = r(() => t(this.#e)));
136
- }
137
178
  /**
138
179
  * Updates the pending count associated with the currently visible pending snippet,
139
180
  * if any, such that we can replace the snippet with content once work is done
140
181
  * @param {1 | -1} d
182
+ * @param {Batch} batch
141
183
  */
142
- #g(t) {
184
+ #g(t, e) {
143
185
  if (!this.has_pending_snippet()) {
144
- this.parent && this.parent.#g(t);
186
+ this.parent && this.parent.#g(t, e);
145
187
  return;
146
188
  }
147
- this.#f += t, this.#f === 0 && (this.#i = !1, this.#t && f(this.#t, () => {
148
- this.#t = null;
149
- }), this.#o && (this.#e.before(this.#o), this.#o = null));
189
+ this.#f += t, this.#f === 0 && (this.#u(e), this.#e && _(this.#e, () => {
190
+ this.#e = null;
191
+ }), this.#h && (this.#r.before(this.#h), this.#h = null));
150
192
  }
151
193
  /**
152
194
  * Update the source that powers `$effect.pending()` inside this boundary,
153
195
  * and controls when the current `pending` snippet (if any) is removed.
154
196
  * Do not call from inside the class
155
197
  * @param {1 | -1} d
198
+ * @param {Batch} batch
156
199
  */
157
- update_pending_count(t) {
158
- this.#g(t), this.#u += t, this.#l && D(this.#l, this.#u);
200
+ update_pending_count(t, e) {
201
+ this.#g(t, e), this.#c += t, !(!this.#o || this.#_) && (this.#_ = !0, l(() => {
202
+ this.#_ = !1, this.#o && N(this.#o, this.#c);
203
+ }));
159
204
  }
160
205
  get_effect_pending() {
161
- return this.#v(), k(
206
+ return this.#v(), D(
162
207
  /** @type {Source<number>} */
163
- this.#l
208
+ this.#o
164
209
  );
165
210
  }
166
211
  /** @param {unknown} error */
167
212
  error(t) {
168
- var i = this.#r.onerror;
169
- let e = this.#r.failed;
170
- if (this.#_ || !i && !e)
213
+ var e = this.#s.onerror;
214
+ let r = this.#s.failed;
215
+ if (!e && !r)
171
216
  throw t;
172
- this.#s && (l(this.#s), this.#s = null), this.#t && (l(this.#t), this.#t = null), this.#h && (l(this.#h), this.#h = null);
173
- var n = !1, s = !1;
174
- const _ = () => {
175
- if (n) {
176
- w();
217
+ this.#n && (u(this.#n), this.#n = null), this.#e && (u(this.#e), this.#e = null), this.#i && (u(this.#i), this.#i = null);
218
+ var o = !1, s = !1;
219
+ const f = () => {
220
+ if (o) {
221
+ k();
177
222
  return;
178
223
  }
179
- n = !0, s && C(), o.ensure(), this.#u = 0, this.#h !== null && f(this.#h, () => {
180
- this.#h = null;
181
- }), this.#i = this.has_pending_snippet(), this.#s = this.#p(() => (this.#_ = !1, r(() => this.#c(this.#e)))), this.#f > 0 ? this.#d() : this.#i = !1;
182
- };
183
- var v = g;
184
- try {
185
- h(null), s = !0, i?.(t, _), s = !1;
186
- } catch (a) {
187
- d(a, this.#n && this.#n.parent);
188
- } finally {
189
- h(v);
190
- }
191
- e && B(() => {
192
- this.#h = this.#p(() => {
193
- o.ensure(), this.#_ = !0;
224
+ o = !0, s && B(), this.#i !== null && _(this.#i, () => {
225
+ this.#i = null;
226
+ }), this.#l(() => {
227
+ this.#m();
228
+ });
229
+ }, d = (n) => {
230
+ try {
231
+ s = !0, e?.(n, f), s = !1;
232
+ } catch (i) {
233
+ a(i, this.#t && this.#t.parent);
234
+ }
235
+ r && (this.#i = this.#l(() => {
194
236
  try {
195
- return r(() => {
196
- e(
197
- this.#e,
198
- () => t,
199
- () => _
237
+ return h(() => {
238
+ var i = (
239
+ /** @type {Effect} */
240
+ c
241
+ );
242
+ i.b = this, i.f |= m, r(
243
+ this.#r,
244
+ () => n,
245
+ () => f
200
246
  );
201
247
  });
202
- } catch (a) {
203
- return d(
204
- a,
248
+ } catch (i) {
249
+ return a(
250
+ i,
205
251
  /** @type {Effect} */
206
- this.#n.parent
252
+ this.#t.parent
207
253
  ), null;
208
- } finally {
209
- this.#_ = !1;
210
254
  }
211
- });
255
+ }));
256
+ };
257
+ l(() => {
258
+ var n;
259
+ try {
260
+ n = this.transform_error(t);
261
+ } catch (i) {
262
+ a(i, this.#t && this.#t.parent);
263
+ return;
264
+ }
265
+ n !== null && typeof n == "object" && typeof /** @type {any} */
266
+ n.then == "function" ? n.then(
267
+ d,
268
+ /** @param {unknown} e */
269
+ (i) => a(i, this.#t && this.#t.parent)
270
+ ) : d(n);
212
271
  });
213
272
  }
214
273
  }
215
274
  export {
216
- P as Boundary,
217
- M as boundary
275
+ U as Boundary,
276
+ Z as boundary
218
277
  };
@@ -1,6 +1,6 @@
1
- import { current_batch as n } from "../../reactivity/batch.js";
2
- import { resume_effect as p, destroy_effect as a, pause_effect as m, branch as d, move_effect as u } from "../../reactivity/effects.js";
3
- import { create_text as l, should_defer_append as v } from "../operations.js";
1
+ import { current_batch as l } from "../../reactivity/batch.js";
2
+ import { resume_effect as u, destroy_effect as n, pause_effect as m, branch as a, move_effect as p } from "../../reactivity/effects.js";
3
+ import { create_text as d, should_defer_append as _ } from "../operations.js";
4
4
  class w {
5
5
  /** @type {TemplateNode} */
6
6
  anchor;
@@ -41,84 +41,83 @@ class w {
41
41
  * @param {TemplateNode} anchor
42
42
  * @param {boolean} transition
43
43
  */
44
- constructor(e, s = !0) {
45
- this.anchor = e, this.#f = s;
44
+ constructor(t, s = !0) {
45
+ this.anchor = t, this.#f = s;
46
46
  }
47
- #r = () => {
48
- var e = (
49
- /** @type {Batch} */
50
- n
51
- );
52
- if (this.#t.has(e)) {
47
+ /**
48
+ * @param {Batch} batch
49
+ */
50
+ #r = (t) => {
51
+ if (this.#t.has(t)) {
53
52
  var s = (
54
53
  /** @type {Key} */
55
- this.#t.get(e)
56
- ), t = this.#s.get(s);
57
- if (t)
58
- p(t), this.#i.delete(s);
54
+ this.#t.get(t)
55
+ ), e = this.#s.get(s);
56
+ if (e)
57
+ u(e), this.#i.delete(s);
59
58
  else {
60
59
  var f = this.#e.get(s);
61
- f && (this.#s.set(s, f.effect), this.#e.delete(s), f.fragment.lastChild.remove(), this.anchor.before(f.fragment), t = f.effect);
60
+ f && (this.#s.set(s, f.effect), this.#e.delete(s), f.fragment.lastChild.remove(), this.anchor.before(f.fragment), e = f.effect);
62
61
  }
63
62
  for (const [i, r] of this.#t) {
64
- if (this.#t.delete(i), i === e)
63
+ if (this.#t.delete(i), i === t)
65
64
  break;
66
65
  const c = this.#e.get(r);
67
- c && (a(c.effect), this.#e.delete(r));
66
+ c && (n(c.effect), this.#e.delete(r));
68
67
  }
69
68
  for (const [i, r] of this.#s) {
70
69
  if (i === s || this.#i.has(i)) continue;
71
70
  const c = () => {
72
71
  if (Array.from(this.#t.values()).includes(i)) {
73
- var o = document.createDocumentFragment();
74
- u(r, o), o.append(l()), this.#e.set(i, { effect: r, fragment: o });
72
+ var h = document.createDocumentFragment();
73
+ p(r, h), h.append(d()), this.#e.set(i, { effect: r, fragment: h });
75
74
  } else
76
- a(r);
75
+ n(r);
77
76
  this.#i.delete(i), this.#s.delete(i);
78
77
  };
79
- this.#f || !t ? (this.#i.add(i), m(r, c, !1)) : c();
78
+ this.#f || !e ? (this.#i.add(i), m(r, c, !1)) : c();
80
79
  }
81
80
  }
82
81
  };
83
82
  /**
84
83
  * @param {Batch} batch
85
84
  */
86
- #c = (e) => {
87
- this.#t.delete(e);
85
+ #c = (t) => {
86
+ this.#t.delete(t);
88
87
  const s = Array.from(this.#t.values());
89
- for (const [t, f] of this.#e)
90
- s.includes(t) || (a(f.effect), this.#e.delete(t));
88
+ for (const [e, f] of this.#e)
89
+ s.includes(e) || (n(f.effect), this.#e.delete(e));
91
90
  };
92
91
  /**
93
92
  *
94
93
  * @param {any} key
95
94
  * @param {null | ((target: TemplateNode) => void)} fn
96
95
  */
97
- ensure(e, s) {
98
- var t = (
96
+ ensure(t, s) {
97
+ var e = (
99
98
  /** @type {Batch} */
100
- n
101
- ), f = v();
102
- if (s && !this.#s.has(e) && !this.#e.has(e))
99
+ l
100
+ ), f = _();
101
+ if (s && !this.#s.has(t) && !this.#e.has(t))
103
102
  if (f) {
104
- var i = document.createDocumentFragment(), r = l();
105
- i.append(r), this.#e.set(e, {
106
- effect: d(() => s(r)),
103
+ var i = document.createDocumentFragment(), r = d();
104
+ i.append(r), this.#e.set(t, {
105
+ effect: a(() => s(r)),
107
106
  fragment: i
108
107
  });
109
108
  } else
110
109
  this.#s.set(
111
- e,
112
- d(() => s(this.anchor))
110
+ t,
111
+ a(() => s(this.anchor))
113
112
  );
114
- if (this.#t.set(t, e), f) {
115
- for (const [c, h] of this.#s)
116
- c === e ? t.skipped_effects.delete(h) : t.skipped_effects.add(h);
117
- for (const [c, h] of this.#e)
118
- c === e ? t.skipped_effects.delete(h.effect) : t.skipped_effects.add(h.effect);
119
- t.oncommit(this.#r), t.ondiscard(this.#c);
113
+ if (this.#t.set(e, t), f) {
114
+ for (const [c, o] of this.#s)
115
+ c === t ? e.unskip_effect(o) : e.skip_effect(o);
116
+ for (const [c, o] of this.#e)
117
+ c === t ? e.unskip_effect(o.effect) : e.skip_effect(o.effect);
118
+ e.oncommit(this.#r), e.ondiscard(this.#c);
120
119
  } else
121
- this.#r();
120
+ this.#r(e);
122
121
  }
123
122
  }
124
123
  export {