@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
@@ -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
 
5
5
  /**
6
6
  * @typedef {Object} SearchOptions
@@ -54,7 +54,7 @@ export class Search extends Component {
54
54
  type: 'button',
55
55
  ariaLabel: clearLabel,
56
56
  title: clearLabel
57
- }, icon('x', { size: 15 })) : null;
57
+ }, icon('x', { size: ICON_SIZE.dismiss })) : null;
58
58
  const submit = h('button', {
59
59
  class: 'zx-search__submit',
60
60
  ref: 'submit',
@@ -1,5 +1,5 @@
1
1
  import { h } from '../../core/dom.js';
2
- import { icon } from '../../core/icons.js';
2
+ import { ICON_SIZE, icon } from '../../core/icons.js';
3
3
 
4
4
  /**
5
5
  * The shapes a workflow-status glyph can take. Each status reads by shape first and colour
@@ -123,8 +123,8 @@ export function statusIcon(status, options = {}) {
123
123
  class: 'zx-status-icon',
124
124
  dataset: { indicator, tone }
125
125
  }));
126
- if (indicator === 'done') marker.append(icon('check', { size: 8 }));
127
- if (indicator === 'canceled') marker.append(icon('x', { size: 7 }));
126
+ if (indicator === 'done') marker.append(icon('check', { size: ICON_SIZE.marker }));
127
+ if (indicator === 'canceled') marker.append(icon('x', { size: ICON_SIZE.marker }));
128
128
  return name(marker, options?.label);
129
129
  }
130
130
 
@@ -108,7 +108,8 @@
108
108
  max-inline-size: calc(100vw - var(--zx-space-4));
109
109
  overflow: hidden;
110
110
  border: 1px solid var(--zx-color-overlay-border);
111
- border-radius: var(--zx-radius-lg);
111
+ /* Concentric with the options inside it: their corner plus the inset around them. */
112
+ border-radius: var(--zx-radius-panel);
112
113
  background-color: var(--zx-color-overlay-surface);
113
114
  background-image: var(--zx-overlay-surface-image);
114
115
  background-clip: padding-box;
@@ -156,6 +157,21 @@
156
157
  background: var(--zx-color-overlay-selected);
157
158
  }
158
159
 
160
+ /* A chosen option under the cursor or the pointer is both, and shows both: the pick's tint one
161
+ step stronger, never the plain highlight and never the plain pick. More specific than either
162
+ rule above, so neither can overwrite it whatever their order. */
163
+ .zx-select__option[aria-selected="true"][data-active="true"],
164
+ .zx-select__option[aria-selected="true"]:hover {
165
+ background: color-mix(in srgb, var(--zx-color-accent) 26%, transparent);
166
+ }
167
+
168
+ @media (forced-colors: active) {
169
+ .zx-select__option[aria-selected="true"][data-active="true"],
170
+ .zx-select__option[aria-selected="true"]:hover {
171
+ background: var(--zx-color-overlay-selected);
172
+ }
173
+ }
174
+
159
175
  .zx-select__option > .zx-icon {
160
176
  flex: none;
161
177
  color: var(--zx-color-accent);
@@ -298,12 +314,15 @@
298
314
  white-space: nowrap;
299
315
  }
300
316
 
317
+ /* The same type as a menu's shortcut and a keycap's label. */
301
318
  .zx-select__status-shortcut {
302
319
  border: 0;
303
320
  background: transparent;
304
321
  color: var(--zx-color-text-muted);
305
- font-family: var(--zx-font-mono);
322
+ font-family: var(--zx-font-sans);
306
323
  font-size: var(--zx-text-xs);
324
+ font-weight: var(--zx-weight-medium);
325
+ font-feature-settings: "case", "tnum";
307
326
  }
308
327
 
309
328
  /* The workflow-status glyph — `statusIcon()`, and the one Select.status() draws, which also carries
@@ -322,7 +341,7 @@
322
341
  color: var(--zx-color-text-muted);
323
342
  }
324
343
 
325
- .zx-status-icon[data-tone="neutral"] { color: var(--zx-color-border-strong); }
344
+ .zx-status-icon[data-tone="neutral"] { color: var(--zx-color-text-subtle); }
326
345
  .zx-status-icon[data-tone="warning"] { color: var(--zx-color-warning); }
327
346
  .zx-status-icon[data-tone="info"] { color: var(--zx-color-info); }
328
347
  .zx-status-icon[data-tone="accent"] { color: var(--zx-color-accent); }
@@ -337,17 +356,26 @@
337
356
  border-radius: inherit;
338
357
  background: currentColor;
339
358
  }
359
+ /* The fill stops at the ring's inner edge, so the ring is painted over nothing — in a colour that
360
+ is not fully opaque the two would otherwise overlap and the ring would show denser than the
361
+ rest of the glyph. */
362
+ .zx-status-icon:is(
363
+ [data-indicator="review"], [data-indicator="ready"], [data-indicator="waiting"],
364
+ [data-indicator="done"], [data-indicator="canceled"]
365
+ ) {
366
+ background-clip: padding-box;
367
+ }
340
368
  .zx-status-icon[data-indicator="review"] {
341
- background: linear-gradient(90deg, currentColor 50%, transparent 50%);
369
+ background-image: linear-gradient(90deg, currentColor 50%, transparent 50%);
342
370
  }
343
371
  .zx-status-icon[data-indicator="ready"] {
344
- background: conic-gradient(currentColor 0 35%, transparent 35% 100%);
372
+ background-image: conic-gradient(currentColor 0 35%, transparent 35% 100%);
345
373
  }
346
374
  .zx-status-icon[data-indicator="waiting"] {
347
- background: conic-gradient(currentColor 0 70%, transparent 70% 100%);
375
+ background-image: conic-gradient(currentColor 0 70%, transparent 70% 100%);
348
376
  }
349
377
  .zx-status-icon:is([data-indicator="done"], [data-indicator="canceled"]) {
350
- background: currentColor;
378
+ background-color: currentColor;
351
379
  }
352
380
  .zx-status-icon:is([data-indicator="done"], [data-indicator="canceled"]) > .zx-icon {
353
381
  color: var(--zx-color-bg-raised);
@@ -1,6 +1,6 @@
1
1
  import { Component } from '../../core/component.js';
2
2
  import { h, restoreTarget, snapshotTarget } from '../../core/dom.js';
3
- import { icon } from '../../core/icons.js';
3
+ import { ICON_SIZE, icon } from '../../core/icons.js';
4
4
  import { typeahead } from '../../core/keyboard.js';
5
5
  import { position } from '../../core/position.js';
6
6
  import { uid } from '../../core/util.js';
@@ -154,7 +154,7 @@ export class Select extends Component {
154
154
  tabIndex: -1,
155
155
  ariaLabel: this._message('select.clear', 'Clear selection'),
156
156
  hidden: true
157
- }, icon('x', { size: 13 }));
157
+ }, icon('x', { size: ICON_SIZE.dismiss }));
158
158
  const loading = h('span', {
159
159
  ref: 'loading',
160
160
  class: 'zx-select__loading',
@@ -168,7 +168,7 @@ export class Select extends Component {
168
168
  type: 'button',
169
169
  tabIndex: -1,
170
170
  ariaLabel: this._message('select.toggle', 'Toggle options')
171
- }, icon('chevron-down', { size: 16 }));
171
+ }, icon('chevron-down', { size: ICON_SIZE.chevron }));
172
172
  const control = h('div', { ref: 'control', class: 'zx-select__control' },
173
173
  valueAdornment, input, clear, loading, toggle
174
174
  );
@@ -766,7 +766,7 @@ export class Select extends Component {
766
766
  ariaSelected: String(selected),
767
767
  dataset: { index }
768
768
  }, h('span', { class: 'zx-select__option-content' }, content));
769
- if (selected) option.append(icon('check', { size: 15 }));
769
+ if (selected) option.append(icon('check', { size: ICON_SIZE.check }));
770
770
  this.refs.list.append(option);
771
771
  this._optionEntries.push({ item, clear, action: null, element: option });
772
772
  }
@@ -0,0 +1,208 @@
1
+ /*
2
+ * SourceList — the sources an answer cites. As chips, small numbered buttons wrap beside their
3
+ * label and the list drops under it when the line gets narrow; as a list, each source is a row
4
+ * with its title and site. The card a source shows renders in a tooltip, outside the root.
5
+ */
6
+ .zx-source-list {
7
+ display: flex;
8
+ flex-wrap: wrap;
9
+ align-items: flex-start;
10
+ gap: var(--zx-space-1) var(--zx-space-2);
11
+ min-inline-size: 0;
12
+ color: var(--zx-color-text);
13
+ }
14
+
15
+ .zx-source-list[data-empty] {
16
+ display: none;
17
+ }
18
+
19
+ .zx-source-list__label {
20
+ flex: 0 0 auto;
21
+ color: var(--zx-color-text-muted);
22
+ font-size: var(--zx-text-xs);
23
+ font-weight: var(--zx-weight-medium);
24
+ line-height: var(--zx-space-6);
25
+ }
26
+
27
+ .zx-source-list__items {
28
+ display: flex;
29
+ flex: 1 1 12rem;
30
+ flex-wrap: wrap;
31
+ gap: var(--zx-space-1);
32
+ min-inline-size: 0;
33
+ margin: 0;
34
+ padding: 0;
35
+ list-style: none;
36
+ }
37
+
38
+ .zx-source-list__item {
39
+ min-inline-size: 0;
40
+ max-inline-size: 100%;
41
+ }
42
+
43
+ /* ------------------------------------------------------------------ source -- */
44
+
45
+ .zx-source-list__source {
46
+ position: relative;
47
+ display: inline-flex;
48
+ align-items: center;
49
+ gap: var(--zx-space-1);
50
+ max-inline-size: min(15rem, 100%);
51
+ min-block-size: var(--zx-space-6);
52
+ padding-block: 1px;
53
+ padding-inline: 1px var(--zx-space-2);
54
+ border: 1px solid var(--zx-color-border-subtle);
55
+ border-radius: var(--zx-radius-md);
56
+ background: var(--zx-color-bg-surface);
57
+ color: var(--zx-color-text-muted);
58
+ font: inherit;
59
+ font-size: var(--zx-text-xs);
60
+ line-height: 1.3;
61
+ text-align: start;
62
+ cursor: pointer;
63
+ }
64
+
65
+ .zx-source-list__source:not(:has(.zx-source-list__n)) {
66
+ padding-inline-start: var(--zx-space-2);
67
+ }
68
+
69
+ .zx-source-list__source:hover {
70
+ border-color: var(--zx-color-border);
71
+ background: var(--zx-color-bg-hover);
72
+ color: var(--zx-color-text);
73
+ }
74
+
75
+ .zx-source-list__source:focus-visible {
76
+ outline-color: transparent;
77
+ box-shadow: var(--zx-focus-ring);
78
+ }
79
+
80
+ /* Pointed at from a citation: the accent fill, until it fades back. */
81
+ .zx-source-list__source[data-state="highlighted"] {
82
+ border-color: var(--zx-color-accent);
83
+ background: var(--zx-color-accent-subtle);
84
+ color: var(--zx-color-text);
85
+ }
86
+
87
+ .zx-source-list__n {
88
+ display: inline-grid;
89
+ flex: 0 0 auto;
90
+ place-items: center;
91
+ min-inline-size: calc(var(--zx-space-6) - 6px);
92
+ block-size: calc(var(--zx-space-6) - 6px);
93
+ padding-inline: 3px;
94
+ border-radius: var(--zx-radius-sm);
95
+ background: var(--zx-color-bg-muted);
96
+ color: var(--zx-color-text-muted);
97
+ font-weight: var(--zx-weight-medium);
98
+ font-variant-numeric: tabular-nums;
99
+ }
100
+
101
+ .zx-source-list__glyph {
102
+ display: inline-flex;
103
+ flex: 0 0 auto;
104
+ color: var(--zx-color-text-subtle);
105
+ }
106
+
107
+ .zx-source-list__name,
108
+ .zx-source-list__title,
109
+ .zx-source-list__site {
110
+ overflow: hidden;
111
+ min-inline-size: 0;
112
+ text-overflow: ellipsis;
113
+ white-space: nowrap;
114
+ }
115
+
116
+ .zx-source-list__sr {
117
+ position: absolute;
118
+ inline-size: 1px;
119
+ block-size: 1px;
120
+ overflow: hidden;
121
+ clip-path: inset(50%);
122
+ white-space: nowrap;
123
+ }
124
+
125
+ /* ------------------------------------------------------------------ list layout -- */
126
+
127
+ .zx-source-list[data-layout="list"] {
128
+ display: grid;
129
+ }
130
+
131
+ .zx-source-list[data-layout="list"] .zx-source-list__items {
132
+ display: grid;
133
+ gap: 1px;
134
+ }
135
+
136
+ .zx-source-list[data-layout="list"] .zx-source-list__source {
137
+ inline-size: calc(100% + 2 * var(--zx-space-2));
138
+ max-inline-size: none;
139
+ min-block-size: var(--zx-control-height);
140
+ margin-inline: calc(-1 * var(--zx-space-2));
141
+ padding: var(--zx-space-1) var(--zx-space-2);
142
+ gap: var(--zx-space-2);
143
+ border-color: transparent;
144
+ background: none;
145
+ color: var(--zx-color-text);
146
+ font-size: var(--zx-text-sm);
147
+ }
148
+
149
+ .zx-source-list[data-layout="list"] .zx-source-list__source:hover {
150
+ background: var(--zx-color-bg-hover);
151
+ }
152
+
153
+ .zx-source-list[data-layout="list"] .zx-source-list__source[data-state="highlighted"] {
154
+ border-color: transparent;
155
+ background: var(--zx-color-accent-subtle);
156
+ }
157
+
158
+ .zx-source-list__copy {
159
+ display: grid;
160
+ flex: 1 1 auto;
161
+ min-inline-size: 0;
162
+ line-height: 1.35;
163
+ }
164
+
165
+ .zx-source-list__title {
166
+ font-weight: var(--zx-weight-medium);
167
+ }
168
+
169
+ .zx-source-list__site {
170
+ color: var(--zx-color-text-muted);
171
+ font-size: var(--zx-text-xs);
172
+ }
173
+
174
+ /* ------------------------------------------------------------------ card -- */
175
+
176
+ .zx-source-list__card {
177
+ display: grid;
178
+ gap: 2px;
179
+ padding-block: var(--zx-space-1);
180
+ }
181
+
182
+ .zx-source-list__card-title {
183
+ font-weight: var(--zx-weight-semibold);
184
+ }
185
+
186
+ .zx-source-list__card-site {
187
+ display: flex;
188
+ align-items: center;
189
+ gap: var(--zx-space-1);
190
+ color: var(--zx-color-text-muted);
191
+ font-size: var(--zx-text-xs);
192
+ }
193
+
194
+ .zx-source-list__card-snippet {
195
+ margin-block-start: var(--zx-space-1);
196
+ color: var(--zx-color-text);
197
+ }
198
+
199
+ /* ------------------------------------------------------------------ motion -- */
200
+
201
+ @media (prefers-reduced-motion: no-preference) {
202
+ .zx-source-list__source {
203
+ transition:
204
+ background-color var(--zx-dur-base) var(--zx-ease),
205
+ border-color var(--zx-dur-base) var(--zx-ease),
206
+ color var(--zx-dur-fast) var(--zx-ease);
207
+ }
208
+ }