@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/CHANGELOG.md CHANGED
@@ -8,6 +8,57 @@ and friends remain the complete record.
8
8
 
9
9
  ## Unreleased
10
10
 
11
+ ## 4.0.0 — 2026-08-24
12
+
13
+ ### Added
14
+
15
+ - **`Card`.** A semantic, product-agnostic content and record surface with optional media, native
16
+ title link, secondary actions, footer metadata, three variants, horizontal/vertical layout, and
17
+ exact enhanced-target restoration. The root never impersonates a link or button, so nested
18
+ controls remain valid and independently keyboard-accessible.
19
+
20
+ ### Changed
21
+
22
+ - **One public application-navigation component.** `AppSidebar` now owns expanded vertical, minimized
23
+ vertical, and horizontal rail presentations over one active/branch state model. Descendants are
24
+ inline only while expanded and use pointer-, focus-, and keyboard-accessible flyouts in rail
25
+ states; its minimized renderer is an implementation detail, not a second public component.
26
+ - **Richer Select presets.** `Select.priority()` now uses the five-square ZeyOS scale;
27
+ `Select.status()` adds shape- and semantic-color-distinct workflow states; and the optional
28
+ `zeyosEntitySelect()` binding adds grouped remote records, module-colored icons, an explicit
29
+ empty choice, and application-owned command rows without changing the selected-ID contract.
30
+ - **Full launcher parity.** `Launcher` now distinguishes application tiles from record rows,
31
+ exposes current and pinned state, spatial keyboard movement, visible hints, query-state/source
32
+ ordering, and injected icon factories. The optional ZeyOS adapter maps all 29 prototype
33
+ applications, forks/weblets, cached or async recent records, and grouped abortable search while
34
+ leaving permissions, icons, destinations, and routing with the host application.
35
+ - The documentation now has a global destination search, a clearer uppercase green
36
+ Presets/Examples hierarchy, and product-agnostic Xenon positioning. The internal rollout guide
37
+ is no longer shipped or linked from public surfaces.
38
+
39
+ ### Removed
40
+
41
+ - **The separate `AppRail` constructor.** Use `AppSidebar` with `collapsed: true` for a vertical
42
+ rail or `orientation: 'horizontal'` for a horizontal rail. This completes the single-owner
43
+ navigation contract instead of maintaining two public root-DOM models.
44
+ - **Public gx compatibility entry points and bundles.** The compact `__()` DOM builder is part of
45
+ the Zx core; gx adapter source remains repository-internal and is no longer exported, built, or
46
+ included in the npm package.
47
+
48
+ ### Fixed
49
+
50
+ - Late Launcher sources preserve the current keyboard choice only while completing the same query;
51
+ a new query resets to its own best match.
52
+ - Card rejects control-obfuscated unsafe URL schemes; Launcher and every AppSidebar presentation
53
+ strip executable/data destinations and disable inert descriptors. AppSidebar also relocates focus,
54
+ emits its effective collapse state across layout changes, and releases obsolete mode listeners.
55
+ - Card restores an enhanced target after failed construction, releases callbacks when links or
56
+ actions are replaced, and keeps the full non-interactive body inside the primary-link target.
57
+ - Status shortcut hints now activate their options, async permission group loaders cannot be
58
+ disconnected by a filter override, and enhanced billing grids restore every target attribute.
59
+ - Billing totals now distinguish a missing operand from an explicit zero, and Chart renders a
60
+ consistent error state for falsy payloads and errors without a message.
61
+
11
62
  ## 3.0.0 — 2026-08-24
12
63
 
13
64
  ### Added
package/DESIGN-SYSTEM.md CHANGED
@@ -1,8 +1,9 @@
1
- # Xenon design-system audit
1
+ # Xenon Design System
2
2
 
3
- Audit date: 2026-08-24. Xenon is the design system; Zx is its dependency-free JavaScript
4
- implementation. This document records the current coverage against ZeyOS Classic and the work
5
- needed for an incremental adoption that keeps the existing routing and business logic.
3
+ Xenon is a product-agnostic design system for browser applications; Zx is its dependency-free
4
+ JavaScript implementation. It provides shared foundations, accessible components, interaction
5
+ patterns, and application layouts without taking ownership of an application's routing or domain
6
+ logic.
6
7
 
7
8
  ## System boundary
8
9
 
@@ -16,66 +17,48 @@ Xenon has four layers:
16
17
  4. **Application layouts** — rails, bars, workspaces, master/detail, dashboards, inboxes, wizards,
17
18
  and responsive shell geometry.
18
19
 
19
- This separation follows the enterprise-system intent described by the
20
- [Carbon Design System](https://carbondesignsystem.com/all-about-carbon/what-is-carbon/) and
21
- [SAP Fiori design principles](https://experience.sap.com/fiori-design-web/design-principles/),
22
- without copying either system's code, assets, or component contracts.
20
+ This separation keeps foundations, components, patterns, and layouts independently reusable while
21
+ preserving a coherent API and visual language.
23
22
 
24
- Zx currently has more than 50 public component classes, 63 registered documentation/demo entries,
25
- a generated API reference, bundled local icons, and no runtime dependency. The foundations,
26
- component layer, and persistent application shell now cover the first ZeyOS adoption wave; domain
27
- patterns remain intentionally application-owned until their business invariants are specified.
28
-
29
- ## ZeyOS adoption boundary
30
-
31
- ZeyOS Classic does not use `gx`. Across its 30 module files it has roughly 2,500 `UI.*` calls and
32
- 2,600 `PG.*` calls. `PG` already owns navigation, transport, history, exit guards, and page
33
- lifecycle and remains authoritative.
34
-
35
- The existing compact DOM surface has 2,668 executable builder calls: 871 bare `__()` calls, 1,710
36
- parent-returning `parent.__()` calls, and 87 child-returning `parent.$__()` calls. Zx now provides
37
- the exact compact builder plus pure append/property/event helpers. Existing global and prototype
38
- names remain application-owned delegation seams; Zx does not install or replace them.
39
-
40
- Migration therefore replaces `UI.new*` implementations one family at a time, keeps their current
41
- DOM/value contracts until call sites reach zero, and leaves `PG`, `MD`, routes, and server payloads
42
- in place. See [MIGRATION.md](./MIGRATION.md) for the ordering and shell invariants.
23
+ Zx has a generated API reference, live examples, bundled local icons, and no runtime dependency.
24
+ Its compact `__()` DOM builder and pure append/property/event helpers let established applications
25
+ adopt the system without introducing a framework runtime. Domain policy, transport, persistence,
26
+ and navigation remain application-owned.
43
27
 
44
28
  ## Coverage ledger
45
29
 
46
- | Capability in current ZeyOS | Xenon/Zx status | Decision |
30
+ | Front-end capability | Xenon/Zx status | Design-system boundary |
47
31
  | --- | --- | --- |
48
- | Buttons, inputs, toggles, dates, selects, checklists, tags | Covered by public components | Replace `UI.new*` families incrementally and preserve value/event contracts. |
32
+ | Buttons, inputs, toggles, dates, selects, checklists, tags | Covered by public components | Components preserve native semantics and expose consistent value/event contracts. |
49
33
  | Forms and fieldsets | Covered, including component-backed field adapters | Use for record editors; keep validation/business rules application-owned. |
50
34
  | Dialogs, sheets, dropdowns, context menus, tooltips, messages | Covered | Consolidate duplicate menu behavior before building account/launcher surfaces. |
51
35
  | Tabs, panels, toolbar, breadcrumbs, stepper, split view, dock | Covered | Compose layouts; do not let navigation components own routes. |
52
36
  | Sorting, selection, filtering, pagination, trees/finder | Covered | Suitable for generic data screens. |
53
37
  | Editable billing/transaction rows | Covered at generic-grid level | `Grid.BillingItems()` composes typed editable currency/unit columns and flat hierarchy over `Table`. Tax, subtotal, posting, rounding, and persistence stay domain code. |
54
- | Global launcher/search | Covered | `Launcher` combines ranked local applications with abortable grouped sources. ZeyOS still filters the catalogue and resolves selection through `PG`. |
55
- | Account/profile/preferences menu | Covered at presentation level | `Avatar` and `AccountMenu` provide identity and action UI. ZeyOS supplies role-filtered actions and owns preferences, authentication, and logout. |
56
- | Persistent app rail / side navigation | Covered | `AppSidebar` is the expanded vertical tree; minimized `AppRail` uses flyouts in every orientation. Both are route- and persistence-agnostic. |
38
+ | Global launcher/search | Covered | `Launcher` combines an application grid, current/pinned state, recent records, and abortable grouped sources. The optional ZeyOS adapter maps the complete 29-app shell catalogue while the host retains permissions, icons, and routing. |
39
+ | Account/profile/preferences menu | Covered at presentation level | `Avatar` and `AccountMenu` provide identity and action UI. The host supplies permitted actions and owns preferences, authentication, and logout. |
40
+ | Persistent app rail / side navigation | Covered | One route-agnostic `AppSidebar` owns expanded, minimized, and horizontal presentations. Only expanded vertical branches render inline; every rail presentation uses flyouts. |
57
41
  | Charts and analytical summaries | Covered through an adapter | `Chart` is engine-neutral and accessible; `ChartJsAdapter` accepts an injected Chart.js 4 engine. Chart.js is documentation/test tooling only. |
58
42
  | Local product/module icons | Partial | Use bundled icons or registered local assets; do not require the optional remote Font Awesome kit. |
59
- | Domain entity selectors/cards/links | Partial | Build patterns on `Select`, Table, Panel, and ContextMenu after the shell blockers. |
43
+ | Domain entity selectors/cards/links | Covered at generic presentation level | `Card` provides media, native primary links, secondary actions, and metadata; applications own entity routing and policy. |
60
44
  | Persistent notification/activity center | Missing, lower priority | `Message` covers ephemeral feedback, not read/unread activity history. |
61
45
 
62
46
  ### Launcher contract
63
47
 
64
- The current launcher searches applications, recent records, and grouped remote record types. A
65
- replacement supplies pinned-order ranking, request cancellation, Cmd/Ctrl+K, listbox keyboard
66
- behavior, native link metadata, and a cancelable action. Permission filtering, active-route state,
67
- cache and recent-history policy remain inputs from ZeyOS, which resolves actions through `PG.go()`.
68
- The component is deliberately not a second router.
48
+ The launcher searches applications, recent records, and grouped remote record types. The generic
49
+ component supplies the tile/list layouts, pinned-order ranking, current-route marker, request
50
+ cancellation, spatial keyboard movement, visible keyboard hints, native link metadata, and a
51
+ cancelable action. The optional ZeyOS adapter accepts all 29 prototype modules plus forks and
52
+ weblets, cached or async recent items, grouped legacy search payloads, permission/current state,
53
+ and host icon renderers. All state is injected; the adapter reads no shell globals and deliberately
54
+ does not become a second router.
69
55
 
70
56
  ### Account contract
71
57
 
72
- The current account surface includes identity, role-dependent links, language, authentication and
73
- logout, theme and menu-position preferences, and About/version content. A shared `Menu` should
74
- first centralize the keyboard/typeahead/selection behavior currently duplicated by `MenuButton`
75
- and `ContextMenu`; `AccountMenu` then composes that primitive with `Avatar`/`Identity` and emits
76
- actions without owning routes or session state. `AccountMenu` now provides that composition over
77
- `MenuButton`; a future shared low-level `Menu` remains an internal consolidation opportunity, not
78
- an adoption blocker.
58
+ A typical account surface includes identity, role-dependent links, language, authentication and
59
+ logout, preferences, and About/version content. `AccountMenu` composes `Avatar` with the existing
60
+ menu behavior and emits actions without owning routes or session state. The host decides which
61
+ actions exist and what each one does.
79
62
 
80
63
  ## Table and transaction follow-ups
81
64
 
@@ -111,26 +94,3 @@ owns loading/empty/error states, and mirrors its data in an accessible table. Ch
111
94
  default adapter; Frappe Charts remains the lean ERP-oriented alternative, uPlot a specialized
112
95
  time-series candidate, and ECharts an opt-in advanced adapter. Any additional package still
113
96
  requires explicit dependency approval.
114
-
115
- ## Review corrections completed
116
-
117
- - Generated API records no longer let helper typedefs overwrite component options; inline JSDoc
118
- tags are parsed, and audited runtime events are present in types and documentation.
119
- - Form documentation exposes `Form`, `Fieldset`, and `Field`; `MonthPicker` has its own constructor
120
- type.
121
- - Theme Studio destroys registered component instances on every rebuild and describes its honest
122
- family-level coverage.
123
- - Documentation separates Presets from green-accent Examples and uses callable preset names.
124
- - Current source and documentation no longer carry branding from the retired framework experiment.
125
-
126
- ## Recommended sequence
127
-
128
- 1. Ship the Zx runtime and delegate the current compact DOM/event seams; verify no navigation or
129
- listener regressions.
130
- 2. Mount `Launcher`, `Avatar`/`AccountMenu`, and `AppSidebar`/`AppRail` behind the current shell
131
- fixtures, permission filters, and preference store.
132
- 3. Replace high-volume `UI.new*` families, one discriminating fixture set at a time.
133
- 4. Introduce `Grid.BillingItems()` where its generic schema fits; add domain presets only with
134
- formula and rounding fixtures.
135
- 5. Inject Chart.js into `ChartJsAdapter` only on analytical surfaces that need it; keep the engine
136
- out of the base Zx runtime bundle.
package/README.md 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
4
- vanilla-JavaScript implementation. It combines foundations, accessible components, repeatable
5
- workflow patterns, and application layouts in plain ES2022 modules. Source modules run directly in
6
- a browser; the distribution also provides ESM and classic-script bundles. An opt-in compatibility
7
- layer remains available for genuine MooTools-era `gx` applications while they are modernised.
3
+ Xenon is a dependency-free design system for browser applications; Zx is its vanilla-JavaScript
4
+ implementation. It combines foundations, accessible components, repeatable workflow patterns,
5
+ and application layouts in plain ES2022 modules. Source modules run directly in a browser; the
6
+ distribution also provides ESM and classic-script bundles. Xenon originated at ZeyOS, while its
7
+ components and contracts remain product- and framework-agnostic.
8
8
 
9
9
  The [design-system audit](./DESIGN-SYSTEM.md) records current ZeyOS coverage, missing shell
10
10
  patterns, the adoption boundary, transaction-grid follow-ups, and chart-engine candidates.
@@ -41,15 +41,15 @@ For an application built from classic scripts, the IIFE bundle exposes the same
41
41
  </script>
42
42
  ```
43
43
 
44
- Import one component instead of the library when a bundler is doing the work:
44
+ Import a component source module directly when a bundler needs the narrowest possible graph:
45
45
 
46
46
  ```js
47
47
  import { Slider } from '@zeyos/zx/src/components/slider/slider.js';
48
48
  ```
49
49
 
50
- An application using two components bundles 26 kB minified this way against 157 kB through the
51
- package entry point. Load the one stylesheet either way — it is 13 kB gzipped whole, and splitting
52
- it per component costs more than it saves.
50
+ The package also exposes the bundled ESM entry for ordinary named imports. Load the complete
51
+ stylesheet either way: it contains the shared tokens and cross-component states that make the
52
+ system coherent, while JavaScript can still be tree-shaken or imported component by component.
53
53
 
54
54
  TypeScript definitions ship with the package. They are generated from the JSDoc that documents
55
55
  every option, method, and event, so `new Slider(null, { … })` is checked against `SliderOptions`
@@ -99,7 +99,7 @@ ZeyOS binding — see `src/zeyos/modules.js`.
99
99
  | `Toggle` | Native-button switch with a separate submitted value. |
100
100
  | `Search` | Search input with debounced input, submit, and clear events. |
101
101
  | `Launcher` | Cmd/Ctrl+K application and record launcher with ranked local items and abortable grouped sources. |
102
- | `Select` | APG combobox with local or async filtering, pinned fixed items, and priority/permission presets. |
102
+ | `Select` | APG combobox with local or async filtering, pinned items, priority/status/permission presets, and an optional ZeyOS entity picker. |
103
103
  | `Checklist` | Searchable checkbox group with optional async loading. |
104
104
  | `TagPicker` | Multi-select combobox that keeps its selection as removable tags. |
105
105
  | `NumberField` | APG spinbutton with step buttons, ranges, units, and wrapping. |
@@ -158,12 +158,12 @@ ZeyOS binding — see `src/zeyos/modules.js`.
158
158
  | API | Description |
159
159
  | --- | --- |
160
160
  | `Groupbox` | Collapsible section backed by native `<details>`. |
161
+ | `Card` | Semantic content/record surface with media, native title link, actions, and footer. |
161
162
  | `Panel` | Framed, optionally collapsible section with a footer. |
162
163
  | `MasterPanel` | Full-height application panel with fixed header actions and footer. |
163
164
  | `Tabbox` | APG tabs in four appearances, with lazy content, closing, badges, and disabled states. |
164
165
  | `NavigationBar` | Responsive application navigation with optional tab panels and overflow. |
165
- | `AppSidebar` | Expanded vertical application navigation with inline disclosure children. |
166
- | `AppRail` | Minimized vertical/horizontal application navigation with flyout-only descendants. |
166
+ | `AppSidebar` | Expanded or minimized vertical application navigation plus horizontal rails; descendants are inline only while expanded. |
167
167
  | `Toolbar` | APG toolbar: one tab stop, arrow-key movement, and overflow into a menu. |
168
168
  | `SplitView` | Resizable two-pane split with a keyboard-operable separator. |
169
169
  | `Stepper` | Linear multi-step progress with completed, active, and error states. |
@@ -297,7 +297,7 @@ classic-script distribution tests.
297
297
 
298
298
  ```sh
299
299
  npm test # Node unit tests plus semantic-token lint
300
- npm run build # writes ESM, global, compatibility, and CSS assets to dist/
300
+ npm run build # writes ESM, ZeyOS, global, CSS, and declaration assets to dist/
301
301
  npm run build:site # assembles the deployable documentation site into site/
302
302
  npm run serve:site # serves site/ exactly as it will be deployed
303
303
  ```
@@ -313,28 +313,7 @@ import { Table, Message } from '@zeyos/zx';
313
313
  import '@zeyos/zx/zx.css';
314
314
  ```
315
315
 
316
- Additional entry points: `@zeyos/zx/zeyos` (the schema-driven ZeyOS binding), `@zeyos/zx/compat`
317
- (the gx compatibility namespace), and `@zeyos/zx/global` for classic script tags.
316
+ Additional entry points: `@zeyos/zx/zeyos` (the schema-driven ZeyOS binding) and
317
+ `@zeyos/zx/global` for classic script tags.
318
318
 
319
- Documentation lives at <https://zx.zeyos.com>; see `docs/RELEASING.md` for how the site and the
320
- package are published.
321
-
322
- ## `gx` compatibility layer
323
-
324
- During an incremental migration, load the global API before the compatibility bundle:
325
-
326
- ```html
327
- <link rel="stylesheet" href="/assets/zx.css">
328
- <script src="/assets/zx.global.js"></script>
329
- <script src="/assets/zx-compat.global.js"></script>
330
- <script>
331
- // Only for gx-era free functions; an existing ZeyOS __() is preserved:
332
- gx.compat.installGlobals();
333
- </script>
334
- ```
335
-
336
- The compatibility bundle always exposes `window.gx` and installs only the element
337
- `store`/`retrieve`/`eliminate` shim automatically. Legacy globals and prototype conveniences are
338
- an explicit opt-in through `gx.compat.installGlobals()`; it never replaces an existing `__`.
339
- See [MIGRATION.md](./MIGRATION.md) for
340
- class mappings, script replacement, deliberate behavior changes, and unsupported legacy APIs.
319
+ Documentation lives at <https://zx.zeyos.com>.
@@ -1,7 +1,7 @@
1
1
  import { Component } from '../../core/component.js';
2
- import { AppRail } from '../app-rail/app-rail.js';
3
- export type AppNavItem = import('../app-rail/app-rail.js').AppNavItem;
4
- export type AppNavSelectDetail = import('../app-rail/app-rail.js').AppNavSelectDetail;
2
+ import { AppRailPresenter as MinimizedPresenter } from '../../internal/app-rail.js';
3
+ export type AppNavItem = import('../../internal/app-rail.js').AppNavItem;
4
+ export type AppNavSelectDetail = import('../../internal/app-rail.js').AppNavSelectDetail;
5
5
  export type AppSidebarOptions = {
6
6
  /**
7
7
  * Application navigation tree.
@@ -16,13 +16,21 @@ export type AppSidebarOptions = {
16
16
  */
17
17
  expanded?: Array<string | number>;
18
18
  /**
19
- * Whether the minimized AppRail is shown.
19
+ * Whether the minimized presentation is shown.
20
20
  */
21
21
  collapsed?: boolean;
22
22
  /**
23
- * Workspace side.
23
+ * Whether vertical navigation exposes a mode toggle.
24
24
  */
25
- side?: 'left' | 'right';
25
+ collapsible?: boolean;
26
+ /**
27
+ * Navigation flow; horizontal is always minimized.
28
+ */
29
+ orientation?: 'vertical' | 'horizontal';
30
+ /**
31
+ * Workspace edge occupied by navigation.
32
+ */
33
+ side?: 'left' | 'right' | 'top' | 'bottom';
26
34
  /**
27
35
  * Navigation accessible label.
28
36
  */
@@ -40,23 +48,35 @@ export type AppSidebarOptions = {
40
48
  toElement: () => Node | null;
41
49
  } | null;
42
50
  /**
43
- * Minimized rail header content.
51
+ * Minimized leading content.
44
52
  */
45
53
  railHeader?: Node | string | number | {
46
54
  toElement: () => Node | null;
47
55
  } | null;
48
56
  /**
49
- * Minimized rail footer content.
57
+ * Minimized trailing content.
50
58
  */
51
59
  railFooter?: Node | string | number | {
52
60
  toElement: () => Node | null;
53
61
  } | null;
62
+ /**
63
+ * Minimized flyout hover-open delay.
64
+ */
65
+ openDelay?: number;
66
+ /**
67
+ * Minimized flyout crossing grace.
68
+ */
69
+ closeDelay?: number;
70
+ /**
71
+ * Optional host icon renderer.
72
+ */
73
+ renderIcon?: (item: AppNavItem, context: Record<string, any>) => Node | null;
54
74
  /**
55
75
  * Preventable action listener.
56
76
  */
57
77
  onselect?: (event: CustomEvent<AppNavSelectDetail>) => void;
58
78
  /**
59
- * Branch-state listener; bulk replacement reports null state.
79
+ * Branch-state listener.
60
80
  */
61
81
  onbranchchange?: (event: CustomEvent<{
62
82
  item: AppNavItem | null;
@@ -70,58 +90,79 @@ export type AppSidebarOptions = {
70
90
  oncollapsechange?: (event: CustomEvent<{
71
91
  collapsed: boolean;
72
92
  }>) => void;
93
+ /**
94
+ * Minimized flyout-state listener.
95
+ */
96
+ onflyoutchange?: (event: CustomEvent<{
97
+ item: AppNavItem;
98
+ id: string | number;
99
+ open: boolean;
100
+ }>) => void;
73
101
  };
74
- /** @typedef {import('../app-rail/app-rail.js').AppNavItem} AppNavItem */
75
- /** @typedef {import('../app-rail/app-rail.js').AppNavSelectDetail} AppNavSelectDetail */
102
+ /** @typedef {import('../../internal/app-rail.js').AppNavItem} AppNavItem */
103
+ /** @typedef {import('../../internal/app-rail.js').AppNavSelectDetail} AppNavSelectDetail */
76
104
  /**
77
105
  * @typedef {Object} AppSidebarOptions
78
106
  * @property {AppNavItem[]} [items=[]] Application navigation tree.
79
107
  * @property {string|number|null} [active=null] Active item id.
80
108
  * @property {Array<string|number>} [expanded=[]] Initially expanded branch ids.
81
- * @property {boolean} [collapsed=false] Whether the minimized AppRail is shown.
82
- * @property {'left'|'right'} [side='left'] Workspace side.
109
+ * @property {boolean} [collapsed=false] Whether the minimized presentation is shown.
110
+ * @property {boolean} [collapsible=true] Whether vertical navigation exposes a mode toggle.
111
+ * @property {'vertical'|'horizontal'} [orientation='vertical'] Navigation flow; horizontal is always minimized.
112
+ * @property {'left'|'right'|'top'|'bottom'} [side='left'] Workspace edge occupied by navigation.
83
113
  * @property {string} [label='Applications'] Navigation accessible label.
84
114
  * @property {Node|string|number|{toElement: () => Node|null}|null} [header=null] Expanded header content.
85
115
  * @property {Node|string|number|{toElement: () => Node|null}|null} [footer=null] Expanded sticky footer content.
86
- * @property {Node|string|number|{toElement: () => Node|null}|null} [railHeader=null] Minimized rail header content.
87
- * @property {Node|string|number|{toElement: () => Node|null}|null} [railFooter=null] Minimized rail footer content.
116
+ * @property {Node|string|number|{toElement: () => Node|null}|null} [railHeader=null] Minimized leading content.
117
+ * @property {Node|string|number|{toElement: () => Node|null}|null} [railFooter=null] Minimized trailing content.
118
+ * @property {number} [openDelay=80] Minimized flyout hover-open delay.
119
+ * @property {number} [closeDelay=160] Minimized flyout crossing grace.
120
+ * @property {(item: AppNavItem, context: Record<string, any>) => Node|null} [renderIcon] Optional host icon renderer.
88
121
  * @property {(event: CustomEvent<AppNavSelectDetail>) => void} [onselect] Preventable action listener.
89
- * @property {(event: CustomEvent<{item: AppNavItem|null, id: string|number|null, expanded: boolean|null, ids: Array<string|number>}>) => void} [onbranchchange] Branch-state listener; bulk replacement reports null state.
122
+ * @property {(event: CustomEvent<{item: AppNavItem|null, id: string|number|null, expanded: boolean|null, ids: Array<string|number>}>) => void} [onbranchchange] Branch-state listener.
90
123
  * @property {(event: CustomEvent<{collapsed: boolean}>) => void} [oncollapsechange] Presentation-state listener.
124
+ * @property {(event: CustomEvent<{item: AppNavItem, id: string|number, open: boolean}>) => void} [onflyoutchange] Minimized flyout-state listener.
91
125
  */
92
126
  /**
93
- * Expanded vertical application navigation; the only Xenon shell mode with inline descendants.
127
+ * One application navigation component. Vertical expanded descendants render inline; minimized
128
+ * vertical and horizontal descendants use pointer-, focus-, and keyboard-accessible flyouts.
94
129
  * @fires AppSidebar#select
95
130
  * @fires AppSidebar#branchchange
96
131
  * @fires AppSidebar#collapsechange
132
+ * @fires AppSidebar#flyoutchange
97
133
  * @extends {Component<AppSidebarOptions>}
98
134
  */
99
135
  export declare class AppSidebar extends Component<AppSidebarOptions> {
136
+ _rail: MinimizedPresenter;
100
137
  _railExpandButton: HTMLElement;
101
- _rail: AppRail;
102
138
  _createdRoot: boolean;
103
139
  _original: {
104
140
  attributes: string[][];
105
141
  children: ChildNode[];
106
142
  };
107
- _items: import("../app-rail/app-rail.js").AppNavItem[];
143
+ _items: import("../../internal/app-rail.js").AppNavItem[];
108
144
  _active: string | number;
109
145
  _expanded: Set<string>;
110
146
  _collapsed: boolean;
147
+ _orientation: any;
148
+ _side: "bottom" | "left" | "right" | "top";
149
+ _modeAbort: AbortController;
111
150
  static cssName: string;
112
151
  /** @type {Readonly<AppSidebarOptions>} */
113
152
  static defaults: Readonly<AppSidebarOptions>;
114
153
  /**
115
- * Creates or enhances an application-sidebar host.
116
- * @param {Element|string|null} target Sidebar target.
117
- * @param {AppSidebarOptions} [options={}] Sidebar options.
154
+ * Creates or enhances an application-navigation host.
155
+ * @param {Element|string|null} [target=null] Navigation target.
156
+ * @param {AppSidebarOptions} [options={}] Navigation options.
118
157
  */
119
158
  constructor(target?: Element | string | null, options?: AppSidebarOptions);
120
159
  /** @returns {HTMLElement} */
121
160
  render(): HTMLElement;
122
- /** Replaces the navigation tree in both expanded and rail presentations. @param {AppNavItem[]} items @returns {this} */
161
+ /** Replaces the navigation tree in the active presentation. @param {AppNavItem[]} items @returns {this} */
123
162
  setItems(items: AppNavItem[]): this;
124
- /** Sets the active id in both presentations without routing. @param {string|number|null} id @returns {this} */
163
+ /** Returns a shallow copy of normalized items. @returns {AppNavItem[]} */
164
+ getItems(): AppNavItem[];
165
+ /** Sets the active id without routing. @param {string|number|null} id @returns {this} */
125
166
  setActive(id: string | number | null): this;
126
167
  /** Replaces expanded branch ids. @param {Array<string|number>} ids @param {{silent?: boolean}} [options={}] @returns {this} */
127
168
  setExpanded(ids: Array<string | number>, { silent }?: {
@@ -133,30 +174,62 @@ export declare class AppSidebar extends Component<AppSidebarOptions> {
133
174
  toggleBranch(id: string | number, { silent }?: {
134
175
  silent?: boolean;
135
176
  }): this;
136
- /** Shows the expanded sidebar presentation. @param {{silent?: boolean}} [options={}] @returns {this} */
177
+ /** Shows the expanded vertical presentation. @param {{silent?: boolean}} [options={}] @returns {this} */
137
178
  expand(options?: {
138
179
  silent?: boolean;
139
180
  }): this;
140
- /** Shows the minimized AppRail presentation. @param {{silent?: boolean}} [options={}] @returns {this} */
181
+ /** Shows the minimized presentation. @param {{silent?: boolean}} [options={}] @returns {this} */
141
182
  collapse(options?: {
142
183
  silent?: boolean;
143
184
  }): this;
144
- /** Sets expanded/minimized presentation while preserving branch state. @param {boolean} collapsed @param {{silent?: boolean}} [options={}] @returns {this} */
185
+ /** Sets the saved vertical expanded/minimized state. @param {boolean} collapsed @param {{silent?: boolean}} [options={}] @returns {this} */
145
186
  setCollapsed(collapsed: boolean, { silent }?: {
146
187
  silent?: boolean;
147
188
  }): this;
148
- /** Reports whether the rail presentation is active. @returns {boolean} */
189
+ /** Reports the effective presentation state; horizontal navigation is always minimized. @returns {boolean} */
149
190
  isCollapsed(): boolean;
150
- /** Returns the composed minimized rail. @returns {AppRail} */
151
- getRail(): AppRail;
152
- /** Destroys the rail and restores/removes the sidebar host. @returns {void} */
191
+ /**
192
+ * Changes navigation flow/edge without replacing state.
193
+ * @param {{orientation?: 'vertical'|'horizontal', side?: 'left'|'right'|'top'|'bottom'}} layout
194
+ * @param {{silent?: boolean}} [options]
195
+ * @returns {this}
196
+ */
197
+ setLayout(layout?: {
198
+ orientation?: 'vertical' | 'horizontal';
199
+ side?: 'left' | 'right' | 'top' | 'bottom';
200
+ }, { silent }?: {
201
+ silent?: boolean;
202
+ }): this;
203
+ /** Opens a minimized descendant flyout. @param {string|number} id @param {{focus?: boolean}} [options={}] @returns {this} */
204
+ openFlyout(id: string | number, options?: {
205
+ focus?: boolean;
206
+ }): this;
207
+ /** Closes a minimized descendant flyout. @param {string|number} id @returns {this} */
208
+ closeFlyout(id: string | number): this;
209
+ /** Closes every minimized flyout. @returns {this} */
210
+ closeAllFlyouts(): this;
211
+ /** Reports whether a minimized flyout is open. @param {string|number} id @returns {boolean} */
212
+ isFlyoutOpen(id: string | number): boolean;
213
+ /** Focuses the first navigation action. @returns {this} */
214
+ focus(): this;
215
+ /** Destroys flyouts and restores/removes the host. @returns {void} */
153
216
  destroy(): void;
217
+ /** Mounts exactly one expanded tree or minimized flyout presentation. @returns {void} */
218
+ _renderMode(): void;
219
+ /** @returns {void} */
220
+ _renderExpanded(): void;
221
+ /** @returns {void} */
222
+ _renderRail(): void;
223
+ /** @param {EventTarget} target @param {string} type @param {EventListener} listener @returns {void} */
224
+ _listenMode(target: EventTarget, type: string, listener: EventListener): void;
154
225
  /** @returns {void} */
155
226
  _renderTree(): void;
156
227
  /** @param {AppNavItem} item @param {number} level @returns {HTMLElement} */
157
228
  _treeRow(item: AppNavItem, level: number): HTMLElement;
158
- /** Handles dynamic tree controls without retaining detached nodes after a rerender. @param {Event} event @returns {void} */
229
+ /** @param {Event} event @returns {void} */
159
230
  _onTreeClick(event: Event): void;
231
+ /** @param {KeyboardEvent} event @returns {void} */
232
+ _onTreeKeydown(event: KeyboardEvent): void;
160
233
  /** @param {AppNavItem} item @param {Event} event @returns {void} */
161
234
  _select(item: AppNavItem, event: Event): void;
162
235
  /** @returns {void} */
@@ -167,3 +240,4 @@ export declare class AppSidebar extends Component<AppSidebarOptions> {
167
240
  /** Fired when a destination/action is activated. @event AppSidebar#select @type {CustomEvent<AppNavSelectDetail>} */
168
241
  /** Fired when an inline branch changes. @event AppSidebar#branchchange @type {CustomEvent<{item: AppNavItem|null, id: string|number|null, expanded: boolean|null, ids: Array<string|number>}>} */
169
242
  /** Fired when expanded/minimized presentation changes. @event AppSidebar#collapsechange @type {CustomEvent<{collapsed: boolean}>} */
243
+ /** Fired when a minimized flyout changes. @event AppSidebar#flyoutchange @type {CustomEvent<{item: AppNavItem, id: string|number, open: boolean}>} */