@nonoun/native-ui 0.2.2 → 0.2.3

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 (36) hide show
  1. package/dist/custom-elements.json +4463 -4463
  2. package/dist/define.js +62 -0
  3. package/dist/dialog-controller.js +30 -154
  4. package/dist/inspector.css +231 -0
  5. package/dist/inspector.d.ts +7 -0
  6. package/dist/inspector.d.ts.map +1 -0
  7. package/dist/inspector.js +591 -0
  8. package/dist/kernel.js +182 -181
  9. package/dist/native-ui.js +7 -5
  10. package/dist/nav/inspector/build-inspector.d.ts +8 -0
  11. package/dist/nav/inspector/build-inspector.d.ts.map +1 -0
  12. package/dist/nav/inspector/ds-color-swatch-element.d.ts +15 -0
  13. package/dist/nav/inspector/ds-color-swatch-element.d.ts.map +1 -0
  14. package/dist/nav/inspector/ds-color-swatch.d.ts +3 -0
  15. package/dist/nav/inspector/ds-color-swatch.d.ts.map +1 -0
  16. package/dist/nav/inspector/ds-colors-element.d.ts +14 -0
  17. package/dist/nav/inspector/ds-colors-element.d.ts.map +1 -0
  18. package/dist/nav/inspector/ds-colors.d.ts +4 -0
  19. package/dist/nav/inspector/ds-colors.d.ts.map +1 -0
  20. package/dist/nav/inspector/ds-themes-element.d.ts +13 -0
  21. package/dist/nav/inspector/ds-themes-element.d.ts.map +1 -0
  22. package/dist/nav/inspector/ds-themes.d.ts +4 -0
  23. package/dist/nav/inspector/ds-themes.d.ts.map +1 -0
  24. package/dist/nav/inspector/ds-variable-element.d.ts +19 -0
  25. package/dist/nav/inspector/ds-variable-element.d.ts.map +1 -0
  26. package/dist/nav/inspector/ds-variable.d.ts +4 -0
  27. package/dist/nav/inspector/ds-variable.d.ts.map +1 -0
  28. package/dist/nav/inspector/index.d.ts +9 -0
  29. package/dist/nav/inspector/index.d.ts.map +1 -0
  30. package/dist/register-all.js +1 -1
  31. package/dist/register-all2.js +25 -24
  32. package/dist/traits.js +5 -3
  33. package/dist/ui-element.js +128 -0
  34. package/dist/ui-icon-element.js +158 -156
  35. package/dist/uid.js +3 -63
  36. package/package.json +9 -3
package/dist/native-ui.js CHANGED
@@ -1,7 +1,9 @@
1
- import { a as e, i as t, n, o as ee, r as te, t as ne } from "./uid.js";
1
+ import { n as e, t } from "./uid.js";
2
+ import { i as n, n as ee, r as te, t as ne } from "./define.js";
2
3
  import { A as re, B as ie, C as r, D as i, E as a, F as o, G as s, H as c, I as l, L as u, M as d, N as f, O as p, P as m, R as h, S as g, T as _, U as v, V as y, W as b, _ as x, a as S, b as C, c as w, d as T, f as E, g as D, h as O, i as k, j as A, k as j, l as M, m as N, n as P, o as F, p as I, r as L, s as R, t as z, u as B, v as V, w as H, x as U, y as W, z as G } from "./register-all2.js";
3
- import { _ as K, a as q, c as J, d as Y, f as ae, g as oe, h as se, i as ce, l as le, m as ue, n as de, o as fe, p as X, r as pe, s as Z, t as me, u as he, y as ge } from "./dialog-controller.js";
4
- import { $ as _e, A as ve, B as ye, C as be, Ct as xe, D as Se, E as Ce, F as we, G as Te, H as Ee, I as De, J as Oe, K as ke, L as Ae, M as je, N as Q, O as Me, P as Ne, Q as Pe, R as Fe, S as Ie, St as Le, T as Re, Tt as ze, U as Be, V as Ve, W as He, X as Ue, Y as We, Z as Ge, _ as Ke, _t as qe, a as Je, at as Ye, b as Xe, bt as Ze, c as Qe, ct as $e, d as et, dt as tt, et as nt, f as rt, ft as it, g as at, gt as ot, h as st, ht as ct, i as lt, it as ut, j as dt, k as ft, l as pt, lt as mt, m as ht, mt as gt, n as _t, nt as vt, o as yt, ot as bt, p as xt, pt as St, q as Ct, r as wt, rt as Tt, s as Et, st as Dt, t as Ot, tt as kt, u as At, ut as jt, v as Mt, vt as Nt, w as Pt, wt as Ft, x as It, xt as Lt, y as Rt, yt as zt, z as Bt } from "./ui-icon-element.js";
4
+ import { a as K, i as q, n as J, r as Y, s as ae, t as X } from "./ui-element.js";
5
+ import { $ as oe, A as se, B as ce, C as le, Ct as ue, D as de, E as fe, F as pe, G as me, H as he, I as ge, J as _e, K as ve, L as ye, M as be, N as xe, O as Se, P as Ce, Q as we, R as Te, S as Ee, St as De, T as Oe, Tt as ke, U as Ae, V as je, W as Me, X as Z, Y as Ne, Z as Pe, _ as Fe, _t as Ie, a as Le, at as Re, b as ze, bt as Be, c as Ve, ct as He, d as Ue, dt as We, et as Ge, f as Ke, ft as qe, g as Je, gt as Ye, h as Xe, ht as Ze, i as Qe, it as $e, j as et, k as tt, l as nt, lt as rt, m as it, mt as at, n as ot, nt as st, o as ct, ot as lt, p as ut, pt as dt, q as ft, r as pt, rt as mt, s as ht, st as gt, t as _t, tt as vt, u as yt, ut as bt, v as xt, vt as St, w as Ct, wt, x as Tt, xt as Et, y as Dt, yt as Ot, z as kt } from "./ui-icon-element.js";
6
+ import { a as At, c as jt, d as Mt, f as Nt, i as Pt, l as Ft, n as It, o as Lt, r as Rt, s as Q, t as zt, u as Bt } from "./dialog-controller.js";
5
7
  var $ = class extends Event {
6
8
  context;
7
9
  callback;
@@ -60,7 +62,7 @@ var Ut = class extends X {
60
62
  this.open = !this.open;
61
63
  }
62
64
  setup() {
63
- super.setup(), this.querySelector(".layout-resize-handle") && (this.#e = new Z(this, {
65
+ super.setup(), this.querySelector(".layout-resize-handle") && (this.#e = new Q(this, {
64
66
  handleSelector: ".layout-resize-handle",
65
67
  axis: "horizontal",
66
68
  min: 280,
@@ -72,4 +74,4 @@ var Ut = class extends X {
72
74
  this.#e?.destroy(), this.#e = null, super.teardown();
73
75
  }
74
76
  };
75
- export { we as CalendarStore, o as ClipboardController, i as CollapsibleController, Be as ColumnResizeController, Ht as ContextConsumer, Vt as ContextProvider, $ as ContextRequestEvent, f as CopyController, Ze as DataListController, me as DialogController, ce as DismissController, le as DismissStack, J as DragController, A as DropZoneController, l as EditController, p as FocusTrapController, Le as FormAssociable, ae as GestureRouter, m as HoverController, d as IntersectController, de as ListNavigateController, pe as PopoverController, fe as PressController, y as RangeSelectController, Z as ResizeController, q as RovingFocusController, h as SearchController, Q as SelectController, G as SelectionController, re as SortController, u as SwipeController, He as TableStore, a as ToastController, he as ToastManager, Pe as UIAccordion, Ge as UIAccordionItem, Ce as UIAvatar, Re as UIBadge, Pt as UIBreadcrumb, be as UIBreadcrumbItem, qe as UIButton, Ne as UICalendar, At as UICard, et as UIChatInput, Ye as UICheckbox, dt as UICombobox, tt as UICommand, bt as UICommandEmpty, Dt as UICommandGroup, jt as UICommandInput, $e as UICommandItem, mt as UICommandList, rt as UIController, Ue as UIDialog, It as UIDrawer, X as UIElement, ve as UIField, Ot as UIIcon, ot as UIInput, Se as UIInputOtp, Je as UILayoutChat, Ut as UILayoutInspector, Et as UILayoutSidebar, yt as UILayoutSidebarTrigger, ct as UIListbox, at as UINav, ht as UINavGroup, xt as UINavGroupHeader, st as UINavItem, gt as UIOption, it as UIOptionGroup, St as UIOptionGroupHeader, Ie as UIPagination, Tt as UIRadio, vt as UIRadioGroup, Me as UIRange, pt as UISection, nt as UISegment, kt as UISegmentedControl, je as UISelect, Ke as UISlide, Mt as UISlideshow, ut as UISwitch, Oe as UITab, Ct as UITabPanel, ke as UITabPanels, Ee as UITable, ye as UITableBody, Fe as UITableCell, Ve as UITableHead, Ae as UITableHeader, Bt as UITableRow, We as UITabs, ft as UITextarea, Qe as UIToolbar, _e as UITooltip, Xe as UITree, Rt as UITreeItem, j as ValidateController, ie as VirtualScrollController, te as batch, k as clippableAdapter, x as collapsibleAdapter, ue as collectTraitOptions, e as computed, r as copyableAdapter, De as createCalendarStore, Lt as createDataList, ze as createDisabledEffect, Te as createTableStore, c as debugReactive, n as define, T as dialogableAdapter, O as dismissableAdapter, B as draggableAdapter, U as droppableAdapter, P as editableAdapter, t as effect, Nt as fetchDataOptions, V as focusTrappableAdapter, _t as getIcon, oe as getRegisteredTraitNames, K as getTrait, Y as getTraitRuntime, H as hoverableAdapter, g as intersectableAdapter, v as isComputed, b as isSignal, E as listNavigableAdapter, wt as onIconRegistered, zt as parseDataOptions, se as parseTraitAttribute, I as popoverableAdapter, _ as pressableAdapter, xe as prop, M as rangeSelectableAdapter, z as registerAllTraits, lt as registerIcon, ge as registerTrait, w as resizableAdapter, D as rovingFocusableAdapter, S as searchableAdapter, F as selectableAdapter, ee as signal, C as sortableAdapter, L as swipeableAdapter, Ft as syncProp, N as toastableAdapter, ne as uid, s as untrack, W as validatableAdapter, R as virtualizableAdapter };
77
+ export { pe as CalendarStore, o as ClipboardController, i as CollapsibleController, Ae as ColumnResizeController, Ht as ContextConsumer, Vt as ContextProvider, $ as ContextRequestEvent, f as CopyController, Be as DataListController, zt as DialogController, Pt as DismissController, Ft as DismissStack, jt as DragController, A as DropZoneController, l as EditController, p as FocusTrapController, De as FormAssociable, Nt as GestureRouter, m as HoverController, d as IntersectController, It as ListNavigateController, Rt as PopoverController, Lt as PressController, y as RangeSelectController, Q as ResizeController, At as RovingFocusController, h as SearchController, xe as SelectController, G as SelectionController, re as SortController, u as SwipeController, Me as TableStore, a as ToastController, Bt as ToastManager, we as UIAccordion, Pe as UIAccordionItem, fe as UIAvatar, Oe as UIBadge, Ct as UIBreadcrumb, le as UIBreadcrumbItem, Ie as UIButton, Ce as UICalendar, yt as UICard, Ue as UIChatInput, Re as UICheckbox, et as UICombobox, We as UICommand, lt as UICommandEmpty, gt as UICommandGroup, bt as UICommandInput, He as UICommandItem, rt as UICommandList, Ke as UIController, Z as UIDialog, Tt as UIDrawer, X as UIElement, se as UIField, _t as UIIcon, Ye as UIInput, de as UIInputOtp, Le as UILayoutChat, Ut as UILayoutInspector, ht as UILayoutSidebar, ct as UILayoutSidebarTrigger, Ze as UIListbox, Je as UINav, it as UINavGroup, ut as UINavGroupHeader, Xe as UINavItem, at as UIOption, qe as UIOptionGroup, dt as UIOptionGroupHeader, Ee as UIPagination, mt as UIRadio, st as UIRadioGroup, Se as UIRange, nt as UISection, Ge as UISegment, vt as UISegmentedControl, be as UISelect, Fe as UISlide, xt as UISlideshow, $e as UISwitch, _e as UITab, ft as UITabPanel, ve as UITabPanels, he as UITable, ce as UITableBody, Te as UITableCell, je as UITableHead, ye as UITableHeader, kt as UITableRow, Ne as UITabs, tt as UITextarea, Ve as UIToolbar, oe as UITooltip, ze as UITree, Dt as UITreeItem, j as ValidateController, ie as VirtualScrollController, ee as batch, k as clippableAdapter, x as collapsibleAdapter, J as collectTraitOptions, te as computed, r as copyableAdapter, ge as createCalendarStore, Et as createDataList, ke as createDisabledEffect, me as createTableStore, c as debugReactive, ne as define, T as dialogableAdapter, O as dismissableAdapter, B as draggableAdapter, U as droppableAdapter, P as editableAdapter, e as effect, St as fetchDataOptions, V as focusTrappableAdapter, ot as getIcon, q as getRegisteredTraitNames, K as getTrait, Mt as getTraitRuntime, H as hoverableAdapter, g as intersectableAdapter, v as isComputed, b as isSignal, E as listNavigableAdapter, pt as onIconRegistered, Ot as parseDataOptions, Y as parseTraitAttribute, I as popoverableAdapter, _ as pressableAdapter, ue as prop, M as rangeSelectableAdapter, z as registerAllTraits, Qe as registerIcon, ae as registerTrait, w as resizableAdapter, D as rovingFocusableAdapter, S as searchableAdapter, F as selectableAdapter, n as signal, C as sortableAdapter, L as swipeableAdapter, wt as syncProp, N as toastableAdapter, t as uid, s as untrack, W as validatableAdapter, R as virtualizableAdapter };
@@ -0,0 +1,8 @@
1
+ import './ds-variable.ts';
2
+ import './ds-colors.ts';
3
+ import './ds-color-swatch.ts';
4
+ import './ds-themes.ts';
5
+ import '../../components/ui-range/ui-range.ts';
6
+ import '../../components/ui-combobox/ui-combobox.ts';
7
+ export declare function buildInspector(container: HTMLElement): void;
8
+ //# sourceMappingURL=build-inspector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-inspector.d.ts","sourceRoot":"","sources":["../../../src/nav/inspector/build-inspector.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,gBAAgB,CAAC;AACxB,OAAO,sBAAsB,CAAC;AAC9B,OAAO,gBAAgB,CAAC;AAGxB,OAAO,uCAAuC,CAAC;AAC/C,OAAO,6CAA6C,CAAC;AA4ErD,wBAAgB,cAAc,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI,CAiI3D"}
@@ -0,0 +1,15 @@
1
+ import { UIElement } from '../../core/ui-element.ts';
2
+ export declare class DSColorSwatch extends UIElement {
3
+ #private;
4
+ static observedAttributes: string[];
5
+ get token(): string;
6
+ set token(val: string);
7
+ get name(): string;
8
+ set name(val: string);
9
+ attributeChangedCallback(name: string, old: string | null, val: string | null): void;
10
+ setup(): void;
11
+ teardown(): void;
12
+ /** Refresh background and contrast from current token value. */
13
+ refresh(): void;
14
+ }
15
+ //# sourceMappingURL=ds-color-swatch-element.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ds-color-swatch-element.d.ts","sourceRoot":"","sources":["../../../src/nav/inspector/ds-color-swatch-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAoJrD,qBAAa,aAAc,SAAQ,SAAS;;IAC1C,MAAM,CAAC,kBAAkB,WAAqB;IAM9C,IAAI,KAAK,IAAI,MAAM,CAA6C;IAChE,IAAI,KAAK,CAAC,GAAG,EAAE,MAAM,EAAsC;IAE3D,IAAI,IAAI,IAAI,MAAM,CAA4C;IAC9D,IAAI,IAAI,CAAC,GAAG,EAAE,MAAM,EAAqC;IAEzD,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAapF,KAAK,IAAI,IAAI;IAqCb,QAAQ,IAAI,IAAI;IAUhB,gEAAgE;IAChE,OAAO,IAAI,IAAI;CAsEhB"}
@@ -0,0 +1,3 @@
1
+ import { DSColorSwatch } from './ds-color-swatch-element.ts';
2
+ export { DSColorSwatch };
3
+ //# sourceMappingURL=ds-color-swatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ds-color-swatch.d.ts","sourceRoot":"","sources":["../../../src/nav/inspector/ds-color-swatch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAI7D,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { UIElement } from '../../core/ui-element.ts';
2
+ export interface DSColorEntry {
3
+ name: string;
4
+ token: string;
5
+ }
6
+ export declare class DSColors extends UIElement {
7
+ #private;
8
+ static observedAttributes: string[];
9
+ attributeChangedCallback(name: string, old: string | null, val: string | null): void;
10
+ setup(): void;
11
+ teardown(): void;
12
+ refresh(): void;
13
+ }
14
+ //# sourceMappingURL=ds-colors-element.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ds-colors-element.d.ts","sourceRoot":"","sources":["../../../src/nav/inspector/ds-colors-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAGrD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,qBAAa,QAAS,SAAQ,SAAS;;IACrC,MAAM,CAAC,kBAAkB,WAAY;IAIrC,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAQpF,KAAK,IAAI,IAAI;IAab,QAAQ,IAAI,IAAI;IAWhB,OAAO,IAAI,IAAI;CAuBhB"}
@@ -0,0 +1,4 @@
1
+ import { DSColors } from './ds-colors-element.ts';
2
+ export { DSColors };
3
+ export type { DSColorEntry } from './ds-colors-element.ts';
4
+ //# sourceMappingURL=ds-colors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ds-colors.d.ts","sourceRoot":"","sources":["../../../src/nav/inspector/ds-colors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAIlD,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { UIElement } from '../../core/ui-element.ts';
2
+ export interface DSThemeEntry {
3
+ name: string;
4
+ value: string;
5
+ }
6
+ export declare class DSThemes extends UIElement {
7
+ #private;
8
+ static observedAttributes: string[];
9
+ attributeChangedCallback(name: string, old: string | null, val: string | null): void;
10
+ setup(): void;
11
+ teardown(): void;
12
+ }
13
+ //# sourceMappingURL=ds-themes-element.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ds-themes-element.d.ts","sourceRoot":"","sources":["../../../src/nav/inspector/ds-themes-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAeD,qBAAa,QAAS,SAAQ,SAAS;;IACrC,MAAM,CAAC,kBAAkB,WAAY;IAIrC,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAQpF,KAAK,IAAI,IAAI;IASb,QAAQ,IAAI,IAAI;CA+CjB"}
@@ -0,0 +1,4 @@
1
+ import { DSThemes } from './ds-themes-element.ts';
2
+ export { DSThemes };
3
+ export type { DSThemeEntry } from './ds-themes-element.ts';
4
+ //# sourceMappingURL=ds-themes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ds-themes.d.ts","sourceRoot":"","sources":["../../../src/nav/inspector/ds-themes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAIlD,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { UIElement } from '../../core/ui-element.ts';
2
+ export interface DSVariableData {
3
+ name: string;
4
+ type: 'number';
5
+ token: string;
6
+ value: number;
7
+ step?: number;
8
+ min?: number;
9
+ max?: number;
10
+ }
11
+ export declare class DSVariable extends UIElement {
12
+ #private;
13
+ static observedAttributes: string[];
14
+ attributeChangedCallback(name: string, old: string | null, val: string | null): void;
15
+ setup(): void;
16
+ teardown(): void;
17
+ sync(): void;
18
+ }
19
+ //# sourceMappingURL=ds-variable-element.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ds-variable-element.d.ts","sourceRoot":"","sources":["../../../src/nav/inspector/ds-variable-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,qBAAa,UAAW,SAAQ,SAAS;;IACvC,MAAM,CAAC,kBAAkB,WAAY;IAMrC,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAQpF,KAAK,IAAI,IAAI;IAWb,QAAQ,IAAI,IAAI;IAYhB,IAAI,IAAI,IAAI;CA8Db"}
@@ -0,0 +1,4 @@
1
+ import { DSVariable } from './ds-variable-element.ts';
2
+ export { DSVariable };
3
+ export type { DSVariableData } from './ds-variable-element.ts';
4
+ //# sourceMappingURL=ds-variable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ds-variable.d.ts","sourceRoot":"","sources":["../../../src/nav/inspector/ds-variable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAItD,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,9 @@
1
+ export { DSColorSwatch } from './ds-color-swatch-element.ts';
2
+ export { DSColors } from './ds-colors-element.ts';
3
+ export type { DSColorEntry } from './ds-colors-element.ts';
4
+ export { DSVariable } from './ds-variable-element.ts';
5
+ export type { DSVariableData } from './ds-variable-element.ts';
6
+ export { DSThemes } from './ds-themes-element.ts';
7
+ export type { DSThemeEntry } from './ds-themes-element.ts';
8
+ export { buildInspector } from './build-inspector.ts';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/nav/inspector/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,YAAY,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1,3 +1,3 @@
1
- import { n as e } from "./uid.js";
1
+ import { t as e } from "./define.js";
2
2
  import { $ as t, A as n, B as r, C as i, D as a, E as o, H as s, J as c, K as l, L as u, M as d, O as f, P as p, Q as m, R as h, S as g, T as _, V as v, X as y, Y as b, Z as x, _ as S, _t as C, a as w, at as T, b as E, c as D, ct as O, d as k, dt as A, et as j, f as M, ft as N, g as P, gt as F, h as I, ht as L, it as R, j as z, k as B, l as V, lt as H, m as U, mt as W, nt as G, o as K, ot as q, p as J, pt as Y, q as X, rt as Z, s as Q, st as $, t as ee, tt as te, u as ne, ut as re, v as ie, w as ae, x as oe, y as se, z as ce } from "./ui-icon-element.js";
3
3
  e("ui-button", C), e("ui-input", F), e("ui-listbox", L), e("ui-option", W), e("ui-option-group", N), e("ui-option-group-header", Y), e("ui-select", d), e("ui-combobox", z), e("ui-command", A), e("ui-command-input", re), e("ui-command-list", H), e("ui-command-group", $), e("ui-command-item", O), e("ui-command-empty", q), e("ui-checkbox", T), e("ui-switch", R), e("ui-radio", Z), e("ui-radio-group", G), e("ui-segmented-control", te), e("ui-segment", j), e("ui-tooltip", t), e("ui-accordion", m), e("ui-accordion-item", x), e("ui-dialog", y), e("ui-tabs", b), e("ui-tab", c), e("ui-tab-panel", X), e("ui-tab-panels", l), e("ui-table", s), e("ui-table-head", v), e("ui-table-body", r), e("ui-table-row", ce), e("ui-table-header", u), e("ui-table-cell", h), e("ui-calendar", p), e("ui-field", n), e("ui-textarea", B), e("ui-range", f), e("ui-input-otp", a), e("ui-avatar", o), e("ui-badge", _), e("ui-breadcrumb", ae), e("ui-breadcrumb-item", i), e("ui-pagination", g), e("ui-drawer", oe), e("ui-tree", E), e("ui-tree-item", se), e("ui-slideshow", ie), e("ui-slide", S), e("ui-nav", P), e("ui-nav-group", U), e("ui-nav-group-header", J), e("ui-nav-item", I), e("ui-chat-input", k), e("ui-controller", M), e("ui-card", ne), e("ui-section", V), e("ui-toolbar", D), e("ui-layout-sidebar", Q), e("ui-layout-sidebar-trigger", K), e("ui-layout-chat", w), e("ui-icon", ee);
@@ -1,17 +1,18 @@
1
- import { c as e, l as t, s as n, u as r } from "./uid.js";
2
- import { a as i, c as a, d as o, i as s, n as c, o as l, r as ee, s as te, t as u, y as d } from "./dialog-controller.js";
3
- function f(t) {
4
- let n = e();
1
+ import { f as e, i as t, l as n, m as r } from "./uid.js";
2
+ import { s as i } from "./ui-element.js";
3
+ import { a, c as o, d as s, i as c, n as ee, o as te, r as l, s as u, t as d } from "./dialog-controller.js";
4
+ function ne(e) {
5
+ let t = n();
5
6
  r(null);
6
7
  try {
7
- return t();
8
+ return e();
8
9
  } finally {
9
- r(n);
10
+ r(t);
10
11
  }
11
12
  }
12
- function ne(e) {
13
- let r = t.get(e);
14
- return r ? r instanceof n ? {
13
+ function re(n) {
14
+ let r = e.get(n);
15
+ return r ? r instanceof t ? {
15
16
  type: "signal",
16
17
  value: r._value,
17
18
  subscriberCount: r._subs.size,
@@ -28,10 +29,10 @@ function ne(e) {
28
29
  dependencyCount: 0
29
30
  };
30
31
  }
31
- function re(e) {
32
+ function ie(e) {
32
33
  return typeof e == "object" && !!e && Symbol.toStringTag in e && e[Symbol.toStringTag] === "Signal";
33
34
  }
34
- function ie(e) {
35
+ function f(e) {
35
36
  return typeof e == "object" && !!e && Symbol.toStringTag in e && e[Symbol.toStringTag] === "Computed";
36
37
  }
37
38
  /** Enables contiguous range selection via drag or click, dispatching `ui-range-change` and `ui-range-select`. */
@@ -915,20 +916,20 @@ var p = class {
915
916
  this.host = e;
916
917
  }
917
918
  toast(e) {
918
- return o().toastManager.toast(this.host, e);
919
+ return s().toastManager.toast(this.host, e);
919
920
  }
920
921
  dismissToast(e) {
921
- o().toastManager.dismiss(e);
922
+ s().toastManager.dismiss(e);
922
923
  }
923
924
  dismissAllToasts() {
924
- o().toastManager.dismissAll();
925
+ s().toastManager.dismissAll();
925
926
  }
926
927
  destroy() {}
927
928
  };
928
929
  const A = {
929
930
  name: "pressable",
930
931
  create(e, t) {
931
- return new l(e, { disabled: t.disabled === "true" });
932
+ return new te(e, { disabled: t.disabled === "true" });
932
933
  },
933
934
  destroy(e) {
934
935
  e.destroy();
@@ -1035,7 +1036,7 @@ const A = {
1035
1036
  }, z = {
1036
1037
  name: "roving-focusable",
1037
1038
  create(e, t) {
1038
- return new i(e, {
1039
+ return new a(e, {
1039
1040
  selector: t.selector ?? void 0,
1040
1041
  orientation: t.orientation ?? void 0,
1041
1042
  wrap: t.wrap !== "false",
@@ -1051,7 +1052,7 @@ const A = {
1051
1052
  }, B = {
1052
1053
  name: "dismissable",
1053
1054
  create(e) {
1054
- return new s(e);
1055
+ return new c(e);
1055
1056
  },
1056
1057
  destroy(e) {
1057
1058
  e.destroy();
@@ -1067,7 +1068,7 @@ const A = {
1067
1068
  }, H = {
1068
1069
  name: "popoverable",
1069
1070
  create(e) {
1070
- return new ee(e);
1071
+ return new l(e);
1071
1072
  },
1072
1073
  destroy(e) {
1073
1074
  e.destroy();
@@ -1075,7 +1076,7 @@ const A = {
1075
1076
  }, U = {
1076
1077
  name: "list-navigable",
1077
1078
  create(e, t) {
1078
- return new c(e, {
1079
+ return new ee(e, {
1079
1080
  itemSelector: t["item-selector"] ?? void 0,
1080
1081
  ariaAttr: t["aria-attr"] ?? void 0,
1081
1082
  autoSync: t["auto-sync"] !== "false",
@@ -1090,7 +1091,7 @@ const A = {
1090
1091
  }, W = {
1091
1092
  name: "dialogable",
1092
1093
  create(e) {
1093
- return new u(e);
1094
+ return new d(e);
1094
1095
  },
1095
1096
  destroy(e) {
1096
1097
  e.destroy();
@@ -1098,7 +1099,7 @@ const A = {
1098
1099
  }, G = {
1099
1100
  name: "draggable",
1100
1101
  create(e, t) {
1101
- return new a(e, {
1102
+ return new o(e, {
1102
1103
  selector: t.selector ?? "",
1103
1104
  dropZoneSelector: t["drop-zone-selector"] ?? "",
1104
1105
  axis: t.axis ?? "both",
@@ -1130,7 +1131,7 @@ const A = {
1130
1131
  }, q = {
1131
1132
  name: "resizable",
1132
1133
  create(e, t) {
1133
- return new te(e, {
1134
+ return new u(e, {
1134
1135
  handleSelector: t["handle-selector"] ?? "",
1135
1136
  axis: t.axis ?? "horizontal",
1136
1137
  min: t.min ? Number(t.min) : void 0,
@@ -1239,6 +1240,6 @@ const A = {
1239
1240
  * Call once at app startup to enable `traits="..."` attribute on UIElement subclasses.
1240
1241
  */
1241
1242
  function ae() {
1242
- d(A), d(j), d(M), d(N), d(P), d(F), d(I), d(L), d(R), d(z), d(B), d(V), d(H), d(U), d(W), d(G), d(K), d(q), d(J), d(Y), d(X), d(Z), d(Q), d($);
1243
+ i(A), i(j), i(M), i(N), i(P), i(F), i(I), i(L), i(R), i(z), i(B), i(V), i(H), i(U), i(W), i(G), i(K), i(q), i(J), i(Y), i(X), i(Z), i(Q), i($);
1243
1244
  }
1244
- export { w as A, m as B, M as C, O as D, k as E, y as F, f as G, ne 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, ie as U, p as V, re 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, ae as t, G as u, L as v, j as w, P as x, I as y, h as z };
1245
+ export { w as A, m as B, M as C, O as D, k as E, y as F, ne as G, re 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, f as U, p as V, ie 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, ae as t, G as u, L as v, j as w, P as x, I as y, h as z };
package/dist/traits.js CHANGED
@@ -1,4 +1,6 @@
1
- import { a as e, i as t, n, o as r, r as i, t as a } from "./uid.js";
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";
2
3
  import { A as o, B as s, C as c, D as l, E as u, F as d, G as f, H as p, I as m, L as h, M as g, N as _, O as v, P as y, R as b, S as x, T as S, U as C, V as w, W as T, _ as E, a as D, b as O, c as k, d as A, f as j, g as M, h as N, i as P, j as F, k as I, l as L, m as R, n as z, o as B, p as V, r as H, s as U, t as W, u as G, v as K, w as q, x as J, y as Y, z as X } from "./register-all2.js";
3
- import { _ as Z, a as Q, c as $, d as ee, g as te, h as ne, i as re, l as ie, m as ae, n as oe, o as se, p as ce, r as le, s as ue, t as de, u as fe, y as pe } from "./dialog-controller.js";
4
- export { d as ClipboardController, l as CollapsibleController, _ as CopyController, de as DialogController, re as DismissController, ie as DismissStack, $ as DragController, F as DropZoneController, m as EditController, v as FocusTrapController, y as HoverController, g as IntersectController, oe as ListNavigateController, le as PopoverController, se as PressController, w as RangeSelectController, ue as ResizeController, Q as RovingFocusController, b as SearchController, X as SelectionController, o as SortController, h as SwipeController, u as ToastController, fe as ToastManager, ce as UIElement, I as ValidateController, s as VirtualScrollController, i as batch, P as clippableAdapter, E as collapsibleAdapter, ae as collectTraitOptions, e as computed, c as copyableAdapter, p as debugReactive, n as define, A as dialogableAdapter, N as dismissableAdapter, G as draggableAdapter, J as droppableAdapter, z as editableAdapter, t as effect, K as focusTrappableAdapter, te as getRegisteredTraitNames, Z as getTrait, ee as getTraitRuntime, q as hoverableAdapter, x as intersectableAdapter, C as isComputed, T as isSignal, j as listNavigableAdapter, ne as parseTraitAttribute, V as popoverableAdapter, S as pressableAdapter, L as rangeSelectableAdapter, W as registerAllTraits, pe as registerTrait, k as resizableAdapter, M as rovingFocusableAdapter, D as searchableAdapter, B as selectableAdapter, r as signal, O as sortableAdapter, H as swipeableAdapter, R as toastableAdapter, a as uid, f as untrack, Y as validatableAdapter, U as virtualizableAdapter };
4
+ import { a as Z, i as Q, n as $, r as ee, s as te, t as ne } from "./ui-element.js";
5
+ import { a as re, c as ie, d as ae, i as oe, l as se, n as ce, o as le, r as ue, s as de, t as fe, u as pe } from "./dialog-controller.js";
6
+ export { d as ClipboardController, l as CollapsibleController, _ as CopyController, fe as DialogController, oe as DismissController, se as DismissStack, ie as DragController, F as DropZoneController, m as EditController, v as FocusTrapController, y as HoverController, g as IntersectController, ce as ListNavigateController, ue as PopoverController, le as PressController, w as RangeSelectController, de as ResizeController, re as RovingFocusController, b as SearchController, X as SelectionController, o as SortController, h as SwipeController, u as ToastController, pe as ToastManager, ne as UIElement, I as ValidateController, s as VirtualScrollController, r as batch, P as clippableAdapter, E as collapsibleAdapter, $ as collectTraitOptions, i as computed, c as copyableAdapter, p as debugReactive, a as define, A as dialogableAdapter, N as dismissableAdapter, G as draggableAdapter, J as droppableAdapter, z as editableAdapter, e as effect, K as focusTrappableAdapter, Q as getRegisteredTraitNames, Z as getTrait, ae as getTraitRuntime, q as hoverableAdapter, x as intersectableAdapter, C as isComputed, T as isSignal, j as listNavigableAdapter, ee as parseTraitAttribute, V as popoverableAdapter, S as pressableAdapter, L as rangeSelectableAdapter, W as registerAllTraits, te as registerTrait, k as resizableAdapter, M as rovingFocusableAdapter, D as searchableAdapter, B as selectableAdapter, n as signal, O as sortableAdapter, H as swipeableAdapter, R as toastableAdapter, t as uid, f as untrack, Y as validatableAdapter, U as virtualizableAdapter };
@@ -0,0 +1,128 @@
1
+ import { n as e } from "./uid.js";
2
+ var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set();
3
+ function r(e) {
4
+ if (t.has(e.name)) {
5
+ console.warn(`[native-ui] Trait "${e.name}" is already registered.`);
6
+ return;
7
+ }
8
+ t.set(e.name, e);
9
+ for (let t of n) t(e.name);
10
+ }
11
+ /** Subscribe to trait registration events. Returns unsubscribe function. */
12
+ function i(e) {
13
+ return n.add(e), () => n.delete(e);
14
+ }
15
+ function a(e) {
16
+ return t.get(e);
17
+ }
18
+ function o() {
19
+ return new Set(t.keys());
20
+ }
21
+ /**
22
+ * Parse a namespaced trait attribute like "draggable-axis" into
23
+ * { trait: "draggable", key: "axis" }. Returns null if the attribute
24
+ * doesn't match any registered trait name prefix.
25
+ */
26
+ function s(e) {
27
+ let t = o();
28
+ for (let n of t) if (e.startsWith(n + "-")) return {
29
+ trait: n,
30
+ key: e.slice(n.length + 1)
31
+ };
32
+ return null;
33
+ }
34
+ /**
35
+ * Collect all `{traitName}-*` attributes from an element for a given trait.
36
+ * Returns a plain object mapping option keys to string values.
37
+ *
38
+ * Example: element has `draggable-axis="x"` and `draggable-mode="slot"`
39
+ * → collectTraitOptions(el, 'draggable') returns { axis: 'x', mode: 'slot' }
40
+ */
41
+ function c(e, t) {
42
+ let n = t + "-", r = {};
43
+ for (let t of e.attributes) t.name.startsWith(n) && (r[t.name.slice(n.length)] = t.value);
44
+ return r;
45
+ }
46
+ /** Base custom element class with reactive effect lifecycle, child deferral, and trait protocol. */
47
+ var l = class extends HTMLElement {
48
+ #e = [];
49
+ #t = /* @__PURE__ */ new Map();
50
+ #n = null;
51
+ #r = /* @__PURE__ */ new Set();
52
+ #i = null;
53
+ #a = !1;
54
+ addEffect(t) {
55
+ this.#e.push(e(t));
56
+ }
57
+ connectedCallback() {
58
+ if (this.#a) return;
59
+ this.#a = !0, this.setup();
60
+ let e = this.getAttribute("traits");
61
+ e !== null && this.#o(e);
62
+ }
63
+ disconnectedCallback() {
64
+ this.#a = !1, this.#c(), this.#n?.disconnect(), this.#n = null, this.#i?.(), this.#i = null, this.#r.clear(), this.teardown();
65
+ for (let e of this.#e) e();
66
+ this.#e = [];
67
+ }
68
+ setup() {}
69
+ teardown() {}
70
+ deferChildren(e) {
71
+ this.firstChild ? e() : queueMicrotask(() => {
72
+ this.isConnected && e();
73
+ });
74
+ }
75
+ attributeChangedCallback(e, t, n) {}
76
+ /**
77
+ * Get a trait controller instance by name.
78
+ * Returns null if no controller with that name is active.
79
+ */
80
+ getTraitController(e) {
81
+ return this.#t.get(e) ?? null;
82
+ }
83
+ #o(e) {
84
+ this.#s(e), this.#n = new MutationObserver((e) => {
85
+ for (let t of e) if (t.attributeName === "traits") this.#s(this.getAttribute("traits") ?? "");
86
+ else if (t.attributeName) {
87
+ let e = s(t.attributeName);
88
+ if (e) {
89
+ let t = a(e.trait), n = this.#t.get(e.trait);
90
+ t && n && t.update && t.update(n, c(this, e.trait));
91
+ }
92
+ }
93
+ }), this.#n.observe(this, { attributes: !0 });
94
+ }
95
+ #s(e) {
96
+ let t = new Set(e.split(/\s+/).filter(Boolean));
97
+ for (let [e, n] of this.#t) if (!t.has(e)) {
98
+ let t = a(e);
99
+ t && t.destroy(n), this.#t.delete(e);
100
+ }
101
+ this.#r.clear();
102
+ for (let e of t) {
103
+ if (this.#t.has(e)) continue;
104
+ let t = a(e);
105
+ if (!t) {
106
+ this.#r.add(e);
107
+ continue;
108
+ }
109
+ for (let [n] of this.#t) if (a(n)?.conflicts?.includes(e) || t.conflicts?.includes(n)) {
110
+ let t = `[native-ui] Trait conflict: "${e}" and "${n}" are incompatible.`;
111
+ console.warn(t);
112
+ }
113
+ let n = c(this, e), r = t.create(this, n);
114
+ this.#t.set(e, r);
115
+ }
116
+ this.#r.size > 0 && !this.#i ? this.#i = i((e) => {
117
+ this.#r.has(e) && (this.#r.delete(e), this.#s(this.getAttribute("traits") ?? ""), this.#r.size === 0 && (this.#i?.(), this.#i = null));
118
+ }) : this.#r.size === 0 && this.#i && (this.#i(), this.#i = null);
119
+ }
120
+ #c() {
121
+ for (let [e, t] of this.#t) {
122
+ let n = a(e);
123
+ n && n.destroy(t);
124
+ }
125
+ this.#t.clear();
126
+ }
127
+ };
128
+ export { a, o as i, c as n, i as o, s as r, r as s, l as t };