@cueplusplus/ui 0.20.1 → 0.22.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.
- package/CHANGELOG.md +133 -0
- package/dist/chat/agent-pile.js +2 -2
- package/dist/chrome/_status-bar.js +1 -1
- package/dist/chrome/app-shell.js +1 -1
- package/dist/chrome/navigation-menu.js +3 -3
- package/dist/chrome/row.js +1 -1
- package/dist/chrome/scroll-area.js +1 -1
- package/dist/chrome/section-header.js +1 -1
- package/dist/chrome/segmented-control.js +1 -1
- package/dist/chrome/tabs.js +1 -1
- package/dist/chrome/toolbar.js +1 -1
- package/dist/chrome/tree.js +3 -3
- package/dist/date/calendar.js +3 -3
- package/dist/dmx/channel-matrix.js +1 -1
- package/dist/dmx/universe-grid.js +1 -1
- package/dist/elements/agent-handoff.js +3 -3
- package/dist/elements/agent-plan.js +1 -1
- package/dist/elements/agent-status.js +1 -1
- package/dist/elements/agent-surface.d.ts +9 -6
- package/dist/elements/agent-surface.js +3 -2
- package/dist/elements/approval-card.d.ts +29 -3
- package/dist/elements/approval-card.js +18 -8
- package/dist/elements/artifact-card.js +2 -2
- package/dist/elements/canvas-split.js +3 -3
- package/dist/elements/chart.js +1 -1
- package/dist/elements/chat-panel.js +2 -2
- package/dist/elements/checkpoint-history.js +1 -1
- package/dist/elements/code-diff.js +1 -1
- package/dist/elements/code-runner.js +1 -1
- package/dist/elements/composer.d.ts +8 -2
- package/dist/elements/composer.js +20 -12
- package/dist/elements/computer-use.js +2 -2
- package/dist/elements/confidence-marker.js +1 -1
- package/dist/elements/connection-state.js +2 -2
- package/dist/elements/context-breakdown.js +1 -1
- package/dist/elements/context-usage.js +1 -1
- package/dist/elements/conversation-search.js +2 -2
- package/dist/elements/cost-meter.js +1 -1
- package/dist/elements/data-table.js +1 -1
- package/dist/elements/diagram.js +1 -1
- package/dist/elements/draft-restore.js +2 -2
- package/dist/elements/edit-message.js +1 -1
- package/dist/elements/elements.css +134 -0
- package/dist/elements/elicitation-form.d.ts +8 -1
- package/dist/elements/elicitation-form.js +24 -16
- package/dist/elements/empty-state.js +3 -3
- package/dist/elements/error-state.js +2 -2
- package/dist/elements/event-feed.d.ts +88 -0
- package/dist/elements/event-feed.js +190 -0
- package/dist/elements/feedback-dialog.js +2 -2
- package/dist/elements/file-tree.js +1 -1
- package/dist/elements/flow-graph.js +2 -2
- package/dist/elements/generative.css +13 -0
- package/dist/elements/generative.d.ts +8 -6
- package/dist/elements/generative.js +4 -3
- package/dist/elements/image-generation.js +2 -2
- package/dist/elements/index.d.ts +7 -3
- package/dist/elements/index.js +5 -2
- package/dist/elements/inline-citation.js +1 -1
- package/dist/elements/job-progress.js +1 -1
- package/dist/elements/launcher-bubble.js +3 -3
- package/dist/elements/loading-state.js +1 -1
- package/dist/elements/map-answer.js +1 -1
- package/dist/elements/math-block.js +1 -1
- package/dist/elements/mcp-server-panel.js +3 -3
- package/dist/elements/memory-chips.js +1 -1
- package/dist/elements/message-attachment.js +3 -3
- package/dist/elements/message-branches.js +1 -1
- package/dist/elements/message-pair.js +2 -2
- package/dist/elements/message-queue.js +1 -1
- package/dist/elements/message-timing.js +1 -1
- package/dist/elements/mobile-composer.js +1 -1
- package/dist/elements/model-picker.js +1 -1
- package/dist/elements/number-ticker.js +1 -1
- package/dist/elements/onboarding.js +3 -3
- package/dist/elements/permission-grant.js +3 -3
- package/dist/elements/prompt-library.js +1 -1
- package/dist/elements/question-card.d.ts +50 -0
- package/dist/elements/question-card.js +117 -0
- package/dist/elements/queue-dock.js +1 -1
- package/dist/elements/quota-banner.js +1 -1
- package/dist/elements/quote-reply.js +3 -3
- package/dist/elements/read-aloud.js +2 -2
- package/dist/elements/reasoning-effort.js +2 -2
- package/dist/elements/reasoning-panel.js +3 -3
- package/dist/elements/recommendation-card.js +2 -2
- package/dist/elements/regenerate-menu.js +1 -1
- package/dist/elements/request-delivery.js +31 -0
- package/dist/elements/research-report.js +1 -1
- package/dist/elements/retrieval-chunks.js +3 -3
- package/dist/elements/revert-dock.js +1 -1
- package/dist/elements/reviewable-diff.js +4 -4
- package/dist/elements/schedule-card.js +2 -2
- package/dist/elements/score-breakdown.js +2 -2
- package/dist/elements/scroll-anchor.js +2 -2
- package/dist/elements/settings-panel.js +3 -3
- package/dist/elements/sources.js +1 -1
- package/dist/elements/spec-sheet.js +1 -1
- package/dist/elements/stopped-run.js +2 -2
- package/dist/elements/streaming-text.js +2 -2
- package/dist/elements/subagent-list.js +4 -4
- package/dist/elements/suggestions.js +1 -1
- package/dist/elements/surfaces.d.ts +6 -6
- package/dist/elements/surfaces.js +7 -7
- package/dist/elements/tail-status.js +1 -1
- package/dist/elements/terminal-block.js +1 -1
- package/dist/elements/thinking-indicator.js +1 -1
- package/dist/elements/timeline.js +1 -1
- package/dist/elements/todo-list.js +1 -1
- package/dist/elements/tool-call.d.ts +18 -2
- package/dist/elements/tool-call.js +20 -11
- package/dist/elements/tool-error.js +2 -2
- package/dist/elements/tool-group.d.ts +11 -3
- package/dist/elements/tool-group.js +62 -38
- package/dist/elements/tool-state.d.ts +13 -0
- package/dist/elements/tool-state.js +44 -0
- package/dist/elements/tool-timeline.js +2 -2
- package/dist/elements/trace-waterfall.js +2 -2
- package/dist/elements/unsupported-request-card.d.ts +31 -0
- package/dist/elements/unsupported-request-card.js +80 -0
- package/dist/elements/vocabulary.d.ts +50 -1
- package/dist/elements/vocabulary.js +50 -1
- package/dist/elements/voice-conversation.js +5 -5
- package/dist/elements/web-preview.js +1 -1
- package/dist/elements/web-search.js +2 -2
- package/dist/elements/work-collapse.js +1 -1
- package/dist/forms/_chassis.d.ts +6 -1
- package/dist/forms/_chassis.js +8 -3
- package/dist/forms/file-upload.js +1 -1
- package/dist/forms/rating.js +1 -1
- package/dist/forms/select.js +1 -1
- package/dist/forms/switch.js +2 -2
- package/dist/forms/toggle.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/instruments/_ledger-disclosure.js +1 -1
- package/dist/instruments/data-tree.js +1 -1
- package/dist/instruments/meter.js +1 -1
- package/dist/instruments/seam-grid.js +1 -1
- package/dist/layout/_collapse.js +3 -3
- package/dist/layout/bento.js +1 -1
- package/dist/layout/breadcrumb.js +1 -1
- package/dist/layout/carousel.js +1 -1
- package/dist/layout/collapsible.js +1 -1
- package/dist/layout/index.d.ts +3 -1
- package/dist/layout/index.js +3 -1
- package/dist/layout/item.js +1 -1
- package/dist/layout/link.js +1 -1
- package/dist/layout/pagination.js +1 -1
- package/dist/layout/pane-seam.d.ts +75 -0
- package/dist/layout/pane-seam.js +127 -0
- package/dist/layout/resizable.d.ts +2 -1
- package/dist/layout/resizable.js +3 -2
- package/dist/layout/sidebar.js +3 -3
- package/dist/layout/split-pane.d.ts +74 -0
- package/dist/layout/split-pane.js +135 -0
- package/dist/layout/stepper.js +1 -1
- package/dist/lib/auto-grow.js +42 -0
- package/dist/overlays/_surface.d.ts +5 -5
- package/dist/overlays/_surface.js +4 -4
- package/dist/overlays/drawer.js +1 -1
- package/dist/overlays/menubar.js +1 -1
- package/dist/overlays/sheet.js +1 -1
- package/dist/overlays/toast.js +1 -1
- package/dist/primitives/button.js +1 -1
- package/dist/primitives/chip.d.ts +1 -1
- package/dist/styles.css +52 -0
- package/dist/system/_paint-stroke-sunken.js +22 -2
- package/dist/system/_paint-stroke-surface-1.js +5 -1
- package/dist/system/_paint-stroke-surface-2.js +5 -1
- package/dist/system/_style-disabled.js +1 -7
- package/dist/system/agent-skin.d.ts +11 -5
- package/manifest/components/agent-surface.json +5 -4
- package/manifest/components/alert-dialog.json +1 -0
- package/manifest/components/approval-card.json +45 -7
- package/manifest/components/autocomplete.json +2 -0
- package/manifest/components/button.json +0 -3
- package/manifest/components/card.json +1 -0
- package/manifest/components/channel-matrix.json +1 -0
- package/manifest/components/chart-tooltip-content.json +1 -0
- package/manifest/components/checkbox-group.json +0 -3
- package/manifest/components/checkbox.json +0 -3
- package/manifest/components/color-field.json +1 -0
- package/manifest/components/color-picker.json +1 -0
- package/manifest/components/combobox.json +2 -0
- package/manifest/components/command-palette.json +1 -0
- package/manifest/components/composer-input.json +16 -2
- package/manifest/components/composer.json +1 -0
- package/manifest/components/context-menu.json +1 -0
- package/manifest/components/date-field.json +1 -0
- package/manifest/components/date-picker.json +1 -0
- package/manifest/components/date-range-picker.json +1 -0
- package/manifest/components/dialog.json +1 -0
- package/manifest/components/dmx-bar.json +1 -0
- package/manifest/components/dmx-strip.json +1 -0
- package/manifest/components/drawer.json +1 -0
- package/manifest/components/dropdown-menu.json +1 -0
- package/manifest/components/elicitation-form.json +16 -1
- package/manifest/components/env-var-input.json +1 -0
- package/manifest/components/event-feed.json +171 -0
- package/manifest/components/event-row.json +116 -0
- package/manifest/components/generative-ui.json +4 -3
- package/manifest/components/hover-card.json +1 -0
- package/manifest/components/input-group.json +1 -0
- package/manifest/components/input.json +1 -0
- package/manifest/components/menubar.json +1 -0
- package/manifest/components/multi-select.json +2 -0
- package/manifest/components/musical-time-input.json +1 -0
- package/manifest/components/navigation-menu.json +1 -0
- package/manifest/components/number-field.json +1 -0
- package/manifest/components/otp-field.json +1 -0
- package/manifest/components/pane-seam.json +171 -0
- package/manifest/components/password-input.json +1 -0
- package/manifest/components/popover.json +1 -0
- package/manifest/components/question-card.json +157 -0
- package/manifest/components/resizable.json +1 -1
- package/manifest/components/scrub-input.json +1 -0
- package/manifest/components/search-input.json +1 -0
- package/manifest/components/select.json +2 -0
- package/manifest/components/sheet.json +1 -0
- package/manifest/components/split-pane.json +224 -0
- package/manifest/components/switch.json +0 -3
- package/manifest/components/tags-input.json +2 -0
- package/manifest/components/textarea.json +1 -0
- package/manifest/components/theme-configurator.json +1 -0
- package/manifest/components/time-field.json +1 -0
- package/manifest/components/toast.json +1 -0
- package/manifest/components/toggle.json +0 -3
- package/manifest/components/tool-call.json +46 -2
- package/manifest/components/tool-group.json +15 -3
- package/manifest/components/tooltip.json +1 -0
- package/manifest/components/unsupported-request-card.json +117 -0
- package/manifest/fixtures.json +16 -0
- package/manifest/manifest.json +134 -56
- package/manifest/tokens.json +12 -2
- package/package.json +3 -3
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"type": "(() => void)",
|
|
72
72
|
"required": false,
|
|
73
73
|
"defaultValue": null,
|
|
74
|
-
"description": "Called when the user clicks Always allow.",
|
|
74
|
+
"description": "Called when the user clicks Always allow. The button is drawn only when this is\nset, so a card never offers a standing grant nothing can honour.",
|
|
75
75
|
"control": {
|
|
76
76
|
"kind": "callback",
|
|
77
77
|
"fixture": "callback.log"
|
|
@@ -87,10 +87,46 @@
|
|
|
87
87
|
"kind": "callback",
|
|
88
88
|
"fixture": "callback.log"
|
|
89
89
|
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "options",
|
|
93
|
+
"type": "readonly ApprovalOption[]",
|
|
94
|
+
"required": false,
|
|
95
|
+
"defaultValue": null,
|
|
96
|
+
"description": "The decisions the agent offered, one button each and in this order. Replaces the\ndefault Deny, Always allow and Allow once.",
|
|
97
|
+
"control": {
|
|
98
|
+
"kind": "array"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "onDecide",
|
|
103
|
+
"type": "((id: string) => void)",
|
|
104
|
+
"required": false,
|
|
105
|
+
"defaultValue": null,
|
|
106
|
+
"description": "Called with an option's `id` when the user picks it.",
|
|
107
|
+
"control": {
|
|
108
|
+
"kind": "callback",
|
|
109
|
+
"fixture": "callback.log"
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "delivery",
|
|
114
|
+
"type": "\"failed\" | \"sending\" | \"sent\"",
|
|
115
|
+
"required": false,
|
|
116
|
+
"defaultValue": null,
|
|
117
|
+
"description": "Where the answer has got to: `sending`, `sent` or `failed`. While it is on its way\nand once it has arrived, the card offers nothing to press. `failed` offers the\ndecisions again. An outcome `state` wins over it.",
|
|
118
|
+
"control": {
|
|
119
|
+
"kind": "enum",
|
|
120
|
+
"members": [
|
|
121
|
+
"failed",
|
|
122
|
+
"sending",
|
|
123
|
+
"sent"
|
|
124
|
+
]
|
|
125
|
+
}
|
|
90
126
|
}
|
|
91
127
|
],
|
|
92
128
|
"typeReferences": [
|
|
93
|
-
"Omit<\n ComponentProps<\"div\">,\n | \"children\"\n | \"state\"\n | \"command\"\n | \"title\"\n | \"subtitle\"\n | \"onAllowOnce\"\n | \"onAlwaysAllow\"\n | \"onDeny\"\n> & {\n /** Lifecycle of the card: request with actions, running spinner, done check, or denied. */\n state: ApprovalState;\n /** Command shown in the mono field the agent wants to run. */\n command: string;\n /** Headline naming the action that needs approval. */\n title: string;\n /** Supporting line under the title explaining the request. */\n subtitle: string;\n /** Called when the user clicks Allow once. */\n onAllowOnce?: () => void;\n
|
|
129
|
+
"Omit<\n ComponentProps<\"div\">,\n | \"children\"\n | \"state\"\n | \"command\"\n | \"title\"\n | \"subtitle\"\n | \"onAllowOnce\"\n | \"onAlwaysAllow\"\n | \"onDeny\"\n | \"options\"\n | \"onDecide\"\n | \"delivery\"\n> & {\n /** Lifecycle of the card: request with actions, running spinner, done check, or denied. */\n state: ApprovalState;\n /** Command shown in the mono field the agent wants to run. */\n command: string;\n /** Headline naming the action that needs approval. */\n title: string;\n /** Supporting line under the title explaining the request. */\n subtitle: string;\n /** Called when the user clicks Allow once. */\n onAllowOnce?: () => void;\n /**\n * Called when the user clicks Always allow. The button is drawn only when this is\n * set, so a card never offers a standing grant nothing can honour.\n */\n onAlwaysAllow?: () => void;\n /** Called when the user clicks Deny. */\n onDeny?: () => void;\n /**\n * The decisions the agent offered, one button each and in this order. Replaces the\n * default Deny, Always allow and Allow once.\n */\n options?: readonly ApprovalOption[];\n /** Called with an option's `id` when the user picks it. */\n onDecide?: (id: string) => void;\n /**\n * Where the answer has got to: `sending`, `sent` or `failed`. While it is on its way\n * and once it has arrived, the card offers nothing to press. `failed` offers the\n * decisions again. An outcome `state` wins over it.\n */\n delivery?: RequestDelivery;\n}"
|
|
94
130
|
],
|
|
95
131
|
"subcomponents": [],
|
|
96
132
|
"parts": [],
|
|
@@ -122,14 +158,16 @@
|
|
|
122
158
|
"jsonUrl": "/r/components/approval-card.json",
|
|
123
159
|
"whenToUse": [
|
|
124
160
|
"A command with side effects that must not run until someone says so.",
|
|
125
|
-
"Carrying that request through its whole lifecycle, since one card covers request, running, done and denied."
|
|
161
|
+
"Carrying that request through its whole lifecycle, since one card covers request, running, done and denied.",
|
|
162
|
+
"Drawing exactly the decisions the agent offered. Pass `options` with `onDecide`, and only those buttons appear."
|
|
126
163
|
],
|
|
127
164
|
"whenNotToUse": [
|
|
128
165
|
"A decision with no command behind it. `command` is required and is shown in a mono field.",
|
|
129
166
|
"Reporting a command that failed. The four states are request, running, done and denied; a failure needs somewhere else to go."
|
|
130
167
|
],
|
|
131
168
|
"commonMistakes": [
|
|
132
|
-
"Leaving `state=\"request\"` after the user has answered
|
|
169
|
+
"Leaving `state=\"request\"` after the user has answered with no `delivery`, so Allow and Deny stay pressable. Set `delivery=\"sending\"` as the answer leaves.",
|
|
170
|
+
"Passing a no-op `onAlwaysAllow`. Always allow is drawn only when the handler is set, so set it only when a standing grant can be honoured.",
|
|
133
171
|
"Folding the explanation into `title`. `title` names the action that needs approval; `subtitle` is the supporting line that explains it."
|
|
134
172
|
],
|
|
135
173
|
"specimens": [
|
|
@@ -139,9 +177,9 @@
|
|
|
139
177
|
"components": [
|
|
140
178
|
"ApprovalCard"
|
|
141
179
|
],
|
|
142
|
-
"code": "<Specimens>\n {APPROVALS.map((state) => (\n <Specimen key={state} label={state} wide>\n <ApprovalCard\n state={approvals[state] ?? state}\n command=\"cue unpatch --universe 4 --all\"\n title=\"Unpatch universe 4\"\n subtitle=\"48 channels stop responding until they are patched again.\"\n onAllowOnce={settle(state, \"running\")}\n onAlwaysAllow={settle(state, \"running\")}\n onDeny={settle(state, \"denied\")}\n />\n </Specimen>\n ))}\n</Specimens>",
|
|
143
|
-
"note": "Human in the loop for one action: the command in mono exactly as it will run, and
|
|
144
|
-
"interaction": "Allow once and Always allow are separate answers, never one control with a modifier. Denying settles the card rather than hiding it."
|
|
180
|
+
"code": "<Specimens>\n {APPROVALS.map((state) => (\n <Specimen key={state} label={state} wide>\n <ApprovalCard\n state={approvals[state] ?? state}\n command=\"cue unpatch --universe 4 --all\"\n title=\"Unpatch universe 4\"\n subtitle=\"48 channels stop responding until they are patched again.\"\n onAllowOnce={settle(state, \"running\")}\n onAlwaysAllow={settle(state, \"running\")}\n onDeny={settle(state, \"denied\")}\n />\n </Specimen>\n ))}\n <Specimen label=\"the agent's own decisions\" wide>\n <ApprovalCard\n state=\"request\"\n command=\"cue patch --universe 3 --fixtures 6\"\n title=\"Patch universe 3\"\n subtitle=\"The agent offered two answers, so the card draws two.\"\n options={[\n { id: \"reject\", label: \"Reject\" },\n { id: \"approve\", label: \"Approve\", tone: \"primary\" },\n ]}\n onDecide={() => {}}\n />\n </Specimen>\n <Specimen label=\"sending\" wide>\n <ApprovalCard\n state=\"request\"\n delivery=\"sending\"\n command=\"cue unpatch --universe 4 --all\"\n title=\"Unpatch universe 4\"\n subtitle=\"48 channels stop responding until they are patched again.\"\n />\n </Specimen>\n <Specimen label=\"not sent\" wide>\n <ApprovalCard\n state=\"request\"\n delivery=\"failed\"\n command=\"cue unpatch --universe 4 --all\"\n title=\"Unpatch universe 4\"\n subtitle=\"48 channels stop responding until they are patched again.\"\n onAllowOnce={() => {}}\n onDeny={() => {}}\n />\n </Specimen>\n</Specimens>",
|
|
181
|
+
"note": "Human in the loop for one action: the command in mono exactly as it will run, and the answers the agent offered. The first four specimens are the four states of the union, and the first one is live: answer it and it moves. Then a card drawing the agent's own two decisions rather than the default three, and two deliveries: an answer on its way, which offers nothing to press, and one that did not arrive, which offers the answers again.",
|
|
182
|
+
"interaction": "Allow once and Always allow are separate answers, never one control with a modifier, and Always allow is drawn only when something can honour it. Denying settles the card rather than hiding it."
|
|
145
183
|
}
|
|
146
184
|
]
|
|
147
185
|
}
|
|
@@ -222,6 +222,7 @@
|
|
|
222
222
|
"--cue-focus",
|
|
223
223
|
"--cue-focus-ring",
|
|
224
224
|
"--cue-font-mono",
|
|
225
|
+
"--cue-ground",
|
|
225
226
|
"--cue-hair-strong",
|
|
226
227
|
"--cue-icon-sm",
|
|
227
228
|
"--cue-info",
|
|
@@ -275,6 +276,7 @@
|
|
|
275
276
|
"--cue-style-disabled-ink",
|
|
276
277
|
"--cue-style-disabled-opacity",
|
|
277
278
|
"--cue-style-display-variation",
|
|
279
|
+
"--cue-style-field-fill",
|
|
278
280
|
"--cue-style-field-focus-offset",
|
|
279
281
|
"--cue-style-field-hover-edge",
|
|
280
282
|
"--cue-style-field-pad",
|
|
@@ -124,9 +124,6 @@
|
|
|
124
124
|
"--cue-paint-glow-ink-hover",
|
|
125
125
|
"--cue-paint-rest-shade",
|
|
126
126
|
"--cue-paint-shadow-scale",
|
|
127
|
-
"--cue-paint-stroke-angle",
|
|
128
|
-
"--cue-paint-stroke-from",
|
|
129
|
-
"--cue-paint-stroke-to",
|
|
130
127
|
"--cue-radius-control",
|
|
131
128
|
"--cue-space-4",
|
|
132
129
|
"--cue-space-5",
|
|
@@ -224,6 +224,7 @@
|
|
|
224
224
|
"--cue-focus",
|
|
225
225
|
"--cue-focus-ring",
|
|
226
226
|
"--cue-font-mono",
|
|
227
|
+
"--cue-ground",
|
|
227
228
|
"--cue-hair-strong",
|
|
228
229
|
"--cue-icon-md",
|
|
229
230
|
"--cue-icon-sm",
|
|
@@ -278,6 +279,7 @@
|
|
|
278
279
|
"--cue-style-disabled-ink",
|
|
279
280
|
"--cue-style-disabled-opacity",
|
|
280
281
|
"--cue-style-display-variation",
|
|
282
|
+
"--cue-style-field-fill",
|
|
281
283
|
"--cue-style-field-focus-offset",
|
|
282
284
|
"--cue-style-field-hover-edge",
|
|
283
285
|
"--cue-style-field-pad",
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"lucide-react"
|
|
8
8
|
],
|
|
9
9
|
"clientOnly": true,
|
|
10
|
-
"description": "The text field. Enter
|
|
10
|
+
"description": "The text field: a textarea that grows with what it holds, to a cap. Enter sends and\nShift+Enter breaks the line, both guarded against IME composition so accepting a\ncandidate does not send the message.",
|
|
11
11
|
"props": [
|
|
12
12
|
{
|
|
13
13
|
"name": "onSubmit",
|
|
@@ -19,10 +19,24 @@
|
|
|
19
19
|
"kind": "callback",
|
|
20
20
|
"fixture": "callback.log"
|
|
21
21
|
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "size",
|
|
25
|
+
"type": "\"sm\" | \"md\"",
|
|
26
|
+
"required": false,
|
|
27
|
+
"defaultValue": "md",
|
|
28
|
+
"description": "`md` (the default) or `sm`: the smaller rung, a 36px floor with body type, for a\ncompact console.",
|
|
29
|
+
"control": {
|
|
30
|
+
"kind": "enum",
|
|
31
|
+
"members": [
|
|
32
|
+
"sm",
|
|
33
|
+
"md"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
22
36
|
}
|
|
23
37
|
],
|
|
24
38
|
"typeReferences": [
|
|
25
|
-
"Omit<ComponentProps<\"
|
|
39
|
+
"Omit<ComponentProps<\"textarea\">, \"onSubmit\"> & {\n /**\n * Called on Enter, guarded against IME composition so accepting a candidate does not\n * send.\n */\n onSubmit?: () => void;\n /**\n * `md` (the default) or `sm`: the smaller rung, a 36px floor with body type, for a\n * compact console.\n */\n size?: \"sm\" | \"md\";\n}"
|
|
26
40
|
],
|
|
27
41
|
"subcomponents": [],
|
|
28
42
|
"parts": [],
|
|
@@ -76,10 +76,25 @@
|
|
|
76
76
|
"kind": "callback",
|
|
77
77
|
"fixture": "callback.log"
|
|
78
78
|
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "delivery",
|
|
82
|
+
"type": "\"failed\" | \"sending\" | \"sent\"",
|
|
83
|
+
"required": false,
|
|
84
|
+
"defaultValue": null,
|
|
85
|
+
"description": "Where the answer has got to: `sending`, `sent` or `failed`. While it is on its way\nand once it has arrived, the form offers nothing to press. `failed` offers Decline\nand Send again. An outcome `state` wins over it.",
|
|
86
|
+
"control": {
|
|
87
|
+
"kind": "enum",
|
|
88
|
+
"members": [
|
|
89
|
+
"failed",
|
|
90
|
+
"sending",
|
|
91
|
+
"sent"
|
|
92
|
+
]
|
|
93
|
+
}
|
|
79
94
|
}
|
|
80
95
|
],
|
|
81
96
|
"typeReferences": [
|
|
82
|
-
"Omit<\n ComponentProps<\"div\">,\n | \"children\"\n | \"server\"\n | \"message\"\n | \"fields\"\n | \"state\"\n | \"onAccept\"\n | \"onDecline\"\n> & {\n /** Which server paused to ask. */\n server: string;\n /** Why the input is needed, in the server's words. */\n message: string;\n /** The schema the server sent, already resolved to display values. */\n fields: readonly ElicitationField[];\n /** Swaps the action row for the outcome once the user answers. */\n state: ElicitationState;\n /** Called when the filled form is sent back. */\n onAccept?: () => void;\n /** Called when the request is refused. */\n onDecline?: () => void;\n}"
|
|
97
|
+
"Omit<\n ComponentProps<\"div\">,\n | \"children\"\n | \"server\"\n | \"message\"\n | \"fields\"\n | \"state\"\n | \"onAccept\"\n | \"onDecline\"\n | \"delivery\"\n> & {\n /** Which server paused to ask. */\n server: string;\n /** Why the input is needed, in the server's words. */\n message: string;\n /** The schema the server sent, already resolved to display values. */\n fields: readonly ElicitationField[];\n /** Swaps the action row for the outcome once the user answers. */\n state: ElicitationState;\n /** Called when the filled form is sent back. */\n onAccept?: () => void;\n /** Called when the request is refused. */\n onDecline?: () => void;\n /**\n * Where the answer has got to: `sending`, `sent` or `failed`. While it is on its way\n * and once it has arrived, the form offers nothing to press. `failed` offers Decline\n * and Send again. An outcome `state` wins over it.\n */\n delivery?: RequestDelivery;\n}"
|
|
83
98
|
],
|
|
84
99
|
"subcomponents": [],
|
|
85
100
|
"parts": [],
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "EventFeed",
|
|
3
|
+
"slug": "event-feed",
|
|
4
|
+
"group": "elements",
|
|
5
|
+
"importPath": "@cueplusplus/ui/elements",
|
|
6
|
+
"peerDependencies": [],
|
|
7
|
+
"clientOnly": true,
|
|
8
|
+
"description": "A filterable activity feed: timestamped, typed records with a one-line\npreview, and a selection the detail pane follows (#103).\n\nThe chips are built from the kinds present, in the order each first\nappears, each with its count, so a feed never offers a filter that keeps\nnothing. The rows are a listbox: j and k, or the arrows, move the selection\nthrough the rows the filter keeps, and Home and End jump to the ends. The\nselection follows the keyboard, so the detail beside it follows too.",
|
|
9
|
+
"props": [
|
|
10
|
+
{
|
|
11
|
+
"name": "label",
|
|
12
|
+
"type": "string",
|
|
13
|
+
"required": true,
|
|
14
|
+
"defaultValue": null,
|
|
15
|
+
"description": "The feed's accessible name: `Run events`.",
|
|
16
|
+
"control": {
|
|
17
|
+
"kind": "string"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "events",
|
|
22
|
+
"type": "readonly FeedEvent[]",
|
|
23
|
+
"required": true,
|
|
24
|
+
"defaultValue": null,
|
|
25
|
+
"description": "The records, oldest first or newest first: the feed keeps the order given.",
|
|
26
|
+
"control": {
|
|
27
|
+
"kind": "array",
|
|
28
|
+
"fixture": "agents.feed"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "filter",
|
|
33
|
+
"type": "string",
|
|
34
|
+
"required": false,
|
|
35
|
+
"defaultValue": null,
|
|
36
|
+
"description": "The kind the feed keeps, or `all`, when the caller holds it.",
|
|
37
|
+
"control": {
|
|
38
|
+
"kind": "string"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"name": "defaultFilter",
|
|
43
|
+
"type": "string",
|
|
44
|
+
"required": false,
|
|
45
|
+
"defaultValue": "all",
|
|
46
|
+
"description": "The kind to start on when nothing controls it. Defaults to `all`.",
|
|
47
|
+
"control": {
|
|
48
|
+
"kind": "string"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "onFilterChange",
|
|
53
|
+
"type": "((filter: string) => void)",
|
|
54
|
+
"required": false,
|
|
55
|
+
"defaultValue": null,
|
|
56
|
+
"description": "Called with the kind, or `all`, when a chip is pressed.",
|
|
57
|
+
"control": {
|
|
58
|
+
"kind": "callback",
|
|
59
|
+
"fixture": "callback.log"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "selectedId",
|
|
64
|
+
"type": "string | null",
|
|
65
|
+
"required": false,
|
|
66
|
+
"defaultValue": "null",
|
|
67
|
+
"description": "The selected event's `id`, or `null` for none.",
|
|
68
|
+
"control": {
|
|
69
|
+
"kind": "string",
|
|
70
|
+
"nullable": true
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "onSelect",
|
|
75
|
+
"type": "((id: string) => void)",
|
|
76
|
+
"required": false,
|
|
77
|
+
"defaultValue": null,
|
|
78
|
+
"description": "Called with an event's `id` when a row is clicked or the keyboard moves to it.",
|
|
79
|
+
"control": {
|
|
80
|
+
"kind": "callback",
|
|
81
|
+
"fixture": "callback.log"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "formatTime",
|
|
86
|
+
"type": "((timestamp: string | number | Date) => string)",
|
|
87
|
+
"required": false,
|
|
88
|
+
"defaultValue": null,
|
|
89
|
+
"description": "Formats the time column. Defaults to a time of day for a `Date` or a number.",
|
|
90
|
+
"control": {
|
|
91
|
+
"kind": "callback",
|
|
92
|
+
"fixture": "callback.log"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "labels",
|
|
97
|
+
"type": "Partial<EventFeedLabels>",
|
|
98
|
+
"required": false,
|
|
99
|
+
"defaultValue": null,
|
|
100
|
+
"description": "Replace any of the feed's own copy.",
|
|
101
|
+
"control": {
|
|
102
|
+
"kind": "opaque"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"typeReferences": [
|
|
107
|
+
"Omit<React.ComponentPropsWithoutRef<\"div\">, \"children\" | \"onSelect\">"
|
|
108
|
+
],
|
|
109
|
+
"subcomponents": [],
|
|
110
|
+
"parts": [],
|
|
111
|
+
"variants": {},
|
|
112
|
+
"defaultVariants": {},
|
|
113
|
+
"tokensUsed": [
|
|
114
|
+
"--cue-accent",
|
|
115
|
+
"--cue-border",
|
|
116
|
+
"--cue-danger",
|
|
117
|
+
"--cue-fg",
|
|
118
|
+
"--cue-fg-muted",
|
|
119
|
+
"--cue-fg-subtle",
|
|
120
|
+
"--cue-focus",
|
|
121
|
+
"--cue-focus-ring",
|
|
122
|
+
"--cue-ok",
|
|
123
|
+
"--cue-radius-control",
|
|
124
|
+
"--cue-space-1",
|
|
125
|
+
"--cue-space-2",
|
|
126
|
+
"--cue-space-3",
|
|
127
|
+
"--cue-stream",
|
|
128
|
+
"--cue-style-focus-width",
|
|
129
|
+
"--cue-surface-2",
|
|
130
|
+
"--cue-text-label",
|
|
131
|
+
"--cue-text-ui",
|
|
132
|
+
"--cue-warn"
|
|
133
|
+
],
|
|
134
|
+
"summary": "A filterable activity feed: typed, timestamped records with a one-line preview and a selection.",
|
|
135
|
+
"examples": [
|
|
136
|
+
{
|
|
137
|
+
"title": "Usage",
|
|
138
|
+
"code": "const [selected, setSelected] = React.useState<string | null>(null);\n\n<EventFeed\n label=\"Run events\"\n events={events}\n selectedId={selected}\n onSelect={setSelected}\n/>",
|
|
139
|
+
"language": "tsx"
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
"status": "stable",
|
|
143
|
+
"url": "/docs/components/event-feed",
|
|
144
|
+
"mdUrl": "/docs/components/event-feed.md",
|
|
145
|
+
"jsonUrl": "/r/components/event-feed.json",
|
|
146
|
+
"whenToUse": [
|
|
147
|
+
"Inspecting a run beside its transcript: tool calls, permission asks, compactions, errors.",
|
|
148
|
+
"Any stream of typed records outside agents: MCP logs, device heartbeats, billing events, CI steps."
|
|
149
|
+
],
|
|
150
|
+
"whenNotToUse": [
|
|
151
|
+
"The conversation itself. Tool calls in the transcript are `ToolGroup`'s; this is the list beside it.",
|
|
152
|
+
"Raw log lines with ANSI colour. `LogViewer`, from `@cueplusplus/ui/instruments/log-viewer`, reads those."
|
|
153
|
+
],
|
|
154
|
+
"commonMistakes": [
|
|
155
|
+
"Drawing the detail inside the feed. The feed reports a selection; put the detail in `SplitPane`'s `detail` slot.",
|
|
156
|
+
"Kinds that are sentences. Each kind becomes a chip, so keep them to a word: `tool`, `permission`, `error`.",
|
|
157
|
+
"Formatting time strings and also passing `formatTime`. A string timestamp is drawn as given; pass a `Date` or a number to have it formatted."
|
|
158
|
+
],
|
|
159
|
+
"specimens": [
|
|
160
|
+
{
|
|
161
|
+
"title": "EventFeed",
|
|
162
|
+
"group": "elements",
|
|
163
|
+
"components": [
|
|
164
|
+
"EventFeed"
|
|
165
|
+
],
|
|
166
|
+
"code": "<div className=\"w-full max-w-md\">\n <EventFeed\n label=\"Patch run events\"\n events={RUN_EVENTS}\n selectedId={runEvent}\n onSelect={setRunEvent}\n />\n</div>",
|
|
167
|
+
"note": "The inspector beside a transcript: typed records, each a time, a toned dot, a kind, a title and a one-line preview. The chips are built from the kinds present, each with its count, so no chip keeps nothing. The detail is the host's: in a console it goes in SplitPane's detail slot.",
|
|
168
|
+
"interaction": "press a chip to keep one kind. Tab into the list, then j and k, or the arrows, move the selection through the rows the filter keeps, and Home and End jump to the ends."
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
}
|