@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
@@ -0,0 +1,177 @@
1
+ import { Component } from '../../core/component.js';
2
+ import { Tooltip } from '../tooltip/tooltip.js';
3
+ export type Source = import('../../internal/agent-model.js').Source;
4
+ export type SourceKind = 'web' | 'file' | 'record' | 'call';
5
+ export type SourceListOptions = {
6
+ /**
7
+ * The sources, in the order an answer's `[n]` citations number
8
+ * them. Model text is data: every string reaches the page as text.
9
+ */
10
+ sources?: Source[];
11
+ /**
12
+ * The visible label the list is named by. Empty hides it and
13
+ * names the list with the `sourceList.label` message instead.
14
+ */
15
+ label?: string;
16
+ /**
17
+ * `'chips'` wraps short chips beside the label;
18
+ * `'list'` gives each source a full-width row with its title and site.
19
+ */
20
+ layout?: 'chips' | 'list';
21
+ /**
22
+ * Whether each source shows its number.
23
+ */
24
+ numbered?: boolean;
25
+ /**
26
+ * Icon names per source kind, over the
27
+ * built-in `SOURCE_ICONS`.
28
+ */
29
+ icons?: Partial<Record<SourceKind, string>>;
30
+ /**
31
+ * Localized messages.
32
+ */
33
+ msg?: Record<string, string> | Record<string, Record<string, string>>;
34
+ /**
35
+ * Activation
36
+ * listener; `preventDefault()` keeps a web source from opening.
37
+ */
38
+ onselect?: (event: CustomEvent<{
39
+ source: Source;
40
+ n: number;
41
+ }>) => void;
42
+ };
43
+ /** @typedef {import('../../internal/agent-model.js').Source} Source */
44
+ /**
45
+ * What a source is: it picks the glyph, and whether activating it can open an address.
46
+ * @typedef {'web'|'file'|'record'|'call'} SourceKind
47
+ */
48
+ /**
49
+ * @typedef {Object} SourceListOptions
50
+ * @property {Source[]} [sources=[]] The sources, in the order an answer's `[n]` citations number
51
+ * them. Model text is data: every string reaches the page as text.
52
+ * @property {string} [label='Sources'] The visible label the list is named by. Empty hides it and
53
+ * names the list with the `sourceList.label` message instead.
54
+ * @property {'chips'|'list'} [layout='chips'] `'chips'` wraps short chips beside the label;
55
+ * `'list'` gives each source a full-width row with its title and site.
56
+ * @property {boolean} [numbered=true] Whether each source shows its number.
57
+ * @property {Partial<Record<SourceKind, string>>} [icons={}] Icon names per source kind, over the
58
+ * built-in `SOURCE_ICONS`.
59
+ * @property {Record<string, string>|Record<string, Record<string, string>>} [msg] Localized messages.
60
+ * @property {(event: CustomEvent<{source: Source, n: number}>) => void} [onselect] Activation
61
+ * listener; `preventDefault()` keeps a web source from opening.
62
+ */
63
+ /** Built-in glyph per source kind. */
64
+ export declare const SOURCE_ICONS: Readonly<{
65
+ web: "link-2";
66
+ file: "file";
67
+ record: "table";
68
+ call: "gear";
69
+ }>;
70
+ /**
71
+ * The sources an answer cites: a numbered chip (or row) for each, naming its site or title, with a
72
+ * card of its title, site, and the passage used on hover and focus.
73
+ *
74
+ * Activating a source emits a preventable `select`. Unless it is prevented, a `web` source opens
75
+ * its address in a new tab — only an absolute `https:` address, and never with access back to this
76
+ * page; every other kind is left to the application, which might reveal the trace step the source
77
+ * came from. The list never loads a favicon, a thumbnail, or any other remote resource.
78
+ *
79
+ * @fires SourceList#select
80
+ * @extends {Component<SourceListOptions>}
81
+ */
82
+ export declare class SourceList extends Component<SourceListOptions> {
83
+ _original: import("../../core/dom.js").TargetSnapshot;
84
+ _destroyed: boolean;
85
+ /** @type {Array<Source & {id: string}>} */
86
+ _sources: Array<Source & {
87
+ id: string;
88
+ }>;
89
+ /** @type {HTMLButtonElement[]} */
90
+ _buttons: HTMLButtonElement[];
91
+ /** @type {Tooltip[]} */
92
+ _tooltips: Tooltip[];
93
+ /** @type {ReturnType<typeof setTimeout>|null} */
94
+ _highlightTimer: ReturnType<typeof setTimeout> | null;
95
+ _layout: string;
96
+ _list: HTMLElement;
97
+ static cssName: string;
98
+ /** @type {Readonly<SourceListOptions>} */
99
+ static defaults: Readonly<SourceListOptions>;
100
+ /** @returns {HTMLElement} */
101
+ render(): HTMLElement;
102
+ /**
103
+ * Replaces every source. Focus on a source stays on the source with the same `id`.
104
+ * @param {Source[]} sources
105
+ * @returns {this}
106
+ */
107
+ setSources(sources: Source[]): this;
108
+ /**
109
+ * Points at one source, as a citation `[n]` in the answer does: scrolls it into view, puts focus
110
+ * on it, and marks it with `data-state="highlighted"` for two seconds. A number is the source's
111
+ * position, from 1; a string is its `id`. Anything else does nothing.
112
+ * @param {number|string} n
113
+ * @returns {this}
114
+ */
115
+ highlight(n: number | string): this;
116
+ /** @returns {Source[]} Copies of the sources, in order. */
117
+ getSources(): Source[];
118
+ /** @returns {void} */
119
+ destroy(): void;
120
+ /**
121
+ * @private
122
+ * @param {unknown} sources
123
+ * @returns {void}
124
+ */
125
+ private _build;
126
+ /**
127
+ * @private
128
+ * @param {Source & {id: string}} source
129
+ * @param {number} index
130
+ * @returns {HTMLElement}
131
+ */
132
+ private _item;
133
+ /**
134
+ * The card a source shows on hover and focus: its title, where it is (the host of a web
135
+ * address), and the passage used.
136
+ * @private
137
+ * @param {Source & {id: string}} source
138
+ * @returns {HTMLElement}
139
+ */
140
+ private _card;
141
+ /** @private @param {SourceKind} kind @returns {string} */
142
+ private _icon;
143
+ /** @private @returns {void} */
144
+ private _releaseTooltips;
145
+ /**
146
+ * @private
147
+ * @param {MouseEvent} event
148
+ * @returns {void}
149
+ */
150
+ private _onClick;
151
+ }
152
+ /**
153
+ * A source's kind; a source without one is a web source.
154
+ * @param {Source|null|undefined} source
155
+ * @returns {SourceKind}
156
+ */
157
+ export declare function sourceKind(source: Source | null | undefined): SourceKind;
158
+ /**
159
+ * The address a source may open: a `web` source's `href`, only when it is an absolute `https:`
160
+ * URL that `safeHref()` accepts. Anything else — another kind, a relative or `http:` address, a
161
+ * script scheme — gives null.
162
+ * @param {Source|null|undefined} source
163
+ * @returns {string|null}
164
+ */
165
+ export declare function sourceHref(source: Source | null | undefined): string | null;
166
+ /**
167
+ * The host a web source opens, for its card: "bank.example". Null when it opens nothing.
168
+ * @param {Source|null|undefined} source
169
+ * @returns {string|null}
170
+ */
171
+ export declare function sourceHost(source: Source | null | undefined): string | null;
172
+ /**
173
+ * The short name a chip shows: the source's `site`, else its title.
174
+ * @param {Source|null|undefined} source
175
+ * @returns {string}
176
+ */
177
+ export declare function sourceName(source: Source | null | undefined): string;
@@ -4,6 +4,7 @@ export type StatTileFormat = StatTileFormatName | ((value: number | string | nul
4
4
  export type StatTileKind = 'neutral' | 'accent' | 'success' | 'warning' | 'danger' | 'info';
5
5
  export type StatTileDeltaKind = 'positive' | 'negative' | 'neutral';
6
6
  export type StatTileDirection = 'up' | 'down' | 'flat';
7
+ export type StatTileVariant = 'default' | 'plain';
7
8
  export type StatTileDelta = {
8
9
  /**
9
10
  * Which way the metric moved, read from the sign alone.
@@ -105,6 +106,19 @@ export type StatTileOptions = {
105
106
  * value, which stays at full text contrast whatever intent a record carries.
106
107
  */
107
108
  kind?: StatTileKind;
109
+ /**
110
+ * `'default'` is a framed tile on its own surface,
111
+ * for a figure that stands among other content (a dashboard). `'plain'` drops the frame, the fill
112
+ * and the padding and sets the figure a size smaller, for a row of figures on a page (a record's
113
+ * amounts under its title). Reflected as `data-variant` on the root.
114
+ */
115
+ variant?: StatTileVariant;
116
+ /**
117
+ * The figure leads its row: in a plain row it is set at the
118
+ * display size while the others stay smaller, on a framed tile one step above the display size.
119
+ * Give it to one tile per row. Reflected as `data-emphasis="true"`.
120
+ */
121
+ emphasis?: boolean;
108
122
  /**
109
123
  * Destination. A tile with an href is an `<a>`.
110
124
  */
@@ -238,6 +252,12 @@ export declare function statDelta(delta: number | string | null | undefined, opt
238
252
  locale?: string;
239
253
  currency?: string | null;
240
254
  }): StatTileDelta | null;
255
+ /**
256
+ * Resolves the `variant` option to one the stylesheet knows; anything else is the framed tile.
257
+ * @param {unknown} value Requested variant.
258
+ * @returns {StatTileVariant}
259
+ */
260
+ export declare function normalizeStatTileVariant(value: unknown): StatTileVariant;
241
261
  /**
242
262
  * Chooses the element a tile must be, from what the tile does.
243
263
  *
@@ -31,8 +31,9 @@ export type TagPickerOptions = {
31
31
  /**
32
32
  * Optional item tone property or reader: a categorical
33
33
  * tone name from the Badge palette (`blue`, `teal`, `green`, `amber`, `orange`, `red`, `pink`,
34
- * `violet`, `slate`). A toned tag takes the palette's fill and ink, as a Badge with that `tone`
35
- * does; a tone wins over a colour, and unknown names are ignored.
34
+ * `violet`, `slate`). Every tag is built by `badge()`, so a toned tag is the Badge with that `tone`
35
+ * — the same shape, size, fill and ink it has in a list row or a record header; a tone wins over a
36
+ * colour, and unknown names are ignored.
36
37
  */
37
38
  toneKey?: TagValueReader;
38
39
  /**
@@ -155,8 +156,9 @@ export type TagPickerOptions = {
155
156
  * or a token reference such as `var(--zx-color-tone-blue-fg)`.
156
157
  * @property {TagValueReader} [toneKey='tone'] Optional item tone property or reader: a categorical
157
158
  * tone name from the Badge palette (`blue`, `teal`, `green`, `amber`, `orange`, `red`, `pink`,
158
- * `violet`, `slate`). A toned tag takes the palette's fill and ink, as a Badge with that `tone`
159
- * does; a tone wins over a colour, and unknown names are ignored.
159
+ * `violet`, `slate`). Every tag is built by `badge()`, so a toned tag is the Badge with that `tone`
160
+ * — the same shape, size, fill and ink it has in a list row or a record header; a tone wins over a
161
+ * colour, and unknown names are ignored.
160
162
  * @property {Array<TagValueReader>|null} [searchKeys=null] Fields searched by local filtering.
161
163
  * @property {'local'|((query: string) => Promise<TagItem[]>|TagItem[])} [filter='local'] Filtering mode.
162
164
  * @property {number} [minQuery=0] Minimum async query length.
@@ -308,7 +310,11 @@ export declare class TagPicker extends Component<TagPickerOptions> {
308
310
  setReadonly(readonly: boolean): this;
309
311
  /** Cancels pending work and restores an enhanced target. @returns {void} */
310
312
  destroy(): void;
311
- /** @returns {void} */
313
+ /**
314
+ * Draws the selection. A tag is a Badge — `badge({ tone })` with the picker's own class — so it
315
+ * has one construction wherever a label appears, and only the remove button is the picker's.
316
+ * @returns {void}
317
+ */
312
318
  _renderTags(): void;
313
319
  /** @returns {void} */
314
320
  _renderOptions(): void;
@@ -1,5 +1,6 @@
1
1
  import { Component } from '../../core/component.js';
2
2
  export type TreeNode = import('./hierarchy.js').TreeNode;
3
+ export type RowAction = import('../../internal/row-actions.js').RowAction;
3
4
  export type TreeOptions = {
4
5
  /**
5
6
  * Nested nodes.
@@ -45,6 +46,19 @@ export type TreeOptions = {
45
46
  * Label renderer.
46
47
  */
47
48
  renderLabel?: ((node: TreeNode) => Node | string) | null;
49
+ /**
50
+ * A row's actions:
51
+ * `{icon, label, onSelect(node), disabled?, danger?}` descriptors, or nodes placed as given. They
52
+ * rest out of sight and show while the row is pointed at, focused or selected; one or two show
53
+ * as icon buttons, more fold after the first into a "More actions" menu. Every descriptor is also
54
+ * in the row's context menu, and the focused row's actions follow it in the Tab order.
55
+ */
56
+ rowActions?: ((node: TreeNode) => Array<RowAction | Node>) | null;
57
+ /**
58
+ * Name of a row's overflow menu; every action name
59
+ * is followed by the row's name ("More actions: Q3 plan").
60
+ */
61
+ moreLabel?: string;
48
62
  /**
49
63
  * Lazy child loader.
50
64
  */
@@ -115,6 +129,7 @@ export type TreeOptions = {
115
129
  }>) => void;
116
130
  };
117
131
  /** @typedef {import('./hierarchy.js').TreeNode} TreeNode */
132
+ /** @typedef {import('../../internal/row-actions.js').RowAction} RowAction */
118
133
  /**
119
134
  * @typedef {Object} TreeOptions
120
135
  * @property {TreeNode[]} [items=[]] Nested nodes.
@@ -128,6 +143,13 @@ export type TreeOptions = {
128
143
  * @property {unknown[]} [checked=[]] Initially checked node IDs.
129
144
  * @property {boolean} [icons=true] Whether to render folder and file icons.
130
145
  * @property {((node: TreeNode) => Node|string)|null} [renderLabel=null] Label renderer.
146
+ * @property {((node: TreeNode) => Array<RowAction|Node>)|null} [rowActions=null] A row's actions:
147
+ * `{icon, label, onSelect(node), disabled?, danger?}` descriptors, or nodes placed as given. They
148
+ * rest out of sight and show while the row is pointed at, focused or selected; one or two show
149
+ * as icon buttons, more fold after the first into a "More actions" menu. Every descriptor is also
150
+ * in the row's context menu, and the focused row's actions follow it in the Tab order.
151
+ * @property {string} [moreLabel='More actions'] Name of a row's overflow menu; every action name
152
+ * is followed by the row's name ("More actions: Q3 plan").
131
153
  * @property {((node: TreeNode) => Promise<TreeNode[]>|TreeNode[])|null} [load=null] Lazy child loader.
132
154
  * @property {string} [filter=''] Label substring the tree is filtered by.
133
155
  * @property {string} [label='Tree'] Accessible name of the tree.
@@ -173,6 +195,9 @@ export declare class TreeView extends Component<TreeOptions> {
173
195
  _loading: Map<unknown, Promise<boolean>>;
174
196
  _focusId: any;
175
197
  _filter: string;
198
+ /** @type {Array<import('../../internal/row-actions.js').RowActionStrip|undefined>} Per visible row. */
199
+ _strips: Array<import('../../internal/row-actions.js').RowActionStrip | undefined>;
200
+ _rowMenu: import("../context-menu/context-menu.js").ContextMenu;
176
201
  _createdRoot: boolean;
177
202
  _snapshot: import("../../core/dom.js").TargetSnapshot;
178
203
  _readers: import("./hierarchy.js").NodeReaders;
@@ -313,6 +338,7 @@ export declare class TreeView extends Component<TreeOptions> {
313
338
  _renderRows(): void;
314
339
  /**
315
340
  * @param {{node: TreeNode, id: unknown, level: number, posinset: number, setsize: number}} row Row spec.
341
+ * @param {number} index Visible position.
316
342
  * @returns {HTMLElement}
317
343
  */
318
344
  _renderRow(row: {
@@ -321,7 +347,7 @@ export declare class TreeView extends Component<TreeOptions> {
321
347
  level: number;
322
348
  posinset: number;
323
349
  setsize: number;
324
- }): HTMLElement;
350
+ }, index: number): HTMLElement;
325
351
  /** Applies expansion, selection, check, loading, and roving-tabindex state to every row. */
326
352
  _syncRows(): void;
327
353
  /** @param {MouseEvent} event @returns {void} */
@@ -368,8 +394,23 @@ export declare class TreeView extends Component<TreeOptions> {
368
394
  node: TreeNode;
369
395
  id: unknown;
370
396
  }[];
371
- /** @param {Element} element @returns {number} */
372
- _rowIndex(element: Element): number;
397
+ /**
398
+ * The action strip an event target sits in, if any.
399
+ * @param {EventTarget|null} target Event target.
400
+ * @returns {HTMLElement|null}
401
+ */
402
+ _stripOf(target: EventTarget | null): HTMLElement | null;
403
+ /**
404
+ * What a row's actions receive: the node in the working tree, not a filtered copy.
405
+ * @param {{node: TreeNode, id: unknown}|undefined} row Visible row.
406
+ * @returns {TreeNode|null}
407
+ */
408
+ _subject(row: {
409
+ node: TreeNode;
410
+ id: unknown;
411
+ } | undefined): TreeNode | null;
412
+ /** @param {Element|null} element @returns {number} */
413
+ _rowIndex(element: Element | null): number;
373
414
  /** @param {unknown} id @returns {Element|null} */
374
415
  _rowElement(id: unknown): Element | null;
375
416
  /** @param {number} index @returns {void} */
@@ -9,9 +9,30 @@
9
9
  * Both renderers put `zx-icon` on the element, so component CSS can style either.
10
10
  * @module zx/core/icons
11
11
  */
12
+ /**
13
+ * Icon sizes in CSS pixels, named by the role an icon plays rather than by its measure, so a call
14
+ * site says what a glyph is for and every glyph in that role renders at one size:
15
+ *
16
+ * icon('chevron-down', { size: ICON_SIZE.chevron });
17
+ *
18
+ * Several roles share a value; they are named apart so one can change without a sweep. At 14px and
19
+ * below an outline glyph is drawn with a one-pixel line, so the roles that share 14 also share a
20
+ * stroke weight.
21
+ * @type {Readonly<{control: number, chevron: number, dismiss: number, check: number, sort: number,
22
+ * chip: number, marker: number}>}
23
+ */
24
+ export declare const ICON_SIZE: Readonly<{
25
+ control: number;
26
+ chevron: number;
27
+ dismiss: number;
28
+ check: number;
29
+ sort: number;
30
+ chip: number;
31
+ marker: number;
32
+ }>;
12
33
  export type IconOptions = {
13
34
  /**
14
- * Rendered width and height.
35
+ * Rendered width and height; `ICON_SIZE` names one per role.
15
36
  */
16
37
  size?: number | string;
17
38
  /**
@@ -22,6 +22,45 @@ export declare const defaultMessages: Readonly<{
22
22
  'activityItem.metadata': "Activity metadata";
23
23
  'activityItem.pending': "Sending…";
24
24
  'activityItem.untitled': "activity";
25
+ 'agent.activity.blocked': "Blocked";
26
+ 'agent.activity.idle': "Idle";
27
+ 'agent.activity.needsYou': "Needs you";
28
+ 'agent.activity.offline': "Offline";
29
+ 'agent.activity.thinking': "Thinking";
30
+ 'agent.activity.working': "Working";
31
+ 'agent.status.done': "Done";
32
+ 'agent.status.failed': "Failed";
33
+ 'agent.status.paused': "Paused";
34
+ 'agent.status.queued': "Not started";
35
+ 'agent.status.running': "Running";
36
+ 'agent.status.skipped': "Skipped";
37
+ 'agent.status.stopped': "Stopped";
38
+ 'agent.status.waiting': "Waiting for you";
39
+ 'agent.status.blocked': "Blocked";
40
+ 'agentThread.agent': "Agent";
41
+ 'agentThread.answered': "%1 answered";
42
+ 'agentThread.attachments': "Attachments";
43
+ 'agentThread.branch': "Branch into a new conversation";
44
+ 'agentThread.copy': "Copy answer";
45
+ 'agentThread.label': "Conversation";
46
+ 'agentThread.latest': "Jump to latest";
47
+ 'agentThread.needsApproval': "%1 needs your approval";
48
+ 'agentThread.nextVersion': "Next version";
49
+ 'agentThread.previousVersion': "Previous version";
50
+ 'agentThread.rateDown': "Not helpful";
51
+ 'agentThread.rateUp': "Helpful";
52
+ 'agentThread.regenerate': "Regenerate answer";
53
+ 'agentThread.sources': "Sources";
54
+ 'agentThread.stopped': "Stopped";
55
+ 'agentThread.stoppedAnnounce': "Stopped";
56
+ 'agentThread.version': "Version %1 of %2";
57
+ 'agentThread.via': "via %1";
58
+ 'agentThread.working': "%1 is working";
59
+ 'agentThread.writing': "%1 is writing an answer";
60
+ 'agentThread.you': "You";
61
+ 'agentThread.writingNow': "%1 is writing…";
62
+ 'agentThread.edit': "Edit message";
63
+ 'agentThread.copyMessage': "Copy message";
25
64
  'appRail.subNavigation': "%1 sub-navigation";
26
65
  'appSidebar.expand': "Expand application sidebar";
27
66
  'appSidebar.itemBadge': "%1 (%2)";
@@ -30,6 +69,42 @@ export declare const defaultMessages: Readonly<{
30
69
  'appSidebar.presentationCollapsed': "Both menus collapsed";
31
70
  'appSidebar.presentationCompact': "Module menu collapsed";
32
71
  'appSidebar.presentationExpanded': "Both menus expanded";
72
+ 'approvalCard.approve': "Approve";
73
+ 'approvalCard.approvedBy': "Approved by %1 at %2";
74
+ 'approvalCard.approvedByUndated': "Approved by %1";
75
+ 'approvalCard.cancel': "Cancel";
76
+ 'approvalCard.edit': "Edit";
77
+ 'approvalCard.editTitle': "Edit the request";
78
+ 'approvalCard.editedBy': "Edited by %1";
79
+ 'approvalCard.expiredAt': "Expired at %1";
80
+ 'approvalCard.expiredUndated': "Expired without an answer";
81
+ 'approvalCard.paused': "The run is paused until you answer.";
82
+ 'approvalCard.preview': "Preview";
83
+ 'approvalCard.reason': "Reason";
84
+ 'approvalCard.reasonLabel': "Why not?";
85
+ 'approvalCard.reasonMissing': "Say why, so the agent can do better next time.";
86
+ 'approvalCard.reasonOptional': "Optional. Your reason stays with the request.";
87
+ 'approvalCard.reasonRequired': "Your reason stays with the request.";
88
+ 'approvalCard.reject': "Reject";
89
+ 'approvalCard.rejectTitle': "Reject the request?";
90
+ 'approvalCard.rejectedBy': "Rejected by %1 at %2";
91
+ 'approvalCard.rejectedByUndated': "Rejected by %1";
92
+ 'approvalCard.required': "Fill this in to save.";
93
+ 'approvalCard.save': "Save changes";
94
+ 'approvalCard.status.approved': "Approved";
95
+ 'approvalCard.status.expired': "Expired";
96
+ 'approvalCard.status.pending': "Waiting for you";
97
+ 'approvalCard.status.rejected': "Rejected";
98
+ 'approvalCard.you': "you";
99
+ 'blockView.cite': "Source %1";
100
+ 'blockView.citeTitled': "Source %1: %2";
101
+ 'blockView.code': "Code";
102
+ 'blockView.copyCode': "Copy code";
103
+ 'blockView.document': "Document";
104
+ 'blockView.stopped': "Stopped here.";
105
+ 'blockView.table': "Table";
106
+ 'blockView.version': "1 version";
107
+ 'blockView.versions': "%1 versions";
33
108
  'breadcrumb.label': "Breadcrumb";
34
109
  'breadcrumb.more': "Show hidden levels";
35
110
  'calendar.agenda': "Agenda";
@@ -68,6 +143,19 @@ export declare const defaultMessages: Readonly<{
68
143
  'checklist.empty': "No matches";
69
144
  'checklist.label': "Checklist";
70
145
  'checklist.search': "Search";
146
+ 'composer.attach': "Attach files";
147
+ 'composer.attachments': "Attachments";
148
+ 'composer.commands': "Commands";
149
+ 'composer.commandsPlaceholder': "Search commands";
150
+ 'composer.context': "Context";
151
+ 'composer.drop': "Drop files to attach";
152
+ 'composer.label': "Message";
153
+ 'composer.match': "1 suggestion";
154
+ 'composer.matches': "%1 suggestions";
155
+ 'composer.remove': "Remove %1";
156
+ 'composer.send': "Send";
157
+ 'composer.stop': "Stop";
158
+ 'composer.suggestions': "Suggestions";
71
159
  'dataFilter.all': "All";
72
160
  'dataFilter.clear': "Clear";
73
161
  'datePicker.calendar': "Calendar";
@@ -245,6 +333,51 @@ export declare const defaultMessages: Readonly<{
245
333
  'recordView.fields': "Fields";
246
334
  'recordView.moveFieldDown': "Move %1 down";
247
335
  'recordView.moveFieldUp': "Move %1 up";
336
+ 'runStatus.cost': "%1 of %2";
337
+ 'runStatus.costLabel': "Cost";
338
+ 'runStatus.dateTimeFormat': "%e %b, %H:%M";
339
+ 'runStatus.failedAt': "Failed at";
340
+ 'runStatus.finished': "Finished";
341
+ 'runStatus.model': "Model";
342
+ 'runStatus.started': "Started";
343
+ 'runStatus.steps': "%1 of %2 steps";
344
+ 'runStatus.stepsLabel': "Steps done";
345
+ 'runStatus.stoppedAt': "Stopped at";
346
+ 'runStatus.timeFormat': "%H:%M";
347
+ 'runStatus.tokens': "Tokens";
348
+ 'runStatus.tokensValue': "%1 in · %2 out";
349
+ 'runStatus.waitingSince': "Waiting since";
350
+ 'runStatus.workingTime': "Working time";
351
+ 'runStatus.blockedSince': "Blocked since";
352
+ 'runStatus.tokenBudget': "%1 of %2 tokens";
353
+ 'runTrace.arguments': "Arguments";
354
+ 'runTrace.awaiting': "Waiting for the result…";
355
+ 'runTrace.call': "1 tool call";
356
+ 'runTrace.calls': "%1 tool calls";
357
+ 'runTrace.copied': "Copied";
358
+ 'runTrace.copyArguments': "Copy arguments";
359
+ 'runTrace.copyError': "Copy error";
360
+ 'runTrace.copyResult': "Copy result";
361
+ 'runTrace.doing': "%1…";
362
+ 'runTrace.error': "Error";
363
+ 'runTrace.failedAfter': "Failed after %1";
364
+ 'runTrace.handoff': "%1 handed over to %2";
365
+ 'runTrace.label': "Steps";
366
+ 'runTrace.result': "Result";
367
+ 'runTrace.retried': "Retried";
368
+ 'runTrace.retries': "%1 retries";
369
+ 'runTrace.retry': "1 retry";
370
+ 'runTrace.showAll': "Show all";
371
+ 'runTrace.source': "1 source";
372
+ 'runTrace.sources': "%1 sources";
373
+ 'runTrace.step': "1 step";
374
+ 'runTrace.steps': "%1 steps";
375
+ 'runTrace.stoppedAfter': "Stopped after %1";
376
+ 'runTrace.worked': "Worked for %1";
377
+ 'runTrace.working': "Working…";
378
+ 'runTrace.blockedAfter': "Blocked after %1";
379
+ 'runTrace.token': "1 token";
380
+ 'runTrace.tokens': "%1 tokens";
248
381
  'search.clear': "Clear search";
249
382
  'search.label': "Search";
250
383
  'search.submit': "Submit search";
@@ -255,6 +388,8 @@ export declare const defaultMessages: Readonly<{
255
388
  'select.none': "No selection";
256
389
  'select.toggle': "Toggle options";
257
390
  'sheet.resize': "Resize sheet";
391
+ 'sourceList.label': "Sources";
392
+ 'sourceList.source': "Source";
258
393
  'statTile.down': "down %1";
259
394
  'statTile.loading': "Loading";
260
395
  'statTile.unchanged': "no change";
@@ -16,7 +16,7 @@ export { Http, zeyosService, parseResult } from './core/http.js';
16
16
  export { setTranslator, setLanguage, getLanguage, translate, printf, defaultMessages } from './core/i18n.js';
17
17
  export { focusTrap, rovingTabindex, typeahead } from './core/keyboard.js';
18
18
  export { formatDate, parseDate, clampDate, isSameDay, addDays, addMonths, getWeekStart } from './core/date.js';
19
- export { icon, icons, iconNames, registerIcons, configureIcons, getIconConfig, useFontAwesome, useBuiltinIcons, loadFontAwesome } from './core/icons.js';
19
+ export { icon, icons, iconNames, registerIcons, ICON_SIZE, configureIcons, getIconConfig, useFontAwesome, useBuiltinIcons, loadFontAwesome } from './core/icons.js';
20
20
  export { faStyles, faFamilies, faNames, faIconClasses, parseIconSpec, kitUrl, loadFontAwesomeKit } from './core/fontawesome.js';
21
21
  export { debounce, throttle, uid, deepMerge, isElement, clamp, toArray, groupBy, sortBy, uniqueBy, escapeRegExp } from './core/util.js';
22
22
  export { formatNumber, formatCurrency, formatPercent, formatFileSize, formatRelativeTime } from './core/format.js';
@@ -25,6 +25,7 @@ export { toCsv, downloadBlob, copyToClipboard } from './core/export.js';
25
25
  export { defineElements } from './elements/define.js';
26
26
  export { button, buttonGroup, setButtonBusy } from './components/button/button.js';
27
27
  export { BADGE_TONES, badge, badgeGroup } from './components/badge/badge.js';
28
+ export { kbd, keyLabels } from './components/kbd/kbd.js';
28
29
  export { CheckButton } from './components/check-button/check-button.js';
29
30
  export { emptyState } from './components/empty-state/empty-state.js';
30
31
  export { spinner } from './components/loading/spinner.js';
@@ -35,6 +36,7 @@ export { stack, grid, aspect } from './components/layout/layout.js';
35
36
  export { truncate, isTruncated } from './components/truncate/truncate.js';
36
37
  export { copyButton } from './components/copy/copy-button.js';
37
38
  export { CopyInput } from './components/copy/copy-input.js';
39
+ export { proseAnchors, sectionHref } from './components/prose/prose.js';
38
40
  export { CodeEditor, indentSelection, editorPosition } from './components/code-editor/code-editor.js';
39
41
  export { Toolbar } from './components/toolbar/toolbar.js';
40
42
  export { Toggle } from './components/toggle/toggle.js';
@@ -60,6 +62,14 @@ export { FileItem, normalizeFileItem } from './components/file-item/file-item.js
60
62
  export { FileList, normalizeFileListItems } from './components/file-list/file-list.js';
61
63
  export { ActivityItem, resolveActivityActions, normalizeActivityAction, normalizeActivityTimestamp } from './components/activity-item/activity-item.js';
62
64
  export { ActivityList, groupActivityItems, normalizeActivityItems } from './components/activity-list/activity-list.js';
65
+ export { BlockView, renderBlocks } from './components/block-view/block-view.js';
66
+ export { blocksToMarkdown, blocksToText } from './internal/agent-model.js';
67
+ export { RunStatus } from './components/run-status/run-status.js';
68
+ export { Composer } from './components/composer/composer.js';
69
+ export { ApprovalCard } from './components/approval-card/approval-card.js';
70
+ export { RunTrace } from './components/run-trace/run-trace.js';
71
+ export { SourceList } from './components/source-list/source-list.js';
72
+ export { AgentThread } from './components/agent-thread/agent-thread.js';
63
73
  export { AccountMenu } from './components/account-menu/account-menu.js';
64
74
  export { WorkspaceSwitcher } from './components/workspace-switcher/workspace-switcher.js';
65
75
  export { normalizeAppItems } from './internal/app-rail.js';
@@ -84,7 +94,7 @@ export { Slider, stepPrecision } from './components/slider/slider.js';
84
94
  export { DatePicker } from './components/date-picker/date-picker.js';
85
95
  export { MonthPicker } from './components/date-picker/month-picker.js';
86
96
  export { TimePicker } from './components/date-picker/time-picker.js';
87
- export { Datebox, DateTimeBox } from './components/datebox/datebox.js';
97
+ export { Datebox, DateTimeBox, dateboxFormats } from './components/datebox/datebox.js';
88
98
  export { DateRangePicker, clampRange, defaultDateRangePresets, normalizeRange, rangeNights, rangeStateOf } from './components/date-picker/date-range-picker.js';
89
99
  export { DateRangeBox, formatRangeText, parseRangeText } from './components/datebox/date-range-box.js';
90
100
  export { Timebox, splitTime, joinTime } from './components/timebox/timebox.js';