@zeyos/zx 3.0.0 → 4.1.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 (106) hide show
  1. package/CHANGELOG.md +95 -0
  2. package/DESIGN-SYSTEM.md +87 -71
  3. package/README.md +16 -37
  4. package/dist/types/components/app-icon/app-icon.d.ts +88 -0
  5. package/dist/types/components/app-sidebar/app-sidebar.d.ts +106 -32
  6. package/dist/types/components/card/card.d.ts +128 -0
  7. package/dist/types/components/chart/chart.d.ts +1 -0
  8. package/dist/types/components/filter/filter-model.d.ts +87 -0
  9. package/dist/types/components/filter/filter.d.ts +331 -0
  10. package/dist/types/components/launcher/launcher.d.ts +65 -6
  11. package/dist/types/components/select/select.d.ts +97 -4
  12. package/dist/types/components/table/table.d.ts +107 -3
  13. package/dist/types/components/tag-picker/tag-picker.d.ts +16 -0
  14. package/dist/types/core/dom.d.ts +9 -1
  15. package/dist/types/core/util.d.ts +9 -0
  16. package/dist/types/index.d.ts +6 -2
  17. package/dist/types/{components/app-rail → internal}/app-rail.d.ts +34 -19
  18. package/dist/types/zeyos/icons.d.ts +24 -2
  19. package/dist/types/zeyos/index.d.ts +3 -2
  20. package/dist/types/zeyos/launcher.d.ts +147 -0
  21. package/dist/types/zeyos/select.d.ts +41 -0
  22. package/dist/zx-zeyos.esm.js +2018 -113
  23. package/dist/zx-zeyos.esm.min.js +1 -1
  24. package/dist/zx.css +815 -16
  25. package/dist/zx.esm.js +2661 -338
  26. package/dist/zx.esm.min.js +3 -3
  27. package/dist/zx.global.js +2661 -338
  28. package/dist/zx.global.min.js +3 -3
  29. package/dist/zx.min.css +1 -1
  30. package/docs/api.json +602 -110
  31. package/docs/llms.md +181 -123
  32. package/docs/llms.txt +24 -21
  33. package/package.json +8 -17
  34. package/src/components/app-icon/app-icon.css +105 -0
  35. package/src/components/app-icon/app-icon.js +134 -0
  36. package/src/components/app-sidebar/app-sidebar.css +12 -0
  37. package/src/components/app-sidebar/app-sidebar.js +310 -110
  38. package/src/components/card/card.css +149 -0
  39. package/src/components/card/card.js +285 -0
  40. package/src/components/chart/chart.js +8 -3
  41. package/src/components/filter/filter-model.js +226 -0
  42. package/src/components/filter/filter.css +147 -0
  43. package/src/components/filter/filter.js +554 -0
  44. package/src/components/grid/grid.css +1 -1
  45. package/src/components/grid/grid.js +14 -4
  46. package/src/components/launcher/launcher.css +113 -3
  47. package/src/components/launcher/launcher.js +234 -26
  48. package/src/components/message/message.css +36 -3
  49. package/src/components/select/field-adapter.js +9 -4
  50. package/src/components/select/select.css +161 -10
  51. package/src/components/select/select.js +361 -48
  52. package/src/components/table/table.css +85 -0
  53. package/src/components/table/table.js +426 -31
  54. package/src/components/tag-picker/tag-picker.css +19 -0
  55. package/src/components/tag-picker/tag-picker.js +42 -5
  56. package/src/core/dom.js +21 -1
  57. package/src/core/util.js +20 -0
  58. package/src/index.js +9 -2
  59. package/src/{components/app-rail → internal}/app-rail.js +80 -30
  60. package/src/zeyos/icons.js +38 -20
  61. package/src/zeyos/index.js +8 -2
  62. package/src/zeyos/launcher.js +338 -0
  63. package/src/zeyos/modules.js +1 -0
  64. package/src/zeyos/select.js +116 -1
  65. package/styles/tokens/global.css +1 -1
  66. package/styles/tokens/modules.css +1 -0
  67. package/styles/tokens/semantic.css +9 -0
  68. package/styles/tokens/themes.css +2 -2
  69. package/styles/zx.css +3 -0
  70. package/MIGRATION.md +0 -749
  71. package/dist/types/compat/base.d.ts +0 -156
  72. package/dist/types/compat/globals.d.ts +0 -20
  73. package/dist/types/compat/index.d.ts +0 -128
  74. package/dist/types/compat/map/basic.d.ts +0 -175
  75. package/dist/types/compat/map/data.d.ts +0 -103
  76. package/dist/types/compat/map/date-time.d.ts +0 -80
  77. package/dist/types/compat/map/factory.d.ts +0 -9
  78. package/dist/types/compat/map/form.d.ts +0 -98
  79. package/dist/types/compat/map/helpers.d.ts +0 -12
  80. package/dist/types/compat/map/http.d.ts +0 -36
  81. package/dist/types/compat/map/layout.d.ts +0 -106
  82. package/dist/types/compat/map/options.d.ts +0 -80
  83. package/dist/types/compat/map/select.d.ts +0 -95
  84. package/dist/types/compat/map/stubs.d.ts +0 -32
  85. package/dist/types/compat/map/utilities.d.ts +0 -37
  86. package/dist/types/compat-entry.d.ts +0 -5
  87. package/dist/zx-compat.esm.js +0 -17848
  88. package/dist/zx-compat.esm.min.js +0 -1
  89. package/dist/zx-compat.global.js +0 -29008
  90. package/dist/zx-compat.global.min.js +0 -3
  91. package/src/compat/base.js +0 -291
  92. package/src/compat/globals.js +0 -167
  93. package/src/compat/index.js +0 -84
  94. package/src/compat/map/basic.js +0 -464
  95. package/src/compat/map/data.js +0 -254
  96. package/src/compat/map/date-time.js +0 -177
  97. package/src/compat/map/factory.js +0 -45
  98. package/src/compat/map/form.js +0 -330
  99. package/src/compat/map/helpers.js +0 -46
  100. package/src/compat/map/http.js +0 -117
  101. package/src/compat/map/layout.js +0 -256
  102. package/src/compat/map/options.js +0 -267
  103. package/src/compat/map/select.js +0 -198
  104. package/src/compat/map/stubs.js +0 -26
  105. package/src/compat/map/utilities.js +0 -113
  106. package/src/compat-entry.js +0 -11
package/docs/llms.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Xenon Design System (Zx) — agent reference
2
2
 
3
- > Xenon is the dependency-free design system for ZeyOS business applications; Zx is its
3
+ > Xenon is a dependency-free design system for browser applications; Zx is its product-agnostic
4
4
  > vanilla-JavaScript implementation. ES2022 modules, WAI-ARIA-accessible native controls, semantic `--zx-*` design
5
5
  > tokens (light/dark + cozy/compact), and lifecycle-safe components. Zero runtime dependencies.
6
6
  > This file is the single, complete reference a coding agent needs to build UI with Zx; each
@@ -73,6 +73,11 @@ renders every component family live and exports the CSS):
73
73
  Keep the 600 stop at 4.5:1 or better against white and the 400 stop at 4.5:1 against the dark page
74
74
  — that is what makes `--zx-color-on-accent` legible without being restated per theme.
75
75
 
76
+ The theme studio treats those stable IDs as complete recipes: selecting a preset also changes its
77
+ density, neutral tint, radius, control height, base text size, font stack, and material strength.
78
+ Its **Material** control is CSS-first (`Flat`, `Glass`, or `Deep glass`); only the deep setting uses
79
+ backdrop blur, and components fall back to solid surfaces under reduced-transparency preferences.
80
+
76
81
  Define a product theme by overriding **semantic** tokens under a `[data-zx-theme="name"]` selector:
77
82
  `--zx-color-bg-page/surface/raised/control/hover/selected`, `--zx-color-border(-strong/-control)`,
78
83
  `--zx-color-text(-muted/-placeholder)`, `--zx-color-accent(-hover)/on-accent`,
@@ -85,8 +90,8 @@ override that works (global token → then, if needed, a component style).
85
90
 
86
91
  For ZeyOS business data use the **dedicated client library** `@zeyos/client`
87
92
  (`npm install @zeyos/client`) — a zero-dependency, typed OpenAPI client (accounts,
88
- transactions/invoices, tickets, 50+ resources), OAuth2/session auth, retries, schema
89
- introspection. It replaces the legacy `gx.zeyos.Client` / `gx.zeyos.Request`.
93
+ transactions/invoices, tickets, 50+ resources), OAuth2/session auth, retries, and schema
94
+ introspection. Zx accepts the client by injection and does not bundle it.
90
95
 
91
96
  ```js
92
97
  import { createZeyosClient, MemoryTokenStore, normalizeListResult } from '@zeyos/client';
@@ -207,16 +212,6 @@ reflection and ElementInternals form association: `<zx-toggle>`, `<zx-check-butt
207
212
  `<zx-checklist>`, `<zx-datebox>`, `<zx-timebox>`, `<zx-search>`, `<zx-groupbox>`, `<zx-tabbox>`,
208
213
  `<zx-table>`, `<zx-dialog>`.
209
214
 
210
- ## gx compatibility
211
-
212
- Load `zx-compat.global.js` (or import `zx-compat.esm.js`) →
213
- `window.gx.{core,ui,util,zeyos,bootstrap}` wrapping Zx components (constructor/option/event-name
214
- translation, MooTools-style `addEvent`). `gx.compat.installGlobals()` (opt-in) installs its gx
215
- `__()` parser only when that name is free, plus `_()`, `String.htmlSpecialChars`, and the element
216
- `store/retrieve` shim. Full namespace listing in
217
- the "gx compatibility layer" component section below; class map and unsupported legacy APIs in
218
- `MIGRATION.md`.
219
-
220
215
  ## Conventions (editing component source)
221
216
 
222
217
  Follow `AGENTS.md`. Key rules: never declare instance class fields for state used in `render()`
@@ -229,14 +224,13 @@ pattern with `:focus-visible` rings and `prefers-reduced-motion` guards.
229
224
 
230
225
  ```
231
226
  src/components/<name>/ component + CSS src/core/ kernel (component, dom, http, i18n, date…)
232
- src/compat/ gx compat layer styles/ tokens + base.css
233
227
  website/ marketing page + docs.html (docs.js) specs/ per-component specs
234
228
  website/demos/ per-component demo modules website/layouts/ application layout examples
235
229
  tests/ node unit + smoke dist/ built bundles
236
230
 
237
231
  npm run serve # http://127.0.0.1:8321/website/docs.html (no build)
238
232
  npm test # node --test tests/unit/*.test.js + node tests/lint-tokens.js
239
- npm run build # dist/: zx.esm.js, zx.global.js (window.zx), zx-compat.global.js (window.gx), zx.css
233
+ npm run build # dist/: ESM, global, ZeyOS binding, and CSS assets
240
234
  node tools/build-module-tokens.js # regenerate styles/tokens/modules.css from src/zeyos/modules.js
241
235
  ```
242
236
 
@@ -428,14 +422,16 @@ permissions, recent-history/cache policy, and the route or command ultimately in
428
422
 
429
423
  - **Constructor** — `new Launcher(null, options)` owns a body-level dialog;
430
424
  `new Launcher(existingDialog, options)` enhances and later restores an existing `<dialog>`.
431
- - **Options** — `items`, abortable `sources: [{id, label?, minQuery?, load(query, {signal})}]`,
425
+ - **Options** — `items`, abortable `sources: [{id, label?, minQuery?, when?, order?, load(query, {signal})}]`,
432
426
  `query`, `debounce: 250`, `minQuery: 0`, `maxResults: 100`, `placeholder`, `label`, `emptyText`,
433
- `loadingText`, and `shortcut: 'mod+k'|false`.
427
+ `loadingText`, `shortcut: 'mod+k'|false`, and visible `hints` labels (or `false`).
434
428
  - **Items** — `{id, label, description?, keywords?, group?, icon?, badge?, value?, href?, target?,
435
- invoke?, pinned?, disabled?}`. Links stay native so modified and middle clicks work; non-link
436
- commands may provide an application-owned `invoke` callback.
429
+ invoke?, pinned?, disabled?, kind?, current?, when?, groupOrder?, itemOrder?}`. `icon` accepts a
430
+ bundled icon name, Node, or factory. Links stay native so modified and middle clicks work;
431
+ non-link commands may provide an application-owned `invoke` callback. Malformed and executable
432
+ URL schemes are stripped; a descriptor with no safe link or callback is disabled.
437
433
  - **Methods** — `open()`, `close()`, `toggle()`, `isOpen()`, `focus()`, `setQuery()`, `getQuery()`,
438
- `setItems()`, `setSources()`, `destroy()`.
434
+ `setItems()`, `setCurrent()`, `setSources()`, `destroy()`.
439
435
  - **Events** — cancelable `select {item, value, source, query}`, `query {query}`, `open`, `close`,
440
436
  and `error {source, error}`. Preventing `select` suppresses the supplied link or callback.
441
437
  - **Ranking** — local results are case/diacritic-insensitive and deterministic: exact label,
@@ -443,8 +439,39 @@ permissions, recent-history/cache policy, and the route or command ultimately in
443
439
  items retain an explicit order ahead of otherwise equal results. A new async query aborts and
444
440
  ignores stale source work.
445
441
  - **Keyboard** — Cmd+K on macOS or Ctrl+K elsewhere opens by default; the shortcut is ignored in
446
- editable controls, composition, and modal contexts. Arrow keys, Home/End, and Enter operate the
447
- single listbox selection model; Escape closes and restores focus.
442
+ editable controls, composition, and modal contexts. Application tiles use spatial arrow-key
443
+ movement; Up/Down may continue into record groups. Home/End, Page Up/Down, and Enter operate the
444
+ single listbox selection model; Escape closes and restores focus. `aria-current` marks the
445
+ active destination independently from the keyboard's `aria-selected` option.
446
+ - **Optional ZeyOS adapter** — import `zeyosLauncher()` or `buildZeyosLauncherConfig()` from
447
+ `@zeyos/zx/zeyos`. The adapter receives the permitted module/menu catalogue, pins, current
448
+ identifier, recent loader or cache, abortable search, destination resolvers, and application/
449
+ record icon renderers explicitly. It maps the complete shell payload without reading globals or
450
+ taking over application routing.
451
+ <!-- /doc -->
452
+
453
+ <!-- doc:app-icon -->
454
+ ### AppIcon — application identity
455
+
456
+ A fixed-size, product-agnostic application tile. It keeps glyph geometry stable in launchers,
457
+ sidebars, entity results, and recent-item rows while identity colour and material remain explicit
458
+ options rather than application globals.
459
+
460
+ - **Options** — `icon` (bundled name, Node, or lazy renderer), `color`, `size: 36`,
461
+ `iconSize: '52%'`, `label`, `badge`, `selected: false`, `glass: false|'subtle'|'strong'`, and
462
+ additional `class` names.
463
+ - **Methods** — `set(partialOptions)` updates the existing root; `destroy()` restores an enhanced
464
+ target. `appIcon(options)` is the element-returning convenience factory.
465
+ - **ZeyOS preset** — import `zeyosAppIcon(module, options)` from `@zeyos/zx/zeyos`. Every current
466
+ ZeyOS application/module has a canonical colour and icon mapping in `src/zeyos/modules.js`;
467
+ entity names and aliases resolve through the same catalogue. `moduleChip()` is the compatible
468
+ alias. An application may call `useZeyosIcons()` for the existing custom glyph kit or inject an
469
+ offline `icon` override; Zx never loads a network asset automatically.
470
+ - **Material** — subtle glass is a CSS border/highlight treatment; strong glass progressively adds
471
+ `backdrop-filter`. `prefers-reduced-transparency` and browsers without support receive a solid
472
+ tile. The glyph and label semantics do not depend on the visual treatment.
473
+ - **Accessibility** — a non-empty `label` gives the root `role="img"`; otherwise it is decorative.
474
+ The badge is visual supplementary status, so include its meaning in `label` when it matters.
448
475
  <!-- /doc -->
449
476
 
450
477
  <!-- doc:avatar -->
@@ -485,26 +512,34 @@ out, or mutates the session.
485
512
 
486
513
  Unifies single-select, local filtering, and async loading.
487
514
 
488
- - **Options** — `items: []`, `fixedItems: []`, `valueKey: 'ID'` (string key or `(item)=>id`),
489
- `labelKey: 'name'` (string or `(item)=>string`), `renderItem`, `renderValue`, `value`,
490
- `disabled`, `placeholder`, `clearable: false`, `filter: false | 'local' | async (query)=>items`,
491
- `searchKeys`, `minQuery: 0`, `debounce: 200`, `listHeight: 280`, `groupKey`.
515
+ - **Options** — `items: []`, `fixedItems: []`, optional `fixedLabel`, `valueKey: 'ID'` (string key or `(item)=>id`),
516
+ `labelKey: 'name'` (string or `(item)=>string`), `renderItem`, `renderValue`,
517
+ `renderValueAdornment`, `renderNone`, `noneLabel`, `actions`, `value`, `disabled`, `placeholder`,
518
+ `clearable: false`, `filter: false | 'local' | async (query)=>items`, `searchKeys`,
519
+ `minQuery: 0`, `debounce: 200`, `listHeight: 280`, `groupKey`.
492
520
  - **Getters** — `.value`, `.selected`.
493
- - **Methods** — `set(id, {silent})`, `setItems()`, `setFixedItems()`, `reset()`, `open()`/`close()`,
494
- `enable()`/`disable()`, `focus()`.
495
- - **Events** — `change {value, item}` (`item` is null on clear), `open`, `close`, `query {query}`,
496
- `loaded {items}`.
521
+ - **Methods** — `set(id, {silent})`, `setItems()`, `setFixedItems()`, `setActions()`, `reset()`,
522
+ `open()`/`close()`, `enable()`/`disable()`, `focus()`.
523
+ - **Events** — `change {value, item}` (`item` is null on clear), preventable
524
+ `action {id, action, query, select}`, `open`, `close`, `query {query}`, `loaded {items}`.
497
525
  - **Fixed choices** — `fixedItems` pins entries to the top of the list, separated by a rule (the
498
526
  rule is dropped when `groupKey` is on, since a heading already divides them). They belong to the
499
527
  control, not to its data: a `filter` function replaces `items` on every query, while the pinned
500
528
  entries are narrowed locally against the same query and stay resolvable by `set()`. They survive
501
529
  `setItems()` and are shown below `minQuery`. Use them for choices with no row in the source —
502
530
  "Unassigned", "Everyone", "Private".
503
- - **Presets** — `Select.priority(target, opts)`, a 5-level priority picker;
504
- `Select.permission(target, {groups, value})`, the record-access picker with Private and Public
505
- pinned above the groups. Its value is the tri-state ZeyOS stores (`false` private, `true` public,
506
- or a group ID), `groups` takes an array or a loader `(query)=>items`, and the labels come from
507
- `msg` (`permission.private`, `permission.public`).
531
+ - **Presets** — `Select.priority(target, opts)` renders the five-level, five-square ZeyOS priority
532
+ scale; `Select.status(target, opts)` supplies shape- and semantic-color-distinct workflow states
533
+ and accepts replacement `items`; `Select.permission(target, {groups, value})` pins Private and
534
+ Public above record-access groups. Its value is the tri-state ZeyOS stores (`false` private,
535
+ `true` public, or a group ID), and `groups` takes an array or loader `(query)=>items`.
536
+ - **Entity preset** — `Select.entity(target, options)` renders icon/color, label, and secondary
537
+ text using `iconKey`, `colorKey`, and `subtitleKey` (or `renderIcon`). `recent` pins a deduplicated
538
+ **Recent** section above ordinary/local/async results; `create: true|actionDescriptor` appends an
539
+ application-owned command at the bottom without changing the selected ID. `recentLabel` and the
540
+ ordinary Select options remain overridable. For schema-driven ZeyOS loading,
541
+ `zeyosEntitySelect(client, resource, options)` and `buildZeyosEntitySelectConfig()` compose this
542
+ preset from `@zeyos/zx/zeyos`; the core preset itself is backend-neutral.
508
543
  - **Keyboard** (APG combobox) — ArrowDown/Alt+ArrowDown open; arrows navigate and wrap; Home/End;
509
544
  Enter selects; Esc closes; Tab closes; printable characters filter (editable) or run a typeahead
510
545
  (readonly). `aria-activedescendant` tracks the active option.
@@ -703,6 +738,8 @@ use `TimePicker` or `DateTimeBox`.
703
738
 
704
739
  Floating toasts come from statics; `new Message(target)` gives an inline, non-floating area with
705
740
  the same `.show()`. The toast region is `role="status"`/`aria-live` (`role="alert"` for errors).
741
+ The shared floating region is fixed to the upper-right logical corner by default, sizes to its
742
+ messages rather than the page, and uses the translucent glass surface tokens with a solid fallback.
706
743
 
707
744
  - **Statics** — `Message.info/success/warning/error(msg, opts)`,
708
745
  `Message.show(msg, { kind, timeout=4000, closable })` → `{ close() }`,
@@ -920,9 +957,9 @@ Two panes with a divider the user owns. The layout is a three-track CSS grid dri
920
957
  <!-- doc:table -->
921
958
  ### Table
922
959
 
923
- Sortable, selectable, sticky-header data table — one component covering both the legacy
924
- `gx.ui.Table` and `SimpleTable`. `fr` widths fill the container while px/auto widths scroll
925
- horizontally, and multi-select adds a tri-state header checkbox plus Shift+click range select.
960
+ Sortable, selectable, sticky-header data table. `fr` widths fill the container while px/auto
961
+ widths scroll horizontally, and multi-select adds a tri-state header checkbox plus Shift+click
962
+ range select.
926
963
 
927
964
  - **Options** — `columns: [{ id, label, sortable?, width ('120px'|'2fr'|'auto'), align,
928
965
  type?: 'text'|'number'|'currency'|'percent'|'unit', locale?, decimals?, currency?, unit?,
@@ -943,7 +980,8 @@ horizontally, and multi-select adds a tri-state header checkbox plus Shift+click
943
980
  `toggleRow()`, `expandRow()`, `collapseRow()`, `expandAll()`, `collapseAll()`, and
944
981
  `getExpanded()`. The native disclosure button works by pointer and keyboard without selecting
945
982
  or clicking the row.
946
- - **Editing** — `editMode: false|'cell'|'row'` (default `false`, and completely inert until set).
983
+ - **Editing** — `editMode: false|'cell'|'row'` (default `false`, and completely inert until set),
984
+ plus `editTrigger: 'double'|'single'` (Table defaults to double; Grid defaults to single).
947
985
  `'cell'` edits one cell, `'row'` opens every editable cell of the row and commits them as a unit.
948
986
  Editors are sized into the cell without changing row height, and an editing cell carries
949
987
  `data-editing="true"` (`data-invalid="true"` plus an `aria-live` message when a validator rejects).
@@ -976,7 +1014,8 @@ horizontally, and multi-select adds a tri-state header checkbox plus Shift+click
976
1014
  commit with no changes emits `editcommit` with an empty `changes` map and leaves the data alone.
977
1015
  Sorting, filtering, or `setData()` while editing cancels the edit cleanly and emits `editcancel`.
978
1016
  - **Editing keyboard** — Enter or F2 on a focused editable cell starts editing (editable cells share
979
- one roving tab stop), double-click starts editing without emitting `rowdblclick`, Enter commits and
1017
+ one roving tab stop); the configured single/double pointer gesture starts it without emitting
1018
+ `rowdblclick`. Enter commits and
980
1019
  returns focus to the cell (Shift+Enter stays a newline in a `'textarea'`, Space toggles a
981
1020
  `'checkbox'`), Escape cancels and returns focus to the cell, Tab commits and moves to the next
982
1021
  editable cell (Shift+Tab the previous), wrapping across rows, and tabbing past the last editable
@@ -1002,6 +1041,14 @@ horizontally, and multi-select adds a tri-state header checkbox plus Shift+click
1002
1041
  - **Empty state** — `emptyText` takes a string, a Node, or a function returning one, so an empty
1003
1042
  table can carry an icon, an explanation, and the action that resolves it (`emptyState({…})`).
1004
1043
  A function is re-called on every render, which is what to use when the placeholder holds controls.
1044
+ - **Row order** — `rowReorder: true` adds a dedicated drag handle. Pointer drag moves rows before
1045
+ or after a sibling; Space/Enter grabs/releases the same handle and ArrowUp/ArrowDown moves it for
1046
+ keyboard users. `moveRow(id, targetId, position)` exposes the same guarded operation. Hierarchical
1047
+ rows only move among siblings, and an active local sort disables manual order. A cancelable
1048
+ `rowmove {row,id,target,targetId,position}` fires before `datachange`.
1049
+ - **Column visibility** — `columnVisibility: true` renders a chooser; `hiddenColumns` seeds it.
1050
+ `getVisibleColumns()`, `getHiddenColumns()`, `setColumnVisible()`, and `toggleColumn()` preserve
1051
+ caller column order and never allow the final visible column to disappear.
1005
1052
  <!-- /doc -->
1006
1053
 
1007
1054
  <!-- doc:grid -->
@@ -1011,9 +1058,11 @@ horizontally, and multi-select adds a tri-state header checkbox plus Shift+click
1011
1058
  without forking its implementation, so sorting, selection, hierarchy, responsive stacking,
1012
1059
  editable cells/rows, loading, events, and teardown keep the Table contract.
1013
1060
 
1014
- - **Constructor** — `new Grid(target, tableOptions)` accepts the complete `Table` API.
1061
+ - **Constructor** — `new Grid(target, tableOptions)` accepts the complete `Table` API and defaults
1062
+ editable cells to a single-click trigger.
1015
1063
  - **Preset** — `Grid.BillingItems(target, options)` supplies an editable hierarchical billing
1016
- schema for item, quantity, unit, unit price, currency, and line total. It returns a `Grid`.
1064
+ schema for item, quantity, unit, unit price, currency, and line total. It enables single-click
1065
+ editing, hierarchy, row reorder handles, and the column visibility chooser. It returns a `Grid`.
1017
1066
  - **Billing options** — `data`, `fields` key overrides, `units`, `currencies`, fallback `currency`,
1018
1067
  `locale`, `decimals`, `columnOverrides`, complete `columns` replacement, `lineTotal(row, changes)`,
1019
1068
  and `oneditcommit` in addition to ordinary Table options.
@@ -1064,6 +1113,35 @@ Declarative client-side filter bar producing a filtered array, commonly wired to
1064
1113
  - **Events** — `filter {rows, state}`.
1065
1114
  <!-- /doc -->
1066
1115
 
1116
+ <!-- doc:filter -->
1117
+ ### Filter — dynamic backend-neutral expressions
1118
+
1119
+ An authoring component for typed, nested filter expressions. It never evaluates application data
1120
+ or interpolates query text: it emits a versioned, JSON-safe AST for an allowlisted application
1121
+ adapter to compile into its own backend query language.
1122
+
1123
+ - **AST** — `{version: 1, root: {kind:'group', id, logic:'and'|'or', children}}`; children are
1124
+ stable-ID groups or `{kind:'condition', id, field, operator, value}` records. Unknown field or
1125
+ operator IDs survive parsing and render as unavailable/invalid instead of being silently lost.
1126
+ - **Fields** — `{id,label,type,operators?,defaultOperator?,choices?,loadChoices?,editor?,minQuery?,
1127
+ debounce?}`. Built-in types cover text, number/money, date/datetime, boolean, enum/status/
1128
+ priority/country/currency/unit/entity, and tags. Compatible operators and their arity come from
1129
+ the exported `filterOperators` matrix; applications may explicitly override/add operator IDs.
1130
+ - **Options** — `fields`, `value`, `operators`, `allowGroups: true`, `maxDepth: 3`,
1131
+ `maxConditions: 50`, `autoApply: false`, `readonly`, `disabled`, `applyLabel`, `clearLabel`.
1132
+ - **Methods** — `getValue()`, atomic `setValue()`, `addCondition()`, `addGroup()`, `update()`,
1133
+ `remove()`, `move()`, `validate()`, `apply()`, `clear()`, `focus()`, `setReadonly()`,
1134
+ `enable()`/`disable()`.
1135
+ - **Events** — `change {value,valid,errors,reason,nodeId}`, `apply {value}`, `invalid {errors}`,
1136
+ and abortable async-choice lifecycle `query`, `loaded`, `error`. `apply()` returns null and
1137
+ focuses the first invalid condition when validation fails.
1138
+ - **Pure exports** — `emptyFilterAst`, `filterCondition`, `filterGroup`, `parseFilterAst`,
1139
+ `cloneFilterAst`, `cloneFilterValue`, `stringifyFilterAst`, and `validateFilterAst`.
1140
+ - **Boundary** — keep the AST in saved views/audit state and compile it in a backend-specific
1141
+ adapter with an allowlist and bound parameters. Do not put SQL, URL query fragments, functions,
1142
+ DOM nodes, Dates, non-finite numbers, or other executable/non-JSON values into conditions.
1143
+ <!-- /doc -->
1144
+
1067
1145
  <!-- doc:tree -->
1068
1146
  ### TreeView
1069
1147
 
@@ -1274,10 +1352,13 @@ shows a fixed set, and `ValueList` takes free text with no catalogue. Unknown ID
1274
1352
  `setValues` still render as tags, so a stored selection survives a catalogue that has not loaded
1275
1353
  yet. Field type: `tagpicker`.
1276
1354
 
1277
- - **Options** — `items`, `values: []`, `valueKey: 'ID'`, `labelKey: 'name'`, `searchKeys`,
1355
+ - **Options** — `items`, `values: []`, `valueKey: 'ID'`, `labelKey: 'name'`, `iconKey: 'icon'`,
1356
+ `colorKey: 'color'`, `searchKeys`,
1278
1357
  `filter: 'local'|(query)=>Promise<items>`, `minQuery: 0`, `debounce: 200`, `allowCreate: false`,
1279
1358
  `max` (maximum tags; further options become `aria-disabled`), `closeOnSelect: false`,
1280
1359
  `placeholder`, `listHeight: 260`, `disabled`, `readonly`, `renderItem`, `renderTag`.
1360
+ - **Tag identity** — icon values accept a bundled icon name or Node; colors are scoped to the tag
1361
+ and its option through `--zx-tag-color`. Custom `renderItem`/`renderTag` remain authoritative.
1281
1362
  - **Methods** — `getValues()`, `getItems()`, `setValues(values, {silent})`, `addValue()`,
1282
1363
  `removeValue()`, `clear()`, `reset()`, `setItems()`, `isFull()`, `open()`/`close()`, `focus()`,
1283
1364
  `setReadonly()`, `enable()`/`disable()`.
@@ -1298,6 +1379,30 @@ Collapsible titled section built on the native `<details>` element.
1298
1379
  - **Events** — `open`, `close`.
1299
1380
  <!-- /doc -->
1300
1381
 
1382
+ <!-- doc:card -->
1383
+ ### Card
1384
+
1385
+ A semantic content or record surface. Card is intentionally not a Panel preset: it has no
1386
+ disclosure state or application chrome, and composes as one repeated item in a grid or list. A
1387
+ linked Card keeps the root non-interactive and renders a real title anchor as its primary action,
1388
+ so buttons and links in its action, content, and footer regions remain valid sibling controls.
1389
+
1390
+ - **Options** — `title: ''`, `media: null`, `content: null`, `actions: []`, `footer: null`,
1391
+ `link: null|string|{href, target?, rel?, onclick?}`, `variant: 'outlined'|'raised'|'filled'`,
1392
+ `orientation: 'vertical'|'horizontal'`, `headingLevel: 3`.
1393
+ - **Methods** — `setTitle()`, `setMedia()`, `setContent()`, `setActions()`, `setFooter()`,
1394
+ `setLink()`.
1395
+ - **Content** — media, body, and footer accept text, a Node, a Component, or null. Enhanced target
1396
+ children become body content when no explicit content is supplied, and `destroy()` restores the
1397
+ target exactly.
1398
+ - **Interaction** — `link` stretches the native title anchor across the visual surface; secondary
1399
+ controls stay above it and are never nested inside it. A linked card requires a non-empty title.
1400
+ Executable/data URL schemes are rejected. Commands belong in `actions`, and selectable cards
1401
+ should compose a native checkbox or radio.
1402
+ - **Layout** — horizontal media uses the public `--zx-card-media-size` hook and stacks through a
1403
+ container query when the card itself becomes narrow.
1404
+ <!-- /doc -->
1405
+
1301
1406
  <!-- doc:panel -->
1302
1407
  ### Panel / MasterPanel
1303
1408
 
@@ -1519,49 +1624,36 @@ menu on narrow widths.
1519
1624
  <!-- /doc -->
1520
1625
 
1521
1626
  <!-- doc:app-sidebar -->
1522
- ### AppSidebar — expanded application navigation
1523
-
1524
- Persistent vertical application navigation with header, scrollable tree, and sticky footer slots.
1525
- It is route-agnostic: ZeyOS supplies native `href` values or handles cancelable selections through
1526
- `PG.go()`. This expanded presentation is the only application-nav component that reveals children
1527
- inline.
1528
-
1529
- - **Options** — shared application `items`, `active`, `expanded`, `collapsed`, `side: 'left'|'right'`,
1530
- `label`, and `header`, `footer`, `railHeader`, `railFooter` content slots.
1531
- - **Methods** — `setItems()`, `setActive()`, `setExpanded()`, `getExpanded()`, `toggleBranch()`,
1532
- `expand()`, `collapse()`, `setCollapsed()`, `isCollapsed()`, `getRail()`, `destroy()`.
1627
+ ### AppSidebar — application navigation in every presentation
1628
+
1629
+ One route-agnostic application-navigation owner with an expanded vertical tree, a minimized
1630
+ vertical rail, and horizontal rail layouts. It mounts exactly one presentation at a time while
1631
+ preserving active and expanded branch state. Only the expanded vertical state reveals descendants
1632
+ inline; every rail state opens descendants toward the workspace in anchored flyouts.
1633
+
1634
+ - **Options** — `items`, `active`, `expanded`, `collapsed`, `collapsible`,
1635
+ `orientation: 'vertical'|'horizontal'`, `side: 'left'|'right'|'top'|'bottom'`, `label`,
1636
+ `header`, `footer`, `railHeader`, `railFooter`, `openDelay: 80`, `closeDelay: 160`, and
1637
+ `renderIcon(item, context)`. Icon values may also be names, nodes, components, or factories.
1638
+ - **Methods** — `setItems()`, `getItems()`, `setActive()`, `setExpanded()`, `getExpanded()`,
1639
+ `toggleBranch()`, `expand()`, `collapse()`, `setCollapsed()`, `isCollapsed()`,
1640
+ `setLayout({orientation, side})`, `openFlyout(id, {focus})`, `closeFlyout()`,
1641
+ `closeAllFlyouts()`, `isFlyoutOpen()`, `focus()`, `destroy()`.
1533
1642
  - **Events** — cancelable `select {item, id, value, href, event}`,
1534
- `branchchange {item, id, expanded, ids}` (`item`, `id`, and `expanded` are null for a bulk
1535
- `setExpanded()`), and `collapsechange {collapsed}`.
1536
- - **Minimized state** — collapse composes `AppRail` over the same normalized item tree. Expanded
1537
- branch IDs survive the round trip but are not rendered inline while minimized.
1538
- - **Semantics** — persistent navigation uses `<nav>` and nested lists with native links and
1539
- disclosure buttons, not menu or menubar roles. A parent with children is disclosure-only; give
1540
- it an explicit Overview child when the parent also needs a destination.
1541
- <!-- /doc -->
1542
-
1543
- <!-- doc:app-rail -->
1544
- ### AppRail — minimized application navigation
1545
-
1546
- The compact form of application navigation for left, right, top, or bottom placement. It can flow
1547
- vertically or horizontally, but descendants are always anchored flyouts—never inline—and open
1548
- toward the workspace.
1549
-
1550
- - **Options** — shared application `items`, `active`, `orientation: 'vertical'|'horizontal'`,
1551
- `side: 'left'|'right'|'top'|'bottom'`, `label`, `header`, `footer`, `openDelay: 80`, and
1552
- `closeDelay: 160`.
1553
- - **Methods** — `setItems()`, `setActive()`, `getItems()`, `openFlyout(id, {focus})`,
1554
- `closeFlyout()`, `closeAllFlyouts()` (including pending hover/focus timers and descendant
1555
- branches), `isFlyoutOpen()`, `focus()`, `destroy()`.
1556
- - **Events** — cancelable `select {item, id, value, href, event}` and
1643
+ `branchchange {item, id, expanded, ids}`, `collapsechange {collapsed}`, and
1557
1644
  `flyoutchange {item, id, open}`.
1558
- - **Pointer and focus** — hover or focus reveals a child collection without stealing focus. The
1559
- close delay covers the trigger-to-panel gap; leaving both trigger and panel closes it. Click,
1560
- Enter, Space, and the inward arrow also open it, so horizontal subnavigation is discoverable and
1561
- usable without hover. Escape, outside activation, or selection closes it.
1562
- - **Semantics** — every icon-only destination retains a visible Tooltip and an accessible name.
1563
- Persistent rail destinations remain native links/buttons in a labelled navigation list; the
1564
- transient child flyout supplies its own arrow-key focus interaction.
1645
+ - **Presentation state** — horizontal navigation is always effectively minimized and never exposes
1646
+ an expand control. Switching layouts does not erase the saved vertical collapsed preference or
1647
+ expanded branch IDs. `AppSidebar` is the single public application-navigation component; use
1648
+ `collapsed: true` or `orientation: 'horizontal'` for its rail presentations.
1649
+ - **Pointer and focus** — hover or focus reveals rail descendants without stealing focus. Click,
1650
+ Enter, Space, and the arrow toward the workspace also open a flyout; Escape, outside activation,
1651
+ or selection closes it. Expanded navigation supports arrows plus Home/End across visible rows.
1652
+ - **Semantics** — persistent navigation uses `<nav>` and nested lists with native links and
1653
+ disclosure buttons, not menu or menubar roles. Icon-only destinations retain an accessible name
1654
+ and Tooltip. A parent with children is disclosure-only; add an Overview child when it also needs
1655
+ a destination. Malformed and executable URL schemes are stripped; an item with no remaining
1656
+ link or callback is disabled in every presentation.
1565
1657
  <!-- /doc -->
1566
1658
 
1567
1659
  <!-- doc:kernel -->
@@ -1569,16 +1661,16 @@ toward the workspace.
1569
1661
 
1570
1662
  - **Component** — the base class: `on`/`off`/`once`/`emit`, `listen`, `toElement`, `msg`,
1571
1663
  `destroy`, and the static `Component.from(el)`.
1572
- - **DOM** — `h(tag, props, ...children)`, `h.raw(html)`, `htmlEscape`, `resolveElement`. The current
1573
- ZeyOS builder is also first-class: `__(tag#id.class, properties, content)` is the migration alias
1574
- for `compactElement()`. It preserves `D*` data, `S*` style, boolean/built-in property, attribute,
1664
+ - **DOM** — `h(tag, props, ...children)`, `h.raw(html)`, `htmlEscape`, `resolveElement`.
1665
+ `__(tag#id.class, properties, content)` is Zx's compact DOM builder and public alias for
1666
+ `compactElement()`. It preserves `D*` data, `S*` style, boolean/built-in property, attribute,
1575
1667
  and legacy `on*` callback rules while keeping content text-safe. `applyCompactProperties`,
1576
1668
  `appendContent`, `appendCompact` (parent return), `appendCompactChild` (child return), and
1577
1669
  `fragment(...children)` are the pure forms.
1578
1670
  - **Compact events** — `onCompactEvent`, `offCompactEvent`, and `fireCompactEvent` share one
1579
1671
  newest-first handler registry. Existing `DOM.on/remEvt/fireEvt` methods can delegate to this
1580
- triad. Zx never installs globals or alters DOM prototypes; the current application owns those
1581
- temporary seams while `UI.new*` implementations are replaced without rewriting `PG` routing.
1672
+ triad. Zx never installs globals or alters DOM prototypes; applications decide whether to expose
1673
+ these functions globally or compose them into their own UI and routing layer.
1582
1674
  - **Icons** — `icon(name, {size, label})` and `icons`; see the Icons section — bundled inline SVG
1583
1675
  by default, Font Awesome after an opt-in.
1584
1676
  - **Positioning** — `position(anchor, floating, {placement, offset, flip, matchWidth})` →
@@ -1714,40 +1806,6 @@ bug wearing a layout costume, while a tooltip that is always there is noise.
1714
1806
  `data-lines` plus `--zx-truncate-lines` select the multi-line form.
1715
1807
  <!-- /doc -->
1716
1808
 
1717
- <!-- doc:gx-compat -->
1718
- ### gx compatibility layer
1719
-
1720
- Opt-in re-implementation of the legacy MooTools-era `gx` API on top of Zx, so existing ZeyOS
1721
- screens keep running while their code is modernised file by file. It lives in its own bundle, is
1722
- never imported by `src/index.js`, and adds nothing to an application that does not load it.
1723
-
1724
- - **Loading** — classic: `<script src="/assets/zx-compat.global.js">` → `window.gx`; module:
1725
- `import { gx } from '/assets/zx-compat.esm.js'` (or `src/compat/index.js` in-repo).
1726
- `gx.compat.installGlobals()` additionally installs the gx `__()` parser only when that name is
1727
- free, plus `_()`, `String.htmlSpecialChars`, and the element `store`/`retrieve` shim. It never
1728
- replaces ZeyOS's compact builder. `gx.install(host)` assigns
1729
- the namespace without the optional globals.
1730
- - **`gx.zeyos`** — Select/SelectFilter/SelectDyn/SelectPrio, Table, Tabbox, Panel, MasterPanel,
1731
- Groupbox, Search, Datebox, DatePicker, MonthPicker, TimePicker, Timebox, Toggle, Msgbox, Popup,
1732
- Dialog, Dropdown, Checklist, Permission, Client, Request, Factory.
1733
- - **`gx.bootstrap`** — Form, Fieldset, Field, the Select variants, Checklist, Table, Tabbox,
1734
- NavigationBar, MenuButton, Message, Popup/PopupAlert/PopupConfirm, CheckButton, DataFilter,
1735
- ValueList, MultiValueEditor, FieldUpload, Timebox.
1736
- - **`gx.util`** — `formatNum`, `formatTime`, `getMinutes`, `getNumber`, `printf`, `parseResult`,
1737
- `Parse`, `isArray`/`isObject`/`isFunction`/`isString`/`isNumber`/`isElement`/`isNode`,
1738
- `Console`.
1739
- - **`gx.ui`** — Container, SimpleTable, Timebox, and the inert visual-effect stubs
1740
- Blend/Collapse/Hud/Toggling/HGroup/Templates. **`gx.core`** — Settings. **`gx.compat`** —
1741
- installGlobals, installElementStorage, parse, GxWrapper.
1742
- - **Migrating off it** — legacy classes collapse onto fewer Zx components: all four Select
1743
- variants → one `Select` with a `filter` option; `gx.ui.Table` + `SimpleTable` → one `Table`;
1744
- `Msgbox`/`bootstrap.Message` → `Message`; `Popup`/`PopupAlert`/`PopupConfirm` → `Modal`/`Dialog`
1745
- with Promise-returning statics; `gx.zeyos.Client`/`Request` → `@zeyos/client`. Anything that
1746
- depended on MooTools prototype extensions is gone. `MIGRATION.md` has the full map and the
1747
- deliberate behaviour changes; `website/compat.html` runs legacy snippets against Zx as a smoke
1748
- test.
1749
- <!-- /doc -->
1750
-
1751
1809
  <!-- doc:elements -->
1752
1810
  ### Custom elements — `defineElements()`
1753
1811
 
package/docs/llms.txt CHANGED
@@ -1,10 +1,10 @@
1
1
  # Xenon Design System (Zx)
2
2
 
3
- > Xenon is the dependency-free design system for ZeyOS business applications; Zx is its
3
+ > Xenon is a dependency-free design system for browser applications; Zx is its product-agnostic
4
4
  > vanilla-JavaScript implementation. ES2022 modules, WAI-ARIA-accessible native
5
5
  > controls, semantic `--zx-*` design tokens with light/dark/density theming, and lifecycle-safe
6
6
  > components. Source modules run directly in the browser; a build step emits ESM, IIFE-global,
7
- > gx-compatibility, and CSS bundles. Zero runtime dependencies.
7
+ > ZeyOS binding, and CSS bundles. Zero runtime dependencies.
8
8
 
9
9
  Instantiate every component as `new Component(target, options)` where `target` is an Element, a
10
10
  selector string, or `null` (the component creates and owns its root, retrieved via `.toElement()`).
@@ -13,45 +13,48 @@ Subscribe with `.on(type, fn)` or an `on<type>` option; handlers receive a `Cust
13
13
  exports and as `window.zx.*`.
14
14
 
15
15
  ## Documentation
16
- - [Documentation site](../website/docs.html): getting started, every component with a live demo and its JavaScript source, and the application layouts. Machine index: [website/llms.txt](../website/llms.txt).
17
- - [README](../README.md): what Zx is, quick start (ESM + global script), component index, theming, browser support, gx compat.
16
+ - [Documentation site](https://zx.zeyos.com/docs.html): getting started, every component with a live demo and its JavaScript source, and the application layouts. Machine index: [llms.txt](https://zx.zeyos.com/llms.txt).
17
+ - [README](../README.md): what Zx is, quick start (ESM + global script), component index, theming, and browser support.
18
18
  - [API reference](llms.md): per-component constructor options, methods, and events for all public components plus the core helpers.
19
- - [Skill](../.claude/skills/zx/SKILL.md): task-oriented guide — mental model, recipes, ZeyOS HTTP client, theming, gotchas, commands.
19
+ - [Skill](https://zx.zeyos.com/skills/zx/SKILL.md): task-oriented guide — mental model, recipes, ZeyOS HTTP client, theming, gotchas, commands.
20
20
  - [Changelog](../CHANGELOG.md): what changed in each release, including behaviour changes an upgrade has to account for.
21
- - [Migration guide](../MIGRATION.md): gx→zx class map, script-tag replacement, deliberate behavior changes, unsupported legacy APIs.
22
- - [Contributor contract](../AGENTS.md): conventions for editing component source (token rules, render-time state, listeners, ARIA/APG).
21
+ - [Contributor contract](https://github.com/zeyos/zx/blob/main/AGENTS.md): conventions for editing component source (token rules, render-time state, listeners, ARIA/APG).
23
22
 
24
23
  ## Components
25
24
  - Inputs and identity: `button()`, `buttonGroup()`, `badge()`/`badgeGroup()`, `CheckButton`,
26
- `Toggle`, `Search`, `Launcher`, `Avatar`, `AccountMenu`, `Select` (APG combobox;
27
- `filter: false|'local'|async`), `Checklist`, `TagPicker`, `NumberField`, `Rating`, `Slider`,
25
+ `Toggle`, `Search`, `AppIcon` (+ `zeyosAppIcon()` presets), `Avatar`,
26
+ `Select` (APG combobox; `filter: false|'local'|async`; priority, status, permission, and
27
+ `Select.entity()` presets), `Checklist`, `TagPicker` (icon/color identity), `NumberField`, `Rating`, `Slider`,
28
28
  `copyButton()`/`CopyInput`, `DatePicker`, `MonthPicker`, `TimePicker`,
29
29
  `Datebox`/`DateTimeBox`, `DateRangePicker`/`DateRangeBox`, `Timebox`.
30
30
  - Overlays: `Message` (toasts/inline/progress), `Modal`, `Dialog` (+ `alert`/`confirm`/`prompt` Promises), `Sheet` (edge-anchored Dialog; `side`, `modal: true|'trap-focus'|false`, `backdrop`, `snap` detents, swipe-to-dismiss), `SheetStack` (drill-down; `stack`/`cascade`), `Dropdown`, `MenuButton`, `ContextMenu` (right-click; `selector` for per-row menus), `Tooltip`/`tooltip()`/`describe()`.
31
- - Data: `Table` (sortable, selectable, sticky header, opt-in inline cell/row editing via
32
- `editMode`), `Grid` with `Grid.BillingItems()`, engine-neutral `Chart` with injected
33
- `ChartJsAdapter`, `DataFilter`, `Pagination` (+ pure `paginationRange()`), `TreeView` (APG tree),
31
+ - Data: `Table` (sortable, selectable, sticky header, opt-in inline cell/row editing, row reorder,
32
+ column visibility), `Grid` with single-click editing and `Grid.BillingItems()`, engine-neutral
33
+ `Chart` with injected `ChartJsAdapter`, backend-neutral nested `Filter`, simple client-side
34
+ `DataFilter`, `Pagination` (+ pure `paginationRange()`), `TreeView` (APG tree),
34
35
  `Finder` (Miller columns).
35
36
  - Forms: `Form`, `Fieldset`, `Questionnaire` (guided one-question-at-a-time flow with branching), `Field` (type registry), `ValueList`, `MultiValueEditor`, `FieldUpload`.
36
37
  - Layout: `stack()`/`grid()`/`aspect()` (spacing, an intrinsically reflowing grid, a fixed-ratio
37
- box), `Groupbox`, `Panel` (header/footer action buttons), `MasterPanel`, `Tabbox`
38
- (`variant: 'divided'|'bracket'|'line'|'segmented'`), `NavigationBar`, expanded `AppSidebar`,
39
- minimized `AppRail`, `Toolbar` (APG toolbar with overflow menu), `SplitView`, `Dock`
38
+ box), `Groupbox`, `Card` (media/title link/actions/footer), `Panel` (header/footer action
39
+ buttons), `MasterPanel`, `Tabbox`
40
+ (`variant: 'divided'|'bracket'|'line'|'segmented'`), `NavigationBar`, `AppSidebar` (expanded and
41
+ minimized vertical states plus horizontal rail layouts), `AccountMenu`, `Launcher`,
42
+ `spinner()`/`ProgressBar`/`InlineLoading`, `skeleton()`/`skeletonText()`/`skeletonTable()`,
43
+ `Toolbar` (APG toolbar with overflow menu), `SplitView`, `Dock`
40
44
  (collapsible resizable pane stack; tab groups, regions, adopts a `Sheet`), `Stepper`,
41
45
  `Breadcrumb`, `emptyState()`.
42
- - Feedback: `spinner()` (unknown duration), `ProgressBar` (known share; determinate or indeterminate), `InlineLoading` (a wait resolving into its outcome in place), `skeleton()`/`skeletonText()`/`skeletonTable()` (placeholders shaped like the content; `aria-hidden`, set `aria-busy` on the region).
43
- - Core: `Component`, `h`/`icon`, `position`, `breakpoints`/`breakpointOf`/`matchBreakpoint`/`onBreakpoint` (named width bands, observed on an element or the window), `Http`/`zeyosService`, i18n, date utils, `defineElements` (declarative `<zx-*>` custom elements).
46
+ - Core: `Component`, `h`/`__`/`icon`, `position`, `breakpoints`/`breakpointOf`/`matchBreakpoint`/`onBreakpoint` (named width bands, observed on an element or the window), `Http`/`zeyosService`, i18n, date utils, `defineElements` (declarative `<zx-*>` custom elements).
44
47
  - Helpers: `formatNumber`/`formatCurrency`/`formatPercent`/`formatFileSize`/`formatRelativeTime` (locale-aware, cached `Intl`), `debounce`/`throttle`, `groupBy`/`sortBy`/`uniqueBy`, `escapeRegExp`/`highlightMatch`, `storage()` (namespaced JSON, degrades to memory), `toCsv`/`downloadBlob`/`copyToClipboard`, `truncate()`/`isTruncated()` (line clamp with the full value on hover).
45
48
 
46
49
  ## Theming
47
- Load `zx.css` once; set `data-zx-theme` (`light`|`dark`|`auto`) and `data-zx-density` (`cozy`|`compact`) on any ancestor. Define a product theme by overriding semantic `--zx-color-*` / `--zx-control-*` tokens under `[data-zx-theme="name"]`. Never use tier-1 palette tokens or raw color literals in application CSS.
50
+ Load `zx.css` once; set `data-zx-theme` (`light`|`dark`|`auto`) and `data-zx-density` (`cozy`|`compact`) on any ancestor. Define a product theme by overriding semantic `--zx-color-*` / `--zx-control-*` tokens under `[data-zx-theme="name"]`. The theme studio controls accent, neutral tint, density, font, type size, radius, control height, and CSS-first glass material. Never use tier-1 palette tokens or raw color literals in application CSS.
48
51
 
49
52
  ## Talking to ZeyOS
50
- Use the dedicated ZeyOS client library **`@zeyos/client`** (`npm install @zeyos/client`) for ZeyOS business data: `createZeyosClient({ platform, auth })`, typed `client.api.list/get/create/update<Resource>` over the full OpenAPI surface, `normalizeListResult`. It replaces the legacy `gx.zeyos.Client`/`gx.zeyos.Request`. See the `website/layouts/zeyos-invoices.layout.js` layout for a Zx-components-on-@zeyos/client reference. Zx also ships a minimal `Http`/`zeyosService` for ad-hoc in-app `remotecall`, but `@zeyos/client` is the recommended default.
53
+ Use the dedicated ZeyOS client library **`@zeyos/client`** (`npm install @zeyos/client`) for ZeyOS business data: `createZeyosClient({ platform, auth })`, typed `client.api.list/get/create/update<Resource>` over the full OpenAPI surface, and `normalizeListResult`. Zx accepts the client by injection and does not bundle it. See the `website/layouts/zeyos-invoices.layout.js` layout for a Zx-components-on-@zeyos/client reference. Zx also ships a minimal `Http`/`zeyosService` for ad-hoc in-app `remotecall`, but `@zeyos/client` is the recommended default.
51
54
 
52
55
  ## Installing
53
- `npm install @zeyos/zx`. Entry points: `.` (components), `./zeyos` (ZeyOS binding), `./compat`
54
- (gx namespace), `./zx.css` (styles), `./global` (classic script tag). Docs: https://zx.zeyos.com
56
+ `npm install @zeyos/zx`. Entry points: `.` (components), `./zeyos` (ZeyOS binding), `./zx.css`
57
+ (styles), and `./global` (classic script tag). Docs: https://zx.zeyos.com
55
58
 
56
59
  ## Commands
57
60
  `npm run serve` (no-build documentation at http://127.0.0.1:8321/website/docs.html) · `npm test` (unit + token lint) · `npm run build` (dist bundles).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zeyos/zx",
3
- "version": "3.0.0",
4
- "description": "Dependency-free JavaScript implementation of the Xenon Design System for ZeyOS.",
3
+ "version": "4.1.0",
4
+ "description": "Dependency-free JavaScript implementation of the Xenon Design System.",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "homepage": "https://zx.zeyos.com",
@@ -25,9 +25,7 @@
25
25
  "sideEffects": [
26
26
  "*.css",
27
27
  "./dist/zx.global.js",
28
- "./dist/zx.global.min.js",
29
- "./dist/zx-compat.global.js",
30
- "./dist/zx-compat.global.min.js"
28
+ "./dist/zx.global.min.js"
31
29
  ],
32
30
  "exports": {
33
31
  ".": {
@@ -38,23 +36,15 @@
38
36
  "types": "./dist/types/zeyos/index.d.ts",
39
37
  "default": "./dist/zx-zeyos.esm.js"
40
38
  },
41
- "./compat": {
42
- "types": "./dist/types/compat/index.d.ts",
43
- "default": "./dist/zx-compat.esm.js"
44
- },
45
39
  "./global": {
46
40
  "types": "./dist/types/index.d.ts",
47
41
  "default": "./dist/zx.global.js"
48
42
  },
49
- "./compat-global": {
50
- "types": "./dist/types/compat/index.d.ts",
51
- "default": "./dist/zx-compat.global.js"
52
- },
53
43
  "./zx.css": "./dist/zx.css",
54
44
  "./zx.min.css": "./dist/zx.min.css",
55
- "./src/*.js": {
56
- "types": "./dist/types/*.d.ts",
57
- "default": "./src/*.js"
45
+ "./src/components/*.js": {
46
+ "types": "./dist/types/components/*.d.ts",
47
+ "default": "./src/components/*.js"
58
48
  },
59
49
  "./styles/*": "./styles/*",
60
50
  "./dist/*": "./dist/*",
@@ -68,13 +58,14 @@
68
58
  "dist/types",
69
59
  "styles",
70
60
  "src",
61
+ "!src/compat",
62
+ "!src/compat-entry.js",
71
63
  "docs/llms.md",
72
64
  "docs/llms.txt",
73
65
  "docs/api.json",
74
66
  "CHANGELOG.md",
75
67
  "README.md",
76
68
  "DESIGN-SYSTEM.md",
77
- "MIGRATION.md",
78
69
  "LICENSE"
79
70
  ],
80
71
  "engines": {