@nonoun/native-ui 0.2.8 → 0.2.9

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 (62) hide show
  1. package/dist/components-lean.css +119 -6
  2. package/dist/components.css +119 -6
  3. package/dist/containers/ui-layout-sidebar/ui-layout-sidebar-element.d.ts.map +1 -1
  4. package/dist/core/trait-runtime.d.ts.map +1 -1
  5. package/dist/custom-elements.json +1602 -1602
  6. package/dist/dialog-controller.js +38 -350
  7. package/dist/foundation.css +1 -15
  8. package/dist/{nav/inspector → inspector}/build-inspector.d.ts +2 -2
  9. package/dist/inspector/build-inspector.d.ts.map +1 -0
  10. package/dist/{nav/inspector → inspector}/ds-color-swatch-element.d.ts +1 -1
  11. package/dist/inspector/ds-color-swatch-element.d.ts.map +1 -0
  12. package/dist/inspector/ds-color-swatch.d.ts.map +1 -0
  13. package/dist/{nav/inspector → inspector}/ds-colors-element.d.ts +1 -1
  14. package/dist/inspector/ds-colors-element.d.ts.map +1 -0
  15. package/dist/inspector/ds-colors.d.ts.map +1 -0
  16. package/dist/inspector/ds-inspector-element.d.ts +15 -0
  17. package/dist/inspector/ds-inspector-element.d.ts.map +1 -0
  18. package/dist/inspector/ds-inspector.d.ts +3 -0
  19. package/dist/inspector/ds-inspector.d.ts.map +1 -0
  20. package/dist/{nav/inspector → inspector}/ds-themes-element.d.ts +1 -1
  21. package/dist/inspector/ds-themes-element.d.ts.map +1 -0
  22. package/dist/inspector/ds-themes.d.ts.map +1 -0
  23. package/dist/{nav/inspector → inspector}/ds-variable-element.d.ts +1 -1
  24. package/dist/inspector/ds-variable-element.d.ts.map +1 -0
  25. package/dist/inspector/ds-variable.d.ts.map +1 -0
  26. package/dist/{nav/inspector → inspector}/index.d.ts +1 -0
  27. package/dist/inspector/index.d.ts.map +1 -0
  28. package/dist/inspector.css +1 -1
  29. package/dist/inspector.d.ts +10 -6
  30. package/dist/inspector.d.ts.map +1 -1
  31. package/dist/inspector.js +94 -75
  32. package/dist/kernel.js +185 -186
  33. package/dist/list-navigate-controller.js +457 -0
  34. package/dist/native-ui-lean.css +120 -21
  35. package/dist/native-ui.css +120 -21
  36. package/dist/native-ui.js +7 -7
  37. package/dist/register-all.js +4 -3
  38. package/dist/register-all2.js +20 -19
  39. package/dist/traits/adapters/draggable-adapter.d.ts.map +1 -1
  40. package/dist/traits/drag-controller.d.ts +3 -0
  41. package/dist/traits/drag-controller.d.ts.map +1 -1
  42. package/dist/traits.js +5 -6
  43. package/dist/ui-icon-element.js +391 -4153
  44. package/dist/ui-layout-inspector-element.js +3777 -0
  45. package/dist/uid.js +63 -3
  46. package/package.json +1 -1
  47. package/dist/define.js +0 -62
  48. package/dist/nav/inspector/build-inspector.d.ts.map +0 -1
  49. package/dist/nav/inspector/ds-color-swatch-element.d.ts.map +0 -1
  50. package/dist/nav/inspector/ds-color-swatch.d.ts.map +0 -1
  51. package/dist/nav/inspector/ds-colors-element.d.ts.map +0 -1
  52. package/dist/nav/inspector/ds-colors.d.ts.map +0 -1
  53. package/dist/nav/inspector/ds-themes-element.d.ts.map +0 -1
  54. package/dist/nav/inspector/ds-themes.d.ts.map +0 -1
  55. package/dist/nav/inspector/ds-variable-element.d.ts.map +0 -1
  56. package/dist/nav/inspector/ds-variable.d.ts.map +0 -1
  57. package/dist/nav/inspector/index.d.ts.map +0 -1
  58. package/dist/ui-element.js +0 -133
  59. /package/dist/{nav/inspector → inspector}/ds-color-swatch.d.ts +0 -0
  60. /package/dist/{nav/inspector → inspector}/ds-colors.d.ts +0 -0
  61. /package/dist/{nav/inspector → inspector}/ds-themes.d.ts +0 -0
  62. /package/dist/{nav/inspector → inspector}/ds-variable.d.ts +0 -0
package/dist/kernel.js CHANGED
@@ -1,16 +1,15 @@
1
- import { n as e, t } from "./uid.js";
2
- import { i as n, n as r, r as i, t as a } from "./define.js";
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "./uid.js";
3
2
  var o = class {
4
3
  #e = /* @__PURE__ */ new Map();
5
4
  #t = [];
6
5
  #n = [];
7
- #r = n(null);
8
- #i = n(!1);
9
- #a = n(null);
6
+ #r = r(null);
7
+ #i = r(!1);
8
+ #a = r(null);
10
9
  #o = 0;
11
- lastCommand = i(() => this.#r.value);
12
- dispatching = i(() => this.#i.value);
13
- errors = i(() => this.#a.value);
10
+ lastCommand = e(() => this.#r.value);
11
+ dispatching = e(() => this.#i.value);
12
+ errors = e(() => this.#a.value);
14
13
  on(e, t) {
15
14
  if (typeof e == "string") {
16
15
  let n = e, r = this.#e.get(n);
@@ -33,24 +32,24 @@ var o = class {
33
32
  t !== -1 && this.#n.splice(t, 1);
34
33
  };
35
34
  }
36
- dispatch(e, n, i) {
37
- let a = typeof e == "string" ? Object.freeze({
35
+ dispatch(e, t, n) {
36
+ let r = typeof e == "string" ? Object.freeze({
38
37
  type: e,
39
- payload: n ?? null,
40
- id: t("cmd"),
38
+ payload: t ?? null,
39
+ id: a("cmd"),
41
40
  timestamp: Date.now(),
42
41
  source: "human",
43
- ...i ? { meta: Object.freeze(i) } : {}
42
+ ...n ? { meta: Object.freeze(n) } : {}
44
43
  }) : e, o = this.#n, s = 0, c = () => {
45
44
  if (s < o.length) {
46
45
  let e = o[s++];
47
- return e(a, c);
46
+ return e(r, c);
48
47
  }
49
- this.#s(a);
48
+ this.#s(r);
50
49
  };
51
- return c(), r(() => {
52
- this.#r.value = a;
53
- }), a;
50
+ return c(), i(() => {
51
+ this.#r.value = r;
52
+ }), r;
54
53
  }
55
54
  #s(e) {
56
55
  let t = this.#e.get(e.type);
@@ -77,15 +76,15 @@ function s() {
77
76
  return new o();
78
77
  }
79
78
  var c = class {
80
- #e = n([]);
81
- #t = n([]);
79
+ #e = r([]);
80
+ #t = r([]);
82
81
  #n = 100;
83
- undoStack = i(() => this.#e.value);
84
- redoStack = i(() => this.#t.value);
85
- canUndo = i(() => this.#e.value.length > 0);
86
- canRedo = i(() => this.#t.value.length > 0);
82
+ undoStack = e(() => this.#e.value);
83
+ redoStack = e(() => this.#t.value);
84
+ canUndo = e(() => this.#e.value.length > 0);
85
+ canRedo = e(() => this.#t.value.length > 0);
87
86
  push(e) {
88
- e.meta?.undoType && r(() => {
87
+ e.meta?.undoType && i(() => {
89
88
  let t = [...this.#e.value, e];
90
89
  t.length > this.#n && t.shift(), this.#e.value = t, this.#t.value = [];
91
90
  });
@@ -94,7 +93,7 @@ var c = class {
94
93
  let t = this.#e.value;
95
94
  if (t.length === 0) return null;
96
95
  let n = t[t.length - 1];
97
- return r(() => {
96
+ return i(() => {
98
97
  this.#e.value = t.slice(0, -1), this.#t.value = [...this.#t.value, n];
99
98
  }), e.dispatch(n.meta.undoType, n.meta.undoPayload ?? null, { planId: n.meta?.planId }), n;
100
99
  }
@@ -102,16 +101,16 @@ var c = class {
102
101
  let t = this.#t.value;
103
102
  if (t.length === 0) return null;
104
103
  let n = t[t.length - 1];
105
- r(() => {
104
+ i(() => {
106
105
  this.#t.value = t.slice(0, -1);
107
106
  let e = [...this.#e.value, n];
108
107
  e.length > this.#n && e.shift(), this.#e.value = e;
109
108
  });
110
- let i = Object.freeze({
109
+ let r = Object.freeze({
111
110
  ...n,
112
111
  source: "replay"
113
112
  });
114
- return e.dispatch(i), n;
113
+ return e.dispatch(r), n;
115
114
  }
116
115
  getLog() {
117
116
  return this.#e.value;
@@ -122,7 +121,7 @@ var c = class {
122
121
  t.length > e && (this.#e.value = t.slice(t.length - e));
123
122
  }
124
123
  clear() {
125
- r(() => {
124
+ i(() => {
126
125
  this.#e.value = [], this.#t.value = [];
127
126
  });
128
127
  }
@@ -132,27 +131,27 @@ function l(e) {
132
131
  return e !== void 0 && t.setMaxSize(e), t;
133
132
  }
134
133
  var u = 1e3, d = 10, f = class {
135
- #e = n([]);
134
+ #e = r([]);
136
135
  #t = !1;
137
136
  #n = /* @__PURE__ */ new Map();
138
- stack = i(() => this.#e.value);
139
- topOverlay = i(() => {
137
+ stack = e(() => this.#e.value);
138
+ topOverlay = e(() => {
140
139
  let e = this.#e.value;
141
140
  return e.length > 0 ? e[e.length - 1] : null;
142
141
  });
143
142
  open(e) {
144
- let n = t("overlay"), r = this.getNextZIndex(), i = Object.freeze({
145
- id: n,
143
+ let t = a("overlay"), n = this.getNextZIndex(), r = Object.freeze({
144
+ id: t,
146
145
  type: e.type,
147
146
  element: e.element,
148
- zIndex: r,
147
+ zIndex: n,
149
148
  ...e.owner ? { owner: e.owner } : {}
150
- }), a = new Promise((e) => {
151
- this.#n.set(n, e);
149
+ }), i = new Promise((e) => {
150
+ this.#n.set(t, e);
152
151
  });
153
- return this.#e.value = [...this.#e.value, i], this.#i(), {
154
- id: n,
155
- closed: a
152
+ return this.#e.value = [...this.#e.value, r], this.#i(), {
153
+ id: t,
154
+ closed: i
156
155
  };
157
156
  }
158
157
  close(e) {
@@ -214,9 +213,9 @@ function p() {
214
213
  }
215
214
  var m = 0, h = class {
216
215
  #e = [];
217
- #t = n(["global"]);
216
+ #t = r(["global"]);
218
217
  #n = !1;
219
- activeScope = i(() => {
218
+ activeScope = e(() => {
220
219
  let e = this.#t.value;
221
220
  return e[e.length - 1];
222
221
  });
@@ -398,17 +397,17 @@ function se(e) {
398
397
  return new oe(e);
399
398
  }
400
399
  var ce = class {
401
- #e = n([]);
400
+ #e = r([]);
402
401
  #t = 1e3;
403
- entries = i(() => this.#e.value);
404
- size = i(() => this.#e.value.length);
402
+ entries = e(() => this.#e.value);
403
+ size = e(() => this.#e.value.length);
405
404
  log(e) {
406
- let n = Object.freeze({
407
- id: t("log"),
405
+ let t = Object.freeze({
406
+ id: a("log"),
408
407
  timestamp: Date.now(),
409
408
  ...e
410
- }), r = [n, ...this.#e.value];
411
- return r.length > this.#t && (r.length = this.#t), this.#e.value = r, n;
409
+ }), n = [t, ...this.#e.value];
410
+ return n.length > this.#t && (n.length = this.#t), this.#e.value = n, t;
412
411
  }
413
412
  query(e) {
414
413
  let t = this.#e.value;
@@ -463,9 +462,9 @@ function le(e) {
463
462
  return e !== void 0 && t.setMaxSize(e), t;
464
463
  }
465
464
  var v = class {
466
- #e = n([]);
465
+ #e = r([]);
467
466
  #t = 500;
468
- samples = i(() => this.#e.value);
467
+ samples = e(() => this.#e.value);
469
468
  measure(e, t) {
470
469
  let n = performance.now();
471
470
  try {
@@ -522,31 +521,31 @@ function pe(e) {
522
521
  var y = class {
523
522
  #e = /* @__PURE__ */ new Map();
524
523
  #t = /* @__PURE__ */ new Map();
525
- #n = n(!1);
526
- #r = n(null);
524
+ #n = r(!1);
525
+ #r = r(null);
527
526
  #i = 0;
528
- loading = i(() => this.#n.value);
529
- error = i(() => this.#r.value);
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 i(() => a.signal.value);
527
+ loading = e(() => this.#n.value);
528
+ error = e(() => this.#r.value);
529
+ query(t) {
530
+ let n = pe(t), i = t.cacheTtl ?? 0, a = this.#e.get(n);
531
+ if (a && i > 0 && Date.now() - a.entry.timestamp < i) return e(() => a.signal.value);
533
532
  let o = a;
534
533
  return o || (o = {
535
534
  entry: {
536
535
  data: null,
537
536
  timestamp: 0
538
537
  },
539
- signal: n(null)
540
- }, this.#e.set(t, o)), this.#a(e, t), i(() => o.signal.value);
538
+ signal: r(null)
539
+ }, this.#e.set(n, o)), this.#a(t, n), e(() => o.signal.value);
541
540
  }
542
541
  async mutate(e, t) {
543
- let i, a;
544
- if (t) if (a = this.#e.get(t.key), i = a?.signal.peek() ?? null, a) a.signal.value = t.value, a.entry = Object.freeze({
542
+ let n, a;
543
+ 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
544
  data: t.value,
546
545
  timestamp: Date.now()
547
546
  });
548
547
  else {
549
- let e = n(t.value);
548
+ let e = r(t.value);
550
549
  a = {
551
550
  entry: Object.freeze({
552
551
  data: t.value,
@@ -556,29 +555,29 @@ var y = class {
556
555
  }, this.#e.set(t.key, a);
557
556
  }
558
557
  try {
559
- let i = await this.#s(e), a = pe(e);
560
- return r(() => {
558
+ let n = await this.#s(e), a = pe(e);
559
+ return i(() => {
561
560
  let e = Object.freeze({
562
- data: i,
561
+ data: n,
563
562
  timestamp: Date.now()
564
- }), r = this.#e.get(a);
565
- if (r ? (r.signal.value = i, r.entry = e) : this.#e.set(a, {
563
+ }), i = this.#e.get(a);
564
+ if (i ? (i.signal.value = n, i.entry = e) : this.#e.set(a, {
566
565
  entry: e,
567
- signal: n(i)
566
+ signal: r(n)
568
567
  }), t && t.key !== a) {
569
- let n = this.#e.get(t.key);
570
- n && (n.signal.value = i, n.entry = e);
568
+ let r = this.#e.get(t.key);
569
+ r && (r.signal.value = n, r.entry = e);
571
570
  }
572
- }), i;
571
+ }), n;
573
572
  } catch (e) {
574
- t && a && r(() => {
575
- a.signal.value = i, a.entry = Object.freeze({
576
- data: i,
573
+ t && a && i(() => {
574
+ a.signal.value = n, a.entry = Object.freeze({
575
+ data: n,
577
576
  timestamp: Date.now()
578
577
  });
579
578
  });
580
- let n = e instanceof Error ? e : Error(String(e));
581
- throw this.#r.value = n, n;
579
+ let r = e instanceof Error ? e : Error(String(e));
580
+ throw this.#r.value = r, r;
582
581
  }
583
582
  }
584
583
  invalidate(e) {
@@ -604,22 +603,22 @@ var y = class {
604
603
  this.#t.clear();
605
604
  }
606
605
  destroy() {
607
- this.abortAll(), this.#e.clear(), r(() => {
606
+ this.abortAll(), this.#e.clear(), i(() => {
608
607
  this.#n.value = !1, this.#r.value = null;
609
608
  }), this.#i = 0;
610
609
  }
611
610
  async #a(e, t) {
612
611
  this.#c();
613
612
  try {
614
- let i = await this.#o(e);
615
- r(() => {
613
+ let n = await this.#o(e);
614
+ i(() => {
616
615
  let e = Object.freeze({
617
- data: i,
616
+ data: n,
618
617
  timestamp: Date.now()
619
- }), r = this.#e.get(t);
620
- r ? (r.signal.value = i, r.entry = e) : this.#e.set(t, {
618
+ }), i = this.#e.get(t);
619
+ i ? (i.signal.value = n, i.entry = e) : this.#e.set(t, {
621
620
  entry: e,
622
- signal: n(i)
621
+ signal: r(n)
623
622
  }), this.#r.value = null;
624
623
  });
625
624
  } catch (e) {
@@ -692,11 +691,11 @@ var y = class {
692
691
  function me() {
693
692
  return new y();
694
693
  }
695
- function x(e, n) {
694
+ function x(e, t) {
696
695
  return Object.freeze({
697
- id: t("bind"),
696
+ id: a("bind"),
698
697
  source: e,
699
- ...n
698
+ ...t
700
699
  });
701
700
  }
702
701
  var he = new Set(/* @__PURE__ */ "alert.alertdialog.application.article.banner.button.cell.checkbox.columnheader.combobox.complementary.contentinfo.definition.dialog.directory.document.feed.figure.form.grid.gridcell.group.heading.img.link.list.listbox.listitem.log.main.marquee.math.menu.menubar.menuitem.menuitemcheckbox.menuitemradio.meter.navigation.none.note.option.presentation.progressbar.radio.radiogroup.region.row.rowgroup.rowheader.scrollbar.search.searchbox.separator.slider.spinbutton.status.switch.tab.table.tablist.tabpanel.term.textbox.timer.toolbar.tooltip.tree.treegrid.treeitem".split(".")), ge = new Set([
@@ -1066,21 +1065,21 @@ function E(e, t) {
1066
1065
  return !1;
1067
1066
  }
1068
1067
  var D = class {
1069
- #e = n([]);
1070
- #t = n([]);
1068
+ #e = r([]);
1069
+ #t = r([]);
1071
1070
  #n = /* @__PURE__ */ new Map();
1072
- #r = n(null);
1073
- #i = n(0);
1074
- capabilities = i(() => this.#e.value);
1075
- rules = i(() => this.#t.value);
1076
- lastDecision = i(() => this.#r.value);
1077
- deniedCount = i(() => this.#i.value);
1071
+ #r = r(null);
1072
+ #i = r(0);
1073
+ capabilities = e(() => this.#e.value);
1074
+ rules = e(() => this.#t.value);
1075
+ lastDecision = e(() => this.#r.value);
1076
+ deniedCount = e(() => this.#i.value);
1078
1077
  grant(e) {
1079
- let n = t("cap"), r = Object.freeze({
1080
- id: n,
1078
+ let t = a("cap"), n = Object.freeze({
1079
+ id: t,
1081
1080
  ...e
1082
1081
  });
1083
- return this.#e.value = [...this.#e.value, r], n;
1082
+ return this.#e.value = [...this.#e.value, n], t;
1084
1083
  }
1085
1084
  revoke(e) {
1086
1085
  let t = this.#e.value.filter((t) => t.id !== e);
@@ -1094,11 +1093,11 @@ var D = class {
1094
1093
  return this.#e.value.some((n) => n.name === e && (n.expiresAt === void 0 || n.expiresAt > t));
1095
1094
  }
1096
1095
  addRule(e) {
1097
- let n = t("rule"), r = Object.freeze({
1098
- id: n,
1096
+ let t = a("rule"), n = Object.freeze({
1097
+ id: t,
1099
1098
  ...e
1100
1099
  });
1101
- return this.#t.value = [...this.#t.value, r], n;
1100
+ return this.#t.value = [...this.#t.value, n], t;
1102
1101
  }
1103
1102
  removeRule(e) {
1104
1103
  let t = this.#t.value.filter((t) => t.id !== e);
@@ -1127,13 +1126,13 @@ var D = class {
1127
1126
  middleware() {
1128
1127
  return (e, t) => {
1129
1128
  let n = this.evaluate(e);
1130
- if (r(() => {
1129
+ if (i(() => {
1131
1130
  this.#r.value = n, n.allowed || (this.#i.value = this.#i.value + 1);
1132
1131
  }), n.allowed) return t();
1133
1132
  };
1134
1133
  }
1135
1134
  destroy() {
1136
- r(() => {
1135
+ i(() => {
1137
1136
  this.#e.value = [], this.#t.value = [], this.#r.value = null, this.#i.value = 0;
1138
1137
  }), this.#n.clear();
1139
1138
  }
@@ -1717,12 +1716,12 @@ function mt(e) {
1717
1716
  /**
1718
1717
  * Wrap a conversion result as a UIPlan.
1719
1718
  */
1720
- function ht(e, n = "generated") {
1719
+ function ht(e, t = "generated") {
1721
1720
  return Object.freeze({
1722
- id: t("a2ui-plan"),
1721
+ id: a("a2ui-plan"),
1723
1722
  version: 1,
1724
1723
  root: e.root,
1725
- source: n,
1724
+ source: t,
1726
1725
  timestamp: Date.now()
1727
1726
  });
1728
1727
  }
@@ -1759,48 +1758,48 @@ var L = class {
1759
1758
  #t;
1760
1759
  #n;
1761
1760
  #r = /* @__PURE__ */ new Map();
1762
- #i = n(0);
1763
- surfaceCount = i(() => this.#i.value);
1761
+ #i = r(0);
1762
+ surfaceCount = e(() => this.#i.value);
1764
1763
  constructor(e, t, n) {
1765
1764
  this.#e = e, this.#t = t, this.#n = n ?? null;
1766
1765
  }
1767
1766
  handleMessage(e, t) {
1768
1767
  Ye(e) ? this.#a(e, t) : Xe(e) ? this.#o(e, t) : Ze(e) ? this.#l(e) : Qe(e) && this.#u(e);
1769
1768
  }
1770
- #a(e, r) {
1771
- let { surfaceId: i, catalogId: a, theme: o } = e.createSurface, s = this.#r.get(i);
1769
+ #a(e, t) {
1770
+ let { surfaceId: n, catalogId: i, theme: o } = e.createSurface, s = this.#r.get(n);
1772
1771
  if (s) {
1773
- s.catalogId = a, s.theme = o;
1772
+ s.catalogId = i, s.theme = o;
1774
1773
  return;
1775
1774
  }
1776
1775
  let c = {
1777
- surfaceId: i,
1778
- planId: t("a2ui-plan"),
1779
- catalogId: a,
1776
+ surfaceId: n,
1777
+ planId: a("a2ui-plan"),
1778
+ catalogId: i,
1780
1779
  theme: o,
1781
- container: r ?? document.createElement("div"),
1780
+ container: t ?? document.createElement("div"),
1782
1781
  components: [],
1783
- dataModel: n({}),
1782
+ dataModel: r({}),
1784
1783
  bindings: /* @__PURE__ */ new Map(),
1785
1784
  bindingDisposers: [],
1786
1785
  actionDisposer: null,
1787
1786
  rendered: !1
1788
1787
  };
1789
- this.#r.set(i, c), this.#i.value = this.#r.size;
1790
- }
1791
- #o(e, r) {
1792
- let { surfaceId: i, components: a } = e.updateComponents, o = this.#r.get(i);
1793
- o ? r && (o.container = r) : (o = {
1794
- surfaceId: i,
1795
- planId: t("a2ui-plan"),
1796
- container: r ?? document.createElement("div"),
1788
+ this.#r.set(n, c), this.#i.value = this.#r.size;
1789
+ }
1790
+ #o(e, t) {
1791
+ let { surfaceId: n, components: i } = e.updateComponents, o = this.#r.get(n);
1792
+ o ? t && (o.container = t) : (o = {
1793
+ surfaceId: n,
1794
+ planId: a("a2ui-plan"),
1795
+ container: t ?? document.createElement("div"),
1797
1796
  components: [],
1798
- dataModel: n({}),
1797
+ dataModel: r({}),
1799
1798
  bindings: /* @__PURE__ */ new Map(),
1800
1799
  bindingDisposers: [],
1801
1800
  actionDisposer: null,
1802
1801
  rendered: !1
1803
- }, this.#r.set(i, o), this.#i.value = this.#r.size), o.rendered ? (this.#c(o, a), o.components = [...a]) : (o.components = [...a], this.#s(o)), o.rendered && this.#n?.(o.surfaceId, o.container);
1802
+ }, this.#r.set(n, o), this.#i.value = this.#r.size), o.rendered ? (this.#c(o, i), o.components = [...i]) : (o.components = [...i], this.#s(o)), o.rendered && this.#n?.(o.surfaceId, o.container);
1804
1803
  }
1805
1804
  #s(e) {
1806
1805
  let t = P(e.components, { surfaceId: e.surfaceId });
@@ -1842,15 +1841,15 @@ var L = class {
1842
1841
  n.bindingDisposers = [], n.actionDisposer?.(), this.#r.delete(t), this.#i.value = this.#r.size;
1843
1842
  }
1844
1843
  }
1845
- #d(t, n) {
1846
- for (let [r, i] of t.bindings) {
1844
+ #d(e, n) {
1845
+ for (let [r, i] of e.bindings) {
1847
1846
  let a = n.get(r);
1848
1847
  if (a) for (let n of i) {
1849
- let r = e(() => {
1850
- let e = t.dataModel.value, r = I(e, n.path);
1848
+ let r = t(() => {
1849
+ let t = e.dataModel.value, r = I(t, n.path);
1851
1850
  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);
1852
1851
  });
1853
- t.bindingDisposers.push(r);
1852
+ e.bindingDisposers.push(r);
1854
1853
  }
1855
1854
  }
1856
1855
  }
@@ -2122,10 +2121,10 @@ var Et = class {
2122
2121
  perf;
2123
2122
  data;
2124
2123
  policy;
2125
- #e = n(/* @__PURE__ */ new Map());
2124
+ #e = r(/* @__PURE__ */ new Map());
2126
2125
  #t;
2127
2126
  #n = null;
2128
- registry = i(() => this.#e.value);
2127
+ registry = e(() => this.#e.value);
2129
2128
  /** Lazy-initialized A2UI protocol adapter. Only created on first access. */
2130
2129
  get a2ui() {
2131
2130
  return this.#n ||= new R(this), this.#n;
@@ -2143,8 +2142,8 @@ var Et = class {
2143
2142
  }), i = new Map(this.#e.peek());
2144
2143
  i.set(r.tag, r), this.#e.value = i;
2145
2144
  }
2146
- registerAndDefine(e, t, n) {
2147
- this.register(e, t, n), a(e, t);
2145
+ registerAndDefine(e, t, r) {
2146
+ this.register(e, t, r), n(e, t);
2148
2147
  }
2149
2148
  executePlan(e, t) {
2150
2149
  let n = this.perf.measure("plan:execute", () => this.executor.execute(e, t, this.bus, { allowUnregistered: this.#t.allowUnregistered }));
@@ -2173,7 +2172,7 @@ function Dt(e) {
2173
2172
  function Ot() {
2174
2173
  z &&= (z.destroy(), null);
2175
2174
  }
2176
- var kt = 200, At = class e {
2175
+ var kt = 200, At = class t {
2177
2176
  #e;
2178
2177
  #t;
2179
2178
  #n;
@@ -2186,44 +2185,44 @@ var kt = 200, At = class e {
2186
2185
  context;
2187
2186
  history;
2188
2187
  running;
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 = n(e.initial), this.#a = n(e.context ? Object.freeze({ ...e.context }) : Object.freeze({})), this.#o = n(Object.freeze([])), this.#s = n(!1), this.currentState = i(() => this.#i.value), this.context = i(() => this.#a.value), this.history = i(() => this.#o.value), this.running = i(() => this.#s.value);
2188
+ constructor(t, n) {
2189
+ this.#e = t, this.#t = n, this.#n = /* @__PURE__ */ new Map(), this.#r = /* @__PURE__ */ new Map(), this.#c(t.states, void 0), this.#i = r(t.initial), this.#a = r(t.context ? Object.freeze({ ...t.context }) : Object.freeze({})), this.#o = r(Object.freeze([])), this.#s = r(!1), this.currentState = e(() => this.#i.value), this.context = e(() => this.#a.value), this.history = e(() => this.#o.value), this.running = e(() => this.#s.value);
2191
2190
  }
2192
2191
  #c(e, t) {
2193
2192
  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
2193
  }
2195
2194
  start() {
2196
- this.#s.peek() || r(() => {
2195
+ this.#s.peek() || i(() => {
2197
2196
  this.#s.value = !0, this.#l(this.#e.initial);
2198
2197
  });
2199
2198
  }
2200
- send(e, n) {
2199
+ send(e, t) {
2201
2200
  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;
2201
+ let n = this.#i.peek(), r = this.#a.peek(), o = this.#p(n, e), s = [], c = [], l = null;
2203
2202
  for (let e of o) if (e.guard) {
2204
2203
  let t = e.guard.name || `${e.from}->${e.to}`;
2205
- e.guard(a) ? (s.push(t), l ||= e) : c.push(t);
2204
+ e.guard(r) ? (s.push(t), l ||= e) : c.push(t);
2206
2205
  } else l ||= e;
2207
2206
  if (!l) return null;
2208
2207
  let u = Object.freeze({
2209
- id: t("wf"),
2208
+ id: a("wf"),
2210
2209
  timestamp: Date.now(),
2211
2210
  event: e,
2212
- from: i,
2211
+ from: n,
2213
2212
  to: l.to,
2214
2213
  guardsPassed: Object.freeze(s),
2215
2214
  guardsBlocked: Object.freeze(c),
2216
2215
  action: l.action
2217
2216
  });
2218
- return r(() => {
2219
- this.#u(i), l.action && this.#m(l.action, {
2217
+ return i(() => {
2218
+ this.#u(n), l.action && this.#m(l.action, {
2220
2219
  event: e,
2221
- data: n
2220
+ data: t
2222
2221
  }), this.#h(u), this.#i.value = l.to, this.#l(l.to);
2223
2222
  }), u;
2224
2223
  }
2225
2224
  stop() {
2226
- this.#s.peek() && r(() => {
2225
+ this.#s.peek() && i(() => {
2227
2226
  this.#u(this.#i.peek()), this.#s.value = !1;
2228
2227
  });
2229
2228
  }
@@ -2270,14 +2269,14 @@ var kt = 200, At = class e {
2270
2269
  timestamp: Date.now()
2271
2270
  });
2272
2271
  }
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;
2272
+ static restore(e, n, r) {
2273
+ let a = new t(n, r);
2274
+ return i(() => {
2275
+ a.#i.value = e.currentState, a.#a.value = Object.freeze({ ...e.context }), a.#o.value = Object.freeze([...e.history]), a.#s.value = !0;
2277
2276
  }), a;
2278
2277
  }
2279
2278
  destroy() {
2280
- r(() => {
2279
+ i(() => {
2281
2280
  this.#s.peek() && this.#u(this.#i.peek()), this.#s.value = !1, this.#o.value = Object.freeze([]), this.#n.clear(), this.#r.clear();
2282
2281
  });
2283
2282
  }
@@ -2451,53 +2450,53 @@ function zt(e) {
2451
2450
  }
2452
2451
  var Bt = class {
2453
2452
  #e;
2454
- #t = n([]);
2453
+ #t = r([]);
2455
2454
  #n = /* @__PURE__ */ new Map();
2456
2455
  #r = /* @__PURE__ */ new Map();
2457
- activeBindings = i(() => this.#t.value);
2456
+ activeBindings = e(() => this.#t.value);
2458
2457
  constructor(e) {
2459
2458
  this.#e = e;
2460
2459
  }
2461
- bind(n, r, i, a, o) {
2462
- let s = x(a.source, {
2463
- method: a.method,
2464
- headers: a.headers,
2465
- cacheTtl: a.cacheTtl
2466
- }), c = this.#e.query(s), l = e(() => {
2460
+ bind(e, n, r, i, o) {
2461
+ let s = x(i.source, {
2462
+ method: i.method,
2463
+ headers: i.headers,
2464
+ cacheTtl: i.cacheTtl
2465
+ }), c = this.#e.query(s), l = t(() => {
2467
2466
  let e = c.value;
2468
2467
  if (e === null) return;
2469
- let t = a.transform ? Rt(e, a.transform) : e;
2470
- switch (a.target) {
2468
+ let t = i.transform ? Rt(e, i.transform) : e;
2469
+ switch (i.target) {
2471
2470
  case "textContent":
2472
- i.textContent = String(t ?? "");
2471
+ r.textContent = String(t ?? "");
2473
2472
  break;
2474
2473
  case "attribute":
2475
- a.targetName && t != null && i.setAttribute(a.targetName, String(t));
2474
+ i.targetName && t != null && r.setAttribute(i.targetName, String(t));
2476
2475
  break;
2477
2476
  case "property":
2478
- a.targetName && (i[a.targetName] = t);
2477
+ i.targetName && (r[i.targetName] = t);
2479
2478
  break;
2480
2479
  case "children":
2481
- Array.isArray(t) && this.#o(i, t, o);
2480
+ Array.isArray(t) && this.#o(r, t, o);
2482
2481
  break;
2483
2482
  }
2484
- }), u = t("dbind"), d;
2485
- a.refreshInterval && a.refreshInterval > 0 && (d = setInterval(() => {
2483
+ }), u = a("dbind"), d;
2484
+ i.refreshInterval && i.refreshInterval > 0 && (d = setInterval(() => {
2486
2485
  this.#e.invalidate(zt(s)), this.#e.query(s);
2487
- }, a.refreshInterval)), this.#n.set(u, {
2486
+ }, i.refreshInterval)), this.#n.set(u, {
2488
2487
  effectDispose: l,
2489
2488
  intervalId: d
2490
2489
  });
2491
2490
  let f = Object.freeze({
2492
2491
  id: u,
2493
- planId: n,
2494
- nodeId: r,
2495
- binding: a,
2492
+ planId: e,
2493
+ nodeId: n,
2494
+ binding: i,
2496
2495
  dispose: () => {
2497
- this.#i(u), this.#t.value = this.#t.value.filter((e) => e.id !== u), this.#a(n, u);
2496
+ this.#i(u), this.#t.value = this.#t.value.filter((e) => e.id !== u), this.#a(e, u);
2498
2497
  }
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;
2498
+ }), p = this.#r.get(e);
2499
+ return p || (p = /* @__PURE__ */ new Set(), this.#r.set(e, p)), p.add(u), this.#t.value = [...this.#t.value, f], f;
2501
2500
  }
2502
2501
  bindPlan(e, t, n, r) {
2503
2502
  let i = [];
@@ -3558,20 +3557,20 @@ var Tn = class e {
3558
3557
  constructor(e) {
3559
3558
  this.#e = e ?? /* @__PURE__ */ new Map();
3560
3559
  }
3561
- generate(e, n) {
3560
+ generate(e, t) {
3562
3561
  this.#t = 0;
3563
- let r = this.#n(e), i = Cn({
3564
- id: e.id ?? t("plan"),
3562
+ let n = this.#n(e), r = Cn({
3563
+ id: e.id ?? a("plan"),
3565
3564
  version: 1,
3566
- root: r,
3567
- source: n ?? "generated",
3565
+ root: n,
3566
+ source: t ?? "generated",
3568
3567
  timestamp: Date.now()
3569
3568
  });
3570
3569
  return Cn({
3571
- plan: i,
3572
- validation: g(i, this.#e, { allowUnregistered: !0 }),
3573
- accessibility: w(i.root),
3574
- warnings: Object.freeze(this.#c(e, i))
3570
+ plan: r,
3571
+ validation: g(r, this.#e, { allowUnregistered: !0 }),
3572
+ accessibility: w(r.root),
3573
+ warnings: Object.freeze(this.#c(e, r))
3575
3574
  });
3576
3575
  }
3577
3576
  #n(e) {