@zeyos/zx 5.0.0 → 5.2.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 (154) hide show
  1. package/CHANGELOG.md +164 -0
  2. package/README.md +2 -1
  3. package/dist/types/components/account-menu/account-menu.d.ts +8 -0
  4. package/dist/types/components/activity-list/activity-list.d.ts +9 -1
  5. package/dist/types/components/app-icon/app-icon.d.ts +14 -2
  6. package/dist/types/components/app-sidebar/app-sidebar.d.ts +288 -14
  7. package/dist/types/components/calendar/calendar.d.ts +67 -5
  8. package/dist/types/components/card-view/card-view.d.ts +7 -4
  9. package/dist/types/components/card-view/record-card.d.ts +11 -0
  10. package/dist/types/components/context-menu/context-menu.d.ts +6 -2
  11. package/dist/types/components/data-filter/data-filter.d.ts +4 -4
  12. package/dist/types/components/dropdown/dropdown.d.ts +22 -7
  13. package/dist/types/components/field/field.d.ts +30 -0
  14. package/dist/types/components/fieldset/external-adapter.d.ts +83 -0
  15. package/dist/types/components/fieldset/fieldset.d.ts +7 -0
  16. package/dist/types/components/file-list/file-list.d.ts +35 -3
  17. package/dist/types/components/filter/filter.d.ts +127 -3
  18. package/dist/types/components/filter-panel/filter-panel.d.ts +36 -7
  19. package/dist/types/components/launcher/launcher.d.ts +8 -0
  20. package/dist/types/components/list-toolbar/list-toolbar.d.ts +15 -6
  21. package/dist/types/components/menu-button/menu-button.d.ts +6 -0
  22. package/dist/types/components/message/message.d.ts +14 -1
  23. package/dist/types/components/modal/modal.d.ts +30 -0
  24. package/dist/types/components/module-bar/module-bar.d.ts +395 -0
  25. package/dist/types/components/pagination/pagination.d.ts +17 -3
  26. package/dist/types/components/select/select.d.ts +6 -0
  27. package/dist/types/components/sheet/sheet.d.ts +15 -0
  28. package/dist/types/components/table/table.d.ts +265 -17
  29. package/dist/types/components/view/record-view.d.ts +59 -2
  30. package/dist/types/components/view-settings/view-settings.d.ts +879 -0
  31. package/dist/types/components/workspace-switcher/workspace-switcher.d.ts +327 -0
  32. package/dist/types/core/component.d.ts +12 -2
  33. package/dist/types/core/i18n.d.ts +27 -3
  34. package/dist/types/core/keyboard.d.ts +98 -1
  35. package/dist/types/core/messages.d.ts +382 -0
  36. package/dist/types/core/overlay-host.d.ts +28 -1
  37. package/dist/types/core/overlay-stack.d.ts +260 -0
  38. package/dist/types/index.d.ts +5 -2
  39. package/dist/types/internal/app-rail.d.ts +38 -0
  40. package/dist/types/internal/menu-items.d.ts +71 -3
  41. package/dist/types/zeyos/index.d.ts +1 -0
  42. package/dist/types/zeyos/launcher.d.ts +9 -0
  43. package/dist/types/zeyos/module-bar.d.ts +176 -0
  44. package/dist/types/zeyos/query.d.ts +31 -5
  45. package/dist/types/zeyos/table.d.ts +245 -8
  46. package/dist/types/zeyos/view.d.ts +16 -2
  47. package/dist/zx-zeyos.esm.js +4422 -430
  48. package/dist/zx-zeyos.esm.min.js +5 -5
  49. package/dist/zx.css +1417 -134
  50. package/dist/zx.esm.js +6986 -830
  51. package/dist/zx.esm.min.js +8 -8
  52. package/dist/zx.global.js +6986 -830
  53. package/dist/zx.global.min.js +8 -8
  54. package/dist/zx.min.css +1 -1
  55. package/docs/api.json +794 -17
  56. package/docs/llms.md +503 -63
  57. package/docs/llms.txt +6 -2
  58. package/package.json +1 -1
  59. package/src/components/account-menu/account-menu.js +12 -0
  60. package/src/components/activity-list/activity-list.js +27 -1
  61. package/src/components/app-icon/app-icon.css +13 -2
  62. package/src/components/app-icon/app-icon.js +11 -1
  63. package/src/components/app-rail/app-rail.css +19 -0
  64. package/src/components/app-sidebar/app-sidebar.css +204 -3
  65. package/src/components/app-sidebar/app-sidebar.js +646 -40
  66. package/src/components/breadcrumb/breadcrumb.css +1 -1
  67. package/src/components/calendar/calendar.css +1 -1
  68. package/src/components/calendar/calendar.js +26 -52
  69. package/src/components/card/card.css +2 -2
  70. package/src/components/card-view/card-view.css +5 -5
  71. package/src/components/card-view/card-view.js +13 -9
  72. package/src/components/card-view/record-card.js +14 -3
  73. package/src/components/code-editor/code-editor.css +1 -1
  74. package/src/components/code-editor/field-adapter.js +9 -2
  75. package/src/components/context-menu/context-menu.js +8 -2
  76. package/src/components/copy/copy-input.css +1 -1
  77. package/src/components/data-filter/data-filter.js +2 -2
  78. package/src/components/date-picker/time-picker.css +2 -2
  79. package/src/components/dock/dock.css +5 -4
  80. package/src/components/dropdown/dropdown.js +157 -72
  81. package/src/components/field/field.js +33 -3
  82. package/src/components/fieldset/external-adapter.js +363 -0
  83. package/src/components/fieldset/fieldset.js +10 -59
  84. package/src/components/file-list/file-list.js +144 -21
  85. package/src/components/filter/filter.css +86 -2
  86. package/src/components/filter/filter.js +300 -8
  87. package/src/components/filter-panel/filter-panel.js +149 -32
  88. package/src/components/finder/finder.css +1 -1
  89. package/src/components/kanban-view/kanban-view.css +3 -3
  90. package/src/components/kanban-view/kanban-view.js +5 -2
  91. package/src/components/launcher/launcher.css +1 -1
  92. package/src/components/launcher/launcher.js +29 -3
  93. package/src/components/list-toolbar/list-toolbar.js +39 -13
  94. package/src/components/master-panel/master-panel.js +0 -1
  95. package/src/components/menu-button/menu-button.css +63 -0
  96. package/src/components/menu-button/menu-button.js +97 -11
  97. package/src/components/message/message.js +60 -20
  98. package/src/components/modal/modal.css +1 -1
  99. package/src/components/modal/modal.js +66 -13
  100. package/src/components/module-bar/module-bar.css +486 -0
  101. package/src/components/module-bar/module-bar.js +1074 -0
  102. package/src/components/multi-value-editor/multi-value-editor.css +1 -1
  103. package/src/components/number-field/field-adapter.js +2 -1
  104. package/src/components/pagination/pagination.css +5 -5
  105. package/src/components/pagination/pagination.js +20 -4
  106. package/src/components/panel/panel.css +3 -2
  107. package/src/components/questionnaire/questionnaire.css +4 -4
  108. package/src/components/rating/field-adapter.js +2 -1
  109. package/src/components/rating/rating.css +1 -1
  110. package/src/components/search/search.css +4 -1
  111. package/src/components/select/select.js +9 -0
  112. package/src/components/sheet/sheet.css +1 -1
  113. package/src/components/sheet/sheet.js +74 -32
  114. package/src/components/slider/field-adapter.js +6 -1
  115. package/src/components/slider/slider.css +2 -2
  116. package/src/components/split-view/split-view.css +1 -1
  117. package/src/components/stat-tile/stat-tile.css +1 -1
  118. package/src/components/stepper/stepper.css +1 -1
  119. package/src/components/tabbox/tabbox.css +9 -5
  120. package/src/components/table/table.css +86 -11
  121. package/src/components/table/table.js +628 -57
  122. package/src/components/tag-picker/field-adapter.js +2 -1
  123. package/src/components/tooltip/tooltip.js +35 -17
  124. package/src/components/tree/tree.css +1 -1
  125. package/src/components/view/record-view.css +1 -1
  126. package/src/components/view/record-view.js +178 -18
  127. package/src/components/view-settings/view-settings.css +285 -0
  128. package/src/components/view-settings/view-settings.js +1830 -0
  129. package/src/components/workspace-switcher/workspace-switcher.css +188 -0
  130. package/src/components/workspace-switcher/workspace-switcher.js +463 -0
  131. package/src/core/component.js +88 -17
  132. package/src/core/fontawesome.js +5 -1
  133. package/src/core/i18n.js +47 -4
  134. package/src/core/icons.js +12 -2
  135. package/src/core/keyboard.js +206 -11
  136. package/src/core/messages.js +427 -0
  137. package/src/core/overlay-host.js +64 -9
  138. package/src/core/overlay-stack.js +487 -0
  139. package/src/core/position.js +22 -3
  140. package/src/index.js +5 -2
  141. package/src/internal/app-rail.js +134 -53
  142. package/src/internal/menu-items.js +61 -3
  143. package/src/zeyos/form.js +5 -3
  144. package/src/zeyos/index.js +3 -0
  145. package/src/zeyos/launcher.js +8 -3
  146. package/src/zeyos/module-bar.js +181 -0
  147. package/src/zeyos/query.js +44 -13
  148. package/src/zeyos/table.js +220 -80
  149. package/src/zeyos/view.js +43 -93
  150. package/styles/base.css +16 -1
  151. package/styles/print.css +1 -1
  152. package/styles/tokens/dark.css +4 -0
  153. package/styles/tokens/semantic.css +56 -28
  154. package/styles/zx.css +3 -0
@@ -184,8 +184,14 @@ export declare class Message extends Component<MessageOptions> {
184
184
  children: Node[];
185
185
  };
186
186
  _entries: Set<any>;
187
- /** @type {Element|null} The overlay host this instance is the floating region of; null when inline. */
187
+ /** @type {Element|null} The theme scope this instance is the floating region of; null when inline. */
188
188
  _floatingHost: Element | null;
189
+ /** @type {Element|null} Where the floating region was last put: its scope, or the topmost modal. */
190
+ _placedIn: Element | null;
191
+ /** @type {import('../../core/overlay-stack.js').OverlayHandle|null} The region's toast entry. */
192
+ _overlay: import('../../core/overlay-stack.js').OverlayHandle | null;
193
+ /** @type {(() => void)|null} Stops following the overlay stack. */
194
+ _unfollow: (() => void) | null;
189
195
  _queue: MessageQueue<any>;
190
196
  _cleaned: boolean;
191
197
  static cssName: string;
@@ -293,6 +299,13 @@ export declare class Message extends Component<MessageOptions> {
293
299
  * @returns {void}
294
300
  */
295
301
  _releaseIfEmpty(): void;
302
+ /**
303
+ * Puts a floating region where it can be seen and used: inside the topmost open modal dialog
304
+ * while one is open — outside it, `showModal()` would leave every toast unclickable — and in its
305
+ * own theme scope otherwise. Re-showing it after a move puts it back on top of the top layer.
306
+ * @returns {void}
307
+ */
308
+ _rehome(): void;
296
309
  /**
297
310
  * Destroys a floating region and removes its element.
298
311
  * @returns {void}
@@ -110,6 +110,36 @@ export declare class Modal extends Component<ModalOptions> {
110
110
  * @returns {void}
111
111
  */
112
112
  _present(): void;
113
+ /**
114
+ * Describes the current presentation for the overlay stack, or returns null to stay off it.
115
+ *
116
+ * The kind is read from the platform like `aria-modal` is: a `showModal()` dialog is `modal`,
117
+ * and its Escape and backdrop stay the browser's; anything else is `non-modal`, and a subclass
118
+ * presenting that way adds the Escape and outside-press handling it wants.
119
+ * @returns {import('../../core/overlay-stack.js').OverlayEntryOptions|null}
120
+ * @protected
121
+ */
122
+ protected _overlayEntry(): import('../../core/overlay-stack.js').OverlayEntryOptions | null;
123
+ /**
124
+ * Re-registers the current presentation on the overlay stack: called after every presentation,
125
+ * including a subclass's change of address that bypasses `open()`.
126
+ * @returns {void}
127
+ * @protected
128
+ */
129
+ protected _syncOverlay(): void;
130
+ /**
131
+ * Takes the overlay off the stack. Safe to call repeatedly.
132
+ * @returns {void}
133
+ * @protected
134
+ */
135
+ protected _releaseOverlay(): void;
136
+ /**
137
+ * Whether a node is inside this overlay or anything opened from it, as the overlay stack sees it.
138
+ * @param {Node|null|undefined} node Candidate.
139
+ * @returns {boolean}
140
+ * @protected
141
+ */
142
+ protected _overlayContains(node: Node | null | undefined): boolean;
113
143
  /**
114
144
  * Hides the current presentation and records which generation its queued close event belongs to.
115
145
  * @param {string} [result=''] Native string return value.
@@ -0,0 +1,395 @@
1
+ import { AppRailPresenter } from '../../internal/app-rail.js';
2
+ import { Dropdown } from '../dropdown/dropdown.js';
3
+ import { Tooltip } from '../tooltip/tooltip.js';
4
+ export type AppNavItem = import('../../internal/app-rail.js').AppNavItem;
5
+ export type AppNavSelectDetail = import('../../internal/app-rail.js').AppNavSelectDetail;
6
+ export type ModuleTone = import('../app-icon/app-icon.js').AppIconTone;
7
+ export type ModuleItem = {
8
+ /**
9
+ * Stable module identifier.
10
+ */
11
+ id: string | number;
12
+ /**
13
+ * Module name: the tile's accessible name, tooltip, and catalogue label.
14
+ */
15
+ label: string;
16
+ /**
17
+ * Icon name, node, component, or factory.
18
+ */
19
+ icon?: string | Node | {
20
+ toElement: () => Node | null;
21
+ } | ((context: Record<string, any>, item: AppNavItem) => Node | null);
22
+ /**
23
+ * Identity colour from the theme's categorical tones.
24
+ */
25
+ tone?: ModuleTone;
26
+ /**
27
+ * Identity colour as any CSS colour; takes precedence over `tone`.
28
+ */
29
+ color?: string;
30
+ /**
31
+ * Count or status badge.
32
+ */
33
+ badge?: string | number;
34
+ /**
35
+ * Shown on the bar, in this order when a number. When no
36
+ * module sets it, every module is on the bar; otherwise unpinned modules are in "All modules" only.
37
+ */
38
+ pinned?: boolean | number;
39
+ /**
40
+ * Group heading in the "All modules" catalogue.
41
+ */
42
+ group?: string;
43
+ /**
44
+ * Secondary text, shown as the catalogue entry's title.
45
+ */
46
+ description?: string;
47
+ /**
48
+ * Emitted value; defaults to `id`.
49
+ */
50
+ value?: unknown;
51
+ /**
52
+ * Native navigation target for a module without a menu.
53
+ */
54
+ href?: string;
55
+ /**
56
+ * Native link browsing context.
57
+ */
58
+ target?: string;
59
+ /**
60
+ * Application-owned non-link action.
61
+ */
62
+ invoke?: () => void;
63
+ /**
64
+ * Whether activation is unavailable.
65
+ */
66
+ disabled?: boolean;
67
+ /**
68
+ * The module's menu. With `menus: 'flyout'` it opens beside
69
+ * the tile; it never renders inline.
70
+ */
71
+ children?: AppNavItem[];
72
+ };
73
+ export type ModuleBarOptions = {
74
+ /**
75
+ * Modules, in bar order.
76
+ */
77
+ items?: ModuleItem[];
78
+ /**
79
+ * Active destination id: a module, or any item in a module's menu.
80
+ */
81
+ active?: string | number | null;
82
+ /**
83
+ * Bar flow.
84
+ */
85
+ orientation?: 'vertical' | 'horizontal';
86
+ /**
87
+ * Workspace edge the bar occupies.
88
+ */
89
+ side?: 'left' | 'right' | 'top' | 'bottom';
90
+ /**
91
+ * Tile treatment: the glyph in the module
92
+ * colour on a tint of it, the solid identity tile, or monochrome glyphs.
93
+ */
94
+ appearance?: 'tint' | 'solid' | 'plain';
95
+ /**
96
+ * Whether a vertical bar prints each
97
+ * module's name: under its tile (a narrow strip), beside it (a full navigation column, with the
98
+ * count at the end of the row), or not at all — the name then stays the accessible name and the
99
+ * tooltip. Horizontal bars never print names.
100
+ */
101
+ labels?: 'hidden' | 'below' | 'beside';
102
+ /**
103
+ * How a module's children are presented: in a flyout,
104
+ * or by an adjacent panel the application owns, in which case activating the module emits `select`.
105
+ */
106
+ menus?: 'flyout' | 'none';
107
+ /**
108
+ * With `menus: 'none'`, the module whose menu the
109
+ * adjacent panel shows.
110
+ */
111
+ expanded?: string | number | null;
112
+ /**
113
+ * With `menus: 'none'`, the id of that panel.
114
+ */
115
+ controls?: string | null;
116
+ /**
117
+ * The "All modules" button: shown when a
118
+ * module does not fit or is unpinned, always, or never (the bar then scrolls).
119
+ */
120
+ allModules?: 'auto' | 'always' | 'never';
121
+ /**
122
+ * Leading content, such as a product mark.
123
+ */
124
+ header?: Node | string | number | {
125
+ toElement: () => Node | null;
126
+ } | null;
127
+ /**
128
+ * Trailing content, such as an account menu.
129
+ */
130
+ footer?: Node | string | number | {
131
+ toElement: () => Node | null;
132
+ } | null;
133
+ /**
134
+ * Navigation accessible label. Omitted resolves `moduleBar.label`, English `Modules`.
135
+ */
136
+ label?: string | null;
137
+ /**
138
+ * Flyout hover-open delay in milliseconds.
139
+ */
140
+ openDelay?: number;
141
+ /**
142
+ * Flyout pointer and focus crossing grace in milliseconds.
143
+ */
144
+ closeDelay?: number;
145
+ /**
146
+ * Optional host icon renderer.
147
+ */
148
+ renderIcon?: (item: AppNavItem, context: Record<string, any>) => Node | null;
149
+ /**
150
+ * Preventable activation listener.
151
+ */
152
+ onselect?: (event: CustomEvent<AppNavSelectDetail>) => void;
153
+ /**
154
+ * Flyout-state listener.
155
+ */
156
+ onflyoutchange?: (event: CustomEvent<{
157
+ item: AppNavItem;
158
+ id: string | number;
159
+ open: boolean;
160
+ }>) => void;
161
+ /**
162
+ * Overflow listener.
163
+ */
164
+ onoverflowchange?: (event: CustomEvent<{
165
+ visible: Array<string | number>;
166
+ overflow: Array<string | number>;
167
+ }>) => void;
168
+ /**
169
+ * "All modules" catalogue open-state listener.
170
+ */
171
+ onallmodules?: (event: CustomEvent<{
172
+ open: boolean;
173
+ }>) => void;
174
+ };
175
+ /**
176
+ * The module level of an application: one colour-coded tile per module in a vertical strip or a
177
+ * horizontal bar. A module with a menu opens it in a flyout, or leaves it to an adjacent panel
178
+ * (`menus: 'none'`, which is how `AppSidebar` composes the bar). Modules that do not fit, or are
179
+ * not pinned, are one step away in the "All modules" catalogue. The bar is one Tab stop: arrow
180
+ * keys, Home, End, and type-ahead move between tiles.
181
+ * @fires ModuleBar#select
182
+ * @fires ModuleBar#flyoutchange
183
+ * @fires ModuleBar#overflowchange
184
+ * @fires ModuleBar#allmodules
185
+ * @extends {AppRailPresenter}
186
+ */
187
+ export declare class ModuleBar extends AppRailPresenter {
188
+ _sections: Map<any, any>;
189
+ _appearance: any;
190
+ _menus: string;
191
+ _expandedId: any;
192
+ _labels: any;
193
+ _promoted: string | number;
194
+ _catalogue: Dropdown;
195
+ _silenceCatalogue: boolean;
196
+ _catalogueTooltip: Tooltip;
197
+ _observer: ResizeObserver;
198
+ _partition: {
199
+ visible: any[];
200
+ overflow: any[];
201
+ } | {
202
+ visible: (string | number)[];
203
+ overflow: (string | number)[];
204
+ };
205
+ _rovingId: string;
206
+ _typeahead: any;
207
+ static cssName: string;
208
+ static partBlock: string;
209
+ /** @type {Readonly<ModuleBarOptions>} */
210
+ static defaults: Readonly<ModuleBarOptions>;
211
+ /**
212
+ * Creates or enhances a module bar.
213
+ * @param {Element|string|null} [target=null] Bar target; a `<nav>` is created when null.
214
+ * @param {ModuleBarOptions} [options={}] Bar options.
215
+ */
216
+ constructor(target?: Element | string | null, options?: ModuleBarOptions);
217
+ /** @returns {HTMLElement} */
218
+ render(): HTMLElement;
219
+ /** Replaces the modules and rebuilds the bar. @param {ModuleItem[]} items @returns {this} */
220
+ setItems(items: ModuleItem[]): this;
221
+ /** Returns a copy of the normalized modules. @returns {ModuleItem[]} */
222
+ getItems(): ModuleItem[];
223
+ /**
224
+ * Marks the active destination — a module, or anything in a module's menu — without routing.
225
+ * The module holding it becomes current and stays on the bar.
226
+ * @param {string|number|null} id Destination id.
227
+ * @returns {this}
228
+ */
229
+ setActive(id: string | number | null): this;
230
+ /** Opens a module's menu flyout. @param {string|number} id Module id. @param {{focus?: boolean}} [options={}] Focus its first item. @returns {this} */
231
+ openFlyout(id: string | number, options?: {
232
+ focus?: boolean;
233
+ }): this;
234
+ /** Closes a module's menu flyout. @param {string|number} id Module id. @returns {this} */
235
+ closeFlyout(id: string | number): this;
236
+ /** Closes every menu flyout. @returns {this} */
237
+ closeAllFlyouts(): this;
238
+ /** Reports whether a module's menu flyout is open. @param {string|number} id Module id. @returns {boolean} */
239
+ isFlyoutOpen(id: string | number): boolean;
240
+ /**
241
+ * With `menus: 'none'`, names the module whose menu the adjacent panel now shows.
242
+ * @param {string|number|null} id Module id, or null when the panel shows none.
243
+ * @returns {this}
244
+ */
245
+ setExpanded(id: string | number | null): this;
246
+ /**
247
+ * Updates one badge in place — on the tile, in a flyout, and in the catalogue — without
248
+ * rebuilding the bar. `null` removes it.
249
+ * @param {string|number} id Module or menu item id.
250
+ * @param {string|number|null} badge New badge.
251
+ * @returns {this}
252
+ */
253
+ setBadge(id: string | number, badge: string | number | null): this;
254
+ /**
255
+ * Changes flow or edge, keeping items, the active destination, and the expanded module.
256
+ * @param {{orientation?: 'vertical'|'horizontal', side?: 'left'|'right'|'top'|'bottom'}} layout
257
+ * @returns {this}
258
+ */
259
+ setLayout(layout?: {
260
+ orientation?: 'vertical' | 'horizontal';
261
+ side?: 'left' | 'right' | 'top' | 'bottom';
262
+ }): this;
263
+ /**
264
+ * Changes whether module names are printed — the expanded and collapsed states of a vertical
265
+ * navigation column — keeping items, the active destination, and the expanded module.
266
+ * @param {'hidden'|'below'|'beside'} labels
267
+ * @returns {this}
268
+ */
269
+ setLabels(labels: 'hidden' | 'below' | 'beside'): this;
270
+ /** Opens the "All modules" catalogue and focuses its filter or first entry. @returns {this} */
271
+ openAllModules(): this;
272
+ /** Closes the "All modules" catalogue. @returns {this} */
273
+ closeAllModules(): this;
274
+ /** Reports whether the "All modules" catalogue is open. @returns {boolean} */
275
+ isAllModulesOpen(): boolean;
276
+ /** Focuses the bar's Tab stop: the current module, else the first tile. @returns {this} */
277
+ focus(): this;
278
+ /** Destroys flyouts, tooltips, and the catalogue, and restores or removes the root. @returns {void} */
279
+ destroy(): void;
280
+ /** @param {Node|null} node @returns {boolean} @private */
281
+ private _containsNode;
282
+ /** @returns {void} */
283
+ _clearArtifacts(): void;
284
+ /** @param {AppNavItem} item @returns {boolean} */
285
+ _flyoutsFor(item: AppNavItem): boolean;
286
+ /** @returns {boolean} */
287
+ _tooltipFor(): boolean;
288
+ /** @param {AppNavItem} item @returns {HTMLElement} */
289
+ _renderControl(item: AppNavItem): HTMLElement;
290
+ /** @returns {void} */
291
+ _afterRebuild(): void;
292
+ /** @returns {void} */
293
+ _syncActive(): void;
294
+ /**
295
+ * Shows the tiles that fit, in bar order, and moves the rest behind "All modules". Everything is
296
+ * shown first so a bar sized by its content measures as not overflowing and never shrinks itself.
297
+ * @returns {void}
298
+ */
299
+ _layout(): void;
300
+ /** @param {AppNavItem} item @param {'bar'|'catalogue'} location @returns {HTMLElement} */
301
+ _renderTile(item: AppNavItem, location: 'bar' | 'catalogue'): HTMLElement;
302
+ /** @param {HTMLElement} control @param {AppNavItem} item @returns {void} */
303
+ _applyTileBadge(control: HTMLElement, item: AppNavItem): void;
304
+ /** Builds the "All modules" button and its catalogue for this render. @returns {void} */
305
+ _buildCatalogue(): void;
306
+ /**
307
+ * Leave exactly one visible catalogue entry in the Tab order: `preferred`, else the current stop,
308
+ * else the current module, else the first entry the filter shows.
309
+ * @param {HTMLElement} [preferred]
310
+ * @returns {void}
311
+ */
312
+ _syncCatalogueStop(preferred?: HTMLElement): void;
313
+ /** @param {AppNavItem} item @returns {HTMLElement} */
314
+ _catalogueControl(item: AppNavItem): HTMLElement;
315
+ /** @param {MouseEvent|Event} event @returns {void} */
316
+ _onCatalogueClick(event: MouseEvent | Event): void;
317
+ /** @param {KeyboardEvent} event @returns {void} */
318
+ _onCatalogueKeydown(event: KeyboardEvent): void;
319
+ /** @param {string} query @returns {void} */
320
+ _filterCatalogue(query: string): void;
321
+ /** @returns {void} */
322
+ _focusCatalogue(): void;
323
+ /** @param {KeyboardEvent} event @returns {void} */
324
+ _onRailKeydown(event: KeyboardEvent): void;
325
+ /** @param {string} key @param {HTMLElement[]} controls @param {number} index @returns {HTMLElement|null} */
326
+ _typeaheadTarget(key: string, controls: HTMLElement[], index: number): HTMLElement | null;
327
+ /** @returns {HTMLElement[]} Every module tile, shown or not. */
328
+ _tiles(): HTMLElement[];
329
+ /** @returns {HTMLElement[]} The tiles and button the arrow keys move between, in bar order. */
330
+ _rovingControls(): HTMLElement[];
331
+ /** @returns {HTMLElement|null} */
332
+ _rovingStop(): HTMLElement | null;
333
+ /** @param {HTMLElement} control @returns {void} */
334
+ _setRovingStop(control: HTMLElement): void;
335
+ /** @returns {void} */
336
+ _syncRoving(): void;
337
+ /** @returns {void} */
338
+ _syncExpanded(): void;
339
+ /** @returns {HTMLElement[]} */
340
+ _catalogueEntries(): HTMLElement[];
341
+ /** @param {string} id @returns {HTMLElement|null} */
342
+ _catalogueEntry(id: string): HTMLElement | null;
343
+ /** @returns {string} */
344
+ _labelText(): string;
345
+ }
346
+ /**
347
+ * Splits modules into those the bar shows and those only "All modules" offers.
348
+ *
349
+ * Bar order is pinned modules first — by their pinned number, then as listed — and the rest as
350
+ * listed. When any module is pinned, unpinned modules go to the catalogue. When the bar cannot
351
+ * hold every candidate, one slot goes to the "All modules" button. Modules named in `keep` (the
352
+ * current module, the module an adjacent panel shows) stay on the bar whatever their pin or
353
+ * position, displacing the last module that is not kept.
354
+ * @param {ModuleItem[]} items Modules.
355
+ * @param {number} [capacity=Infinity] Slots the bar has room for, the button included.
356
+ * @param {Array<string|number|null|undefined>|string|number|null} [keep=[]] Module ids that must stay visible.
357
+ * @param {boolean} [reserve=false] Keep a slot for the button even when every module fits.
358
+ * @returns {{visible: ModuleItem[], overflow: ModuleItem[], more: boolean}}
359
+ */
360
+ export declare function partitionModules(items: ModuleItem[], capacity?: number, keep?: Array<string | number | null | undefined> | string | number | null, reserve?: boolean): {
361
+ visible: ModuleItem[];
362
+ overflow: ModuleItem[];
363
+ more: boolean;
364
+ };
365
+ /**
366
+ * Resolves a module's identity colour: a valid CSS `color` wins, then a known `tone`.
367
+ * @param {{tone?: unknown, color?: unknown}} item Module.
368
+ * @returns {{tone: ModuleTone|null, color: string|null}}
369
+ */
370
+ export declare function resolveModuleColor(item: {
371
+ tone?: unknown;
372
+ color?: unknown;
373
+ }): {
374
+ tone: ModuleTone | null;
375
+ color: string | null;
376
+ };
377
+ /**
378
+ * Modules are one level: a section contributes its modules, and remembers itself as their heading.
379
+ * @param {AppNavItem[]} items Normalized items.
380
+ * @param {Map<string, string>} [sections] Filled with each sectioned module's heading.
381
+ * @param {string|null} [heading=null] The section being lifted.
382
+ * @returns {AppNavItem[]}
383
+ */
384
+ export declare function liftSections(items: AppNavItem[], sections?: Map<string, string>, heading?: string | null): AppNavItem[];
385
+ /**
386
+ * The top-level module that is, or contains, an id.
387
+ * @param {AppNavItem[]} items Modules.
388
+ * @param {string|number|null|undefined} id Destination id.
389
+ * @returns {AppNavItem|null}
390
+ */
391
+ export declare function moduleOf(items: AppNavItem[], id: string | number | null | undefined): AppNavItem | null;
392
+ /** Fired when a module without a menu, a menu item, or (with `menus: 'none'`) any module is activated. @event ModuleBar#select @type {CustomEvent<AppNavSelectDetail>} */
393
+ /** Fired when a module's flyout opens or closes. @event ModuleBar#flyoutchange @type {CustomEvent<{item: AppNavItem, id: string|number, open: boolean}>} */
394
+ /** Fired when the modules on the bar change because of space, pins, or the current module. @event ModuleBar#overflowchange @type {CustomEvent<{visible: Array<string|number>, overflow: Array<string|number>}>} */
395
+ /** Fired when the "All modules" catalogue opens or closes. @event ModuleBar#allmodules @type {CustomEvent<{open: boolean}>} */
@@ -138,9 +138,23 @@ export type PaginationChangeDetail = PaginationState;
138
138
  /** @typedef {PaginationState} PaginationChangeDetail */
139
139
  /**
140
140
  * The pager for a server-backed list. It owns no data: it reports which slice the user asked for
141
- * and lets the application fetch it, which is exactly the shape `zeyosTable()` expects —
142
- * `offset`/`pageSize` for `load()` in `pages` mode, or one `change` per `loadMore()` in
143
- * `loadmore` mode.
141
+ * — `page`, `pageSize`, and the zero-based row `offset = (page - 1) * pageSize` — and lets the
142
+ * application fetch it.
143
+ *
144
+ * The pager is one-based and defaults to 25 rows per page. The ZeyOS bindings are zero-based,
145
+ * default to 50 rows, and append pages above zero unless told to replace, so connecting the two
146
+ * takes a small mapping rather than a direct hand-off:
147
+ *
148
+ * ```js
149
+ * const binding = zeyosTable(client, 'contacts', { pageSize: 25 });
150
+ * const pager = new Pagination(host, { pageSize: binding.pageSize });
151
+ * pager.on('change', async ({ detail }) => {
152
+ * const result = await binding.load({ page: detail.page - 1, pageSize: detail.pageSize, replace: true });
153
+ * pager.setTotal(result.count ?? 0);
154
+ * });
155
+ * ```
156
+ *
157
+ * In `loadmore` mode each `change` stands for one `binding.loadMore()`, which appends.
144
158
  *
145
159
  * `page` is clamped into `[1, pages]` after every state change, so shrinking `total` under the
146
160
  * user's feet can never leave the pager pointing past the end of the data.
@@ -227,6 +227,12 @@ export declare class Select extends Component<SelectOptions> {
227
227
  get value(): unknown;
228
228
  /** @param {unknown} id Selected item ID. */
229
229
  set value(id: unknown);
230
+ /**
231
+ * Returns the selected item ID, or null: the same as reading `value`, under the `get()`/`set()`
232
+ * pair the other value components share.
233
+ * @returns {unknown}
234
+ */
235
+ get(): unknown;
230
236
  /** Selected item, or null. @returns {SelectItem|null} */
231
237
  get selected(): SelectItem | null;
232
238
  /**
@@ -172,6 +172,8 @@ export type SheetOptions = {
172
172
  export declare class Sheet extends Dialog {
173
173
  #private;
174
174
  _dock: any;
175
+ /** @type {Element|null} The element focus was on when the current `open()` began. */
176
+ _openedFrom: Element | null;
175
177
  static cssName: string;
176
178
  /** @type {Readonly<SheetOptions>} */
177
179
  static defaults: Readonly<SheetOptions>;
@@ -229,6 +231,19 @@ export declare class Sheet extends Dialog {
229
231
  * @returns {void}
230
232
  */
231
233
  _rehost(): void;
234
+ /**
235
+ * Describes the presentation for the overlay stack. A docked sheet is part of the layout and
236
+ * stays off it.
237
+ *
238
+ * Escape and outside-click are free for a modal dialog and absent for a non-modal one — the
239
+ * browser only wires `cancel` for `showModal()`, and there is no `::backdrop` to click — so a
240
+ * floating non-modal sheet takes both from the stack. That is what makes it aware of what it
241
+ * opened: Escape reaches it only once no popup above it takes the key, and a press inside a menu
242
+ * anchored in the sheet counts as inside the sheet, wherever the menu's panel lives.
243
+ * @returns {import('../../core/overlay-stack.js').OverlayEntryOptions|null}
244
+ * @protected
245
+ */
246
+ protected _overlayEntry(): import('../../core/overlay-stack.js').OverlayEntryOptions | null;
232
247
  /**
233
248
  * Opens the sheet, trapping focus first where the modality asks for it.
234
249
  * @returns {this}