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.
- package/cdn/assets/index.js +1 -1
- package/cdn/locales/ar-ar.js +1 -1
- package/cdn/locales/bn-bd.js +1 -1
- package/cdn/locales/cs-cz.js +1 -1
- package/cdn/locales/da-dk.js +1 -1
- package/cdn/locales/de-de.js +1 -1
- package/cdn/locales/el-gr.js +1 -1
- package/cdn/locales/en-gb.js +1 -1
- package/cdn/locales/es-es.js +1 -1
- package/cdn/locales/fi-fi.js +1 -1
- package/cdn/locales/fr-fr.js +1 -1
- package/cdn/locales/hi-in.js +1 -1
- package/cdn/locales/hu-hu.js +1 -1
- package/cdn/locales/index.js +1 -1
- package/cdn/locales/is-is.js +1 -1
- package/cdn/locales/it-it.js +1 -1
- package/cdn/locales/ja-jp.js +1 -1
- package/cdn/locales/ko-kr.js +1 -1
- package/cdn/locales/nb-no.js +1 -1
- package/cdn/locales/nl-nl.js +1 -1
- package/cdn/locales/pl-pl.js +1 -1
- package/cdn/locales/pt-pt.js +1 -1
- package/cdn/locales/sv-se.js +1 -1
- package/cdn/locales/tr-tr.js +1 -1
- package/cdn/locales/uk-ua.js +1 -1
- package/cdn/locales/vi-vn.js +1 -1
- package/cdn/locales/zh-cn.js +1 -1
- package/cdn/main.js +2 -2
- package/cdn/workers/httpRequest.js +45 -0
- package/cdn/workers/httpRequestWorker.js +37 -0
- package/cdn/workers/readFile.js +14 -0
- package/cdn/workers/readFileWorker.js +6 -0
- package/cdn/workers/transformImage.js +16 -0
- package/cdn/workers/transformImageWorker.js +8 -0
- package/esm/assets/index.js +1 -1
- package/esm/common/console.js +1 -1
- package/esm/common/entry.js +1 -1
- package/esm/common/perceivedPerformanceProxy.js +1 -1
- package/esm/common/readEntriesFromDataTransfer.js +1 -1
- package/esm/common/ssr.js +1 -1
- package/esm/common/status.js +1 -1
- package/esm/core/entryTree.js +1 -1
- package/esm/core/extensionManager.js +28 -28
- package/esm/core/taskScheduler.js +78 -97
- package/esm/dev/index.js +1 -1
- package/esm/elements/FilePondDefault/index.css.js +1 -1
- package/esm/elements/FilePondDefault/index.js +46 -45
- package/esm/elements/FilePondDropArea/index.css.js +1 -1
- package/esm/elements/FilePondDropArea/index.js +1 -1
- package/esm/elements/FilePondDropArea/index.svelte.js +1 -1
- package/esm/elements/FilePondDropIndicator/index.css.js +1 -1
- package/esm/elements/FilePondDropIndicator/index.js +1 -1
- package/esm/elements/FilePondDropIndicator/index.svelte.js +1 -1
- package/esm/elements/FilePondEntryList/components/Entry/index.css.js +1 -1
- package/esm/elements/FilePondEntryList/components/Entry/index.js +1 -1
- package/esm/elements/FilePondEntryList/components/Entry/index.svelte.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryActivityIndicator/index.css.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryActivityIndicator/index.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryActivityIndicator/index.svelte.js +80 -80
- package/esm/elements/FilePondEntryList/components/EntryList/index.css.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryList/index.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryList/index.svelte.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryListItem/index.css.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryListItem/index.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryListItem/index.svelte.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryListItemPlaceholder/index.svelte.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryStatus/index.css.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryStatus/index.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryStatus/index.svelte.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaImage/components/BitmapRenderer.svelte.js +65 -60
- package/esm/elements/FilePondEntryList/components/MediaImage/components/BitmapRendererCache.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaImage/index.css.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaImage/index.js +2 -1
- package/esm/elements/FilePondEntryList/components/MediaImage/index.svelte.js +70 -70
- package/esm/elements/FilePondEntryList/components/MediaPane/index.css.js +2 -2
- package/esm/elements/FilePondEntryList/components/MediaPane/index.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaPane/index.svelte.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaTimeIndicator/index.css.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaTimeIndicator/index.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaTimeIndicator/index.svelte.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaVideo/index.css.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaVideo/index.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaVideo/index.svelte.js +1 -1
- package/esm/elements/FilePondEntryList/contexts/appContext.js +1 -1
- package/esm/elements/FilePondEntryList/contexts/dragContext.js +1 -1
- package/esm/elements/FilePondEntryList/contexts/dropContext.js +1 -1
- package/esm/elements/FilePondEntryList/contexts/entryContext.js +1 -1
- package/esm/elements/FilePondEntryList/contexts/springElementTreeContext.js +1 -1
- package/esm/elements/FilePondEntryList/index.css.js +1 -1
- package/esm/elements/FilePondEntryList/index.js +2 -1
- package/esm/elements/FilePondEntryList/index.svelte.js +166 -166
- package/esm/elements/FilePondInput/index.css.js +1 -1
- package/esm/elements/FilePondInput/index.js +15 -11
- package/esm/elements/FilePondSvelteComponent/index.svelte.js +1 -1
- package/esm/elements/attachments/dragarea.js +1 -1
- package/esm/elements/attachments/droparea.js +1 -1
- package/esm/elements/attachments/measurable.js +1 -1
- package/esm/elements/attachments/resizable.js +1 -1
- package/esm/elements/attachments/transitions.js +1 -1
- package/esm/elements/common/animationGuard.js +1 -1
- package/esm/elements/common/animationPreference.svelte.js +1 -1
- package/esm/elements/common/dragDrop.js +1 -1
- package/esm/elements/common/event.js +1 -1
- package/esm/elements/common/extendStyles.js +1 -1
- package/esm/elements/common/getClosestElement.js +1 -1
- package/esm/elements/common/html.js +1 -1
- package/esm/elements/common/nodeTree.js +9 -9
- package/esm/elements/common/store.svelte.js +1 -1
- package/esm/elements/common/string.js +1 -1
- package/esm/elements/common/transition.js +1 -1
- package/esm/elements/components/BooleanInput/index.css.js +1 -1
- package/esm/elements/components/BooleanInput/index.js +1 -1
- package/esm/elements/components/BooleanInput/index.svelte.js +1 -1
- package/esm/elements/components/Button/index.css.js +1 -1
- package/esm/elements/components/Button/index.js +1 -1
- package/esm/elements/components/Button/index.svelte.js +1 -1
- package/esm/elements/components/ElementPane/index.css.js +1 -1
- package/esm/elements/components/ElementPane/index.js +1 -1
- package/esm/elements/components/ElementPane/index.svelte.js +1 -1
- package/esm/elements/components/ElementSkeleton/index.css.js +1 -1
- package/esm/elements/components/ElementSkeleton/index.js +1 -1
- package/esm/elements/components/ElementSkeleton/index.svelte.js +1 -1
- package/esm/elements/components/FilenameInput/index.css.js +1 -1
- package/esm/elements/components/FilenameInput/index.js +1 -1
- package/esm/elements/components/FilenameInput/index.svelte.js +1 -1
- package/esm/elements/components/NodeList/index.svelte.js +1 -1
- package/esm/elements/components/ProgressIndicator/index.css.js +2 -2
- package/esm/elements/components/ProgressIndicator/index.js +1 -1
- package/esm/elements/components/ProgressIndicator/index.svelte.js +70 -70
- package/esm/elements/components/RangeInput/index.css.js +1 -1
- package/esm/elements/components/RangeInput/index.js +1 -1
- package/esm/elements/components/RangeInput/index.svelte.js +1 -1
- package/esm/elements/components/SpringElement/index.svelte.js +1 -1
- package/esm/elements/components/TextInput/index.css.js +1 -1
- package/esm/elements/components/TextInput/index.js +1 -1
- package/esm/elements/components/TextInput/index.svelte.js +1 -1
- package/esm/extensions/blob-loader.js +1 -1
- package/esm/extensions/canvas-loader.js +1 -1
- package/esm/extensions/chunked-upload-store.js +1 -1
- package/esm/extensions/clipboard-source.js +1 -1
- package/esm/extensions/common/createExtension.js +1 -1
- package/esm/extensions/common/createStoreExtension.js +1 -1
- package/esm/extensions/common/createTransformExtension.js +1 -1
- package/esm/extensions/common/createValidatorExtension.js +1 -1
- package/esm/extensions/console-view.js +1 -1
- package/esm/extensions/data-transfer-loader.js +1 -1
- package/esm/extensions/data-url-store.js +24 -19
- package/esm/extensions/drag-drop-source.js +1 -1
- package/esm/extensions/dropbox-source.js +1 -1
- package/esm/extensions/entry-list-view.js +1 -1
- package/esm/extensions/file-extension-validator.js +1 -1
- package/esm/extensions/file-input-source.js +1 -1
- package/esm/extensions/file-input-store.js +1 -1
- package/esm/extensions/file-mime-type-validator.js +1 -1
- package/esm/extensions/file-name-transform.js +1 -1
- package/esm/extensions/file-name-validator.js +1 -1
- package/esm/extensions/file-size-validator.js +1 -1
- package/esm/extensions/form-post-store.js +1 -1
- package/esm/extensions/image-bitmap-transform.js +56 -54
- package/esm/extensions/index.js +1 -1
- package/esm/extensions/list-count-validator.js +1 -1
- package/esm/extensions/list-size-validator.js +1 -1
- package/esm/extensions/media-resolution-validator.js +1 -1
- package/esm/extensions/object-url-store.js +1 -1
- package/esm/extensions/simulated-loader.js +74 -65
- package/esm/extensions/simulated-store.js +1 -1
- package/esm/extensions/text-input-store.js +1 -1
- package/esm/extensions/url-loader.js +74 -71
- package/esm/extensions/value-callback-store.js +1 -1
- package/esm/index.js +1 -1
- package/esm/locales/ar-ar.js +1 -1
- package/esm/locales/bn-bd.js +1 -1
- package/esm/locales/cs-cz.js +1 -1
- package/esm/locales/da-dk.js +1 -1
- package/esm/locales/de-de.js +1 -1
- package/esm/locales/el-gr.js +1 -1
- package/esm/locales/en-gb.js +1 -1
- package/esm/locales/es-es.js +1 -1
- package/esm/locales/fi-fi.js +1 -1
- package/esm/locales/fr-fr.js +1 -1
- package/esm/locales/hi-in.js +1 -1
- package/esm/locales/hu-hu.js +1 -1
- package/esm/locales/index.js +1 -1
- package/esm/locales/is-is.js +1 -1
- package/esm/locales/it-it.js +1 -1
- package/esm/locales/ja-jp.js +1 -1
- package/esm/locales/ko-kr.js +1 -1
- package/esm/locales/nb-no.js +1 -1
- package/esm/locales/nl-nl.js +1 -1
- package/esm/locales/pl-pl.js +1 -1
- package/esm/locales/pt-pt.js +1 -1
- package/esm/locales/sv-se.js +1 -1
- package/esm/locales/tr-tr.js +1 -1
- package/esm/locales/uk-ua.js +1 -1
- package/esm/locales/vi-vn.js +1 -1
- package/esm/locales/zh-cn.js +1 -1
- package/esm/templates/entry.js +2 -2
- package/esm/templates/helpers.js +1 -1
- package/esm/templates/index.js +1 -1
- package/esm/templates/media.js +119 -111
- package/esm/utils/array.js +1 -1
- package/esm/utils/bounds.js +1 -1
- package/esm/utils/cache.js +1 -1
- package/esm/utils/canvasToBlob.js +1 -1
- package/esm/utils/date.js +1 -1
- package/esm/utils/debounce.js +1 -1
- package/esm/utils/dom.js +1 -1
- package/esm/utils/file.js +1 -1
- package/esm/utils/functionToBlob.js +1 -1
- package/esm/utils/keyboard.js +1 -1
- package/esm/utils/math.js +1 -1
- package/esm/utils/media.js +1 -1
- package/esm/utils/number.js +1 -1
- package/esm/utils/object.js +1 -1
- package/esm/utils/objectURL.js +1 -1
- package/esm/utils/placeholder.js +1 -1
- package/esm/utils/poly.js +1 -1
- package/esm/utils/pubsub.js +1 -1
- package/esm/utils/rect.js +1 -1
- package/esm/utils/size.js +1 -1
- package/esm/utils/sleep.js +1 -1
- package/esm/utils/string.js +1 -1
- package/esm/utils/support.js +1 -1
- package/esm/utils/test.js +1 -1
- package/esm/utils/thread.js +47 -42
- package/esm/utils/tree.js +1 -1
- package/esm/utils/url.js +1 -1
- package/esm/utils/vector.js +1 -1
- package/esm/utils/window.js +1 -1
- package/esm/utils/xhr.js +88 -113
- package/esm/workers/httpRequest.js +45 -0
- package/esm/workers/httpRequestWorker.js +37 -0
- package/esm/workers/readFile.js +14 -0
- package/esm/workers/readFileWorker.js +6 -0
- package/esm/workers/transformImage.js +16 -0
- package/esm/workers/transformImageWorker.js +8 -0
- package/package.json +5 -1
- package/types/core/taskScheduler.d.ts +2 -2
- package/types/elements/FilePondDefault/index.d.ts +2 -0
- package/types/elements/FilePondInput/index.d.ts +2 -0
- package/types/elements/common/nodeTree.d.ts +1 -1
- package/types/extensions/data-url-store.d.ts +2 -0
- package/types/extensions/image-bitmap-transform.d.ts +2 -0
- package/types/extensions/simulated-loader.d.ts +2 -0
- package/types/extensions/url-loader.d.ts +2 -0
- package/types/templates/media.d.ts +14 -0
- package/types/types/index.d.ts +5 -11
- package/types/utils/thread.d.ts +6 -0
- package/types/utils/xhr.d.ts +1 -0
- package/types/workers/httpRequest.d.ts +23 -0
- package/types/workers/readFile.d.ts +9 -0
- package/types/workers/transformImage.d.ts +6 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* FilePond v5.0.0-beta.
|
|
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
|
|
@@ -14,7 +14,7 @@ import { ValueCallbackStore as C } from "../../extensions/value-callback-store.j
|
|
|
14
14
|
import { FileExtensionValidator as I } from "../../extensions/file-extension-validator.js";
|
|
15
15
|
import { FileMimeTypeValidator as k } from "../../extensions/file-mime-type-validator.js";
|
|
16
16
|
import { EntryListView as F } from "../../extensions/entry-list-view.js";
|
|
17
|
-
import { hasDefinedTag as O, defineCustomElements as v, defineCustomElement as _, setBooleanAttribute as
|
|
17
|
+
import { hasDefinedTag as O, defineCustomElements as v, defineCustomElement as _, setBooleanAttribute as l, h as c, addListener as d, dispatchCustomEvent as b } from "../../utils/dom.js";
|
|
18
18
|
import { isArray as y, isString as g } from "../../utils/test.js";
|
|
19
19
|
import { assets as V } from "../../assets/index.js";
|
|
20
20
|
import j from "./index.css.js";
|
|
@@ -22,13 +22,13 @@ import { createFilePondEntryList as T } from "../../templates/entry.js";
|
|
|
22
22
|
import { toCamelParts as B } from "../../utils/string.js";
|
|
23
23
|
import { arrayInsertAtIndex as R } from "../../utils/array.js";
|
|
24
24
|
import { warn as N } from "../../common/console.js";
|
|
25
|
-
function f(
|
|
26
|
-
return (y(
|
|
25
|
+
function f(o) {
|
|
26
|
+
return (y(o) ? o[0] : o).name;
|
|
27
27
|
}
|
|
28
|
-
function $(
|
|
29
|
-
return y(
|
|
28
|
+
function $(o) {
|
|
29
|
+
return y(o) ? o[2] : void 0;
|
|
30
30
|
}
|
|
31
|
-
function M(
|
|
31
|
+
function M(o = []) {
|
|
32
32
|
const t = { name: "Transform" };
|
|
33
33
|
let e = [
|
|
34
34
|
P,
|
|
@@ -37,19 +37,19 @@ function M(n = []) {
|
|
|
37
37
|
k,
|
|
38
38
|
// the default extension set doesn't have a Transform extension, so we create a slot so we can auto insert transform extensions there, the slot is removed when we return the extension set
|
|
39
39
|
t,
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
F,
|
|
41
|
+
C
|
|
42
42
|
];
|
|
43
|
-
for (const r of
|
|
44
|
-
let i = f(r),
|
|
45
|
-
if (
|
|
46
|
-
e[
|
|
43
|
+
for (const r of o) {
|
|
44
|
+
let i = f(r), n = e.findIndex((u) => f(u) === i);
|
|
45
|
+
if (n > -1) {
|
|
46
|
+
e[n] = r;
|
|
47
47
|
continue;
|
|
48
48
|
}
|
|
49
|
-
let
|
|
50
|
-
if (
|
|
51
|
-
(u) => f(u).endsWith(
|
|
52
|
-
),
|
|
49
|
+
let p, s = 1, a = $(r);
|
|
50
|
+
if (a ? (s = a.before ? 0 : 1, p = a.before || a.after) : p = B(i).pop(), n = e.findLastIndex(
|
|
51
|
+
(u) => f(u).endsWith(p)
|
|
52
|
+
), n === -1) {
|
|
53
53
|
N(
|
|
54
54
|
`No valid insertion index found for extension "${i}", make sure its name ends with an extension types: "Source", "Loader", "Validator", "Transform", or "Store".`
|
|
55
55
|
);
|
|
@@ -57,7 +57,7 @@ function M(n = []) {
|
|
|
57
57
|
}
|
|
58
58
|
e = R(
|
|
59
59
|
e,
|
|
60
|
-
|
|
60
|
+
n + s,
|
|
61
61
|
r
|
|
62
62
|
);
|
|
63
63
|
}
|
|
@@ -104,7 +104,7 @@ class K extends A {
|
|
|
104
104
|
}
|
|
105
105
|
/** Set to `true` to remove drop area */
|
|
106
106
|
set noDrop(t) {
|
|
107
|
-
|
|
107
|
+
l(this, "nodrop", t), t ? (this.#t.dropArea.remove(), this.#t.dropIndicator.remove(), Object.assign(this, {
|
|
108
108
|
EntryListView: {
|
|
109
109
|
drop: !1
|
|
110
110
|
}
|
|
@@ -120,7 +120,7 @@ class K extends A {
|
|
|
120
120
|
}
|
|
121
121
|
/** Set to `true` to remove the attribution link */
|
|
122
122
|
set noAttribution(t) {
|
|
123
|
-
t ? (
|
|
123
|
+
t ? (l(this, "noattribution", !0), this.#e.remove()) : (l(this, "noattribution", !1), this._root.append(this.#e));
|
|
124
124
|
}
|
|
125
125
|
/** Returns current noattribution state */
|
|
126
126
|
get noAttribution() {
|
|
@@ -143,12 +143,13 @@ class K extends A {
|
|
|
143
143
|
dropIndicator: r
|
|
144
144
|
};
|
|
145
145
|
const i = /* @__PURE__ */ new Set(["dragging", "virtualized", "selected", "checked"]);
|
|
146
|
-
function s
|
|
147
|
-
if (!
|
|
146
|
+
function n(s) {
|
|
147
|
+
if (!s || i.has(s))
|
|
148
148
|
return;
|
|
149
|
-
const
|
|
150
|
-
t.setAttribute("exportparts",
|
|
149
|
+
const a = Array.from(i.add(s)).join(",");
|
|
150
|
+
t.setAttribute("exportparts", a.replace(/ /g, ","));
|
|
151
151
|
}
|
|
152
|
+
const p = m?.EntryListView?.template || T();
|
|
152
153
|
Object.assign(this, {
|
|
153
154
|
// add items view
|
|
154
155
|
extensions: this.extensions,
|
|
@@ -165,18 +166,18 @@ class K extends A {
|
|
|
165
166
|
// assets to use
|
|
166
167
|
assets: V,
|
|
167
168
|
// the nodes to render
|
|
168
|
-
template:
|
|
169
|
+
template: p,
|
|
169
170
|
// called before rendering a node, allows dynamically modifying a node or adding nodes
|
|
170
|
-
beforeRenderNode(
|
|
171
|
-
return s
|
|
171
|
+
beforeRenderNode(s) {
|
|
172
|
+
return n(s.props?.part || s.attrs?.part), s;
|
|
172
173
|
},
|
|
173
174
|
// animations
|
|
174
175
|
entryAnimationProps: L(),
|
|
175
176
|
entryAnimationOriginMap: x(),
|
|
176
177
|
springDefaults: h()
|
|
177
178
|
}
|
|
178
|
-
}), this.springDefaults = h(), q.forEach((
|
|
179
|
-
this[
|
|
179
|
+
}), this.springDefaults = h(), q.forEach((s) => {
|
|
180
|
+
this[s] = t[s];
|
|
180
181
|
}), this.#e = z({
|
|
181
182
|
caption: "Powered by FilePond"
|
|
182
183
|
}), Object.assign(this, m);
|
|
@@ -186,33 +187,33 @@ class K extends A {
|
|
|
186
187
|
const { dropArea: t, dropIndicator: e, entryList: r } = this.#t;
|
|
187
188
|
this.hasAttribute("nodrop") || this._root.prepend(t, e), this._root.append(r), this.hasAttribute("noattribution") || this._root.append(this.#e), this.#r.push(
|
|
188
189
|
// route clicks on drop area to browse button
|
|
189
|
-
|
|
190
|
+
d(t, "click", () => {
|
|
190
191
|
this.browse();
|
|
191
192
|
}),
|
|
192
193
|
// did compute target rect
|
|
193
|
-
|
|
194
|
+
d(t, "computerect", (i) => {
|
|
194
195
|
if (!i.detail)
|
|
195
196
|
return;
|
|
196
|
-
const
|
|
197
|
-
b(this, "computerect", { detail:
|
|
197
|
+
const n = i.detail;
|
|
198
|
+
b(this, "computerect", { detail: n });
|
|
198
199
|
}),
|
|
199
200
|
// did update visual rect
|
|
200
|
-
|
|
201
|
+
d(t, "updaterect", (i) => {
|
|
201
202
|
if (!i.detail)
|
|
202
203
|
return;
|
|
203
|
-
const
|
|
204
|
-
this._root.style.setProperty("--width",
|
|
204
|
+
const n = i.detail;
|
|
205
|
+
this._root.style.setProperty("--width", n.width), this._root.style.setProperty("--height", n.height), b(this, "updaterect", { detail: n });
|
|
205
206
|
}),
|
|
206
207
|
// link up placeholder position with drop indicator
|
|
207
|
-
|
|
208
|
+
d(r, "updateplaceholder", (i) => {
|
|
208
209
|
e.indicatorRect = i.detail;
|
|
209
210
|
}),
|
|
210
211
|
// these two listeners toggle the dragging attribute to the file-pond element, we do this so we can move the file-pond element that is being interacted with to the front, so the dragged item also renders on top. Additionally they prevent interaction with slot content and attribution link while dragging
|
|
211
|
-
|
|
212
|
-
|
|
212
|
+
d(r, "dragentrystart", () => {
|
|
213
|
+
l(this, "dragging", !0), this._slot.inert = !0, this.#e.inert = !0;
|
|
213
214
|
}),
|
|
214
|
-
|
|
215
|
-
|
|
215
|
+
d(r, "dragentryend", () => {
|
|
216
|
+
l(this, "dragging", !1), this._slot.inert = !1, this.#e.inert = !1;
|
|
216
217
|
})
|
|
217
218
|
);
|
|
218
219
|
}
|
|
@@ -221,8 +222,8 @@ class K extends A {
|
|
|
221
222
|
super.disconnectedCallback(), Object.values(this.#t).forEach((t) => t.remove()), this.#e.remove(), this.#r.forEach((t) => t()), this.#r = [];
|
|
222
223
|
}
|
|
223
224
|
}
|
|
224
|
-
function z(
|
|
225
|
-
const { caption: t = "" } =
|
|
225
|
+
function z(o) {
|
|
226
|
+
const { caption: t = "" } = o || {};
|
|
226
227
|
return c("a", {
|
|
227
228
|
textContent: t,
|
|
228
229
|
href: "https://filepond.com",
|
|
@@ -232,9 +233,9 @@ function z(n) {
|
|
|
232
233
|
tabindex: "-1"
|
|
233
234
|
});
|
|
234
235
|
}
|
|
235
|
-
function pt(
|
|
236
|
+
function pt(o) {
|
|
236
237
|
const t = "file-pond";
|
|
237
|
-
return m =
|
|
238
|
+
return m = o, O(t) || (v({
|
|
238
239
|
[`${t}-entry-list`]: E,
|
|
239
240
|
[`${t}-drop-area`]: w,
|
|
240
241
|
[`${t}-drop-indicator`]: D
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* FilePond v5.0.0-beta.
|
|
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
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
import { onMount as W } from "../../../../svelte/svelte/src/index-client.js";
|
|
8
8
|
import { user_effect as _, template_effect as X } from "../../../../svelte/svelte/src/internal/client/reactivity/effects.js";
|
|
9
9
|
import { pop as Y, push as Z } from "../../../../svelte/svelte/src/internal/client/context.js";
|
|
10
|
-
import { get as
|
|
10
|
+
import { get as e, untrack as $ } from "../../../../svelte/svelte/src/internal/client/runtime.js";
|
|
11
11
|
import { first_child as tt, sibling as rt, child as et } from "../../../../svelte/svelte/src/internal/client/dom/operations.js";
|
|
12
|
-
import { set as
|
|
12
|
+
import { set as c, state as A } from "../../../../svelte/svelte/src/internal/client/reactivity/sources.js";
|
|
13
13
|
import { from_html as N, append as E } from "../../../../svelte/svelte/src/internal/client/dom/template.js";
|
|
14
14
|
import { user_derived as i } from "../../../../svelte/svelte/src/internal/client/reactivity/deriveds.js";
|
|
15
15
|
import { if_block as I } from "../../../../svelte/svelte/src/internal/client/dom/blocks/if.js";
|
|
@@ -31,14 +31,14 @@ import { addListener as F } from "../../../../utils/dom.js";
|
|
|
31
31
|
import dt from "../../../components/Button/index.svelte.js";
|
|
32
32
|
import gt from "../../../components/ProgressIndicator/index.svelte.js";
|
|
33
33
|
var bt = N("<div><!></div>"), yt = N("<!><!>", 1);
|
|
34
|
-
function zt(O,
|
|
35
|
-
Z(
|
|
36
|
-
let j = d(
|
|
37
|
-
const
|
|
38
|
-
function H(
|
|
39
|
-
if (
|
|
40
|
-
for (const o of
|
|
41
|
-
const s = it(
|
|
34
|
+
function zt(O, l) {
|
|
35
|
+
Z(l, !0);
|
|
36
|
+
let j = d(l, "class", 3, void 0), q = d(l, "part", 3, void 0), g = d(l, "buttonPart", 3, void 0), L = d(l, "states", 19, () => []), p;
|
|
37
|
+
const P = i(lt), R = i(() => e(P).locale), S = i(() => e(P).enableAnimations), V = ct(), D = i(() => Object.values(V.current.extension));
|
|
38
|
+
function H(t, r) {
|
|
39
|
+
if (t.length) {
|
|
40
|
+
for (const o of t) {
|
|
41
|
+
const s = it(r, o.codes);
|
|
42
42
|
if (!s)
|
|
43
43
|
continue;
|
|
44
44
|
const h = o.button, v = o.progress ? { ...o.progress, value: s.progress } : null;
|
|
@@ -47,81 +47,81 @@ function zt(O, c) {
|
|
|
47
47
|
return null;
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
const
|
|
50
|
+
const B = i(() => H(L(), e(D))), K = i(() => e(B)?.progress), M = i(() => T(e(B)?.button)), a = pt(
|
|
51
51
|
// should update value?
|
|
52
|
-
(
|
|
52
|
+
(t, r) => t && r ? !at(t, r) : t !== r,
|
|
53
53
|
// $derived
|
|
54
|
-
() =>
|
|
54
|
+
() => e(M)
|
|
55
55
|
);
|
|
56
|
-
function T(
|
|
57
|
-
if (!
|
|
56
|
+
function T(t) {
|
|
57
|
+
if (!t)
|
|
58
58
|
return;
|
|
59
|
-
const
|
|
60
|
-
return { component: dt, ...
|
|
59
|
+
const r = { part: g(), ...t.props };
|
|
60
|
+
return { component: dt, ...t, props: r };
|
|
61
61
|
}
|
|
62
|
-
function z(
|
|
63
|
-
if (!
|
|
62
|
+
function z(t, r) {
|
|
63
|
+
if (!t)
|
|
64
64
|
return;
|
|
65
|
-
const { label: o } =
|
|
65
|
+
const { label: o } = t;
|
|
66
66
|
return {
|
|
67
|
-
...
|
|
68
|
-
label: ut(o,
|
|
67
|
+
...t,
|
|
68
|
+
label: ut(o, r, r.busy)
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
-
const b = i(() => z(
|
|
71
|
+
const b = i(() => z(e(K), e(R))), y = new st(0);
|
|
72
72
|
_(() => {
|
|
73
|
-
y.set(
|
|
73
|
+
y.set(e(b) ? 1 : 0, { instant: !e(S) });
|
|
74
74
|
});
|
|
75
|
-
let
|
|
75
|
+
let C = A(void 0);
|
|
76
76
|
_(() => {
|
|
77
|
-
|
|
77
|
+
e(b) && c(C, { ...e(b) });
|
|
78
78
|
});
|
|
79
|
-
function G(
|
|
80
|
-
return !
|
|
79
|
+
function G(t) {
|
|
80
|
+
return !e(n).at(-1) ? !1 : e(n).at(-1)?.props.icon !== t.props.icon;
|
|
81
81
|
}
|
|
82
|
-
function J(
|
|
83
|
-
if (!
|
|
82
|
+
function J(t) {
|
|
83
|
+
if (!e(n).length)
|
|
84
84
|
return !1;
|
|
85
|
-
const { props:
|
|
86
|
-
return
|
|
85
|
+
const { props: r } = e(n).at(-1), { props: o } = t;
|
|
86
|
+
return r.icon === o.icon && r.title === o.title && r.label === o.label && r.onclick.toString() === o.onclick.toString();
|
|
87
87
|
}
|
|
88
|
-
let n =
|
|
88
|
+
let n = A([]);
|
|
89
89
|
_(() => {
|
|
90
|
-
if (!(!a.current && !
|
|
90
|
+
if (!(!a.current && !e(n).length)) {
|
|
91
91
|
if (!a.current) {
|
|
92
|
-
|
|
92
|
+
c(n, []);
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
|
-
|
|
95
|
+
$(() => {
|
|
96
96
|
if (J(a.current))
|
|
97
|
-
return
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
...
|
|
97
|
+
return c(n, e(n).map((r) => r.key === a.current.key ? a.current : r));
|
|
98
|
+
const t = G(a.current);
|
|
99
|
+
c(n, e(n).map((r) => ({
|
|
100
|
+
...r,
|
|
101
101
|
props: {
|
|
102
|
-
...
|
|
102
|
+
...r.props,
|
|
103
103
|
inert: !0,
|
|
104
104
|
autofocus: !1,
|
|
105
|
-
dataset: { state:
|
|
105
|
+
dataset: { state: t ? "outro" : "idle" }
|
|
106
106
|
}
|
|
107
|
-
})).filter((
|
|
108
|
-
...
|
|
107
|
+
})).filter((r, o, s) => o > s.length - 2)), c(n, [
|
|
108
|
+
...e(n),
|
|
109
109
|
{
|
|
110
110
|
...a.current,
|
|
111
111
|
props: {
|
|
112
112
|
...a.current.props,
|
|
113
|
-
inert:
|
|
114
|
-
autofocus:
|
|
115
|
-
dataset: { state:
|
|
113
|
+
inert: t,
|
|
114
|
+
autofocus: f,
|
|
115
|
+
dataset: { state: t ? "intro" : "idle" }
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
]),
|
|
119
|
-
|
|
120
|
-
...
|
|
118
|
+
]), t && requestAnimationFrame(() => {
|
|
119
|
+
c(n, e(n).map((r, o, s) => ({
|
|
120
|
+
...r,
|
|
121
121
|
props: {
|
|
122
|
-
...
|
|
122
|
+
...r.props,
|
|
123
123
|
inert: o < s.length - 1,
|
|
124
|
-
autofocus:
|
|
124
|
+
autofocus: f,
|
|
125
125
|
dataset: { state: o < s.length - 1 ? "outro" : "idle" }
|
|
126
126
|
}
|
|
127
127
|
})));
|
|
@@ -129,7 +129,7 @@ function zt(O, c) {
|
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
|
-
const
|
|
132
|
+
const k = i(() => e(n).length ? [
|
|
133
133
|
{
|
|
134
134
|
tag: "element-stack",
|
|
135
135
|
attrs: {
|
|
@@ -137,23 +137,23 @@ function zt(O, c) {
|
|
|
137
137
|
class: "button-pile",
|
|
138
138
|
part: `${g()}-pile`
|
|
139
139
|
},
|
|
140
|
-
children:
|
|
140
|
+
children: e(n)
|
|
141
141
|
}
|
|
142
142
|
] : []);
|
|
143
|
-
let
|
|
143
|
+
let f = !1;
|
|
144
144
|
W(() => {
|
|
145
|
-
if (!
|
|
145
|
+
if (!p)
|
|
146
146
|
return;
|
|
147
|
-
const
|
|
148
|
-
F(
|
|
149
|
-
|
|
147
|
+
const t = [
|
|
148
|
+
F(p, "focusin", () => {
|
|
149
|
+
f = !0;
|
|
150
150
|
}),
|
|
151
|
-
F(
|
|
152
|
-
|
|
151
|
+
F(p, "focusout", () => {
|
|
152
|
+
f = !1;
|
|
153
153
|
})
|
|
154
154
|
];
|
|
155
155
|
return () => {
|
|
156
|
-
|
|
156
|
+
t.forEach((r) => r());
|
|
157
157
|
};
|
|
158
158
|
}), ft(O, {
|
|
159
159
|
tag: "entry-activity-indicator",
|
|
@@ -162,46 +162,46 @@ function zt(O, c) {
|
|
|
162
162
|
},
|
|
163
163
|
subtag: "element-stack",
|
|
164
164
|
subattrs: { layout: "pile" },
|
|
165
|
-
onroot: (
|
|
165
|
+
onroot: (t) => p = t,
|
|
166
166
|
get part() {
|
|
167
167
|
return q();
|
|
168
168
|
},
|
|
169
|
-
children: (
|
|
169
|
+
children: (t, r) => {
|
|
170
170
|
var o = yt(), s = tt(o);
|
|
171
171
|
{
|
|
172
|
-
var h = (
|
|
173
|
-
mt(
|
|
172
|
+
var h = (u) => {
|
|
173
|
+
mt(u, w(
|
|
174
174
|
{
|
|
175
175
|
get nodes() {
|
|
176
|
-
return
|
|
176
|
+
return e(k);
|
|
177
177
|
}
|
|
178
178
|
},
|
|
179
|
-
() =>
|
|
179
|
+
() => l.nodeContext
|
|
180
180
|
));
|
|
181
181
|
};
|
|
182
|
-
I(s, (
|
|
183
|
-
|
|
182
|
+
I(s, (u) => {
|
|
183
|
+
e(k).length && u(h);
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
186
|
var v = rt(s);
|
|
187
187
|
{
|
|
188
|
-
var Q = (
|
|
188
|
+
var Q = (u) => {
|
|
189
189
|
var m = bt();
|
|
190
|
-
let
|
|
190
|
+
let x;
|
|
191
191
|
var U = et(m);
|
|
192
|
-
gt(U, w(() =>
|
|
192
|
+
gt(U, w(() => e(C), {
|
|
193
193
|
get enableAnimations() {
|
|
194
|
-
return
|
|
194
|
+
return e(S);
|
|
195
195
|
}
|
|
196
196
|
})), X(() => {
|
|
197
|
-
ot(m, "part", `${g()}-pile`),
|
|
198
|
-
}), E(
|
|
197
|
+
ot(m, "part", `${g()}-pile`), x = nt(m, "", x, { opacity: y.current });
|
|
198
|
+
}), E(u, m);
|
|
199
199
|
};
|
|
200
|
-
I(v, (
|
|
201
|
-
y.current > 0 &&
|
|
200
|
+
I(v, (u) => {
|
|
201
|
+
y.current > 0 && u(Q);
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
|
-
E(
|
|
204
|
+
E(t, o);
|
|
205
205
|
},
|
|
206
206
|
_$slots: { default: !0 }
|
|
207
207
|
}), Y();
|