@zeyos/zx 5.6.0 → 5.7.1
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.
- package/CHANGELOG.md +188 -0
- package/README.md +73 -7
- package/bin/zx-css.js +328 -0
- package/dist/types/components/account-menu/account-menu.d.ts +4 -2
- package/dist/types/components/activity-list/activity-list.d.ts +14 -8
- package/dist/types/components/agent-thread/ag-ui.d.ts +340 -0
- package/dist/types/components/agent-thread/agent-thread.d.ts +142 -14
- package/dist/types/components/agent-thread/ui-message-stream.d.ts +401 -0
- package/dist/types/components/app-sidebar/app-sidebar.d.ts +14 -8
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +3 -3
- package/dist/types/components/calendar/calendar-model.d.ts +9 -2
- package/dist/types/components/calendar/calendar.d.ts +12 -4
- package/dist/types/components/chart/chart.d.ts +25 -13
- package/dist/types/components/checklist/checklist.d.ts +29 -0
- package/dist/types/components/code-editor/code-editor.d.ts +7 -2
- package/dist/types/components/composer/composer.d.ts +206 -4
- package/dist/types/components/composer/queue.d.ts +76 -0
- package/dist/types/components/copy/copy-button.d.ts +6 -4
- package/dist/types/components/copy/copy-input.d.ts +10 -6
- package/dist/types/components/datebox/date-range-box.d.ts +33 -0
- package/dist/types/components/datebox/placeholder.d.ts +7 -0
- package/dist/types/components/dialog/dialog.d.ts +2 -2
- package/dist/types/components/dock/dock.d.ts +12 -3
- package/dist/types/components/entity-ref/entity-ref.d.ts +5 -3
- package/dist/types/components/field-upload/field-upload.d.ts +3 -2
- package/dist/types/components/file-item/file-item.d.ts +3 -2
- package/dist/types/components/file-list/file-list.d.ts +14 -8
- package/dist/types/components/filter/filter-model.d.ts +31 -1
- package/dist/types/components/filter/filter.d.ts +20 -2
- package/dist/types/components/finder/finder.d.ts +14 -6
- package/dist/types/components/flag/flag.d.ts +99 -0
- package/dist/types/components/grid/grid.d.ts +1 -1
- package/dist/types/components/kanban-view/kanban-view.d.ts +8 -66
- package/dist/types/components/launcher/launcher.d.ts +2 -0
- package/dist/types/components/modal/modal.d.ts +34 -8
- package/dist/types/components/multi-value-editor/multi-value-editor.d.ts +3 -2
- package/dist/types/components/number-field/number-field.d.ts +41 -7
- package/dist/types/components/prompt-starters/prompt-starters.d.ts +107 -0
- package/dist/types/components/prose/prose.d.ts +9 -6
- package/dist/types/components/questionnaire/conditions.d.ts +270 -0
- package/dist/types/components/questionnaire/items.d.ts +52 -30
- package/dist/types/components/questionnaire/questionnaire.d.ts +44 -4
- package/dist/types/components/rating/rating.d.ts +5 -3
- package/dist/types/components/select/country.d.ts +106 -0
- package/dist/types/components/select/field-adapter.d.ts +2 -1
- package/dist/types/components/select/locale.d.ts +102 -0
- package/dist/types/components/select/select.d.ts +41 -2
- package/dist/types/components/sheet/sheet.d.ts +2 -2
- package/dist/types/components/slider/slider.d.ts +1 -0
- package/dist/types/components/sort-control/sort-control.d.ts +7 -3
- package/dist/types/components/source-list/source-list.d.ts +7 -5
- package/dist/types/components/split-view/split-view.d.ts +5 -3
- package/dist/types/components/surface/catalog.d.ts +260 -0
- package/dist/types/components/surface/elicit.d.ts +81 -0
- package/dist/types/components/surface/mcp.d.ts +165 -0
- package/dist/types/components/surface/schema.d.ts +314 -0
- package/dist/types/components/surface/stream.d.ts +118 -0
- package/dist/types/components/surface/surface.d.ts +718 -0
- package/dist/types/components/surface/text.d.ts +277 -0
- package/dist/types/components/surface/validate.d.ts +339 -0
- package/dist/types/components/table/table.d.ts +55 -3
- package/dist/types/components/table/window.d.ts +203 -0
- package/dist/types/components/toolbar/toolbar.d.ts +10 -6
- package/dist/types/components/tooltip/tooltip.d.ts +2 -2
- package/dist/types/components/tree/tree.d.ts +20 -13
- package/dist/types/core/component.d.ts +10 -0
- package/dist/types/core/date.d.ts +8 -1
- package/dist/types/core/dom.d.ts +15 -0
- package/dist/types/core/http.d.ts +10 -0
- package/dist/types/core/i18n.d.ts +38 -0
- package/dist/types/core/messages.d.ts +344 -1
- package/dist/types/core/storage.d.ts +7 -2
- package/dist/types/elements/define.d.ts +21 -46
- package/dist/types/elements/definitions.d.ts +147 -0
- package/dist/types/elements/kit.d.ts +7 -0
- package/dist/types/elements/reflect.d.ts +6 -3
- package/dist/types/index.d.ts +10 -1
- package/dist/types/internal/date-locale.d.ts +7 -0
- package/dist/types/internal/json-patch.d.ts +146 -0
- package/dist/types/locales/de.d.ts +13 -0
- package/dist/types/locales/en.d.ts +2 -0
- package/dist/types/locales/index.d.ts +823 -0
- package/dist/types/zeyos/view.d.ts +8 -1
- package/dist/zx-zeyos.esm.js +16852 -15131
- package/dist/zx-zeyos.esm.min.js +5 -5
- package/dist/zx.core.css +1276 -0
- package/dist/zx.core.min.css +1 -0
- package/dist/zx.css +520 -143
- package/dist/zx.esm.js +40940 -29684
- package/dist/zx.esm.min.js +36 -23
- package/dist/zx.global.js +40940 -29684
- package/dist/zx.global.min.js +36 -23
- package/dist/zx.layered.css +17315 -0
- package/dist/zx.layered.min.css +1 -0
- package/dist/zx.min.css +1 -1
- package/docs/agent-catalog.json +12501 -0
- package/docs/agent-surfaces.md +340 -0
- package/docs/api.json +909 -137
- package/docs/llms.md +1046 -80
- package/docs/llms.txt +30 -9
- package/package.json +29 -6
- package/src/components/account-menu/account-menu.js +6 -3
- package/src/components/activity-item/activity-item.js +2 -1
- package/src/components/activity-list/activity-list.js +16 -10
- package/src/components/agent-thread/ag-ui.js +1439 -0
- package/src/components/agent-thread/agent-thread.js +359 -54
- package/src/components/agent-thread/ui-message-stream.js +1281 -0
- package/src/components/app-sidebar/app-sidebar.js +18 -8
- package/src/components/approval-card/approval-card.js +3 -2
- package/src/components/block-view/block-view.js +7 -6
- package/src/components/breadcrumb/breadcrumb.js +8 -5
- package/src/components/button/button.css +24 -11
- package/src/components/calendar/calendar-model.js +8 -2
- package/src/components/calendar/calendar.js +53 -18
- package/src/components/chart/chart.js +54 -23
- package/src/components/checklist/checklist.css +9 -1
- package/src/components/checklist/checklist.js +59 -3
- package/src/components/checklist/field-adapter.js +2 -11
- package/src/components/code-editor/code-editor.js +45 -8
- package/src/components/code-editor/field-adapter.js +1 -1
- package/src/components/composer/composer.css +80 -1
- package/src/components/composer/composer.js +390 -16
- package/src/components/composer/queue.js +78 -0
- package/src/components/context-menu/context-menu.js +12 -1
- package/src/components/copy/copy-button.js +9 -7
- package/src/components/copy/copy-input.js +10 -6
- package/src/components/date-picker/date-picker.js +2 -1
- package/src/components/date-picker/date-range-picker.js +8 -7
- package/src/components/datebox/date-range-box.js +3 -9
- package/src/components/datebox/datebox.js +18 -21
- package/src/components/datebox/placeholder.js +18 -0
- package/src/components/dialog/dialog.js +4 -5
- package/src/components/dock/dock.js +34 -13
- package/src/components/entity-ref/entity-ref.js +16 -5
- package/src/components/field-upload/field-upload.js +81 -38
- package/src/components/file-item/file-item.js +70 -40
- package/src/components/file-list/file-list.js +15 -9
- package/src/components/filter/filter-model.js +46 -8
- package/src/components/filter/filter.css +3 -3
- package/src/components/filter/filter.js +29 -10
- package/src/components/filter-panel/filter-panel.js +13 -5
- package/src/components/finder/finder.js +50 -26
- package/src/components/flag/flag.css +40 -0
- package/src/components/flag/flag.js +177 -0
- package/src/components/form/form.js +1 -1
- package/src/components/grid/grid.js +22 -8
- package/src/components/kanban-view/kanban-view.js +51 -81
- package/src/components/launcher/launcher.js +17 -2
- package/src/components/list-toolbar/list-toolbar.js +2 -1
- package/src/components/master-panel/master-panel.js +1 -1
- package/src/components/menu-button/menu-button.js +4 -0
- package/src/components/message/message.js +3 -0
- package/src/components/modal/modal.js +62 -8
- package/src/components/multi-value-editor/multi-value-editor.js +10 -9
- package/src/components/navigation-bar/navigation-bar.js +3 -3
- package/src/components/number-field/number-field.js +98 -29
- package/src/components/prompt-starters/prompt-starters.css +91 -0
- package/src/components/prompt-starters/prompt-starters.js +206 -0
- package/src/components/prose/prose.js +14 -10
- package/src/components/questionnaire/conditions.js +666 -0
- package/src/components/questionnaire/items.js +150 -41
- package/src/components/questionnaire/questionnaire.js +126 -32
- package/src/components/rating/rating.js +5 -4
- package/src/components/run-status/run-status.js +2 -2
- package/src/components/select/country.js +136 -0
- package/src/components/select/field-adapter.js +7 -2
- package/src/components/select/locale.js +219 -0
- package/src/components/select/select.css +20 -22
- package/src/components/select/select.js +94 -12
- package/src/components/sheet/sheet-stack.js +10 -1
- package/src/components/sheet/sheet.js +12 -5
- package/src/components/slider/slider.js +7 -2
- package/src/components/sort-control/sort-control.js +15 -5
- package/src/components/source-list/source-list.js +7 -4
- package/src/components/split-view/split-view.js +5 -3
- package/src/components/surface/catalog.js +1334 -0
- package/src/components/surface/elicit.js +107 -0
- package/src/components/surface/mcp.js +243 -0
- package/src/components/surface/schema.js +644 -0
- package/src/components/surface/stream.js +245 -0
- package/src/components/surface/surface.css +308 -0
- package/src/components/surface/surface.js +2291 -0
- package/src/components/surface/text.js +513 -0
- package/src/components/surface/validate.js +2218 -0
- package/src/components/tabbox/tabbox.js +9 -0
- package/src/components/table/table.css +63 -3
- package/src/components/table/table.js +167 -28
- package/src/components/table/window.js +317 -0
- package/src/components/toolbar/toolbar.js +12 -7
- package/src/components/tooltip/tooltip.css +2 -3
- package/src/components/tooltip/tooltip.js +32 -5
- package/src/components/tree/tree.js +53 -23
- package/src/core/component.js +25 -1
- package/src/core/date.js +62 -16
- package/src/core/dom.js +67 -4
- package/src/core/format.js +15 -13
- package/src/core/http.js +29 -20
- package/src/core/i18n.js +83 -10
- package/src/core/icons.js +13 -2
- package/src/core/keyboard.js +79 -8
- package/src/core/messages.js +376 -2
- package/src/core/overlay-host.js +1 -0
- package/src/core/position.js +3 -2
- package/src/core/storage.js +59 -6
- package/src/elements/define.js +178 -130
- package/src/elements/definitions.js +229 -0
- package/src/elements/kit.js +444 -0
- package/src/elements/reflect.js +8 -3
- package/src/index.js +10 -1
- package/src/internal/date-locale.js +11 -0
- package/src/internal/json-patch.js +405 -0
- package/src/locales/de.js +911 -0
- package/src/locales/en.js +2 -0
- package/src/locales/index.js +7 -0
- package/src/zeyos/calendar.js +2 -1
- package/src/zeyos/form.js +2 -1
- package/src/zeyos/launcher.js +7 -6
- package/src/zeyos/module-bar.js +2 -1
- package/src/zeyos/schema.js +37 -23
- package/src/zeyos/select.js +4 -3
- package/src/zeyos/table.js +2 -13
- package/src/zeyos/view.js +57 -17
- package/styles/core.css +11 -0
- package/styles/tokens/semantic.css +1 -0
- package/styles/zeyos.css +2 -0
- package/styles/zx.css +4 -8
- package/styles/zx.layered.css +1 -0
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
export type AgentThread = import('./agent-thread.js').AgentThread;
|
|
2
|
+
export type BlockView = import('../block-view/block-view.js').BlockView;
|
|
3
|
+
export type RunStatus = import('../run-status/run-status.js').RunStatus;
|
|
4
|
+
export type Author = import('../../internal/agent-model.js').Author;
|
|
5
|
+
export type Block = import('../../internal/agent-model.js').Block;
|
|
6
|
+
export type RunState = import('../../internal/agent-model.js').RunState;
|
|
7
|
+
export type Source = import('../../internal/agent-model.js').Source;
|
|
8
|
+
export type ThreadItem = import('../../internal/agent-model.js').ThreadItem;
|
|
9
|
+
export type TraceStep = import('../../internal/agent-model.js').TraceStep;
|
|
10
|
+
/** @typedef {import('./agent-thread.js').AgentThread} AgentThread */
|
|
11
|
+
/** @typedef {import('../block-view/block-view.js').BlockView} BlockView */
|
|
12
|
+
/** @typedef {import('../run-status/run-status.js').RunStatus} RunStatus */
|
|
13
|
+
/** @typedef {import('../../internal/agent-model.js').Author} Author */
|
|
14
|
+
/** @typedef {import('../../internal/agent-model.js').Block} Block */
|
|
15
|
+
/** @typedef {import('../../internal/agent-model.js').RunState} RunState */
|
|
16
|
+
/** @typedef {import('../../internal/agent-model.js').Source} Source */
|
|
17
|
+
/** @typedef {import('../../internal/agent-model.js').ThreadItem} ThreadItem */
|
|
18
|
+
/** @typedef {import('../../internal/agent-model.js').TraceStep} TraceStep */
|
|
19
|
+
/**
|
|
20
|
+
* The version of the UI message stream this adapter implements: the value of the response header
|
|
21
|
+
* `x-vercel-ai-ui-message-stream`.
|
|
22
|
+
*/
|
|
23
|
+
export declare const UI_MESSAGE_STREAM_VERSION = "v1";
|
|
24
|
+
export type UiMessagePart = {
|
|
25
|
+
type: string;
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
};
|
|
28
|
+
export type ToolCall = {
|
|
29
|
+
/**
|
|
30
|
+
* The tool call id.
|
|
31
|
+
*/
|
|
32
|
+
id: string;
|
|
33
|
+
/**
|
|
34
|
+
* The tool's name.
|
|
35
|
+
*/
|
|
36
|
+
name: string;
|
|
37
|
+
/**
|
|
38
|
+
* The input once it is complete; `null` before.
|
|
39
|
+
*/
|
|
40
|
+
args: unknown;
|
|
41
|
+
/**
|
|
42
|
+
* The input as text; empty until it is complete when it was not
|
|
43
|
+
* streamed.
|
|
44
|
+
*/
|
|
45
|
+
argsText: string;
|
|
46
|
+
/**
|
|
47
|
+
* What the tool returned.
|
|
48
|
+
*/
|
|
49
|
+
result?: unknown;
|
|
50
|
+
/**
|
|
51
|
+
* Why the call failed.
|
|
52
|
+
*/
|
|
53
|
+
error?: string;
|
|
54
|
+
/**
|
|
55
|
+
* `queued` while the input arrives, `waiting` for an approval, `running`
|
|
56
|
+
* until the result, then `done`, `failed`, `skipped` when it was denied, or `stopped`.
|
|
57
|
+
*/
|
|
58
|
+
status: RunState;
|
|
59
|
+
};
|
|
60
|
+
export type UiMessageStreamOptions = {
|
|
61
|
+
/**
|
|
62
|
+
* A run status to keep up to date.
|
|
63
|
+
*/
|
|
64
|
+
runStatus?: RunStatus | null;
|
|
65
|
+
/**
|
|
66
|
+
* Who writes; its first author who is not a person
|
|
67
|
+
* is the agent when `agent` is not given.
|
|
68
|
+
*/
|
|
69
|
+
authors?: Record<string, Author>;
|
|
70
|
+
/**
|
|
71
|
+
* Author key of the assistant's output.
|
|
72
|
+
*/
|
|
73
|
+
agent?: string | null;
|
|
74
|
+
/**
|
|
75
|
+
* Tiles by tool name: the
|
|
76
|
+
* application's renderer for a tool's calls, called at each status change. Its item joins the
|
|
77
|
+
* thread as `tool:<toolCallId>`, and the call's step links to it.
|
|
78
|
+
*/
|
|
79
|
+
tools?: Record<string, (call: ToolCall) => ThreadItem | null>;
|
|
80
|
+
/**
|
|
81
|
+
* The
|
|
82
|
+
* person decided. The application sends the answer with its next request.
|
|
83
|
+
*/
|
|
84
|
+
onapproval?: (approvalId: string, approved: boolean, reason?: string) => void;
|
|
85
|
+
/**
|
|
86
|
+
* A `data-<name>` part. With
|
|
87
|
+
* an `id` it replaces the earlier value of that name and id. What went out here stays with the
|
|
88
|
+
* application: a `reset-step` takes back what was drawn, not what was delivered.
|
|
89
|
+
*/
|
|
90
|
+
ondata?: (name: string, data: unknown, id?: string) => void;
|
|
91
|
+
/**
|
|
92
|
+
* Metadata of the message.
|
|
93
|
+
*/
|
|
94
|
+
onmetadata?: (metadata: unknown) => void;
|
|
95
|
+
/**
|
|
96
|
+
* A part the adapter does not draw.
|
|
97
|
+
*/
|
|
98
|
+
onunknown?: (part: UiMessagePart) => void;
|
|
99
|
+
/**
|
|
100
|
+
* A part out of order, or a tile that failed.
|
|
101
|
+
*/
|
|
102
|
+
onerror?: (error: Error) => void;
|
|
103
|
+
/**
|
|
104
|
+
* Shows the model's reasoning text. Without it the text
|
|
105
|
+
* is not kept, and the reasoning is one step that says how long it took.
|
|
106
|
+
*/
|
|
107
|
+
showReasoning?: boolean;
|
|
108
|
+
};
|
|
109
|
+
export type UiMessageStreamConnection = {
|
|
110
|
+
/**
|
|
111
|
+
* Takes the next part of the stream.
|
|
112
|
+
*/
|
|
113
|
+
handle: (part: UiMessagePart) => void;
|
|
114
|
+
/**
|
|
115
|
+
* Says that the stream is about to be fed again from
|
|
116
|
+
* the `start` of the response it was reading, after a reconnect that returns the whole response:
|
|
117
|
+
* only the application knows that it reconnected. What that response drew goes, so that the replay
|
|
118
|
+
* rebuilds it, with nothing doubled and nothing reported. What earlier responses of the message drew
|
|
119
|
+
* stays, because a response is all a replay sends, and a decision stands. Without `messageId`, the
|
|
120
|
+
* message being read. A message this connection does not know is left alone.
|
|
121
|
+
*/
|
|
122
|
+
replay: (messageId?: string) => void;
|
|
123
|
+
/**
|
|
124
|
+
* Stops listening. An answer still open is stopped, a pending
|
|
125
|
+
* approval expires, because no decision could reach the application any more, and a call still
|
|
126
|
+
* going is stopped, because nothing can settle it.
|
|
127
|
+
*/
|
|
128
|
+
destroy: () => void;
|
|
129
|
+
};
|
|
130
|
+
export type MessageState = {
|
|
131
|
+
/**
|
|
132
|
+
* The message id, which is also its first answer item's.
|
|
133
|
+
*/
|
|
134
|
+
id: string;
|
|
135
|
+
/**
|
|
136
|
+
* The answer items that hold it, in thread order: the message id, then
|
|
137
|
+
* `<id>#2`, `<id>#3`. What it says next goes to the last.
|
|
138
|
+
*/
|
|
139
|
+
pieces: string[];
|
|
140
|
+
/**
|
|
141
|
+
* Whether its last piece is streaming.
|
|
142
|
+
*/
|
|
143
|
+
writing: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* The message's steps, which its first piece shows.
|
|
146
|
+
*/
|
|
147
|
+
steps: TraceStep[];
|
|
148
|
+
/**
|
|
149
|
+
* The message's sources.
|
|
150
|
+
*/
|
|
151
|
+
sources: Source[];
|
|
152
|
+
/**
|
|
153
|
+
* The piece that lists them.
|
|
154
|
+
*/
|
|
155
|
+
listed: string;
|
|
156
|
+
/**
|
|
157
|
+
* Text blocks not ended yet. An ended block's id is free again.
|
|
158
|
+
*/
|
|
159
|
+
texts: Set<unknown>;
|
|
160
|
+
/**
|
|
161
|
+
* The open block whose words are going out; null when none is.
|
|
162
|
+
*/
|
|
163
|
+
speaking: unknown;
|
|
164
|
+
/**
|
|
165
|
+
* What other open blocks said
|
|
166
|
+
* meanwhile, by block, in the order they began. Answers can only be written at their end, so blocks
|
|
167
|
+
* that stream side by side go out one after the other.
|
|
168
|
+
*/
|
|
169
|
+
held: Map<unknown, {
|
|
170
|
+
text: string;
|
|
171
|
+
ended: boolean;
|
|
172
|
+
}>;
|
|
173
|
+
/**
|
|
174
|
+
* Whether the last piece ends in text a new block has to be set apart
|
|
175
|
+
* from.
|
|
176
|
+
*/
|
|
177
|
+
hasText: boolean;
|
|
178
|
+
/**
|
|
179
|
+
* Whether the next text starts a new paragraph.
|
|
180
|
+
*/
|
|
181
|
+
gap: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* Whether the first piece has steps on screen.
|
|
184
|
+
*/
|
|
185
|
+
drawn: boolean;
|
|
186
|
+
/**
|
|
187
|
+
* Whether the run reported an error.
|
|
188
|
+
*/
|
|
189
|
+
failed: boolean;
|
|
190
|
+
/**
|
|
191
|
+
* Whether it finished or was stopped.
|
|
192
|
+
*/
|
|
193
|
+
closed: boolean;
|
|
194
|
+
/**
|
|
195
|
+
* Whether its `start` is still to come: a part created it ahead of its
|
|
196
|
+
* `start`, or a replay is about to send it again.
|
|
197
|
+
*/
|
|
198
|
+
implied: boolean;
|
|
199
|
+
/**
|
|
200
|
+
* Whether its latest response is being sent again.
|
|
201
|
+
*/
|
|
202
|
+
replaying: boolean;
|
|
203
|
+
/**
|
|
204
|
+
* Whether the response that resumed it has written nothing yet.
|
|
205
|
+
*/
|
|
206
|
+
quiet: boolean;
|
|
207
|
+
/**
|
|
208
|
+
* Counts what it wrote, so that a step can tell it wrote nothing.
|
|
209
|
+
*/
|
|
210
|
+
writes: number;
|
|
211
|
+
/**
|
|
212
|
+
* Its reasoning.
|
|
213
|
+
*/
|
|
214
|
+
thinking: ThinkingState | null;
|
|
215
|
+
/**
|
|
216
|
+
* The calls it began, in order.
|
|
217
|
+
*/
|
|
218
|
+
calls: CallState[];
|
|
219
|
+
/**
|
|
220
|
+
* The error notices drawn while it was open, in order.
|
|
221
|
+
*/
|
|
222
|
+
notices: string[];
|
|
223
|
+
/**
|
|
224
|
+
* Where its current step began.
|
|
225
|
+
*/
|
|
226
|
+
mark: StepMark;
|
|
227
|
+
/**
|
|
228
|
+
* Where its latest response began.
|
|
229
|
+
*/
|
|
230
|
+
response: StepMark;
|
|
231
|
+
};
|
|
232
|
+
export type StepMark = {
|
|
233
|
+
/**
|
|
234
|
+
* When it was taken, among the connection's marks.
|
|
235
|
+
*/
|
|
236
|
+
at: number;
|
|
237
|
+
/**
|
|
238
|
+
* How many calls the message had begun.
|
|
239
|
+
*/
|
|
240
|
+
calls: number;
|
|
241
|
+
/**
|
|
242
|
+
* How many notices it had drawn.
|
|
243
|
+
*/
|
|
244
|
+
notices: number;
|
|
245
|
+
/**
|
|
246
|
+
* How many pieces the message had.
|
|
247
|
+
*/
|
|
248
|
+
pieces: number;
|
|
249
|
+
/**
|
|
250
|
+
* What its last piece showed.
|
|
251
|
+
*/
|
|
252
|
+
blocks: Block[];
|
|
253
|
+
/**
|
|
254
|
+
* How many sources it had.
|
|
255
|
+
*/
|
|
256
|
+
sources: number;
|
|
257
|
+
/**
|
|
258
|
+
* Its reasoning so far, if it had any.
|
|
259
|
+
*/
|
|
260
|
+
thought: {
|
|
261
|
+
ms: number;
|
|
262
|
+
text: string;
|
|
263
|
+
} | null;
|
|
264
|
+
/**
|
|
265
|
+
* Where its text
|
|
266
|
+
* stood.
|
|
267
|
+
*/
|
|
268
|
+
state: Pick<MessageState, 'writing' | 'hasText' | 'gap' | 'failed' | 'quiet'>;
|
|
269
|
+
/**
|
|
270
|
+
* What it had written.
|
|
271
|
+
*/
|
|
272
|
+
writes: number;
|
|
273
|
+
};
|
|
274
|
+
export type ThinkingState = {
|
|
275
|
+
/**
|
|
276
|
+
* The one step all the message's reasoning shares.
|
|
277
|
+
*/
|
|
278
|
+
step: TraceStep;
|
|
279
|
+
/**
|
|
280
|
+
* Reasoning blocks not ended yet.
|
|
281
|
+
*/
|
|
282
|
+
open: Set<unknown>;
|
|
283
|
+
/**
|
|
284
|
+
* When the running stretch began.
|
|
285
|
+
*/
|
|
286
|
+
since: number | null;
|
|
287
|
+
/**
|
|
288
|
+
* Time spent in finished stretches.
|
|
289
|
+
*/
|
|
290
|
+
ms: number;
|
|
291
|
+
/**
|
|
292
|
+
* The reasoning text; only with `showReasoning`.
|
|
293
|
+
*/
|
|
294
|
+
text: string;
|
|
295
|
+
};
|
|
296
|
+
export type CallState = {
|
|
297
|
+
/**
|
|
298
|
+
* The tool call id.
|
|
299
|
+
*/
|
|
300
|
+
id: string;
|
|
301
|
+
/**
|
|
302
|
+
* The tool's name.
|
|
303
|
+
*/
|
|
304
|
+
name: string;
|
|
305
|
+
/**
|
|
306
|
+
* The message it belongs to, also from a later response.
|
|
307
|
+
*/
|
|
308
|
+
message: MessageState;
|
|
309
|
+
/**
|
|
310
|
+
* Where it stands.
|
|
311
|
+
*/
|
|
312
|
+
status: RunState;
|
|
313
|
+
/**
|
|
314
|
+
* The complete input.
|
|
315
|
+
*/
|
|
316
|
+
args: unknown;
|
|
317
|
+
/**
|
|
318
|
+
* The input text so far.
|
|
319
|
+
*/
|
|
320
|
+
argsText: string;
|
|
321
|
+
/**
|
|
322
|
+
* The output.
|
|
323
|
+
*/
|
|
324
|
+
result?: unknown;
|
|
325
|
+
/**
|
|
326
|
+
* The error text.
|
|
327
|
+
*/
|
|
328
|
+
error?: string;
|
|
329
|
+
/**
|
|
330
|
+
* When it began running.
|
|
331
|
+
*/
|
|
332
|
+
since: number | null;
|
|
333
|
+
/**
|
|
334
|
+
* Its step.
|
|
335
|
+
*/
|
|
336
|
+
step: TraceStep;
|
|
337
|
+
/**
|
|
338
|
+
* The tile's item id, once drawn.
|
|
339
|
+
*/
|
|
340
|
+
tile: string | null;
|
|
341
|
+
};
|
|
342
|
+
export type ApprovalState = {
|
|
343
|
+
/**
|
|
344
|
+
* The approval id.
|
|
345
|
+
*/
|
|
346
|
+
id: string;
|
|
347
|
+
/**
|
|
348
|
+
* The call it holds.
|
|
349
|
+
*/
|
|
350
|
+
call: CallState;
|
|
351
|
+
/**
|
|
352
|
+
* The message being read when it was drawn.
|
|
353
|
+
*/
|
|
354
|
+
by: MessageState | null;
|
|
355
|
+
/**
|
|
356
|
+
* How many marks had been taken when it was drawn.
|
|
357
|
+
*/
|
|
358
|
+
at: number;
|
|
359
|
+
/**
|
|
360
|
+
* Whether nothing can be decided any more.
|
|
361
|
+
*/
|
|
362
|
+
settled: boolean;
|
|
363
|
+
};
|
|
364
|
+
export type Decision = {
|
|
365
|
+
/**
|
|
366
|
+
* Whether it was approved.
|
|
367
|
+
*/
|
|
368
|
+
approved: boolean;
|
|
369
|
+
/**
|
|
370
|
+
* Why it was rejected.
|
|
371
|
+
*/
|
|
372
|
+
reason?: string;
|
|
373
|
+
/**
|
|
374
|
+
* When, as the card says it.
|
|
375
|
+
*/
|
|
376
|
+
at?: string;
|
|
377
|
+
};
|
|
378
|
+
/**
|
|
379
|
+
* Draws an AI SDK UI message stream in an AgentThread: text, reasoning, tool calls and their
|
|
380
|
+
* approvals, sources, and files. The application owns the request, the event source, retries, and
|
|
381
|
+
* authentication; it strips the `data: ` framing and the `[DONE]` sentinel and hands each parsed
|
|
382
|
+
* part to `handle()`, so the adapter runs with any transport and without a network.
|
|
383
|
+
*
|
|
384
|
+
* Keep one connection for the whole conversation: an approval's answer goes out with the
|
|
385
|
+
* application's next request, and the response to it continues the same message. A `start` for an
|
|
386
|
+
* answer the connection did not draw, restored with the conversation, takes it over, and nothing in
|
|
387
|
+
* the thread is overwritten: a `start` naming any other item opens an answer of its own.
|
|
388
|
+
*
|
|
389
|
+
* The thread stays in stream order. What a message says after a card, a tile, or another item it
|
|
390
|
+
* cannot write above continues in a new answer `<messageId>#<n>`, counting from 2, which the thread
|
|
391
|
+
* draws as the same turn. A `reset-step` takes back what the step drew, whichever answers it reached.
|
|
392
|
+
*
|
|
393
|
+
* Model output is data. Nothing is approved without the person, reasoning text stays out of the
|
|
394
|
+
* page unless asked for, a source only ever links to `https:`, and no address is fetched to draw
|
|
395
|
+
* anything: a file part shows its name and type, never its content.
|
|
396
|
+
*
|
|
397
|
+
* @param {AgentThread} thread The thread to draw in.
|
|
398
|
+
* @param {UiMessageStreamOptions} [options]
|
|
399
|
+
* @returns {UiMessageStreamConnection}
|
|
400
|
+
*/
|
|
401
|
+
export declare function connectUiMessageStream(thread: AgentThread, options?: UiMessageStreamOptions): UiMessageStreamConnection;
|
|
@@ -94,14 +94,16 @@ export type AppSidebarOptions = {
|
|
|
94
94
|
*/
|
|
95
95
|
presentationSwitch?: boolean;
|
|
96
96
|
/**
|
|
97
|
-
* Navigation accessible label.
|
|
97
|
+
* Navigation accessible label, by default the `appSidebar.label`
|
|
98
|
+
* message ("Applications"). Null leaves the navigation unnamed.
|
|
98
99
|
*/
|
|
99
|
-
label?: string;
|
|
100
|
+
label?: string | null;
|
|
100
101
|
/**
|
|
101
|
-
* Name of a destination's overflow menu when its
|
|
102
|
-
*
|
|
102
|
+
* Name of a destination's overflow menu when its `actions`
|
|
103
|
+
* fold; every action name is followed by the destination's label. Null reads the `appSidebar.more`
|
|
104
|
+
* message ("More actions").
|
|
103
105
|
*/
|
|
104
|
-
moreLabel?: string;
|
|
106
|
+
moreLabel?: string | null;
|
|
105
107
|
/**
|
|
106
108
|
* Expanded header content;
|
|
107
109
|
* in the modules layout, content above every module's menu.
|
|
@@ -225,9 +227,11 @@ export type AppSidebarOptions = {
|
|
|
225
227
|
* @property {boolean} [presentationSwitch=true] Modules layout: whether the strip's foot carries the
|
|
226
228
|
* switch between presentations. Turn it off when the choice lives elsewhere — an account menu,
|
|
227
229
|
* through `presentationChoice()`.
|
|
228
|
-
* @property {string} [label
|
|
229
|
-
*
|
|
230
|
-
*
|
|
230
|
+
* @property {string|null} [label] Navigation accessible label, by default the `appSidebar.label`
|
|
231
|
+
* message ("Applications"). Null leaves the navigation unnamed.
|
|
232
|
+
* @property {string|null} [moreLabel=null] Name of a destination's overflow menu when its `actions`
|
|
233
|
+
* fold; every action name is followed by the destination's label. Null reads the `appSidebar.more`
|
|
234
|
+
* message ("More actions").
|
|
231
235
|
* @property {Node|string|number|{toElement: () => Node|null}|null} [header=null] Expanded header content;
|
|
232
236
|
* in the modules layout, content above every module's menu.
|
|
233
237
|
* @property {Node|string|number|{toElement: () => Node|null}|null} [footer=null] Expanded sticky footer content.
|
|
@@ -416,6 +420,8 @@ export declare class AppSidebar extends Component<AppSidebarOptions> {
|
|
|
416
420
|
destroy(): void;
|
|
417
421
|
/** Mounts exactly one expanded tree or minimized flyout presentation. @returns {void} */
|
|
418
422
|
_renderMode(): void;
|
|
423
|
+
/** @returns {string|null} The navigation's name: unset reads the catalogue, and null is no name. */
|
|
424
|
+
_navigationLabel(): string | null;
|
|
419
425
|
/** @returns {void} */
|
|
420
426
|
_renderExpanded(): void;
|
|
421
427
|
/** @returns {HTMLButtonElement} The minimize control of an expanded presentation. */
|
|
@@ -179,10 +179,10 @@ export declare class Breadcrumb extends Component<BreadcrumbOptions> {
|
|
|
179
179
|
_renderSeparator(): HTMLElement;
|
|
180
180
|
/**
|
|
181
181
|
* @param {string|undefined} name Item name from a control's `data-crumb`.
|
|
182
|
-
* @returns {
|
|
182
|
+
* @returns {CustomEvent<BreadcrumbSelectDetail>|undefined}
|
|
183
183
|
* @fires Breadcrumb#select
|
|
184
184
|
*/
|
|
185
|
-
_select(name: string | undefined):
|
|
185
|
+
_select(name: string | undefined): CustomEvent<BreadcrumbSelectDetail> | undefined;
|
|
186
186
|
/**
|
|
187
187
|
* Resolves a message through the host translator, falling back to the built-in English text.
|
|
188
188
|
* @param {string} key Message key.
|
|
@@ -194,7 +194,7 @@ export declare class Breadcrumb extends Component<BreadcrumbOptions> {
|
|
|
194
194
|
}
|
|
195
195
|
/**
|
|
196
196
|
* Fired when an interactive crumb is chosen, from the trail itself or from the overflow menu. A
|
|
197
|
-
* crumb with an `href`
|
|
197
|
+
* crumb with an `href` navigates natively unless the selection is prevented.
|
|
198
198
|
* @event Breadcrumb#select
|
|
199
199
|
* @type {CustomEvent<BreadcrumbSelectDetail>}
|
|
200
200
|
*/
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/** @typedef {'agenda'|'day'|'week'|'month'|'year'} CalendarView */
|
|
2
|
-
/** @typedef {string|((record: Record<string, any>) => unknown)} CalendarReader */
|
|
3
1
|
export type CalendarView = 'agenda' | 'day' | 'week' | 'month' | 'year';
|
|
4
2
|
export type CalendarReader = string | ((record: Record<string, any>) => unknown);
|
|
5
3
|
export type CalendarEvent = {
|
|
@@ -85,7 +83,14 @@ export type CalendarNormalizeOptions = {
|
|
|
85
83
|
* Unit used for numeric dates.
|
|
86
84
|
*/
|
|
87
85
|
dateUnit?: 'milliseconds' | 'seconds';
|
|
86
|
+
/**
|
|
87
|
+
* Title of an event without one, by default the `calendar.untitled`
|
|
88
|
+
* message ("Untitled event").
|
|
89
|
+
*/
|
|
90
|
+
untitledTitle?: string;
|
|
88
91
|
};
|
|
92
|
+
/** @typedef {'agenda'|'day'|'week'|'month'|'year'} CalendarView */
|
|
93
|
+
/** @typedef {string|((record: Record<string, any>) => unknown)} CalendarReader */
|
|
89
94
|
/**
|
|
90
95
|
* @typedef {Object} CalendarEvent
|
|
91
96
|
* @property {string|number} id Stable event identifier.
|
|
@@ -111,6 +116,8 @@ export type CalendarNormalizeOptions = {
|
|
|
111
116
|
* @property {CalendarReader} [eventEditable='editable'] Move-policy reader.
|
|
112
117
|
* @property {CalendarReader} [eventDurationEditable='durationEditable'] Resize-policy reader.
|
|
113
118
|
* @property {'milliseconds'|'seconds'} [dateUnit='milliseconds'] Unit used for numeric dates.
|
|
119
|
+
* @property {string} [untitledTitle] Title of an event without one, by default the `calendar.untitled`
|
|
120
|
+
* message ("Untitled event").
|
|
114
121
|
*/
|
|
115
122
|
/** @type {readonly CalendarView[]} */
|
|
116
123
|
export declare const CALENDAR_VIEWS: readonly CalendarView[];
|
|
@@ -20,7 +20,8 @@ export type CalendarOptions = {
|
|
|
20
20
|
*/
|
|
21
21
|
views?: CalendarView[];
|
|
22
22
|
/**
|
|
23
|
-
* Intl locale override.
|
|
23
|
+
* Intl locale override. Unset, dates follow `setLanguage()`, and
|
|
24
|
+
* the browser's language under an English one.
|
|
24
25
|
*/
|
|
25
26
|
locale?: string | string[];
|
|
26
27
|
/**
|
|
@@ -259,7 +260,8 @@ export type CalendarSetOptions = {
|
|
|
259
260
|
* @property {Date|string|number|null} [date=null] Initial local anchor date; null uses today.
|
|
260
261
|
* @property {CalendarView} [view='month'] Initial view.
|
|
261
262
|
* @property {CalendarView[]} [views=['agenda','day','week','month','year']] Allowed views.
|
|
262
|
-
* @property {string|string[]} [locale] Intl locale override.
|
|
263
|
+
* @property {string|string[]} [locale] Intl locale override. Unset, dates follow `setLanguage()`, and
|
|
264
|
+
* the browser's language under an English one.
|
|
263
265
|
* @property {number} [weekStart=1] First weekday, 0 (Sunday) through 6 (Saturday).
|
|
264
266
|
* @property {boolean} [weekNumbers=true] Show ISO week numbers in month view.
|
|
265
267
|
* @property {boolean} [workweek=false] Show Monday–Friday in the week time grid.
|
|
@@ -540,6 +542,8 @@ export declare class Calendar extends Component<CalendarOptions> {
|
|
|
540
542
|
_eventLabel(event: CalendarEvent): string;
|
|
541
543
|
/** @param {Date} date @returns {string} */
|
|
542
544
|
_dateTimeLabel(date: Date): string;
|
|
545
|
+
/** @returns {string|string[]|undefined} The locale this calendar writes its dates in. */
|
|
546
|
+
_locale(): string | string[] | undefined;
|
|
543
547
|
/** @param {Date} date @param {Intl.DateTimeFormatOptions} options @returns {string} */
|
|
544
548
|
_format(date: Date, options: Intl.DateTimeFormatOptions): string;
|
|
545
549
|
/** @returns {Date} */
|
|
@@ -548,19 +552,23 @@ export declare class Calendar extends Component<CalendarOptions> {
|
|
|
548
552
|
_dateFromTarget(target: HTMLElement): Date | null;
|
|
549
553
|
/** @param {HTMLElement} target @returns {void} */
|
|
550
554
|
_rememberFocusedDate(target: HTMLElement): void;
|
|
551
|
-
/** @returns {{eventId?: string, eventAction?: string, date?: string, slot?: string}|null} */
|
|
555
|
+
/** @returns {{eventId?: string, eventAction?: string, date?: string, slot?: string, row?: string, column?: string}|null} */
|
|
552
556
|
_focusIdentity(): {
|
|
553
557
|
eventId?: string;
|
|
554
558
|
eventAction?: string;
|
|
555
559
|
date?: string;
|
|
556
560
|
slot?: string;
|
|
561
|
+
row?: string;
|
|
562
|
+
column?: string;
|
|
557
563
|
} | null;
|
|
558
|
-
/** @param {{eventId?: string, eventAction?: string, date?: string, slot?: string}} identity @returns {void} */
|
|
564
|
+
/** @param {{eventId?: string, eventAction?: string, date?: string, slot?: string, row?: string, column?: string}} identity @returns {void} */
|
|
559
565
|
_restoreFocus(identity: {
|
|
560
566
|
eventId?: string;
|
|
561
567
|
eventAction?: string;
|
|
562
568
|
date?: string;
|
|
563
569
|
slot?: string;
|
|
570
|
+
row?: string;
|
|
571
|
+
column?: string;
|
|
564
572
|
}): void;
|
|
565
573
|
/** @returns {void} */
|
|
566
574
|
_scrollTimeGrid(): void;
|
|
@@ -9,6 +9,7 @@ export type ChartData = {
|
|
|
9
9
|
datasets?: ChartDataset[];
|
|
10
10
|
[key: string]: unknown;
|
|
11
11
|
};
|
|
12
|
+
export type ChartText = (key: string, ...args: unknown[]) => string;
|
|
12
13
|
export type ChartSpec = {
|
|
13
14
|
/**
|
|
14
15
|
* Chart type.
|
|
@@ -99,9 +100,10 @@ export type ChartOptions = {
|
|
|
99
100
|
*/
|
|
100
101
|
chartOptions?: Record<string, unknown>;
|
|
101
102
|
/**
|
|
102
|
-
* Accessible canvas and summary label; blank text
|
|
103
|
+
* Accessible canvas and summary label; null or blank text reads
|
|
104
|
+
* the `chart.label` message ("Chart").
|
|
103
105
|
*/
|
|
104
|
-
label?: string;
|
|
106
|
+
label?: string | null;
|
|
105
107
|
/**
|
|
106
108
|
* Accessible description.
|
|
107
109
|
*/
|
|
@@ -115,17 +117,20 @@ export type ChartOptions = {
|
|
|
115
117
|
*/
|
|
116
118
|
loading?: boolean;
|
|
117
119
|
/**
|
|
118
|
-
* Empty-state text.
|
|
120
|
+
* Empty-state text, by default the `chart.empty` message
|
|
121
|
+
* ("No chart data"). Null shows none.
|
|
119
122
|
*/
|
|
120
|
-
emptyText?: string;
|
|
123
|
+
emptyText?: string | null;
|
|
121
124
|
/**
|
|
122
|
-
* Loading-state text.
|
|
125
|
+
* Loading-state text, by default the `chart.loading` message
|
|
126
|
+
* ("Loading chart…"). Null shows none.
|
|
123
127
|
*/
|
|
124
|
-
loadingText?: string;
|
|
128
|
+
loadingText?: string | null;
|
|
125
129
|
/**
|
|
126
|
-
* Error fallback text.
|
|
130
|
+
* Error fallback text, by default the `chart.error` message
|
|
131
|
+
* ("Unable to render chart"). Null shows none.
|
|
127
132
|
*/
|
|
128
|
-
errorText?: string;
|
|
133
|
+
errorText?: string | null;
|
|
129
134
|
/**
|
|
130
135
|
* Responsive container aspect ratio.
|
|
131
136
|
*/
|
|
@@ -156,6 +161,7 @@ export type ChartOptions = {
|
|
|
156
161
|
};
|
|
157
162
|
/** @typedef {{label?: string, data?: unknown[], [key: string]: unknown}} ChartDataset */
|
|
158
163
|
/** @typedef {{labels?: unknown[], datasets?: ChartDataset[], [key: string]: unknown}} ChartData */
|
|
164
|
+
/** @typedef {(key: string, ...args: unknown[]) => string} ChartText Resolves a message. */
|
|
159
165
|
/**
|
|
160
166
|
* @typedef {Object} ChartSpec
|
|
161
167
|
* @property {string} type Chart type.
|
|
@@ -194,13 +200,17 @@ export type ChartOptions = {
|
|
|
194
200
|
* @property {string} [type='bar'] Chart type passed to the adapter.
|
|
195
201
|
* @property {ChartData} [data={labels: [], datasets: []}] Chart data.
|
|
196
202
|
* @property {Record<string, unknown>} [chartOptions={}] Engine-specific options.
|
|
197
|
-
* @property {string} [label=
|
|
203
|
+
* @property {string|null} [label=null] Accessible canvas and summary label; null or blank text reads
|
|
204
|
+
* the `chart.label` message ("Chart").
|
|
198
205
|
* @property {string} [description=''] Accessible description.
|
|
199
206
|
* @property {'hidden'|'visible'} [summary='hidden'] Semantic data-table presentation.
|
|
200
207
|
* @property {boolean} [loading=false] Initial loading state.
|
|
201
|
-
* @property {string} [emptyText
|
|
202
|
-
*
|
|
203
|
-
* @property {string} [
|
|
208
|
+
* @property {string|null} [emptyText] Empty-state text, by default the `chart.empty` message
|
|
209
|
+
* ("No chart data"). Null shows none.
|
|
210
|
+
* @property {string|null} [loadingText] Loading-state text, by default the `chart.loading` message
|
|
211
|
+
* ("Loading chart…"). Null shows none.
|
|
212
|
+
* @property {string|null} [errorText] Error fallback text, by default the `chart.error` message
|
|
213
|
+
* ("Unable to render chart"). Null shows none.
|
|
204
214
|
* @property {string} [aspectRatio='16 / 9'] Responsive container aspect ratio.
|
|
205
215
|
* @property {(event: CustomEvent<{instance: unknown}>) => void} [onready] Engine-ready listener.
|
|
206
216
|
* @property {(event: CustomEvent<{data: ChartData, type: string}>) => void} [onupdate] Update listener.
|
|
@@ -274,6 +284,8 @@ export declare class Chart extends Component<ChartOptions> {
|
|
|
274
284
|
_destroyHandle(): void;
|
|
275
285
|
/** @returns {void} */
|
|
276
286
|
_syncState(): void;
|
|
287
|
+
/** @returns {string} What an error without a message of its own says. */
|
|
288
|
+
_errorText(): string;
|
|
277
289
|
/** @returns {void} */
|
|
278
290
|
_renderSummary(): void;
|
|
279
291
|
}
|
|
@@ -310,7 +322,7 @@ export declare function isEmptyChartData(data: ChartData): boolean;
|
|
|
310
322
|
/**
|
|
311
323
|
* Builds the semantic table mirrored alongside the canvas.
|
|
312
324
|
* @param {ChartData} data Chart data.
|
|
313
|
-
* @param {string} label Caption.
|
|
325
|
+
* @param {string} [label] Caption, by default the `chart.summary` message ("Chart data").
|
|
314
326
|
* @returns {HTMLTableElement}
|
|
315
327
|
*/
|
|
316
328
|
export declare function chartSummaryTable(data: ChartData, label?: string): HTMLTableElement;
|