@nonoun/native-ui 0.2.10 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist/components-lean.css +20 -941
  2. package/dist/components.css +20 -948
  3. package/dist/components.js +66 -498
  4. package/dist/core.js +121 -38
  5. package/dist/custom-elements.json +3971 -6744
  6. package/dist/foundation.css +5 -6
  7. package/dist/index.d.ts +0 -8
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/kernel.js +208 -208
  10. package/dist/native-ui-lean.css +25 -947
  11. package/dist/native-ui.css +25 -954
  12. package/dist/native-ui.js +4 -4
  13. package/dist/register-all.js +4 -4
  14. package/dist/traits/drag-controller.d.ts.map +1 -1
  15. package/dist/traits.js +3 -3
  16. package/dist/ui-icon.js +1 -1
  17. package/package.json +6 -9
  18. package/dist/components/ui-nav/index.d.ts +0 -6
  19. package/dist/components/ui-nav/index.d.ts.map +0 -1
  20. package/dist/components/ui-nav/ui-nav-element.d.ts +0 -20
  21. package/dist/components/ui-nav/ui-nav-element.d.ts.map +0 -1
  22. package/dist/components/ui-nav/ui-nav-group-element.d.ts +0 -24
  23. package/dist/components/ui-nav/ui-nav-group-element.d.ts.map +0 -1
  24. package/dist/components/ui-nav/ui-nav-group-header-element.d.ts +0 -7
  25. package/dist/components/ui-nav/ui-nav-group-header-element.d.ts.map +0 -1
  26. package/dist/components/ui-nav/ui-nav-item-element.d.ts +0 -23
  27. package/dist/components/ui-nav/ui-nav-item-element.d.ts.map +0 -1
  28. package/dist/components/ui-nav/ui-nav.d.ts +0 -2
  29. package/dist/components/ui-nav/ui-nav.d.ts.map +0 -1
  30. package/dist/containers/ui-layout-chat/index.d.ts +0 -3
  31. package/dist/containers/ui-layout-chat/index.d.ts.map +0 -1
  32. package/dist/containers/ui-layout-chat/ui-layout-chat-element.d.ts +0 -14
  33. package/dist/containers/ui-layout-chat/ui-layout-chat-element.d.ts.map +0 -1
  34. package/dist/containers/ui-layout-chat/ui-layout-chat.d.ts +0 -3
  35. package/dist/containers/ui-layout-chat/ui-layout-chat.d.ts.map +0 -1
  36. package/dist/containers/ui-layout-inspector/index.d.ts +0 -3
  37. package/dist/containers/ui-layout-inspector/index.d.ts.map +0 -1
  38. package/dist/containers/ui-layout-inspector/ui-layout-inspector-element.d.ts +0 -14
  39. package/dist/containers/ui-layout-inspector/ui-layout-inspector-element.d.ts.map +0 -1
  40. package/dist/containers/ui-layout-inspector/ui-layout-inspector.d.ts +0 -3
  41. package/dist/containers/ui-layout-inspector/ui-layout-inspector.d.ts.map +0 -1
  42. package/dist/containers/ui-layout-sidebar/index.d.ts +0 -4
  43. package/dist/containers/ui-layout-sidebar/index.d.ts.map +0 -1
  44. package/dist/containers/ui-layout-sidebar/ui-layout-sidebar-element.d.ts +0 -11
  45. package/dist/containers/ui-layout-sidebar/ui-layout-sidebar-element.d.ts.map +0 -1
  46. package/dist/containers/ui-layout-sidebar/ui-layout-sidebar-item-element.d.ts +0 -10
  47. package/dist/containers/ui-layout-sidebar/ui-layout-sidebar-item-element.d.ts.map +0 -1
  48. package/dist/containers/ui-layout-sidebar/ui-layout-sidebar-item.d.ts +0 -3
  49. package/dist/containers/ui-layout-sidebar/ui-layout-sidebar-item.d.ts.map +0 -1
  50. package/dist/containers/ui-layout-sidebar/ui-layout-sidebar.d.ts +0 -4
  51. package/dist/containers/ui-layout-sidebar/ui-layout-sidebar.d.ts.map +0 -1
  52. package/dist/inspector/build-inspector.d.ts +0 -8
  53. package/dist/inspector/build-inspector.d.ts.map +0 -1
  54. package/dist/inspector/index.d.ts +0 -10
  55. package/dist/inspector/index.d.ts.map +0 -1
  56. package/dist/inspector/native-tokens-color-swatch-element.d.ts +0 -15
  57. package/dist/inspector/native-tokens-color-swatch-element.d.ts.map +0 -1
  58. package/dist/inspector/native-tokens-color-swatch.d.ts +0 -3
  59. package/dist/inspector/native-tokens-color-swatch.d.ts.map +0 -1
  60. package/dist/inspector/native-tokens-colors-element.d.ts +0 -14
  61. package/dist/inspector/native-tokens-colors-element.d.ts.map +0 -1
  62. package/dist/inspector/native-tokens-colors.d.ts +0 -4
  63. package/dist/inspector/native-tokens-colors.d.ts.map +0 -1
  64. package/dist/inspector/native-tokens-inspector-element.d.ts +0 -15
  65. package/dist/inspector/native-tokens-inspector-element.d.ts.map +0 -1
  66. package/dist/inspector/native-tokens-inspector.d.ts +0 -3
  67. package/dist/inspector/native-tokens-inspector.d.ts.map +0 -1
  68. package/dist/inspector/native-tokens-themes-element.d.ts +0 -13
  69. package/dist/inspector/native-tokens-themes-element.d.ts.map +0 -1
  70. package/dist/inspector/native-tokens-themes.d.ts +0 -4
  71. package/dist/inspector/native-tokens-themes.d.ts.map +0 -1
  72. package/dist/inspector/native-tokens-variable-element.d.ts +0 -19
  73. package/dist/inspector/native-tokens-variable-element.d.ts.map +0 -1
  74. package/dist/inspector/native-tokens-variable.d.ts +0 -4
  75. package/dist/inspector/native-tokens-variable.d.ts.map +0 -1
  76. package/dist/inspector.css +0 -231
  77. package/dist/inspector.d.ts +0 -12
  78. package/dist/inspector.d.ts.map +0 -1
  79. package/dist/inspector.js +0 -609
package/dist/kernel.js CHANGED
@@ -1,5 +1,5 @@
1
- import { Gt as e, It as t, Kt as n, Wt as r, qt as i } from "./components.js";
2
- import { G as a } from "./core.js";
1
+ import { Dt as e, Ft as t, It as n, Lt as r, Rt as i } from "./components.js";
2
+ import { K as a } from "./core.js";
3
3
  var o = class {
4
4
  #e = /* @__PURE__ */ new Map();
5
5
  #t = [];
@@ -8,9 +8,9 @@ var o = class {
8
8
  #i = i(!1);
9
9
  #a = i(null);
10
10
  #o = 0;
11
- lastCommand = n(() => this.#r.value);
12
- dispatching = n(() => this.#i.value);
13
- errors = n(() => this.#a.value);
11
+ lastCommand = r(() => this.#r.value);
12
+ dispatching = r(() => this.#i.value);
13
+ errors = r(() => this.#a.value);
14
14
  on(e, t) {
15
15
  if (typeof e == "string") {
16
16
  let n = e, r = this.#e.get(n);
@@ -33,22 +33,22 @@ var o = class {
33
33
  t !== -1 && this.#n.splice(t, 1);
34
34
  };
35
35
  }
36
- dispatch(e, n, i) {
37
- let a = typeof e == "string" ? Object.freeze({
38
- type: e,
39
- payload: n ?? null,
40
- id: t("cmd"),
36
+ dispatch(n, r, i) {
37
+ let a = typeof n == "string" ? Object.freeze({
38
+ type: n,
39
+ payload: r ?? null,
40
+ id: e("cmd"),
41
41
  timestamp: Date.now(),
42
42
  source: "human",
43
43
  ...i ? { meta: Object.freeze(i) } : {}
44
- }) : e, o = this.#n, s = 0, c = () => {
44
+ }) : n, o = this.#n, s = 0, c = () => {
45
45
  if (s < o.length) {
46
46
  let e = o[s++];
47
47
  return e(a, c);
48
48
  }
49
49
  this.#s(a);
50
50
  };
51
- return c(), r(() => {
51
+ return c(), t(() => {
52
52
  this.#r.value = a;
53
53
  }), a;
54
54
  }
@@ -80,38 +80,38 @@ var c = class {
80
80
  #e = i([]);
81
81
  #t = i([]);
82
82
  #n = 100;
83
- undoStack = n(() => this.#e.value);
84
- redoStack = n(() => this.#t.value);
85
- canUndo = n(() => this.#e.value.length > 0);
86
- canRedo = n(() => this.#t.value.length > 0);
83
+ undoStack = r(() => this.#e.value);
84
+ redoStack = r(() => this.#t.value);
85
+ canUndo = r(() => this.#e.value.length > 0);
86
+ canRedo = r(() => this.#t.value.length > 0);
87
87
  push(e) {
88
- e.meta?.undoType && r(() => {
88
+ e.meta?.undoType && t(() => {
89
89
  let t = [...this.#e.value, e];
90
90
  t.length > this.#n && t.shift(), this.#e.value = t, this.#t.value = [];
91
91
  });
92
92
  }
93
93
  undo(e) {
94
- let t = this.#e.value;
95
- if (t.length === 0) return null;
96
- let n = t[t.length - 1];
97
- return r(() => {
98
- this.#e.value = t.slice(0, -1), this.#t.value = [...this.#t.value, n];
99
- }), e.dispatch(n.meta.undoType, n.meta.undoPayload ?? null, { planId: n.meta?.planId }), n;
94
+ let n = this.#e.value;
95
+ if (n.length === 0) return null;
96
+ let r = n[n.length - 1];
97
+ return t(() => {
98
+ this.#e.value = n.slice(0, -1), this.#t.value = [...this.#t.value, r];
99
+ }), e.dispatch(r.meta.undoType, r.meta.undoPayload ?? null, { planId: r.meta?.planId }), r;
100
100
  }
101
101
  redo(e) {
102
- let t = this.#t.value;
103
- if (t.length === 0) return null;
104
- let n = t[t.length - 1];
105
- r(() => {
106
- this.#t.value = t.slice(0, -1);
107
- let e = [...this.#e.value, n];
102
+ let n = this.#t.value;
103
+ if (n.length === 0) return null;
104
+ let r = n[n.length - 1];
105
+ t(() => {
106
+ this.#t.value = n.slice(0, -1);
107
+ let e = [...this.#e.value, r];
108
108
  e.length > this.#n && e.shift(), this.#e.value = e;
109
109
  });
110
110
  let i = Object.freeze({
111
- ...n,
111
+ ...r,
112
112
  source: "replay"
113
113
  });
114
- return e.dispatch(i), n;
114
+ return e.dispatch(i), r;
115
115
  }
116
116
  getLog() {
117
117
  return this.#e.value;
@@ -122,7 +122,7 @@ var c = class {
122
122
  t.length > e && (this.#e.value = t.slice(t.length - e));
123
123
  }
124
124
  clear() {
125
- r(() => {
125
+ t(() => {
126
126
  this.#e.value = [], this.#t.value = [];
127
127
  });
128
128
  }
@@ -135,18 +135,18 @@ var u = 1e3, d = 10, f = class {
135
135
  #e = i([]);
136
136
  #t = !1;
137
137
  #n = /* @__PURE__ */ new Map();
138
- stack = n(() => this.#e.value);
139
- topOverlay = n(() => {
138
+ stack = r(() => this.#e.value);
139
+ topOverlay = r(() => {
140
140
  let e = this.#e.value;
141
141
  return e.length > 0 ? e[e.length - 1] : null;
142
142
  });
143
- open(e) {
144
- let n = t("overlay"), r = this.getNextZIndex(), i = Object.freeze({
143
+ open(t) {
144
+ let n = e("overlay"), r = this.getNextZIndex(), i = Object.freeze({
145
145
  id: n,
146
- type: e.type,
147
- element: e.element,
146
+ type: t.type,
147
+ element: t.element,
148
148
  zIndex: r,
149
- ...e.owner ? { owner: e.owner } : {}
149
+ ...t.owner ? { owner: t.owner } : {}
150
150
  }), a = new Promise((e) => {
151
151
  this.#n.set(n, e);
152
152
  });
@@ -216,7 +216,7 @@ var m = 0, h = class {
216
216
  #e = [];
217
217
  #t = i(["global"]);
218
218
  #n = !1;
219
- activeScope = n(() => {
219
+ activeScope = r(() => {
220
220
  let e = this.#t.value;
221
221
  return e[e.length - 1];
222
222
  });
@@ -400,13 +400,13 @@ function se(e) {
400
400
  var ce = class {
401
401
  #e = i([]);
402
402
  #t = 1e3;
403
- entries = n(() => this.#e.value);
404
- size = n(() => this.#e.value.length);
405
- log(e) {
403
+ entries = r(() => this.#e.value);
404
+ size = r(() => this.#e.value.length);
405
+ log(t) {
406
406
  let n = Object.freeze({
407
- id: t("log"),
407
+ id: e("log"),
408
408
  timestamp: Date.now(),
409
- ...e
409
+ ...t
410
410
  }), r = [n, ...this.#e.value];
411
411
  return r.length > this.#t && (r.length = this.#t), this.#e.value = r, n;
412
412
  }
@@ -465,7 +465,7 @@ function le(e) {
465
465
  var v = class {
466
466
  #e = i([]);
467
467
  #t = 500;
468
- samples = n(() => this.#e.value);
468
+ samples = r(() => this.#e.value);
469
469
  measure(e, t) {
470
470
  let n = performance.now();
471
471
  try {
@@ -525,11 +525,11 @@ var y = class {
525
525
  #n = i(!1);
526
526
  #r = i(null);
527
527
  #i = 0;
528
- loading = n(() => this.#n.value);
529
- error = n(() => this.#r.value);
528
+ loading = r(() => this.#n.value);
529
+ error = r(() => this.#r.value);
530
530
  query(e) {
531
- let t = pe(e), r = e.cacheTtl ?? 0, a = this.#e.get(t);
532
- if (a && r > 0 && Date.now() - a.entry.timestamp < r) return n(() => a.signal.value);
531
+ let t = pe(e), n = e.cacheTtl ?? 0, a = this.#e.get(t);
532
+ if (a && n > 0 && Date.now() - a.entry.timestamp < n) return r(() => a.signal.value);
533
533
  let o = a;
534
534
  return o || (o = {
535
535
  entry: {
@@ -537,43 +537,43 @@ var y = class {
537
537
  timestamp: 0
538
538
  },
539
539
  signal: i(null)
540
- }, this.#e.set(t, o)), this.#a(e, t), n(() => o.signal.value);
540
+ }, this.#e.set(t, o)), this.#a(e, t), r(() => o.signal.value);
541
541
  }
542
- async mutate(e, t) {
543
- let n, a;
544
- if (t) if (a = this.#e.get(t.key), n = a?.signal.peek() ?? null, a) a.signal.value = t.value, a.entry = Object.freeze({
545
- data: t.value,
542
+ async mutate(e, n) {
543
+ let r, a;
544
+ if (n) if (a = this.#e.get(n.key), r = a?.signal.peek() ?? null, a) a.signal.value = n.value, a.entry = Object.freeze({
545
+ data: n.value,
546
546
  timestamp: Date.now()
547
547
  });
548
548
  else {
549
- let e = i(t.value);
549
+ let e = i(n.value);
550
550
  a = {
551
551
  entry: Object.freeze({
552
- data: t.value,
552
+ data: n.value,
553
553
  timestamp: Date.now()
554
554
  }),
555
555
  signal: e
556
- }, this.#e.set(t.key, a);
556
+ }, this.#e.set(n.key, a);
557
557
  }
558
558
  try {
559
- let n = await this.#s(e), a = pe(e);
560
- return r(() => {
559
+ let r = await this.#s(e), a = pe(e);
560
+ return t(() => {
561
561
  let e = Object.freeze({
562
- data: n,
562
+ data: r,
563
563
  timestamp: Date.now()
564
- }), r = this.#e.get(a);
565
- if (r ? (r.signal.value = n, r.entry = e) : this.#e.set(a, {
564
+ }), t = this.#e.get(a);
565
+ if (t ? (t.signal.value = r, t.entry = e) : this.#e.set(a, {
566
566
  entry: e,
567
- signal: i(n)
568
- }), t && t.key !== a) {
569
- let r = this.#e.get(t.key);
570
- r && (r.signal.value = n, r.entry = e);
567
+ signal: i(r)
568
+ }), n && n.key !== a) {
569
+ let t = this.#e.get(n.key);
570
+ t && (t.signal.value = r, t.entry = e);
571
571
  }
572
- }), n;
572
+ }), r;
573
573
  } catch (e) {
574
- t && a && r(() => {
575
- a.signal.value = n, a.entry = Object.freeze({
576
- data: n,
574
+ n && a && t(() => {
575
+ a.signal.value = r, a.entry = Object.freeze({
576
+ data: r,
577
577
  timestamp: Date.now()
578
578
  });
579
579
  });
@@ -604,22 +604,22 @@ var y = class {
604
604
  this.#t.clear();
605
605
  }
606
606
  destroy() {
607
- this.abortAll(), this.#e.clear(), r(() => {
607
+ this.abortAll(), this.#e.clear(), t(() => {
608
608
  this.#n.value = !1, this.#r.value = null;
609
609
  }), this.#i = 0;
610
610
  }
611
- async #a(e, t) {
611
+ async #a(e, n) {
612
612
  this.#c();
613
613
  try {
614
- let n = await this.#o(e);
615
- r(() => {
614
+ let r = await this.#o(e);
615
+ t(() => {
616
616
  let e = Object.freeze({
617
- data: n,
617
+ data: r,
618
618
  timestamp: Date.now()
619
- }), r = this.#e.get(t);
620
- r ? (r.signal.value = n, r.entry = e) : this.#e.set(t, {
619
+ }), t = this.#e.get(n);
620
+ t ? (t.signal.value = r, t.entry = e) : this.#e.set(n, {
621
621
  entry: e,
622
- signal: i(n)
622
+ signal: i(r)
623
623
  }), this.#r.value = null;
624
624
  });
625
625
  } catch (e) {
@@ -692,10 +692,10 @@ var y = class {
692
692
  function me() {
693
693
  return new y();
694
694
  }
695
- function x(e, n) {
695
+ function x(t, n) {
696
696
  return Object.freeze({
697
- id: t("bind"),
698
- source: e,
697
+ id: e("bind"),
698
+ source: t,
699
699
  ...n
700
700
  });
701
701
  }
@@ -1071,14 +1071,14 @@ var D = class {
1071
1071
  #n = /* @__PURE__ */ new Map();
1072
1072
  #r = i(null);
1073
1073
  #i = i(0);
1074
- capabilities = n(() => this.#e.value);
1075
- rules = n(() => this.#t.value);
1076
- lastDecision = n(() => this.#r.value);
1077
- deniedCount = n(() => this.#i.value);
1078
- grant(e) {
1079
- let n = t("cap"), r = Object.freeze({
1074
+ capabilities = r(() => this.#e.value);
1075
+ rules = r(() => this.#t.value);
1076
+ lastDecision = r(() => this.#r.value);
1077
+ deniedCount = r(() => this.#i.value);
1078
+ grant(t) {
1079
+ let n = e("cap"), r = Object.freeze({
1080
1080
  id: n,
1081
- ...e
1081
+ ...t
1082
1082
  });
1083
1083
  return this.#e.value = [...this.#e.value, r], n;
1084
1084
  }
@@ -1093,10 +1093,10 @@ var D = class {
1093
1093
  let t = Date.now();
1094
1094
  return this.#e.value.some((n) => n.name === e && (n.expiresAt === void 0 || n.expiresAt > t));
1095
1095
  }
1096
- addRule(e) {
1097
- let n = t("rule"), r = Object.freeze({
1096
+ addRule(t) {
1097
+ let n = e("rule"), r = Object.freeze({
1098
1098
  id: n,
1099
- ...e
1099
+ ...t
1100
1100
  });
1101
1101
  return this.#t.value = [...this.#t.value, r], n;
1102
1102
  }
@@ -1125,15 +1125,15 @@ var D = class {
1125
1125
  }) : r;
1126
1126
  }
1127
1127
  middleware() {
1128
- return (e, t) => {
1129
- let n = this.evaluate(e);
1130
- if (r(() => {
1131
- this.#r.value = n, n.allowed || (this.#i.value = this.#i.value + 1);
1132
- }), n.allowed) return t();
1128
+ return (e, n) => {
1129
+ let r = this.evaluate(e);
1130
+ if (t(() => {
1131
+ this.#r.value = r, r.allowed || (this.#i.value = this.#i.value + 1);
1132
+ }), r.allowed) return n();
1133
1133
  };
1134
1134
  }
1135
1135
  destroy() {
1136
- r(() => {
1136
+ t(() => {
1137
1137
  this.#e.value = [], this.#t.value = [], this.#r.value = null, this.#i.value = 0;
1138
1138
  }), this.#n.clear();
1139
1139
  }
@@ -1717,11 +1717,11 @@ function mt(e) {
1717
1717
  /**
1718
1718
  * Wrap a conversion result as a UIPlan.
1719
1719
  */
1720
- function ht(e, n = "generated") {
1720
+ function ht(t, n = "generated") {
1721
1721
  return Object.freeze({
1722
- id: t("a2ui-plan"),
1722
+ id: e("a2ui-plan"),
1723
1723
  version: 1,
1724
- root: e.root,
1724
+ root: t.root,
1725
1725
  source: n,
1726
1726
  timestamp: Date.now()
1727
1727
  });
@@ -1760,22 +1760,22 @@ var L = class {
1760
1760
  #n;
1761
1761
  #r = /* @__PURE__ */ new Map();
1762
1762
  #i = i(0);
1763
- surfaceCount = n(() => this.#i.value);
1763
+ surfaceCount = r(() => this.#i.value);
1764
1764
  constructor(e, t, n) {
1765
1765
  this.#e = e, this.#t = t, this.#n = n ?? null;
1766
1766
  }
1767
1767
  handleMessage(e, t) {
1768
1768
  Ye(e) ? this.#a(e, t) : Xe(e) ? this.#o(e, t) : Ze(e) ? this.#l(e) : Qe(e) && this.#u(e);
1769
1769
  }
1770
- #a(e, n) {
1771
- let { surfaceId: r, catalogId: a, theme: o } = e.createSurface, s = this.#r.get(r);
1770
+ #a(t, n) {
1771
+ let { surfaceId: r, catalogId: a, theme: o } = t.createSurface, s = this.#r.get(r);
1772
1772
  if (s) {
1773
1773
  s.catalogId = a, s.theme = o;
1774
1774
  return;
1775
1775
  }
1776
1776
  let c = {
1777
1777
  surfaceId: r,
1778
- planId: t("a2ui-plan"),
1778
+ planId: e("a2ui-plan"),
1779
1779
  catalogId: a,
1780
1780
  theme: o,
1781
1781
  container: n ?? document.createElement("div"),
@@ -1788,11 +1788,11 @@ var L = class {
1788
1788
  };
1789
1789
  this.#r.set(r, c), this.#i.value = this.#r.size;
1790
1790
  }
1791
- #o(e, n) {
1792
- let { surfaceId: r, components: a } = e.updateComponents, o = this.#r.get(r);
1791
+ #o(t, n) {
1792
+ let { surfaceId: r, components: a } = t.updateComponents, o = this.#r.get(r);
1793
1793
  o ? n && (o.container = n) : (o = {
1794
1794
  surfaceId: r,
1795
- planId: t("a2ui-plan"),
1795
+ planId: e("a2ui-plan"),
1796
1796
  container: n ?? document.createElement("div"),
1797
1797
  components: [],
1798
1798
  dataModel: i({}),
@@ -1842,15 +1842,15 @@ var L = class {
1842
1842
  n.bindingDisposers = [], n.actionDisposer?.(), this.#r.delete(t), this.#i.value = this.#r.size;
1843
1843
  }
1844
1844
  }
1845
- #d(t, n) {
1846
- for (let [r, i] of t.bindings) {
1847
- let a = n.get(r);
1848
- if (a) for (let n of i) {
1849
- let r = e(() => {
1850
- let e = t.dataModel.value, r = I(e, n.path);
1851
- r !== void 0 && (n.property === "textContent" ? a.textContent = String(r) : n.property === "src" || n.property === "alt" || n.property.startsWith("aria-") ? a.setAttribute(n.property, String(r)) : a[n.property] = r);
1845
+ #d(e, t) {
1846
+ for (let [r, i] of e.bindings) {
1847
+ let a = t.get(r);
1848
+ if (a) for (let t of i) {
1849
+ let r = n(() => {
1850
+ let n = e.dataModel.value, r = I(n, t.path);
1851
+ r !== void 0 && (t.property === "textContent" ? a.textContent = String(r) : t.property === "src" || t.property === "alt" || t.property.startsWith("aria-") ? a.setAttribute(t.property, String(r)) : a[t.property] = r);
1852
1852
  });
1853
- t.bindingDisposers.push(r);
1853
+ e.bindingDisposers.push(r);
1854
1854
  }
1855
1855
  }
1856
1856
  }
@@ -2125,7 +2125,7 @@ var Et = class {
2125
2125
  #e = i(/* @__PURE__ */ new Map());
2126
2126
  #t;
2127
2127
  #n = null;
2128
- registry = n(() => this.#e.value);
2128
+ registry = r(() => this.#e.value);
2129
2129
  /** Lazy-initialized A2UI protocol adapter. Only created on first access. */
2130
2130
  get a2ui() {
2131
2131
  return this.#n ||= new R(this), this.#n;
@@ -2173,7 +2173,7 @@ function Dt(e) {
2173
2173
  function Ot() {
2174
2174
  z &&= (z.destroy(), null);
2175
2175
  }
2176
- var kt = 200, At = class e {
2176
+ var kt = 200, At = class n {
2177
2177
  #e;
2178
2178
  #t;
2179
2179
  #n;
@@ -2187,43 +2187,43 @@ var kt = 200, At = class e {
2187
2187
  history;
2188
2188
  running;
2189
2189
  constructor(e, t) {
2190
- this.#e = e, this.#t = t, this.#n = /* @__PURE__ */ new Map(), this.#r = /* @__PURE__ */ new Map(), this.#c(e.states, void 0), this.#i = i(e.initial), this.#a = i(e.context ? Object.freeze({ ...e.context }) : Object.freeze({})), this.#o = i(Object.freeze([])), this.#s = i(!1), this.currentState = n(() => this.#i.value), this.context = n(() => this.#a.value), this.history = n(() => this.#o.value), this.running = n(() => this.#s.value);
2190
+ this.#e = e, this.#t = t, this.#n = /* @__PURE__ */ new Map(), this.#r = /* @__PURE__ */ new Map(), this.#c(e.states, void 0), this.#i = i(e.initial), this.#a = i(e.context ? Object.freeze({ ...e.context }) : Object.freeze({})), this.#o = i(Object.freeze([])), this.#s = i(!1), this.currentState = r(() => this.#i.value), this.context = r(() => this.#a.value), this.history = r(() => this.#o.value), this.running = r(() => this.#s.value);
2191
2191
  }
2192
2192
  #c(e, t) {
2193
2193
  for (let n of e) this.#n.set(n.id, n), t !== void 0 && this.#r.set(n.id, t), n.children && this.#c(n.children, n.id);
2194
2194
  }
2195
2195
  start() {
2196
- this.#s.peek() || r(() => {
2196
+ this.#s.peek() || t(() => {
2197
2197
  this.#s.value = !0, this.#l(this.#e.initial);
2198
2198
  });
2199
2199
  }
2200
- send(e, n) {
2200
+ send(n, r) {
2201
2201
  if (!this.#s.peek()) return null;
2202
- let i = this.#i.peek(), a = this.#a.peek(), o = this.#p(i, e), s = [], c = [], l = null;
2202
+ let i = this.#i.peek(), a = this.#a.peek(), o = this.#p(i, n), s = [], c = [], l = null;
2203
2203
  for (let e of o) if (e.guard) {
2204
2204
  let t = e.guard.name || `${e.from}->${e.to}`;
2205
2205
  e.guard(a) ? (s.push(t), l ||= e) : c.push(t);
2206
2206
  } else l ||= e;
2207
2207
  if (!l) return null;
2208
2208
  let u = Object.freeze({
2209
- id: t("wf"),
2209
+ id: e("wf"),
2210
2210
  timestamp: Date.now(),
2211
- event: e,
2211
+ event: n,
2212
2212
  from: i,
2213
2213
  to: l.to,
2214
2214
  guardsPassed: Object.freeze(s),
2215
2215
  guardsBlocked: Object.freeze(c),
2216
2216
  action: l.action
2217
2217
  });
2218
- return r(() => {
2218
+ return t(() => {
2219
2219
  this.#u(i), l.action && this.#m(l.action, {
2220
- event: e,
2221
- data: n
2220
+ event: n,
2221
+ data: r
2222
2222
  }), this.#h(u), this.#i.value = l.to, this.#l(l.to);
2223
2223
  }), u;
2224
2224
  }
2225
2225
  stop() {
2226
- this.#s.peek() && r(() => {
2226
+ this.#s.peek() && t(() => {
2227
2227
  this.#u(this.#i.peek()), this.#s.value = !1;
2228
2228
  });
2229
2229
  }
@@ -2270,14 +2270,14 @@ var kt = 200, At = class e {
2270
2270
  timestamp: Date.now()
2271
2271
  });
2272
2272
  }
2273
- static restore(t, n, i) {
2274
- let a = new e(n, i);
2275
- return r(() => {
2276
- a.#i.value = t.currentState, a.#a.value = Object.freeze({ ...t.context }), a.#o.value = Object.freeze([...t.history]), a.#s.value = !0;
2273
+ static restore(e, r, i) {
2274
+ let a = new n(r, i);
2275
+ return t(() => {
2276
+ a.#i.value = e.currentState, a.#a.value = Object.freeze({ ...e.context }), a.#o.value = Object.freeze([...e.history]), a.#s.value = !0;
2277
2277
  }), a;
2278
2278
  }
2279
2279
  destroy() {
2280
- r(() => {
2280
+ t(() => {
2281
2281
  this.#s.peek() && this.#u(this.#i.peek()), this.#s.value = !1, this.#o.value = Object.freeze([]), this.#n.clear(), this.#r.clear();
2282
2282
  });
2283
2283
  }
@@ -2454,16 +2454,16 @@ var Bt = class {
2454
2454
  #t = i([]);
2455
2455
  #n = /* @__PURE__ */ new Map();
2456
2456
  #r = /* @__PURE__ */ new Map();
2457
- activeBindings = n(() => this.#t.value);
2457
+ activeBindings = r(() => this.#t.value);
2458
2458
  constructor(e) {
2459
2459
  this.#e = e;
2460
2460
  }
2461
- bind(n, r, i, a, o) {
2461
+ bind(t, r, i, a, o) {
2462
2462
  let s = x(a.source, {
2463
2463
  method: a.method,
2464
2464
  headers: a.headers,
2465
2465
  cacheTtl: a.cacheTtl
2466
- }), c = this.#e.query(s), l = e(() => {
2466
+ }), c = this.#e.query(s), l = n(() => {
2467
2467
  let e = c.value;
2468
2468
  if (e === null) return;
2469
2469
  let t = a.transform ? Rt(e, a.transform) : e;
@@ -2481,7 +2481,7 @@ var Bt = class {
2481
2481
  Array.isArray(t) && this.#o(i, t, o);
2482
2482
  break;
2483
2483
  }
2484
- }), u = t("dbind"), d;
2484
+ }), u = e("dbind"), d;
2485
2485
  a.refreshInterval && a.refreshInterval > 0 && (d = setInterval(() => {
2486
2486
  this.#e.invalidate(zt(s)), this.#e.query(s);
2487
2487
  }, a.refreshInterval)), this.#n.set(u, {
@@ -2490,14 +2490,14 @@ var Bt = class {
2490
2490
  });
2491
2491
  let f = Object.freeze({
2492
2492
  id: u,
2493
- planId: n,
2493
+ planId: t,
2494
2494
  nodeId: r,
2495
2495
  binding: a,
2496
2496
  dispose: () => {
2497
- this.#i(u), this.#t.value = this.#t.value.filter((e) => e.id !== u), this.#a(n, u);
2497
+ this.#i(u), this.#t.value = this.#t.value.filter((e) => e.id !== u), this.#a(t, u);
2498
2498
  }
2499
- }), p = this.#r.get(n);
2500
- return p || (p = /* @__PURE__ */ new Set(), this.#r.set(n, p)), p.add(u), this.#t.value = [...this.#t.value, f], f;
2499
+ }), p = this.#r.get(t);
2500
+ return p || (p = /* @__PURE__ */ new Set(), this.#r.set(t, p)), p.add(u), this.#t.value = [...this.#t.value, f], f;
2501
2501
  }
2502
2502
  bindPlan(e, t, n, r) {
2503
2503
  let i = [];
@@ -3552,16 +3552,16 @@ function wn(e, t) {
3552
3552
  }
3553
3553
  return n;
3554
3554
  }
3555
- var Tn = class e {
3555
+ var Tn = class t {
3556
3556
  #e;
3557
3557
  #t = 0;
3558
3558
  constructor(e) {
3559
3559
  this.#e = e ?? /* @__PURE__ */ new Map();
3560
3560
  }
3561
- generate(e, n) {
3561
+ generate(t, n) {
3562
3562
  this.#t = 0;
3563
- let r = this.#n(e), i = Cn({
3564
- id: e.id ?? t("plan"),
3563
+ let r = this.#n(t), i = Cn({
3564
+ id: t.id ?? e("plan"),
3565
3565
  version: 1,
3566
3566
  root: r,
3567
3567
  source: n ?? "generated",
@@ -3571,7 +3571,7 @@ var Tn = class e {
3571
3571
  plan: i,
3572
3572
  validation: g(i, this.#e, { allowUnregistered: !0 }),
3573
3573
  accessibility: w(i.root),
3574
- warnings: Object.freeze(this.#c(e, i))
3574
+ warnings: Object.freeze(this.#c(t, i))
3575
3575
  });
3576
3576
  }
3577
3577
  #n(e) {
@@ -3707,41 +3707,41 @@ var Tn = class e {
3707
3707
  * Produces a `<form>` with `ui-field` + `ui-input`/`ui-select`/`ui-textarea` per field,
3708
3708
  * plus a submit `ui-button` at the end.
3709
3709
  */
3710
- static form(t, n) {
3710
+ static form(e, n) {
3711
3711
  let r = [];
3712
- for (let e of t) {
3713
- let t = e.type ?? "text", n;
3714
- n = t === "select" && e.options ? {
3712
+ for (let t of e) {
3713
+ let e = t.type ?? "text", n;
3714
+ n = e === "select" && t.options ? {
3715
3715
  component: "ui-select",
3716
- label: e.name,
3716
+ label: t.name,
3717
3717
  attributes: {
3718
- options: JSON.stringify(e.options.map((e) => ({
3718
+ options: JSON.stringify(t.options.map((e) => ({
3719
3719
  value: e.value,
3720
3720
  label: e.label
3721
3721
  }))),
3722
- ...e.placeholder ? { placeholder: e.placeholder } : {},
3723
- ...e.required ? { required: "" } : {}
3722
+ ...t.placeholder ? { placeholder: t.placeholder } : {},
3723
+ ...t.required ? { required: "" } : {}
3724
3724
  }
3725
- } : t === "textarea" ? {
3725
+ } : e === "textarea" ? {
3726
3726
  component: "ui-textarea",
3727
- label: e.name,
3727
+ label: t.name,
3728
3728
  attributes: {
3729
- ...e.placeholder ? { placeholder: e.placeholder } : {},
3730
- ...e.required ? { required: "" } : {}
3729
+ ...t.placeholder ? { placeholder: t.placeholder } : {},
3730
+ ...t.required ? { required: "" } : {}
3731
3731
  }
3732
3732
  } : {
3733
3733
  component: "ui-input",
3734
- label: e.name,
3734
+ label: t.name,
3735
3735
  attributes: {
3736
- type: t,
3737
- ...e.placeholder ? { placeholder: e.placeholder } : {},
3738
- ...e.required ? { required: "" } : {}
3736
+ type: e,
3737
+ ...t.placeholder ? { placeholder: t.placeholder } : {},
3738
+ ...t.required ? { required: "" } : {}
3739
3739
  }
3740
3740
  }, r.push({
3741
3741
  component: "ui-field",
3742
3742
  children: [{
3743
3743
  component: "label",
3744
- label: e.name,
3744
+ label: t.name,
3745
3745
  slot: "label"
3746
3746
  }, n]
3747
3747
  });
@@ -3767,13 +3767,13 @@ var Tn = class e {
3767
3767
  }],
3768
3768
  title: n?.title
3769
3769
  };
3770
- return new e(n?.registry).generate(i);
3770
+ return new t(n?.registry).generate(i);
3771
3771
  }
3772
3772
  /**
3773
3773
  * Build a simple action bar from button descriptors.
3774
3774
  * Produces a horizontal `<div>` with `ui-button` children.
3775
3775
  */
3776
- static actions(t, n) {
3776
+ static actions(e, n) {
3777
3777
  let r = {
3778
3778
  type: "action",
3779
3779
  elements: [{
@@ -3782,7 +3782,7 @@ var Tn = class e {
3782
3782
  style: "display: flex; gap: 0.5rem; align-items: center;",
3783
3783
  role: "toolbar"
3784
3784
  },
3785
- children: t.map((e) => ({
3785
+ children: e.map((e) => ({
3786
3786
  component: "ui-button",
3787
3787
  label: e.label,
3788
3788
  attributes: {
@@ -3793,36 +3793,36 @@ var Tn = class e {
3793
3793
  }))
3794
3794
  }]
3795
3795
  };
3796
- return new e(n?.registry).generate(r);
3796
+ return new t(n?.registry).generate(r);
3797
3797
  }
3798
3798
  /**
3799
3799
  * Build a content card with optional heading, body, media, and footer actions.
3800
3800
  * Produces a `<ui-card>` with slotted children.
3801
3801
  */
3802
- static card(t, n) {
3802
+ static card(e, n) {
3803
3803
  let r = [];
3804
- t.media && r.push({
3804
+ e.media && r.push({
3805
3805
  component: "img",
3806
3806
  slot: "media",
3807
3807
  attributes: {
3808
- src: t.media.src,
3809
- alt: t.media.alt,
3810
- ...t.media.height ? { style: `height: ${t.media.height}; object-fit: cover;` } : {}
3808
+ src: e.media.src,
3809
+ alt: e.media.alt,
3810
+ ...e.media.height ? { style: `height: ${e.media.height}; object-fit: cover;` } : {}
3811
3811
  }
3812
- }), t.heading && r.push({
3812
+ }), e.heading && r.push({
3813
3813
  component: "div",
3814
3814
  slot: "header",
3815
3815
  children: [{
3816
3816
  component: "span",
3817
- label: t.heading
3817
+ label: e.heading
3818
3818
  }]
3819
3819
  }), r.push({
3820
3820
  component: "p",
3821
- label: t.body
3822
- }), t.footer && t.footer.length > 0 && r.push({
3821
+ label: e.body
3822
+ }), e.footer && e.footer.length > 0 && r.push({
3823
3823
  component: "div",
3824
3824
  slot: "footer",
3825
- children: t.footer.map((e) => ({
3825
+ children: e.footer.map((e) => ({
3826
3826
  component: "ui-button",
3827
3827
  label: e.label,
3828
3828
  attributes: {
@@ -3833,7 +3833,7 @@ var Tn = class e {
3833
3833
  }))
3834
3834
  });
3835
3835
  let i = {};
3836
- t.interactive && (i.interactive = ""), t.href && (i.href = t.href, i.interactive = "");
3836
+ e.interactive && (i.interactive = ""), e.href && (i.href = e.href, i.interactive = "");
3837
3837
  let a = {
3838
3838
  type: "display",
3839
3839
  elements: [{
@@ -3842,27 +3842,27 @@ var Tn = class e {
3842
3842
  children: r
3843
3843
  }]
3844
3844
  };
3845
- return new e(n?.registry).generate(a);
3845
+ return new t(n?.registry).generate(a);
3846
3846
  }
3847
3847
  /**
3848
3848
  * Build a confirmation/alert dialog.
3849
3849
  * Produces a `<ui-dialog>` with a styled panel containing title, body, and action buttons.
3850
3850
  */
3851
- static dialog(t, n) {
3851
+ static dialog(e, n) {
3852
3852
  let r = [];
3853
- (t.cancelLabel !== void 0 || t.cancelCommand) && r.push({
3853
+ (e.cancelLabel !== void 0 || e.cancelCommand) && r.push({
3854
3854
  component: "ui-button",
3855
- label: t.cancelLabel ?? "Cancel",
3855
+ label: e.cancelLabel ?? "Cancel",
3856
3856
  attributes: { variant: "ghost" },
3857
- events: t.cancelCommand ? { "ui-press": t.cancelCommand } : {}
3857
+ events: e.cancelCommand ? { "ui-press": e.cancelCommand } : {}
3858
3858
  }), r.push({
3859
3859
  component: "ui-button",
3860
- label: t.confirmLabel ?? "Confirm",
3860
+ label: e.confirmLabel ?? "Confirm",
3861
3861
  attributes: {
3862
3862
  variant: "primary",
3863
- intent: t.intent ?? "accent"
3863
+ intent: e.intent ?? "accent"
3864
3864
  },
3865
- events: { "ui-press": t.confirmCommand }
3865
+ events: { "ui-press": e.confirmCommand }
3866
3866
  });
3867
3867
  let i = {
3868
3868
  type: "composite",
@@ -3874,11 +3874,11 @@ var Tn = class e {
3874
3874
  children: [
3875
3875
  {
3876
3876
  component: "h3",
3877
- label: t.title
3877
+ label: e.title
3878
3878
  },
3879
3879
  {
3880
3880
  component: "p",
3881
- label: t.body,
3881
+ label: e.body,
3882
3882
  attributes: { style: "margin-block: 1rem 1.5rem;" }
3883
3883
  },
3884
3884
  {
@@ -3890,14 +3890,14 @@ var Tn = class e {
3890
3890
  }]
3891
3891
  }]
3892
3892
  };
3893
- return new e(n?.registry).generate(i);
3893
+ return new t(n?.registry).generate(i);
3894
3894
  }
3895
3895
  /**
3896
3896
  * Build a settings toggle list.
3897
3897
  * Produces a vertical list of `ui-switch` elements with labels and optional descriptions.
3898
3898
  */
3899
- static settings(t, n) {
3900
- let r = t.map((e) => {
3899
+ static settings(e, n) {
3900
+ let r = e.map((e) => {
3901
3901
  let t = { name: e.name };
3902
3902
  e.checked && (t.checked = "");
3903
3903
  let n = {
@@ -3924,36 +3924,36 @@ var Tn = class e {
3924
3924
  children: r
3925
3925
  }]
3926
3926
  };
3927
- return new e(n?.registry).generate(i);
3927
+ return new t(n?.registry).generate(i);
3928
3928
  }
3929
3929
  /**
3930
3930
  * Build a tabbed interface.
3931
3931
  * Produces a `<ui-tabs>` with `<ui-tab>` triggers + `<ui-tab-panels>` container.
3932
3932
  */
3933
- static tabs(t, n) {
3933
+ static tabs(e, n) {
3934
3934
  let r = [];
3935
- for (let e of t) {
3936
- let t = { value: e.value };
3937
- e.disabled && (t.disabled = ""), r.push({
3935
+ for (let t of e) {
3936
+ let e = { value: t.value };
3937
+ t.disabled && (e.disabled = ""), r.push({
3938
3938
  component: "ui-tab",
3939
- label: e.label,
3940
- attributes: t
3939
+ label: t.label,
3940
+ attributes: e
3941
3941
  });
3942
3942
  }
3943
3943
  let i = [];
3944
- for (let e of t) i.push({
3944
+ for (let t of e) i.push({
3945
3945
  component: "ui-tab-panel",
3946
- attributes: { value: e.value },
3946
+ attributes: { value: t.value },
3947
3947
  children: [{
3948
3948
  component: "p",
3949
- label: e.content
3949
+ label: t.content
3950
3950
  }]
3951
3951
  });
3952
3952
  r.push({
3953
3953
  component: "ui-tab-panels",
3954
3954
  children: i
3955
3955
  });
3956
- let a = {}, o = n?.defaultValue ?? t[0]?.value;
3956
+ let a = {}, o = n?.defaultValue ?? e[0]?.value;
3957
3957
  o && (a.value = o), n?.orientation && (a.orientation = n.orientation);
3958
3958
  let s = {
3959
3959
  type: "layout",
@@ -3963,17 +3963,17 @@ var Tn = class e {
3963
3963
  children: r
3964
3964
  }]
3965
3965
  };
3966
- return new e(n?.registry).generate(s);
3966
+ return new t(n?.registry).generate(s);
3967
3967
  }
3968
3968
  /**
3969
3969
  * Build a navigation list.
3970
3970
  * Produces a `<ui-listbox>` with `<ui-option>` items, optionally grouped with `<ui-option-group>`.
3971
3971
  */
3972
- static nav(t, n) {
3972
+ static nav(e, n) {
3973
3973
  let r = /* @__PURE__ */ new Map();
3974
- for (let e of t) {
3975
- let t = e.group, n = r.get(t);
3976
- n || (n = [], r.set(t, n)), n.push(e);
3974
+ for (let t of e) {
3975
+ let e = t.group, n = r.get(e);
3976
+ n || (n = [], r.set(e, n)), n.push(t);
3977
3977
  }
3978
3978
  let i = [];
3979
3979
  for (let [e, t] of r) {
@@ -4017,7 +4017,7 @@ var Tn = class e {
4017
4017
  children: i
4018
4018
  }]
4019
4019
  };
4020
- return new e(n?.registry).generate(a);
4020
+ return new t(n?.registry).generate(a);
4021
4021
  }
4022
4022
  };
4023
4023
  function En(e) {