@nonoun/native-ai 1.0.10 → 1.0.13

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/register.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { NButton as e, NContainer as t, NDialog as n, NIcon as r, NListbox as i, NOption as a, NOptionGroup as o, NOptionGroupHeader as s, NSegment as c, NSegmentedControl as l, NSelect as u, NTextarea as d, NToolbar as f, NativeElement as p, PresentController as m, ResizeController as h, VirtualScrollController as g, computed as _, createDisabledEffect as v, define as y, effect as ee, registerIcon as b, signal as x, uid as S } from "@nonoun/native-ui";
2
- import { Decoration as C, EditorView as w, StateEffect as te, StateField as ne, keymap as re } from "@nonoun/native-code";
3
- import { json as T } from "@codemirror/lang-json";
4
- import { linter as ie } from "@codemirror/lint";
2
+ import { Decoration as C, EditorView as w, StateEffect as te, StateField as ne, keymap as T } from "@nonoun/native-code";
3
+ import { json as E } from "@codemirror/lang-json";
4
+ import { linter as re } from "@codemirror/lint";
5
5
  import "@nonoun/native-code/register";
6
- import { Kernel as ae, resetKernel as oe } from "@nonoun/native-ui/kernel";
7
- var E = new Set([
6
+ import { Kernel as ie, resetKernel as ae } from "@nonoun/native-ui/kernel";
7
+ var D = new Set([
8
8
  "createSurface",
9
9
  "updateComponents",
10
10
  "updateDataModel",
@@ -15,7 +15,7 @@ var E = new Set([
15
15
  * Find top-level `{}` blocks using brace-counting with string-escape awareness.
16
16
  * Same algorithm as the workbench's `#getEnvelopes()` method.
17
17
  */
18
- function se(e) {
18
+ function oe(e) {
19
19
  let t = [], n = 0, r = -1, i = !1, a = !1;
20
20
  for (let o = 0; o < e.length; o++) {
21
21
  let s = e[o];
@@ -48,8 +48,8 @@ function se(e) {
48
48
  * const ext = linter(a2uiLinter);
49
49
  * ```
50
50
  */
51
- function ce(e) {
52
- let t = e.state.doc.toString(), n = [], r = se(t), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), o = [], s = /* @__PURE__ */ new Map();
51
+ function se(e) {
52
+ let t = e.state.doc.toString(), n = [], r = oe(t), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), o = [], s = /* @__PURE__ */ new Map();
53
53
  for (let e of r) {
54
54
  let { from: t, to: r, text: c } = e, l;
55
55
  try {
@@ -73,13 +73,13 @@ function ce(e) {
73
73
  });
74
74
  continue;
75
75
  }
76
- let u = Object.keys(l), d = u.find((e) => E.has(e)), f = u.filter((e) => !E.has(e) && e !== "version");
76
+ let u = Object.keys(l), d = u.find((e) => D.has(e)), f = u.filter((e) => !D.has(e) && e !== "version");
77
77
  if (!d && f.length > 0) {
78
78
  n.push({
79
79
  from: t,
80
80
  to: r,
81
81
  severity: "error",
82
- message: `Unknown envelope key: "${f[0]}". Expected one of: ${[...E].join(", ")}`
82
+ message: `Unknown envelope key: "${f[0]}". Expected one of: ${[...D].join(", ")}`
83
83
  });
84
84
  continue;
85
85
  }
@@ -88,7 +88,7 @@ function ce(e) {
88
88
  from: t,
89
89
  to: r,
90
90
  severity: "error",
91
- message: `Missing envelope key. Expected one of: ${[...E].join(", ")}`
91
+ message: `Missing envelope key. Expected one of: ${[...D].join(", ")}`
92
92
  });
93
93
  continue;
94
94
  }
@@ -150,29 +150,29 @@ function ce(e) {
150
150
  }
151
151
  return n;
152
152
  }
153
- function D(e) {
153
+ function O(e) {
154
154
  return typeof e == "object" && !!e && "path" in e && typeof e.path == "string" && Object.keys(e).length === 1;
155
155
  }
156
- function le(e) {
156
+ function ce(e) {
157
157
  return "createSurface" in e;
158
158
  }
159
- function ue(e) {
159
+ function le(e) {
160
160
  return "updateComponents" in e;
161
161
  }
162
- function de(e) {
162
+ function ue(e) {
163
163
  return "updateDataModel" in e;
164
164
  }
165
- function fe(e) {
165
+ function de(e) {
166
166
  return "deleteSurface" in e;
167
167
  }
168
- function pe(e) {
168
+ function fe(e) {
169
169
  return "requestCatalog" in e;
170
170
  }
171
171
  /**
172
172
  * Parse a raw JSON string into a typed A2UI server message.
173
173
  * Returns null if the JSON is not a valid A2UI message.
174
174
  */
175
- function me(e) {
175
+ function pe(e) {
176
176
  try {
177
177
  let t = JSON.parse(e);
178
178
  return "createSurface" in t || "updateComponents" in t || "updateDataModel" in t || "deleteSurface" in t || "requestCatalog" in t ? t : null;
@@ -180,7 +180,121 @@ function me(e) {
180
180
  return null;
181
181
  }
182
182
  }
183
- var he = [
183
+ /**
184
+ * A2UI Component Map
185
+ *
186
+ * Bidirectional mapping between A2UI abstract component types
187
+ * and native-ui concrete HTML/custom element tags.
188
+ *
189
+ * The `ComponentRegistry` class provides a mutable registry with
190
+ * change tracking via a signal. The default singleton (`defaultRegistry`)
191
+ * preserves backward compatibility with existing free-function imports.
192
+ */
193
+ var me = class e {
194
+ #e = /* @__PURE__ */ new Map();
195
+ #t = /* @__PURE__ */ new Map();
196
+ #n = /* @__PURE__ */ new Map();
197
+ #r;
198
+ constructor(e, t) {
199
+ this.#r = x(0);
200
+ for (let t of e) this.#i(t);
201
+ if (t) for (let [e, n] of Object.entries(t)) this.#n.set(e, n);
202
+ }
203
+ get version() {
204
+ return this.#r;
205
+ }
206
+ get(e) {
207
+ return this.#e.get(e);
208
+ }
209
+ has(e) {
210
+ return this.#e.has(e);
211
+ }
212
+ get size() {
213
+ return this.#e.size;
214
+ }
215
+ keys() {
216
+ return this.#e.keys();
217
+ }
218
+ values() {
219
+ return this.#e.values();
220
+ }
221
+ entries() {
222
+ return this.#e.entries();
223
+ }
224
+ forEach(e) {
225
+ this.#e.forEach(e);
226
+ }
227
+ [Symbol.iterator]() {
228
+ return this.#e[Symbol.iterator]();
229
+ }
230
+ add(e, t = !0) {
231
+ this.#i(e), t && this.#r.value++;
232
+ }
233
+ update(e, t) {
234
+ let n = this.#e.get(e);
235
+ if (!n) return;
236
+ let r = {
237
+ ...n,
238
+ ...t
239
+ };
240
+ this.#e.set(e, r), this.#a(), this.#r.value++;
241
+ }
242
+ remove(e) {
243
+ this.#e.has(e) && (this.#e.delete(e), this.#n.delete(e), this.#a(), this.#r.value++);
244
+ }
245
+ setCategory(e, t) {
246
+ this.#n.set(e, t), this.#r.value++;
247
+ }
248
+ toJSON() {
249
+ let e = Array.from(this.#e.values()), t = {};
250
+ for (let [e, n] of this.#n) t[e] = n;
251
+ return {
252
+ mappings: e,
253
+ categories: t
254
+ };
255
+ }
256
+ static fromJSON(t) {
257
+ return new e(t.mappings, t.categories);
258
+ }
259
+ clone() {
260
+ return e.fromJSON(this.toJSON());
261
+ }
262
+ resolveNativeTag(e) {
263
+ return this.#e.get(e) ?? null;
264
+ }
265
+ resolveA2UIType(e, t) {
266
+ let n = t?.["data-a2ui"];
267
+ if (n && this.#e.has(n)) return n;
268
+ let r = this.#t.get(e);
269
+ if (r) return r.a2uiType;
270
+ if (e === "span") return t?.class?.includes("text"), "Text";
271
+ if (e === "n-stack") return t?.direction === "row" ? "Row" : "Column";
272
+ if (e === "div") {
273
+ if (t?.class?.includes("stack")) return t?.direction === "row" ? "Row" : "Column";
274
+ let e = t?.style ?? "";
275
+ return e.includes("flex-direction:column") || e.includes("flex-direction: column") ? "Column" : e.includes("display:flex") || e.includes("display: flex") ? "Row" : "Column";
276
+ }
277
+ return e === "img" ? "Image" : e === "video" ? "Video" : e === "audio" ? "AudioPlayer" : /^h[1-6]$/.test(e) ? "Text" : null;
278
+ }
279
+ getSupportedTypes() {
280
+ return Array.from(this.#e.keys());
281
+ }
282
+ getComponentCategory(e) {
283
+ return this.#n.get(e) ?? "other";
284
+ }
285
+ getCompatibleTypes(e) {
286
+ let t = this.getComponentCategory(e);
287
+ return Array.from(this.#e.keys()).filter((e) => this.getComponentCategory(e) === t);
288
+ }
289
+ #i(e) {
290
+ this.#e.set(e.a2uiType, e), e.nativeTag !== "div" && e.nativeTag !== "span" && !this.#t.has(e.nativeTag) && this.#t.set(e.nativeTag, e);
291
+ }
292
+ #a() {
293
+ this.#t.clear();
294
+ for (let e of this.#e.values()) e.nativeTag !== "div" && e.nativeTag !== "span" && !this.#t.has(e.nativeTag) && this.#t.set(e.nativeTag, e);
295
+ }
296
+ };
297
+ const k = new me([
184
298
  {
185
299
  a2uiType: "Text",
186
300
  nativeTag: "span",
@@ -276,24 +390,35 @@ var he = [
276
390
  },
277
391
  {
278
392
  a2uiType: "Row",
279
- nativeTag: "div",
393
+ nativeTag: "n-stack",
280
394
  childStrategy: "children",
281
- defaultAttributes: {
282
- class: "stack",
283
- direction: "row"
284
- }
395
+ defaultAttributes: { direction: "row" }
285
396
  },
286
397
  {
287
398
  a2uiType: "Column",
288
- nativeTag: "div",
289
- childStrategy: "children",
290
- defaultAttributes: { class: "stack" }
399
+ nativeTag: "n-stack",
400
+ childStrategy: "children"
291
401
  },
292
402
  {
293
403
  a2uiType: "Card",
294
404
  nativeTag: "n-container",
295
405
  childStrategy: "children"
296
406
  },
407
+ {
408
+ a2uiType: "Header",
409
+ nativeTag: "n-header",
410
+ childStrategy: "children"
411
+ },
412
+ {
413
+ a2uiType: "Body",
414
+ nativeTag: "n-body",
415
+ childStrategy: "children"
416
+ },
417
+ {
418
+ a2uiType: "Footer",
419
+ nativeTag: "n-footer",
420
+ childStrategy: "children"
421
+ },
297
422
  {
298
423
  a2uiType: "Modal",
299
424
  nativeTag: "n-dialog",
@@ -339,15 +464,13 @@ var he = [
339
464
  },
340
465
  {
341
466
  a2uiType: "Badge",
342
- nativeTag: "span",
343
- childStrategy: "textContent",
344
- defaultAttributes: { class: "badge" }
467
+ nativeTag: "n-badge",
468
+ childStrategy: "textContent"
345
469
  },
346
470
  {
347
471
  a2uiType: "Avatar",
348
- nativeTag: "span",
472
+ nativeTag: "n-avatar",
349
473
  childStrategy: "none",
350
- defaultAttributes: { class: "avatar" },
351
474
  propertyMap: {
352
475
  src: "src",
353
476
  alt: "alt"
@@ -410,68 +533,7 @@ var he = [
410
533
  nativeTag: "n-toast",
411
534
  childStrategy: "textContent"
412
535
  }
413
- ], O = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Map();
414
- for (let e of he) O.set(e.a2uiType, e), e.nativeTag !== "div" && e.nativeTag !== "span" && !k.has(e.nativeTag) && k.set(e.nativeTag, e);
415
- /** All component mappings, keyed by A2UI type */
416
- const A = O;
417
- function j(e) {
418
- return O.get(e) ?? null;
419
- }
420
- function ge(e, t) {
421
- let n = t?.["data-a2ui"];
422
- if (n && O.has(n)) return n;
423
- let r = k.get(e);
424
- if (r) return r.a2uiType;
425
- if (e === "span") return t?.class?.includes("text"), "Text";
426
- if (e === "div") {
427
- if (t?.class?.includes("stack")) return t?.direction === "row" ? "Row" : "Column";
428
- let e = t?.style ?? "";
429
- return e.includes("flex-direction:column") || e.includes("flex-direction: column") ? "Column" : e.includes("display:flex") || e.includes("display: flex") ? "Row" : "Column";
430
- }
431
- return e === "img" ? "Image" : e === "video" ? "Video" : e === "audio" ? "AudioPlayer" : /^h[1-6]$/.test(e) ? "Text" : null;
432
- }
433
- var _e = {
434
- h1: "h1",
435
- h2: "h2",
436
- h3: "h3",
437
- h4: "h4",
438
- h5: "h5",
439
- heading: "h2",
440
- caption: "small",
441
- body: "span"
442
- };
443
- /**
444
- * For A2UI Text components, resolve the variant to an HTML tag.
445
- * Returns 'span' by default.
446
- */
447
- function ve(e) {
448
- return e ? _e[e] ?? "span" : "span";
449
- }
450
- /**
451
- * For A2UI DateTimeInput components, resolve enableDate/enableTime to HTML input type.
452
- */
453
- function ye(e, t) {
454
- return e && t ? "datetime-local" : t && !e ? "time" : "date";
455
- }
456
- var be = {
457
- number: "number",
458
- obscured: "password",
459
- shortText: "text",
460
- longText: "text"
461
- };
462
- /**
463
- * For A2UI TextField components, resolve the variant to an HTML input type attribute.
464
- */
465
- function xe(e) {
466
- return e ? be[e] ?? "text" : "text";
467
- }
468
- /**
469
- * Get all supported A2UI component types.
470
- */
471
- function M() {
472
- return Array.from(O.keys());
473
- }
474
- var Se = {
536
+ ], {
475
537
  Text: "display",
476
538
  Icon: "display",
477
539
  Image: "display",
@@ -491,6 +553,9 @@ var Se = {
491
553
  Row: "layout",
492
554
  Column: "layout",
493
555
  Card: "container",
556
+ Header: "container",
557
+ Body: "container",
558
+ Footer: "container",
494
559
  Modal: "container",
495
560
  Accordion: "container",
496
561
  AccordionItem: "container",
@@ -502,19 +567,50 @@ var Se = {
502
567
  AudioPlayer: "media",
503
568
  Table: "data",
504
569
  Toast: "feedback"
570
+ });
571
+ function A(e) {
572
+ return k.resolveNativeTag(e);
573
+ }
574
+ function j(e, t) {
575
+ return k.resolveA2UIType(e, t);
576
+ }
577
+ function M() {
578
+ return k.getSupportedTypes();
579
+ }
580
+ var he = {
581
+ h1: "h1",
582
+ h2: "h2",
583
+ h3: "h3",
584
+ h4: "h4",
585
+ h5: "h5",
586
+ heading: "h2",
587
+ caption: "small",
588
+ body: "span"
505
589
  };
506
590
  /**
507
- * Get the category for an A2UI component type.
591
+ * For A2UI Text components, resolve the variant to an HTML tag.
592
+ * Returns 'span' by default.
593
+ */
594
+ function ge(e) {
595
+ return e ? he[e] ?? "span" : "span";
596
+ }
597
+ /**
598
+ * For A2UI DateTimeInput components, resolve enableDate/enableTime to HTML input type.
508
599
  */
509
- function N(e) {
510
- return Se[e] ?? "other";
600
+ function _e(e, t) {
601
+ return e && t ? "datetime-local" : t && !e ? "time" : "date";
511
602
  }
603
+ var ve = {
604
+ number: "number",
605
+ obscured: "password",
606
+ shortText: "text",
607
+ longText: "text"
608
+ };
512
609
  /**
513
- * Get all component types in the same category.
610
+ * For A2UI TextField components, resolve the variant to an HTML input type attribute.
514
611
  */
515
- function Ce(e) {
516
- let t = N(e);
517
- return Array.from(O.keys()).filter((e) => N(e) === t);
612
+ function ye(e) {
613
+ return e ? ve[e] ?? "text" : "text";
518
614
  }
519
615
  /**
520
616
  * A2UI Converter
@@ -522,8 +618,12 @@ function Ce(e) {
522
618
  * Bidirectional conversion between A2UI flat adjacency lists
523
619
  * and native-ui nested UINode trees.
524
620
  */
525
- var we = new Set(/* @__PURE__ */ "id.component.children.child.text.label.variant.disabled.action.accessibility.value.placeholder.min.max.step.url.src.alt.name.fit.justify.align.weight.direction.enableDate.enableTime.options.filterable.displayStyle.validationRegexp.checks.trigger.content.tabs.poster".split("."));
526
- function P(e, t) {
621
+ var be = new Set(/* @__PURE__ */ "id.component.children.child.text.label.variant.disabled.action.accessibility.value.placeholder.min.max.step.url.src.alt.name.fit.justify.align.weight.direction.enableDate.enableTime.options.filterable.displayStyle.validationRegexp.checks.trigger.content.tabs.poster.header.footer".split(".")), xe = new Set([
622
+ "Header",
623
+ "Body",
624
+ "Footer"
625
+ ]);
626
+ function N(e, t) {
527
627
  if (e.length === 0) return {
528
628
  root: {
529
629
  id: "empty-root",
@@ -555,118 +655,118 @@ function P(e, t) {
555
655
  warnings: ["No root component found"],
556
656
  orphans: []
557
657
  };
558
- let a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map(), s = [], c = t?.surfaceId ?? "default", l = F(i, n, a, o, s, c), u = e.filter((e) => !a.has(e.id)).map((e) => e.id);
559
- return u.length > 0 && s.push(`Orphan components not reachable from root: ${u.join(", ")}`), {
560
- root: l,
658
+ let a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map(), s = [], c = t?.surfaceId ?? "default", l = t?.registry ? (e) => t.registry.resolveNativeTag(e) : A, u = P(i, n, a, o, s, c, l), d = e.filter((e) => !a.has(e.id)).map((e) => e.id);
659
+ return d.length > 0 && s.push(`Orphan components not reachable from root: ${d.join(", ")}`), {
660
+ root: u,
561
661
  bindings: o,
562
662
  warnings: s,
563
- orphans: u
663
+ orphans: d
564
664
  };
565
665
  }
566
- function F(e, t, n, r, i, a) {
666
+ function P(e, t, n, r, i, a, o = A) {
567
667
  if (n.has(e)) return i.push(`Cycle detected at component "${e}"`), {
568
668
  id: `${e}-cycle`,
569
669
  tag: "div",
570
670
  textContent: `[Cycle: ${e}]`
571
671
  };
572
672
  n.add(e);
573
- let o = t.get(e);
574
- if (!o) return i.push(`Component "${e}" referenced but not found`), {
673
+ let s = t.get(e);
674
+ if (!s) return i.push(`Component "${e}" referenced but not found`), {
575
675
  id: e,
576
676
  tag: "div",
577
677
  textContent: `[Missing: ${e}]`
578
678
  };
579
- let s = j(o.component);
580
- if (!s) return i.push(`Unknown A2UI type "${o.component}" for component "${e}"`), {
679
+ let c = o(s.component);
680
+ if (!c) return i.push(`Unknown A2UI type "${s.component}" for component "${e}"`), {
581
681
  id: e,
582
682
  tag: "div",
583
- textContent: o.text ?? `[Unknown: ${o.component}]`
683
+ textContent: s.text ?? `[Unknown: ${s.component}]`
584
684
  };
585
- let c = s.nativeTag;
586
- o.component === "Text" && o.variant && (c = ve(o.variant));
587
- let l = {};
588
- if (l["data-a2ui"] = o.component, s.defaultAttributes && Object.assign(l, s.defaultAttributes), o.variant && s.variantMap) {
589
- let e = s.variantMap[o.variant];
590
- e && (l.variant = e);
591
- } else o.variant && o.component !== "Text" && (l.variant = o.variant);
592
- if (s.propertyMap) for (let [t, n] of Object.entries(s.propertyMap)) {
593
- let i = o[t];
594
- if (i !== void 0) if (D(i)) {
685
+ let l = c.nativeTag;
686
+ s.component === "Text" && s.variant && (l = ge(s.variant));
687
+ let u = {};
688
+ if (u["data-a2ui"] = s.component, c.defaultAttributes && Object.assign(u, c.defaultAttributes), s.variant && c.variantMap) {
689
+ let e = c.variantMap[s.variant];
690
+ e && (u.variant = e);
691
+ } else s.variant && s.component !== "Text" && (u.variant = s.variant);
692
+ if (c.propertyMap) for (let [t, n] of Object.entries(c.propertyMap)) {
693
+ let i = s[t];
694
+ if (i !== void 0) if (O(i)) {
595
695
  let t = r.get(e);
596
696
  t || (t = [], r.set(e, t)), t.push({
597
697
  property: n,
598
698
  path: i.path
599
699
  });
600
- } else l[n] = String(i);
700
+ } else u[n] = String(i);
601
701
  }
602
- if (o.disabled && (l.disabled = ""), o.accessibility?.label && (l["aria-label"] = o.accessibility.label), o.component === "TextField") {
603
- let e = xe(o.variant);
604
- e !== "text" && (l.type = e);
702
+ if (s.disabled && (u.disabled = ""), s.accessibility?.label && (u["aria-label"] = s.accessibility.label), s.component === "TextField") {
703
+ let e = ye(s.variant);
704
+ e !== "text" && (u.type = e);
605
705
  }
606
- if (o.component === "DateTimeInput" && (l.type = ye(o.enableDate, o.enableTime)), (o.component === "TextField" || o.component === "DateTimeInput" || o.component === "Slider") && o.label) if (D(o.label)) {
706
+ if (s.component === "DateTimeInput" && (u.type = _e(s.enableDate, s.enableTime)), (s.component === "TextField" || s.component === "DateTimeInput" || s.component === "Slider") && s.label) if (O(s.label)) {
607
707
  let t = r.get(e);
608
708
  t || (t = [], r.set(e, t)), t.push({
609
709
  property: "aria-label",
610
- path: o.label.path
710
+ path: s.label.path
611
711
  });
612
- } else l["aria-label"] = o.label;
613
- if (o.component === "Slider" && (o.min !== void 0 && (l.min = String(o.min)), o.max !== void 0 && (l.max = String(o.max))), o.component === "Progress") {
614
- let e = parseFloat(l.value ?? "0"), t = parseFloat(l.max ?? "100");
615
- l.style = `--n-progress: ${t > 0 ? Math.min(1, Math.max(0, e / t)) : 0}`, l.value && (l["data-value"] = l.value, delete l.value), l.max && (l["data-max"] = l.max, delete l.max);
712
+ } else u["aria-label"] = s.label;
713
+ if (s.component === "Slider" && (s.min !== void 0 && (u.min = String(s.min)), s.max !== void 0 && (u.max = String(s.max))), s.component === "Progress") {
714
+ let e = parseFloat(u.value ?? "0"), t = parseFloat(u.max ?? "100");
715
+ u.style = `--n-progress: ${t > 0 ? Math.min(1, Math.max(0, e / t)) : 0}`, u.value && (u["data-value"] = u.value, delete u.value), u.max && (u["data-max"] = u.max, delete u.max);
616
716
  }
617
- let u;
618
- if (o.text !== void 0) if (D(o.text)) {
717
+ let d;
718
+ if (s.text !== void 0) if (O(s.text)) {
619
719
  let t = r.get(e);
620
720
  t || (t = [], r.set(e, t)), t.push({
621
721
  property: "textContent",
622
- path: o.text.path
722
+ path: s.text.path
623
723
  });
624
- } else u = o.text;
625
- for (let [e, t] of Object.entries(o)) we.has(e) || typeof t == "string" && (l[e] = t);
626
- let d;
627
- o.action?.event && s.actionEvent && (d = { [s.actionEvent]: `a2ui:${a}:${e}:${o.action.event.name}` });
628
- let f, p = o.children ?? (o.child ? [o.child] : void 0);
629
- if (o.component === "Tabs" && p && p.length > 0) {
630
- f = [];
631
- let o = [];
632
- for (let e = 0; e < p.length; e++) {
633
- let s = p[e], c = t.get(s);
634
- if (!c) continue;
635
- n.add(s);
636
- let l = String(c.value ?? c.id ?? `tab-${e}`), u = String(c.label ?? c.text ?? `Tab ${e + 1}`);
637
- f.push({
638
- id: `${s}-tab`,
724
+ } else d = s.text;
725
+ for (let [e, t] of Object.entries(s)) be.has(e) || typeof t == "string" && (u[e] = t);
726
+ let f;
727
+ s.action?.event && c.actionEvent && (f = { [c.actionEvent]: `a2ui:${a}:${e}:${s.action.event.name}` });
728
+ let p, m = s.children ?? (s.child ? [s.child] : void 0);
729
+ if (s.component === "Tabs" && m && m.length > 0) {
730
+ p = [];
731
+ let s = [];
732
+ for (let e = 0; e < m.length; e++) {
733
+ let c = m[e], l = t.get(c);
734
+ if (!l) continue;
735
+ n.add(c);
736
+ let u = String(l.value ?? l.id ?? `tab-${e}`), d = String(l.label ?? l.text ?? `Tab ${e + 1}`);
737
+ p.push({
738
+ id: `${c}-tab`,
639
739
  tag: "n-tab",
640
- attributes: { value: l },
641
- textContent: u
740
+ attributes: { value: u },
741
+ textContent: d
642
742
  });
643
- let d = c.children ?? (c.child ? [c.child] : void 0), m = d ? d.map((e) => F(e, t, n, r, i, a)) : void 0, h = typeof c.text == "string" ? c.text : void 0;
644
- o.push({
645
- id: `${s}-panel`,
743
+ let f = l.children ?? (l.child ? [l.child] : void 0), h = f ? f.map((e) => P(e, t, n, r, i, a, o)) : void 0, g = typeof l.text == "string" ? l.text : void 0;
744
+ s.push({
745
+ id: `${c}-panel`,
646
746
  tag: "n-tab-panel",
647
- attributes: { value: l },
648
- ...m && m.length > 0 ? { children: m } : {},
649
- ...h && !m ? { textContent: h } : {}
747
+ attributes: { value: u },
748
+ ...h && h.length > 0 ? { children: h } : {},
749
+ ...g && !h ? { textContent: g } : {}
650
750
  });
651
751
  }
652
- if (f.push({
752
+ if (p.push({
653
753
  id: `${e}-panels`,
654
754
  tag: "n-tab-panels",
655
- children: o
656
- }), !l.value && p.length > 0) {
657
- let e = t.get(p[0]);
658
- l.value = String(e?.value ?? e?.id ?? "tab-0");
755
+ children: s
756
+ }), !u.value && m.length > 0) {
757
+ let e = t.get(m[0]);
758
+ u.value = String(e?.value ?? e?.id ?? "tab-0");
659
759
  }
660
- } else if (o.component === "Select" || o.component === "ChoicePicker") {
661
- if (Array.isArray(o.options) && o.options.length > 0) {
662
- let e = o.options.map((e) => typeof e == "string" ? {
760
+ } else if (s.component === "Select" || s.component === "ChoicePicker") {
761
+ if (Array.isArray(s.options) && s.options.length > 0) {
762
+ let e = s.options.map((e) => typeof e == "string" ? {
663
763
  value: e,
664
764
  label: e
665
765
  } : e);
666
- l.options = JSON.stringify(e), o.label && (l.placeholder = String(o.label));
667
- } else if (p && p.length > 0) {
766
+ u.options = JSON.stringify(e), s.label && (u.placeholder = String(s.label));
767
+ } else if (m && m.length > 0) {
668
768
  let e = [];
669
- for (let r of p) {
769
+ for (let r of m) {
670
770
  let i = t.get(r);
671
771
  i && i.component === "ListItem" && (n.add(r), e.push({
672
772
  value: String(i.value ?? ""),
@@ -674,95 +774,125 @@ function F(e, t, n, r, i, a) {
674
774
  ...i.disabled ? { disabled: !0 } : {}
675
775
  }));
676
776
  }
677
- e.length > 0 && (l.options = JSON.stringify(e), o.label && (l.placeholder = String(o.label)));
777
+ e.length > 0 && (u.options = JSON.stringify(e), s.label && (u.placeholder = String(s.label)));
678
778
  }
679
- } else p && p.length > 0 && (f = p.map((e) => F(e, t, n, r, i, a)));
680
- if (s.childStrategy === "slot-label" && u && !f) f = [{
779
+ } else if (s.component === "Card" && m && m.length > 0) if (m.some((e) => {
780
+ let n = t.get(e);
781
+ return n ? xe.has(n.component) : !1;
782
+ })) p = m.map((e) => P(e, t, n, r, i, a, o));
783
+ else {
784
+ p = [];
785
+ let c = s.header ?? s.label;
786
+ c && p.push({
787
+ id: `${e}-header`,
788
+ tag: "n-header",
789
+ children: [{
790
+ id: `${e}-header-label`,
791
+ tag: "span",
792
+ attributes: { slot: "label" },
793
+ textContent: c
794
+ }]
795
+ });
796
+ let l = m.map((e) => P(e, t, n, r, i, a, o));
797
+ p.push({
798
+ id: `${e}-body`,
799
+ tag: "n-body",
800
+ children: l
801
+ });
802
+ let u = s.footer;
803
+ u && p.push({
804
+ id: `${e}-footer`,
805
+ tag: "n-footer",
806
+ textContent: u
807
+ }), c && (d = void 0);
808
+ }
809
+ else m && m.length > 0 && (p = m.map((e) => P(e, t, n, r, i, a, o)));
810
+ if (c.childStrategy === "slot-label" && d && !p) p = [{
681
811
  id: `${e}-label`,
682
812
  tag: "span",
683
813
  attributes: { slot: "label" },
684
- textContent: u
685
- }], u = void 0;
686
- else if (s.childStrategy === "textContent" && o.label && !u) if (D(o.label)) {
814
+ textContent: d
815
+ }], d = void 0;
816
+ else if (c.childStrategy === "textContent" && s.label && !d) if (O(s.label)) {
687
817
  let t = r.get(e);
688
818
  t || (t = [], r.set(e, t)), t.push({
689
819
  property: "textContent",
690
- path: o.label.path
820
+ path: s.label.path
691
821
  });
692
- } else u = o.label;
693
- if (o.component === "ListItem" && o.value !== void 0 && (l.value = String(o.value)), o.component === "Image" || o.component === "Video" || o.component === "AudioPlayer") {
694
- let t = o.component === "Image" ? "img" : o.component === "Video" ? "video" : "audio", n = {};
822
+ } else d = s.label;
823
+ if (s.component === "ListItem" && s.value !== void 0 && (u.value = String(s.value)), s.component === "Image" || s.component === "Video" || s.component === "AudioPlayer") {
824
+ let t = s.component === "Image" ? "img" : s.component === "Video" ? "video" : "audio", n = {};
695
825
  t !== "img" && (n.controls = "");
696
826
  for (let e of [
697
827
  "src",
698
828
  "alt",
699
829
  "poster"
700
- ]) l[e] && (n[e] = l[e], delete l[e]);
701
- if (o.component === "Image" && o.url !== void 0) {
702
- if (D(o.url)) {
830
+ ]) u[e] && (n[e] = u[e], delete u[e]);
831
+ if (s.component === "Image" && s.url !== void 0) {
832
+ if (O(s.url)) {
703
833
  let t = r.get(`${e}-inner`);
704
834
  t || (t = [], r.set(`${e}-inner`, t)), t.push({
705
835
  property: "src",
706
- path: o.url.path
836
+ path: s.url.path
707
837
  });
708
- } else n.src = o.url;
709
- o.alt && (n.alt = o.alt);
838
+ } else n.src = s.url;
839
+ s.alt && (n.alt = s.alt);
710
840
  }
711
- f = [{
841
+ p = [{
712
842
  id: `${e}-inner`,
713
843
  tag: t,
714
844
  ...Object.keys(n).length > 0 ? { attributes: n } : {}
715
845
  }];
716
846
  }
717
- let m = Object.keys(l).length > 0 ? l : void 0;
847
+ let h = Object.keys(u).length > 0 ? u : void 0;
718
848
  return {
719
849
  id: e,
720
- tag: c,
721
- ...m ? { attributes: m } : {},
722
- ...u === void 0 ? {} : { textContent: u },
723
- ...f && f.length > 0 ? { children: f } : {},
724
- ...d ? { events: d } : {}
850
+ tag: l,
851
+ ...h ? { attributes: h } : {},
852
+ ...d === void 0 ? {} : { textContent: d },
853
+ ...p && p.length > 0 ? { children: p } : {},
854
+ ...f ? { events: f } : {}
725
855
  };
726
856
  }
727
- function Te(e, t) {
728
- let n = [];
729
- return I(e, n, t?.surfaceId ?? "default"), n;
857
+ function Se(e, t) {
858
+ let n = [], r = t?.registry ? (e, n) => t.registry.resolveA2UIType(e, n) : j, i = t?.registry ? (e) => t.registry.resolveNativeTag(e) : A;
859
+ return F(e, n, t?.surfaceId ?? "default", r, i), n;
730
860
  }
731
- function I(e, t, n) {
732
- let r = ge(e.tag, e.attributes);
733
- if (!r) {
734
- let r = {
861
+ function F(e, t, n, r = j, i = A) {
862
+ let a = r(e.tag, e.attributes);
863
+ if (!a) {
864
+ let a = {
735
865
  id: e.id,
736
866
  component: "Column",
737
867
  ...e.children ? { children: e.children.map((e) => e.id) } : {},
738
868
  ...e.textContent ? { text: e.textContent } : {}
739
869
  };
740
- if (t.push(r), e.children) for (let r of e.children) I(r, t, n);
870
+ if (t.push(a), e.children) for (let a of e.children) F(a, t, n, r, i);
741
871
  return;
742
872
  }
743
- let i = j(r), a = {
873
+ let o = i(a), s = {
744
874
  id: e.id,
745
- component: r
875
+ component: a
746
876
  };
747
- if (e.children && e.children.length > 0) if ((r === "Image" || r === "Video" || r === "AudioPlayer") && e.children.length === 1 && (e.children[0].tag === "img" || e.children[0].tag === "video" || e.children[0].tag === "audio")) {
877
+ if (e.children && e.children.length > 0) if ((a === "Image" || a === "Video" || a === "AudioPlayer") && e.children.length === 1 && (e.children[0].tag === "img" || e.children[0].tag === "video" || e.children[0].tag === "audio")) {
748
878
  let t = e.children[0];
749
- t.attributes?.src && (a.url = t.attributes.src), t.attributes?.alt && (a.alt = t.attributes.alt), t.attributes?.poster && (a.poster = t.attributes.poster);
750
- } else if (i?.childStrategy === "slot-label" && e.children.length === 1 && e.children[0].attributes?.slot === "label" && e.children[0].textContent) a.text = e.children[0].textContent;
879
+ t.attributes?.src && (s.url = t.attributes.src), t.attributes?.alt && (s.alt = t.attributes.alt), t.attributes?.poster && (s.poster = t.attributes.poster);
880
+ } else if (o?.childStrategy === "slot-label" && e.children.length === 1 && e.children[0].attributes?.slot === "label" && e.children[0].textContent) s.text = e.children[0].textContent;
751
881
  else {
752
- a.children = e.children.map((e) => e.id);
753
- for (let r of e.children) I(r, t, n);
882
+ s.children = e.children.map((e) => e.id);
883
+ for (let a of e.children) F(a, t, n, r, i);
754
884
  }
755
- if (e.textContent && (r === "CheckBox" || r === "Switch" || r === "ListItem" ? a.label = e.textContent : a.text = e.textContent), e.attributes) {
756
- let t = i?.propertyMap ? L(i.propertyMap) : {};
757
- for (let [n, r] of Object.entries(e.attributes)) n === "style" || n === "data-a2ui" || n === "slot" || (t[n] ? a[t[n]] = r : n === "aria-label" ? a.label = r : n === "disabled" && r === "" ? a.disabled = !0 : n === "variant" && (a.variant = (i?.variantMap ? L(i.variantMap) : {})[r] ?? r));
885
+ if (e.textContent && (a === "CheckBox" || a === "Switch" || a === "ListItem" ? s.label = e.textContent : s.text = e.textContent), e.attributes) {
886
+ let t = o?.propertyMap ? I(o.propertyMap) : {};
887
+ for (let [n, r] of Object.entries(e.attributes)) n === "style" || n === "data-a2ui" || n === "slot" || (t[n] ? s[t[n]] = r : n === "aria-label" ? s.label = r : n === "disabled" && r === "" ? s.disabled = !0 : n === "variant" && (s.variant = (o?.variantMap ? I(o.variantMap) : {})[r] ?? r));
758
888
  }
759
889
  if (e.events) for (let [t, n] of Object.entries(e.events)) {
760
890
  let e = n.split(":");
761
- e[0] === "a2ui" && e.length >= 4 && (a.action = { event: { name: e[3] } });
891
+ e[0] === "a2ui" && e.length >= 4 && (s.action = { event: { name: e[3] } });
762
892
  }
763
- t.push(a);
893
+ t.push(s);
764
894
  }
765
- function L(e) {
895
+ function I(e) {
766
896
  let t = {};
767
897
  for (let [n, r] of Object.entries(e)) t[r] = n;
768
898
  return t;
@@ -770,7 +900,7 @@ function L(e) {
770
900
  /**
771
901
  * Wrap a conversion result as a UIPlan.
772
902
  */
773
- function Ee(e, t = "generated") {
903
+ function Ce(e, t = "generated") {
774
904
  return Object.freeze({
775
905
  id: S("a2ui-plan"),
776
906
  version: 1,
@@ -785,18 +915,18 @@ function Ee(e, t = "generated") {
785
915
  * Manages A2UI surface lifecycle: create → updateComponents → updateDataModel → delete.
786
916
  * Each surface maps to one UIPlan in the kernel.
787
917
  */
788
- function R(e, t) {
918
+ function L(e, t) {
789
919
  if (!t || t === "/") return e;
790
- let n = t.replace(/^\//, "").split("/").map(z), r = e;
920
+ let n = t.replace(/^\//, "").split("/").map(R), r = e;
791
921
  for (let e of n) {
792
922
  if (typeof r != "object" || !r) return;
793
923
  r = r[e];
794
924
  }
795
925
  return r;
796
926
  }
797
- function De(e, t, n) {
927
+ function we(e, t, n) {
798
928
  if (!t || t === "/") return;
799
- let r = t.replace(/^\//, "").split("/").map(z), i = e;
929
+ let r = t.replace(/^\//, "").split("/").map(R), i = e;
800
930
  for (let e = 0; e < r.length - 1; e++) {
801
931
  let t = r[e];
802
932
  (i[t] == null || typeof i[t] != "object") && (i[t] = {}), i = i[t];
@@ -804,24 +934,25 @@ function De(e, t, n) {
804
934
  let a = r[r.length - 1];
805
935
  n === void 0 ? delete i[a] : i[a] = n;
806
936
  }
807
- function z(e) {
937
+ function R(e) {
808
938
  return e.replace(/~1/g, "/").replace(/~0/g, "~");
809
939
  }
810
- var Oe = class {
940
+ var Te = class {
811
941
  #e;
812
942
  #t;
813
943
  #n;
814
- #r = /* @__PURE__ */ new Map();
815
- #i = x(0);
816
- surfaceCount = _(() => this.#i.value);
817
- constructor(e, t, n) {
818
- this.#e = e, this.#t = t, this.#n = n ?? null;
944
+ #r;
945
+ #i = /* @__PURE__ */ new Map();
946
+ #a = x(0);
947
+ surfaceCount = _(() => this.#a.value);
948
+ constructor(e, t, n, r) {
949
+ this.#e = e, this.#t = t, this.#n = n ?? null, this.#r = r;
819
950
  }
820
951
  handleMessage(e, t) {
821
- le(e) ? this.#a(e, t) : ue(e) ? this.#o(e, t) : de(e) ? this.#l(e) : fe(e) && this.#u(e);
952
+ ce(e) ? this.#o(e, t) : le(e) ? this.#s(e, t) : ue(e) ? this.#u(e) : de(e) && this.#d(e);
822
953
  }
823
- #a(e, t) {
824
- let { surfaceId: n, catalogId: r, theme: i } = e.createSurface, a = this.#r.get(n);
954
+ #o(e, t) {
955
+ let { surfaceId: n, catalogId: r, theme: i } = e.createSurface, a = this.#i.get(n);
825
956
  if (a) {
826
957
  a.catalogId = r, a.theme = i;
827
958
  return;
@@ -839,10 +970,10 @@ var Oe = class {
839
970
  actionDisposer: null,
840
971
  rendered: !1
841
972
  };
842
- this.#r.set(n, o), this.#i.value = this.#r.size;
973
+ this.#i.set(n, o), this.#a.value = this.#i.size;
843
974
  }
844
- #o(e, t) {
845
- let { surfaceId: n, components: r } = e.updateComponents, i = this.#r.get(n);
975
+ #s(e, t) {
976
+ let { surfaceId: n, components: r } = e.updateComponents, i = this.#i.get(n);
846
977
  i ? t && (i.container = t) : (i = {
847
978
  surfaceId: n,
848
979
  planId: S("a2ui-plan"),
@@ -853,20 +984,23 @@ var Oe = class {
853
984
  bindingDisposers: [],
854
985
  actionDisposer: null,
855
986
  rendered: !1
856
- }, this.#r.set(n, i), this.#i.value = this.#r.size), i.rendered ? (this.#c(i, r), i.components = [...r]) : (i.components = [...r], this.#s(i)), i.rendered && this.#n?.(i.surfaceId, i.container);
987
+ }, this.#i.set(n, i), this.#a.value = this.#i.size), i.rendered ? (this.#l(i, r), i.components = [...r]) : (i.components = [...r], this.#c(i)), i.rendered && this.#n?.(i.surfaceId, i.container);
857
988
  }
858
- #s(e) {
859
- let t = P(e.components, { surfaceId: e.surfaceId });
989
+ #c(e) {
990
+ let t = N(e.components, {
991
+ surfaceId: e.surfaceId,
992
+ registry: this.#r
993
+ });
860
994
  e.bindings = new Map(t.bindings);
861
- let n = Ee(t);
995
+ let n = Ce(t);
862
996
  e.planId = n.id;
863
997
  try {
864
998
  let t = this.#e.executePlan(n, e.container);
865
- e.rendered = !0, this.#d(e, t), this.#f(e);
999
+ e.rendered = !0, this.#f(e, t), this.#p(e);
866
1000
  } catch {}
867
1001
  }
868
- #c(e, t) {
869
- let n = Me(e.components, t, e.surfaceId);
1002
+ #l(e, t) {
1003
+ let n = ke(e.components, t, e.surfaceId, this.#r);
870
1004
  if (n.length === 0) return;
871
1005
  this.#e.patchPlan({
872
1006
  planId: e.planId,
@@ -874,45 +1008,48 @@ var Oe = class {
874
1008
  source: "generated",
875
1009
  timestamp: Date.now()
876
1010
  });
877
- let r = P(t, { surfaceId: e.surfaceId });
1011
+ let r = N(t, {
1012
+ surfaceId: e.surfaceId,
1013
+ registry: this.#r
1014
+ });
878
1015
  e.bindings = new Map(r.bindings);
879
1016
  for (let t of e.bindingDisposers) t();
880
1017
  e.bindingDisposers = [];
881
1018
  let i = this.#e.executor.getElements(e.planId);
882
- i && this.#d(e, i);
1019
+ i && this.#f(e, i);
883
1020
  }
884
- #l(e) {
885
- let { surfaceId: t, path: n, value: r } = e.updateDataModel, i = this.#r.get(t);
1021
+ #u(e) {
1022
+ let { surfaceId: t, path: n, value: r } = e.updateDataModel, i = this.#i.get(t);
886
1023
  if (!i) return;
887
1024
  let a = { ...i.dataModel.value };
888
- !n || n === "/" ? i.dataModel.value = r ?? {} : (De(a, n, r), i.dataModel.value = a);
1025
+ !n || n === "/" ? i.dataModel.value = r ?? {} : (we(a, n, r), i.dataModel.value = a);
889
1026
  }
890
- #u(e) {
891
- let { surfaceId: t } = e.deleteSurface, n = this.#r.get(t);
1027
+ #d(e) {
1028
+ let { surfaceId: t } = e.deleteSurface, n = this.#i.get(t);
892
1029
  if (n) {
893
1030
  n.rendered && this.#e.teardownPlan(n.planId);
894
1031
  for (let e of n.bindingDisposers) e();
895
- n.bindingDisposers = [], n.actionDisposer?.(), this.#r.delete(t), this.#i.value = this.#r.size;
1032
+ n.bindingDisposers = [], n.actionDisposer?.(), this.#i.delete(t), this.#a.value = this.#i.size;
896
1033
  }
897
1034
  }
898
- #d(e, t) {
1035
+ #f(e, t) {
899
1036
  for (let [n, r] of e.bindings) {
900
1037
  let i = t.get(n);
901
1038
  if (i) for (let t of r) {
902
1039
  let n = ee(() => {
903
- let n = e.dataModel.value, r = R(n, t.path);
1040
+ let n = e.dataModel.value, r = L(n, t.path);
904
1041
  r !== void 0 && (t.property === "textContent" ? i.textContent = String(r) : t.property === "src" || t.property === "alt" || t.property.startsWith("aria-") ? i.setAttribute(t.property, String(r)) : i[t.property] = r);
905
1042
  });
906
1043
  e.bindingDisposers.push(n);
907
1044
  }
908
1045
  }
909
1046
  }
910
- #f(e) {
1047
+ #p(e) {
911
1048
  let t = `a2ui:${e.surfaceId}:`;
912
1049
  e.actionDisposer = this.#e.bus.on((e) => e.type.startsWith(t), (t) => {
913
1050
  let n = t.type.split(":");
914
1051
  if (n.length < 4) return;
915
- let r = n[2], i = n[3], a = e.components.find((e) => e.id === r)?.action?.event?.context, o = a ? ke(a, e.dataModel.value) : void 0;
1052
+ let r = n[2], i = n[3], a = e.components.find((e) => e.id === r)?.action?.event?.context, o = a ? Ee(a, e.dataModel.value) : void 0;
916
1053
  this.#t({ action: {
917
1054
  surfaceId: e.surfaceId,
918
1055
  sourceComponentId: r,
@@ -923,7 +1060,7 @@ var Oe = class {
923
1060
  });
924
1061
  }
925
1062
  getSurface(e) {
926
- let t = this.#r.get(e);
1063
+ let t = this.#i.get(e);
927
1064
  return t ? {
928
1065
  surfaceId: t.surfaceId,
929
1066
  planId: t.planId,
@@ -934,22 +1071,22 @@ var Oe = class {
934
1071
  } : null;
935
1072
  }
936
1073
  getSurfaceIds() {
937
- return Array.from(this.#r.keys());
1074
+ return Array.from(this.#i.keys());
938
1075
  }
939
1076
  getDataModel(e) {
940
- return this.#r.get(e)?.dataModel.value ?? null;
1077
+ return this.#i.get(e)?.dataModel.value ?? null;
941
1078
  }
942
1079
  destroy() {
943
- for (let e of this.#r.keys()) this.#u({ deleteSurface: { surfaceId: e } });
1080
+ for (let e of this.#i.keys()) this.#d({ deleteSurface: { surfaceId: e } });
944
1081
  }
945
1082
  };
946
- function ke(e, t) {
1083
+ function Ee(e, t) {
947
1084
  let n = {};
948
- for (let [r, i] of Object.entries(e)) typeof i == "object" && i && "path" in i ? n[r] = R(t, i.path) : n[r] = i;
1085
+ for (let [r, i] of Object.entries(e)) typeof i == "object" && i && "path" in i ? n[r] = L(t, i.path) : n[r] = i;
949
1086
  return n;
950
1087
  }
951
1088
  /** A2UI properties that map to HTML attributes on the rendered element. */
952
- var Ae = [
1089
+ var De = [
953
1090
  "variant",
954
1091
  "placeholder",
955
1092
  "name",
@@ -962,92 +1099,95 @@ var Ae = [
962
1099
  "fit",
963
1100
  "style",
964
1101
  "intent"
965
- ], je = ["value"];
966
- function Me(e, t, n) {
967
- let r = /* @__PURE__ */ new Map();
968
- for (let t of e) r.set(t.id, t);
1102
+ ], Oe = ["value"];
1103
+ function ke(e, t, n, r) {
969
1104
  let i = /* @__PURE__ */ new Map();
970
- for (let e of t) i.set(e.id, e);
971
- let a = [];
972
- for (let [e] of r) i.has(e) || a.push({
1105
+ for (let t of e) i.set(t.id, t);
1106
+ let a = /* @__PURE__ */ new Map();
1107
+ for (let e of t) a.set(e.id, e);
1108
+ let o = [];
1109
+ for (let [e] of i) a.has(e) || o.push({
973
1110
  type: "remove",
974
1111
  targetId: e
975
1112
  });
976
- for (let [e, o] of i) if (!r.has(e)) {
977
- let r = Ne(e, t);
978
- if (r) {
979
- let t = P([o], {
1113
+ for (let [e, s] of a) if (!i.has(e)) {
1114
+ let i = Ae(e, t);
1115
+ if (i) {
1116
+ let t = N([s], {
980
1117
  surfaceId: n,
981
- rootId: e
1118
+ rootId: e,
1119
+ registry: r
982
1120
  });
983
- a.push({
1121
+ o.push({
984
1122
  type: "add",
985
- parentId: r,
1123
+ parentId: i,
986
1124
  node: t.root
987
1125
  });
988
1126
  }
989
1127
  }
990
- for (let [e, o] of i) {
991
- let i = r.get(e);
992
- if (i) {
993
- if (o.component !== i.component) {
994
- let r = P(B(e, t), {
1128
+ for (let [e, s] of a) {
1129
+ let a = i.get(e);
1130
+ if (a) {
1131
+ if (s.component !== a.component) {
1132
+ let i = N(z(e, t), {
995
1133
  surfaceId: n,
996
- rootId: e
1134
+ rootId: e,
1135
+ registry: r
997
1136
  });
998
- a.push({
1137
+ o.push({
999
1138
  type: "replace",
1000
1139
  targetId: e,
1001
- node: r.root
1140
+ node: i.root
1002
1141
  });
1003
1142
  continue;
1004
1143
  }
1005
- if (JSON.stringify(i.children ?? i.child ?? []) !== JSON.stringify(o.children ?? o.child ?? [])) {
1006
- let r = P(B(e, t), {
1144
+ if (JSON.stringify(a.children ?? a.child ?? []) !== JSON.stringify(s.children ?? s.child ?? [])) {
1145
+ let i = N(z(e, t), {
1007
1146
  surfaceId: n,
1008
- rootId: e
1147
+ rootId: e,
1148
+ registry: r
1009
1149
  });
1010
- a.push({
1150
+ o.push({
1011
1151
  type: "replace",
1012
1152
  targetId: e,
1013
- node: r.root
1153
+ node: i.root
1014
1154
  });
1015
1155
  continue;
1016
1156
  }
1017
- o.text !== i.text && typeof o.text == "string" && a.push({
1157
+ s.text !== a.text && typeof s.text == "string" && o.push({
1018
1158
  type: "set-text",
1019
1159
  targetId: e,
1020
- text: o.text
1021
- }), o.label !== i.label && typeof o.label == "string" && a.push({
1160
+ text: s.text
1161
+ }), s.label !== a.label && typeof s.label == "string" && o.push({
1022
1162
  type: "set-text",
1023
1163
  targetId: e,
1024
- text: o.label
1025
- }), o.disabled !== i.disabled && (o.disabled ? a.push({
1164
+ text: s.label
1165
+ }), s.disabled !== a.disabled && (s.disabled ? o.push({
1026
1166
  type: "set-attribute",
1027
1167
  targetId: e,
1028
1168
  name: "disabled",
1029
1169
  value: ""
1030
- }) : a.push({
1170
+ }) : o.push({
1031
1171
  type: "remove-attribute",
1032
1172
  targetId: e,
1033
1173
  name: "disabled"
1034
1174
  }));
1035
- for (let t of Ae) {
1036
- let n = i[t], r = o[t];
1037
- r !== n && (r == null || r === !1 ? a.push({
1175
+ for (let t of De) {
1176
+ let n = a[t], r = s[t];
1177
+ r !== n && (r == null || r === !1 ? o.push({
1038
1178
  type: "remove-attribute",
1039
1179
  targetId: e,
1040
1180
  name: t
1041
- }) : a.push({
1181
+ }) : o.push({
1042
1182
  type: "set-attribute",
1043
1183
  targetId: e,
1044
1184
  name: t,
1045
1185
  value: String(r)
1046
1186
  }));
1047
1187
  }
1048
- for (let t of je) {
1049
- let n = i[t], r = o[t];
1050
- r !== n && r !== void 0 && a.push({
1188
+ for (let t of Oe) {
1189
+ let n = a[t], r = s[t];
1190
+ r !== n && r !== void 0 && o.push({
1051
1191
  type: "set-property",
1052
1192
  targetId: e,
1053
1193
  name: t,
@@ -1056,13 +1196,13 @@ function Me(e, t, n) {
1056
1196
  }
1057
1197
  }
1058
1198
  }
1059
- return a;
1199
+ return o;
1060
1200
  }
1061
- function Ne(e, t) {
1201
+ function Ae(e, t) {
1062
1202
  for (let n of t) if (n.children?.includes(e) || n.child === e) return n.id;
1063
1203
  return null;
1064
1204
  }
1065
- function B(e, t) {
1205
+ function z(e, t) {
1066
1206
  let n = /* @__PURE__ */ new Map();
1067
1207
  for (let e of t) n.set(e.id, e);
1068
1208
  let r = [], i = /* @__PURE__ */ new Set();
@@ -1077,15 +1217,15 @@ function B(e, t) {
1077
1217
  }
1078
1218
  return a(e), r;
1079
1219
  }
1080
- var Pe = class {
1220
+ var je = class {
1081
1221
  #e;
1082
1222
  #t;
1083
1223
  constructor(e, t) {
1084
- this.#t = t ?? {}, this.#e = new Oe(e, (e) => {
1224
+ this.#t = t ?? {}, this.#e = new Te(e, (e) => {
1085
1225
  this.#t.onClientMessage?.(e);
1086
1226
  }, (e, t) => {
1087
1227
  this.#t.onRender?.(e, t);
1088
- });
1228
+ }, this.#t.registry);
1089
1229
  }
1090
1230
  /**
1091
1231
  * Process a raw A2UI server message.
@@ -1093,7 +1233,7 @@ var Pe = class {
1093
1233
  * If a container is provided, it is used as the render target for new surfaces.
1094
1234
  */
1095
1235
  receive(e, t) {
1096
- let n = typeof e == "string" ? me(e) : e;
1236
+ let n = typeof e == "string" ? pe(e) : e;
1097
1237
  if (!n) {
1098
1238
  this.#t.onClientMessage?.({ error: {
1099
1239
  surfaceId: "",
@@ -1102,26 +1242,26 @@ var Pe = class {
1102
1242
  } });
1103
1243
  return;
1104
1244
  }
1105
- if (pe(n)) {
1245
+ if (fe(n)) {
1106
1246
  this.#n(n.requestCatalog.surfaceId);
1107
1247
  return;
1108
1248
  }
1109
1249
  this.#e.handleMessage(n, t);
1110
1250
  }
1111
1251
  #n(e) {
1112
- let t = { catalog: {
1252
+ let t = this.#t.registry?.getSupportedTypes() ?? M(), n = { catalog: {
1113
1253
  ...e ? { surfaceId: e } : {},
1114
- supportedTypes: [...M()],
1254
+ supportedTypes: [...t],
1115
1255
  version: this.#t.version ?? "0.9"
1116
1256
  } };
1117
- this.#t.onClientMessage?.(t);
1257
+ this.#t.onClientMessage?.(n);
1118
1258
  }
1119
1259
  /**
1120
1260
  * Parse a JSON string into a typed A2UI server message.
1121
1261
  * Returns null if invalid.
1122
1262
  */
1123
1263
  parse(e) {
1124
- return me(e);
1264
+ return pe(e);
1125
1265
  }
1126
1266
  /**
1127
1267
  * Convert a UIPlan to A2UI updateComponents format.
@@ -1129,11 +1269,12 @@ var Pe = class {
1129
1269
  emit(e, t) {
1130
1270
  let n = t ?? e.id, r = {
1131
1271
  surfaceId: n,
1132
- version: this.#t.version
1272
+ version: this.#t.version,
1273
+ registry: this.#t.registry
1133
1274
  };
1134
1275
  return { updateComponents: {
1135
1276
  surfaceId: n,
1136
- components: Te(e.root, r)
1277
+ components: Se(e.root, r)
1137
1278
  } };
1138
1279
  }
1139
1280
  /**
@@ -1155,16 +1296,16 @@ var Pe = class {
1155
1296
  * Returns the list of A2UI component types supported by this adapter.
1156
1297
  */
1157
1298
  getSupportedTypes() {
1158
- return M();
1299
+ return this.#t.registry?.getSupportedTypes() ?? M();
1159
1300
  }
1160
1301
  destroy() {
1161
1302
  this.#e.destroy();
1162
1303
  }
1163
1304
  };
1164
- function Fe(e, t) {
1165
- return new Pe(e, t);
1305
+ function Me(e, t) {
1306
+ return new je(e, t);
1166
1307
  }
1167
- const Ie = [
1308
+ const Ne = [
1168
1309
  {
1169
1310
  id: "general",
1170
1311
  label: "General"
@@ -1182,7 +1323,7 @@ const Ie = [
1182
1323
  label: "Travel",
1183
1324
  hidden: !0
1184
1325
  }
1185
- ], V = {
1326
+ ], B = {
1186
1327
  hello: {
1187
1328
  label: "Hello World",
1188
1329
  group: "general",
@@ -1310,24 +1451,33 @@ const Ie = [
1310
1451
  {
1311
1452
  id: "root",
1312
1453
  component: "Card",
1313
- child: "card-content"
1314
- },
1315
- {
1316
- id: "card-content",
1317
- component: "Column",
1318
1454
  children: [
1319
- "product-name",
1320
- "product-desc",
1321
- "product-price",
1322
- "product-actions"
1455
+ "card-hdr",
1456
+ "card-body",
1457
+ "card-ftr"
1323
1458
  ]
1324
1459
  },
1460
+ {
1461
+ id: "card-hdr",
1462
+ component: "Header",
1463
+ children: ["product-name"]
1464
+ },
1325
1465
  {
1326
1466
  id: "product-name",
1327
1467
  component: "Text",
1328
1468
  text: "Premium Widget",
1329
1469
  variant: "h3"
1330
1470
  },
1471
+ {
1472
+ id: "card-body",
1473
+ component: "Body",
1474
+ child: "card-content"
1475
+ },
1476
+ {
1477
+ id: "card-content",
1478
+ component: "Column",
1479
+ children: ["product-desc", "product-price"]
1480
+ },
1331
1481
  {
1332
1482
  id: "product-desc",
1333
1483
  component: "Text",
@@ -1339,6 +1489,11 @@ const Ie = [
1339
1489
  text: "$49.99",
1340
1490
  variant: "h4"
1341
1491
  },
1492
+ {
1493
+ id: "card-ftr",
1494
+ component: "Footer",
1495
+ children: ["product-actions"]
1496
+ },
1342
1497
  {
1343
1498
  id: "product-actions",
1344
1499
  component: "Row",
@@ -1952,24 +2107,33 @@ const Ie = [
1952
2107
  {
1953
2108
  id: "preview-card",
1954
2109
  component: "Card",
2110
+ children: ["preview-hdr", "preview-body"]
2111
+ },
2112
+ {
2113
+ id: "preview-hdr",
2114
+ component: "Header",
2115
+ children: ["preview-heading"]
2116
+ },
2117
+ {
2118
+ id: "preview-heading",
2119
+ component: "Text",
2120
+ text: "Preview",
2121
+ variant: "h3"
2122
+ },
2123
+ {
2124
+ id: "preview-body",
2125
+ component: "Body",
1955
2126
  child: "preview-col"
1956
2127
  },
1957
2128
  {
1958
2129
  id: "preview-col",
1959
2130
  component: "Column",
1960
2131
  children: [
1961
- "preview-heading",
1962
2132
  "preview-name",
1963
2133
  "preview-role",
1964
2134
  "preview-bio"
1965
2135
  ]
1966
2136
  },
1967
- {
1968
- id: "preview-heading",
1969
- component: "Text",
1970
- text: "Preview",
1971
- variant: "h3"
1972
- },
1973
2137
  {
1974
2138
  id: "preview-name",
1975
2139
  component: "Text",
@@ -2172,21 +2336,17 @@ const Ie = [
2172
2336
  {
2173
2337
  id: "root",
2174
2338
  component: "Card",
2175
- child: "card-col"
2176
- },
2177
- {
2178
- id: "card-col",
2179
- component: "Column",
2180
2339
  children: [
2181
- "icon-row",
2182
- "title",
2183
- "desc",
2184
- "item-name",
2185
- "warning",
2186
- "confirm-field",
2187
- "actions"
2340
+ "card-hdr",
2341
+ "card-body",
2342
+ "card-ftr"
2188
2343
  ]
2189
2344
  },
2345
+ {
2346
+ id: "card-hdr",
2347
+ component: "Header",
2348
+ children: ["icon-row", "title"]
2349
+ },
2190
2350
  {
2191
2351
  id: "icon-row",
2192
2352
  component: "Row",
@@ -2203,6 +2363,21 @@ const Ie = [
2203
2363
  text: "Delete Project?",
2204
2364
  variant: "h2"
2205
2365
  },
2366
+ {
2367
+ id: "card-body",
2368
+ component: "Body",
2369
+ child: "card-col"
2370
+ },
2371
+ {
2372
+ id: "card-col",
2373
+ component: "Column",
2374
+ children: [
2375
+ "desc",
2376
+ "item-name",
2377
+ "warning",
2378
+ "confirm-field"
2379
+ ]
2380
+ },
2206
2381
  {
2207
2382
  id: "desc",
2208
2383
  component: "Text",
@@ -2235,6 +2410,11 @@ const Ie = [
2235
2410
  component: "TextField",
2236
2411
  placeholder: "acme-frontend"
2237
2412
  },
2413
+ {
2414
+ id: "card-ftr",
2415
+ component: "Footer",
2416
+ children: ["actions"]
2417
+ },
2238
2418
  {
2239
2419
  id: "actions",
2240
2420
  component: "Row",
@@ -2496,13 +2676,28 @@ const Ie = [
2496
2676
  {
2497
2677
  id: "cbc-card",
2498
2678
  component: "Card",
2679
+ children: ["cbc-hdr", "cbc-body"]
2680
+ },
2681
+ {
2682
+ id: "cbc-hdr",
2683
+ component: "Header",
2684
+ children: ["cbc-title"]
2685
+ },
2686
+ {
2687
+ id: "cbc-title",
2688
+ component: "Text",
2689
+ text: "Complete Blood Count (CBC)",
2690
+ variant: "h3"
2691
+ },
2692
+ {
2693
+ id: "cbc-body",
2694
+ component: "Body",
2499
2695
  child: "cbc-col"
2500
2696
  },
2501
2697
  {
2502
2698
  id: "cbc-col",
2503
2699
  component: "Column",
2504
2700
  children: [
2505
- "cbc-title",
2506
2701
  "cbc-wbc",
2507
2702
  "cbc-rbc",
2508
2703
  "cbc-hgb",
@@ -2510,12 +2705,6 @@ const Ie = [
2510
2705
  "cbc-plt"
2511
2706
  ]
2512
2707
  },
2513
- {
2514
- id: "cbc-title",
2515
- component: "Text",
2516
- text: "Complete Blood Count (CBC)",
2517
- variant: "h3"
2518
- },
2519
2708
  {
2520
2709
  id: "cbc-wbc",
2521
2710
  component: "Row",
@@ -2644,13 +2833,28 @@ const Ie = [
2644
2833
  {
2645
2834
  id: "metabolic-card",
2646
2835
  component: "Card",
2836
+ children: ["metabolic-hdr", "metabolic-body"]
2837
+ },
2838
+ {
2839
+ id: "metabolic-hdr",
2840
+ component: "Header",
2841
+ children: ["metabolic-title"]
2842
+ },
2843
+ {
2844
+ id: "metabolic-title",
2845
+ component: "Text",
2846
+ text: "Basic Metabolic Panel (BMP)",
2847
+ variant: "h3"
2848
+ },
2849
+ {
2850
+ id: "metabolic-body",
2851
+ component: "Body",
2647
2852
  child: "metabolic-col"
2648
2853
  },
2649
2854
  {
2650
2855
  id: "metabolic-col",
2651
2856
  component: "Column",
2652
2857
  children: [
2653
- "metabolic-title",
2654
2858
  "met-glucose",
2655
2859
  "met-bun",
2656
2860
  "met-creat",
@@ -2659,12 +2863,6 @@ const Ie = [
2659
2863
  "met-k"
2660
2864
  ]
2661
2865
  },
2662
- {
2663
- id: "metabolic-title",
2664
- component: "Text",
2665
- text: "Basic Metabolic Panel (BMP)",
2666
- variant: "h3"
2667
- },
2668
2866
  {
2669
2867
  id: "met-glucose",
2670
2868
  component: "Row",
@@ -2818,13 +3016,28 @@ const Ie = [
2818
3016
  {
2819
3017
  id: "lipid-card",
2820
3018
  component: "Card",
3019
+ children: ["lipid-hdr", "lipid-body"]
3020
+ },
3021
+ {
3022
+ id: "lipid-hdr",
3023
+ component: "Header",
3024
+ children: ["lipid-title"]
3025
+ },
3026
+ {
3027
+ id: "lipid-title",
3028
+ component: "Text",
3029
+ text: "Lipid Panel",
3030
+ variant: "h3"
3031
+ },
3032
+ {
3033
+ id: "lipid-body",
3034
+ component: "Body",
2821
3035
  child: "lipid-col"
2822
3036
  },
2823
3037
  {
2824
3038
  id: "lipid-col",
2825
3039
  component: "Column",
2826
3040
  children: [
2827
- "lipid-title",
2828
3041
  "lip-tc",
2829
3042
  "lip-ldl",
2830
3043
  "lip-hdl",
@@ -2832,12 +3045,6 @@ const Ie = [
2832
3045
  "lipid-note"
2833
3046
  ]
2834
3047
  },
2835
- {
2836
- id: "lipid-title",
2837
- component: "Text",
2838
- text: "Lipid Panel",
2839
- variant: "h3"
2840
- },
2841
3048
  {
2842
3049
  id: "lip-tc",
2843
3050
  component: "Row",
@@ -3054,16 +3261,12 @@ const Ie = [
3054
3261
  {
3055
3262
  id: "vital-hr",
3056
3263
  component: "Card",
3057
- child: "hr-col"
3264
+ children: ["hr-hdr", "hr-body"]
3058
3265
  },
3059
3266
  {
3060
- id: "hr-col",
3061
- component: "Column",
3062
- children: [
3063
- "hr-label",
3064
- "hr-val",
3065
- "hr-unit"
3066
- ]
3267
+ id: "hr-hdr",
3268
+ component: "Header",
3269
+ children: ["hr-label"]
3067
3270
  },
3068
3271
  {
3069
3272
  id: "hr-label",
@@ -3071,6 +3274,16 @@ const Ie = [
3071
3274
  text: "Heart Rate",
3072
3275
  variant: "caption"
3073
3276
  },
3277
+ {
3278
+ id: "hr-body",
3279
+ component: "Body",
3280
+ child: "hr-col"
3281
+ },
3282
+ {
3283
+ id: "hr-col",
3284
+ component: "Column",
3285
+ children: ["hr-val", "hr-unit"]
3286
+ },
3074
3287
  {
3075
3288
  id: "hr-val",
3076
3289
  component: "Text",
@@ -3086,16 +3299,12 @@ const Ie = [
3086
3299
  {
3087
3300
  id: "vital-bp",
3088
3301
  component: "Card",
3089
- child: "bp-col"
3302
+ children: ["bp-hdr", "bp-body"]
3090
3303
  },
3091
3304
  {
3092
- id: "bp-col",
3093
- component: "Column",
3094
- children: [
3095
- "bp-label",
3096
- "bp-val",
3097
- "bp-unit"
3098
- ]
3305
+ id: "bp-hdr",
3306
+ component: "Header",
3307
+ children: ["bp-label"]
3099
3308
  },
3100
3309
  {
3101
3310
  id: "bp-label",
@@ -3103,6 +3312,16 @@ const Ie = [
3103
3312
  text: "Blood Pressure",
3104
3313
  variant: "caption"
3105
3314
  },
3315
+ {
3316
+ id: "bp-body",
3317
+ component: "Body",
3318
+ child: "bp-col"
3319
+ },
3320
+ {
3321
+ id: "bp-col",
3322
+ component: "Column",
3323
+ children: ["bp-val", "bp-unit"]
3324
+ },
3106
3325
  {
3107
3326
  id: "bp-val",
3108
3327
  component: "Text",
@@ -3118,16 +3337,12 @@ const Ie = [
3118
3337
  {
3119
3338
  id: "vital-spo2",
3120
3339
  component: "Card",
3121
- child: "spo2-col"
3340
+ children: ["spo2-hdr", "spo2-body"]
3122
3341
  },
3123
3342
  {
3124
- id: "spo2-col",
3125
- component: "Column",
3126
- children: [
3127
- "spo2-label",
3128
- "spo2-val",
3129
- "spo2-unit"
3130
- ]
3343
+ id: "spo2-hdr",
3344
+ component: "Header",
3345
+ children: ["spo2-label"]
3131
3346
  },
3132
3347
  {
3133
3348
  id: "spo2-label",
@@ -3135,6 +3350,16 @@ const Ie = [
3135
3350
  text: "SpO₂",
3136
3351
  variant: "caption"
3137
3352
  },
3353
+ {
3354
+ id: "spo2-body",
3355
+ component: "Body",
3356
+ child: "spo2-col"
3357
+ },
3358
+ {
3359
+ id: "spo2-col",
3360
+ component: "Column",
3361
+ children: ["spo2-val", "spo2-unit"]
3362
+ },
3138
3363
  {
3139
3364
  id: "spo2-val",
3140
3365
  component: "Text",
@@ -3150,16 +3375,12 @@ const Ie = [
3150
3375
  {
3151
3376
  id: "vital-temp",
3152
3377
  component: "Card",
3153
- child: "temp-col"
3378
+ children: ["temp-hdr", "temp-body"]
3154
3379
  },
3155
3380
  {
3156
- id: "temp-col",
3157
- component: "Column",
3158
- children: [
3159
- "temp-label",
3160
- "temp-val",
3161
- "temp-unit"
3162
- ]
3381
+ id: "temp-hdr",
3382
+ component: "Header",
3383
+ children: ["temp-label"]
3163
3384
  },
3164
3385
  {
3165
3386
  id: "temp-label",
@@ -3167,6 +3388,16 @@ const Ie = [
3167
3388
  text: "Temperature",
3168
3389
  variant: "caption"
3169
3390
  },
3391
+ {
3392
+ id: "temp-body",
3393
+ component: "Body",
3394
+ child: "temp-col"
3395
+ },
3396
+ {
3397
+ id: "temp-col",
3398
+ component: "Column",
3399
+ children: ["temp-val", "temp-unit"]
3400
+ },
3170
3401
  {
3171
3402
  id: "temp-val",
3172
3403
  component: "Text",
@@ -3182,16 +3413,12 @@ const Ie = [
3182
3413
  {
3183
3414
  id: "vital-rr",
3184
3415
  component: "Card",
3185
- child: "rr-col"
3416
+ children: ["rr-hdr", "rr-body"]
3186
3417
  },
3187
3418
  {
3188
- id: "rr-col",
3189
- component: "Column",
3190
- children: [
3191
- "rr-label",
3192
- "rr-val",
3193
- "rr-unit"
3194
- ]
3419
+ id: "rr-hdr",
3420
+ component: "Header",
3421
+ children: ["rr-label"]
3195
3422
  },
3196
3423
  {
3197
3424
  id: "rr-label",
@@ -3199,6 +3426,16 @@ const Ie = [
3199
3426
  text: "Resp Rate",
3200
3427
  variant: "caption"
3201
3428
  },
3429
+ {
3430
+ id: "rr-body",
3431
+ component: "Body",
3432
+ child: "rr-col"
3433
+ },
3434
+ {
3435
+ id: "rr-col",
3436
+ component: "Column",
3437
+ children: ["rr-val", "rr-unit"]
3438
+ },
3202
3439
  {
3203
3440
  id: "rr-val",
3204
3441
  component: "Text",
@@ -3218,24 +3455,33 @@ const Ie = [
3218
3455
  {
3219
3456
  id: "trend-card",
3220
3457
  component: "Card",
3458
+ children: ["trend-hdr", "trend-body"]
3459
+ },
3460
+ {
3461
+ id: "trend-hdr",
3462
+ component: "Header",
3463
+ children: ["trend-title"]
3464
+ },
3465
+ {
3466
+ id: "trend-title",
3467
+ component: "Text",
3468
+ text: "24h Trends",
3469
+ variant: "h3"
3470
+ },
3471
+ {
3472
+ id: "trend-body",
3473
+ component: "Body",
3221
3474
  child: "trend-col"
3222
3475
  },
3223
3476
  {
3224
3477
  id: "trend-col",
3225
3478
  component: "Column",
3226
3479
  children: [
3227
- "trend-title",
3228
3480
  "trend-bp",
3229
3481
  "trend-hr",
3230
3482
  "trend-spo2"
3231
3483
  ]
3232
3484
  },
3233
- {
3234
- id: "trend-title",
3235
- component: "Text",
3236
- text: "24h Trends",
3237
- variant: "h3"
3238
- },
3239
3485
  {
3240
3486
  id: "trend-bp",
3241
3487
  component: "Text",
@@ -3258,16 +3504,12 @@ const Ie = [
3258
3504
  {
3259
3505
  id: "alert-card",
3260
3506
  component: "Card",
3261
- child: "alert-col"
3507
+ children: ["alert-hdr", "alert-body"]
3262
3508
  },
3263
3509
  {
3264
- id: "alert-col",
3265
- component: "Column",
3266
- children: [
3267
- "alert-title",
3268
- "alert-1",
3269
- "alert-2"
3270
- ]
3510
+ id: "alert-hdr",
3511
+ component: "Header",
3512
+ children: ["alert-title"]
3271
3513
  },
3272
3514
  {
3273
3515
  id: "alert-title",
@@ -3275,6 +3517,16 @@ const Ie = [
3275
3517
  text: "Active Alerts",
3276
3518
  variant: "h3"
3277
3519
  },
3520
+ {
3521
+ id: "alert-body",
3522
+ component: "Body",
3523
+ child: "alert-col"
3524
+ },
3525
+ {
3526
+ id: "alert-col",
3527
+ component: "Column",
3528
+ children: ["alert-1", "alert-2"]
3529
+ },
3278
3530
  {
3279
3531
  id: "alert-1",
3280
3532
  component: "Row",
@@ -3391,13 +3643,28 @@ const Ie = [
3391
3643
  {
3392
3644
  id: "active-card",
3393
3645
  component: "Card",
3646
+ children: ["active-hdr", "active-body"]
3647
+ },
3648
+ {
3649
+ id: "active-hdr",
3650
+ component: "Header",
3651
+ children: ["active-title"]
3652
+ },
3653
+ {
3654
+ id: "active-title",
3655
+ component: "Text",
3656
+ text: "Active Medications",
3657
+ variant: "h3"
3658
+ },
3659
+ {
3660
+ id: "active-body",
3661
+ component: "Body",
3394
3662
  child: "active-col"
3395
3663
  },
3396
3664
  {
3397
3665
  id: "active-col",
3398
3666
  component: "Column",
3399
3667
  children: [
3400
- "active-title",
3401
3668
  "med-1",
3402
3669
  "med-2",
3403
3670
  "med-3",
@@ -3405,12 +3672,6 @@ const Ie = [
3405
3672
  "med-5"
3406
3673
  ]
3407
3674
  },
3408
- {
3409
- id: "active-title",
3410
- component: "Text",
3411
- text: "Active Medications",
3412
- variant: "h3"
3413
- },
3414
3675
  {
3415
3676
  id: "med-1",
3416
3677
  component: "Row",
@@ -3548,16 +3809,12 @@ const Ie = [
3548
3809
  {
3549
3810
  id: "discontinued-card",
3550
3811
  component: "Card",
3551
- child: "disc-col"
3812
+ children: ["disc-hdr", "disc-body"]
3552
3813
  },
3553
3814
  {
3554
- id: "disc-col",
3555
- component: "Column",
3556
- children: [
3557
- "disc-title",
3558
- "disc-1",
3559
- "disc-2"
3560
- ]
3815
+ id: "disc-hdr",
3816
+ component: "Header",
3817
+ children: ["disc-title"]
3561
3818
  },
3562
3819
  {
3563
3820
  id: "disc-title",
@@ -3565,6 +3822,16 @@ const Ie = [
3565
3822
  text: "Recently Discontinued",
3566
3823
  variant: "h3"
3567
3824
  },
3825
+ {
3826
+ id: "disc-body",
3827
+ component: "Body",
3828
+ child: "disc-col"
3829
+ },
3830
+ {
3831
+ id: "disc-col",
3832
+ component: "Column",
3833
+ children: ["disc-1", "disc-2"]
3834
+ },
3568
3835
  {
3569
3836
  id: "disc-1",
3570
3837
  component: "Row",
@@ -3604,12 +3871,12 @@ const Ie = [
3604
3871
  {
3605
3872
  id: "interaction-card",
3606
3873
  component: "Card",
3607
- child: "int-col"
3874
+ children: ["interaction-hdr", "interaction-body"]
3608
3875
  },
3609
3876
  {
3610
- id: "int-col",
3611
- component: "Column",
3612
- children: ["int-title", "int-1"]
3877
+ id: "interaction-hdr",
3878
+ component: "Header",
3879
+ children: ["int-title"]
3613
3880
  },
3614
3881
  {
3615
3882
  id: "int-title",
@@ -3617,6 +3884,16 @@ const Ie = [
3617
3884
  text: "Drug Interactions",
3618
3885
  variant: "h3"
3619
3886
  },
3887
+ {
3888
+ id: "interaction-body",
3889
+ component: "Body",
3890
+ child: "int-col"
3891
+ },
3892
+ {
3893
+ id: "int-col",
3894
+ component: "Column",
3895
+ children: ["int-1"]
3896
+ },
3620
3897
  {
3621
3898
  id: "int-1",
3622
3899
  component: "Row",
@@ -3717,24 +3994,33 @@ const Ie = [
3717
3994
  {
3718
3995
  id: "patient-card",
3719
3996
  component: "Card",
3997
+ children: ["patient-hdr", "patient-body"]
3998
+ },
3999
+ {
4000
+ id: "patient-hdr",
4001
+ component: "Header",
4002
+ children: ["patient-title"]
4003
+ },
4004
+ {
4005
+ id: "patient-title",
4006
+ component: "Text",
4007
+ text: "Patient Information",
4008
+ variant: "h3"
4009
+ },
4010
+ {
4011
+ id: "patient-body",
4012
+ component: "Body",
3720
4013
  child: "patient-col"
3721
4014
  },
3722
4015
  {
3723
4016
  id: "patient-col",
3724
4017
  component: "Column",
3725
4018
  children: [
3726
- "patient-title",
3727
4019
  "patient-name-row",
3728
4020
  "patient-dob-row",
3729
4021
  "patient-insurance"
3730
4022
  ]
3731
4023
  },
3732
- {
3733
- id: "patient-title",
3734
- component: "Text",
3735
- text: "Patient Information",
3736
- variant: "h3"
3737
- },
3738
4024
  {
3739
4025
  id: "patient-name-row",
3740
4026
  component: "Row",
@@ -3783,24 +4069,33 @@ const Ie = [
3783
4069
  {
3784
4070
  id: "refer-card",
3785
4071
  component: "Card",
4072
+ children: ["refer-hdr", "refer-body"]
4073
+ },
4074
+ {
4075
+ id: "refer-hdr",
4076
+ component: "Header",
4077
+ children: ["refer-title"]
4078
+ },
4079
+ {
4080
+ id: "refer-title",
4081
+ component: "Text",
4082
+ text: "Referral Details",
4083
+ variant: "h3"
4084
+ },
4085
+ {
4086
+ id: "refer-body",
4087
+ component: "Body",
3786
4088
  child: "refer-col"
3787
4089
  },
3788
4090
  {
3789
4091
  id: "refer-col",
3790
4092
  component: "Column",
3791
4093
  children: [
3792
- "refer-title",
3793
4094
  "refer-specialty",
3794
4095
  "refer-provider",
3795
4096
  "refer-reason"
3796
4097
  ]
3797
4098
  },
3798
- {
3799
- id: "refer-title",
3800
- component: "Text",
3801
- text: "Referral Details",
3802
- variant: "h3"
3803
- },
3804
4099
  {
3805
4100
  id: "refer-specialty",
3806
4101
  component: "TextField",
@@ -3822,24 +4117,33 @@ const Ie = [
3822
4117
  {
3823
4118
  id: "clinical-card",
3824
4119
  component: "Card",
4120
+ children: ["clinical-hdr", "clinical-body"]
4121
+ },
4122
+ {
4123
+ id: "clinical-hdr",
4124
+ component: "Header",
4125
+ children: ["clinical-title"]
4126
+ },
4127
+ {
4128
+ id: "clinical-title",
4129
+ component: "Text",
4130
+ text: "Clinical Information",
4131
+ variant: "h3"
4132
+ },
4133
+ {
4134
+ id: "clinical-body",
4135
+ component: "Body",
3825
4136
  child: "clinical-col"
3826
4137
  },
3827
4138
  {
3828
4139
  id: "clinical-col",
3829
4140
  component: "Column",
3830
4141
  children: [
3831
- "clinical-title",
3832
4142
  "clinical-dx",
3833
4143
  "clinical-icd",
3834
4144
  "clinical-notes"
3835
4145
  ]
3836
4146
  },
3837
- {
3838
- id: "clinical-title",
3839
- component: "Text",
3840
- text: "Clinical Information",
3841
- variant: "h3"
3842
- },
3843
4147
  {
3844
4148
  id: "clinical-dx",
3845
4149
  component: "TextField",
@@ -3948,16 +4252,12 @@ const Ie = [
3948
4252
  {
3949
4253
  id: "results-card",
3950
4254
  component: "Card",
3951
- child: "results-col"
4255
+ children: ["results-hdr", "results-body"]
3952
4256
  },
3953
4257
  {
3954
- id: "results-col",
3955
- component: "Column",
3956
- children: [
3957
- "results-title",
3958
- "results-count",
3959
- "result-list"
3960
- ]
4258
+ id: "results-hdr",
4259
+ component: "Header",
4260
+ children: ["results-title"]
3961
4261
  },
3962
4262
  {
3963
4263
  id: "results-title",
@@ -3965,6 +4265,16 @@ const Ie = [
3965
4265
  text: "Results for \"type 2 diabetes\"",
3966
4266
  variant: "h3"
3967
4267
  },
4268
+ {
4269
+ id: "results-body",
4270
+ component: "Body",
4271
+ child: "results-col"
4272
+ },
4273
+ {
4274
+ id: "results-col",
4275
+ component: "Column",
4276
+ children: ["results-count", "result-list"]
4277
+ },
3968
4278
  {
3969
4279
  id: "results-count",
3970
4280
  component: "Badge",
@@ -4018,27 +4328,39 @@ const Ie = [
4018
4328
  {
4019
4329
  id: "detail-card",
4020
4330
  component: "Card",
4331
+ children: [
4332
+ "detail-hdr",
4333
+ "detail-body",
4334
+ "detail-ftr"
4335
+ ]
4336
+ },
4337
+ {
4338
+ id: "detail-hdr",
4339
+ component: "Header",
4340
+ children: ["detail-title"]
4341
+ },
4342
+ {
4343
+ id: "detail-title",
4344
+ component: "Text",
4345
+ text: "Code Detail",
4346
+ variant: "h3"
4347
+ },
4348
+ {
4349
+ id: "detail-body",
4350
+ component: "Body",
4021
4351
  child: "detail-col"
4022
4352
  },
4023
4353
  {
4024
4354
  id: "detail-col",
4025
4355
  component: "Column",
4026
4356
  children: [
4027
- "detail-title",
4028
4357
  "detail-code",
4029
4358
  "detail-desc",
4030
4359
  "detail-billable",
4031
4360
  "detail-category",
4032
- "detail-parent",
4033
- "detail-actions"
4361
+ "detail-parent"
4034
4362
  ]
4035
4363
  },
4036
- {
4037
- id: "detail-title",
4038
- component: "Text",
4039
- text: "Code Detail",
4040
- variant: "h3"
4041
- },
4042
4364
  {
4043
4365
  id: "detail-code",
4044
4366
  component: "Row",
@@ -4115,6 +4437,11 @@ const Ie = [
4115
4437
  component: "Text",
4116
4438
  text: "IV — Endocrine, nutritional and metabolic diseases (E00-E89)"
4117
4439
  },
4440
+ {
4441
+ id: "detail-ftr",
4442
+ component: "Footer",
4443
+ children: ["detail-actions"]
4444
+ },
4118
4445
  {
4119
4446
  id: "detail-actions",
4120
4447
  component: "Row",
@@ -4204,13 +4531,28 @@ const Ie = [
4204
4531
  {
4205
4532
  id: "demographics-card",
4206
4533
  component: "Card",
4534
+ children: ["demo-hdr", "demo-body"]
4535
+ },
4536
+ {
4537
+ id: "demo-hdr",
4538
+ component: "Header",
4539
+ children: ["demo-title"]
4540
+ },
4541
+ {
4542
+ id: "demo-title",
4543
+ component: "Text",
4544
+ text: "Demographics",
4545
+ variant: "h3"
4546
+ },
4547
+ {
4548
+ id: "demo-body",
4549
+ component: "Body",
4207
4550
  child: "demo-col"
4208
4551
  },
4209
4552
  {
4210
4553
  id: "demo-col",
4211
4554
  component: "Column",
4212
4555
  children: [
4213
- "demo-title",
4214
4556
  "demo-name-row",
4215
4557
  "demo-dob-row",
4216
4558
  "demo-address",
@@ -4219,12 +4561,6 @@ const Ie = [
4219
4561
  "demo-emergency"
4220
4562
  ]
4221
4563
  },
4222
- {
4223
- id: "demo-title",
4224
- component: "Text",
4225
- text: "Demographics",
4226
- variant: "h3"
4227
- },
4228
4564
  {
4229
4565
  id: "demo-name-row",
4230
4566
  component: "Row",
@@ -4286,24 +4622,33 @@ const Ie = [
4286
4622
  {
4287
4623
  id: "insurance-card",
4288
4624
  component: "Card",
4625
+ children: ["ins-hdr", "ins-body"]
4626
+ },
4627
+ {
4628
+ id: "ins-hdr",
4629
+ component: "Header",
4630
+ children: ["ins-title"]
4631
+ },
4632
+ {
4633
+ id: "ins-title",
4634
+ component: "Text",
4635
+ text: "Insurance",
4636
+ variant: "h3"
4637
+ },
4638
+ {
4639
+ id: "ins-body",
4640
+ component: "Body",
4289
4641
  child: "ins-col"
4290
4642
  },
4291
4643
  {
4292
4644
  id: "ins-col",
4293
4645
  component: "Column",
4294
4646
  children: [
4295
- "ins-title",
4296
4647
  "ins-carrier",
4297
4648
  "ins-id",
4298
4649
  "ins-group"
4299
4650
  ]
4300
4651
  },
4301
- {
4302
- id: "ins-title",
4303
- component: "Text",
4304
- text: "Insurance",
4305
- variant: "h3"
4306
- },
4307
4652
  {
4308
4653
  id: "ins-carrier",
4309
4654
  component: "TextField",
@@ -4325,25 +4670,34 @@ const Ie = [
4325
4670
  {
4326
4671
  id: "history-card",
4327
4672
  component: "Card",
4673
+ children: ["hist-hdr", "hist-body"]
4674
+ },
4675
+ {
4676
+ id: "hist-hdr",
4677
+ component: "Header",
4678
+ children: ["hist-title"]
4679
+ },
4680
+ {
4681
+ id: "hist-title",
4682
+ component: "Text",
4683
+ text: "Medical History",
4684
+ variant: "h3"
4685
+ },
4686
+ {
4687
+ id: "hist-body",
4688
+ component: "Body",
4328
4689
  child: "hist-col"
4329
4690
  },
4330
4691
  {
4331
4692
  id: "hist-col",
4332
4693
  component: "Column",
4333
4694
  children: [
4334
- "hist-title",
4335
4695
  "hist-conditions",
4336
4696
  "hist-surgeries",
4337
4697
  "hist-allergies",
4338
4698
  "hist-meds"
4339
4699
  ]
4340
4700
  },
4341
- {
4342
- id: "hist-title",
4343
- component: "Text",
4344
- text: "Medical History",
4345
- variant: "h3"
4346
- },
4347
4701
  {
4348
4702
  id: "hist-conditions",
4349
4703
  component: "TextArea",
@@ -4431,16 +4785,12 @@ const Ie = [
4431
4785
  {
4432
4786
  id: "auth-1-card",
4433
4787
  component: "Card",
4434
- child: "auth-1-col"
4788
+ children: ["auth-1-hdr", "auth-1-body"]
4435
4789
  },
4436
4790
  {
4437
- id: "auth-1-col",
4438
- component: "Column",
4439
- children: [
4440
- "auth-1-header",
4441
- "auth-1-details",
4442
- "auth-1-timeline"
4443
- ]
4791
+ id: "auth-1-hdr",
4792
+ component: "Header",
4793
+ children: ["auth-1-header"]
4444
4794
  },
4445
4795
  {
4446
4796
  id: "auth-1-header",
@@ -4458,6 +4808,16 @@ const Ie = [
4458
4808
  component: "Badge",
4459
4809
  text: "Approved"
4460
4810
  },
4811
+ {
4812
+ id: "auth-1-body",
4813
+ component: "Body",
4814
+ child: "auth-1-col"
4815
+ },
4816
+ {
4817
+ id: "auth-1-col",
4818
+ component: "Column",
4819
+ children: ["auth-1-details", "auth-1-timeline"]
4820
+ },
4461
4821
  {
4462
4822
  id: "auth-1-details",
4463
4823
  component: "Column",
@@ -4537,18 +4897,17 @@ const Ie = [
4537
4897
  {
4538
4898
  id: "auth-2-card",
4539
4899
  component: "Card",
4540
- child: "auth-2-col"
4541
- },
4542
- {
4543
- id: "auth-2-col",
4544
- component: "Column",
4545
4900
  children: [
4546
- "auth-2-header",
4547
- "auth-2-details",
4548
- "auth-2-timeline",
4549
- "auth-2-actions"
4901
+ "auth-2-hdr",
4902
+ "auth-2-body",
4903
+ "auth-2-ftr"
4550
4904
  ]
4551
4905
  },
4906
+ {
4907
+ id: "auth-2-hdr",
4908
+ component: "Header",
4909
+ children: ["auth-2-header"]
4910
+ },
4552
4911
  {
4553
4912
  id: "auth-2-header",
4554
4913
  component: "Row",
@@ -4565,6 +4924,16 @@ const Ie = [
4565
4924
  component: "Badge",
4566
4925
  text: "Pending Review"
4567
4926
  },
4927
+ {
4928
+ id: "auth-2-body",
4929
+ component: "Body",
4930
+ child: "auth-2-col"
4931
+ },
4932
+ {
4933
+ id: "auth-2-col",
4934
+ component: "Column",
4935
+ children: ["auth-2-details", "auth-2-timeline"]
4936
+ },
4568
4937
  {
4569
4938
  id: "auth-2-details",
4570
4939
  component: "Column",
@@ -4625,6 +4994,11 @@ const Ie = [
4625
4994
  text: "Submitted Feb 18 — estimated decision by Feb 25",
4626
4995
  variant: "caption"
4627
4996
  },
4997
+ {
4998
+ id: "auth-2-ftr",
4999
+ component: "Footer",
5000
+ children: ["auth-2-actions"]
5001
+ },
4628
5002
  {
4629
5003
  id: "auth-2-actions",
4630
5004
  component: "Row",
@@ -4646,18 +5020,17 @@ const Ie = [
4646
5020
  {
4647
5021
  id: "auth-3-card",
4648
5022
  component: "Card",
4649
- child: "auth-3-col"
4650
- },
4651
- {
4652
- id: "auth-3-col",
4653
- component: "Column",
4654
5023
  children: [
4655
- "auth-3-header",
4656
- "auth-3-details",
4657
- "auth-3-reason",
4658
- "auth-3-actions"
5024
+ "auth-3-hdr",
5025
+ "auth-3-body",
5026
+ "auth-3-ftr"
4659
5027
  ]
4660
5028
  },
5029
+ {
5030
+ id: "auth-3-hdr",
5031
+ component: "Header",
5032
+ children: ["auth-3-header"]
5033
+ },
4661
5034
  {
4662
5035
  id: "auth-3-header",
4663
5036
  component: "Row",
@@ -4674,6 +5047,16 @@ const Ie = [
4674
5047
  component: "Badge",
4675
5048
  text: "Denied"
4676
5049
  },
5050
+ {
5051
+ id: "auth-3-body",
5052
+ component: "Body",
5053
+ child: "auth-3-col"
5054
+ },
5055
+ {
5056
+ id: "auth-3-col",
5057
+ component: "Column",
5058
+ children: ["auth-3-details", "auth-3-reason"]
5059
+ },
4677
5060
  {
4678
5061
  id: "auth-3-details",
4679
5062
  component: "Column",
@@ -4714,6 +5097,11 @@ const Ie = [
4714
5097
  component: "Text",
4715
5098
  text: "Denial reason: Step therapy not met — must trial methotrexate first. Appeal deadline: Mar 5."
4716
5099
  },
5100
+ {
5101
+ id: "auth-3-ftr",
5102
+ component: "Footer",
5103
+ children: ["auth-3-actions"]
5104
+ },
4717
5105
  {
4718
5106
  id: "auth-3-actions",
4719
5107
  component: "Row",
@@ -4811,24 +5199,33 @@ const Ie = [
4811
5199
  {
4812
5200
  id: "goals-card",
4813
5201
  component: "Card",
5202
+ children: ["goals-hdr", "goals-body"]
5203
+ },
5204
+ {
5205
+ id: "goals-hdr",
5206
+ component: "Header",
5207
+ children: ["goals-title"]
5208
+ },
5209
+ {
5210
+ id: "goals-title",
5211
+ component: "Text",
5212
+ text: "Treatment Goals",
5213
+ variant: "h3"
5214
+ },
5215
+ {
5216
+ id: "goals-body",
5217
+ component: "Body",
4814
5218
  child: "goals-col"
4815
5219
  },
4816
5220
  {
4817
5221
  id: "goals-col",
4818
5222
  component: "Column",
4819
5223
  children: [
4820
- "goals-title",
4821
5224
  "goal-1",
4822
5225
  "goal-2",
4823
5226
  "goal-3"
4824
5227
  ]
4825
5228
  },
4826
- {
4827
- id: "goals-title",
4828
- component: "Text",
4829
- text: "Treatment Goals",
4830
- variant: "h3"
4831
- },
4832
5229
  {
4833
5230
  id: "goal-1",
4834
5231
  component: "Row",
@@ -4910,25 +5307,34 @@ const Ie = [
4910
5307
  {
4911
5308
  id: "interventions-card",
4912
5309
  component: "Card",
5310
+ children: ["interventions-hdr", "interventions-body"]
5311
+ },
5312
+ {
5313
+ id: "interventions-hdr",
5314
+ component: "Header",
5315
+ children: ["int-title"]
5316
+ },
5317
+ {
5318
+ id: "int-title",
5319
+ component: "Text",
5320
+ text: "Interventions",
5321
+ variant: "h3"
5322
+ },
5323
+ {
5324
+ id: "interventions-body",
5325
+ component: "Body",
4913
5326
  child: "int-col"
4914
5327
  },
4915
5328
  {
4916
5329
  id: "int-col",
4917
5330
  component: "Column",
4918
5331
  children: [
4919
- "int-title",
4920
5332
  "int-med",
4921
5333
  "int-diet",
4922
5334
  "int-exercise",
4923
5335
  "int-monitor"
4924
5336
  ]
4925
5337
  },
4926
- {
4927
- id: "int-title",
4928
- component: "Text",
4929
- text: "Interventions",
4930
- variant: "h3"
4931
- },
4932
5338
  {
4933
5339
  id: "int-med",
4934
5340
  component: "Column",
@@ -5005,24 +5411,33 @@ const Ie = [
5005
5411
  {
5006
5412
  id: "follow-up-card",
5007
5413
  component: "Card",
5414
+ children: ["fu-hdr", "fu-body"]
5415
+ },
5416
+ {
5417
+ id: "fu-hdr",
5418
+ component: "Header",
5419
+ children: ["fu-title"]
5420
+ },
5421
+ {
5422
+ id: "fu-title",
5423
+ component: "Text",
5424
+ text: "Follow-Up Schedule",
5425
+ variant: "h3"
5426
+ },
5427
+ {
5428
+ id: "fu-body",
5429
+ component: "Body",
5008
5430
  child: "fu-col"
5009
5431
  },
5010
5432
  {
5011
5433
  id: "fu-col",
5012
5434
  component: "Column",
5013
5435
  children: [
5014
- "fu-title",
5015
5436
  "fu-1",
5016
5437
  "fu-2",
5017
5438
  "fu-3"
5018
5439
  ]
5019
5440
  },
5020
- {
5021
- id: "fu-title",
5022
- component: "Text",
5023
- text: "Follow-Up Schedule",
5024
- variant: "h3"
5025
- },
5026
5441
  {
5027
5442
  id: "fu-1",
5028
5443
  component: "Row",
@@ -5075,24 +5490,33 @@ const Ie = [
5075
5490
  {
5076
5491
  id: "team-card",
5077
5492
  component: "Card",
5493
+ children: ["team-hdr", "team-body"]
5494
+ },
5495
+ {
5496
+ id: "team-hdr",
5497
+ component: "Header",
5498
+ children: ["team-title"]
5499
+ },
5500
+ {
5501
+ id: "team-title",
5502
+ component: "Text",
5503
+ text: "Care Team",
5504
+ variant: "h3"
5505
+ },
5506
+ {
5507
+ id: "team-body",
5508
+ component: "Body",
5078
5509
  child: "team-col"
5079
5510
  },
5080
5511
  {
5081
5512
  id: "team-col",
5082
5513
  component: "Column",
5083
5514
  children: [
5084
- "team-title",
5085
5515
  "team-pcp",
5086
5516
  "team-endo",
5087
5517
  "team-diet"
5088
5518
  ]
5089
5519
  },
5090
- {
5091
- id: "team-title",
5092
- component: "Text",
5093
- text: "Care Team",
5094
- variant: "h3"
5095
- },
5096
5520
  {
5097
5521
  id: "team-pcp",
5098
5522
  component: "Text",
@@ -5627,6 +6051,11 @@ const Ie = [
5627
6051
  {
5628
6052
  id: "summary-card",
5629
6053
  component: "Card",
6054
+ children: ["summary-body"]
6055
+ },
6056
+ {
6057
+ id: "summary-body",
6058
+ component: "Body",
5630
6059
  child: "summary-col"
5631
6060
  },
5632
6061
  {
@@ -5699,19 +6128,18 @@ const Ie = [
5699
6128
  },
5700
6129
  {
5701
6130
  id: "spa-card",
5702
- component: "Card",
5703
- child: "spa-col"
5704
- },
5705
- {
5706
- id: "spa-col",
5707
- component: "Column",
6131
+ component: "Card",
5708
6132
  children: [
5709
- "spa-row",
5710
- "spa-desc",
5711
- "spa-slots",
5712
- "spa-book-btn"
6133
+ "spa-hdr",
6134
+ "spa-body",
6135
+ "spa-ftr"
5713
6136
  ]
5714
6137
  },
6138
+ {
6139
+ id: "spa-hdr",
6140
+ component: "Header",
6141
+ children: ["spa-row"]
6142
+ },
5715
6143
  {
5716
6144
  id: "spa-row",
5717
6145
  component: "Row",
@@ -5737,6 +6165,16 @@ const Ie = [
5737
6165
  component: "Badge",
5738
6166
  text: "Open"
5739
6167
  },
6168
+ {
6169
+ id: "spa-body",
6170
+ component: "Body",
6171
+ child: "spa-col"
6172
+ },
6173
+ {
6174
+ id: "spa-col",
6175
+ component: "Column",
6176
+ children: ["spa-desc", "spa-slots"]
6177
+ },
5740
6178
  {
5741
6179
  id: "spa-desc",
5742
6180
  component: "Text",
@@ -5780,6 +6218,11 @@ const Ie = [
5780
6218
  text: "16:30 — Facial Treatment (45 min) · €65",
5781
6219
  value: "spa-1630"
5782
6220
  },
6221
+ {
6222
+ id: "spa-ftr",
6223
+ component: "Footer",
6224
+ children: ["spa-book-btn"]
6225
+ },
5783
6226
  {
5784
6227
  id: "spa-book-btn",
5785
6228
  component: "Button",
@@ -5790,17 +6233,17 @@ const Ie = [
5790
6233
  {
5791
6234
  id: "pool-card",
5792
6235
  component: "Card",
5793
- child: "pool-col"
5794
- },
5795
- {
5796
- id: "pool-col",
5797
- component: "Column",
5798
6236
  children: [
5799
- "pool-row",
5800
- "pool-desc",
5801
- "pool-cabana"
6237
+ "pool-hdr",
6238
+ "pool-body",
6239
+ "pool-ftr"
5802
6240
  ]
5803
6241
  },
6242
+ {
6243
+ id: "pool-hdr",
6244
+ component: "Header",
6245
+ children: ["pool-row"]
6246
+ },
5804
6247
  {
5805
6248
  id: "pool-row",
5806
6249
  component: "Row",
@@ -5826,11 +6269,21 @@ const Ie = [
5826
6269
  component: "Badge",
5827
6270
  text: "Open"
5828
6271
  },
6272
+ {
6273
+ id: "pool-body",
6274
+ component: "Body",
6275
+ child: "pool-desc"
6276
+ },
5829
6277
  {
5830
6278
  id: "pool-desc",
5831
6279
  component: "Text",
5832
6280
  text: "Infinity pool, heated jacuzzi, private beach access. Pool: 07:00–20:00, Beach: 08:00–sunset."
5833
6281
  },
6282
+ {
6283
+ id: "pool-ftr",
6284
+ component: "Footer",
6285
+ children: ["pool-cabana"]
6286
+ },
5834
6287
  {
5835
6288
  id: "pool-cabana",
5836
6289
  component: "Row",
@@ -5850,17 +6303,17 @@ const Ie = [
5850
6303
  {
5851
6304
  id: "gym-card",
5852
6305
  component: "Card",
5853
- child: "gym-col"
5854
- },
5855
- {
5856
- id: "gym-col",
5857
- component: "Column",
5858
6306
  children: [
5859
- "gym-row",
5860
- "gym-desc",
5861
- "gym-class"
6307
+ "gym-hdr",
6308
+ "gym-body",
6309
+ "gym-ftr"
5862
6310
  ]
5863
6311
  },
6312
+ {
6313
+ id: "gym-hdr",
6314
+ component: "Header",
6315
+ children: ["gym-row"]
6316
+ },
5864
6317
  {
5865
6318
  id: "gym-row",
5866
6319
  component: "Row",
@@ -5886,11 +6339,21 @@ const Ie = [
5886
6339
  component: "Badge",
5887
6340
  text: "24h Access"
5888
6341
  },
6342
+ {
6343
+ id: "gym-body",
6344
+ component: "Body",
6345
+ child: "gym-desc"
6346
+ },
5889
6347
  {
5890
6348
  id: "gym-desc",
5891
6349
  component: "Text",
5892
6350
  text: "Cardio, free weights, yoga studio. Towels and water provided."
5893
6351
  },
6352
+ {
6353
+ id: "gym-ftr",
6354
+ component: "Footer",
6355
+ children: ["gym-class"]
6356
+ },
5894
6357
  {
5895
6358
  id: "gym-class",
5896
6359
  component: "Row",
@@ -5993,24 +6456,33 @@ const Ie = [
5993
6456
  {
5994
6457
  id: "room-1-card",
5995
6458
  component: "Card",
5996
- child: "room-1-col"
5997
- },
5998
- {
5999
- id: "room-1-col",
6000
- component: "Column",
6001
6459
  children: [
6002
- "room-1-img",
6003
- "room-1-info",
6004
- "room-1-amenities",
6005
- "room-1-actions"
6460
+ "room-1-hdr",
6461
+ "room-1-body",
6462
+ "room-1-ftr"
6006
6463
  ]
6007
6464
  },
6465
+ {
6466
+ id: "room-1-hdr",
6467
+ component: "Header",
6468
+ children: ["room-1-img"]
6469
+ },
6008
6470
  {
6009
6471
  id: "room-1-img",
6010
6472
  component: "Image",
6011
6473
  url: "https://images.unsplash.com/photo-1590490360182-c33d153d16ef?w=600&h=300&fit=crop",
6012
6474
  alt: "Deluxe Room"
6013
6475
  },
6476
+ {
6477
+ id: "room-1-body",
6478
+ component: "Body",
6479
+ child: "room-1-col"
6480
+ },
6481
+ {
6482
+ id: "room-1-col",
6483
+ component: "Column",
6484
+ children: ["room-1-info", "room-1-amenities"]
6485
+ },
6014
6486
  {
6015
6487
  id: "room-1-info",
6016
6488
  component: "Row",
@@ -6080,6 +6552,11 @@ const Ie = [
6080
6552
  component: "Badge",
6081
6553
  text: "Room Safe"
6082
6554
  },
6555
+ {
6556
+ id: "room-1-ftr",
6557
+ component: "Footer",
6558
+ children: ["room-1-actions"]
6559
+ },
6083
6560
  {
6084
6561
  id: "room-1-actions",
6085
6562
  component: "Row",
@@ -6101,24 +6578,33 @@ const Ie = [
6101
6578
  {
6102
6579
  id: "room-2-card",
6103
6580
  component: "Card",
6104
- child: "room-2-col"
6105
- },
6106
- {
6107
- id: "room-2-col",
6108
- component: "Column",
6109
6581
  children: [
6110
- "room-2-img",
6111
- "room-2-info",
6112
- "room-2-amenities",
6113
- "room-2-actions"
6582
+ "room-2-hdr",
6583
+ "room-2-body",
6584
+ "room-2-ftr"
6114
6585
  ]
6115
6586
  },
6587
+ {
6588
+ id: "room-2-hdr",
6589
+ component: "Header",
6590
+ children: ["room-2-img"]
6591
+ },
6116
6592
  {
6117
6593
  id: "room-2-img",
6118
6594
  component: "Image",
6119
6595
  url: "https://images.unsplash.com/photo-1582719478250-c89cae4dc85b?w=600&h=300&fit=crop",
6120
6596
  alt: "Junior Suite"
6121
6597
  },
6598
+ {
6599
+ id: "room-2-body",
6600
+ component: "Body",
6601
+ child: "room-2-col"
6602
+ },
6603
+ {
6604
+ id: "room-2-col",
6605
+ component: "Column",
6606
+ children: ["room-2-info", "room-2-amenities"]
6607
+ },
6122
6608
  {
6123
6609
  id: "room-2-info",
6124
6610
  component: "Row",
@@ -6194,6 +6680,11 @@ const Ie = [
6194
6680
  component: "Badge",
6195
6681
  text: "Lounge Access"
6196
6682
  },
6683
+ {
6684
+ id: "room-2-ftr",
6685
+ component: "Footer",
6686
+ children: ["room-2-actions"]
6687
+ },
6197
6688
  {
6198
6689
  id: "room-2-actions",
6199
6690
  component: "Row",
@@ -6215,24 +6706,33 @@ const Ie = [
6215
6706
  {
6216
6707
  id: "room-3-card",
6217
6708
  component: "Card",
6218
- child: "room-3-col"
6219
- },
6220
- {
6221
- id: "room-3-col",
6222
- component: "Column",
6223
6709
  children: [
6224
- "room-3-img",
6225
- "room-3-info",
6226
- "room-3-amenities",
6227
- "room-3-actions"
6710
+ "room-3-hdr",
6711
+ "room-3-body",
6712
+ "room-3-ftr"
6228
6713
  ]
6229
6714
  },
6715
+ {
6716
+ id: "room-3-hdr",
6717
+ component: "Header",
6718
+ children: ["room-3-img"]
6719
+ },
6230
6720
  {
6231
6721
  id: "room-3-img",
6232
6722
  component: "Image",
6233
6723
  url: "https://images.unsplash.com/photo-1631049307264-da0ec9d70304?w=600&h=300&fit=crop",
6234
6724
  alt: "Presidential Suite"
6235
6725
  },
6726
+ {
6727
+ id: "room-3-body",
6728
+ component: "Body",
6729
+ child: "room-3-col"
6730
+ },
6731
+ {
6732
+ id: "room-3-col",
6733
+ component: "Column",
6734
+ children: ["room-3-info", "room-3-amenities"]
6735
+ },
6236
6736
  {
6237
6737
  id: "room-3-info",
6238
6738
  component: "Row",
@@ -6323,6 +6823,11 @@ const Ie = [
6323
6823
  component: "Badge",
6324
6824
  text: "Airport Transfer"
6325
6825
  },
6826
+ {
6827
+ id: "room-3-ftr",
6828
+ component: "Footer",
6829
+ children: ["room-3-actions"]
6830
+ },
6326
6831
  {
6327
6832
  id: "room-3-actions",
6328
6833
  component: "Row",
@@ -6409,25 +6914,34 @@ const Ie = [
6409
6914
  {
6410
6915
  id: "booking-card",
6411
6916
  component: "Card",
6917
+ children: ["booking-hdr", "booking-body"]
6918
+ },
6919
+ {
6920
+ id: "booking-hdr",
6921
+ component: "Header",
6922
+ children: ["booking-title"]
6923
+ },
6924
+ {
6925
+ id: "booking-title",
6926
+ component: "Text",
6927
+ text: "Booking Summary",
6928
+ variant: "h3"
6929
+ },
6930
+ {
6931
+ id: "booking-body",
6932
+ component: "Body",
6412
6933
  child: "booking-col"
6413
6934
  },
6414
6935
  {
6415
6936
  id: "booking-col",
6416
6937
  component: "Column",
6417
6938
  children: [
6418
- "booking-title",
6419
6939
  "booking-room",
6420
6940
  "booking-dates",
6421
6941
  "booking-guests",
6422
6942
  "booking-rate"
6423
6943
  ]
6424
6944
  },
6425
- {
6426
- id: "booking-title",
6427
- component: "Text",
6428
- text: "Booking Summary",
6429
- variant: "h3"
6430
- },
6431
6945
  {
6432
6946
  id: "booking-room",
6433
6947
  component: "Row",
@@ -6491,25 +7005,34 @@ const Ie = [
6491
7005
  {
6492
7006
  id: "guest-card",
6493
7007
  component: "Card",
7008
+ children: ["guest-hdr", "guest-body"]
7009
+ },
7010
+ {
7011
+ id: "guest-hdr",
7012
+ component: "Header",
7013
+ children: ["guest-title"]
7014
+ },
7015
+ {
7016
+ id: "guest-title",
7017
+ component: "Text",
7018
+ text: "Guest Details",
7019
+ variant: "h3"
7020
+ },
7021
+ {
7022
+ id: "guest-body",
7023
+ component: "Body",
6494
7024
  child: "guest-col"
6495
7025
  },
6496
7026
  {
6497
7027
  id: "guest-col",
6498
7028
  component: "Column",
6499
7029
  children: [
6500
- "guest-title",
6501
7030
  "guest-name-row",
6502
7031
  "guest-email",
6503
7032
  "guest-phone",
6504
7033
  "guest-requests"
6505
7034
  ]
6506
7035
  },
6507
- {
6508
- id: "guest-title",
6509
- component: "Text",
6510
- text: "Guest Details",
6511
- variant: "h3"
6512
- },
6513
7036
  {
6514
7037
  id: "guest-name-row",
6515
7038
  component: "Row",
@@ -6550,25 +7073,34 @@ const Ie = [
6550
7073
  {
6551
7074
  id: "extras-card",
6552
7075
  component: "Card",
7076
+ children: ["extras-hdr", "extras-body"]
7077
+ },
7078
+ {
7079
+ id: "extras-hdr",
7080
+ component: "Header",
7081
+ children: ["extras-title"]
7082
+ },
7083
+ {
7084
+ id: "extras-title",
7085
+ component: "Text",
7086
+ text: "Add-ons",
7087
+ variant: "h3"
7088
+ },
7089
+ {
7090
+ id: "extras-body",
7091
+ component: "Body",
6553
7092
  child: "extras-col"
6554
7093
  },
6555
7094
  {
6556
7095
  id: "extras-col",
6557
7096
  component: "Column",
6558
7097
  children: [
6559
- "extras-title",
6560
7098
  "extra-breakfast",
6561
7099
  "extra-parking",
6562
7100
  "extra-transfer",
6563
7101
  "extra-late"
6564
7102
  ]
6565
7103
  },
6566
- {
6567
- id: "extras-title",
6568
- component: "Text",
6569
- text: "Add-ons",
6570
- variant: "h3"
6571
- },
6572
7104
  {
6573
7105
  id: "extra-breakfast",
6574
7106
  component: "CheckBox",
@@ -6596,6 +7128,11 @@ const Ie = [
6596
7128
  {
6597
7129
  id: "total-card",
6598
7130
  component: "Card",
7131
+ children: ["total-body"]
7132
+ },
7133
+ {
7134
+ id: "total-body",
7135
+ component: "Body",
6599
7136
  child: "total-col"
6600
7137
  },
6601
7138
  {
@@ -6722,12 +7259,12 @@ const Ie = [
6722
7259
  {
6723
7260
  id: "msg-1",
6724
7261
  component: "Card",
6725
- child: "msg-1-col"
7262
+ children: ["msg-1-hdr", "msg-1-body"]
6726
7263
  },
6727
7264
  {
6728
- id: "msg-1-col",
6729
- component: "Column",
6730
- children: ["msg-1-sender", "msg-1-text"]
7265
+ id: "msg-1-hdr",
7266
+ component: "Header",
7267
+ children: ["msg-1-sender"]
6731
7268
  },
6732
7269
  {
6733
7270
  id: "msg-1-sender",
@@ -6735,6 +7272,11 @@ const Ie = [
6735
7272
  text: "Concierge · 09:15",
6736
7273
  variant: "caption"
6737
7274
  },
7275
+ {
7276
+ id: "msg-1-body",
7277
+ component: "Body",
7278
+ child: "msg-1-text"
7279
+ },
6738
7280
  {
6739
7281
  id: "msg-1-text",
6740
7282
  component: "Text",
@@ -6743,12 +7285,12 @@ const Ie = [
6743
7285
  {
6744
7286
  id: "msg-2",
6745
7287
  component: "Card",
6746
- child: "msg-2-col"
7288
+ children: ["msg-2-hdr", "msg-2-body"]
6747
7289
  },
6748
7290
  {
6749
- id: "msg-2-col",
6750
- component: "Column",
6751
- children: ["msg-2-sender", "msg-2-text"]
7291
+ id: "msg-2-hdr",
7292
+ component: "Header",
7293
+ children: ["msg-2-sender"]
6752
7294
  },
6753
7295
  {
6754
7296
  id: "msg-2-sender",
@@ -6756,6 +7298,11 @@ const Ie = [
6756
7298
  text: "You · 09:20",
6757
7299
  variant: "caption"
6758
7300
  },
7301
+ {
7302
+ id: "msg-2-body",
7303
+ component: "Body",
7304
+ child: "msg-2-text"
7305
+ },
6759
7306
  {
6760
7307
  id: "msg-2-text",
6761
7308
  component: "Text",
@@ -6764,12 +7311,12 @@ const Ie = [
6764
7311
  {
6765
7312
  id: "msg-3",
6766
7313
  component: "Card",
6767
- child: "msg-3-col"
7314
+ children: ["msg-3-hdr", "msg-3-body"]
6768
7315
  },
6769
7316
  {
6770
- id: "msg-3-col",
6771
- component: "Column",
6772
- children: ["msg-3-sender", "msg-3-text"]
7317
+ id: "msg-3-hdr",
7318
+ component: "Header",
7319
+ children: ["msg-3-sender"]
6773
7320
  },
6774
7321
  {
6775
7322
  id: "msg-3-sender",
@@ -6777,6 +7324,11 @@ const Ie = [
6777
7324
  text: "Concierge · 09:22",
6778
7325
  variant: "caption"
6779
7326
  },
7327
+ {
7328
+ id: "msg-3-body",
7329
+ component: "Body",
7330
+ child: "msg-3-text"
7331
+ },
6780
7332
  {
6781
7333
  id: "msg-3-text",
6782
7334
  component: "Text",
@@ -6790,29 +7342,39 @@ const Ie = [
6790
7342
  {
6791
7343
  id: "option-1",
6792
7344
  component: "Card",
6793
- child: "opt-1-col"
6794
- },
6795
- {
6796
- id: "opt-1-col",
6797
- component: "Column",
6798
7345
  children: [
6799
- "opt-1-name",
6800
- "opt-1-detail",
6801
- "opt-1-btn"
7346
+ "opt-1-hdr",
7347
+ "opt-1-body",
7348
+ "opt-1-ftr"
6802
7349
  ]
6803
7350
  },
7351
+ {
7352
+ id: "opt-1-hdr",
7353
+ component: "Header",
7354
+ children: ["opt-1-name"]
7355
+ },
6804
7356
  {
6805
7357
  id: "opt-1-name",
6806
7358
  component: "Text",
6807
7359
  text: "Sunset Catamaran Cruise",
6808
7360
  variant: "h4"
6809
7361
  },
7362
+ {
7363
+ id: "opt-1-body",
7364
+ component: "Body",
7365
+ child: "opt-1-detail"
7366
+ },
6810
7367
  {
6811
7368
  id: "opt-1-detail",
6812
7369
  component: "Text",
6813
7370
  text: "17:30–19:30 · Includes drinks & canapés · €85/person",
6814
7371
  variant: "caption"
6815
7372
  },
7373
+ {
7374
+ id: "opt-1-ftr",
7375
+ component: "Footer",
7376
+ children: ["opt-1-btn"]
7377
+ },
6816
7378
  {
6817
7379
  id: "opt-1-btn",
6818
7380
  component: "Button",
@@ -6823,29 +7385,39 @@ const Ie = [
6823
7385
  {
6824
7386
  id: "option-2",
6825
7387
  component: "Card",
6826
- child: "opt-2-col"
6827
- },
6828
- {
6829
- id: "opt-2-col",
6830
- component: "Column",
6831
7388
  children: [
6832
- "opt-2-name",
6833
- "opt-2-detail",
6834
- "opt-2-btn"
7389
+ "opt-2-hdr",
7390
+ "opt-2-body",
7391
+ "opt-2-ftr"
6835
7392
  ]
6836
7393
  },
7394
+ {
7395
+ id: "opt-2-hdr",
7396
+ component: "Header",
7397
+ children: ["opt-2-name"]
7398
+ },
6837
7399
  {
6838
7400
  id: "opt-2-name",
6839
7401
  component: "Text",
6840
7402
  text: "Private Yacht Charter",
6841
7403
  variant: "h4"
6842
7404
  },
7405
+ {
7406
+ id: "opt-2-body",
7407
+ component: "Body",
7408
+ child: "opt-2-detail"
7409
+ },
6843
7410
  {
6844
7411
  id: "opt-2-detail",
6845
7412
  component: "Text",
6846
7413
  text: "17:00–20:00 · Private crew, dinner, champagne · €450 (up to 6 guests)",
6847
7414
  variant: "caption"
6848
7415
  },
7416
+ {
7417
+ id: "opt-2-ftr",
7418
+ component: "Footer",
7419
+ children: ["opt-2-btn"]
7420
+ },
6849
7421
  {
6850
7422
  id: "opt-2-btn",
6851
7423
  component: "Button",
@@ -6966,13 +7538,28 @@ const Ie = [
6966
7538
  {
6967
7539
  id: "charges-card",
6968
7540
  component: "Card",
7541
+ children: ["charges-hdr", "charges-body"]
7542
+ },
7543
+ {
7544
+ id: "charges-hdr",
7545
+ component: "Header",
7546
+ children: ["charges-title"]
7547
+ },
7548
+ {
7549
+ id: "charges-title",
7550
+ component: "Text",
7551
+ text: "Folio Summary",
7552
+ variant: "h3"
7553
+ },
7554
+ {
7555
+ id: "charges-body",
7556
+ component: "Body",
6969
7557
  child: "charges-col"
6970
7558
  },
6971
7559
  {
6972
7560
  id: "charges-col",
6973
7561
  component: "Column",
6974
7562
  children: [
6975
- "charges-title",
6976
7563
  "charge-room",
6977
7564
  "charge-spa",
6978
7565
  "charge-dining",
@@ -6984,12 +7571,6 @@ const Ie = [
6984
7571
  "charge-total"
6985
7572
  ]
6986
7573
  },
6987
- {
6988
- id: "charges-title",
6989
- component: "Text",
6990
- text: "Folio Summary",
6991
- variant: "h3"
6992
- },
6993
7574
  {
6994
7575
  id: "charge-room",
6995
7576
  component: "Row",
@@ -7112,16 +7693,12 @@ const Ie = [
7112
7693
  {
7113
7694
  id: "payment-card",
7114
7695
  component: "Card",
7115
- child: "payment-col"
7696
+ children: ["payment-hdr", "payment-body"]
7116
7697
  },
7117
7698
  {
7118
- id: "payment-col",
7119
- component: "Column",
7120
- children: [
7121
- "payment-title",
7122
- "payment-method",
7123
- "payment-email"
7124
- ]
7699
+ id: "payment-hdr",
7700
+ component: "Header",
7701
+ children: ["payment-title"]
7125
7702
  },
7126
7703
  {
7127
7704
  id: "payment-title",
@@ -7129,6 +7706,16 @@ const Ie = [
7129
7706
  text: "Payment",
7130
7707
  variant: "h3"
7131
7708
  },
7709
+ {
7710
+ id: "payment-body",
7711
+ component: "Body",
7712
+ child: "payment-col"
7713
+ },
7714
+ {
7715
+ id: "payment-col",
7716
+ component: "Column",
7717
+ children: ["payment-method", "payment-email"]
7718
+ },
7132
7719
  {
7133
7720
  id: "payment-method",
7134
7721
  component: "Row",
@@ -7153,12 +7740,12 @@ const Ie = [
7153
7740
  {
7154
7741
  id: "feedback-card",
7155
7742
  component: "Card",
7156
- child: "feedback-col"
7743
+ children: ["feedback-hdr", "feedback-body"]
7157
7744
  },
7158
7745
  {
7159
- id: "feedback-col",
7160
- component: "Column",
7161
- children: ["feedback-title", "feedback-q"]
7746
+ id: "feedback-hdr",
7747
+ component: "Header",
7748
+ children: ["feedback-title"]
7162
7749
  },
7163
7750
  {
7164
7751
  id: "feedback-title",
@@ -7166,6 +7753,11 @@ const Ie = [
7166
7753
  text: "How was your stay?",
7167
7754
  variant: "h3"
7168
7755
  },
7756
+ {
7757
+ id: "feedback-body",
7758
+ component: "Body",
7759
+ child: "feedback-q"
7760
+ },
7169
7761
  {
7170
7762
  id: "feedback-q",
7171
7763
  component: "TextArea",
@@ -7230,12 +7822,12 @@ const Ie = [
7230
7822
  {
7231
7823
  id: "beach-card",
7232
7824
  component: "Card",
7233
- child: "beach-col"
7825
+ children: ["beach-hdr", "beach-body"]
7234
7826
  },
7235
7827
  {
7236
- id: "beach-col",
7237
- component: "Column",
7238
- children: ["beach-title", "beach-list"]
7828
+ id: "beach-hdr",
7829
+ component: "Header",
7830
+ children: ["beach-title"]
7239
7831
  },
7240
7832
  {
7241
7833
  id: "beach-title",
@@ -7243,6 +7835,11 @@ const Ie = [
7243
7835
  text: "Beaches & Nature",
7244
7836
  variant: "h3"
7245
7837
  },
7838
+ {
7839
+ id: "beach-body",
7840
+ component: "Body",
7841
+ child: "beach-list"
7842
+ },
7246
7843
  {
7247
7844
  id: "beach-list",
7248
7845
  component: "Column",
@@ -7336,12 +7933,12 @@ const Ie = [
7336
7933
  {
7337
7934
  id: "culture-card",
7338
7935
  component: "Card",
7339
- child: "culture-col"
7936
+ children: ["culture-hdr", "culture-body"]
7340
7937
  },
7341
7938
  {
7342
- id: "culture-col",
7343
- component: "Column",
7344
- children: ["culture-title", "culture-list"]
7939
+ id: "culture-hdr",
7940
+ component: "Header",
7941
+ children: ["culture-title"]
7345
7942
  },
7346
7943
  {
7347
7944
  id: "culture-title",
@@ -7349,6 +7946,11 @@ const Ie = [
7349
7946
  text: "Culture & History",
7350
7947
  variant: "h3"
7351
7948
  },
7949
+ {
7950
+ id: "culture-body",
7951
+ component: "Body",
7952
+ child: "culture-list"
7953
+ },
7352
7954
  {
7353
7955
  id: "culture-list",
7354
7956
  component: "Column",
@@ -7411,12 +8013,12 @@ const Ie = [
7411
8013
  {
7412
8014
  id: "food-card",
7413
8015
  component: "Card",
7414
- child: "food-col"
8016
+ children: ["food-hdr", "food-body"]
7415
8017
  },
7416
8018
  {
7417
- id: "food-col",
7418
- component: "Column",
7419
- children: ["food-title", "food-list"]
8019
+ id: "food-hdr",
8020
+ component: "Header",
8021
+ children: ["food-title"]
7420
8022
  },
7421
8023
  {
7422
8024
  id: "food-title",
@@ -7424,6 +8026,11 @@ const Ie = [
7424
8026
  text: "Dining Beyond the Hotel",
7425
8027
  variant: "h3"
7426
8028
  },
8029
+ {
8030
+ id: "food-body",
8031
+ component: "Body",
8032
+ child: "food-list"
8033
+ },
7427
8034
  {
7428
8035
  id: "food-list",
7429
8036
  component: "Column",
@@ -7514,42 +8121,45 @@ const Ie = [
7514
8121
  * @fires native:a2ui-action - When an action fires inside the preview
7515
8122
  * @fires native:a2ui-state - When surface state updates after processing envelopes
7516
8123
  */
7517
- var H = [
8124
+ var V = [
7518
8125
  "json-in",
7519
8126
  "json-out",
7520
8127
  "html",
7521
8128
  "css",
7522
8129
  "js",
7523
- "components"
7524
- ], U = {
8130
+ "components",
8131
+ "schema"
8132
+ ], H = {
7525
8133
  "json-in": "IN",
7526
8134
  "json-out": "OUT",
7527
8135
  html: "HTML",
7528
8136
  css: "CSS",
7529
8137
  js: "JS",
7530
- components: "UI"
7531
- }, Le = {
8138
+ components: "UI",
8139
+ schema: "SCHEMA"
8140
+ }, Pe = {
7532
8141
  "json-in": "brackets-curly",
7533
8142
  "json-out": "chat-circle-dots",
7534
8143
  html: "code",
7535
8144
  css: "palette",
7536
8145
  js: "terminal",
7537
- components: "squares-four"
7538
- }, Re = te.define(), ze = C.line({ class: "cm-a2ui-sent" }), Be = C.line({ class: "cm-a2ui-next" }), Ve = ne.define({
8146
+ components: "squares-four",
8147
+ schema: "file-code"
8148
+ }, U = te.define(), Fe = C.line({ class: "cm-a2ui-sent" }), Ie = C.line({ class: "cm-a2ui-next" }), Le = ne.define({
7539
8149
  create() {
7540
8150
  return C.none;
7541
8151
  },
7542
8152
  update(e, t) {
7543
- for (let e of t.effects) if (e.is(Re)) {
8153
+ for (let e of t.effects) if (e.is(U)) {
7544
8154
  let n = t.state.doc, { sentUpToLine: r, nextFromLine: i, nextToLine: a } = e.value, o = [];
7545
- for (let e = 1; e <= Math.min(r, n.lines); e++) o.push(ze.range(n.line(e).from));
7546
- for (let e = Math.max(1, i); e <= Math.min(a, n.lines); e++) o.push(Be.range(n.line(e).from));
8155
+ for (let e = 1; e <= Math.min(r, n.lines); e++) o.push(Fe.range(n.line(e).from));
8156
+ for (let e = Math.max(1, i); e <= Math.min(a, n.lines); e++) o.push(Ie.range(n.line(e).from));
7547
8157
  return C.set(o, !0);
7548
8158
  }
7549
8159
  return e;
7550
8160
  },
7551
8161
  provide: (e) => w.decorations.from(e)
7552
- }), He = class extends p {
8162
+ }), Re = class extends p {
7553
8163
  static observedAttributes = ["stream"];
7554
8164
  #e = x("");
7555
8165
  #t = x(0);
@@ -7573,17 +8183,19 @@ var H = [
7573
8183
  #y = null;
7574
8184
  #b = null;
7575
8185
  #x = null;
7576
- #S = /* @__PURE__ */ new Map();
8186
+ #S = null;
7577
8187
  #C = /* @__PURE__ */ new Map();
7578
8188
  #w = /* @__PURE__ */ new Map();
7579
- #T = null;
7580
- #E = null;
8189
+ #T = /* @__PURE__ */ new Map();
8190
+ #E = k.clone();
7581
8191
  #D = null;
7582
8192
  #O = null;
7583
8193
  #k = null;
7584
8194
  #A = null;
7585
8195
  #j = null;
7586
8196
  #M = null;
8197
+ #N = null;
8198
+ #P = null;
7587
8199
  get stream() {
7588
8200
  return this.#e.value;
7589
8201
  }
@@ -7594,33 +8206,46 @@ var H = [
7594
8206
  t !== n && (e === "stream" && (this.#e.value = n ?? "", this.#p && (this.#p.value = n ?? "")), super.attributeChangedCallback?.(e, t, n));
7595
8207
  }
7596
8208
  playAll() {
7597
- this.#X();
8209
+ this.#ne();
7598
8210
  }
7599
8211
  step() {
7600
- this.#Z();
8212
+ this.#re();
7601
8213
  }
7602
8214
  stepBack() {
7603
- this.#Q();
8215
+ this.#ie();
7604
8216
  }
7605
8217
  reset() {
7606
- this.#$();
8218
+ this.#ae();
7607
8219
  }
7608
8220
  setup() {
7609
- super.setup(), this.#G(), this.#N(), this.#k = new m(this, { closeButton: !1 }), this.addEventListener("native:present", this.#fe), this.addEventListener("native:dismiss", this.#pe), this.#b && (this.#O = new h(this.#b, {
8221
+ super.setup(), this.#Z(), this.#F(), this.#j = new m(this, { closeButton: !1 }), this.addEventListener("native:present", this.#ve), this.addEventListener("native:dismiss", this.#ye), this.#x && (this.#A = new h(this.#x, {
7610
8222
  handleSelector: ".a2ui-resize-handle",
7611
8223
  axis: "horizontal",
7612
8224
  min: 200
7613
- }), this.#b.addEventListener("native:resize-end", this.#xe)), this.#x && (this.#x.addEventListener("pointerdown", this.#V), this.#x.addEventListener("dblclick", this.#W)), this.addEffect(() => {
8225
+ }), this.#x.addEventListener("native:resize-end", this.#De)), this.#S && (this.#S.addEventListener("pointerdown", this.#q), this.#S.addEventListener("dblclick", this.#X)), this.addEffect(() => {
7614
8226
  let e = this.#n.value;
7615
- for (let [e, t] of this.#S) t.style.removeProperty("width");
7616
- for (let [t, n] of this.#S) n.hidden = !e.has(t);
7617
- for (let [t, n] of this.#w) n.toggleAttribute("data-active", e.has(t));
8227
+ for (let [e, t] of this.#C) t.style.removeProperty("width");
8228
+ for (let [t, n] of this.#C) n.hidden = !e.has(t);
8229
+ for (let [t, n] of this.#T) n.toggleAttribute("data-active", e.has(t));
7618
8230
  }), this.addEffect(() => {
8231
+ this.#E.version.value;
7619
8232
  let e = this.#l.value;
7620
- this.#v && this.#oe(this.#v, e);
8233
+ this.#v && this.#fe(this.#v, e);
8234
+ }), this.addEffect(() => {
8235
+ this.#E.version.value;
8236
+ let e = this.#y;
8237
+ if (e) {
8238
+ if (!e.extensions?.length) {
8239
+ requestAnimationFrame(() => {
8240
+ e.extensions = [E()], e.value = JSON.stringify(this.#E.toJSON(), null, 2);
8241
+ });
8242
+ return;
8243
+ }
8244
+ (e.shadowRoot ?? e).querySelector(".cm-focused") || (e.value = JSON.stringify(this.#E.toJSON(), null, 2));
8245
+ }
7621
8246
  }), this.addEffect(() => {
7622
8247
  let e = this.#i.value;
7623
- this.#re(e, this.#C.get("json-out") ?? null);
8248
+ this.#le(e, this.#w.get("json-out") ?? null);
7624
8249
  }), this.addEffect(() => {
7625
8250
  let e = this.#a.value;
7626
8251
  if (!this.#m) return;
@@ -7631,41 +8256,42 @@ var H = [
7631
8256
  this.#m.value = r ? r + "\n\n" + n : n;
7632
8257
  }), this.addEffect(() => {
7633
8258
  let e = this.#s.value;
7634
- this.#h && (this.#h.value = e ? Ue(e) : "");
8259
+ this.#h && (this.#h.value = e ? ze(e) : "");
7635
8260
  }), this.addEffect(() => {
7636
8261
  let e = this.#c.value;
7637
8262
  this.#g && (typeof e == "object" && e && Object.keys(e).length > 0 ? this.#g.value = JSON.stringify(e, null, 2) : this.#g.value = "");
7638
8263
  }), this.addEffect(() => {
7639
8264
  let e = this.#t.value, t = this.#p?.editorView;
7640
8265
  if (!t) return;
7641
- let n = this.#Y(), r = 0, i = 0, a = 0;
8266
+ let n = this.#te(), r = 0, i = 0, a = 0;
7642
8267
  for (let t = 0; t < n.length; t++) if (t < e) r = n[t].endLine;
7643
8268
  else if (t === e) {
7644
8269
  i = n[t].startLine, a = n[t].endLine;
7645
8270
  break;
7646
8271
  }
7647
- t.dispatch({ effects: Re.of({
8272
+ t.dispatch({ effects: U.of({
7648
8273
  sentUpToLine: r,
7649
8274
  nextFromLine: i,
7650
8275
  nextToLine: a
7651
8276
  }) });
7652
8277
  }), this.deferChildren(() => {
7653
- this.#q(), this.#J(), this.#e.value || this.#he("card");
8278
+ this.#$(), this.#ee(), this.#e.value || this.#xe("card");
7654
8279
  });
7655
8280
  }
7656
8281
  teardown() {
7657
- this.#O?.destroy(), this.#O = null, this.removeEventListener("native:present", this.#fe), this.removeEventListener("native:dismiss", this.#pe), this.#k?.destroy(), this.#k = null, this.#A = null, this.#j = null, this.#b?.removeEventListener("native:resize-end", this.#xe), this.#x?.removeEventListener("pointerdown", this.#V), this.#x?.removeEventListener("dblclick", this.#W), document.removeEventListener("pointermove", this.#H), document.removeEventListener("pointerup", this.#U), this.#M = null, this.#b = null, this.#x = null, this.#S.clear(), this.#C.clear(), this.#w.clear(), this.#P(), this.#p = null, this.#m = null, this.#h = null, this.#g = null, this.#_ = null, this.#v = null, this.#y = null, super.teardown();
8282
+ this.#A?.destroy(), this.#A = null, this.removeEventListener("native:present", this.#ve), this.removeEventListener("native:dismiss", this.#ye), this.#j?.destroy(), this.#j = null, this.#M = null, this.#N = null, this.#x?.removeEventListener("native:resize-end", this.#De), this.#S?.removeEventListener("pointerdown", this.#q), this.#S?.removeEventListener("dblclick", this.#X), document.removeEventListener("pointermove", this.#J), document.removeEventListener("pointerup", this.#Y), this.#P = null, this.#x = null, this.#S = null, this.#C.clear(), this.#w.clear(), this.#T.clear(), this.#I(), this.#p = null, this.#m = null, this.#h = null, this.#g = null, this.#_ = null, this.#v = null, this.#y = null, this.#b = null, super.teardown();
7658
8283
  }
7659
- #N() {
7660
- oe(), this.#T = new ae({ allowUnregistered: !0 }), this.#E = Fe(this.#T, {
8284
+ #F() {
8285
+ ae(), this.#D = new ie({ allowUnregistered: !0 }), this.#O = Me(this.#D, {
8286
+ registry: this.#E,
7661
8287
  onClientMessage: (e) => {
7662
- this.#te("received", e);
8288
+ this.#se("received", e);
7663
8289
  },
7664
8290
  onRender: (e) => {
7665
- this.#te("info", { message: `Surface ${e} rendered` }), this.#F(), this.#I(), this.#z();
8291
+ this.#se("info", { message: `Surface ${e} rendered` }), this.#V(), this.#H(), this.#G();
7666
8292
  }
7667
- }), this.#D = this.#T.bus.on((e) => e.type.startsWith("a2ui:"), (e) => {
7668
- this.#ne("action", {
8293
+ }), this.#k = this.#D.bus.on((e) => e.type.startsWith("a2ui:"), (e) => {
8294
+ this.#ce("action", {
7669
8295
  action: e.type,
7670
8296
  payload: e.payload
7671
8297
  }), this.dispatchEvent(new CustomEvent("native:a2ui-action", {
@@ -7677,18 +8303,44 @@ var H = [
7677
8303
  }));
7678
8304
  });
7679
8305
  }
7680
- #P() {
7681
- this.#D?.(), this.#D = null;
8306
+ #I() {
8307
+ this.#k?.(), this.#k = null;
7682
8308
  try {
7683
- this.#E?.destroy();
8309
+ this.#O?.destroy();
7684
8310
  } catch {}
7685
- this.#E = null, this.#T = null;
8311
+ this.#O = null, this.#D = null;
7686
8312
  }
7687
- #F() {
7688
- if (!this.#E) return;
7689
- let e = this.#E.getSurfaceIds(), t = {};
8313
+ /** Destroy and recreate adapter (after registry swap). */
8314
+ #L() {
8315
+ let e = this.#e.value;
8316
+ this.#I(), this.#F(), e && (this.#t.value = 0, this.#b && (this.#b.textContent = ""), this.stream = e, this.#ne());
8317
+ }
8318
+ #R() {
8319
+ let e = this.#y;
8320
+ if (!e) return;
8321
+ let t;
8322
+ try {
8323
+ t = JSON.parse(e.value);
8324
+ } catch {
8325
+ return;
8326
+ }
8327
+ !t || typeof t != "object" || (this.#E = me.fromJSON(t), this.#L(), this.#v && this.#fe(this.#v, this.#l.value));
8328
+ }
8329
+ #z() {
8330
+ let e = this.#y;
8331
+ if (e) try {
8332
+ let t = JSON.parse(e.value);
8333
+ e.value = JSON.stringify(t, null, 2);
8334
+ } catch {}
8335
+ }
8336
+ #B() {
8337
+ this.#E = k.clone(), this.#L(), this.#y && (this.#y.value = JSON.stringify(this.#E.toJSON(), null, 2)), this.#v && this.#fe(this.#v, this.#l.value);
8338
+ }
8339
+ #V() {
8340
+ if (!this.#O) return;
8341
+ let e = this.#O.getSurfaceIds(), t = {};
7690
8342
  for (let n of e) {
7691
- let e = this.#E.getSurface(n), r = this.#E.getDataModel(n);
8343
+ let e = this.#O.getSurface(n), r = this.#O.getDataModel(n);
7692
8344
  t[n] = {
7693
8345
  surfaceId: n,
7694
8346
  rendered: e?.rendered ?? !1,
@@ -7704,28 +8356,28 @@ var H = [
7704
8356
  detail: n
7705
8357
  }));
7706
8358
  }
7707
- #I() {
7708
- this.#y && (this.#s.value = this.#y.innerHTML);
8359
+ #H() {
8360
+ this.#b && (this.#s.value = this.#b.innerHTML);
7709
8361
  }
7710
8362
  /** Cmd+S in the HTML pane: write edited HTML back to preview. */
7711
- #L() {
7712
- !this.#h || !this.#y || (this.#y.innerHTML = this.#h.value, this.#z());
8363
+ #U() {
8364
+ !this.#h || !this.#b || (this.#b.innerHTML = this.#h.value, this.#G());
7713
8365
  }
7714
8366
  /** Cmd+S in the CSS pane: apply edited custom properties to the preview element. */
7715
- #R() {
7716
- if (!(!this.#g || !this.#y)) try {
8367
+ #W() {
8368
+ if (!(!this.#g || !this.#b)) try {
7717
8369
  let e = JSON.parse(this.#g.value).computed;
7718
- if (e) for (let [t, n] of Object.entries(e)) t.startsWith("--") && this.#y.style.setProperty(t, n);
8370
+ if (e) for (let [t, n] of Object.entries(e)) t.startsWith("--") && this.#b.style.setProperty(t, n);
7719
8371
  } catch {}
7720
8372
  }
7721
- #z() {
7722
- if (!this.#E || !this.#y) return;
7723
- let e = this.#E.getSurfaceIds(), t = {};
8373
+ #G() {
8374
+ if (!this.#O || !this.#b) return;
8375
+ let e = this.#O.getSurfaceIds(), t = {};
7724
8376
  for (let n of e) {
7725
- let e = this.#E.getSurface(n);
8377
+ let e = this.#O.getSurface(n);
7726
8378
  e?.theme && (t[`${n}/theme`] = e.theme);
7727
8379
  }
7728
- let n = getComputedStyle(this.#y), r = [
8380
+ let n = getComputedStyle(this.#b), r = [
7729
8381
  "--n-ink",
7730
8382
  "--n-background",
7731
8383
  "--n-border-color",
@@ -7745,11 +8397,11 @@ var H = [
7745
8397
  Object.keys(i).length && (t.computed = i), this.#c.value = t;
7746
8398
  }
7747
8399
  /** Get visible pane IDs in DOM order. */
7748
- #B() {
8400
+ #K() {
7749
8401
  let e = this.#n.value;
7750
- return H.filter((t) => e.has(t));
8402
+ return V.filter((t) => e.has(t));
7751
8403
  }
7752
- #V = (e) => {
8404
+ #q = (e) => {
7753
8405
  if (e.button !== 0) return;
7754
8406
  let t = e.target.closest?.(".a2ui-resize-handle");
7755
8407
  if (!t) return;
@@ -7757,33 +8409,33 @@ var H = [
7757
8409
  if (!n?.classList.contains("a2ui-pane")) return;
7758
8410
  let r = n.dataset.panel;
7759
8411
  if (!r) return;
7760
- let i = this.#B(), a = i.indexOf(r);
8412
+ let i = this.#K(), a = i.indexOf(r);
7761
8413
  if (a === -1 || a >= i.length - 1) return;
7762
- let o = i[a + 1], s = this.#S.get(o);
8414
+ let o = i[a + 1], s = this.#C.get(o);
7763
8415
  if (!s) return;
7764
8416
  e.preventDefault();
7765
- let c = this.#b?.offsetWidth ?? 0, l = s.offsetWidth, u = [];
8417
+ let c = this.#x?.offsetWidth ?? 0, l = s.offsetWidth, u = [];
7766
8418
  for (let e = 0; e <= a; e++) {
7767
- let t = this.#S.get(i[e]);
8419
+ let t = this.#C.get(i[e]);
7768
8420
  t && u.push({
7769
8421
  id: i[e],
7770
8422
  startW: t.offsetWidth
7771
8423
  });
7772
8424
  }
7773
8425
  for (let e of i) {
7774
- let t = this.#S.get(e);
8426
+ let t = this.#C.get(e);
7775
8427
  t && (t.style.width = `${t.offsetWidth}px`, t.style.removeProperty("flex-grow"));
7776
8428
  }
7777
- this.#b && (this.#b.style.width = `${c}px`), this.#M = {
8429
+ this.#x && (this.#x.style.width = `${c}px`), this.#P = {
7778
8430
  targetId: o,
7779
8431
  startX: e.clientX,
7780
8432
  previewStartW: c,
7781
8433
  targetStartW: l,
7782
8434
  leftPanes: u
7783
- }, s.setAttribute("resizing", ""), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.addEventListener("pointermove", this.#H), document.addEventListener("pointerup", this.#U);
8435
+ }, s.setAttribute("resizing", ""), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.addEventListener("pointermove", this.#J), document.addEventListener("pointerup", this.#Y);
7784
8436
  };
7785
- #H = (e) => {
7786
- let t = this.#M;
8437
+ #J = (e) => {
8438
+ let t = this.#P;
7787
8439
  if (!t) return;
7788
8440
  let n = e.clientX - t.startX, r = Math.max(150, t.targetStartW - n), i = r - t.targetStartW, a = t.leftPanes.map((e) => e.startW), o = t.previewStartW, s = r;
7789
8441
  if (i > 0) {
@@ -7802,44 +8454,44 @@ var H = [
7802
8454
  let e = t.leftPanes.length - 1;
7803
8455
  e >= 0 ? a[e] = t.leftPanes[e].startW + -i : o = t.previewStartW + -i;
7804
8456
  }
7805
- this.#b && (this.#b.style.width = `${o}px`);
7806
- let c = this.#S.get(t.targetId);
8457
+ this.#x && (this.#x.style.width = `${o}px`);
8458
+ let c = this.#C.get(t.targetId);
7807
8459
  c && (c.style.width = `${s}px`);
7808
8460
  for (let e = 0; e < t.leftPanes.length; e++) {
7809
- let n = this.#S.get(t.leftPanes[e].id);
8461
+ let n = this.#C.get(t.leftPanes[e].id);
7810
8462
  n && (n.style.width = `${a[e]}px`);
7811
8463
  }
7812
8464
  };
7813
- #U = (e) => {
7814
- let t = this.#M;
8465
+ #Y = (e) => {
8466
+ let t = this.#P;
7815
8467
  if (!t) return;
7816
- if (this.#b && this.#x) {
7817
- let e = this.#x.offsetWidth;
8468
+ if (this.#x && this.#S) {
8469
+ let e = this.#S.offsetWidth;
7818
8470
  if (e > 0) {
7819
- let t = this.#b.offsetWidth / e;
7820
- this.#b.style.width = `${(t * 100).toFixed(2)}%`;
8471
+ let t = this.#x.offsetWidth / e;
8472
+ this.#x.style.width = `${(t * 100).toFixed(2)}%`;
7821
8473
  }
7822
8474
  }
7823
- let n = this.#B(), r = [];
8475
+ let n = this.#K(), r = [];
7824
8476
  for (let e of n) {
7825
- let t = this.#S.get(e);
8477
+ let t = this.#C.get(e);
7826
8478
  r.push(t?.offsetWidth ?? 0);
7827
8479
  }
7828
8480
  let i = r.reduce((e, t) => e + t, 0);
7829
8481
  if (i > 0) for (let e = 0; e < n.length; e++) {
7830
- let t = this.#S.get(n[e]);
8482
+ let t = this.#C.get(n[e]);
7831
8483
  t && (t.style.flexGrow = String(r[e] / i * n.length), t.style.removeProperty("width"));
7832
8484
  }
7833
- this.#S.get(t.targetId)?.removeAttribute("resizing"), document.body.style.removeProperty("cursor"), document.body.style.removeProperty("user-select"), document.removeEventListener("pointermove", this.#H), document.removeEventListener("pointerup", this.#U), this.#M = null;
8485
+ this.#C.get(t.targetId)?.removeAttribute("resizing"), document.body.style.removeProperty("cursor"), document.body.style.removeProperty("user-select"), document.removeEventListener("pointermove", this.#J), document.removeEventListener("pointerup", this.#Y), this.#P = null;
7834
8486
  };
7835
- #W = (e) => {
8487
+ #X = (e) => {
7836
8488
  let t = e.target.closest?.(".a2ui-resize-handle");
7837
8489
  if (!(!t || !t.parentElement?.classList.contains("a2ui-pane"))) {
7838
- this.#b && this.#b.style.removeProperty("width");
7839
- for (let [e, t] of this.#S) t.style.removeProperty("width"), t.style.removeProperty("flex-grow");
8490
+ this.#x && this.#x.style.removeProperty("width");
8491
+ for (let [e, t] of this.#C) t.style.removeProperty("width"), t.style.removeProperty("flex-grow");
7840
8492
  }
7841
8493
  };
7842
- #G() {
8494
+ #Z() {
7843
8495
  let e = document.createElement("n-header"), t = document.createElement("n-toolbar");
7844
8496
  t.setAttribute("size", "sm"), t.setAttribute("variant", "ghost");
7845
8497
  let n = document.createElement("n-select");
@@ -7848,9 +8500,9 @@ var H = [
7848
8500
  r.setAttribute("justify", "spread"), r.innerHTML = "<span slot=\"label\">Presets</span><n-icon name=\"caret-up-down\" slot=\"trailing\"></n-icon>", n.appendChild(r);
7849
8501
  let i = document.createElement("n-listbox");
7850
8502
  i.setAttribute("popover", "");
7851
- for (let e of Ie) {
8503
+ for (let e of Ne) {
7852
8504
  if ("hidden" in e && e.hidden) continue;
7853
- let t = Object.entries(V).filter(([t, n]) => n.group === e.id);
8505
+ let t = Object.entries(B).filter(([t, n]) => n.group === e.id);
7854
8506
  if (t.length === 0) continue;
7855
8507
  let n = document.createElement("n-option-group"), r = document.createElement("n-option-group-header");
7856
8508
  r.textContent = e.label, n.appendChild(r);
@@ -7860,99 +8512,115 @@ var H = [
7860
8512
  }
7861
8513
  i.appendChild(n);
7862
8514
  }
7863
- n.appendChild(i), n.addEventListener("native:change", this.#me), t.appendChild(n);
7864
- for (let e of H) {
8515
+ n.appendChild(i), n.addEventListener("native:change", this.#be), t.appendChild(n);
8516
+ for (let e of V) {
7865
8517
  let n = document.createElement("n-button");
7866
- n.setAttribute("variant", "ghost"), n.setAttribute("size", "sm"), n.textContent = U[e], this.#n.value.has(e) && n.toggleAttribute("data-active", !0), n.addEventListener("native:press", this.#Te(e)), t.appendChild(n), this.#w.set(e, n);
8518
+ n.setAttribute("variant", "ghost"), n.setAttribute("size", "sm"), n.textContent = H[e], this.#n.value.has(e) && n.toggleAttribute("data-active", !0), n.addEventListener("native:press", this.#je(e)), t.appendChild(n), this.#T.set(e, n);
7867
8519
  }
7868
8520
  let a = document.createElement("n-button");
7869
- a.setAttribute("variant", "ghost"), a.setAttribute("size", "sm"), a.title = "Auto-play presets on load", a.innerHTML = "<n-icon name=\"lightning\"></n-icon>", a.addEventListener("native:press", this.#Ce), t.appendChild(a), this.#j = a;
8521
+ a.setAttribute("variant", "ghost"), a.setAttribute("size", "sm"), a.title = "Auto-play presets on load", a.innerHTML = "<n-icon name=\"lightning\"></n-icon>", a.addEventListener("native:press", this.#ke), t.appendChild(a), this.#N = a;
7870
8522
  let o = document.createElement("n-button");
7871
- o.setAttribute("variant", "ghost"), o.setAttribute("size", "sm"), o.title = "Expand", o.innerHTML = "<n-icon name=\"arrows-out-simple\"></n-icon>", o.addEventListener("native:press", this.#de), t.appendChild(o), this.#A = o;
8523
+ o.setAttribute("variant", "ghost"), o.setAttribute("size", "sm"), o.title = "Expand", o.innerHTML = "<n-icon name=\"arrows-out-simple\"></n-icon>", o.addEventListener("native:press", this.#_e), t.appendChild(o), this.#M = o;
7872
8524
  let s = document.createElement("div");
7873
- s.className = "a2ui-split", this.#x = s;
8525
+ s.className = "a2ui-split", this.#S = s;
7874
8526
  let c = document.createElement("div");
7875
- c.className = "a2ui-preview", this.#b = c;
8527
+ c.className = "a2ui-preview", this.#x = c;
7876
8528
  let l = document.createElement("div");
7877
- l.className = "a2ui-preview-content", c.appendChild(l), this.#y = l;
8529
+ l.className = "a2ui-preview-content", c.appendChild(l), this.#b = l;
7878
8530
  let u = document.createElement("div");
7879
8531
  u.className = "a2ui-resize-handle", c.appendChild(u), s.appendChild(c);
7880
- for (let e of H) {
8532
+ for (let e of V) {
7881
8533
  let t = document.createElement("div");
7882
8534
  t.className = "a2ui-pane", t.dataset.panel = e, this.#n.value.has(e) || (t.hidden = !0);
7883
8535
  let n = document.createElement("n-header"), r = document.createElement("nav"), i = document.createElement("n-icon");
7884
- i.setAttribute("name", Le[e]), r.appendChild(i), n.appendChild(r);
8536
+ i.setAttribute("name", Pe[e]), r.appendChild(i), n.appendChild(r);
7885
8537
  let a = document.createElement("span");
7886
- a.textContent = U[e], n.appendChild(a);
8538
+ a.textContent = H[e], n.appendChild(a);
7887
8539
  let o = document.createElement("aside");
7888
8540
  if (e === "js" || e === "html" || e === "css") {
7889
8541
  let t = document.createElement("n-button");
7890
- t.setAttribute("variant", "ghost"), t.setAttribute("size", "sm"), t.title = "Reset to computed", t.innerHTML = "<n-icon name=\"arrow-counter-clockwise\"></n-icon>", t.addEventListener("native:press", this.#we(e)), o.appendChild(t);
8542
+ t.setAttribute("variant", "ghost"), t.setAttribute("size", "sm"), t.title = "Reset to computed", t.innerHTML = "<n-icon name=\"arrow-counter-clockwise\"></n-icon>", t.addEventListener("native:press", this.#Ae(e)), o.appendChild(t);
7891
8543
  }
7892
8544
  let c = document.createElement("n-button");
7893
- if (c.setAttribute("variant", "ghost"), c.setAttribute("size", "sm"), c.title = "Close pane", c.innerHTML = "<n-icon name=\"x\"></n-icon>", c.addEventListener("native:press", this.#Te(e)), o.appendChild(c), n.appendChild(o), t.appendChild(n), e === "json-in") {
8545
+ if (c.setAttribute("variant", "ghost"), c.setAttribute("size", "sm"), c.title = "Close pane", c.innerHTML = "<n-icon name=\"x\"></n-icon>", c.addEventListener("native:press", this.#je(e)), o.appendChild(c), n.appendChild(o), t.appendChild(n), e === "json-in") {
7894
8546
  let e = document.createElement("n-toolbar");
7895
8547
  e.setAttribute("variant", "plain"), e.setAttribute("size", "sm"), e.setAttribute("fill", "");
7896
- let n = this.#K("Step back", "caret-left");
7897
- n.addEventListener("native:press", this.#ve);
7898
- let r = this.#K("Reset", "arrow-counter-clockwise");
7899
- r.addEventListener("native:press", this.#ye);
7900
- let i = this.#K("Step forward", "caret-right");
7901
- i.addEventListener("native:press", this.#_e);
7902
- let a = this.#K("Play all", "play", !0);
7903
- a.dataset.role = "run", a.addEventListener("native:press", this.#ge);
8548
+ let n = this.#Q("Step back", "caret-left");
8549
+ n.addEventListener("native:press", this.#we);
8550
+ let r = this.#Q("Reset", "arrow-counter-clockwise");
8551
+ r.addEventListener("native:press", this.#Te);
8552
+ let i = this.#Q("Step forward", "caret-right");
8553
+ i.addEventListener("native:press", this.#Ce);
8554
+ let a = this.#Q("Play all", "play", !0);
8555
+ a.dataset.role = "run", a.addEventListener("native:press", this.#Se);
7904
8556
  let o = document.createElement("div");
7905
8557
  o.className = "divider", o.setAttribute("orientation", "vertical");
7906
- let s = this.#K("Insert createSurface", "plus-circle");
7907
- s.addEventListener("native:press", this.#be("createSurface"));
7908
- let c = this.#K("Insert updateComponents", "squares-four");
7909
- c.addEventListener("native:press", this.#be("updateComponents"));
7910
- let l = this.#K("Insert updateDataModel", "database");
7911
- l.addEventListener("native:press", this.#be("updateDataModel"));
7912
- let u = this.#K("Insert deleteSurface", "minus-circle");
7913
- u.addEventListener("native:press", this.#be("deleteSurface")), e.append(n, r, i, a, o, s, c, l, u), t.appendChild(e);
8558
+ let s = this.#Q("Insert createSurface", "plus-circle");
8559
+ s.addEventListener("native:press", this.#Ee("createSurface"));
8560
+ let c = this.#Q("Insert updateComponents", "squares-four");
8561
+ c.addEventListener("native:press", this.#Ee("updateComponents"));
8562
+ let l = this.#Q("Insert updateDataModel", "database");
8563
+ l.addEventListener("native:press", this.#Ee("updateDataModel"));
8564
+ let u = this.#Q("Insert deleteSurface", "minus-circle");
8565
+ u.addEventListener("native:press", this.#Ee("deleteSurface")), e.append(n, r, i, a, o, s, c, l, u), t.appendChild(e);
8566
+ }
8567
+ if (e === "schema") {
8568
+ let e = document.createElement("n-toolbar");
8569
+ e.setAttribute("variant", "plain"), e.setAttribute("size", "sm"), e.setAttribute("fill", "");
8570
+ let n = this.#Q("Apply schema", "play", !0);
8571
+ n.addEventListener("native:press", () => this.#R());
8572
+ let r = this.#Q("Format JSON", "text-align-left");
8573
+ r.addEventListener("native:press", () => this.#z());
8574
+ let i = document.createElement("div");
8575
+ i.className = "divider", i.setAttribute("orientation", "vertical");
8576
+ let a = this.#Q("Reset to defaults", "arrow-counter-clockwise");
8577
+ a.addEventListener("native:press", () => this.#B()), e.append(n, r, i, a), t.appendChild(e);
7914
8578
  }
7915
8579
  let l = document.createElement("div");
7916
- if (l.className = "a2ui-pane-content", t.appendChild(l), this.#C.set(e, l), e === "json-in" || e === "js" || e === "html" || e === "css") {
8580
+ if (l.className = "a2ui-pane-content", t.appendChild(l), this.#w.set(e, l), e === "json-in" || e === "js" || e === "html" || e === "css") {
7917
8581
  let t = document.createElement("native-codemirror");
7918
8582
  t.setAttribute("line-numbers", "false"), l.appendChild(t), e === "json-in" ? this.#p = t : e === "js" ? this.#m = t : e === "html" ? this.#h = t : e === "css" && (this.#g = t);
7919
- } else e === "components" && (this.#v = l);
8583
+ } else if (e === "components") this.#v = l;
8584
+ else if (e === "schema") {
8585
+ let e = document.createElement("native-codemirror");
8586
+ e.setAttribute("line-numbers", "false"), l.appendChild(e), this.#y = e;
8587
+ }
7920
8588
  let u = document.createElement("div");
7921
- u.className = "a2ui-resize-handle", t.appendChild(u), s.appendChild(t), this.#S.set(e, t);
8589
+ u.className = "a2ui-resize-handle", t.appendChild(u), s.appendChild(t), this.#C.set(e, t);
7922
8590
  }
7923
8591
  e.appendChild(t), this.append(e, s);
7924
8592
  }
7925
- #K(e, t, n = !1) {
8593
+ #Q(e, t, n = !1) {
7926
8594
  let r = document.createElement("n-button");
7927
8595
  return r.title = e, r.setAttribute("variant", "ghost"), r.innerHTML = `<n-icon name="${t}"${n ? " weight=\"fill\"" : ""}></n-icon>`, r;
7928
8596
  }
7929
- #q() {
8597
+ #$() {
7930
8598
  let e = this.querySelector("script[type=\"a2ui/stream\"]");
7931
8599
  if (e) {
7932
8600
  let t = (e.textContent ?? "").trim();
7933
8601
  this.#e.value = t, e.remove();
7934
8602
  }
7935
8603
  }
7936
- #J() {
8604
+ #ee() {
7937
8605
  if (!this.#p) return;
7938
8606
  this.#p.value = this.#e.value, this.#p.extensions = [
7939
- T(),
7940
- Ve,
7941
- ie(ce)
8607
+ E(),
8608
+ Le,
8609
+ re(se)
7942
8610
  ], this.#p.addEventListener("native:input", (e) => {
7943
8611
  this.#e.value = e.detail.value;
7944
8612
  });
7945
- let e = re.of([{
8613
+ let e = T.of([{
7946
8614
  key: "Mod-s",
7947
- run: () => (this.#L(), !0)
7948
- }]), t = re.of([{
8615
+ run: () => (this.#U(), !0)
8616
+ }]), t = T.of([{
7949
8617
  key: "Mod-s",
7950
- run: () => (this.#R(), !0)
8618
+ run: () => (this.#W(), !0)
7951
8619
  }]);
7952
- this.#m && (this.#m.extensions = [T()]), this.#h && (this.#h.extensions = [e]), this.#g && (this.#g.extensions = [T(), t]);
8620
+ this.#m && (this.#m.extensions = [E()]), this.#h && (this.#h.extensions = [e]), this.#g && (this.#g.extensions = [E(), t]);
7953
8621
  }
7954
8622
  /** Parse JSON envelopes from the editor stream (supports multi-line formatted JSON). */
7955
- #Y() {
8623
+ #te() {
7956
8624
  let e = this.#e.value;
7957
8625
  if (!e.trim()) return [];
7958
8626
  let t = [], n = 0, r = -1, i = !1, a = !1;
@@ -7984,84 +8652,84 @@ var H = [
7984
8652
  }
7985
8653
  return t;
7986
8654
  }
7987
- #X() {
7988
- let e = this.#Y();
7989
- if (!(!this.#E || !this.#y)) {
8655
+ #ne() {
8656
+ let e = this.#te();
8657
+ if (!(!this.#O || !this.#b)) {
7990
8658
  for (let t = this.#t.value; t < e.length; t++) try {
7991
8659
  let n = JSON.parse(e[t].text);
7992
- this.#ee("sent", n), this.#E.receive(n, this.#y), this.#Se(n);
8660
+ this.#oe("sent", n), this.#O.receive(n, this.#b), this.#Oe(n);
7993
8661
  } catch (n) {
7994
- this.#ee("error", {
8662
+ this.#oe("error", {
7995
8663
  envelope: t + 1,
7996
8664
  message: String(n),
7997
8665
  raw: e[t].text
7998
8666
  });
7999
8667
  }
8000
- this.#t.value = e.length, this.#F(), this.#I(), this.#z();
8668
+ this.#t.value = e.length, this.#V(), this.#H(), this.#G();
8001
8669
  }
8002
8670
  }
8003
- #Z() {
8004
- let e = this.#Y();
8005
- if (!this.#E || !this.#y) return;
8671
+ #re() {
8672
+ let e = this.#te();
8673
+ if (!this.#O || !this.#b) return;
8006
8674
  let t = this.#t.value;
8007
8675
  if (!(t >= e.length)) {
8008
8676
  try {
8009
8677
  let n = JSON.parse(e[t].text);
8010
- this.#ee("sent", n), this.#E.receive(n, this.#y), this.#Se(n);
8678
+ this.#oe("sent", n), this.#O.receive(n, this.#b), this.#Oe(n);
8011
8679
  } catch (n) {
8012
- this.#ee("error", {
8680
+ this.#oe("error", {
8013
8681
  envelope: t + 1,
8014
8682
  message: String(n),
8015
8683
  raw: e[t].text
8016
8684
  });
8017
8685
  }
8018
- this.#t.value = t + 1, this.#F(), this.#I(), this.#z();
8686
+ this.#t.value = t + 1, this.#V(), this.#H(), this.#G();
8019
8687
  }
8020
8688
  }
8021
- #Q() {
8689
+ #ie() {
8022
8690
  if (this.#t.value <= 0) return;
8023
8691
  let e = this.#t.value - 1;
8024
- this.#P(), this.#y && (this.#y.textContent = ""), this.#r.value = [], this.#i.value = [], this.#a.value = [], this.#o.value = null, this.#s.value = "", this.#c.value = null, this.#l.value = /* @__PURE__ */ new Set(), this.#u.value = "demo", this.#N(), this.#t.value = 0;
8025
- let t = this.#Y();
8026
- if (!(!this.#E || !this.#y)) {
8692
+ this.#I(), this.#b && (this.#b.textContent = ""), this.#r.value = [], this.#i.value = [], this.#a.value = [], this.#o.value = null, this.#s.value = "", this.#c.value = null, this.#l.value = /* @__PURE__ */ new Set(), this.#u.value = "demo", this.#F(), this.#t.value = 0;
8693
+ let t = this.#te();
8694
+ if (!(!this.#O || !this.#b)) {
8027
8695
  for (let n = 0; n < e; n++) try {
8028
8696
  let e = JSON.parse(t[n].text);
8029
- this.#ee("sent", e), this.#E.receive(e, this.#y), this.#Se(e);
8697
+ this.#oe("sent", e), this.#O.receive(e, this.#b), this.#Oe(e);
8030
8698
  } catch (e) {
8031
- this.#ee("error", {
8699
+ this.#oe("error", {
8032
8700
  envelope: n + 1,
8033
8701
  message: String(e),
8034
8702
  raw: t[n].text
8035
8703
  });
8036
8704
  }
8037
- this.#t.value = e, this.#F(), this.#I(), this.#z();
8705
+ this.#t.value = e, this.#V(), this.#H(), this.#G();
8038
8706
  }
8039
8707
  }
8040
- #$() {
8041
- this.#P(), this.#y && (this.#y.textContent = ""), this.#t.value = 0, this.#f = 0, this.#r.value = [], this.#i.value = [], this.#a.value = [], this.#m && (this.#m.value = ""), this.#o.value = null, this.#s.value = "", this.#c.value = null, this.#l.value = /* @__PURE__ */ new Set(), this.#ie = null, this.#ae = "info", this.#u.value = "demo", this.#N();
8708
+ #ae() {
8709
+ this.#I(), this.#b && (this.#b.textContent = ""), this.#t.value = 0, this.#f = 0, this.#r.value = [], this.#i.value = [], this.#a.value = [], this.#m && (this.#m.value = ""), this.#o.value = null, this.#s.value = "", this.#c.value = null, this.#l.value = /* @__PURE__ */ new Set(), this.#ue = null, this.#de = "info", this.#u.value = "demo", this.#F();
8042
8710
  }
8043
- #ee(e, t) {
8711
+ #oe(e, t) {
8044
8712
  this.#r.value = [...this.#r.value, {
8045
8713
  type: e,
8046
8714
  data: t,
8047
8715
  timestamp: Date.now()
8048
8716
  }];
8049
8717
  }
8050
- #te(e, t) {
8718
+ #se(e, t) {
8051
8719
  this.#i.value = [...this.#i.value, {
8052
8720
  type: e,
8053
8721
  data: t,
8054
8722
  timestamp: Date.now()
8055
8723
  }];
8056
8724
  }
8057
- #ne(e, t) {
8725
+ #ce(e, t) {
8058
8726
  this.#a.value = [...this.#a.value, {
8059
8727
  type: e,
8060
8728
  data: t,
8061
8729
  timestamp: Date.now()
8062
8730
  }];
8063
8731
  }
8064
- #re(e, t) {
8732
+ #le(e, t) {
8065
8733
  if (t) {
8066
8734
  if (t.textContent = "", e.length === 0) {
8067
8735
  let e = document.createElement("span");
@@ -8084,11 +8752,11 @@ var H = [
8084
8752
  }
8085
8753
  }
8086
8754
  /** Render the A2UI → native-ui component mapping table. */
8087
- #ie = null;
8088
- #ae = "info";
8089
- #oe(e, t) {
8090
- if (e.textContent = "", this.#ie) {
8091
- this.#se(e, this.#ie, t);
8755
+ #ue = null;
8756
+ #de = "info";
8757
+ #fe(e, t) {
8758
+ if (e.textContent = "", this.#ue) {
8759
+ this.#pe(e, this.#ue, t);
8092
8760
  return;
8093
8761
  }
8094
8762
  let n = document.createElement("table");
@@ -8104,7 +8772,7 @@ var H = [
8104
8772
  }
8105
8773
  r.appendChild(i), n.appendChild(r);
8106
8774
  let a = document.createElement("tbody");
8107
- for (let [n, r] of A) {
8775
+ for (let [n, r] of this.#E) {
8108
8776
  let n = document.createElement("tr");
8109
8777
  n.className = "a2ui-map-row", t.has(r.a2uiType) && n.classList.add("a2ui-map-active");
8110
8778
  let i = document.createElement("td");
@@ -8112,39 +8780,39 @@ var H = [
8112
8780
  let o = document.createElement("td"), s = document.createElement("code");
8113
8781
  s.textContent = r.nativeTag, o.appendChild(s);
8114
8782
  let c = document.createElement("td");
8115
- c.textContent = N(r.a2uiType), c.className = "a2ui-map-category", n.append(i, o, c), n.addEventListener("click", () => {
8116
- this.#ie = r.a2uiType, this.#oe(e, t);
8783
+ c.textContent = this.#E.getComponentCategory(r.a2uiType), c.className = "a2ui-map-category", n.append(i, o, c), n.addEventListener("click", () => {
8784
+ this.#ue = r.a2uiType, this.#fe(e, t);
8117
8785
  }), a.appendChild(n);
8118
8786
  }
8119
8787
  n.appendChild(a);
8120
8788
  let o = document.createElement("div");
8121
- o.className = "a2ui-map-summary", o.textContent = t.size > 0 ? `${t.size} of ${A.size} types active` : `${A.size} supported component types`, e.append(o, n);
8789
+ o.className = "a2ui-map-summary", o.textContent = t.size > 0 ? `${t.size} of ${this.#E.size} types active` : `${this.#E.size} supported component types`, e.append(o, n);
8122
8790
  }
8123
- #se(e, t, n) {
8124
- let r = A.get(t);
8791
+ #pe(e, t, n) {
8792
+ let r = this.#E.get(t);
8125
8793
  if (!r) return;
8126
8794
  let i = document.createElement("n-header");
8127
8795
  i.className = "a2ui-map-detail-header";
8128
8796
  let a = document.createElement("nav"), o = document.createElement("n-button");
8129
8797
  o.setAttribute("variant", "ghost"), o.setAttribute("size", "sm"), o.className = "a2ui-map-back", o.innerHTML = `<n-icon name="caret-left"></n-icon> ${r.a2uiType}`, o.addEventListener("native:press", () => {
8130
- this.#ie = null, this.#ae = "info", this.#_ = null, this.#oe(e, n);
8798
+ this.#ue = null, this.#de = "info", this.#_ = null, this.#fe(e, n);
8131
8799
  }), a.appendChild(o), i.appendChild(a);
8132
- let s = this.#ce(t), c = s.length > 0, l = document.createElement("aside"), u = document.createElement("n-segmented-control");
8133
- u.className = "a2ui-map-tab-bar", u.setAttribute("size", "xs"), u.setAttribute("inline", ""), u.value = this.#ae;
8800
+ let s = this.#me(t), c = s.length > 0, l = document.createElement("aside"), u = document.createElement("n-segmented-control");
8801
+ u.className = "a2ui-map-tab-bar", u.setAttribute("size", "xs"), u.setAttribute("inline", ""), u.value = this.#de;
8134
8802
  let d = document.createElement("n-segment");
8135
8803
  d.setAttribute("value", "info"), d.textContent = "Info";
8136
8804
  let f = document.createElement("n-segment");
8137
8805
  if (f.setAttribute("value", "json"), f.textContent = c ? `JSON (${s.length})` : "JSON", c || f.setAttribute("disabled", ""), u.append(d, f), u.addEventListener("native:change", (t) => {
8138
8806
  let r = t.detail;
8139
- (r?.value === "info" || r?.value === "json") && (this.#ae = r.value, this.#oe(e, n));
8140
- }), l.appendChild(u), i.appendChild(l), e.appendChild(i), this.#ae === "info") {
8807
+ (r?.value === "info" || r?.value === "json") && (this.#de = r.value, this.#fe(e, n));
8808
+ }), l.appendChild(u), i.appendChild(l), e.appendChild(i), this.#de === "info") {
8141
8809
  this.#_ = null;
8142
8810
  let i = document.createElement("div");
8143
8811
  i.className = "a2ui-map-detail";
8144
8812
  let a = [
8145
8813
  ["Tag", r.nativeTag],
8146
8814
  ["Children", r.childStrategy],
8147
- ["Category", N(r.a2uiType)]
8815
+ ["Category", this.#E.getComponentCategory(r.a2uiType)]
8148
8816
  ];
8149
8817
  r.actionEvent && a.push(["Action", r.actionEvent]), r.defaultAttributes && a.push(["Defaults", Object.entries(r.defaultAttributes).map(([e, t]) => `${e}="${t}"`).join(", ")]), r.propertyMap && a.push(["Props", Object.entries(r.propertyMap).map(([e, t]) => `${e} → ${t}`).join(", ")]), r.variantMap && a.push(["Variants", Object.keys(r.variantMap).join(", ")]);
8150
8818
  for (let [e, t] of a) {
@@ -8156,14 +8824,14 @@ var H = [
8156
8824
  a.textContent = t, n.append(r, a), i.appendChild(n);
8157
8825
  }
8158
8826
  e.appendChild(i);
8159
- let o = Ce(r.a2uiType).filter((e) => e !== t), s = n.has(t);
8827
+ let o = this.#E.getCompatibleTypes(r.a2uiType).filter((e) => e !== t), s = n.has(t);
8160
8828
  if (o.length > 0) {
8161
8829
  let r = document.createElement("div");
8162
8830
  r.className = "a2ui-map-alternatives";
8163
8831
  let i = document.createElement("div");
8164
8832
  i.className = "a2ui-map-alt-title", i.textContent = s ? "Swap To" : "Compatible Alternatives", r.appendChild(i);
8165
8833
  for (let i of o) {
8166
- let a = A.get(i);
8834
+ let a = this.#E.get(i);
8167
8835
  if (!a) continue;
8168
8836
  let o = document.createElement("div");
8169
8837
  if (o.className = "a2ui-map-alt-row", n.has(i) && o.classList.add("a2ui-map-active"), s) {
@@ -8174,29 +8842,32 @@ var H = [
8174
8842
  c.className = "a2ui-map-type", c.textContent = i;
8175
8843
  let l = document.createElement("code");
8176
8844
  l.textContent = a.nativeTag, o.append(c, l), s ? o.addEventListener("click", () => {
8177
- this.#ue(t, i), this.#ie = i, this.#ae = "info", this.#_ = null, this.#oe(e, this.#l.value);
8845
+ this.#ge(t, i), this.#ue = i, this.#de = "info", this.#_ = null, this.#fe(e, this.#l.value);
8178
8846
  }) : o.addEventListener("click", () => {
8179
- this.#ie = i, this.#ae = "info", this.#_ = null, this.#oe(e, n);
8847
+ this.#ue = i, this.#de = "info", this.#_ = null, this.#fe(e, n);
8180
8848
  }), r.appendChild(o);
8181
8849
  }
8182
8850
  e.appendChild(r);
8183
8851
  }
8184
8852
  return;
8185
8853
  }
8186
- let p = document.createElement("div");
8187
- p.className = "a2ui-map-editor-section";
8188
- let m = document.createElement("n-toolbar");
8189
- m.className = "a2ui-map-editor-toolbar";
8190
- let h = document.createElement("n-button");
8191
- h.setAttribute("variant", "ghost"), h.setAttribute("size", "sm"), h.title = "Apply changes to stream", h.innerHTML = "<n-icon name=\"play\" weight=\"fill\"></n-icon>", h.addEventListener("native:press", () => this.#le(t)), m.appendChild(h), p.appendChild(m);
8192
- let g = document.createElement("native-codemirror");
8193
- g.setAttribute("line-numbers", "false"), p.appendChild(g), this.#_ = g, requestAnimationFrame(() => {
8194
- g.extensions = [T()], g.value = JSON.stringify(s, null, 2);
8195
- }), e.appendChild(p);
8854
+ if (this.#de === "json") {
8855
+ let n = document.createElement("div");
8856
+ n.className = "a2ui-map-editor-section";
8857
+ let r = document.createElement("n-toolbar");
8858
+ r.className = "a2ui-map-editor-toolbar";
8859
+ let i = document.createElement("n-button");
8860
+ i.setAttribute("variant", "ghost"), i.setAttribute("size", "sm"), i.title = "Apply changes to stream", i.innerHTML = "<n-icon name=\"play\" weight=\"fill\"></n-icon>", i.addEventListener("native:press", () => this.#he(t)), r.appendChild(i), n.appendChild(r);
8861
+ let a = document.createElement("native-codemirror");
8862
+ a.setAttribute("line-numbers", "false"), n.appendChild(a), this.#_ = a, requestAnimationFrame(() => {
8863
+ a.extensions = [E()], a.value = JSON.stringify(s, null, 2);
8864
+ }), e.appendChild(n);
8865
+ return;
8866
+ }
8196
8867
  }
8197
8868
  /** Extract all component instances of a given A2UI type from the current envelopes. */
8198
- #ce(e) {
8199
- let t = this.#Y(), n = [];
8869
+ #me(e) {
8870
+ let t = this.#te(), n = [];
8200
8871
  for (let r of t) try {
8201
8872
  let t = JSON.parse(r.text).updateComponents;
8202
8873
  if (t?.components) for (let r of t.components) r.component === e && n.push(r);
@@ -8204,7 +8875,7 @@ var H = [
8204
8875
  return n;
8205
8876
  }
8206
8877
  /** Apply edited component JSON back into the stream envelopes and replay. */
8207
- #le(e) {
8878
+ #he(e) {
8208
8879
  if (!this.#_) return;
8209
8880
  let t;
8210
8881
  try {
@@ -8215,7 +8886,7 @@ var H = [
8215
8886
  if (!Array.isArray(t)) return;
8216
8887
  let n = /* @__PURE__ */ new Map();
8217
8888
  for (let e of t) e.id && typeof e.id == "string" && n.set(e.id, e);
8218
- let r = this.#Y(), i = [];
8889
+ let r = this.#te(), i = [];
8219
8890
  for (let t of r) try {
8220
8891
  let r = JSON.parse(t.text), a = r.updateComponents;
8221
8892
  if (a?.components) for (let t = 0; t < a.components.length; t++) {
@@ -8229,15 +8900,15 @@ var H = [
8229
8900
  } catch {
8230
8901
  i.push(t.text);
8231
8902
  }
8232
- let a = i.join("\n\n"), o = this.#ie;
8233
- if (this.#$(), this.#ie = o, this.stream = a, this.#X(), this.#_) {
8234
- let t = this.#ce(e);
8903
+ let a = i.join("\n\n"), o = this.#ue;
8904
+ if (this.#ae(), this.#ue = o, this.stream = a, this.#ne(), this.#_) {
8905
+ let t = this.#me(e);
8235
8906
  this.#_.value = JSON.stringify(t, null, 2);
8236
8907
  }
8237
8908
  }
8238
8909
  /** Swap all instances of one A2UI component type for another in the stream and replay. */
8239
- #ue(e, t) {
8240
- let n = this.#Y();
8910
+ #ge(e, t) {
8911
+ let n = this.#te();
8241
8912
  if (n.length === 0) return;
8242
8913
  let r = [];
8243
8914
  for (let i of n) try {
@@ -8247,41 +8918,41 @@ var H = [
8247
8918
  } catch {
8248
8919
  r.push(i.text);
8249
8920
  }
8250
- let i = r.join("\n\n"), a = this.#ie;
8251
- this.#$(), this.#ie = a, this.stream = i, this.#X();
8921
+ let i = r.join("\n\n"), a = this.#ue;
8922
+ this.#ae(), this.#ue = a, this.stream = i, this.#ne();
8252
8923
  }
8253
- #de = () => {
8254
- this.#k?.toggle();
8924
+ #_e = () => {
8925
+ this.#j?.toggle();
8255
8926
  };
8256
- #fe = () => {
8257
- this.#A && (this.#A.innerHTML = "<n-icon name=\"x\"></n-icon>", this.#A.title = "Close");
8927
+ #ve = () => {
8928
+ this.#M && (this.#M.innerHTML = "<n-icon name=\"x\"></n-icon>", this.#M.title = "Close");
8258
8929
  };
8259
- #pe = () => {
8260
- this.#A && (this.#A.innerHTML = "<n-icon name=\"arrows-out-simple\"></n-icon>", this.#A.title = "Expand");
8930
+ #ye = () => {
8931
+ this.#M && (this.#M.innerHTML = "<n-icon name=\"arrows-out-simple\"></n-icon>", this.#M.title = "Expand");
8261
8932
  };
8262
- #me = (e) => {
8933
+ #be = (e) => {
8263
8934
  let t = e.detail?.value;
8264
- t && this.#he(t);
8935
+ t && this.#xe(t);
8265
8936
  };
8266
- #he(e) {
8267
- if (!V[e]) return;
8268
- let t = V[e].envelopes.map((e) => JSON.stringify(e, null, 2)).join("\n\n");
8269
- this.#$(), this.stream = t, this.#X();
8937
+ #xe(e) {
8938
+ if (!B[e]) return;
8939
+ let t = B[e].envelopes.map((e) => JSON.stringify(e, null, 2)).join("\n\n");
8940
+ this.#ae(), this.stream = t, this.#ne();
8270
8941
  }
8271
- #ge = () => {
8272
- this.#X();
8942
+ #Se = () => {
8943
+ this.#ne();
8273
8944
  };
8274
- #_e = () => {
8275
- this.#Z();
8945
+ #Ce = () => {
8946
+ this.#re();
8276
8947
  };
8277
- #ve = () => {
8278
- this.#Q();
8948
+ #we = () => {
8949
+ this.#ie();
8279
8950
  };
8280
- #ye = () => {
8281
- this.#$();
8951
+ #Te = () => {
8952
+ this.#ae();
8282
8953
  };
8283
8954
  /** Insert a lifecycle envelope template at the end of the editor stream. */
8284
- #be = (e) => () => {
8955
+ #Ee = (e) => () => {
8285
8956
  let t = this.#u.value, n = {
8286
8957
  createSurface: {
8287
8958
  createSurface: { surfaceId: t },
@@ -8322,15 +8993,15 @@ var H = [
8322
8993
  a.dispatch({ selection: { anchor: a.state.doc.line(e).from } }), a.dispatch({ effects: w.scrollIntoView(a.state.doc.line(e).from) });
8323
8994
  }
8324
8995
  };
8325
- #xe = () => {
8326
- if (!this.#b || !this.#x) return;
8327
- let e = this.#x.offsetWidth;
8996
+ #De = () => {
8997
+ if (!this.#x || !this.#S) return;
8998
+ let e = this.#S.offsetWidth;
8328
8999
  if (e <= 0) return;
8329
- let t = this.#b.offsetWidth / e;
8330
- this.#b.style.width = `${(t * 100).toFixed(2)}%`;
9000
+ let t = this.#x.offsetWidth / e;
9001
+ this.#x.style.width = `${(t * 100).toFixed(2)}%`;
8331
9002
  };
8332
9003
  /** Track A2UI component types used in updateComponents envelopes. */
8333
- #Se(e) {
9004
+ #Oe(e) {
8334
9005
  let t = e.updateComponents;
8335
9006
  if (t?.components) {
8336
9007
  t.surfaceId && (this.#u.value = t.surfaceId);
@@ -8339,11 +9010,11 @@ var H = [
8339
9010
  this.#l.value = e;
8340
9011
  }
8341
9012
  }
8342
- #Ce = () => {
8343
- this.#d.value = !this.#d.value, this.#j?.toggleAttribute("data-active", this.#d.value);
9013
+ #ke = () => {
9014
+ this.#d.value = !this.#d.value, this.#N?.toggleAttribute("data-active", this.#d.value);
8344
9015
  };
8345
9016
  /** Reset an editable pane to its computed/generated content. */
8346
- #we = (e) => () => {
9017
+ #Ae = (e) => () => {
8347
9018
  if (e === "js") {
8348
9019
  if (!this.#m) return;
8349
9020
  let e = this.#a.value;
@@ -8351,19 +9022,19 @@ var H = [
8351
9022
  } else if (e === "html") {
8352
9023
  if (!this.#h) return;
8353
9024
  let e = this.#s.value;
8354
- this.#h.value = e ? Ue(e) : "";
9025
+ this.#h.value = e ? ze(e) : "";
8355
9026
  } else if (e === "css") {
8356
9027
  if (!this.#g) return;
8357
9028
  let e = this.#c.value;
8358
9029
  typeof e == "object" && e && Object.keys(e).length > 0 ? this.#g.value = JSON.stringify(e, null, 2) : this.#g.value = "";
8359
9030
  }
8360
9031
  };
8361
- #Te = (e) => () => {
9032
+ #je = (e) => () => {
8362
9033
  let t = new Set(this.#n.value);
8363
9034
  t.has(e) ? t.delete(e) : t.add(e), this.#n.value = t;
8364
9035
  };
8365
9036
  };
8366
- function Ue(e) {
9037
+ function ze(e) {
8367
9038
  let t = "", n = 0, r = 0;
8368
9039
  for (; r < e.length;) if (e[r] === "<") {
8369
9040
  let i = e.indexOf(">", r);
@@ -8378,7 +9049,7 @@ function Ue(e) {
8378
9049
  }
8379
9050
  return t.trimEnd();
8380
9051
  }
8381
- y("native-a2ui", He), y("n-button", e), y("n-icon", r), y("n-toolbar", f), y("n-select", u), y("n-listbox", i), y("n-option", a), y("n-option-group", o), y("n-option-group-header", s), y("n-segmented-control", l), y("n-segment", c), b("caret-left", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z\"/></svg>"), b("caret-right", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z\"/></svg>"), b("arrow-counter-clockwise", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z\"/></svg>"), b("play-fill", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M240,128a15.74,15.74,0,0,1-7.6,13.51L88.32,229.65a16,16,0,0,1-16.2.3A15.86,15.86,0,0,1,64,216.13V39.87a15.86,15.86,0,0,1,8.12-13.82,16,16,0,0,1,16.2.3L232.4,114.49A15.74,15.74,0,0,1,240,128Z\"/></svg>"), b("arrows-out-simple", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M216,48V96a8,8,0,0,1-16,0V67.31l-50.34,50.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM106.34,138.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l50.35-50.34a8,8,0,0,0-11.32-11.32Z\"/></svg>"), b("arrows-in-simple", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M213.66,53.66,163.31,104H192a8,8,0,0,1,0,16H144a8,8,0,0,1-8-8V64a8,8,0,0,1,16,0V92.69l50.34-50.35a8,8,0,0,1,11.32,11.32ZM112,136H64a8,8,0,0,0,0,16H92.69L42.34,202.34a8,8,0,0,0,11.32,11.32L104,163.31V192a8,8,0,0,0,16,0V144A8,8,0,0,0,112,136Z\"/></svg>"), b("x", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z\"/></svg>"), b("caret-up-down", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z\"/></svg>"), b("lightning", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.38a8,8,0,0,0,5,9.06l52.8,19.8Z\"/></svg>"), b("plus", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z\"/></svg>"), b("arrows-left-right", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z\"/></svg>"), b("plus-circle", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm48-88a8,8,0,0,1-8,8H136v32a8,8,0,0,1-16,0V136H88a8,8,0,0,1,0-16h32V88a8,8,0,0,1,16,0v32h32A8,8,0,0,1,176,128Z\"/></svg>"), b("minus-circle", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M176,128a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h80A8,8,0,0,1,176,128Zm56,0A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z\"/></svg>"), b("database", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M128,24C74.17,24,32,48.6,32,80v96c0,31.4,42.17,56,96,56s96-24.6,96-56V80C224,48.6,181.83,24,128,24Zm80,104c0,9.62-7.88,19.43-21.61,26.92C170.93,163.35,150.19,168,128,168s-42.93-4.65-58.39-13.08C55.88,147.43,48,137.62,48,128V111.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64ZM69.61,53.08C85.07,44.65,105.81,40,128,40s42.93,4.65,58.39,13.08C200.12,60.57,208,70.38,208,80s-7.88,19.43-21.61,26.92C170.93,115.35,150.19,120,128,120s-42.93-4.65-58.39-13.08C55.88,99.43,48,89.62,48,80S55.88,60.57,69.61,53.08ZM186.39,202.92C170.93,211.35,150.19,216,128,216s-42.93-4.65-58.39-13.08C55.88,195.43,48,185.62,48,176V159.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64V176C208,185.62,200.12,195.43,186.39,202.92Z\"/></svg>"), b("play", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z\"/></svg>"), b("brackets-curly", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M43.18,128a29.78,29.78,0,0,1,8,10.26c4.8,9.9,4.8,22,4.8,33.74,0,24.31,1,36,24,36a8,8,0,0,1,0,16c-17.48,0-29.32-6.14-35.2-18.26-4.8-9.9-4.8-22-4.8-33.74,0-24.31-1-36-24-36a8,8,0,0,1,0-16c23,0,24-11.69,24-36,0-11.72,0-23.84,4.8-33.74C50.68,38.14,62.52,32,80,32a8,8,0,0,1,0,16C57,48,56,59.69,56,84c0,11.72,0,23.84-4.8,33.74A29.78,29.78,0,0,1,43.18,128ZM240,120c-23,0-24-11.69-24-36,0-11.72,0-23.84-4.8-33.74C205.32,38.14,193.48,32,176,32a8,8,0,0,0,0,16c23,0,24,11.69,24,36,0,11.72,0,23.84,4.8,33.74a29.78,29.78,0,0,0,8,10.26,29.78,29.78,0,0,0-8,10.26c-4.8,9.9-4.8,22-4.8,33.74,0,24.31-1,36-24,36a8,8,0,0,0,0,16c17.48,0,29.32-6.14,35.2-18.26,4.8-9.9,4.8-22,4.8-33.74,0-24.31,1-36,24-36a8,8,0,0,0,0-16Z\"/></svg>"), b("chat-circle-dots", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128ZM84,116a12,12,0,1,0,12,12A12,12,0,0,0,84,116Zm88,0a12,12,0,1,0,12,12A12,12,0,0,0,172,116Zm60,12A104,104,0,0,1,79.12,219.82L45.07,231.17a16,16,0,0,1-20.24-20.24l11.35-34.05A104,104,0,1,1,232,128Zm-16,0A88,88,0,1,0,51.81,172.06a8,8,0,0,1,.66,6.54L40,216,77.4,203.53a7.85,7.85,0,0,1,2.53-.42,8,8,0,0,1,4,1.08A88,88,0,0,0,216,128Z\"/></svg>"), b("code", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M69.12,94.15,28.5,128l40.62,33.85a8,8,0,1,1-10.24,12.29l-48-40a8,8,0,0,1,0-12.29l48-40a8,8,0,0,1,10.24,12.3Zm176,27.7-48-40a8,8,0,1,0-10.24,12.3L227.5,128l-40.62,33.85a8,8,0,1,0,10.24,12.29l48-40a8,8,0,0,0,0-12.29ZM162.73,32.48a8,8,0,0,0-10.25,4.79l-64,176a8,8,0,0,0,4.79,10.26A8.14,8.14,0,0,0,96,224a8,8,0,0,0,7.52-5.27l64-176A8,8,0,0,0,162.73,32.48Z\"/></svg>"), b("palette", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89Zm13,93.71A15.89,15.89,0,0,1,198.21,160H152a32,32,0,0,0-32,32,16,16,0,0,1-21.31,15.07C62.49,194.3,40,164,40,128a88,88,0,0,1,87.09-88h.9a88.35,88.35,0,0,1,88,87.25A88.86,88.86,0,0,1,213.81,147.6ZM140,76a12,12,0,1,1-12-12A12,12,0,0,1,140,76ZM96,100A12,12,0,1,1,84,88,12,12,0,0,1,96,100Zm0,56a12,12,0,1,1-12-12A12,12,0,0,1,96,156Zm88-56a12,12,0,1,1-12-12A12,12,0,0,1,184,100Z\"/></svg>"), b("terminal", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M117.31,134l-72,64a8,8,0,1,1-10.63-12L100,128,34.69,70A8,8,0,1,1,45.32,58l72,64a8,8,0,0,1,0,12ZM216,184H120a8,8,0,0,0,0,16h96a8,8,0,0,0,0-16Z\"/></svg>"), b("squares-four", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-96,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Zm0,64H152V152h48v48Z\"/></svg>");
9052
+ y("native-a2ui", Re), y("n-button", e), y("n-icon", r), y("n-toolbar", f), y("n-select", u), y("n-listbox", i), y("n-option", a), y("n-option-group", o), y("n-option-group-header", s), y("n-segmented-control", l), y("n-segment", c), b("caret-left", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z\"/></svg>"), b("caret-right", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z\"/></svg>"), b("arrow-counter-clockwise", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z\"/></svg>"), b("play-fill", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M240,128a15.74,15.74,0,0,1-7.6,13.51L88.32,229.65a16,16,0,0,1-16.2.3A15.86,15.86,0,0,1,64,216.13V39.87a15.86,15.86,0,0,1,8.12-13.82,16,16,0,0,1,16.2.3L232.4,114.49A15.74,15.74,0,0,1,240,128Z\"/></svg>"), b("arrows-out-simple", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M216,48V96a8,8,0,0,1-16,0V67.31l-50.34,50.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM106.34,138.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l50.35-50.34a8,8,0,0,0-11.32-11.32Z\"/></svg>"), b("arrows-in-simple", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M213.66,53.66,163.31,104H192a8,8,0,0,1,0,16H144a8,8,0,0,1-8-8V64a8,8,0,0,1,16,0V92.69l50.34-50.35a8,8,0,0,1,11.32,11.32ZM112,136H64a8,8,0,0,0,0,16H92.69L42.34,202.34a8,8,0,0,0,11.32,11.32L104,163.31V192a8,8,0,0,0,16,0V144A8,8,0,0,0,112,136Z\"/></svg>"), b("x", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z\"/></svg>"), b("caret-up-down", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z\"/></svg>"), b("lightning", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.38a8,8,0,0,0,5,9.06l52.8,19.8Z\"/></svg>"), b("plus", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z\"/></svg>"), b("arrows-left-right", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z\"/></svg>"), b("plus-circle", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm48-88a8,8,0,0,1-8,8H136v32a8,8,0,0,1-16,0V136H88a8,8,0,0,1,0-16h32V88a8,8,0,0,1,16,0v32h32A8,8,0,0,1,176,128Z\"/></svg>"), b("minus-circle", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M176,128a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h80A8,8,0,0,1,176,128Zm56,0A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z\"/></svg>"), b("database", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M128,24C74.17,24,32,48.6,32,80v96c0,31.4,42.17,56,96,56s96-24.6,96-56V80C224,48.6,181.83,24,128,24Zm80,104c0,9.62-7.88,19.43-21.61,26.92C170.93,163.35,150.19,168,128,168s-42.93-4.65-58.39-13.08C55.88,147.43,48,137.62,48,128V111.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64ZM69.61,53.08C85.07,44.65,105.81,40,128,40s42.93,4.65,58.39,13.08C200.12,60.57,208,70.38,208,80s-7.88,19.43-21.61,26.92C170.93,115.35,150.19,120,128,120s-42.93-4.65-58.39-13.08C55.88,99.43,48,89.62,48,80S55.88,60.57,69.61,53.08ZM186.39,202.92C170.93,211.35,150.19,216,128,216s-42.93-4.65-58.39-13.08C55.88,195.43,48,185.62,48,176V159.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64V176C208,185.62,200.12,195.43,186.39,202.92Z\"/></svg>"), b("play", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z\"/></svg>"), b("brackets-curly", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M43.18,128a29.78,29.78,0,0,1,8,10.26c4.8,9.9,4.8,22,4.8,33.74,0,24.31,1,36,24,36a8,8,0,0,1,0,16c-17.48,0-29.32-6.14-35.2-18.26-4.8-9.9-4.8-22-4.8-33.74,0-24.31-1-36-24-36a8,8,0,0,1,0-16c23,0,24-11.69,24-36,0-11.72,0-23.84,4.8-33.74C50.68,38.14,62.52,32,80,32a8,8,0,0,1,0,16C57,48,56,59.69,56,84c0,11.72,0,23.84-4.8,33.74A29.78,29.78,0,0,1,43.18,128ZM240,120c-23,0-24-11.69-24-36,0-11.72,0-23.84-4.8-33.74C205.32,38.14,193.48,32,176,32a8,8,0,0,0,0,16c23,0,24,11.69,24,36,0,11.72,0,23.84,4.8,33.74a29.78,29.78,0,0,0,8,10.26,29.78,29.78,0,0,0-8,10.26c-4.8,9.9-4.8,22-4.8,33.74,0,24.31-1,36-24,36a8,8,0,0,0,0,16c17.48,0,29.32-6.14,35.2-18.26,4.8-9.9,4.8-22,4.8-33.74,0-24.31,1-36,24-36a8,8,0,0,0,0-16Z\"/></svg>"), b("chat-circle-dots", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128ZM84,116a12,12,0,1,0,12,12A12,12,0,0,0,84,116Zm88,0a12,12,0,1,0,12,12A12,12,0,0,0,172,116Zm60,12A104,104,0,0,1,79.12,219.82L45.07,231.17a16,16,0,0,1-20.24-20.24l11.35-34.05A104,104,0,1,1,232,128Zm-16,0A88,88,0,1,0,51.81,172.06a8,8,0,0,1,.66,6.54L40,216,77.4,203.53a7.85,7.85,0,0,1,2.53-.42,8,8,0,0,1,4,1.08A88,88,0,0,0,216,128Z\"/></svg>"), b("code", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M69.12,94.15,28.5,128l40.62,33.85a8,8,0,1,1-10.24,12.29l-48-40a8,8,0,0,1,0-12.29l48-40a8,8,0,0,1,10.24,12.3Zm176,27.7-48-40a8,8,0,1,0-10.24,12.3L227.5,128l-40.62,33.85a8,8,0,1,0,10.24,12.29l48-40a8,8,0,0,0,0-12.29ZM162.73,32.48a8,8,0,0,0-10.25,4.79l-64,176a8,8,0,0,0,4.79,10.26A8.14,8.14,0,0,0,96,224a8,8,0,0,0,7.52-5.27l64-176A8,8,0,0,0,162.73,32.48Z\"/></svg>"), b("palette", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89Zm13,93.71A15.89,15.89,0,0,1,198.21,160H152a32,32,0,0,0-32,32,16,16,0,0,1-21.31,15.07C62.49,194.3,40,164,40,128a88,88,0,0,1,87.09-88h.9a88.35,88.35,0,0,1,88,87.25A88.86,88.86,0,0,1,213.81,147.6ZM140,76a12,12,0,1,1-12-12A12,12,0,0,1,140,76ZM96,100A12,12,0,1,1,84,88,12,12,0,0,1,96,100Zm0,56a12,12,0,1,1-12-12A12,12,0,0,1,96,156Zm88-56a12,12,0,1,1-12-12A12,12,0,0,1,184,100Z\"/></svg>"), b("terminal", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M117.31,134l-72,64a8,8,0,1,1-10.63-12L100,128,34.69,70A8,8,0,1,1,45.32,58l72,64a8,8,0,0,1,0,12ZM216,184H120a8,8,0,0,0,0,16h96a8,8,0,0,0,0-16Z\"/></svg>"), b("squares-four", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-96,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Zm0,64H152V152h48v48Z\"/></svg>");
8382
9053
  /**
8383
9054
  * Chat message input with textarea, submit button, and Enter-to-send behavior.
8384
9055
  * @attr {boolean} disabled - Disables interaction
@@ -8391,7 +9062,7 @@ y("native-a2ui", He), y("n-button", e), y("n-icon", r), y("n-toolbar", f), y("n-
8391
9062
  * @fires native:composer-focus - Fired when the composer textarea gains focus
8392
9063
  * @fires native:composer-blur - Fired when the composer textarea loses focus
8393
9064
  */
8394
- var We = class extends p {
9065
+ var Be = class extends p {
8395
9066
  static observedAttributes = [
8396
9067
  "disabled",
8397
9068
  "busy",
@@ -8531,7 +9202,7 @@ var We = class extends p {
8531
9202
  super(e.message), this.name = "GatewayRequestError", this.kind = e.kind, this.status = e.status ?? 0, this.body = e.body ?? "", this.requestId = e.requestId, this.contentType = e.contentType;
8532
9203
  }
8533
9204
  };
8534
- async function Ge(e) {
9205
+ async function Ve(e) {
8535
9206
  return G(e, e.retryPolicy ?? {
8536
9207
  delaysMs: [
8537
9208
  1e3,
@@ -8541,7 +9212,7 @@ async function Ge(e) {
8541
9212
  jitterRatio: 0
8542
9213
  }, 0);
8543
9214
  }
8544
- function Ke(e, t) {
9215
+ function He(e, t) {
8545
9216
  let n = { ...e };
8546
9217
  if (!t) return n;
8547
9218
  if (t instanceof Headers) return t.forEach((e, t) => {
@@ -8567,7 +9238,7 @@ async function G(e, t, n) {
8567
9238
  maxAttempts: t.delaysMs.length + 1
8568
9239
  });
8569
9240
  try {
8570
- let s = Ke(e.defaultHeaders ?? {}, i.headers), c = e.auth;
9241
+ let s = He(e.defaultHeaders ?? {}, i.headers), c = e.auth;
8571
9242
  if (c?.token) {
8572
9243
  let e = c.headerName ?? "Authorization";
8573
9244
  s[e] = c.scheme === "raw" ? c.token : `Bearer ${c.token}`;
@@ -8580,7 +9251,7 @@ async function G(e, t, n) {
8580
9251
  signal: d
8581
9252
  }), p = Math.round(performance.now() - o);
8582
9253
  if (!f.ok) {
8583
- let o = await f.text(), s = qe(f.status), c = f.headers.get("content-type") ?? void 0;
9254
+ let o = await f.text(), s = Ue(f.status), c = f.headers.get("content-type") ?? void 0;
8584
9255
  if (!e.noRetry && (s === "rate-limit" || s === "server") && n < t.delaysMs.length) return a?.({
8585
9256
  type: "request:retry",
8586
9257
  requestId: i.requestId,
@@ -8591,7 +9262,7 @@ async function G(e, t, n) {
8591
9262
  durationMs: p,
8592
9263
  status: f.status,
8593
9264
  errorKind: s
8594
- }), await Ye(Je(t.delaysMs[n], t.jitterRatio ?? 0)), G(e, t, n + 1);
9265
+ }), await Ge(We(t.delaysMs[n], t.jitterRatio ?? 0)), G(e, t, n + 1);
8595
9266
  throw a?.({
8596
9267
  type: "request:error",
8597
9268
  requestId: i.requestId,
@@ -8603,7 +9274,7 @@ async function G(e, t, n) {
8603
9274
  status: f.status,
8604
9275
  errorKind: s
8605
9276
  }), new W({
8606
- message: Qe(f.status, o, c),
9277
+ message: Je(f.status, o, c),
8607
9278
  kind: s,
8608
9279
  requestId: i.requestId,
8609
9280
  status: f.status,
@@ -8633,7 +9304,7 @@ async function G(e, t, n) {
8633
9304
  maxAttempts: t.delaysMs.length + 1,
8634
9305
  durationMs: c,
8635
9306
  errorKind: "network"
8636
- }), await Ye(Je(t.delaysMs[n], t.jitterRatio ?? 0)), G(e, t, n + 1);
9307
+ }), await Ge(We(t.delaysMs[n], t.jitterRatio ?? 0)), G(e, t, n + 1);
8637
9308
  throw a?.({
8638
9309
  type: "request:error",
8639
9310
  requestId: i.requestId,
@@ -8650,7 +9321,7 @@ async function G(e, t, n) {
8650
9321
  });
8651
9322
  }
8652
9323
  }
8653
- function qe(e) {
9324
+ function Ue(e) {
8654
9325
  return e === 401 || e === 403 ? "auth" : e === 429 ? "rate-limit" : e >= 500 ? "server" : e >= 400 ? "client" : "unknown";
8655
9326
  }
8656
9327
  async function K(e, t) {
@@ -8678,15 +9349,15 @@ async function K(e, t) {
8678
9349
  function q() {
8679
9350
  return crypto.randomUUID();
8680
9351
  }
8681
- function Je(e, t) {
9352
+ function We(e, t) {
8682
9353
  if (t <= 0) return e;
8683
9354
  let n = 1 + Math.random() * t;
8684
9355
  return Math.round(e * n);
8685
9356
  }
8686
- function Ye(e) {
9357
+ function Ge(e) {
8687
9358
  return new Promise((t) => setTimeout(t, e));
8688
9359
  }
8689
- function Xe(e) {
9360
+ function Ke(e) {
8690
9361
  let t = e.split("\n"), n = "message", r = [];
8691
9362
  for (let e of t) e.startsWith(":") || (e.startsWith("event:") ? n = e.slice(6).trim() : e.startsWith("data:") && r.push(e.slice(5).replace(/^ /, "")));
8692
9363
  return r.length ? {
@@ -8694,12 +9365,12 @@ function Xe(e) {
8694
9365
  data: r.join("\n")
8695
9366
  } : null;
8696
9367
  }
8697
- const Ze = [
9368
+ const qe = [
8698
9369
  1e3,
8699
9370
  2e3,
8700
9371
  4e3
8701
9372
  ];
8702
- function Qe(e, t, n) {
9373
+ function Je(e, t, n) {
8703
9374
  let r = `Request failed with ${e}`;
8704
9375
  if (!t.trim()) return r;
8705
9376
  if ((n ?? "").toLowerCase().includes("application/json") || t.trim().startsWith("{")) try {
@@ -8710,7 +9381,7 @@ function Qe(e, t, n) {
8710
9381
  }
8711
9382
  return (n ?? "").toLowerCase().includes("text/html") ? `${r} (received HTML instead of API JSON)` : r;
8712
9383
  }
8713
- var $e = class {
9384
+ var Ye = class {
8714
9385
  clientId;
8715
9386
  baseUrl;
8716
9387
  model;
@@ -8833,7 +9504,7 @@ var $e = class {
8833
9504
  signal: e?.signal,
8834
9505
  requestId: t
8835
9506
  }
8836
- }), t)).data ?? []).filter((e) => typeof e.id == "string" && e.id.length > 0).map((e) => e.id), r = n.filter((e) => tt(e));
9507
+ }), t)).data ?? []).filter((e) => typeof e.id == "string" && e.id.length > 0).map((e) => e.id), r = n.filter((e) => Ze(e));
8837
9508
  return (r.length ? r : n).map((e) => ({
8838
9509
  id: e,
8839
9510
  label: e,
@@ -8875,7 +9546,7 @@ var $e = class {
8875
9546
  for (; p !== -1;) {
8876
9547
  let a = s.slice(0, p);
8877
9548
  s = s.slice(p + 2), p = s.indexOf("\n\n");
8878
- let o = Xe(a);
9549
+ let o = Ke(a);
8879
9550
  if (!o) continue;
8880
9551
  if (o.data === "[DONE]") {
8881
9552
  u = !0;
@@ -8951,11 +9622,11 @@ var $e = class {
8951
9622
  };
8952
9623
  }
8953
9624
  request(e) {
8954
- return Ge({
9625
+ return Ve({
8955
9626
  url: e.url,
8956
9627
  init: e.init,
8957
9628
  noRetry: e.noRetry,
8958
- retryPolicy: { delaysMs: Ze },
9629
+ retryPolicy: { delaysMs: qe },
8959
9630
  auth: {
8960
9631
  token: this.apiKey,
8961
9632
  headerName: "Authorization",
@@ -8970,9 +9641,9 @@ var $e = class {
8970
9641
  });
8971
9642
  }
8972
9643
  };
8973
- const et = ({ clientId: e, baseUrl: t, gatewayConfig: n, onEvent: r, auth: i }) => {
9644
+ const Xe = ({ clientId: e, baseUrl: t, gatewayConfig: n, onEvent: r, auth: i }) => {
8974
9645
  let a = n?.model ?? "gpt-4.1-mini", o = Number(n?.max_tokens ?? n?.maxTokens ?? 1024), s = n?.temperature, c = n?.api_key ?? n?.apiKey ?? i?.token ?? null, l = n?.organization ?? n?.openai_organization ?? n?.openaiOrganization ?? null, u = n?.session_id ?? n?.sessionId ?? null;
8975
- return new $e({
9646
+ return new Ye({
8976
9647
  clientId: e,
8977
9648
  baseUrl: t,
8978
9649
  model: String(a),
@@ -8985,11 +9656,11 @@ const et = ({ clientId: e, baseUrl: t, gatewayConfig: n, onEvent: r, auth: i })
8985
9656
  onEvent: r
8986
9657
  });
8987
9658
  };
8988
- function tt(e) {
9659
+ function Ze(e) {
8989
9660
  let t = e.trim().toLowerCase();
8990
9661
  return t ? t.startsWith("gpt-") || t.startsWith("chatgpt-") : !1;
8991
9662
  }
8992
- var nt = class {
9663
+ var Qe = class {
8993
9664
  clientId;
8994
9665
  baseUrl;
8995
9666
  model;
@@ -9150,7 +9821,7 @@ var nt = class {
9150
9821
  for (; p !== -1;) {
9151
9822
  let a = s.slice(0, p);
9152
9823
  s = s.slice(p + 2), p = s.indexOf("\n\n");
9153
- let o = Xe(a);
9824
+ let o = Ke(a);
9154
9825
  if (!o) continue;
9155
9826
  if (o.data === "[DONE]") {
9156
9827
  u = !0;
@@ -9228,11 +9899,11 @@ var nt = class {
9228
9899
  };
9229
9900
  }
9230
9901
  request(e) {
9231
- return Ge({
9902
+ return Ve({
9232
9903
  url: e.url,
9233
9904
  init: e.init,
9234
9905
  noRetry: e.noRetry,
9235
- retryPolicy: { delaysMs: Ze },
9906
+ retryPolicy: { delaysMs: qe },
9236
9907
  auth: {
9237
9908
  token: this.apiKey,
9238
9909
  headerName: "x-api-key",
@@ -9248,9 +9919,9 @@ var nt = class {
9248
9919
  });
9249
9920
  }
9250
9921
  };
9251
- const rt = ({ clientId: e, baseUrl: t, gatewayConfig: n, onEvent: r, auth: i }) => {
9922
+ const $e = ({ clientId: e, baseUrl: t, gatewayConfig: n, onEvent: r, auth: i }) => {
9252
9923
  let a = n?.model ?? "claude-sonnet-4-6", o = Number(n?.max_tokens ?? n?.maxTokens ?? 1024), s = n?.temperature, c = n?.anthropic_version ?? n?.anthropicVersion ?? "2023-06-01", l = n?.api_key ?? n?.apiKey ?? i?.token ?? null, u = n?.session_id ?? n?.sessionId ?? null;
9253
- return new nt({
9924
+ return new Qe({
9254
9925
  clientId: e,
9255
9926
  baseUrl: t,
9256
9927
  model: String(a),
@@ -9267,7 +9938,7 @@ var J = [
9267
9938
  "That's a great question! Here's what I think:\n\n**Web components** are built on three main browser APIs:\n\n1. **Custom Elements** — define your own HTML tags\n2. **Shadow DOM** — encapsulated styling and markup\n3. **HTML Templates** — reusable content fragments\n\nThey work natively in all modern browsers.",
9268
9939
  "Sure, I can help with that! Let me break it down:\n\n- First, you'll want to understand the **component lifecycle**\n- Then look at how **attributes** map to **properties**\n- Finally, consider your **event strategy**\n\n```js\nclass MyElement extends HTMLElement {\n connectedCallback() {\n console.log('Connected!');\n }\n}\n```",
9269
9940
  "Here are some key points to consider:\n\n> The best code is the code you don't have to write.\n\n1. Keep components **small and focused**\n2. Use **composition** over inheritance\n3. Leverage **CSS custom properties** for theming\n4. Always consider **accessibility**\n\nLet me know if you'd like more detail on any of these!"
9270
- ], it = 25, at = class {
9941
+ ], et = 25, tt = class {
9271
9942
  #e = 0;
9272
9943
  bootstrapSession() {
9273
9944
  return Promise.resolve({ id: "mock-session" });
@@ -9297,7 +9968,7 @@ var J = [
9297
9968
  role: "assistant",
9298
9969
  datetime: Date.now(),
9299
9970
  done: i
9300
- }), i || await new Promise((e) => setTimeout(e, it));
9971
+ }), i || await new Promise((e) => setTimeout(e, et));
9301
9972
  }
9302
9973
  return e.onStreamEvent?.({
9303
9974
  phase: "complete",
@@ -9331,8 +10002,8 @@ var J = [
9331
10002
  }]);
9332
10003
  }
9333
10004
  };
9334
- function ot(e) {
9335
- return new at();
10005
+ function nt(e) {
10006
+ return new tt();
9336
10007
  }
9337
10008
  /**
9338
10009
  * Stamped panel for the chat interface.
@@ -9379,7 +10050,7 @@ function ot(e) {
9379
10050
  * @attr {string} gateway-config - JSON config for the adapter (model, apiKey, system, etc.)
9380
10051
  * @attr {string} gateway-urls - JSON map of provider prefixes to URLs (e.g. '{"claude":"/api/anthropic","openai":"/api/openai"}'). When set, auto-switches gateway based on model prefix.
9381
10052
  */
9382
- var st = class extends p {
10053
+ var rt = class extends p {
9383
10054
  static MAX_CONTEXT_MESSAGES = 50;
9384
10055
  static observedAttributes = [
9385
10056
  "show-stop",
@@ -9641,7 +10312,7 @@ var st = class extends p {
9641
10312
  baseUrl: t,
9642
10313
  gatewayConfig: n ?? {}
9643
10314
  }, i = null;
9644
- e === "openai" ? i = et(r) : e === "claude" ? i = rt(r) : e === "mock" && (i = ot(r)), this.#d = i, i && i.bootstrapSession().catch(() => {});
10315
+ e === "openai" ? i = Xe(r) : e === "claude" ? i = $e(r) : e === "mock" && (i = nt(r)), this.#d = i, i && i.bootstrapSession().catch(() => {});
9645
10316
  }), this.addEffect(() => {
9646
10317
  this.#o.value && (this.#e.value = this.#u.value);
9647
10318
  }), this.addEventListener("native:send", this.#N), this.addEventListener("native:chat-stop", this.#L), this.addEventListener("native:chat-restart", this.#R), this.deferChildren(() => {
@@ -9898,7 +10569,7 @@ var st = class extends p {
9898
10569
  #B() {
9899
10570
  this.#b &&= (this.#b.removeEventListener("native:change", this.#M), this.#b.remove(), null), this.#x = null;
9900
10571
  }
9901
- }, ct = 40, lt = class extends p {
10572
+ }, it = 40, at = class extends p {
9902
10573
  static observedAttributes = [
9903
10574
  "auto-scroll",
9904
10575
  "scrollable",
@@ -10007,7 +10678,7 @@ var st = class extends p {
10007
10678
  }
10008
10679
  }
10009
10680
  #f = () => {
10010
- let e = this.#n.value, t = this.scrollTop + this.clientHeight >= this.scrollHeight - ct;
10681
+ let e = this.#n.value, t = this.scrollTop + this.clientHeight >= this.scrollHeight - it;
10011
10682
  this.#n.value = t, t !== e && this.dispatchEvent(new CustomEvent("native:feed-scroll", {
10012
10683
  bubbles: !0,
10013
10684
  composed: !0,
@@ -10025,7 +10696,7 @@ var st = class extends p {
10025
10696
  });
10026
10697
  });
10027
10698
  };
10028
- }, ut = class extends p {
10699
+ }, ot = class extends p {
10029
10700
  static observedAttributes = [
10030
10701
  "src",
10031
10702
  "name",
@@ -10065,7 +10736,7 @@ var st = class extends p {
10065
10736
  }
10066
10737
  if (n) {
10067
10738
  let e = document.createElement("span");
10068
- e.className = "n-chat-avatar-initials", e.textContent = dt(n), e.setAttribute("aria-hidden", "true"), this.appendChild(e);
10739
+ e.className = "n-chat-avatar-initials", e.textContent = st(n), e.setAttribute("aria-hidden", "true"), this.appendChild(e);
10069
10740
  return;
10070
10741
  }
10071
10742
  let r = document.createElement("n-icon");
@@ -10076,11 +10747,11 @@ var st = class extends p {
10076
10747
  this.textContent = "", super.teardown();
10077
10748
  }
10078
10749
  };
10079
- function dt(e) {
10750
+ function st(e) {
10080
10751
  let t = e.trim().split(/\s+/);
10081
10752
  return t.length === 0 ? "" : t.length === 1 ? t[0][0].toUpperCase() : (t[0][0] + t[t.length - 1][0]).toUpperCase();
10082
10753
  }
10083
- const ft = {
10754
+ const ct = {
10084
10755
  copy: {
10085
10756
  label: "Copy",
10086
10757
  icon: "copy"
@@ -10105,7 +10776,7 @@ const ft = {
10105
10776
  label: "Continue",
10106
10777
  icon: "arrow-right"
10107
10778
  }
10108
- }, pt = {
10779
+ }, lt = {
10109
10780
  assistant: [
10110
10781
  "copy",
10111
10782
  "retry",
@@ -10130,7 +10801,7 @@ const ft = {
10130
10801
  * @fires native:message-action - Fired when an action button is clicked
10131
10802
  * @fires native:continue-request - Fired when continue is requested for a partial message
10132
10803
  */
10133
- var mt = class extends p {
10804
+ var ut = class extends p {
10134
10805
  static observedAttributes = [
10135
10806
  "data-role",
10136
10807
  "message-id",
@@ -10249,12 +10920,12 @@ var mt = class extends p {
10249
10920
  #p(e, t, n, r, i) {
10250
10921
  if (this.#o &&= (this.#f(), null), clearTimeout(this.#l), t === "none" || this.querySelector("[slot=\"actions\"]")) return;
10251
10922
  let a;
10252
- if (a = t ? t.split(",").map((e) => e.trim()).filter(Boolean) : pt[e] ?? [], i === "partial" && !a.includes("continue") && (a = [...a, "continue"]), a.length === 0) return;
10923
+ if (a = t ? t.split(",").map((e) => e.trim()).filter(Boolean) : lt[e] ?? [], i === "partial" && !a.includes("continue") && (a = [...a, "continue"]), a.length === 0) return;
10253
10924
  let o = document.createElement("n-toolbar");
10254
10925
  o.dataset.role = "actions", o.setAttribute("padding", "tight"), o.setAttribute("aria-label", "Message actions"), n !== "label" && o.setAttribute("data-style", n);
10255
10926
  for (let e of a) {
10256
- let t = ft[e];
10257
- t && o.appendChild(ht(e, t, n));
10927
+ let t = ct[e];
10928
+ t && o.appendChild(dt(e, t, n));
10258
10929
  }
10259
10930
  if (o.children.length !== 0) {
10260
10931
  if (o.addEventListener("native:press", this.#m), r === "below") {
@@ -10287,7 +10958,7 @@ var mt = class extends p {
10287
10958
  }
10288
10959
  };
10289
10960
  };
10290
- function ht(e, t, n) {
10961
+ function dt(e, t, n) {
10291
10962
  let r = document.createElement("n-button");
10292
10963
  if (r.setAttribute("variant", "ghost"), r.setAttribute("size", "sm"), r.setAttribute("inline", ""), r.setAttribute("data-action", e), r.setAttribute("aria-label", t.label), n === "icon" || n === "icon-label") {
10293
10964
  let e = document.createElement("n-icon");
@@ -10324,7 +10995,7 @@ function ht(e, t, n) {
10324
10995
  * @attr {string} sender - Display name of the sender
10325
10996
  * @attr {string} avatar-align - `"top"` | `"center"` | `"bottom"` (default) — avatar vertical alignment
10326
10997
  */
10327
- var gt = class extends p {
10998
+ var ft = class extends p {
10328
10999
  static observedAttributes = [
10329
11000
  "data-role",
10330
11001
  "sender",
@@ -10367,7 +11038,7 @@ var gt = class extends p {
10367
11038
  for (let r of n) r instanceof Element && r.localName === "n-chat-avatar" || (r instanceof Element && r.localName === "n-chat-message" ? t.appendChild(r) : e.appendChild(r));
10368
11039
  this.appendChild(e), this.appendChild(t), this.#t = e, this.#n = t;
10369
11040
  }
10370
- }, Y = class extends p {
11041
+ }, pt = class extends p {
10371
11042
  static observedAttributes = ["format"];
10372
11043
  #e = x("markdown");
10373
11044
  #t = x("");
@@ -10393,7 +11064,7 @@ var gt = class extends p {
10393
11064
  !this.#t.value && this.textContent?.trim() && (this.#t.value = this.textContent.trim()), this.#n = document.createElement("div"), this.#n.className = "n-chat-prose", this.textContent = "", this.appendChild(this.#n), this.addEffect(() => {
10394
11065
  let e = this.#t.value, t = this.#e.value;
10395
11066
  this.#n && (t === "plain" ? this.#n.textContent = e : (cancelAnimationFrame(this.#r), this.#r = requestAnimationFrame(() => {
10396
- this.#n && (this.#n.innerHTML = yt(vt(e)));
11067
+ this.#n && (this.#n.innerHTML = ht(Z(e)));
10397
11068
  })));
10398
11069
  });
10399
11070
  });
@@ -10401,7 +11072,7 @@ var gt = class extends p {
10401
11072
  teardown() {
10402
11073
  cancelAnimationFrame(this.#r), this.#n = null, super.teardown();
10403
11074
  }
10404
- }, _t = new Set([
11075
+ }, mt = new Set([
10405
11076
  "p",
10406
11077
  "br",
10407
11078
  "strong",
@@ -10421,14 +11092,14 @@ var gt = class extends p {
10421
11092
  "blockquote",
10422
11093
  "hr"
10423
11094
  ]);
10424
- function X(e) {
11095
+ function Y(e) {
10425
11096
  return e.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll("\"", "&quot;").replaceAll("'", "&#39;");
10426
11097
  }
10427
- function Z(e) {
10428
- let t = X(e);
11098
+ function X(e) {
11099
+ let t = Y(e);
10429
11100
  return t = t.replace(/`([^`]+)`/g, "<code>$1</code>"), t = t.replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/__(.+?)__/g, "<strong>$1</strong>"), t = t.replace(/\*(.+?)\*/g, "<em>$1</em>"), t = t.replace(/(?<!\w)_(.+?)_(?!\w)/g, "<em>$1</em>"), t = t.replace(/\[([^\]]+)\]\((https?:\/\/[^)]+)\)/g, "<a href=\"$2\" rel=\"noopener noreferrer\" target=\"_blank\">$1</a>"), t;
10430
11101
  }
10431
- function vt(e) {
11102
+ function Z(e) {
10432
11103
  if (!e) return "";
10433
11104
  let t = e.split("\n"), n = [], r = 0;
10434
11105
  for (; r < t.length;) {
@@ -10437,14 +11108,14 @@ function vt(e) {
10437
11108
  let i = e.slice(3).trim(), a = [];
10438
11109
  for (r += 1; r < t.length && !t[r].startsWith("```");) a.push(t[r]), r += 1;
10439
11110
  r += 1;
10440
- let o = i ? ` data-lang="${X(i)}"` : "";
10441
- n.push(`<pre${o}><code>${X(a.join("\n"))}</code></pre>`);
11111
+ let o = i ? ` data-lang="${Y(i)}"` : "";
11112
+ n.push(`<pre${o}><code>${Y(a.join("\n"))}</code></pre>`);
10442
11113
  continue;
10443
11114
  }
10444
11115
  let i = e.match(/^(#{1,6})\s+(.+)/);
10445
11116
  if (i) {
10446
11117
  let e = i[1].length;
10447
- n.push(`<h${e}>${Z(i[2])}</h${e}>`), r += 1;
11118
+ n.push(`<h${e}>${X(i[2])}</h${e}>`), r += 1;
10448
11119
  continue;
10449
11120
  }
10450
11121
  if (/^---+$/.test(e.trim()) || /^\*\*\*+$/.test(e.trim())) {
@@ -10454,19 +11125,19 @@ function vt(e) {
10454
11125
  if (e.startsWith("> ")) {
10455
11126
  let e = [];
10456
11127
  for (; r < t.length && t[r].startsWith("> ");) e.push(t[r].slice(2)), r += 1;
10457
- n.push(`<blockquote>${vt(e.join("\n"))}</blockquote>`);
11128
+ n.push(`<blockquote>${Z(e.join("\n"))}</blockquote>`);
10458
11129
  continue;
10459
11130
  }
10460
11131
  if (/^[-*+]\s/.test(e)) {
10461
11132
  let e = [];
10462
11133
  for (; r < t.length && /^[-*+]\s/.test(t[r]);) e.push(t[r].replace(/^[-*+]\s/, "")), r += 1;
10463
- n.push("<ul>" + e.map((e) => `<li>${Z(e)}</li>`).join("") + "</ul>");
11134
+ n.push("<ul>" + e.map((e) => `<li>${X(e)}</li>`).join("") + "</ul>");
10464
11135
  continue;
10465
11136
  }
10466
11137
  if (/^\d+\.\s/.test(e)) {
10467
11138
  let e = [];
10468
11139
  for (; r < t.length && /^\d+\.\s/.test(t[r]);) e.push(t[r].replace(/^\d+\.\s/, "")), r += 1;
10469
- n.push("<ol>" + e.map((e) => `<li>${Z(e)}</li>`).join("") + "</ol>");
11140
+ n.push("<ol>" + e.map((e) => `<li>${X(e)}</li>`).join("") + "</ol>");
10470
11141
  continue;
10471
11142
  }
10472
11143
  if (!e.trim()) {
@@ -10475,15 +11146,15 @@ function vt(e) {
10475
11146
  }
10476
11147
  let a = [];
10477
11148
  for (; r < t.length && t[r].trim() && !t[r].startsWith("#") && !t[r].startsWith("```") && !t[r].startsWith("> ") && !/^[-*+]\s/.test(t[r]) && !/^\d+\.\s/.test(t[r]) && !/^---+$/.test(t[r].trim());) a.push(t[r]), r += 1;
10478
- a.length > 0 && n.push(`<p>${Z(a.join("\n"))}</p>`);
11149
+ a.length > 0 && n.push(`<p>${X(a.join("\n"))}</p>`);
10479
11150
  }
10480
11151
  return n.join("");
10481
11152
  }
10482
11153
  /** Sanitize rendered HTML — strip any tags not in allowlist. */
10483
- function yt(e) {
11154
+ function ht(e) {
10484
11155
  return e.replace(/<\/?([a-zA-Z][a-zA-Z0-9]*)[^>]*>/g, (e, t) => {
10485
11156
  let n = t.toLowerCase();
10486
- return _t.has(n) ? e : "";
11157
+ return mt.has(n) ? e : "";
10487
11158
  });
10488
11159
  }
10489
11160
  /**
@@ -10504,7 +11175,7 @@ function yt(e) {
10504
11175
  * @attr {boolean} expandable - Allow click to expand trace content
10505
11176
  * @fires native:activity-toggle - Fired when trace is expanded/collapsed
10506
11177
  */
10507
- var bt = class extends p {
11178
+ var gt = class extends p {
10508
11179
  static observedAttributes = [
10509
11180
  "type",
10510
11181
  "label",
@@ -10562,7 +11233,7 @@ var bt = class extends p {
10562
11233
  this.#r.value ? (this.#p(), this.#e.states.add("active")) : (this.#m(), this.#e.states.delete("active"));
10563
11234
  }), this.addEffect(() => {
10564
11235
  if (!this.#c) return;
10565
- let e = this.#n.value || xt(this.#t.value);
11236
+ let e = this.#n.value || _t(this.#t.value);
10566
11237
  this.#c.textContent = e;
10567
11238
  }), this.addEffect(() => {
10568
11239
  this.#u && (this.#u.hidden = !this.#r.value);
@@ -10592,7 +11263,7 @@ var bt = class extends p {
10592
11263
  #h = () => {
10593
11264
  if (!this.#r.value || !this.#l) return;
10594
11265
  let e = performance.now() - this.#o;
10595
- this.#l.textContent = St(e), this.#s = requestAnimationFrame(this.#h);
11266
+ this.#l.textContent = vt(e), this.#s = requestAnimationFrame(this.#h);
10596
11267
  };
10597
11268
  #g = () => {
10598
11269
  this.#i.value && (this.#a.value = !this.#a.value, this.toggleAttribute("expanded", this.#a.value), this.dispatchEvent(new CustomEvent("native:activity-toggle", {
@@ -10602,14 +11273,14 @@ var bt = class extends p {
10602
11273
  })));
10603
11274
  };
10604
11275
  };
10605
- function xt(e) {
11276
+ function _t(e) {
10606
11277
  switch (e) {
10607
11278
  case "thinking": return "Thinking…";
10608
11279
  case "tool-use": return "Using tools…";
10609
11280
  default: return "Host is typing…";
10610
11281
  }
10611
11282
  }
10612
- function St(e) {
11283
+ function vt(e) {
10613
11284
  let t = Math.floor(e / 1e3);
10614
11285
  if (t < 60) return `${t}s`;
10615
11286
  let n = Math.floor(t / 60), r = t % 60;
@@ -10629,7 +11300,7 @@ function St(e) {
10629
11300
  * @attr {boolean} disabled - Disables all chips
10630
11301
  * @fires native:seed-select - Fired when a chip is clicked
10631
11302
  */
10632
- var Ct = class extends p {
11303
+ var yt = class extends p {
10633
11304
  static observedAttributes = ["options", "disabled"];
10634
11305
  #e;
10635
11306
  #t = x([]);
@@ -10701,7 +11372,7 @@ var Ct = class extends p {
10701
11372
  }
10702
11373
  }));
10703
11374
  };
10704
- }, wt = new Set([
11375
+ }, bt = new Set([
10705
11376
  "script",
10706
11377
  "style",
10707
11378
  "link",
@@ -10718,7 +11389,7 @@ var Ct = class extends p {
10718
11389
  "frame",
10719
11390
  "frameset",
10720
11391
  "noscript"
10721
- ]), Tt = class extends p {
11392
+ ]), xt = class extends p {
10722
11393
  static observedAttributes = ["schema-type", "mode"];
10723
11394
  #e;
10724
11395
  #t = x("a2ui");
@@ -10764,7 +11435,7 @@ var Ct = class extends p {
10764
11435
  super.setup(), this.#i = document.createElement("div"), this.#i.className = "n-chat-genui-container", this.appendChild(this.#i), this.addEffect(() => {
10765
11436
  let e = this.#r.value, t = this.#n.value;
10766
11437
  if (!this.#i || (this.#i.textContent = "", !e)) return;
10767
- let n = Et(e);
11438
+ let n = St(e);
10768
11439
  if (n.length > 0) {
10769
11440
  this.#o(n), this.dispatchEvent(new CustomEvent("native:genui-error", {
10770
11441
  bubbles: !0,
@@ -10828,15 +11499,15 @@ var Ct = class extends p {
10828
11499
  }));
10829
11500
  };
10830
11501
  };
10831
- function Et(e, t = 0) {
11502
+ function St(e, t = 0) {
10832
11503
  let n = [];
10833
11504
  if (t > 20) return n.push("Maximum nesting depth (20) exceeded"), n;
10834
11505
  if (!e.tag || typeof e.tag != "string") return n.push("Node missing required \"tag\" property"), n;
10835
- if (wt.has(e.tag.toLowerCase()) && n.push(`Forbidden tag: <${e.tag}>`), e.children) for (let r of e.children) n.push(...Et(r, t + 1));
11506
+ if (bt.has(e.tag.toLowerCase()) && n.push(`Forbidden tag: <${e.tag}>`), e.children) for (let r of e.children) n.push(...St(r, t + 1));
10836
11507
  return n;
10837
11508
  }
10838
11509
  function Q(e) {
10839
- if (wt.has(e.tag.toLowerCase())) return null;
11510
+ if (bt.has(e.tag.toLowerCase())) return null;
10840
11511
  let t = document.createElement(e.tag);
10841
11512
  if (e.id && (t.id = e.id), e.slot && (t.slot = e.slot), e.attributes) for (let [n, r] of Object.entries(e.attributes)) t.setAttribute(n, r);
10842
11513
  if (e.properties) for (let [n, r] of Object.entries(e.properties)) t[n] = r;
@@ -11001,5 +11672,5 @@ var $ = class extends p {
11001
11672
  }));
11002
11673
  };
11003
11674
  };
11004
- y("n-chat-input", We), y("native-chat-panel", st), y("n-chat-feed", lt), y("n-chat-avatar", ut), y("n-chat-message", mt), y("n-chat-messages", gt), y("n-chat-message-text", Y), y("n-chat-message-activity", bt), y("n-chat-message-seed", Ct), y("n-chat-message-genui", Tt), y("n-chat-input-structured", $), y("n-textarea", d), y("n-button", e), y("n-icon", r), y("n-toolbar", f), y("n-dialog", n), y("n-container", t), y("n-listbox", i), y("n-option", a), y("n-option-group", o), y("n-option-group-header", s), y("n-select", u), b("chat-dots", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M116,128a12,12,0,1,1,12,12A12,12,0,0,1,116,128ZM84,140a12,12,0,1,0-12-12A12,12,0,0,0,84,140Zm88,0a12,12,0,1,0-12-12A12,12,0,0,0,172,140Zm60-76V192a16,16,0,0,1-16,16H83l-32.6,28.16-.09.07A15.89,15.89,0,0,1,40,240a16.13,16.13,0,0,1-6.8-1.52A15.85,15.85,0,0,1,24,224V64A16,16,0,0,1,40,48H216A16,16,0,0,1,232,64ZM40,224h0ZM216,64H40V224l34.77-30A8,8,0,0,1,80,192H216Z\"/></svg>"), b("user", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8C55.71,194.74,89.05,176,128,176s72.29,18.74,89.07,44a8,8,0,0,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z\"/></svg>"), b("stop", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z\"/></svg>"), b("arrow-counter-clockwise", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z\"/></svg>"), b("caret-up-down", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z\"/></svg>"), b("dots-three-outline-fill", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M156,128a28,28,0,1,1-28-28A28,28,0,0,1,156,128ZM48,100a28,28,0,1,0,28,28A28,28,0,0,0,48,100Zm160,0a28,28,0,1,0,28,28A28,28,0,0,0,208,100Z\"/></svg>"), b("plus", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z\"/></svg>"), b("microphone", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z\"/></svg>"), b("arrow-up", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M205.66,117.66a8,8,0,0,1-11.32,0L136,59.31V216a8,8,0,0,1-16,0V59.31L61.66,117.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,205.66,117.66Z\"/></svg>"), b("copy", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z\"/></svg>"), b("arrow-clockwise", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z\"/></svg>"), b("pencil-simple", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z\"/></svg>"), b("thumbs-up", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32ZM223.94,97l-12,96a8,8,0,0,1-7.94,7H88V105.89l36.71-73.43A24,24,0,0,1,144,56V80a8,8,0,0,0,8,8h64a8,8,0,0,1,7.94,9Z\"/></svg>"), b("thumbs-down", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M239.82,157l-12-96A24,24,0,0,0,204,40H32A16,16,0,0,0,16,56v88a16,16,0,0,0,16,16H75.06l37.78,75.58A8,8,0,0,0,120,240a40,40,0,0,0,40-40V184h56a24,24,0,0,0,23.82-27ZM72,144H32V56H72Zm150,21.29a7.88,7.88,0,0,1-6,2.71H152a8,8,0,0,0-8,8v24a24,24,0,0,1-19.29,23.54L88,150.11V56H204a8,8,0,0,1,7.94,7l12,96A7.87,7.87,0,0,1,222,165.29Z\"/></svg>"), b("arrow-right", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z\"/></svg>");
11005
- export { He as NA2UI, ut as NChatAvatar, lt as NChatFeed, We as NChatInput, $ as NChatInputStructured, mt as NChatMessage, bt as NChatMessageActivity, Tt as NChatMessageGenUI, Ct as NChatMessageSeed, Y as NChatMessageText, gt as NChatMessages, st as NChatPanel };
11675
+ y("n-chat-input", Be), y("native-chat-panel", rt), y("n-chat-feed", at), y("n-chat-avatar", ot), y("n-chat-message", ut), y("n-chat-messages", ft), y("n-chat-message-text", pt), y("n-chat-message-activity", gt), y("n-chat-message-seed", yt), y("n-chat-message-genui", xt), y("n-chat-input-structured", $), y("n-textarea", d), y("n-button", e), y("n-icon", r), y("n-toolbar", f), y("n-dialog", n), y("n-container", t), y("n-listbox", i), y("n-option", a), y("n-option-group", o), y("n-option-group-header", s), y("n-select", u), b("chat-dots", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M116,128a12,12,0,1,1,12,12A12,12,0,0,1,116,128ZM84,140a12,12,0,1,0-12-12A12,12,0,0,0,84,140Zm88,0a12,12,0,1,0-12-12A12,12,0,0,0,172,140Zm60-76V192a16,16,0,0,1-16,16H83l-32.6,28.16-.09.07A15.89,15.89,0,0,1,40,240a16.13,16.13,0,0,1-6.8-1.52A15.85,15.85,0,0,1,24,224V64A16,16,0,0,1,40,48H216A16,16,0,0,1,232,64ZM40,224h0ZM216,64H40V224l34.77-30A8,8,0,0,1,80,192H216Z\"/></svg>"), b("user", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8C55.71,194.74,89.05,176,128,176s72.29,18.74,89.07,44a8,8,0,0,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z\"/></svg>"), b("stop", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z\"/></svg>"), b("arrow-counter-clockwise", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z\"/></svg>"), b("caret-up-down", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z\"/></svg>"), b("dots-three-outline-fill", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M156,128a28,28,0,1,1-28-28A28,28,0,0,1,156,128ZM48,100a28,28,0,1,0,28,28A28,28,0,0,0,48,100Zm160,0a28,28,0,1,0,28,28A28,28,0,0,0,208,100Z\"/></svg>"), b("plus", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z\"/></svg>"), b("microphone", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z\"/></svg>"), b("arrow-up", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M205.66,117.66a8,8,0,0,1-11.32,0L136,59.31V216a8,8,0,0,1-16,0V59.31L61.66,117.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,205.66,117.66Z\"/></svg>"), b("copy", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z\"/></svg>"), b("arrow-clockwise", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z\"/></svg>"), b("pencil-simple", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z\"/></svg>"), b("thumbs-up", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32ZM223.94,97l-12,96a8,8,0,0,1-7.94,7H88V105.89l36.71-73.43A24,24,0,0,1,144,56V80a8,8,0,0,0,8,8h64a8,8,0,0,1,7.94,9Z\"/></svg>"), b("thumbs-down", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M239.82,157l-12-96A24,24,0,0,0,204,40H32A16,16,0,0,0,16,56v88a16,16,0,0,0,16,16H75.06l37.78,75.58A8,8,0,0,0,120,240a40,40,0,0,0,40-40V184h56a24,24,0,0,0,23.82-27ZM72,144H32V56H72Zm150,21.29a7.88,7.88,0,0,1-6,2.71H152a8,8,0,0,0-8,8v24a24,24,0,0,1-19.29,23.54L88,150.11V56H204a8,8,0,0,1,7.94,7l12,96A7.87,7.87,0,0,1,222,165.29Z\"/></svg>"), b("arrow-right", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z\"/></svg>");
11676
+ export { Re as NA2UI, ot as NChatAvatar, at as NChatFeed, Be as NChatInput, $ as NChatInputStructured, ut as NChatMessage, gt as NChatMessageActivity, xt as NChatMessageGenUI, yt as NChatMessageSeed, pt as NChatMessageText, ft as NChatMessages, rt as NChatPanel };