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
package/esm/templates/media.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
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
|
|
6
6
|
*/
|
|
7
7
|
import "../elements/FilePondEntryList/components/MediaVideo/index.js";
|
|
8
|
-
import { createEntryMatcher as
|
|
8
|
+
import { createEntryMatcher as F, createButton as c, hasExtensionWithStatusCode as u, createSpringPane as l, whenEntryIs as R, whenEntryNotHasStatus as M, whenEntryHasAction as h, getExtensionByAction as I, hasExtensionWithStatusType as _, hasExtensionWithProp as B } from "./helpers.js";
|
|
9
9
|
import "../elements/components/RangeInput/index.js";
|
|
10
|
-
import { supportsRequestFullscreen as
|
|
11
|
-
import { toTime as
|
|
12
|
-
import { nodeTree as
|
|
13
|
-
import { boolToAttributeValue as
|
|
10
|
+
import { supportsRequestFullscreen as C } from "../utils/support.js";
|
|
11
|
+
import { toTime as U } from "../utils/date.js";
|
|
12
|
+
import { nodeTree as d } from "../elements/common/nodeTree.js";
|
|
13
|
+
import { boolToAttributeValue as E } from "../utils/dom.js";
|
|
14
14
|
import "../elements/FilePondEntryList/components/MediaTimeIndicator/index.js";
|
|
15
15
|
import "../elements/FilePondEntryList/components/EntryActivityIndicator/index.js";
|
|
16
16
|
import "../elements/FilePondEntryList/components/MediaImage/index.js";
|
|
17
|
-
import
|
|
17
|
+
import a from "../elements/components/SpringElement/index.svelte.js";
|
|
18
18
|
import "../elements/components/ElementPane/index.js";
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
function
|
|
19
|
+
import w from "../elements/FilePondEntryList/components/EntryActivityIndicator/index.svelte.js";
|
|
20
|
+
import V from "../elements/FilePondEntryList/components/MediaImage/index.svelte.js";
|
|
21
|
+
import N from "../elements/FilePondEntryList/components/MediaVideo/index.svelte.js";
|
|
22
|
+
import x from "../elements/components/RangeInput/index.svelte.js";
|
|
23
|
+
import L from "../elements/FilePondEntryList/components/MediaTimeIndicator/index.svelte.js";
|
|
24
|
+
import j from "../elements/components/ElementPane/index.svelte.js";
|
|
25
|
+
function T(e) {
|
|
26
26
|
const { action: t = "editMedia" } = e ?? {};
|
|
27
27
|
return {
|
|
28
28
|
key: "button-media-edit",
|
|
29
|
-
component:
|
|
29
|
+
component: w,
|
|
30
30
|
props: ({ id: n, entry: r }, { updateEntryState: o }) => ({
|
|
31
31
|
buttonPart: "media-button",
|
|
32
32
|
states: [
|
|
@@ -38,9 +38,9 @@ function y(e) {
|
|
|
38
38
|
"TRANSFORM_COMPLETE",
|
|
39
39
|
"TRANSFORM_BUSY"
|
|
40
40
|
],
|
|
41
|
-
button:
|
|
41
|
+
button: c("button-transform-activate", {
|
|
42
42
|
icon: "mediaEdit",
|
|
43
|
-
disabled:
|
|
43
|
+
disabled: u(r, [
|
|
44
44
|
"STORE_QUEUED",
|
|
45
45
|
"STORE_BUSY",
|
|
46
46
|
"TRANSFORM_BUSY"
|
|
@@ -51,9 +51,9 @@ function y(e) {
|
|
|
51
51
|
{
|
|
52
52
|
codes: ["TRANSFORM_PREPARE"],
|
|
53
53
|
progress: !0,
|
|
54
|
-
button:
|
|
54
|
+
button: c("button-transform-abort", {
|
|
55
55
|
icon: "abort",
|
|
56
|
-
disabled:
|
|
56
|
+
disabled: u(r, [
|
|
57
57
|
"STORE_QUEUED",
|
|
58
58
|
"STORE_BUSY",
|
|
59
59
|
"TRANSFORM_BUSY"
|
|
@@ -67,17 +67,17 @@ function y(e) {
|
|
|
67
67
|
})
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function O(e) {
|
|
71
71
|
const { action: t = "editMedia" } = e ?? {};
|
|
72
|
-
return
|
|
72
|
+
return c("button-media-reset", {
|
|
73
73
|
props: ({ id: n, entry: r }, { updateEntryState: o }) => ({
|
|
74
74
|
part: "media-button",
|
|
75
|
-
disabled:
|
|
75
|
+
disabled: u(r, [
|
|
76
76
|
"STORE_QUEUED",
|
|
77
77
|
"STORE_BUSY",
|
|
78
78
|
"TRANSFORM_PREPARE",
|
|
79
79
|
"TRANSFORM_BUSY"
|
|
80
|
-
]) || !
|
|
80
|
+
]) || !I(r, t)?.input,
|
|
81
81
|
icon: "mediaReset",
|
|
82
82
|
label: "reset",
|
|
83
83
|
title: "reset",
|
|
@@ -85,10 +85,10 @@ function b(e) {
|
|
|
85
85
|
})
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function v(e) {
|
|
89
89
|
return {
|
|
90
90
|
key: e,
|
|
91
|
-
component:
|
|
91
|
+
component: j,
|
|
92
92
|
spring: ({ visualRect: t }) => ({
|
|
93
93
|
opacity: {
|
|
94
94
|
value: t.height > 0 ? 1 : 0,
|
|
@@ -108,11 +108,11 @@ function f(e) {
|
|
|
108
108
|
})
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function Y(e) {
|
|
112
112
|
const { objectFit: t = void 0 } = e ?? {};
|
|
113
113
|
return {
|
|
114
114
|
key: "entry-image-spring",
|
|
115
|
-
component:
|
|
115
|
+
component: a,
|
|
116
116
|
props: {
|
|
117
117
|
class: "entry-media",
|
|
118
118
|
part: "entry-media"
|
|
@@ -120,16 +120,16 @@ function B(e) {
|
|
|
120
120
|
children: [
|
|
121
121
|
{
|
|
122
122
|
key: "entry-image",
|
|
123
|
-
component:
|
|
123
|
+
component: V,
|
|
124
124
|
props: e
|
|
125
125
|
},
|
|
126
126
|
{
|
|
127
127
|
if: {
|
|
128
128
|
test: () => t === "contain",
|
|
129
|
-
then:
|
|
129
|
+
then: v("entry-image-pane")
|
|
130
130
|
}
|
|
131
131
|
},
|
|
132
|
-
|
|
132
|
+
l({
|
|
133
133
|
key: "entry-image-overlay",
|
|
134
134
|
class: "media-overlay",
|
|
135
135
|
part: "media-overlay"
|
|
@@ -137,18 +137,18 @@ function B(e) {
|
|
|
137
137
|
]
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function S({ entry: e }) {
|
|
141
141
|
const { media: t, video: n } = e.extension.EntryListView || {};
|
|
142
142
|
return {
|
|
143
143
|
media: t,
|
|
144
144
|
video: n
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function D(e) {
|
|
148
148
|
const { objectFit: t = void 0 } = e ?? {};
|
|
149
149
|
return {
|
|
150
150
|
key: "entry-video-spring",
|
|
151
|
-
component:
|
|
151
|
+
component: a,
|
|
152
152
|
props: {
|
|
153
153
|
class: "entry-media",
|
|
154
154
|
part: "entry-media"
|
|
@@ -156,16 +156,16 @@ function w(e) {
|
|
|
156
156
|
children: [
|
|
157
157
|
{
|
|
158
158
|
key: "entry-video",
|
|
159
|
-
component:
|
|
159
|
+
component: N,
|
|
160
160
|
props: e
|
|
161
161
|
},
|
|
162
162
|
{
|
|
163
163
|
if: {
|
|
164
164
|
test: () => t === "contain",
|
|
165
|
-
then:
|
|
165
|
+
then: v("entry-video-pane")
|
|
166
166
|
}
|
|
167
167
|
},
|
|
168
|
-
|
|
168
|
+
l({
|
|
169
169
|
key: "entry-video-overlay",
|
|
170
170
|
class: "media-overlay",
|
|
171
171
|
part: "media-overlay"
|
|
@@ -173,99 +173,102 @@ function w(e) {
|
|
|
173
173
|
]
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function Q(e) {
|
|
177
177
|
const { key: t, justifyContent: n } = e || {}, r = "media-control-group" + (n ? ` justify-content-${n}` : "");
|
|
178
|
-
return
|
|
178
|
+
return d({
|
|
179
179
|
key: t,
|
|
180
|
-
component:
|
|
180
|
+
component: a,
|
|
181
181
|
props: {
|
|
182
182
|
subtag: "element-stack",
|
|
183
183
|
class: r
|
|
184
184
|
},
|
|
185
185
|
children: [
|
|
186
|
-
|
|
186
|
+
l({
|
|
187
187
|
key: "media-control-group-background",
|
|
188
188
|
class: "media-control-pane"
|
|
189
189
|
})
|
|
190
190
|
]
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function m(e) {
|
|
194
194
|
const { key: t } = e || {};
|
|
195
|
-
return
|
|
195
|
+
return d({
|
|
196
196
|
key: t,
|
|
197
|
-
component:
|
|
197
|
+
component: a,
|
|
198
198
|
props: {
|
|
199
199
|
subtag: "element-stack",
|
|
200
200
|
class: "media-control"
|
|
201
201
|
},
|
|
202
202
|
children: [
|
|
203
|
-
|
|
203
|
+
l({
|
|
204
204
|
key: "media-control-background",
|
|
205
205
|
class: "media-control-pane"
|
|
206
206
|
})
|
|
207
207
|
]
|
|
208
208
|
});
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function A(e) {
|
|
211
211
|
const { key: t = "media-controls", justifyContent: n } = e || {}, r = "entry-media-controls" + (n ? ` justify-content-${n}` : "");
|
|
212
|
-
return
|
|
212
|
+
return d({
|
|
213
213
|
if: {
|
|
214
214
|
// don't render media controls if in error state
|
|
215
|
-
test: ({ entry: o }) =>
|
|
215
|
+
test: ({ entry: o }) => {
|
|
216
|
+
const { media: i } = S({ entry: o });
|
|
217
|
+
return i && i.isReady && !_(o, ["error"]);
|
|
218
|
+
},
|
|
216
219
|
then: {
|
|
217
220
|
key: t,
|
|
218
221
|
tag: "element-stack",
|
|
219
|
-
context:
|
|
220
|
-
attrs: ({ media: o, video:
|
|
222
|
+
context: S,
|
|
223
|
+
attrs: ({ media: o, video: i }) => ({
|
|
221
224
|
class: r,
|
|
222
225
|
part: "media-controls",
|
|
223
|
-
"data-media-is-visible":
|
|
224
|
-
"data-media-is-playing":
|
|
226
|
+
"data-media-is-visible": E(o?.isVisible),
|
|
227
|
+
"data-media-is-playing": E(i?.isPlaying)
|
|
225
228
|
})
|
|
226
229
|
}
|
|
227
230
|
}
|
|
228
231
|
});
|
|
229
232
|
}
|
|
230
|
-
function
|
|
233
|
+
function W() {
|
|
231
234
|
return {
|
|
232
235
|
key: "toggle-playback-spring",
|
|
233
|
-
component:
|
|
236
|
+
component: a,
|
|
234
237
|
props: {
|
|
235
238
|
class: "toggle-playback"
|
|
236
239
|
},
|
|
237
|
-
children:
|
|
240
|
+
children: c("toggle-playback", ({ video: e }) => ({
|
|
238
241
|
part: "media-button",
|
|
239
242
|
icon: e?.isPaused ? "mediaPlay" : "mediaPause"
|
|
240
243
|
}))
|
|
241
244
|
};
|
|
242
245
|
}
|
|
243
|
-
function
|
|
246
|
+
function H() {
|
|
244
247
|
return {
|
|
245
248
|
key: "toggle-audio-spring",
|
|
246
|
-
component:
|
|
249
|
+
component: a,
|
|
247
250
|
props: {
|
|
248
251
|
class: "toggle-audio"
|
|
249
252
|
},
|
|
250
|
-
children:
|
|
253
|
+
children: c("toggle-audio", ({ video: e }) => ({
|
|
251
254
|
part: "media-button",
|
|
252
255
|
icon: e?.isMute ? "mediaSilent" : e?.isMuted ? "mediaUnmute" : "mediaMute",
|
|
253
256
|
disabled: e?.isMute
|
|
254
257
|
}))
|
|
255
258
|
};
|
|
256
259
|
}
|
|
257
|
-
function
|
|
260
|
+
function ue() {
|
|
258
261
|
return {
|
|
259
262
|
// only added when fullscreen is supported
|
|
260
263
|
if: {
|
|
261
|
-
test:
|
|
264
|
+
test: C,
|
|
262
265
|
then: {
|
|
263
266
|
key: "toggle-fullscreen-spring",
|
|
264
|
-
component:
|
|
267
|
+
component: a,
|
|
265
268
|
props: {
|
|
266
269
|
class: "toggle-fullscreen"
|
|
267
270
|
},
|
|
268
|
-
children:
|
|
271
|
+
children: c("toggle-fullscreen", {
|
|
269
272
|
part: "media-button",
|
|
270
273
|
icon: "mediaFullscreen"
|
|
271
274
|
})
|
|
@@ -273,17 +276,17 @@ function oe() {
|
|
|
273
276
|
}
|
|
274
277
|
};
|
|
275
278
|
}
|
|
276
|
-
function
|
|
279
|
+
function $() {
|
|
277
280
|
return {
|
|
278
281
|
key: "media-scrubber-spring",
|
|
279
|
-
component:
|
|
282
|
+
component: a,
|
|
280
283
|
props: {
|
|
281
284
|
class: "media-scrubber"
|
|
282
285
|
},
|
|
283
286
|
children: [
|
|
284
287
|
{
|
|
285
288
|
key: "media-scrubber",
|
|
286
|
-
component:
|
|
289
|
+
component: x,
|
|
287
290
|
props: ({ video: e }) => ({
|
|
288
291
|
part: "media-scrubber",
|
|
289
292
|
step: e?.framesPerSecond,
|
|
@@ -295,12 +298,12 @@ function x() {
|
|
|
295
298
|
]
|
|
296
299
|
};
|
|
297
300
|
}
|
|
298
|
-
function
|
|
301
|
+
function ge() {
|
|
299
302
|
return {
|
|
300
303
|
key: "media-scrubber-title",
|
|
301
304
|
tag: "time",
|
|
302
305
|
context: ({ hoverValue: e }) => ({
|
|
303
|
-
time:
|
|
306
|
+
time: U(e)
|
|
304
307
|
}),
|
|
305
308
|
attrs: ({ time: e }) => ({
|
|
306
309
|
datetime: e
|
|
@@ -308,16 +311,16 @@ function ae() {
|
|
|
308
311
|
children: "{{time}}"
|
|
309
312
|
};
|
|
310
313
|
}
|
|
311
|
-
function
|
|
314
|
+
function q() {
|
|
312
315
|
return {
|
|
313
316
|
key: "media-time-indicator-spring",
|
|
314
|
-
component:
|
|
317
|
+
component: a,
|
|
315
318
|
props: {
|
|
316
319
|
class: "media-time-indicator"
|
|
317
320
|
},
|
|
318
321
|
children: {
|
|
319
322
|
key: "media-time-indicator",
|
|
320
|
-
component:
|
|
323
|
+
component: L,
|
|
321
324
|
props: ({ video: e }) => ({
|
|
322
325
|
timeISO: e?.timeISO,
|
|
323
326
|
timeLabel: e?.timeLabel,
|
|
@@ -327,46 +330,51 @@ function L() {
|
|
|
327
330
|
}
|
|
328
331
|
};
|
|
329
332
|
}
|
|
330
|
-
const
|
|
331
|
-
function
|
|
332
|
-
const { imageViewOptions: n } = t ?? {};
|
|
333
|
-
return
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
333
|
+
const G = F("image");
|
|
334
|
+
function ye(e, t) {
|
|
335
|
+
const { imageViewOptions: n, imageEditOptions: r } = t ?? {}, { enableEdit: o = !0, enableReset: i = !0 } = r ?? {}, p = o || i;
|
|
336
|
+
return d(e).find("entry").append(
|
|
337
|
+
R((s) => G(s) || B(s, "poster")).append(
|
|
338
|
+
Y(n),
|
|
339
|
+
p && M("error").append(
|
|
340
|
+
h("editMedia").append(
|
|
341
|
+
A({ justifyContent: "end" }).append(
|
|
342
|
+
i && m().append(O()),
|
|
343
|
+
o && m().append(T())
|
|
341
344
|
)
|
|
342
345
|
)
|
|
343
346
|
)
|
|
344
347
|
)
|
|
345
348
|
), e;
|
|
346
349
|
}
|
|
347
|
-
function
|
|
348
|
-
const { videoViewOptions: n } = t ?? {}
|
|
349
|
-
|
|
350
|
-
|
|
350
|
+
function be(e, t) {
|
|
351
|
+
const { videoViewOptions: n, videoEditOptions: r, videoControlOptions: o } = t ?? {}, {
|
|
352
|
+
enablePlay: i = !0,
|
|
353
|
+
enableScrubber: p = !0,
|
|
354
|
+
enableTime: s = !0,
|
|
355
|
+
enableMute: g = !0
|
|
356
|
+
} = o ?? {}, { enableEdit: y = !0, enableReset: b = !0 } = r ?? {}, f = y || b, k = i || p || s || g;
|
|
357
|
+
return d(e).update("entry", (P) => {
|
|
358
|
+
P.routes = {
|
|
351
359
|
"toggle-playback:click": "entry-video.togglePlayback",
|
|
352
360
|
"toggle-audio:click": "entry-video.toggleAudio",
|
|
353
361
|
"toggle-fullscreen:click": "entry-video.toggleFullscreen",
|
|
354
362
|
"media-scrubber:input": "entry-video.setCurrentTime"
|
|
355
363
|
};
|
|
356
364
|
}).append(
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
365
|
+
R("video").append(
|
|
366
|
+
D(n),
|
|
367
|
+
(f || k) && M("error").append(
|
|
368
|
+
A().append(
|
|
369
|
+
k && Q({ key: "video-controls" }).append(
|
|
370
|
+
i && W(),
|
|
371
|
+
p && $(),
|
|
372
|
+
s && q(),
|
|
373
|
+
g && H()
|
|
366
374
|
),
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
375
|
+
f && h("editMedia").append(
|
|
376
|
+
b && m().append(O()),
|
|
377
|
+
y && m().append(T())
|
|
370
378
|
)
|
|
371
379
|
)
|
|
372
380
|
)
|
|
@@ -374,19 +382,19 @@ function se(e, t) {
|
|
|
374
382
|
), e;
|
|
375
383
|
}
|
|
376
384
|
export {
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
385
|
+
ye as appendEntryImageView,
|
|
386
|
+
be as appendEntryVideoView,
|
|
387
|
+
T as createEditMediaButton,
|
|
388
|
+
Y as createImageView,
|
|
389
|
+
m as createMediaControl,
|
|
390
|
+
Q as createMediaControlGroup,
|
|
391
|
+
A as createMediaControls,
|
|
392
|
+
$ as createMediaScrubber,
|
|
393
|
+
ge as createMediaScrubberTitle,
|
|
394
|
+
q as createMediaTimeIndicator,
|
|
395
|
+
O as createResetMediaButton,
|
|
396
|
+
H as createToggleAudioButton,
|
|
397
|
+
ue as createToggleFullscreenButton,
|
|
398
|
+
W as createTogglePlaybackButton,
|
|
399
|
+
D as createVideoView
|
|
392
400
|
};
|
package/esm/utils/array.js
CHANGED
package/esm/utils/bounds.js
CHANGED
package/esm/utils/cache.js
CHANGED
package/esm/utils/date.js
CHANGED
package/esm/utils/debounce.js
CHANGED
package/esm/utils/dom.js
CHANGED
package/esm/utils/file.js
CHANGED
package/esm/utils/keyboard.js
CHANGED
package/esm/utils/math.js
CHANGED
package/esm/utils/media.js
CHANGED
package/esm/utils/number.js
CHANGED
package/esm/utils/object.js
CHANGED
package/esm/utils/objectURL.js
CHANGED
package/esm/utils/placeholder.js
CHANGED
package/esm/utils/poly.js
CHANGED
package/esm/utils/pubsub.js
CHANGED
package/esm/utils/rect.js
CHANGED
package/esm/utils/size.js
CHANGED
package/esm/utils/sleep.js
CHANGED
package/esm/utils/string.js
CHANGED
package/esm/utils/support.js
CHANGED