@editframe/elements 0.40.3 → 0.40.4
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/canvas/EFCanvas.d.ts +4 -4
- package/dist/canvas/EFCanvasItem.d.ts +4 -4
- package/dist/elements/EFPanZoom.d.ts +4 -4
- package/dist/elements/EFSourceMixin.js +1 -1
- package/dist/elements/EFSourceMixin.js.map +1 -1
- package/dist/elements/EFSurface.d.ts +4 -4
- package/dist/gui/EFFocusOverlay.d.ts +4 -4
- package/dist/gui/EFOverlayLayer.d.ts +4 -4
- package/dist/gui/EFResizableBox.d.ts +4 -4
- package/dist/gui/EFTransformHandles.d.ts +4 -4
- package/package.json +2 -2
|
@@ -5,9 +5,9 @@ import { PanZoomTransform } from "../elements/EFPanZoom.js";
|
|
|
5
5
|
import "./overlays/SelectionOverlay.js";
|
|
6
6
|
import "../gui/EFOverlayLayer.js";
|
|
7
7
|
import "../gui/EFTransformHandles.js";
|
|
8
|
-
import * as
|
|
8
|
+
import * as lit29 from "lit";
|
|
9
9
|
import { LitElement } from "lit";
|
|
10
|
-
import * as
|
|
10
|
+
import * as lit_html27 from "lit-html";
|
|
11
11
|
|
|
12
12
|
//#region src/canvas/EFCanvas.d.ts
|
|
13
13
|
declare const EFCanvas_base: typeof LitElement;
|
|
@@ -87,7 +87,7 @@ declare const EFCanvas_base: typeof LitElement;
|
|
|
87
87
|
* Manages existing elements (EF* elements, divs, etc.) and provides selection functionality.
|
|
88
88
|
*/
|
|
89
89
|
declare class EFCanvas extends EFCanvas_base {
|
|
90
|
-
static styles:
|
|
90
|
+
static styles: lit29.CSSResult[];
|
|
91
91
|
panZoomTransform?: PanZoomTransform;
|
|
92
92
|
elementIdAttribute: string;
|
|
93
93
|
enableTransformHandles: boolean;
|
|
@@ -309,7 +309,7 @@ declare class EFCanvas extends EFCanvas_base {
|
|
|
309
309
|
* Cleanup transform handles.
|
|
310
310
|
*/
|
|
311
311
|
private cleanupTransformHandles;
|
|
312
|
-
render():
|
|
312
|
+
render(): lit_html27.TemplateResult<1>;
|
|
313
313
|
}
|
|
314
314
|
declare global {
|
|
315
315
|
interface HTMLElementTagNameMap {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as lit30 from "lit";
|
|
2
2
|
import { LitElement } from "lit";
|
|
3
|
-
import * as
|
|
3
|
+
import * as lit_html28 from "lit-html";
|
|
4
4
|
|
|
5
5
|
//#region src/canvas/EFCanvasItem.d.ts
|
|
6
6
|
|
|
@@ -28,7 +28,7 @@ import * as lit_html29 from "lit-html";
|
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
30
|
declare class EFCanvasItem extends LitElement {
|
|
31
|
-
static styles:
|
|
31
|
+
static styles: lit30.CSSResult;
|
|
32
32
|
id: string;
|
|
33
33
|
private canvas;
|
|
34
34
|
private api;
|
|
@@ -43,7 +43,7 @@ declare class EFCanvasItem extends LitElement {
|
|
|
43
43
|
* Unregister this element from the canvas.
|
|
44
44
|
*/
|
|
45
45
|
private unregister;
|
|
46
|
-
render():
|
|
46
|
+
render(): lit_html28.TemplateResult<1>;
|
|
47
47
|
}
|
|
48
48
|
declare global {
|
|
49
49
|
interface HTMLElementTagNameMap {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as lit28 from "lit";
|
|
2
2
|
import { LitElement } from "lit";
|
|
3
|
-
import * as
|
|
3
|
+
import * as lit_html26 from "lit-html";
|
|
4
4
|
|
|
5
5
|
//#region src/elements/EFPanZoom.d.ts
|
|
6
6
|
interface PanZoomTransform {
|
|
@@ -9,7 +9,7 @@ interface PanZoomTransform {
|
|
|
9
9
|
scale: number;
|
|
10
10
|
}
|
|
11
11
|
declare class EFPanZoom extends LitElement {
|
|
12
|
-
static styles:
|
|
12
|
+
static styles: lit28.CSSResult[];
|
|
13
13
|
x: number;
|
|
14
14
|
y: number;
|
|
15
15
|
scale: number;
|
|
@@ -89,7 +89,7 @@ declare class EFPanZoom extends LitElement {
|
|
|
89
89
|
* @param padding - Padding factor (0-1), e.g., 0.1 = 10% padding on each side. Default: 0.05
|
|
90
90
|
*/
|
|
91
91
|
fitToContent(padding?: number): void;
|
|
92
|
-
render():
|
|
92
|
+
render(): lit_html26.TemplateResult<1>;
|
|
93
93
|
}
|
|
94
94
|
//#endregion
|
|
95
95
|
export { EFPanZoom, PanZoomTransform };
|
|
@@ -17,7 +17,7 @@ function EFSourceMixin(superClass, options) {
|
|
|
17
17
|
} });
|
|
18
18
|
}
|
|
19
19
|
get apiHost() {
|
|
20
|
-
return this.closest("ef-configuration")?.apiHost ?? this.closest("ef-workbench")?.apiHost ?? this.closest("ef-preview")?.apiHost;
|
|
20
|
+
return this.closest("ef-configuration")?.apiHost ?? this.closest("ef-workbench")?.apiHost ?? this.closest("ef-preview")?.apiHost ?? window.location.origin;
|
|
21
21
|
}
|
|
22
22
|
#md5Value = void 0;
|
|
23
23
|
#md5Promise = null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EFSourceMixin.js","names":["#md5Value","#md5LastSrc","#md5Promise","#doLoadMd5"],"sources":["../../src/elements/EFSourceMixin.ts"],"sourcesContent":["import type { LitElement } from \"lit\";\nimport { property } from \"lit/decorators/property.js\";\n\nexport declare class EFSourceMixinInterface {\n apiHost?: string;\n productionSrc(): string;\n src: string;\n}\n\ninterface EFSourceMixinOptions {\n assetType: string;\n}\ntype Constructor<T = {}> = new (...args: any[]) => T;\nexport function EFSourceMixin<T extends Constructor<LitElement>>(\n superClass: T,\n options: EFSourceMixinOptions,\n) {\n class EFSourceElement extends superClass {\n get apiHost() {\n
|
|
1
|
+
{"version":3,"file":"EFSourceMixin.js","names":["#md5Value","#md5LastSrc","#md5Promise","#doLoadMd5"],"sources":["../../src/elements/EFSourceMixin.ts"],"sourcesContent":["import type { LitElement } from \"lit\";\nimport { property } from \"lit/decorators/property.js\";\n\nexport declare class EFSourceMixinInterface {\n apiHost?: string;\n productionSrc(): string;\n src: string;\n}\n\ninterface EFSourceMixinOptions {\n assetType: string;\n}\ntype Constructor<T = {}> = new (...args: any[]) => T;\nexport function EFSourceMixin<T extends Constructor<LitElement>>(\n superClass: T,\n options: EFSourceMixinOptions,\n) {\n class EFSourceElement extends superClass {\n get apiHost() {\n return (\n (this.closest(\"ef-configuration\") as any)?.apiHost ??\n (this.closest(\"ef-workbench\") as any)?.apiHost ??\n (this.closest(\"ef-preview\") as any)?.apiHost ??\n window.location.origin\n );\n }\n\n @property({ type: String, reflect: true })\n src = \"\";\n\n #md5Value: string | undefined = undefined;\n #md5Promise: Promise<string | undefined> | null = null;\n #md5LastSrc: string | null = null;\n\n productionSrc() {\n if (!this.#md5Value) {\n throw new Error(\n `MD5 sum not available for ${this}. Cannot generate production URL`,\n );\n }\n\n if (!this.apiHost) {\n throw new Error(\n `apiHost not available for ${this}. Cannot generate production URL`,\n );\n }\n\n return `${this.apiHost}/api/v1/${options.assetType}/${this.#md5Value}`;\n }\n\n /**\n * Load MD5 sum for the current source\n */\n async loadMd5Sum(signal?: AbortSignal): Promise<string | undefined> {\n if (this.#md5LastSrc === this.src && this.#md5Value) {\n return this.#md5Value;\n }\n\n if (this.#md5Promise && this.#md5LastSrc === this.src) {\n return this.#md5Promise;\n }\n\n this.#md5LastSrc = this.src;\n this.#md5Promise = this.#doLoadMd5(this.src, signal);\n\n try {\n this.#md5Value = await this.#md5Promise;\n return this.#md5Value;\n } catch (error) {\n if (error instanceof DOMException && error.name === \"AbortError\") {\n throw error;\n }\n console.error(\"EFSourceMixin md5Sum error\", error);\n return undefined;\n } finally {\n this.#md5Promise = null;\n }\n }\n\n async #doLoadMd5(\n src: string,\n signal?: AbortSignal,\n ): Promise<string | undefined> {\n // Normalize the path: remove leading slash and any double slashes\n let normalizedSrc = src.startsWith(\"/\") ? src.slice(1) : src;\n normalizedSrc = normalizedSrc.replace(/^\\/+/, \"\");\n const md5Path = `/api/v1/files/md5?src=${encodeURIComponent(normalizedSrc)}`;\n const response = await fetch(md5Path, { signal });\n if (!response.ok) {\n return undefined;\n }\n const data = await response.json();\n return data.md5 ?? undefined;\n }\n\n /** @internal Exposes md5 state for md5SumLoader proxy without private field access in handler */\n _getMd5Value(): string | undefined {\n return this.#md5Value;\n }\n\n /** @internal Exposes md5 promise state for md5SumLoader proxy */\n _getMd5Promise(): Promise<string | undefined> | null {\n return this.#md5Promise;\n }\n\n /**\n * Compatibility wrapper for code expecting md5SumLoader.value\n */\n md5SumLoader = new Proxy(\n {\n run: () => this.loadMd5Sum(),\n host: this,\n } as unknown as {\n run: () => Promise<string | undefined>;\n host: {\n _getMd5Value: () => string | undefined;\n _getMd5Promise: () => Promise<string | undefined> | null;\n };\n value: string | undefined;\n taskComplete: Promise<string | undefined>;\n },\n {\n get(target, prop) {\n if (prop === \"value\") {\n return target.host._getMd5Value();\n }\n if (prop === \"taskComplete\") {\n const p = target.host._getMd5Promise();\n return p || Promise.resolve(target.host._getMd5Value());\n }\n return (target as any)[prop];\n },\n },\n );\n }\n\n return EFSourceElement as Constructor<EFSourceMixinInterface> & T;\n}\n"],"mappings":";;;;AAaA,SAAgB,cACd,YACA,SACA;CACA,MAAM,wBAAwB,WAAW;;;cAWjC;uBAgFS,IAAI,MACjB;IACE,WAAW,KAAK,YAAY;IAC5B,MAAM;IACP,EASD,EACE,IAAI,QAAQ,MAAM;AAChB,QAAI,SAAS,QACX,QAAO,OAAO,KAAK,cAAc;AAEnC,QAAI,SAAS,eAEX,QADU,OAAO,KAAK,gBAAgB,IAC1B,QAAQ,QAAQ,OAAO,KAAK,cAAc,CAAC;AAEzD,WAAQ,OAAe;MAE1B,CACF;;EAnHD,IAAI,UAAU;AACZ,UACG,KAAK,QAAQ,mBAAmB,EAAU,WAC1C,KAAK,QAAQ,eAAe,EAAU,WACtC,KAAK,QAAQ,aAAa,EAAU,WACrC,OAAO,SAAS;;EAOpB,YAAgC;EAChC,cAAkD;EAClD,cAA6B;EAE7B,gBAAgB;AACd,OAAI,CAAC,MAAKA,SACR,OAAM,IAAI,MACR,6BAA6B,KAAK,kCACnC;AAGH,OAAI,CAAC,KAAK,QACR,OAAM,IAAI,MACR,6BAA6B,KAAK,kCACnC;AAGH,UAAO,GAAG,KAAK,QAAQ,UAAU,QAAQ,UAAU,GAAG,MAAKA;;;;;EAM7D,MAAM,WAAW,QAAmD;AAClE,OAAI,MAAKC,eAAgB,KAAK,OAAO,MAAKD,SACxC,QAAO,MAAKA;AAGd,OAAI,MAAKE,cAAe,MAAKD,eAAgB,KAAK,IAChD,QAAO,MAAKC;AAGd,SAAKD,aAAc,KAAK;AACxB,SAAKC,aAAc,MAAKC,UAAW,KAAK,KAAK,OAAO;AAEpD,OAAI;AACF,UAAKH,WAAY,MAAM,MAAKE;AAC5B,WAAO,MAAKF;YACL,OAAO;AACd,QAAI,iBAAiB,gBAAgB,MAAM,SAAS,aAClD,OAAM;AAER,YAAQ,MAAM,8BAA8B,MAAM;AAClD;aACQ;AACR,UAAKE,aAAc;;;EAIvB,OAAMC,UACJ,KACA,QAC6B;GAE7B,IAAI,gBAAgB,IAAI,WAAW,IAAI,GAAG,IAAI,MAAM,EAAE,GAAG;AACzD,mBAAgB,cAAc,QAAQ,QAAQ,GAAG;GACjD,MAAM,UAAU,yBAAyB,mBAAmB,cAAc;GAC1E,MAAM,WAAW,MAAM,MAAM,SAAS,EAAE,QAAQ,CAAC;AACjD,OAAI,CAAC,SAAS,GACZ;AAGF,WADa,MAAM,SAAS,MAAM,EACtB,OAAO;;;EAIrB,eAAmC;AACjC,UAAO,MAAKH;;;EAId,iBAAqD;AACnD,UAAO,MAAKE;;;aA3Eb,SAAS;EAAE,MAAM;EAAQ,SAAS;EAAM,CAAC;AA6G5C,QAAO"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { FrameRenderable, FrameState } from "../preview/FrameController.js";
|
|
2
2
|
import { ContextMixinInterface } from "../gui/ContextMixin.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as lit27 from "lit";
|
|
4
4
|
import { LitElement } from "lit";
|
|
5
|
-
import * as
|
|
5
|
+
import * as lit_html25 from "lit-html";
|
|
6
6
|
import * as lit_html_directives_ref3 from "lit-html/directives/ref";
|
|
7
7
|
|
|
8
8
|
//#region src/elements/EFSurface.d.ts
|
|
9
9
|
declare class EFSurface extends LitElement implements FrameRenderable {
|
|
10
10
|
#private;
|
|
11
|
-
static styles:
|
|
11
|
+
static styles: lit27.CSSResult[];
|
|
12
12
|
canvasRef: lit_html_directives_ref3.Ref<HTMLCanvasElement>;
|
|
13
13
|
targetElement: ContextMixinInterface | null;
|
|
14
14
|
target: string;
|
|
15
|
-
render():
|
|
15
|
+
render(): lit_html25.TemplateResult<1>;
|
|
16
16
|
get rootTimegroup(): any;
|
|
17
17
|
get currentTimeMs(): number;
|
|
18
18
|
get durationMs(): number;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as lit24 from "lit";
|
|
2
2
|
import { LitElement } from "lit";
|
|
3
|
-
import * as
|
|
3
|
+
import * as lit_html22 from "lit-html";
|
|
4
4
|
import * as lit_html_directives_ref_js3 from "lit-html/directives/ref.js";
|
|
5
5
|
|
|
6
6
|
//#region src/gui/EFFocusOverlay.d.ts
|
|
7
7
|
declare class EFFocusOverlay extends LitElement {
|
|
8
|
-
static styles:
|
|
8
|
+
static styles: lit24.CSSResult;
|
|
9
9
|
focusedElement?: HTMLElement | null;
|
|
10
10
|
overlay: lit_html_directives_ref_js3.Ref<HTMLDivElement>;
|
|
11
11
|
private animationFrame?;
|
|
12
12
|
drawOverlay: () => void;
|
|
13
|
-
render():
|
|
13
|
+
render(): lit_html22.TemplateResult<1>;
|
|
14
14
|
connectedCallback(): void;
|
|
15
15
|
disconnectedCallback(): void;
|
|
16
16
|
protected updated(): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PanZoomTransform } from "../elements/EFPanZoom.js";
|
|
2
2
|
import { EFOverlayItem } from "./EFOverlayItem.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as lit31 from "lit";
|
|
4
4
|
import { LitElement } from "lit";
|
|
5
|
-
import * as
|
|
5
|
+
import * as lit_html29 from "lit-html";
|
|
6
6
|
|
|
7
7
|
//#region src/gui/EFOverlayLayer.d.ts
|
|
8
8
|
|
|
@@ -26,7 +26,7 @@ import * as lit_html22 from "lit-html";
|
|
|
26
26
|
* 2. EFOverlayItem can use this rect for coordinate calculations
|
|
27
27
|
*/
|
|
28
28
|
declare class EFOverlayLayer extends LitElement {
|
|
29
|
-
static styles:
|
|
29
|
+
static styles: lit31.CSSResult[];
|
|
30
30
|
panZoomTransformFromContext?: PanZoomTransform;
|
|
31
31
|
/**
|
|
32
32
|
* Pan/zoom transform as fallback for when context or sibling PanZoom is not available.
|
|
@@ -58,7 +58,7 @@ declare class EFOverlayLayer extends LitElement {
|
|
|
58
58
|
connectedCallback(): void;
|
|
59
59
|
disconnectedCallback(): void;
|
|
60
60
|
updated(): void;
|
|
61
|
-
render():
|
|
61
|
+
render(): lit_html29.TemplateResult<1>;
|
|
62
62
|
}
|
|
63
63
|
declare global {
|
|
64
64
|
interface HTMLElementTagNameMap {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as lit26 from "lit";
|
|
2
2
|
import { LitElement } from "lit";
|
|
3
|
-
import * as
|
|
3
|
+
import * as lit_html24 from "lit-html";
|
|
4
4
|
|
|
5
5
|
//#region src/gui/EFResizableBox.d.ts
|
|
6
6
|
interface BoxBounds {
|
|
@@ -21,7 +21,7 @@ declare class EFResizableBox extends LitElement {
|
|
|
21
21
|
private resizeStartCorner;
|
|
22
22
|
private resizeStartSize;
|
|
23
23
|
private resizeStartPosition;
|
|
24
|
-
static styles:
|
|
24
|
+
static styles: lit26.CSSResult;
|
|
25
25
|
private resizeObserver?;
|
|
26
26
|
connectedCallback(): void;
|
|
27
27
|
disconnectedCallback(): void;
|
|
@@ -30,7 +30,7 @@ declare class EFResizableBox extends LitElement {
|
|
|
30
30
|
private handlePointerUp;
|
|
31
31
|
private cleanup;
|
|
32
32
|
private dispatchBoundsChange;
|
|
33
|
-
render():
|
|
33
|
+
render(): lit_html24.TemplateResult<1>;
|
|
34
34
|
}
|
|
35
35
|
//#endregion
|
|
36
36
|
export { BoxBounds, EFResizableBox };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PanZoomTransform } from "../elements/EFPanZoom.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as lit25 from "lit";
|
|
3
3
|
import { LitElement } from "lit";
|
|
4
|
-
import * as
|
|
4
|
+
import * as lit_html23 from "lit-html";
|
|
5
5
|
|
|
6
6
|
//#region src/gui/EFTransformHandles.d.ts
|
|
7
7
|
interface TransformBounds {
|
|
@@ -49,7 +49,7 @@ declare class EFTransformHandles extends LitElement {
|
|
|
49
49
|
* Note: Not a @state() property to avoid re-renders during interaction.
|
|
50
50
|
*/
|
|
51
51
|
private initialBounds;
|
|
52
|
-
static styles:
|
|
52
|
+
static styles: lit25.CSSResult;
|
|
53
53
|
private resizeObserver?;
|
|
54
54
|
/**
|
|
55
55
|
* Single source of truth for zoom scale.
|
|
@@ -79,7 +79,7 @@ declare class EFTransformHandles extends LitElement {
|
|
|
79
79
|
private handleMouseMove;
|
|
80
80
|
private handleMouseUp;
|
|
81
81
|
private cleanup;
|
|
82
|
-
render():
|
|
82
|
+
render(): lit_html23.TemplateResult<1>;
|
|
83
83
|
}
|
|
84
84
|
declare global {
|
|
85
85
|
interface HTMLElementTagNameMap {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@editframe/elements",
|
|
3
|
-
"version": "0.40.
|
|
3
|
+
"version": "0.40.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"license": "UNLICENSED",
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@bramus/style-observer": "^1.3.0",
|
|
21
|
-
"@editframe/assets": "0.40.
|
|
21
|
+
"@editframe/assets": "0.40.4",
|
|
22
22
|
"@lit/context": "^1.1.6",
|
|
23
23
|
"@opentelemetry/api": "^1.9.0",
|
|
24
24
|
"@opentelemetry/context-zone": "^1.26.0",
|