@zeyos/zx 4.3.4 → 5.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 (231) hide show
  1. package/CHANGELOG.md +438 -0
  2. package/README.md +49 -10
  3. package/dist/types/components/activity-item/activity-item.d.ts +351 -0
  4. package/dist/types/components/activity-list/activity-list.d.ts +217 -0
  5. package/dist/types/components/app-sidebar/app-sidebar.d.ts +33 -3
  6. package/dist/types/components/avatar/avatar.d.ts +46 -7
  7. package/dist/types/components/badge/badge.d.ts +21 -1
  8. package/dist/types/components/button/button.d.ts +23 -0
  9. package/dist/types/components/calendar/calendar.d.ts +19 -0
  10. package/dist/types/components/card/card.d.ts +7 -0
  11. package/dist/types/components/card-view/card-view.d.ts +11 -3
  12. package/dist/types/components/card-view/record-card.d.ts +7 -1
  13. package/dist/types/components/chart/chart.d.ts +10 -0
  14. package/dist/types/components/checklist/checklist.d.ts +9 -0
  15. package/dist/types/components/code-editor/code-editor.d.ts +149 -0
  16. package/dist/types/components/code-editor/field-adapter.d.ts +5 -0
  17. package/dist/types/components/context-menu/context-menu.d.ts +18 -2
  18. package/dist/types/components/date-picker/date-picker.d.ts +8 -0
  19. package/dist/types/components/date-picker/time-picker.d.ts +7 -0
  20. package/dist/types/components/datebox/date-range-box.d.ts +5 -1
  21. package/dist/types/components/datebox/datebox.d.ts +7 -2
  22. package/dist/types/components/dialog/dialog.d.ts +75 -6
  23. package/dist/types/components/dropdown/dropdown.d.ts +2 -2
  24. package/dist/types/components/entity-ref/entity-ref.d.ts +331 -0
  25. package/dist/types/components/field/field.d.ts +24 -2
  26. package/dist/types/components/fieldset/fieldset.d.ts +19 -1
  27. package/dist/types/components/file-item/file-item.d.ts +262 -0
  28. package/dist/types/components/file-list/file-list.d.ts +171 -0
  29. package/dist/types/components/filter/filter.d.ts +91 -36
  30. package/dist/types/components/filter-panel/filter-panel.d.ts +449 -0
  31. package/dist/types/components/form/form.d.ts +12 -1
  32. package/dist/types/components/kanban-view/kanban-card.d.ts +146 -0
  33. package/dist/types/components/kanban-view/kanban-view.d.ts +170 -4
  34. package/dist/types/components/launcher/launcher.d.ts +278 -26
  35. package/dist/types/components/list-toolbar/list-toolbar.d.ts +599 -0
  36. package/dist/types/components/menu-button/menu-button.d.ts +37 -42
  37. package/dist/types/components/message/message.d.ts +126 -17
  38. package/dist/types/components/modal/modal.d.ts +61 -2
  39. package/dist/types/components/navigation-bar/navigation-bar.d.ts +105 -21
  40. package/dist/types/components/panel/panel.d.ts +7 -0
  41. package/dist/types/components/search/search.d.ts +7 -0
  42. package/dist/types/components/select/color.d.ts +12 -0
  43. package/dist/types/components/select/glyphs.d.ts +124 -0
  44. package/dist/types/components/select/select.d.ts +15 -3
  45. package/dist/types/components/sort-control/sort-control.d.ts +105 -0
  46. package/dist/types/components/stat-tile/stat-tile.d.ts +288 -0
  47. package/dist/types/components/tabbox/tabbox.d.ts +16 -0
  48. package/dist/types/components/table/table.d.ts +190 -1
  49. package/dist/types/components/table-view/table-view.d.ts +11 -5
  50. package/dist/types/components/tag-picker/tag-picker.d.ts +21 -4
  51. package/dist/types/components/timebox/timebox.d.ts +7 -0
  52. package/dist/types/components/tree/tree.d.ts +13 -0
  53. package/dist/types/components/value-list/value-list.d.ts +8 -0
  54. package/dist/types/components/view/record-view.d.ts +96 -5
  55. package/dist/types/core/breakpoint.d.ts +1 -1
  56. package/dist/types/core/icons.d.ts +37 -22
  57. package/dist/types/core/motion.d.ts +59 -0
  58. package/dist/types/core/overlay-host.d.ts +15 -1
  59. package/dist/types/index.d.ts +16 -3
  60. package/dist/types/internal/app-rail.d.ts +10 -0
  61. package/dist/types/internal/menu-items.d.ts +134 -0
  62. package/dist/types/zeyos/connect.d.ts +6 -0
  63. package/dist/types/zeyos/form.d.ts +50 -9
  64. package/dist/types/zeyos/index.d.ts +1 -1
  65. package/dist/types/zeyos/query.d.ts +79 -0
  66. package/dist/types/zeyos/schema.d.ts +24 -1
  67. package/dist/types/zeyos/table.d.ts +100 -14
  68. package/dist/types/zeyos/view.d.ts +10 -0
  69. package/dist/zx-zeyos.esm.js +2206 -489
  70. package/dist/zx-zeyos.esm.min.js +56 -1
  71. package/dist/zx.css +3322 -724
  72. package/dist/zx.esm.js +12244 -5809
  73. package/dist/zx.esm.min.js +58 -3
  74. package/dist/zx.global.js +12246 -5811
  75. package/dist/zx.global.min.js +58 -3
  76. package/dist/zx.min.css +1 -1
  77. package/docs/api.json +1683 -146
  78. package/docs/llms.md +777 -110
  79. package/docs/llms.txt +14 -8
  80. package/package.json +1 -1
  81. package/src/components/account-menu/account-menu.css +35 -10
  82. package/src/components/activity-item/activity-item.css +137 -0
  83. package/src/components/activity-item/activity-item.js +602 -0
  84. package/src/components/activity-list/activity-list.css +99 -0
  85. package/src/components/activity-list/activity-list.js +409 -0
  86. package/src/components/app-icon/app-icon.css +1 -1
  87. package/src/components/app-rail/app-rail.css +191 -22
  88. package/src/components/app-sidebar/app-sidebar.css +349 -24
  89. package/src/components/app-sidebar/app-sidebar.js +86 -11
  90. package/src/components/aurora/aurora.css +5 -3
  91. package/src/components/avatar/avatar.css +32 -7
  92. package/src/components/avatar/avatar.js +72 -8
  93. package/src/components/badge/badge.css +54 -2
  94. package/src/components/badge/badge.js +29 -2
  95. package/src/components/button/button.css +74 -8
  96. package/src/components/button/button.js +44 -1
  97. package/src/components/calendar/calendar.css +46 -46
  98. package/src/components/calendar/calendar.js +33 -3
  99. package/src/components/card/card.css +2 -2
  100. package/src/components/card/card.js +12 -1
  101. package/src/components/card-view/card-view.css +10 -7
  102. package/src/components/card-view/card-view.js +25 -9
  103. package/src/components/card-view/record-card.js +7 -3
  104. package/src/components/chart/chart.css +4 -1
  105. package/src/components/chart/chart.js +12 -0
  106. package/src/components/check-button/check-button.css +10 -2
  107. package/src/components/checklist/checklist.css +9 -2
  108. package/src/components/checklist/checklist.js +11 -5
  109. package/src/components/checklist/field-adapter.js +3 -1
  110. package/src/components/code-editor/code-editor.css +68 -0
  111. package/src/components/code-editor/code-editor.js +306 -0
  112. package/src/components/code-editor/field-adapter.js +34 -0
  113. package/src/components/context-menu/context-menu.css +87 -5
  114. package/src/components/context-menu/context-menu.js +22 -30
  115. package/src/components/copy/copy-button.css +6 -0
  116. package/src/components/copy/copy-input.css +8 -3
  117. package/src/components/data-filter/data-filter.css +5 -4
  118. package/src/components/date-picker/date-picker.css +6 -6
  119. package/src/components/date-picker/date-picker.js +22 -8
  120. package/src/components/date-picker/date-range-picker.css +3 -3
  121. package/src/components/date-picker/month-picker.js +3 -3
  122. package/src/components/date-picker/time-picker.css +1 -1
  123. package/src/components/date-picker/time-picker.js +20 -8
  124. package/src/components/datebox/date-range-box.css +79 -2
  125. package/src/components/datebox/date-range-box.js +13 -2
  126. package/src/components/datebox/datebox.css +79 -2
  127. package/src/components/datebox/datebox.js +13 -2
  128. package/src/components/dialog/dialog.css +26 -0
  129. package/src/components/dialog/dialog.js +174 -70
  130. package/src/components/dropdown/dropdown.css +1 -1
  131. package/src/components/dropdown/dropdown.js +7 -5
  132. package/src/components/empty-state/empty-state.css +2 -2
  133. package/src/components/entity-ref/entity-ref.css +182 -0
  134. package/src/components/entity-ref/entity-ref.js +496 -0
  135. package/src/components/field/field.css +28 -9
  136. package/src/components/field/field.js +68 -26
  137. package/src/components/field-upload/field-upload.css +1 -1
  138. package/src/components/fieldset/fieldset.css +5 -3
  139. package/src/components/fieldset/fieldset.js +28 -5
  140. package/src/components/file-item/file-item.css +88 -0
  141. package/src/components/file-item/file-item.js +505 -0
  142. package/src/components/file-list/file-list.css +51 -0
  143. package/src/components/file-list/file-list.js +320 -0
  144. package/src/components/filter/filter.css +27 -1
  145. package/src/components/filter/filter.js +205 -47
  146. package/src/components/filter-panel/filter-panel.css +104 -0
  147. package/src/components/filter-panel/filter-panel.js +964 -0
  148. package/src/components/finder/finder.css +15 -13
  149. package/src/components/form/form.css +5 -4
  150. package/src/components/form/form.js +11 -2
  151. package/src/components/grid/grid.css +1 -1
  152. package/src/components/groupbox/groupbox.css +1 -1
  153. package/src/components/kanban-view/kanban-card.js +247 -0
  154. package/src/components/kanban-view/kanban-view.css +226 -8
  155. package/src/components/kanban-view/kanban-view.js +255 -12
  156. package/src/components/launcher/launcher.css +107 -25
  157. package/src/components/launcher/launcher.js +557 -63
  158. package/src/components/list-toolbar/list-toolbar.css +194 -0
  159. package/src/components/list-toolbar/list-toolbar.js +851 -0
  160. package/src/components/master-panel/master-panel.css +2 -0
  161. package/src/components/menu-button/menu-button.css +87 -5
  162. package/src/components/menu-button/menu-button.js +86 -46
  163. package/src/components/message/message.css +38 -5
  164. package/src/components/message/message.js +230 -17
  165. package/src/components/modal/modal.css +15 -0
  166. package/src/components/modal/modal.js +159 -3
  167. package/src/components/navigation-bar/navigation-bar.css +95 -11
  168. package/src/components/navigation-bar/navigation-bar.js +171 -4
  169. package/src/components/number-field/field-adapter.js +1 -0
  170. package/src/components/number-field/number-field.css +70 -0
  171. package/src/components/number-field/number-field.js +2 -0
  172. package/src/components/pagination/pagination.css +8 -6
  173. package/src/components/panel/panel.css +1 -1
  174. package/src/components/panel/panel.js +13 -2
  175. package/src/components/rating/rating.css +7 -0
  176. package/src/components/search/search.js +17 -5
  177. package/src/components/select/color.js +22 -0
  178. package/src/components/select/field-adapter.js +6 -1
  179. package/src/components/select/glyphs.js +165 -0
  180. package/src/components/select/select.css +138 -45
  181. package/src/components/select/select.js +86 -47
  182. package/src/components/sheet/sheet.css +11 -8
  183. package/src/components/slider/slider.css +16 -2
  184. package/src/components/slider/slider.js +1 -1
  185. package/src/components/sort-control/sort-control.css +20 -0
  186. package/src/components/sort-control/sort-control.js +140 -0
  187. package/src/components/stat-tile/stat-tile.css +208 -0
  188. package/src/components/stat-tile/stat-tile.js +601 -0
  189. package/src/components/tabbox/tabbox.css +32 -27
  190. package/src/components/tabbox/tabbox.js +17 -2
  191. package/src/components/table/table.css +155 -31
  192. package/src/components/table/table.js +386 -33
  193. package/src/components/table-view/table-view.css +8 -2
  194. package/src/components/table-view/table-view.js +21 -6
  195. package/src/components/tag-picker/tag-picker.css +86 -6
  196. package/src/components/tag-picker/tag-picker.js +25 -8
  197. package/src/components/timebox/timebox.css +22 -2
  198. package/src/components/timebox/timebox.js +18 -5
  199. package/src/components/toggle/toggle.css +12 -1
  200. package/src/components/toolbar/toolbar.js +2 -2
  201. package/src/components/tooltip/tooltip.css +4 -0
  202. package/src/components/tooltip/tooltip.js +10 -3
  203. package/src/components/tree/tree.css +25 -16
  204. package/src/components/tree/tree.js +31 -0
  205. package/src/components/value-list/value-list.css +3 -3
  206. package/src/components/value-list/value-list.js +22 -6
  207. package/src/components/view/record-view.css +5 -0
  208. package/src/components/view/record-view.js +100 -7
  209. package/src/core/breakpoint.js +1 -1
  210. package/src/core/icons.js +259 -57
  211. package/src/core/motion.js +147 -0
  212. package/src/core/overlay-host.js +21 -2
  213. package/src/index.js +30 -3
  214. package/src/internal/app-rail.js +18 -1
  215. package/src/internal/menu-items.js +142 -0
  216. package/src/zeyos/connect.js +6 -2
  217. package/src/zeyos/form.js +67 -27
  218. package/src/zeyos/index.js +1 -1
  219. package/src/zeyos/query.js +153 -0
  220. package/src/zeyos/schema.js +144 -27
  221. package/src/zeyos/table.js +68 -5
  222. package/src/zeyos/view.js +6 -0
  223. package/styles/base.css +56 -0
  224. package/styles/icons.css +11 -1
  225. package/styles/print.css +192 -0
  226. package/styles/tokens/dark.css +113 -37
  227. package/styles/tokens/global.css +121 -27
  228. package/styles/tokens/semantic.css +100 -31
  229. package/styles/tokens/themes.css +7 -6
  230. package/styles/zx.css +11 -1
  231. package/styles/tokens/density.css +0 -9
@@ -28,6 +28,23 @@ export type LauncherItem = {
28
28
  * Compact metadata.
29
29
  */
30
30
  badge?: string | number;
31
+ /**
32
+ * Muted text at the end of the row, such as a current value or a project.
33
+ */
34
+ hint?: string | number;
35
+ /**
36
+ * Key labels drawn as
37
+ * key caps (`['⌘', 'K']`), or Button's `{label, keys}` shape. Display only: the Launcher binds nothing.
38
+ */
39
+ shortcut?: string | string[] | {
40
+ label: string | string[];
41
+ keys?: string;
42
+ };
43
+ /**
44
+ * The same shortcut in `aria-keyshortcuts` syntax (`'Meta+K'`), exposed on
45
+ * the option for assistive technology.
46
+ */
47
+ keys?: string;
31
48
  /**
32
49
  * Tile or row presentation.
33
50
  */
@@ -72,6 +89,40 @@ export type LauncherItem = {
72
89
  * Whether activation is unavailable.
73
90
  */
74
91
  disabled?: boolean;
92
+ /**
93
+ * Child items. An item with `items` opens them
94
+ * as a page instead of being selected: an array, or a loader called with the page's query.
95
+ */
96
+ items?: LauncherItem[] | LauncherPageLoader;
97
+ /**
98
+ * Search-field placeholder while this item's page is open.
99
+ */
100
+ placeholder?: string;
101
+ /**
102
+ * For a page whose `items` is a loader: whether Zx ranks
103
+ * the loaded items by the query, or keeps the loader's order.
104
+ */
105
+ order?: 'rank' | 'source';
106
+ };
107
+ export type LauncherPageLoader = (query: string, context: {
108
+ signal: AbortSignal;
109
+ }) => LauncherItem[] | Promise<LauncherItem[]>;
110
+ export type LauncherOpenOptions = {
111
+ /**
112
+ * Opens straight into a page: the id of a local item
113
+ * with `items` (at any depth of array pages, whose path becomes the back stack), or a page item.
114
+ */
115
+ page?: string | number | LauncherItem;
116
+ };
117
+ export type LauncherPageDetail = {
118
+ /**
119
+ * The page now shown; null on the root.
120
+ */
121
+ page: LauncherItem | null;
122
+ /**
123
+ * Every open page from the root down, the shown one last.
124
+ */
125
+ path: LauncherItem[];
75
126
  };
76
127
  export type LauncherSource = {
77
128
  /**
@@ -127,27 +178,27 @@ export type LauncherOptions = {
127
178
  */
128
179
  maxResults?: number;
129
180
  /**
130
- * Search-field placeholder.
181
+ * Search-field placeholder. Omitted resolves `launcher.placeholder`, English `Search applications and records`.
131
182
  */
132
183
  placeholder?: string;
133
184
  /**
134
- * Dialog and field label.
185
+ * Dialog and field label. Omitted resolves `launcher.label`, English `Launcher`.
135
186
  */
136
187
  label?: string;
137
188
  /**
138
- * Close-button accessible label.
189
+ * Close-button accessible label. Omitted resolves `launcher.close`, English `Close launcher`.
139
190
  */
140
191
  closeLabel?: string;
141
192
  /**
142
- * Results-region accessible label.
193
+ * Results-region accessible label. Omitted resolves `launcher.results`, English `Launcher results`.
143
194
  */
144
195
  resultsLabel?: string;
145
196
  /**
146
- * Empty-state text.
197
+ * Empty-state text. Omitted resolves `launcher.empty`, English `No results`.
147
198
  */
148
199
  emptyText?: string;
149
200
  /**
150
- * Loading-state text.
201
+ * Loading-state text. Omitted resolves `launcher.loading`, English `Searching…`.
151
202
  */
152
203
  loadingText?: string;
153
204
  /**
@@ -160,6 +211,7 @@ export type LauncherOptions = {
160
211
  hints?: false | {
161
212
  move?: string;
162
213
  open?: string;
214
+ back?: string;
163
215
  close?: string;
164
216
  };
165
217
  /**
@@ -176,6 +228,10 @@ export type LauncherOptions = {
176
228
  onquery?: (event: CustomEvent<{
177
229
  query: string;
178
230
  }>) => void;
231
+ /**
232
+ * Page-navigation listener.
233
+ */
234
+ onpage?: (event: CustomEvent<LauncherPageDetail>) => void;
179
235
  /**
180
236
  * Open listener.
181
237
  */
@@ -187,21 +243,49 @@ export type LauncherOptions = {
187
243
  /**
188
244
  * Source error listener.
189
245
  */
190
- onerror?: (event: CustomEvent<{
191
- source: LauncherSource;
192
- error: unknown;
193
- }>) => void;
246
+ onerror?: (event: CustomEvent<LauncherErrorDetail>) => void;
194
247
  };
195
248
  export type LauncherSelectDetail = {
196
249
  item: LauncherItem;
197
250
  value: unknown;
198
251
  source: string | null;
199
252
  query: string;
253
+ page: LauncherItem | null;
254
+ };
255
+ export type LauncherErrorDetail = {
256
+ source: LauncherSource;
257
+ error: unknown;
258
+ page: LauncherItem | null;
200
259
  };
201
260
  export type RankedLauncherItem = LauncherItem & {
202
261
  _source?: string | null;
203
262
  _score?: number;
204
263
  };
264
+ export type LevelSource = LauncherSource & {
265
+ _page?: boolean;
266
+ };
267
+ export type LauncherPageEntry = {
268
+ /**
269
+ * The page item.
270
+ */
271
+ page: LauncherItem;
272
+ /**
273
+ * Its normalized local items (an array page).
274
+ */
275
+ items: LauncherItem[];
276
+ /**
277
+ * Its loader as a source (a loader page).
278
+ */
279
+ sources: LevelSource[];
280
+ /**
281
+ * The level beneath: its query, its highlighted option, and its loaded results when they were complete.
282
+ */
283
+ parent: {
284
+ query: string;
285
+ activeId: string | null;
286
+ sourceItems: Map<string, RankedLauncherItem[]> | null;
287
+ };
288
+ };
205
289
  /**
206
290
  * @typedef {Object} LauncherItem
207
291
  * @property {string|number} id Stable item identifier.
@@ -211,6 +295,11 @@ export type RankedLauncherItem = LauncherItem & {
211
295
  * @property {string} [group] Result group.
212
296
  * @property {string|Node|((item: LauncherItem) => Node|null)} [icon] Decorative icon name, node, or factory.
213
297
  * @property {string|number} [badge] Compact metadata.
298
+ * @property {string|number} [hint] Muted text at the end of the row, such as a current value or a project.
299
+ * @property {string|string[]|{label: string|string[], keys?: string}} [shortcut] Key labels drawn as
300
+ * key caps (`['⌘', 'K']`), or Button's `{label, keys}` shape. Display only: the Launcher binds nothing.
301
+ * @property {string} [keys] The same shortcut in `aria-keyshortcuts` syntax (`'Meta+K'`), exposed on
302
+ * the option for assistive technology.
214
303
  * @property {'application'|'record'|'action'} [kind='action'] Tile or row presentation.
215
304
  * @property {boolean} [current=false] Whether this is the current application or destination.
216
305
  * @property {'always'|'empty'|'query'} [when='always'] Query state in which the item is visible.
@@ -222,6 +311,26 @@ export type RankedLauncherItem = LauncherItem & {
222
311
  * @property {() => void} [invoke] Application-owned callback for non-link actions.
223
312
  * @property {boolean|number} [pinned] Pinned state or explicit pinned order.
224
313
  * @property {boolean} [disabled] Whether activation is unavailable.
314
+ * @property {LauncherItem[]|LauncherPageLoader} [items] Child items. An item with `items` opens them
315
+ * as a page instead of being selected: an array, or a loader called with the page's query.
316
+ * @property {string} [placeholder] Search-field placeholder while this item's page is open.
317
+ * @property {'rank'|'source'} [order='rank'] For a page whose `items` is a loader: whether Zx ranks
318
+ * the loaded items by the query, or keeps the loader's order.
319
+ */
320
+ /**
321
+ * Loads a page's items for its current query. It runs when the page opens and again, debounced, as
322
+ * the query changes; a newer query aborts `signal`.
323
+ * @typedef {(query: string, context: {signal: AbortSignal}) => LauncherItem[]|Promise<LauncherItem[]>} LauncherPageLoader
324
+ */
325
+ /**
326
+ * @typedef {Object} LauncherOpenOptions
327
+ * @property {string|number|LauncherItem} [page] Opens straight into a page: the id of a local item
328
+ * with `items` (at any depth of array pages, whose path becomes the back stack), or a page item.
329
+ */
330
+ /**
331
+ * @typedef {Object} LauncherPageDetail
332
+ * @property {LauncherItem|null} page The page now shown; null on the root.
333
+ * @property {LauncherItem[]} path Every open page from the root down, the shown one last.
225
334
  */
226
335
  /**
227
336
  * @typedef {Object} LauncherSource
@@ -240,27 +349,47 @@ export type RankedLauncherItem = LauncherItem & {
240
349
  * @property {number} [debounce=250] Source-query delay in milliseconds.
241
350
  * @property {number} [minQuery=0] Global source minimum query length.
242
351
  * @property {number} [maxResults=100] Maximum combined results.
243
- * @property {string} [placeholder='Search applications and records'] Search-field placeholder.
244
- * @property {string} [label='Launcher'] Dialog and field label.
245
- * @property {string} [closeLabel='Close launcher'] Close-button accessible label.
246
- * @property {string} [resultsLabel='Launcher results'] Results-region accessible label.
247
- * @property {string} [emptyText='No results'] Empty-state text.
248
- * @property {string} [loadingText='Searching…'] Loading-state text.
352
+ * @property {string} [placeholder] Search-field placeholder. Omitted resolves `launcher.placeholder`, English `Search applications and records`.
353
+ * @property {string} [label] Dialog and field label. Omitted resolves `launcher.label`, English `Launcher`.
354
+ * @property {string} [closeLabel] Close-button accessible label. Omitted resolves `launcher.close`, English `Close launcher`.
355
+ * @property {string} [resultsLabel] Results-region accessible label. Omitted resolves `launcher.results`, English `Launcher results`.
356
+ * @property {string} [emptyText] Empty-state text. Omitted resolves `launcher.empty`, English `No results`.
357
+ * @property {string} [loadingText] Loading-state text. Omitted resolves `launcher.loading`, English `Searching…`.
249
358
  * @property {'mod+k'|false} [shortcut='mod+k'] Optional global keyboard shortcut.
250
- * @property {false|{move?: string, open?: string, close?: string}} [hints] Visible keyboard hints, or false.
359
+ * @property {false|{move?: string, open?: string, back?: string, close?: string}} [hints] Visible keyboard hints, or false.
251
360
  * @property {Element|string|null} [scope=null] Element whose nearest Zx theme scope owns an internally created launcher; defaults to the opener.
252
361
  * @property {(event: CustomEvent<LauncherSelectDetail>) => void} [onselect] Preventable selection listener.
253
362
  * @property {(event: CustomEvent<{query: string}>) => void} [onquery] Query-change listener.
363
+ * @property {(event: CustomEvent<LauncherPageDetail>) => void} [onpage] Page-navigation listener.
254
364
  * @property {(event: CustomEvent<Record<string, never>>) => void} [onopen] Open listener.
255
365
  * @property {(event: CustomEvent<Record<string, never>>) => void} [onclose] Close listener.
256
- * @property {(event: CustomEvent<{source: LauncherSource, error: unknown}>) => void} [onerror] Source error listener.
366
+ * @property {(event: CustomEvent<LauncherErrorDetail>) => void} [onerror] Source error listener.
367
+ */
368
+ /**
369
+ * A selection. `page` is the page the item was chosen on, null on the root.
370
+ * @typedef {{item: LauncherItem, value: unknown, source: string|null, query: string, page: LauncherItem|null}} LauncherSelectDetail
371
+ */
372
+ /**
373
+ * A failed load. A page loader reports as a source whose id is `page:<page id>`, with `page` set.
374
+ * @typedef {{source: LauncherSource, error: unknown, page: LauncherItem|null}} LauncherErrorDetail
257
375
  */
258
- /** @typedef {{item: LauncherItem, value: unknown, source: string|null, query: string}} LauncherSelectDetail */
259
376
  /** @typedef {LauncherItem & {_source?: string|null, _score?: number}} RankedLauncherItem */
377
+ /** @typedef {LauncherSource & {_page?: boolean}} LevelSource */
378
+ /**
379
+ * One open page and the level beneath it, kept so going back restores that level as it was.
380
+ * @typedef {Object} LauncherPageEntry
381
+ * @property {LauncherItem} page The page item.
382
+ * @property {LauncherItem[]} items Its normalized local items (an array page).
383
+ * @property {LevelSource[]} sources Its loader as a source (a loader page).
384
+ * @property {{query: string, activeId: string|null, sourceItems: Map<string, RankedLauncherItem[]>|null}} parent
385
+ * The level beneath: its query, its highlighted option, and its loaded results when they were complete.
386
+ */
260
387
  /**
261
388
  * Abortable command/search dialog that emits application-owned actions without routing itself.
389
+ * Items with `items` open nested pages: an APG combobox whose listbox shows one page at a time.
262
390
  * @fires Launcher#select
263
391
  * @fires Launcher#query
392
+ * @fires Launcher#page
264
393
  * @fires Launcher#open
265
394
  * @fires Launcher#close
266
395
  * @fires Launcher#error
@@ -283,7 +412,15 @@ export declare class Launcher extends Component<LauncherOptions> {
283
412
  _requestSequence: number;
284
413
  _queryTimer: number;
285
414
  _busy: boolean;
415
+ _settled: boolean;
416
+ /** @type {LauncherPageEntry[]} */
417
+ _pages: LauncherPageEntry[];
418
+ _restoreActiveId: string;
419
+ _announcePending: boolean;
420
+ _announceToggle: boolean;
286
421
  _destroyed: boolean;
422
+ _label: string;
423
+ _placeholder: string;
287
424
  static cssName: string;
288
425
  /** @type {Readonly<LauncherOptions>} */
289
426
  static defaults: Readonly<LauncherOptions>;
@@ -295,8 +432,24 @@ export declare class Launcher extends Component<LauncherOptions> {
295
432
  constructor(target?: HTMLDialogElement | string | null, options?: LauncherOptions);
296
433
  /** @returns {HTMLDialogElement} */
297
434
  render(): HTMLDialogElement;
298
- /** Opens the launcher and focuses/selects its query. @returns {this} @fires Launcher#open */
299
- open(): this;
435
+ /**
436
+ * Opens the launcher and focuses/selects its query. It opens on the root unless `page` names one;
437
+ * already open, `page` navigates there.
438
+ * @param {LauncherOpenOptions} [options={}] Open options.
439
+ * @returns {this}
440
+ * @fires Launcher#open
441
+ * @fires Launcher#page
442
+ */
443
+ open(options?: LauncherOpenOptions): this;
444
+ /**
445
+ * Goes back one page, restoring the level beneath with its query and highlighted option. Does
446
+ * nothing on the root.
447
+ * @returns {this}
448
+ * @fires Launcher#page
449
+ */
450
+ back(): this;
451
+ /** Returns the page shown, or null on the root. @returns {LauncherItem|null} */
452
+ getPage(): LauncherItem | null;
300
453
  /** Closes the launcher. @returns {this} */
301
454
  close(): this;
302
455
  /** Toggles the launcher. @returns {this} */
@@ -309,18 +462,80 @@ export declare class Launcher extends Component<LauncherOptions> {
309
462
  setQuery(query: string): this;
310
463
  /** Returns the untrimmed query. @returns {string} */
311
464
  getQuery(): string;
312
- /** Replaces local catalogue items. @param {LauncherItem[]} items @returns {this} */
465
+ /** Replaces the root's local catalogue items; an open page keeps its own. @param {LauncherItem[]} items @returns {this} */
313
466
  setItems(items: LauncherItem[]): this;
314
467
  /** Marks one local item as the current destination. @param {string|number|null} id Item id. @returns {this} */
315
468
  setCurrent(id: string | number | null): this;
316
- /** Replaces asynchronous sources and aborts work from the old set. @param {LauncherSource[]} sources @returns {this} */
469
+ /** Replaces the root's asynchronous sources and aborts work from the old set; on a page they load once the root is back. @param {LauncherSource[]} sources @returns {this} */
317
470
  setSources(sources: LauncherSource[]): this;
318
471
  /** Aborts sources and removes the owned dialog. @returns {void} */
319
472
  destroy(): void;
320
- /** @returns {void} */
321
- _refresh(): void;
473
+ /**
474
+ * Re-renders the current level and reloads its sources: debounced while typing, at once when a
475
+ * page opens (so its loading state shows instead of a passing "No results").
476
+ * @param {boolean} [immediate=false] Load without the debounce.
477
+ * @returns {void}
478
+ */
479
+ _refresh(immediate?: boolean): void;
322
480
  /** @returns {Promise<void>} */
323
481
  _loadSources(): Promise<void>;
482
+ /**
483
+ * The level on screen: the root's items and sources, or the open page's.
484
+ * @returns {{items: LauncherItem[], sources: LevelSource[]}}
485
+ */
486
+ _level(): {
487
+ items: LauncherItem[];
488
+ sources: LevelSource[];
489
+ };
490
+ /**
491
+ * Opens a page on top of the current level: what the user activated, or ArrowRight on its row.
492
+ * @param {LauncherItem} item Page item.
493
+ * @returns {void}
494
+ */
495
+ _openPage(item: LauncherItem): void;
496
+ /**
497
+ * Replaces the whole stack with `path` (empty for the root) and refreshes what it lands on.
498
+ * @param {LauncherItem[]} path Pages from the root down.
499
+ * @param {{emit?: boolean}} [options={}] Whether to report a change through `page`.
500
+ * @returns {void}
501
+ */
502
+ _goTo(path: LauncherItem[], { emit }?: {
503
+ emit?: boolean;
504
+ }): void;
505
+ /** Pops every page, restoring the root's query, without rendering. @returns {void} */
506
+ _unwind(): void;
507
+ /**
508
+ * Pushes a page, remembering the level beneath, and clears the query for it.
509
+ * @param {LauncherItem} item Page item.
510
+ * @returns {void}
511
+ */
512
+ _pushPage(item: LauncherItem): void;
513
+ /**
514
+ * Pops the top page and restores the level beneath.
515
+ * @returns {boolean} Whether that level's results came back complete (no reload needed).
516
+ */
517
+ _popPage(): boolean;
518
+ /** @param {string} query @returns {void} */
519
+ _setInputQuery(query: string): void;
520
+ /**
521
+ * Shows the open page in the search row: the chip, the combobox name and placeholder, and the
522
+ * footer's Back hint.
523
+ * @returns {void}
524
+ */
525
+ _syncPage(): void;
526
+ /** @returns {void} @fires Launcher#page */
527
+ _emitPage(): void;
528
+ /**
529
+ * Resolves `open({ page })`: a page item as given, or the path to a local page by id.
530
+ * @param {string|number|LauncherItem} target Page id or item.
531
+ * @returns {LauncherItem[]}
532
+ */
533
+ _pagePath(target: string | number | LauncherItem): LauncherItem[];
534
+ /**
535
+ * The polite line a page change ends on: where the user is and how much is there.
536
+ * @returns {string}
537
+ */
538
+ _pageStatus(): string;
324
539
  /** @param {boolean} busy @returns {void} */
325
540
  _setBusy(busy: boolean): void;
326
541
  /** @returns {void} */
@@ -335,13 +550,49 @@ export declare class Launcher extends Component<LauncherOptions> {
335
550
  _syncActive(): void;
336
551
  /** @param {KeyboardEvent} event @returns {void} */
337
552
  _onKeydown(event: KeyboardEvent): void;
553
+ /**
554
+ * ArrowRight on a page row opens it once the caret is at the end of the query (before that it
555
+ * moves the caret); ArrowLeft on an empty query goes back. Application tiles keep both arrows
556
+ * for moving through their grid, which the caller tries first.
557
+ * @param {string} key ArrowLeft or ArrowRight.
558
+ * @returns {boolean} Whether the key navigated.
559
+ */
560
+ _pageKey(key: string): boolean;
338
561
  /** @param {string} direction @param {number[]} enabled @returns {number|null} */
339
562
  _spatialIndex(direction: string, enabled: number[]): number | null;
340
563
  /** @param {number} index @param {Event} event @returns {void} */
341
564
  _activate(index: number, event: Event): void;
342
565
  /** @param {KeyboardEvent} event @returns {void} */
343
566
  _onDocumentKeydown(event: KeyboardEvent): void;
567
+ /**
568
+ * Resolves a message through the host translator, falling back to the built-in English text.
569
+ * @param {string} key Message key.
570
+ * @param {string} fallback English default.
571
+ * @param {...unknown} args Positional `%1`, `%2` values.
572
+ * @returns {string}
573
+ */
574
+ _message(key: string, fallback: string, ...args: unknown[]): string;
344
575
  }
576
+ /**
577
+ * Whether an item opens a page rather than being selected.
578
+ * @param {unknown} item Candidate item.
579
+ * @returns {boolean}
580
+ */
581
+ export declare function isLauncherPage(item: unknown): boolean;
582
+ /**
583
+ * Finds a page among local items by id, descending through array pages (a loader's items are not
584
+ * known until it runs).
585
+ * @param {LauncherItem[]} items Root items.
586
+ * @param {string|number} id Page item id.
587
+ * @returns {LauncherItem[]} The pages from the root down to the match, or an empty array.
588
+ */
589
+ export declare function findLauncherPage(items: LauncherItem[], id: string | number): LauncherItem[];
590
+ /**
591
+ * Normalizes an item's `shortcut` into the key labels drawn as caps.
592
+ * @param {unknown} shortcut `['⌘', 'K']`, one label, or `{label, keys}`.
593
+ * @returns {string[]}
594
+ */
595
+ export declare function launcherShortcutCaps(shortcut: unknown): string[];
345
596
  /**
346
597
  * Ranks launcher items using the current ZeyOS application tiers.
347
598
  * @param {RankedLauncherItem[]} items Items to rank.
@@ -359,6 +610,7 @@ export declare function rankLauncherItems(items: RankedLauncherItem[], query: st
359
610
  export declare function orderedLauncherSourceItems(sources: LauncherSource[], sourceItems: Map<string, RankedLauncherItem[]>): RankedLauncherItem[];
360
611
  /** Fired when a result is activated. @event Launcher#select @type {CustomEvent<LauncherSelectDetail>} */
361
612
  /** Fired when the query changes. @event Launcher#query @type {CustomEvent<{query: string}>} */
613
+ /** Fired after a page opens or closes, or `open()` lands on a different page. @event Launcher#page @type {CustomEvent<LauncherPageDetail>} */
362
614
  /** Fired after the dialog opens. @event Launcher#open @type {CustomEvent<Record<string, never>>} */
363
615
  /** Fired after the dialog closes. @event Launcher#close @type {CustomEvent<Record<string, never>>} */
364
- /** Fired when one asynchronous source fails. @event Launcher#error @type {CustomEvent<{source: LauncherSource, error: unknown}>} */
616
+ /** Fired when one asynchronous source or page loader fails. @event Launcher#error @type {CustomEvent<LauncherErrorDetail>} */