@lumencast/runtime 0.8.0 → 0.9.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.
Files changed (64) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/animate/keyframes.js +8 -1
  3. package/dist/animate/keyframes.js.map +1 -1
  4. package/dist/app.d.ts +4 -1
  5. package/dist/app.d.ts.map +1 -1
  6. package/dist/app.js +2 -1
  7. package/dist/app.js.map +1 -1
  8. package/dist/{broadcast-Gcd-dmC7.js → broadcast-ryjLRD5q.js} +3 -3
  9. package/dist/{broadcast-Gcd-dmC7.js.map → broadcast-ryjLRD5q.js.map} +1 -1
  10. package/dist/{control-C5TfClga.js → control-AgxbXOVS.js} +4 -4
  11. package/dist/{control-C5TfClga.js.map → control-AgxbXOVS.js.map} +1 -1
  12. package/dist/{index-N-VqrIxN.js → index-DrXsLYhe.js} +144 -126
  13. package/dist/index-DrXsLYhe.js.map +1 -0
  14. package/dist/index.d.ts +1 -0
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.html +1 -1
  17. package/dist/index.js.map +1 -1
  18. package/dist/lumencast.js +4 -4
  19. package/dist/mount.d.ts.map +1 -1
  20. package/dist/mount.js +5 -0
  21. package/dist/mount.js.map +1 -1
  22. package/dist/overlay/runtime-context.d.ts +11 -0
  23. package/dist/overlay/runtime-context.d.ts.map +1 -1
  24. package/dist/overlay/runtime-context.js +8 -0
  25. package/dist/overlay/runtime-context.js.map +1 -1
  26. package/dist/render/bundle.d.ts +1 -1
  27. package/dist/render/bundle.d.ts.map +1 -1
  28. package/dist/render/bundle.js +4 -0
  29. package/dist/render/bundle.js.map +1 -1
  30. package/dist/render/keyframe-player.d.ts.map +1 -1
  31. package/dist/render/keyframe-player.js +15 -1
  32. package/dist/render/keyframe-player.js.map +1 -1
  33. package/dist/render/primitives/capture.d.ts +40 -0
  34. package/dist/render/primitives/capture.d.ts.map +1 -0
  35. package/dist/render/primitives/capture.js +171 -0
  36. package/dist/render/primitives/capture.js.map +1 -0
  37. package/dist/render/primitives/index.d.ts.map +1 -1
  38. package/dist/render/primitives/index.js +3 -0
  39. package/dist/render/primitives/index.js.map +1 -1
  40. package/dist/render/prop-allowlist.d.ts.map +1 -1
  41. package/dist/render/prop-allowlist.js +5 -0
  42. package/dist/render/prop-allowlist.js.map +1 -1
  43. package/dist/{status-pill-BaLQoIDl.js → status-pill-BxCdj-KZ.js} +2 -2
  44. package/dist/{status-pill-BaLQoIDl.js.map → status-pill-BxCdj-KZ.js.map} +1 -1
  45. package/dist/{test-CA30C2By.js → test-CaRHj_J6.js} +4 -4
  46. package/dist/{test-CA30C2By.js.map → test-CaRHj_J6.js.map} +1 -1
  47. package/dist/{tree-1coZ32nd.js → tree-BLIxJbD3.js} +502 -419
  48. package/dist/tree-BLIxJbD3.js.map +1 -0
  49. package/dist/types.d.ts +10 -0
  50. package/dist/types.d.ts.map +1 -1
  51. package/package.json +4 -4
  52. package/src/animate/keyframes.ts +8 -1
  53. package/src/app.tsx +5 -0
  54. package/src/index.ts +5 -0
  55. package/src/mount.ts +5 -0
  56. package/src/overlay/runtime-context.tsx +14 -0
  57. package/src/render/bundle.ts +9 -1
  58. package/src/render/keyframe-player.tsx +14 -1
  59. package/src/render/primitives/capture.tsx +210 -0
  60. package/src/render/primitives/index.ts +3 -0
  61. package/src/render/prop-allowlist.ts +5 -0
  62. package/src/types.ts +10 -0
  63. package/dist/index-N-VqrIxN.js.map +0 -1
  64. package/dist/tree-1coZ32nd.js.map +0 -1
@@ -1,43 +1,47 @@
1
- import { batch as w, signal as p } from "@preact/signals-react";
2
- import { createRoot as $ } from "react-dom/client";
3
- import { createContext as Y, useContext as K, lazy as S, Suspense as Z, createElement as J, StrictMode as Q } from "react";
4
- import { jsx as l } from "react/jsx-runtime";
1
+ import { batch as w, signal as g } from "@preact/signals-react";
2
+ import { createRoot as D } from "react-dom/client";
3
+ import { createContext as K, useContext as C, lazy as S, Suspense as Z, createElement as J, StrictMode as Q } from "react";
4
+ import { jsx as h } from "react/jsx-runtime";
5
5
  import { useSignals as V } from "@preact/signals-react/runtime";
6
6
  import { AnimatePresence as ee, motion as te } from "framer-motion";
7
- import { SequenceTracker as se, encodeFrame as R, input as ne, WS_SUBPROTOCOLS as re, WS_SUBPROTOCOL_V1_1 as ie, subscribe as oe, decodeServerFrame as ce, LumencastError as O } from "@lumencast/protocol";
8
- const D = Y(null);
7
+ import { SequenceTracker as se, encodeFrame as O, input as ne, WS_SUBPROTOCOLS as re, WS_SUBPROTOCOL_V1_1 as ie, subscribe as oe, decodeServerFrame as ce, LumencastError as L } from "@lumencast/protocol";
8
+ const T = K(null);
9
9
  function F({
10
10
  value: t,
11
11
  children: e
12
12
  }) {
13
- return /* @__PURE__ */ l(D.Provider, { value: t, children: e });
13
+ return /* @__PURE__ */ h(T.Provider, { value: t, children: e });
14
14
  }
15
15
  function Ve() {
16
- const t = K(D);
16
+ const t = C(T);
17
17
  if (!t)
18
18
  throw new Error(
19
19
  "Lumencast overlay components must be rendered inside LumencastRuntimeProvider"
20
20
  );
21
21
  return t;
22
22
  }
23
+ function et() {
24
+ return C(T);
25
+ }
23
26
  const ae = S(
24
- () => import("./broadcast-Gcd-dmC7.js").then((t) => ({ default: t.BroadcastMode }))
27
+ () => import("./broadcast-ryjLRD5q.js").then((t) => ({ default: t.BroadcastMode }))
25
28
  ), ue = S(
26
- () => import("./control-C5TfClga.js").then((t) => ({ default: t.ControlMode }))
27
- ), le = S(() => import("./test-CA30C2By.js").then((t) => ({ default: t.TestMode })));
29
+ () => import("./control-AgxbXOVS.js").then((t) => ({ default: t.ControlMode }))
30
+ ), le = S(() => import("./test-CaRHj_J6.js").then((t) => ({ default: t.TestMode })));
28
31
  function he({
29
32
  mode: t,
30
33
  store: e,
31
34
  bundleSignal: s,
32
35
  statusSignal: n,
33
36
  crossfadeKeySignal: r,
34
- sendInput: i
37
+ sendInput: i,
38
+ resolveCaptureDevice: c
35
39
  }) {
36
40
  V();
37
- const c = s.value, a = n.value, f = r.value;
38
- if (!c) return null;
39
- const u = t === "broadcast" ? ae : t === "control" ? ue : le;
40
- return /* @__PURE__ */ l(ee, { mode: "sync", children: /* @__PURE__ */ l(
41
+ const a = s.value, f = n.value, u = r.value;
42
+ if (!a) return null;
43
+ const p = t === "broadcast" ? ae : t === "control" ? ue : le;
44
+ return /* @__PURE__ */ h(ee, { mode: "sync", children: /* @__PURE__ */ h(
41
45
  te.div,
42
46
  {
43
47
  initial: { opacity: 0 },
@@ -45,33 +49,34 @@ function he({
45
49
  exit: { opacity: 0 },
46
50
  transition: { duration: 0.4, ease: "easeInOut" },
47
51
  style: { position: "absolute", inset: 0 },
48
- children: /* @__PURE__ */ l(
52
+ children: /* @__PURE__ */ h(
49
53
  F,
50
54
  {
51
55
  value: {
52
56
  mode: t,
53
57
  store: e,
54
- bundle: c,
55
- status: a,
56
- sendInput: i
58
+ bundle: a,
59
+ status: f,
60
+ sendInput: i,
61
+ ...c !== void 0 ? { resolveCaptureDevice: c } : {}
57
62
  },
58
- children: /* @__PURE__ */ l(Z, { fallback: null, children: /* @__PURE__ */ l(u, {}) })
63
+ children: /* @__PURE__ */ h(Z, { fallback: null, children: /* @__PURE__ */ h(p, {}) })
59
64
  }
60
65
  )
61
66
  },
62
- f
67
+ u
63
68
  ) });
64
69
  }
65
- const fe = "<anon>", v = /* @__PURE__ */ new Set();
66
- function C(t) {
67
- return v.add(t), () => {
68
- v.delete(t);
70
+ const fe = "<anon>", b = /* @__PURE__ */ new Set();
71
+ function q(t) {
72
+ return b.add(t), () => {
73
+ b.delete(t);
69
74
  };
70
75
  }
71
- function q(t, e, s) {
76
+ function B(t, e, s) {
72
77
  const n = { nodeId: t ?? fe, field: e, reason: s };
73
- if (v.size > 0) {
74
- for (const r of v)
78
+ if (b.size > 0) {
79
+ for (const r of b)
75
80
  try {
76
81
  r(n);
77
82
  } catch {
@@ -83,21 +88,21 @@ const de = 100, me = 4, pe = 64, ge = {
83
88
  blur: de,
84
89
  brightness: me
85
90
  };
86
- function L(t, e) {
91
+ function N(t, e) {
87
92
  if (typeof e != "number" || !Number.isFinite(e) || e < 0 || Object.is(e, -0)) return null;
88
93
  const s = ge[t];
89
94
  return e > s ? s : e;
90
95
  }
91
- const ve = /^blur\((\d{1,7}(?:\.\d{1,4})?)px\) brightness\((\d{1,7}(?:\.\d{1,4})?)\)$/, et = "blur(0px) brightness(1)";
96
+ const ve = /^blur\((\d{1,7}(?:\.\d{1,4})?)px\) brightness\((\d{1,7}(?:\.\d{1,4})?)\)$/, tt = "blur(0px) brightness(1)";
92
97
  function be(t) {
93
98
  if (typeof t != "string" || t.length === 0 || t.length > pe) return null;
94
99
  const e = ve.exec(t);
95
100
  if (!e) return null;
96
- const s = L("blur", Number(e[1])), n = L("brightness", Number(e[2]));
101
+ const s = N("blur", Number(e[1])), n = N("brightness", Number(e[2]));
97
102
  return s === null || n === null ? null : `blur(${s}px) brightness(${n})`;
98
103
  }
99
104
  function ye(t, e) {
100
- q(
105
+ B(
101
106
  e,
102
107
  t,
103
108
  "rejected unsafe filter value : outside the R8 caps or not a finite number >= 0"
@@ -109,7 +114,7 @@ const ke = { duration: 0 }, we = {
109
114
  "cubic-out": "easeOut",
110
115
  "cubic-in-out": "easeInOut"
111
116
  };
112
- function tt(t) {
117
+ function st(t) {
113
118
  return !t || t.kind === "none" ? ke : t.kind === "tween" ? {
114
119
  type: "tween",
115
120
  duration: (t.duration_ms ?? 0) / 1e3,
@@ -142,7 +147,7 @@ const Se = {
142
147
  duration_ms: 400,
143
148
  ease: "cubic-out"
144
149
  };
145
- function st(t, e, s) {
150
+ function nt(t, e, s) {
146
151
  for (const n of e) {
147
152
  const r = t(n);
148
153
  if (r !== void 0) return r;
@@ -155,7 +160,7 @@ function st(t, e, s) {
155
160
  return Te;
156
161
  }
157
162
  }
158
- function nt(t, e, s) {
163
+ function rt(t, e, s) {
159
164
  if (!e || Object.keys(e).length === 0)
160
165
  return { initial: t, animate: t };
161
166
  let n = e;
@@ -204,11 +209,11 @@ class Re {
204
209
  transitions = /* @__PURE__ */ new Map();
205
210
  signal(e) {
206
211
  let s = this.signals.get(e);
207
- return s || (s = p(void 0), this.signals.set(e, s)), s;
212
+ return s || (s = g(void 0), this.signals.set(e, s)), s;
208
213
  }
209
214
  transitionSignal(e) {
210
215
  let s = this.transitions.get(e);
211
- return s || (s = p(void 0), this.transitions.set(e, s)), s;
216
+ return s || (s = g(void 0), this.transitions.set(e, s)), s;
212
217
  }
213
218
  set(e, s) {
214
219
  const n = this.signal(e);
@@ -246,7 +251,7 @@ class Re {
246
251
  return e;
247
252
  }
248
253
  }
249
- function B() {
254
+ function W() {
250
255
  return new Re();
251
256
  }
252
257
  function k(t, e) {
@@ -265,13 +270,17 @@ function k(t, e) {
265
270
  return !0;
266
271
  }
267
272
  const Oe = /* @__PURE__ */ new Set([
268
- "x-lumencast.color-srgb-1.0"
269
- ]), Le = /^x-[a-z0-9-]+(?:\.[a-z0-9-]+)*$/, Ne = /^(?:0|[1-9][0-9]*)$/, N = ".authoring";
270
- function Ue(t) {
273
+ "x-lumencast.color-srgb-1.0",
274
+ // RFC-0001 / ADR 004 this runtime ships the Zab capture plugin, so a
275
+ // bundle declaring `x-zab.capture/1` in `profiles[]` is compatible (it is
276
+ // NOT rejected as BUNDLE_INCOMPATIBLE, §17.3.1).
277
+ "x-zab.capture/1"
278
+ ]), Le = /^x-[a-z0-9-]+(?:\.[a-z0-9-]+)*$/, Ne = /^(?:0|[1-9][0-9]*)$/, x = ".authoring";
279
+ function xe(t) {
271
280
  const e = t.indexOf("/");
272
281
  if (e < 0) return !1;
273
282
  const s = t.slice(0, e), n = t.slice(e + 1);
274
- return !Ne.test(n) || !s.endsWith(N) ? !1 : Le.test(s.slice(0, -N.length));
283
+ return !Ne.test(n) || !s.endsWith(x) ? !1 : Le.test(s.slice(0, -x.length));
275
284
  }
276
285
  class U extends Error {
277
286
  code = "BUNDLE_INCOMPATIBLE";
@@ -284,17 +293,17 @@ class U extends Error {
284
293
  ), this.name = "BundleIncompatibleError", this.unsupportedProfiles = e;
285
294
  }
286
295
  }
287
- function x(t, e = Oe) {
296
+ function P(t, e = Oe) {
288
297
  const s = t.profiles;
289
298
  if (!s) return;
290
299
  if (!Array.isArray(s))
291
300
  throw new U(["<malformed: profiles is not an array>"]);
292
301
  if (s.length === 0) return;
293
- const n = s.filter((r) => typeof r != "string" || !Ue(r) && !e.has(r)).map((r) => typeof r == "string" ? r : "<malformed: non-string profile entry>");
302
+ const n = s.filter((r) => typeof r != "string" || !xe(r) && !e.has(r)).map((r) => typeof r == "string" ? r : "<malformed: non-string profile entry>");
294
303
  if (n.length > 0)
295
304
  throw new U(n);
296
305
  }
297
- class xe {
306
+ class Ue {
298
307
  cache = /* @__PURE__ */ new Map();
299
308
  baseUrl;
300
309
  pathPrefix;
@@ -317,7 +326,7 @@ class xe {
317
326
  return this.resolveUrl ? this.resolveUrl(e, s) : `${this.baseUrl}${this.pathPrefix}/${encodeURIComponent(e)}/bundle?v=${encodeURIComponent(s)}`;
318
327
  }
319
328
  preload(e) {
320
- x(e), this.cache.set(e.scene_version, e);
329
+ P(e), this.cache.set(e.scene_version, e);
321
330
  }
322
331
  async get(e, s) {
323
332
  const n = this.cache.get(s);
@@ -330,13 +339,13 @@ class xe {
330
339
  throw new Error(
331
340
  `bundle scene_version mismatch: expected ${s}, got ${a.scene_version}`
332
341
  );
333
- return x(a), this.cache.set(s, a), a;
342
+ return P(a), this.cache.set(s, a), a;
334
343
  }
335
344
  }
336
345
  function Pe(t) {
337
- return new xe(t);
346
+ return new Ue(t);
338
347
  }
339
- const g = {
348
+ const v = {
340
349
  initial: 200,
341
350
  max: 5e3,
342
351
  factor: 2,
@@ -368,10 +377,10 @@ class je {
368
377
  }
369
378
  function Me(t = {}) {
370
379
  const e = {
371
- initial: t.initial ?? g.initial,
372
- max: t.max ?? g.max,
373
- factor: t.factor ?? g.factor,
374
- jitter: t.jitter ?? g.jitter
380
+ initial: t.initial ?? v.initial,
381
+ max: t.max ?? v.max,
382
+ factor: t.factor ?? v.factor,
383
+ jitter: t.jitter ?? v.jitter
375
384
  };
376
385
  if (e.initial <= 0) throw new RangeError("initial must be > 0");
377
386
  if (e.max < e.initial) throw new RangeError("max must be >= initial");
@@ -420,11 +429,11 @@ class $e {
420
429
  * authenticate the render-bundle GET with the same credential. A
421
430
  * `LumencastTokenProvider` is awaited. */
422
431
  resolveCurrentToken() {
423
- return P(this.token);
432
+ return j(this.token);
424
433
  }
425
434
  /** Send `input` patches to the server. No-op if not connected. */
426
435
  sendInput(e) {
427
- !this.socket || this.socket.readyState !== this.WebSocketCtor.OPEN || e.length !== 0 && this.socket.send(R(ne(e)));
436
+ !this.socket || this.socket.readyState !== this.WebSocketCtor.OPEN || e.length !== 0 && this.socket.send(O(ne(e)));
428
437
  }
429
438
  /** Replace the auth token. Closes and reopens with the new token. */
430
439
  setToken(e) {
@@ -440,7 +449,7 @@ class $e {
440
449
  this.setStatus("connecting");
441
450
  let e;
442
451
  try {
443
- e = await P(this.token);
452
+ e = await j(this.token);
444
453
  } catch (n) {
445
454
  this.opts.onTransportError?.(
446
455
  new m(
@@ -479,7 +488,7 @@ class $e {
479
488
  ...this.opts.session !== void 0 ? { session: this.opts.session } : {},
480
489
  ...r !== void 0 ? { since_sequence: r } : {}
481
490
  });
482
- this.socket.send(R(i));
491
+ this.socket.send(O(i));
483
492
  }
484
493
  handleMessage(e) {
485
494
  const s = typeof e.data == "string" ? e.data : "";
@@ -488,7 +497,7 @@ class $e {
488
497
  try {
489
498
  n = ce(s);
490
499
  } catch (r) {
491
- const i = (r instanceof O, r.message), c = r instanceof O ? r.code : "INTERNAL";
500
+ const i = (r instanceof L, r.message), c = r instanceof L ? r.code : "INTERNAL";
492
501
  this.opts.onTransportError?.(new m(`codec: ${i}`, !0, c, r)), this.closeSocket(), this.scheduleReconnect();
493
502
  return;
494
503
  }
@@ -571,7 +580,7 @@ class $e {
571
580
  this.status !== e && (this.status = e, this.opts.onStatus?.(e));
572
581
  }
573
582
  }
574
- async function P(t) {
583
+ async function j(t) {
575
584
  return typeof t == "string" ? t : await t.fetch();
576
585
  }
577
586
  function De(t) {
@@ -586,26 +595,26 @@ function De(t) {
586
595
  throw new TypeError("mount: `scene` is required when mode === 'test'");
587
596
  }
588
597
  }
589
- function rt(t) {
598
+ function it(t) {
590
599
  De(t), t.onStatus?.("disconnected");
591
- const e = B(), s = Ce(t.serverUrl), n = Pe({
600
+ const e = W(), s = Fe(t.serverUrl), n = Pe({
592
601
  baseUrl: s,
593
602
  ...t.resolveBundleUrl !== void 0 ? { resolveUrl: t.resolveBundleUrl } : {},
594
603
  getAuthToken: () => d.resolveCurrentToken()
595
- }), r = p(null), i = p("disconnected"), c = p("__initial__"), a = (o) => {
604
+ }), r = g(null), i = g("disconnected"), c = g("__initial__"), a = (o) => {
596
605
  i.value = o, t.onStatus?.(o);
597
606
  }, f = (o) => {
598
607
  t.onError?.(o);
599
608
  };
600
609
  let u = !0;
601
- const b = t.onDiagnostic ? C(t.onDiagnostic) : void 0, d = new $e({
610
+ const p = t.onDiagnostic ? q(t.onDiagnostic) : void 0, d = new $e({
602
611
  url: t.serverUrl,
603
612
  token: t.token,
604
613
  ...t.scene !== void 0 ? { scene: t.scene } : {},
605
614
  ...t.testSession !== void 0 ? { session: t.testSession } : {},
606
615
  onStatus: a,
607
616
  onSnapshot: (o) => {
608
- u && (z(
617
+ u && (H(
609
618
  n,
610
619
  r,
611
620
  c,
@@ -642,51 +651,54 @@ function rt(t) {
642
651
  });
643
652
  },
644
653
  onTransportError: (o) => {
645
- f(Fe(o));
654
+ f(Ce(o));
646
655
  }
647
656
  });
648
657
  d.start();
649
- const T = $(t.target);
650
- return T.render(
658
+ const _ = D(t.target);
659
+ return _.render(
651
660
  J(he, {
652
661
  mode: t.mode,
653
662
  store: e,
654
663
  bundleSignal: r,
655
664
  statusSignal: i,
656
665
  crossfadeKeySignal: c,
657
- sendInput: (o) => d.sendInput(o)
666
+ sendInput: (o) => d.sendInput(o),
667
+ // ADR 004 §A1.3 — thread the host capture resolver to the runtime context
668
+ // so the `x-zab.capture` primitive's ACQUIRE mode can pin a device.
669
+ ...t.resolveCaptureDevice !== void 0 ? { resolveCaptureDevice: t.resolveCaptureDevice } : {}
658
670
  })
659
671
  ), {
660
672
  disconnect() {
661
- u && (u = !1, b?.(), d.close(), T.unmount());
673
+ u && (u = !1, p?.(), d.close(), _.unmount());
662
674
  },
663
675
  setToken(o) {
664
676
  u && d.setToken(o);
665
677
  }
666
678
  };
667
- async function z(o, y, H, _, E, G, X) {
668
- let I;
679
+ async function H(o, y, G, E, I, X, Y) {
680
+ let A;
669
681
  try {
670
- I = await o.get(_, E);
671
- } catch (A) {
672
- X({
682
+ A = await o.get(E, I);
683
+ } catch (R) {
684
+ Y({
673
685
  code: "BUNDLE_FETCH_FAILED",
674
- message: A instanceof Error ? A.message : "render bundle fetch failed",
686
+ message: R instanceof Error ? R.message : "render bundle fetch failed",
675
687
  recoverable: !0
676
688
  });
677
689
  return;
678
690
  }
679
- u && (G(), y.value = I, H.value = `${_}::${E}`);
691
+ u && (X(), y.value = A, G.value = `${E}::${I}`);
680
692
  }
681
693
  }
682
- function Fe(t) {
694
+ function Ce(t) {
683
695
  return {
684
696
  code: t.code,
685
697
  message: t.message,
686
698
  recoverable: t.recoverable
687
699
  };
688
700
  }
689
- function Ce(t) {
701
+ function Fe(t) {
690
702
  try {
691
703
  const e = new URL(t);
692
704
  return `${e.protocol === "wss:" ? "https:" : "http:"}//${e.host}`;
@@ -711,13 +723,13 @@ const qe = [
711
723
  // compiler and consumed by the Tree (built into a `<mask>` SVG element).
712
724
  "mask"
713
725
  ];
714
- function h(t) {
726
+ function l(t) {
715
727
  return /* @__PURE__ */ new Set([...qe, ...t]);
716
728
  }
717
729
  const Be = {
718
- stack: h(["direction", "gap", "wrap", "crossGap", "align", "justify"]),
719
- grid: h(["cols", "rows", "gap"]),
720
- frame: h([
730
+ stack: l(["direction", "gap", "wrap", "crossGap", "align", "justify"]),
731
+ grid: l(["cols", "rows", "gap"]),
732
+ frame: l([
721
733
  "x",
722
734
  "y",
723
735
  "width",
@@ -728,7 +740,7 @@ const Be = {
728
740
  "backgrounds",
729
741
  "clipsContent"
730
742
  ]),
731
- text: h([
743
+ text: l([
732
744
  "value",
733
745
  "size",
734
746
  "font",
@@ -742,8 +754,8 @@ const Be = {
742
754
  "fontStyle",
743
755
  "maxLines"
744
756
  ]),
745
- image: h(["src", "alt", "fit", "position", "width", "height"]),
746
- shape: h([
757
+ image: l(["src", "alt", "fit", "position", "width", "height"]),
758
+ shape: l([
747
759
  "geometry",
748
760
  "kind",
749
761
  "width",
@@ -758,8 +770,13 @@ const Be = {
758
770
  "paths",
759
771
  "ariaLabel"
760
772
  ]),
761
- media: h(["src", "loop", "mute", "autoplay", "fit"]),
762
- instance: h(["scene_id", "scene_version", "size", "position"]),
773
+ media: l(["src", "loop", "mute", "autoplay", "fit"]),
774
+ instance: l(["scene_id", "scene_version", "size", "position"]),
775
+ // RFC-0001 / ADR 004 — vendor capture placeholder. `width`/`height` are the
776
+ // flattened geometry (universal) ; the `x-zab.*` props are carried as
777
+ // metadata (the renderer reserves the box, ignores deviceRef). Listed so
778
+ // they are NOT flagged as silent drops by the anti-drop audit.
779
+ "x-zab.capture": l(["x-zab.sourceKind", "x-zab.deviceRef", "width", "height"]),
763
780
  // `repeat` is dispatched specially by the tree ; its only consumed
764
781
  // binding is `items`.
765
782
  repeat: /* @__PURE__ */ new Set(["items"])
@@ -768,16 +785,16 @@ function We(t, e) {
768
785
  const s = Be[t];
769
786
  return !!(s === void 0 || s.has(e) || t === "instance" && (e === "params" || e.startsWith("params.")));
770
787
  }
771
- const j = /* @__PURE__ */ new WeakSet();
772
- function it(t) {
773
- if (j.has(t)) return;
774
- j.add(t);
788
+ const M = /* @__PURE__ */ new WeakSet();
789
+ function ot(t) {
790
+ if (M.has(t)) return;
791
+ M.add(t);
775
792
  const e = /* @__PURE__ */ new Set([
776
793
  ...Object.keys(t.props ?? {}),
777
794
  ...Object.keys(t.bindings ?? {})
778
795
  ]);
779
796
  for (const s of e)
780
- We(t.kind, s) || q(
797
+ We(t.kind, s) || B(
781
798
  t.id,
782
799
  `${t.kind}.${s}`,
783
800
  "is not consumed by this primitive's renderer ; the prop is ignored (anti-silent-drop, ADR 001 §3.4)"
@@ -785,17 +802,17 @@ function it(t) {
785
802
  }
786
803
  const ze = { width: 1920, height: 1080 }, He = () => {
787
804
  };
788
- function ot(t) {
805
+ function ct(t) {
789
806
  const e = t.stage ?? ze, s = t.target;
790
807
  s.style.position ||= "relative", s.style.width = `${e.width}px`, s.style.height = `${e.height}px`, s.style.overflow = "hidden";
791
- const n = t.onDiagnostic ? C(t.onDiagnostic) : void 0, r = B();
808
+ const n = t.onDiagnostic ? q(t.onDiagnostic) : void 0, r = W();
792
809
  r.reset(t.defaults ?? {});
793
- const i = $(s);
810
+ const i = D(s);
794
811
  return {
795
812
  ready: new Promise((a) => {
796
- import("./broadcast-Gcd-dmC7.js").then(({ BroadcastMode: f }) => {
813
+ import("./broadcast-ryjLRD5q.js").then(({ BroadcastMode: f }) => {
797
814
  i.render(
798
- /* @__PURE__ */ l(Q, { children: /* @__PURE__ */ l(
815
+ /* @__PURE__ */ h(Q, { children: /* @__PURE__ */ h(
799
816
  F,
800
817
  {
801
818
  value: {
@@ -805,15 +822,15 @@ function ot(t) {
805
822
  status: "live",
806
823
  sendInput: He
807
824
  },
808
- children: /* @__PURE__ */ l(f, {})
825
+ children: /* @__PURE__ */ h(f, {})
809
826
  }
810
827
  ) })
811
828
  );
812
829
  const u = new Promise((d) => {
813
830
  requestAnimationFrame(() => requestAnimationFrame(() => d()));
814
- }), b = typeof document < "u" && document.fonts ? document.fonts.ready.then(() => {
831
+ }), p = typeof document < "u" && document.fonts ? document.fonts.ready.then(() => {
815
832
  }) : Promise.resolve();
816
- Promise.all([u, b]).then(() => a());
833
+ Promise.all([u, p]).then(() => a());
817
834
  });
818
835
  }),
819
836
  unmount() {
@@ -821,30 +838,30 @@ function ot(t) {
821
838
  }
822
839
  };
823
840
  }
824
- function W(t, e) {
841
+ function z(t, e) {
825
842
  if (typeof t != "string") return t;
826
843
  if (e[t]) return e[t];
827
844
  const s = /^assets\/([A-Za-z0-9]+)\.[A-Za-z0-9]+$/.exec(t);
828
845
  return s && s[1] !== void 0 && e[s[1]] ? e[s[1]] : t;
829
846
  }
830
- function M(t, e) {
847
+ function $(t, e) {
831
848
  if (t === null || typeof t != "object") return;
832
849
  if (Array.isArray(t)) {
833
- for (const n of t) M(n, e);
850
+ for (const n of t) $(n, e);
834
851
  return;
835
852
  }
836
853
  const s = t;
837
- "src" in s && (s.src = W(s.src, e));
854
+ "src" in s && (s.src = z(s.src, e));
838
855
  for (const n of Object.values(s))
839
- n && typeof n == "object" && M(n, e);
856
+ n && typeof n == "object" && $(n, e);
840
857
  }
841
- function ct(t, e) {
858
+ function at(t, e) {
842
859
  const s = { ...t };
843
860
  for (const [n, r] of Object.entries(s))
844
- n.startsWith("__lit.image.") && (s[n] = W(r, e));
861
+ n.startsWith("__lit.image.") && (s[n] = z(r, e));
845
862
  return s;
846
863
  }
847
- async function at(t) {
864
+ async function ut(t) {
848
865
  const e = [];
849
866
  for (const s of t)
850
867
  try {
@@ -860,26 +877,27 @@ async function at(t) {
860
877
  export {
861
878
  fe as A,
862
879
  U as B,
863
- et as F,
880
+ tt as F,
864
881
  Be as P,
865
882
  Oe as S,
866
- it as a,
867
- C as b,
868
- L as c,
869
- Ue as d,
870
- q as e,
871
- rt as f,
872
- ot as g,
873
- W as h,
874
- at as i,
875
- ct as j,
876
- M as k,
877
- nt as m,
878
- st as r,
883
+ et as a,
884
+ ot as b,
885
+ N as c,
886
+ q as d,
887
+ B as e,
888
+ xe as f,
889
+ it as g,
890
+ ct as h,
891
+ ut as i,
892
+ z as j,
893
+ at as k,
894
+ $ as l,
895
+ rt as m,
896
+ nt as r,
879
897
  be as s,
880
- tt as t,
898
+ st as t,
881
899
  Ve as u,
882
- x as v,
900
+ P as v,
883
901
  ye as w
884
902
  };
885
- //# sourceMappingURL=index-N-VqrIxN.js.map
903
+ //# sourceMappingURL=index-DrXsLYhe.js.map