@lumencast/runtime 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/app.d.ts +6 -1
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +3 -1
- package/dist/app.js.map +1 -1
- package/dist/{broadcast-ryjLRD5q.js → broadcast-L5wm2I6J.js} +3 -3
- package/dist/{broadcast-ryjLRD5q.js.map → broadcast-L5wm2I6J.js.map} +1 -1
- package/dist/{control-AgxbXOVS.js → control-eEUG7unp.js} +4 -4
- package/dist/{control-AgxbXOVS.js.map → control-eEUG7unp.js.map} +1 -1
- package/dist/index-Clrya_9l.js +1281 -0
- package/dist/index-Clrya_9l.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.html +1 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/lumencast.js +18 -13
- package/dist/mount.d.ts.map +1 -1
- package/dist/mount.js +11 -0
- package/dist/mount.js.map +1 -1
- package/dist/overlay/runtime-context.d.ts +10 -0
- package/dist/overlay/runtime-context.d.ts.map +1 -1
- package/dist/overlay/runtime-context.js.map +1 -1
- package/dist/render/bundle.d.ts +1 -1
- package/dist/render/bundle.d.ts.map +1 -1
- package/dist/render/bundle.js.map +1 -1
- package/dist/render/primitives/capture.d.ts +13 -4
- package/dist/render/primitives/capture.d.ts.map +1 -1
- package/dist/render/primitives/capture.js +54 -22
- package/dist/render/primitives/capture.js.map +1 -1
- package/dist/render/primitives/index.d.ts.map +1 -1
- package/dist/render/primitives/index.js +4 -0
- package/dist/render/primitives/index.js.map +1 -1
- package/dist/render/primitives/live-peer-video.d.ts +27 -0
- package/dist/render/primitives/live-peer-video.d.ts.map +1 -0
- package/dist/render/primitives/live-peer-video.js +64 -0
- package/dist/render/primitives/live-peer-video.js.map +1 -0
- package/dist/render/primitives/media.d.ts +37 -12
- package/dist/render/primitives/media.d.ts.map +1 -1
- package/dist/render/primitives/media.js +43 -17
- package/dist/render/primitives/media.js.map +1 -1
- package/dist/render/primitives/meet-peer.d.ts +31 -0
- package/dist/render/primitives/meet-peer.d.ts.map +1 -0
- package/dist/render/primitives/meet-peer.js +46 -0
- package/dist/render/primitives/meet-peer.js.map +1 -0
- package/dist/render/prop-allowlist.d.ts.map +1 -1
- package/dist/render/prop-allowlist.js +27 -1
- package/dist/render/prop-allowlist.js.map +1 -1
- package/dist/render/tree.js +42 -8
- package/dist/render/tree.js.map +1 -1
- package/dist/{status-pill-BxCdj-KZ.js → status-pill-elORkMrh.js} +2 -2
- package/dist/{status-pill-BxCdj-KZ.js.map → status-pill-elORkMrh.js.map} +1 -1
- package/dist/{test-CaRHj_J6.js → test-7q_KJkdX.js} +4 -4
- package/dist/{test-CaRHj_J6.js.map → test-7q_KJkdX.js.map} +1 -1
- package/dist/{tree-BLIxJbD3.js → tree-BMxx5170.js} +522 -436
- package/dist/tree-BMxx5170.js.map +1 -0
- package/dist/types.d.ts +13 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/webrtc/index.d.ts +76 -0
- package/dist/webrtc/index.d.ts.map +1 -0
- package/dist/webrtc/index.js +180 -0
- package/dist/webrtc/index.js.map +1 -0
- package/dist/webrtc/meet-viewer.d.ts +139 -0
- package/dist/webrtc/meet-viewer.d.ts.map +1 -0
- package/dist/webrtc/meet-viewer.js +379 -0
- package/dist/webrtc/meet-viewer.js.map +1 -0
- package/dist/webrtc/peer-stream-registry.d.ts +21 -0
- package/dist/webrtc/peer-stream-registry.d.ts.map +1 -0
- package/dist/webrtc/peer-stream-registry.js +77 -0
- package/dist/webrtc/peer-stream-registry.js.map +1 -0
- package/package.json +4 -4
- package/src/app.tsx +9 -0
- package/src/index.ts +35 -0
- package/src/mount.ts +11 -0
- package/src/overlay/runtime-context.tsx +10 -0
- package/src/render/bundle.ts +11 -1
- package/src/render/primitives/capture.tsx +73 -28
- package/src/render/primitives/index.ts +4 -0
- package/src/render/primitives/live-peer-video.tsx +90 -0
- package/src/render/primitives/media.tsx +66 -17
- package/src/render/primitives/meet-peer.tsx +57 -0
- package/src/render/prop-allowlist.ts +27 -1
- package/src/render/tree.tsx +44 -8
- package/src/types.ts +13 -0
- package/src/webrtc/index.ts +252 -0
- package/src/webrtc/meet-viewer.ts +497 -0
- package/src/webrtc/peer-stream-registry.ts +93 -0
- package/dist/index-DrXsLYhe.js +0 -903
- package/dist/index-DrXsLYhe.js.map +0 -1
- package/dist/tree-BLIxJbD3.js.map +0 -1
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { jsx as f, jsxs as
|
|
2
|
-
import { useSignals as
|
|
3
|
-
import { motion as
|
|
4
|
-
import { createContext as st, useContext as
|
|
5
|
-
import { e as S, r as at, m as lt, t as
|
|
1
|
+
import { jsx as f, jsxs as I, Fragment as Q } from "react/jsx-runtime";
|
|
2
|
+
import { useSignals as xt } from "@preact/signals-react/runtime";
|
|
3
|
+
import { motion as U, useMotionValue as L, useTransform as be, animate as jt } from "framer-motion";
|
|
4
|
+
import { createContext as st, useContext as K, useRef as tt, useState as vt, useEffect as Y, useMemo as Ut } from "react";
|
|
5
|
+
import { e as S, r as at, m as lt, t as et, a as Kt, s as ke, w as Vt, F as we, c as Rt, b as Zt } from "./index-Clrya_9l.js";
|
|
6
6
|
import { checkHostAllowed as Jt } from "@lumencast/protocol";
|
|
7
7
|
import { effect as xe } from "@preact/signals-react";
|
|
8
8
|
function ve({ resolved: t, children: e, establishesContainingBlock: n }) {
|
|
9
|
-
const i = t.direction ?? "vertical", r = Tt(t.gap, 0),
|
|
9
|
+
const i = t.direction ?? "vertical", r = Tt(t.gap, 0), a = t.wrap === !0, o = Tt(t.crossGap, 0), s = t.align ?? "stretch", l = t.justify ?? "flex-start", c = i === "horizontal", u = {
|
|
10
10
|
display: "flex",
|
|
11
11
|
flexDirection: c ? "row" : "column",
|
|
12
|
-
alignItems:
|
|
12
|
+
alignItems: s,
|
|
13
13
|
justifyContent: l,
|
|
14
14
|
// ADR 002 §3.1 (D1) — establish a containing block when a child is
|
|
15
15
|
// absolutely placed, so its `left/top` resolve against this stack.
|
|
16
16
|
// Untouched for pure auto-layout stacks (RC#2).
|
|
17
17
|
...n ? { position: "relative" } : {}
|
|
18
18
|
};
|
|
19
|
-
return
|
|
19
|
+
return a ? (u.flexWrap = "wrap", c ? (u.columnGap = r, u.rowGap = o) : (u.rowGap = r, u.columnGap = o)) : u.gap = r, /* @__PURE__ */ f("div", { style: u, children: e });
|
|
20
20
|
}
|
|
21
21
|
function Tt(t, e) {
|
|
22
22
|
return typeof t == "number" && Number.isFinite(t) ? t : e;
|
|
23
23
|
}
|
|
24
24
|
function $e({ resolved: t, children: e, establishesContainingBlock: n }) {
|
|
25
|
-
const i = t.cols ?? "1fr", r = t.rows ?? "auto",
|
|
25
|
+
const i = t.cols ?? "1fr", r = t.rows ?? "auto", a = t.gap ?? 0;
|
|
26
26
|
return /* @__PURE__ */ f(
|
|
27
27
|
"div",
|
|
28
28
|
{
|
|
@@ -30,7 +30,7 @@ function $e({ resolved: t, children: e, establishesContainingBlock: n }) {
|
|
|
30
30
|
display: "grid",
|
|
31
31
|
gridTemplateColumns: i,
|
|
32
32
|
gridTemplateRows: r,
|
|
33
|
-
gap:
|
|
33
|
+
gap: a,
|
|
34
34
|
// ADR 002 §3.1 (D1) — establish a containing block for absolutely
|
|
35
35
|
// placed children ; untouched for pure auto-layout grids (RC#2).
|
|
36
36
|
...n ? { position: "relative" } : {}
|
|
@@ -39,14 +39,14 @@ function $e({ resolved: t, children: e, establishesContainingBlock: n }) {
|
|
|
39
39
|
}
|
|
40
40
|
);
|
|
41
41
|
}
|
|
42
|
-
const Se = 64, Me = /^[#a-zA-Z0-9(),.% ]{1,64}$/, Ae = /^#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,
|
|
43
|
-
`^rgba?\\(${
|
|
44
|
-
),
|
|
45
|
-
`^hsla?\\(${
|
|
46
|
-
),
|
|
42
|
+
const Se = 64, Me = /^[#a-zA-Z0-9(),.% ]{1,64}$/, Ae = /^#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, q = String.raw`\d{1,3}(?:\.\d{1,4})?`, Qt = String.raw`(?:0|1|0?\.\d{1,4}|${q}%)`, j = String.raw`[ ]{0,4}`, Fe = new RegExp(
|
|
43
|
+
`^rgba?\\(${j}(${q})(%?)${j},${j}(${q})(%?)${j},${j}(${q})(%?)${j}(?:,${j}${Qt}${j})?\\)$`
|
|
44
|
+
), _e = new RegExp(
|
|
45
|
+
`^hsla?\\(${j}(${q})(?:deg)?${j},${j}(${q})%${j},${j}(${q})%${j}(?:,${j}${Qt}${j})?\\)$`
|
|
46
|
+
), je = new Set(
|
|
47
47
|
"aliceblue antiquewhite aqua aquamarine azure beige bisque black blanchedalmond blue blueviolet brown burlywood cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan darkblue darkcyan darkgoldenrod darkgray darkgreen darkgrey darkkhaki darkmagenta darkolivegreen darkorange darkorchid darkred darksalmon darkseagreen darkslateblue darkslategray darkslategrey darkturquoise darkviolet deeppink deepskyblue dimgray dimgrey dodgerblue firebrick floralwhite forestgreen fuchsia gainsboro ghostwhite gold goldenrod gray green greenyellow grey honeydew hotpink indianred indigo ivory khaki lavender lavenderblush lawngreen lemonchiffon lightblue lightcoral lightcyan lightgoldenrodyellow lightgray lightgreen lightgrey lightpink lightsalmon lightseagreen lightskyblue lightslategray lightslategrey lightsteelblue lightyellow lime limegreen linen magenta maroon mediumaquamarine mediumblue mediumorchid mediumpurple mediumseagreen mediumslateblue mediumspringgreen mediumturquoise mediumvioletred midnightblue mintcream mistyrose moccasin navajowhite navy oldlace olive olivedrab orange orangered orchid palegoldenrod palegreen paleturquoise palevioletred papayawhip peachpuff peru pink plum powderblue purple rebeccapurple red rosybrown royalblue saddlebrown salmon sandybrown seagreen seashell sienna silver skyblue slateblue slategray slategrey snow springgreen steelblue tan teal thistle tomato turquoise violet wheat white whitesmoke yellow yellowgreen transparent currentcolor".split(" ")
|
|
48
48
|
);
|
|
49
|
-
function
|
|
49
|
+
function D(t) {
|
|
50
50
|
if (typeof t != "string") return null;
|
|
51
51
|
const e = t.trim();
|
|
52
52
|
if (e.length === 0 || e.length > Se) return null;
|
|
@@ -58,18 +58,18 @@ function E(t) {
|
|
|
58
58
|
if (!i) return null;
|
|
59
59
|
const r = [i[2], i[4], i[6]];
|
|
60
60
|
if (!(r.every((o) => o === "%") || r.every((o) => o === ""))) return null;
|
|
61
|
-
const
|
|
61
|
+
const a = r[0] === "%" ? 100 : 255;
|
|
62
62
|
for (const o of [i[1], i[3], i[5]])
|
|
63
|
-
if (Number(o) >
|
|
63
|
+
if (Number(o) > a) return null;
|
|
64
64
|
return n;
|
|
65
65
|
}
|
|
66
66
|
if (n.startsWith("hsl")) {
|
|
67
|
-
const i =
|
|
67
|
+
const i = _e.exec(n);
|
|
68
68
|
return !i || Number(i[1]) > 360 || Number(i[2]) > 100 || Number(i[3]) > 100 ? null : n;
|
|
69
69
|
}
|
|
70
|
-
return
|
|
70
|
+
return je.has(n) ? n : null;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function B(t, e) {
|
|
73
73
|
S(
|
|
74
74
|
e,
|
|
75
75
|
t,
|
|
@@ -77,16 +77,16 @@ function D(t, e) {
|
|
|
77
77
|
);
|
|
78
78
|
}
|
|
79
79
|
const te = st(void 0);
|
|
80
|
-
function
|
|
80
|
+
function pr({
|
|
81
81
|
hosts: t,
|
|
82
82
|
children: e
|
|
83
83
|
}) {
|
|
84
84
|
return /* @__PURE__ */ f(te.Provider, { value: t, children: e });
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
return
|
|
86
|
+
function nt() {
|
|
87
|
+
return K(te);
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function hr(t) {
|
|
90
90
|
const n = t.assets?.allowedHosts;
|
|
91
91
|
if (!Array.isArray(n)) return;
|
|
92
92
|
const i = n.filter((r) => typeof r == "string");
|
|
@@ -98,7 +98,7 @@ function $t(t, e, n, i) {
|
|
|
98
98
|
if (r.allowed) return t;
|
|
99
99
|
S(i, n, r.reason ?? "asset host/scheme rejected");
|
|
100
100
|
}
|
|
101
|
-
const
|
|
101
|
+
const Re = /* @__PURE__ */ new Set([
|
|
102
102
|
"normal",
|
|
103
103
|
"multiply",
|
|
104
104
|
"screen",
|
|
@@ -118,8 +118,8 @@ const je = /* @__PURE__ */ new Set([
|
|
|
118
118
|
// Figma LINEAR_DODGE (add) — exact additive blend, gentler than color-dodge.
|
|
119
119
|
"plus-lighter"
|
|
120
120
|
]);
|
|
121
|
-
function
|
|
122
|
-
return typeof t == "string" &&
|
|
121
|
+
function X(t) {
|
|
122
|
+
return typeof t == "string" && Re.has(t) ? t : void 0;
|
|
123
123
|
}
|
|
124
124
|
const Te = /* @__PURE__ */ new Set(["cover", "contain", "fill", "none", "scale-down"]);
|
|
125
125
|
function Ce(t) {
|
|
@@ -130,34 +130,34 @@ function Ct() {
|
|
|
130
130
|
return ft = (ft + 1) % 1e6, `lumen-grad-${ft.toString(36)}`;
|
|
131
131
|
}
|
|
132
132
|
function Oe(t) {
|
|
133
|
-
const e =
|
|
133
|
+
const e = X(t.blendMode);
|
|
134
134
|
if (t.kind === "solid") {
|
|
135
|
-
const
|
|
136
|
-
return { defs: [], ref:
|
|
135
|
+
const s = t.opacity !== void 0 ? bt(t.color, t.opacity) : t.color;
|
|
136
|
+
return { defs: [], ref: s, mixBlendMode: e };
|
|
137
137
|
}
|
|
138
138
|
if (t.kind === "image") {
|
|
139
|
-
const
|
|
139
|
+
const s = Ct(), l = Pe(t.objectFit);
|
|
140
140
|
return { defs: [
|
|
141
|
-
/* @__PURE__ */ f("pattern", { id:
|
|
142
|
-
], ref: `url(#${
|
|
141
|
+
/* @__PURE__ */ f("pattern", { id: s, patternContentUnits: "objectBoundingBox", width: "1", height: "1", children: /* @__PURE__ */ f("image", { href: t.src, width: "1", height: "1", preserveAspectRatio: l }) }, s)
|
|
142
|
+
], ref: `url(#${s})`, mixBlendMode: e };
|
|
143
143
|
}
|
|
144
144
|
const n = Ct();
|
|
145
145
|
if (t.kind === "linear-gradient") {
|
|
146
|
-
let
|
|
146
|
+
let s, l, c, u;
|
|
147
147
|
const d = t.transform;
|
|
148
148
|
if (Array.isArray(d) && d.length === 6 && Number.isFinite(d[0]) && Number.isFinite(d[1])) {
|
|
149
149
|
const g = Math.hypot(d[0], d[1]) || 1, m = d[0] / g, A = d[1] / g;
|
|
150
|
-
|
|
150
|
+
s = 0.5 - 0.5 * m, l = 0.5 - 0.5 * A, c = 0.5 + 0.5 * m, u = 0.5 + 0.5 * A;
|
|
151
151
|
} else {
|
|
152
152
|
const m = ((t.angle_deg ?? 0) - 90) * Math.PI / 180;
|
|
153
|
-
|
|
153
|
+
s = 0.5 - 0.5 * Math.cos(m), l = 0.5 - 0.5 * Math.sin(m), c = 0.5 + 0.5 * Math.cos(m), u = 0.5 + 0.5 * Math.sin(m);
|
|
154
154
|
}
|
|
155
155
|
return { defs: [
|
|
156
156
|
/* @__PURE__ */ f(
|
|
157
157
|
"linearGradient",
|
|
158
158
|
{
|
|
159
159
|
id: n,
|
|
160
|
-
x1: `${
|
|
160
|
+
x1: `${s * 100}%`,
|
|
161
161
|
y1: `${l * 100}%`,
|
|
162
162
|
x2: `${c * 100}%`,
|
|
163
163
|
y2: `${u * 100}%`,
|
|
@@ -175,14 +175,14 @@ function Oe(t) {
|
|
|
175
175
|
)
|
|
176
176
|
], ref: `url(#${n})`, mixBlendMode: e };
|
|
177
177
|
}
|
|
178
|
-
const i = t.center?.x ?? 0.5, r = t.center?.y ?? 0.5,
|
|
178
|
+
const i = t.center?.x ?? 0.5, r = t.center?.y ?? 0.5, a = t.radius ?? 0.5;
|
|
179
179
|
return { defs: [
|
|
180
|
-
/* @__PURE__ */ f("radialGradient", { id: n, cx: `${i * 100}%`, cy: `${r * 100}%`, r: `${
|
|
180
|
+
/* @__PURE__ */ f("radialGradient", { id: n, cx: `${i * 100}%`, cy: `${r * 100}%`, r: `${a * 100}%`, children: t.stops.map((s, l) => /* @__PURE__ */ f(
|
|
181
181
|
"stop",
|
|
182
182
|
{
|
|
183
|
-
offset:
|
|
184
|
-
stopColor:
|
|
185
|
-
...
|
|
183
|
+
offset: s.offset,
|
|
184
|
+
stopColor: s.color,
|
|
185
|
+
...s.opacity !== void 0 ? { stopOpacity: s.opacity } : {}
|
|
186
186
|
},
|
|
187
187
|
l
|
|
188
188
|
)) }, n)
|
|
@@ -218,14 +218,14 @@ function Pe(t) {
|
|
|
218
218
|
}
|
|
219
219
|
function Ee(t, e) {
|
|
220
220
|
const n = [], i = [];
|
|
221
|
-
for (const
|
|
222
|
-
const l = Be(
|
|
223
|
-
l && (i.push(l), n.push(
|
|
221
|
+
for (const s of t) {
|
|
222
|
+
const l = Be(s, e);
|
|
223
|
+
l && (i.push(l), n.push(s));
|
|
224
224
|
}
|
|
225
225
|
if (i.length === 0) return {};
|
|
226
|
-
const r = { backgroundImage: i.join(", ") },
|
|
227
|
-
|
|
228
|
-
const o = t.find((
|
|
226
|
+
const r = { backgroundImage: i.join(", ") }, a = n.map((s) => X(s.blendMode) ?? "normal");
|
|
227
|
+
a.some((s) => s !== "normal") && (r.backgroundBlendMode = a.join(", "));
|
|
228
|
+
const o = t.find((s) => s.kind === "image");
|
|
229
229
|
return o && (r.backgroundSize = Ne(o.objectFit), r.backgroundPosition = "center", r.backgroundRepeat = "no-repeat"), r;
|
|
230
230
|
}
|
|
231
231
|
function De(t) {
|
|
@@ -235,30 +235,30 @@ function Be(t, e) {
|
|
|
235
235
|
if (t.kind === "image")
|
|
236
236
|
return De(t.src);
|
|
237
237
|
if (t.kind === "solid") {
|
|
238
|
-
const o =
|
|
238
|
+
const o = D(t.color);
|
|
239
239
|
if (o === null)
|
|
240
|
-
return
|
|
241
|
-
const
|
|
242
|
-
return `linear-gradient(${
|
|
240
|
+
return B("fill.color", e), null;
|
|
241
|
+
const s = t.opacity !== void 0 ? bt(o, t.opacity) : o;
|
|
242
|
+
return `linear-gradient(${s}, ${s})`;
|
|
243
243
|
}
|
|
244
244
|
const n = [];
|
|
245
245
|
for (const o of t.stops) {
|
|
246
|
-
const
|
|
247
|
-
if (
|
|
248
|
-
return
|
|
249
|
-
const l = o.opacity !== void 0 ?
|
|
246
|
+
const s = D(o.color);
|
|
247
|
+
if (s === null)
|
|
248
|
+
return B("fill.stops.color", e), null;
|
|
249
|
+
const l = o.opacity !== void 0 ? bt(s, o.opacity) : s;
|
|
250
250
|
n.push(`${l} ${(o.offset * 100).toFixed(2)}%`);
|
|
251
251
|
}
|
|
252
252
|
const i = n.join(", ");
|
|
253
253
|
if (t.kind === "linear-gradient") {
|
|
254
254
|
let o = t.angle_deg ?? 0;
|
|
255
|
-
const
|
|
256
|
-
return Array.isArray(
|
|
255
|
+
const s = t.transform;
|
|
256
|
+
return Array.isArray(s) && s.length === 6 && Number.isFinite(s[0]) && Number.isFinite(s[1]) && (o = (Math.atan2(s[0], -s[1]) * 180 / Math.PI + 360) % 360), `linear-gradient(${o}deg, ${i})`;
|
|
257
257
|
}
|
|
258
|
-
const r = (t.center?.x ?? 0.5) * 100,
|
|
259
|
-
return `radial-gradient(circle at ${r}% ${
|
|
258
|
+
const r = (t.center?.x ?? 0.5) * 100, a = (t.center?.y ?? 0.5) * 100;
|
|
259
|
+
return `radial-gradient(circle at ${r}% ${a}%, ${i})`;
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function bt(t, e) {
|
|
262
262
|
const n = t.match(/^#([0-9a-f]{6})$/i);
|
|
263
263
|
if (n) {
|
|
264
264
|
const i = Math.round(e * 255).toString(16).padStart(2, "0");
|
|
@@ -274,25 +274,25 @@ function Le(t, e, n) {
|
|
|
274
274
|
continue;
|
|
275
275
|
}
|
|
276
276
|
if (r.kind === "solid") {
|
|
277
|
-
const
|
|
278
|
-
if (
|
|
279
|
-
|
|
277
|
+
const s = D(r.color);
|
|
278
|
+
if (s === null) {
|
|
279
|
+
B(`${e}.color`, n);
|
|
280
280
|
continue;
|
|
281
281
|
}
|
|
282
|
-
i.push({ ...r, color:
|
|
282
|
+
i.push({ ...r, color: s });
|
|
283
283
|
continue;
|
|
284
284
|
}
|
|
285
|
-
const
|
|
285
|
+
const a = [];
|
|
286
286
|
let o = !1;
|
|
287
|
-
for (const
|
|
288
|
-
const l =
|
|
287
|
+
for (const s of r.stops ?? []) {
|
|
288
|
+
const l = D(s.color);
|
|
289
289
|
if (l === null) {
|
|
290
|
-
|
|
290
|
+
B(`${e}.stops.color`, n), o = !0;
|
|
291
291
|
break;
|
|
292
292
|
}
|
|
293
|
-
|
|
293
|
+
a.push({ ...s, color: l });
|
|
294
294
|
}
|
|
295
|
-
o || i.push({ ...r, stops:
|
|
295
|
+
o || i.push({ ...r, stops: a });
|
|
296
296
|
}
|
|
297
297
|
return i;
|
|
298
298
|
}
|
|
@@ -307,27 +307,27 @@ function ee(t, e, n) {
|
|
|
307
307
|
);
|
|
308
308
|
return t.filter(Ot).map((i) => {
|
|
309
309
|
let r = i;
|
|
310
|
-
if (r.blendMode !== void 0 &&
|
|
310
|
+
if (r.blendMode !== void 0 && X(r.blendMode) === void 0) {
|
|
311
311
|
S(
|
|
312
312
|
n,
|
|
313
313
|
e !== void 0 ? `${e}.blendMode` : "fill.blendMode",
|
|
314
314
|
"is not a recognised mix-blend-mode ; falling back to normal (ADR 002 §3.2)"
|
|
315
315
|
);
|
|
316
|
-
const { blendMode: o, ...
|
|
317
|
-
r =
|
|
316
|
+
const { blendMode: o, ...s } = r;
|
|
317
|
+
r = s;
|
|
318
318
|
}
|
|
319
319
|
if (r.kind !== "image" || r.objectFit === void 0) return r;
|
|
320
|
-
const
|
|
321
|
-
if (
|
|
320
|
+
const a = Ce(r.objectFit);
|
|
321
|
+
if (a === void 0) {
|
|
322
322
|
S(
|
|
323
323
|
n,
|
|
324
324
|
e !== void 0 ? `${e}.objectFit` : "fill.objectFit",
|
|
325
325
|
"is not a recognised object-fit ; falling back to default (ADR 002 §3.2)"
|
|
326
326
|
);
|
|
327
|
-
const { objectFit: o, ...
|
|
328
|
-
return
|
|
327
|
+
const { objectFit: o, ...s } = r;
|
|
328
|
+
return s;
|
|
329
329
|
}
|
|
330
|
-
return { ...r, objectFit:
|
|
330
|
+
return { ...r, objectFit: a };
|
|
331
331
|
});
|
|
332
332
|
}
|
|
333
333
|
function Ot(t) {
|
|
@@ -345,9 +345,9 @@ function ze({
|
|
|
345
345
|
animateInitial: i,
|
|
346
346
|
children: r
|
|
347
347
|
}) {
|
|
348
|
-
const
|
|
349
|
-
m !== void 0 && A === null &&
|
|
350
|
-
const x =
|
|
348
|
+
const a = O(t.x, 0), o = O(t.y, 0), s = Nt(t.width), l = Nt(t.height), c = O(t.opacity, 1), u = O(t.scale, 1), d = O(t.rotate, O(t.rotation, 0)), h = t.flipY === !0, g = O(t.radius, 0), m = t.background, A = m === void 0 ? void 0 : D(m);
|
|
349
|
+
m !== void 0 && A === null && B("frame.background", e);
|
|
350
|
+
const x = nt(), F = ne(
|
|
351
351
|
ee(t.backgrounds, "frame.backgrounds", e),
|
|
352
352
|
x,
|
|
353
353
|
"frame.backgrounds",
|
|
@@ -360,7 +360,7 @@ function ze({
|
|
|
360
360
|
position: "absolute",
|
|
361
361
|
left: 0,
|
|
362
362
|
top: 0,
|
|
363
|
-
width:
|
|
363
|
+
width: s,
|
|
364
364
|
height: l,
|
|
365
365
|
// NB: NO permanent `will-change`. `will-change: opacity` makes the frame an
|
|
366
366
|
// isolated group (the browser pre-promotes it as if opacity < 1), which
|
|
@@ -379,17 +379,17 @@ function ze({
|
|
|
379
379
|
const { filter: w, boxShadow: v } = We(t.shadow, e);
|
|
380
380
|
v !== void 0 && (p.boxShadow = v), w !== void 0 && (p.filter = w);
|
|
381
381
|
const $ = lt(
|
|
382
|
-
{ opacity: c, x:
|
|
382
|
+
{ opacity: c, x: a, y: o, scale: u, rotate: d, ...h ? { scaleY: -1 } : {} },
|
|
383
383
|
i,
|
|
384
384
|
e
|
|
385
385
|
);
|
|
386
386
|
return /* @__PURE__ */ f(
|
|
387
|
-
|
|
387
|
+
U.div,
|
|
388
388
|
{
|
|
389
389
|
style: p,
|
|
390
390
|
initial: $.initial,
|
|
391
391
|
animate: $.animate,
|
|
392
|
-
transition:
|
|
392
|
+
transition: et(y),
|
|
393
393
|
children: r
|
|
394
394
|
}
|
|
395
395
|
);
|
|
@@ -397,25 +397,25 @@ function ze({
|
|
|
397
397
|
function He(t, e) {
|
|
398
398
|
return t === void 0 ? !0 : typeof t == "boolean" ? t : (S(e, "frame.clipsContent", "rejected value : not a boolean"), !0);
|
|
399
399
|
}
|
|
400
|
-
function
|
|
400
|
+
function O(t, e) {
|
|
401
401
|
return typeof t == "number" && Number.isFinite(t) ? t : e;
|
|
402
402
|
}
|
|
403
403
|
function We(t, e) {
|
|
404
404
|
if (!Array.isArray(t) || t.length === 0) return {};
|
|
405
405
|
const n = [], i = [];
|
|
406
|
-
for (const
|
|
407
|
-
if (typeof
|
|
408
|
-
const o =
|
|
409
|
-
if (
|
|
410
|
-
|
|
406
|
+
for (const a of t) {
|
|
407
|
+
if (typeof a != "object" || a === null) continue;
|
|
408
|
+
const o = a, s = typeof o.color == "string" ? D(o.color) : null;
|
|
409
|
+
if (s === null) {
|
|
410
|
+
B("frame.shadow.color", e);
|
|
411
411
|
continue;
|
|
412
412
|
}
|
|
413
|
-
const l =
|
|
413
|
+
const l = O(o.x, 0), c = O(o.y, 0), u = O(o.blur, 0), d = O(o.spread, 0), h = o.inset === !0;
|
|
414
414
|
if (!h && d === 0)
|
|
415
|
-
n.push(`drop-shadow(${l}px ${c}px ${u / 2}px ${
|
|
415
|
+
n.push(`drop-shadow(${l}px ${c}px ${u / 2}px ${s})`);
|
|
416
416
|
else {
|
|
417
417
|
const g = h ? "inset " : "";
|
|
418
|
-
i.push(`${g}${l}px ${c}px ${u}px ${d}px ${
|
|
418
|
+
i.push(`${g}${l}px ${c}px ${u}px ${d}px ${s}`);
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
421
|
const r = {};
|
|
@@ -424,34 +424,34 @@ function We(t, e) {
|
|
|
424
424
|
function Nt(t) {
|
|
425
425
|
if (typeof t == "number" && Number.isFinite(t) || typeof t == "string" && t.length > 0) return t;
|
|
426
426
|
}
|
|
427
|
-
const qe = /* @__PURE__ */ new Set(["none", "uppercase", "lowercase", "capitalize"]), Ge = /* @__PURE__ */ new Set(["none", "underline", "line-through"]),
|
|
427
|
+
const qe = /* @__PURE__ */ new Set(["none", "uppercase", "lowercase", "capitalize"]), Ge = /* @__PURE__ */ new Set(["none", "underline", "line-through"]), Ie = /* @__PURE__ */ new Set(["normal", "italic", "oblique"]), Ye = 1e3, Xe = 100, Pt = 1e3, Ue = /^[a-zA-Z0-9 ,.'"_-]{1,256}$/;
|
|
428
428
|
function Ke(t) {
|
|
429
429
|
if (typeof t != "string") return null;
|
|
430
430
|
const e = t.trim();
|
|
431
431
|
return e.length === 0 ? null : Ue.test(e) ? e : null;
|
|
432
432
|
}
|
|
433
433
|
function Ve({ resolved: t, nodeId: e, transitionFor: n, animateInitial: i }) {
|
|
434
|
-
const r = t.value === void 0 ? "" : String(t.value),
|
|
435
|
-
let
|
|
434
|
+
const r = t.value === void 0 ? "" : String(t.value), a = t.size ?? "1rem", o = t.weight ?? 400;
|
|
435
|
+
let s;
|
|
436
436
|
if (t.font !== void 0) {
|
|
437
437
|
const m = Ke(t.font);
|
|
438
|
-
m === null ? S(e, "text.font", "rejected fontFamily : outside the family-list grammar") :
|
|
438
|
+
m === null ? S(e, "text.font", "rejected fontFamily : outside the family-list grammar") : s = m;
|
|
439
439
|
}
|
|
440
440
|
let l = "currentColor";
|
|
441
441
|
if (t.colour !== void 0) {
|
|
442
|
-
const m =
|
|
443
|
-
m === null ?
|
|
442
|
+
const m = D(t.colour);
|
|
443
|
+
m === null ? B("text.colour", e) : l = m;
|
|
444
444
|
}
|
|
445
445
|
const c = t.align ?? "start", u = Ze(t.opacity, 1), d = Je(t, e), h = at(n, ["opacity", "value"], i), g = lt({ opacity: u }, i, e);
|
|
446
446
|
return /* @__PURE__ */ f(
|
|
447
|
-
|
|
447
|
+
U.span,
|
|
448
448
|
{
|
|
449
449
|
style: {
|
|
450
450
|
display: "inline-block",
|
|
451
|
-
fontSize:
|
|
451
|
+
fontSize: a,
|
|
452
452
|
// `font` carries LSML text.style.fontFamily (spec'd in schema.json).
|
|
453
453
|
// Omitted => inherit the host/container font.
|
|
454
|
-
...
|
|
454
|
+
...s !== void 0 ? { fontFamily: s } : {},
|
|
455
455
|
fontWeight: o,
|
|
456
456
|
color: l,
|
|
457
457
|
textAlign: c,
|
|
@@ -459,7 +459,7 @@ function Ve({ resolved: t, nodeId: e, transitionFor: n, animateInitial: i }) {
|
|
|
459
459
|
},
|
|
460
460
|
initial: g.initial,
|
|
461
461
|
animate: g.animate,
|
|
462
|
-
transition:
|
|
462
|
+
transition: et(h),
|
|
463
463
|
children: r
|
|
464
464
|
}
|
|
465
465
|
);
|
|
@@ -471,7 +471,7 @@ function Je(t, e) {
|
|
|
471
471
|
const n = Et(
|
|
472
472
|
t.lineHeight,
|
|
473
473
|
0,
|
|
474
|
-
|
|
474
|
+
Xe,
|
|
475
475
|
"text.lineHeight",
|
|
476
476
|
e
|
|
477
477
|
), i = Et(
|
|
@@ -485,23 +485,23 @@ function Je(t, e) {
|
|
|
485
485
|
qe,
|
|
486
486
|
"text.textTransform",
|
|
487
487
|
e
|
|
488
|
-
),
|
|
488
|
+
), a = dt(
|
|
489
489
|
t.textDecoration,
|
|
490
490
|
Ge,
|
|
491
491
|
"text.textDecoration",
|
|
492
492
|
e
|
|
493
|
-
), o = dt(t.fontStyle,
|
|
493
|
+
), o = dt(t.fontStyle, Ie, "text.fontStyle", e), s = Qe(t.maxLines, Ye, "text.maxLines", e);
|
|
494
494
|
return {
|
|
495
495
|
...n !== void 0 ? { lineHeight: n } : {},
|
|
496
496
|
// Built from a validated finite number — no string passthrough.
|
|
497
497
|
...i !== void 0 ? { letterSpacing: `${i}px` } : {},
|
|
498
498
|
...r !== void 0 ? { textTransform: r } : {},
|
|
499
|
-
...
|
|
499
|
+
...a !== void 0 ? { textDecoration: a } : {},
|
|
500
500
|
...o !== void 0 ? { fontStyle: o } : {},
|
|
501
|
-
...
|
|
501
|
+
...s !== void 0 ? {
|
|
502
502
|
display: "-webkit-box",
|
|
503
503
|
WebkitBoxOrient: "vertical",
|
|
504
|
-
WebkitLineClamp:
|
|
504
|
+
WebkitLineClamp: s,
|
|
505
505
|
overflow: "hidden",
|
|
506
506
|
textOverflow: "ellipsis"
|
|
507
507
|
} : {}
|
|
@@ -533,16 +533,16 @@ function St(t, e) {
|
|
|
533
533
|
);
|
|
534
534
|
}
|
|
535
535
|
function tn({ resolved: t, nodeId: e, transitionFor: n, animateInitial: i }) {
|
|
536
|
-
const r =
|
|
537
|
-
if (!
|
|
538
|
-
const o = typeof t.alt == "string" ? t.alt : "",
|
|
536
|
+
const r = nt(), a = $t(t.src, r, "image.src", e);
|
|
537
|
+
if (!a) return null;
|
|
538
|
+
const o = typeof t.alt == "string" ? t.alt : "", s = t.fit ?? "contain", l = t.position ?? "center", c = en(t.opacity, 1), u = Dt(t.width, "100%"), d = Dt(t.height, "100%"), h = at(n, ["opacity", "src"], i), g = lt({ opacity: c }, i, e);
|
|
539
539
|
return /* @__PURE__ */ f(
|
|
540
|
-
|
|
540
|
+
U.img,
|
|
541
541
|
{
|
|
542
|
-
src:
|
|
542
|
+
src: a,
|
|
543
543
|
alt: o,
|
|
544
544
|
style: {
|
|
545
|
-
objectFit:
|
|
545
|
+
objectFit: s,
|
|
546
546
|
objectPosition: l,
|
|
547
547
|
width: u,
|
|
548
548
|
height: d
|
|
@@ -555,7 +555,7 @@ function tn({ resolved: t, nodeId: e, transitionFor: n, animateInitial: i }) {
|
|
|
555
555
|
},
|
|
556
556
|
initial: g.initial,
|
|
557
557
|
animate: g.animate,
|
|
558
|
-
transition:
|
|
558
|
+
transition: et(h),
|
|
559
559
|
draggable: !1
|
|
560
560
|
}
|
|
561
561
|
);
|
|
@@ -580,16 +580,16 @@ function Bt(t) {
|
|
|
580
580
|
const n = e.toLowerCase();
|
|
581
581
|
if (n.includes("url(") || n.includes("data:") || e.includes("<") || e.includes("&")) return null;
|
|
582
582
|
const i = e.length;
|
|
583
|
-
let r = 0,
|
|
583
|
+
let r = 0, a = 0, o = !1;
|
|
584
584
|
for (; r < i; ) {
|
|
585
|
-
const
|
|
586
|
-
if (an(
|
|
585
|
+
const s = e.charCodeAt(r);
|
|
586
|
+
if (an(s)) {
|
|
587
587
|
r++;
|
|
588
588
|
continue;
|
|
589
589
|
}
|
|
590
590
|
const l = e[r];
|
|
591
591
|
if (sn.has(l)) {
|
|
592
|
-
if (!o && l !== "M" && l !== "m" || (o = !0,
|
|
592
|
+
if (!o && l !== "M" && l !== "m" || (o = !0, a++, a > rn)) return null;
|
|
593
593
|
r++;
|
|
594
594
|
continue;
|
|
595
595
|
}
|
|
@@ -615,39 +615,39 @@ function Bt(t) {
|
|
|
615
615
|
if (u === 0) return null;
|
|
616
616
|
}
|
|
617
617
|
}
|
|
618
|
-
return
|
|
618
|
+
return a === 0 ? null : e;
|
|
619
619
|
}
|
|
620
620
|
function ln(t, e) {
|
|
621
621
|
const n = t.paths, i = t.pathData;
|
|
622
622
|
if (Array.isArray(n)) {
|
|
623
|
-
i !== void 0 &&
|
|
623
|
+
i !== void 0 && W(e, "shape.pathData", "mutually exclusive with paths[] ; paths[] wins");
|
|
624
624
|
const r = [];
|
|
625
|
-
for (let
|
|
625
|
+
for (let a = 0; a < n.length; a++) {
|
|
626
626
|
if (r.length >= on) {
|
|
627
|
-
|
|
627
|
+
W(e, "shape.paths", "subpath cap exceeded ; remaining entries dropped");
|
|
628
628
|
break;
|
|
629
629
|
}
|
|
630
|
-
const o = n[
|
|
630
|
+
const o = n[a], s = Bt(
|
|
631
631
|
typeof o == "object" && o !== null ? o.data : void 0
|
|
632
632
|
);
|
|
633
|
-
if (
|
|
634
|
-
|
|
633
|
+
if (s === null) {
|
|
634
|
+
W(e, "shape.paths.data", "not a strict SVG path grammar (allowlist/caps)");
|
|
635
635
|
continue;
|
|
636
636
|
}
|
|
637
|
-
r.push({ d:
|
|
637
|
+
r.push({ d: s, fillRule: cn(o?.windingRule, e) });
|
|
638
638
|
}
|
|
639
|
-
return r.length === 0 && n.length > 0 &&
|
|
639
|
+
return r.length === 0 && n.length > 0 && W(e, "shape.paths", "no renderable subpath ; shape geometry omitted"), r;
|
|
640
640
|
}
|
|
641
641
|
if (i !== void 0) {
|
|
642
642
|
const r = Bt(i);
|
|
643
|
-
return r === null ? (
|
|
643
|
+
return r === null ? (W(e, "shape.pathData", "not a strict SVG path grammar (allowlist/caps)"), []) : [{ d: r, fillRule: "nonzero" }];
|
|
644
644
|
}
|
|
645
|
-
return
|
|
645
|
+
return W(e, "shape.paths", "geometry is path but neither pathData nor paths[] is present"), [];
|
|
646
646
|
}
|
|
647
647
|
function cn(t, e) {
|
|
648
|
-
return t === void 0 || t === "NONZERO" ? "nonzero" : t === "EVENODD" ? "evenodd" : (
|
|
648
|
+
return t === void 0 || t === "NONZERO" ? "nonzero" : t === "EVENODD" ? "evenodd" : (W(e, "shape.paths.windingRule", "unknown winding rule ; defaulting to nonzero"), "nonzero");
|
|
649
649
|
}
|
|
650
|
-
function
|
|
650
|
+
function W(t, e, n) {
|
|
651
651
|
S(t, e, n);
|
|
652
652
|
}
|
|
653
653
|
function un(t) {
|
|
@@ -657,7 +657,7 @@ function ht(t, e) {
|
|
|
657
657
|
return typeof t == "number" && Number.isFinite(t) ? t : e;
|
|
658
658
|
}
|
|
659
659
|
function Mt(t, e, n, i = "geom") {
|
|
660
|
-
const r = un(t),
|
|
660
|
+
const r = un(t), a = ht(t.width, 100), o = ht(t.height, 100), s = ht(t.radius, 0), l = e.stroke ?? "none", c = e.strokeWidth ?? 0, u = e.mixBlendMode !== void 0 ? { mixBlendMode: e.mixBlendMode } : void 0;
|
|
661
661
|
if (r === "path") {
|
|
662
662
|
const d = ln(t, n);
|
|
663
663
|
return /* @__PURE__ */ f("g", { style: u, children: d.map((h, g) => /* @__PURE__ */ f(
|
|
@@ -676,9 +676,9 @@ function Mt(t, e, n, i = "geom") {
|
|
|
676
676
|
"ellipse",
|
|
677
677
|
{
|
|
678
678
|
style: u,
|
|
679
|
-
cx:
|
|
679
|
+
cx: a / 2,
|
|
680
680
|
cy: o / 2,
|
|
681
|
-
rx: Math.max(0,
|
|
681
|
+
rx: Math.max(0, a / 2 - c / 2),
|
|
682
682
|
ry: Math.max(0, o / 2 - c / 2),
|
|
683
683
|
fill: e.fill,
|
|
684
684
|
stroke: l,
|
|
@@ -691,7 +691,7 @@ function Mt(t, e, n, i = "geom") {
|
|
|
691
691
|
style: u,
|
|
692
692
|
x1: "0",
|
|
693
693
|
y1: o / 2,
|
|
694
|
-
x2:
|
|
694
|
+
x2: a,
|
|
695
695
|
y2: o / 2,
|
|
696
696
|
stroke: l !== "none" ? l : e.fill,
|
|
697
697
|
strokeWidth: c || 1
|
|
@@ -703,10 +703,10 @@ function Mt(t, e, n, i = "geom") {
|
|
|
703
703
|
style: u,
|
|
704
704
|
x: c / 2,
|
|
705
705
|
y: c / 2,
|
|
706
|
-
width: Math.max(0,
|
|
706
|
+
width: Math.max(0, a - c),
|
|
707
707
|
height: Math.max(0, o - c),
|
|
708
|
-
rx:
|
|
709
|
-
ry:
|
|
708
|
+
rx: s,
|
|
709
|
+
ry: s,
|
|
710
710
|
fill: e.fill,
|
|
711
711
|
stroke: l,
|
|
712
712
|
strokeWidth: c
|
|
@@ -723,7 +723,7 @@ const dn = 64, re = 1;
|
|
|
723
723
|
function ie(t) {
|
|
724
724
|
return t.props?.visible === !1;
|
|
725
725
|
}
|
|
726
|
-
function
|
|
726
|
+
function ot(t, e) {
|
|
727
727
|
const n = t?.[e];
|
|
728
728
|
return typeof n == "number" && Number.isFinite(n) ? n : 0;
|
|
729
729
|
}
|
|
@@ -735,17 +735,17 @@ function pn(t, e, n = re, i = dn) {
|
|
|
735
735
|
function oe(t, e = re) {
|
|
736
736
|
if (t.kind !== "frame") return !1;
|
|
737
737
|
for (const n of t.children ?? [])
|
|
738
|
-
if (!ie(n) && (
|
|
738
|
+
if (!ie(n) && (ot(n.props, "blur") > 0 || n.kind === "frame" && e > 0 && oe(n, e - 1)))
|
|
739
739
|
return !0;
|
|
740
740
|
return !1;
|
|
741
741
|
}
|
|
742
742
|
function se(t, e, n, i, r) {
|
|
743
|
-
const
|
|
744
|
-
let
|
|
745
|
-
for (let l = 0; l <
|
|
746
|
-
const c =
|
|
743
|
+
const a = t.children ?? [], o = [];
|
|
744
|
+
let s = 0;
|
|
745
|
+
for (let l = 0; l < a.length; l++) {
|
|
746
|
+
const c = a[l];
|
|
747
747
|
if (ie(c)) continue;
|
|
748
|
-
if (
|
|
748
|
+
if (s >= i) {
|
|
749
749
|
S(
|
|
750
750
|
e,
|
|
751
751
|
"mask.source.ref",
|
|
@@ -761,38 +761,38 @@ function se(t, e, n, i, r) {
|
|
|
761
761
|
m.length > 0 && (u = /* @__PURE__ */ f("g", { children: m }, `${r}-${l}`));
|
|
762
762
|
}
|
|
763
763
|
if (u === null) continue;
|
|
764
|
-
const d =
|
|
764
|
+
const d = ot(c.props, "blur");
|
|
765
765
|
if (d > 0) {
|
|
766
766
|
const m = `lumen-mcov-blur-${e ?? "x"}-${r}-${l}`;
|
|
767
|
-
u = /* @__PURE__ */
|
|
767
|
+
u = /* @__PURE__ */ I("g", { children: [
|
|
768
768
|
/* @__PURE__ */ f("filter", { id: m, x: "-120%", y: "-120%", width: "340%", height: "340%", children: /* @__PURE__ */ f("feGaussianBlur", { stdDeviation: d / 2 }) }),
|
|
769
769
|
/* @__PURE__ */ f("g", { filter: `url(#${m})`, children: u })
|
|
770
770
|
] }, `${r}-b-${l}`);
|
|
771
771
|
}
|
|
772
|
-
const h =
|
|
772
|
+
const h = ot(c.props, "x"), g = ot(c.props, "y");
|
|
773
773
|
o.push(
|
|
774
774
|
h !== 0 || g !== 0 ? /* @__PURE__ */ f("g", { transform: `translate(${h} ${g})`, children: u }, `${r}-t-${l}`) : u
|
|
775
|
-
),
|
|
775
|
+
), s++;
|
|
776
776
|
}
|
|
777
777
|
return o;
|
|
778
778
|
}
|
|
779
779
|
function hn({ resolved: t, nodeId: e, transitionFor: n, animateInitial: i }) {
|
|
780
|
-
const r = t.geometry ?? t.kind ?? "rect",
|
|
780
|
+
const r = t.geometry ?? t.kind ?? "rect", a = gt(t.fill, "shape.fill", e) ?? "transparent", o = gt(t.stroke, "shape.stroke", e) ?? "transparent", s = rt(t.stroke_width, 0), l = rt(t.width, 100), c = rt(t.height, 100), u = rt(t.opacity, 1), d = typeof t.ariaLabel == "string" ? t.ariaLabel : void 0, h = at(n, ["opacity"], i), g = et(h), m = lt({ opacity: u }, i, e), A = nt(), x = ne(
|
|
781
781
|
Le(ee(t.fills, "shape.fills", e), "shape.fills", e),
|
|
782
782
|
A,
|
|
783
783
|
"shape.fills",
|
|
784
784
|
e
|
|
785
|
-
), F = gn(t.strokes), k = x.map(Oe), y = k.flatMap((
|
|
786
|
-
color: gt(
|
|
787
|
-
width:
|
|
788
|
-
})) : [{ color: o, width:
|
|
785
|
+
), F = gn(t.strokes), k = x.map(Oe), y = k.flatMap((_) => _.defs), p = k.length > 0 ? k.map((_) => ({ ref: _.ref, mixBlendMode: _.mixBlendMode })) : [{ ref: a }], w = F.length > 0 ? F.map((_) => ({
|
|
786
|
+
color: gt(_.color, "shape.strokes.color", e) ?? "transparent",
|
|
787
|
+
width: _.width ?? 0
|
|
788
|
+
})) : [{ color: o, width: s }], v = [...p].reverse(), $ = [...w].reverse(), R = r === "path" ? $.filter((_) => _.width > 0 && _.color !== "transparent") : $, V = (_, b, N, P) => Mt(
|
|
789
789
|
t,
|
|
790
|
-
{ fill:
|
|
790
|
+
{ fill: _, stroke: b.color, strokeWidth: b.width, mixBlendMode: P },
|
|
791
791
|
e,
|
|
792
|
-
|
|
792
|
+
N
|
|
793
793
|
);
|
|
794
|
-
return /* @__PURE__ */
|
|
795
|
-
|
|
794
|
+
return /* @__PURE__ */ I(
|
|
795
|
+
U.svg,
|
|
796
796
|
{
|
|
797
797
|
width: l,
|
|
798
798
|
height: c,
|
|
@@ -804,48 +804,112 @@ function hn({ resolved: t, nodeId: e, transitionFor: n, animateInitial: i }) {
|
|
|
804
804
|
children: [
|
|
805
805
|
y.length > 0 && /* @__PURE__ */ f("defs", { children: y }),
|
|
806
806
|
v.map(
|
|
807
|
-
(
|
|
807
|
+
(_, b) => V(_.ref, { color: "transparent", width: 0 }, `fill-${b}`, _.mixBlendMode)
|
|
808
808
|
),
|
|
809
|
-
|
|
809
|
+
R.map((_, b) => V("none", _, `stroke-${b}`))
|
|
810
810
|
]
|
|
811
811
|
}
|
|
812
812
|
);
|
|
813
813
|
}
|
|
814
814
|
function gt(t, e, n) {
|
|
815
815
|
if (typeof t != "string") return null;
|
|
816
|
-
const i =
|
|
817
|
-
return i === null &&
|
|
816
|
+
const i = D(t);
|
|
817
|
+
return i === null && B(e, n), i;
|
|
818
818
|
}
|
|
819
819
|
function gn(t) {
|
|
820
820
|
return Array.isArray(t) ? t.filter(
|
|
821
821
|
(e) => typeof e == "object" && e !== null && ("color" in e || "width" in e)
|
|
822
822
|
) : [];
|
|
823
823
|
}
|
|
824
|
-
function
|
|
824
|
+
function rt(t, e) {
|
|
825
825
|
return typeof t == "number" && Number.isFinite(t) ? t : e;
|
|
826
826
|
}
|
|
827
|
-
function
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
827
|
+
function ae({
|
|
828
|
+
peerLabel: t,
|
|
829
|
+
objectFit: e,
|
|
830
|
+
muted: n = !0
|
|
831
|
+
}) {
|
|
832
|
+
const i = Kt(), r = i?.resolvePeerStream, a = i?.subscribePeerStream, o = tt(null), [s, l] = vt(null);
|
|
833
|
+
return Y(() => {
|
|
834
|
+
if (a !== void 0)
|
|
835
|
+
return a(t, l);
|
|
836
|
+
if (r !== void 0) {
|
|
837
|
+
l(r(t));
|
|
838
|
+
return;
|
|
839
|
+
}
|
|
840
|
+
l(null);
|
|
841
|
+
}, [t, r, a]), Y(() => {
|
|
842
|
+
const c = o.current;
|
|
843
|
+
if (c !== null)
|
|
844
|
+
return c.srcObject = s, () => {
|
|
845
|
+
c !== null && (c.srcObject = null);
|
|
846
|
+
};
|
|
847
|
+
}, [s]), s === null ? /* @__PURE__ */ f(
|
|
848
|
+
"div",
|
|
849
|
+
{
|
|
850
|
+
"aria-hidden": !0,
|
|
851
|
+
"data-lumencast-media-live": !0,
|
|
852
|
+
style: { width: "100%", height: "100%", opacity: 0, pointerEvents: "none" }
|
|
853
|
+
}
|
|
854
|
+
) : /* @__PURE__ */ f(
|
|
832
855
|
"video",
|
|
833
856
|
{
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
muted:
|
|
857
|
+
ref: o,
|
|
858
|
+
"data-lumencast-media-live": !0,
|
|
859
|
+
autoPlay: !0,
|
|
860
|
+
muted: n,
|
|
838
861
|
playsInline: !0,
|
|
839
862
|
style: {
|
|
840
863
|
width: "100%",
|
|
841
864
|
height: "100%",
|
|
842
|
-
objectFit:
|
|
865
|
+
objectFit: e,
|
|
866
|
+
pointerEvents: "none"
|
|
843
867
|
}
|
|
844
868
|
}
|
|
845
869
|
);
|
|
846
870
|
}
|
|
871
|
+
function mn({ resolved: t, nodeId: e }) {
|
|
872
|
+
const n = nt(), i = t.fit ?? "cover", r = typeof t.peerLabel == "string" && t.peerLabel.length > 0 ? t.peerLabel : "";
|
|
873
|
+
if (r !== "")
|
|
874
|
+
return /* @__PURE__ */ f(ae, { peerLabel: r, objectFit: i });
|
|
875
|
+
const a = $t(t.src, n, "media.src", e);
|
|
876
|
+
if (!a) return null;
|
|
877
|
+
const o = t.loop ?? !0, s = t.mute ?? !0, l = t.autoplay ?? !0;
|
|
878
|
+
return /* @__PURE__ */ f(
|
|
879
|
+
"video",
|
|
880
|
+
{
|
|
881
|
+
src: a,
|
|
882
|
+
autoPlay: l,
|
|
883
|
+
loop: o,
|
|
884
|
+
muted: s,
|
|
885
|
+
playsInline: !0,
|
|
886
|
+
style: yn(i)
|
|
887
|
+
}
|
|
888
|
+
);
|
|
889
|
+
}
|
|
890
|
+
function yn(t) {
|
|
891
|
+
return {
|
|
892
|
+
width: "100%",
|
|
893
|
+
height: "100%",
|
|
894
|
+
objectFit: t
|
|
895
|
+
};
|
|
896
|
+
}
|
|
897
|
+
function bn({ resolved: t }) {
|
|
898
|
+
const e = typeof t.peer_label == "string" && t.peer_label.length > 0 ? t.peer_label : "";
|
|
899
|
+
if (e === "")
|
|
900
|
+
return /* @__PURE__ */ f(
|
|
901
|
+
"div",
|
|
902
|
+
{
|
|
903
|
+
"aria-hidden": !0,
|
|
904
|
+
"data-lumencast-meet-peer": !0,
|
|
905
|
+
style: { width: "100%", height: "100%", opacity: 0, pointerEvents: "none" }
|
|
906
|
+
}
|
|
907
|
+
);
|
|
908
|
+
const n = typeof t.object_fit == "string" && t.object_fit.length > 0 ? t.object_fit : "cover", i = t.muted === void 0 ? !0 : t.muted !== !1;
|
|
909
|
+
return /* @__PURE__ */ f(ae, { peerLabel: e, objectFit: n, muted: i });
|
|
910
|
+
}
|
|
847
911
|
const Lt = /* @__PURE__ */ new Set();
|
|
848
|
-
function
|
|
912
|
+
function kn({ resolved: t, nodeId: e }) {
|
|
849
913
|
const n = t.scene_id, i = t.scene_version;
|
|
850
914
|
if (!n || !i)
|
|
851
915
|
return S(e, "instance.scene_id", "missing scene_id or scene_version ; not rendered"), null;
|
|
@@ -855,7 +919,7 @@ function yn({ resolved: t, nodeId: e }) {
|
|
|
855
919
|
"instance",
|
|
856
920
|
"scaffold render — async bundle fetch + __params.* injection are not yet wired (LSML 1.1 §4.9)"
|
|
857
921
|
));
|
|
858
|
-
const
|
|
922
|
+
const a = t.size, o = t.position;
|
|
859
923
|
return /* @__PURE__ */ f(
|
|
860
924
|
"div",
|
|
861
925
|
{
|
|
@@ -865,22 +929,22 @@ function yn({ resolved: t, nodeId: e }) {
|
|
|
865
929
|
position: o ? "absolute" : "relative",
|
|
866
930
|
left: o?.x,
|
|
867
931
|
top: o?.y,
|
|
868
|
-
width:
|
|
869
|
-
height:
|
|
932
|
+
width: a?.w,
|
|
933
|
+
height: a?.h,
|
|
870
934
|
outline: "none",
|
|
871
935
|
boxSizing: "border-box"
|
|
872
936
|
}
|
|
873
937
|
}
|
|
874
938
|
);
|
|
875
939
|
}
|
|
876
|
-
function
|
|
877
|
-
const e = Ht(t.width, "100%"), n = Ht(t.height, "100%"), i = typeof t["x-zab.sourceKind"] == "string" ? t["x-zab.sourceKind"] : "", r = typeof t["x-zab.deviceRef"] == "string" ? t["x-zab.deviceRef"] : "", o =
|
|
878
|
-
return
|
|
879
|
-
if (!
|
|
940
|
+
function wn({ resolved: t }) {
|
|
941
|
+
const e = Ht(t.width, "100%"), n = Ht(t.height, "100%"), i = typeof t["x-zab.sourceKind"] == "string" ? t["x-zab.sourceKind"] : "", r = typeof t["x-zab.deviceRef"] == "string" ? t["x-zab.deviceRef"] : "", o = Kt()?.resolveCaptureDevice, s = tt(null), [l, c] = vt(null);
|
|
942
|
+
return Y(() => {
|
|
943
|
+
if (!xn()) return;
|
|
880
944
|
let u = !1, d = null;
|
|
881
945
|
return (async () => {
|
|
882
946
|
try {
|
|
883
|
-
const h = await
|
|
947
|
+
const h = await $n(i, r, o);
|
|
884
948
|
if (h === null) return;
|
|
885
949
|
if (u) {
|
|
886
950
|
zt(h);
|
|
@@ -892,16 +956,16 @@ function bn({ resolved: t }) {
|
|
|
892
956
|
})(), () => {
|
|
893
957
|
u = !0, d !== null && zt(d);
|
|
894
958
|
};
|
|
895
|
-
}, [i, r, o]),
|
|
896
|
-
const u =
|
|
959
|
+
}, [i, r, o]), Y(() => {
|
|
960
|
+
const u = s.current;
|
|
897
961
|
if (u !== null)
|
|
898
962
|
return u.srcObject = l, () => {
|
|
899
963
|
u !== null && (u.srcObject = null);
|
|
900
964
|
};
|
|
901
|
-
}, [l]), l !== null &&
|
|
965
|
+
}, [l]), l !== null && vn(i) ? /* @__PURE__ */ f(
|
|
902
966
|
"video",
|
|
903
967
|
{
|
|
904
|
-
ref:
|
|
968
|
+
ref: s,
|
|
905
969
|
"data-lumencast-capture": !0,
|
|
906
970
|
autoPlay: !0,
|
|
907
971
|
muted: !0,
|
|
@@ -917,30 +981,41 @@ function bn({ resolved: t }) {
|
|
|
917
981
|
}
|
|
918
982
|
);
|
|
919
983
|
}
|
|
920
|
-
function
|
|
984
|
+
function xn() {
|
|
921
985
|
return typeof navigator < "u" && typeof navigator.mediaDevices?.getUserMedia == "function";
|
|
922
986
|
}
|
|
923
|
-
function
|
|
987
|
+
function vn(t) {
|
|
924
988
|
return t === "media.webcam" || t === "media.screen" || t === "media.window";
|
|
925
989
|
}
|
|
926
|
-
async function
|
|
927
|
-
const i = navigator.mediaDevices,
|
|
990
|
+
async function $n(t, e, n) {
|
|
991
|
+
const i = navigator.mediaDevices, r = await n?.(e, t) ?? null, a = r?.deviceId, o = e.length > 0;
|
|
928
992
|
switch (t) {
|
|
929
993
|
case "media.webcam":
|
|
930
|
-
return i.getUserMedia({ video: mt(s) });
|
|
931
994
|
case "media.mic":
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
995
|
+
case "media.app_audio": {
|
|
996
|
+
if (o && (typeof a != "string" || a.length === 0))
|
|
997
|
+
return null;
|
|
998
|
+
const s = t === "media.webcam" ? "video" : "audio";
|
|
999
|
+
return i.getUserMedia({ [s]: Sn(a) });
|
|
1000
|
+
}
|
|
935
1001
|
case "media.screen":
|
|
936
|
-
case "media.window":
|
|
937
|
-
|
|
1002
|
+
case "media.window": {
|
|
1003
|
+
const s = r?.captureSourceId;
|
|
1004
|
+
return typeof s == "string" && s.length > 0 ? i.getUserMedia({
|
|
1005
|
+
video: {
|
|
1006
|
+
mandatory: {
|
|
1007
|
+
chromeMediaSource: "desktop",
|
|
1008
|
+
chromeMediaSourceId: s
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
}) : o ? null : i.getDisplayMedia({ video: !0 });
|
|
1012
|
+
}
|
|
938
1013
|
default:
|
|
939
1014
|
return null;
|
|
940
1015
|
}
|
|
941
1016
|
}
|
|
942
|
-
function
|
|
943
|
-
return typeof t == "string" && t.length > 0 ? { deviceId: t } : !0;
|
|
1017
|
+
function Sn(t) {
|
|
1018
|
+
return typeof t == "string" && t.length > 0 ? { deviceId: { exact: t } } : !0;
|
|
944
1019
|
}
|
|
945
1020
|
function zt(t) {
|
|
946
1021
|
for (const e of t.getTracks()) e.stop();
|
|
@@ -948,7 +1023,7 @@ function zt(t) {
|
|
|
948
1023
|
function Ht(t, e) {
|
|
949
1024
|
return typeof t == "number" && Number.isFinite(t) ? `${t}px` : typeof t == "string" && t.length > 0 ? t : e;
|
|
950
1025
|
}
|
|
951
|
-
const
|
|
1026
|
+
const Mn = {
|
|
952
1027
|
stack: ve,
|
|
953
1028
|
grid: $e,
|
|
954
1029
|
frame: ze,
|
|
@@ -956,18 +1031,21 @@ const vn = {
|
|
|
956
1031
|
image: tn,
|
|
957
1032
|
shape: hn,
|
|
958
1033
|
media: mn,
|
|
959
|
-
|
|
1034
|
+
// ADR 006 §3.3/§3.5 — the unified source kind : every exported source is a
|
|
1035
|
+
// `meet.peer` node rendered in `<video srcObject>` from the WebRTC viewer.
|
|
1036
|
+
"meet.peer": bn,
|
|
1037
|
+
instance: kn,
|
|
960
1038
|
// RFC-0001 / ADR 004 — Zab vendor capture placeholder (transparent, inert).
|
|
961
|
-
"x-zab.capture":
|
|
962
|
-
},
|
|
963
|
-
function
|
|
964
|
-
const n =
|
|
965
|
-
return /* @__PURE__ */ f(
|
|
1039
|
+
"x-zab.capture": wn
|
|
1040
|
+
}, kt = st("");
|
|
1041
|
+
function An({ prefix: t, children: e }) {
|
|
1042
|
+
const n = K(kt), i = n ? `${n}.${t}` : t;
|
|
1043
|
+
return /* @__PURE__ */ f(kt.Provider, { value: i, children: e });
|
|
966
1044
|
}
|
|
967
1045
|
function At() {
|
|
968
|
-
return
|
|
1046
|
+
return K(kt);
|
|
969
1047
|
}
|
|
970
|
-
function
|
|
1048
|
+
function G(t, e) {
|
|
971
1049
|
return !t || e.startsWith("__") ? e : `${t}.${e}`;
|
|
972
1050
|
}
|
|
973
1051
|
function Wt(t) {
|
|
@@ -982,84 +1060,84 @@ function Wt(t) {
|
|
|
982
1060
|
return;
|
|
983
1061
|
}
|
|
984
1062
|
}
|
|
985
|
-
function
|
|
1063
|
+
function Fn(t) {
|
|
986
1064
|
const e = Wt(t?.x), n = Wt(t?.y);
|
|
987
1065
|
return e === n && e !== void 0 ? e : e ?? n;
|
|
988
1066
|
}
|
|
989
|
-
function
|
|
1067
|
+
function _n({
|
|
990
1068
|
visible: t,
|
|
991
1069
|
opacity: e,
|
|
992
1070
|
rotation: n,
|
|
993
1071
|
flipY: i,
|
|
994
1072
|
blur: r,
|
|
995
|
-
sizing:
|
|
1073
|
+
sizing: a,
|
|
996
1074
|
position: o,
|
|
997
|
-
size:
|
|
1075
|
+
size: s,
|
|
998
1076
|
blendMode: l,
|
|
999
1077
|
children: c
|
|
1000
1078
|
}) {
|
|
1001
1079
|
if (t === !1)
|
|
1002
1080
|
return null;
|
|
1003
|
-
const u =
|
|
1081
|
+
const u = X(l), d = typeof e == "number" && e !== 1, h = typeof n == "number" && n !== 0, g = i === !0, m = typeof r == "number" && r > 0, A = a?.x !== void 0 || a?.y !== void 0, x = o !== void 0, F = u !== void 0;
|
|
1004
1082
|
if (!d && !h && !g && !m && !A && !x && !F)
|
|
1005
|
-
return /* @__PURE__ */ f(
|
|
1083
|
+
return /* @__PURE__ */ f(Q, { children: c });
|
|
1006
1084
|
let k;
|
|
1007
1085
|
if (h || g) {
|
|
1008
1086
|
const v = [];
|
|
1009
1087
|
h && v.push(`rotate(${n}deg)`), g && v.push("scaleY(-1)"), k = v.join(" ");
|
|
1010
1088
|
}
|
|
1011
|
-
const y = m ? `blur(${r / 2}px)` : void 0, p = A ?
|
|
1089
|
+
const y = m ? `blur(${r / 2}px)` : void 0, p = A ? Fn(a) : void 0;
|
|
1012
1090
|
if (F && (d || k !== void 0 || y !== void 0)) {
|
|
1013
1091
|
const v = { mixBlendMode: u };
|
|
1014
1092
|
x && (v.position = "absolute", v.left = o.x, v.top = o.y), p !== void 0 && (v.flex = p);
|
|
1015
1093
|
const $ = {};
|
|
1016
|
-
return typeof
|
|
1094
|
+
return typeof s?.w == "number" && ($.width = s.w), typeof s?.h == "number" && ($.height = s.h), d && ($.opacity = e), k !== void 0 && ($.transform = k), y !== void 0 && ($.filter = y), /* @__PURE__ */ f("div", { style: v, children: /* @__PURE__ */ f("div", { style: $, children: c }) });
|
|
1017
1095
|
}
|
|
1018
1096
|
const w = {};
|
|
1019
|
-
return d && (w.opacity = e), k !== void 0 && (w.transform = k), y !== void 0 && (w.filter = y), F && (w.mixBlendMode = u), x && (w.position = "absolute", w.left = o.x, w.top = o.y, typeof
|
|
1097
|
+
return d && (w.opacity = e), k !== void 0 && (w.transform = k), y !== void 0 && (w.filter = y), F && (w.mixBlendMode = u), x && (w.position = "absolute", w.left = o.x, w.top = o.y, typeof s?.w == "number" && (w.width = s.w), typeof s?.h == "number" && (w.height = s.h)), p !== void 0 && (w.flex = p), /* @__PURE__ */ f("div", { style: w, children: c });
|
|
1020
1098
|
}
|
|
1021
|
-
const
|
|
1099
|
+
const jn = {
|
|
1022
1100
|
linear: "linear",
|
|
1023
1101
|
"ease-in": "easeIn",
|
|
1024
1102
|
"ease-out": "easeOut",
|
|
1025
1103
|
"ease-in-out": "easeInOut"
|
|
1026
1104
|
};
|
|
1027
|
-
function
|
|
1105
|
+
function Rn(t, e) {
|
|
1028
1106
|
const n = t.steps;
|
|
1029
1107
|
if (!Array.isArray(n) || n.length < 2) return;
|
|
1030
1108
|
const i = n[0], r = n[n.length - 1];
|
|
1031
1109
|
if (i.at !== 0 || r.at !== 1) return;
|
|
1032
|
-
const
|
|
1033
|
-
return qt(n, "opacity", o, e), qt(n, "filter", o, e),
|
|
1110
|
+
const a = n.map((s) => s.at), o = {};
|
|
1111
|
+
return qt(n, "opacity", o, e), qt(n, "filter", o, e), it(n, "scale", o), it(n, "translateX", o), it(n, "translateY", o), it(n, "rotate", o), {
|
|
1034
1112
|
animate: o,
|
|
1035
1113
|
transition: {
|
|
1036
1114
|
duration: t.duration_ms / 1e3,
|
|
1037
|
-
ease:
|
|
1038
|
-
times:
|
|
1115
|
+
ease: jn[t.easing ?? "linear"],
|
|
1116
|
+
times: a
|
|
1039
1117
|
}
|
|
1040
1118
|
};
|
|
1041
1119
|
}
|
|
1042
1120
|
function qt(t, e, n, i) {
|
|
1043
1121
|
let r = !1;
|
|
1044
|
-
const
|
|
1122
|
+
const a = [];
|
|
1045
1123
|
let o;
|
|
1046
|
-
for (const
|
|
1047
|
-
let l =
|
|
1124
|
+
for (const s of t) {
|
|
1125
|
+
let l = s[e];
|
|
1048
1126
|
if (e === "filter" && l !== void 0) {
|
|
1049
1127
|
const c = ke(l);
|
|
1050
1128
|
c === null ? (Vt("keyframes.steps[].filter", i), l = void 0) : l = c;
|
|
1051
1129
|
}
|
|
1052
|
-
l !== void 0 ? (r = !0, o = l,
|
|
1130
|
+
l !== void 0 ? (r = !0, o = l, a.push(l)) : a.push(o ?? (e === "opacity" ? 1 : we));
|
|
1053
1131
|
}
|
|
1054
|
-
r && (n[e] =
|
|
1132
|
+
r && (n[e] = a);
|
|
1055
1133
|
}
|
|
1056
|
-
function
|
|
1134
|
+
function it(t, e, n) {
|
|
1057
1135
|
let i = !1;
|
|
1058
1136
|
const r = [];
|
|
1059
|
-
let
|
|
1137
|
+
let a;
|
|
1060
1138
|
for (const o of t) {
|
|
1061
|
-
const
|
|
1062
|
-
typeof
|
|
1139
|
+
const s = o.transform?.[e];
|
|
1140
|
+
typeof s == "number" ? (i = !0, a = s, r.push(s)) : r.push(a ?? Tn(e));
|
|
1063
1141
|
}
|
|
1064
1142
|
if (i)
|
|
1065
1143
|
if (e === "rotate")
|
|
@@ -1069,76 +1147,76 @@ function nt(t, e, n) {
|
|
|
1069
1147
|
n[o] = r;
|
|
1070
1148
|
}
|
|
1071
1149
|
}
|
|
1072
|
-
function
|
|
1150
|
+
function Tn(t) {
|
|
1073
1151
|
return t === "scale" ? 1 : 0;
|
|
1074
1152
|
}
|
|
1075
1153
|
const Ft = st(0), Gt = 2e3;
|
|
1076
|
-
function
|
|
1154
|
+
function Cn(t, e) {
|
|
1077
1155
|
if (e <= 0) return 0;
|
|
1078
1156
|
const n = t * e;
|
|
1079
1157
|
return n > Gt ? Gt : n;
|
|
1080
1158
|
}
|
|
1081
|
-
function
|
|
1159
|
+
function On({
|
|
1082
1160
|
keyframes: t,
|
|
1083
1161
|
store: e,
|
|
1084
1162
|
nodeId: n,
|
|
1085
1163
|
children: i
|
|
1086
1164
|
}) {
|
|
1087
|
-
|
|
1088
|
-
const r = At(),
|
|
1165
|
+
xt();
|
|
1166
|
+
const r = At(), a = K(Ft), o = tt(void 0), s = tt(0);
|
|
1089
1167
|
if (t.key !== void 0) {
|
|
1090
|
-
const u = e.signal(
|
|
1091
|
-
o.current !== u && (o.current = u,
|
|
1168
|
+
const u = e.signal(G(r, t.key)).value;
|
|
1169
|
+
o.current !== u && (o.current = u, s.current += 1);
|
|
1092
1170
|
}
|
|
1093
|
-
const l =
|
|
1171
|
+
const l = Rn(t, n);
|
|
1094
1172
|
if (!l)
|
|
1095
|
-
return /* @__PURE__ */ f(
|
|
1096
|
-
const c =
|
|
1097
|
-
return /* @__PURE__ */
|
|
1098
|
-
|
|
1173
|
+
return /* @__PURE__ */ f(Q, { children: i });
|
|
1174
|
+
const c = a > 0 ? { ...l.transition, delay: a / 1e3 } : l.transition;
|
|
1175
|
+
return /* @__PURE__ */ I(
|
|
1176
|
+
U.div,
|
|
1099
1177
|
{
|
|
1100
1178
|
style: { position: "absolute", inset: 0 },
|
|
1101
|
-
initial:
|
|
1179
|
+
initial: Pn(l.animate),
|
|
1102
1180
|
animate: l.animate,
|
|
1103
1181
|
transition: c,
|
|
1104
1182
|
children: [
|
|
1105
|
-
/* @__PURE__ */ f(
|
|
1183
|
+
/* @__PURE__ */ f(Nn, {}),
|
|
1106
1184
|
i
|
|
1107
1185
|
]
|
|
1108
1186
|
},
|
|
1109
|
-
|
|
1187
|
+
s.current
|
|
1110
1188
|
);
|
|
1111
1189
|
}
|
|
1112
|
-
function
|
|
1113
|
-
return
|
|
1190
|
+
function Nn() {
|
|
1191
|
+
return Y(() => {
|
|
1114
1192
|
}, []), null;
|
|
1115
1193
|
}
|
|
1116
|
-
function
|
|
1194
|
+
function Pn(t) {
|
|
1117
1195
|
const e = {};
|
|
1118
1196
|
for (const [n, i] of Object.entries(t))
|
|
1119
1197
|
i.length > 0 && (e[n] = i[0]);
|
|
1120
1198
|
return e;
|
|
1121
1199
|
}
|
|
1122
|
-
function
|
|
1200
|
+
function En(t, e = (i) => requestAnimationFrame(i), n = (i) => cancelAnimationFrame(i)) {
|
|
1123
1201
|
const i = /* @__PURE__ */ new Map();
|
|
1124
|
-
let r = null,
|
|
1202
|
+
let r = null, a = !1;
|
|
1125
1203
|
const o = () => {
|
|
1126
1204
|
r = null;
|
|
1127
|
-
const
|
|
1205
|
+
const s = [...i.entries()];
|
|
1128
1206
|
i.clear();
|
|
1129
|
-
for (const [l, c] of
|
|
1207
|
+
for (const [l, c] of s)
|
|
1130
1208
|
t(l, c);
|
|
1131
1209
|
};
|
|
1132
1210
|
return {
|
|
1133
|
-
push(
|
|
1134
|
-
|
|
1211
|
+
push(s, l) {
|
|
1212
|
+
a || (i.set(s, l), r === null && (r = e(o)));
|
|
1135
1213
|
},
|
|
1136
1214
|
dispose() {
|
|
1137
|
-
|
|
1215
|
+
a = !0, i.clear(), r !== null && (n(r), r = null);
|
|
1138
1216
|
}
|
|
1139
1217
|
};
|
|
1140
1218
|
}
|
|
1141
|
-
const
|
|
1219
|
+
const Dn = {
|
|
1142
1220
|
aliceblue: 15792383,
|
|
1143
1221
|
antiquewhite: 16444375,
|
|
1144
1222
|
aqua: 65535,
|
|
@@ -1288,57 +1366,57 @@ const Nn = {
|
|
|
1288
1366
|
yellow: 16776960,
|
|
1289
1367
|
yellowgreen: 10145074
|
|
1290
1368
|
};
|
|
1291
|
-
function
|
|
1292
|
-
const e =
|
|
1369
|
+
function Bn(t) {
|
|
1370
|
+
const e = D(t);
|
|
1293
1371
|
if (e === null) return null;
|
|
1294
|
-
if (e.startsWith("#")) return
|
|
1372
|
+
if (e.startsWith("#")) return Ln(e);
|
|
1295
1373
|
if (e.startsWith("rgb")) {
|
|
1296
1374
|
const r = e.slice(e.indexOf("(") + 1, -1).split(",").map((d) => d.trim());
|
|
1297
1375
|
if (r.length < 3) return null;
|
|
1298
|
-
const o = r[0].endsWith("%") ? 100 : 255,
|
|
1299
|
-
return
|
|
1376
|
+
const o = r[0].endsWith("%") ? 100 : 255, s = mt(r[0], o), l = mt(r[1], o), c = mt(r[2], o), u = r.length > 3 ? It(r[3]) : 1;
|
|
1377
|
+
return s === null || l === null || c === null || u === null ? null : [s, l, c, u];
|
|
1300
1378
|
}
|
|
1301
1379
|
if (e.startsWith("hsl")) {
|
|
1302
1380
|
const r = e.slice(e.indexOf("(") + 1, -1).split(",").map((h) => h.trim());
|
|
1303
1381
|
if (r.length < 3) return null;
|
|
1304
|
-
const
|
|
1305
|
-
if (![
|
|
1306
|
-
const [c, u, d] =
|
|
1382
|
+
const a = Number(r[0].replace("deg", "")), o = Number(r[1].replace("%", "")) / 100, s = Number(r[2].replace("%", "")) / 100, l = r.length > 3 ? It(r[3]) : 1;
|
|
1383
|
+
if (![a, o, s].every(Number.isFinite) || l === null) return null;
|
|
1384
|
+
const [c, u, d] = zn(a, o, s);
|
|
1307
1385
|
return [c, u, d, l];
|
|
1308
1386
|
}
|
|
1309
1387
|
if (e === "transparent") return [0, 0, 0, 0];
|
|
1310
1388
|
if (e === "currentcolor") return null;
|
|
1311
|
-
const n =
|
|
1389
|
+
const n = Dn[e];
|
|
1312
1390
|
return n === void 0 ? null : [(n >> 16 & 255) / 255, (n >> 8 & 255) / 255, (n & 255) / 255, 1];
|
|
1313
1391
|
}
|
|
1314
|
-
function
|
|
1392
|
+
function Ln(t) {
|
|
1315
1393
|
const e = t.slice(1);
|
|
1316
1394
|
if (e.length === 3 || e.length === 4) {
|
|
1317
|
-
const n = parseInt(e[0] + e[0], 16), i = parseInt(e[1] + e[1], 16), r = parseInt(e[2] + e[2], 16),
|
|
1318
|
-
return [n / 255, i / 255, r / 255,
|
|
1395
|
+
const n = parseInt(e[0] + e[0], 16), i = parseInt(e[1] + e[1], 16), r = parseInt(e[2] + e[2], 16), a = e.length === 4 ? parseInt(e[3] + e[3], 16) : 255;
|
|
1396
|
+
return [n / 255, i / 255, r / 255, a / 255];
|
|
1319
1397
|
}
|
|
1320
1398
|
if (e.length === 6 || e.length === 8) {
|
|
1321
|
-
const n = parseInt(e.slice(0, 2), 16), i = parseInt(e.slice(2, 4), 16), r = parseInt(e.slice(4, 6), 16),
|
|
1322
|
-
return [n / 255, i / 255, r / 255,
|
|
1399
|
+
const n = parseInt(e.slice(0, 2), 16), i = parseInt(e.slice(2, 4), 16), r = parseInt(e.slice(4, 6), 16), a = e.length === 8 ? parseInt(e.slice(6, 8), 16) : 255;
|
|
1400
|
+
return [n / 255, i / 255, r / 255, a / 255];
|
|
1323
1401
|
}
|
|
1324
1402
|
return null;
|
|
1325
1403
|
}
|
|
1326
|
-
function
|
|
1404
|
+
function mt(t, e) {
|
|
1327
1405
|
const n = Number(t.replace("%", ""));
|
|
1328
1406
|
return Number.isFinite(n) ? T(n / e) : null;
|
|
1329
1407
|
}
|
|
1330
|
-
function
|
|
1408
|
+
function It(t) {
|
|
1331
1409
|
const e = t.endsWith("%"), n = Number(t.replace("%", ""));
|
|
1332
1410
|
return Number.isFinite(n) ? T(e ? n / 100 : n) : null;
|
|
1333
1411
|
}
|
|
1334
|
-
function
|
|
1335
|
-
const i = (t % 360 + 360) % 360, r = (1 - Math.abs(2 * n - 1)) * e,
|
|
1336
|
-
let
|
|
1337
|
-
|
|
1412
|
+
function zn(t, e, n) {
|
|
1413
|
+
const i = (t % 360 + 360) % 360, r = (1 - Math.abs(2 * n - 1)) * e, a = i / 60, o = r * (1 - Math.abs(a % 2 - 1));
|
|
1414
|
+
let s = 0, l = 0, c = 0;
|
|
1415
|
+
a < 1 ? [s, l, c] = [r, o, 0] : a < 2 ? [s, l, c] = [o, r, 0] : a < 3 ? [s, l, c] = [0, r, o] : a < 4 ? [s, l, c] = [0, o, r] : a < 5 ? [s, l, c] = [o, 0, r] : [s, l, c] = [r, 0, o];
|
|
1338
1416
|
const u = n - r / 2;
|
|
1339
|
-
return [T(
|
|
1417
|
+
return [T(s + u), T(l + u), T(c + u)];
|
|
1340
1418
|
}
|
|
1341
|
-
function
|
|
1419
|
+
function Hn(t, e, n) {
|
|
1342
1420
|
return [
|
|
1343
1421
|
T(t[0] + n * (e[0] - t[0])),
|
|
1344
1422
|
T(t[1] + n * (e[1] - t[1])),
|
|
@@ -1346,64 +1424,64 @@ function Bn(t, e, n) {
|
|
|
1346
1424
|
T(t[3] + n * (e[3] - t[3]))
|
|
1347
1425
|
];
|
|
1348
1426
|
}
|
|
1349
|
-
function
|
|
1427
|
+
function Yt(t) {
|
|
1350
1428
|
const e = Math.round(T(t[0]) * 255), n = Math.round(T(t[1]) * 255), i = Math.round(T(t[2]) * 255), r = Math.round(T(t[3]) * 1e4) / 1e4;
|
|
1351
1429
|
return `rgba(${e}, ${n}, ${i}, ${r})`;
|
|
1352
1430
|
}
|
|
1353
1431
|
function T(t) {
|
|
1354
1432
|
return t < 0 ? 0 : t > 1 ? 1 : t;
|
|
1355
1433
|
}
|
|
1356
|
-
const
|
|
1434
|
+
const le = {
|
|
1357
1435
|
"style.color": "colour",
|
|
1358
1436
|
fill: "fill",
|
|
1359
1437
|
background: "background"
|
|
1360
1438
|
};
|
|
1361
|
-
function
|
|
1439
|
+
function Wn(t, e) {
|
|
1362
1440
|
switch (t) {
|
|
1363
1441
|
case "opacity": {
|
|
1364
|
-
const n =
|
|
1442
|
+
const n = H(e);
|
|
1365
1443
|
return n === null ? null : { opacity: n < 0 ? 0 : n > 1 ? 1 : n };
|
|
1366
1444
|
}
|
|
1367
1445
|
case "transform.translate": {
|
|
1368
1446
|
if (!Array.isArray(e) || e.length !== 2) return null;
|
|
1369
|
-
const n =
|
|
1447
|
+
const n = H(e[0]), i = H(e[1]);
|
|
1370
1448
|
return n === null || i === null ? null : { x: n, y: i };
|
|
1371
1449
|
}
|
|
1372
1450
|
case "transform.scale": {
|
|
1373
|
-
const n =
|
|
1451
|
+
const n = H(e);
|
|
1374
1452
|
if (n !== null) return { scaleX: n, scaleY: n };
|
|
1375
1453
|
if (Array.isArray(e) && e.length === 2) {
|
|
1376
|
-
const i =
|
|
1454
|
+
const i = H(e[0]), r = H(e[1]);
|
|
1377
1455
|
return i === null || r === null ? null : { scaleX: i, scaleY: r };
|
|
1378
1456
|
}
|
|
1379
1457
|
return null;
|
|
1380
1458
|
}
|
|
1381
1459
|
case "transform.rotate": {
|
|
1382
|
-
const n =
|
|
1460
|
+
const n = H(e);
|
|
1383
1461
|
return n === null ? null : { rotate: n };
|
|
1384
1462
|
}
|
|
1385
1463
|
case "filter.blur": {
|
|
1386
|
-
const n =
|
|
1464
|
+
const n = Rt("blur", e);
|
|
1387
1465
|
return n === null ? null : { blur: n };
|
|
1388
1466
|
}
|
|
1389
1467
|
case "filter.brightness": {
|
|
1390
|
-
const n =
|
|
1468
|
+
const n = Rt("brightness", e);
|
|
1391
1469
|
return n === null ? null : { brightness: n };
|
|
1392
1470
|
}
|
|
1393
1471
|
default:
|
|
1394
1472
|
return null;
|
|
1395
1473
|
}
|
|
1396
1474
|
}
|
|
1397
|
-
function
|
|
1475
|
+
function H(t) {
|
|
1398
1476
|
return typeof t != "number" || !Number.isFinite(t) ? null : Object.is(t, -0) ? 0 : t;
|
|
1399
1477
|
}
|
|
1400
|
-
const
|
|
1478
|
+
const qn = {
|
|
1401
1479
|
kind: "spring",
|
|
1402
1480
|
stiffness: 170,
|
|
1403
1481
|
damping: 26,
|
|
1404
1482
|
mass: 1
|
|
1405
1483
|
};
|
|
1406
|
-
function
|
|
1484
|
+
function Gn(t) {
|
|
1407
1485
|
switch (t) {
|
|
1408
1486
|
case "opacity":
|
|
1409
1487
|
return "opacity";
|
|
@@ -1417,93 +1495,93 @@ function Hn(t) {
|
|
|
1417
1495
|
case "filter.brightness":
|
|
1418
1496
|
return "filter";
|
|
1419
1497
|
default:
|
|
1420
|
-
return
|
|
1498
|
+
return le[t] ?? t;
|
|
1421
1499
|
}
|
|
1422
1500
|
}
|
|
1423
|
-
const
|
|
1424
|
-
function
|
|
1425
|
-
const i = t.animateBindings, r =
|
|
1501
|
+
const In = {};
|
|
1502
|
+
function Yn(t, e, n) {
|
|
1503
|
+
const i = t.animateBindings, r = K(Ft), a = L(1), o = L(0), s = L(0), l = L(1), c = L(1), u = L(0), d = L(0), h = L(1), g = be(
|
|
1426
1504
|
[d, h],
|
|
1427
1505
|
([k, y]) => `blur(${k}px) brightness(${y})`
|
|
1428
|
-
), [m, A] =
|
|
1429
|
-
opacity:
|
|
1506
|
+
), [m, A] = vt(In), x = tt({
|
|
1507
|
+
opacity: a,
|
|
1430
1508
|
x: o,
|
|
1431
|
-
y:
|
|
1509
|
+
y: s,
|
|
1432
1510
|
scaleX: l,
|
|
1433
1511
|
scaleY: c,
|
|
1434
1512
|
rotate: u,
|
|
1435
1513
|
blur: d,
|
|
1436
1514
|
brightness: h
|
|
1437
1515
|
});
|
|
1438
|
-
return
|
|
1516
|
+
return Y(() => {
|
|
1439
1517
|
if (!i || Object.keys(i).length === 0) return;
|
|
1440
1518
|
const k = x.current, y = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Set();
|
|
1441
1519
|
let v = !1;
|
|
1442
|
-
const $ = (b,
|
|
1443
|
-
const
|
|
1444
|
-
return r > 0 && !w.has(b) ? { ...
|
|
1445
|
-
},
|
|
1446
|
-
const
|
|
1447
|
-
if (
|
|
1448
|
-
const
|
|
1449
|
-
if (
|
|
1450
|
-
|
|
1520
|
+
const $ = (b, N) => {
|
|
1521
|
+
const Z = e.transitionSignal(N).peek() ?? t.transitions?.[Gn(b)], J = et(Z ?? qn);
|
|
1522
|
+
return r > 0 && !w.has(b) ? { ...J, delay: r / 1e3 } : J;
|
|
1523
|
+
}, R = (b, N, P) => {
|
|
1524
|
+
const Z = le[b], J = G(n, i[b]);
|
|
1525
|
+
if (Z !== void 0) {
|
|
1526
|
+
const E = Bn(N);
|
|
1527
|
+
if (E === null) {
|
|
1528
|
+
B(`bindAnimate.${b}`, t.id);
|
|
1451
1529
|
return;
|
|
1452
1530
|
}
|
|
1453
|
-
const
|
|
1454
|
-
if (
|
|
1455
|
-
p.set(b, { current:
|
|
1531
|
+
const z = p.get(b);
|
|
1532
|
+
if (P || z === void 0) {
|
|
1533
|
+
p.set(b, { current: E }), A((ut) => ({ ...ut, [Z]: Yt(E) }));
|
|
1456
1534
|
return;
|
|
1457
1535
|
}
|
|
1458
|
-
const
|
|
1536
|
+
const ge = z.current, me = $(b, J);
|
|
1459
1537
|
w.add(b), y.get(`color:${b}`)?.stop(), y.set(
|
|
1460
1538
|
`color:${b}`,
|
|
1461
|
-
|
|
1462
|
-
...
|
|
1539
|
+
jt(0, 1, {
|
|
1540
|
+
...me,
|
|
1463
1541
|
onUpdate: (ut) => {
|
|
1464
|
-
const
|
|
1465
|
-
|
|
1542
|
+
const _t = Hn(ge, E, ut);
|
|
1543
|
+
z.current = _t, A((ye) => ({ ...ye, [Z]: Yt(_t) }));
|
|
1466
1544
|
}
|
|
1467
1545
|
})
|
|
1468
1546
|
);
|
|
1469
1547
|
return;
|
|
1470
1548
|
}
|
|
1471
|
-
const ct =
|
|
1549
|
+
const ct = Wn(b, N);
|
|
1472
1550
|
if (ct === null) {
|
|
1473
|
-
b.startsWith("filter.") ? Vt(`bindAnimate.${b}`, t.id) :
|
|
1551
|
+
b.startsWith("filter.") ? Vt(`bindAnimate.${b}`, t.id) : Xn(b, t.id);
|
|
1474
1552
|
return;
|
|
1475
1553
|
}
|
|
1476
|
-
if (
|
|
1477
|
-
for (const [
|
|
1478
|
-
k[
|
|
1554
|
+
if (P) {
|
|
1555
|
+
for (const [E, z] of Object.entries(ct))
|
|
1556
|
+
k[E].jump(z);
|
|
1479
1557
|
return;
|
|
1480
1558
|
}
|
|
1481
|
-
const
|
|
1559
|
+
const he = $(b, J);
|
|
1482
1560
|
w.add(b);
|
|
1483
|
-
for (const [
|
|
1484
|
-
y.set(
|
|
1485
|
-
},
|
|
1486
|
-
([b,
|
|
1487
|
-
const
|
|
1488
|
-
|
|
1561
|
+
for (const [E, z] of Object.entries(ct))
|
|
1562
|
+
y.set(E, jt(k[E], z, he));
|
|
1563
|
+
}, V = En((b, N) => R(b, N, !1)), _ = Object.entries(i).map(
|
|
1564
|
+
([b, N]) => xe(() => {
|
|
1565
|
+
const P = e.signal(G(n, N)).value;
|
|
1566
|
+
P !== void 0 && (v ? V.push(b, P) : R(b, P, !0));
|
|
1489
1567
|
})
|
|
1490
1568
|
);
|
|
1491
1569
|
return v = !0, () => {
|
|
1492
|
-
for (const b of
|
|
1493
|
-
|
|
1570
|
+
for (const b of _) b();
|
|
1571
|
+
V.dispose();
|
|
1494
1572
|
for (const b of y.values()) b.stop();
|
|
1495
1573
|
};
|
|
1496
|
-
}, [t, i, e, n, r]), { motionStyle:
|
|
1574
|
+
}, [t, i, e, n, r]), { motionStyle: Ut(() => {
|
|
1497
1575
|
if (!i) return null;
|
|
1498
1576
|
const k = {};
|
|
1499
1577
|
let y = !1;
|
|
1500
1578
|
for (const p of Object.keys(i))
|
|
1501
1579
|
switch (p) {
|
|
1502
1580
|
case "opacity":
|
|
1503
|
-
k.opacity =
|
|
1581
|
+
k.opacity = a, y = !0;
|
|
1504
1582
|
break;
|
|
1505
1583
|
case "transform.translate":
|
|
1506
|
-
k.x = o, k.y =
|
|
1584
|
+
k.x = o, k.y = s, y = !0;
|
|
1507
1585
|
break;
|
|
1508
1586
|
case "transform.scale":
|
|
1509
1587
|
k.scaleX = l, k.scaleY = c, y = !0;
|
|
@@ -1517,32 +1595,32 @@ function qn(t, e, n) {
|
|
|
1517
1595
|
break;
|
|
1518
1596
|
}
|
|
1519
1597
|
return y ? (k.willChange = "transform, opacity, filter", k) : null;
|
|
1520
|
-
}, [i,
|
|
1598
|
+
}, [i, a, o, s, l, c, u, g]), colorProps: m };
|
|
1521
1599
|
}
|
|
1522
|
-
function
|
|
1600
|
+
function Xn(t, e) {
|
|
1523
1601
|
S(
|
|
1524
1602
|
e,
|
|
1525
1603
|
`bindAnimate.${t}`,
|
|
1526
1604
|
"rejected bound value : JSON shape does not match the property type (LSML §6.3)"
|
|
1527
1605
|
);
|
|
1528
1606
|
}
|
|
1529
|
-
const
|
|
1530
|
-
let
|
|
1531
|
-
function
|
|
1532
|
-
return
|
|
1607
|
+
const ce = /* @__PURE__ */ new Set(["alpha", "luminance"]), wt = 180, ue = /* @__PURE__ */ new Set(["intersect", "subtract", "union"]);
|
|
1608
|
+
let yt = 0;
|
|
1609
|
+
function Un() {
|
|
1610
|
+
return yt = (yt + 1) % 1e6, `lumen-mask-${yt.toString(36)}`;
|
|
1533
1611
|
}
|
|
1534
|
-
function
|
|
1612
|
+
function Kn(t) {
|
|
1535
1613
|
return /^[A-Za-z0-9_:-]+$/.test(t) ? t : null;
|
|
1536
1614
|
}
|
|
1537
1615
|
function M(t) {
|
|
1538
1616
|
return typeof t == "number" && Number.isFinite(t);
|
|
1539
1617
|
}
|
|
1540
|
-
function
|
|
1618
|
+
function Vn(t, e) {
|
|
1541
1619
|
if (typeof t != "object" || t === null) return null;
|
|
1542
1620
|
const n = t;
|
|
1543
|
-
if (typeof n.type != "string" || !
|
|
1621
|
+
if (typeof n.type != "string" || !ce.has(n.type))
|
|
1544
1622
|
return S(e, "mask.type", "is not alpha|luminance ; mask omitted (ADR 002 §3.2, T4)"), null;
|
|
1545
|
-
if (typeof n.op != "string" || !
|
|
1623
|
+
if (typeof n.op != "string" || !ue.has(n.op))
|
|
1546
1624
|
return S(
|
|
1547
1625
|
e,
|
|
1548
1626
|
"mask.op",
|
|
@@ -1552,30 +1630,30 @@ function In(t, e) {
|
|
|
1552
1630
|
if (typeof i != "object" || i === null)
|
|
1553
1631
|
return S(e, "mask.source", "is not a typed shape|image source ; mask omitted (T3)"), null;
|
|
1554
1632
|
const r = i;
|
|
1555
|
-
let
|
|
1633
|
+
let a;
|
|
1556
1634
|
if (r.kind === "shape" && typeof r.ref == "string")
|
|
1557
|
-
|
|
1635
|
+
a = { kind: "shape", ref: r.ref };
|
|
1558
1636
|
else if (r.kind === "image" && typeof r.src == "string") {
|
|
1559
1637
|
const c = r.srcRect;
|
|
1560
|
-
|
|
1638
|
+
a = c && M(c.x) && M(c.y) && M(c.w) && M(c.h) ? { kind: "image", src: r.src, srcRect: { x: c.x, y: c.y, w: c.w, h: c.h } } : { kind: "image", src: r.src };
|
|
1561
1639
|
} else if (r.kind === "group" && typeof r.ref == "string")
|
|
1562
|
-
|
|
1640
|
+
a = { kind: "group", ref: r.ref };
|
|
1563
1641
|
else
|
|
1564
1642
|
return S(
|
|
1565
1643
|
e,
|
|
1566
1644
|
"mask.source",
|
|
1567
1645
|
"is not a typed shape|image|group source ; mask omitted (T3)"
|
|
1568
1646
|
), null;
|
|
1569
|
-
const o = { source:
|
|
1570
|
-
|
|
1647
|
+
const o = { source: a, type: n.type, op: n.op }, s = n.position;
|
|
1648
|
+
s && M(s.x) && M(s.y) && (o.position = { x: s.x, y: s.y });
|
|
1571
1649
|
const l = n.size;
|
|
1572
1650
|
return l && M(l.w) && M(l.h) && (o.size = { w: l.w, h: l.h }), o;
|
|
1573
1651
|
}
|
|
1574
|
-
function
|
|
1575
|
-
if (!
|
|
1652
|
+
function Zn(t, e, n, i, r, a = !1) {
|
|
1653
|
+
if (!ce.has(t.type) || !ue.has(t.op))
|
|
1576
1654
|
return S(n, "mask", "type/op outside the closed enum ; mask omitted (T4)"), null;
|
|
1577
|
-
const o =
|
|
1578
|
-
...M(
|
|
1655
|
+
const o = Un(), s = t.position?.x, l = t.position?.y, c = t.size?.w, u = t.size?.h, d = {
|
|
1656
|
+
...M(s) ? { x: s } : {},
|
|
1579
1657
|
...M(l) ? { y: l } : {},
|
|
1580
1658
|
...M(c) ? { width: c } : {},
|
|
1581
1659
|
...M(u) ? { height: u } : {}
|
|
@@ -1611,7 +1689,7 @@ function Un(t, e, n, i, r, s = !1) {
|
|
|
1611
1689
|
const F = Object.keys(d).length > 0 ? d : M(r?.w) && M(r?.h) ? { x: 0, y: 0, width: r.w, height: r.h } : { width: "100%", height: "100%" };
|
|
1612
1690
|
h = /* @__PURE__ */ f("image", { href: t.source.src, preserveAspectRatio: "none", ...F });
|
|
1613
1691
|
} else {
|
|
1614
|
-
const x =
|
|
1692
|
+
const x = Kn(t.source.ref);
|
|
1615
1693
|
if (x === null)
|
|
1616
1694
|
return S(
|
|
1617
1695
|
n,
|
|
@@ -1633,12 +1711,12 @@ function Un(t, e, n, i, r, s = !1) {
|
|
|
1633
1711
|
}
|
|
1634
1712
|
) : F;
|
|
1635
1713
|
}
|
|
1636
|
-
|
|
1714
|
+
a && (h = /* @__PURE__ */ f("g", { transform: `translate(${wt} ${wt})`, children: h }, "feather-pad"));
|
|
1637
1715
|
let g;
|
|
1638
|
-
t.op === "intersect" ? g = h : t.op === "union" ? g = /* @__PURE__ */
|
|
1716
|
+
t.op === "intersect" ? g = h : t.op === "union" ? g = /* @__PURE__ */ I(Q, { children: [
|
|
1639
1717
|
/* @__PURE__ */ f("rect", { x: 0, y: 0, width: "100%", height: "100%", fill: "white" }),
|
|
1640
1718
|
h
|
|
1641
|
-
] }) : g = /* @__PURE__ */
|
|
1719
|
+
] }) : g = /* @__PURE__ */ I(Q, { children: [
|
|
1642
1720
|
/* @__PURE__ */ f("rect", { x: 0, y: 0, width: "100%", height: "100%", fill: "white" }),
|
|
1643
1721
|
/* @__PURE__ */ f("g", { style: { filter: "invert(1)" }, children: h })
|
|
1644
1722
|
] });
|
|
@@ -1656,11 +1734,11 @@ function Un(t, e, n, i, r, s = !1) {
|
|
|
1656
1734
|
},
|
|
1657
1735
|
o
|
|
1658
1736
|
), A = `url(#${o})`;
|
|
1659
|
-
return { def: m, style: { mask: A, WebkitMask: A }, id: o, feather:
|
|
1737
|
+
return { def: m, style: { mask: A, WebkitMask: A }, id: o, feather: a };
|
|
1660
1738
|
}
|
|
1661
|
-
const
|
|
1662
|
-
function
|
|
1663
|
-
if (!t) return
|
|
1739
|
+
const fe = /* @__PURE__ */ new Map(), de = st(fe);
|
|
1740
|
+
function gr(t) {
|
|
1741
|
+
if (!t) return fe;
|
|
1664
1742
|
const e = /* @__PURE__ */ new Map(), n = [t];
|
|
1665
1743
|
for (; n.length > 0; ) {
|
|
1666
1744
|
const i = n.pop();
|
|
@@ -1669,59 +1747,59 @@ function dr(t) {
|
|
|
1669
1747
|
"id",
|
|
1670
1748
|
"duplicate shape id ; first occurrence kept, later ones ignored (ADR 002 A2.1 #K)"
|
|
1671
1749
|
) : e.set(i.id, i));
|
|
1672
|
-
const
|
|
1673
|
-
if (
|
|
1674
|
-
for (let o =
|
|
1750
|
+
const a = i.children;
|
|
1751
|
+
if (a)
|
|
1752
|
+
for (let o = a.length - 1; o >= 0; o--) n.push(a[o]);
|
|
1675
1753
|
}
|
|
1676
1754
|
return e;
|
|
1677
1755
|
}
|
|
1678
|
-
function
|
|
1756
|
+
function mr({
|
|
1679
1757
|
index: t,
|
|
1680
1758
|
children: e
|
|
1681
1759
|
}) {
|
|
1682
|
-
return /* @__PURE__ */ f(
|
|
1760
|
+
return /* @__PURE__ */ f(de.Provider, { value: t, children: e });
|
|
1683
1761
|
}
|
|
1684
|
-
function
|
|
1685
|
-
return
|
|
1762
|
+
function Jn() {
|
|
1763
|
+
return K(de);
|
|
1686
1764
|
}
|
|
1687
|
-
function
|
|
1688
|
-
return t.kind === "repeat" ? /* @__PURE__ */ f(
|
|
1765
|
+
function pe({ node: t, store: e }) {
|
|
1766
|
+
return t.kind === "repeat" ? /* @__PURE__ */ f(rr, { node: t, store: e }) : /* @__PURE__ */ f(Qn, { node: t, store: e });
|
|
1689
1767
|
}
|
|
1690
|
-
function
|
|
1691
|
-
|
|
1692
|
-
const n = At(), i =
|
|
1693
|
-
() =>
|
|
1768
|
+
function Qn({ node: t, store: e }) {
|
|
1769
|
+
xt();
|
|
1770
|
+
const n = At(), i = nt(), r = Jn(), a = Ut(
|
|
1771
|
+
() => ir(t, e, n),
|
|
1694
1772
|
// We re-build per render — signals re-render cheaply, and the
|
|
1695
1773
|
// resolution itself is O(bindings) which is small. The memo is a
|
|
1696
1774
|
// micro-optimisation to keep object identity stable across renders
|
|
1697
1775
|
// when the inputs haven't changed.
|
|
1698
|
-
[t, e, n, ...
|
|
1699
|
-
), o =
|
|
1776
|
+
[t, e, n, ...or(t, e, n)]
|
|
1777
|
+
), o = Yn(t, e, n);
|
|
1700
1778
|
Zt(t);
|
|
1701
|
-
const
|
|
1702
|
-
if (!
|
|
1779
|
+
const s = Mn[t.kind];
|
|
1780
|
+
if (!s)
|
|
1703
1781
|
return S(t.id, "kind", "unknown render kind ; node not rendered"), null;
|
|
1704
1782
|
const l = {};
|
|
1705
1783
|
if (t.bindings)
|
|
1706
1784
|
for (const [p, w] of Object.entries(t.bindings)) {
|
|
1707
|
-
const v = e.transitionSignal(
|
|
1785
|
+
const v = e.transitionSignal(G(n, w)).value;
|
|
1708
1786
|
v !== void 0 && (l[p] = v);
|
|
1709
1787
|
}
|
|
1710
|
-
const c = (p) => p in l ? l[p] : t.transitions?.[p], u = t.children?.map((p, w) => /* @__PURE__ */ f(
|
|
1711
|
-
visible: typeof
|
|
1712
|
-
opacity: typeof
|
|
1788
|
+
const c = (p) => p in l ? l[p] : t.transitions?.[p], u = t.children?.map((p, w) => /* @__PURE__ */ f(pe, { node: p, store: e }, p.id ?? w)), d = a.mask !== void 0 && typeof a.blendMode == "string" && X(a.blendMode) !== void 0, h = {
|
|
1789
|
+
visible: typeof a.visible == "boolean" ? a.visible : void 0,
|
|
1790
|
+
opacity: typeof a.universal_opacity == "number" ? a.universal_opacity : void 0,
|
|
1713
1791
|
// A frame applies its own static rotation (frame.tsx) so it pivots around
|
|
1714
1792
|
// its centre ; the wrapper has no box for a self-positioning frame and would
|
|
1715
1793
|
// pivot around a collapsed (0-height) box. Non-frames keep it on the wrapper
|
|
1716
1794
|
// (they DO carry position/size there).
|
|
1717
|
-
rotation: t.kind === "frame" ? void 0 : typeof
|
|
1795
|
+
rotation: t.kind === "frame" ? void 0 : typeof a.rotation == "number" ? a.rotation : void 0,
|
|
1718
1796
|
// Mirror (Figma scaleY(-1)) — like rotation, a frame mirrors itself
|
|
1719
1797
|
// (frame.tsx) ; non-frames carry it on the wrapper, composed with rotation.
|
|
1720
|
-
flipY: t.kind === "frame" ? void 0 :
|
|
1721
|
-
blur: typeof
|
|
1722
|
-
sizing:
|
|
1723
|
-
position: t.kind === "frame" ? void 0 :
|
|
1724
|
-
size: t.kind === "frame" ? void 0 :
|
|
1798
|
+
flipY: t.kind === "frame" ? void 0 : a.flipY === !0,
|
|
1799
|
+
blur: typeof a.blur == "number" ? a.blur : void 0,
|
|
1800
|
+
sizing: tr(a.sizing),
|
|
1801
|
+
position: t.kind === "frame" ? void 0 : er(a),
|
|
1802
|
+
size: t.kind === "frame" ? void 0 : Xt(a),
|
|
1725
1803
|
// ADR 002 §3.2 (D2 / #D) — `blendMode` is a universal prop on every
|
|
1726
1804
|
// primitive ; the wrapper re-validates it against the closed enum
|
|
1727
1805
|
// before applying `mix-blend-mode` (T4 runtime gate). Pass the raw
|
|
@@ -1731,9 +1809,9 @@ function Vn({ node: t, store: e }) {
|
|
|
1731
1809
|
// (inner) wrapper would fold over a transparent backdrop (the caramel
|
|
1732
1810
|
// hard-light showed the raw blue wave instead of compositing over the warm
|
|
1733
1811
|
// gradient). Drop it here when it will be hoisted.
|
|
1734
|
-
blendMode: typeof
|
|
1735
|
-
}, g = t.children?.some(
|
|
1736
|
-
|
|
1812
|
+
blendMode: typeof a.blendMode == "string" && !d ? a.blendMode : void 0
|
|
1813
|
+
}, g = t.children?.some(nr) ?? !1, m = Object.keys(o.colorProps).length > 0 ? { ...a, ...o.colorProps } : a, A = /* @__PURE__ */ f(
|
|
1814
|
+
s,
|
|
1737
1815
|
{
|
|
1738
1816
|
resolved: m,
|
|
1739
1817
|
nodeId: t.id,
|
|
@@ -1744,28 +1822,28 @@ function Vn({ node: t, store: e }) {
|
|
|
1744
1822
|
}
|
|
1745
1823
|
);
|
|
1746
1824
|
let x = null;
|
|
1747
|
-
if (
|
|
1748
|
-
const p =
|
|
1749
|
-
const
|
|
1750
|
-
return
|
|
1825
|
+
if (a.mask !== void 0) {
|
|
1826
|
+
const p = Vn(a.mask, t.id), w = ($) => {
|
|
1827
|
+
const R = r.get($);
|
|
1828
|
+
return R ? R.kind === "frame" ? pn(R, R.id) : fn(R, R.id) : null;
|
|
1751
1829
|
};
|
|
1752
1830
|
let v = !1;
|
|
1753
1831
|
if (p) {
|
|
1754
1832
|
const $ = p.source;
|
|
1755
1833
|
if (($.kind === "group" || $.kind === "shape") && typeof $.ref == "string") {
|
|
1756
|
-
const
|
|
1757
|
-
v =
|
|
1834
|
+
const R = r.get($.ref);
|
|
1835
|
+
v = R ? oe(R) : !1;
|
|
1758
1836
|
}
|
|
1759
1837
|
}
|
|
1760
|
-
x = p ?
|
|
1838
|
+
x = p ? Zn(p, i, t.id, w, Xt(a), v) : null;
|
|
1761
1839
|
}
|
|
1762
1840
|
const F = x !== null && x.style != null && "maskImage" in x.style;
|
|
1763
1841
|
let k = A;
|
|
1764
1842
|
x && F && (k = /* @__PURE__ */ f("div", { style: { width: "100%", height: "100%", ...x.style }, children: k }));
|
|
1765
|
-
let y = /* @__PURE__ */ f(
|
|
1843
|
+
let y = /* @__PURE__ */ f(_n, { ...h, children: k });
|
|
1766
1844
|
if (x && !F) {
|
|
1767
|
-
const p = x.feather ?
|
|
1768
|
-
y = /* @__PURE__ */
|
|
1845
|
+
const p = x.feather ? wt : 0;
|
|
1846
|
+
y = /* @__PURE__ */ I(
|
|
1769
1847
|
"div",
|
|
1770
1848
|
{
|
|
1771
1849
|
style: {
|
|
@@ -1782,7 +1860,7 @@ function Vn({ node: t, store: e }) {
|
|
|
1782
1860
|
);
|
|
1783
1861
|
}
|
|
1784
1862
|
if (x && d) {
|
|
1785
|
-
const p =
|
|
1863
|
+
const p = X(a.blendMode);
|
|
1786
1864
|
y = /* @__PURE__ */ f(
|
|
1787
1865
|
"div",
|
|
1788
1866
|
{
|
|
@@ -1795,66 +1873,74 @@ function Vn({ node: t, store: e }) {
|
|
|
1795
1873
|
}
|
|
1796
1874
|
);
|
|
1797
1875
|
}
|
|
1798
|
-
return o.motionStyle && (y = /* @__PURE__ */ f(
|
|
1876
|
+
return o.motionStyle && (y = /* @__PURE__ */ f(U.div, { "data-lumencast-bind-animate": t.id ?? "", style: o.motionStyle, children: y })), t.keyframes ? /* @__PURE__ */ f(On, { keyframes: t.keyframes, store: e, nodeId: t.id, children: y }) : y;
|
|
1799
1877
|
}
|
|
1800
|
-
function
|
|
1878
|
+
function tr(t) {
|
|
1801
1879
|
if (typeof t != "object" || t === null) return;
|
|
1802
1880
|
const e = t, n = {};
|
|
1803
1881
|
return (e.x === "fixed" || e.x === "hug" || e.x === "fill") && (n.x = e.x), (e.y === "fixed" || e.y === "hug" || e.y === "fill") && (n.y = e.y), n.x !== void 0 || n.y !== void 0 ? n : void 0;
|
|
1804
1882
|
}
|
|
1805
|
-
function
|
|
1883
|
+
function C(t) {
|
|
1806
1884
|
return typeof t == "number" && Number.isFinite(t) ? t : void 0;
|
|
1807
1885
|
}
|
|
1808
|
-
function
|
|
1809
|
-
|
|
1886
|
+
function er(t) {
|
|
1887
|
+
let e = C(t.x), n = C(t.y);
|
|
1888
|
+
if (e === void 0 && n === void 0) {
|
|
1889
|
+
const i = t.position;
|
|
1890
|
+
i && typeof i == "object" && (e = C(i.x), n = C(i.y));
|
|
1891
|
+
}
|
|
1810
1892
|
if (!(e === void 0 || n === void 0))
|
|
1811
1893
|
return { x: e, y: n };
|
|
1812
1894
|
}
|
|
1813
|
-
function
|
|
1814
|
-
|
|
1895
|
+
function Xt(t) {
|
|
1896
|
+
let e = C(t.width), n = C(t.height);
|
|
1897
|
+
if (e === void 0 && n === void 0) {
|
|
1898
|
+
const i = t.size;
|
|
1899
|
+
i && typeof i == "object" && (e = C(i.w), n = C(i.h));
|
|
1900
|
+
}
|
|
1815
1901
|
if (!(e === void 0 && n === void 0))
|
|
1816
1902
|
return { w: e, h: n };
|
|
1817
1903
|
}
|
|
1818
|
-
function
|
|
1904
|
+
function nr(t) {
|
|
1819
1905
|
if (t.kind === "frame") return !1;
|
|
1820
|
-
const e = t.props ?? {}, n = t.bindings ?? {}, i =
|
|
1821
|
-
return
|
|
1906
|
+
const e = t.props ?? {}, n = t.bindings ?? {}, i = e.position, r = C(e.x) !== void 0 || "x" in n || (i ? C(i.x) !== void 0 : !1), a = C(e.y) !== void 0 || "y" in n || (i ? C(i.y) !== void 0 : !1);
|
|
1907
|
+
return r && a;
|
|
1822
1908
|
}
|
|
1823
|
-
function
|
|
1824
|
-
|
|
1909
|
+
function rr({ node: t, store: e }) {
|
|
1910
|
+
xt();
|
|
1825
1911
|
const n = At();
|
|
1826
1912
|
Zt(t);
|
|
1827
|
-
const i = t.bindings?.items, r = i === void 0 ? [] : e.signal(
|
|
1913
|
+
const i = t.bindings?.items, r = i === void 0 ? [] : e.signal(G(n, i)).value ?? [];
|
|
1828
1914
|
if (!Array.isArray(r)) return null;
|
|
1829
|
-
const
|
|
1830
|
-
if (!
|
|
1915
|
+
const a = t.children?.[0];
|
|
1916
|
+
if (!a) return null;
|
|
1831
1917
|
const o = typeof t.stagger_ms == "number" ? t.stagger_ms : 0;
|
|
1832
|
-
return /* @__PURE__ */ f(
|
|
1833
|
-
const c =
|
|
1918
|
+
return /* @__PURE__ */ f(Q, { children: r.map((s, l) => {
|
|
1919
|
+
const c = Cn(l, o), u = /* @__PURE__ */ f(An, { prefix: `${i ?? ""}.${l}`, children: /* @__PURE__ */ f(pe, { node: a, store: e }) }, l);
|
|
1834
1920
|
return c <= 0 ? u : /* @__PURE__ */ f(Ft.Provider, { value: c, children: u }, l);
|
|
1835
1921
|
}) });
|
|
1836
1922
|
}
|
|
1837
|
-
function
|
|
1923
|
+
function ir(t, e, n) {
|
|
1838
1924
|
const i = { ...t.props ?? {} };
|
|
1839
1925
|
if (t.bindings)
|
|
1840
|
-
for (const [r,
|
|
1841
|
-
const o =
|
|
1926
|
+
for (const [r, a] of Object.entries(t.bindings)) {
|
|
1927
|
+
const o = G(n, a);
|
|
1842
1928
|
i[r] = e.signal(o).value;
|
|
1843
1929
|
}
|
|
1844
1930
|
return i;
|
|
1845
1931
|
}
|
|
1846
|
-
function
|
|
1932
|
+
function or(t, e, n) {
|
|
1847
1933
|
if (!t.bindings) return [];
|
|
1848
1934
|
const i = [];
|
|
1849
1935
|
for (const r of Object.values(t.bindings))
|
|
1850
|
-
i.push(e.signal(
|
|
1936
|
+
i.push(e.signal(G(n, r)).value);
|
|
1851
1937
|
return i;
|
|
1852
1938
|
}
|
|
1853
1939
|
export {
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1940
|
+
pr as A,
|
|
1941
|
+
mr as S,
|
|
1942
|
+
pe as T,
|
|
1943
|
+
gr as b,
|
|
1944
|
+
hr as r
|
|
1859
1945
|
};
|
|
1860
|
-
//# sourceMappingURL=tree-
|
|
1946
|
+
//# sourceMappingURL=tree-BMxx5170.js.map
|