@cueplusplus/ui 0.13.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 +4028 -0
- package/LICENSE +21 -0
- package/NOTICE.md +34 -0
- package/README.md +237 -0
- package/dist/agent-runtime/_glyphs.js +43 -0
- package/dist/agent-runtime/branch-picker.d.ts +45 -0
- package/dist/agent-runtime/branch-picker.js +87 -0
- package/dist/agent-runtime/index.d.ts +4 -0
- package/dist/agent-runtime/index.js +4 -0
- package/dist/agent-runtime/tool-call-card.d.ts +69 -0
- package/dist/agent-runtime/tool-call-card.js +187 -0
- package/dist/agent-runtime/use-agent-thread.d.ts +164 -0
- package/dist/agent-runtime/use-agent-thread.js +251 -0
- package/dist/brand/_chassis.d.ts +54 -0
- package/dist/brand/_chassis.js +81 -0
- package/dist/brand/_geometry.js +41 -0
- package/dist/brand/cue-logotype.d.ts +29 -0
- package/dist/brand/cue-logotype.js +60 -0
- package/dist/brand/cue-mark.d.ts +30 -0
- package/dist/brand/cue-mark.js +61 -0
- package/dist/brand/index.d.ts +5 -0
- package/dist/brand/plussie.d.ts +67 -0
- package/dist/brand/plussie.js +125 -0
- package/dist/charts/_token.js +39 -0
- package/dist/charts/container.d.ts +58 -0
- package/dist/charts/container.js +77 -0
- package/dist/charts/index.d.ts +5 -0
- package/dist/charts/index.js +5 -0
- package/dist/charts/ramps.d.ts +140 -0
- package/dist/charts/ramps.js +615 -0
- package/dist/charts/theme.d.ts +112 -0
- package/dist/charts/theme.js +165 -0
- package/dist/charts/tones.d.ts +111 -0
- package/dist/charts/tones.js +127 -0
- package/dist/chat/_glyphs.js +55 -0
- package/dist/chat/agent-color.d.ts +84 -0
- package/dist/chat/agent-color.js +101 -0
- package/dist/chat/agent-pile.d.ts +55 -0
- package/dist/chat/agent-pile.js +121 -0
- package/dist/chat/ask-box.d.ts +88 -0
- package/dist/chat/ask-box.js +341 -0
- package/dist/chat/composer.d.ts +66 -0
- package/dist/chat/composer.js +144 -0
- package/dist/chat/delegation-card.d.ts +60 -0
- package/dist/chat/delegation-card.js +129 -0
- package/dist/chat/index.d.ts +8 -0
- package/dist/chat/index.js +8 -0
- package/dist/chat/message-list.d.ts +45 -0
- package/dist/chat/message-list.js +141 -0
- package/dist/chat/message.d.ts +47 -0
- package/dist/chat/message.js +108 -0
- package/dist/chrome/_band.js +54 -0
- package/dist/chrome/_drag.js +59 -0
- package/dist/chrome/_edge-scroller.d.ts +45 -0
- package/dist/chrome/_edge-scroller.js +149 -0
- package/dist/chrome/_glyphs.js +119 -0
- package/dist/chrome/_status-bar-item.js +85 -0
- package/dist/chrome/_status-bar.d.ts +15 -0
- package/dist/chrome/_status-bar.js +171 -0
- package/dist/chrome/_tabs-scroll.d.ts +67 -0
- package/dist/chrome/_tabs-scroll.js +73 -0
- package/dist/chrome/_tree.d.ts +75 -0
- package/dist/chrome/_tree.js +49 -0
- package/dist/chrome/app-bar.d.ts +103 -0
- package/dist/chrome/app-bar.js +175 -0
- package/dist/chrome/app-shell.d.ts +243 -0
- package/dist/chrome/app-shell.js +266 -0
- package/dist/chrome/band.d.ts +106 -0
- package/dist/chrome/band.js +97 -0
- package/dist/chrome/empty-state.d.ts +37 -0
- package/dist/chrome/empty-state.js +57 -0
- package/dist/chrome/eyebrow.d.ts +29 -0
- package/dist/chrome/eyebrow.js +36 -0
- package/dist/chrome/footer.d.ts +88 -0
- package/dist/chrome/footer.js +83 -0
- package/dist/chrome/index.d.ts +24 -0
- package/dist/chrome/index.js +22 -0
- package/dist/chrome/inspector.d.ts +61 -0
- package/dist/chrome/inspector.js +121 -0
- package/dist/chrome/navigation-menu.d.ts +80 -0
- package/dist/chrome/navigation-menu.js +121 -0
- package/dist/chrome/page-shell.d.ts +38 -0
- package/dist/chrome/page-shell.js +76 -0
- package/dist/chrome/panel.d.ts +55 -0
- package/dist/chrome/panel.js +67 -0
- package/dist/chrome/row.d.ts +82 -0
- package/dist/chrome/row.js +106 -0
- package/dist/chrome/scroll-area.d.ts +39 -0
- package/dist/chrome/scroll-area.js +70 -0
- package/dist/chrome/section-header.d.ts +42 -0
- package/dist/chrome/section-header.js +79 -0
- package/dist/chrome/segmented-control.d.ts +77 -0
- package/dist/chrome/segmented-control.js +95 -0
- package/dist/chrome/status-bar.d.ts +129 -0
- package/dist/chrome/status-bar.js +120 -0
- package/dist/chrome/tabs.d.ts +80 -0
- package/dist/chrome/tabs.js +132 -0
- package/dist/chrome/title-bar.d.ts +47 -0
- package/dist/chrome/title-bar.js +43 -0
- package/dist/chrome/toolbar.d.ts +68 -0
- package/dist/chrome/toolbar.js +83 -0
- package/dist/chrome/tree.d.ts +98 -0
- package/dist/chrome/tree.js +248 -0
- package/dist/color/_checker.js +14 -0
- package/dist/color/_convert.d.ts +52 -0
- package/dist/color/_convert.js +66 -0
- package/dist/color/_glyphs.js +28 -0
- package/dist/color/_thumb.js +15 -0
- package/dist/color/_value.js +28 -0
- package/dist/color/color-area.d.ts +27 -0
- package/dist/color/color-area.js +40 -0
- package/dist/color/color-field.d.ts +32 -0
- package/dist/color/color-field.js +43 -0
- package/dist/color/color-picker.d.ts +71 -0
- package/dist/color/color-picker.js +178 -0
- package/dist/color/color-slider.d.ts +31 -0
- package/dist/color/color-slider.js +51 -0
- package/dist/color/color-swatch.d.ts +32 -0
- package/dist/color/color-swatch.js +44 -0
- package/dist/color/index.d.ts +7 -0
- package/dist/color/index.js +7 -0
- package/dist/configurator/_export.d.ts +78 -0
- package/dist/configurator/_export.js +302 -0
- package/dist/configurator/_glyphs.js +92 -0
- package/dist/configurator/_overrides.d.ts +266 -0
- package/dist/configurator/_overrides.js +541 -0
- package/dist/configurator/configurator.d.ts +71 -0
- package/dist/configurator/configurator.js +284 -0
- package/dist/configurator/export-dialog.d.ts +30 -0
- package/dist/configurator/export-dialog.js +121 -0
- package/dist/configurator/index.d.ts +8 -0
- package/dist/configurator/index.js +8 -0
- package/dist/configurator/panel-sections.d.ts +86 -0
- package/dist/configurator/panel-sections.js +352 -0
- package/dist/configurator/token-editor.d.ts +74 -0
- package/dist/configurator/token-editor.js +152 -0
- package/dist/configurator/use-zoom.d.ts +87 -0
- package/dist/configurator/use-zoom.js +113 -0
- package/dist/date/_glyphs.js +34 -0
- package/dist/date/_segments.js +101 -0
- package/dist/date/_trigger.js +31 -0
- package/dist/date/calendar.d.ts +25 -0
- package/dist/date/calendar.js +125 -0
- package/dist/date/date-field.d.ts +34 -0
- package/dist/date/date-field.js +41 -0
- package/dist/date/date-picker.d.ts +69 -0
- package/dist/date/date-picker.js +89 -0
- package/dist/date/date-range-picker.d.ts +65 -0
- package/dist/date/date-range-picker.js +92 -0
- package/dist/date/index.d.ts +6 -0
- package/dist/date/index.js +6 -0
- package/dist/date/time-field.d.ts +29 -0
- package/dist/date/time-field.js +36 -0
- package/dist/dmx/_ramp.d.ts +77 -0
- package/dist/dmx/_ramp.js +169 -0
- package/dist/dmx/_readout.js +53 -0
- package/dist/dmx/_universe.d.ts +105 -0
- package/dist/dmx/_universe.js +112 -0
- package/dist/dmx/channel-matrix.d.ts +81 -0
- package/dist/dmx/channel-matrix.js +285 -0
- package/dist/dmx/dmx-bar.d.ts +50 -0
- package/dist/dmx/dmx-bar.js +107 -0
- package/dist/dmx/dmx-strip.d.ts +41 -0
- package/dist/dmx/dmx-strip.js +196 -0
- package/dist/dmx/index.d.ts +7 -0
- package/dist/dmx/index.js +7 -0
- package/dist/dmx/universe-grid.d.ts +61 -0
- package/dist/dmx/universe-grid.js +182 -0
- package/dist/elements/activity-graph.d.ts +40 -0
- package/dist/elements/activity-graph.js +81 -0
- package/dist/elements/agent-card.d.ts +49 -0
- package/dist/elements/agent-card.js +91 -0
- package/dist/elements/agent-handoff.d.ts +24 -0
- package/dist/elements/agent-handoff.js +53 -0
- package/dist/elements/agent-mode-badge.d.ts +72 -0
- package/dist/elements/agent-mode-badge.js +110 -0
- package/dist/elements/agent-plan.d.ts +24 -0
- package/dist/elements/agent-plan.js +74 -0
- package/dist/elements/agent-status.d.ts +29 -0
- package/dist/elements/agent-status.js +46 -0
- package/dist/elements/agent-surface.d.ts +65 -0
- package/dist/elements/agent-surface.js +68 -0
- package/dist/elements/animated-number.d.ts +86 -0
- package/dist/elements/animated-number.js +118 -0
- package/dist/elements/approval-card.d.ts +40 -0
- package/dist/elements/approval-card.js +78 -0
- package/dist/elements/artifact-card.d.ts +30 -0
- package/dist/elements/artifact-card.js +58 -0
- package/dist/elements/background-inbox.d.ts +39 -0
- package/dist/elements/background-inbox.js +60 -0
- package/dist/elements/canvas-split.d.ts +77 -0
- package/dist/elements/canvas-split.js +138 -0
- package/dist/elements/chart.d.ts +41 -0
- package/dist/elements/chart.js +117 -0
- package/dist/elements/chat-panel.d.ts +46 -0
- package/dist/elements/chat-panel.js +104 -0
- package/dist/elements/checkpoint-history.d.ts +31 -0
- package/dist/elements/checkpoint-history.js +65 -0
- package/dist/elements/clamp.d.ts +90 -0
- package/dist/elements/clamp.js +109 -0
- package/dist/elements/code-diff.d.ts +42 -0
- package/dist/elements/code-diff.js +69 -0
- package/dist/elements/code-runner.d.ts +38 -0
- package/dist/elements/code-runner.js +84 -0
- package/dist/elements/command-palette.d.ts +48 -0
- package/dist/elements/command-palette.js +129 -0
- package/dist/elements/compaction-row.d.ts +63 -0
- package/dist/elements/compaction-row.js +110 -0
- package/dist/elements/comparison-card.d.ts +47 -0
- package/dist/elements/comparison-card.js +69 -0
- package/dist/elements/composer.d.ts +274 -0
- package/dist/elements/composer.js +505 -0
- package/dist/elements/computer-use.d.ts +40 -0
- package/dist/elements/computer-use.js +92 -0
- package/dist/elements/confidence-marker.d.ts +39 -0
- package/dist/elements/confidence-marker.js +64 -0
- package/dist/elements/connection-state.d.ts +29 -0
- package/dist/elements/connection-state.js +66 -0
- package/dist/elements/context-breakdown.d.ts +30 -0
- package/dist/elements/context-breakdown.js +86 -0
- package/dist/elements/context-usage.d.ts +99 -0
- package/dist/elements/context-usage.js +225 -0
- package/dist/elements/conversation-search.d.ts +48 -0
- package/dist/elements/conversation-search.js +88 -0
- package/dist/elements/cost-meter.d.ts +33 -0
- package/dist/elements/cost-meter.js +75 -0
- package/dist/elements/data-table.d.ts +31 -0
- package/dist/elements/data-table.js +67 -0
- package/dist/elements/day-separator.d.ts +34 -0
- package/dist/elements/day-separator.js +50 -0
- package/dist/elements/diagram.d.ts +34 -0
- package/dist/elements/diagram.js +75 -0
- package/dist/elements/document-reference.d.ts +37 -0
- package/dist/elements/document-reference.js +66 -0
- package/dist/elements/draft-restore.d.ts +27 -0
- package/dist/elements/draft-restore.js +54 -0
- package/dist/elements/edit-message.d.ts +36 -0
- package/dist/elements/edit-message.js +77 -0
- package/dist/elements/elements.css +459 -0
- package/dist/elements/elicitation-form.d.ts +48 -0
- package/dist/elements/elicitation-form.js +106 -0
- package/dist/elements/empty-state.d.ts +52 -0
- package/dist/elements/empty-state.js +98 -0
- package/dist/elements/end-of-turn-summary.d.ts +60 -0
- package/dist/elements/end-of-turn-summary.js +75 -0
- package/dist/elements/error-state.d.ts +29 -0
- package/dist/elements/error-state.js +55 -0
- package/dist/elements/feedback-dialog.d.ts +36 -0
- package/dist/elements/feedback-dialog.js +81 -0
- package/dist/elements/file-tree.d.ts +45 -0
- package/dist/elements/file-tree.js +84 -0
- package/dist/elements/flow-graph.d.ts +45 -0
- package/dist/elements/flow-graph.js +78 -0
- package/dist/elements/generative/chart.js +200 -0
- package/dist/elements/generative/faults.js +111 -0
- package/dist/elements/generative/icons.d.ts +41 -0
- package/dist/elements/generative/icons.js +190 -0
- package/dist/elements/generative/intrinsics.js +483 -0
- package/dist/elements/generative/spec.d.ts +110 -0
- package/dist/elements/generative/spec.js +366 -0
- package/dist/elements/generative.css +1145 -0
- package/dist/elements/generative.d.ts +144 -0
- package/dist/elements/generative.js +126 -0
- package/dist/elements/guardrail-notice.d.ts +29 -0
- package/dist/elements/guardrail-notice.js +63 -0
- package/dist/elements/image-generation.d.ts +18 -0
- package/dist/elements/image-generation.js +64 -0
- package/dist/elements/index.d.ts +116 -0
- package/dist/elements/index.js +115 -0
- package/dist/elements/inline-citation.d.ts +43 -0
- package/dist/elements/inline-citation.js +93 -0
- package/dist/elements/job-progress.d.ts +49 -0
- package/dist/elements/job-progress.js +74 -0
- package/dist/elements/launcher-bubble.d.ts +34 -0
- package/dist/elements/launcher-bubble.js +72 -0
- package/dist/elements/live-region-announcer.d.ts +130 -0
- package/dist/elements/live-region-announcer.js +230 -0
- package/dist/elements/loading-state.d.ts +27 -0
- package/dist/elements/loading-state.js +36 -0
- package/dist/elements/map-answer.d.ts +38 -0
- package/dist/elements/map-answer.js +93 -0
- package/dist/elements/markdown.d.ts +131 -0
- package/dist/elements/markdown.js +528 -0
- package/dist/elements/math-block.d.ts +51 -0
- package/dist/elements/math-block.js +70 -0
- package/dist/elements/mcp-server-panel.d.ts +41 -0
- package/dist/elements/mcp-server-panel.js +115 -0
- package/dist/elements/memory-chips.d.ts +30 -0
- package/dist/elements/memory-chips.js +43 -0
- package/dist/elements/message-actions.d.ts +38 -0
- package/dist/elements/message-actions.js +71 -0
- package/dist/elements/message-attachment.d.ts +48 -0
- package/dist/elements/message-attachment.js +63 -0
- package/dist/elements/message-branches.d.ts +25 -0
- package/dist/elements/message-branches.js +65 -0
- package/dist/elements/message-pair.d.ts +33 -0
- package/dist/elements/message-pair.js +65 -0
- package/dist/elements/message-queue.d.ts +31 -0
- package/dist/elements/message-queue.js +80 -0
- package/dist/elements/message-timing.d.ts +33 -0
- package/dist/elements/message-timing.js +37 -0
- package/dist/elements/mobile-composer.d.ts +44 -0
- package/dist/elements/mobile-composer.js +88 -0
- package/dist/elements/model-picker.d.ts +38 -0
- package/dist/elements/model-picker.js +69 -0
- package/dist/elements/number-ticker.d.ts +18 -0
- package/dist/elements/number-ticker.js +47 -0
- package/dist/elements/onboarding.d.ts +30 -0
- package/dist/elements/onboarding.js +75 -0
- package/dist/elements/permission-grant.d.ts +35 -0
- package/dist/elements/permission-grant.js +86 -0
- package/dist/elements/permission-scopes.d.ts +215 -0
- package/dist/elements/permission-scopes.js +249 -0
- package/dist/elements/prompt-library.d.ts +43 -0
- package/dist/elements/prompt-library.js +117 -0
- package/dist/elements/queue-dock.d.ts +101 -0
- package/dist/elements/queue-dock.js +132 -0
- package/dist/elements/quota-banner.d.ts +26 -0
- package/dist/elements/quota-banner.js +66 -0
- package/dist/elements/quote-reply.d.ts +44 -0
- package/dist/elements/quote-reply.js +79 -0
- package/dist/elements/range.d.ts +29 -0
- package/dist/elements/range.js +45 -0
- package/dist/elements/read-aloud.d.ts +45 -0
- package/dist/elements/read-aloud.js +75 -0
- package/dist/elements/reasoning-effort.d.ts +36 -0
- package/dist/elements/reasoning-effort.js +67 -0
- package/dist/elements/reasoning-panel.d.ts +46 -0
- package/dist/elements/reasoning-panel.js +75 -0
- package/dist/elements/recommendation-card.d.ts +45 -0
- package/dist/elements/recommendation-card.js +83 -0
- package/dist/elements/regenerate-menu.d.ts +45 -0
- package/dist/elements/regenerate-menu.js +51 -0
- package/dist/elements/replay.d.ts +217 -0
- package/dist/elements/replay.js +498 -0
- package/dist/elements/research-report.d.ts +38 -0
- package/dist/elements/research-report.js +69 -0
- package/dist/elements/retrieval-chunks.d.ts +43 -0
- package/dist/elements/retrieval-chunks.js +81 -0
- package/dist/elements/revert-dock.d.ts +159 -0
- package/dist/elements/revert-dock.js +327 -0
- package/dist/elements/reviewable-diff.d.ts +45 -0
- package/dist/elements/reviewable-diff.js +110 -0
- package/dist/elements/risk-badge.d.ts +52 -0
- package/dist/elements/risk-badge.js +91 -0
- package/dist/elements/schedule-card.d.ts +42 -0
- package/dist/elements/schedule-card.js +90 -0
- package/dist/elements/score-breakdown.d.ts +47 -0
- package/dist/elements/score-breakdown.js +82 -0
- package/dist/elements/scroll-anchor.d.ts +32 -0
- package/dist/elements/scroll-anchor.js +123 -0
- package/dist/elements/settings-panel.d.ts +52 -0
- package/dist/elements/settings-panel.js +107 -0
- package/dist/elements/shared-conversation.d.ts +39 -0
- package/dist/elements/shared-conversation.js +68 -0
- package/dist/elements/sources.d.ts +33 -0
- package/dist/elements/sources.js +61 -0
- package/dist/elements/speaker-identity.d.ts +32 -0
- package/dist/elements/speaker-identity.js +51 -0
- package/dist/elements/spec-sheet.d.ts +31 -0
- package/dist/elements/spec-sheet.js +45 -0
- package/dist/elements/stopped-run.d.ts +22 -0
- package/dist/elements/stopped-run.js +50 -0
- package/dist/elements/streaming-text.d.ts +31 -0
- package/dist/elements/streaming-text.js +45 -0
- package/dist/elements/subagent-list.d.ts +37 -0
- package/dist/elements/subagent-list.js +79 -0
- package/dist/elements/suggestions.d.ts +30 -0
- package/dist/elements/suggestions.js +36 -0
- package/dist/elements/surfaces.d.ts +85 -0
- package/dist/elements/surfaces.js +108 -0
- package/dist/elements/tail-status.d.ts +131 -0
- package/dist/elements/tail-status.js +94 -0
- package/dist/elements/terminal-block.d.ts +29 -0
- package/dist/elements/terminal-block.js +54 -0
- package/dist/elements/thinking-indicator.d.ts +18 -0
- package/dist/elements/thinking-indicator.js +36 -0
- package/dist/elements/thread-list.d.ts +35 -0
- package/dist/elements/thread-list.js +68 -0
- package/dist/elements/thread-search.d.ts +42 -0
- package/dist/elements/thread-search.js +99 -0
- package/dist/elements/timeline.d.ts +37 -0
- package/dist/elements/timeline.js +46 -0
- package/dist/elements/todo-list.d.ts +42 -0
- package/dist/elements/todo-list.js +59 -0
- package/dist/elements/tool-call.d.ts +41 -0
- package/dist/elements/tool-call.js +85 -0
- package/dist/elements/tool-error.d.ts +39 -0
- package/dist/elements/tool-error.js +76 -0
- package/dist/elements/tool-group.d.ts +45 -0
- package/dist/elements/tool-group.js +71 -0
- package/dist/elements/tool-timeline.d.ts +65 -0
- package/dist/elements/tool-timeline.js +88 -0
- package/dist/elements/trace-waterfall.d.ts +37 -0
- package/dist/elements/trace-waterfall.js +69 -0
- package/dist/elements/transcript-rules.d.ts +67 -0
- package/dist/elements/transcript-rules.js +95 -0
- package/dist/elements/turn-footer.d.ts +74 -0
- package/dist/elements/turn-footer.js +101 -0
- package/dist/elements/typing-indicator.d.ts +16 -0
- package/dist/elements/typing-indicator.js +51 -0
- package/dist/elements/verdict-row.d.ts +89 -0
- package/dist/elements/verdict-row.js +150 -0
- package/dist/elements/vocabulary.d.ts +612 -0
- package/dist/elements/vocabulary.js +611 -0
- package/dist/elements/voice-conversation.d.ts +49 -0
- package/dist/elements/voice-conversation.js +123 -0
- package/dist/elements/web-preview.d.ts +32 -0
- package/dist/elements/web-preview.js +66 -0
- package/dist/elements/web-search.d.ts +37 -0
- package/dist/elements/web-search.js +66 -0
- package/dist/elements/work-collapse.d.ts +103 -0
- package/dist/elements/work-collapse.js +131 -0
- package/dist/flow/_frame.d.ts +52 -0
- package/dist/flow/_frame.js +38 -0
- package/dist/flow/controls.d.ts +41 -0
- package/dist/flow/controls.js +53 -0
- package/dist/flow/flow.css +121 -0
- package/dist/flow/handles.d.ts +40 -0
- package/dist/flow/handles.js +61 -0
- package/dist/flow/index.d.ts +7 -0
- package/dist/flow/index.js +7 -0
- package/dist/flow/node-card.d.ts +71 -0
- package/dist/flow/node-card.js +102 -0
- package/dist/flow/signal-edge.d.ts +60 -0
- package/dist/flow/signal-edge.js +108 -0
- package/dist/flow/use-flow-theme.d.ts +69 -0
- package/dist/flow/use-flow-theme.js +109 -0
- package/dist/forms/_chassis.d.ts +164 -0
- package/dist/forms/_chassis.js +159 -0
- package/dist/forms/_glyphs.js +143 -0
- package/dist/forms/_listbox.js +55 -0
- package/dist/forms/autocomplete.d.ts +61 -0
- package/dist/forms/autocomplete.js +88 -0
- package/dist/forms/button-group.d.ts +47 -0
- package/dist/forms/button-group.js +52 -0
- package/dist/forms/checkbox.d.ts +51 -0
- package/dist/forms/checkbox.js +98 -0
- package/dist/forms/combobox.d.ts +73 -0
- package/dist/forms/combobox.js +108 -0
- package/dist/forms/env-var-input.d.ts +74 -0
- package/dist/forms/env-var-input.js +116 -0
- package/dist/forms/field.d.ts +89 -0
- package/dist/forms/field.js +102 -0
- package/dist/forms/file-upload.d.ts +113 -0
- package/dist/forms/file-upload.js +232 -0
- package/dist/forms/index.d.ts +26 -0
- package/dist/forms/index.js +26 -0
- package/dist/forms/input-group.d.ts +36 -0
- package/dist/forms/input-group.js +59 -0
- package/dist/forms/input.d.ts +45 -0
- package/dist/forms/input.js +36 -0
- package/dist/forms/multi-select.d.ts +62 -0
- package/dist/forms/multi-select.js +107 -0
- package/dist/forms/number-field.d.ts +39 -0
- package/dist/forms/number-field.js +65 -0
- package/dist/forms/otp-field.d.ts +54 -0
- package/dist/forms/otp-field.js +59 -0
- package/dist/forms/password-input.d.ts +46 -0
- package/dist/forms/password-input.js +62 -0
- package/dist/forms/radio-group.d.ts +50 -0
- package/dist/forms/radio-group.js +64 -0
- package/dist/forms/rating.d.ts +69 -0
- package/dist/forms/rating.js +103 -0
- package/dist/forms/scrub-input.d.ts +81 -0
- package/dist/forms/scrub-input.js +249 -0
- package/dist/forms/search-input.d.ts +54 -0
- package/dist/forms/search-input.js +112 -0
- package/dist/forms/select.d.ts +75 -0
- package/dist/forms/select.js +91 -0
- package/dist/forms/slider.d.ts +44 -0
- package/dist/forms/slider.js +65 -0
- package/dist/forms/switch.d.ts +36 -0
- package/dist/forms/switch.js +71 -0
- package/dist/forms/tags-input.d.ts +69 -0
- package/dist/forms/tags-input.js +148 -0
- package/dist/forms/textarea.d.ts +39 -0
- package/dist/forms/textarea.js +37 -0
- package/dist/forms/toggle-group.d.ts +41 -0
- package/dist/forms/toggle-group.js +56 -0
- package/dist/forms/toggle.d.ts +47 -0
- package/dist/forms/toggle.js +100 -0
- package/dist/icons/containers.d.ts +89 -0
- package/dist/icons/containers.js +295 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/index.d.ts +138 -0
- package/dist/index.js +124 -0
- package/dist/instruments/_ansi.js +116 -0
- package/dist/instruments/_data-row.d.ts +68 -0
- package/dist/instruments/_data-row.js +139 -0
- package/dist/instruments/_glyphs.js +90 -0
- package/dist/instruments/_ledger-disclosure.js +103 -0
- package/dist/instruments/_ledger.d.ts +21 -0
- package/dist/instruments/_ledger.js +5 -0
- package/dist/instruments/_motion.js +56 -0
- package/dist/instruments/_rem.js +21 -0
- package/dist/instruments/app-window-frame.d.ts +48 -0
- package/dist/instruments/app-window-frame.js +76 -0
- package/dist/instruments/code-block.d.ts +35 -0
- package/dist/instruments/code-block.js +173 -0
- package/dist/instruments/copy-button.d.ts +41 -0
- package/dist/instruments/copy-button.js +112 -0
- package/dist/instruments/data-row.d.ts +94 -0
- package/dist/instruments/data-row.js +151 -0
- package/dist/instruments/data-table.d.ts +168 -0
- package/dist/instruments/data-table.js +212 -0
- package/dist/instruments/data-tree.d.ts +126 -0
- package/dist/instruments/data-tree.js +303 -0
- package/dist/instruments/group-bar.d.ts +63 -0
- package/dist/instruments/group-bar.js +122 -0
- package/dist/instruments/index.d.ts +18 -0
- package/dist/instruments/index.js +18 -0
- package/dist/instruments/ledger.d.ts +204 -0
- package/dist/instruments/ledger.js +204 -0
- package/dist/instruments/log-viewer.d.ts +74 -0
- package/dist/instruments/log-viewer.js +215 -0
- package/dist/instruments/meter.d.ts +81 -0
- package/dist/instruments/meter.js +96 -0
- package/dist/instruments/progress.d.ts +61 -0
- package/dist/instruments/progress.js +79 -0
- package/dist/instruments/seam-grid.d.ts +66 -0
- package/dist/instruments/seam-grid.js +78 -0
- package/dist/instruments/sparkline.d.ts +39 -0
- package/dist/instruments/sparkline.js +85 -0
- package/dist/instruments/stat.d.ts +35 -0
- package/dist/instruments/stat.js +59 -0
- package/dist/instruments/table.d.ts +170 -0
- package/dist/instruments/table.js +237 -0
- package/dist/instruments/terminal-frame.d.ts +89 -0
- package/dist/instruments/terminal-frame.js +256 -0
- package/dist/instruments/two-step-button.d.ts +47 -0
- package/dist/instruments/two-step-button.js +166 -0
- package/dist/instruments/usage-chart.d.ts +55 -0
- package/dist/instruments/usage-chart.js +235 -0
- package/dist/layout/_collapse.js +46 -0
- package/dist/layout/_glyphs.js +45 -0
- package/dist/layout/_ground.d.ts +22 -0
- package/dist/layout/_ground.js +9 -0
- package/dist/layout/accordion.d.ts +52 -0
- package/dist/layout/accordion.js +81 -0
- package/dist/layout/bento.d.ts +144 -0
- package/dist/layout/bento.js +266 -0
- package/dist/layout/breadcrumb.d.ts +35 -0
- package/dist/layout/breadcrumb.js +67 -0
- package/dist/layout/card.d.ts +51 -0
- package/dist/layout/card.js +76 -0
- package/dist/layout/carousel.d.ts +96 -0
- package/dist/layout/carousel.js +211 -0
- package/dist/layout/collapsible.d.ts +74 -0
- package/dist/layout/collapsible.js +126 -0
- package/dist/layout/container.d.ts +27 -0
- package/dist/layout/container.js +43 -0
- package/dist/layout/description-list.d.ts +24 -0
- package/dist/layout/description-list.js +37 -0
- package/dist/layout/frames.d.ts +70 -0
- package/dist/layout/frames.js +298 -0
- package/dist/layout/grid.d.ts +40 -0
- package/dist/layout/grid.js +48 -0
- package/dist/layout/index.d.ts +19 -0
- package/dist/layout/index.js +18 -0
- package/dist/layout/item.d.ts +65 -0
- package/dist/layout/item.js +100 -0
- package/dist/layout/link.d.ts +48 -0
- package/dist/layout/link.js +63 -0
- package/dist/layout/pagination.d.ts +54 -0
- package/dist/layout/pagination.js +121 -0
- package/dist/layout/preview.d.ts +177 -0
- package/dist/layout/preview.js +628 -0
- package/dist/layout/resizable.d.ts +38 -0
- package/dist/layout/resizable.js +68 -0
- package/dist/layout/sidebar.d.ts +105 -0
- package/dist/layout/sidebar.js +158 -0
- package/dist/layout/stack.d.ts +46 -0
- package/dist/layout/stack.js +62 -0
- package/dist/layout/stepper.d.ts +49 -0
- package/dist/layout/stepper.js +81 -0
- package/dist/layout/timeline.d.ts +43 -0
- package/dist/layout/timeline.js +63 -0
- package/dist/lib/aria-class.js +24 -0
- package/dist/lib/cn.js +18 -0
- package/dist/lib/compose.js +38 -0
- package/dist/lib/cva.d.ts +18 -0
- package/dist/lib/cva.js +65 -0
- package/dist/midi/_notes.d.ts +101 -0
- package/dist/midi/_notes.js +183 -0
- package/dist/midi/_ruler.d.ts +100 -0
- package/dist/midi/_ruler.js +105 -0
- package/dist/midi/_time.d.ts +107 -0
- package/dist/midi/_time.js +130 -0
- package/dist/midi/index.d.ts +9 -0
- package/dist/midi/index.js +9 -0
- package/dist/midi/musical-time-input.d.ts +48 -0
- package/dist/midi/musical-time-input.js +154 -0
- package/dist/midi/piano-keyboard.d.ts +50 -0
- package/dist/midi/piano-keyboard.js +197 -0
- package/dist/midi/spectrum-visualizer.d.ts +65 -0
- package/dist/midi/spectrum-visualizer.js +213 -0
- package/dist/midi/threshold-rail.d.ts +72 -0
- package/dist/midi/threshold-rail.js +214 -0
- package/dist/midi/timeline-ruler.d.ts +83 -0
- package/dist/midi/timeline-ruler.js +152 -0
- package/dist/overlays/_debounce.js +34 -0
- package/dist/overlays/_glyphs.js +59 -0
- package/dist/overlays/_surface.d.ts +70 -0
- package/dist/overlays/_surface.js +70 -0
- package/dist/overlays/_wheel.js +42 -0
- package/dist/overlays/alert-dialog.d.ts +67 -0
- package/dist/overlays/alert-dialog.js +117 -0
- package/dist/overlays/command-palette.d.ts +93 -0
- package/dist/overlays/command-palette.js +193 -0
- package/dist/overlays/context-menu.d.ts +64 -0
- package/dist/overlays/context-menu.js +78 -0
- package/dist/overlays/dialog.d.ts +72 -0
- package/dist/overlays/dialog.js +124 -0
- package/dist/overlays/drawer.d.ts +75 -0
- package/dist/overlays/drawer.js +151 -0
- package/dist/overlays/dropdown-menu.d.ts +79 -0
- package/dist/overlays/dropdown-menu.js +156 -0
- package/dist/overlays/hover-card.d.ts +58 -0
- package/dist/overlays/hover-card.js +91 -0
- package/dist/overlays/index.d.ts +15 -0
- package/dist/overlays/index.js +15 -0
- package/dist/overlays/info-tip.d.ts +41 -0
- package/dist/overlays/info-tip.js +45 -0
- package/dist/overlays/menubar.d.ts +72 -0
- package/dist/overlays/menubar.js +100 -0
- package/dist/overlays/popover.d.ts +66 -0
- package/dist/overlays/popover.js +114 -0
- package/dist/overlays/sheet.d.ts +78 -0
- package/dist/overlays/sheet.js +131 -0
- package/dist/overlays/toast.d.ts +106 -0
- package/dist/overlays/toast.js +146 -0
- package/dist/overlays/tooltip.d.ts +57 -0
- package/dist/overlays/tooltip.js +95 -0
- package/dist/primitives/avatar.d.ts +51 -0
- package/dist/primitives/avatar.js +93 -0
- package/dist/primitives/button.d.ts +58 -0
- package/dist/primitives/button.js +104 -0
- package/dist/primitives/chip.d.ts +73 -0
- package/dist/primitives/chip.js +238 -0
- package/dist/primitives/icon-button.d.ts +41 -0
- package/dist/primitives/icon-button.js +59 -0
- package/dist/primitives/index.d.ts +10 -0
- package/dist/primitives/index.js +10 -0
- package/dist/primitives/kbd.d.ts +17 -0
- package/dist/primitives/kbd.js +24 -0
- package/dist/primitives/separator.d.ts +25 -0
- package/dist/primitives/separator.js +30 -0
- package/dist/primitives/skeleton.d.ts +20 -0
- package/dist/primitives/skeleton.js +27 -0
- package/dist/primitives/spinner.d.ts +26 -0
- package/dist/primitives/spinner.js +31 -0
- package/dist/primitives/status-dot.d.ts +51 -0
- package/dist/primitives/status-dot.js +57 -0
- package/dist/styles.css +97 -0
- package/dist/system/agent-skin.d.ts +27 -0
- package/dist/system/agent-skin.js +20 -0
- package/dist/system/density.d.ts +73 -0
- package/dist/system/density.js +111 -0
- package/dist/system/index.d.ts +12 -0
- package/dist/system/index.js +10 -0
- package/dist/system/overrides.d.ts +80 -0
- package/dist/system/overrides.js +277 -0
- package/dist/system/portal.d.ts +56 -0
- package/dist/system/portal.js +193 -0
- package/dist/system/prepaint.d.ts +134 -0
- package/dist/system/prepaint.js +120 -0
- package/dist/system/theme-provider.d.ts +290 -0
- package/dist/system/theme-provider.js +543 -0
- package/dist/system/theme-registry.d.ts +53 -0
- package/dist/system/theme-registry.js +66 -0
- package/dist/system/use-density.d.ts +50 -0
- package/dist/system/use-density.js +232 -0
- package/dist/system/use-isomorphic-layout-effect.js +33 -0
- package/dist/system/use-theme.d.ts +30 -0
- package/dist/system/use-theme.js +36 -0
- package/dist/system/vocabulary.d.ts +16 -0
- package/dist/system/vocabulary.js +125 -0
- package/dist/theming/contrast.d.ts +2 -0
- package/dist/theming/contrast.js +2 -0
- package/dist/theming/create-theme.d.ts +195 -0
- package/dist/theming/create-theme.js +524 -0
- package/dist/theming/index.d.ts +4 -0
- package/dist/theming/index.js +4 -0
- package/dist/theming/serialize.d.ts +167 -0
- package/dist/theming/serialize.js +241 -0
- package/manifest/components/accordion.json +173 -0
- package/manifest/components/activity-graph.json +104 -0
- package/manifest/components/agent-card.json +150 -0
- package/manifest/components/agent-handoff.json +104 -0
- package/manifest/components/agent-mode-badge.json +102 -0
- package/manifest/components/agent-pile.json +147 -0
- package/manifest/components/agent-plan.json +74 -0
- package/manifest/components/agent-status.json +87 -0
- package/manifest/components/agent-surface.json +93 -0
- package/manifest/components/alert-dialog.json +215 -0
- package/manifest/components/animated-number.json +75 -0
- package/manifest/components/app-bar.json +297 -0
- package/manifest/components/app-shell.json +526 -0
- package/manifest/components/app-window-frame.json +124 -0
- package/manifest/components/approval-card.json +136 -0
- package/manifest/components/artifact-card.json +93 -0
- package/manifest/components/ask-box.json +288 -0
- package/manifest/components/audience-icon.json +46 -0
- package/manifest/components/autocomplete.json +262 -0
- package/manifest/components/avatar-group.json +83 -0
- package/manifest/components/avatar.json +113 -0
- package/manifest/components/background-inbox.json +79 -0
- package/manifest/components/band.json +104 -0
- package/manifest/components/bento.json +306 -0
- package/manifest/components/branch-picker.json +146 -0
- package/manifest/components/breadcrumb.json +85 -0
- package/manifest/components/button-group.json +91 -0
- package/manifest/components/button.json +163 -0
- package/manifest/components/calendar.json +65 -0
- package/manifest/components/canvas-split-body.json +66 -0
- package/manifest/components/canvas-split-document.json +55 -0
- package/manifest/components/canvas-split-header.json +97 -0
- package/manifest/components/canvas-split-line.json +66 -0
- package/manifest/components/canvas-split-message.json +70 -0
- package/manifest/components/canvas-split-thread.json +55 -0
- package/manifest/components/canvas-split.json +61 -0
- package/manifest/components/card.json +152 -0
- package/manifest/components/carousel.json +242 -0
- package/manifest/components/catalogue-icon.json +46 -0
- package/manifest/components/channel-beta-icon.json +46 -0
- package/manifest/components/channel-matrix.json +239 -0
- package/manifest/components/channel-released-icon.json +46 -0
- package/manifest/components/chart-container.json +127 -0
- package/manifest/components/chart-ramp.json +82 -0
- package/manifest/components/chart-swatch.json +72 -0
- package/manifest/components/chart-tooltip-content.json +140 -0
- package/manifest/components/chart.json +117 -0
- package/manifest/components/chat-empty-state.json +55 -0
- package/manifest/components/chat-panel-assistant-message.json +52 -0
- package/manifest/components/chat-panel-composer.json +74 -0
- package/manifest/components/chat-panel-messages.json +52 -0
- package/manifest/components/chat-panel-typing.json +52 -0
- package/manifest/components/chat-panel-user-message.json +52 -0
- package/manifest/components/chat-panel.json +58 -0
- package/manifest/components/checkbox-group.json +70 -0
- package/manifest/components/checkbox.json +106 -0
- package/manifest/components/checkpoint-history.json +91 -0
- package/manifest/components/chip.json +174 -0
- package/manifest/components/clamp.json +125 -0
- package/manifest/components/cli-tool-icon.json +46 -0
- package/manifest/components/code-block.json +107 -0
- package/manifest/components/code-diff.json +104 -0
- package/manifest/components/code-runner.json +124 -0
- package/manifest/components/collapsible.json +133 -0
- package/manifest/components/color-area.json +62 -0
- package/manifest/components/color-field.json +91 -0
- package/manifest/components/color-picker.json +235 -0
- package/manifest/components/color-slider.json +84 -0
- package/manifest/components/color-swatch.json +79 -0
- package/manifest/components/colors-section.json +70 -0
- package/manifest/components/combobox.json +265 -0
- package/manifest/components/command-palette.json +222 -0
- package/manifest/components/compaction-row.json +128 -0
- package/manifest/components/comparison-card.json +98 -0
- package/manifest/components/composer-actions.json +65 -0
- package/manifest/components/composer-attach-button.json +65 -0
- package/manifest/components/composer-attachment-chip.json +83 -0
- package/manifest/components/composer-attachments.json +60 -0
- package/manifest/components/composer-bar.json +76 -0
- package/manifest/components/composer-command-item.json +85 -0
- package/manifest/components/composer-context.json +71 -0
- package/manifest/components/composer-input.json +77 -0
- package/manifest/components/composer-menu-item.json +75 -0
- package/manifest/components/composer-menu.json +89 -0
- package/manifest/components/composer-model-item.json +82 -0
- package/manifest/components/composer-model-trigger.json +81 -0
- package/manifest/components/composer-person-item.json +86 -0
- package/manifest/components/composer-send.json +86 -0
- package/manifest/components/composer-toolbar.json +65 -0
- package/manifest/components/composer-voice-button.json +71 -0
- package/manifest/components/composer-voice.json +81 -0
- package/manifest/components/composer.json +238 -0
- package/manifest/components/computer-use.json +98 -0
- package/manifest/components/confidence-marker.json +86 -0
- package/manifest/components/connection-state.json +103 -0
- package/manifest/components/container.json +75 -0
- package/manifest/components/context-breakdown.json +72 -0
- package/manifest/components/context-menu.json +134 -0
- package/manifest/components/context-usage.json +98 -0
- package/manifest/components/conversation-search.json +111 -0
- package/manifest/components/copy-button.json +118 -0
- package/manifest/components/cost-meter.json +84 -0
- package/manifest/components/cue-logotype.json +110 -0
- package/manifest/components/cue-mark.json +111 -0
- package/manifest/components/cue-portal-frame.json +65 -0
- package/manifest/components/data-row.json +222 -0
- package/manifest/components/data-table-pagination.json +97 -0
- package/manifest/components/data-table-toolbar.json +127 -0
- package/manifest/components/data-tree.json +185 -0
- package/manifest/components/date-field.json +93 -0
- package/manifest/components/date-picker.json +255 -0
- package/manifest/components/date-range-picker.json +255 -0
- package/manifest/components/day-separator.json +63 -0
- package/manifest/components/delegation-card.json +196 -0
- package/manifest/components/density.json +93 -0
- package/manifest/components/description-list.json +91 -0
- package/manifest/components/diagram.json +126 -0
- package/manifest/components/dialog.json +222 -0
- package/manifest/components/disclosure.json +134 -0
- package/manifest/components/dmx-bar.json +107 -0
- package/manifest/components/dmx-strip.json +117 -0
- package/manifest/components/document-reference.json +108 -0
- package/manifest/components/draft-restore.json +96 -0
- package/manifest/components/drawer.json +204 -0
- package/manifest/components/dropdown-menu.json +275 -0
- package/manifest/components/edit-message.json +131 -0
- package/manifest/components/elements-command-palette.json +122 -0
- package/manifest/components/elements-composer.json +71 -0
- package/manifest/components/elements-data-table.json +75 -0
- package/manifest/components/elements-timeline.json +77 -0
- package/manifest/components/elicitation-form.json +130 -0
- package/manifest/components/empty-state-composer.json +71 -0
- package/manifest/components/empty-state-greeting.json +49 -0
- package/manifest/components/empty-state-suggestion.json +60 -0
- package/manifest/components/empty-state-suggestions.json +49 -0
- package/manifest/components/empty-state.json +111 -0
- package/manifest/components/end-of-turn-summary.json +89 -0
- package/manifest/components/env-var-input.json +194 -0
- package/manifest/components/error-state.json +93 -0
- package/manifest/components/export-dialog.json +101 -0
- package/manifest/components/eyebrow.json +59 -0
- package/manifest/components/feedback-dialog.json +133 -0
- package/manifest/components/field-description.json +66 -0
- package/manifest/components/field-error.json +87 -0
- package/manifest/components/field-label.json +66 -0
- package/manifest/components/field.json +82 -0
- package/manifest/components/file-tree.json +96 -0
- package/manifest/components/file-upload.json +204 -0
- package/manifest/components/flow-background.json +50 -0
- package/manifest/components/flow-controls.json +50 -0
- package/manifest/components/flow-graph.json +86 -0
- package/manifest/components/folder-icon.json +46 -0
- package/manifest/components/footer.json +133 -0
- package/manifest/components/frac.json +68 -0
- package/manifest/components/frames.json +210 -0
- package/manifest/components/generation-loader.json +78 -0
- package/manifest/components/generative-ui.json +125 -0
- package/manifest/components/grid.json +132 -0
- package/manifest/components/group-bar.json +122 -0
- package/manifest/components/guardrail-notice.json +109 -0
- package/manifest/components/hover-card.json +189 -0
- package/manifest/components/icon-button.json +106 -0
- package/manifest/components/image-generation.json +73 -0
- package/manifest/components/info-tip.json +133 -0
- package/manifest/components/inline-citation.json +90 -0
- package/manifest/components/input-group.json +112 -0
- package/manifest/components/input.json +121 -0
- package/manifest/components/inspector.json +199 -0
- package/manifest/components/item.json +163 -0
- package/manifest/components/job-progress.json +116 -0
- package/manifest/components/kbd.json +52 -0
- package/manifest/components/launcher-bubble.json +130 -0
- package/manifest/components/ledger.json +330 -0
- package/manifest/components/link.json +94 -0
- package/manifest/components/live-region-announcer.json +95 -0
- package/manifest/components/log-viewer.json +172 -0
- package/manifest/components/map-answer.json +97 -0
- package/manifest/components/markdown-text.json +126 -0
- package/manifest/components/math-block.json +84 -0
- package/manifest/components/mcp-server-icon.json +46 -0
- package/manifest/components/mcp-server-panel.json +102 -0
- package/manifest/components/memory-chips.json +73 -0
- package/manifest/components/menubar.json +184 -0
- package/manifest/components/message-actions.json +125 -0
- package/manifest/components/message-attachments.json +71 -0
- package/manifest/components/message-branches.json +83 -0
- package/manifest/components/message-list.json +121 -0
- package/manifest/components/message-pair.json +107 -0
- package/manifest/components/message-queue.json +85 -0
- package/manifest/components/message-timing.json +69 -0
- package/manifest/components/message.json +149 -0
- package/manifest/components/meter.json +150 -0
- package/manifest/components/mobile-composer.json +163 -0
- package/manifest/components/model-picker.json +87 -0
- package/manifest/components/multi-select.json +255 -0
- package/manifest/components/musical-time-input.json +141 -0
- package/manifest/components/navigation-menu.json +269 -0
- package/manifest/components/node-card.json +144 -0
- package/manifest/components/node-handle.json +84 -0
- package/manifest/components/number-field.json +131 -0
- package/manifest/components/number-ticker.json +67 -0
- package/manifest/components/onboarding.json +100 -0
- package/manifest/components/otp-field.json +163 -0
- package/manifest/components/page-shell.json +129 -0
- package/manifest/components/pagination.json +108 -0
- package/manifest/components/panel-header.json +89 -0
- package/manifest/components/panel.json +71 -0
- package/manifest/components/password-input.json +171 -0
- package/manifest/components/permission-grant.json +115 -0
- package/manifest/components/permission-scopes.json +184 -0
- package/manifest/components/piano-keyboard.json +149 -0
- package/manifest/components/plussie.json +140 -0
- package/manifest/components/popover.json +231 -0
- package/manifest/components/preset-section.json +80 -0
- package/manifest/components/preview.json +294 -0
- package/manifest/components/progress.json +114 -0
- package/manifest/components/prompt-library.json +122 -0
- package/manifest/components/queue-dock.json +139 -0
- package/manifest/components/quota-banner.json +113 -0
- package/manifest/components/quote-reply.json +129 -0
- package/manifest/components/radio-group.json +83 -0
- package/manifest/components/radio.json +94 -0
- package/manifest/components/rating.json +188 -0
- package/manifest/components/read-aloud.json +139 -0
- package/manifest/components/reasoning-effort.json +95 -0
- package/manifest/components/reasoning-panel.json +135 -0
- package/manifest/components/recommendation-card.json +133 -0
- package/manifest/components/regenerate-menu.json +107 -0
- package/manifest/components/replay-player.json +124 -0
- package/manifest/components/research-report.json +87 -0
- package/manifest/components/resizable.json +91 -0
- package/manifest/components/retrieval-chunks.json +98 -0
- package/manifest/components/revert-dock.json +197 -0
- package/manifest/components/reviewable-diff.json +113 -0
- package/manifest/components/risk-badge.json +89 -0
- package/manifest/components/row.json +122 -0
- package/manifest/components/schedule-card.json +121 -0
- package/manifest/components/score-breakdown.json +108 -0
- package/manifest/components/scroll-anchor.json +84 -0
- package/manifest/components/scroll-area.json +114 -0
- package/manifest/components/scrollable-tabs-list.json +91 -0
- package/manifest/components/scrub-input.json +268 -0
- package/manifest/components/seam-cell.json +91 -0
- package/manifest/components/seam-grid.json +84 -0
- package/manifest/components/seam-list.json +56 -0
- package/manifest/components/search-input.json +195 -0
- package/manifest/components/section-header.json +140 -0
- package/manifest/components/segmented-control.json +178 -0
- package/manifest/components/select.json +253 -0
- package/manifest/components/separator.json +56 -0
- package/manifest/components/settings-panel.json +152 -0
- package/manifest/components/shape-section.json +70 -0
- package/manifest/components/shared-conversation.json +107 -0
- package/manifest/components/sheet.json +210 -0
- package/manifest/components/shimmer-label.json +61 -0
- package/manifest/components/sidebar.json +245 -0
- package/manifest/components/signal-edge.json +56 -0
- package/manifest/components/skeleton.json +46 -0
- package/manifest/components/skill-icon.json +46 -0
- package/manifest/components/slider.json +106 -0
- package/manifest/components/sources.json +97 -0
- package/manifest/components/sparkline.json +89 -0
- package/manifest/components/speaker-identity.json +66 -0
- package/manifest/components/spec-sheet.json +93 -0
- package/manifest/components/spectrum-visualizer.json +147 -0
- package/manifest/components/spinner.json +71 -0
- package/manifest/components/stack-icon.json +46 -0
- package/manifest/components/stack.json +143 -0
- package/manifest/components/stacks-matrix-icon.json +46 -0
- package/manifest/components/stat.json +111 -0
- package/manifest/components/status-bar.json +233 -0
- package/manifest/components/status-dot.json +97 -0
- package/manifest/components/stepper.json +107 -0
- package/manifest/components/stopped-run.json +97 -0
- package/manifest/components/streaming-text.json +82 -0
- package/manifest/components/sub.json +45 -0
- package/manifest/components/subagent-list.json +106 -0
- package/manifest/components/suggestions.json +106 -0
- package/manifest/components/sup.json +45 -0
- package/manifest/components/swap-label.json +86 -0
- package/manifest/components/switch.json +102 -0
- package/manifest/components/table-scroll-region.json +78 -0
- package/manifest/components/table.json +306 -0
- package/manifest/components/tabs.json +156 -0
- package/manifest/components/tags-input.json +255 -0
- package/manifest/components/tail-status.json +138 -0
- package/manifest/components/terminal-block.json +111 -0
- package/manifest/components/terminal-frame.json +146 -0
- package/manifest/components/textarea.json +104 -0
- package/manifest/components/theme-configurator.json +158 -0
- package/manifest/components/theme-provider.json +228 -0
- package/manifest/components/thinking-indicator.json +69 -0
- package/manifest/components/thread-list.json +87 -0
- package/manifest/components/thread-search.json +108 -0
- package/manifest/components/threshold-rail.json +223 -0
- package/manifest/components/time-boundary.json +68 -0
- package/manifest/components/time-field.json +93 -0
- package/manifest/components/timeline-ruler.json +178 -0
- package/manifest/components/timeline.json +131 -0
- package/manifest/components/title-bar.json +97 -0
- package/manifest/components/toast.json +140 -0
- package/manifest/components/todo-list.json +76 -0
- package/manifest/components/toggle-group.json +134 -0
- package/manifest/components/toggle.json +140 -0
- package/manifest/components/token-editor.json +106 -0
- package/manifest/components/tool-call-card.json +268 -0
- package/manifest/components/tool-call.json +147 -0
- package/manifest/components/tool-error.json +141 -0
- package/manifest/components/tool-group.json +97 -0
- package/manifest/components/tool-timeline.json +147 -0
- package/manifest/components/toolbar.json +192 -0
- package/manifest/components/tooltip.json +199 -0
- package/manifest/components/trace-waterfall.json +84 -0
- package/manifest/components/tree-visibility-toggle.json +99 -0
- package/manifest/components/tree.json +182 -0
- package/manifest/components/turn-footer.json +133 -0
- package/manifest/components/two-step-button.json +150 -0
- package/manifest/components/typing-indicator.json +60 -0
- package/manifest/components/universe-grid.json +155 -0
- package/manifest/components/unread-divider.json +58 -0
- package/manifest/components/usage-chart.json +162 -0
- package/manifest/components/verdict-row.json +106 -0
- package/manifest/components/voice-conversation.json +141 -0
- package/manifest/components/web-preview.json +105 -0
- package/manifest/components/web-search.json +108 -0
- package/manifest/components/work-collapse.json +125 -0
- package/manifest/fixtures.json +776 -0
- package/manifest/manifest.json +5037 -0
- package/manifest/tokens.json +288 -0
- package/package.json +278 -0
|
@@ -0,0 +1,628 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { useIsomorphicLayoutEffect } from "../system/use-isomorphic-layout-effect.js";
|
|
4
|
+
import { AmbientThemeContext, DensityContext, StyleSetContext } from "../system/density.js";
|
|
5
|
+
import { OverridesContext } from "../system/overrides.js";
|
|
6
|
+
import { ThemeContext } from "../system/theme-provider.js";
|
|
7
|
+
import { GROUND_CLASSES } from "./_ground.js";
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
//#region src/layout/preview.tsx
|
|
11
|
+
const RESIZE_DEFAULTS = {
|
|
12
|
+
axis: "both",
|
|
13
|
+
minWidth: 160,
|
|
14
|
+
maxWidth: 1280,
|
|
15
|
+
minHeight: 96,
|
|
16
|
+
maxHeight: 960
|
|
17
|
+
};
|
|
18
|
+
/** One arrow press, in px, and one Shift+arrow press. */
|
|
19
|
+
const STEP = 8;
|
|
20
|
+
const BIG_STEP = 64;
|
|
21
|
+
const ROOT_CLASS = "relative flex min-w-0 flex-col rounded-(--radius-surface) border border-border bg-surface-1 text-fg";
|
|
22
|
+
const BENCH_CLASS = "relative flex min-w-0 flex-1 overflow-auto rounded-t-(--radius-surface)";
|
|
23
|
+
/**
|
|
24
|
+
* The stage: centred, grounded, and at least three top rungs of the space
|
|
25
|
+
* ladder tall so a preview reserves its room before its specimen arrives.
|
|
26
|
+
* Static literals, because Tailwind scans text.
|
|
27
|
+
*
|
|
28
|
+
* Centred **safely** (`place-items: safe center`): a specimen wider than the
|
|
29
|
+
* stage starts at the stage's edge and overflows at its end, where the bench
|
|
30
|
+
* scrolls to it. Plain `center` split the overflow across both sides, and the
|
|
31
|
+
* left half sat before the scroll origin, where nothing reaches it.
|
|
32
|
+
*
|
|
33
|
+
* **Three pieces rather than one literal, and the seam is where the ground
|
|
34
|
+
* goes.** `cn` preserves the order it is given, so a ground appended after the
|
|
35
|
+
* padding would emit the dot grid in a different place from the one every
|
|
36
|
+
* caller's markup has today — and `/`'s seventeen bare Previews and the group
|
|
37
|
+
* pages' 326 tooled ones are both measured to the byte. Head, ground, tail, in
|
|
38
|
+
* that order, is today's string.
|
|
39
|
+
*/
|
|
40
|
+
const STAGE_HEAD = "grid h-full w-full min-h-[calc(var(--cue-space-8)*3)] place-items-center-safe";
|
|
41
|
+
const STAGE_TAIL = "p-(--cue-space-6) text-fg";
|
|
42
|
+
/** Which ground a presentation paints when the caller names none (spec §4.1). */
|
|
43
|
+
const DEFAULT_GROUND = {
|
|
44
|
+
panel: "dots",
|
|
45
|
+
frame: "none"
|
|
46
|
+
};
|
|
47
|
+
const TOOLS_CLASS = "absolute top-(--cue-space-2) right-(--cue-space-2) z-10 flex items-center gap-px rounded-(--radius-control) border border-border bg-surface-2 p-px";
|
|
48
|
+
/**
|
|
49
|
+
* The room the tools take, kept clear on the stage — only when there are tools.
|
|
50
|
+
*
|
|
51
|
+
* The tools sit over the stage's top right, so a specimen that reached that
|
|
52
|
+
* corner sat under them, and its own controls there with it: the index's
|
|
53
|
+
* Calendar paged by an arrow the wrench was drawn over. So a Preview with tools
|
|
54
|
+
* pads its stage's top by the tools' whole depth — their offset, their height
|
|
55
|
+
* (an `sm` control, plus the one-pixel border and padding on each side), and one
|
|
56
|
+
* rung of space below them.
|
|
57
|
+
*
|
|
58
|
+
* **Declared on the bench and read on the stage**, because the two sit in
|
|
59
|
+
* different densities: the tools are drawn in the page's, and the stage may set
|
|
60
|
+
* its own. A custom property's `var()`s are resolved where it is declared, so
|
|
61
|
+
* the stage inherits the depth measured at the page's rung — a compact stage
|
|
62
|
+
* still clears tools drawn at the page's size. And **only with tools**: a bare
|
|
63
|
+
* Preview carries none of it, which is the one the docs' front page draws
|
|
64
|
+
* seventeen times under a byte ceiling.
|
|
65
|
+
*/
|
|
66
|
+
const TOOLS_RESERVE_BENCH = "[--preview-tools-clear:calc(var(--cue-space-2)*2+var(--cue-control-sm)+4px)]";
|
|
67
|
+
const TOOLS_RESERVE_STAGE = "pt-(--preview-tools-clear)";
|
|
68
|
+
const FOOTER_CLASS = "flex min-w-0 items-center gap-(--cue-space-2) border-t border-border px-(--cue-space-4) py-(--cue-space-2)";
|
|
69
|
+
/**
|
|
70
|
+
* A frame's root: no card, no border, no fill. The frame is a thing on a
|
|
71
|
+
* canvas, and the canvas is what paints. `shrink-0` because a canvas is a flex
|
|
72
|
+
* row that scrolls, and a frame that shrank to fit would defeat the scrolling.
|
|
73
|
+
*/
|
|
74
|
+
const FRAME_ROOT_CLASS = "relative flex min-w-0 shrink-0 flex-col gap-(--cue-space-2) text-fg";
|
|
75
|
+
/**
|
|
76
|
+
* A frame's footer: the same row as a panel's, without the rule across the top
|
|
77
|
+
* or the card's horizontal padding — there is no card for either to belong to.
|
|
78
|
+
*/
|
|
79
|
+
const FRAME_FOOTER_CLASS = "flex min-w-0 items-center gap-(--cue-space-2) text-(length:--cue-text-micro) text-fg-subtle";
|
|
80
|
+
/** The row above a frame's stage: the name (or its control), the count, and the tools. */
|
|
81
|
+
const FRAME_LABEL_CLASS = "flex min-w-0 items-center gap-(--cue-space-2) text-(length:--cue-text-label) text-fg-muted";
|
|
82
|
+
/** The name when the caller passed no control for it — the frame's `label`, as text. */
|
|
83
|
+
const FRAME_NAME_CLASS = "min-w-0 truncate font-mono text-(length:--cue-text-label) text-fg";
|
|
84
|
+
/** The count beside it: quieter, and never allowed to shrink the name's truncation away. */
|
|
85
|
+
const FRAME_COUNT_CLASS = "shrink-0 font-mono text-(length:--cue-text-micro) text-fg-subtle";
|
|
86
|
+
/**
|
|
87
|
+
* A frame's tools: pushed to the row's end, and carrying none of the panel's
|
|
88
|
+
* overlay chrome. A frame's stage is transparent, so a toolbar drawn over it
|
|
89
|
+
* would float on the canvas ground with nothing behind it (spec §4.1 Decision 2).
|
|
90
|
+
*/
|
|
91
|
+
const FRAME_TOOLS_CLASS = "ml-auto flex shrink-0 items-center gap-px";
|
|
92
|
+
/**
|
|
93
|
+
* The box that holds the bench and the four marks.
|
|
94
|
+
*
|
|
95
|
+
* One more element than the spec's Decision 3 priced, and it is not avoidable.
|
|
96
|
+
* The bench is `overflow-auto`: a mark positioned inside it is clipped at the
|
|
97
|
+
* padding box and scrolls with the content. The frame's root is no good either
|
|
98
|
+
* — its first child is the label row, so the root's top-left corner is the
|
|
99
|
+
* label's and not the stage's. So the frame gets one `relative` box whose
|
|
100
|
+
* borders are exactly the stage's, and the marks hang off that.
|
|
101
|
+
*/
|
|
102
|
+
const FRAME_BOX_CLASS = "relative flex min-w-0 flex-col";
|
|
103
|
+
/**
|
|
104
|
+
* Captions off, as properties the item reads rather than a prop each item takes.
|
|
105
|
+
*
|
|
106
|
+
* A reader turns captions off for a whole frame from its settings popover,
|
|
107
|
+
* never for one item — so the switch is on the frame and the item obeys it
|
|
108
|
+
* through inheritance.
|
|
109
|
+
*
|
|
110
|
+
* **`opacity: 0`, and deliberately not `visibility: hidden`.** §4.1 Decision 4
|
|
111
|
+
* refuses "removing a hidden caption from the accessibility tree", and
|
|
112
|
+
* `visibility: hidden` does exactly that — a browser drops such a node as
|
|
113
|
+
* surely as it drops a `display: none` one. Zero opacity keeps the box, so
|
|
114
|
+
* nothing re-flows, *and* keeps the caption announced, which is what the
|
|
115
|
+
* refusal is for: the caption is what names the specimen for a reader who
|
|
116
|
+
* cannot see the difference between two of them.
|
|
117
|
+
*
|
|
118
|
+
* **Two properties, declared together here so the pair is never half-applied.**
|
|
119
|
+
* Custom properties are untyped text: `opacity` wants a number and
|
|
120
|
+
* `pointer-events` wants a keyword, so one property cannot carry both. The
|
|
121
|
+
* second is what stops an unpainted caption being clicked, or a drag across the
|
|
122
|
+
* stage selecting words nobody can see.
|
|
123
|
+
*/
|
|
124
|
+
const CAPTIONS_OFF = "[--preview-captions:0] [--preview-captions-pe:none]";
|
|
125
|
+
/**
|
|
126
|
+
* One corner mark: an 11×11 box with a one-pixel cross drawn as two linear
|
|
127
|
+
* gradients — a vertical hairline and a horizontal one — so the mark is a
|
|
128
|
+
* background and not four more elements.
|
|
129
|
+
*
|
|
130
|
+
* Not a border and not an SVG. A border would have to be on the stage, and the
|
|
131
|
+
* stage is the theme island: a frame's chrome that moved with a stage theme is
|
|
132
|
+
* the one thing ruling 7 forbids.
|
|
133
|
+
*/
|
|
134
|
+
const CROSS_CLASS = "pointer-events-none absolute z-10 size-[11px] bg-[linear-gradient(var(--cue-fg-subtle),var(--cue-fg-subtle)),linear-gradient(var(--cue-fg-subtle),var(--cue-fg-subtle))] bg-[length:1px_11px,11px_1px] bg-[position:center,center] bg-no-repeat";
|
|
135
|
+
/** The four corners, each half outside the box so the cross straddles the corner. */
|
|
136
|
+
const CROSS_CORNERS = [
|
|
137
|
+
"-top-[5px] -left-[5px]",
|
|
138
|
+
"-top-[5px] -right-[5px]",
|
|
139
|
+
"-bottom-[5px] -left-[5px]",
|
|
140
|
+
"-bottom-[5px] -right-[5px]"
|
|
141
|
+
];
|
|
142
|
+
const GRIP_FOCUS = "touch-none outline-none hover:bg-(--cue-border-strong) focus-visible:bg-accent";
|
|
143
|
+
const GRIP_X_CLASS = `absolute top-0 right-0 z-10 h-full w-(--cue-space-2) cursor-col-resize ${GRIP_FOCUS}`;
|
|
144
|
+
const GRIP_Y_CLASS = `absolute bottom-0 left-0 z-10 h-(--cue-space-2) w-full cursor-row-resize ${GRIP_FOCUS}`;
|
|
145
|
+
const GRIP_CORNER_CLASS = "absolute right-0 bottom-0 z-20 size-(--cue-space-4) cursor-nwse-resize touch-none";
|
|
146
|
+
const READOUT_CLASS = "pointer-events-none absolute right-(--cue-space-5) bottom-(--cue-space-5) z-20 rounded-(--radius-control) bg-surface-3 px-(--cue-space-2) py-px font-mono text-(length:--cue-text-label) text-fg-muted";
|
|
147
|
+
function clamp(value, min, max) {
|
|
148
|
+
return Math.min(max, Math.max(min, value));
|
|
149
|
+
}
|
|
150
|
+
/** The bounds a `resizable` prop means, or `null` for a fixed stage. */
|
|
151
|
+
function resolveResize(resizable) {
|
|
152
|
+
if (resizable === void 0 || resizable === false) return null;
|
|
153
|
+
const given = resizable === true ? {} : resizable;
|
|
154
|
+
return {
|
|
155
|
+
axis: given.axis ?? RESIZE_DEFAULTS.axis,
|
|
156
|
+
minWidth: given.minWidth ?? RESIZE_DEFAULTS.minWidth,
|
|
157
|
+
maxWidth: given.maxWidth ?? RESIZE_DEFAULTS.maxWidth,
|
|
158
|
+
minHeight: given.minHeight ?? RESIZE_DEFAULTS.minHeight,
|
|
159
|
+
maxHeight: given.maxHeight ?? RESIZE_DEFAULTS.maxHeight
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* The room the stage has: the bench's inline size in whole px, measured at
|
|
164
|
+
* mount and again whenever a `ResizeObserver` says the bench changed — the
|
|
165
|
+
* viewport resizing, a grid track reflowing around it.
|
|
166
|
+
*
|
|
167
|
+
* `null` means "no bound from the room". That covers a fixed Preview, which
|
|
168
|
+
* measures and observes nothing, so a frame without `resizable` costs no
|
|
169
|
+
* observer. It covers a bench that measures 0, which is not laid out
|
|
170
|
+
* (`display: none`, detached, or jsdom). And it covers the first render, which
|
|
171
|
+
* is also the server's, so the markup a server writes and the first client
|
|
172
|
+
* render agree. A host with no `ResizeObserver` gets the measurement at mount
|
|
173
|
+
* and nothing after, as `elements/clamp.tsx` does.
|
|
174
|
+
*/
|
|
175
|
+
function useAvailableWidth(bench, enabled) {
|
|
176
|
+
const [available, setAvailable] = React.useState(null);
|
|
177
|
+
useIsomorphicLayoutEffect(() => {
|
|
178
|
+
const node = bench.current;
|
|
179
|
+
if (!enabled || node === null) return;
|
|
180
|
+
const measure = () => {
|
|
181
|
+
const width = Math.floor(node.getBoundingClientRect().width);
|
|
182
|
+
setAvailable(width > 0 ? width : null);
|
|
183
|
+
};
|
|
184
|
+
measure();
|
|
185
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
186
|
+
const observer = new ResizeObserver(measure);
|
|
187
|
+
observer.observe(node);
|
|
188
|
+
return () => observer.disconnect();
|
|
189
|
+
}, [bench, enabled]);
|
|
190
|
+
return available;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* The bounds in force: the given ones, with the widest narrowed to the room
|
|
194
|
+
* the bench has, so a stage never outgrows the frame — or the grid track — it
|
|
195
|
+
* sits in. A room narrower than `minWidth` brings the floor down with it,
|
|
196
|
+
* because a floor wider than the room is a stage that overhangs its tile.
|
|
197
|
+
* Height takes no bound from the room: a taller stage grows its frame.
|
|
198
|
+
*/
|
|
199
|
+
function effectiveBounds(options, available) {
|
|
200
|
+
if (available === null) return options;
|
|
201
|
+
const maxWidth = Math.min(options.maxWidth, available);
|
|
202
|
+
return {
|
|
203
|
+
...options,
|
|
204
|
+
maxWidth,
|
|
205
|
+
minWidth: Math.min(options.minWidth, maxWidth)
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* The attributes the stage carries — and, when nothing is asked, none at all.
|
|
210
|
+
*
|
|
211
|
+
* Inheriting is the *absence* of attributes, which is why every branch below
|
|
212
|
+
* is conditional. Three branches add a second attribute, each for a reason in
|
|
213
|
+
* the stylesheets rather than in taste.
|
|
214
|
+
*
|
|
215
|
+
* A theme's light block is the compound selector
|
|
216
|
+
* `[data-theme="t"][data-mode="light"]`, so a mode with no theme restates the
|
|
217
|
+
* page's theme on the same element. Read the other way, a theme with no mode
|
|
218
|
+
* repeats the page's mode. Otherwise the stage would match the theme's dark
|
|
219
|
+
* block under a light page, while every popup opened on it came up light:
|
|
220
|
+
* popups are stamped from the context `StageScope` publishes, which carries
|
|
221
|
+
* the page's mode.
|
|
222
|
+
*
|
|
223
|
+
* A theme's density overrides are addressed through `data-cue-theme`, the
|
|
224
|
+
* stamp `<Density>` writes, so a density names the nearest theme the same way.
|
|
225
|
+
*
|
|
226
|
+
* The style set adds no second attribute, and that is the difference worth
|
|
227
|
+
* writing down beside the three that do: a `[data-style]` block is a single
|
|
228
|
+
* attribute selector naming no other axis, so a set stamped alone matches on
|
|
229
|
+
* its own.
|
|
230
|
+
*/
|
|
231
|
+
function stageAttributes(asked, page) {
|
|
232
|
+
const attributes = {};
|
|
233
|
+
const scoped = asked.theme ?? (asked.mode === void 0 ? null : page?.theme ?? null);
|
|
234
|
+
if (scoped !== null) attributes["data-theme"] = scoped;
|
|
235
|
+
const moded = asked.mode ?? (asked.theme === void 0 ? void 0 : page?.mode);
|
|
236
|
+
if (moded !== void 0) attributes["data-mode"] = moded;
|
|
237
|
+
if (asked.density !== void 0) {
|
|
238
|
+
attributes["data-density"] = asked.density;
|
|
239
|
+
const nearest = asked.theme ?? page?.theme ?? null;
|
|
240
|
+
if (nearest !== null) attributes["data-cue-theme"] = nearest;
|
|
241
|
+
}
|
|
242
|
+
if (asked.font !== void 0) attributes["data-font"] = asked.font;
|
|
243
|
+
if (asked.styleSet !== void 0) attributes["data-style"] = asked.styleSet;
|
|
244
|
+
return attributes;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* The contexts the stage republishes, so an overlay opened on it follows it.
|
|
248
|
+
*
|
|
249
|
+
* `useCuePortalProps()` stamps a portal container from `ThemeContext` and
|
|
250
|
+
* `DensityContext`; a popup mounts on `<body>` and inherits nothing from the
|
|
251
|
+
* stage's DOM. So the stage's subtree reads a theme context with the stage's
|
|
252
|
+
* theme and mode, and a density context with the stage's rung. The tools and
|
|
253
|
+
* footer are outside this subtree, so what they open follows the page. A theme
|
|
254
|
+
* the provider did not register leaves `manifest` null, which is what
|
|
255
|
+
* `useTheme()` already reports for a name nobody registered.
|
|
256
|
+
*
|
|
257
|
+
* The style set travels with the density for the same reason and by the same
|
|
258
|
+
* route: `useCuePortalProps()` stamps a portal container from `StyleSetContext`,
|
|
259
|
+
* and a popup opened on the stage inherits nothing from the stage's DOM.
|
|
260
|
+
*/
|
|
261
|
+
function StageScope({ theme, mode, density, styleSet, children }) {
|
|
262
|
+
const outer = React.useContext(ThemeContext);
|
|
263
|
+
const outerOverrides = React.useContext(OverridesContext);
|
|
264
|
+
const outerDensity = React.useContext(DensityContext);
|
|
265
|
+
const outerAmbient = React.useContext(AmbientThemeContext);
|
|
266
|
+
const outerStyleSet = React.useContext(StyleSetContext);
|
|
267
|
+
const value = React.useMemo(() => {
|
|
268
|
+
if (outer === null || theme === void 0 && mode === void 0) return outer;
|
|
269
|
+
const scoped = theme ?? outer.theme;
|
|
270
|
+
return {
|
|
271
|
+
...outer,
|
|
272
|
+
theme: scoped,
|
|
273
|
+
manifest: scoped === outer.theme ? outer.manifest : null,
|
|
274
|
+
mode: mode ?? outer.mode,
|
|
275
|
+
resolvedMode: mode === "dark" || mode === "light" ? mode : outer.resolvedMode
|
|
276
|
+
};
|
|
277
|
+
}, [
|
|
278
|
+
outer,
|
|
279
|
+
theme,
|
|
280
|
+
mode
|
|
281
|
+
]);
|
|
282
|
+
const stamped = theme !== void 0 || mode !== void 0;
|
|
283
|
+
return /* @__PURE__ */ jsx(AmbientThemeContext.Provider, {
|
|
284
|
+
value: theme ?? outerAmbient,
|
|
285
|
+
children: /* @__PURE__ */ jsx(DensityContext.Provider, {
|
|
286
|
+
value: density ?? outerDensity,
|
|
287
|
+
children: /* @__PURE__ */ jsx(StyleSetContext.Provider, {
|
|
288
|
+
value: styleSet ?? outerStyleSet,
|
|
289
|
+
children: /* @__PURE__ */ jsx(OverridesContext.Provider, {
|
|
290
|
+
value: stamped ? null : outerOverrides,
|
|
291
|
+
children: /* @__PURE__ */ jsx(ThemeContext.Provider, {
|
|
292
|
+
value,
|
|
293
|
+
children
|
|
294
|
+
})
|
|
295
|
+
})
|
|
296
|
+
})
|
|
297
|
+
})
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* The stage's size: explicit per axis once a reader has moved it, and the size
|
|
302
|
+
* the layout gives it before that — `null` on an axis, which is also what a
|
|
303
|
+
* double-click returns an axis to.
|
|
304
|
+
*
|
|
305
|
+
* An axis nobody set is measured live, not once. Its value is what the grip
|
|
306
|
+
* announces on focus, before any key, and where the first key or drag starts
|
|
307
|
+
* from, so it has to follow the sizer at rest: the track widening under it, the
|
|
308
|
+
* specimen growing after mount (every listing specimen loads behind a
|
|
309
|
+
* skeleton), a Preview mounted hidden and shown later. Observing the bench is
|
|
310
|
+
* not enough for that. The bench reports a width, and a specimen that grows
|
|
311
|
+
* moves only the height, so the sizer is observed as well, for as long as any
|
|
312
|
+
* axis is unset.
|
|
313
|
+
*/
|
|
314
|
+
function useStageSize(options) {
|
|
315
|
+
const sizer = React.useRef(null);
|
|
316
|
+
const [width, setWidth] = React.useState(null);
|
|
317
|
+
const [height, setHeight] = React.useState(null);
|
|
318
|
+
const [natural, setNatural] = React.useState({
|
|
319
|
+
width: 0,
|
|
320
|
+
height: 0
|
|
321
|
+
});
|
|
322
|
+
const [drag, setDrag] = React.useState(null);
|
|
323
|
+
const enabled = options !== null;
|
|
324
|
+
const widthSet = width !== null;
|
|
325
|
+
const heightSet = height !== null;
|
|
326
|
+
useIsomorphicLayoutEffect(() => {
|
|
327
|
+
const node = sizer.current;
|
|
328
|
+
if (!enabled || node === null || widthSet && heightSet) return;
|
|
329
|
+
const measure = () => {
|
|
330
|
+
const rect = node.getBoundingClientRect();
|
|
331
|
+
setNatural((previous) => {
|
|
332
|
+
const next = {
|
|
333
|
+
width: widthSet ? previous.width : Math.round(rect.width),
|
|
334
|
+
height: heightSet ? previous.height : Math.round(rect.height)
|
|
335
|
+
};
|
|
336
|
+
return next.width === previous.width && next.height === previous.height ? previous : next;
|
|
337
|
+
});
|
|
338
|
+
};
|
|
339
|
+
measure();
|
|
340
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
341
|
+
const observer = new ResizeObserver(measure);
|
|
342
|
+
observer.observe(node);
|
|
343
|
+
return () => observer.disconnect();
|
|
344
|
+
}, [
|
|
345
|
+
enabled,
|
|
346
|
+
widthSet,
|
|
347
|
+
heightSet
|
|
348
|
+
]);
|
|
349
|
+
return {
|
|
350
|
+
sizer,
|
|
351
|
+
width,
|
|
352
|
+
height,
|
|
353
|
+
setWidth,
|
|
354
|
+
setHeight,
|
|
355
|
+
shownWidth: options === null ? 0 : clamp(width ?? natural.width, options.minWidth, options.maxWidth),
|
|
356
|
+
shownHeight: options === null ? 0 : clamp(height ?? natural.height, options.minHeight, options.maxHeight),
|
|
357
|
+
drag,
|
|
358
|
+
setDrag
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
/** The two keyboard-operable edges, the corner, and the readout. Chrome, never stage. */
|
|
362
|
+
function Grips({ label, options, size }) {
|
|
363
|
+
const { shownWidth, shownHeight, drag, setDrag, setWidth, setHeight } = size;
|
|
364
|
+
const stepWidth = (event) => {
|
|
365
|
+
const step = event.shiftKey ? BIG_STEP : STEP;
|
|
366
|
+
let next = null;
|
|
367
|
+
if (event.key === "ArrowRight") next = shownWidth + step;
|
|
368
|
+
else if (event.key === "ArrowLeft") next = shownWidth - step;
|
|
369
|
+
else if (event.key === "Home") next = options.minWidth;
|
|
370
|
+
else if (event.key === "End") next = options.maxWidth;
|
|
371
|
+
if (next === null) return;
|
|
372
|
+
event.preventDefault();
|
|
373
|
+
setWidth(clamp(next, options.minWidth, options.maxWidth));
|
|
374
|
+
};
|
|
375
|
+
const stepHeight = (event) => {
|
|
376
|
+
const step = event.shiftKey ? BIG_STEP : STEP;
|
|
377
|
+
let next = null;
|
|
378
|
+
if (event.key === "ArrowDown") next = shownHeight + step;
|
|
379
|
+
else if (event.key === "ArrowUp") next = shownHeight - step;
|
|
380
|
+
else if (event.key === "Home") next = options.minHeight;
|
|
381
|
+
else if (event.key === "End") next = options.maxHeight;
|
|
382
|
+
if (next === null) return;
|
|
383
|
+
event.preventDefault();
|
|
384
|
+
setHeight(clamp(next, options.minHeight, options.maxHeight));
|
|
385
|
+
};
|
|
386
|
+
const pointer = (axis) => ({
|
|
387
|
+
onPointerDown: (event) => {
|
|
388
|
+
if (event.button !== 0) return;
|
|
389
|
+
event.preventDefault();
|
|
390
|
+
event.currentTarget.setPointerCapture?.(event.pointerId);
|
|
391
|
+
setDrag({
|
|
392
|
+
axis,
|
|
393
|
+
x: event.clientX,
|
|
394
|
+
y: event.clientY,
|
|
395
|
+
width: shownWidth,
|
|
396
|
+
height: shownHeight
|
|
397
|
+
});
|
|
398
|
+
},
|
|
399
|
+
onPointerMove: (event) => {
|
|
400
|
+
if (drag === null) return;
|
|
401
|
+
if (drag.axis !== "y") setWidth(clamp(drag.width + event.clientX - drag.x, options.minWidth, options.maxWidth));
|
|
402
|
+
if (drag.axis !== "x") setHeight(clamp(drag.height + event.clientY - drag.y, options.minHeight, options.maxHeight));
|
|
403
|
+
},
|
|
404
|
+
onPointerUp: (event) => {
|
|
405
|
+
if (drag === null) return;
|
|
406
|
+
event.currentTarget.releasePointerCapture?.(event.pointerId);
|
|
407
|
+
setDrag(null);
|
|
408
|
+
},
|
|
409
|
+
onPointerCancel: () => setDrag(null)
|
|
410
|
+
});
|
|
411
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
412
|
+
options.axis === "y" ? null : /* @__PURE__ */ jsx("div", {
|
|
413
|
+
role: "separator",
|
|
414
|
+
tabIndex: 0,
|
|
415
|
+
"aria-orientation": "vertical",
|
|
416
|
+
"aria-label": `Resize ${label} width`,
|
|
417
|
+
"aria-valuenow": shownWidth,
|
|
418
|
+
"aria-valuemin": options.minWidth,
|
|
419
|
+
"aria-valuemax": options.maxWidth,
|
|
420
|
+
"aria-valuetext": `${shownWidth} pixels wide`,
|
|
421
|
+
"data-slot": "preview-grip-x",
|
|
422
|
+
className: GRIP_X_CLASS,
|
|
423
|
+
onKeyDown: stepWidth,
|
|
424
|
+
onDoubleClick: () => setWidth(null),
|
|
425
|
+
...pointer("x")
|
|
426
|
+
}),
|
|
427
|
+
options.axis === "x" ? null : /* @__PURE__ */ jsx("div", {
|
|
428
|
+
role: "separator",
|
|
429
|
+
tabIndex: 0,
|
|
430
|
+
"aria-orientation": "horizontal",
|
|
431
|
+
"aria-label": `Resize ${label} height`,
|
|
432
|
+
"aria-valuenow": shownHeight,
|
|
433
|
+
"aria-valuemin": options.minHeight,
|
|
434
|
+
"aria-valuemax": options.maxHeight,
|
|
435
|
+
"aria-valuetext": `${shownHeight} pixels tall`,
|
|
436
|
+
"data-slot": "preview-grip-y",
|
|
437
|
+
className: GRIP_Y_CLASS,
|
|
438
|
+
onKeyDown: stepHeight,
|
|
439
|
+
onDoubleClick: () => setHeight(null),
|
|
440
|
+
...pointer("y")
|
|
441
|
+
}),
|
|
442
|
+
options.axis === "both" ? /* @__PURE__ */ jsx("div", {
|
|
443
|
+
"aria-hidden": "true",
|
|
444
|
+
"data-slot": "preview-grip-corner",
|
|
445
|
+
className: GRIP_CORNER_CLASS,
|
|
446
|
+
onDoubleClick: () => {
|
|
447
|
+
setWidth(null);
|
|
448
|
+
setHeight(null);
|
|
449
|
+
},
|
|
450
|
+
...pointer("both")
|
|
451
|
+
}) : null,
|
|
452
|
+
drag === null ? null : /* @__PURE__ */ jsx("span", {
|
|
453
|
+
"aria-hidden": "true",
|
|
454
|
+
"data-slot": "preview-readout",
|
|
455
|
+
className: READOUT_CLASS,
|
|
456
|
+
children: `${shownWidth} × ${shownHeight}`
|
|
457
|
+
})
|
|
458
|
+
] });
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* A card for one component: a stage that is its own theme island, a slot for
|
|
462
|
+
* tools at the top right, and a footer.
|
|
463
|
+
*
|
|
464
|
+
* **Two presentations, one stage.** `"panel"`, the default and what every
|
|
465
|
+
* existing caller gets, is that card: a border, a fill, a dot grid under the
|
|
466
|
+
* specimen, and the tools floating over the stage's top right. `"frame"` is a
|
|
467
|
+
* design-canvas frame — no card, no border, no fill; the name, the count and
|
|
468
|
+
* the tools sit in a row *above* the stage rather than over it, four crosshairs
|
|
469
|
+
* mark the stage's outer corners, and the stage paints nothing by default, so
|
|
470
|
+
* whatever canvas the frame sits on shows through. Everything below holds in
|
|
471
|
+
* both.
|
|
472
|
+
*
|
|
473
|
+
* **The stage is the island; the chrome is not.** `theme`, `mode`, `density`,
|
|
474
|
+
* `font` and `styleSet` land on the stage element only, and the stage
|
|
475
|
+
* republishes the theme, density and style-set contexts so an overlay opened on
|
|
476
|
+
* it follows it. The tools, the footer, the grips and anything they open stay
|
|
477
|
+
* in the scope around the Preview — a `terminal` preview's own controls do not
|
|
478
|
+
* turn cyan. With none of the five set, the stage carries no attribute and
|
|
479
|
+
* costs what a `<div>` costs. A stage `theme` with no `mode` repeats the page's
|
|
480
|
+
* mode beside it.
|
|
481
|
+
*
|
|
482
|
+
* **`resizable` is handles of its own**, both axes by default: an edge grip per
|
|
483
|
+
* axis that is a keyboard-operable `separator` valued in pixels, and a corner
|
|
484
|
+
* grip for the pointer. Double-click resets an axis. The width never outgrows
|
|
485
|
+
* the frame: its bound in force is the frame's own width, observed live, when
|
|
486
|
+
* that is under `maxWidth`. Not `Resizable`, which is split panes on an
|
|
487
|
+
* optional peer.
|
|
488
|
+
*
|
|
489
|
+
* Props, not a compound: one stage and its slots, each saying what it is.
|
|
490
|
+
*
|
|
491
|
+
* @example
|
|
492
|
+
* <Preview label="Button preview" tools={<IconButton aria-label="Configure Button" icon={Wrench} />}>
|
|
493
|
+
* <Button variant="primary">Take cue</Button>
|
|
494
|
+
* </Preview>
|
|
495
|
+
* @example
|
|
496
|
+
* <Preview label="Chip preview" theme="terminal" density="compact" resizable>
|
|
497
|
+
* <Chip tone="accent">Standby</Chip>
|
|
498
|
+
* </Preview>
|
|
499
|
+
* @example
|
|
500
|
+
* <Preview label="Button" presentation="frame" count={3}>
|
|
501
|
+
* <Button variant="primary">Take cue</Button>
|
|
502
|
+
* </Preview>
|
|
503
|
+
* @example
|
|
504
|
+
* <Preview label="Editorial band" styleSet="editorial" presentation="frame">
|
|
505
|
+
* <Container className="max-w-(--cue-measure-prose)">…</Container>
|
|
506
|
+
* </Preview>
|
|
507
|
+
*/
|
|
508
|
+
const Preview = React.forwardRef(function Preview({ children, label, theme, mode, density, font, styleSet, resizable, tools, footer, presentation = "panel", name, count, ground, captions = true, className, ...elementProps }, ref) {
|
|
509
|
+
const outer = React.useContext(ThemeContext);
|
|
510
|
+
const bench = React.useRef(null);
|
|
511
|
+
const given = resolveResize(resizable);
|
|
512
|
+
const available = useAvailableWidth(bench, given !== null);
|
|
513
|
+
const options = given === null ? null : effectiveBounds(given, available);
|
|
514
|
+
const size = useStageSize(options);
|
|
515
|
+
const attributes = stageAttributes({
|
|
516
|
+
theme,
|
|
517
|
+
mode,
|
|
518
|
+
density,
|
|
519
|
+
font,
|
|
520
|
+
styleSet
|
|
521
|
+
}, outer);
|
|
522
|
+
const framed = presentation === "frame";
|
|
523
|
+
const stage = /* @__PURE__ */ jsx("div", {
|
|
524
|
+
"data-slot": "preview-stage",
|
|
525
|
+
...attributes,
|
|
526
|
+
className: cn(STAGE_HEAD, GROUND_CLASSES[ground ?? DEFAULT_GROUND[presentation]], STAGE_TAIL, options !== null && "flex-1", !framed && tools !== void 0 && TOOLS_RESERVE_STAGE, !captions && CAPTIONS_OFF),
|
|
527
|
+
style: size.height === null ? void 0 : { minHeight: 0 },
|
|
528
|
+
children: /* @__PURE__ */ jsx(StageScope, {
|
|
529
|
+
theme,
|
|
530
|
+
mode,
|
|
531
|
+
density,
|
|
532
|
+
styleSet,
|
|
533
|
+
children
|
|
534
|
+
})
|
|
535
|
+
});
|
|
536
|
+
const benched = /* @__PURE__ */ jsx("div", {
|
|
537
|
+
ref: bench,
|
|
538
|
+
"data-slot": "preview-bench",
|
|
539
|
+
className: cn(BENCH_CLASS, footer === void 0 && "rounded-b-(--radius-surface)", !framed && tools !== void 0 && TOOLS_RESERVE_BENCH),
|
|
540
|
+
children: options === null ? stage : /* @__PURE__ */ jsxs("div", {
|
|
541
|
+
ref: size.sizer,
|
|
542
|
+
"data-slot": "preview-sizer",
|
|
543
|
+
className: cn("relative flex flex-col", size.width === null && "w-full"),
|
|
544
|
+
style: {
|
|
545
|
+
width: size.width === null ? void 0 : `${size.shownWidth}px`,
|
|
546
|
+
height: size.height === null ? void 0 : `${size.shownHeight}px`,
|
|
547
|
+
minWidth: `${options.minWidth}px`,
|
|
548
|
+
maxWidth: `${options.maxWidth}px`,
|
|
549
|
+
minHeight: `${options.minHeight}px`,
|
|
550
|
+
maxHeight: `${options.maxHeight}px`
|
|
551
|
+
},
|
|
552
|
+
children: [stage, /* @__PURE__ */ jsx(Grips, {
|
|
553
|
+
label,
|
|
554
|
+
options,
|
|
555
|
+
size
|
|
556
|
+
})]
|
|
557
|
+
})
|
|
558
|
+
});
|
|
559
|
+
if (framed) return /* @__PURE__ */ jsxs("div", {
|
|
560
|
+
...elementProps,
|
|
561
|
+
ref,
|
|
562
|
+
role: "group",
|
|
563
|
+
"aria-label": label,
|
|
564
|
+
"data-slot": "preview",
|
|
565
|
+
"data-presentation": "frame",
|
|
566
|
+
className: cn(FRAME_ROOT_CLASS, options !== null && "w-full", className),
|
|
567
|
+
children: [
|
|
568
|
+
/* @__PURE__ */ jsxs("div", {
|
|
569
|
+
"data-slot": "preview-frame-label",
|
|
570
|
+
className: FRAME_LABEL_CLASS,
|
|
571
|
+
children: [
|
|
572
|
+
name === void 0 ? /* @__PURE__ */ jsx("span", {
|
|
573
|
+
"data-slot": "preview-name",
|
|
574
|
+
className: FRAME_NAME_CLASS,
|
|
575
|
+
children: label
|
|
576
|
+
}) : name,
|
|
577
|
+
count === void 0 ? null : /* @__PURE__ */ jsx("span", {
|
|
578
|
+
"data-slot": "preview-count",
|
|
579
|
+
className: FRAME_COUNT_CLASS,
|
|
580
|
+
children: count
|
|
581
|
+
}),
|
|
582
|
+
tools === void 0 ? null : /* @__PURE__ */ jsx("div", {
|
|
583
|
+
"data-slot": "preview-tools",
|
|
584
|
+
className: FRAME_TOOLS_CLASS,
|
|
585
|
+
children: tools
|
|
586
|
+
})
|
|
587
|
+
]
|
|
588
|
+
}),
|
|
589
|
+
/* @__PURE__ */ jsxs("div", {
|
|
590
|
+
"data-slot": "preview-frame",
|
|
591
|
+
className: FRAME_BOX_CLASS,
|
|
592
|
+
children: [benched, CROSS_CORNERS.map((corner) => /* @__PURE__ */ jsx("span", {
|
|
593
|
+
"aria-hidden": "true",
|
|
594
|
+
"data-slot": "preview-crosshair",
|
|
595
|
+
className: cn(CROSS_CLASS, corner)
|
|
596
|
+
}, corner))]
|
|
597
|
+
}),
|
|
598
|
+
footer === void 0 ? null : /* @__PURE__ */ jsx("div", {
|
|
599
|
+
"data-slot": "preview-footer",
|
|
600
|
+
className: FRAME_FOOTER_CLASS,
|
|
601
|
+
children: footer
|
|
602
|
+
})
|
|
603
|
+
]
|
|
604
|
+
});
|
|
605
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
606
|
+
...elementProps,
|
|
607
|
+
ref,
|
|
608
|
+
role: "group",
|
|
609
|
+
"aria-label": label,
|
|
610
|
+
"data-slot": "preview",
|
|
611
|
+
className: cn(ROOT_CLASS, options !== null && "w-full", className),
|
|
612
|
+
children: [
|
|
613
|
+
benched,
|
|
614
|
+
tools === void 0 ? null : /* @__PURE__ */ jsx("div", {
|
|
615
|
+
"data-slot": "preview-tools",
|
|
616
|
+
className: TOOLS_CLASS,
|
|
617
|
+
children: tools
|
|
618
|
+
}),
|
|
619
|
+
footer === void 0 ? null : /* @__PURE__ */ jsx("div", {
|
|
620
|
+
"data-slot": "preview-footer",
|
|
621
|
+
className: FOOTER_CLASS,
|
|
622
|
+
children: footer
|
|
623
|
+
})
|
|
624
|
+
]
|
|
625
|
+
});
|
|
626
|
+
});
|
|
627
|
+
//#endregion
|
|
628
|
+
export { Preview };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Group, Panel, Separator } from "react-resizable-panels";
|
|
3
|
+
//#region src/layout/resizable.d.ts
|
|
4
|
+
/** Which way the panels are laid out. */
|
|
5
|
+
type ResizableOrientation = "horizontal" | "vertical";
|
|
6
|
+
interface ResizableGroupProps extends React.ComponentProps<typeof Group> {}
|
|
7
|
+
interface ResizablePanelProps extends React.ComponentProps<typeof Panel> {}
|
|
8
|
+
interface ResizableHandleProps extends React.ComponentProps<typeof Separator> {
|
|
9
|
+
/**
|
|
10
|
+
* Draw a short grip line down the middle of the handle.
|
|
11
|
+
*
|
|
12
|
+
* A 4px strip that only colours on hover is easy to miss on first sight; the
|
|
13
|
+
* grip is the standing hint that the seam is draggable, for the price of one
|
|
14
|
+
* hairline.
|
|
15
|
+
*/
|
|
16
|
+
withGrip?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Split panes the user can drag, on `react-resizable-panels`.
|
|
20
|
+
*
|
|
21
|
+
* `react-resizable-panels` is an **optional peer**: import this from
|
|
22
|
+
* `@cueplusplus/ui/layout/resizable`, never from the core barrel, so an app
|
|
23
|
+
* with no split view never installs one.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* <Resizable.Group orientation="horizontal">
|
|
27
|
+
* <Resizable.Panel id="tree" defaultSize={25} minSize={15}>…</Resizable.Panel>
|
|
28
|
+
* <Resizable.Handle withGrip />
|
|
29
|
+
* <Resizable.Panel id="editor">…</Resizable.Panel>
|
|
30
|
+
* </Resizable.Group>
|
|
31
|
+
*/
|
|
32
|
+
declare const Resizable: {
|
|
33
|
+
Group: React.ForwardRefExoticComponent<ResizableGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
34
|
+
Panel: React.ForwardRefExoticComponent<ResizablePanelProps & React.RefAttributes<HTMLDivElement>>;
|
|
35
|
+
Handle: React.ForwardRefExoticComponent<ResizableHandleProps & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
+
};
|
|
37
|
+
//#endregion
|
|
38
|
+
export { Resizable, ResizableGroupProps, ResizableHandleProps, ResizableOrientation, ResizablePanelProps };
|