@cueplusplus/ui 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +457 -0
- package/README.md +131 -0
- package/dist/chat/message-list.js +2 -1
- package/dist/configurator/_export.d.ts +1 -1
- package/dist/configurator/_export.js +53 -13
- package/dist/configurator/_overrides.d.ts +25 -6
- package/dist/configurator/_overrides.js +30 -17
- package/dist/configurator/configurator.js +8 -3
- package/dist/configurator/panel-sections.js +43 -13
- package/dist/elements/command-palette.js +1 -1
- package/dist/elements/flow-graph.js +2 -2
- package/dist/elements/markdown.js +1 -1
- package/dist/elements/surfaces.js +4 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +5 -2
- package/dist/instruments/meter.d.ts +5 -1
- package/dist/layout/bento.d.ts +144 -0
- package/dist/layout/bento.js +266 -0
- package/dist/layout/index.d.ts +3 -2
- package/dist/layout/index.js +3 -2
- package/dist/midi/piano-keyboard.js +5 -1
- package/dist/primitives/button.d.ts +12 -0
- package/dist/styles.css +23 -1
- package/dist/system/density.d.ts +17 -8
- package/dist/system/density.js +39 -16
- package/dist/system/index.d.ts +5 -2
- package/dist/system/index.js +3 -1
- package/dist/system/overrides.d.ts +80 -0
- package/dist/system/overrides.js +277 -0
- package/dist/system/portal.d.ts +4 -2
- package/dist/system/portal.js +34 -3
- package/dist/system/prepaint.d.ts +58 -7
- package/dist/system/prepaint.js +72 -20
- package/dist/system/theme-provider.d.ts +133 -8
- package/dist/system/theme-provider.js +203 -72
- package/dist/system/theme-registry.d.ts +53 -0
- package/dist/system/theme-registry.js +66 -0
- package/dist/system/use-density.d.ts +13 -5
- package/dist/system/use-density.js +142 -13
- package/dist/system/use-theme.d.ts +5 -3
- package/dist/system/use-theme.js +5 -3
- package/dist/system/vocabulary.d.ts +15 -0
- package/dist/system/vocabulary.js +111 -0
- package/dist/theming/contrast.d.ts +2 -122
- package/dist/theming/contrast.js +2 -194
- package/dist/theming/create-theme.d.ts +37 -11
- package/dist/theming/create-theme.js +54 -17
- package/dist/theming/index.d.ts +3 -4
- package/dist/theming/index.js +3 -4
- package/dist/theming/serialize.d.ts +24 -11
- package/dist/theming/serialize.js +16 -18
- package/manifest/components/accordion.json +24 -6
- package/manifest/components/activity-graph.json +20 -5
- package/manifest/components/agent-card.json +37 -9
- package/manifest/components/agent-handoff.json +21 -5
- package/manifest/components/agent-mode-badge.json +22 -4
- package/manifest/components/agent-pile.json +38 -8
- package/manifest/components/agent-plan.json +9 -2
- package/manifest/components/agent-status.json +17 -3
- package/manifest/components/agent-surface.json +26 -11
- package/manifest/components/alert-dialog.json +29 -5
- package/manifest/components/animated-number.json +14 -6
- package/manifest/components/app-bar.json +66 -13
- package/manifest/components/app-shell.json +133 -31
- package/manifest/components/app-window-frame.json +28 -6
- package/manifest/components/approval-card.json +37 -7
- package/manifest/components/artifact-card.json +16 -4
- package/manifest/components/ask-box.json +99 -21
- package/manifest/components/audience-icon.json +1 -7
- package/manifest/components/autocomplete.json +80 -18
- package/manifest/components/avatar-group.json +13 -2
- package/manifest/components/avatar.json +22 -4
- package/manifest/components/background-inbox.json +9 -2
- package/manifest/components/bento.json +306 -0
- package/manifest/components/branch-picker.json +29 -7
- package/manifest/components/breadcrumb.json +13 -3
- package/manifest/components/button-group.json +21 -4
- package/manifest/components/button.json +41 -4
- package/manifest/components/canvas-split-body.json +4 -1
- package/manifest/components/canvas-split-header.json +17 -4
- package/manifest/components/canvas-split-line.json +4 -1
- package/manifest/components/canvas-split-message.json +8 -1
- package/manifest/components/card.json +14 -3
- package/manifest/components/carousel.json +54 -12
- package/manifest/components/catalogue-icon.json +1 -7
- package/manifest/components/channel-beta-icon.json +1 -7
- package/manifest/components/channel-matrix.json +80 -15
- package/manifest/components/channel-released-icon.json +1 -7
- package/manifest/components/chart-container.json +26 -10
- package/manifest/components/chart-ramp.json +13 -3
- package/manifest/components/chart-swatch.json +9 -2
- package/manifest/components/chart-tooltip-content.json +31 -7
- package/manifest/components/chart.json +30 -6
- package/manifest/components/chat-panel-composer.json +9 -2
- package/manifest/components/checkbox-group.json +4 -2
- package/manifest/components/checkbox.json +17 -4
- package/manifest/components/checkpoint-history.json +13 -3
- package/manifest/components/chip.json +35 -5
- package/manifest/components/clamp.json +30 -7
- package/manifest/components/cli-tool-icon.json +1 -7
- package/manifest/components/code-diff.json +20 -5
- package/manifest/components/code-runner.json +32 -6
- package/manifest/components/collapsible.json +16 -4
- package/manifest/components/color-area.json +4 -1
- package/manifest/components/color-field.json +13 -3
- package/manifest/components/color-picker.json +75 -17
- package/manifest/components/color-slider.json +12 -3
- package/manifest/components/color-swatch.json +13 -2
- package/manifest/components/colors-section.json +10 -7
- package/manifest/components/combobox.json +81 -18
- package/manifest/components/command-palette.json +57 -13
- package/manifest/components/compaction-row.json +35 -7
- package/manifest/components/comparison-card.json +17 -4
- package/manifest/components/composer-attachment-chip.json +9 -2
- package/manifest/components/composer-bar.json +4 -1
- package/manifest/components/composer-command-item.json +8 -2
- package/manifest/components/composer-context.json +4 -1
- package/manifest/components/composer-input.json +5 -1
- package/manifest/components/composer-menu-item.json +4 -1
- package/manifest/components/composer-menu.json +12 -2
- package/manifest/components/composer-model-item.json +8 -2
- package/manifest/components/composer-model-trigger.json +8 -2
- package/manifest/components/composer-person-item.json +8 -2
- package/manifest/components/composer-send.json +8 -2
- package/manifest/components/composer-voice-button.json +4 -1
- package/manifest/components/composer-voice.json +8 -2
- package/manifest/components/composer.json +76 -17
- package/manifest/components/computer-use.json +17 -4
- package/manifest/components/confidence-marker.json +13 -3
- package/manifest/components/connection-state.json +23 -4
- package/manifest/components/container.json +14 -2
- package/manifest/components/context-breakdown.json +8 -2
- package/manifest/components/context-menu.json +16 -4
- package/manifest/components/context-usage.json +16 -4
- package/manifest/components/conversation-search.json +22 -5
- package/manifest/components/copy-button.json +32 -7
- package/manifest/components/cost-meter.json +12 -3
- package/manifest/components/cue-logotype.json +17 -3
- package/manifest/components/cue-mark.json +17 -3
- package/manifest/components/cue-portal-frame.json +14 -4
- package/manifest/components/data-row.json +21 -7
- package/manifest/components/data-table-pagination.json +18 -4
- package/manifest/components/data-table-toolbar.json +30 -7
- package/manifest/components/data-tree.json +42 -9
- package/manifest/components/date-field.json +13 -2
- package/manifest/components/date-picker.json +81 -19
- package/manifest/components/date-range-picker.json +81 -19
- package/manifest/components/day-separator.json +4 -1
- package/manifest/components/delegation-card.json +64 -12
- package/manifest/components/density.json +25 -5
- package/manifest/components/description-list.json +8 -1
- package/manifest/components/diagram.json +33 -7
- package/manifest/components/dialog.json +29 -6
- package/manifest/components/disclosure.json +31 -7
- package/manifest/components/dmx-bar.json +16 -4
- package/manifest/components/dmx-strip.json +20 -5
- package/manifest/components/document-reference.json +21 -5
- package/manifest/components/draft-restore.json +18 -4
- package/manifest/components/drawer.json +30 -6
- package/manifest/components/dropdown-menu.json +55 -10
- package/manifest/components/edit-message.json +32 -7
- package/manifest/components/elements-command-palette.json +27 -6
- package/manifest/components/elements-data-table.json +9 -2
- package/manifest/components/elements-timeline.json +8 -2
- package/manifest/components/elicitation-form.json +31 -6
- package/manifest/components/empty-state-composer.json +9 -2
- package/manifest/components/empty-state-suggestion.json +4 -1
- package/manifest/components/empty-state.json +25 -5
- package/manifest/components/end-of-turn-summary.json +16 -4
- package/manifest/components/env-var-input.json +54 -12
- package/manifest/components/error-state.json +17 -4
- package/manifest/components/export-dialog.json +27 -11
- package/manifest/components/eyebrow.json +4 -1
- package/manifest/components/feedback-dialog.json +33 -7
- package/manifest/components/field-description.json +4 -1
- package/manifest/components/field-error.json +13 -3
- package/manifest/components/field-label.json +4 -1
- package/manifest/components/field.json +4 -1
- package/manifest/components/file-tree.json +16 -4
- package/manifest/components/file-upload.json +58 -13
- package/manifest/components/flow-graph.json +12 -3
- package/manifest/components/folder-icon.json +1 -7
- package/manifest/components/footer.json +24 -4
- package/manifest/components/frac.json +10 -2
- package/manifest/components/generation-loader.json +17 -3
- package/manifest/components/generative-ui.json +39 -7
- package/manifest/components/grid.json +56 -5
- package/manifest/components/group-bar.json +25 -6
- package/manifest/components/guardrail-notice.json +22 -5
- package/manifest/components/hover-card.json +45 -8
- package/manifest/components/icon-button.json +22 -4
- package/manifest/components/image-generation.json +8 -2
- package/manifest/components/info-tip.json +42 -7
- package/manifest/components/inline-citation.json +14 -3
- package/manifest/components/input-group.json +24 -5
- package/manifest/components/input.json +13 -3
- package/manifest/components/item.json +42 -8
- package/manifest/components/job-progress.json +25 -6
- package/manifest/components/launcher-bubble.json +32 -7
- package/manifest/components/ledger.json +87 -19
- package/manifest/components/link.json +16 -3
- package/manifest/components/live-region-announcer.json +21 -5
- package/manifest/components/log-viewer.json +42 -10
- package/manifest/components/map-answer.json +17 -4
- package/manifest/components/markdown-text.json +36 -5
- package/manifest/components/math-block.json +12 -3
- package/manifest/components/mcp-server-icon.json +1 -7
- package/manifest/components/mcp-server-panel.json +18 -4
- package/manifest/components/memory-chips.json +9 -2
- package/manifest/components/menubar.json +33 -7
- package/manifest/components/message-actions.json +32 -7
- package/manifest/components/message-attachments.json +9 -2
- package/manifest/components/message-branches.json +14 -3
- package/manifest/components/message-list.json +27 -6
- package/manifest/components/message-pair.json +25 -5
- package/manifest/components/message-queue.json +13 -3
- package/manifest/components/message-timing.json +8 -2
- package/manifest/components/message.json +41 -9
- package/manifest/components/meter.json +43 -7
- package/manifest/components/mobile-composer.json +47 -10
- package/manifest/components/model-picker.json +13 -3
- package/manifest/components/multi-select.json +78 -17
- package/manifest/components/musical-time-input.json +34 -8
- package/manifest/components/navigation-menu.json +54 -12
- package/manifest/components/node-card.json +42 -7
- package/manifest/components/node-handle.json +17 -2
- package/manifest/components/number-field.json +28 -6
- package/manifest/components/number-ticker.json +8 -2
- package/manifest/components/onboarding.json +18 -4
- package/manifest/components/otp-field.json +43 -10
- package/manifest/components/page-shell.json +35 -6
- package/manifest/components/pagination.json +21 -5
- package/manifest/components/panel-header.json +15 -3
- package/manifest/components/password-input.json +38 -8
- package/manifest/components/permission-grant.json +28 -5
- package/manifest/components/permission-scopes.json +57 -12
- package/manifest/components/piano-keyboard.json +38 -9
- package/manifest/components/plussie.json +34 -5
- package/manifest/components/popover.json +45 -8
- package/manifest/components/preset-section.json +14 -8
- package/manifest/components/progress.json +25 -6
- package/manifest/components/prompt-library.json +27 -6
- package/manifest/components/queue-dock.json +36 -8
- package/manifest/components/quota-banner.json +25 -6
- package/manifest/components/quote-reply.json +29 -7
- package/manifest/components/radio-group.json +12 -2
- package/manifest/components/radio.json +17 -3
- package/manifest/components/rating.json +60 -13
- package/manifest/components/read-aloud.json +35 -8
- package/manifest/components/reasoning-effort.json +17 -4
- package/manifest/components/reasoning-panel.json +33 -8
- package/manifest/components/recommendation-card.json +35 -10
- package/manifest/components/regenerate-menu.json +22 -5
- package/manifest/components/replay-player.json +29 -7
- package/manifest/components/research-report.json +12 -3
- package/manifest/components/resizable.json +4 -1
- package/manifest/components/retrieval-chunks.json +16 -4
- package/manifest/components/revert-dock.json +61 -14
- package/manifest/components/reviewable-diff.json +23 -5
- package/manifest/components/risk-badge.json +18 -3
- package/manifest/components/row.json +17 -4
- package/manifest/components/schedule-card.json +25 -6
- package/manifest/components/score-breakdown.json +20 -5
- package/manifest/components/scroll-anchor.json +13 -3
- package/manifest/components/scroll-area.json +31 -8
- package/manifest/components/scrollable-tabs-list.json +12 -4
- package/manifest/components/scrub-input.json +84 -18
- package/manifest/components/seam-cell.json +19 -3
- package/manifest/components/seam-grid.json +12 -3
- package/manifest/components/search-input.json +49 -10
- package/manifest/components/section-header.json +36 -8
- package/manifest/components/segmented-control.json +50 -11
- package/manifest/components/select.json +74 -16
- package/manifest/components/separator.json +4 -1
- package/manifest/components/settings-panel.json +41 -9
- package/manifest/components/shape-section.json +10 -7
- package/manifest/components/shared-conversation.json +21 -5
- package/manifest/components/sheet.json +29 -6
- package/manifest/components/shimmer-label.json +4 -2
- package/manifest/components/sidebar.json +60 -13
- package/manifest/components/skill-icon.json +1 -7
- package/manifest/components/slider.json +22 -5
- package/manifest/components/sources.json +17 -4
- package/manifest/components/sparkline.json +17 -4
- package/manifest/components/speaker-identity.json +4 -1
- package/manifest/components/spec-sheet.json +16 -4
- package/manifest/components/spectrum-visualizer.json +41 -10
- package/manifest/components/spinner.json +12 -2
- package/manifest/components/stack-icon.json +1 -7
- package/manifest/components/stack.json +54 -7
- package/manifest/components/stacks-matrix-icon.json +1 -7
- package/manifest/components/stat.json +28 -4
- package/manifest/components/status-bar.json +50 -9
- package/manifest/components/status-dot.json +23 -4
- package/manifest/components/stepper.json +22 -5
- package/manifest/components/stopped-run.json +19 -4
- package/manifest/components/streaming-text.json +12 -3
- package/manifest/components/subagent-list.json +21 -5
- package/manifest/components/suggestions.json +27 -5
- package/manifest/components/swap-label.json +18 -4
- package/manifest/components/switch.json +18 -3
- package/manifest/components/table-scroll-region.json +4 -1
- package/manifest/components/table.json +54 -11
- package/manifest/components/tabs.json +16 -5
- package/manifest/components/tags-input.json +79 -17
- package/manifest/components/tail-status.json +37 -8
- package/manifest/components/terminal-block.json +25 -5
- package/manifest/components/terminal-frame.json +34 -8
- package/manifest/components/textarea.json +8 -3
- package/manifest/components/theme-configurator.json +47 -14
- package/manifest/components/theme-provider.json +97 -18
- package/manifest/components/thinking-indicator.json +8 -2
- package/manifest/components/thread-list.json +13 -3
- package/manifest/components/thread-search.json +22 -5
- package/manifest/components/threshold-rail.json +77 -14
- package/manifest/components/time-boundary.json +8 -2
- package/manifest/components/time-field.json +13 -2
- package/manifest/components/timeline-ruler.json +51 -12
- package/manifest/components/timeline.json +19 -3
- package/manifest/components/title-bar.json +19 -4
- package/manifest/components/toast.json +12 -3
- package/manifest/components/todo-list.json +8 -2
- package/manifest/components/toggle-group.json +33 -7
- package/manifest/components/toggle.json +23 -4
- package/manifest/components/token-editor.json +26 -10
- package/manifest/components/tool-call-card.json +83 -16
- package/manifest/components/tool-call.json +37 -9
- package/manifest/components/tool-error.json +34 -8
- package/manifest/components/tool-group.json +17 -4
- package/manifest/components/tool-timeline.json +37 -9
- package/manifest/components/toolbar.json +37 -8
- package/manifest/components/tooltip.json +41 -7
- package/manifest/components/trace-waterfall.json +12 -3
- package/manifest/components/tree-visibility-toggle.json +18 -3
- package/manifest/components/tree.json +52 -11
- package/manifest/components/turn-footer.json +36 -8
- package/manifest/components/two-step-button.json +46 -9
- package/manifest/components/typing-indicator.json +8 -1
- package/manifest/components/universe-grid.json +37 -10
- package/manifest/components/unread-divider.json +4 -1
- package/manifest/components/usage-chart.json +46 -9
- package/manifest/components/verdict-row.json +20 -5
- package/manifest/components/voice-conversation.json +37 -7
- package/manifest/components/web-preview.json +23 -5
- package/manifest/components/web-search.json +20 -5
- package/manifest/components/work-collapse.json +30 -7
- package/manifest/fixtures.json +106 -0
- package/manifest/manifest.json +449 -310
- package/manifest/tokens.json +122 -12
- package/package.json +16 -6
- package/dist/theming/_presets.d.ts +0 -11
- package/dist/theming/_presets.js +0 -678
|
@@ -43,7 +43,7 @@ const DTCG_ALIASES = { density: "density-factor" };
|
|
|
43
43
|
* @param name - What the user typed, if anything.
|
|
44
44
|
* @returns A usable CSS identifier.
|
|
45
45
|
* @example
|
|
46
|
-
* exportName({ theme: "terminal", mode: "dark" }); // → "terminal-custom"
|
|
46
|
+
* exportName({ theme: "terminal", mode: "dark", manifest: terminal }); // → "terminal-custom"
|
|
47
47
|
*/
|
|
48
48
|
function exportName(scope, name) {
|
|
49
49
|
const proposed = name?.trim() ?? "";
|
|
@@ -51,13 +51,22 @@ function exportName(scope, name) {
|
|
|
51
51
|
}
|
|
52
52
|
/** A JSON string, printed the way a hand-written source file would print it. */
|
|
53
53
|
const json = (value) => `${JSON.stringify(value, null, 2)}\n`;
|
|
54
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* Both modes of a scope, so an export can carry the palette the user is not
|
|
56
|
+
* looking at.
|
|
57
|
+
*
|
|
58
|
+
* Spread rather than rebuilt: a fresh literal would have to restate `manifest`,
|
|
59
|
+
* and the shape of that mistake is a `null` that resolves the off-mode palette
|
|
60
|
+
* to the blank base — so the `dtcg` and `registry` exports would carry the right
|
|
61
|
+
* colours for the mode on screen and the neutral ramp for the other one, with
|
|
62
|
+
* nothing to see until somebody installed the theme.
|
|
63
|
+
*/
|
|
55
64
|
function bothModes(scope) {
|
|
56
65
|
return [{
|
|
57
|
-
|
|
66
|
+
...scope,
|
|
58
67
|
mode: "dark"
|
|
59
68
|
}, {
|
|
60
|
-
|
|
69
|
+
...scope,
|
|
61
70
|
mode: "light"
|
|
62
71
|
}];
|
|
63
72
|
}
|
|
@@ -71,8 +80,11 @@ function movedTokens(overrides, scope, kind) {
|
|
|
71
80
|
* ② The DTCG token file.
|
|
72
81
|
*
|
|
73
82
|
* A whole theme rather than a diff: the point of this format is that the result
|
|
74
|
-
* can be dropped into `
|
|
75
|
-
*
|
|
83
|
+
* can be dropped into a theme package's `src/` — `cue-theme init` scaffolds one,
|
|
84
|
+
* and `packages/theme-<name>/src/<name>.dark.tokens.json` is the shape — or into
|
|
85
|
+
* anyone else's DTCG pipeline, and built, which a patch file cannot. (It used to
|
|
86
|
+
* say `packages/tokens/src/themes/`; that directory is gone, and a palette is a
|
|
87
|
+
* package now.) Groups follow the sources —
|
|
76
88
|
* `color` for the palette, `type` for the stacks, `density` for the multipliers
|
|
77
89
|
* — and appear only when they carry something.
|
|
78
90
|
*/
|
|
@@ -121,9 +133,25 @@ function dtcgFile(overrides, scope, name) {
|
|
|
121
133
|
function quote(value) {
|
|
122
134
|
return value.includes("\"") && !value.includes("'") && !value.includes("\\") ? `'${value}'` : JSON.stringify(value);
|
|
123
135
|
}
|
|
136
|
+
/** What a JavaScript binding may be called, and what a printed key may go unquoted as. */
|
|
137
|
+
const IDENTIFIER = /^[A-Za-z_$][\w$]*$/;
|
|
124
138
|
/** One `key: "value"` line of an object literal, quoting the key only when it must. */
|
|
125
139
|
function property(key, value, indent) {
|
|
126
|
-
return `${indent}${
|
|
140
|
+
return `${indent}${IDENTIFIER.test(key) ? key : JSON.stringify(key)}: ${quote(value)},`;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* What to call the imported base manifest in the snippet.
|
|
144
|
+
*
|
|
145
|
+
* The theme's own name where that is a legal binding — `terminal` reads as what
|
|
146
|
+
* it is — and `base` where it is not (a theme may be called `acme-dark`, which
|
|
147
|
+
* is a fine `data-theme` value and not an identifier). The suffix exists for the
|
|
148
|
+
* one collision this can produce: a user who names their export exactly what the
|
|
149
|
+
* base theme is called would otherwise get `const terminal = createTheme({ base:
|
|
150
|
+
* terminal })`, which is a snippet that does not run.
|
|
151
|
+
*/
|
|
152
|
+
function baseIdentifier(theme, exported) {
|
|
153
|
+
const proposed = IDENTIFIER.test(theme) ? theme : "base";
|
|
154
|
+
return proposed === exported ? `${proposed}Base` : proposed;
|
|
127
155
|
}
|
|
128
156
|
/**
|
|
129
157
|
* ③ The `createTheme()` call.
|
|
@@ -134,7 +162,17 @@ function property(key, value, indent) {
|
|
|
134
162
|
* a snippet that quietly loses half an edit is worse than no snippet.
|
|
135
163
|
*/
|
|
136
164
|
function createThemeSnippet(overrides, scope, name) {
|
|
137
|
-
const
|
|
165
|
+
const exported = IDENTIFIER.test(name) ? name : "theme";
|
|
166
|
+
const base = scope.manifest;
|
|
167
|
+
let baseImport = null;
|
|
168
|
+
let baseAnchor = null;
|
|
169
|
+
if (base !== null) {
|
|
170
|
+
const ident = baseIdentifier(scope.theme, exported);
|
|
171
|
+
baseImport = `import ${ident} from ${JSON.stringify(base.package)};`;
|
|
172
|
+
baseAnchor = ` base: ${ident},`;
|
|
173
|
+
}
|
|
174
|
+
const lines = [` name: ${JSON.stringify(name)},`];
|
|
175
|
+
if (baseAnchor !== null) lines.push(baseAnchor);
|
|
138
176
|
const unrepresentable = [];
|
|
139
177
|
for (const [anchor, token] of DIRECT_ANCHORS) if (isOverridden(overrides, scope, token)) lines.push(property(anchor, resolveValue(overrides, scope, token), " "));
|
|
140
178
|
const surfaces = SURFACE_ANCHORS.filter((token) => isOverridden(overrides, scope, token));
|
|
@@ -167,17 +205,19 @@ function createThemeSnippet(overrides, scope, name) {
|
|
|
167
205
|
if (anchored.has(moved)) continue;
|
|
168
206
|
unrepresentable.push(`${moved}: ${resolveValue(overrides, scope, moved)}`);
|
|
169
207
|
}
|
|
170
|
-
const
|
|
208
|
+
const notes = [];
|
|
209
|
+
if (base === null) notes.push(`// no manifest is registered for "${scope.theme}"; this call starts from the blank base.`);
|
|
210
|
+
if (unrepresentable.length > 0) notes.push("// createTheme() derives these rather than taking them as anchors, so they are not", "// in the call above. Ship the CSS export alongside it — that one is lossless.", ...unrepresentable.map((entry) => `// ${entry}`));
|
|
211
|
+
const footer = notes.length === 0 ? "" : [
|
|
171
212
|
"",
|
|
172
|
-
|
|
173
|
-
"// in the call above. Ship the CSS export alongside it — that one is lossless.",
|
|
174
|
-
...unrepresentable.map((entry) => `// ${entry}`),
|
|
213
|
+
...notes,
|
|
175
214
|
""
|
|
176
215
|
].join("\n");
|
|
177
216
|
return [
|
|
178
217
|
"import { createTheme } from \"@cueplusplus/ui/theming\";",
|
|
218
|
+
...baseImport === null ? [] : [baseImport],
|
|
179
219
|
"",
|
|
180
|
-
`export const ${
|
|
220
|
+
`export const ${exported} = createTheme({`,
|
|
181
221
|
...lines,
|
|
182
222
|
"});",
|
|
183
223
|
footer
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ResolvedMode } from "../system/theme-provider.js";
|
|
2
|
-
import { Density
|
|
2
|
+
import { Density } from "@cueplusplus/tokens";
|
|
3
|
+
import { ThemeManifest, ThemeName } from "@cueplusplus/theme-base";
|
|
3
4
|
//#region src/configurator/_overrides.d.ts
|
|
4
5
|
/**
|
|
5
6
|
* The override model behind the theme configurator: what a user may move, where
|
|
@@ -68,6 +69,18 @@ interface ThemeScope {
|
|
|
68
69
|
theme: ThemeName;
|
|
69
70
|
/** The mode as resolved — `"system"` never reaches here. */
|
|
70
71
|
mode: ResolvedMode;
|
|
72
|
+
/**
|
|
73
|
+
* The active theme's manifest, or `null` for the blank base.
|
|
74
|
+
*
|
|
75
|
+
* Required, not optional, and that is the point. {@link baseValue} branches on
|
|
76
|
+
* `manifest === null` to mean *the blank base*; an absent field would take
|
|
77
|
+
* that branch by accident, and normalising `undefined` to `null` would make
|
|
78
|
+
* every caller that has not been updated resolve blank-base colours under a
|
|
79
|
+
* name that is not the blank base — silently, and only visibly wrong to
|
|
80
|
+
* somebody comparing swatches. A compile error naming the property is the
|
|
81
|
+
* right way for a stale caller to find out. Pass `useTheme().manifest`.
|
|
82
|
+
*/
|
|
83
|
+
manifest: ThemeManifest | null;
|
|
71
84
|
}
|
|
72
85
|
/** Every override the user has made, ready to serialize. Treat as immutable. */
|
|
73
86
|
interface ThemeOverrides {
|
|
@@ -117,15 +130,21 @@ declare function isSafeCssValue(value: string): boolean;
|
|
|
117
130
|
/**
|
|
118
131
|
* The value a token has before the user touches anything.
|
|
119
132
|
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
133
|
+
* Everything a theme actually declares comes from `theme-base`'s `resolve()`,
|
|
134
|
+
* which is the one implementation of the layering rule — the theme's block for
|
|
135
|
+
* this mode, the theme's own font override under the base stack — so the panel
|
|
136
|
+
* and the runtime cannot disagree about what "shipped" means. A `null` manifest
|
|
137
|
+
* is the blank base, which resolves to the neutral ramp rather than to nothing:
|
|
138
|
+
* every scope answers, including one naming a theme no manifest was passed for.
|
|
139
|
+
* The multipliers are 1 by definition, because what the panel edits is the
|
|
140
|
+
* multiplier and not the ladder underneath it.
|
|
123
141
|
*
|
|
124
|
-
* @param scope - Theme and
|
|
142
|
+
* @param scope - Theme, mode and manifest being edited.
|
|
125
143
|
* @param token - A bare token name or a `--cue-*` property.
|
|
126
144
|
* @returns The shipped value, as a CSS string.
|
|
127
145
|
* @example
|
|
128
|
-
* baseValue({ theme: "terminal", mode: "dark" }, "accent");
|
|
146
|
+
* baseValue({ theme: "terminal", mode: "dark", manifest: terminal }, "accent");
|
|
147
|
+
* // → "hsl(180 100% 50%)"
|
|
129
148
|
*/
|
|
130
149
|
declare function baseValue(scope: ThemeScope, token: string): string;
|
|
131
150
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { THEME_NAME_PATTERN as THEME_NAME_PATTERN$1, assertCssValue, serializeSystemModeAliases, serializeThemeBlock, tokenProperty } from "../theming/serialize.js";
|
|
2
|
+
import { DEFAULT_DENSITY_LEVEL, DENSITY_RADIUS_SCALE, THEME_COLOR_TOKENS } from "../theming/create-theme.js";
|
|
3
|
+
import { resolve } from "@cueplusplus/theme-base";
|
|
3
4
|
//#region src/configurator/_overrides.ts
|
|
4
5
|
/**
|
|
5
6
|
* The override model behind the theme configurator: what a user may move, where
|
|
@@ -55,11 +56,10 @@ const OVERRIDE_BANNER = "@cueplusplus/ui — theme configurator overrides";
|
|
|
55
56
|
/**
|
|
56
57
|
* The unitless density multiplier each level publishes.
|
|
57
58
|
*
|
|
58
|
-
* A copy of `packages/tokens/src/density/*.tokens.json
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* the first number that has drifted.
|
|
59
|
+
* A copy of `packages/tokens/src/density/*.tokens.json`: the tokens package
|
|
60
|
+
* emits CSS, and a value this module has to *multiply* cannot be read out of a
|
|
61
|
+
* stylesheet. `test/configurator/overrides.test.ts` re-reads the DTCG sources
|
|
62
|
+
* and fails on the first number that has drifted.
|
|
63
63
|
*/
|
|
64
64
|
const DENSITY_FACTOR = {
|
|
65
65
|
"ultra-compact": .85,
|
|
@@ -120,13 +120,21 @@ function tokenKind(token) {
|
|
|
120
120
|
function scopeKey(scope) {
|
|
121
121
|
return `${scope.theme}/${scope.mode}`;
|
|
122
122
|
}
|
|
123
|
-
/**
|
|
123
|
+
/**
|
|
124
|
+
* The inverse of {@link scopeKey}, rejecting anything that would not be safe in
|
|
125
|
+
* a selector.
|
|
126
|
+
*
|
|
127
|
+
* A bare `{ theme, mode }` rather than a {@link ThemeScope}: a storage key
|
|
128
|
+
* carries a *name*, and this module has no registry to look a manifest up in.
|
|
129
|
+
* Both callers below want only the selector halves. A caller that needs the
|
|
130
|
+
* manifest attaches it from the registry it holds.
|
|
131
|
+
*/
|
|
124
132
|
function parseScopeKey(key) {
|
|
125
133
|
const slash = key.lastIndexOf("/");
|
|
126
134
|
if (slash === -1) return null;
|
|
127
135
|
const theme = key.slice(0, slash);
|
|
128
136
|
const mode = key.slice(slash + 1);
|
|
129
|
-
if (!THEME_NAME_PATTERN.test(theme)) return null;
|
|
137
|
+
if (!THEME_NAME_PATTERN$1.test(theme)) return null;
|
|
130
138
|
if (mode !== "dark" && mode !== "light") return null;
|
|
131
139
|
return {
|
|
132
140
|
theme,
|
|
@@ -157,23 +165,28 @@ function isSafeCssValue(value) {
|
|
|
157
165
|
/**
|
|
158
166
|
* The value a token has before the user touches anything.
|
|
159
167
|
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
168
|
+
* Everything a theme actually declares comes from `theme-base`'s `resolve()`,
|
|
169
|
+
* which is the one implementation of the layering rule — the theme's block for
|
|
170
|
+
* this mode, the theme's own font override under the base stack — so the panel
|
|
171
|
+
* and the runtime cannot disagree about what "shipped" means. A `null` manifest
|
|
172
|
+
* is the blank base, which resolves to the neutral ramp rather than to nothing:
|
|
173
|
+
* every scope answers, including one naming a theme no manifest was passed for.
|
|
174
|
+
* The multipliers are 1 by definition, because what the panel edits is the
|
|
175
|
+
* multiplier and not the ladder underneath it.
|
|
163
176
|
*
|
|
164
|
-
* @param scope - Theme and
|
|
177
|
+
* @param scope - Theme, mode and manifest being edited.
|
|
165
178
|
* @param token - A bare token name or a `--cue-*` property.
|
|
166
179
|
* @returns The shipped value, as a CSS string.
|
|
167
180
|
* @example
|
|
168
|
-
* baseValue({ theme: "terminal", mode: "dark" }, "accent");
|
|
181
|
+
* baseValue({ theme: "terminal", mode: "dark", manifest: terminal }, "accent");
|
|
182
|
+
* // → "hsl(180 100% 50%)"
|
|
169
183
|
*/
|
|
170
184
|
function baseValue(scope, token) {
|
|
171
185
|
const property = tokenProperty(token);
|
|
172
186
|
const name = property.slice(6);
|
|
173
|
-
const preset = THEME_PRESETS[scope.theme];
|
|
174
187
|
switch (tokenKind(property)) {
|
|
175
|
-
case "color": return (
|
|
176
|
-
case "font": return
|
|
188
|
+
case "color": return resolve(scope.manifest, { mode: scope.mode }).colors[name] ?? "";
|
|
189
|
+
case "font": return resolve(scope.manifest, { mode: scope.mode }).fonts[name] ?? "";
|
|
177
190
|
case "scaled":
|
|
178
191
|
case "inline": return "1";
|
|
179
192
|
case "flat": return BASE_TRACKING_LABEL;
|
|
@@ -56,11 +56,16 @@ const clamp = (value, min, max) => Math.min(max, Math.max(min, value));
|
|
|
56
56
|
* <ThemeConfigurator position="docked-right" onChange={(tokens) => report(tokens)} />
|
|
57
57
|
*/
|
|
58
58
|
function ThemeConfigurator({ position: positionProp, defaultPosition = "floating", onPositionChange, defaultCollapsed = false, storageKey = DEFAULT_CONFIGURATOR_STORAGE_KEY, onChange, zoomShortcuts = true, title = "Theme", className }) {
|
|
59
|
-
const { theme, resolvedMode } = useTheme();
|
|
59
|
+
const { theme, resolvedMode, manifest } = useTheme();
|
|
60
60
|
const scope = React.useMemo(() => ({
|
|
61
61
|
theme,
|
|
62
|
-
mode: resolvedMode
|
|
63
|
-
|
|
62
|
+
mode: resolvedMode,
|
|
63
|
+
manifest
|
|
64
|
+
}), [
|
|
65
|
+
theme,
|
|
66
|
+
resolvedMode,
|
|
67
|
+
manifest
|
|
68
|
+
]);
|
|
64
69
|
const [snapshot, setSnapshot] = React.useState(() => {
|
|
65
70
|
const initial = defaultSnapshot();
|
|
66
71
|
return {
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
3
|
import { Input } from "../forms/input.js";
|
|
4
|
-
import {
|
|
4
|
+
import { useDensities, useThemes } from "../system/theme-registry.js";
|
|
5
5
|
import { SectionHeader } from "../chrome/section-header.js";
|
|
6
6
|
import { SegmentedControl } from "../chrome/segmented-control.js";
|
|
7
7
|
import { Field, FieldLabel } from "../forms/field.js";
|
|
8
8
|
import { Slider } from "../forms/slider.js";
|
|
9
9
|
import { Kbd } from "../primitives/kbd.js";
|
|
10
10
|
import { useTheme } from "../system/use-theme.js";
|
|
11
|
-
import { THEME_PRESETS } from "../theming/_presets.js";
|
|
12
11
|
import { tokenProperty } from "../theming/serialize.js";
|
|
13
12
|
import { COLOR_TOKENS, FONT_TOKENS, isSafeCssValue } from "./_overrides.js";
|
|
14
13
|
import { TokenEditor } from "./token-editor.js";
|
|
15
14
|
import * as React from "react";
|
|
16
15
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
+
import { resolve } from "@cueplusplus/theme-base";
|
|
17
17
|
//#region src/configurator/panel-sections.tsx
|
|
18
|
-
/** The presets, in menu order, with the palette each one is announced by. */
|
|
19
|
-
const PRESETS = Object.keys(THEME_PRESETS);
|
|
20
18
|
/** The five colours a preset is recognisable from, in reading order. */
|
|
21
19
|
const SWATCH_TOKENS = [
|
|
22
20
|
"bg",
|
|
@@ -44,13 +42,25 @@ const MODE_ITEMS = [
|
|
|
44
42
|
* and `Ultra-large` alone are 25 characters — so the segmented control wears
|
|
45
43
|
* the garment sizes and the value it sets is still the ladder's own name.
|
|
46
44
|
*/
|
|
47
|
-
const
|
|
45
|
+
const BASE_DENSITY_LABELS = {
|
|
48
46
|
"ultra-compact": "XS",
|
|
49
47
|
"compact": "S",
|
|
50
48
|
"normal": "M",
|
|
51
49
|
"large": "L",
|
|
52
50
|
"ultra-large": "XL"
|
|
53
51
|
};
|
|
52
|
+
/**
|
|
53
|
+
* What a rung is called in the panel.
|
|
54
|
+
*
|
|
55
|
+
* A lookup rather than a table, because the ladder is open now: a theme may add
|
|
56
|
+
* a rung, and this package has no garment size to give it. Its own name is the
|
|
57
|
+
* only label that is certainly true — longer than a letter, and honest about
|
|
58
|
+
* being the theme's rather than the ladder's. The base five keep their sizes,
|
|
59
|
+
* so nothing a user has learned moves.
|
|
60
|
+
*/
|
|
61
|
+
function densityLabel(rung) {
|
|
62
|
+
return BASE_DENSITY_LABELS[rung] ?? rung;
|
|
63
|
+
}
|
|
54
64
|
/** Bounds of the text-scale knob, from spec §6's `fontScale`. */
|
|
55
65
|
const FONT_SCALE = {
|
|
56
66
|
min: .8,
|
|
@@ -77,7 +87,16 @@ const FONT_LABELS = {
|
|
|
77
87
|
};
|
|
78
88
|
/** Base UI hands a range slider an array; every slider here has one thumb. */
|
|
79
89
|
const single = (value) => Array.isArray(value) ? value[0] ?? 0 : value;
|
|
80
|
-
/**
|
|
90
|
+
/**
|
|
91
|
+
* A number knob wired to one token, live on drag and persisted on release.
|
|
92
|
+
*
|
|
93
|
+
* The three it is used for are `--cue-radius-scale` and `--cue-density`, both
|
|
94
|
+
* crossed with the density ladder when they are written, and `--cue-font-scale`,
|
|
95
|
+
* which the provider publishes inline. Naming them here is not decoration: the
|
|
96
|
+
* package manifest's token list is scraped for literal `--cue-*` spellings, and
|
|
97
|
+
* a token whose only spelling in this file is the bare `token="radius-scale"`
|
|
98
|
+
* prop is a token the docs page for this section does not list.
|
|
99
|
+
*/
|
|
81
100
|
function ScaleSlider({ label, token, edits, bounds }) {
|
|
82
101
|
const value = Number(edits.value(token));
|
|
83
102
|
return /* @__PURE__ */ jsx(Slider, {
|
|
@@ -147,16 +166,27 @@ function TextTokenField({ label, token, edits, placeholder }) {
|
|
|
147
166
|
*/
|
|
148
167
|
function PresetSection({ edits, zoom, className }) {
|
|
149
168
|
const { theme, density, mode, resolvedMode, setTheme, setDensity, setMode } = useTheme();
|
|
169
|
+
const themes = useThemes();
|
|
170
|
+
const densities = useDensities();
|
|
150
171
|
return /* @__PURE__ */ jsxs(SectionHeader, {
|
|
151
172
|
label: "Preset",
|
|
152
173
|
collapsible: true,
|
|
153
174
|
className,
|
|
154
175
|
children: [
|
|
155
|
-
/* @__PURE__ */
|
|
176
|
+
themes.length === 0 ? /* @__PURE__ */ jsxs("p", {
|
|
177
|
+
className: "text-fg-muted text-ui",
|
|
178
|
+
children: [
|
|
179
|
+
"No themes registered — pass ",
|
|
180
|
+
/* @__PURE__ */ jsx("code", { children: "themes" }),
|
|
181
|
+
" to ",
|
|
182
|
+
/* @__PURE__ */ jsx("code", { children: "ThemeProvider" }),
|
|
183
|
+
"."
|
|
184
|
+
]
|
|
185
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
156
186
|
className: "grid grid-cols-2 gap-(--cue-space-2)",
|
|
157
|
-
children:
|
|
158
|
-
const
|
|
159
|
-
const palette = (
|
|
187
|
+
children: themes.map((manifest) => {
|
|
188
|
+
const name = manifest.name;
|
|
189
|
+
const palette = resolve(manifest, { mode: resolvedMode }).colors;
|
|
160
190
|
const active = name === theme;
|
|
161
191
|
return /* @__PURE__ */ jsxs("button", {
|
|
162
192
|
type: "button",
|
|
@@ -197,9 +227,9 @@ function PresetSection({ edits, zoom, className }) {
|
|
|
197
227
|
itemClassName: "flex-1",
|
|
198
228
|
value: density,
|
|
199
229
|
onValueChange: (next) => setDensity(next),
|
|
200
|
-
items:
|
|
201
|
-
value:
|
|
202
|
-
label:
|
|
230
|
+
items: densities.map((rung) => ({
|
|
231
|
+
value: rung.name,
|
|
232
|
+
label: densityLabel(rung.name)
|
|
203
233
|
}))
|
|
204
234
|
}),
|
|
205
235
|
/* @__PURE__ */ jsx(ScaleSlider, {
|
|
@@ -32,7 +32,7 @@ function ElementsCommandPalette({ commands, query, activeId, onQueryChange, onAc
|
|
|
32
32
|
if (next) onActiveChange?.(next.id);
|
|
33
33
|
};
|
|
34
34
|
useEffect(() => {
|
|
35
|
-
document.getElementById(
|
|
35
|
+
document.getElementById(`${listId}-${activeId}`)?.scrollIntoView({ block: "nearest" });
|
|
36
36
|
}, [activeId, listId]);
|
|
37
37
|
const onKeyDown = (event) => {
|
|
38
38
|
if (event.nativeEvent.isComposing) return;
|
|
@@ -47,7 +47,7 @@ function FlowGraph({ nodes, edges, visibleCount, className, ...props }) {
|
|
|
47
47
|
const from = nodes.find((node) => node.id === edge.from);
|
|
48
48
|
const to = nodes.find((node) => node.id === edge.to);
|
|
49
49
|
if (!from || !to) return null;
|
|
50
|
-
shownIds.has(edge.from) && shownIds.has(edge.to);
|
|
50
|
+
const live = shownIds.has(edge.from) && shownIds.has(edge.to);
|
|
51
51
|
const a = center(from);
|
|
52
52
|
const b = center(to);
|
|
53
53
|
const midX = (a.x + b.x) / 2;
|
|
@@ -55,7 +55,7 @@ function FlowGraph({ nodes, edges, visibleCount, className, ...props }) {
|
|
|
55
55
|
d: `M ${a.x + NODE_W / 2} ${a.y} C ${midX} ${a.y}, ${midX} ${b.y}, ${b.x - NODE_W / 2} ${b.y}`,
|
|
56
56
|
fill: "none",
|
|
57
57
|
strokeWidth: "1.5",
|
|
58
|
-
className: cn("transition-opacity duration-500 motion-reduce:transition-none", "stroke-fg-subtle")
|
|
58
|
+
className: cn("transition-opacity duration-500 motion-reduce:transition-none", "stroke-fg-subtle", live ? "opacity-100" : "opacity-30")
|
|
59
59
|
}, `${edge.from}-${edge.to}`);
|
|
60
60
|
})
|
|
61
61
|
}), shown.map((node) => /* @__PURE__ */ jsx("div", {
|
|
@@ -130,7 +130,7 @@ function safeUrl(value) {
|
|
|
130
130
|
const FENCE = /^ {0,3}(`{3,}|~{3,})/;
|
|
131
131
|
/** Whether a character can sit next to a delimiter run without closing a word. */
|
|
132
132
|
function isBoundary(char) {
|
|
133
|
-
return char === "" || /[\s
|
|
133
|
+
return char === "" || /[\s!-/:-@[-`{-~]/.test(char);
|
|
134
134
|
}
|
|
135
135
|
/**
|
|
136
136
|
* Where the last block of `source` begins: after the final blank line that is
|
|
@@ -80,10 +80,11 @@ function ShimmerLabel({ active = true, className, ...props }) {
|
|
|
80
80
|
* announced nor copied into a selection.
|
|
81
81
|
*/
|
|
82
82
|
function SwapLabel({ active, children, className }) {
|
|
83
|
-
const
|
|
83
|
+
const restingRef = useRef(null);
|
|
84
|
+
const activeRef = useRef(null);
|
|
84
85
|
const [width, setWidth] = useState(null);
|
|
85
86
|
useLayoutEffect(() => {
|
|
86
|
-
const target =
|
|
87
|
+
const target = (active === 0 ? restingRef : activeRef).current;
|
|
87
88
|
if (!target) return void 0;
|
|
88
89
|
const measure = () => setWidth(Math.ceil(target.getBoundingClientRect().width));
|
|
89
90
|
measure();
|
|
@@ -96,7 +97,7 @@ function SwapLabel({ active, children, className }) {
|
|
|
96
97
|
style: width === null ? void 0 : { width },
|
|
97
98
|
className: cn("grid overflow-x-clip transition-[width] duration-300 ease-[cubic-bezier(0.23,1,0.32,1)] motion-reduce:transition-none", className),
|
|
98
99
|
children: children.map((layer, index) => /* @__PURE__ */ jsx("span", {
|
|
99
|
-
ref:
|
|
100
|
+
ref: index === 0 ? restingRef : activeRef,
|
|
100
101
|
"aria-hidden": active !== index,
|
|
101
102
|
className: cn(labelSwap, active === index ? labelSwapIn : labelSwapOut),
|
|
102
103
|
children: layer
|
package/dist/index.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ import { Tree, TreeProps, TreeVisibility, TreeVisibilityToggle, TreeVisibilityTo
|
|
|
33
33
|
import { Toolbar, ToolbarButtonProps, ToolbarGroupProps, ToolbarRootProps, ToolbarSeparatorProps } from "./chrome/toolbar.js";
|
|
34
34
|
import "./chrome/index.js";
|
|
35
35
|
import { ControlVariantProps, FormControlSize, bareControlClasses, controlClasses, controlGroupFocusClasses, controlSurface, controlVariants } from "./forms/_chassis.js";
|
|
36
|
+
import { TokenOverrides, isSafeTokenValue } from "./system/overrides.js";
|
|
36
37
|
import { FontFamilies, ResolvedMode, ThemeContextValue, ThemeProvider, ThemeProviderProps } from "./system/theme-provider.js";
|
|
37
38
|
import { Autocomplete, AutocompleteProps } from "./forms/autocomplete.js";
|
|
38
39
|
import { ButtonGroup, ButtonGroupOrientation, ButtonGroupProps } from "./forms/button-group.js";
|
|
@@ -85,11 +86,12 @@ import { TwoStepButton, TwoStepButtonProps, TwoStepTone } from "./instruments/tw
|
|
|
85
86
|
import { UsageChart, UsageChartPoint, UsageChartProps, UsageChartTone } from "./instruments/usage-chart.js";
|
|
86
87
|
import "./instruments/index.js";
|
|
87
88
|
import { Accordion, AccordionHeaderProps, AccordionItemProps, AccordionPanelProps, AccordionRootProps, AccordionTriggerProps } from "./layout/accordion.js";
|
|
89
|
+
import { SpaceStep, Stack, StackAlign, StackJustify, StackProps } from "./layout/stack.js";
|
|
90
|
+
import { Bento, BentoColumns, BentoMinHeight, BentoRootProps, BentoRowSpan, BentoRows, BentoSpan, BentoTileProps } from "./layout/bento.js";
|
|
88
91
|
import { Breadcrumb, BreadcrumbItem, BreadcrumbProps } from "./layout/breadcrumb.js";
|
|
89
92
|
import { Card, CardContentProps, CardDescriptionProps, CardFooterProps, CardHeaderProps, CardRootProps, CardTitleProps } from "./layout/card.js";
|
|
90
93
|
import { Collapsible, CollapsiblePanelProps, CollapsibleRootProps, CollapsibleTriggerProps, Disclosure, DisclosureProps } from "./layout/collapsible.js";
|
|
91
94
|
import { DescriptionList, DescriptionListDetailProps, DescriptionListLayout, DescriptionListRootProps, DescriptionListTermProps } from "./layout/description-list.js";
|
|
92
|
-
import { SpaceStep, Stack, StackAlign, StackJustify, StackProps } from "./layout/stack.js";
|
|
93
95
|
import { Grid, GridColumns, GridProps } from "./layout/grid.js";
|
|
94
96
|
import { Item, ItemProps, itemVariants } from "./layout/item.js";
|
|
95
97
|
import { Pagination, PaginationEntry, PaginationProps, paginationRange } from "./layout/pagination.js";
|
|
@@ -122,7 +124,9 @@ import "./primitives/index.js";
|
|
|
122
124
|
import { Density, DensityProps } from "./system/density.js";
|
|
123
125
|
import { CuePortalFrame, CuePortalFrameProps, useCuePortalProps } from "./system/portal.js";
|
|
124
126
|
import { DEFAULT_STORAGE_KEY, PersistedPreferences, PrepaintDefaults, PrepaintOptions, prepaintScript } from "./system/prepaint.js";
|
|
127
|
+
import { ThemeRegistry } from "./system/vocabulary.js";
|
|
128
|
+
import { useDensities, useFonts, useThemes } from "./system/theme-registry.js";
|
|
125
129
|
import { ControlSize, useControlHeight, useDensity } from "./system/use-density.js";
|
|
126
130
|
import { useTheme } from "./system/use-theme.js";
|
|
127
|
-
import { DensityLevel, FontName, Mode, ThemeName } from "./system/index.js";
|
|
128
|
-
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, type BarOverflow, 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, 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, DataRow, type DataRowDisclosure, type DataRowRootProps, type DataRowSlotProps, DataTree, type DataTreeItem, type DataTreeProps, type DataTreeRowState, DelegationCard, type DelegationCardProps, type DelegationDirection, type DelegationStatus, Density, 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 FontFamilies, type FontName, Footer, type FooterProps, type FormControlSize, 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, 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, Progress, type ProgressProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, type RatingSize, type ResolvedMode, Row, type RowProps, 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, 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 ThemeName, ThemeProvider, type ThemeProviderProps, 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, 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, itemVariants, linkVariants, menuItemClasses, menuLabelClasses, menuPopupClasses, menuSeparatorClasses, overlayDescriptionClasses, overlayFooterClasses, overlayModalTransitionClasses, overlayPopupTransitionClasses, overlayPositionerClasses, overlaySurfaceClasses, overlayTextClasses, overlayTitleClasses, paginationRange, parseEnvReference, partitionFiles, prepaintScript, rowVariants, scrimClasses, useControlHeight, useCuePortalProps, useDensity, useSidebar, useTheme, useToast };
|
|
131
|
+
import { DensityEntry, DensityLevel, FontEntry, FontName, Mode, ThemeManifest, ThemeName } from "./system/index.js";
|
|
132
|
+
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, 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, 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, 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, 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, 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, Progress, type ProgressProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, type RatingSize, type ResolvedMode, Row, type RowProps, 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, 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/index.js
CHANGED
|
@@ -24,7 +24,9 @@ import { Separator } from "./primitives/separator.js";
|
|
|
24
24
|
import { AppBar } from "./chrome/app-bar.js";
|
|
25
25
|
import { Sidebar, useSidebar } from "./layout/sidebar.js";
|
|
26
26
|
import { Density } from "./system/density.js";
|
|
27
|
+
import { isSafeTokenValue } from "./system/overrides.js";
|
|
27
28
|
import { DEFAULT_STORAGE_KEY, prepaintScript } from "./system/prepaint.js";
|
|
29
|
+
import { useDensities, useFonts, useThemes } from "./system/theme-registry.js";
|
|
28
30
|
import { ThemeProvider } from "./system/theme-provider.js";
|
|
29
31
|
import { CuePortalFrame, useCuePortalProps } from "./system/portal.js";
|
|
30
32
|
import { OVERLAY_SIDE_OFFSET, menuItemClasses, menuLabelClasses, menuPopupClasses, menuSeparatorClasses, overlayDescriptionClasses, overlayFooterClasses, overlayModalTransitionClasses, overlayPopupTransitionClasses, overlayPositionerClasses, overlaySurfaceClasses, overlayTextClasses, overlayTitleClasses, scrimClasses } from "./overlays/_surface.js";
|
|
@@ -84,11 +86,12 @@ import { TerminalFrame } from "./instruments/terminal-frame.js";
|
|
|
84
86
|
import { TwoStepButton } from "./instruments/two-step-button.js";
|
|
85
87
|
import { UsageChart } from "./instruments/usage-chart.js";
|
|
86
88
|
import { Accordion } from "./layout/accordion.js";
|
|
89
|
+
import { Stack } from "./layout/stack.js";
|
|
90
|
+
import { Bento } from "./layout/bento.js";
|
|
87
91
|
import { Breadcrumb } from "./layout/breadcrumb.js";
|
|
88
92
|
import { Card } from "./layout/card.js";
|
|
89
93
|
import { Collapsible, Disclosure } from "./layout/collapsible.js";
|
|
90
94
|
import { DescriptionList } from "./layout/description-list.js";
|
|
91
|
-
import { Stack } from "./layout/stack.js";
|
|
92
95
|
import { Grid } from "./layout/grid.js";
|
|
93
96
|
import { Item, itemVariants } from "./layout/item.js";
|
|
94
97
|
import { Pagination, paginationRange } from "./layout/pagination.js";
|
|
@@ -112,4 +115,4 @@ import { Kbd } from "./primitives/kbd.js";
|
|
|
112
115
|
import { Skeleton } from "./primitives/skeleton.js";
|
|
113
116
|
import { useControlHeight, useDensity } from "./system/use-density.js";
|
|
114
117
|
import { useTheme } from "./system/use-theme.js";
|
|
115
|
-
export { AGENT_COLOR_PROPERTY, AGENT_HUES, AGENT_ROOT_COLOR, Accordion, AgentPile, AlertDialog, AppBar, AppShell, AppWindowFrame, AskBox, AudienceIcon, Autocomplete, Avatar, AvatarGroup, Breadcrumb, Button, ButtonGroup, Card, CatalogueIcon, ChannelBetaIcon, ChannelReleasedIcon, Checkbox, CheckboxGroup, Chip, CliToolIcon, Collapsible, Combobox, CommandPalette, Composer, Container, ContextMenu, CopyButton, CueLogotype, CueMark, CuePortalFrame, DEFAULT_STORAGE_KEY, DataRow, DataTree, DelegationCard, Density, DescriptionList, Dialog, Disclosure, Drawer, DropdownMenu, EmptyState, EnvVarInput, Eyebrow, Field, FieldDescription, FieldError, FieldLabel, FileUpload, FolderIcon, Footer, Grid, GroupBar, HoverCard, IconButton, InfoTip, Input, InputGroup, Item, Kbd, Ledger, Link, McpServerIcon, Menubar, Message, MessageList, Meter, MultiSelect, NavigationMenu, NumberField, OTPField, OVERLAY_SIDE_OFFSET, PageShell, Pagination, Panel, PanelHeader, PasswordInput, Plussie, Popover, Progress, Radio, RadioGroup, Rating, Row, ScrollArea, ScrollableTabsList, ScrubInput, SeamCell, SeamGrid, SeamList, SearchInput, SectionHeader, SegmentedControl, Select, Separator, Sheet, Sidebar, Skeleton, SkillIcon, Slider, Sparkline, Spinner, Stack, StackIcon, StacksMatrixIcon, Stat, StatusBar, StatusDot, Stepper, Switch, TAB_FADE_PX, TREE_GUIDE_GLYPHS, Table, TableScrollRegion, Tabs, TagsInput, TerminalFrame, Textarea, ThemeProvider, Timeline, TitleBar, Toast, Toggle, ToggleGroup, Toolbar, Tooltip, Tree, TreeVisibilityToggle, TwoStepButton, UsageChart, activateRowFromClick, activateRowFromKeyDown, agentColor, agentColorStyle, bareControlClasses, buttonVariants, chipVariants, computeScrollEdges, controlClasses, controlGroupFocusClasses, controlSurface, controlVariants, edgeFadeMask, envReference, flattenTree, itemVariants, linkVariants, menuItemClasses, menuLabelClasses, menuPopupClasses, menuSeparatorClasses, overlayDescriptionClasses, overlayFooterClasses, overlayModalTransitionClasses, overlayPopupTransitionClasses, overlayPositionerClasses, overlaySurfaceClasses, overlayTextClasses, overlayTitleClasses, paginationRange, parseEnvReference, partitionFiles, prepaintScript, rowVariants, scrimClasses, useControlHeight, useCuePortalProps, useDensity, useSidebar, useTheme, useToast };
|
|
118
|
+
export { AGENT_COLOR_PROPERTY, AGENT_HUES, AGENT_ROOT_COLOR, Accordion, AgentPile, AlertDialog, AppBar, AppShell, AppWindowFrame, AskBox, AudienceIcon, Autocomplete, Avatar, AvatarGroup, Bento, Breadcrumb, Button, ButtonGroup, Card, CatalogueIcon, ChannelBetaIcon, ChannelReleasedIcon, Checkbox, CheckboxGroup, Chip, CliToolIcon, Collapsible, Combobox, CommandPalette, Composer, Container, ContextMenu, CopyButton, CueLogotype, CueMark, CuePortalFrame, DEFAULT_STORAGE_KEY, DataRow, DataTree, DelegationCard, Density, DescriptionList, Dialog, Disclosure, Drawer, DropdownMenu, EmptyState, EnvVarInput, Eyebrow, Field, FieldDescription, FieldError, FieldLabel, FileUpload, FolderIcon, Footer, Grid, GroupBar, HoverCard, IconButton, InfoTip, Input, InputGroup, Item, Kbd, Ledger, Link, McpServerIcon, Menubar, Message, MessageList, Meter, MultiSelect, NavigationMenu, NumberField, OTPField, OVERLAY_SIDE_OFFSET, PageShell, Pagination, Panel, PanelHeader, PasswordInput, Plussie, Popover, Progress, Radio, RadioGroup, Rating, Row, ScrollArea, ScrollableTabsList, ScrubInput, SeamCell, SeamGrid, SeamList, SearchInput, SectionHeader, SegmentedControl, Select, Separator, Sheet, Sidebar, Skeleton, SkillIcon, Slider, Sparkline, Spinner, Stack, StackIcon, StacksMatrixIcon, Stat, StatusBar, StatusDot, Stepper, Switch, TAB_FADE_PX, TREE_GUIDE_GLYPHS, Table, TableScrollRegion, Tabs, TagsInput, TerminalFrame, Textarea, ThemeProvider, Timeline, TitleBar, Toast, Toggle, ToggleGroup, Toolbar, Tooltip, Tree, TreeVisibilityToggle, TwoStepButton, UsageChart, 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 };
|
|
@@ -19,7 +19,11 @@ type MeterTone = "ok" | "busy" | "warn" | "danger";
|
|
|
19
19
|
*/
|
|
20
20
|
type MeterProvenance = "vendor" | "estimated" | "unbounded" | "none";
|
|
21
21
|
interface MeterProps extends Omit<React.ComponentPropsWithoutRef<"div">, "children"> {
|
|
22
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* How full, 0–100. Clamped; a non-finite value reads as 0.
|
|
24
|
+
* @min 0
|
|
25
|
+
* @max 100
|
|
26
|
+
*/
|
|
23
27
|
percent: number;
|
|
24
28
|
/** Status colour for the fill. Defaults to `"ok"`. */
|
|
25
29
|
tone?: MeterTone;
|