@zeyos/zx 3.0.0 → 4.0.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 (88) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/DESIGN-SYSTEM.md +28 -68
  3. package/README.md +16 -37
  4. package/dist/types/components/app-sidebar/app-sidebar.d.ts +106 -32
  5. package/dist/types/components/card/card.d.ts +128 -0
  6. package/dist/types/components/chart/chart.d.ts +1 -0
  7. package/dist/types/components/launcher/launcher.d.ts +65 -6
  8. package/dist/types/components/select/select.d.ts +51 -0
  9. package/dist/types/components/table/table.d.ts +4 -3
  10. package/dist/types/core/dom.d.ts +8 -0
  11. package/dist/types/index.d.ts +2 -1
  12. package/dist/types/{components/app-rail → internal}/app-rail.d.ts +34 -19
  13. package/dist/types/zeyos/icons.d.ts +5 -0
  14. package/dist/types/zeyos/index.d.ts +2 -1
  15. package/dist/types/zeyos/launcher.d.ts +147 -0
  16. package/dist/types/zeyos/select.d.ts +39 -0
  17. package/dist/zx-zeyos.esm.js +1324 -46
  18. package/dist/zx-zeyos.esm.min.js +1 -1
  19. package/dist/zx.css +400 -12
  20. package/dist/zx.esm.js +1059 -189
  21. package/dist/zx.esm.min.js +3 -3
  22. package/dist/zx.global.js +1059 -189
  23. package/dist/zx.global.min.js +3 -3
  24. package/dist/zx.min.css +1 -1
  25. package/docs/api.json +258 -145
  26. package/docs/llms.md +93 -112
  27. package/docs/llms.txt +16 -15
  28. package/package.json +8 -17
  29. package/src/components/app-sidebar/app-sidebar.css +12 -0
  30. package/src/components/app-sidebar/app-sidebar.js +310 -110
  31. package/src/components/card/card.css +149 -0
  32. package/src/components/card/card.js +285 -0
  33. package/src/components/chart/chart.js +8 -3
  34. package/src/components/grid/grid.js +10 -3
  35. package/src/components/launcher/launcher.css +113 -3
  36. package/src/components/launcher/launcher.js +234 -26
  37. package/src/components/select/field-adapter.js +9 -4
  38. package/src/components/select/select.css +144 -10
  39. package/src/components/select/select.js +259 -27
  40. package/src/components/table/table.js +8 -7
  41. package/src/core/dom.js +20 -0
  42. package/src/index.js +2 -1
  43. package/src/{components/app-rail → internal}/app-rail.js +80 -30
  44. package/src/zeyos/icons.js +8 -3
  45. package/src/zeyos/index.js +7 -1
  46. package/src/zeyos/launcher.js +338 -0
  47. package/src/zeyos/modules.js +1 -0
  48. package/src/zeyos/select.js +115 -1
  49. package/styles/tokens/global.css +1 -1
  50. package/styles/tokens/modules.css +1 -0
  51. package/styles/zx.css +1 -0
  52. package/MIGRATION.md +0 -749
  53. package/dist/types/compat/base.d.ts +0 -156
  54. package/dist/types/compat/globals.d.ts +0 -20
  55. package/dist/types/compat/index.d.ts +0 -128
  56. package/dist/types/compat/map/basic.d.ts +0 -175
  57. package/dist/types/compat/map/data.d.ts +0 -103
  58. package/dist/types/compat/map/date-time.d.ts +0 -80
  59. package/dist/types/compat/map/factory.d.ts +0 -9
  60. package/dist/types/compat/map/form.d.ts +0 -98
  61. package/dist/types/compat/map/helpers.d.ts +0 -12
  62. package/dist/types/compat/map/http.d.ts +0 -36
  63. package/dist/types/compat/map/layout.d.ts +0 -106
  64. package/dist/types/compat/map/options.d.ts +0 -80
  65. package/dist/types/compat/map/select.d.ts +0 -95
  66. package/dist/types/compat/map/stubs.d.ts +0 -32
  67. package/dist/types/compat/map/utilities.d.ts +0 -37
  68. package/dist/types/compat-entry.d.ts +0 -5
  69. package/dist/zx-compat.esm.js +0 -17848
  70. package/dist/zx-compat.esm.min.js +0 -1
  71. package/dist/zx-compat.global.js +0 -29008
  72. package/dist/zx-compat.global.min.js +0 -3
  73. package/src/compat/base.js +0 -291
  74. package/src/compat/globals.js +0 -167
  75. package/src/compat/index.js +0 -84
  76. package/src/compat/map/basic.js +0 -464
  77. package/src/compat/map/data.js +0 -254
  78. package/src/compat/map/date-time.js +0 -177
  79. package/src/compat/map/factory.js +0 -45
  80. package/src/compat/map/form.js +0 -330
  81. package/src/compat/map/helpers.js +0 -46
  82. package/src/compat/map/http.js +0 -117
  83. package/src/compat/map/layout.js +0 -256
  84. package/src/compat/map/options.js +0 -267
  85. package/src/compat/map/select.js +0 -198
  86. package/src/compat/map/stubs.js +0 -26
  87. package/src/compat/map/utilities.js +0 -113
  88. 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
@@ -85,8 +85,8 @@ override that works (global token → then, if needed, a component style).
85
85
 
86
86
  For ZeyOS business data use the **dedicated client library** `@zeyos/client`
87
87
  (`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`.
88
+ transactions/invoices, tickets, 50+ resources), OAuth2/session auth, retries, and schema
89
+ introspection. Zx accepts the client by injection and does not bundle it.
90
90
 
91
91
  ```js
92
92
  import { createZeyosClient, MemoryTokenStore, normalizeListResult } from '@zeyos/client';
@@ -207,16 +207,6 @@ reflection and ElementInternals form association: `<zx-toggle>`, `<zx-check-butt
207
207
  `<zx-checklist>`, `<zx-datebox>`, `<zx-timebox>`, `<zx-search>`, `<zx-groupbox>`, `<zx-tabbox>`,
208
208
  `<zx-table>`, `<zx-dialog>`.
209
209
 
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
210
  ## Conventions (editing component source)
221
211
 
222
212
  Follow `AGENTS.md`. Key rules: never declare instance class fields for state used in `render()`
@@ -229,14 +219,13 @@ pattern with `:focus-visible` rings and `prefers-reduced-motion` guards.
229
219
 
230
220
  ```
231
221
  src/components/<name>/ component + CSS src/core/ kernel (component, dom, http, i18n, date…)
232
- src/compat/ gx compat layer styles/ tokens + base.css
233
222
  website/ marketing page + docs.html (docs.js) specs/ per-component specs
234
223
  website/demos/ per-component demo modules website/layouts/ application layout examples
235
224
  tests/ node unit + smoke dist/ built bundles
236
225
 
237
226
  npm run serve # http://127.0.0.1:8321/website/docs.html (no build)
238
227
  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
228
+ npm run build # dist/: ESM, global, ZeyOS binding, and CSS assets
240
229
  node tools/build-module-tokens.js # regenerate styles/tokens/modules.css from src/zeyos/modules.js
241
230
  ```
242
231
 
@@ -428,14 +417,16 @@ permissions, recent-history/cache policy, and the route or command ultimately in
428
417
 
429
418
  - **Constructor** — `new Launcher(null, options)` owns a body-level dialog;
430
419
  `new Launcher(existingDialog, options)` enhances and later restores an existing `<dialog>`.
431
- - **Options** — `items`, abortable `sources: [{id, label?, minQuery?, load(query, {signal})}]`,
420
+ - **Options** — `items`, abortable `sources: [{id, label?, minQuery?, when?, order?, load(query, {signal})}]`,
432
421
  `query`, `debounce: 250`, `minQuery: 0`, `maxResults: 100`, `placeholder`, `label`, `emptyText`,
433
- `loadingText`, and `shortcut: 'mod+k'|false`.
422
+ `loadingText`, `shortcut: 'mod+k'|false`, and visible `hints` labels (or `false`).
434
423
  - **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.
424
+ invoke?, pinned?, disabled?, kind?, current?, when?, groupOrder?, itemOrder?}`. `icon` accepts a
425
+ bundled icon name, Node, or factory. Links stay native so modified and middle clicks work;
426
+ non-link commands may provide an application-owned `invoke` callback. Malformed and executable
427
+ URL schemes are stripped; a descriptor with no safe link or callback is disabled.
437
428
  - **Methods** — `open()`, `close()`, `toggle()`, `isOpen()`, `focus()`, `setQuery()`, `getQuery()`,
438
- `setItems()`, `setSources()`, `destroy()`.
429
+ `setItems()`, `setCurrent()`, `setSources()`, `destroy()`.
439
430
  - **Events** — cancelable `select {item, value, source, query}`, `query {query}`, `open`, `close`,
440
431
  and `error {source, error}`. Preventing `select` suppresses the supplied link or callback.
441
432
  - **Ranking** — local results are case/diacritic-insensitive and deterministic: exact label,
@@ -443,8 +434,15 @@ permissions, recent-history/cache policy, and the route or command ultimately in
443
434
  items retain an explicit order ahead of otherwise equal results. A new async query aborts and
444
435
  ignores stale source work.
445
436
  - **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.
437
+ editable controls, composition, and modal contexts. Application tiles use spatial arrow-key
438
+ movement; Up/Down may continue into record groups. Home/End, Page Up/Down, and Enter operate the
439
+ single listbox selection model; Escape closes and restores focus. `aria-current` marks the
440
+ active destination independently from the keyboard's `aria-selected` option.
441
+ - **Optional ZeyOS adapter** — import `zeyosLauncher()` or `buildZeyosLauncherConfig()` from
442
+ `@zeyos/zx/zeyos`. The adapter receives the permitted module/menu catalogue, pins, current
443
+ identifier, recent loader or cache, abortable search, destination resolvers, and application/
444
+ record icon renderers explicitly. It maps the complete shell payload without reading globals or
445
+ taking over application routing.
448
446
  <!-- /doc -->
449
447
 
450
448
  <!-- doc:avatar -->
@@ -486,25 +484,31 @@ out, or mutates the session.
486
484
  Unifies single-select, local filtering, and async loading.
487
485
 
488
486
  - **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`.
487
+ `labelKey: 'name'` (string or `(item)=>string`), `renderItem`, `renderValue`,
488
+ `renderValueAdornment`, `renderNone`, `noneLabel`, `actions`, `value`, `disabled`, `placeholder`,
489
+ `clearable: false`, `filter: false | 'local' | async (query)=>items`, `searchKeys`,
490
+ `minQuery: 0`, `debounce: 200`, `listHeight: 280`, `groupKey`.
492
491
  - **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}`.
492
+ - **Methods** — `set(id, {silent})`, `setItems()`, `setFixedItems()`, `setActions()`, `reset()`,
493
+ `open()`/`close()`, `enable()`/`disable()`, `focus()`.
494
+ - **Events** — `change {value, item}` (`item` is null on clear), preventable
495
+ `action {id, action, query, select}`, `open`, `close`, `query {query}`, `loaded {items}`.
497
496
  - **Fixed choices** — `fixedItems` pins entries to the top of the list, separated by a rule (the
498
497
  rule is dropped when `groupKey` is on, since a heading already divides them). They belong to the
499
498
  control, not to its data: a `filter` function replaces `items` on every query, while the pinned
500
499
  entries are narrowed locally against the same query and stay resolvable by `set()`. They survive
501
500
  `setItems()` and are shown below `minQuery`. Use them for choices with no row in the source —
502
501
  "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`).
502
+ - **Presets** — `Select.priority(target, opts)` renders the five-level, five-square ZeyOS priority
503
+ scale; `Select.status(target, opts)` supplies shape- and semantic-color-distinct workflow states
504
+ and accepts replacement `items`; `Select.permission(target, {groups, value})` pins Private and
505
+ Public above record-access groups. Its value is the tri-state ZeyOS stores (`false` private,
506
+ `true` public, or a group ID), and `groups` takes an array or loader `(query)=>items`.
507
+ - **ZeyOS entity preset** — import `zeyosEntitySelect(client, resource, options)` or the DOM-free
508
+ `buildZeyosEntitySelectConfig()` from `@zeyos/zx/zeyos`. It composes the async client binding
509
+ with module-colored icons, subtitle/group readers, a deliberate none row, and an optional
510
+ application-owned create command. The selected value remains the record ID and exact product
511
+ glyphs stay injectable through `renderIcon`.
508
512
  - **Keyboard** (APG combobox) — ArrowDown/Alt+ArrowDown open; arrows navigate and wrap; Home/End;
509
513
  Enter selects; Esc closes; Tab closes; printable characters filter (editable) or run a typeahead
510
514
  (readonly). `aria-activedescendant` tracks the active option.
@@ -920,9 +924,9 @@ Two panes with a divider the user owns. The layout is a three-track CSS grid dri
920
924
  <!-- doc:table -->
921
925
  ### Table
922
926
 
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.
927
+ Sortable, selectable, sticky-header data table. `fr` widths fill the container while px/auto
928
+ widths scroll horizontally, and multi-select adds a tri-state header checkbox plus Shift+click
929
+ range select.
926
930
 
927
931
  - **Options** — `columns: [{ id, label, sortable?, width ('120px'|'2fr'|'auto'), align,
928
932
  type?: 'text'|'number'|'currency'|'percent'|'unit', locale?, decimals?, currency?, unit?,
@@ -1298,6 +1302,30 @@ Collapsible titled section built on the native `<details>` element.
1298
1302
  - **Events** — `open`, `close`.
1299
1303
  <!-- /doc -->
1300
1304
 
1305
+ <!-- doc:card -->
1306
+ ### Card
1307
+
1308
+ A semantic content or record surface. Card is intentionally not a Panel preset: it has no
1309
+ disclosure state or application chrome, and composes as one repeated item in a grid or list. A
1310
+ linked Card keeps the root non-interactive and renders a real title anchor as its primary action,
1311
+ so buttons and links in its action, content, and footer regions remain valid sibling controls.
1312
+
1313
+ - **Options** — `title: ''`, `media: null`, `content: null`, `actions: []`, `footer: null`,
1314
+ `link: null|string|{href, target?, rel?, onclick?}`, `variant: 'outlined'|'raised'|'filled'`,
1315
+ `orientation: 'vertical'|'horizontal'`, `headingLevel: 3`.
1316
+ - **Methods** — `setTitle()`, `setMedia()`, `setContent()`, `setActions()`, `setFooter()`,
1317
+ `setLink()`.
1318
+ - **Content** — media, body, and footer accept text, a Node, a Component, or null. Enhanced target
1319
+ children become body content when no explicit content is supplied, and `destroy()` restores the
1320
+ target exactly.
1321
+ - **Interaction** — `link` stretches the native title anchor across the visual surface; secondary
1322
+ controls stay above it and are never nested inside it. A linked card requires a non-empty title.
1323
+ Executable/data URL schemes are rejected. Commands belong in `actions`, and selectable cards
1324
+ should compose a native checkbox or radio.
1325
+ - **Layout** — horizontal media uses the public `--zx-card-media-size` hook and stacks through a
1326
+ container query when the card itself becomes narrow.
1327
+ <!-- /doc -->
1328
+
1301
1329
  <!-- doc:panel -->
1302
1330
  ### Panel / MasterPanel
1303
1331
 
@@ -1519,49 +1547,36 @@ menu on narrow widths.
1519
1547
  <!-- /doc -->
1520
1548
 
1521
1549
  <!-- 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()`.
1550
+ ### AppSidebar — application navigation in every presentation
1551
+
1552
+ One route-agnostic application-navigation owner with an expanded vertical tree, a minimized
1553
+ vertical rail, and horizontal rail layouts. It mounts exactly one presentation at a time while
1554
+ preserving active and expanded branch state. Only the expanded vertical state reveals descendants
1555
+ inline; every rail state opens descendants toward the workspace in anchored flyouts.
1556
+
1557
+ - **Options** — `items`, `active`, `expanded`, `collapsed`, `collapsible`,
1558
+ `orientation: 'vertical'|'horizontal'`, `side: 'left'|'right'|'top'|'bottom'`, `label`,
1559
+ `header`, `footer`, `railHeader`, `railFooter`, `openDelay: 80`, `closeDelay: 160`, and
1560
+ `renderIcon(item, context)`. Icon values may also be names, nodes, components, or factories.
1561
+ - **Methods** — `setItems()`, `getItems()`, `setActive()`, `setExpanded()`, `getExpanded()`,
1562
+ `toggleBranch()`, `expand()`, `collapse()`, `setCollapsed()`, `isCollapsed()`,
1563
+ `setLayout({orientation, side})`, `openFlyout(id, {focus})`, `closeFlyout()`,
1564
+ `closeAllFlyouts()`, `isFlyoutOpen()`, `focus()`, `destroy()`.
1533
1565
  - **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
1566
+ `branchchange {item, id, expanded, ids}`, `collapsechange {collapsed}`, and
1557
1567
  `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.
1568
+ - **Presentation state** — horizontal navigation is always effectively minimized and never exposes
1569
+ an expand control. Switching layouts does not erase the saved vertical collapsed preference or
1570
+ expanded branch IDs. `AppSidebar` is the single public application-navigation component; use
1571
+ `collapsed: true` or `orientation: 'horizontal'` for its rail presentations.
1572
+ - **Pointer and focus** — hover or focus reveals rail descendants without stealing focus. Click,
1573
+ Enter, Space, and the arrow toward the workspace also open a flyout; Escape, outside activation,
1574
+ or selection closes it. Expanded navigation supports arrows plus Home/End across visible rows.
1575
+ - **Semantics** — persistent navigation uses `<nav>` and nested lists with native links and
1576
+ disclosure buttons, not menu or menubar roles. Icon-only destinations retain an accessible name
1577
+ and Tooltip. A parent with children is disclosure-only; add an Overview child when it also needs
1578
+ a destination. Malformed and executable URL schemes are stripped; an item with no remaining
1579
+ link or callback is disabled in every presentation.
1565
1580
  <!-- /doc -->
1566
1581
 
1567
1582
  <!-- doc:kernel -->
@@ -1714,40 +1729,6 @@ bug wearing a layout costume, while a tooltip that is always there is noise.
1714
1729
  `data-lines` plus `--zx-truncate-lines` select the multi-line form.
1715
1730
  <!-- /doc -->
1716
1731
 
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
1732
  <!-- doc:elements -->
1752
1733
  ### Custom elements — `defineElements()`
1753
1734
 
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,18 +13,18 @@ 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
25
  `Toggle`, `Search`, `Launcher`, `Avatar`, `AccountMenu`, `Select` (APG combobox;
27
- `filter: false|'local'|async`), `Checklist`, `TagPicker`, `NumberField`, `Rating`, `Slider`,
26
+ `filter: false|'local'|async`; priority, status, permission, and optional ZeyOS entity presets),
27
+ `Checklist`, `TagPicker`, `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()`.
@@ -34,24 +34,25 @@ exports and as `window.zx.*`.
34
34
  `Finder` (Miller columns).
35
35
  - Forms: `Form`, `Fieldset`, `Questionnaire` (guided one-question-at-a-time flow with branching), `Field` (type registry), `ValueList`, `MultiValueEditor`, `FieldUpload`.
36
36
  - 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`
37
+ box), `Groupbox`, `Card` (media/title link/actions/footer), `Panel` (header/footer action
38
+ buttons), `MasterPanel`, `Tabbox`
39
+ (`variant: 'divided'|'bracket'|'line'|'segmented'`), `NavigationBar`, `AppSidebar` (expanded and
40
+ minimized vertical states plus horizontal rail layouts), `Toolbar` (APG toolbar with overflow menu), `SplitView`, `Dock`
40
41
  (collapsible resizable pane stack; tab groups, regions, adopts a `Sheet`), `Stepper`,
41
42
  `Breadcrumb`, `emptyState()`.
42
43
  - 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).
44
+ - 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
45
  - 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
46
 
46
47
  ## Theming
47
48
  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.
48
49
 
49
50
  ## 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.
51
+ 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
52
 
52
53
  ## 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
54
+ `npm install @zeyos/zx`. Entry points: `.` (components), `./zeyos` (ZeyOS binding), `./zx.css`
55
+ (styles), and `./global` (classic script tag). Docs: https://zx.zeyos.com
55
56
 
56
57
  ## Commands
57
58
  `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.0.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": {
@@ -6,6 +6,18 @@
6
6
  color: var(--zx-color-text);
7
7
  }
8
8
 
9
+ .zx-app-sidebar[data-orientation="horizontal"] {
10
+ inline-size: 100%;
11
+ }
12
+
13
+ .zx-app-sidebar[data-orientation="horizontal"] > .zx-app-sidebar__rail {
14
+ inline-size: 100%;
15
+ }
16
+
17
+ .zx-app-sidebar__rail.zx-app-rail {
18
+ border: 0;
19
+ }
20
+
9
21
  .zx-app-sidebar__expanded {
10
22
  display: grid;
11
23
  grid-template-rows: auto minmax(0, 1fr) auto;