@editframe/elements 0.15.0-beta.9 → 0.16.0-beta.1
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.d.ts +14 -10
- package/dist/EF_FRAMEGEN.js +17 -28
- package/dist/elements/EFCaptions.js +0 -7
- package/dist/elements/EFImage.js +0 -4
- package/dist/elements/EFMedia.d.ts +13 -8
- package/dist/elements/EFMedia.js +163 -146
- package/dist/elements/EFSourceMixin.js +2 -1
- package/dist/elements/EFTemporal.browsertest.d.ts +4 -3
- package/dist/elements/EFTemporal.d.ts +14 -11
- package/dist/elements/EFTemporal.js +63 -87
- package/dist/elements/EFTimegroup.d.ts +2 -4
- package/dist/elements/EFTimegroup.js +15 -103
- package/dist/elements/EFVideo.js +3 -1
- package/dist/elements/EFWaveform.d.ts +1 -1
- package/dist/elements/EFWaveform.js +11 -28
- package/dist/elements/durationConverter.d.ts +8 -8
- package/dist/elements/durationConverter.js +2 -2
- package/dist/elements/updateAnimations.d.ts +9 -0
- package/dist/elements/updateAnimations.js +62 -0
- package/dist/getRenderInfo.d.ts +51 -0
- package/dist/getRenderInfo.js +72 -0
- package/dist/gui/EFFilmstrip.js +7 -16
- package/dist/gui/EFFitScale.d.ts +27 -0
- package/dist/gui/EFFitScale.js +138 -0
- package/dist/gui/EFWorkbench.d.ts +2 -5
- package/dist/gui/EFWorkbench.js +11 -56
- package/dist/gui/TWMixin.css.js +1 -1
- package/dist/gui/TWMixin.js +14 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +6 -1
- package/dist/style.css +3 -3
- package/package.json +4 -3
- package/src/elements/EFCaptions.browsertest.ts +2 -2
- package/src/elements/EFCaptions.ts +0 -7
- package/src/elements/EFImage.browsertest.ts +2 -2
- package/src/elements/EFImage.ts +0 -4
- package/src/elements/EFMedia.browsertest.ts +14 -14
- package/src/elements/EFMedia.ts +219 -182
- package/src/elements/EFSourceMixin.ts +4 -4
- package/src/elements/EFTemporal.browsertest.ts +64 -31
- package/src/elements/EFTemporal.ts +99 -119
- package/src/elements/EFTimegroup.ts +15 -133
- package/src/elements/EFVideo.ts +3 -1
- package/src/elements/EFWaveform.ts +10 -44
- package/src/elements/durationConverter.ts +9 -4
- package/src/elements/updateAnimations.ts +88 -0
- package/src/gui/ContextMixin.ts +0 -3
- package/src/gui/EFFilmstrip.ts +7 -16
- package/src/gui/EFFitScale.ts +152 -0
- package/src/gui/EFWorkbench.ts +16 -65
- package/src/gui/TWMixin.ts +19 -2
- package/types.json +1 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const RenderInfo: z.ZodObject<{
|
|
3
|
+
width: z.ZodNumber;
|
|
4
|
+
height: z.ZodNumber;
|
|
5
|
+
fps: z.ZodNumber;
|
|
6
|
+
durationMs: z.ZodNumber;
|
|
7
|
+
assets: z.ZodObject<{
|
|
8
|
+
efMedia: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
9
|
+
efCaptions: z.ZodArray<z.ZodString, "many">;
|
|
10
|
+
efImage: z.ZodArray<z.ZodString, "many">;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
efMedia: Record<string, any>;
|
|
13
|
+
efCaptions: string[];
|
|
14
|
+
efImage: string[];
|
|
15
|
+
}, {
|
|
16
|
+
efMedia: Record<string, any>;
|
|
17
|
+
efCaptions: string[];
|
|
18
|
+
efImage: string[];
|
|
19
|
+
}>;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
durationMs: number;
|
|
24
|
+
fps: number;
|
|
25
|
+
assets: {
|
|
26
|
+
efMedia: Record<string, any>;
|
|
27
|
+
efCaptions: string[];
|
|
28
|
+
efImage: string[];
|
|
29
|
+
};
|
|
30
|
+
}, {
|
|
31
|
+
width: number;
|
|
32
|
+
height: number;
|
|
33
|
+
durationMs: number;
|
|
34
|
+
fps: number;
|
|
35
|
+
assets: {
|
|
36
|
+
efMedia: Record<string, any>;
|
|
37
|
+
efCaptions: string[];
|
|
38
|
+
efImage: string[];
|
|
39
|
+
};
|
|
40
|
+
}>;
|
|
41
|
+
export declare const getRenderInfo: () => Promise<{
|
|
42
|
+
width: number;
|
|
43
|
+
height: number;
|
|
44
|
+
fps: number;
|
|
45
|
+
durationMs: number;
|
|
46
|
+
assets: {
|
|
47
|
+
efMedia: Record<string, any>;
|
|
48
|
+
efCaptions: string[];
|
|
49
|
+
efImage: string[];
|
|
50
|
+
};
|
|
51
|
+
}>;
|
|
@@ -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/EFFilmstrip.js
CHANGED
|
@@ -74,30 +74,21 @@ class FilmstripItem extends TWMixin(LitElement) {
|
|
|
74
74
|
get isFocused() {
|
|
75
75
|
return this.element && this.focusContext?.focusedElement === this.element;
|
|
76
76
|
}
|
|
77
|
+
// Gutter styles represent the entire source media.
|
|
78
|
+
// If there is no trim, then the gutter and trim portion are the same.
|
|
77
79
|
get gutterStyles() {
|
|
78
|
-
if (this.element.sourceInMs || this.element.sourceOutMs) {
|
|
79
|
-
return {
|
|
80
|
-
position: "relative",
|
|
81
|
-
left: `${this.pixelsPerMs * (this.element.startTimeWithinParentMs - this.element.trimStartMs - this.element.sourceInMs)}px`,
|
|
82
|
-
width: `${this.pixelsPerMs * (this.element.durationMs + this.element.trimStartMs + this.element.trimEndMs + this.element.sourceOutMs + this.element.sourceInMs)}px`
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
80
|
return {
|
|
86
81
|
position: "relative",
|
|
87
|
-
left: `${this.pixelsPerMs * (this.element.startTimeWithinParentMs - this.element.
|
|
88
|
-
width: `${this.pixelsPerMs * (this.element.
|
|
82
|
+
left: `${this.pixelsPerMs * (this.element.startTimeWithinParentMs - this.element.sourceStartMs)}px`,
|
|
83
|
+
width: `${this.pixelsPerMs * (this.element.intrinsicDurationMs ?? this.element.durationMs)}px`
|
|
89
84
|
};
|
|
90
85
|
}
|
|
86
|
+
// Trim portion is the section of source that will be placed in the timeline
|
|
87
|
+
// If there is no trim, then the gutter and trim portion are the same.
|
|
91
88
|
get trimPortionStyles() {
|
|
92
|
-
if (this.element.sourceInMs || this.element.sourceOutMs) {
|
|
93
|
-
return {
|
|
94
|
-
width: `${this.pixelsPerMs * this.element.durationMs}px`,
|
|
95
|
-
left: `${this.pixelsPerMs * (this.element.trimStartMs + this.element.sourceInMs)}px`
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
89
|
return {
|
|
99
90
|
width: `${this.pixelsPerMs * this.element.durationMs}px`,
|
|
100
|
-
left: `${this.pixelsPerMs * this.element.
|
|
91
|
+
left: `${this.pixelsPerMs * this.element.sourceStartMs}px`
|
|
101
92
|
};
|
|
102
93
|
}
|
|
103
94
|
render() {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class EFFitScale extends LitElement {
|
|
3
|
+
containerRef: import('lit-html/directives/ref.js').Ref<HTMLDivElement>;
|
|
4
|
+
contentRef: import('lit-html/directives/ref.js').Ref<HTMLSlotElement>;
|
|
5
|
+
createRenderRoot(): this;
|
|
6
|
+
uniqueId: string;
|
|
7
|
+
private scale;
|
|
8
|
+
private animationFrameId?;
|
|
9
|
+
get contentChild(): HTMLElement | null;
|
|
10
|
+
get scaleInfo(): {
|
|
11
|
+
scale: number;
|
|
12
|
+
containerWidth: number;
|
|
13
|
+
containerHeight: number;
|
|
14
|
+
contentWidth: number;
|
|
15
|
+
contentHeight: number;
|
|
16
|
+
};
|
|
17
|
+
scaleLastSetOn: HTMLElement | null;
|
|
18
|
+
setScale: () => void;
|
|
19
|
+
removeScale: () => void;
|
|
20
|
+
connectedCallback(): void;
|
|
21
|
+
disconnectedCallback(): void;
|
|
22
|
+
}
|
|
23
|
+
declare global {
|
|
24
|
+
interface HTMLElementTagNameMap {
|
|
25
|
+
"ef-fit-scale": EFFitScale;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import { state, customElement } from "lit/decorators.js";
|
|
3
|
+
import { createRef } from "lit/directives/ref.js";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
7
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
8
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9
|
+
if (decorator = decorators[i])
|
|
10
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11
|
+
if (kind && result) __defProp(target, key, result);
|
|
12
|
+
return result;
|
|
13
|
+
};
|
|
14
|
+
let EFFitScale = class extends LitElement {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
this.containerRef = createRef();
|
|
18
|
+
this.contentRef = createRef();
|
|
19
|
+
this.uniqueId = Math.random().toString(36).substring(2, 15);
|
|
20
|
+
this.scale = 1;
|
|
21
|
+
this.scaleLastSetOn = null;
|
|
22
|
+
this.setScale = () => {
|
|
23
|
+
if (this.isConnected) {
|
|
24
|
+
const { scale } = this.scaleInfo;
|
|
25
|
+
if (this.contentChild) {
|
|
26
|
+
const containerRect = this.getBoundingClientRect();
|
|
27
|
+
const contentRect = this.contentChild.getBoundingClientRect();
|
|
28
|
+
const unscaledWidth = contentRect.width / this.scale;
|
|
29
|
+
const unscaledHeight = contentRect.height / this.scale;
|
|
30
|
+
const scaledWidth = unscaledWidth * scale;
|
|
31
|
+
const scaledHeight = unscaledHeight * scale;
|
|
32
|
+
const translateX = (containerRect.width - scaledWidth) / 2;
|
|
33
|
+
const translateY = (containerRect.height - scaledHeight) / 2;
|
|
34
|
+
if (this.scaleLastSetOn !== this.contentChild) {
|
|
35
|
+
this.removeScale();
|
|
36
|
+
}
|
|
37
|
+
Object.assign(this.contentChild.style, {
|
|
38
|
+
transform: `translate(${translateX.toFixed(4)}px, ${translateY.toFixed(4)}px) scale(${scale.toFixed(4)})`,
|
|
39
|
+
transformOrigin: "top left"
|
|
40
|
+
});
|
|
41
|
+
this.scale = scale;
|
|
42
|
+
this.scaleLastSetOn = this.contentChild;
|
|
43
|
+
}
|
|
44
|
+
this.animationFrameId = requestAnimationFrame(this.setScale);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
this.removeScale = () => {
|
|
48
|
+
if (this.scaleLastSetOn) {
|
|
49
|
+
Object.assign(this.scaleLastSetOn.style, {
|
|
50
|
+
transform: "",
|
|
51
|
+
transformOrigin: ""
|
|
52
|
+
});
|
|
53
|
+
this.scaleLastSetOn = null;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
createRenderRoot() {
|
|
58
|
+
Object.assign(this.style, {
|
|
59
|
+
display: "grid",
|
|
60
|
+
width: "100%",
|
|
61
|
+
height: "100%",
|
|
62
|
+
gridTemplateColumns: "100%",
|
|
63
|
+
gridTemplateRows: "100%",
|
|
64
|
+
overflow: "hidden",
|
|
65
|
+
boxSizing: "border-box",
|
|
66
|
+
contain: "strict",
|
|
67
|
+
position: "relative"
|
|
68
|
+
});
|
|
69
|
+
this.id = `${this.uniqueId}`;
|
|
70
|
+
return this;
|
|
71
|
+
}
|
|
72
|
+
get contentChild() {
|
|
73
|
+
const firstElement = this.children[0];
|
|
74
|
+
if (!firstElement) return null;
|
|
75
|
+
let current = firstElement;
|
|
76
|
+
while (current) {
|
|
77
|
+
if (current instanceof HTMLSlotElement) {
|
|
78
|
+
const assigned = current.assignedElements()[0];
|
|
79
|
+
if (!assigned) break;
|
|
80
|
+
current = assigned;
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
const display = window.getComputedStyle(current).display;
|
|
84
|
+
if (display !== "contents" && display !== "none") {
|
|
85
|
+
return current;
|
|
86
|
+
}
|
|
87
|
+
const firstChild = current.children[0];
|
|
88
|
+
if (!firstChild) break;
|
|
89
|
+
current = firstChild;
|
|
90
|
+
}
|
|
91
|
+
return firstElement;
|
|
92
|
+
}
|
|
93
|
+
get scaleInfo() {
|
|
94
|
+
if (!this.contentChild) {
|
|
95
|
+
return {
|
|
96
|
+
scale: 1,
|
|
97
|
+
containerWidth: 0,
|
|
98
|
+
containerHeight: 0,
|
|
99
|
+
contentWidth: 0,
|
|
100
|
+
contentHeight: 0
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
const containerWidth = this.clientWidth;
|
|
104
|
+
const containerHeight = this.clientHeight;
|
|
105
|
+
const contentWidth = this.contentChild.clientWidth;
|
|
106
|
+
const contentHeight = this.contentChild.clientHeight;
|
|
107
|
+
const containerRatio = containerWidth / containerHeight;
|
|
108
|
+
const contentRatio = contentWidth / contentHeight;
|
|
109
|
+
const scale = containerRatio > contentRatio ? containerHeight / contentHeight : containerWidth / contentWidth;
|
|
110
|
+
return {
|
|
111
|
+
scale,
|
|
112
|
+
containerWidth,
|
|
113
|
+
containerHeight,
|
|
114
|
+
contentWidth,
|
|
115
|
+
contentHeight
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
connectedCallback() {
|
|
119
|
+
super.connectedCallback();
|
|
120
|
+
this.animationFrameId = requestAnimationFrame(this.setScale);
|
|
121
|
+
}
|
|
122
|
+
disconnectedCallback() {
|
|
123
|
+
super.disconnectedCallback();
|
|
124
|
+
this.removeScale();
|
|
125
|
+
if (this.animationFrameId) {
|
|
126
|
+
cancelAnimationFrame(this.animationFrameId);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
__decorateClass([
|
|
131
|
+
state()
|
|
132
|
+
], EFFitScale.prototype, "scale", 2);
|
|
133
|
+
EFFitScale = __decorateClass([
|
|
134
|
+
customElement("ef-fit-scale")
|
|
135
|
+
], EFFitScale);
|
|
136
|
+
export {
|
|
137
|
+
EFFitScale
|
|
138
|
+
};
|
|
@@ -2,12 +2,9 @@ import { LitElement, PropertyValueMap } from 'lit';
|
|
|
2
2
|
declare const EFWorkbench_base: (new (...args: any[]) => import('./ContextMixin.js').ContextMixinInterface) & typeof LitElement;
|
|
3
3
|
export declare class EFWorkbench extends EFWorkbench_base {
|
|
4
4
|
static styles: import('lit').CSSResult[];
|
|
5
|
-
|
|
6
|
-
canvasRef: import('lit-html/directives/ref.js').Ref<HTMLSlotElement>;
|
|
7
|
-
handleStageWheel(event: WheelEvent): void;
|
|
5
|
+
rendering: boolean;
|
|
8
6
|
focusOverlay: import('lit-html/directives/ref.js').Ref<HTMLDivElement>;
|
|
9
|
-
|
|
10
|
-
setStageScale: () => void;
|
|
7
|
+
handleStageWheel(event: WheelEvent): void;
|
|
11
8
|
connectedCallback(): void;
|
|
12
9
|
disconnectedCallback(): void;
|
|
13
10
|
update(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
|
package/dist/gui/EFWorkbench.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { html, css, LitElement } from "lit";
|
|
2
|
-
import {
|
|
2
|
+
import { property, eventOptions, customElement } from "lit/decorators.js";
|
|
3
3
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
4
4
|
import { ContextMixin } from "./ContextMixin.js";
|
|
5
5
|
import { TWMixin } from "./TWMixin.js";
|
|
@@ -16,45 +16,8 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
16
16
|
let EFWorkbench = class extends ContextMixin(TWMixin(LitElement)) {
|
|
17
17
|
constructor() {
|
|
18
18
|
super(...arguments);
|
|
19
|
-
this.
|
|
20
|
-
this.canvasRef = createRef();
|
|
19
|
+
this.rendering = false;
|
|
21
20
|
this.focusOverlay = createRef();
|
|
22
|
-
this.stageScale = 1;
|
|
23
|
-
this.setStageScale = () => {
|
|
24
|
-
if (this.isConnected && !this.rendering) {
|
|
25
|
-
const canvasElement = this.canvasRef.value;
|
|
26
|
-
const stageElement = this.stageRef.value;
|
|
27
|
-
const canvasChild = canvasElement?.assignedElements()[0];
|
|
28
|
-
if (stageElement && canvasElement && canvasChild) {
|
|
29
|
-
canvasElement.style.width = `${canvasChild.clientWidth}px`;
|
|
30
|
-
canvasElement.style.height = `${canvasChild.clientHeight}px`;
|
|
31
|
-
const stageWidth = stageElement.clientWidth;
|
|
32
|
-
const stageHeight = stageElement.clientHeight;
|
|
33
|
-
const canvasWidth = canvasElement.clientWidth;
|
|
34
|
-
const canvasHeight = canvasElement.clientHeight;
|
|
35
|
-
const stageRatio = stageWidth / stageHeight;
|
|
36
|
-
const canvasRatio = canvasWidth / canvasHeight;
|
|
37
|
-
if (stageRatio > canvasRatio) {
|
|
38
|
-
const scale = stageHeight / canvasHeight;
|
|
39
|
-
if (this.stageScale !== scale) {
|
|
40
|
-
canvasElement.style.transform = `scale(${scale})`;
|
|
41
|
-
canvasElement.style.transformOrigin = "top center";
|
|
42
|
-
}
|
|
43
|
-
this.stageScale = scale;
|
|
44
|
-
} else {
|
|
45
|
-
const scale = stageWidth / canvasWidth;
|
|
46
|
-
if (this.stageScale !== scale) {
|
|
47
|
-
canvasElement.style.transform = `scale(${scale})`;
|
|
48
|
-
canvasElement.style.transformOrigin = "center";
|
|
49
|
-
}
|
|
50
|
-
this.stageScale = scale;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
if (this.isConnected) {
|
|
55
|
-
requestAnimationFrame(this.setStageScale);
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
21
|
this.drawOverlays = () => {
|
|
59
22
|
const focusOverlay = this.focusOverlay.value;
|
|
60
23
|
if (focusOverlay) {
|
|
@@ -84,7 +47,6 @@ let EFWorkbench = class extends ContextMixin(TWMixin(LitElement)) {
|
|
|
84
47
|
document.documentElement.style.width = "100%";
|
|
85
48
|
document.documentElement.style.height = "100%";
|
|
86
49
|
super.connectedCallback();
|
|
87
|
-
requestAnimationFrame(this.setStageScale);
|
|
88
50
|
}
|
|
89
51
|
disconnectedCallback() {
|
|
90
52
|
super.disconnectedCallback();
|
|
@@ -100,13 +62,9 @@ let EFWorkbench = class extends ContextMixin(TWMixin(LitElement)) {
|
|
|
100
62
|
}
|
|
101
63
|
}
|
|
102
64
|
render() {
|
|
103
|
-
if (this.rendering) {
|
|
65
|
+
if (this.rendering || typeof window !== "undefined" && window.EF_RENDERING?.() === true) {
|
|
104
66
|
return html`
|
|
105
|
-
<slot
|
|
106
|
-
${ref(this.canvasRef)}
|
|
107
|
-
class="fixed inset-0 h-full w-full"
|
|
108
|
-
name="canvas"
|
|
109
|
-
></slot>
|
|
67
|
+
<slot class="fixed inset-0 h-full w-full" name="canvas"></slot>
|
|
110
68
|
`;
|
|
111
69
|
}
|
|
112
70
|
return html`
|
|
@@ -115,15 +73,12 @@ let EFWorkbench = class extends ContextMixin(TWMixin(LitElement)) {
|
|
|
115
73
|
style="grid-template-rows: 1fr 300px; grid-template-columns: 100%;"
|
|
116
74
|
>
|
|
117
75
|
<div
|
|
118
|
-
|
|
119
|
-
class="relative grid h-full w-full justify-center overflow-hidden"
|
|
76
|
+
class="relative h-full w-full overflow-hidden"
|
|
120
77
|
@wheel=${this.handleStageWheel}
|
|
121
78
|
>
|
|
122
|
-
<
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
class="inline-block"
|
|
126
|
-
></slot>
|
|
79
|
+
<ef-fit-scale class="h-full grid place-content-center">
|
|
80
|
+
<slot name="canvas" class="contents"></slot>
|
|
81
|
+
</ef-fit-scale>
|
|
127
82
|
<div
|
|
128
83
|
class="border border-blue-500 bg-blue-200 bg-opacity-20 absolute"
|
|
129
84
|
${ref(this.focusOverlay)}
|
|
@@ -144,12 +99,12 @@ EFWorkbench.styles = [
|
|
|
144
99
|
}
|
|
145
100
|
`
|
|
146
101
|
];
|
|
102
|
+
__decorateClass([
|
|
103
|
+
property({ type: Boolean })
|
|
104
|
+
], EFWorkbench.prototype, "rendering", 2);
|
|
147
105
|
__decorateClass([
|
|
148
106
|
eventOptions({ passive: false, capture: true })
|
|
149
107
|
], EFWorkbench.prototype, "handleStageWheel", 1);
|
|
150
|
-
__decorateClass([
|
|
151
|
-
state()
|
|
152
|
-
], EFWorkbench.prototype, "stageScale", 2);
|
|
153
108
|
EFWorkbench = __decorateClass([
|
|
154
109
|
customElement("ef-workbench")
|
|
155
110
|
], EFWorkbench);
|
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.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";
|
|
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.place-content-center {\n place-content: center;\n}\n.items-center {\n align-items: 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/gui/TWMixin.js
CHANGED
|
@@ -18,13 +18,25 @@ function TWMixin(Base) {
|
|
|
18
18
|
"twSheet not found. Probable cause: CSSStyleSheet not supported in this environment"
|
|
19
19
|
);
|
|
20
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
|
+
}
|
|
21
32
|
if (renderRoot?.adoptedStyleSheets) {
|
|
22
33
|
renderRoot.adoptedStyleSheets = [
|
|
23
34
|
twSheet,
|
|
24
|
-
...renderRoot.adoptedStyleSheets
|
|
35
|
+
...renderRoot.adoptedStyleSheets,
|
|
36
|
+
...constructorStylesheets
|
|
25
37
|
];
|
|
26
38
|
} else {
|
|
27
|
-
renderRoot.adoptedStyleSheets = [twSheet];
|
|
39
|
+
renderRoot.adoptedStyleSheets = [twSheet, ...constructorStylesheets];
|
|
28
40
|
}
|
|
29
41
|
return renderRoot;
|
|
30
42
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -14,3 +14,5 @@ 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 { EFFitScale } from './gui/EFFitScale.js';
|
|
18
|
+
export { getRenderInfo, RenderInfo } from './getRenderInfo.js';
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,9 @@ import { EFToggleLoop } from "./gui/EFToggleLoop.js";
|
|
|
15
15
|
import { EFScrubber } from "./gui/EFScrubber.js";
|
|
16
16
|
import { EFTimeDisplay } from "./gui/EFTimeDisplay.js";
|
|
17
17
|
import { EFFocusOverlay } from "./gui/EFFocusOverlay.js";
|
|
18
|
+
import { EFFitScale } from "./gui/EFFitScale.js";
|
|
18
19
|
import "./EF_FRAMEGEN.js";
|
|
20
|
+
import { RenderInfo, getRenderInfo } from "./getRenderInfo.js";
|
|
19
21
|
if (typeof window !== "undefined") {
|
|
20
22
|
window.EF_REGISTERED = true;
|
|
21
23
|
}
|
|
@@ -28,6 +30,7 @@ export {
|
|
|
28
30
|
EFCaptionsSegment,
|
|
29
31
|
EFConfiguration,
|
|
30
32
|
EFFilmstrip,
|
|
33
|
+
EFFitScale,
|
|
31
34
|
EFFocusOverlay,
|
|
32
35
|
EFImage,
|
|
33
36
|
EFPreview,
|
|
@@ -38,5 +41,7 @@ export {
|
|
|
38
41
|
EFTogglePlay,
|
|
39
42
|
EFVideo,
|
|
40
43
|
EFWaveform,
|
|
41
|
-
EFWorkbench
|
|
44
|
+
EFWorkbench,
|
|
45
|
+
RenderInfo,
|
|
46
|
+
getRenderInfo
|
|
42
47
|
};
|
package/dist/style.css
CHANGED
|
@@ -625,12 +625,12 @@ video {
|
|
|
625
625
|
.flex-wrap {
|
|
626
626
|
flex-wrap: wrap;
|
|
627
627
|
}
|
|
628
|
+
.place-content-center {
|
|
629
|
+
place-content: center;
|
|
630
|
+
}
|
|
628
631
|
.items-center {
|
|
629
632
|
align-items: center;
|
|
630
633
|
}
|
|
631
|
-
.justify-center {
|
|
632
|
-
justify-content: center;
|
|
633
|
-
}
|
|
634
634
|
.overflow-auto {
|
|
635
635
|
overflow: auto;
|
|
636
636
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@editframe/elements",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0-beta.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -27,13 +27,14 @@
|
|
|
27
27
|
"license": "UNLICENSED",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@bramus/style-observer": "^1.3.0",
|
|
30
|
-
"@editframe/assets": "0.
|
|
30
|
+
"@editframe/assets": "0.16.0-beta.1",
|
|
31
31
|
"@lit/context": "^1.1.2",
|
|
32
32
|
"@lit/task": "^1.0.1",
|
|
33
33
|
"d3": "^7.9.0",
|
|
34
34
|
"debug": "^4.3.5",
|
|
35
35
|
"lit": "^3.1.4",
|
|
36
|
-
"mp4box": "^0.5.2"
|
|
36
|
+
"mp4box": "^0.5.2",
|
|
37
|
+
"zod": "^3.24.1"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
40
|
"@types/d3": "^7.4.3",
|
|
@@ -15,7 +15,7 @@ describe("EFCaptions", () => {
|
|
|
15
15
|
// biome-ignore lint/performance/noDelete: <explanation>
|
|
16
16
|
delete window.FRAMEGEN_BRIDGE;
|
|
17
17
|
});
|
|
18
|
-
test("captionsPath uses
|
|
18
|
+
test("captionsPath uses http:// protocol", () => {
|
|
19
19
|
const id = v4();
|
|
20
20
|
const workbench = document.createElement("ef-workbench");
|
|
21
21
|
|
|
@@ -28,7 +28,7 @@ describe("EFCaptions", () => {
|
|
|
28
28
|
document.body.appendChild(captions);
|
|
29
29
|
workbench.appendChild(captions);
|
|
30
30
|
expect(captions.captionsPath()).toBe(
|
|
31
|
-
"editframe
|
|
31
|
+
"https://editframe.dev/api/v1/caption_files/550e8400-e29b-41d4-a716-446655440000",
|
|
32
32
|
);
|
|
33
33
|
});
|
|
34
34
|
});
|