@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
@@ -0,0 +1,165 @@
1
+ import { Component } from '../../core/component.js';
2
+ export { AGENT_BODIES, AGENT_EYES, agentFace, agentTraits } from './agent-face.js';
3
+ export type AgentBody = import('./agent-face.js').AgentBody;
4
+ export type AgentEyes = import('./agent-face.js').AgentEyes;
5
+ export type AgentTraits = import('./agent-face.js').AgentTraits;
6
+ export type AgentShape = import('./agent-face.js').AgentShape;
7
+ export type AvatarTone = import('../avatar/avatar.js').AvatarTone;
8
+ export type AgentActivity = import('../../internal/agent-model.js').AgentActivity;
9
+ export type AgentMaterial = 'flat' | 'soft';
10
+ export type AgentAvatarOptions = {
11
+ /**
12
+ * The agent's stable identity — an id. Every trait is derived
13
+ * from it, so renaming an agent does not change its face. `null` uses `name`.
14
+ */
15
+ seed?: string | null;
16
+ /**
17
+ * The agent's name; the seed when `seed` is null.
18
+ */
19
+ name?: string;
20
+ /**
21
+ * Colour from the tone palette; `null` derives it from the
22
+ * seed with `avatarTone()`, so the face matches an initials tile keyed the same way.
23
+ */
24
+ tone?: AvatarTone | null;
25
+ /**
26
+ * The silhouette, instead of the derived one: one of the
27
+ * fourteen in {@link AGENT_BODIES}.
28
+ */
29
+ body?: AgentBody | null;
30
+ /**
31
+ * The eye shape, instead of the derived one.
32
+ */
33
+ eyes?: AgentEyes | null;
34
+ /**
35
+ * How far apart the eyes sit — narrow, middle, wide —
36
+ * instead of the derived spacing. With `tone`, `body` and `eyes` it gives back a look kept from
37
+ * {@link AgentAvatar#getTraits}.
38
+ */
39
+ spacing?: 0 | 1 | 2 | null;
40
+ /**
41
+ * How the body is painted. `flat` is the tone's solid
42
+ * fill; `soft` adds a quiet vertical ramp — a touch lighter at the top, deeper at the foot, the plain
43
+ * tone across the eyes — from 28px up. Below 28px, when offline, in print and in forced colours a
44
+ * soft body is drawn flat.
45
+ */
46
+ material?: AgentMaterial;
47
+ /**
48
+ * Preset — `sm` 24px, `md` 32px, `lg` 40px at the default
49
+ * spacing unit — or a pixel size. Small sizes draw less: no pupils below 20px, larger eyes at 24px
50
+ * and below.
51
+ */
52
+ size?: string | number;
53
+ /**
54
+ * Accessible label; null makes the avatar decorative.
55
+ */
56
+ label?: string | null;
57
+ /**
58
+ * What the agent is doing. The eyes take the
59
+ * activity's expression, the activity dot shows it, and its word joins the accessible name.
60
+ */
61
+ activity?: AgentActivity | null;
62
+ /**
63
+ * The activity's word, when the default is not the one
64
+ * to show.
65
+ */
66
+ activityLabel?: string | null;
67
+ /**
68
+ * Whether to draw the activity dot. Without it, show the
69
+ * activity's word nearby: the expression alone is a weaker signal.
70
+ */
71
+ indicator?: boolean;
72
+ /**
73
+ * Moves the avatar with its activity in the shared presence loop
74
+ * (as Avatar does) and lets its eyes blink, drift and scan. Motion is never the only signal and
75
+ * stops under reduced motion. While it is on, the root's `transform` belongs to the loop.
76
+ */
77
+ animate?: boolean;
78
+ /**
79
+ * Where in its activity's cycle the avatar moves, as a fraction
80
+ * from 0 up to 1. `null` derives one from the seed.
81
+ */
82
+ phase?: number | null;
83
+ /**
84
+ * Localized
85
+ * messages: the activity words, `agent.activity.<activity>`.
86
+ */
87
+ msg?: Record<string, string> | Record<string, Record<string, string>>;
88
+ };
89
+ /**
90
+ * A generated face for an agent without a picture: a coloured geometric silhouette with eyes that
91
+ * take the agent's activity, deterministic from the agent's seed.
92
+ * @extends {Component<AgentAvatarOptions>}
93
+ */
94
+ export declare class AgentAvatar extends Component<AgentAvatarOptions> {
95
+ _createdRoot: boolean;
96
+ _original: import("../../core/dom.js").TargetSnapshot;
97
+ /** @type {Record<string, any>} */
98
+ _state: Record<string, any>;
99
+ /** @type {AgentTraits|null} */
100
+ _traits: AgentTraits | null;
101
+ /** A document-unique id for the soft ramp, so two avatars never share a paint server. */
102
+ _paintId: string;
103
+ _destroyed: boolean;
104
+ /** @type {import('../../internal/presence-loop.js').PresenceHandle|null} */
105
+ _presence: import('../../internal/presence-loop.js').PresenceHandle | null;
106
+ static cssName: string;
107
+ /** @type {Readonly<AgentAvatarOptions>} */
108
+ static defaults: Readonly<AgentAvatarOptions>;
109
+ /** @returns {HTMLElement} */
110
+ render(): HTMLElement;
111
+ /**
112
+ * Replaces identity and presentation values: any option but `msg`.
113
+ * @param {Partial<AgentAvatarOptions>} values New values.
114
+ * @returns {this}
115
+ */
116
+ set(values?: Partial<AgentAvatarOptions>): this;
117
+ /**
118
+ * Sets what the agent is doing and, optionally, the word for it. `null` clears the activity.
119
+ * @param {AgentActivity|null} activity
120
+ * @param {string|null} [label=null] The word, when the default is not the one to show.
121
+ * @returns {this}
122
+ */
123
+ setActivity(activity: AgentActivity | null, label?: string | null): this;
124
+ /**
125
+ * What the agent is doing.
126
+ * @returns {AgentActivity|null} The activity, or null without one.
127
+ */
128
+ getActivity(): AgentActivity | null;
129
+ /**
130
+ * The localized word for the current activity — `activityLabel` when set — or null without an
131
+ * activity. A host that draws the avatar inside a control of its own adds it to that control's
132
+ * name, as AppSidebar and ModuleBar do.
133
+ * @returns {string|null}
134
+ */
135
+ getActivityWord(): string | null;
136
+ /**
137
+ * The traits the face is drawn from, so an application can store them — to keep a look across a
138
+ * rename, or to settle a collision between two agents once — and give them back as the `tone`,
139
+ * `body`, `eyes` and `spacing` options.
140
+ * @returns {AgentTraits}
141
+ */
142
+ getTraits(): AgentTraits;
143
+ /**
144
+ * Leaves the presence loop and restores an enhanced target or removes an owned root. Safe to call
145
+ * more than once: only the first call restores, so a target its owner has reused is left alone.
146
+ * @returns {void}
147
+ */
148
+ destroy(): void;
149
+ /** @returns {AgentTraits} */
150
+ _resolveTraits(): AgentTraits;
151
+ /** @returns {number} The rendered size the level of detail is picked for. */
152
+ _px(): number;
153
+ /** @returns {void} */
154
+ _sync(): void;
155
+ /** The word for the current activity, or null without one. @returns {string|null} */
156
+ _activityWord(): string | null;
157
+ /**
158
+ * Joins, follows, or leaves the shared presence loop, and offsets the eyes' own animations.
159
+ * @param {AgentActivity|null} activity
160
+ * @returns {void}
161
+ */
162
+ _syncMotion(activity: AgentActivity | null): void;
163
+ /** @returns {string} */
164
+ _seedKey(): string;
165
+ }
@@ -0,0 +1,93 @@
1
+ export type AvatarTone = import('../avatar/avatar.js').AvatarTone;
2
+ export type AgentActivity = import('../../internal/agent-model.js').AgentActivity;
3
+ export type AgentBody = 'circle' | 'squircle' | 'hexagon' | 'triangle' | 'drop' | 'pill' | 'clover' | 'dome' | 'wedge' | 'pentagon' | 'trapezoid' | 'cross' | 'diamond' | 'octagon';
4
+ export type AgentEyes = 'round' | 'oval' | 'square';
5
+ export type AgentTraits = {
6
+ tone: AvatarTone;
7
+ body: AgentBody;
8
+ eyes: AgentEyes;
9
+ /**
10
+ * How far apart the eyes sit: narrow, middle, wide.
11
+ */
12
+ spacing: 0 | 1 | 2;
13
+ };
14
+ export type AgentTraitOverrides = {
15
+ tone?: AvatarTone | null;
16
+ body?: AgentBody | null;
17
+ eyes?: AgentEyes | null;
18
+ /**
19
+ * How far apart the eyes sit, as `AgentAvatar.getTraits()` reports it.
20
+ */
21
+ spacing?: 0 | 1 | 2 | null;
22
+ };
23
+ export type AgentShape = {
24
+ tag: string;
25
+ part: string | null;
26
+ attrs: Record<string, string | number>;
27
+ children?: AgentShape[];
28
+ };
29
+ /** @typedef {import('../avatar/avatar.js').AvatarTone} AvatarTone */
30
+ /** @typedef {import('../../internal/agent-model.js').AgentActivity} AgentActivity */
31
+ /**
32
+ * @typedef {'circle'|'squircle'|'hexagon'|'triangle'|'drop'|'pill'|'clover'|'dome'
33
+ * |'wedge'|'pentagon'|'trapezoid'|'cross'|'diamond'|'octagon'} AgentBody
34
+ */
35
+ /** @typedef {'round'|'oval'|'square'} AgentEyes */
36
+ /**
37
+ * The traits a seed resolves to.
38
+ * @typedef {Object} AgentTraits
39
+ * @property {AvatarTone} tone
40
+ * @property {AgentBody} body
41
+ * @property {AgentEyes} eyes
42
+ * @property {0|1|2} spacing How far apart the eyes sit: narrow, middle, wide.
43
+ */
44
+ /**
45
+ * Single traits to fix instead of deriving them. An unknown value is ignored.
46
+ * @typedef {Object} AgentTraitOverrides
47
+ * @property {AvatarTone|null} [tone]
48
+ * @property {AgentBody|null} [body]
49
+ * @property {AgentEyes|null} [eyes]
50
+ * @property {0|1|2|null} [spacing] How far apart the eyes sit, as `AgentAvatar.getTraits()` reports it.
51
+ */
52
+ /**
53
+ * One shape to draw: an SVG element name, the part it plays (styled as `.zx-agent-avatar__<part>`),
54
+ * its attributes, and, for a group, its children.
55
+ * @typedef {Object} AgentShape
56
+ * @property {string} tag
57
+ * @property {string|null} part
58
+ * @property {Record<string, string|number>} attrs
59
+ * @property {AgentShape[]} [children]
60
+ */
61
+ /**
62
+ * The silhouettes, in hash order.
63
+ * @type {ReadonlyArray<AgentBody>}
64
+ */
65
+ export declare const AGENT_BODIES: ReadonlyArray<AgentBody>;
66
+ /** The eye shapes, in hash order. @type {ReadonlyArray<AgentEyes>} */
67
+ export declare const AGENT_EYES: ReadonlyArray<AgentEyes>;
68
+ /** The rendered pixel size each preset stands for when picking the level of detail. */
69
+ export declare const AGENT_PRESET_PX: Readonly<{
70
+ sm: 24;
71
+ md: 32;
72
+ lg: 40;
73
+ }>;
74
+ /**
75
+ * Resolves the face a seed gets. The tone is `avatarTone(seed)`, so an agent's initials Avatar and
76
+ * its face agree when they share a key; every other trait comes from FNV-1a over the same
77
+ * normalised key plus a per-trait salt, mixed, so traits are independent of the tone and of each
78
+ * other.
79
+ * @param {unknown} seed The agent's stable identity — an id, or its name.
80
+ * @param {AgentTraitOverrides} [overrides={}] Traits to fix instead of deriving them.
81
+ * @returns {AgentTraits}
82
+ */
83
+ export declare function agentTraits(seed: unknown, overrides?: AgentTraitOverrides): AgentTraits;
84
+ /**
85
+ * The shapes that draw a face in one activity at one rendered size, in a 64-unit view box, as
86
+ * plain data. The level of detail follows `px`: the pupils go below 20px, and at 24px and below the
87
+ * eyes grow and sit at the middle spacing.
88
+ * @param {AgentTraits} traits From {@link agentTraits}.
89
+ * @param {AgentActivity|string|null} [activity=null] What the agent is doing; unknown is idle.
90
+ * @param {number} [px=32] The rendered size in CSS pixels.
91
+ * @returns {AgentShape[]}
92
+ */
93
+ export declare function agentFace(traits: AgentTraits, activity?: AgentActivity | string | null, px?: number): AgentShape[];
@@ -82,7 +82,8 @@ export type AgUiProblem = {
82
82
  export type AgUiOptions = {
83
83
  /**
84
84
  * A
85
- * RunStatus the run's lifecycle drives: `running` when it starts, `done`, `waiting` (an
85
+ * RunStatus the run's lifecycle drives — its `agent` face, set by the application, takes each
86
+ * state's expression: `running` when it starts, `done`, `waiting` (an
86
87
  * interrupt, or calls of the run still without a result), `stopped` (cancelled) or `failed`.
87
88
  */
88
89
  runStatus?: {
@@ -90,7 +91,9 @@ export type AgUiOptions = {
90
91
  } | null;
91
92
  /**
92
93
  * The thread's authors. A text message whose
93
- * `name` is one of their keys is written by that author; every other item by `agent`.
94
+ * `name` is one of their keys is written by that author; every other item by `agent`. The thread
95
+ * draws them from its own `authors`, so an agent given a `face` there is drawn as its AgentAvatar
96
+ * in every item the adapter writes; the stream itself can never set or change a face.
94
97
  */
95
98
  authors?: Record<string, Author>;
96
99
  /**
@@ -207,6 +210,10 @@ export type Run = {
207
210
  cancelAtEnd: Set<string>;
208
211
  };
209
212
  export type Message = {
213
+ /**
214
+ * Its first answer item: the message id, or an id of its own when the thread
215
+ * already holds that one.
216
+ */
210
217
  id: string;
211
218
  run: Run;
212
219
  open: boolean;
@@ -216,7 +223,7 @@ export type Message = {
216
223
  ignored: boolean;
217
224
  author: string | null;
218
225
  /**
219
- * Its answer items: the message id, then `<id>#2`, `<id>#3`…
226
+ * Its answer items: `id`, then `<id>#2`, `<id>#3`…
220
227
  */
221
228
  segments: string[];
222
229
  /**
@@ -272,12 +279,13 @@ export type Call = {
272
279
  */
273
280
  /**
274
281
  * @typedef {Object} Message
275
- * @property {string} id
282
+ * @property {string} id Its first answer item: the message id, or an id of its own when the thread
283
+ * already holds that one.
276
284
  * @property {Run} run
277
285
  * @property {boolean} open
278
286
  * @property {boolean} ignored A message of a role the thread does not draw.
279
287
  * @property {string|null} author
280
- * @property {string[]} segments Its answer items: the message id, then `<id>#2`, `<id>#3`…
288
+ * @property {string[]} segments Its answer items: `id`, then `<id>#2`, `<id>#3`…
281
289
  * @property {Set<string>} written Segments that received text.
282
290
  * @property {boolean} afterFence A fence's lines came since the last prose.
283
291
  * @property {Set<string>} pending Surfaces its fences began and did not end.
@@ -320,10 +328,14 @@ export type Call = {
320
328
  * interrupt is the application's: the event goes to `onunknown`. A result that arrives before
321
329
  * the decision is drawn as it is, the card expires, and no decision is sent for that call; a
322
330
  * surface still waiting is cancelled the same way.
323
- * - A message id is the answer's item id. A start for a closed message or call reopens it, in this
324
- * run or a later one, and its content continues: a reopened call is asked about again once its
325
- * arguments are complete. A start for an id still open, or for a call already decided or
326
- * answered, is ignored and reported: `ontoolresult` fires once for a call, and a receipt stays.
331
+ * - A message id is the answer's item id. What already holds that id in the thread is never
332
+ * overwritten: an answer the adapter did not draw is taken over, and its content continues as a
333
+ * reopened message's does; anything else — a person's message, a card, a piece of another
334
+ * message — leaves the message an id of its own. A start for a closed message or call reopens
335
+ * it, in this run or a later one, and its content continues: a reopened call is asked about
336
+ * again once its arguments are complete. A start for an id still open, or for a call already
337
+ * decided or answered, is ignored and reported: `ontoolresult` fires once for a call, and a
338
+ * receipt stays.
327
339
  * - A surface is the thread item `surface:<runId>/<surface>`, so a model reusing `s1` in every
328
340
  * run gets a new surface each run. Its token is the application's for a custom event, the tool
329
341
  * call id for a surface tool, and the run id for an inline surface.
@@ -289,6 +289,12 @@ export declare class AgentThread extends Component<AgentThreadOptions> {
289
289
  /** @type {EventTarget|null} */
290
290
  _scrollTarget: EventTarget | null;
291
291
  _onScroll: () => void;
292
+ _stick: boolean;
293
+ _lastTop: number;
294
+ /** @type {ResizeObserver|null} Watches the surfaces still being streamed into, while they grow. */
295
+ _growth: ResizeObserver | null;
296
+ /** @type {Map<Element, number>} Each watched surface's height when it was last measured. */
297
+ _heights: Map<Element, number>;
292
298
  /** @type {string|null} */
293
299
  _latestAnswer: string | null;
294
300
  /** @type {Map<string, {expanded?: boolean|null, controls?: string|null}>} Artifact open states, for answers drawn later. */
@@ -647,6 +653,26 @@ export declare class AgentThread extends Component<AgentThreadOptions> {
647
653
  * @returns {void}
648
654
  */
649
655
  private _follow;
656
+ /**
657
+ * Follows a surface streamed into through `surface(id)` as the thread's own updates are followed:
658
+ * what its operations add keeps the end in view while the reader is reading it, and offers
659
+ * "Jump to latest" otherwise. The surface says nothing per operation, and is fed from outside
660
+ * the thread, so its size is watched rather than the calls. Watching stops once its `end` has
661
+ * arrived or it has replied: what changes it after that is the reader's doing, and stays where
662
+ * they put it.
663
+ * @private
664
+ * @param {Surface} surface
665
+ * @returns {void}
666
+ */
667
+ private _watchGrowth;
668
+ /**
669
+ * A watched surface may have grown since it was last measured. The reader was at the end if,
670
+ * measured now, nothing but the growth lies past what they see, and they had not scrolled away.
671
+ * @private
672
+ * @param {Element} element
673
+ * @returns {void}
674
+ */
675
+ private _grown;
650
676
  /** @private @returns {HTMLElement|null} */
651
677
  private _lastArticle;
652
678
  /** @private @param {MouseEvent} event @returns {void} */
@@ -64,7 +64,9 @@ export type UiMessageStreamOptions = {
64
64
  runStatus?: RunStatus | null;
65
65
  /**
66
66
  * Who writes; its first author who is not a person
67
- * is the agent when `agent` is not given.
67
+ * is the agent when `agent` is not given. The thread draws authors from its own `authors`, so an
68
+ * agent given a `face` there is drawn as its AgentAvatar in every item the stream writes; the
69
+ * stream itself can never set or change a face.
68
70
  */
69
71
  authors?: Record<string, Author>;
70
72
  /**
@@ -1,9 +1,11 @@
1
1
  import { Component } from '../../core/component.js';
2
+ import { AgentAvatar } from '../agent-avatar/agent-avatar.js';
2
3
  import { Dialog } from '../dialog/dialog.js';
3
4
  import { Field } from '../field/field.js';
4
5
  import { Fieldset } from '../fieldset/fieldset.js';
5
6
  export type Block = import('../../internal/agent-model.js').Block;
6
7
  export type FieldOptions = import('../field/field.js').FieldOptions;
8
+ export type AgentFace = import('../../internal/agent-model.js').AgentFace;
7
9
  export type ApprovalStatus = 'pending' | 'approved' | 'rejected' | 'expired';
8
10
  export type ApprovalReasonMode = 'optional' | 'required' | 'none';
9
11
  export type ApprovalAction = 'approve' | 'edit' | 'reject';
@@ -39,6 +41,15 @@ export type ApprovalCardOptions = {
39
41
  * Categorical tone of the icon tile.
40
42
  */
41
43
  tone?: ApprovalTone;
44
+ /**
45
+ * The agent that asks, drawn as its AgentAvatar face in
46
+ * place of the icon tile: its traits and name, or `true` to derive the face from the title. The
47
+ * face is keyed by the agent's `seed`, else its `name`; without either it is named after the
48
+ * title it is given with, and a later title never changes it. The face looks up at you while
49
+ * the request waits and rests once it is answered; it is decorative, so the title and
50
+ * description say what is asked.
51
+ */
52
+ agent?: AgentFace | true | null;
42
53
  /**
43
54
  * Element level of the title heading.
44
55
  */
@@ -134,7 +145,7 @@ export type ApprovalCardOptions = {
134
145
  reason: string;
135
146
  }>) => void;
136
147
  };
137
- export type ApprovalCardUpdate = Pick<ApprovalCardOptions, 'title' | 'description' | 'icon' | 'tone' | 'details' | 'preview' | 'fields' | 'values' | 'confirmText' | 'reason' | 'edited' | 'editedKeys'>;
148
+ export type ApprovalCardUpdate = Pick<ApprovalCardOptions, 'title' | 'description' | 'icon' | 'tone' | 'agent' | 'details' | 'preview' | 'fields' | 'values' | 'confirmText' | 'reason' | 'edited' | 'editedKeys'>;
138
149
  export type ApprovalEditDetail = {
139
150
  /**
140
151
  * The values as saved, edits included.
@@ -205,6 +216,12 @@ export declare class ApprovalCard extends Component<ApprovalCardOptions> {
205
216
  /** @type {string|null} */
206
217
  _icon: string | null;
207
218
  _tone: any;
219
+ /** @type {Record<string, any>|null} The face asked for, as traits; it wins over the icon. */
220
+ _face: Record<string, any> | null;
221
+ /** What names a face that has no seed or name: the title it was given with. */
222
+ _faceName: any;
223
+ /** @type {AgentAvatar|null} */
224
+ _avatar: AgentAvatar | null;
208
225
  _confirmText: any;
209
226
  /** @type {unknown} What `details` was drawn from, to compare an update against. */
210
227
  _details: unknown;
@@ -380,7 +397,12 @@ export declare class ApprovalCard extends Component<ApprovalCardOptions> {
380
397
  private _closeDialogs;
381
398
  /** @private @returns {string} Who answers, as the verdict names them. */
382
399
  private _byText;
383
- /** @private @returns {void} Draws the icon tile, or takes it away when there is no icon. */
400
+ /**
401
+ * Draws the icon tile — or the agent's face, which takes its place — or takes it away when there
402
+ * is neither.
403
+ * @private
404
+ * @returns {void}
405
+ */
384
406
  private _drawTile;
385
407
  /** @private @returns {void} Draws the line under the title, and what describes the card. */
386
408
  private _drawDescription;
@@ -401,6 +423,13 @@ export declare class ApprovalCard extends Component<ApprovalCardOptions> {
401
423
  * @returns {void}
402
424
  */
403
425
  private _sync;
426
+ /**
427
+ * The expression of the agent's face: the one a run takes in the state the status is drawn as —
428
+ * looking up at you while the request waits, at rest once it is answered.
429
+ * @private
430
+ * @returns {import('../../internal/agent-model.js').AgentActivity}
431
+ */
432
+ private _faceActivity;
404
433
  /**
405
434
  * Draws what follows the status: the state glyph and word, the line under the title, the
406
435
  * reason, and whether the actions show.
@@ -1,9 +1,11 @@
1
1
  import { Component } from '../../core/component.js';
2
+ export type AuroraPreset = 'source' | 'confluence' | 'horizon' | 'diagonal' | 'edge' | 'curtain' | 'mesh' | 'ribbon' | 'bloom';
3
+ export type AuroraMotion = 'none' | 'drift' | 'flow';
2
4
  export type AuroraOptions = {
3
5
  /**
4
6
  * Geometry of the ambient light field.
5
7
  */
6
- preset?: 'source' | 'confluence' | 'horizon' | 'diagonal' | 'edge' | 'curtain';
8
+ preset?: AuroraPreset;
7
9
  /**
8
10
  * Zero to four concrete CSS colours. An empty list uses semantic
9
11
  * Zx colours; shorter palettes repeat across the four gradient fields.
@@ -13,19 +15,33 @@ export type AuroraOptions = {
13
15
  * Strength of the light field.
14
16
  */
15
17
  intensity?: 'subtle' | 'balanced' | 'vivid';
18
+ /**
19
+ * Slow ambient movement: `drift` lets the field breathe
20
+ * while two lights wander across it, `flow` turns a disc of colour behind it. Shown only to readers
21
+ * who have not asked for reduced motion; `--zx-aurora-duration` (18s) sets the pace.
22
+ */
23
+ motion?: AuroraMotion;
16
24
  };
25
+ /** @typedef {'source'|'confluence'|'horizon'|'diagonal'|'edge'|'curtain'|'mesh'|'ribbon'|'bloom'} AuroraPreset */
26
+ /** @typedef {'none'|'drift'|'flow'} AuroraMotion */
17
27
  /**
18
28
  * @typedef {Object} AuroraOptions
19
- * @property {'source'|'confluence'|'horizon'|'diagonal'|'edge'|'curtain'} [preset='source']
20
- * Geometry of the ambient light field.
29
+ * @property {AuroraPreset} [preset='source'] Geometry of the ambient light field.
21
30
  * @property {string[]} [colors=[]] Zero to four concrete CSS colours. An empty list uses semantic
22
31
  * Zx colours; shorter palettes repeat across the four gradient fields.
23
32
  * @property {'subtle'|'balanced'|'vivid'} [intensity='subtle'] Strength of the light field.
33
+ * @property {AuroraMotion} [motion='none'] Slow ambient movement: `drift` lets the field breathe
34
+ * while two lights wander across it, `flow` turns a disc of colour behind it. Shown only to readers
35
+ * who have not asked for reduced motion; `--zx-aurora-duration` (18s) sets the pace.
24
36
  */
25
37
  /**
26
38
  * Decorative multicolour ambient light for an existing application surface.
27
39
  * Aurora owns no application content or interaction: it enhances the target in place and renders
28
40
  * its pointer-transparent light field behind the target's existing children.
41
+ *
42
+ * With `motion`, Aurora adds one decorative element as the target's first child —
43
+ * `<span class="zx-aurora__motion" aria-hidden="true">`, absolutely positioned and clipped to the
44
+ * surface — whose layers move by transform alone. `setMotion('none')` and `destroy()` remove it.
29
45
  * @extends {Component<AuroraOptions>}
30
46
  */
31
47
  export declare class Aurora extends Component<AuroraOptions> {
@@ -38,6 +54,8 @@ export declare class Aurora extends Component<AuroraOptions> {
38
54
  priority: string;
39
55
  }[];
40
56
  _colors: any[] | string[];
57
+ /** @type {HTMLElement|null} The motion layer, while `motion` is not `none`. */
58
+ _motion: HTMLElement | null;
41
59
  static cssName: string;
42
60
  /** @type {Readonly<AuroraOptions>} */
43
61
  static defaults: Readonly<AuroraOptions>;
@@ -49,6 +67,12 @@ export declare class Aurora extends Component<AuroraOptions> {
49
67
  constructor(target?: Element | string | null, options?: AuroraOptions);
50
68
  /** @returns {HTMLElement} */
51
69
  render(): HTMLElement;
70
+ /**
71
+ * Starts, changes, or stops the ambient movement without replacing surface content.
72
+ * @param {string} motion `none`, `drift`, or `flow`.
73
+ * @returns {this}
74
+ */
75
+ setMotion(motion: string): this;
52
76
  /** Sets the light-field geometry without replacing surface content. @param {string} preset @returns {this} */
53
77
  setPreset(preset: string): this;
54
78
  /** Sets zero to four concrete colours without replacing surface content. @param {string[]|null} colors @returns {this} */
@@ -58,8 +82,10 @@ export declare class Aurora extends Component<AuroraOptions> {
58
82
  /** Restores an enhanced target exactly, or removes an owned surface. @returns {void} */
59
83
  destroy(): void;
60
84
  }
61
- /** @param {unknown} value @returns {'source'|'confluence'|'horizon'|'diagonal'|'edge'|'curtain'} */
62
- export declare function normalizeAuroraPreset(value: unknown): 'source' | 'confluence' | 'horizon' | 'diagonal' | 'edge' | 'curtain';
85
+ /** @param {unknown} value @returns {AuroraPreset} */
86
+ export declare function normalizeAuroraPreset(value: unknown): AuroraPreset;
87
+ /** @param {unknown} value @returns {AuroraMotion} `none` for null or undefined. */
88
+ export declare function normalizeAuroraMotion(value: unknown): AuroraMotion;
63
89
  /** @param {unknown} value @returns {'subtle'|'balanced'|'vivid'} */
64
90
  export declare function normalizeAuroraIntensity(value: unknown): 'subtle' | 'balanced' | 'vivid';
65
91
  /** @param {unknown} value @returns {string[]} */