@editframe/elements 0.16.8-beta.0 → 0.17.6-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -0
- package/dist/DecoderResetFrequency.test.d.ts +1 -0
- package/dist/DecoderResetRecovery.test.d.ts +1 -0
- package/dist/DelayedLoadingState.d.ts +48 -0
- package/dist/DelayedLoadingState.integration.test.d.ts +1 -0
- package/dist/DelayedLoadingState.js +113 -0
- package/dist/DelayedLoadingState.test.d.ts +1 -0
- package/dist/EF_FRAMEGEN.d.ts +10 -1
- package/dist/EF_FRAMEGEN.js +199 -179
- package/dist/EF_INTERACTIVE.js +2 -6
- package/dist/EF_RENDERING.js +1 -3
- package/dist/JitTranscodingClient.browsertest.d.ts +1 -0
- package/dist/JitTranscodingClient.d.ts +167 -0
- package/dist/JitTranscodingClient.js +373 -0
- package/dist/JitTranscodingClient.test.d.ts +1 -0
- package/dist/LoadingDebounce.test.d.ts +1 -0
- package/dist/LoadingIndicator.browsertest.d.ts +0 -0
- package/dist/ManualScrubTest.test.d.ts +1 -0
- package/dist/ScrubResolvedFlashing.test.d.ts +1 -0
- package/dist/ScrubTrackIntegration.test.d.ts +1 -0
- package/dist/ScrubTrackManager.d.ts +96 -0
- package/dist/ScrubTrackManager.js +216 -0
- package/dist/ScrubTrackManager.test.d.ts +1 -0
- package/dist/SegmentSwitchLoading.test.d.ts +1 -0
- package/dist/VideoSeekFlashing.browsertest.d.ts +0 -0
- package/dist/VideoStuckDiagnostic.test.d.ts +1 -0
- package/dist/elements/CrossUpdateController.js +13 -15
- package/dist/elements/EFAudio.browsertest.d.ts +0 -0
- package/dist/elements/EFAudio.d.ts +1 -1
- package/dist/elements/EFAudio.js +30 -43
- package/dist/elements/EFCaptions.js +337 -373
- package/dist/elements/EFImage.js +64 -90
- package/dist/elements/EFMedia.d.ts +98 -33
- package/dist/elements/EFMedia.js +1169 -678
- package/dist/elements/EFSourceMixin.js +31 -48
- package/dist/elements/EFTemporal.d.ts +1 -0
- package/dist/elements/EFTemporal.js +266 -360
- package/dist/elements/EFTimegroup.d.ts +3 -1
- package/dist/elements/EFTimegroup.js +262 -323
- package/dist/elements/EFVideo.browsertest.d.ts +0 -0
- package/dist/elements/EFVideo.d.ts +90 -2
- package/dist/elements/EFVideo.js +408 -111
- package/dist/elements/EFWaveform.js +375 -411
- package/dist/elements/FetchMixin.js +14 -24
- package/dist/elements/MediaController.d.ts +30 -0
- package/dist/elements/TargetController.js +130 -156
- package/dist/elements/TimegroupController.js +17 -19
- package/dist/elements/durationConverter.js +15 -4
- package/dist/elements/parseTimeToMs.js +4 -10
- package/dist/elements/printTaskStatus.d.ts +2 -0
- package/dist/elements/printTaskStatus.js +11 -0
- package/dist/elements/updateAnimations.js +39 -59
- package/dist/getRenderInfo.js +58 -67
- package/dist/gui/ContextMixin.js +203 -288
- package/dist/gui/EFConfiguration.js +27 -43
- package/dist/gui/EFFilmstrip.js +440 -620
- package/dist/gui/EFFitScale.js +112 -135
- package/dist/gui/EFFocusOverlay.js +45 -61
- package/dist/gui/EFPreview.js +30 -49
- package/dist/gui/EFScrubber.js +78 -99
- package/dist/gui/EFTimeDisplay.js +49 -70
- package/dist/gui/EFToggleLoop.js +17 -34
- package/dist/gui/EFTogglePlay.js +37 -58
- package/dist/gui/EFWorkbench.js +66 -88
- package/dist/gui/TWMixin.js +2 -48
- package/dist/gui/TWMixin2.js +31 -0
- package/dist/gui/efContext.js +2 -6
- package/dist/gui/fetchContext.js +1 -3
- package/dist/gui/focusContext.js +1 -3
- package/dist/gui/focusedElementContext.js +2 -6
- package/dist/gui/playingContext.js +1 -4
- package/dist/index.js +5 -30
- package/dist/msToTimeCode.js +11 -13
- package/dist/style.css +2 -1
- package/package.json +3 -3
- package/src/elements/EFAudio.browsertest.ts +569 -0
- package/src/elements/EFAudio.ts +4 -6
- package/src/elements/EFCaptions.browsertest.ts +0 -1
- package/src/elements/EFImage.browsertest.ts +0 -1
- package/src/elements/EFMedia.browsertest.ts +147 -115
- package/src/elements/EFMedia.ts +1339 -307
- package/src/elements/EFTemporal.browsertest.ts +0 -1
- package/src/elements/EFTemporal.ts +11 -0
- package/src/elements/EFTimegroup.ts +73 -10
- package/src/elements/EFVideo.browsertest.ts +680 -0
- package/src/elements/EFVideo.ts +729 -50
- package/src/elements/EFWaveform.ts +4 -4
- package/src/elements/MediaController.ts +108 -0
- package/src/elements/__screenshots__/EFMedia.browsertest.ts/EFMedia-JIT-audio-playback-audioBufferTask-should-work-in-JIT-mode-without-URL-errors-1.png +0 -0
- package/src/elements/printTaskStatus.ts +16 -0
- package/src/elements/updateAnimations.ts +6 -0
- package/src/gui/TWMixin.ts +10 -3
- package/test/EFVideo.frame-tasks.browsertest.ts +524 -0
- package/test/EFVideo.framegen.browsertest.ts +118 -0
- package/test/createJitTestClips.ts +293 -0
- package/test/useAssetMSW.ts +49 -0
- package/test/useMSW.ts +31 -0
- package/types.json +1 -1
- package/dist/gui/TWMixin.css.js +0 -4
- /package/dist/elements/{TargetController.test.d.ts → TargetController.browsertest.d.ts} +0 -0
- /package/src/elements/{TargetController.test.ts → TargetController.browsertest.ts} +0 -0
|
@@ -1,67 +1,17 @@
|
|
|
1
|
+
import { efContext } from "./efContext.js";
|
|
1
2
|
import { consume } from "@lit/context";
|
|
2
|
-
import {
|
|
3
|
+
import { LitElement, css, html } from "lit";
|
|
3
4
|
import { customElement } from "lit/decorators.js";
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
15
|
-
let EFTimeDisplay = class extends LitElement {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this._onTimeUpdate = () => {
|
|
19
|
-
this.requestUpdate();
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
connectedCallback() {
|
|
23
|
-
super.connectedCallback();
|
|
24
|
-
this.context?.addEventListener(
|
|
25
|
-
"timeupdate",
|
|
26
|
-
this._onTimeUpdate
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
updated(changedProperties) {
|
|
30
|
-
if (changedProperties.has("context")) {
|
|
31
|
-
const oldContext = changedProperties.get(
|
|
32
|
-
"context"
|
|
33
|
-
);
|
|
34
|
-
oldContext?.removeEventListener(
|
|
35
|
-
"timeupdate",
|
|
36
|
-
this._onTimeUpdate
|
|
37
|
-
);
|
|
38
|
-
this.context?.addEventListener(
|
|
39
|
-
"timeupdate",
|
|
40
|
-
this._onTimeUpdate
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
disconnectedCallback() {
|
|
45
|
-
this.context?.removeEventListener("timeupdate", this._onTimeUpdate);
|
|
46
|
-
super.disconnectedCallback();
|
|
47
|
-
}
|
|
48
|
-
formatTime(ms) {
|
|
49
|
-
const totalSeconds = Math.floor(ms / 1e3);
|
|
50
|
-
const minutes = Math.floor(totalSeconds / 60);
|
|
51
|
-
const seconds = totalSeconds % 60;
|
|
52
|
-
return `${minutes}:${seconds.toString().padStart(2, "0")}`;
|
|
53
|
-
}
|
|
54
|
-
render() {
|
|
55
|
-
const currentTime = this.context?.currentTimeMs ?? 0;
|
|
56
|
-
const totalTime = this.context?.targetTimegroup?.durationMs ?? 0;
|
|
57
|
-
return html`
|
|
58
|
-
<span part="time">
|
|
59
|
-
${this.formatTime(currentTime)} / ${this.formatTime(totalTime)}
|
|
60
|
-
</span>
|
|
61
|
-
`;
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
EFTimeDisplay.styles = css`
|
|
5
|
+
import _decorate from "@oxc-project/runtime/helpers/decorate";
|
|
6
|
+
let EFTimeDisplay = class EFTimeDisplay$1 extends LitElement {
|
|
7
|
+
constructor(..._args) {
|
|
8
|
+
super(..._args);
|
|
9
|
+
this._onTimeUpdate = () => {
|
|
10
|
+
this.requestUpdate();
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
static {
|
|
14
|
+
this.styles = css`
|
|
65
15
|
:host {
|
|
66
16
|
display: inline-block;
|
|
67
17
|
font-family: var(--ef-font-family, system-ui);
|
|
@@ -70,12 +20,41 @@ EFTimeDisplay.styles = css`
|
|
|
70
20
|
white-space: nowrap;
|
|
71
21
|
}
|
|
72
22
|
`;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
23
|
+
}
|
|
24
|
+
connectedCallback() {
|
|
25
|
+
super.connectedCallback();
|
|
26
|
+
this.context?.addEventListener("timeupdate", this._onTimeUpdate);
|
|
27
|
+
}
|
|
28
|
+
updated(changedProperties) {
|
|
29
|
+
if (changedProperties.has("context")) {
|
|
30
|
+
const oldContext = changedProperties.get("context");
|
|
31
|
+
oldContext?.removeEventListener("timeupdate", this._onTimeUpdate);
|
|
32
|
+
this.context?.addEventListener("timeupdate", this._onTimeUpdate);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
disconnectedCallback() {
|
|
36
|
+
this.context?.removeEventListener("timeupdate", this._onTimeUpdate);
|
|
37
|
+
super.disconnectedCallback();
|
|
38
|
+
}
|
|
39
|
+
formatTime(ms) {
|
|
40
|
+
const totalSeconds = Math.floor(ms / 1e3);
|
|
41
|
+
const minutes = Math.floor(totalSeconds / 60);
|
|
42
|
+
const seconds = totalSeconds % 60;
|
|
43
|
+
return `${minutes}:${seconds.toString().padStart(2, "0")}`;
|
|
44
|
+
}
|
|
45
|
+
render() {
|
|
46
|
+
const currentTime = this.context?.currentTimeMs ?? 0;
|
|
47
|
+
const totalTime = this.context?.targetTimegroup?.durationMs ?? 0;
|
|
48
|
+
return html`
|
|
49
|
+
<span part="time">
|
|
50
|
+
${this.formatTime(currentTime)} / ${this.formatTime(totalTime)}
|
|
51
|
+
</span>
|
|
52
|
+
`;
|
|
53
|
+
}
|
|
81
54
|
};
|
|
55
|
+
_decorate([consume({
|
|
56
|
+
context: efContext,
|
|
57
|
+
subscribe: true
|
|
58
|
+
})], EFTimeDisplay.prototype, "context", void 0);
|
|
59
|
+
EFTimeDisplay = _decorate([customElement("ef-time-display")], EFTimeDisplay);
|
|
60
|
+
export { EFTimeDisplay };
|
package/dist/gui/EFToggleLoop.js
CHANGED
|
@@ -1,39 +1,22 @@
|
|
|
1
|
+
import { efContext } from "./efContext.js";
|
|
1
2
|
import { consume } from "@lit/context";
|
|
2
|
-
import {
|
|
3
|
+
import { LitElement, css, html } from "lit";
|
|
3
4
|
import { customElement } from "lit/decorators.js";
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return result;
|
|
14
|
-
};
|
|
15
|
-
let EFToggleLoop = class extends LitElement {
|
|
16
|
-
render() {
|
|
17
|
-
return html`
|
|
5
|
+
import _decorate from "@oxc-project/runtime/helpers/decorate";
|
|
6
|
+
let EFToggleLoop = class EFToggleLoop$1 extends LitElement {
|
|
7
|
+
static {
|
|
8
|
+
this.styles = [css`
|
|
9
|
+
:host {}
|
|
10
|
+
`];
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return html`
|
|
18
14
|
<slot @click=${() => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
}}></slot>
|
|
15
|
+
if (this.context) this.context.loop = !this.context.loop;
|
|
16
|
+
}}></slot>
|
|
23
17
|
`;
|
|
24
|
-
|
|
25
|
-
};
|
|
26
|
-
EFToggleLoop.styles = [
|
|
27
|
-
css`
|
|
28
|
-
:host {}
|
|
29
|
-
`
|
|
30
|
-
];
|
|
31
|
-
__decorateClass([
|
|
32
|
-
consume({ context: efContext })
|
|
33
|
-
], EFToggleLoop.prototype, "context", 2);
|
|
34
|
-
EFToggleLoop = __decorateClass([
|
|
35
|
-
customElement("ef-toggle-loop")
|
|
36
|
-
], EFToggleLoop);
|
|
37
|
-
export {
|
|
38
|
-
EFToggleLoop
|
|
18
|
+
}
|
|
39
19
|
};
|
|
20
|
+
_decorate([consume({ context: efContext })], EFToggleLoop.prototype, "context", void 0);
|
|
21
|
+
EFToggleLoop = _decorate([customElement("ef-toggle-loop")], EFToggleLoop);
|
|
22
|
+
export { EFToggleLoop };
|
package/dist/gui/EFTogglePlay.js
CHANGED
|
@@ -1,67 +1,46 @@
|
|
|
1
|
-
import { consume } from "@lit/context";
|
|
2
|
-
import { css, LitElement, html } from "lit";
|
|
3
|
-
import { customElement } from "lit/decorators.js";
|
|
4
1
|
import { efContext } from "./efContext.js";
|
|
5
2
|
import { playingContext } from "./playingContext.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
3
|
+
import { consume } from "@lit/context";
|
|
4
|
+
import { LitElement, css, html } from "lit";
|
|
5
|
+
import { customElement } from "lit/decorators.js";
|
|
6
|
+
import _decorate from "@oxc-project/runtime/helpers/decorate";
|
|
7
|
+
let EFTogglePlay = class EFTogglePlay$1 extends LitElement {
|
|
8
|
+
constructor(..._args) {
|
|
9
|
+
super(..._args);
|
|
10
|
+
this.playing = false;
|
|
11
|
+
}
|
|
12
|
+
static {
|
|
13
|
+
this.styles = [css`
|
|
14
|
+
:host {}
|
|
15
|
+
div {
|
|
16
|
+
all: inherit;
|
|
17
|
+
}
|
|
18
|
+
`];
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
return html`
|
|
23
22
|
<div
|
|
24
23
|
@click=${() => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} else {
|
|
29
|
-
this.context.play();
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}}
|
|
24
|
+
if (this.context) if (this.playing) this.context.pause();
|
|
25
|
+
else this.context.play();
|
|
26
|
+
}}
|
|
33
27
|
>
|
|
34
28
|
${this.playing ? html`<slot name="pause"></slot>` : html`<slot name="play"></slot>`}
|
|
35
29
|
</div>
|
|
36
30
|
`;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
} else {
|
|
43
|
-
this.context.play();
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
EFTogglePlay.styles = [
|
|
49
|
-
css`
|
|
50
|
-
:host {}
|
|
51
|
-
div {
|
|
52
|
-
all: inherit;
|
|
53
|
-
}
|
|
54
|
-
`
|
|
55
|
-
];
|
|
56
|
-
__decorateClass([
|
|
57
|
-
consume({ context: efContext, subscribe: true })
|
|
58
|
-
], EFTogglePlay.prototype, "context", 2);
|
|
59
|
-
__decorateClass([
|
|
60
|
-
consume({ context: playingContext, subscribe: true })
|
|
61
|
-
], EFTogglePlay.prototype, "playing", 2);
|
|
62
|
-
EFTogglePlay = __decorateClass([
|
|
63
|
-
customElement("ef-toggle-play")
|
|
64
|
-
], EFTogglePlay);
|
|
65
|
-
export {
|
|
66
|
-
EFTogglePlay
|
|
31
|
+
}
|
|
32
|
+
togglePlay() {
|
|
33
|
+
if (this.context) if (this.playing) this.context.pause();
|
|
34
|
+
else this.context.play();
|
|
35
|
+
}
|
|
67
36
|
};
|
|
37
|
+
_decorate([consume({
|
|
38
|
+
context: efContext,
|
|
39
|
+
subscribe: true
|
|
40
|
+
})], EFTogglePlay.prototype, "context", void 0);
|
|
41
|
+
_decorate([consume({
|
|
42
|
+
context: playingContext,
|
|
43
|
+
subscribe: true
|
|
44
|
+
})], EFTogglePlay.prototype, "playing", void 0);
|
|
45
|
+
EFTogglePlay = _decorate([customElement("ef-toggle-play")], EFTogglePlay);
|
|
46
|
+
export { EFTogglePlay };
|
package/dist/gui/EFWorkbench.js
CHANGED
|
@@ -1,73 +1,65 @@
|
|
|
1
|
-
import { html, css, LitElement } from "lit";
|
|
2
|
-
import { property, eventOptions, customElement } from "lit/decorators.js";
|
|
3
|
-
import { createRef, ref } from "lit/directives/ref.js";
|
|
4
1
|
import { ContextMixin } from "./ContextMixin.js";
|
|
5
|
-
import { TWMixin } from "./
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
2
|
+
import { TWMixin } from "./TWMixin2.js";
|
|
3
|
+
import { LitElement, css, html } from "lit";
|
|
4
|
+
import { customElement, eventOptions, property } from "lit/decorators.js";
|
|
5
|
+
import _decorate from "@oxc-project/runtime/helpers/decorate";
|
|
6
|
+
import { createRef, ref } from "lit/directives/ref.js";
|
|
7
|
+
let EFWorkbench = class EFWorkbench$1 extends ContextMixin(TWMixin(LitElement)) {
|
|
8
|
+
constructor(..._args) {
|
|
9
|
+
super(..._args);
|
|
10
|
+
this.rendering = false;
|
|
11
|
+
this.focusOverlay = createRef();
|
|
12
|
+
this.drawOverlays = () => {
|
|
13
|
+
const focusOverlay = this.focusOverlay.value;
|
|
14
|
+
if (focusOverlay) if (this.focusedElement) {
|
|
15
|
+
focusOverlay.style.display = "block";
|
|
16
|
+
const rect = this.focusedElement.getBoundingClientRect();
|
|
17
|
+
Object.assign(focusOverlay.style, {
|
|
18
|
+
position: "fixed",
|
|
19
|
+
top: `${rect.top}px`,
|
|
20
|
+
left: `${rect.left}px`,
|
|
21
|
+
width: `${rect.width}px`,
|
|
22
|
+
height: `${rect.height}px`
|
|
23
|
+
});
|
|
24
|
+
requestAnimationFrame(this.drawOverlays);
|
|
25
|
+
} else focusOverlay.style.display = "none";
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
static {
|
|
29
|
+
this.styles = [css`
|
|
30
|
+
:host {
|
|
31
|
+
display: block;
|
|
32
|
+
width: 100%;
|
|
33
|
+
height: 100%;
|
|
38
34
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
render() {
|
|
65
|
-
if (this.rendering || typeof window !== "undefined" && window.EF_RENDERING?.() === true) {
|
|
66
|
-
return html`
|
|
35
|
+
`];
|
|
36
|
+
}
|
|
37
|
+
handleStageWheel(event) {
|
|
38
|
+
event.preventDefault();
|
|
39
|
+
}
|
|
40
|
+
connectedCallback() {
|
|
41
|
+
document.body.style.width = "100%";
|
|
42
|
+
document.body.style.height = "100%";
|
|
43
|
+
document.documentElement.style.width = "100%";
|
|
44
|
+
document.documentElement.style.height = "100%";
|
|
45
|
+
super.connectedCallback();
|
|
46
|
+
}
|
|
47
|
+
disconnectedCallback() {
|
|
48
|
+
super.disconnectedCallback();
|
|
49
|
+
document.body.style.width = "";
|
|
50
|
+
document.body.style.height = "";
|
|
51
|
+
document.documentElement.style.width = "";
|
|
52
|
+
document.documentElement.style.height = "";
|
|
53
|
+
}
|
|
54
|
+
update(changedProperties) {
|
|
55
|
+
super.update(changedProperties);
|
|
56
|
+
if (changedProperties.has("focusedElement")) this.drawOverlays();
|
|
57
|
+
}
|
|
58
|
+
render() {
|
|
59
|
+
if (this.rendering || typeof window !== "undefined" && window.EF_RENDERING?.() === true) return html`
|
|
67
60
|
<slot class="fixed inset-0 h-full w-full" name="canvas"></slot>
|
|
68
61
|
`;
|
|
69
|
-
|
|
70
|
-
return html`
|
|
62
|
+
return html`
|
|
71
63
|
<div
|
|
72
64
|
class="grid h-full w-full bg-slate-800"
|
|
73
65
|
style="grid-template-rows: 1fr 300px; grid-template-columns: 100%;"
|
|
@@ -88,26 +80,12 @@ let EFWorkbench = class extends ContextMixin(TWMixin(LitElement)) {
|
|
|
88
80
|
<slot class="overflow inline-block" name="timeline"></slot>
|
|
89
81
|
</div>
|
|
90
82
|
`;
|
|
91
|
-
|
|
92
|
-
};
|
|
93
|
-
EFWorkbench.styles = [
|
|
94
|
-
css`
|
|
95
|
-
:host {
|
|
96
|
-
display: block;
|
|
97
|
-
width: 100%;
|
|
98
|
-
height: 100%;
|
|
99
|
-
}
|
|
100
|
-
`
|
|
101
|
-
];
|
|
102
|
-
__decorateClass([
|
|
103
|
-
property({ type: Boolean })
|
|
104
|
-
], EFWorkbench.prototype, "rendering", 2);
|
|
105
|
-
__decorateClass([
|
|
106
|
-
eventOptions({ passive: false, capture: true })
|
|
107
|
-
], EFWorkbench.prototype, "handleStageWheel", 1);
|
|
108
|
-
EFWorkbench = __decorateClass([
|
|
109
|
-
customElement("ef-workbench")
|
|
110
|
-
], EFWorkbench);
|
|
111
|
-
export {
|
|
112
|
-
EFWorkbench
|
|
83
|
+
}
|
|
113
84
|
};
|
|
85
|
+
_decorate([property({ type: Boolean })], EFWorkbench.prototype, "rendering", void 0);
|
|
86
|
+
_decorate([eventOptions({
|
|
87
|
+
passive: false,
|
|
88
|
+
capture: true
|
|
89
|
+
})], EFWorkbench.prototype, "handleStageWheel", null);
|
|
90
|
+
EFWorkbench = _decorate([customElement("ef-workbench")], EFWorkbench);
|
|
91
|
+
export { EFWorkbench };
|
package/dist/gui/TWMixin.js
CHANGED
|
@@ -1,48 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (typeof window !== "undefined") {
|
|
4
|
-
twSheet = new CSSStyleSheet();
|
|
5
|
-
twSheet.replaceSync(twStyle);
|
|
6
|
-
}
|
|
7
|
-
function TWMixin(Base) {
|
|
8
|
-
class TWElement extends Base {
|
|
9
|
-
createRenderRoot() {
|
|
10
|
-
const renderRoot = super.createRenderRoot();
|
|
11
|
-
if (!(renderRoot instanceof ShadowRoot)) {
|
|
12
|
-
throw new Error(
|
|
13
|
-
"TWMixin can only be applied to elements with shadow roots"
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
if (!twSheet) {
|
|
17
|
-
throw new Error(
|
|
18
|
-
"twSheet not found. Probable cause: CSSStyleSheet not supported in this environment"
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
const constructorStylesheets = [];
|
|
22
|
-
const constructorStyles = "styles" in this.constructor && this.constructor.styles || [];
|
|
23
|
-
if (Array.isArray(constructorStyles)) {
|
|
24
|
-
for (const item of constructorStyles) {
|
|
25
|
-
if (item.styleSheet) {
|
|
26
|
-
constructorStylesheets.push(item.styleSheet);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
} else if (constructorStyles.styleSheet) {
|
|
30
|
-
constructorStylesheets.push(constructorStyles.styleSheet);
|
|
31
|
-
}
|
|
32
|
-
if (renderRoot?.adoptedStyleSheets) {
|
|
33
|
-
renderRoot.adoptedStyleSheets = [
|
|
34
|
-
twSheet,
|
|
35
|
-
...renderRoot.adoptedStyleSheets,
|
|
36
|
-
...constructorStylesheets
|
|
37
|
-
];
|
|
38
|
-
} else {
|
|
39
|
-
renderRoot.adoptedStyleSheets = [twSheet, ...constructorStylesheets];
|
|
40
|
-
}
|
|
41
|
-
return renderRoot;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return TWElement;
|
|
45
|
-
}
|
|
46
|
-
export {
|
|
47
|
-
TWMixin
|
|
48
|
-
};
|
|
1
|
+
var TWMixin_default = "*,:before,:after{box-sizing:border-box;border:0 solid #e5e7eb}:before,:after{--tw-content:\"\"}html,:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:#0000;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder{opacity:1;color:#9ca3af}textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.top-0{top:0}.isolate{isolation:isolate}.z-10{z-index:10}.z-20{z-index:20}.col-span-2{grid-column:span 2/span 2}.mx-2{margin-left:.5rem;margin-right:.5rem}.mb-\\[1px\\]{margin-bottom:1px}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-\\[1\\.1rem\\]{height:1.1rem}.h-\\[5px\\]{height:5px}.h-full{height:100%}.w-1{width:.25rem}.w-\\[2px\\]{width:2px}.w-full{width:100%}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.cursor-crosshair{cursor:crosshair}.resize{resize:both}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.items-center{align-items:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.text-nowrap{text-wrap:nowrap}.rounded{border-radius:.25rem}.border{border-width:1px}.border-r-2{border-right-width:2px}.border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity))}.border-red-700{--tw-border-opacity:1;border-color:rgb(185 28 28/var(--tw-border-opacity))}.border-slate-500{--tw-border-opacity:1;border-color:rgb(100 116 139/var(--tw-border-opacity))}.border-b-slate-600{--tw-border-opacity:1;border-bottom-color:rgb(71 85 105/var(--tw-border-opacity))}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity))}.bg-slate-200{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity))}.bg-slate-300{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity))}.bg-slate-800{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity))}.bg-opacity-20{--tw-bg-opacity:.2}.p-\\[1px\\]{padding:1px}.pb-0{padding-bottom:0}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pr-0{padding-right:0}.pr-1{padding-right:.25rem}.pt-\\[8px\\]{padding-top:8px}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-5xl{font-size:3rem;line-height:1}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.line-through{text-decoration-line:line-through}.opacity-50{opacity:.5}.shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-slate-300{--tw-shadow-color:#cbd5e1;--tw-shadow:var(--tw-shadow-colored)}.shadow-slate-600{--tw-shadow-color:#475569;--tw-shadow:var(--tw-shadow-colored)}.outline{outline-style:solid}.blur{--tw-blur:blur(8px);filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.filter{filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia)}.hover\\:bg-slate-400:hover{--tw-bg-opacity:1;background-color:rgb(148 163 184/var(--tw-bg-opacity))}.peer:hover~.peer-hover\\:border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity))}.peer:hover~.peer-hover\\:bg-slate-300{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity))}.data-\\[focused\\]\\:bg-slate-400[data-focused]{--tw-bg-opacity:1;background-color:rgb(148 163 184/var(--tw-bg-opacity))}.peer[data-focused]~.peer-data-\\[focused\\]\\:border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity))}.peer[data-focused]~.peer-data-\\[focused\\]\\:bg-slate-300{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity))}";
|
|
2
|
+
export { TWMixin_default as default };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import TWMixin_default from "./TWMixin.js";
|
|
2
|
+
let twSheet = null;
|
|
3
|
+
if (typeof window !== "undefined" && typeof CSSStyleSheet !== "undefined") try {
|
|
4
|
+
twSheet = new CSSStyleSheet();
|
|
5
|
+
if (typeof twSheet.replaceSync === "function") twSheet.replaceSync(TWMixin_default);
|
|
6
|
+
} catch (_error) {
|
|
7
|
+
twSheet = null;
|
|
8
|
+
}
|
|
9
|
+
function TWMixin(Base) {
|
|
10
|
+
class TWElement extends Base {
|
|
11
|
+
createRenderRoot() {
|
|
12
|
+
const renderRoot = super.createRenderRoot();
|
|
13
|
+
if (!(renderRoot instanceof ShadowRoot)) throw new Error("TWMixin can only be applied to elements with shadow roots");
|
|
14
|
+
if (!twSheet) throw new Error("twSheet not found. Probable cause: CSSStyleSheet not supported in this environment");
|
|
15
|
+
const constructorStylesheets = [];
|
|
16
|
+
const constructorStyles = "styles" in this.constructor && this.constructor.styles || [];
|
|
17
|
+
if (Array.isArray(constructorStyles)) {
|
|
18
|
+
for (const item of constructorStyles) if (item.styleSheet) constructorStylesheets.push(item.styleSheet);
|
|
19
|
+
} else if (constructorStyles.styleSheet) constructorStylesheets.push(constructorStyles.styleSheet);
|
|
20
|
+
if (renderRoot?.adoptedStyleSheets) renderRoot.adoptedStyleSheets = [
|
|
21
|
+
twSheet,
|
|
22
|
+
...renderRoot.adoptedStyleSheets,
|
|
23
|
+
...constructorStylesheets
|
|
24
|
+
];
|
|
25
|
+
else renderRoot.adoptedStyleSheets = [twSheet, ...constructorStylesheets];
|
|
26
|
+
return renderRoot;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return TWElement;
|
|
30
|
+
}
|
|
31
|
+
export { TWMixin };
|
package/dist/gui/efContext.js
CHANGED
package/dist/gui/fetchContext.js
CHANGED
package/dist/gui/focusContext.js
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
import { createContext } from "@lit/context";
|
|
2
|
-
const focusedElementContext = createContext(
|
|
3
|
-
|
|
4
|
-
);
|
|
5
|
-
export {
|
|
6
|
-
focusedElementContext
|
|
7
|
-
};
|
|
2
|
+
const focusedElementContext = createContext(Symbol("focusedElement"));
|
|
3
|
+
export { focusedElementContext };
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/* empty css
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { EFConfiguration } from "./gui/EFConfiguration.js";
|
|
3
|
+
import "./elements/EFMedia.js";
|
|
2
4
|
import { EFTimegroup } from "./elements/EFTimegroup.js";
|
|
3
5
|
import { EFImage } from "./elements/EFImage.js";
|
|
4
|
-
import "./elements/EFMedia.js";
|
|
5
6
|
import { EFAudio } from "./elements/EFAudio.js";
|
|
6
7
|
import { EFVideo } from "./elements/EFVideo.js";
|
|
7
8
|
import { EFCaptions, EFCaptionsActiveWord, EFCaptionsAfterActiveWord, EFCaptionsBeforeActiveWord, EFCaptionsSegment } from "./elements/EFCaptions.js";
|
|
8
9
|
import { EFWaveform } from "./elements/EFWaveform.js";
|
|
9
|
-
import { EFConfiguration } from "./gui/EFConfiguration.js";
|
|
10
10
|
import { EFWorkbench } from "./gui/EFWorkbench.js";
|
|
11
11
|
import { EFPreview } from "./gui/EFPreview.js";
|
|
12
12
|
import { EFFilmstrip } from "./gui/EFFilmstrip.js";
|
|
@@ -18,30 +18,5 @@ import { EFFocusOverlay } from "./gui/EFFocusOverlay.js";
|
|
|
18
18
|
import { EFFitScale } from "./gui/EFFitScale.js";
|
|
19
19
|
import "./EF_FRAMEGEN.js";
|
|
20
20
|
import { RenderInfo, getRenderInfo } from "./getRenderInfo.js";
|
|
21
|
-
if (typeof window !== "undefined")
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
export {
|
|
25
|
-
EFAudio,
|
|
26
|
-
EFCaptions,
|
|
27
|
-
EFCaptionsActiveWord,
|
|
28
|
-
EFCaptionsAfterActiveWord,
|
|
29
|
-
EFCaptionsBeforeActiveWord,
|
|
30
|
-
EFCaptionsSegment,
|
|
31
|
-
EFConfiguration,
|
|
32
|
-
EFFilmstrip,
|
|
33
|
-
EFFitScale,
|
|
34
|
-
EFFocusOverlay,
|
|
35
|
-
EFImage,
|
|
36
|
-
EFPreview,
|
|
37
|
-
EFScrubber,
|
|
38
|
-
EFTimeDisplay,
|
|
39
|
-
EFTimegroup,
|
|
40
|
-
EFToggleLoop,
|
|
41
|
-
EFTogglePlay,
|
|
42
|
-
EFVideo,
|
|
43
|
-
EFWaveform,
|
|
44
|
-
EFWorkbench,
|
|
45
|
-
RenderInfo,
|
|
46
|
-
getRenderInfo
|
|
47
|
-
};
|
|
21
|
+
if (typeof window !== "undefined") window.EF_REGISTERED = true;
|
|
22
|
+
export { EFAudio, EFCaptions, EFCaptionsActiveWord, EFCaptionsAfterActiveWord, EFCaptionsBeforeActiveWord, EFCaptionsSegment, EFConfiguration, EFFilmstrip, EFFitScale, EFFocusOverlay, EFImage, EFPreview, EFScrubber, EFTimeDisplay, EFTimegroup, EFToggleLoop, EFTogglePlay, EFVideo, EFWaveform, EFWorkbench, RenderInfo, getRenderInfo };
|