@cueplusplus/ui 0.13.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 +307 -0
- package/README.md +2 -19
- package/dist/index.d.ts +2 -2
- package/dist/layout/frames.d.ts +19 -1
- package/dist/layout/frames.js +21 -7
- package/dist/layout/index.d.ts +2 -2
- package/dist/primitives/chip.d.ts +1 -1
- package/dist/system/theme-provider.d.ts +46 -1
- package/dist/system/theme-provider.js +29 -3
- 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/frames.json +14 -0
- 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 +10 -0
- 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 +651 -651
- package/manifest/tokens.json +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,312 @@
|
|
|
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
|
+
|
|
186
|
+
## 0.14.0
|
|
187
|
+
|
|
188
|
+
### Minor Changes
|
|
189
|
+
|
|
190
|
+
- f9bb2ff: **`Frames` takes a `layout`.** The default, `"board"`, is what it has always
|
|
191
|
+
drawn: a picker across the top and one frame on the stage at a time. The new
|
|
192
|
+
`"column"` runs every frame down a single scroller instead — each with its own
|
|
193
|
+
caption and count, all of them on one ground — so a reader comparing eight
|
|
194
|
+
states of a component reads them rather than clicking through them.
|
|
195
|
+
|
|
196
|
+
```tsx
|
|
197
|
+
<Frames layout="column" …/>
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Nothing changes for markup that does not pass it: `layout` defaults to
|
|
201
|
+
`"board"`, and a `Frames` with no `layout` prop renders byte-for-byte what it
|
|
202
|
+
rendered before.
|
|
203
|
+
|
|
204
|
+
- f9bb2ff: **`ThemeProvider` takes a CSP `nonce`.**
|
|
205
|
+
|
|
206
|
+
When `overrides.densities` is set, the provider emits one `<style>` element for
|
|
207
|
+
the density layer. An application serving `style-src-elem 'self'
|
|
208
|
+
'nonce-<per-request>'` had that element refused on every page load: React
|
|
209
|
+
renders it on the client, and a client-rendered element cannot pick up a server
|
|
210
|
+
nonce by itself.
|
|
211
|
+
|
|
212
|
+
```tsx
|
|
213
|
+
// app/layout.tsx — the nonce your middleware already mints
|
|
214
|
+
<ThemeProvider nonce={nonce} overrides={{ densities: … }}>
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
The attribute is set only when you pass one. It is absent otherwise rather than
|
|
218
|
+
present and empty, because `nonce=""` matches no `'nonce-…'` source and would
|
|
219
|
+
talk a policy out of admitting the element some other way.
|
|
220
|
+
|
|
221
|
+
Nothing else in this library emits a `<style>` element, and `prepaintScript()`
|
|
222
|
+
returns a string your application renders in a `<script>` of its own — so your
|
|
223
|
+
application already owns that element's nonce, and this prop is the whole of
|
|
224
|
+
what a strict `style-src-elem` needs from here.
|
|
225
|
+
|
|
226
|
+
**One thing a nonce cannot fix.** The provider always sets a style _attribute_
|
|
227
|
+
on its root — `color-scheme` and `--cue-font-scale`, plus the font families and
|
|
228
|
+
overrides where given. CSP has no nonce form for `style-src-attr`: it is
|
|
229
|
+
`'unsafe-inline'` or `'none'`. Under `'none'` the browser drops those
|
|
230
|
+
declarations, and no prop here can change that.
|
|
231
|
+
|
|
232
|
+
### Patch Changes
|
|
233
|
+
|
|
234
|
+
- 331501f: ## The scope goes public
|
|
235
|
+
|
|
236
|
+
Every package in `@cueplusplus` was private on npm. npm authenticates _every_
|
|
237
|
+
read of a private package, so each consumer needed a granular read-only token,
|
|
238
|
+
and it could not live in a committed `.npmrc` — pnpm 10 and later ignore an
|
|
239
|
+
env-expanded `_authToken` there by design. The failure mode was the expensive
|
|
240
|
+
part: npm answers a private package the same way to a reader it will not admit
|
|
241
|
+
exists, so a missing credential surfaced as `404 Not Found` rather than `401`,
|
|
242
|
+
and read as "this was never published".
|
|
243
|
+
|
|
244
|
+
That was a fair trade while the design system had no consumer outside the org.
|
|
245
|
+
It stopped being one the moment a public project depended on it, because a
|
|
246
|
+
public project cannot ask its readers for a token before they can install it.
|
|
247
|
+
|
|
248
|
+
So `access` is `public`, in the Changesets config and in all sixteen manifests.
|
|
249
|
+
Consumers now run `pnpm add @cueplusplus/ui` and nothing else: no token, no
|
|
250
|
+
`.npmrc`, nothing to rotate, and no extra step in CI or on a hosting provider.
|
|
251
|
+
|
|
252
|
+
Nothing else moves. Same registry, same names, same versions — so no consumer
|
|
253
|
+
needs to regenerate a lockfile, and a machine that keeps its npm token for
|
|
254
|
+
another private scope can keep it.
|
|
255
|
+
|
|
256
|
+
The guard tests are turned around rather than removed. `changeset-config` still
|
|
257
|
+
asserts the access level and `publishable-packages` still asserts the registry;
|
|
258
|
+
both now assert the public contract. `publishable-packages` additionally asserts
|
|
259
|
+
`access: "public"` per manifest, which it never did before: the Changesets config
|
|
260
|
+
decides what a release does, but npm defaults a scoped package to restricted, so
|
|
261
|
+
a manifest that forgets is the one that quietly stays private while its siblings
|
|
262
|
+
go public.
|
|
263
|
+
|
|
264
|
+
- 52094a9: **The `@cueplusplus` scope is served by npm now, not GitHub Packages.** Every package is
|
|
265
|
+
**private** there, so installs still authenticate — but the credential and the configuration both
|
|
266
|
+
change, and the old ones stop working.
|
|
267
|
+
|
|
268
|
+
**What to remove.** The scope routing you were asked to commit:
|
|
269
|
+
|
|
270
|
+
```ini
|
|
271
|
+
# .npmrc — delete this line
|
|
272
|
+
@cueplusplus:registry=https://npm.pkg.github.com
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Nothing replaces it. npm's own registry is where the scope resolves by default, so there is no
|
|
276
|
+
routing to commit at all — which also means a project that consumed this scope through a committed
|
|
277
|
+
`.npmrc` can usually delete the file.
|
|
278
|
+
|
|
279
|
+
**What to replace.** The classic GitHub PAT with `read:packages` is no longer used. In its place,
|
|
280
|
+
an npm **granular access token** with **read-only** permission on the `@cueplusplus` scope,
|
|
281
|
+
written once at the user level:
|
|
282
|
+
|
|
283
|
+
```sh
|
|
284
|
+
pnpm config set //registry.npmjs.org/:_authToken npm_…
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
It goes at the user level for the same reason as before: pnpm 10 and later ignore an env-expanded
|
|
288
|
+
`_authToken` in a project `.npmrc`, and the install then fails with a `404` — not a `401` — and a
|
|
289
|
+
warning nobody reads. npm answers a private package the same way to a reader it will not admit
|
|
290
|
+
exists, so the failure reads as "never published".
|
|
291
|
+
|
|
292
|
+
**One token, every scope.** npm authenticates per registry rather than per scope, so a machine
|
|
293
|
+
that installs other private scopes from npm needs one line, not one per scope — select them all on
|
|
294
|
+
the same token. Two different tokens for `registry.npmjs.org` cannot coexist in one config.
|
|
295
|
+
|
|
296
|
+
**CI changes too, and this one is easy to miss.** Under GitHub Packages a workflow's own
|
|
297
|
+
`GITHUB_TOKEN` could read the scope, so many workflows carried no secret. npm does not know about
|
|
298
|
+
that token. Every repository that installs these packages now needs the read-only npm token as a
|
|
299
|
+
secret, and `setup-node` pointed at `registry.npmjs.org`. The same applies to Vercel, Trigger.dev
|
|
300
|
+
and any Docker build that installs — `docs/CONSUMING.md` §1 has each of them.
|
|
301
|
+
|
|
302
|
+
Nothing about the packages themselves changed: same exports, same versions, same contents. What
|
|
303
|
+
moved is where they are served from and what proves you may read them.
|
|
304
|
+
|
|
305
|
+
- Updated dependencies [331501f]
|
|
306
|
+
- Updated dependencies [52094a9]
|
|
307
|
+
- @cueplusplus/theme-base@1.0.3
|
|
308
|
+
- @cueplusplus/tokens@0.14.0
|
|
309
|
+
|
|
3
310
|
## 0.13.0
|
|
4
311
|
|
|
5
312
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -5,25 +5,8 @@ Base UI underneath for behaviour and accessibility, Tailwind v4 on top for the p
|
|
|
5
5
|
|
|
6
6
|
## Install
|
|
7
7
|
|
|
8
|
-
The `@cueplusplus` scope is
|
|
9
|
-
|
|
10
|
-
cosmetic — pnpm ignores an env-expanded credential in a project `.npmrc` and the install fails
|
|
11
|
-
with `401`.
|
|
12
|
-
|
|
13
|
-
Commit the scope routing, and nothing else, at the root of your project:
|
|
14
|
-
|
|
15
|
-
```ini
|
|
16
|
-
# .npmrc
|
|
17
|
-
@cueplusplus:registry=https://npm.pkg.github.com
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
Then write the credential once, at the **user** level, where pnpm reads it from. It is a
|
|
21
|
-
**classic** personal access token with `read:packages` — GitHub Packages accepts neither
|
|
22
|
-
fine-grained PATs nor OIDC:
|
|
23
|
-
|
|
24
|
-
```sh
|
|
25
|
-
pnpm config set //npm.pkg.github.com/:_authToken ghp_…
|
|
26
|
-
```
|
|
8
|
+
The `@cueplusplus` scope is **public on npm** and resolves there by default, so there is nothing
|
|
9
|
+
to configure and no credential to supply — it installs like any other package.
|
|
27
10
|
|
|
28
11
|
```sh
|
|
29
12
|
pnpm add @cueplusplus/ui @cueplusplus/tokens @cueplusplus/theme-cue @base-ui/react
|
package/dist/index.d.ts
CHANGED
|
@@ -96,7 +96,7 @@ import { Card, CardContentProps, CardDescriptionProps, CardFooterProps, CardHead
|
|
|
96
96
|
import { Collapsible, CollapsiblePanelProps, CollapsibleRootProps, CollapsibleTriggerProps, Disclosure, DisclosureProps } from "./layout/collapsible.js";
|
|
97
97
|
import { DescriptionList, DescriptionListDetailProps, DescriptionListLayout, DescriptionListRootProps, DescriptionListTermProps } from "./layout/description-list.js";
|
|
98
98
|
import { PreviewGround } from "./layout/_ground.js";
|
|
99
|
-
import { Frames, FramesHeight, FramesItemProps, FramesRootProps } from "./layout/frames.js";
|
|
99
|
+
import { Frames, FramesHeight, FramesItemProps, FramesLayout, FramesRootProps } from "./layout/frames.js";
|
|
100
100
|
import { Grid, GridColumns, GridProps } from "./layout/grid.js";
|
|
101
101
|
import { Item, ItemProps, itemVariants } from "./layout/item.js";
|
|
102
102
|
import { Pagination, PaginationEntry, PaginationProps, paginationRange } from "./layout/pagination.js";
|
|
@@ -135,4 +135,4 @@ import { useDensities, useFonts, useThemes } from "./system/theme-registry.js";
|
|
|
135
135
|
import { ControlSize, useControlHeight, useDensity } from "./system/use-density.js";
|
|
136
136
|
import { useTheme } from "./system/use-theme.js";
|
|
137
137
|
import { DEFAULT_STYLE_SET, DensityEntry, DensityLevel, FontEntry, FontName, Mode, STYLE_SETS, StyleSet, ThemeManifest, ThemeName } from "./system/index.js";
|
|
138
|
-
export { AGENT_COLOR_PROPERTY, AGENT_HUES, AGENT_ROOT_COLOR, Accordion, type AccordionHeaderProps, type AccordionItemProps, type AccordionPanelProps, type AccordionRootProps, type AccordionTriggerProps, type AgentColorOptions, AgentPile, type AgentPileEntry, type AgentPileProps, type AgentPileSize, AlertDialog, type AlertDialogActionProps, type AlertDialogCancelProps, type AlertDialogContentProps, type AlertDialogDescriptionProps, type AlertDialogFooterProps, type AlertDialogRootProps, type AlertDialogTitleProps, type AlertDialogTriggerProps, AppBar, type AppBarActionsProps, type AppBarBrandProps, type AppBarLinkProps, type AppBarNavProps, type AppBarRegister, type AppBarRootProps, type AppBarSeparatorProps, AppShell, type AppShellAsideProps, type AppShellBarProps, type AppShellBodyProps, type AppShellContentProps, type AppShellNavTriggerProps, type AppShellRootProps, type AppShellScrollerProps, type AppShellSidebarProps, AppWindowFrame, type AppWindowFrameProps, type AskAnswer, AskBox, type AskBoxProps, type AskDanger, type AskKind, type AskOption, AudienceIcon, Autocomplete, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, Band, type BandProps, type BandSeparation, type BandWidth, type BarOverflow, Bento, type BentoColumns, type BentoMinHeight, type BentoRootProps, type BentoRowSpan, type BentoRows, type BentoSpan, type BentoTileProps, type BrandAssetProps, type BrandSize, type BrandTone, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupOrientation, type ButtonGroupProps, type ButtonProps, Card, type CardContentProps, type CardDescriptionProps, type CardFooterProps, type CardHeaderProps, type CardRootProps, type CardTitleProps, CatalogueIcon, ChannelBetaIcon, ChannelReleasedIcon, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, Chip, type ChipProps, CliToolIcon, CodeBlock, type CodeBlockProps, Collapsible, type CollapsiblePanelProps, type CollapsibleRootProps, type CollapsibleTriggerProps, Combobox, type ComboboxOption, type ComboboxProps, CommandPalette, type CommandPaletteItem, type CommandPaletteProps, Composer, type ComposerProps, type ComposerSubmitKey, Container, type ContainerProps, type ContainerWidth, ContextMenu, type ContextMenuContentProps, type ContextMenuRootProps, type ContextMenuTriggerProps, type ControlSize, type ControlVariantProps, CopyButton, type CopyButtonProps, CueLogotype, type CueLogotypeProps, CueMark, type CueMarkProps, CuePortalFrame, type CuePortalFrameProps, DEFAULT_STORAGE_KEY, DEFAULT_STYLE_SET, DataRow, type DataRowDisclosure, type DataRowRootProps, type DataRowSlotProps, DataTree, type DataTreeItem, type DataTreeProps, type DataTreeRowState, DelegationCard, type DelegationCardProps, type DelegationDirection, type DelegationStatus, Density, type DensityEntry, type DensityLevel, type DensityProps, DescriptionList, type DescriptionListDetailProps, type DescriptionListLayout, type DescriptionListRootProps, type DescriptionListTermProps, Dialog, type DialogCloseProps, type DialogContentProps, type DialogDescriptionProps, type DialogFooterProps, type DialogRootProps, type DialogTitleProps, type DialogTriggerProps, Disclosure, type DisclosureProps, Drawer, type DrawerCloseProps, type DrawerContentProps, type DrawerDescriptionProps, type DrawerFooterProps, type DrawerRootProps, type DrawerSwipeDirection, type DrawerTitleProps, type DrawerTriggerProps, DropdownMenu, type DropdownMenuCheckboxItemProps, type DropdownMenuContentProps, type DropdownMenuGroupProps, type DropdownMenuItemProps, type DropdownMenuLabelProps, type DropdownMenuRootProps, type DropdownMenuSeparatorProps, type DropdownMenuTriggerProps, EmptyState, type EmptyStateProps, EnvVarInput, type EnvVarInputProps, Eyebrow, type EyebrowProps, Field, FieldDescription, type FieldDescriptionProps, FieldError, type FieldErrorProps, type FieldIssue, FieldLabel, type FieldLabelProps, type FieldProps, type FilePartition, type FilePartitionOptions, type FileRejectReason, type FileRejection, FileUpload, type FileUploadProps, FolderIcon, type FontEntry, type FontFamilies, type FontName, Footer, type FooterProps, type FormControlSize, Frames, type FramesHeight, type FramesItemProps, type FramesRootProps, Grid, type GridColumns, type GridProps, GroupBar, type GroupBarItem, type GroupBarProps, type GroupBarTone, HoverCard, type HoverCardContentProps, type HoverCardRootProps, type HoverCardTriggerProps, IconButton, type IconButtonProps, InfoTip, type InfoTipProps, Input, InputGroup, type InputGroupProps, type InputProps, Inspector, type InspectorFooterProps, type InspectorRootProps, type InspectorRowProps, type InspectorSectionProps, Item, type ItemProps, Kbd, type KbdProps, Ledger, type LedgerEmptyProps, type LedgerGroupProps, type LedgerRootProps, type LedgerTierProps, Link, type LinkProps, McpServerIcon, Menubar, type MenubarContentProps, type MenubarMenuProps, type MenubarRootProps, type MenubarTriggerProps, Message, MessageList, type MessageListProps, type MessageProps, type MessageRole, Meter, type MeterProps, type MeterProvenance, type MeterTone, type Mode, MultiSelect, type MultiSelectProps, NavigationMenu, type NavigationMenuContentProps, type NavigationMenuItemProps, type NavigationMenuLinkProps, type NavigationMenuListProps, type NavigationMenuRootProps, type NavigationMenuTriggerProps, type NavigationMenuViewportProps, NumberField, type NumberFieldProps, OTPField, type OTPFieldProps, OVERLAY_SIDE_OFFSET, PageShell, type PageShellProps, type PageWidth, Pagination, type PaginationEntry, type PaginationProps, Panel, PanelHeader, type PanelHeaderProps, type PanelProps, PasswordInput, type PasswordInputProps, type PersistedPreferences, Plussie, type PlussieExpression, type PlussieProps, Popover, type PopoverCloseProps, type PopoverContentProps, type PopoverDescriptionProps, type PopoverRootProps, type PopoverTitleProps, type PopoverTriggerProps, type PrepaintDefaults, type PrepaintOptions, Preview, type PreviewAxis, type PreviewGround, type PreviewPresentation, type PreviewProps, type PreviewResizeOptions, Progress, type ProgressProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, type RatingSize, type ResolvedMode, Row, type RowProps, STYLE_SETS, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, type ScrollEdges, ScrollableTabsList, type ScrollableTabsListProps, ScrubInput, type ScrubInputProps, SeamCell, type SeamCellProps, SeamGrid, type SeamGridProps, type SeamGround, SeamList, type SeamListProps, SearchInput, type SearchInputProps, SectionHeader, type SectionHeaderProps, SegmentedControl, type SegmentedControlItem, type SegmentedControlProps, type SegmentedControlSize, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Sheet, type SheetCloseProps, type SheetContentProps, type SheetDescriptionProps, type SheetFooterProps, type SheetRootProps, type SheetTitleProps, type SheetTriggerProps, Sidebar, type SidebarItemProps, type SidebarRailProps, type SidebarRootProps, type SidebarSectionProps, Skeleton, type SkeletonProps, SkillIcon, Slider, type SliderProps, type SpaceStep, Sparkline, type SparklineProps, Spinner, type SpinnerProps, Stack, type StackAlign, StackIcon, type StackJustify, type StackProps, StacksMatrixIcon, Stat, type StatProps, type StatTone, StatusBar, type StatusBarGroupProps, type StatusBarItemProps, type StatusBarProminence, type StatusBarProps, type StatusBarTone, StatusDot, type StatusDotProps, type StatusTone, Stepper, type StepperProps, type StepperState, type StepperStep, type StyleSet, Switch, type SwitchProps, TAB_FADE_PX, TREE_GUIDE_GLYPHS, Table, type TableCaptionProps, type TableCellProps, type TableGroupRowProps, type TableHeadProps, type TableRootProps, type TableRowProps, TableScrollRegion, type TableScrollRegionProps, type TableSectionProps, Tabs, type TabsListProps, type TabsPanelProps, type TabsRootProps, type TabsTabProps, TagsInput, type TagsInputProps, TerminalFrame, type TerminalFrameLine, type TerminalFrameProps, type TerminalLine, type TerminalLineTone, type TerminalScript, type TerminalStep, Textarea, type TextareaProps, type ThemeContextValue, type ThemeManifest, type ThemeName, ThemeProvider, type ThemeProviderProps, type ThemeRegistry, Timeline, type TimelineContentProps, type TimelineItemProps, type TimelineMarkerProps, type TimelineRootProps, TitleBar, type TitleBarProps, Toast, type ToastManager, type ToastOptions, type ToastProviderProps, type ToastTone, type ToastViewportProps, Toggle, ToggleGroup, type ToggleGroupProps, type ToggleProps, type TokenOverrides, Toolbar, type ToolbarButtonProps, type ToolbarGroupProps, type ToolbarRootProps, type ToolbarSeparatorProps, Tooltip, type TooltipContentProps, type TooltipProviderProps, type TooltipRootProps, type TooltipTriggerProps, Tree, type TreeGuide, type TreeItem, type TreeProps, type TreeRow, type TreeVisibility, TreeVisibilityToggle, type TreeVisibilityToggleProps, TwoStepButton, type TwoStepButtonProps, type TwoStepTone, type UploadFile, type UploadStatus, UsageChart, type UsageChartPoint, type UsageChartProps, type UsageChartTone, activateRowFromClick, activateRowFromKeyDown, agentColor, agentColorStyle, bareControlClasses, buttonVariants, chipVariants, computeScrollEdges, controlClasses, controlGroupFocusClasses, controlSurface, controlVariants, edgeFadeMask, envReference, flattenTree, isSafeTokenValue, itemVariants, linkVariants, menuItemClasses, menuLabelClasses, menuPopupClasses, menuSeparatorClasses, overlayDescriptionClasses, overlayFooterClasses, overlayModalTransitionClasses, overlayPopupTransitionClasses, overlayPositionerClasses, overlaySurfaceClasses, overlayTextClasses, overlayTitleClasses, paginationRange, parseEnvReference, partitionFiles, prepaintScript, rowVariants, scrimClasses, useControlHeight, useCuePortalProps, useDensities, useDensity, useFonts, useSidebar, useTheme, useThemes, useToast };
|
|
138
|
+
export { AGENT_COLOR_PROPERTY, AGENT_HUES, AGENT_ROOT_COLOR, Accordion, type AccordionHeaderProps, type AccordionItemProps, type AccordionPanelProps, type AccordionRootProps, type AccordionTriggerProps, type AgentColorOptions, AgentPile, type AgentPileEntry, type AgentPileProps, type AgentPileSize, AlertDialog, type AlertDialogActionProps, type AlertDialogCancelProps, type AlertDialogContentProps, type AlertDialogDescriptionProps, type AlertDialogFooterProps, type AlertDialogRootProps, type AlertDialogTitleProps, type AlertDialogTriggerProps, AppBar, type AppBarActionsProps, type AppBarBrandProps, type AppBarLinkProps, type AppBarNavProps, type AppBarRegister, type AppBarRootProps, type AppBarSeparatorProps, AppShell, type AppShellAsideProps, type AppShellBarProps, type AppShellBodyProps, type AppShellContentProps, type AppShellNavTriggerProps, type AppShellRootProps, type AppShellScrollerProps, type AppShellSidebarProps, AppWindowFrame, type AppWindowFrameProps, type AskAnswer, AskBox, type AskBoxProps, type AskDanger, type AskKind, type AskOption, AudienceIcon, Autocomplete, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, Band, type BandProps, type BandSeparation, type BandWidth, type BarOverflow, Bento, type BentoColumns, type BentoMinHeight, type BentoRootProps, type BentoRowSpan, type BentoRows, type BentoSpan, type BentoTileProps, type BrandAssetProps, type BrandSize, type BrandTone, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupOrientation, type ButtonGroupProps, type ButtonProps, Card, type CardContentProps, type CardDescriptionProps, type CardFooterProps, type CardHeaderProps, type CardRootProps, type CardTitleProps, CatalogueIcon, ChannelBetaIcon, ChannelReleasedIcon, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, Chip, type ChipProps, CliToolIcon, CodeBlock, type CodeBlockProps, Collapsible, type CollapsiblePanelProps, type CollapsibleRootProps, type CollapsibleTriggerProps, Combobox, type ComboboxOption, type ComboboxProps, CommandPalette, type CommandPaletteItem, type CommandPaletteProps, Composer, type ComposerProps, type ComposerSubmitKey, Container, type ContainerProps, type ContainerWidth, ContextMenu, type ContextMenuContentProps, type ContextMenuRootProps, type ContextMenuTriggerProps, type ControlSize, type ControlVariantProps, CopyButton, type CopyButtonProps, CueLogotype, type CueLogotypeProps, CueMark, type CueMarkProps, CuePortalFrame, type CuePortalFrameProps, DEFAULT_STORAGE_KEY, DEFAULT_STYLE_SET, DataRow, type DataRowDisclosure, type DataRowRootProps, type DataRowSlotProps, DataTree, type DataTreeItem, type DataTreeProps, type DataTreeRowState, DelegationCard, type DelegationCardProps, type DelegationDirection, type DelegationStatus, Density, type DensityEntry, type DensityLevel, type DensityProps, DescriptionList, type DescriptionListDetailProps, type DescriptionListLayout, type DescriptionListRootProps, type DescriptionListTermProps, Dialog, type DialogCloseProps, type DialogContentProps, type DialogDescriptionProps, type DialogFooterProps, type DialogRootProps, type DialogTitleProps, type DialogTriggerProps, Disclosure, type DisclosureProps, Drawer, type DrawerCloseProps, type DrawerContentProps, type DrawerDescriptionProps, type DrawerFooterProps, type DrawerRootProps, type DrawerSwipeDirection, type DrawerTitleProps, type DrawerTriggerProps, DropdownMenu, type DropdownMenuCheckboxItemProps, type DropdownMenuContentProps, type DropdownMenuGroupProps, type DropdownMenuItemProps, type DropdownMenuLabelProps, type DropdownMenuRootProps, type DropdownMenuSeparatorProps, type DropdownMenuTriggerProps, EmptyState, type EmptyStateProps, EnvVarInput, type EnvVarInputProps, Eyebrow, type EyebrowProps, Field, FieldDescription, type FieldDescriptionProps, FieldError, type FieldErrorProps, type FieldIssue, FieldLabel, type FieldLabelProps, type FieldProps, type FilePartition, type FilePartitionOptions, type FileRejectReason, type FileRejection, FileUpload, type FileUploadProps, FolderIcon, type FontEntry, type FontFamilies, type FontName, Footer, type FooterProps, type FormControlSize, Frames, type FramesHeight, type FramesItemProps, type FramesLayout, type FramesRootProps, Grid, type GridColumns, type GridProps, GroupBar, type GroupBarItem, type GroupBarProps, type GroupBarTone, HoverCard, type HoverCardContentProps, type HoverCardRootProps, type HoverCardTriggerProps, IconButton, type IconButtonProps, InfoTip, type InfoTipProps, Input, InputGroup, type InputGroupProps, type InputProps, Inspector, type InspectorFooterProps, type InspectorRootProps, type InspectorRowProps, type InspectorSectionProps, Item, type ItemProps, Kbd, type KbdProps, Ledger, type LedgerEmptyProps, type LedgerGroupProps, type LedgerRootProps, type LedgerTierProps, Link, type LinkProps, McpServerIcon, Menubar, type MenubarContentProps, type MenubarMenuProps, type MenubarRootProps, type MenubarTriggerProps, Message, MessageList, type MessageListProps, type MessageProps, type MessageRole, Meter, type MeterProps, type MeterProvenance, type MeterTone, type Mode, MultiSelect, type MultiSelectProps, NavigationMenu, type NavigationMenuContentProps, type NavigationMenuItemProps, type NavigationMenuLinkProps, type NavigationMenuListProps, type NavigationMenuRootProps, type NavigationMenuTriggerProps, type NavigationMenuViewportProps, NumberField, type NumberFieldProps, OTPField, type OTPFieldProps, OVERLAY_SIDE_OFFSET, PageShell, type PageShellProps, type PageWidth, Pagination, type PaginationEntry, type PaginationProps, Panel, PanelHeader, type PanelHeaderProps, type PanelProps, PasswordInput, type PasswordInputProps, type PersistedPreferences, Plussie, type PlussieExpression, type PlussieProps, Popover, type PopoverCloseProps, type PopoverContentProps, type PopoverDescriptionProps, type PopoverRootProps, type PopoverTitleProps, type PopoverTriggerProps, type PrepaintDefaults, type PrepaintOptions, Preview, type PreviewAxis, type PreviewGround, type PreviewPresentation, type PreviewProps, type PreviewResizeOptions, Progress, type ProgressProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, type RatingSize, type ResolvedMode, Row, type RowProps, STYLE_SETS, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, type ScrollEdges, ScrollableTabsList, type ScrollableTabsListProps, ScrubInput, type ScrubInputProps, SeamCell, type SeamCellProps, SeamGrid, type SeamGridProps, type SeamGround, SeamList, type SeamListProps, SearchInput, type SearchInputProps, SectionHeader, type SectionHeaderProps, SegmentedControl, type SegmentedControlItem, type SegmentedControlProps, type SegmentedControlSize, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Sheet, type SheetCloseProps, type SheetContentProps, type SheetDescriptionProps, type SheetFooterProps, type SheetRootProps, type SheetTitleProps, type SheetTriggerProps, Sidebar, type SidebarItemProps, type SidebarRailProps, type SidebarRootProps, type SidebarSectionProps, Skeleton, type SkeletonProps, SkillIcon, Slider, type SliderProps, type SpaceStep, Sparkline, type SparklineProps, Spinner, type SpinnerProps, Stack, type StackAlign, StackIcon, type StackJustify, type StackProps, StacksMatrixIcon, Stat, type StatProps, type StatTone, StatusBar, type StatusBarGroupProps, type StatusBarItemProps, type StatusBarProminence, type StatusBarProps, type StatusBarTone, StatusDot, type StatusDotProps, type StatusTone, Stepper, type StepperProps, type StepperState, type StepperStep, type StyleSet, Switch, type SwitchProps, TAB_FADE_PX, TREE_GUIDE_GLYPHS, Table, type TableCaptionProps, type TableCellProps, type TableGroupRowProps, type TableHeadProps, type TableRootProps, type TableRowProps, TableScrollRegion, type TableScrollRegionProps, type TableSectionProps, Tabs, type TabsListProps, type TabsPanelProps, type TabsRootProps, type TabsTabProps, TagsInput, type TagsInputProps, TerminalFrame, type TerminalFrameLine, type TerminalFrameProps, type TerminalLine, type TerminalLineTone, type TerminalScript, type TerminalStep, Textarea, type TextareaProps, type ThemeContextValue, type ThemeManifest, type ThemeName, ThemeProvider, type ThemeProviderProps, type ThemeRegistry, Timeline, type TimelineContentProps, type TimelineItemProps, type TimelineMarkerProps, type TimelineRootProps, TitleBar, type TitleBarProps, Toast, type ToastManager, type ToastOptions, type ToastProviderProps, type ToastTone, type ToastViewportProps, Toggle, ToggleGroup, type ToggleGroupProps, type ToggleProps, type TokenOverrides, Toolbar, type ToolbarButtonProps, type ToolbarGroupProps, type ToolbarRootProps, type ToolbarSeparatorProps, Tooltip, type TooltipContentProps, type TooltipProviderProps, type TooltipRootProps, type TooltipTriggerProps, Tree, type TreeGuide, type TreeItem, type TreeProps, type TreeRow, type TreeVisibility, TreeVisibilityToggle, type TreeVisibilityToggleProps, TwoStepButton, type TwoStepButtonProps, type TwoStepTone, type UploadFile, type UploadStatus, UsageChart, type UsageChartPoint, type UsageChartProps, type UsageChartTone, activateRowFromClick, activateRowFromKeyDown, agentColor, agentColorStyle, bareControlClasses, buttonVariants, chipVariants, computeScrollEdges, controlClasses, controlGroupFocusClasses, controlSurface, controlVariants, edgeFadeMask, envReference, flattenTree, isSafeTokenValue, itemVariants, linkVariants, menuItemClasses, menuLabelClasses, menuPopupClasses, menuSeparatorClasses, overlayDescriptionClasses, overlayFooterClasses, overlayModalTransitionClasses, overlayPopupTransitionClasses, overlayPositionerClasses, overlaySurfaceClasses, overlayTextClasses, overlayTitleClasses, paginationRange, parseEnvReference, partitionFiles, prepaintScript, rowVariants, scrimClasses, useControlHeight, useCuePortalProps, useDensities, useDensity, useFonts, useSidebar, useTheme, useThemes, useToast };
|
package/dist/layout/frames.d.ts
CHANGED
|
@@ -29,7 +29,25 @@ interface FramesRootProps extends Omit<React.ComponentPropsWithoutRef<"div">, "c
|
|
|
29
29
|
* listener at all; and the keyboard scrolls the canvas either way.
|
|
30
30
|
*/
|
|
31
31
|
pan?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* How the frames are arranged. Defaults to `"board"`.
|
|
34
|
+
*
|
|
35
|
+
* `"board"` is the original: a short, wide, sideways scroller a reader drags
|
|
36
|
+
* through — right where the frames are a set you *browse*, on a homepage wall
|
|
37
|
+
* or a design surface.
|
|
38
|
+
*
|
|
39
|
+
* `"column"` stacks them one under the next, each at the full width it is
|
|
40
|
+
* given, and the canvas grows to whatever it holds. It exists for the page
|
|
41
|
+
* that *reads*: a documentation page scrolls vertically already, and asking a
|
|
42
|
+
* reader to pan a second axis to reach the fifth variant of a component —
|
|
43
|
+
* with that fifth variant clipped at the board's edge until they do — hides
|
|
44
|
+
* the examples behind an interaction. A column has no fixed height, so
|
|
45
|
+
* `height` is ignored, and nothing pans, so `pan` and `hint` are moot.
|
|
46
|
+
*/
|
|
47
|
+
layout?: FramesLayout;
|
|
32
48
|
}
|
|
49
|
+
/** Whether a canvas browses sideways or reads downwards. */
|
|
50
|
+
type FramesLayout = "board" | "column";
|
|
33
51
|
interface FramesItemProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
34
52
|
/** The specimen. */
|
|
35
53
|
children: React.ReactNode;
|
|
@@ -67,4 +85,4 @@ declare const Frames: {
|
|
|
67
85
|
Item: React.ForwardRefExoticComponent<FramesItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
68
86
|
};
|
|
69
87
|
//#endregion
|
|
70
|
-
export { Frames, FramesHeight, FramesItemProps, FramesRootProps };
|
|
88
|
+
export { Frames, FramesHeight, FramesItemProps, FramesLayout, FramesRootProps };
|
package/dist/layout/frames.js
CHANGED
|
@@ -118,6 +118,18 @@ const ROOT_CLASS = "relative min-w-0 overflow-hidden rounded-(--radius-surface)
|
|
|
118
118
|
* must not be.
|
|
119
119
|
*/
|
|
120
120
|
const CANVAS_CLASS = "flex h-full min-w-0 items-start gap-(--cue-space-8) overflow-x-auto overflow-y-hidden scroll-smooth p-(--cue-space-6) outline-none motion-reduce:scroll-auto focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-2 focus-visible:outline-accent";
|
|
121
|
+
/**
|
|
122
|
+
* The column: the same frames, stacked, sized by what they hold.
|
|
123
|
+
*
|
|
124
|
+
* `overflow-visible` on both axes is the point — the box grows instead of
|
|
125
|
+
* clipping, which is the one thing the board deliberately does not do. No
|
|
126
|
+
* scroller of its own, so the page's scroller is the only one a reader meets.
|
|
127
|
+
* It keeps the focus ring and the keyboard handler: the region is still
|
|
128
|
+
* focusable, and arrow keys still scroll it, they just scroll the page.
|
|
129
|
+
*/
|
|
130
|
+
const COLUMN_CLASS = "flex min-w-0 flex-col gap-(--cue-space-6) p-(--cue-space-6) outline-none focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-2 focus-visible:outline-accent";
|
|
131
|
+
/** A column is sized by its contents, so the box must not hold a height. */
|
|
132
|
+
const COLUMN_ROOT_CLASS = "h-auto";
|
|
121
133
|
/** The affordance, and only where there is something to afford. */
|
|
122
134
|
const PANNABLE_CLASS = "cursor-grab";
|
|
123
135
|
/**
|
|
@@ -143,18 +155,20 @@ const HINT_CLASS = "pointer-events-none absolute right-(--cue-space-4) bottom-(-
|
|
|
143
155
|
* <Preview presentation="frame" label="Tone" count={4}>…</Preview>
|
|
144
156
|
* </Frames.Root>
|
|
145
157
|
*/
|
|
146
|
-
const FramesRoot = React.forwardRef(function FramesRoot({ children, label, height = "short", ground = "dots", hint, pan = true, className, ...elementProps }, ref) {
|
|
158
|
+
const FramesRoot = React.forwardRef(function FramesRoot({ children, label, height = "short", ground = "dots", hint, pan = true, layout = "board", className, ...elementProps }, ref) {
|
|
147
159
|
const drag = React.useRef(null);
|
|
148
160
|
const canvasRef = React.useRef(null);
|
|
149
161
|
const [panning, setPanning] = React.useState(false);
|
|
162
|
+
const column = layout === "column";
|
|
163
|
+
const pans = pan && !column;
|
|
150
164
|
React.useEffect(() => {
|
|
151
|
-
if (
|
|
165
|
+
if (pans) return;
|
|
152
166
|
const started = drag.current;
|
|
153
167
|
if (started === null) return;
|
|
154
168
|
canvasRef.current?.releasePointerCapture?.(started.id);
|
|
155
169
|
drag.current = null;
|
|
156
170
|
setPanning(false);
|
|
157
|
-
}, [
|
|
171
|
+
}, [pans]);
|
|
158
172
|
const scroll = (event) => {
|
|
159
173
|
if (event.defaultPrevented || event.target !== event.currentTarget) return;
|
|
160
174
|
const canvas = event.currentTarget;
|
|
@@ -203,7 +217,7 @@ const FramesRoot = React.forwardRef(function FramesRoot({ children, label, heigh
|
|
|
203
217
|
...elementProps,
|
|
204
218
|
ref,
|
|
205
219
|
"data-slot": "frames",
|
|
206
|
-
className: cn(ROOT_CLASS, HEIGHT_CLASSES[height], GROUND_CLASSES[ground], className),
|
|
220
|
+
className: cn(ROOT_CLASS, column ? COLUMN_ROOT_CLASS : HEIGHT_CLASSES[height], GROUND_CLASSES[ground], className),
|
|
207
221
|
children: [/* @__PURE__ */ jsx("div", {
|
|
208
222
|
ref: canvasRef,
|
|
209
223
|
role: "region",
|
|
@@ -211,11 +225,11 @@ const FramesRoot = React.forwardRef(function FramesRoot({ children, label, heigh
|
|
|
211
225
|
"aria-label": label,
|
|
212
226
|
"data-slot": "frames-canvas",
|
|
213
227
|
"data-panning": panning ? "true" : void 0,
|
|
214
|
-
className: cn(CANVAS_CLASS,
|
|
228
|
+
className: column ? COLUMN_CLASS : cn(CANVAS_CLASS, pans && PANNABLE_CLASS, panning && PANNING_CLASS),
|
|
215
229
|
onKeyDown: scroll,
|
|
216
|
-
...
|
|
230
|
+
...pans ? pointer : {},
|
|
217
231
|
children
|
|
218
|
-
}), hint === void 0 ? null : /* @__PURE__ */ jsx("span", {
|
|
232
|
+
}), hint === void 0 || column ? null : /* @__PURE__ */ jsx("span", {
|
|
219
233
|
"data-slot": "frames-hint",
|
|
220
234
|
className: HINT_CLASS,
|
|
221
235
|
children: hint
|
package/dist/layout/index.d.ts
CHANGED
|
@@ -9,11 +9,11 @@ import { Card, CardContentProps, CardDescriptionProps, CardFooterProps, CardHead
|
|
|
9
9
|
import { Collapsible, CollapsiblePanelProps, CollapsibleRootProps, CollapsibleTriggerProps, Disclosure, DisclosureProps } from "./collapsible.js";
|
|
10
10
|
import { DescriptionList, DescriptionListDetailProps, DescriptionListLayout, DescriptionListRootProps, DescriptionListTermProps } from "./description-list.js";
|
|
11
11
|
import { PreviewGround } from "./_ground.js";
|
|
12
|
-
import { Frames, FramesHeight, FramesItemProps, FramesRootProps } from "./frames.js";
|
|
12
|
+
import { Frames, FramesHeight, FramesItemProps, FramesLayout, FramesRootProps } from "./frames.js";
|
|
13
13
|
import { Grid, GridColumns, GridProps } from "./grid.js";
|
|
14
14
|
import { Item, ItemProps, itemVariants } from "./item.js";
|
|
15
15
|
import { Pagination, PaginationEntry, PaginationProps, paginationRange } from "./pagination.js";
|
|
16
16
|
import { Preview, PreviewAxis, PreviewPresentation, PreviewProps, PreviewResizeOptions } from "./preview.js";
|
|
17
17
|
import { Stepper, StepperProps, StepperState, StepperStep } from "./stepper.js";
|
|
18
18
|
import { Timeline, TimelineContentProps, TimelineItemProps, TimelineMarkerProps, TimelineRootProps } from "./timeline.js";
|
|
19
|
-
export { Accordion, type AccordionHeaderProps, type AccordionItemProps, type AccordionPanelProps, type AccordionRootProps, type AccordionTriggerProps, Bento, type BentoColumns, type BentoMinHeight, type BentoRootProps, type BentoRowSpan, type BentoRows, type BentoSpan, type BentoTileProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Card, type CardContentProps, type CardDescriptionProps, type CardFooterProps, type CardHeaderProps, type CardRootProps, type CardTitleProps, Collapsible, type CollapsiblePanelProps, type CollapsibleRootProps, type CollapsibleTriggerProps, Container, type ContainerProps, type ContainerWidth, DescriptionList, type DescriptionListDetailProps, type DescriptionListLayout, type DescriptionListRootProps, type DescriptionListTermProps, Disclosure, type DisclosureProps, Frames, type FramesHeight, type FramesItemProps, type FramesRootProps, Grid, type GridColumns, type GridProps, Item, type ItemProps, Link, type LinkProps, Pagination, type PaginationEntry, type PaginationProps, Preview, type PreviewAxis, type PreviewGround, type PreviewPresentation, type PreviewProps, type PreviewResizeOptions, Sidebar, type SidebarItemProps, type SidebarRailProps, type SidebarRootProps, type SidebarSectionProps, type SpaceStep, Stack, type StackAlign, type StackJustify, type StackProps, Stepper, type StepperProps, type StepperState, type StepperStep, Timeline, type TimelineContentProps, type TimelineItemProps, type TimelineMarkerProps, type TimelineRootProps, itemVariants, linkVariants, paginationRange, useSidebar };
|
|
19
|
+
export { Accordion, type AccordionHeaderProps, type AccordionItemProps, type AccordionPanelProps, type AccordionRootProps, type AccordionTriggerProps, Bento, type BentoColumns, type BentoMinHeight, type BentoRootProps, type BentoRowSpan, type BentoRows, type BentoSpan, type BentoTileProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Card, type CardContentProps, type CardDescriptionProps, type CardFooterProps, type CardHeaderProps, type CardRootProps, type CardTitleProps, Collapsible, type CollapsiblePanelProps, type CollapsibleRootProps, type CollapsibleTriggerProps, Container, type ContainerProps, type ContainerWidth, DescriptionList, type DescriptionListDetailProps, type DescriptionListLayout, type DescriptionListRootProps, type DescriptionListTermProps, Disclosure, type DisclosureProps, Frames, type FramesHeight, type FramesItemProps, type FramesLayout, type FramesRootProps, Grid, type GridColumns, type GridProps, Item, type ItemProps, Link, type LinkProps, Pagination, type PaginationEntry, type PaginationProps, Preview, type PreviewAxis, type PreviewGround, type PreviewPresentation, type PreviewProps, type PreviewResizeOptions, Sidebar, type SidebarItemProps, type SidebarRailProps, type SidebarRootProps, type SidebarSectionProps, type SpaceStep, Stack, type StackAlign, type StackJustify, type StackProps, Stepper, type StepperProps, type StepperState, type StepperStep, Timeline, type TimelineContentProps, type TimelineItemProps, type TimelineMarkerProps, type TimelineRootProps, itemVariants, linkVariants, paginationRange, useSidebar };
|
|
@@ -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?: "
|
|
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;
|
|
@@ -236,6 +236,51 @@ interface ThemeProviderProps {
|
|
|
236
236
|
storageKey?: string;
|
|
237
237
|
/** Restore and write root preferences in localStorage. Defaults to `true`. */
|
|
238
238
|
persistPreferences?: boolean;
|
|
239
|
+
/**
|
|
240
|
+
* The Content-Security-Policy nonce for every `<style>` element this tree
|
|
241
|
+
* renders — this library's and Base UI's.
|
|
242
|
+
*
|
|
243
|
+
* When `overrides.densities` is set this provider emits one `<style>`
|
|
244
|
+
* element (see {@link ThemeProviderProps.overrides}). Under a policy of
|
|
245
|
+
* `style-src-elem 'self' 'nonce-<per-request>'` the browser refuses that
|
|
246
|
+
* element on every page load, because an element React renders on the client
|
|
247
|
+
* cannot pick up a server nonce by itself. Pass the request's nonce here and
|
|
248
|
+
* it is set on the element.
|
|
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
|
+
*
|
|
259
|
+
* `prepaintScript()` returns a *string* the application renders in a
|
|
260
|
+
* `<script>` of its own — so the application already controls that element's
|
|
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.
|
|
275
|
+
*
|
|
276
|
+
* **A nonce cannot rescue a style ATTRIBUTE**, and this provider always sets
|
|
277
|
+
* one on its root: `color-scheme` and `--cue-font-scale`, plus the font
|
|
278
|
+
* families and overrides where they are given. CSP has no nonce form for
|
|
279
|
+
* `style-src-attr` — it is `'unsafe-inline'` or `'none'` — so an application
|
|
280
|
+
* serving `style-src-attr 'none'` loses those declarations, silently. That is
|
|
281
|
+
* a policy decision rather than something this prop can change.
|
|
282
|
+
*/
|
|
283
|
+
nonce?: string;
|
|
239
284
|
/** Stamp the single child element instead of rendering a wrapper `<div>`. */
|
|
240
285
|
asChild?: boolean;
|
|
241
286
|
/** Extra classes for the provider root. */
|
|
@@ -285,6 +330,6 @@ interface ThemeProviderProps {
|
|
|
285
330
|
* <App />
|
|
286
331
|
* </ThemeProvider>
|
|
287
332
|
*/
|
|
288
|
-
declare function ThemeProvider({ themes: themesProp, theme: themeProp, density: densityProp, mode: modeProp, font: fontProp, styleSet: styleSetProp, fontScale, fontFamilies, overrides, storageKey, persistPreferences, asChild, className, style: styleProp, children }: ThemeProviderProps): React.JSX.Element;
|
|
333
|
+
declare function ThemeProvider({ themes: themesProp, theme: themeProp, density: densityProp, mode: modeProp, font: fontProp, styleSet: styleSetProp, fontScale, fontFamilies, overrides, storageKey, persistPreferences, nonce, asChild, className, style: styleProp, children }: ThemeProviderProps): React.JSX.Element;
|
|
289
334
|
//#endregion
|
|
290
335
|
export { FontFamilies, ResolvedMode, ThemeContextValue, ThemeProvider, ThemeProviderProps };
|