@zeyos/zx 5.7.0 → 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 (330) hide show
  1. package/CHANGELOG.md +330 -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 +48 -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 +15 -4
  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 +45 -8
  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 +31 -1
  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 +20 -6
  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/dom.d.ts +14 -0
  61. package/dist/types/core/drag-axis.d.ts +10 -5
  62. package/dist/types/core/export.d.ts +2 -2
  63. package/dist/types/core/format.d.ts +3 -1
  64. package/dist/types/core/icons.d.ts +36 -3
  65. package/dist/types/core/keyboard.d.ts +7 -3
  66. package/dist/types/core/messages.d.ts +3 -0
  67. package/dist/types/core/storage.d.ts +4 -3
  68. package/dist/types/core/util.d.ts +3 -1
  69. package/dist/types/elements/define.d.ts +5 -2
  70. package/dist/types/index.d.ts +6 -4
  71. package/dist/types/internal/agent-model.d.ts +99 -0
  72. package/dist/types/internal/app-rail.d.ts +37 -2
  73. package/dist/types/internal/collections.d.ts +18 -0
  74. package/dist/types/internal/menu-items.d.ts +27 -0
  75. package/dist/types/internal/overlay-content.d.ts +23 -0
  76. package/dist/types/internal/presence-loop.d.ts +5 -2
  77. package/dist/types/locales/index.d.ts +3 -0
  78. package/dist/types/zeyos/calendar.d.ts +43 -7
  79. package/dist/types/zeyos/connect.d.ts +4 -0
  80. package/dist/types/zeyos/form.d.ts +13 -5
  81. package/dist/types/zeyos/select.d.ts +5 -2
  82. package/dist/types/zeyos/table.d.ts +16 -8
  83. package/dist/types/zeyos/view.d.ts +2 -1
  84. package/dist/zx-zeyos.esm.js +3161 -515
  85. package/dist/zx-zeyos.esm.min.js +4 -4
  86. package/dist/zx.core.css +4 -0
  87. package/dist/zx.core.min.css +1 -1
  88. package/dist/zx.css +970 -57
  89. package/dist/zx.esm.js +6405 -2249
  90. package/dist/zx.esm.min.js +26 -26
  91. package/dist/zx.global.js +6405 -2249
  92. package/dist/zx.global.min.js +26 -26
  93. package/dist/zx.layered.css +972 -57
  94. package/dist/zx.layered.min.css +1 -1
  95. package/dist/zx.min.css +1 -1
  96. package/docs/agent-catalog.json +159 -1
  97. package/docs/agent-surfaces.md +21 -21
  98. package/docs/api.json +3154 -518
  99. package/docs/components/account-menu.md +24 -0
  100. package/docs/components/activity-item.md +23 -0
  101. package/docs/components/activity-list.md +28 -0
  102. package/docs/components/agent-avatar.md +59 -0
  103. package/docs/components/agent-thread.md +275 -0
  104. package/docs/components/app-icon.md +36 -0
  105. package/docs/components/app-sidebar.md +92 -0
  106. package/docs/components/approval-card.md +71 -0
  107. package/docs/components/aurora.md +34 -0
  108. package/docs/components/avatar.md +37 -0
  109. package/docs/components/badge.md +36 -0
  110. package/docs/components/block-view.md +34 -0
  111. package/docs/components/breadcrumb.md +20 -0
  112. package/docs/components/button.md +23 -0
  113. package/docs/components/calendar.md +68 -0
  114. package/docs/components/card-view.md +73 -0
  115. package/docs/components/card.md +25 -0
  116. package/docs/components/chart.md +109 -0
  117. package/docs/components/check-button.md +16 -0
  118. package/docs/components/checklist.md +19 -0
  119. package/docs/components/code-editor.md +38 -0
  120. package/docs/components/composer.md +107 -0
  121. package/docs/components/context-menu.md +32 -0
  122. package/docs/components/copy.md +37 -0
  123. package/docs/components/data-filter.md +16 -0
  124. package/docs/components/date-picker.md +31 -0
  125. package/docs/components/date-range.md +21 -0
  126. package/docs/components/datebox.md +31 -0
  127. package/docs/components/dialog.md +25 -0
  128. package/docs/components/dock.md +57 -0
  129. package/docs/components/dropdown.md +39 -0
  130. package/docs/components/elements.md +63 -0
  131. package/docs/components/empty-state.md +17 -0
  132. package/docs/components/entity-ref.md +26 -0
  133. package/docs/components/field-upload.md +18 -0
  134. package/docs/components/file-item.md +27 -0
  135. package/docs/components/file-list.md +23 -0
  136. package/docs/components/filter-panel.md +45 -0
  137. package/docs/components/filter.md +47 -0
  138. package/docs/components/finder.md +25 -0
  139. package/docs/components/form-widgets.md +42 -0
  140. package/docs/components/form.md +80 -0
  141. package/docs/components/grid.md +26 -0
  142. package/docs/components/groupbox.md +11 -0
  143. package/docs/components/helpers.md +359 -0
  144. package/docs/components/icons.md +87 -0
  145. package/docs/components/index.md +99 -0
  146. package/docs/components/kanban-view.md +42 -0
  147. package/docs/components/kbd.md +23 -0
  148. package/docs/components/kernel.md +41 -0
  149. package/docs/components/launcher.md +66 -0
  150. package/docs/components/layout.md +33 -0
  151. package/docs/components/list-toolbar.md +38 -0
  152. package/docs/components/loading.md +48 -0
  153. package/docs/components/menu-button.md +47 -0
  154. package/docs/components/message.md +76 -0
  155. package/docs/components/modal.md +27 -0
  156. package/docs/components/module-bar.md +71 -0
  157. package/docs/components/multi-value-editor.md +16 -0
  158. package/docs/components/navigation-bar.md +22 -0
  159. package/docs/components/number-field.md +34 -0
  160. package/docs/components/pagination.md +73 -0
  161. package/docs/components/panel.md +28 -0
  162. package/docs/components/prompt-starters.md +40 -0
  163. package/docs/components/prose.md +38 -0
  164. package/docs/components/questionnaire.md +115 -0
  165. package/docs/components/rating.md +19 -0
  166. package/docs/components/run-status.md +50 -0
  167. package/docs/components/run-trace.md +72 -0
  168. package/docs/components/search.md +11 -0
  169. package/docs/components/select.md +129 -0
  170. package/docs/components/sheet-stack.md +39 -0
  171. package/docs/components/sheet.md +77 -0
  172. package/docs/components/skeleton.md +27 -0
  173. package/docs/components/slider.md +29 -0
  174. package/docs/components/sort-control.md +21 -0
  175. package/docs/components/source-list.md +30 -0
  176. package/docs/components/split-view.md +12 -0
  177. package/docs/components/stat-tile.md +49 -0
  178. package/docs/components/stepper.md +27 -0
  179. package/docs/components/surface.md +152 -0
  180. package/docs/components/tabbox.md +33 -0
  181. package/docs/components/table-view.md +43 -0
  182. package/docs/components/table.md +232 -0
  183. package/docs/components/tag-picker.md +39 -0
  184. package/docs/components/timebox.md +16 -0
  185. package/docs/components/toggle.md +21 -0
  186. package/docs/components/tokens.md +82 -0
  187. package/docs/components/toolbar.md +26 -0
  188. package/docs/components/tooltip.md +16 -0
  189. package/docs/components/tree.md +48 -0
  190. package/docs/components/truncate.md +21 -0
  191. package/docs/components/value-list.md +14 -0
  192. package/docs/components/view-settings.md +56 -0
  193. package/docs/components/workspace-switcher.md +42 -0
  194. package/docs/components/zeyos.md +196 -0
  195. package/docs/llms-small.txt +299 -0
  196. package/docs/llms.md +725 -109
  197. package/docs/llms.txt +46 -19
  198. package/package.json +9 -4
  199. package/src/components/activity-item/activity-item.js +21 -2
  200. package/src/components/agent-avatar/agent-avatar.css +195 -0
  201. package/src/components/agent-avatar/agent-avatar.js +333 -0
  202. package/src/components/agent-avatar/agent-face.js +292 -0
  203. package/src/components/agent-thread/ag-ui.js +44 -11
  204. package/src/components/agent-thread/agent-thread.js +103 -11
  205. package/src/components/agent-thread/ui-message-stream.js +3 -1
  206. package/src/components/app-rail/app-rail.css +5 -0
  207. package/src/components/app-sidebar/app-sidebar.css +3 -0
  208. package/src/components/app-sidebar/app-sidebar.js +4 -3
  209. package/src/components/approval-card/approval-card.css +6 -0
  210. package/src/components/approval-card/approval-card.js +55 -7
  211. package/src/components/aurora/aurora.css +149 -14
  212. package/src/components/aurora/aurora.js +49 -6
  213. package/src/components/button/button.css +24 -11
  214. package/src/components/calendar/calendar.css +6 -2
  215. package/src/components/calendar/calendar.js +127 -47
  216. package/src/components/card-view/card-view.js +5 -6
  217. package/src/components/chart/chart.css +159 -1
  218. package/src/components/chart/chart.js +450 -62
  219. package/src/components/chart/color.js +297 -0
  220. package/src/components/chart/svg-adapter.js +576 -0
  221. package/src/components/chart/svg-geometry.js +323 -0
  222. package/src/components/check-button/check-button.js +3 -18
  223. package/src/components/checklist/checklist.css +9 -1
  224. package/src/components/checklist/checklist.js +105 -20
  225. package/src/components/checklist/field-adapter.js +6 -12
  226. package/src/components/code-editor/code-editor.css +33 -0
  227. package/src/components/code-editor/code-editor.js +97 -8
  228. package/src/components/code-editor/field-adapter.js +3 -0
  229. package/src/components/composer/composer.css +3 -0
  230. package/src/components/composer/composer.js +100 -22
  231. package/src/components/context-menu/context-menu.js +41 -5
  232. package/src/components/copy/copy-button.js +9 -1
  233. package/src/components/copy/copy-input.js +5 -0
  234. package/src/components/data-filter/filter-core.js +0 -1
  235. package/src/components/date-picker/date-picker.css +8 -0
  236. package/src/components/date-picker/date-picker.js +47 -8
  237. package/src/components/date-picker/date-range-picker.js +1 -1
  238. package/src/components/date-picker/month-picker.js +19 -3
  239. package/src/components/date-picker/time-picker.js +54 -19
  240. package/src/components/datebox/date-range-box.js +7 -3
  241. package/src/components/datebox/datebox.js +32 -6
  242. package/src/components/dialog/dialog.css +6 -0
  243. package/src/components/dialog/dialog.js +24 -33
  244. package/src/components/dropdown/dropdown.js +1 -18
  245. package/src/components/empty-state/empty-state.js +21 -2
  246. package/src/components/field/field.js +19 -3
  247. package/src/components/fieldset/fieldset.js +3 -1
  248. package/src/components/filter/filter.js +9 -0
  249. package/src/components/form/form.js +19 -2
  250. package/src/components/kanban-view/kanban-card.js +15 -2
  251. package/src/components/kanban-view/kanban-view.css +21 -0
  252. package/src/components/kanban-view/kanban-view.js +29 -16
  253. package/src/components/launcher/launcher.css +14 -0
  254. package/src/components/launcher/launcher.js +54 -9
  255. package/src/components/master-panel/master-panel.js +24 -22
  256. package/src/components/menu-button/menu-button.js +26 -4
  257. package/src/components/message/message.css +228 -29
  258. package/src/components/message/message.js +664 -30
  259. package/src/components/modal/modal.js +129 -30
  260. package/src/components/modal/native-dialog.js +91 -0
  261. package/src/components/module-bar/module-bar.css +3 -0
  262. package/src/components/module-bar/module-bar.js +17 -4
  263. package/src/components/multi-value-editor/multi-value-editor.css +7 -2
  264. package/src/components/multi-value-editor/multi-value-editor.js +3 -2
  265. package/src/components/navigation-bar/navigation-bar.js +13 -1
  266. package/src/components/number-field/field-adapter.js +3 -0
  267. package/src/components/number-field/number-field.js +70 -16
  268. package/src/components/pagination/pagination.css +26 -2
  269. package/src/components/pagination/pagination.js +551 -65
  270. package/src/components/prose/prose.js +7 -1
  271. package/src/components/rating/field-adapter.js +3 -0
  272. package/src/components/run-status/run-status.js +43 -3
  273. package/src/components/run-trace/run-trace.js +15 -7
  274. package/src/components/search/search.js +3 -18
  275. package/src/components/select/field-adapter.js +8 -1
  276. package/src/components/select/select.js +68 -13
  277. package/src/components/sheet/sheet.js +39 -13
  278. package/src/components/slider/field-adapter.js +3 -0
  279. package/src/components/slider/slider.js +4 -6
  280. package/src/components/stat-tile/stat-tile.js +24 -9
  281. package/src/components/stepper/stepper.css +15 -0
  282. package/src/components/stepper/stepper.js +34 -2
  283. package/src/components/surface/catalog.js +185 -28
  284. package/src/components/surface/surface.js +10 -5
  285. package/src/components/tabbox/tabbox.js +13 -1
  286. package/src/components/table/table.css +160 -2
  287. package/src/components/table/table.js +479 -52
  288. package/src/components/table/window.js +46 -4
  289. package/src/components/table-view/table-view.js +1 -10
  290. package/src/components/tag-picker/field-adapter.js +3 -0
  291. package/src/components/tag-picker/tag-picker.js +2 -0
  292. package/src/components/timebox/field-adapter.js +3 -0
  293. package/src/components/toggle/toggle.js +51 -27
  294. package/src/components/tooltip/tooltip.js +21 -14
  295. package/src/components/tree/tree.js +87 -14
  296. package/src/components/truncate/truncate.js +21 -5
  297. package/src/components/value-list/value-list.js +37 -9
  298. package/src/components/view-settings/view-settings.js +1 -5
  299. package/src/core/component.js +34 -2
  300. package/src/core/date.js +5 -4
  301. package/src/core/dom.js +45 -2
  302. package/src/core/drag-axis.js +24 -7
  303. package/src/core/export.js +4 -4
  304. package/src/core/fontawesome.js +34 -3
  305. package/src/core/format.js +3 -1
  306. package/src/core/http.js +23 -11
  307. package/src/core/icons.js +60 -8
  308. package/src/core/keyboard.js +83 -9
  309. package/src/core/messages.js +3 -0
  310. package/src/core/position.js +4 -3
  311. package/src/core/storage.js +80 -31
  312. package/src/core/util.js +16 -5
  313. package/src/elements/define.js +82 -47
  314. package/src/elements/kit.js +46 -35
  315. package/src/index.js +8 -4
  316. package/src/internal/agent-model.js +152 -0
  317. package/src/internal/app-rail.js +53 -2
  318. package/src/internal/collections.js +25 -0
  319. package/src/internal/menu-items.js +59 -0
  320. package/src/internal/overlay-content.js +35 -0
  321. package/src/internal/presence-loop.js +61 -14
  322. package/src/locales/de.js +3 -0
  323. package/src/zeyos/calendar.js +81 -19
  324. package/src/zeyos/connect.js +5 -1
  325. package/src/zeyos/form.js +29 -10
  326. package/src/zeyos/select.js +36 -12
  327. package/src/zeyos/table.js +43 -11
  328. package/src/zeyos/view.js +2 -1
  329. package/styles/tokens/semantic.css +7 -1
  330. package/styles/zx.css +1 -0
@@ -18,11 +18,7 @@ export type ContextMenuOptions = {
18
18
  /**
19
19
  * Selection listener.
20
20
  */
21
- onselect?: (event: CustomEvent<{
22
- value: unknown;
23
- item: MenuItem;
24
- context: Element | null;
25
- }>) => void;
21
+ onselect?: (event: CustomEvent<ContextMenuSelectDetail>) => void;
26
22
  /**
27
23
  * Open listener.
28
24
  */
@@ -34,6 +30,25 @@ export type ContextMenuOptions = {
34
30
  */
35
31
  onclose?: (event: CustomEvent<Record<string, never>>) => void;
36
32
  };
33
+ export type ContextMenuSelectDetail = {
34
+ /**
35
+ * The chosen item's value.
36
+ */
37
+ value: unknown;
38
+ /**
39
+ * The chosen item, as the application gave it.
40
+ */
41
+ item: MenuItem;
42
+ /**
43
+ * The element the menu was opened on.
44
+ */
45
+ context: Element | null;
46
+ /**
47
+ * For a `menuitemcheckbox` or `menuitemradio`, the state choosing it
48
+ * gives the item: a checkbox toggles, a radio is checked. Absent for a plain item.
49
+ */
50
+ checked?: boolean;
51
+ };
37
52
  /** @typedef {import('../../internal/menu-items.js').MenuItem} MenuItem */
38
53
  /**
39
54
  * A context menu's entries: the shared menu model without `choice` rows, which a menu that closes
@@ -49,11 +64,18 @@ export type ContextMenuOptions = {
49
64
  * @property {string|null} [selector=null] Restricts the menu to descendants matching this
50
65
  * selector, and reports the matched element as the context of the selection. A table passes
51
66
  * `'tbody tr'` here to get a per-row menu from one listener.
52
- * @property {(event: CustomEvent<{value: unknown, item: MenuItem, context: Element|null}>) => void} [onselect]
53
- * Selection listener.
67
+ * @property {(event: CustomEvent<ContextMenuSelectDetail>) => void} [onselect] Selection listener.
54
68
  * @property {(event: CustomEvent<{context: Element|null}>) => void} [onopen] Open listener.
55
69
  * @property {(event: CustomEvent<Record<string, never>>) => void} [onclose] Close listener.
56
70
  */
71
+ /**
72
+ * @typedef {Object} ContextMenuSelectDetail
73
+ * @property {unknown} value The chosen item's value.
74
+ * @property {MenuItem} item The chosen item, as the application gave it.
75
+ * @property {Element|null} context The element the menu was opened on.
76
+ * @property {boolean} [checked] For a `menuitemcheckbox` or `menuitemradio`, the state choosing it
77
+ * gives the item: a checkbox toggles, a radio is checked. Absent for a plain item.
78
+ */
57
79
  /**
58
80
  * Right-click menu for a region, implementing the APG menu pattern.
59
81
  *
@@ -67,6 +89,11 @@ export type ContextMenuOptions = {
67
89
  * menus are a common accessibility failure, so both routes are wired here rather than left to the
68
90
  * application.
69
91
  *
92
+ * Choosing a `menuitemcheckbox` toggles its `aria-checked`, and choosing a `menuitemradio` checks
93
+ * it and unchecks the other radio items of its section (between separators or headings); the new
94
+ * state arrives as `detail.checked`. A prevented `select` keeps the state as it was. Items given as
95
+ * a function are resolved again on every opening, so there the function's answer is the state.
96
+ *
70
97
  * Note that the component's root is the anchor, which lives on `<body>` — so the bubbling `zx-*`
71
98
  * DOM events land there, not in the target's tree. Listen with `on('select')` or `onselect`.
72
99
  *
@@ -135,8 +162,9 @@ export declare class ContextMenu extends Component<ContextMenuOptions> {
135
162
  }
136
163
  /**
137
164
  * Fired when an enabled item is activated. `context` is the element the menu was opened on.
165
+ * Preventing it keeps the menu open and a checkbox or radio item's state unchanged.
138
166
  * @event ContextMenu#select
139
- * @type {CustomEvent<{value: unknown, item: MenuItem, context: Element|null}>}
167
+ * @type {CustomEvent<ContextMenuSelectDetail>}
140
168
  */
141
169
  /**
142
170
  * Fired when the menu opens.
@@ -35,6 +35,12 @@ export type CopyButtonOptions = {
35
35
  * the clipboard accepted it.
36
36
  */
37
37
  oncopy?: (text: string, copied: boolean) => void;
38
+ /**
39
+ * Ends the button's life: aborting removes its click listener,
40
+ * stops a pending confirmation, and makes a copy still waiting on the clipboard report nothing.
41
+ * For a button owned by something that is destroyed before the page is.
42
+ */
43
+ signal?: AbortSignal;
38
44
  };
39
45
  /**
40
46
  * Creates a button that copies a string and confirms it in place.
@@ -60,6 +60,7 @@ export type CopyInputOptions = {
60
60
  export declare class CopyInput extends Component<CopyInputOptions> {
61
61
  _createdRoot: boolean;
62
62
  _snapshot: import("../../core/dom.js").TargetSnapshot;
63
+ _buttonLife: AbortController;
63
64
  static cssName: string;
64
65
  /** @type {CopyInputOptions} */
65
66
  static defaults: CopyInputOptions;
@@ -143,3 +143,17 @@ export declare class DatePicker extends Component<DatePickerOptions> {
143
143
  */
144
144
  _message(key: string, fallback: string, ...args: unknown[]): string;
145
145
  }
146
+ /**
147
+ * ISO 8601 week number of a local calendar day.
148
+ * @param {Date} date Any time on the day.
149
+ * @returns {number}
150
+ */
151
+ export declare function isoWeekNumber(date: Date): number;
152
+ /**
153
+ * ISO week number for a calendar row of seven days starting on `rowStart`. A row that does not
154
+ * start on Monday straddles two ISO weeks; its Thursday always falls in the week that holds most of
155
+ * the row (for a Sunday start, Monday to Saturday), which is the week the row is labelled with.
156
+ * @param {Date} rowStart First day of the row.
157
+ * @returns {number}
158
+ */
159
+ export declare function rowWeekNumber(rowStart: Date): number;
@@ -46,16 +46,8 @@ export type ClockMark = {
46
46
  * @extends {Component<TimePickerOptions>}
47
47
  */
48
48
  export declare class TimePicker extends Component<TimePickerOptions> {
49
- _value: TimePickerValue | {
50
- h: number;
51
- m: number;
52
- s: number;
53
- };
54
- _display: TimePickerValue | {
55
- h: number;
56
- m: number;
57
- s: number;
58
- };
49
+ _value: any;
50
+ _display: any;
59
51
  _inputs: any[];
60
52
  _clockOpen: boolean;
61
53
  /** @type {ClockUnit} */
@@ -110,20 +102,28 @@ export declare class TimePicker extends Component<TimePickerOptions> {
110
102
  */
111
103
  _buildClock(id: string): HTMLElement;
112
104
  /**
113
- * Applies a mark's value to the active unit, then moves on to the minutes so a whole time can
114
- * be set with two clicks.
105
+ * Applies a mark's value to the active unit. An explicit pick (click, Enter, Space) of an hour
106
+ * then moves on to the minutes so a whole time can be set with two clicks; arrowing through the
107
+ * radio group passes `advance: false` and stays on the dial it is in.
115
108
  * @param {number} value Hour or minute the mark stands for.
109
+ * @param {{advance?: boolean}} [options={}] Whether an hour pick opens the minute dial.
116
110
  * @returns {void}
117
111
  */
118
- _pick(value: number): void;
112
+ _pick(value: number, { advance }?: {
113
+ advance?: boolean;
114
+ }): void;
119
115
  /** @param {KeyboardEvent} event @returns {void} */
120
116
  _onDialKeydown(event: KeyboardEvent): void;
121
117
  /** Reflects the open state, the active unit, the marks, and the hand. @returns {void} */
122
118
  _syncClock(): void;
123
- /** @param {ClockMark} mark @param {number} selected @returns {HTMLElement} */
124
- _buildMark(mark: ClockMark, selected: number): HTMLElement;
125
- /** @param {HTMLElement} element @param {ClockMark} mark @param {number} selected @returns {void} */
126
- _syncMark(element: HTMLElement, mark: ClockMark, selected: number): void;
119
+ /** @param {ClockMark} mark @param {number} selected @param {number} stop @returns {HTMLElement} */
120
+ _buildMark(mark: ClockMark, selected: number, stop: number): HTMLElement;
121
+ /**
122
+ * @param {HTMLElement} element @param {ClockMark} mark @param {number} selected
123
+ * @param {number} stop Value of the one mark in the Tab order.
124
+ * @returns {void}
125
+ */
126
+ _syncMark(element: HTMLElement, mark: ClockMark, selected: number, stop: number): void;
127
127
  /**
128
128
  * Resolves a message through the host translator, falling back to the built-in English text.
129
129
  * @param {string} key Message key.
@@ -132,3 +132,12 @@ export declare class TimePicker extends Component<TimePickerOptions> {
132
132
  */
133
133
  _message(key: string, fallback: string): string;
134
134
  }
135
+ /**
136
+ * The mark that takes the dial's Tab stop: the checked one, or — when the value falls between
137
+ * marks, as 12:07 does on a five-minute dial — the nearest, so the group is always reachable.
138
+ * @param {ClockMark[]} marks Marks on the dial.
139
+ * @param {number} selected Current hour or minute.
140
+ * @param {number} cycle Values around the dial (24 or 60).
141
+ * @returns {number}
142
+ */
143
+ export declare function tabStop(marks: ClockMark[], selected: number, cycle: number): number;
@@ -21,11 +21,13 @@ export type DateboxOptions = {
21
21
  */
22
22
  time?: boolean;
23
23
  /**
24
- * Earliest selectable date.
24
+ * Earliest selectable date. Bounds are whole local calendar days,
25
+ * as in the calendar: with `time`, any time on the `min` day is allowed.
25
26
  */
26
27
  min?: Date | null;
27
28
  /**
28
- * Latest selectable date.
29
+ * Latest selectable date, the whole local calendar day: with
30
+ * `time`, any time on the `max` day is allowed.
29
31
  */
30
32
  max?: Date | null;
31
33
  /**
@@ -75,8 +77,10 @@ export type DateboxUnit = 'date' | 'seconds';
75
77
  * so a date reads as the rest of the screen writes dates. It is never parsed, so it may use any
76
78
  * `formatDate()` token, month and weekday names included. Null shows `format`.
77
79
  * @property {boolean} [time=false] Append `%H:%M` and show time controls.
78
- * @property {Date|null} [min=null] Earliest selectable date.
79
- * @property {Date|null} [max=null] Latest selectable date.
80
+ * @property {Date|null} [min=null] Earliest selectable date. Bounds are whole local calendar days,
81
+ * as in the calendar: with `time`, any time on the `min` day is allowed.
82
+ * @property {Date|null} [max=null] Latest selectable date, the whole local calendar day: with
83
+ * `time`, any time on the `max` day is allowed.
80
84
  * @property {string|null} [placeholder=null] Input placeholder; null derives one from the format.
81
85
  * @property {boolean} [clearable=true] Show a clear button while a value is present and the box is
82
86
  * enabled; without it the input keeps no room for one.
@@ -40,7 +40,7 @@ export type DialogOptions = {
40
40
  */
41
41
  buttons?: DialogButton[];
42
42
  /**
43
- * Whether Escape and the header button may close the dialog.
43
+ * Whether Escape and the header button may close the dialog. When false the header button is not rendered as a control at all: it is not displayed, not focusable, and closes nothing.
44
44
  */
45
45
  closable?: boolean;
46
46
  /**
@@ -66,7 +66,7 @@ export type DialogOptions = {
66
66
  /**
67
67
  * Cancel event listener.
68
68
  */
69
- oncancel?: (event: CustomEvent<Record<string, never>>) => void;
69
+ oncancel?: (event: CustomEvent<import('../modal/modal.js').ModalCancelDetail>) => void;
70
70
  };
71
71
  export type DialogViewOptions = {
72
72
  /**
@@ -187,12 +187,12 @@ export type PromptOptions = {
187
187
  * @property {string} [title=''] Dialog title.
188
188
  * @property {'sm'|'md'|'lg'|number} [size='md'] Preset or pixel width.
189
189
  * @property {DialogButton[]} [buttons=[]] Footer buttons.
190
- * @property {boolean} [closable=true] Whether Escape and the header button may close the dialog.
190
+ * @property {boolean} [closable=true] Whether Escape and the header button may close the dialog. When false the header button is not rendered as a control at all: it is not displayed, not focusable, and closes nothing.
191
191
  * @property {Node|string|number|{toElement: () => Node|null}|null} [content=null] Body content.
192
192
  * @property {Element|string|null} [scope=null] Element whose nearest Zx theme scope owns the overlay; defaults to the opener. Resolved on every open, so a scope connected after construction still owns it.
193
193
  * @property {(event: CustomEvent<Record<string, never>>) => void} [onopen] Open event listener.
194
194
  * @property {(event: CustomEvent<{result: unknown}>) => void} [onclose] Close event listener.
195
- * @property {(event: CustomEvent<Record<string, never>>) => void} [oncancel] Cancel event listener.
195
+ * @property {(event: CustomEvent<import('../modal/modal.js').ModalCancelDetail>) => void} [oncancel] Cancel event listener.
196
196
  */
197
197
  /**
198
198
  * @typedef {Object} DialogViewOptions
@@ -320,6 +320,17 @@ export declare class Dialog extends Modal {
320
320
  * @returns {Promise<string|null>}
321
321
  */
322
322
  static prompt({ title, message, value, placeholder, okLabel, cancelLabel }?: PromptOptions): Promise<string | null>;
323
+ /**
324
+ * Whether the header close button is offered. Switched off, it is not displayed, not focusable,
325
+ * and does not dismiss the dialog. A dialog shows it while it is `closable`; a subclass with a
326
+ * setting of its own for the button overrides this.
327
+ *
328
+ * Called from the constructor before any subclass field initializers have run, so an override
329
+ * may read `this.options` but no instance state.
330
+ * @returns {boolean}
331
+ * @protected
332
+ */
333
+ protected _hasCloseButton(): boolean;
323
334
  /**
324
335
  * Applies the dialog width. Subclasses that size themselves on a different axis override this.
325
336
  *
@@ -1,9 +1,18 @@
1
1
  export type ButtonOptions = import('../button/button.js').ButtonOptions;
2
+ export type AgentFace = import('../../internal/agent-model.js').AgentFace;
2
3
  export type EmptyStateOptions = {
3
4
  /**
4
5
  * Decorative icon name; null renders no icon.
5
6
  */
6
7
  icon?: string | null;
8
+ /**
9
+ * Draws an agent's face in place of the icon — an empty
10
+ * conversation, an agent with nothing to do yet: its AgentAvatar traits and name, or `true` to
11
+ * derive the face from the title. The face is keyed by the agent's `seed`, else its `name`, else
12
+ * the title; give the agent's seed or name so its face matches the one drawn elsewhere.
13
+ * Decorative and at rest, so the text says whose it is.
14
+ */
15
+ agent?: AgentFace | true | null;
7
16
  /**
8
17
  * Headline text, rendered as a paragraph so page outlines stay intact.
9
18
  */
@@ -28,7 +37,7 @@ export type EmptyStateOptions = {
28
37
  /**
29
38
  * Creates the placeholder shown where a list, table, or panel has no content yet.
30
39
  *
31
- * Purely presentational: the icon is decorative, the headline is a paragraph rather than a heading
40
+ * Purely presentational: the icon — or an agent's face — is decorative, the headline is a paragraph rather than a heading
32
41
  * so dropping the element into a Table's empty slot or a Panel body never disturbs the page's
33
42
  * heading outline.
34
43
  *
@@ -107,7 +107,8 @@ export type FieldAdapter = {
107
107
  destroy?: () => void;
108
108
  /**
109
109
  * The element the field's label, description, and validity
110
- * belong to when it is not `el` — the text input inside a composite control. Left out, a
110
+ * belong to when it is not `el` — the text input inside a composite control. The field's label
111
+ * names it through `aria-labelledby`, over any name the component gave it. Left out, a
111
112
  * wrapper that cannot be labelled hands them to the first unnamed form control inside it.
112
113
  */
113
114
  labelTarget?: Element;
@@ -151,7 +152,8 @@ export type NumericCoercion = {
151
152
  * control has none.
152
153
  * @property {() => void} [destroy] Release adapter-owned resources.
153
154
  * @property {Element} [labelTarget] The element the field's label, description, and validity
154
- * belong to when it is not `el` — the text input inside a composite control. Left out, a
155
+ * belong to when it is not `el` — the text input inside a composite control. The field's label
156
+ * names it through `aria-labelledby`, over any name the component gave it. Left out, a
155
157
  * wrapper that cannot be labelled hands them to the first unnamed form control inside it.
156
158
  */
157
159
  /** @typedef {(field: Field, options: Readonly<FieldOptions>) => FieldAdapter} FieldAdapterFactory */
@@ -199,7 +199,8 @@ export declare class Form extends Component<FormOptions> {
199
199
  */
200
200
  clearHighlights(): this;
201
201
  /**
202
- * Validates and emits a preventable submit event.
202
+ * Validates and emits a preventable submit event. A disabled field — disabled itself, or inside
203
+ * a disabled `<fieldset>` — is not validated, so it can neither block the submit nor take focus.
203
204
  * @returns {boolean} True when valid and not prevented.
204
205
  * @fires Form#submit
205
206
  * @fires Form#invalid
@@ -58,6 +58,12 @@ export type KanbanAssignee = {
58
58
  * person has in every Avatar.
59
59
  */
60
60
  tone: import('../avatar/avatar.js').AvatarTone;
61
+ /**
62
+ * An agent's face traits — `seed`, `tone`, `body`,
63
+ * `eyes`, `material` — when the descriptor carries `face`; the card draws its AgentAvatar instead of
64
+ * initials or a picture.
65
+ */
66
+ face: Record<string, string> | null;
61
67
  };
62
68
  /**
63
69
  * Normalizes one indicator value into the descriptor the badge is built from. A plain value
@@ -96,6 +102,7 @@ export declare function createKanbanProgress(progress: KanbanProgress, label: st
96
102
  * resolve to the same shape, and an unsafe image URL degrades to initials rather than failing.
97
103
  * A descriptor may name its `tone`; otherwise the tone is derived from the name exactly as Avatar
98
104
  * derives it.
105
+ * A descriptor with `face` (AgentAvatar traits, or `true`) is an agent, drawn as its face.
99
106
  * @param {unknown} value Raw field value.
100
107
  * @returns {KanbanAssignee[]} Normalized people, in the order supplied.
101
108
  */
@@ -371,7 +371,9 @@ export type KanbanViewOptions = {
371
371
  */
372
372
  progressMax?: number;
373
373
  /**
374
- * Responsible people; a name, a list, or descriptors.
374
+ * Responsible people; a name, a list, or descriptors
375
+ * (`{name, src?, initials?, tone?}`). A descriptor with `face` — AgentAvatar traits, or `true` —
376
+ * is an agent, drawn as its generated face.
375
377
  */
376
378
  assignees?: KanbanCardField;
377
379
  /**
@@ -532,6 +534,7 @@ export type KanbanSectionMeta = {
532
534
  export type KanbanKeyboardMove = {
533
535
  ids: unknown[];
534
536
  from: KanbanMovePoint;
537
+ origin: KanbanMovePoint;
535
538
  to: KanbanMovePoint;
536
539
  };
537
540
  export type KanbanCardReader = ((record: KanbanRecord, index: number) => unknown) | null;
@@ -607,6 +610,11 @@ export declare class KanbanView extends RecordView {
607
610
  lane: string | null;
608
611
  index: number;
609
612
  };
613
+ origin: {
614
+ column: string;
615
+ lane: string | null;
616
+ index: number;
617
+ };
610
618
  to: {
611
619
  column: string;
612
620
  lane: string | null;
@@ -1188,8 +1196,12 @@ export declare class KanbanView extends RecordView {
1188
1196
  _draggableCards(list: HTMLElement): HTMLElement[];
1189
1197
  /** @param {string} column @param {string|null} lane @param {Set<unknown>} excluded @returns {number} */
1190
1198
  _visibleCount(column: string, lane: string | null, excluded: Set<unknown>): number;
1191
- /** @param {unknown} id Record id. @returns {number} Position among visible cards in its bucket. */
1192
- _visibleIndex(id: unknown): number;
1199
+ /**
1200
+ * @param {unknown} id Record id.
1201
+ * @param {Set<unknown>} [excluded] Cards that do not count, such as the others moving with it.
1202
+ * @returns {number} Position among the visible cards in its bucket.
1203
+ */
1204
+ _visibleIndex(id: unknown, excluded?: Set<unknown>): number;
1193
1205
  /** @returns {void} */
1194
1206
  _syncKeyboardTarget(): void;
1195
1207
  /** @returns {void} */
@@ -1,4 +1,5 @@
1
1
  import { Component } from '../../core/component.js';
2
+ import { AgentAvatar } from '../agent-avatar/agent-avatar.js';
2
3
  export type LauncherItem = {
3
4
  /**
4
5
  * Stable item identifier.
@@ -24,6 +25,12 @@ export type LauncherItem = {
24
25
  * Decorative icon name, node, or factory.
25
26
  */
26
27
  icon?: string | Node | ((item: LauncherItem) => Node | null);
28
+ /**
29
+ * Draws the item as an
30
+ * agent: its AgentAvatar, still, in place of `icon` — these options, or `true` to derive it from
31
+ * the label. An activity's word joins the option's accessible name.
32
+ */
33
+ agent?: import('../../internal/app-rail.js').AppNavAgent | true;
27
34
  /**
28
35
  * Compact metadata.
29
36
  */
@@ -295,6 +302,9 @@ export type LauncherPageEntry = {
295
302
  * @property {string|string[]} [keywords] Additional search text.
296
303
  * @property {string} [group] Result group.
297
304
  * @property {string|Node|((item: LauncherItem) => Node|null)} [icon] Decorative icon name, node, or factory.
305
+ * @property {import('../../internal/app-rail.js').AppNavAgent|true} [agent] Draws the item as an
306
+ * agent: its AgentAvatar, still, in place of `icon` — these options, or `true` to derive it from
307
+ * the label. An activity's word joins the option's accessible name.
298
308
  * @property {string|number} [badge] Compact metadata.
299
309
  * @property {string|number} [hint] Muted text at the end of the row, such as a current value or a project.
300
310
  * @property {string|string[]|{label: string|string[], keys?: string}} [shortcut] Key labels drawn as
@@ -399,6 +409,15 @@ export type LauncherPageEntry = {
399
409
  */
400
410
  export declare class Launcher extends Component<LauncherOptions> {
401
411
  _createdRoot: boolean;
412
+ /**
413
+ * The faces of agent items, one per item id, reused while results redraw on every keystroke and
414
+ * destroyed with the launcher.
415
+ * @type {Map<string, {signature: string, avatar: AgentAvatar}>}
416
+ */
417
+ _agentFaces: Map<string, {
418
+ signature: string;
419
+ avatar: AgentAvatar;
420
+ }>;
402
421
  /** @type {import('../../core/overlay-stack.js').OverlayHandle|null} Entry on the overlay stack while open. */
403
422
  _overlay: import('../../core/overlay-stack.js').OverlayHandle | null;
404
423
  _original: {
@@ -556,6 +575,13 @@ export declare class Launcher extends Component<LauncherOptions> {
556
575
  _renderResults(): void;
557
576
  /** @param {RankedLauncherItem} item @param {number} index @returns {HTMLElement} */
558
577
  _option(item: RankedLauncherItem, index: number): HTMLElement;
578
+ /**
579
+ * The AgentAvatar an agent item draws, kept per item id and rebuilt only when the item changes.
580
+ * @private
581
+ * @param {LauncherItem} item
582
+ * @returns {AgentAvatar|null}
583
+ */
584
+ private _agentFace;
559
585
  /** @returns {void} */
560
586
  _renderStatus(): void;
561
587
  /** @returns {void} */
@@ -67,11 +67,10 @@ export type MasterPanelOptions = {
67
67
  */
68
68
  export declare class MasterPanel extends Component<MasterPanelOptions> {
69
69
  _createdRoot: boolean;
70
- _original: {
71
- attributes: Array<[string, string]>;
72
- children: Node[];
73
- };
70
+ _snapshot: import("../../core/dom.js").TargetSnapshot;
74
71
  _cleaned: boolean;
72
+ /** @type {WeakMap<Element, (event: MouseEvent) => void>} Click callbacks of descriptor buttons. */
73
+ _clicks: WeakMap<Element, (event: MouseEvent) => void>;
75
74
  static cssName: string;
76
75
  /** @type {Readonly<MasterPanelOptions>} */
77
76
  static defaults: Readonly<MasterPanelOptions>;
@@ -109,4 +108,10 @@ export declare class MasterPanel extends Component<MasterPanelOptions> {
109
108
  setFooter(content: MasterPanelContent): this;
110
109
  /** @returns {void} */
111
110
  destroy(): void;
111
+ /**
112
+ * Runs the callback of the descriptor button a click landed in, with the button as `this`.
113
+ * @param {MouseEvent} event Click inside the action area.
114
+ * @returns {void}
115
+ */
116
+ _onButtonClick(event: MouseEvent): void;
112
117
  }
@@ -25,10 +25,7 @@ export type MenuButtonOptions = {
25
25
  /**
26
26
  * Select event listener.
27
27
  */
28
- onselect?: (event: CustomEvent<{
29
- value: unknown;
30
- item: MenuItem;
31
- }>) => void;
28
+ onselect?: (event: CustomEvent<MenuButtonSelectDetail>) => void;
32
29
  /**
33
30
  * Open event listener.
34
31
  */
@@ -38,6 +35,21 @@ export type MenuButtonOptions = {
38
35
  */
39
36
  onclose?: (event: CustomEvent<Record<string, never>>) => void;
40
37
  };
38
+ export type MenuButtonSelectDetail = {
39
+ /**
40
+ * The chosen item's value.
41
+ */
42
+ value: unknown;
43
+ /**
44
+ * The chosen item, as the application gave it.
45
+ */
46
+ item: MenuItem;
47
+ /**
48
+ * For a `menuitemcheckbox` or `menuitemradio`, the state choosing it
49
+ * gives the item: a checkbox toggles, a radio is checked. Absent for a plain item.
50
+ */
51
+ checked?: boolean;
52
+ };
41
53
  export type MenuButtonOpenOptions = {
42
54
  /**
43
55
  * Where focus goes when this opening ends with a
@@ -55,10 +67,17 @@ export type MenuButtonOpenOptions = {
55
67
  * @property {'default'|'primary'|'danger'|'ghost'} [kind='default'] Trigger button kind.
56
68
  * @property {MenuButtonItem[]} [items=[]] Menu items and separators.
57
69
  * @property {'bottom-start'|'bottom-end'|'top-start'|'top-end'|'bottom'|'top'|'right-start'|'right-end'|'left-start'|'left-end'|'right'|'left'} [placement='bottom-start'] Menu placement.
58
- * @property {(event: CustomEvent<{value: unknown, item: MenuItem}>) => void} [onselect] Select event listener.
70
+ * @property {(event: CustomEvent<MenuButtonSelectDetail>) => void} [onselect] Select event listener.
59
71
  * @property {(event: CustomEvent<Record<string, never>>) => void} [onopen] Open event listener.
60
72
  * @property {(event: CustomEvent<Record<string, never>>) => void} [onclose] Close event listener.
61
73
  */
74
+ /**
75
+ * @typedef {Object} MenuButtonSelectDetail
76
+ * @property {unknown} value The chosen item's value.
77
+ * @property {MenuItem} item The chosen item, as the application gave it.
78
+ * @property {boolean} [checked] For a `menuitemcheckbox` or `menuitemradio`, the state choosing it
79
+ * gives the item: a checkbox toggles, a radio is checked. Absent for a plain item.
80
+ */
62
81
  /**
63
82
  * @typedef {Object} MenuButtonOpenOptions
64
83
  * @property {boolean|HTMLElement} [returnFocus=true] Where focus goes when this opening ends with a
@@ -71,6 +90,11 @@ export type MenuButtonOpenOptions = {
71
90
  * Choosing an item closes the menu and puts focus back on the trigger before the `select` event
72
91
  * and the item's `onselect` run, so whatever they open — a dialog, a sheet — records the trigger
73
92
  * as the place to return to, and focus they move themselves stays where they put it.
93
+ *
94
+ * Choosing a `menuitemcheckbox` toggles its `aria-checked`, and choosing a `menuitemradio` checks
95
+ * it and unchecks the other radio items of its section (between separators or headings); the new
96
+ * state arrives as `detail.checked`. A `select` listener that prevents the event keeps the state as
97
+ * it was, and one that calls `setItems()` renders the state it wants instead.
74
98
  * @fires MenuButton#select
75
99
  * @fires MenuButton#open
76
100
  * @fires MenuButton#close