@zeyos/zx 5.7.1 → 5.8.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 (326) hide show
  1. package/CHANGELOG.md +296 -0
  2. package/README.md +47 -9
  3. package/dist/types/components/activity-item/activity-item.d.ts +14 -3
  4. package/dist/types/components/agent-avatar/agent-avatar.d.ts +165 -0
  5. package/dist/types/components/agent-avatar/agent-face.d.ts +93 -0
  6. package/dist/types/components/agent-thread/ag-ui.d.ts +21 -9
  7. package/dist/types/components/agent-thread/agent-thread.d.ts +26 -0
  8. package/dist/types/components/agent-thread/ui-message-stream.d.ts +3 -1
  9. package/dist/types/components/approval-card/approval-card.d.ts +31 -2
  10. package/dist/types/components/aurora/aurora.d.ts +31 -5
  11. package/dist/types/components/calendar/calendar.d.ts +39 -26
  12. package/dist/types/components/chart/chart.d.ts +250 -20
  13. package/dist/types/components/chart/color.d.ts +66 -0
  14. package/dist/types/components/chart/svg-adapter.d.ts +103 -0
  15. package/dist/types/components/chart/svg-geometry.d.ts +203 -0
  16. package/dist/types/components/check-button/check-button.d.ts +1 -4
  17. package/dist/types/components/checklist/checklist.d.ts +19 -5
  18. package/dist/types/components/code-editor/code-editor.d.ts +55 -1
  19. package/dist/types/components/composer/composer.d.ts +41 -6
  20. package/dist/types/components/context-menu/context-menu.d.ts +36 -8
  21. package/dist/types/components/copy/copy-button.d.ts +6 -0
  22. package/dist/types/components/copy/copy-input.d.ts +1 -0
  23. package/dist/types/components/date-picker/date-picker.d.ts +14 -0
  24. package/dist/types/components/date-picker/time-picker.d.ts +26 -17
  25. package/dist/types/components/datebox/datebox.d.ts +8 -4
  26. package/dist/types/components/dialog/dialog.d.ts +13 -2
  27. package/dist/types/components/empty-state/empty-state.d.ts +10 -1
  28. package/dist/types/components/field/field.d.ts +4 -2
  29. package/dist/types/components/form/form.d.ts +2 -1
  30. package/dist/types/components/kanban-view/kanban-card.d.ts +7 -0
  31. package/dist/types/components/kanban-view/kanban-view.d.ts +15 -3
  32. package/dist/types/components/launcher/launcher.d.ts +26 -0
  33. package/dist/types/components/master-panel/master-panel.d.ts +9 -4
  34. package/dist/types/components/menu-button/menu-button.d.ts +29 -5
  35. package/dist/types/components/message/message.d.ts +308 -5
  36. package/dist/types/components/modal/modal.d.ts +11 -0
  37. package/dist/types/components/modal/native-dialog.d.ts +40 -0
  38. package/dist/types/components/module-bar/module-bar.d.ts +9 -2
  39. package/dist/types/components/multi-value-editor/multi-value-editor.d.ts +5 -4
  40. package/dist/types/components/number-field/number-field.d.ts +7 -0
  41. package/dist/types/components/pagination/pagination.d.ts +341 -19
  42. package/dist/types/components/run-status/run-status.d.ts +26 -0
  43. package/dist/types/components/run-trace/run-trace.d.ts +10 -6
  44. package/dist/types/components/search/search.d.ts +16 -4
  45. package/dist/types/components/select/select.d.ts +19 -1
  46. package/dist/types/components/sheet/sheet.d.ts +18 -4
  47. package/dist/types/components/slider/slider.d.ts +2 -1
  48. package/dist/types/components/stat-tile/stat-tile.d.ts +20 -3
  49. package/dist/types/components/stepper/stepper.d.ts +17 -4
  50. package/dist/types/components/surface/catalog.d.ts +61 -17
  51. package/dist/types/components/surface/surface.d.ts +6 -4
  52. package/dist/types/components/table/table.d.ts +207 -5
  53. package/dist/types/components/table/window.d.ts +25 -1
  54. package/dist/types/components/toggle/toggle.d.ts +38 -6
  55. package/dist/types/components/tooltip/tooltip.d.ts +5 -4
  56. package/dist/types/components/tree/tree.d.ts +43 -6
  57. package/dist/types/components/truncate/truncate.d.ts +4 -2
  58. package/dist/types/components/value-list/value-list.d.ts +9 -2
  59. package/dist/types/core/date.d.ts +2 -1
  60. package/dist/types/core/drag-axis.d.ts +10 -5
  61. package/dist/types/core/export.d.ts +2 -2
  62. package/dist/types/core/format.d.ts +3 -1
  63. package/dist/types/core/icons.d.ts +36 -3
  64. package/dist/types/core/keyboard.d.ts +7 -3
  65. package/dist/types/core/messages.d.ts +3 -0
  66. package/dist/types/core/storage.d.ts +4 -3
  67. package/dist/types/core/util.d.ts +3 -1
  68. package/dist/types/elements/define.d.ts +5 -2
  69. package/dist/types/index.d.ts +6 -4
  70. package/dist/types/internal/agent-model.d.ts +99 -0
  71. package/dist/types/internal/app-rail.d.ts +37 -2
  72. package/dist/types/internal/collections.d.ts +18 -0
  73. package/dist/types/internal/menu-items.d.ts +27 -0
  74. package/dist/types/internal/overlay-content.d.ts +23 -0
  75. package/dist/types/internal/presence-loop.d.ts +5 -2
  76. package/dist/types/locales/index.d.ts +3 -0
  77. package/dist/types/zeyos/calendar.d.ts +43 -7
  78. package/dist/types/zeyos/connect.d.ts +4 -0
  79. package/dist/types/zeyos/form.d.ts +13 -5
  80. package/dist/types/zeyos/select.d.ts +5 -2
  81. package/dist/types/zeyos/table.d.ts +16 -8
  82. package/dist/types/zeyos/view.d.ts +2 -1
  83. package/dist/zx-zeyos.esm.js +2998 -451
  84. package/dist/zx-zeyos.esm.min.js +4 -4
  85. package/dist/zx.core.css +4 -0
  86. package/dist/zx.core.min.css +1 -1
  87. package/dist/zx.css +948 -48
  88. package/dist/zx.esm.js +7432 -3408
  89. package/dist/zx.esm.min.js +26 -26
  90. package/dist/zx.global.js +7432 -3408
  91. package/dist/zx.global.min.js +26 -26
  92. package/dist/zx.layered.css +950 -48
  93. package/dist/zx.layered.min.css +1 -1
  94. package/dist/zx.min.css +1 -1
  95. package/docs/agent-catalog.json +159 -1
  96. package/docs/agent-surfaces.md +21 -21
  97. package/docs/api.json +3122 -528
  98. package/docs/components/account-menu.md +24 -0
  99. package/docs/components/activity-item.md +23 -0
  100. package/docs/components/activity-list.md +28 -0
  101. package/docs/components/agent-avatar.md +59 -0
  102. package/docs/components/agent-thread.md +275 -0
  103. package/docs/components/app-icon.md +36 -0
  104. package/docs/components/app-sidebar.md +92 -0
  105. package/docs/components/approval-card.md +71 -0
  106. package/docs/components/aurora.md +34 -0
  107. package/docs/components/avatar.md +37 -0
  108. package/docs/components/badge.md +36 -0
  109. package/docs/components/block-view.md +34 -0
  110. package/docs/components/breadcrumb.md +20 -0
  111. package/docs/components/button.md +23 -0
  112. package/docs/components/calendar.md +68 -0
  113. package/docs/components/card-view.md +73 -0
  114. package/docs/components/card.md +25 -0
  115. package/docs/components/chart.md +109 -0
  116. package/docs/components/check-button.md +16 -0
  117. package/docs/components/checklist.md +19 -0
  118. package/docs/components/code-editor.md +38 -0
  119. package/docs/components/composer.md +107 -0
  120. package/docs/components/context-menu.md +32 -0
  121. package/docs/components/copy.md +37 -0
  122. package/docs/components/data-filter.md +16 -0
  123. package/docs/components/date-picker.md +31 -0
  124. package/docs/components/date-range.md +21 -0
  125. package/docs/components/datebox.md +31 -0
  126. package/docs/components/dialog.md +25 -0
  127. package/docs/components/dock.md +57 -0
  128. package/docs/components/dropdown.md +39 -0
  129. package/docs/components/elements.md +63 -0
  130. package/docs/components/empty-state.md +17 -0
  131. package/docs/components/entity-ref.md +26 -0
  132. package/docs/components/field-upload.md +18 -0
  133. package/docs/components/file-item.md +27 -0
  134. package/docs/components/file-list.md +23 -0
  135. package/docs/components/filter-panel.md +45 -0
  136. package/docs/components/filter.md +47 -0
  137. package/docs/components/finder.md +25 -0
  138. package/docs/components/form-widgets.md +42 -0
  139. package/docs/components/form.md +80 -0
  140. package/docs/components/grid.md +26 -0
  141. package/docs/components/groupbox.md +11 -0
  142. package/docs/components/helpers.md +359 -0
  143. package/docs/components/icons.md +87 -0
  144. package/docs/components/index.md +99 -0
  145. package/docs/components/kanban-view.md +42 -0
  146. package/docs/components/kbd.md +23 -0
  147. package/docs/components/kernel.md +41 -0
  148. package/docs/components/launcher.md +66 -0
  149. package/docs/components/layout.md +33 -0
  150. package/docs/components/list-toolbar.md +38 -0
  151. package/docs/components/loading.md +48 -0
  152. package/docs/components/menu-button.md +47 -0
  153. package/docs/components/message.md +76 -0
  154. package/docs/components/modal.md +27 -0
  155. package/docs/components/module-bar.md +71 -0
  156. package/docs/components/multi-value-editor.md +16 -0
  157. package/docs/components/navigation-bar.md +22 -0
  158. package/docs/components/number-field.md +34 -0
  159. package/docs/components/pagination.md +73 -0
  160. package/docs/components/panel.md +28 -0
  161. package/docs/components/prompt-starters.md +40 -0
  162. package/docs/components/prose.md +38 -0
  163. package/docs/components/questionnaire.md +115 -0
  164. package/docs/components/rating.md +19 -0
  165. package/docs/components/run-status.md +50 -0
  166. package/docs/components/run-trace.md +72 -0
  167. package/docs/components/search.md +11 -0
  168. package/docs/components/select.md +129 -0
  169. package/docs/components/sheet-stack.md +39 -0
  170. package/docs/components/sheet.md +77 -0
  171. package/docs/components/skeleton.md +27 -0
  172. package/docs/components/slider.md +29 -0
  173. package/docs/components/sort-control.md +21 -0
  174. package/docs/components/source-list.md +30 -0
  175. package/docs/components/split-view.md +12 -0
  176. package/docs/components/stat-tile.md +49 -0
  177. package/docs/components/stepper.md +27 -0
  178. package/docs/components/surface.md +152 -0
  179. package/docs/components/tabbox.md +33 -0
  180. package/docs/components/table-view.md +43 -0
  181. package/docs/components/table.md +232 -0
  182. package/docs/components/tag-picker.md +39 -0
  183. package/docs/components/timebox.md +16 -0
  184. package/docs/components/toggle.md +21 -0
  185. package/docs/components/tokens.md +82 -0
  186. package/docs/components/toolbar.md +26 -0
  187. package/docs/components/tooltip.md +16 -0
  188. package/docs/components/tree.md +48 -0
  189. package/docs/components/truncate.md +21 -0
  190. package/docs/components/value-list.md +14 -0
  191. package/docs/components/view-settings.md +56 -0
  192. package/docs/components/workspace-switcher.md +42 -0
  193. package/docs/components/zeyos.md +196 -0
  194. package/docs/llms-small.txt +299 -0
  195. package/docs/llms.md +697 -100
  196. package/docs/llms.txt +46 -19
  197. package/package.json +9 -4
  198. package/src/components/activity-item/activity-item.js +21 -2
  199. package/src/components/agent-avatar/agent-avatar.css +195 -0
  200. package/src/components/agent-avatar/agent-avatar.js +333 -0
  201. package/src/components/agent-avatar/agent-face.js +292 -0
  202. package/src/components/agent-thread/ag-ui.js +44 -11
  203. package/src/components/agent-thread/agent-thread.js +103 -11
  204. package/src/components/agent-thread/ui-message-stream.js +3 -1
  205. package/src/components/app-rail/app-rail.css +5 -0
  206. package/src/components/app-sidebar/app-sidebar.css +3 -0
  207. package/src/components/app-sidebar/app-sidebar.js +4 -3
  208. package/src/components/approval-card/approval-card.css +6 -0
  209. package/src/components/approval-card/approval-card.js +55 -7
  210. package/src/components/aurora/aurora.css +149 -14
  211. package/src/components/aurora/aurora.js +49 -6
  212. package/src/components/calendar/calendar.css +6 -2
  213. package/src/components/calendar/calendar.js +127 -47
  214. package/src/components/card-view/card-view.js +5 -6
  215. package/src/components/chart/chart.css +159 -1
  216. package/src/components/chart/chart.js +450 -62
  217. package/src/components/chart/color.js +297 -0
  218. package/src/components/chart/svg-adapter.js +576 -0
  219. package/src/components/chart/svg-geometry.js +323 -0
  220. package/src/components/check-button/check-button.js +3 -18
  221. package/src/components/checklist/checklist.js +46 -17
  222. package/src/components/checklist/field-adapter.js +4 -1
  223. package/src/components/code-editor/code-editor.css +33 -0
  224. package/src/components/code-editor/code-editor.js +97 -8
  225. package/src/components/code-editor/field-adapter.js +3 -0
  226. package/src/components/composer/composer.css +3 -0
  227. package/src/components/composer/composer.js +100 -22
  228. package/src/components/context-menu/context-menu.js +41 -5
  229. package/src/components/copy/copy-button.js +9 -1
  230. package/src/components/copy/copy-input.js +5 -0
  231. package/src/components/data-filter/filter-core.js +0 -1
  232. package/src/components/date-picker/date-picker.css +8 -0
  233. package/src/components/date-picker/date-picker.js +47 -8
  234. package/src/components/date-picker/date-range-picker.js +1 -1
  235. package/src/components/date-picker/month-picker.js +19 -3
  236. package/src/components/date-picker/time-picker.js +54 -19
  237. package/src/components/datebox/date-range-box.js +7 -3
  238. package/src/components/datebox/datebox.js +32 -6
  239. package/src/components/dialog/dialog.css +6 -0
  240. package/src/components/dialog/dialog.js +22 -30
  241. package/src/components/dropdown/dropdown.js +1 -18
  242. package/src/components/empty-state/empty-state.js +21 -2
  243. package/src/components/field/field.js +19 -3
  244. package/src/components/fieldset/fieldset.js +3 -1
  245. package/src/components/filter/filter.js +9 -0
  246. package/src/components/form/form.js +19 -2
  247. package/src/components/kanban-view/kanban-card.js +15 -2
  248. package/src/components/kanban-view/kanban-view.css +21 -0
  249. package/src/components/kanban-view/kanban-view.js +29 -16
  250. package/src/components/launcher/launcher.css +14 -0
  251. package/src/components/launcher/launcher.js +54 -9
  252. package/src/components/master-panel/master-panel.js +24 -22
  253. package/src/components/menu-button/menu-button.js +26 -4
  254. package/src/components/message/message.css +228 -29
  255. package/src/components/message/message.js +664 -30
  256. package/src/components/modal/modal.js +70 -25
  257. package/src/components/modal/native-dialog.js +91 -0
  258. package/src/components/module-bar/module-bar.css +3 -0
  259. package/src/components/module-bar/module-bar.js +17 -4
  260. package/src/components/multi-value-editor/multi-value-editor.css +7 -2
  261. package/src/components/multi-value-editor/multi-value-editor.js +3 -2
  262. package/src/components/navigation-bar/navigation-bar.js +13 -1
  263. package/src/components/number-field/field-adapter.js +3 -0
  264. package/src/components/number-field/number-field.js +2 -1
  265. package/src/components/pagination/pagination.css +26 -2
  266. package/src/components/pagination/pagination.js +551 -65
  267. package/src/components/prose/prose.js +7 -1
  268. package/src/components/rating/field-adapter.js +3 -0
  269. package/src/components/run-status/run-status.js +43 -3
  270. package/src/components/run-trace/run-trace.js +15 -7
  271. package/src/components/search/search.js +3 -18
  272. package/src/components/select/field-adapter.js +8 -1
  273. package/src/components/select/select.js +68 -13
  274. package/src/components/sheet/sheet.js +27 -8
  275. package/src/components/slider/field-adapter.js +3 -0
  276. package/src/components/slider/slider.js +4 -6
  277. package/src/components/stat-tile/stat-tile.js +24 -9
  278. package/src/components/stepper/stepper.css +15 -0
  279. package/src/components/stepper/stepper.js +34 -2
  280. package/src/components/surface/catalog.js +185 -28
  281. package/src/components/surface/surface.js +10 -5
  282. package/src/components/tabbox/tabbox.js +13 -1
  283. package/src/components/table/table.css +160 -2
  284. package/src/components/table/table.js +479 -52
  285. package/src/components/table/window.js +46 -4
  286. package/src/components/table-view/table-view.js +1 -10
  287. package/src/components/tag-picker/field-adapter.js +3 -0
  288. package/src/components/tag-picker/tag-picker.js +2 -0
  289. package/src/components/timebox/field-adapter.js +3 -0
  290. package/src/components/toggle/toggle.js +51 -27
  291. package/src/components/tooltip/tooltip.js +21 -14
  292. package/src/components/tree/tree.js +87 -14
  293. package/src/components/truncate/truncate.js +21 -5
  294. package/src/components/value-list/value-list.js +37 -9
  295. package/src/components/view-settings/view-settings.js +1 -5
  296. package/src/core/component.js +34 -2
  297. package/src/core/date.js +5 -4
  298. package/src/core/drag-axis.js +24 -7
  299. package/src/core/export.js +4 -4
  300. package/src/core/fontawesome.js +34 -3
  301. package/src/core/format.js +3 -1
  302. package/src/core/http.js +23 -11
  303. package/src/core/icons.js +51 -10
  304. package/src/core/keyboard.js +83 -9
  305. package/src/core/messages.js +3 -0
  306. package/src/core/position.js +2 -2
  307. package/src/core/storage.js +80 -31
  308. package/src/core/util.js +16 -5
  309. package/src/elements/define.js +82 -47
  310. package/src/elements/kit.js +46 -35
  311. package/src/index.js +8 -4
  312. package/src/internal/agent-model.js +152 -0
  313. package/src/internal/app-rail.js +53 -2
  314. package/src/internal/collections.js +25 -0
  315. package/src/internal/menu-items.js +59 -0
  316. package/src/internal/overlay-content.js +35 -0
  317. package/src/internal/presence-loop.js +61 -14
  318. package/src/locales/de.js +3 -0
  319. package/src/zeyos/calendar.js +81 -19
  320. package/src/zeyos/connect.js +5 -1
  321. package/src/zeyos/form.js +29 -10
  322. package/src/zeyos/select.js +36 -12
  323. package/src/zeyos/table.js +43 -11
  324. package/src/zeyos/view.js +2 -1
  325. package/styles/tokens/semantic.css +7 -1
  326. package/styles/zx.css +1 -0
@@ -241,7 +241,9 @@ export declare class Select extends Component<SelectOptions> {
241
241
  /** Selected item, or null. @returns {SelectItem|null} */
242
242
  get selected(): SelectItem | null;
243
243
  /**
244
- * Selects an item or item ID.
244
+ * Selects an item or item ID. An ID none of the items carries selects nothing; a whole item
245
+ * that is not among them — the current record of an async-filtered Select, whose results have
246
+ * not been loaded — is selected as given.
245
247
  * @param {unknown} idOrItem Item ID, item, or null.
246
248
  * @param {SelectSetOptions} [options={}] Update behavior.
247
249
  * @returns {this}
@@ -260,6 +262,22 @@ export declare class Select extends Component<SelectOptions> {
260
262
  * @returns {this}
261
263
  */
262
264
  setFixedItems(items: SelectItem[]): this;
265
+ /**
266
+ * What the reader has typed into the open list, or null when the input just shows the
267
+ * selection (or the list is closed, or the Select does not filter).
268
+ * @returns {string|null}
269
+ */
270
+ _typedQuery(): string | null;
271
+ /**
272
+ * Redraws after the items were replaced. A query the reader typed into the open list stays in
273
+ * the input and narrows the new items — locally filtered items by matching, pinned choices
274
+ * always — instead of the full list replacing what they typed.
275
+ * @param {string|null} query Typed query from before the change (see `_typedQuery()`).
276
+ * @returns {void}
277
+ */
278
+ _refreshAfterItemChange(query: string | null): void;
279
+ /** The text the input shows for the selection: '' when nothing is selected. @returns {string} */
280
+ _selectedLabel(): string;
263
281
  /** Replaces command rows without changing the selected value. @param {SelectAction[]} actions @returns {this} */
264
282
  setActions(actions: SelectAction[]): this;
265
283
  /**
@@ -27,7 +27,8 @@ export type SheetOptions = {
27
27
  size?: string | number | null;
28
28
  /**
29
29
  * Whether the header shows its close control. Independent of
30
- * `closable`, so a sheet can offer Escape without an ✕, or the reverse.
30
+ * `closable`, so a sheet can offer Escape without an ✕, or the reverse. When false the control is
31
+ * not displayed, not focusable, and closes nothing.
31
32
  */
32
33
  closeButton?: boolean;
33
34
  /**
@@ -126,7 +127,8 @@ export type SheetOptions = {
126
127
  * `start`/`end`, height for `top`/`bottom`. A number is pixels, a string is any CSS length. Null
127
128
  * keeps the per-side default.
128
129
  * @property {boolean} [closeButton=true] Whether the header shows its close control. Independent of
129
- * `closable`, so a sheet can offer Escape without an ✕, or the reverse.
130
+ * `closable`, so a sheet can offer Escape without an ✕, or the reverse. When false the control is
131
+ * not displayed, not focusable, and closes nothing.
130
132
  * @property {boolean} [resizable=false] Whether the inner edge may be dragged to resize the sheet.
131
133
  * @property {number} [min=160] Smallest the sheet may be dragged to, in pixels.
132
134
  * @property {number|null} [max=null] Largest it may be dragged to; null means the viewport.
@@ -175,8 +177,14 @@ export declare class Sheet extends Dialog {
175
177
  /** @type {Element|null} The element focus was on when the current `open()` began. */
176
178
  _openedFrom: Element | null;
177
179
  static cssName: string;
178
- /** @type {Readonly<SheetOptions>} */
179
- static defaults: Readonly<SheetOptions>;
180
+ /**
181
+ * A sheet's `size` is any CSS length along its axis, wider than Dialog's presets, so the static
182
+ * side is typed loosely there to stay assignable to Dialog's.
183
+ * @type {Readonly<SheetOptions & {size?: any}>}
184
+ */
185
+ static defaults: Readonly<SheetOptions & {
186
+ size?: any;
187
+ }>;
180
188
  /**
181
189
  * Creates an edge-anchored sheet.
182
190
  * @param {Element|string|null} [_target=null] Ignored; Sheet always owns its root.
@@ -195,6 +203,12 @@ export declare class Sheet extends Dialog {
195
203
  * @returns {number}
196
204
  */
197
205
  getSize(): number;
206
+ /**
207
+ * A sheet's header button follows `closeButton`, not `closable`: Escape and the ✕ are separate.
208
+ * @returns {boolean}
209
+ * @protected
210
+ */
211
+ protected _hasCloseButton(): boolean;
198
212
  /**
199
213
  * Resolves a translated string, falling back to English when no translator knows the key.
200
214
  * @param {string} key Message key.
@@ -210,7 +210,8 @@ export declare class Slider extends Component<SliderOptions> {
210
210
  destroy(): void;
211
211
  }
212
212
  /**
213
- * Decimal places a step carries, so a 0.1 step snaps to 0.3 rather than 0.30000000000000004.
213
+ * Decimal places a step carries, so a 0.1 step snaps to 0.3 rather than 0.30000000000000004 —
214
+ * exponent form included (`1.5e-7` carries 8).
214
215
  * @param {number} step Step size.
215
216
  * @returns {number}
216
217
  */
@@ -124,8 +124,11 @@ export type StatTileOptions = {
124
124
  */
125
125
  href?: string | null;
126
126
  /**
127
- * Renders a `<button>` without an href. Passing `onclick`
128
- * sets this implicitly; set it directly to subscribe with `on('click', …)` instead.
127
+ * Renders a `<button>` without an href. Passing a function
128
+ * as `onclick` sets this implicitly; set it to `true` to subscribe with `on('click', …)` instead.
129
+ * An explicit `false` wins over `onclick`: the tile stays a `<div>` and the handler is never
130
+ * called — for a caller that always passes a handler and decides per tile whether it applies.
131
+ * It does not turn a tile with an `href` into anything but a link.
129
132
  */
130
133
  clickable?: boolean;
131
134
  /**
@@ -138,7 +141,9 @@ export type StatTileOptions = {
138
141
  msg?: Record<string, unknown>;
139
142
  /**
140
143
  * Activation listener; its
141
- * presence is what turns a tile with no href into a button. It is the tile's `click` event, as
144
+ * presence is what turns a tile with no href into a button, unless `clickable` is `false`. Leave
145
+ * it out — rather than passing an empty function — for a tile that does nothing. It is the
146
+ * tile's `click` event, as
142
147
  * every Zx component's `on*` option is, so it receives the `CustomEvent` carrying the native
143
148
  * event in `detail.event`.
144
149
  */
@@ -274,6 +279,18 @@ export declare function statTileTag(options?: {
274
279
  clickable?: boolean;
275
280
  onclick?: unknown;
276
281
  }): 'a' | 'button' | 'div';
282
+ /**
283
+ * Whether a tile without a destination is an action. `clickable` decides when it is given as a
284
+ * boolean; left out (or nullish), a function-valued `onclick` does. So an explicit
285
+ * `clickable: false` wins over a handler, and a handler that is not a function is not behaviour.
286
+ * @param {{clickable?: boolean|null, onclick?: unknown}} [options={}] The options that carry
287
+ * behaviour.
288
+ * @returns {boolean}
289
+ */
290
+ export declare function statTileClickable(options?: {
291
+ clickable?: boolean | null;
292
+ onclick?: unknown;
293
+ }): boolean;
277
294
  /**
278
295
  * Composes the tile's accessible name: label, then value with its caption, then how it changed.
279
296
  *
@@ -15,7 +15,8 @@ export type StepperOptions = {
15
15
  active?: string | null;
16
16
  /**
17
17
  * `horizontal` lays the rail out above the
18
- * stage, `vertical` puts it beside the stage.
18
+ * stage, `vertical` puts it beside the stage. A horizontal rail too wide for its container wraps
19
+ * onto further rows; each row's connectors end at its last step.
19
20
  */
20
21
  orientation?: StepperOrientation;
21
22
  /**
@@ -78,7 +79,8 @@ export type StepRecord = {
78
79
  */
79
80
  step: NormalizedStep;
80
81
  /**
81
- * List item carrying `data-state` and `aria-current`.
82
+ * List item carrying `data-state` and `aria-current`, and
83
+ * `data-row-end` while it is the last step of a row in a wrapped horizontal rail.
82
84
  */
83
85
  item: HTMLLIElement;
84
86
  /**
@@ -99,7 +101,8 @@ export type StepRecord = {
99
101
  * @property {StepDefinition[]} [steps=[]] Ordered step definitions.
100
102
  * @property {string|null} [active=null] Initially active step name; defaults to the first enabled step.
101
103
  * @property {StepperOrientation} [orientation='horizontal'] `horizontal` lays the rail out above the
102
- * stage, `vertical` puts it beside the stage.
104
+ * stage, `vertical` puts it beside the stage. A horizontal rail too wide for its container wraps
105
+ * onto further rows; each row's connectors end at its last step.
103
106
  * @property {StepperClickable} [clickable='completed'] Which steps are activated by a click:
104
107
  * `completed` (go back only), `all`, or `false` for a display-only rail.
105
108
  * @property {boolean} [showNumbers=true] Whether upcoming and active markers show their number.
@@ -123,7 +126,8 @@ export type StepRecord = {
123
126
  /**
124
127
  * @typedef {Object} StepRecord
125
128
  * @property {NormalizedStep} step Normalized definition.
126
- * @property {HTMLLIElement} item List item carrying `data-state` and `aria-current`.
129
+ * @property {HTMLLIElement} item List item carrying `data-state` and `aria-current`, and
130
+ * `data-row-end` while it is the last step of a row in a wrapped horizontal rail.
127
131
  * @property {HTMLElement} control Button (clickable rails) or span (display-only rails).
128
132
  * @property {HTMLElement} marker Number / check / warning bubble.
129
133
  * @property {HTMLElement} status Visually hidden state text for assistive technology.
@@ -151,6 +155,8 @@ export declare class Stepper extends Component<StepperOptions> {
151
155
  _completed: Set<string>;
152
156
  /** @type {Set<string>} */
153
157
  _errored: Set<string>;
158
+ /** @type {ResizeObserver|null} */
159
+ _rowObserver: ResizeObserver | null;
154
160
  static cssName: string;
155
161
  /** @type {Readonly<StepperOptions>} */
156
162
  static defaults: Readonly<StepperOptions>;
@@ -250,6 +256,13 @@ export declare class Stepper extends Component<StepperOptions> {
250
256
  * @fires Stepper#change
251
257
  */
252
258
  _activate(index: number): this;
259
+ /**
260
+ * Marks the last step of every row but the final one with `data-row-end`, which is what hides
261
+ * its connector. The mark changes no size — the connector keeps its box — so the row breaks it
262
+ * was measured from stay where they are and one pass settles.
263
+ * @returns {void}
264
+ */
265
+ _markRows(): void;
253
266
  /**
254
267
  * Builds one step's elements. The control's tag depends only on the `clickable` option, never on
255
268
  * the step's state, so state changes never have to swap an element out from under the focus.
@@ -107,6 +107,16 @@ export type CatalogNode = {
107
107
  * The one intent the node may appear in.
108
108
  */
109
109
  intentOnly?: SurfaceIntent;
110
+ /**
111
+ * One sentence, for the model: when to pick the node.
112
+ */
113
+ use: string;
114
+ /**
115
+ * One sentence, for the model: when not to, naming the node or intent to
116
+ * use instead in backticks. The guide leaves it out when that node or intent is not in the
117
+ * catalog it is written for.
118
+ */
119
+ avoid: string;
110
120
  /**
111
121
  * Whether it lays out `children`.
112
122
  */
@@ -153,35 +163,62 @@ export type SurfaceCatalog = {
153
163
  */
154
164
  nodes: Readonly<Record<string, CatalogNode>>;
155
165
  };
166
+ export type CatalogProfile = 'answer' | 'ask' | 'review' | 'full';
167
+ export type CatalogNarrowing = {
168
+ /**
169
+ * A named set to start from; the whole catalog when left out.
170
+ */
171
+ profile?: CatalogProfile;
172
+ /**
173
+ * The intents to keep, within the profile; all when left out.
174
+ */
175
+ intents?: SurfaceIntent[];
176
+ /**
177
+ * The node types to keep, within the profile; all when left out.
178
+ */
179
+ nodes?: string[];
180
+ };
181
+ export type ProfileChoice = {
182
+ /**
183
+ * Narrows the catalog to a profile first; the catalog as
184
+ * given when left out.
185
+ */
186
+ profile?: CatalogProfile;
187
+ };
156
188
  /**
157
189
  * The full catalog. Frozen; narrow it with `narrowCatalog()`.
158
190
  * @type {SurfaceCatalog}
159
191
  */
160
192
  export declare const CATALOG: SurfaceCatalog;
193
+ /** The profile names, from the smallest catalog to the whole one. */
194
+ export declare const PROFILES: readonly CatalogProfile[];
161
195
  /**
162
196
  * Returns a catalog limited to some intents and node types. It can only narrow: a name the
163
197
  * catalog does not have is refused, and so is an intent whose required node would be removed
164
198
  * (`ask` without `fields`, `choose` without `choice`, `review` without `diff` or `table`,
165
199
  * `questionnaire` without `questionnaire`). A node that belongs to one intent leaves with it.
200
+ *
201
+ * A `profile` names a set to start from — `answer` (a `show` surface of prose, figures, tables,
202
+ * charts, records, links and layout), `ask` (adds the `ask`, `choose` and `confirm` intents with
203
+ * `fields` and `choice`), `review` (adds the `review` intent with `diff`) or `full` — and keeps
204
+ * what the catalog and the profile both have. `intents` and `nodes` then narrow within it.
166
205
  * @param {SurfaceCatalog} catalog The catalog to narrow: `CATALOG` or an already narrowed one.
167
- * @param {{intents?: SurfaceIntent[], nodes?: string[]}} [options] What to keep; all when left out.
206
+ * @param {CatalogNarrowing} [options] What to keep; all when left out.
168
207
  * @returns {SurfaceCatalog} A new frozen catalog.
169
- * @throws {TypeError} For an unknown name, an intent left without its required node, or a
170
- * catalog that is not the library's.
208
+ * @throws {TypeError} For an unknown profile or name, a name outside the profile, an intent left
209
+ * without its required node, or a catalog that is not the library's.
171
210
  */
172
- export declare function narrowCatalog(catalog: SurfaceCatalog, options?: {
173
- intents?: SurfaceIntent[];
174
- nodes?: string[];
175
- }): SurfaceCatalog;
211
+ export declare function narrowCatalog(catalog: SurfaceCatalog, options?: CatalogNarrowing): SurfaceCatalog;
176
212
  /**
177
213
  * Throws unless the catalog is the library's, or narrowed from it: every intent and node entry
178
214
  * must be the library's own frozen entry, so a catalog cannot be widened by building one by hand.
215
+ * Every node must say when to use it and when not to (`use` and `avoid`).
179
216
  * @param {unknown} catalog
180
217
  * @returns {asserts catalog is SurfaceCatalog}
181
- * @throws {TypeError} When the catalog is not the library's.
218
+ * @throws {TypeError} When the catalog is not the library's, or a node lacks `use` or `avoid`.
182
219
  */
183
220
  export declare function assertCatalog(catalog: unknown): asserts catalog is SurfaceCatalog;
184
- export type Profile = 'full' | 'strict';
221
+ export type SchemaVariant = 'full' | 'strict';
185
222
  export type JsonSchema = Record<string, any>;
186
223
  /**
187
224
  * The JSON Schema (2020-12) of the format for a catalog: one operation line, and a whole document.
@@ -189,9 +226,11 @@ export type JsonSchema = Record<string, any>;
189
226
  * inputs a condition may name, or the application's entities, and it leaves out the repairs the
190
227
  * validator makes.
191
228
  * @param {SurfaceCatalog} [catalog=CATALOG]
229
+ * @param {ProfileChoice} [options] `profile` narrows the catalog first.
192
230
  * @returns {{line: JsonSchema, document: JsonSchema}}
231
+ * @throws {TypeError} For an unknown profile or a catalog that is not the library's.
193
232
  */
194
- export declare function surfaceSchema(catalog?: SurfaceCatalog): {
233
+ export declare function surfaceSchema(catalog?: SurfaceCatalog, options?: ProfileChoice): {
195
234
  line: JsonSchema;
196
235
  document: JsonSchema;
197
236
  };
@@ -221,12 +260,15 @@ export type SurfaceTool = {
221
260
  /**
222
261
  * The tool definitions a model calls to put a surface in front of the person: `show_surface`
223
262
  * (any intent, a whole document) and `ask_user` (an `ask` surface; left out when the catalog has
224
- * no `ask`). The person's reply is each call's result. Arguments follow the strict profile: every
263
+ * no `ask`). The person's reply is each call's result. Arguments follow the strict variant: every
225
264
  * key present, `null` for one that does not apply, schema properties and table rows as lists.
226
265
  * @param {SurfaceCatalog} [catalog=CATALOG]
266
+ * @param {ProfileChoice} [options] `profile` narrows the catalog first; `answer` is the smallest
267
+ * set, a `show_surface` without `ask_user`.
227
268
  * @returns {SurfaceTool[]}
269
+ * @throws {TypeError} For an unknown profile or a catalog that is not the library's.
228
270
  */
229
- export declare function surfaceTools(catalog?: SurfaceCatalog): SurfaceTool[];
271
+ export declare function surfaceTools(catalog?: SurfaceCatalog, options?: ProfileChoice): SurfaceTool[];
230
272
  export type WorkedExample = {
231
273
  title: string;
232
274
  intro: string;
@@ -245,16 +287,18 @@ export type WorkedExample = {
245
287
  export declare function workedExamples(catalog?: SurfaceCatalog, count?: number): WorkedExample[];
246
288
  /**
247
289
  * The model-facing guide to composing surfaces for a catalog, as one Markdown string: the
248
- * delivery, the intents, a node reference generated from the catalog, the rules, and two worked
249
- * examples written for the delivery `mode` picks. `rules` are the application's own lines,
250
- * appended after the library's. The guide only informs; validation and the application's policy
290
+ * delivery, the intents, a node reference generated from the catalog — what each node is, when to
291
+ * use it and when not to — the rules, and two worked examples written for the delivery `mode`
292
+ * picks. `rules` are the application's own lines, appended after the library's. `profile`
293
+ * narrows the catalog first. The guide only informs; validation and the application's policy
251
294
  * enforce.
252
295
  * @param {SurfaceCatalog} [catalog=CATALOG]
253
- * @param {{mode?: 'tool'|'inline', rules?: string[]}} [options]
296
+ * @param {{mode?: 'tool'|'inline', rules?: string[], profile?: CatalogProfile}} [options]
254
297
  * @returns {string}
255
- * @throws {TypeError} For an unknown mode or a catalog that is not the library's.
298
+ * @throws {TypeError} For an unknown mode or profile, or a catalog that is not the library's.
256
299
  */
257
300
  export declare function surfacePrompt(catalog?: SurfaceCatalog, options?: {
258
301
  mode?: 'tool' | 'inline';
259
302
  rules?: string[];
303
+ profile?: CatalogProfile;
260
304
  }): string;
@@ -111,8 +111,10 @@ export type SurfaceOptions = {
111
111
  */
112
112
  labelledBy?: string | null;
113
113
  /**
114
- * The engine that draws `chart` nodes; without
115
- * one a chart shows its data table.
114
+ * The engine that draws `chart` nodes: a shared
115
+ * `SvgChartAdapter` by default, which needs no library; another adapter, such as a
116
+ * `ChartJsAdapter`, to draw with that engine; null to draw none, so that each chart shows its
117
+ * data table instead.
116
118
  */
117
119
  chartAdapter?: ChartAdapter | null;
118
120
  /**
@@ -462,8 +464,8 @@ export declare class Surface extends Component<SurfaceOptions> {
462
464
  */
463
465
  private _link;
464
466
  /**
465
- * A chart; its data table is shown when there is no engine, and offered behind a toggle when
466
- * there is.
467
+ * A chart; its data table is shown when there is no engine (`chartAdapter: null`), and offered
468
+ * behind a toggle when there is.
467
469
  * @private
468
470
  * @param {NodeView} view @param {Record<string, any>} props
469
471
  * @returns {NodeView}
@@ -24,6 +24,7 @@ export type TableHierarchyOptions = {
24
24
  column?: string;
25
25
  /**
26
26
  * Initially expanded branches: all, none, or ids.
27
+ * Read at construction only; `setExpanded()` replaces the set afterwards.
27
28
  */
28
29
  expanded?: boolean | unknown[];
29
30
  };
@@ -95,9 +96,38 @@ export type TableColumn = {
95
96
  /**
96
97
  * CSS width, `auto`, or an `fr` proportion. `fr` values are
97
98
  * converted into proportional percentages on `<col>` elements and enable `table-layout: fixed`;
98
- * this preserves a single aligned header/body table without measuring layout in JavaScript.
99
+ * this preserves a single aligned header/body table without measuring layout in JavaScript. The
100
+ * `fr` columns share what the columns with a CSS length leave over, and never less than their
101
+ * `minWidth`: a container too narrow for that scrolls the table inline instead of squeezing them.
99
102
  */
100
103
  width?: string;
104
+ /**
105
+ * Narrowest an `fr` column gets, as a CSS length or a
106
+ * number of pixels; `0` lifts the floor. Also honoured on an `auto` column of a table with a fixed
107
+ * layout (one with `fr` columns, or `virtual`), where it has no default. The table takes a minimum
108
+ * width from it, so every `fr` column keeps at least its floor whatever its share. A column with
109
+ * a CSS length `width` ignores it.
110
+ */
111
+ minWidth?: string | number;
112
+ /**
113
+ * Keeps the column in view at the inline start or end edge of the
114
+ * scroll region while the table scrolls sideways (`position: sticky`, so it follows the writing
115
+ * direction). A pinned column stays where the column order puts it and sticks once it reaches the
116
+ * edge, so declare a `'start'` column before the columns it should stay in front of and an `'end'`
117
+ * column after them. Several pinned columns stack beside each other in column order, and the row
118
+ * handle and selection checkbox columns are pinned along with the first `'start'` column. Give a
119
+ * pinned column a `width` or keep it short: what is pinned is taken from the room the other
120
+ * columns scroll in. Not applied while the table is stacked (`responsive`).
121
+ */
122
+ pin?: 'start' | 'end';
123
+ /**
124
+ * Label of a header group. Adjacent visible columns with the same
125
+ * `group` (and the same `pin`) share one header cell in a second header row above the column
126
+ * labels: a `<th scope="col">` spanning them, so assistive technology announces it with every
127
+ * cell beneath. Columns without a `group` leave that row blank above them. The group row takes
128
+ * no part in sorting or keyboard navigation.
129
+ */
130
+ group?: string;
101
131
  /**
102
132
  * Cell alignment.
103
133
  */
@@ -209,7 +239,10 @@ export type TableOptions = {
209
239
  */
210
240
  selectable?: TableSelectionMode;
211
241
  /**
212
- * Whether column headers stick while scrolling.
242
+ * Whether column headers stick to the top of the table's
243
+ * own scroll region while its rows scroll. That takes a bounded region: set `height` (or use
244
+ * `virtual`, which caps the region at the window height). A table without one grows to the height
245
+ * of its rows, never scrolls itself, and its header leaves with the page.
213
246
  */
214
247
  stickyHeader?: boolean;
215
248
  /**
@@ -561,7 +594,9 @@ export type TableEditorEntry = {
561
594
  * does not scroll). Enter activates the row exactly as a click does (`rowclick`), Space toggles the
562
595
  * row's selection when `selectable` (and activates otherwise), Shift+Arrow extends a `multi`
563
596
  * selection, and Ctrl/Cmd+A selects every rendered row. The focused row survives `setData`, sorting,
564
- * expansion, and `updateRow`. Column headers keep their sort buttons in the Tab order. With `virtual`
597
+ * expansion, and `updateRow`. Column headers keep their sort buttons in the Tab order; the header
598
+ * row of column groups (`TableColumn.group`) holds no controls and takes no focus. A cell focused
599
+ * by keyboard scrolls clear of pinned columns (`TableColumn.pin`). With `virtual`
565
600
  * all of this runs over every row, drawn or not: the keys draw the row they move to, and a selection
566
601
  * reaches rows that are not in the DOM.
567
602
  * @fires Table#rowclick
@@ -628,6 +663,22 @@ export declare class Table extends Component<TableOptions> {
628
663
  _columnControlIds: Map<any, any>;
629
664
  _columnStatus: HTMLElement;
630
665
  _expanded: Set<unknown>;
666
+ _pinLayout: {
667
+ start: number;
668
+ end: number;
669
+ structural: boolean;
670
+ columns: Map<string, {
671
+ side: 'start' | 'end';
672
+ slot: number;
673
+ edge: boolean;
674
+ }>;
675
+ };
676
+ _headerRows: number;
677
+ _headerRow: HTMLTableRowElement;
678
+ _groupRow: HTMLTableRowElement;
679
+ _pinObserver: any;
680
+ _pinFrame: number;
681
+ _pinProps: any[] | string[];
631
682
  _table: HTMLElement;
632
683
  _colgroup: HTMLElement;
633
684
  _thead: HTMLElement;
@@ -881,6 +932,24 @@ export declare class Table extends Component<TableOptions> {
881
932
  collapseAll(options?: {
882
933
  silent?: boolean;
883
934
  }): this;
935
+ /**
936
+ * Replaces the set of expanded branches in one render — the runtime counterpart of
937
+ * `hierarchy.expanded`, which is read at construction only, and what to call when restoring a
938
+ * saved state: a loop over `expandRow()` renders the body once per branch. Ids are compared as
939
+ * `rowId` returns them (`1` is not `'1'`); ids that are not in the data, or name a row without
940
+ * children, are dropped. A set equal to the current one renders nothing and fires nothing.
941
+ * @param {unknown[]|boolean} ids Branch ids to leave expanded; `true` expands every branch and
942
+ * `false` (or an empty array) collapses them all, as in `hierarchy.expanded`.
943
+ * @param {{silent?: boolean}} [options={}] Event behavior. When not silent, one `rowtoggle`
944
+ * event is emitted per branch whose state changed, after the render: the collapsed branches
945
+ * first, then the expanded ones, each in data order — the same events `expandAll()` and
946
+ * `collapseAll()` fire.
947
+ * @returns {this}
948
+ * @fires Table#rowtoggle
949
+ */
950
+ setExpanded(ids: unknown[] | boolean, options?: {
951
+ silent?: boolean;
952
+ }): this;
884
953
  /**
885
954
  * Returns expanded branch ids in current flat-data order.
886
955
  * @returns {unknown[]} Expanded branch ids.
@@ -1123,6 +1192,44 @@ export declare class Table extends Component<TableOptions> {
1123
1192
  _hierarchyColumn(): string | null;
1124
1193
  /** @returns {void} */
1125
1194
  _renderColumns(): void;
1195
+ /** @returns {number} Columns the table renders before the data columns: row handle, checkbox. */
1196
+ _structuralColumns(): number;
1197
+ /**
1198
+ * Marks a header or body cell as part of a pinned column. The offset is a reference to a custom
1199
+ * property on the scroll region, which `_measurePins()` keeps at the width of the pinned columns
1200
+ * before this one, so a row drawn later — a windowed table draws them all the time — needs no
1201
+ * measuring of its own.
1202
+ * @param {HTMLElement} cell Header or body cell.
1203
+ * @param {'start'|'end'} side Edge the column is pinned to.
1204
+ * @param {number} slot Position among the columns pinned to that edge, counted from the edge.
1205
+ * @param {boolean} [edge=false] Whether this is the pinned column next to the scrolling ones.
1206
+ * @returns {void}
1207
+ */
1208
+ _markPin(cell: HTMLElement, side: 'start' | 'end', slot: number, edge?: boolean): void;
1209
+ /**
1210
+ * Builds the header row that names column groups, or null when no visible column has a group.
1211
+ * One cell per run of adjacent columns sharing a group and a pin: a `<th scope="col">` spanning
1212
+ * the run, or a blank `<td>` above columns that belong to no group and above the structural
1213
+ * columns. Native `colspan` carries the span to assistive technology; the cells take no focus.
1214
+ * @returns {HTMLTableRowElement|null}
1215
+ */
1216
+ _renderGroupRow(): HTMLTableRowElement | null;
1217
+ /**
1218
+ * Follows the widths the pinned offsets are made of: the header cells of the pinned columns, and
1219
+ * the group row, whose height is where the column labels stick below it.
1220
+ * @returns {void}
1221
+ */
1222
+ _watchPins(): void;
1223
+ /** Measures the pinned offsets on the next frame. @returns {void} */
1224
+ _schedulePins(): void;
1225
+ /**
1226
+ * Writes where each pinned column sticks, as custom properties on the scroll region: the summed
1227
+ * width of the pinned columns between it and its edge. Also the room the pinned columns take on
1228
+ * each side, which pads the scroll region so a cell focused by keyboard scrolls clear of them,
1229
+ * and the height of the group row. A table that is not laid out keeps what it had.
1230
+ * @returns {void}
1231
+ */
1232
+ _measurePins(): void;
1126
1233
  /** @returns {void} */
1127
1234
  _renderHeader(): void;
1128
1235
  /** @returns {void} @fires Table#editcancel */
@@ -1414,12 +1521,15 @@ export declare class Table extends Component<TableOptions> {
1414
1521
  _emitDataChange(): void;
1415
1522
  }
1416
1523
  /**
1417
- * Row activation event.
1524
+ * Row activation event: a click on a row, or Enter on the focused row or cell. A click on a
1525
+ * control inside a cell — a button, link, field, `<label>`, an element with a widget role or in
1526
+ * the Tab order, editable content, or anything marked `data-zx-table-no-edit` — belongs to that
1527
+ * control and does not fire it, nor select the row in a `single` selection.
1418
1528
  * @event Table#rowclick
1419
1529
  * @type {CustomEvent<TableRowClickDetail>}
1420
1530
  */
1421
1531
  /**
1422
- * Row double-activation event.
1532
+ * Row double-activation event. Like `rowclick`, not fired for a control inside a cell.
1423
1533
  * @event Table#rowdblclick
1424
1534
  * @type {CustomEvent<TableRowClickDetail>}
1425
1535
  */
@@ -1712,6 +1822,13 @@ export declare function firstValidationError(values: Record<string, unknown>, co
1712
1822
  * @returns {TableVariant}
1713
1823
  */
1714
1824
  export declare function normalizeTableVariant(value: unknown): TableVariant;
1825
+ /**
1826
+ * What counts as a control inside a cell: native controls and links, a `<label>` (a click on one
1827
+ * is a click on its control), editable content, the ARIA widget roles, anything in the Tab order,
1828
+ * and anything the host marks with `data-zx-table-no-edit`. Zx controls rendered into a cell are
1829
+ * covered by the first and the last three: each is, or wraps, one of these.
1830
+ */
1831
+ export declare const TABLE_INTERACTIVE_SELECTOR: string;
1715
1832
  /**
1716
1833
  * Validates and shallow-clones table columns so stable-id APIs never mutate caller descriptors.
1717
1834
  * @param {unknown} columns Column descriptors.
@@ -1759,3 +1876,88 @@ export declare function reconcileTableColumnOrder(columns: TableColumn[], order:
1759
1876
  * @returns {string[]} Reordered copy, or an unchanged copy for unknown/same IDs.
1760
1877
  */
1761
1878
  export declare function moveTableColumn(order: string[], id: string, targetId: string, position?: 'before' | 'after'): string[];
1879
+ /** Narrowest an `fr` column gets when its `minWidth` does not say. */
1880
+ export declare const TABLE_FR_MIN_WIDTH = "5rem";
1881
+ /**
1882
+ * How the visible columns are sized: the table layout, the width of each `<col>`, and the
1883
+ * narrowest the table may get. Pure, so the decisions can be tested without a layout engine.
1884
+ *
1885
+ * `fr` columns become percentages in proportion to each other and switch the table to a fixed
1886
+ * layout, as a windowed table always is. In a fixed layout the columns with a CSS length keep it
1887
+ * and the `fr` columns share what is left — which in a narrow container is next to nothing. So the
1888
+ * table gets a minimum width: the lengths, plus enough for the `fr` column that needs the most
1889
+ * room to reach its floor at its share, and the scroll region scrolls inline below that. The floor
1890
+ * is the column's `minWidth`, or `TABLE_FR_MIN_WIDTH`; an `auto` column counts with its `minWidth`
1891
+ * when it has one, and percentage widths are left out of the sum.
1892
+ * @param {Array<Partial<TableColumn>>} columns Visible columns, in display order.
1893
+ * @param {{virtual?: boolean, structural?: number}} [options={}] Whether the table is windowed, and
1894
+ * how many control-height columns (row handle, checkbox) it renders before the data columns.
1895
+ * @returns {{layout: 'fixed'|'auto', widths: Array<string|null>, minInlineSize: string|null}}
1896
+ * `widths` holds one `<col>` width per column, null where the column has none.
1897
+ */
1898
+ export declare function tableColumnSizing(columns: Array<Partial<TableColumn>>, options?: {
1899
+ virtual?: boolean;
1900
+ structural?: number;
1901
+ }): {
1902
+ layout: 'fixed' | 'auto';
1903
+ widths: Array<string | null>;
1904
+ minInlineSize: string | null;
1905
+ };
1906
+ /**
1907
+ * The edge a column is pinned to.
1908
+ * @param {Partial<TableColumn>|null|undefined} column Column descriptor.
1909
+ * @returns {'start'|'end'|null} Null for an unpinned column and for any other value.
1910
+ */
1911
+ export declare function tableColumnPin(column: Partial<TableColumn> | null | undefined): 'start' | 'end' | null;
1912
+ /**
1913
+ * Where each pinned column sits among the columns pinned to its edge. A slot counts from the edge:
1914
+ * slot 0 at the start is the first pinned column in display order, slot 0 at the end the last. The
1915
+ * structural columns (row handle, selection checkbox) take the first start slots once any column
1916
+ * is pinned to the start, so they stay in view with it. The `edge` column of a side is the one next
1917
+ * to the scrolling columns — the last pinned to the start, the first pinned to the end — which is
1918
+ * where the dividing rule is drawn.
1919
+ * @param {Array<Partial<TableColumn>>} columns Visible columns, in display order.
1920
+ * @param {number} [structural=0] Structural columns rendered before them.
1921
+ * @returns {{start: number, end: number, structural: boolean,
1922
+ * columns: Map<string, {side: 'start'|'end', slot: number, edge: boolean}>}} Slots taken on each
1923
+ * side, whether the structural columns are pinned, and the placement of each pinned column by id.
1924
+ */
1925
+ export declare function tablePinLayout(columns: Array<Partial<TableColumn>>, structural?: number): {
1926
+ start: number;
1927
+ end: number;
1928
+ structural: boolean;
1929
+ columns: Map<string, {
1930
+ side: 'start' | 'end';
1931
+ slot: number;
1932
+ edge: boolean;
1933
+ }>;
1934
+ };
1935
+ /**
1936
+ * The cells of the header row that names column groups: one per run of adjacent columns sharing a
1937
+ * `group` and a `pin`, in display order, with a null label for a run that belongs to no group. A
1938
+ * run is split where the pin changes because a header cell sticks as a whole or not at all. Empty
1939
+ * when no column has a group, which is when the table renders no such row.
1940
+ * @param {Array<Partial<TableColumn>>} columns Visible columns, in display order.
1941
+ * @returns {Array<{label: string|null, pin: 'start'|'end'|null, columns: string[]}>} Runs; the
1942
+ * length of `columns` is the cell's `colspan`.
1943
+ */
1944
+ export declare function tableHeaderGroups(columns: Array<Partial<TableColumn>>): Array<{
1945
+ label: string | null;
1946
+ pin: 'start' | 'end' | null;
1947
+ columns: string[];
1948
+ }>;
1949
+ /**
1950
+ * What replacing the set of expanded branches changes. Ids that are not branches of the current
1951
+ * data are dropped, exactly as the table drops them from `hierarchy.expanded`.
1952
+ * @param {unknown[]} branchIds Ids of every row that has children, in data order.
1953
+ * @param {Set<unknown>} current Branches expanded now.
1954
+ * @param {unknown} ids Branches to leave expanded: an array (or any iterable) of ids, `true` for
1955
+ * every branch, anything else for none.
1956
+ * @returns {{expanded: Set<unknown>, opened: unknown[], closed: unknown[]}} The new set, and the
1957
+ * branches whose state changes, each in data order.
1958
+ */
1959
+ export declare function resolveExpandedChange(branchIds: unknown[], current: Set<unknown>, ids: unknown): {
1960
+ expanded: Set<unknown>;
1961
+ opened: unknown[];
1962
+ closed: unknown[];
1963
+ };