@cueplusplus/ui 0.14.0 → 0.14.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 +183 -0
- package/dist/primitives/chip.d.ts +1 -1
- package/dist/system/theme-provider.d.ts +25 -3
- package/dist/system/theme-provider.js +27 -2
- package/manifest/components/accordion.json +16 -4
- package/manifest/components/activity-graph.json +15 -3
- package/manifest/components/agent-card.json +15 -3
- package/manifest/components/agent-handoff.json +14 -3
- package/manifest/components/agent-mode-badge.json +12 -3
- package/manifest/components/agent-pile.json +13 -3
- package/manifest/components/agent-plan.json +13 -3
- package/manifest/components/agent-status.json +14 -3
- package/manifest/components/agent-surface.json +12 -3
- package/manifest/components/alert-dialog.json +14 -3
- package/manifest/components/animated-number.json +12 -3
- package/manifest/components/app-window-frame.json +13 -3
- package/manifest/components/approval-card.json +14 -3
- package/manifest/components/artifact-card.json +14 -3
- package/manifest/components/ask-box.json +13 -3
- package/manifest/components/audience-icon.json +11 -3
- package/manifest/components/autocomplete.json +15 -3
- package/manifest/components/avatar-group.json +15 -4
- package/manifest/components/avatar.json +16 -4
- package/manifest/components/background-inbox.json +14 -3
- package/manifest/components/band.json +14 -4
- package/manifest/components/breadcrumb.json +14 -3
- package/manifest/components/button-group.json +13 -3
- package/manifest/components/calendar.json +15 -4
- package/manifest/components/canvas-split-body.json +13 -3
- package/manifest/components/canvas-split-document.json +11 -3
- package/manifest/components/canvas-split-header.json +13 -3
- package/manifest/components/canvas-split-line.json +13 -3
- package/manifest/components/canvas-split-message.json +13 -3
- package/manifest/components/canvas-split-thread.json +11 -3
- package/manifest/components/canvas-split.json +13 -3
- package/manifest/components/card.json +14 -3
- package/manifest/components/carousel.json +12 -3
- package/manifest/components/catalogue-icon.json +11 -3
- package/manifest/components/channel-beta-icon.json +11 -3
- package/manifest/components/channel-matrix.json +11 -3
- package/manifest/components/channel-released-icon.json +11 -3
- package/manifest/components/chart-container.json +11 -3
- package/manifest/components/chart-ramp.json +12 -3
- package/manifest/components/chart-swatch.json +11 -3
- package/manifest/components/chart-tooltip-content.json +12 -4
- package/manifest/components/chart.json +14 -3
- package/manifest/components/chat-empty-state.json +13 -3
- package/manifest/components/chat-panel-assistant-message.json +11 -3
- package/manifest/components/chat-panel-composer.json +11 -3
- package/manifest/components/chat-panel-messages.json +11 -3
- package/manifest/components/chat-panel-typing.json +11 -3
- package/manifest/components/chat-panel-user-message.json +11 -3
- package/manifest/components/chat-panel.json +13 -3
- package/manifest/components/checkbox-group.json +15 -4
- package/manifest/components/checkpoint-history.json +13 -3
- package/manifest/components/clamp.json +12 -3
- package/manifest/components/cli-tool-icon.json +11 -3
- package/manifest/components/code-diff.json +14 -3
- package/manifest/components/code-runner.json +13 -3
- package/manifest/components/collapsible.json +13 -3
- package/manifest/components/color-area.json +12 -4
- package/manifest/components/color-field.json +12 -3
- package/manifest/components/color-picker.json +14 -4
- package/manifest/components/color-slider.json +12 -3
- package/manifest/components/color-swatch.json +13 -3
- package/manifest/components/colors-section.json +11 -3
- package/manifest/components/combobox.json +15 -4
- package/manifest/components/compaction-row.json +12 -3
- package/manifest/components/comparison-card.json +12 -3
- package/manifest/components/composer-actions.json +11 -3
- package/manifest/components/composer-attach-button.json +11 -3
- package/manifest/components/composer-attachment-chip.json +13 -3
- package/manifest/components/composer-attachments.json +11 -3
- package/manifest/components/composer-bar.json +12 -3
- package/manifest/components/composer-command-item.json +13 -3
- package/manifest/components/composer-context.json +13 -3
- package/manifest/components/composer-input.json +11 -3
- package/manifest/components/composer-menu-item.json +12 -3
- package/manifest/components/composer-menu.json +13 -3
- package/manifest/components/composer-model-item.json +13 -3
- package/manifest/components/composer-model-trigger.json +13 -3
- package/manifest/components/composer-person-item.json +13 -3
- package/manifest/components/composer-send.json +13 -3
- package/manifest/components/composer-toolbar.json +11 -3
- package/manifest/components/composer-voice-button.json +11 -3
- package/manifest/components/composer-voice.json +13 -3
- package/manifest/components/composer.json +14 -4
- package/manifest/components/computer-use.json +13 -3
- package/manifest/components/confidence-marker.json +11 -3
- package/manifest/components/connection-state.json +12 -3
- package/manifest/components/container.json +12 -3
- package/manifest/components/context-breakdown.json +12 -4
- package/manifest/components/context-menu.json +14 -4
- package/manifest/components/context-usage.json +14 -4
- package/manifest/components/conversation-search.json +13 -3
- package/manifest/components/copy-button.json +14 -3
- package/manifest/components/cost-meter.json +12 -3
- package/manifest/components/cue-portal-frame.json +12 -3
- package/manifest/components/data-table-pagination.json +13 -3
- package/manifest/components/data-table-toolbar.json +12 -3
- package/manifest/components/date-field.json +12 -3
- package/manifest/components/date-picker.json +13 -3
- package/manifest/components/date-range-picker.json +11 -3
- package/manifest/components/day-separator.json +12 -3
- package/manifest/components/delegation-card.json +14 -4
- package/manifest/components/density.json +12 -2
- package/manifest/components/description-list.json +15 -4
- package/manifest/components/diagram.json +13 -3
- package/manifest/components/disclosure.json +15 -4
- package/manifest/components/dmx-bar.json +12 -3
- package/manifest/components/dmx-strip.json +11 -3
- package/manifest/components/document-reference.json +13 -3
- package/manifest/components/draft-restore.json +13 -3
- package/manifest/components/drawer.json +13 -4
- package/manifest/components/edit-message.json +13 -3
- package/manifest/components/elements-command-palette.json +13 -3
- package/manifest/components/elements-composer.json +13 -3
- package/manifest/components/elements-data-table.json +11 -3
- package/manifest/components/elements-timeline.json +13 -3
- package/manifest/components/elicitation-form.json +13 -3
- package/manifest/components/empty-state-composer.json +11 -3
- package/manifest/components/empty-state-greeting.json +11 -3
- package/manifest/components/empty-state-suggestion.json +11 -3
- package/manifest/components/empty-state-suggestions.json +11 -3
- package/manifest/components/empty-state.json +15 -4
- package/manifest/components/end-of-turn-summary.json +14 -3
- package/manifest/components/env-var-input.json +15 -4
- package/manifest/components/error-state.json +13 -3
- package/manifest/components/export-dialog.json +10 -2
- package/manifest/components/eyebrow.json +14 -4
- package/manifest/components/feedback-dialog.json +13 -3
- package/manifest/components/field-description.json +15 -4
- package/manifest/components/field-error.json +15 -4
- package/manifest/components/field-label.json +15 -4
- package/manifest/components/file-tree.json +13 -3
- package/manifest/components/file-upload.json +14 -4
- package/manifest/components/flow-background.json +11 -3
- package/manifest/components/flow-controls.json +11 -3
- package/manifest/components/flow-graph.json +13 -3
- package/manifest/components/folder-icon.json +12 -3
- package/manifest/components/frac.json +11 -3
- package/manifest/components/generation-loader.json +13 -3
- package/manifest/components/generative-ui.json +16 -4
- package/manifest/components/grid.json +14 -3
- package/manifest/components/group-bar.json +13 -3
- package/manifest/components/guardrail-notice.json +13 -3
- package/manifest/components/hover-card.json +14 -4
- package/manifest/components/icon-button.json +15 -3
- package/manifest/components/image-generation.json +13 -3
- package/manifest/components/info-tip.json +15 -4
- package/manifest/components/inline-citation.json +13 -3
- package/manifest/components/input-group.json +15 -4
- package/manifest/components/item.json +15 -4
- package/manifest/components/job-progress.json +14 -3
- package/manifest/components/kbd.json +14 -3
- package/manifest/components/launcher-bubble.json +14 -3
- package/manifest/components/link.json +13 -3
- package/manifest/components/live-region-announcer.json +16 -4
- package/manifest/components/log-viewer.json +15 -3
- package/manifest/components/map-answer.json +13 -3
- package/manifest/components/markdown-text.json +16 -4
- package/manifest/components/math-block.json +13 -3
- package/manifest/components/mcp-server-icon.json +12 -3
- package/manifest/components/mcp-server-panel.json +13 -3
- package/manifest/components/memory-chips.json +12 -3
- package/manifest/components/menubar.json +13 -3
- package/manifest/components/message-actions.json +14 -4
- package/manifest/components/message-attachments.json +12 -3
- package/manifest/components/message-branches.json +12 -3
- package/manifest/components/message-list.json +12 -3
- package/manifest/components/message-pair.json +12 -3
- package/manifest/components/message-queue.json +13 -3
- package/manifest/components/message-timing.json +13 -3
- package/manifest/components/message.json +12 -3
- package/manifest/components/mobile-composer.json +14 -3
- package/manifest/components/model-picker.json +12 -3
- package/manifest/components/multi-select.json +16 -4
- package/manifest/components/musical-time-input.json +11 -3
- package/manifest/components/navigation-menu.json +13 -3
- package/manifest/components/node-card.json +11 -3
- package/manifest/components/node-handle.json +11 -3
- package/manifest/components/number-field.json +15 -3
- package/manifest/components/number-ticker.json +12 -3
- package/manifest/components/onboarding.json +12 -3
- package/manifest/components/otp-field.json +14 -3
- package/manifest/components/page-shell.json +14 -4
- package/manifest/components/pagination.json +14 -3
- package/manifest/components/panel-header.json +14 -4
- package/manifest/components/password-input.json +15 -4
- package/manifest/components/permission-grant.json +13 -3
- package/manifest/components/permission-scopes.json +14 -3
- package/manifest/components/piano-keyboard.json +11 -3
- package/manifest/components/preset-section.json +11 -3
- package/manifest/components/progress.json +14 -3
- package/manifest/components/prompt-library.json +12 -3
- package/manifest/components/queue-dock.json +14 -3
- package/manifest/components/quota-banner.json +12 -3
- package/manifest/components/quote-reply.json +12 -3
- package/manifest/components/radio-group.json +15 -4
- package/manifest/components/radio.json +15 -4
- package/manifest/components/rating.json +15 -4
- package/manifest/components/read-aloud.json +13 -3
- package/manifest/components/reasoning-effort.json +12 -3
- package/manifest/components/reasoning-panel.json +13 -3
- package/manifest/components/recommendation-card.json +12 -3
- package/manifest/components/regenerate-menu.json +12 -3
- package/manifest/components/replay-player.json +14 -3
- package/manifest/components/research-report.json +12 -3
- package/manifest/components/resizable.json +13 -3
- package/manifest/components/retrieval-chunks.json +13 -3
- package/manifest/components/revert-dock.json +14 -3
- package/manifest/components/reviewable-diff.json +12 -3
- package/manifest/components/risk-badge.json +14 -3
- package/manifest/components/schedule-card.json +12 -3
- package/manifest/components/score-breakdown.json +13 -3
- package/manifest/components/scroll-anchor.json +12 -3
- package/manifest/components/scroll-area.json +13 -3
- package/manifest/components/scrollable-tabs-list.json +14 -4
- package/manifest/components/seam-cell.json +13 -4
- package/manifest/components/seam-grid.json +14 -3
- package/manifest/components/seam-list.json +13 -3
- package/manifest/components/search-input.json +15 -4
- package/manifest/components/section-header.json +14 -3
- package/manifest/components/segmented-control.json +15 -3
- package/manifest/components/separator.json +14 -3
- package/manifest/components/settings-panel.json +13 -3
- package/manifest/components/shape-section.json +11 -3
- package/manifest/components/shared-conversation.json +12 -3
- package/manifest/components/sheet.json +14 -4
- package/manifest/components/shimmer-label.json +12 -3
- package/manifest/components/sidebar.json +15 -4
- package/manifest/components/signal-edge.json +13 -4
- package/manifest/components/skeleton.json +16 -4
- package/manifest/components/skill-icon.json +12 -3
- package/manifest/components/slider.json +14 -3
- package/manifest/components/sources.json +12 -3
- package/manifest/components/sparkline.json +14 -4
- package/manifest/components/speaker-identity.json +11 -3
- package/manifest/components/spec-sheet.json +13 -4
- package/manifest/components/spectrum-visualizer.json +11 -3
- package/manifest/components/spinner.json +16 -4
- package/manifest/components/stack-icon.json +12 -3
- package/manifest/components/stack.json +14 -3
- package/manifest/components/stacks-matrix-icon.json +11 -3
- package/manifest/components/stat.json +14 -3
- package/manifest/components/status-dot.json +16 -4
- package/manifest/components/stepper.json +15 -4
- package/manifest/components/stopped-run.json +13 -4
- package/manifest/components/streaming-text.json +12 -3
- package/manifest/components/sub.json +11 -3
- package/manifest/components/subagent-list.json +13 -3
- package/manifest/components/suggestions.json +12 -3
- package/manifest/components/sup.json +11 -3
- package/manifest/components/swap-label.json +12 -3
- package/manifest/components/tags-input.json +15 -4
- package/manifest/components/tail-status.json +14 -3
- package/manifest/components/terminal-block.json +13 -3
- package/manifest/components/terminal-frame.json +14 -3
- package/manifest/components/textarea.json +15 -4
- package/manifest/components/theme-configurator.json +12 -3
- package/manifest/components/theme-provider.json +1 -1
- package/manifest/components/thinking-indicator.json +12 -3
- package/manifest/components/thread-list.json +12 -3
- package/manifest/components/thread-search.json +12 -3
- package/manifest/components/threshold-rail.json +13 -3
- package/manifest/components/time-boundary.json +13 -3
- package/manifest/components/time-field.json +15 -4
- package/manifest/components/timeline-ruler.json +13 -3
- package/manifest/components/timeline.json +13 -3
- package/manifest/components/title-bar.json +13 -3
- package/manifest/components/todo-list.json +12 -3
- package/manifest/components/toggle-group.json +15 -4
- package/manifest/components/toggle.json +15 -4
- package/manifest/components/token-editor.json +12 -3
- package/manifest/components/tool-call.json +13 -3
- package/manifest/components/tool-error.json +14 -4
- package/manifest/components/tool-group.json +12 -3
- package/manifest/components/tool-timeline.json +14 -4
- package/manifest/components/toolbar.json +14 -4
- package/manifest/components/trace-waterfall.json +12 -3
- package/manifest/components/tree-visibility-toggle.json +13 -3
- package/manifest/components/tree.json +14 -3
- package/manifest/components/turn-footer.json +14 -3
- package/manifest/components/two-step-button.json +14 -3
- package/manifest/components/typing-indicator.json +12 -3
- package/manifest/components/universe-grid.json +14 -4
- package/manifest/components/unread-divider.json +14 -4
- package/manifest/components/usage-chart.json +14 -3
- package/manifest/components/verdict-row.json +14 -3
- package/manifest/components/voice-conversation.json +13 -3
- package/manifest/components/web-preview.json +13 -3
- package/manifest/components/web-search.json +13 -3
- package/manifest/components/work-collapse.json +15 -4
- package/manifest/manifest.json +649 -649
- package/manifest/tokens.json +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,188 @@
|
|
|
1
1
|
# @cueplusplus/ui
|
|
2
2
|
|
|
3
|
+
## 0.14.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9857b93: Every chrome component now ships hand-written guidance in the manifest.
|
|
8
|
+
|
|
9
|
+
Fifteen of the twenty-three had extracted facts and nothing that said when to
|
|
10
|
+
reach for one. `chrome` joins `layout`, `forms` and `primitives` as a complete
|
|
11
|
+
group.
|
|
12
|
+
|
|
13
|
+
The guidance names the rules these components enforce and a hand-rolled
|
|
14
|
+
replacement always loses: `SegmentedControl` cannot be emptied and `ToggleGroup`
|
|
15
|
+
can, which is the whole difference between a view picker and a filter bar;
|
|
16
|
+
`NavigationMenu` must not take `role="menu"`, because that tells a screen reader
|
|
17
|
+
to expect commands and swallows the browser's own link affordances; `Toolbar` is
|
|
18
|
+
one tab stop with arrow keys inside, which is what a flex row of buttons throws
|
|
19
|
+
away; and `Tree` earns its hand-built implementation on three details together —
|
|
20
|
+
roving tabindex, a flat DOM carrying `aria-level`/`aria-posinset`/`aria-setsize`,
|
|
21
|
+
and the keyboard contract.
|
|
22
|
+
|
|
23
|
+
No API changed.
|
|
24
|
+
|
|
25
|
+
- d11bcb7: The six domain groups ship hand-written guidance: date, color, flow, midi, dmx
|
|
26
|
+
and charts.
|
|
27
|
+
|
|
28
|
+
Twenty-eight components gained `whenToUse`, `whenNotToUse` and `commonMistakes`,
|
|
29
|
+
completing every one of the six. Coverage is 164 of 326, and only `elements` and
|
|
30
|
+
`icons` remain.
|
|
31
|
+
|
|
32
|
+
These are the components most often reached for wrongly, because the right
|
|
33
|
+
choice depends on the domain rather than the shape: a `DateField` beats a
|
|
34
|
+
`DatePicker` whenever the user already knows the date, and `TimeField` takes
|
|
35
|
+
`hourCycle={24}` because a control room does not read AM/PM. `MusicalTimeInput`
|
|
36
|
+
exists because a number field asks for 4.25 and means "bar 2, beat 1, one
|
|
37
|
+
sixteenth in". `UniverseGrid` is deliberately not a table: position _is_ the
|
|
38
|
+
address, which is what makes an overlap visible rather than inferred. And three
|
|
39
|
+
of them refuse a prop on purpose — `FlowBackground`'s `color` writes a property
|
|
40
|
+
that outranks the theme map, so passing one opts out of theming rather than
|
|
41
|
+
into it.
|
|
42
|
+
|
|
43
|
+
No API changed.
|
|
44
|
+
|
|
45
|
+
- 2a5b3aa: Every component in the library now ships hand-written guidance.
|
|
46
|
+
|
|
47
|
+
The last 162 — all 152 of `elements` and all 10 of `icons` — gained `whenToUse`,
|
|
48
|
+
`whenNotToUse` and `commonMistakes`. Coverage is **326 of 326**: an agent reading
|
|
49
|
+
`manifest.json` now gets the judgement as well as the API for every component,
|
|
50
|
+
not for the thirty-eight that happened to have prose.
|
|
51
|
+
|
|
52
|
+
The guidance is derived from each component's own record, never invented, and
|
|
53
|
+
where a record had only a one-line summary the file is short rather than padded.
|
|
54
|
+
What that surfaces is the reasoning the source already carried:
|
|
55
|
+
|
|
56
|
+
- `GenerativeUI` takes `spec` as `unknown` on purpose, because a cast is a claim
|
|
57
|
+
about the bytes nobody is in a position to make — and it never throws, so an
|
|
58
|
+
error boundary around it is waiting for something that will not happen.
|
|
59
|
+
- `RevertDock` will not render without `This action cannot be undone.` on screen,
|
|
60
|
+
and picking a scope only arms it, because the old layout put the destructive
|
|
61
|
+
control _inside_ the scope control's box at 448px.
|
|
62
|
+
- `AnimatedNumber` is `tabular-nums` because a proportional `1` is narrower than
|
|
63
|
+
a `0`, so a stepping counter nudges everything to its right on every update.
|
|
64
|
+
- `Message` renders React nodes verbatim and will never parse markdown, which is
|
|
65
|
+
what keeps a consumer from being one prompt away from an injection.
|
|
66
|
+
- The ten icons each say what misreading their shape prevents: an audience drawn
|
|
67
|
+
as a tag files people with the folders, an empty beta ring reads as "nothing
|
|
68
|
+
here yet", and a bare chevron for a CLI tool promises a disclosure that
|
|
69
|
+
navigates instead.
|
|
70
|
+
|
|
71
|
+
No API changed.
|
|
72
|
+
|
|
73
|
+
- 0b5ed2d: Every forms control now ships hand-written guidance in the manifest.
|
|
74
|
+
|
|
75
|
+
Twenty-three of the twenty-nine carried extracted facts — props, variants, types
|
|
76
|
+
— but nothing that said when to reach for one. They now carry `whenToUse`,
|
|
77
|
+
`whenNotToUse` and `commonMistakes` alongside the rest, so `forms` joins
|
|
78
|
+
`primitives` as a complete group.
|
|
79
|
+
|
|
80
|
+
The guidance is mostly about pairs that look alike and are not:
|
|
81
|
+
`Autocomplete` accepts what you typed and `Combobox` does not, which decides what
|
|
82
|
+
downstream code may assume about the value. `ToggleGroup` can be empty and
|
|
83
|
+
`SegmentedControl` cannot, which is the difference between a filter bar and a
|
|
84
|
+
view switcher. `Toggle` announces `aria-pressed` and `Switch` announces
|
|
85
|
+
`aria-checked`, which is why one belongs in a toolbar and the other in a settings
|
|
86
|
+
list. `MultiSelect` takes a known set and `TagsInput` takes anything.
|
|
87
|
+
|
|
88
|
+
No API changed.
|
|
89
|
+
|
|
90
|
+
- 3e928f8: Every instrument now ships hand-written guidance in the manifest.
|
|
91
|
+
|
|
92
|
+
Fourteen of the twenty-one had extracted facts and nothing that said when to
|
|
93
|
+
reach for one. `instruments` joins `chrome`, `layout`, `forms` and `primitives`
|
|
94
|
+
as a complete group.
|
|
95
|
+
|
|
96
|
+
Several of these components exist because a hand-rolled version gets one rule
|
|
97
|
+
wrong, and the guidance names which: `Sparkline` and `UsageChart` fix their axis
|
|
98
|
+
at 0–100, because a trace scaled to its own range makes a flat 3% look identical
|
|
99
|
+
to a flat 95%; `Progress` transitions linearly, because a bar that eases is lying
|
|
100
|
+
about its rate; `GroupBar` gives no cell to an empty group, because a minimum
|
|
101
|
+
width on a zero draws a group that is not there; `LogViewer` fixes its row height
|
|
102
|
+
so the virtualiser never measures; and `TwoStepButton` is the right shape for a
|
|
103
|
+
_routine_ destructive action, where a modal would only teach people to dismiss
|
|
104
|
+
dialogs.
|
|
105
|
+
|
|
106
|
+
No API changed.
|
|
107
|
+
|
|
108
|
+
- f2e5203: Every layout component now ships hand-written guidance in the manifest.
|
|
109
|
+
|
|
110
|
+
Seventeen of the twenty had extracted facts and nothing that said when to reach
|
|
111
|
+
for one. `layout` joins `forms` and `primitives` as a complete group.
|
|
112
|
+
|
|
113
|
+
The guidance is mostly about three disclosure components that look alike and are
|
|
114
|
+
not: `Accordion` coordinates several peer sections, `Collapsible` is one of them
|
|
115
|
+
alone, and `Disclosure` is neither — it is an annotation on the form it sits in,
|
|
116
|
+
which is why giving those fields a summary row makes a form read as twice as long
|
|
117
|
+
as it is. Also why `Stack` exists at all: `flex gap-2` written by hand pins
|
|
118
|
+
spacing to a pixel value and quietly opts out of the density ladder.
|
|
119
|
+
|
|
120
|
+
No API changed.
|
|
121
|
+
|
|
122
|
+
- ba6d72e: `ThemeProvider`'s `nonce` now reaches Base UI's style element too, not just the
|
|
123
|
+
density layer.
|
|
124
|
+
|
|
125
|
+
`@base-ui/react` renders one `<style>` of its own — a hoisted
|
|
126
|
+
`<style precedence>` carrying `.base-ui-disable-scrollbar` — and `ScrollAreaRoot`
|
|
127
|
+
and `SelectPopup` give it a nonce they read from Base UI's `CSPContext`. Nothing
|
|
128
|
+
fills that context unless a `CSPProvider` is rendered above them, so under
|
|
129
|
+
`style-src-elem 'self' 'nonce-<per-request>'` that element shipped bare and the
|
|
130
|
+
browser refused it by content hash, on every page rendering a Select, a Popover
|
|
131
|
+
or a ScrollArea.
|
|
132
|
+
|
|
133
|
+
It was reported to us as a density-layer problem and it never was: the
|
|
134
|
+
application that hit it passes no `overrides`, so the density `<style>` did not
|
|
135
|
+
exist in its tree at all. The nonce prop added for that report was correct and
|
|
136
|
+
addressed a different element. This is the half that was actually biting.
|
|
137
|
+
|
|
138
|
+
Given a nonce, `ThemeProvider` now renders `CSPProvider` around its tree. Given
|
|
139
|
+
none, it renders none — deliberately, so an application that wraps itself in its
|
|
140
|
+
own `CSPProvider` keeps it. An unconditional inner provider would overwrite that
|
|
141
|
+
outer context with `undefined` and un-nonce every Base UI style element in the
|
|
142
|
+
tree, which is the bug this fixes, caused by its fix.
|
|
143
|
+
|
|
144
|
+
No API changed. A tree with no nonce renders exactly what it rendered before.
|
|
145
|
+
|
|
146
|
+
- b12c65d: Four more groups ship hand-written guidance: overlays, system, chat and the
|
|
147
|
+
configurator.
|
|
148
|
+
|
|
149
|
+
Twenty-one components gained `whenToUse`, `whenNotToUse` and `commonMistakes`,
|
|
150
|
+
completing all four groups. Coverage is 136 of 326.
|
|
151
|
+
|
|
152
|
+
Two of these matter beyond the component they describe. `Message` renders React
|
|
153
|
+
nodes verbatim and will never parse markdown or HTML, because model output is
|
|
154
|
+
untrusted text and a component that quietly parsed it would make every consumer
|
|
155
|
+
of this library one prompt away from an injection — a caller that wants rich text
|
|
156
|
+
passes its own renderer and owns that decision. And `AskBox` holds only the
|
|
157
|
+
_draft_ answer: the fact of having answered comes back from the host, because
|
|
158
|
+
local state as the source of truth for a decision a run depends on survives
|
|
159
|
+
exactly until the pane unmounts.
|
|
160
|
+
|
|
161
|
+
The overlay family's distinctions are the rest: `AlertDialog` refuses
|
|
162
|
+
outside-press dismissal and `Dialog` does not; `Sheet` is a side channel and
|
|
163
|
+
`Drawer` is its swipe-dismissable cousin; `HoverCard` is reachable by the pointer
|
|
164
|
+
and a `Tooltip` is not; `ContextMenu` and `Menubar` re-export `DropdownMenu`'s
|
|
165
|
+
own rows, so a user can never tell from a row how they got to it.
|
|
166
|
+
|
|
167
|
+
No API changed.
|
|
168
|
+
|
|
169
|
+
- f1fa7b6: Every primitive now ships hand-written guidance in the manifest.
|
|
170
|
+
|
|
171
|
+
`Avatar`, `AvatarGroup`, `IconButton`, `Kbd`, `Separator`, `Skeleton`, `Spinner`
|
|
172
|
+
and `StatusDot` carried extracted facts — props, variants, types — but nothing
|
|
173
|
+
that said when to reach for one. They now carry `whenToUse`, `whenNotToUse` and
|
|
174
|
+
`commonMistakes` alongside the rest, so the ten components in `primitives` are
|
|
175
|
+
complete. An agent reading `manifest.json` gets the judgement as well as the API:
|
|
176
|
+
that `StatusDot`'s wrapper is the containing block its `sr-only` label needs,
|
|
177
|
+
that `Skeleton` has no intrinsic size and collapses without one, that
|
|
178
|
+
`IconButton`'s `aria-label` is the only name the control has.
|
|
179
|
+
|
|
180
|
+
No API changed. These are fields the manifest schema already had and thirty-eight
|
|
181
|
+
other components already filled.
|
|
182
|
+
|
|
183
|
+
- Updated dependencies [abd9a57]
|
|
184
|
+
- @cueplusplus/tokens@0.14.1
|
|
185
|
+
|
|
3
186
|
## 0.14.0
|
|
4
187
|
|
|
5
188
|
### Minor Changes
|
|
@@ -30,7 +30,7 @@ import * as React from "react";
|
|
|
30
30
|
* <span className={chipVariants({ variant: "tag" })}>mcp</span>
|
|
31
31
|
*/
|
|
32
32
|
declare const chipVariants: (props?: ({
|
|
33
|
-
tone?: "info" | "warn" | "danger" | "
|
|
33
|
+
tone?: "info" | "warn" | "danger" | "busy" | "accent" | "ok" | "neutral" | null | undefined;
|
|
34
34
|
variant?: "outline" | "tinted" | "tag" | null | undefined;
|
|
35
35
|
interactive?: boolean | null | undefined;
|
|
36
36
|
} & ClassProp) | undefined) => string;
|
|
@@ -237,7 +237,8 @@ interface ThemeProviderProps {
|
|
|
237
237
|
/** Restore and write root preferences in localStorage. Defaults to `true`. */
|
|
238
238
|
persistPreferences?: boolean;
|
|
239
239
|
/**
|
|
240
|
-
* The Content-Security-Policy nonce for
|
|
240
|
+
* The Content-Security-Policy nonce for every `<style>` element this tree
|
|
241
|
+
* renders — this library's and Base UI's.
|
|
241
242
|
*
|
|
242
243
|
* When `overrides.densities` is set this provider emits one `<style>`
|
|
243
244
|
* element (see {@link ThemeProviderProps.overrides}). Under a policy of
|
|
@@ -246,10 +247,31 @@ interface ThemeProviderProps {
|
|
|
246
247
|
* cannot pick up a server nonce by itself. Pass the request's nonce here and
|
|
247
248
|
* it is set on the element.
|
|
248
249
|
*
|
|
249
|
-
*
|
|
250
|
+
* It also reaches **Base UI**. Given a nonce, this provider renders
|
|
251
|
+
* `@base-ui/react`'s own `CSPProvider` around the tree, so the hoisted
|
|
252
|
+
* `<style>` that `ScrollAreaRoot` and `SelectPopup` emit carries it too.
|
|
253
|
+
* Without that, a strict policy refuses it by content hash on every page
|
|
254
|
+
* rendering a Select, a Popover or a ScrollArea — and a consumer has no way
|
|
255
|
+
* to guess the remedy lives in a peer dependency's provider. An outer
|
|
256
|
+
* `CSPProvider` a consumer renders itself is left alone: no nonce here means
|
|
257
|
+
* no provider here, rather than one that overwrites theirs with `undefined`.
|
|
258
|
+
*
|
|
250
259
|
* `prepaintScript()` returns a *string* the application renders in a
|
|
251
260
|
* `<script>` of its own — so the application already controls that element's
|
|
252
|
-
* nonce, and
|
|
261
|
+
* nonce, and between it and this prop a strict policy needs nothing else
|
|
262
|
+
* from here.
|
|
263
|
+
*
|
|
264
|
+
* **Pass this OR render your own `CSPProvider` — not both.** Base UI's
|
|
265
|
+
* context carries a second value beside the nonce, `disableStyleElements`,
|
|
266
|
+
* and its provider is the only public way to set either: the package exports
|
|
267
|
+
* `CSPProvider` and no hook, so a provider rendered here *replaces* an outer
|
|
268
|
+
* one rather than extending it. Given a nonce this provider therefore sets
|
|
269
|
+
* `disableStyleElements` back to its default, and a consumer who had turned
|
|
270
|
+
* it on outside loses it silently — Base UI resumes emitting the very style
|
|
271
|
+
* element they suppressed. An application already rendering its own
|
|
272
|
+
* `CSPProvider` needs nothing from this prop: leave it unset and the outer
|
|
273
|
+
* context survives untouched, which is the case
|
|
274
|
+
* `base-ui-nonce-outer-provider.test.tsx` pins.
|
|
253
275
|
*
|
|
254
276
|
* **A nonce cannot rescue a style ATTRIBUTE**, and this provider always sets
|
|
255
277
|
* one on its root: `color-scheme` and `--cue-font-scale`, plus the font
|
|
@@ -9,6 +9,7 @@ import { ThemeRegistryContext } from "./theme-registry.js";
|
|
|
9
9
|
import * as React from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { MODES, THEME_NAME_PATTERN, validateManifest } from "@cueplusplus/theme-base";
|
|
12
|
+
import { CSPProvider } from "@base-ui/react/csp-provider";
|
|
12
13
|
//#region src/system/theme-provider.tsx
|
|
13
14
|
/**
|
|
14
15
|
* The empty registry, at module scope so the default is referentially stable.
|
|
@@ -514,7 +515,31 @@ function ThemeProvider({ themes: themesProp, theme: themeProp, density: densityP
|
|
|
514
515
|
"data-cue-overrides": "",
|
|
515
516
|
children: overridesStyle
|
|
516
517
|
});
|
|
517
|
-
|
|
518
|
+
/**
|
|
519
|
+
* Base UI's own style elements, which this provider's nonce also has to reach.
|
|
520
|
+
*
|
|
521
|
+
* `@base-ui/react` renders one style element — a hoisted
|
|
522
|
+
* `<style precedence>` carrying `.base-ui-disable-scrollbar` — from
|
|
523
|
+
* `utils/styles.mjs`. `ScrollAreaRoot` and `SelectPopup` pass it a nonce they
|
|
524
|
+
* read from Base UI's own `CSPContext`, and nothing fills that context unless
|
|
525
|
+
* a `CSPProvider` is rendered above them. Without one it ships bare and a
|
|
526
|
+
* `style-src-elem` policy refuses it by content hash, on every page that
|
|
527
|
+
* renders a Select, a Popover or a ScrollArea — which is most authenticated
|
|
528
|
+
* pages of a real application, and no page of its sign-in screen. A consumer
|
|
529
|
+
* cannot reasonably guess that the fix lives in a peer dependency's provider,
|
|
530
|
+
* and this library already takes the nonce and already sits at the root.
|
|
531
|
+
*
|
|
532
|
+
* Rendered **only when a nonce was given**, and that is not tidiness. A
|
|
533
|
+
* consumer that wraps its own application in `CSPProvider` is the case this
|
|
534
|
+
* must not break: an unconditional inner provider would overwrite that outer
|
|
535
|
+
* context with `undefined` and un-nonce every Base UI style element in the
|
|
536
|
+
* tree — turning this into the bug it exists to fix.
|
|
537
|
+
*/
|
|
538
|
+
const withCspContext = (tree) => nonce === void 0 ? tree : /* @__PURE__ */ jsx(CSPProvider, {
|
|
539
|
+
nonce,
|
|
540
|
+
children: tree
|
|
541
|
+
});
|
|
542
|
+
return withCspContext(/* @__PURE__ */ jsx(ThemeRegistryContext.Provider, {
|
|
518
543
|
value: registry,
|
|
519
544
|
children: /* @__PURE__ */ jsx(ThemeContext.Provider, {
|
|
520
545
|
value: contextValue,
|
|
@@ -538,7 +563,7 @@ function ThemeProvider({ themes: themesProp, theme: themeProp, density: densityP
|
|
|
538
563
|
})
|
|
539
564
|
})
|
|
540
565
|
})
|
|
541
|
-
});
|
|
566
|
+
}));
|
|
542
567
|
}
|
|
543
568
|
//#endregion
|
|
544
569
|
export { FontFamiliesContext, FontScaleContext, ThemeContext, ThemeProvider };
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"--cue-space-4",
|
|
146
146
|
"--cue-text-ui"
|
|
147
147
|
],
|
|
148
|
-
"summary": "A stack of sections, one
|
|
148
|
+
"summary": "A stack of sections, one or several open at a time.",
|
|
149
149
|
"examples": [
|
|
150
150
|
{
|
|
151
151
|
"title": "Usage",
|
|
@@ -153,10 +153,23 @@
|
|
|
153
153
|
"language": "tsx"
|
|
154
154
|
}
|
|
155
155
|
],
|
|
156
|
-
"status": "
|
|
156
|
+
"status": "stable",
|
|
157
157
|
"url": "/docs/components/accordion",
|
|
158
158
|
"mdUrl": "/docs/components/accordion.md",
|
|
159
159
|
"jsonUrl": "/r/components/accordion.json",
|
|
160
|
+
"whenToUse": [
|
|
161
|
+
"Several peer sections where the reader only needs one at a time: a settings page, a long form split by topic.",
|
|
162
|
+
"Anywhere the closed titles are themselves a useful table of contents."
|
|
163
|
+
],
|
|
164
|
+
"whenNotToUse": [
|
|
165
|
+
"Exactly one section. Use `Collapsible` — it wears the same skin, so a lone section and a stack of them look alike by design.",
|
|
166
|
+
"Optional detail inside a form. Use `Disclosure`; a summary row that looks like a section header makes a form read as twice as long as it is.",
|
|
167
|
+
"Content the reader must compare side by side. Hiding one to see the other defeats the task."
|
|
168
|
+
],
|
|
169
|
+
"commonMistakes": [
|
|
170
|
+
"Opening every section by default, which is a page with extra clicks in it.",
|
|
171
|
+
"Reimplementing the open-state bookkeeping. The disclosure ARIA and keyboard handling are Base UI's; this layer only adds the console skin."
|
|
172
|
+
],
|
|
160
173
|
"specimens": [
|
|
161
174
|
{
|
|
162
175
|
"title": "Accordion",
|
|
@@ -168,6 +181,5 @@
|
|
|
168
181
|
"note": "Hairline-separated items with mono summary rows. Several can be open at once.",
|
|
169
182
|
"interaction": "the whole header row is the trigger; the panel animates its height and stills under prefers-reduced-motion."
|
|
170
183
|
}
|
|
171
|
-
]
|
|
172
|
-
"todo": true
|
|
184
|
+
]
|
|
173
185
|
}
|
|
@@ -84,10 +84,23 @@
|
|
|
84
84
|
"language": "tsx"
|
|
85
85
|
}
|
|
86
86
|
],
|
|
87
|
-
"status": "
|
|
87
|
+
"status": "stable",
|
|
88
88
|
"url": "/docs/components/activity-graph",
|
|
89
89
|
"mdUrl": "/docs/components/activity-graph.md",
|
|
90
90
|
"jsonUrl": "/r/components/activity-graph.json",
|
|
91
|
+
"whenToUse": [
|
|
92
|
+
"Run volume over a date window, where the question is which days were busy rather than the exact number on any one of them.",
|
|
93
|
+
"A header that needs what is being counted on one side and a pre-formatted total opposite it."
|
|
94
|
+
],
|
|
95
|
+
"whenNotToUse": [
|
|
96
|
+
"A window you need to fit a fixed width. Cells are fixed-size, so a long range scrolls horizontally rather than shrinking.",
|
|
97
|
+
"Anything that is not a date-and-count series: `data` is date and count pairs, and every gap in the window is filled as an empty cell."
|
|
98
|
+
],
|
|
99
|
+
"commonMistakes": [
|
|
100
|
+
"Leaving `start` and `end` unset. heat-graph then draws a full year ending today, which will not match your data.",
|
|
101
|
+
"Bucketing the counts into levels yourself. Levels are classified for you from `data`.",
|
|
102
|
+
"Passing a raw number to `total`. It is printed as given, so format it first."
|
|
103
|
+
],
|
|
91
104
|
"specimens": [
|
|
92
105
|
{
|
|
93
106
|
"title": "ActivityGraph",
|
|
@@ -99,6 +112,5 @@
|
|
|
99
112
|
"note": "Half a year of runs as a calendar of cells, dense where the work was. It is the one element in the family with a runtime dependency of its own — `heat-graph`, an optional peer — which does the calendar arithmetic and the levelling; everything you can see here is cue's, from the five-step ramp in the streaming hue down to the legend. Cells are a fixed size, so a long window scrolls sideways rather than shrinking into a smudge.",
|
|
100
113
|
"interaction": "none. The five legend swatches are `aria-hidden` and sit between the words less and more, which is what carries the scale."
|
|
101
114
|
}
|
|
102
|
-
]
|
|
103
|
-
"todo": true
|
|
115
|
+
]
|
|
104
116
|
}
|
|
@@ -130,10 +130,23 @@
|
|
|
130
130
|
"language": "tsx"
|
|
131
131
|
}
|
|
132
132
|
],
|
|
133
|
-
"status": "
|
|
133
|
+
"status": "stable",
|
|
134
134
|
"url": "/docs/components/agent-card",
|
|
135
135
|
"mdUrl": "/docs/components/agent-card.md",
|
|
136
136
|
"jsonUrl": "/r/components/agent-card.json",
|
|
137
|
+
"whenToUse": [
|
|
138
|
+
"A directory or picker where someone chooses an agent before the conversation starts.",
|
|
139
|
+
"Advertising named capabilities alongside the provider, version, model and endpoint behind them."
|
|
140
|
+
],
|
|
141
|
+
"whenNotToUse": [
|
|
142
|
+
"Reporting what an agent is doing right now. The card is a standing description of the agent, not a live state.",
|
|
143
|
+
"An endpoint that has to be read in full. `endpoint` truncates rather than wraps."
|
|
144
|
+
],
|
|
145
|
+
"commonMistakes": [
|
|
146
|
+
"Rendering your own Connected label beside the action. `connected` already swaps the action for a settled Connected state and disables it.",
|
|
147
|
+
"Writing a paragraph into `description`. It is sized for one or two sentences.",
|
|
148
|
+
"Leaving `onConnect` off while `connected` is false, which shows an action with nowhere to go."
|
|
149
|
+
],
|
|
137
150
|
"specimens": [
|
|
138
151
|
{
|
|
139
152
|
"title": "AgentCard",
|
|
@@ -145,6 +158,5 @@
|
|
|
145
158
|
"note": "Who you are about to talk to, before you talk to it: the name and who publishes it, one paragraph on what it is for, the skills it advertises, and — in mono along the bottom — the model and the endpoint actually behind it. Those last two are the line that separates a card from a marketing tile.",
|
|
146
159
|
"interaction": "the action is the only control. Connected disables it and swaps the ink button for a settled field row with a tick, rather than greying out a button that still looks pressable."
|
|
147
160
|
}
|
|
148
|
-
]
|
|
149
|
-
"todo": true
|
|
161
|
+
]
|
|
150
162
|
}
|
|
@@ -84,10 +84,22 @@
|
|
|
84
84
|
"language": "tsx"
|
|
85
85
|
}
|
|
86
86
|
],
|
|
87
|
-
"status": "
|
|
87
|
+
"status": "stable",
|
|
88
88
|
"url": "/docs/components/agent-handoff",
|
|
89
89
|
"mdUrl": "/docs/components/agent-handoff.md",
|
|
90
90
|
"jsonUrl": "/r/components/agent-handoff.json",
|
|
91
|
+
"whenToUse": [
|
|
92
|
+
"The moment one agent gives the baton to another in a transcript that would otherwise jump.",
|
|
93
|
+
"Showing which pieces of context travelled across with it."
|
|
94
|
+
],
|
|
95
|
+
"whenNotToUse": [
|
|
96
|
+
"A handoff you cannot explain. `reason` is required because without it a handoff reads as an unexplained jump.",
|
|
97
|
+
"A step inside a single agent's own work — this element is about the boundary between two of them."
|
|
98
|
+
],
|
|
99
|
+
"commonMistakes": [
|
|
100
|
+
"Omitting `carried` to hide the context section. Pass an empty array instead; it is a required prop.",
|
|
101
|
+
"Leaving `settled` false once the receiving agent is underway, so the arrow and the receiving badge keep signalling a transition that already finished."
|
|
102
|
+
],
|
|
91
103
|
"specimens": [
|
|
92
104
|
{
|
|
93
105
|
"title": "AgentHandoff",
|
|
@@ -99,6 +111,5 @@
|
|
|
99
111
|
"note": "The baton moving, with the reason attached. Two badges and an arrow: while the handoff is live the receiving agent and the arrow take the streaming hue, and `settled` cools both once the new agent is actually underway. What travelled across is listed under it against a rule — a handoff with no carried context is a handoff you cannot audit.",
|
|
100
112
|
"interaction": "none. It is a record of something that happened, not a control; the only thing that moves is the colour, over half a second."
|
|
101
113
|
}
|
|
102
|
-
]
|
|
103
|
-
"todo": true
|
|
114
|
+
]
|
|
104
115
|
}
|
|
@@ -82,10 +82,20 @@
|
|
|
82
82
|
"language": "tsx"
|
|
83
83
|
}
|
|
84
84
|
],
|
|
85
|
-
"status": "
|
|
85
|
+
"status": "stable",
|
|
86
86
|
"url": "/docs/components/agent-mode-badge",
|
|
87
87
|
"mdUrl": "/docs/components/agent-mode-badge.md",
|
|
88
88
|
"jsonUrl": "/r/components/agent-mode-badge.json",
|
|
89
|
+
"whenToUse": [
|
|
90
|
+
"Anywhere a person needs the run's authority from the corner of their eye — the fact every catalogue leaves to prose.",
|
|
91
|
+
"As the source for mode-aware styling elsewhere: put the same `data-agent-mode` on a composer and its focus ring, send button and rail tint from one place."
|
|
92
|
+
],
|
|
93
|
+
"whenNotToUse": [
|
|
94
|
+
"A status. Use `AgentStatus` — authority and activity are different questions."
|
|
95
|
+
],
|
|
96
|
+
"commonMistakes": [
|
|
97
|
+
"Threading a mode prop through components instead of reusing the attribute. `elements.css` declares four custom properties under `data-agent-mode`, so a console adds a mode-aware surface by reading a property rather than by branching."
|
|
98
|
+
],
|
|
89
99
|
"specimens": [
|
|
90
100
|
{
|
|
91
101
|
"title": "AgentModeBadge",
|
|
@@ -97,6 +107,5 @@
|
|
|
97
107
|
"note": "How much authority the run is holding, which is the fact a person most needs from the corner of their eye and the one every catalogue leaves to prose. The ladder is four rungs — will it ask me, is it writing, is it only planning, are the guardrails off — because that is how many accents every product in the study paints, whatever it calls its six or seven or nine modes. The chip is the readout; `data-agent-mode` is the part that travels.",
|
|
98
108
|
"interaction": "press the chip to cycle the rung. The second specimen is the whole point: one attribute on the box, and the rail, the border and the send button all re-derive from `var(--cue-elements-mode-icon)` with no prop threading and no branch in any component. Colour is never alone — each rung has its own glyph and its own word, so the ladder survives a monochrome screenshot."
|
|
99
109
|
}
|
|
100
|
-
]
|
|
101
|
-
"todo": true
|
|
110
|
+
]
|
|
102
111
|
}
|
|
@@ -127,10 +127,21 @@
|
|
|
127
127
|
"language": "tsx"
|
|
128
128
|
}
|
|
129
129
|
],
|
|
130
|
-
"status": "
|
|
130
|
+
"status": "stable",
|
|
131
131
|
"url": "/docs/components/agent-pile",
|
|
132
132
|
"mdUrl": "/docs/components/agent-pile.md",
|
|
133
133
|
"jsonUrl": "/r/components/agent-pile.json",
|
|
134
|
+
"whenToUse": [
|
|
135
|
+
"A multi-agent run where who is involved matters more than what each is doing right now.",
|
|
136
|
+
"Anywhere the states must be legible without colour — crown, spinning arc and `?` badge each also go into the accessible name."
|
|
137
|
+
],
|
|
138
|
+
"whenNotToUse": [
|
|
139
|
+
"One agent. An `Avatar` says it with less.",
|
|
140
|
+
"A list the reader must act on. A pile is a summary."
|
|
141
|
+
],
|
|
142
|
+
"commonMistakes": [
|
|
143
|
+
"Adding a colour-only state of your own, which breaks the rule the three built-in states follow."
|
|
144
|
+
],
|
|
134
145
|
"specimens": [
|
|
135
146
|
{
|
|
136
147
|
"title": "AgentPile",
|
|
@@ -142,6 +153,5 @@
|
|
|
142
153
|
"note": "Faces at −12px overlap, fanning to +4px on hover. The crown marks the orchestrator, an arc marks work in flight and a `?` marks an agent waiting on an answer.",
|
|
143
154
|
"interaction": "every face is a button with the agent's name; the pile is one tab stop and arrow keys move inside it."
|
|
144
155
|
}
|
|
145
|
-
]
|
|
146
|
-
"todo": true
|
|
156
|
+
]
|
|
147
157
|
}
|
|
@@ -54,10 +54,21 @@
|
|
|
54
54
|
"language": "tsx"
|
|
55
55
|
}
|
|
56
56
|
],
|
|
57
|
-
"status": "
|
|
57
|
+
"status": "stable",
|
|
58
58
|
"url": "/docs/components/agent-plan",
|
|
59
59
|
"mdUrl": "/docs/components/agent-plan.md",
|
|
60
60
|
"jsonUrl": "/r/components/agent-plan.json",
|
|
61
|
+
"whenToUse": [
|
|
62
|
+
"An ordered set of steps the agent walks front to back, with one of them currently running."
|
|
63
|
+
],
|
|
64
|
+
"whenNotToUse": [
|
|
65
|
+
"Work that fans out and rejoins. `steps` is a flat array worked through in order.",
|
|
66
|
+
"A checklist a person ticks. Progress is driven entirely by `activeIndex`, not by input."
|
|
67
|
+
],
|
|
68
|
+
"commonMistakes": [
|
|
69
|
+
"Clamping `activeIndex` before passing it. Values past the end already mark every step done, and values before the start mark none.",
|
|
70
|
+
"Passing rich nodes as steps. `steps` is `readonly string[]`."
|
|
71
|
+
],
|
|
61
72
|
"specimens": [
|
|
62
73
|
{
|
|
63
74
|
"title": "AgentPlan",
|
|
@@ -69,6 +80,5 @@
|
|
|
69
80
|
"note": "The checklist the agent published before it started, with one index driving the whole thing: steps before it are done, the step at it is running, steps after it are waiting. An index past the end marks every step done.",
|
|
70
81
|
"interaction": "none. A plan is a readout; the agent moves it, not the reader."
|
|
71
82
|
}
|
|
72
|
-
]
|
|
73
|
-
"todo": true
|
|
83
|
+
]
|
|
74
84
|
}
|
|
@@ -67,10 +67,22 @@
|
|
|
67
67
|
"language": "tsx"
|
|
68
68
|
}
|
|
69
69
|
],
|
|
70
|
-
"status": "
|
|
70
|
+
"status": "stable",
|
|
71
71
|
"url": "/docs/components/agent-status",
|
|
72
72
|
"mdUrl": "/docs/components/agent-status.md",
|
|
73
73
|
"jsonUrl": "/r/components/agent-status.json",
|
|
74
|
+
"whenToUse": [
|
|
75
|
+
"A standing status pill beside a run: working, waiting, or done with a check.",
|
|
76
|
+
"Showing how long it has been going, which renders in mono when `elapsed` is provided."
|
|
77
|
+
],
|
|
78
|
+
"whenNotToUse": [
|
|
79
|
+
"A failure. The three states are working, waiting and done — there is no error mode.",
|
|
80
|
+
"A multi-line explanation. `label` is a short status line."
|
|
81
|
+
],
|
|
82
|
+
"commonMistakes": [
|
|
83
|
+
"Formatting the clock into `label`. `elapsed` is its own prop and gets the mono treatment.",
|
|
84
|
+
"Leaving `state=\"working\"` on a finished run, which keeps the pill signalling activity after there is nothing left to do."
|
|
85
|
+
],
|
|
74
86
|
"specimens": [
|
|
75
87
|
{
|
|
76
88
|
"title": "AgentStatus",
|
|
@@ -82,6 +94,5 @@
|
|
|
82
94
|
"note": "One pill that always answers the two questions a run raises: what is it doing, and for how long. Working shimmers, waiting is still and marked, done carries a check and the elapsed total.",
|
|
83
95
|
"interaction": "the trailing control is a labelled icon button that pauses a run and offers to run it again once it is done."
|
|
84
96
|
}
|
|
85
|
-
]
|
|
86
|
-
"todo": true
|
|
97
|
+
]
|
|
87
98
|
}
|
|
@@ -73,10 +73,20 @@
|
|
|
73
73
|
"language": "tsx"
|
|
74
74
|
}
|
|
75
75
|
],
|
|
76
|
-
"status": "
|
|
76
|
+
"status": "stable",
|
|
77
77
|
"url": "/docs/components/agent-surface",
|
|
78
78
|
"mdUrl": "/docs/components/agent-surface.md",
|
|
79
79
|
"jsonUrl": "/r/components/agent-surface.json",
|
|
80
|
+
"whenToUse": [
|
|
81
|
+
"A region of the elements family that must repaint wholesale — a different skin or fidelity — with no prop threading and no branch in any component."
|
|
82
|
+
],
|
|
83
|
+
"whenNotToUse": [
|
|
84
|
+
"One component's appearance. Use that component's own props.",
|
|
85
|
+
"Density. Use `Density`."
|
|
86
|
+
],
|
|
87
|
+
"commonMistakes": [
|
|
88
|
+
"Reading the React context to style something. The attributes do the work — `elements.css` re-declares the `--cue-*` tokens under them and custom properties inherit. The context exists for the one place that cannot see the DOM: an overlay portalled to `<body>` from inside the island."
|
|
89
|
+
],
|
|
80
90
|
"specimens": [
|
|
81
91
|
{
|
|
82
92
|
"title": "AgentSurface",
|
|
@@ -88,6 +98,5 @@
|
|
|
88
98
|
"note": "One DOM, three paint jobs. The same three tool calls sit in all three specimens; the only difference is the pair of attributes on the box around them. skin='aui' re-points the colour set to assistant-ui's own inks and grounds, and fidelity='upstream' re-points the metrics too, which is what stops cue's density ladder at the island edge. Without @cueplusplus/ui/elements.css imported, all three would look alike.",
|
|
89
99
|
"interaction": "none of its own. The island is a values-set, not a control: everything inside keeps the behaviour it has outside."
|
|
90
100
|
}
|
|
91
|
-
]
|
|
92
|
-
"todo": true
|
|
101
|
+
]
|
|
93
102
|
}
|
|
@@ -195,10 +195,22 @@
|
|
|
195
195
|
"language": "tsx"
|
|
196
196
|
}
|
|
197
197
|
],
|
|
198
|
-
"status": "
|
|
198
|
+
"status": "stable",
|
|
199
199
|
"url": "/docs/components/alert-dialog",
|
|
200
200
|
"mdUrl": "/docs/components/alert-dialog.md",
|
|
201
201
|
"jsonUrl": "/r/components/alert-dialog.json",
|
|
202
|
+
"whenToUse": [
|
|
203
|
+
"A rare, expensive, irreversible action — dropping a database, discarding unsaved work.",
|
|
204
|
+
"Anywhere an accidental outside click must not dismiss the question."
|
|
205
|
+
],
|
|
206
|
+
"whenNotToUse": [
|
|
207
|
+
"A routine destructive action. Use `TwoStepButton`: a dialog in front of something people do twenty times an hour only teaches them to dismiss dialogs.",
|
|
208
|
+
"Anything with more than two answers. Use `Dialog`."
|
|
209
|
+
],
|
|
210
|
+
"commonMistakes": [
|
|
211
|
+
"Reaching for `Dialog` instead. The difference is not cosmetic — this takes `role=\"alertdialog\"` and refuses outside-press dismissal, which is the whole point.",
|
|
212
|
+
"Labelling the buttons 'OK' and 'Cancel'. Name the action: 'Delete patch' says what OK does."
|
|
213
|
+
],
|
|
202
214
|
"specimens": [
|
|
203
215
|
{
|
|
204
216
|
"title": "AlertDialog",
|
|
@@ -210,6 +222,5 @@
|
|
|
210
222
|
"note": "The destructive twin: no scrim dismissal, no close button, and an explicit pair of Cancel and Action.",
|
|
211
223
|
"interaction": "Escape is deliberately not enough on its own; the action has to be chosen."
|
|
212
224
|
}
|
|
213
|
-
]
|
|
214
|
-
"todo": true
|
|
225
|
+
]
|
|
215
226
|
}
|