@editframe/elements 0.15.0-beta.1 → 0.15.0-beta.11
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/dist/EF_FRAMEGEN.js +0 -2
- package/dist/elements/EFAudio.d.ts +0 -1
- package/dist/elements/EFAudio.js +1 -5
- package/dist/elements/EFCaptions.js +1 -1
- package/dist/elements/EFMedia.d.ts +2 -1
- package/dist/elements/EFMedia.js +125 -14
- package/dist/elements/EFTemporal.d.ts +3 -3
- package/dist/elements/EFTemporal.js +6 -2
- package/dist/elements/EFTimegroup.d.ts +1 -5
- package/dist/elements/EFTimegroup.js +4 -5
- package/dist/elements/EFWaveform.d.ts +14 -6
- package/dist/elements/EFWaveform.js +155 -53
- package/dist/elements/TargetController.d.ts +25 -0
- package/dist/elements/TargetController.js +164 -0
- package/dist/elements/TargetController.test.d.ts +19 -0
- package/dist/getRenderInfo.d.ts +51 -0
- package/dist/getRenderInfo.js +72 -0
- package/dist/gui/EFPreview.d.ts +1 -1
- package/dist/gui/EFPreview.js +1 -0
- package/dist/gui/TWMixin.css.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -1
- package/dist/style.css +3 -0
- package/package.json +11 -5
- package/src/elements/EFAudio.ts +1 -4
- package/src/elements/EFCaptions.ts +1 -1
- package/src/elements/EFMedia.ts +158 -22
- package/src/elements/EFTemporal.ts +10 -10
- package/src/elements/EFTimegroup.ts +4 -9
- package/src/elements/EFWaveform.ts +214 -70
- package/src/elements/TargetController.test.ts +229 -0
- package/src/elements/TargetController.ts +219 -0
- package/src/gui/EFPreview.ts +10 -9
- package/types.json +1 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const RenderInfo = z.object({
|
|
3
|
+
width: z.number().positive(),
|
|
4
|
+
height: z.number().positive(),
|
|
5
|
+
fps: z.number().positive(),
|
|
6
|
+
durationMs: z.number().positive(),
|
|
7
|
+
assets: z.object({
|
|
8
|
+
efMedia: z.record(z.any()),
|
|
9
|
+
efCaptions: z.array(z.string()),
|
|
10
|
+
efImage: z.array(z.string())
|
|
11
|
+
})
|
|
12
|
+
});
|
|
13
|
+
const getRenderInfo = async () => {
|
|
14
|
+
const rootTimeGroup = document.querySelector("ef-timegroup");
|
|
15
|
+
if (!rootTimeGroup) {
|
|
16
|
+
throw new Error("No ef-timegroup found");
|
|
17
|
+
}
|
|
18
|
+
console.error("Waiting for media durations", rootTimeGroup);
|
|
19
|
+
await rootTimeGroup.waitForMediaDurations();
|
|
20
|
+
const width = rootTimeGroup.clientWidth;
|
|
21
|
+
const height = rootTimeGroup.clientHeight;
|
|
22
|
+
const fps = 30;
|
|
23
|
+
const durationMs = Math.round(rootTimeGroup.durationMs);
|
|
24
|
+
const elements = document.querySelectorAll(
|
|
25
|
+
"ef-audio, ef-video, ef-image, ef-captions"
|
|
26
|
+
);
|
|
27
|
+
const assets = {
|
|
28
|
+
efMedia: {},
|
|
29
|
+
efCaptions: /* @__PURE__ */ new Set(),
|
|
30
|
+
efImage: /* @__PURE__ */ new Set()
|
|
31
|
+
};
|
|
32
|
+
for (const element of elements) {
|
|
33
|
+
switch (element.tagName) {
|
|
34
|
+
case "EF-AUDIO":
|
|
35
|
+
case "EF-VIDEO": {
|
|
36
|
+
const src = element.src;
|
|
37
|
+
console.error("Processing element", element.tagName, src);
|
|
38
|
+
assets.efMedia[src] = element.trackFragmentIndexLoader.value;
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
case "EF-IMAGE": {
|
|
42
|
+
const src = element.src;
|
|
43
|
+
console.error("Processing element", element.tagName, src);
|
|
44
|
+
assets.efImage.add(src);
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
case "EF-CAPTIONS": {
|
|
48
|
+
const src = element.targetElement?.src;
|
|
49
|
+
console.error("Processing element", element.tagName, src);
|
|
50
|
+
assets.efCaptions.add(src);
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
const renderInfo = {
|
|
56
|
+
width,
|
|
57
|
+
height,
|
|
58
|
+
fps,
|
|
59
|
+
durationMs,
|
|
60
|
+
assets: {
|
|
61
|
+
efMedia: assets.efMedia,
|
|
62
|
+
efCaptions: Array.from(assets.efCaptions),
|
|
63
|
+
efImage: Array.from(assets.efImage)
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
console.error("Render info", renderInfo);
|
|
67
|
+
return renderInfo;
|
|
68
|
+
};
|
|
69
|
+
export {
|
|
70
|
+
RenderInfo,
|
|
71
|
+
getRenderInfo
|
|
72
|
+
};
|
package/dist/gui/EFPreview.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
declare const EFPreview_base: (new (...args: any[]) => import('./ContextMixin.js').ContextMixinInterface) & typeof LitElement;
|
|
3
3
|
export declare class EFPreview extends EFPreview_base {
|
|
4
|
+
static styles: import('lit').CSSResult[];
|
|
4
5
|
focusedElement?: HTMLElement;
|
|
5
6
|
constructor();
|
|
6
|
-
static styles: import('lit').CSSResult[];
|
|
7
7
|
render(): import('lit-html').TemplateResult<1>;
|
|
8
8
|
}
|
|
9
9
|
declare global {
|
package/dist/gui/EFPreview.js
CHANGED
package/dist/gui/TWMixin.css.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const twStyle = "/*\n! tailwindcss v3.4.4 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: '';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\n\nhtml,\n:host {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\ninput:where([type='button']),\ninput:where([type='reset']),\ninput:where([type='submit']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden] {\n display: none;\n}\n\n*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n.container {\n width: 100%;\n}\n@media (min-width: 640px) {\n\n .container {\n max-width: 640px;\n }\n}\n@media (min-width: 768px) {\n\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n\n .container {\n max-width: 1536px;\n }\n}\n.pointer-events-none {\n pointer-events: none;\n}\n.static {\n position: static;\n}\n.fixed {\n position: fixed;\n}\n.absolute {\n position: absolute;\n}\n.relative {\n position: relative;\n}\n.inset-0 {\n inset: 0px;\n}\n.top-0 {\n top: 0px;\n}\n.z-10 {\n z-index: 10;\n}\n.z-20 {\n z-index: 20;\n}\n.col-span-2 {\n grid-column: span 2 / span 2;\n}\n.mx-2 {\n margin-left: 0.5rem;\n margin-right: 0.5rem;\n}\n.mb-\\[1px\\] {\n margin-bottom: 1px;\n}\n.block {\n display: block;\n}\n.inline-block {\n display: inline-block;\n}\n.inline {\n display: inline;\n}\n.flex {\n display: flex;\n}\n.grid {\n display: grid;\n}\n.contents {\n display: contents;\n}\n.hidden {\n display: none;\n}\n.h-\\[1\\.1rem\\] {\n height: 1.1rem;\n}\n.h-\\[5px\\] {\n height: 5px;\n}\n.h-full {\n height: 100%;\n}\n.w-1 {\n width: 0.25rem;\n}\n.w-\\[2px\\] {\n width: 2px;\n}\n.w-full {\n width: 100%;\n}\n.transform {\n 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));\n}\n.cursor-crosshair {\n cursor: crosshair;\n}\n.resize {\n resize: both;\n}\n.flex-wrap {\n flex-wrap: wrap;\n}\n.items-center {\n align-items: center;\n}\n.justify-center {\n justify-content: center;\n}\n.overflow-auto {\n overflow: auto;\n}\n.overflow-hidden {\n overflow: hidden;\n}\n.text-nowrap {\n text-wrap: nowrap;\n}\n.rounded {\n border-radius: 0.25rem;\n}\n.border {\n border-width: 1px;\n}\n.border-r-2 {\n border-right-width: 2px;\n}\n.border-blue-500 {\n --tw-border-opacity: 1;\n border-color: rgb(59 130 246 / var(--tw-border-opacity));\n}\n.border-red-700 {\n --tw-border-opacity: 1;\n border-color: rgb(185 28 28 / var(--tw-border-opacity));\n}\n.border-slate-500 {\n --tw-border-opacity: 1;\n border-color: rgb(100 116 139 / var(--tw-border-opacity));\n}\n.border-b-slate-600 {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(71 85 105 / var(--tw-border-opacity));\n}\n.bg-blue-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(191 219 254 / var(--tw-bg-opacity));\n}\n.bg-blue-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(59 130 246 / var(--tw-bg-opacity));\n}\n.bg-red-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(239 68 68 / var(--tw-bg-opacity));\n}\n.bg-slate-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(241 245 249 / var(--tw-bg-opacity));\n}\n.bg-slate-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(226 232 240 / var(--tw-bg-opacity));\n}\n.bg-slate-300 {\n --tw-bg-opacity: 1;\n background-color: rgb(203 213 225 / var(--tw-bg-opacity));\n}\n.bg-slate-800 {\n --tw-bg-opacity: 1;\n background-color: rgb(30 41 59 / var(--tw-bg-opacity));\n}\n.bg-opacity-20 {\n --tw-bg-opacity: 0.2;\n}\n.p-\\[1px\\] {\n padding: 1px;\n}\n.pb-0 {\n padding-bottom: 0px;\n}\n.pl-1 {\n padding-left: 0.25rem;\n}\n.pl-2 {\n padding-left: 0.5rem;\n}\n.pr-0 {\n padding-right: 0px;\n}\n.pr-1 {\n padding-right: 0.25rem;\n}\n.pt-\\[8px\\] {\n padding-top: 8px;\n}\n.font-mono {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n}\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.line-through {\n text-decoration-line: line-through;\n}\n.opacity-50 {\n opacity: 0.5;\n}\n.shadow {\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-slate-300 {\n --tw-shadow-color: #cbd5e1;\n --tw-shadow: var(--tw-shadow-colored);\n}\n.shadow-slate-600 {\n --tw-shadow-color: #475569;\n --tw-shadow: var(--tw-shadow-colored);\n}\n.outline {\n outline-style: solid;\n}\n.filter {\n 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);\n}\n.hover\\:bg-slate-400:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(148 163 184 / var(--tw-bg-opacity));\n}\n.peer:hover ~ .peer-hover\\:border-slate-400 {\n --tw-border-opacity: 1;\n border-color: rgb(148 163 184 / var(--tw-border-opacity));\n}\n.peer:hover ~ .peer-hover\\:bg-slate-300 {\n --tw-bg-opacity: 1;\n background-color: rgb(203 213 225 / var(--tw-bg-opacity));\n}\n.data-\\[focused\\]\\:bg-slate-400[data-focused] {\n --tw-bg-opacity: 1;\n background-color: rgb(148 163 184 / var(--tw-bg-opacity));\n}\n.peer[data-focused] ~ .peer-data-\\[focused\\]\\:border-slate-400 {\n --tw-border-opacity: 1;\n border-color: rgb(148 163 184 / var(--tw-border-opacity));\n}\n.peer[data-focused] ~ .peer-data-\\[focused\\]\\:bg-slate-300 {\n --tw-bg-opacity: 1;\n background-color: rgb(203 213 225 / var(--tw-bg-opacity));\n}\n";
|
|
1
|
+
const twStyle = "/*\n! tailwindcss v3.4.4 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: '';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\n\nhtml,\n:host {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\ninput:where([type='button']),\ninput:where([type='reset']),\ninput:where([type='submit']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden] {\n display: none;\n}\n\n*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n.container {\n width: 100%;\n}\n@media (min-width: 640px) {\n\n .container {\n max-width: 640px;\n }\n}\n@media (min-width: 768px) {\n\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n\n .container {\n max-width: 1536px;\n }\n}\n.pointer-events-none {\n pointer-events: none;\n}\n.visible {\n visibility: visible;\n}\n.static {\n position: static;\n}\n.fixed {\n position: fixed;\n}\n.absolute {\n position: absolute;\n}\n.relative {\n position: relative;\n}\n.inset-0 {\n inset: 0px;\n}\n.top-0 {\n top: 0px;\n}\n.z-10 {\n z-index: 10;\n}\n.z-20 {\n z-index: 20;\n}\n.col-span-2 {\n grid-column: span 2 / span 2;\n}\n.mx-2 {\n margin-left: 0.5rem;\n margin-right: 0.5rem;\n}\n.mb-\\[1px\\] {\n margin-bottom: 1px;\n}\n.block {\n display: block;\n}\n.inline-block {\n display: inline-block;\n}\n.inline {\n display: inline;\n}\n.flex {\n display: flex;\n}\n.grid {\n display: grid;\n}\n.contents {\n display: contents;\n}\n.hidden {\n display: none;\n}\n.h-\\[1\\.1rem\\] {\n height: 1.1rem;\n}\n.h-\\[5px\\] {\n height: 5px;\n}\n.h-full {\n height: 100%;\n}\n.w-1 {\n width: 0.25rem;\n}\n.w-\\[2px\\] {\n width: 2px;\n}\n.w-full {\n width: 100%;\n}\n.transform {\n 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));\n}\n.cursor-crosshair {\n cursor: crosshair;\n}\n.resize {\n resize: both;\n}\n.flex-wrap {\n flex-wrap: wrap;\n}\n.items-center {\n align-items: center;\n}\n.justify-center {\n justify-content: center;\n}\n.overflow-auto {\n overflow: auto;\n}\n.overflow-hidden {\n overflow: hidden;\n}\n.text-nowrap {\n text-wrap: nowrap;\n}\n.rounded {\n border-radius: 0.25rem;\n}\n.border {\n border-width: 1px;\n}\n.border-r-2 {\n border-right-width: 2px;\n}\n.border-blue-500 {\n --tw-border-opacity: 1;\n border-color: rgb(59 130 246 / var(--tw-border-opacity));\n}\n.border-red-700 {\n --tw-border-opacity: 1;\n border-color: rgb(185 28 28 / var(--tw-border-opacity));\n}\n.border-slate-500 {\n --tw-border-opacity: 1;\n border-color: rgb(100 116 139 / var(--tw-border-opacity));\n}\n.border-b-slate-600 {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(71 85 105 / var(--tw-border-opacity));\n}\n.bg-blue-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(191 219 254 / var(--tw-bg-opacity));\n}\n.bg-blue-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(59 130 246 / var(--tw-bg-opacity));\n}\n.bg-red-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(239 68 68 / var(--tw-bg-opacity));\n}\n.bg-slate-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(241 245 249 / var(--tw-bg-opacity));\n}\n.bg-slate-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(226 232 240 / var(--tw-bg-opacity));\n}\n.bg-slate-300 {\n --tw-bg-opacity: 1;\n background-color: rgb(203 213 225 / var(--tw-bg-opacity));\n}\n.bg-slate-800 {\n --tw-bg-opacity: 1;\n background-color: rgb(30 41 59 / var(--tw-bg-opacity));\n}\n.bg-opacity-20 {\n --tw-bg-opacity: 0.2;\n}\n.p-\\[1px\\] {\n padding: 1px;\n}\n.pb-0 {\n padding-bottom: 0px;\n}\n.pl-1 {\n padding-left: 0.25rem;\n}\n.pl-2 {\n padding-left: 0.5rem;\n}\n.pr-0 {\n padding-right: 0px;\n}\n.pr-1 {\n padding-right: 0.25rem;\n}\n.pt-\\[8px\\] {\n padding-top: 8px;\n}\n.font-mono {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n}\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.line-through {\n text-decoration-line: line-through;\n}\n.opacity-50 {\n opacity: 0.5;\n}\n.shadow {\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-slate-300 {\n --tw-shadow-color: #cbd5e1;\n --tw-shadow: var(--tw-shadow-colored);\n}\n.shadow-slate-600 {\n --tw-shadow-color: #475569;\n --tw-shadow: var(--tw-shadow-colored);\n}\n.outline {\n outline-style: solid;\n}\n.filter {\n 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);\n}\n.hover\\:bg-slate-400:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(148 163 184 / var(--tw-bg-opacity));\n}\n.peer:hover ~ .peer-hover\\:border-slate-400 {\n --tw-border-opacity: 1;\n border-color: rgb(148 163 184 / var(--tw-border-opacity));\n}\n.peer:hover ~ .peer-hover\\:bg-slate-300 {\n --tw-bg-opacity: 1;\n background-color: rgb(203 213 225 / var(--tw-bg-opacity));\n}\n.data-\\[focused\\]\\:bg-slate-400[data-focused] {\n --tw-bg-opacity: 1;\n background-color: rgb(148 163 184 / var(--tw-bg-opacity));\n}\n.peer[data-focused] ~ .peer-data-\\[focused\\]\\:border-slate-400 {\n --tw-border-opacity: 1;\n border-color: rgb(148 163 184 / var(--tw-border-opacity));\n}\n.peer[data-focused] ~ .peer-data-\\[focused\\]\\:bg-slate-300 {\n --tw-bg-opacity: 1;\n background-color: rgb(203 213 225 / var(--tw-bg-opacity));\n}\n";
|
|
2
2
|
export {
|
|
3
3
|
twStyle as default
|
|
4
4
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -14,3 +14,4 @@ export { EFToggleLoop } from './gui/EFToggleLoop.js';
|
|
|
14
14
|
export { EFScrubber } from './gui/EFScrubber.js';
|
|
15
15
|
export { EFTimeDisplay } from './gui/EFTimeDisplay.js';
|
|
16
16
|
export { EFFocusOverlay } from './gui/EFFocusOverlay.js';
|
|
17
|
+
export { getRenderInfo, RenderInfo } from './getRenderInfo.js';
|
package/dist/index.js
CHANGED
|
@@ -16,6 +16,7 @@ import { EFScrubber } from "./gui/EFScrubber.js";
|
|
|
16
16
|
import { EFTimeDisplay } from "./gui/EFTimeDisplay.js";
|
|
17
17
|
import { EFFocusOverlay } from "./gui/EFFocusOverlay.js";
|
|
18
18
|
import "./EF_FRAMEGEN.js";
|
|
19
|
+
import { RenderInfo, getRenderInfo } from "./getRenderInfo.js";
|
|
19
20
|
if (typeof window !== "undefined") {
|
|
20
21
|
window.EF_REGISTERED = true;
|
|
21
22
|
}
|
|
@@ -38,5 +39,7 @@ export {
|
|
|
38
39
|
EFTogglePlay,
|
|
39
40
|
EFVideo,
|
|
40
41
|
EFWaveform,
|
|
41
|
-
EFWorkbench
|
|
42
|
+
EFWorkbench,
|
|
43
|
+
RenderInfo,
|
|
44
|
+
getRenderInfo
|
|
42
45
|
};
|
package/dist/style.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@editframe/elements",
|
|
3
|
-
"version": "0.15.0-beta.
|
|
3
|
+
"version": "0.15.0-beta.11",
|
|
4
4
|
"description": "",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -9,26 +9,32 @@
|
|
|
9
9
|
"default": "./dist/index.js"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
|
-
"./styles.css": "./dist/style.css"
|
|
12
|
+
"./styles.css": "./dist/style.css",
|
|
13
|
+
"./types.json": {
|
|
14
|
+
"import": {
|
|
15
|
+
"default": "./types.json"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
13
18
|
},
|
|
14
19
|
"type": "module",
|
|
15
20
|
"scripts": {
|
|
16
21
|
"typecheck": "tsc --noEmit --emitDeclarationOnly false",
|
|
17
22
|
"build": "vite build",
|
|
18
23
|
"build:watch": "vite build --watch",
|
|
19
|
-
"typedoc": "typedoc --json
|
|
24
|
+
"typedoc": "typedoc --json ./types.json --plugin typedoc-plugin-zod --excludeExternals ./src && jq -c . ./types.json > ./types.tmp.json && mv ./types.tmp.json ./types.json"
|
|
20
25
|
},
|
|
21
26
|
"author": "",
|
|
22
27
|
"license": "UNLICENSED",
|
|
23
28
|
"dependencies": {
|
|
24
29
|
"@bramus/style-observer": "^1.3.0",
|
|
25
|
-
"@editframe/assets": "0.15.0-beta.
|
|
30
|
+
"@editframe/assets": "0.15.0-beta.11",
|
|
26
31
|
"@lit/context": "^1.1.2",
|
|
27
32
|
"@lit/task": "^1.0.1",
|
|
28
33
|
"d3": "^7.9.0",
|
|
29
34
|
"debug": "^4.3.5",
|
|
30
35
|
"lit": "^3.1.4",
|
|
31
|
-
"mp4box": "^0.5.2"
|
|
36
|
+
"mp4box": "^0.5.2",
|
|
37
|
+
"zod": "^3.24.1"
|
|
32
38
|
},
|
|
33
39
|
"devDependencies": {
|
|
34
40
|
"@types/d3": "^7.4.3",
|
package/src/elements/EFAudio.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Task } from "@lit/task";
|
|
2
2
|
import { html } from "lit";
|
|
3
|
-
import { customElement
|
|
3
|
+
import { customElement } from "lit/decorators.js";
|
|
4
4
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
5
5
|
import { EFMedia } from "./EFMedia.js";
|
|
6
6
|
|
|
@@ -8,9 +8,6 @@ import { EFMedia } from "./EFMedia.js";
|
|
|
8
8
|
export class EFAudio extends EFMedia {
|
|
9
9
|
audioElementRef = createRef<HTMLAudioElement>();
|
|
10
10
|
|
|
11
|
-
@property({ type: String })
|
|
12
|
-
src = "";
|
|
13
|
-
|
|
14
11
|
render() {
|
|
15
12
|
return html`<audio ${ref(this.audioElementRef)}></audio>`;
|
|
16
13
|
}
|
|
@@ -373,7 +373,7 @@ export class EFCaptions extends EFSourceMixin(
|
|
|
373
373
|
return;
|
|
374
374
|
}
|
|
375
375
|
|
|
376
|
-
const currentTimeMs = this.targetElement.
|
|
376
|
+
const currentTimeMs = this.targetElement.currentSourceTimeMs;
|
|
377
377
|
const currentTimeSec = currentTimeMs / 1000;
|
|
378
378
|
|
|
379
379
|
// Find the current word from word_segments
|
package/src/elements/EFMedia.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { EF_RENDERING } from "../EF_RENDERING.js";
|
|
|
14
14
|
import { EFSourceMixin } from "./EFSourceMixin.js";
|
|
15
15
|
import { EFTemporal, isEFTemporal } from "./EFTemporal.js";
|
|
16
16
|
import { FetchMixin } from "./FetchMixin.js";
|
|
17
|
+
import { EFTargetable } from "./TargetController.ts";
|
|
17
18
|
|
|
18
19
|
const log = debug("ef:elements:EFMedia");
|
|
19
20
|
|
|
@@ -43,15 +44,14 @@ class LRUCache<K, V> {
|
|
|
43
44
|
} else if (this.cache.size >= this.maxSize) {
|
|
44
45
|
// Remove oldest entry (first item in map)
|
|
45
46
|
const firstKey = this.cache.keys().next().value;
|
|
46
|
-
|
|
47
|
+
if (firstKey) {
|
|
48
|
+
this.cache.delete(firstKey);
|
|
49
|
+
}
|
|
47
50
|
}
|
|
48
51
|
this.cache.set(key, value);
|
|
49
52
|
}
|
|
50
53
|
}
|
|
51
54
|
|
|
52
|
-
// Cache individual frame analyses
|
|
53
|
-
const frequencyDataCache = new LRUCache<string, Uint8Array>(100);
|
|
54
|
-
|
|
55
55
|
export const deepGetMediaElements = (
|
|
56
56
|
element: Element,
|
|
57
57
|
medias: EFMedia[] = [],
|
|
@@ -66,9 +66,11 @@ export const deepGetMediaElements = (
|
|
|
66
66
|
return medias;
|
|
67
67
|
};
|
|
68
68
|
|
|
69
|
-
export class EFMedia extends
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
export class EFMedia extends EFTargetable(
|
|
70
|
+
EFSourceMixin(EFTemporal(FetchMixin(LitElement)), {
|
|
71
|
+
assetType: "isobmff_files",
|
|
72
|
+
}),
|
|
73
|
+
) {
|
|
72
74
|
static styles = [
|
|
73
75
|
css`
|
|
74
76
|
:host {
|
|
@@ -319,7 +321,8 @@ export class EFMedia extends EFSourceMixin(EFTemporal(FetchMixin(LitElement)), {
|
|
|
319
321
|
},
|
|
320
322
|
});
|
|
321
323
|
|
|
322
|
-
@state()
|
|
324
|
+
@state()
|
|
325
|
+
desiredSeekTimeMs = 0;
|
|
323
326
|
|
|
324
327
|
protected async executeSeek(seekToMs: number) {
|
|
325
328
|
this.desiredSeekTimeMs = seekToMs;
|
|
@@ -329,7 +332,7 @@ export class EFMedia extends EFSourceMixin(EFTemporal(FetchMixin(LitElement)), {
|
|
|
329
332
|
changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>,
|
|
330
333
|
): void {
|
|
331
334
|
if (changedProperties.has("ownCurrentTimeMs")) {
|
|
332
|
-
this.executeSeek(this.
|
|
335
|
+
this.executeSeek(this.currentSourceTimeMs);
|
|
333
336
|
}
|
|
334
337
|
// TODO: this is copied straight from EFTimegroup.ts
|
|
335
338
|
// and should be refactored to be shared/reduce bad duplication of
|
|
@@ -344,13 +347,9 @@ export class EFMedia extends EFSourceMixin(EFTemporal(FetchMixin(LitElement)), {
|
|
|
344
347
|
this.endTimeMs < timelineTimeMs
|
|
345
348
|
) {
|
|
346
349
|
this.style.display = "none";
|
|
347
|
-
// this.style.zIndex = "";
|
|
348
|
-
// this.style.opacity = "0";
|
|
349
350
|
return;
|
|
350
351
|
}
|
|
351
352
|
this.style.display = "";
|
|
352
|
-
// this.style.zIndex = "100000";
|
|
353
|
-
// this.style.opacity = "";
|
|
354
353
|
const animations = this.getAnimations({ subtree: true });
|
|
355
354
|
|
|
356
355
|
this.style.setProperty("--ef-duration", `${this.durationMs}ms`);
|
|
@@ -617,18 +616,148 @@ export class EFMedia extends EFSourceMixin(EFTemporal(FetchMixin(LitElement)), {
|
|
|
617
616
|
return weights;
|
|
618
617
|
}
|
|
619
618
|
|
|
619
|
+
#byteTimeDomainCache = new LRUCache<string, Uint8Array>(100);
|
|
620
|
+
|
|
621
|
+
byteTimeDomainTask = new Task(this, {
|
|
622
|
+
autoRun: EF_INTERACTIVE,
|
|
623
|
+
args: () =>
|
|
624
|
+
[
|
|
625
|
+
this.audioBufferTask.status,
|
|
626
|
+
this.currentSourceTimeMs,
|
|
627
|
+
this.fftSize,
|
|
628
|
+
this.fftDecay,
|
|
629
|
+
] as const,
|
|
630
|
+
task: async () => {
|
|
631
|
+
await this.audioBufferTask.taskComplete;
|
|
632
|
+
if (!this.audioBufferTask.value) return null;
|
|
633
|
+
if (this.currentSourceTimeMs <= 0) return null;
|
|
634
|
+
|
|
635
|
+
const currentTimeMs = this.currentSourceTimeMs;
|
|
636
|
+
const startOffsetMs = this.audioBufferTask.value.startOffsetMs;
|
|
637
|
+
const audioBuffer = this.audioBufferTask.value.buffer;
|
|
638
|
+
const smoothedKey = `${this.fftSize}:${this.fftDecay}:${startOffsetMs}:${currentTimeMs}`;
|
|
639
|
+
|
|
640
|
+
const cachedSmoothedData = this.#byteTimeDomainCache.get(smoothedKey);
|
|
641
|
+
if (cachedSmoothedData) {
|
|
642
|
+
return cachedSmoothedData;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
const framesData = await Promise.all(
|
|
646
|
+
Array.from({ length: this.fftDecay }, async (_, i) => {
|
|
647
|
+
const frameOffset = i * (1000 / 30);
|
|
648
|
+
const startTime = Math.max(
|
|
649
|
+
0,
|
|
650
|
+
(currentTimeMs - frameOffset - startOffsetMs) / 1000,
|
|
651
|
+
);
|
|
652
|
+
|
|
653
|
+
const cacheKey = `${this.fftSize}:${startOffsetMs}:${startTime}`;
|
|
654
|
+
const cachedFrame = this.#byteTimeDomainCache.get(cacheKey);
|
|
655
|
+
if (cachedFrame) {
|
|
656
|
+
return cachedFrame;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
const audioContext = new OfflineAudioContext(
|
|
660
|
+
2,
|
|
661
|
+
48000 * (1 / 30),
|
|
662
|
+
48000,
|
|
663
|
+
);
|
|
664
|
+
const analyser = audioContext.createAnalyser();
|
|
665
|
+
analyser.fftSize = this.fftSize;
|
|
666
|
+
|
|
667
|
+
// Increase gain even more for better signal
|
|
668
|
+
const gainNode = audioContext.createGain();
|
|
669
|
+
gainNode.gain.value = 10.0; // Try a higher gain
|
|
670
|
+
|
|
671
|
+
// More aggressive settings for the analyzer
|
|
672
|
+
analyser.smoothingTimeConstant = 0.4;
|
|
673
|
+
analyser.minDecibels = -90;
|
|
674
|
+
analyser.maxDecibels = -10;
|
|
675
|
+
|
|
676
|
+
const audioBufferSource = audioContext.createBufferSource();
|
|
677
|
+
audioBufferSource.buffer = audioBuffer;
|
|
678
|
+
|
|
679
|
+
// Add a bandpass filter to focus on the most active frequency ranges
|
|
680
|
+
const filter = audioContext.createBiquadFilter();
|
|
681
|
+
filter.type = "bandpass";
|
|
682
|
+
filter.frequency.value = 1000; // Center frequency in Hz
|
|
683
|
+
filter.Q.value = 0.5; // Width of the band
|
|
684
|
+
|
|
685
|
+
audioBufferSource.connect(gainNode);
|
|
686
|
+
gainNode.connect(filter);
|
|
687
|
+
filter.connect(analyser);
|
|
688
|
+
analyser.connect(audioContext.destination);
|
|
689
|
+
|
|
690
|
+
audioBufferSource.start(0, startTime, 1 / 30);
|
|
691
|
+
|
|
692
|
+
try {
|
|
693
|
+
await audioContext.startRendering();
|
|
694
|
+
// Change to time domain data
|
|
695
|
+
const frameData = new Uint8Array(analyser.fftSize);
|
|
696
|
+
analyser.getByteTimeDomainData(frameData);
|
|
697
|
+
|
|
698
|
+
this.#byteTimeDomainCache.set(cacheKey, frameData);
|
|
699
|
+
return frameData;
|
|
700
|
+
} finally {
|
|
701
|
+
audioBufferSource.disconnect();
|
|
702
|
+
analyser.disconnect();
|
|
703
|
+
}
|
|
704
|
+
}),
|
|
705
|
+
);
|
|
706
|
+
|
|
707
|
+
const frameLength = framesData[0]?.length ?? 0;
|
|
708
|
+
const smoothedData = new Uint8Array(frameLength);
|
|
709
|
+
|
|
710
|
+
// Combine frames with decay
|
|
711
|
+
for (let i = 0; i < frameLength; i++) {
|
|
712
|
+
let weightedSum = 0;
|
|
713
|
+
let weightSum = 0;
|
|
714
|
+
|
|
715
|
+
framesData.forEach((frame, frameIndex) => {
|
|
716
|
+
const decayWeight = EFMedia.DECAY_WEIGHT ** frameIndex;
|
|
717
|
+
// biome-ignore lint/style/noNonNullAssertion: Will exist due to forEach
|
|
718
|
+
weightedSum += frame[i]! * decayWeight;
|
|
719
|
+
weightSum += decayWeight;
|
|
720
|
+
});
|
|
721
|
+
|
|
722
|
+
smoothedData[i] = Math.min(255, Math.round(weightedSum / weightSum));
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
// Remove frequency weighting since we're using time domain data
|
|
726
|
+
// No need to slice the data either since we want the full waveform
|
|
727
|
+
|
|
728
|
+
this.#byteTimeDomainCache.set(
|
|
729
|
+
smoothedKey,
|
|
730
|
+
smoothedData.slice(0, Math.floor(smoothedData.length * 0.8)),
|
|
731
|
+
);
|
|
732
|
+
return smoothedData;
|
|
733
|
+
},
|
|
734
|
+
});
|
|
735
|
+
|
|
736
|
+
#frequencyDataCache = new LRUCache<string, Uint8Array>(100);
|
|
737
|
+
|
|
620
738
|
frequencyDataTask = new Task(this, {
|
|
621
739
|
autoRun: EF_INTERACTIVE,
|
|
622
740
|
args: () =>
|
|
623
|
-
[
|
|
741
|
+
[
|
|
742
|
+
this.audioBufferTask.status,
|
|
743
|
+
this.currentSourceTimeMs,
|
|
744
|
+
this.fftSize, // Add fftSize to dependency array
|
|
745
|
+
this.fftDecay, // Add fftDecay to dependency array
|
|
746
|
+
] as const,
|
|
624
747
|
task: async () => {
|
|
625
748
|
await this.audioBufferTask.taskComplete;
|
|
626
749
|
if (!this.audioBufferTask.value) return null;
|
|
627
|
-
if (this.
|
|
750
|
+
if (this.currentSourceTimeMs <= 0) return null;
|
|
628
751
|
|
|
629
|
-
const currentTimeMs = this.
|
|
752
|
+
const currentTimeMs = this.currentSourceTimeMs;
|
|
630
753
|
const startOffsetMs = this.audioBufferTask.value.startOffsetMs;
|
|
631
754
|
const audioBuffer = this.audioBufferTask.value.buffer;
|
|
755
|
+
const smoothedKey = `${this.fftSize}:${this.fftDecay}:${startOffsetMs}:${currentTimeMs}`;
|
|
756
|
+
|
|
757
|
+
const cachedSmoothedData = this.#frequencyDataCache.get(smoothedKey);
|
|
758
|
+
if (cachedSmoothedData) {
|
|
759
|
+
return cachedSmoothedData;
|
|
760
|
+
}
|
|
632
761
|
|
|
633
762
|
const framesData = await Promise.all(
|
|
634
763
|
Array.from({ length: this.fftDecay }, async (_, i) => {
|
|
@@ -639,10 +768,10 @@ export class EFMedia extends EFSourceMixin(EFTemporal(FetchMixin(LitElement)), {
|
|
|
639
768
|
);
|
|
640
769
|
|
|
641
770
|
// Cache key for this specific frame
|
|
642
|
-
const cacheKey = `${startOffsetMs}
|
|
771
|
+
const cacheKey = `${this.fftSize}:${startOffsetMs}:${startTime}`;
|
|
643
772
|
|
|
644
773
|
// Check cache for this specific frame
|
|
645
|
-
const cachedFrame = frequencyDataCache.get(cacheKey);
|
|
774
|
+
const cachedFrame = this.#frequencyDataCache.get(cacheKey);
|
|
646
775
|
if (cachedFrame) {
|
|
647
776
|
return cachedFrame;
|
|
648
777
|
}
|
|
@@ -667,11 +796,11 @@ export class EFMedia extends EFSourceMixin(EFTemporal(FetchMixin(LitElement)), {
|
|
|
667
796
|
|
|
668
797
|
try {
|
|
669
798
|
await audioContext.startRendering();
|
|
670
|
-
const frameData = new Uint8Array(
|
|
799
|
+
const frameData = new Uint8Array(this.fftSize / 2);
|
|
671
800
|
analyser.getByteFrequencyData(frameData);
|
|
672
801
|
|
|
673
802
|
// Cache this frame's analysis
|
|
674
|
-
frequencyDataCache.set(cacheKey, frameData);
|
|
803
|
+
this.#frequencyDataCache.set(cacheKey, frameData);
|
|
675
804
|
return frameData;
|
|
676
805
|
} finally {
|
|
677
806
|
audioBufferSource.disconnect();
|
|
@@ -700,12 +829,19 @@ export class EFMedia extends EFSourceMixin(EFTemporal(FetchMixin(LitElement)), {
|
|
|
700
829
|
|
|
701
830
|
// Apply frequency weights using instance FREQ_WEIGHTS
|
|
702
831
|
smoothedData.forEach((value, i) => {
|
|
703
|
-
// biome-ignore lint/style/noNonNullAssertion:
|
|
832
|
+
// biome-ignore lint/style/noNonNullAssertion: Will exist due to forEach
|
|
704
833
|
const freqWeight = this.FREQ_WEIGHTS[i]!;
|
|
705
834
|
smoothedData[i] = Math.min(255, Math.round(value * freqWeight));
|
|
706
835
|
});
|
|
707
836
|
|
|
708
|
-
return
|
|
837
|
+
// Only return the lower half of the frequency data
|
|
838
|
+
// The top half is zeroed out, which makes for aesthetically unpleasing waveforms
|
|
839
|
+
const slicedData = smoothedData.slice(
|
|
840
|
+
0,
|
|
841
|
+
Math.floor(smoothedData.length / 2),
|
|
842
|
+
);
|
|
843
|
+
this.#frequencyDataCache.set(smoothedKey, slicedData);
|
|
844
|
+
return slicedData;
|
|
709
845
|
},
|
|
710
846
|
});
|
|
711
847
|
}
|
|
@@ -151,18 +151,18 @@ export declare class TemporalMixinInterface {
|
|
|
151
151
|
* elements.
|
|
152
152
|
*
|
|
153
153
|
* For example, if the media has a `sourcein` value of 10s, when `ownCurrentTimeMs` is 0s,
|
|
154
|
-
* `
|
|
154
|
+
* `currentSourceTimeMs` will be 10s.
|
|
155
155
|
*
|
|
156
156
|
* sourcein=10s sourceout=10s
|
|
157
157
|
* / / /
|
|
158
158
|
* |--------|=================|---------|
|
|
159
159
|
* ^
|
|
160
160
|
* |_
|
|
161
|
-
*
|
|
161
|
+
* currentSourceTimeMs === 10s
|
|
162
162
|
* |_
|
|
163
163
|
* ownCurrentTimeMs === 0s
|
|
164
164
|
*/
|
|
165
|
-
get
|
|
165
|
+
get currentSourceTimeMs(): number;
|
|
166
166
|
|
|
167
167
|
set duration(value: string);
|
|
168
168
|
get duration(): string;
|
|
@@ -567,6 +567,10 @@ export const EFTemporal = <T extends Constructor<LitElement>>(
|
|
|
567
567
|
return this.startTimeMs + this.durationMs;
|
|
568
568
|
}
|
|
569
569
|
|
|
570
|
+
/**
|
|
571
|
+
* The current time of the element within itself.
|
|
572
|
+
* Compare with `currentTimeMs` to see the current time with respect to the root timegroup
|
|
573
|
+
*/
|
|
570
574
|
get ownCurrentTimeMs() {
|
|
571
575
|
if (this.rootTimegroup) {
|
|
572
576
|
return Math.min(
|
|
@@ -581,7 +585,7 @@ export const EFTemporal = <T extends Constructor<LitElement>>(
|
|
|
581
585
|
* Used to calculate the internal currentTimeMs of the element. This is useful
|
|
582
586
|
* for mapping to internal media time codes for audio/video elements.
|
|
583
587
|
*/
|
|
584
|
-
get
|
|
588
|
+
get currentSourceTimeMs() {
|
|
585
589
|
if (this.rootTimegroup) {
|
|
586
590
|
if (this.sourceInMs && this.sourceOutMs) {
|
|
587
591
|
return Math.min(
|
|
@@ -632,17 +636,13 @@ export const EFTemporal = <T extends Constructor<LitElement>>(
|
|
|
632
636
|
) {
|
|
633
637
|
const timelineTimeMs = (this.rootTimegroup ?? this).ownCurrentTimeMs;
|
|
634
638
|
if (
|
|
635
|
-
this.startTimeMs
|
|
636
|
-
this.endTimeMs
|
|
639
|
+
this.startTimeMs > timelineTimeMs ||
|
|
640
|
+
this.endTimeMs < timelineTimeMs
|
|
637
641
|
) {
|
|
638
642
|
this.style.display = "none";
|
|
639
|
-
// this.style.zIndex = "";
|
|
640
|
-
// this.style.opacity = "0";
|
|
641
643
|
return;
|
|
642
644
|
}
|
|
643
645
|
this.style.display = "";
|
|
644
|
-
// this.style.zIndex = "100000";
|
|
645
|
-
// this.style.opacity = "";
|
|
646
646
|
}
|
|
647
647
|
}
|
|
648
648
|
}
|
|
@@ -53,7 +53,7 @@ export class EFTimegroup extends EFTemporal(LitElement) {
|
|
|
53
53
|
type: String,
|
|
54
54
|
attribute: "mode",
|
|
55
55
|
})
|
|
56
|
-
mode: "fixed" | "sequence" | "contain" = "
|
|
56
|
+
mode: "fixed" | "sequence" | "contain" = "contain";
|
|
57
57
|
|
|
58
58
|
@property({
|
|
59
59
|
type: Number,
|
|
@@ -67,7 +67,7 @@ export class EFTimegroup extends EFTemporal(LitElement) {
|
|
|
67
67
|
|
|
68
68
|
#resizeObserver?: ResizeObserver;
|
|
69
69
|
|
|
70
|
-
@property({ type: Number })
|
|
70
|
+
@property({ type: Number, attribute: "currenttime" })
|
|
71
71
|
set currentTime(time: number) {
|
|
72
72
|
this.#currentTime = Math.max(0, Math.min(time, this.durationMs / 1000));
|
|
73
73
|
try {
|
|
@@ -227,10 +227,9 @@ export class EFTimegroup extends EFTemporal(LitElement) {
|
|
|
227
227
|
* in calculations and it was not clear why.
|
|
228
228
|
*/
|
|
229
229
|
async waitForMediaDurations() {
|
|
230
|
+
const mediaElements = deepGetMediaElements(this);
|
|
230
231
|
return await Promise.all(
|
|
231
|
-
|
|
232
|
-
(media) => media.initSegmentsLoader.taskComplete,
|
|
233
|
-
),
|
|
232
|
+
mediaElements.map((m) => m.trackFragmentIndexLoader.taskComplete),
|
|
234
233
|
);
|
|
235
234
|
}
|
|
236
235
|
|
|
@@ -258,13 +257,9 @@ export class EFTimegroup extends EFTemporal(LitElement) {
|
|
|
258
257
|
const timelineTimeMs = (this.rootTimegroup ?? this).currentTimeMs;
|
|
259
258
|
if (this.startTimeMs > timelineTimeMs || this.endTimeMs < timelineTimeMs) {
|
|
260
259
|
this.style.display = "none";
|
|
261
|
-
// this.style.zIndex = "";
|
|
262
|
-
// this.style.opacity = "0";
|
|
263
260
|
return;
|
|
264
261
|
}
|
|
265
262
|
this.style.display = "";
|
|
266
|
-
// this.style.zIndex = "100000";
|
|
267
|
-
// this.style.opacity = "";
|
|
268
263
|
const animations = this.getAnimations({ subtree: true });
|
|
269
264
|
this.style.setProperty("--ef-duration", `${this.durationMs}ms`);
|
|
270
265
|
this.style.setProperty(
|