@zeyos/zx 5.4.0 → 5.6.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 (145) hide show
  1. package/CHANGELOG.md +136 -0
  2. package/README.md +23 -16
  3. package/dist/types/components/agent-thread/agent-thread.d.ts +583 -0
  4. package/dist/types/components/app-sidebar/app-sidebar.d.ts +33 -0
  5. package/dist/types/components/approval-card/approval-card.d.ts +596 -0
  6. package/dist/types/components/avatar/avatar.d.ts +91 -4
  7. package/dist/types/components/badge/badge.d.ts +5 -4
  8. package/dist/types/components/block-view/block-view.d.ts +205 -0
  9. package/dist/types/components/composer/composer.d.ts +736 -0
  10. package/dist/types/components/datebox/date-range-box.d.ts +15 -2
  11. package/dist/types/components/datebox/datebox.d.ts +37 -3
  12. package/dist/types/components/kbd/kbd.d.ts +41 -0
  13. package/dist/types/components/launcher/launcher.d.ts +4 -2
  14. package/dist/types/components/prose/prose.d.ts +69 -0
  15. package/dist/types/components/questionnaire/questionnaire.d.ts +0 -36
  16. package/dist/types/components/run-status/run-status.d.ts +393 -0
  17. package/dist/types/components/run-trace/run-trace.d.ts +624 -0
  18. package/dist/types/components/source-list/source-list.d.ts +177 -0
  19. package/dist/types/components/stat-tile/stat-tile.d.ts +20 -0
  20. package/dist/types/components/tag-picker/tag-picker.d.ts +11 -5
  21. package/dist/types/components/tree/tree.d.ts +44 -3
  22. package/dist/types/core/icons.d.ts +22 -1
  23. package/dist/types/core/messages.d.ts +135 -0
  24. package/dist/types/index.d.ts +12 -2
  25. package/dist/types/internal/agent-model.d.ts +587 -0
  26. package/dist/types/internal/app-rail.d.ts +10 -3
  27. package/dist/types/internal/highlight.d.ts +24 -0
  28. package/dist/types/internal/presence-loop.d.ts +148 -0
  29. package/dist/types/internal/row-actions.d.ts +151 -0
  30. package/dist/zx-zeyos.esm.js +4852 -4535
  31. package/dist/zx-zeyos.esm.min.js +4 -4
  32. package/dist/zx.css +3152 -434
  33. package/dist/zx.esm.js +13730 -6595
  34. package/dist/zx.esm.min.js +27 -8
  35. package/dist/zx.global.js +13730 -6595
  36. package/dist/zx.global.min.js +27 -8
  37. package/dist/zx.min.css +1 -1
  38. package/docs/api.json +1474 -205
  39. package/docs/llms.md +698 -39
  40. package/docs/llms.txt +12 -1
  41. package/package.json +1 -1
  42. package/src/components/account-menu/account-menu.js +2 -2
  43. package/src/components/agent-thread/agent-thread.css +417 -0
  44. package/src/components/agent-thread/agent-thread.js +1365 -0
  45. package/src/components/app-rail/app-rail.css +11 -11
  46. package/src/components/app-sidebar/app-sidebar.css +90 -17
  47. package/src/components/app-sidebar/app-sidebar.js +120 -12
  48. package/src/components/approval-card/approval-card.css +289 -0
  49. package/src/components/approval-card/approval-card.js +1377 -0
  50. package/src/components/avatar/avatar.css +56 -1
  51. package/src/components/avatar/avatar.js +148 -26
  52. package/src/components/badge/badge.css +33 -20
  53. package/src/components/badge/badge.js +5 -4
  54. package/src/components/block-view/block-view.css +300 -0
  55. package/src/components/block-view/block-view.js +523 -0
  56. package/src/components/breadcrumb/breadcrumb.css +28 -3
  57. package/src/components/breadcrumb/breadcrumb.js +2 -2
  58. package/src/components/button/button.css +24 -13
  59. package/src/components/button/button.js +20 -2
  60. package/src/components/calendar/calendar.css +14 -4
  61. package/src/components/card-view/card-view.js +2 -2
  62. package/src/components/chart/chart.js +20 -5
  63. package/src/components/check-button/check-button.css +11 -3
  64. package/src/components/check-button/check-button.js +3 -3
  65. package/src/components/composer/composer.css +403 -0
  66. package/src/components/composer/composer.js +1441 -0
  67. package/src/components/context-menu/context-menu.css +7 -1
  68. package/src/components/date-picker/date-picker.css +6 -0
  69. package/src/components/date-picker/date-picker.js +5 -5
  70. package/src/components/date-picker/date-range-picker.css +6 -0
  71. package/src/components/date-picker/date-range-picker.js +3 -3
  72. package/src/components/date-picker/month-picker.js +3 -3
  73. package/src/components/date-picker/time-picker.css +6 -0
  74. package/src/components/datebox/date-range-box.js +30 -6
  75. package/src/components/datebox/datebox.js +44 -7
  76. package/src/components/dialog/dialog.css +0 -1
  77. package/src/components/dialog/dialog.js +2 -1
  78. package/src/components/dock/dock.js +2 -2
  79. package/src/components/dropdown/dropdown.css +2 -1
  80. package/src/components/entity-ref/entity-ref.css +8 -1
  81. package/src/components/file-item/file-item.css +1 -1
  82. package/src/components/finder/finder.js +2 -2
  83. package/src/components/groupbox/groupbox.js +2 -2
  84. package/src/components/kanban-view/kanban-view.css +8 -4
  85. package/src/components/kanban-view/kanban-view.js +3 -3
  86. package/src/components/kbd/kbd.css +64 -0
  87. package/src/components/kbd/kbd.js +121 -0
  88. package/src/components/launcher/launcher.css +30 -25
  89. package/src/components/launcher/launcher.js +15 -21
  90. package/src/components/list-toolbar/list-toolbar.css +7 -1
  91. package/src/components/menu-button/menu-button.css +9 -2
  92. package/src/components/message/message.js +2 -2
  93. package/src/components/module-bar/module-bar.css +11 -1
  94. package/src/components/multi-value-editor/multi-value-editor.js +4 -4
  95. package/src/components/navigation-bar/navigation-bar.css +3 -2
  96. package/src/components/pagination/pagination.js +2 -2
  97. package/src/components/panel/panel.js +2 -2
  98. package/src/components/prose/prose.css +53 -0
  99. package/src/components/prose/prose.js +152 -0
  100. package/src/components/questionnaire/questionnaire.css +7 -17
  101. package/src/components/questionnaire/questionnaire.js +16 -1
  102. package/src/components/rating/rating.css +3 -1
  103. package/src/components/run-status/run-status.css +208 -0
  104. package/src/components/run-status/run-status.js +782 -0
  105. package/src/components/run-trace/run-trace.css +443 -0
  106. package/src/components/run-trace/run-trace.js +1209 -0
  107. package/src/components/search/search.js +2 -2
  108. package/src/components/select/glyphs.js +3 -3
  109. package/src/components/select/select.css +35 -7
  110. package/src/components/select/select.js +4 -4
  111. package/src/components/source-list/source-list.css +208 -0
  112. package/src/components/source-list/source-list.js +355 -0
  113. package/src/components/stat-tile/stat-tile.css +56 -2
  114. package/src/components/stat-tile/stat-tile.js +25 -2
  115. package/src/components/stepper/stepper.css +2 -1
  116. package/src/components/stepper/stepper.js +3 -3
  117. package/src/components/tabbox/tabbox.css +2 -2
  118. package/src/components/tabbox/tabbox.js +2 -2
  119. package/src/components/table/table.css +52 -16
  120. package/src/components/table/table.js +7 -5
  121. package/src/components/tag-picker/tag-picker.css +56 -43
  122. package/src/components/tag-picker/tag-picker.js +21 -16
  123. package/src/components/tree/tree.css +44 -0
  124. package/src/components/tree/tree.js +97 -9
  125. package/src/components/value-list/value-list.css +25 -4
  126. package/src/components/value-list/value-list.js +2 -1
  127. package/src/components/view/record-view.js +3 -3
  128. package/src/components/view-settings/view-settings.css +2 -1
  129. package/src/components/workspace-switcher/workspace-switcher.js +3 -3
  130. package/src/core/icons.js +34 -3
  131. package/src/core/messages.js +143 -0
  132. package/src/elements/define.js +1 -0
  133. package/src/index.js +12 -2
  134. package/src/internal/agent-model.js +488 -0
  135. package/src/internal/app-rail.js +5 -1
  136. package/src/internal/highlight.js +104 -0
  137. package/src/internal/presence-loop.js +343 -0
  138. package/src/internal/row-actions.js +203 -0
  139. package/styles/base.css +26 -1
  140. package/styles/prose.css +306 -0
  141. package/styles/tokens/dark.css +97 -120
  142. package/styles/tokens/global.css +24 -9
  143. package/styles/tokens/semantic.css +464 -184
  144. package/styles/tokens/themes.css +9 -0
  145. package/styles/zx.css +10 -0
package/docs/llms.txt CHANGED
@@ -37,6 +37,8 @@ exports and as `window.zx.*`.
37
37
  building anything.
38
38
 
39
39
  ## Components
40
+ - Foundations: `.zx-prose` (the reading register for authored content) and `.zx-callout`;
41
+ `kbd()` (keycaps for every shortcut hint).
40
42
  - Inputs: `button()`, `buttonGroup()`, `badge()`/`badgeGroup()`, `CheckButton`,
41
43
  `Toggle`, `Search`,
42
44
  `Select` (APG combobox; `filter: false|'local'|async`; priority, status, permission, and
@@ -64,7 +66,8 @@ exports and as `window.zx.*`.
64
66
  metric with optional delta, sparkline, and loading state), `AppIcon` (generic tile geometry;
65
67
  circular `zeyosAppIcon()` application presets and compact `moduleChip()` identities),
66
68
  `Aurora` (one- to four-colour ambient
67
- canvas light; shared material roles govern chrome and overlays), `Avatar`, `Panel` (header/footer action
69
+ canvas light; shared material roles govern chrome and overlays), `Avatar` (person presence, or an
70
+ agent's `activity` with an opt-in shared presence animation), `Panel` (header/footer action
68
71
  buttons), `MasterPanel`, `Tabbox`
69
72
  (`variant: 'divided'|'bracket'|'line'|'segmented'`), `NavigationBar`, `AppSidebar` (expanded and
70
73
  minimized vertical states plus horizontal rail layouts; sections; a modules layout), `ModuleBar`
@@ -74,6 +77,14 @@ exports and as `window.zx.*`.
74
77
  `Toolbar` (APG toolbar with overflow menu), `SplitView`, `Dock`
75
78
  (collapsible resizable pane stack; tab groups, regions, adopts a `Sheet`), `Stepper`,
76
79
  `Breadcrumb`, `emptyState()`.
80
+ - Agents: `AgentThread` (a conversation with agents as an APG feed: messages, streamed answers, run traces,
81
+ approvals, notices; plain-JSON items, the application owns transport), `BlockView`/`renderBlocks()` (an
82
+ answer drawn block by block as prose, appended to as it streams; model text is never HTML),
83
+ `RunTrace` (the steps a run took: tool calls with arguments and results, retries, hand-offs),
84
+ `ApprovalCard` (a request that holds a run: approve, edit, reject, typed confirmation),
85
+ `SourceList` (cited sources with a card each; nothing remote is loaded), `Composer` (the message
86
+ box: mentions, `/` commands, attachments, context chips, Send that becomes Stop), `RunStatus` (a
87
+ run's state, steps, working time, tokens, and a cost meter against a budget).
77
88
  - Core: `Component`, `h`/`__`/`icon`, `position`, `breakpoints`/`breakpointOf`/`matchBreakpoint`/`onBreakpoint` (named width bands, observed on an element or the window), `Http`/`zeyosService`, i18n, date utils, `defineElements` (declarative `<zx-*>` custom elements).
78
89
  - Helpers: `formatNumber`/`formatCurrency`/`formatPercent`/`formatFileSize`/`formatRelativeTime` (locale-aware, cached `Intl`), `debounce`/`throttle`, `groupBy`/`sortBy`/`uniqueBy`, `escapeRegExp`/`highlightMatch`, `storage()` (namespaced JSON, degrades to memory), `toCsv`/`downloadBlob`/`copyToClipboard`, `truncate()`/`isTruncated()` (line clamp with the full value on hover).
79
90
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeyos/zx",
3
- "version": "5.4.0",
3
+ "version": "5.6.0",
4
4
  "description": "Dependency-free JavaScript implementation of the Xenon Design System.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,6 +1,6 @@
1
1
  import { Component } from '../../core/component.js';
2
2
  import { h } from '../../core/dom.js';
3
- import { icon } from '../../core/icons.js';
3
+ import { ICON_SIZE, icon } from '../../core/icons.js';
4
4
  import { Avatar } from '../avatar/avatar.js';
5
5
  import { MenuButton } from '../menu-button/menu-button.js';
6
6
 
@@ -89,7 +89,7 @@ export class AccountMenu extends Component {
89
89
  h('span', { class: 'zx-account-menu__identity' },
90
90
  h('span', { ref: 'name', class: 'zx-account-menu__name' }),
91
91
  h('span', { ref: 'secondary', class: 'zx-account-menu__secondary' })),
92
- h('span', { class: 'zx-account-menu__chevron', ariaHidden: 'true' }, icon('chevron-down'))));
92
+ h('span', { class: 'zx-account-menu__chevron', ariaHidden: 'true' }, icon('chevron-down', { size: ICON_SIZE.chevron }))));
93
93
  return root;
94
94
  }
95
95
 
@@ -0,0 +1,417 @@
1
+ /*
2
+ * AgentThread — a conversation with agents. Each item is an article: the author's avatar in a
3
+ * narrow first column, the byline and the content beside it. The person's own messages sit at the
4
+ * end as a quiet bubble without an avatar. A run of items by one agent reads as one turn: after
5
+ * the first, the avatar and byline are not drawn again (the byline still names the article).
6
+ */
7
+ .zx-agent-thread {
8
+ display: grid;
9
+ inline-size: 100%;
10
+ min-inline-size: 0;
11
+ container: zx-agent-thread / inline-size;
12
+ color: var(--zx-color-text);
13
+ }
14
+
15
+ .zx-agent-thread__feed {
16
+ display: grid;
17
+ gap: var(--zx-space-5);
18
+ min-inline-size: 0;
19
+ }
20
+
21
+ /* ------------------------------------------------------------------ an item -- */
22
+
23
+ .zx-agent-thread__item {
24
+ display: grid;
25
+ grid-template-columns: var(--zx-space-6) minmax(0, 1fr);
26
+ column-gap: var(--zx-space-3);
27
+ row-gap: var(--zx-space-1);
28
+ align-items: center;
29
+ min-inline-size: 0;
30
+ border-radius: var(--zx-radius-md);
31
+ }
32
+
33
+ .zx-agent-thread__item:focus-visible {
34
+ outline-color: transparent;
35
+ box-shadow: var(--zx-focus-ring);
36
+ }
37
+
38
+ .zx-agent-thread__avatar {
39
+ display: inline-flex;
40
+ grid-column: 1;
41
+ grid-row: 1;
42
+ }
43
+
44
+ .zx-agent-thread__byline {
45
+ display: flex;
46
+ flex-wrap: wrap;
47
+ grid-column: 2;
48
+ grid-row: 1;
49
+ align-items: baseline;
50
+ gap: var(--zx-space-1) var(--zx-space-2);
51
+ min-inline-size: 0;
52
+ font-size: var(--zx-text-sm);
53
+ }
54
+
55
+ .zx-agent-thread__body {
56
+ display: grid;
57
+ grid-column: 2;
58
+ gap: var(--zx-space-3);
59
+ min-inline-size: 0;
60
+ }
61
+
62
+ .zx-agent-thread__author {
63
+ font-weight: var(--zx-weight-medium);
64
+ }
65
+
66
+ .zx-agent-thread__via,
67
+ .zx-agent-thread__time {
68
+ color: var(--zx-color-text-muted);
69
+ font-size: var(--zx-text-xs);
70
+ font-variant-numeric: tabular-nums;
71
+ }
72
+
73
+ .zx-agent-thread__flag {
74
+ padding: 0 var(--zx-space-2);
75
+ border-radius: var(--zx-radius-full);
76
+ background: var(--zx-color-warning-bg);
77
+ color: var(--zx-color-warning);
78
+ font-size: var(--zx-text-xs);
79
+ font-weight: var(--zx-weight-medium);
80
+ }
81
+
82
+ /* A continued turn: the byline is spoken, not drawn, and the item sits close to the one above. */
83
+ .zx-agent-thread__item[data-continued="true"] {
84
+ margin-block-start: calc(var(--zx-space-2) - var(--zx-space-5));
85
+ }
86
+
87
+ .zx-agent-thread__item[data-continued="true"] > .zx-agent-thread__avatar {
88
+ visibility: hidden;
89
+ }
90
+
91
+ .zx-agent-thread__item[data-continued="true"] > .zx-agent-thread__byline,
92
+ .zx-agent-thread__item[data-mine="true"] > .zx-agent-thread__byline,
93
+ .zx-agent-thread__sr,
94
+ .zx-agent-thread__status {
95
+ position: absolute;
96
+ inline-size: 1px;
97
+ block-size: 1px;
98
+ overflow: hidden;
99
+ clip-path: inset(50%);
100
+ white-space: nowrap;
101
+ }
102
+
103
+ .zx-agent-thread__item[data-continued="true"] > .zx-agent-thread__body,
104
+ .zx-agent-thread__item[data-mine="true"] > .zx-agent-thread__body {
105
+ grid-row: 1;
106
+ }
107
+
108
+ /* ------------------------------------------------------------------ the person's messages -- */
109
+
110
+ .zx-agent-thread__item[data-mine="true"] {
111
+ grid-template-columns: minmax(0, 1fr);
112
+ }
113
+
114
+ .zx-agent-thread__item[data-mine="true"] > .zx-agent-thread__body {
115
+ grid-column: 1;
116
+ justify-items: end;
117
+ }
118
+
119
+ .zx-agent-thread__bubble {
120
+ max-inline-size: min(100%, 36rem);
121
+ padding: var(--zx-space-2) var(--zx-space-3);
122
+ border-radius: var(--zx-radius-lg);
123
+ background: var(--zx-color-bg-muted);
124
+ }
125
+
126
+ .zx-agent-thread__text {
127
+ margin: 0;
128
+ font-size: var(--zx-text-md);
129
+ line-height: 1.55;
130
+ white-space: pre-line;
131
+ overflow-wrap: anywhere;
132
+ }
133
+
134
+ .zx-agent-thread__files {
135
+ display: flex;
136
+ flex-wrap: wrap;
137
+ justify-content: flex-end;
138
+ gap: var(--zx-space-2);
139
+ margin: 0;
140
+ padding: 0;
141
+ list-style: none;
142
+ }
143
+
144
+ .zx-agent-thread__file {
145
+ display: inline-flex;
146
+ align-items: center;
147
+ gap: var(--zx-space-2);
148
+ max-inline-size: 100%;
149
+ padding: var(--zx-space-1) var(--zx-space-2);
150
+ border: 1px solid var(--zx-color-border-subtle);
151
+ border-radius: var(--zx-radius-md);
152
+ background: var(--zx-color-bg-surface);
153
+ font-size: var(--zx-text-sm);
154
+ }
155
+
156
+ .zx-agent-thread__file-icon {
157
+ display: inline-flex;
158
+ color: var(--zx-color-text-muted);
159
+ }
160
+
161
+ .zx-agent-thread__file-name {
162
+ overflow: hidden;
163
+ text-overflow: ellipsis;
164
+ white-space: nowrap;
165
+ }
166
+
167
+ .zx-agent-thread__file-size {
168
+ color: var(--zx-color-text-muted);
169
+ font-size: var(--zx-text-xs);
170
+ font-variant-numeric: tabular-nums;
171
+ }
172
+
173
+ /* ------------------------------------------------------------------ notices -- */
174
+
175
+ .zx-agent-thread__item[data-type="notice"] {
176
+ grid-template-columns: minmax(0, 1fr);
177
+ }
178
+
179
+ .zx-agent-thread__item[data-type="notice"] > .zx-agent-thread__avatar {
180
+ display: none;
181
+ }
182
+
183
+ .zx-agent-thread__item[data-type="notice"] > .zx-agent-thread__byline {
184
+ position: absolute;
185
+ inline-size: 1px;
186
+ block-size: 1px;
187
+ overflow: hidden;
188
+ clip-path: inset(50%);
189
+ white-space: nowrap;
190
+ }
191
+
192
+ .zx-agent-thread__item[data-type="notice"] > .zx-agent-thread__body {
193
+ grid-column: 1;
194
+ grid-row: 1;
195
+ justify-items: center;
196
+ }
197
+
198
+ .zx-agent-thread__notice {
199
+ display: inline-flex;
200
+ align-items: center;
201
+ gap: var(--zx-space-2);
202
+ margin: 0;
203
+ color: var(--zx-color-text-muted);
204
+ font-size: var(--zx-text-sm);
205
+ text-align: center;
206
+ }
207
+
208
+ .zx-agent-thread__notice-icon {
209
+ display: inline-flex;
210
+ }
211
+
212
+ .zx-agent-thread__item[data-tone="info"] .zx-agent-thread__notice-icon { color: var(--zx-color-info); }
213
+ .zx-agent-thread__item[data-tone="success"] .zx-agent-thread__notice-icon { color: var(--zx-color-success); }
214
+ .zx-agent-thread__item[data-tone="warning"] .zx-agent-thread__notice-icon { color: var(--zx-color-warning); }
215
+ .zx-agent-thread__item[data-tone="danger"] .zx-agent-thread__notice-icon { color: var(--zx-color-danger); }
216
+ .zx-agent-thread__item[data-tone="danger"] .zx-agent-thread__notice { color: var(--zx-color-text); }
217
+
218
+ /* ------------------------------------------------------------------ answers -- */
219
+
220
+ .zx-agent-thread__footer {
221
+ display: grid;
222
+ gap: var(--zx-space-2);
223
+ min-inline-size: 0;
224
+ }
225
+
226
+ .zx-agent-thread__footer:empty {
227
+ display: none;
228
+ }
229
+
230
+ .zx-agent-thread__actions {
231
+ display: flex;
232
+ flex-wrap: wrap;
233
+ align-items: center;
234
+ gap: var(--zx-space-1);
235
+ margin-inline-start: calc(var(--zx-space-1) * -1);
236
+ color: var(--zx-color-text-muted);
237
+ }
238
+
239
+ .zx-agent-thread__action[aria-pressed="true"] {
240
+ background: var(--zx-color-bg-current);
241
+ color: var(--zx-color-text);
242
+ }
243
+
244
+ .zx-agent-thread__pager {
245
+ display: inline-flex;
246
+ align-items: center;
247
+ gap: var(--zx-space-1);
248
+ }
249
+
250
+ .zx-agent-thread__pager-text {
251
+ min-inline-size: 3ch;
252
+ font-size: var(--zx-text-xs);
253
+ font-variant-numeric: tabular-nums;
254
+ text-align: center;
255
+ }
256
+
257
+ /* ------------------------------------------------------------------ chrome -- */
258
+
259
+ .zx-agent-thread__empty {
260
+ padding-block: var(--zx-space-6);
261
+ }
262
+
263
+ .zx-agent-thread__latest {
264
+ position: sticky;
265
+ inset-block-end: var(--zx-space-3);
266
+ display: inline-flex;
267
+ justify-self: center;
268
+ align-items: center;
269
+ gap: var(--zx-space-2);
270
+ margin-block-start: var(--zx-space-3);
271
+ padding: var(--zx-space-1) var(--zx-space-3);
272
+ border: 1px solid var(--zx-color-border-subtle);
273
+ border-radius: var(--zx-radius-full);
274
+ background: var(--zx-color-bg-surface);
275
+ box-shadow: var(--zx-overlay-shadow);
276
+ color: var(--zx-color-text);
277
+ font: inherit;
278
+ font-size: var(--zx-text-sm);
279
+ cursor: pointer;
280
+ }
281
+
282
+ .zx-agent-thread__latest[hidden] {
283
+ display: none;
284
+ }
285
+
286
+ .zx-agent-thread__latest:hover {
287
+ background: var(--zx-color-bg-hover);
288
+ }
289
+
290
+ .zx-agent-thread__latest:focus-visible {
291
+ outline-color: transparent;
292
+ box-shadow: var(--zx-focus-ring);
293
+ }
294
+
295
+ /* ------------------------------------------------------------------ marks, links, mentions -- */
296
+
297
+ /* An author with an `icon` (a model's mark) is drawn as a tinted tile in the avatar's place. */
298
+ .zx-agent-thread__mark {
299
+ display: inline-grid;
300
+ place-items: center;
301
+ inline-size: var(--zx-space-6);
302
+ block-size: var(--zx-space-6);
303
+ border-radius: var(--zx-radius-md);
304
+ background: var(--zx-color-tone-slate-bg);
305
+ color: var(--zx-color-tone-slate-fg);
306
+ }
307
+
308
+ .zx-agent-thread__mark[data-tone="blue"] { background: var(--zx-color-tone-blue-bg); color: var(--zx-color-tone-blue-fg); }
309
+ .zx-agent-thread__mark[data-tone="teal"] { background: var(--zx-color-tone-teal-bg); color: var(--zx-color-tone-teal-fg); }
310
+ .zx-agent-thread__mark[data-tone="green"] { background: var(--zx-color-tone-green-bg); color: var(--zx-color-tone-green-fg); }
311
+ .zx-agent-thread__mark[data-tone="amber"] { background: var(--zx-color-tone-amber-bg); color: var(--zx-color-tone-amber-fg); }
312
+ .zx-agent-thread__mark[data-tone="orange"] { background: var(--zx-color-tone-orange-bg); color: var(--zx-color-tone-orange-fg); }
313
+ .zx-agent-thread__mark[data-tone="red"] { background: var(--zx-color-tone-red-bg); color: var(--zx-color-tone-red-fg); }
314
+ .zx-agent-thread__mark[data-tone="pink"] { background: var(--zx-color-tone-pink-bg); color: var(--zx-color-tone-pink-fg); }
315
+ .zx-agent-thread__mark[data-tone="violet"] { background: var(--zx-color-tone-violet-bg); color: var(--zx-color-tone-violet-fg); }
316
+
317
+ .zx-agent-thread__mention {
318
+ color: var(--zx-color-accent);
319
+ font-weight: var(--zx-weight-medium);
320
+ }
321
+
322
+ .zx-agent-thread__mention[data-tone="blue"] { color: var(--zx-color-tone-blue-fg); }
323
+ .zx-agent-thread__mention[data-tone="teal"] { color: var(--zx-color-tone-teal-fg); }
324
+ .zx-agent-thread__mention[data-tone="green"] { color: var(--zx-color-tone-green-fg); }
325
+ .zx-agent-thread__mention[data-tone="amber"] { color: var(--zx-color-tone-amber-fg); }
326
+ .zx-agent-thread__mention[data-tone="orange"] { color: var(--zx-color-tone-orange-fg); }
327
+ .zx-agent-thread__mention[data-tone="red"] { color: var(--zx-color-tone-red-fg); }
328
+ .zx-agent-thread__mention[data-tone="pink"] { color: var(--zx-color-tone-pink-fg); }
329
+ .zx-agent-thread__mention[data-tone="violet"] { color: var(--zx-color-tone-violet-fg); }
330
+
331
+ /* A model's mark is round, an agent's a tile; `tone: 'accent'` takes the accent's quiet fill. */
332
+ .zx-agent-thread__mark[data-kind="model"] {
333
+ border-radius: var(--zx-radius-full);
334
+ }
335
+
336
+ .zx-agent-thread__mark[data-tone="accent"] {
337
+ background: var(--zx-color-accent-subtle);
338
+ color: var(--zx-color-accent);
339
+ }
340
+
341
+ .zx-agent-thread__writing {
342
+ margin: 0;
343
+ color: var(--zx-color-text-muted);
344
+ font-size: var(--zx-text-sm);
345
+ }
346
+
347
+ .zx-agent-thread__writing[hidden] {
348
+ display: none;
349
+ }
350
+
351
+ .zx-agent-thread__refs {
352
+ display: flex;
353
+ flex-wrap: wrap;
354
+ gap: var(--zx-space-2);
355
+ margin: 0;
356
+ padding: 0;
357
+ list-style: none;
358
+ }
359
+
360
+ .zx-agent-thread__item[data-mine="true"] .zx-agent-thread__refs {
361
+ justify-content: flex-end;
362
+ }
363
+
364
+ .zx-agent-thread__ref,
365
+ .zx-agent-thread__notice-action {
366
+ display: inline-flex;
367
+ align-items: center;
368
+ gap: var(--zx-space-1);
369
+ padding: 0 var(--zx-space-2);
370
+ border: 1px solid var(--zx-color-border-subtle);
371
+ border-radius: var(--zx-radius-md);
372
+ background: var(--zx-color-bg-surface);
373
+ color: var(--zx-color-text);
374
+ font: inherit;
375
+ font-size: var(--zx-text-sm);
376
+ line-height: 1.6;
377
+ cursor: pointer;
378
+ }
379
+
380
+ .zx-agent-thread__ref-icon {
381
+ display: inline-flex;
382
+ color: var(--zx-color-text-muted);
383
+ }
384
+
385
+ .zx-agent-thread__ref:hover,
386
+ .zx-agent-thread__notice-action:hover {
387
+ background: var(--zx-color-bg-hover);
388
+ }
389
+
390
+ .zx-agent-thread__ref:focus-visible,
391
+ .zx-agent-thread__notice-action:focus-visible {
392
+ outline-color: transparent;
393
+ box-shadow: var(--zx-focus-ring);
394
+ }
395
+
396
+ .zx-agent-thread__notice-action {
397
+ margin-inline-start: var(--zx-space-1);
398
+ }
399
+
400
+ /* The person's own message: its actions sit under the bubble, at the end. */
401
+ .zx-agent-thread__item[data-mine="true"] .zx-agent-thread__actions {
402
+ justify-content: flex-end;
403
+ margin-inline: 0 calc(var(--zx-space-1) * -1);
404
+ }
405
+
406
+ /* ------------------------------------------------------------------ narrow -- */
407
+
408
+ /* In a narrow column the content takes the full width; the avatar stays beside the byline. */
409
+ @container zx-agent-thread (max-width: 30rem) {
410
+ .zx-agent-thread__body {
411
+ grid-column: 1 / -1;
412
+ }
413
+
414
+ .zx-agent-thread__item[data-continued="true"] > .zx-agent-thread__body {
415
+ grid-row: 1;
416
+ }
417
+ }