@nonoun/native-ui 0.2.9 → 0.2.10

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 (57) hide show
  1. package/dist/{ui-layout-inspector-element.js → components.js} +2279 -386
  2. package/dist/{register-all2.js → core.js} +78 -35
  3. package/dist/custom-elements.json +2502 -2502
  4. package/dist/inspector/build-inspector.d.ts +4 -4
  5. package/dist/inspector/build-inspector.d.ts.map +1 -1
  6. package/dist/inspector/index.d.ts +8 -8
  7. package/dist/inspector/index.d.ts.map +1 -1
  8. package/dist/inspector/{ds-color-swatch-element.d.ts → native-tokens-color-swatch-element.d.ts} +2 -2
  9. package/dist/inspector/native-tokens-color-swatch-element.d.ts.map +1 -0
  10. package/dist/inspector/native-tokens-color-swatch.d.ts +3 -0
  11. package/dist/inspector/native-tokens-color-swatch.d.ts.map +1 -0
  12. package/dist/inspector/{ds-colors-element.d.ts → native-tokens-colors-element.d.ts} +3 -3
  13. package/dist/inspector/native-tokens-colors-element.d.ts.map +1 -0
  14. package/dist/inspector/native-tokens-colors.d.ts +4 -0
  15. package/dist/inspector/native-tokens-colors.d.ts.map +1 -0
  16. package/dist/inspector/native-tokens-inspector-element.d.ts +15 -0
  17. package/dist/inspector/native-tokens-inspector-element.d.ts.map +1 -0
  18. package/dist/inspector/native-tokens-inspector.d.ts +3 -0
  19. package/dist/inspector/native-tokens-inspector.d.ts.map +1 -0
  20. package/dist/inspector/{ds-themes-element.d.ts → native-tokens-themes-element.d.ts} +3 -3
  21. package/dist/inspector/native-tokens-themes-element.d.ts.map +1 -0
  22. package/dist/inspector/native-tokens-themes.d.ts +4 -0
  23. package/dist/inspector/native-tokens-themes.d.ts.map +1 -0
  24. package/dist/inspector/{ds-variable-element.d.ts → native-tokens-variable-element.d.ts} +3 -3
  25. package/dist/inspector/native-tokens-variable-element.d.ts.map +1 -0
  26. package/dist/inspector/native-tokens-variable.d.ts +4 -0
  27. package/dist/inspector/native-tokens-variable.d.ts.map +1 -0
  28. package/dist/inspector.css +30 -30
  29. package/dist/inspector.d.ts +10 -9
  30. package/dist/inspector.d.ts.map +1 -1
  31. package/dist/inspector.js +102 -103
  32. package/dist/kernel.js +175 -174
  33. package/dist/native-ui.js +4 -49
  34. package/dist/register-all.js +4 -4
  35. package/dist/traits.js +3 -5
  36. package/dist/ui-icon.js +56 -0
  37. package/package.json +1 -1
  38. package/dist/dialog-controller.js +0 -391
  39. package/dist/inspector/ds-color-swatch-element.d.ts.map +0 -1
  40. package/dist/inspector/ds-color-swatch.d.ts +0 -3
  41. package/dist/inspector/ds-color-swatch.d.ts.map +0 -1
  42. package/dist/inspector/ds-colors-element.d.ts.map +0 -1
  43. package/dist/inspector/ds-colors.d.ts +0 -4
  44. package/dist/inspector/ds-colors.d.ts.map +0 -1
  45. package/dist/inspector/ds-inspector-element.d.ts +0 -15
  46. package/dist/inspector/ds-inspector-element.d.ts.map +0 -1
  47. package/dist/inspector/ds-inspector.d.ts +0 -3
  48. package/dist/inspector/ds-inspector.d.ts.map +0 -1
  49. package/dist/inspector/ds-themes-element.d.ts.map +0 -1
  50. package/dist/inspector/ds-themes.d.ts +0 -4
  51. package/dist/inspector/ds-themes.d.ts.map +0 -1
  52. package/dist/inspector/ds-variable-element.d.ts.map +0 -1
  53. package/dist/inspector/ds-variable.d.ts +0 -4
  54. package/dist/inspector/ds-variable.d.ts.map +0 -1
  55. package/dist/list-navigate-controller.js +0 -457
  56. package/dist/ui-icon-element.js +0 -986
  57. package/dist/uid.js +0 -147
@@ -1,18 +1,16 @@
1
- import { l as e, s as t } from "./uid.js";
2
- import { n, r, t as i } from "./dialog-controller.js";
3
- import { a, c as o, g as s, i as c, n as ee, r as l, t as u } from "./list-navigate-controller.js";
4
- function d(n) {
5
- let r = e.get(n);
6
- return r ? r instanceof t ? {
1
+ import { At as e, Ct as t, Ht as n, Jt as r, St as i, Yt as a, _t as o, bt as s, gt as c, vt as ee, xt as te, yt as ne } from "./components.js";
2
+ function l(e) {
3
+ let t = a.get(e);
4
+ return t ? t instanceof r ? {
7
5
  type: "signal",
8
- value: r._value,
9
- subscriberCount: r._subs.size,
6
+ value: t._value,
7
+ subscriberCount: t._subs.size,
10
8
  dependencyCount: 0
11
9
  } : {
12
10
  type: "computed",
13
- value: r._value,
14
- subscriberCount: r._subs.size,
15
- dependencyCount: r._deps.size
11
+ value: t._value,
12
+ subscriberCount: t._subs.size,
13
+ dependencyCount: t._deps.size
16
14
  } : {
17
15
  type: "unknown",
18
16
  value: void 0,
@@ -20,12 +18,57 @@ function d(n) {
20
18
  dependencyCount: 0
21
19
  };
22
20
  }
23
- function f(e) {
21
+ function u(e) {
24
22
  return typeof e == "object" && !!e && Symbol.toStringTag in e && e[Symbol.toStringTag] === "Signal";
25
23
  }
26
- function te(e) {
24
+ function re(e) {
27
25
  return typeof e == "object" && !!e && Symbol.toStringTag in e && e[Symbol.toStringTag] === "Computed";
28
26
  }
27
+ function ie(e, t) {
28
+ customElements.get(e) || customElements.define(e, t);
29
+ }
30
+ var d = class extends Event {
31
+ context;
32
+ callback;
33
+ constructor(e, t) {
34
+ super("context-request", {
35
+ bubbles: !0,
36
+ composed: !0
37
+ }), this.context = e, this.callback = t;
38
+ }
39
+ };
40
+ function ae(e) {
41
+ return class extends e {
42
+ #e = /* @__PURE__ */ new Map();
43
+ provideContext(e, t) {
44
+ this.#e.set(e, t);
45
+ }
46
+ connectedCallback() {
47
+ super.connectedCallback?.(), this.addEventListener("context-request", this.#t);
48
+ }
49
+ disconnectedCallback() {
50
+ super.disconnectedCallback?.(), this.removeEventListener("context-request", this.#t);
51
+ }
52
+ #t = (e) => {
53
+ if (!(e instanceof d)) return;
54
+ let t = this.#e.get(e.context);
55
+ t !== void 0 && (e.stopPropagation(), e.callback(t));
56
+ };
57
+ };
58
+ }
59
+ function f(e) {
60
+ return class extends e {
61
+ #e = /* @__PURE__ */ new Map();
62
+ requestContext(e, t) {
63
+ this.dispatchEvent(new d(e, (n) => {
64
+ this.#e.set(e, n), t?.(n);
65
+ }));
66
+ }
67
+ getContext(e) {
68
+ return this.#e.get(e) ?? null;
69
+ }
70
+ };
71
+ }
29
72
  /** Enables contiguous range selection via drag or click, dispatching `ui-range-change` and `ui-range-select`. */
30
73
  var p = class {
31
74
  host;
@@ -938,21 +981,21 @@ var p = class {
938
981
  constructor(e) {
939
982
  this.host = e;
940
983
  }
941
- toast(e) {
942
- return o().toastManager.toast(this.host, e);
984
+ toast(t) {
985
+ return e().toastManager.toast(this.host, t);
943
986
  }
944
- dismissToast(e) {
945
- o().toastManager.dismiss(e);
987
+ dismissToast(t) {
988
+ e().toastManager.dismiss(t);
946
989
  }
947
990
  dismissAllToasts() {
948
- o().toastManager.dismissAll();
991
+ e().toastManager.dismissAll();
949
992
  }
950
993
  destroy() {}
951
994
  };
952
995
  const A = {
953
996
  name: "pressable",
954
997
  create(e, t) {
955
- return new a(e, { disabled: t.disabled === "true" });
998
+ return new te(e, { disabled: t.disabled === "true" });
956
999
  },
957
1000
  destroy(e) {
958
1001
  e.destroy();
@@ -1084,7 +1127,7 @@ const A = {
1084
1127
  }, z = {
1085
1128
  name: "roving-focusable",
1086
1129
  create(e, t) {
1087
- return new c(e, {
1130
+ return new s(e, {
1088
1131
  selector: t.selector ?? void 0,
1089
1132
  orientation: t.orientation ?? void 0,
1090
1133
  wrap: t.wrap !== "false",
@@ -1100,7 +1143,7 @@ const A = {
1100
1143
  }, B = {
1101
1144
  name: "dismissable",
1102
1145
  create(e) {
1103
- return new l(e);
1146
+ return new ne(e);
1104
1147
  },
1105
1148
  destroy(e) {
1106
1149
  e.destroy();
@@ -1124,7 +1167,7 @@ const A = {
1124
1167
  }, U = {
1125
1168
  name: "list-navigable",
1126
1169
  create(e, t) {
1127
- return new u(e, {
1170
+ return new o(e, {
1128
1171
  itemSelector: t["item-selector"] ?? void 0,
1129
1172
  ariaAttr: t["aria-attr"] ?? void 0,
1130
1173
  autoSync: t["auto-sync"] !== "false",
@@ -1139,21 +1182,21 @@ const A = {
1139
1182
  }, W = {
1140
1183
  name: "dialogable",
1141
1184
  create(e) {
1142
- return new i(e);
1185
+ return new c(e);
1143
1186
  },
1144
1187
  destroy(e) {
1145
1188
  e.destroy();
1146
1189
  }
1147
1190
  }, G = {
1148
1191
  name: "draggable",
1149
- create(e, t) {
1150
- return new r(e, {
1151
- selector: t.selector ?? "",
1152
- dropZoneSelector: t["drop-zone-selector"] ?? "",
1153
- axis: t.axis ?? "both",
1154
- mode: t.mode ?? "drop",
1155
- disabled: t.disabled === "true",
1156
- animate: t.animate !== "false"
1192
+ create(e, n) {
1193
+ return new t(e, {
1194
+ selector: n.selector ?? "",
1195
+ dropZoneSelector: n["drop-zone-selector"] ?? "",
1196
+ axis: n.axis ?? "both",
1197
+ mode: n.mode ?? "drop",
1198
+ disabled: n.disabled === "true",
1199
+ animate: n.animate !== "false"
1157
1200
  });
1158
1201
  },
1159
1202
  destroy(e) {
@@ -1180,7 +1223,7 @@ const A = {
1180
1223
  }, q = {
1181
1224
  name: "resizable",
1182
1225
  create(e, t) {
1183
- return new n(e, {
1226
+ return new i(e, {
1184
1227
  handleSelector: t["handle-selector"] ?? "",
1185
1228
  axis: t.axis ?? "horizontal",
1186
1229
  min: t.min ? Number(t.min) : void 0,
@@ -1311,7 +1354,7 @@ const A = {
1311
1354
  * Register all built-in trait adapters with the global trait registry.
1312
1355
  * Call once at app startup to enable `traits="..."` attribute on UIElement subclasses.
1313
1356
  */
1314
- function ne() {
1315
- s(A), s(j), s(M), s(N), s(P), s(F), s(I), s(L), s(R), s(z), s(B), s(V), s(H), s(U), s(W), s(G), s(K), s(q), s(J), s(Y), s(X), s(Z), s(Q), s($);
1357
+ function oe() {
1358
+ n(A), n(j), n(M), n(N), n(P), n(F), n(I), n(L), n(R), n(z), n(B), n(V), n(H), n(U), n(W), n(G), n(K), n(q), n(J), n(Y), n(X), n(Z), n(Q), n($);
1316
1359
  }
1317
- export { w as A, m as B, M as C, O as D, k as E, y as F, d as H, v as I, _ as L, S as M, x as N, D as O, b as P, g as R, N as S, A as T, te as U, p as V, f as W, R as _, X as a, F as b, q as c, W as d, U as f, z as g, B as h, Z as i, C as j, T as k, K as l, V as m, $ as n, Y as o, H as p, Q as r, J as s, ne as t, G as u, L as v, j as w, P as x, I as y, h as z };
1360
+ export { w as A, m as B, M as C, O as D, k as E, y as F, ie as G, f as H, v as I, u as J, l as K, _ as L, S as M, x as N, D as O, b as P, g as R, N as S, A as T, ae as U, p as V, d as W, R as _, X as a, F as b, q as c, W as d, U as f, z as g, B as h, Z as i, C as j, T as k, K as l, V as m, $ as n, Y as o, H as p, re as q, Q as r, J as s, oe as t, G as u, L as v, j as w, P as x, I as y, h as z };