@cueplusplus/ui 0.3.0 → 0.6.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 +2263 -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/chat/index.d.ts +2 -2
- package/dist/chat/message-list.d.ts +6 -0
- package/dist/chat/message-list.js +35 -0
- package/dist/chrome/_drag.js +59 -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/app-shell.d.ts +120 -2
- package/dist/chrome/app-shell.js +107 -8
- package/dist/chrome/index.d.ts +4 -3
- package/dist/chrome/status-bar.d.ts +87 -4
- package/dist/chrome/status-bar.js +80 -16
- package/dist/chrome/title-bar.d.ts +11 -1
- package/dist/chrome/title-bar.js +1 -3
- package/dist/configurator/_export.js +3 -2
- package/dist/configurator/_overrides.d.ts +1 -1
- package/dist/configurator/token-editor.js +4 -1
- package/dist/date/_segments.js +52 -6
- 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 +121 -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 +107 -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/forms/_chassis.d.ts +104 -4
- package/dist/forms/_chassis.js +104 -4
- package/dist/forms/input-group.d.ts +8 -3
- package/dist/forms/input-group.js +8 -3
- package/dist/forms/number-field.d.ts +3 -2
- package/dist/forms/number-field.js +3 -2
- 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 +12 -6
- package/dist/index.js +5 -1
- package/dist/instruments/_data-row.js +118 -0
- package/dist/instruments/data-row.d.ts +94 -0
- package/dist/instruments/data-row.js +151 -0
- package/dist/instruments/data-tree.d.ts +126 -0
- package/dist/instruments/data-tree.js +303 -0
- package/dist/instruments/index.d.ts +5 -2
- package/dist/instruments/index.js +4 -1
- package/dist/instruments/ledger.d.ts +105 -0
- package/dist/instruments/ledger.js +114 -0
- package/dist/instruments/table.d.ts +70 -2
- package/dist/instruments/table.js +133 -39
- package/dist/instruments/two-step-button.js +25 -6
- package/dist/layout/sidebar.d.ts +19 -1
- package/dist/layout/sidebar.js +19 -1
- package/dist/primitives/button.js +11 -1
- package/dist/primitives/chip.d.ts +35 -9
- package/dist/primitives/chip.js +97 -11
- package/dist/system/agent-skin.d.ts +27 -0
- package/dist/system/agent-skin.js +20 -0
- package/dist/system/portal.d.ts +5 -3
- package/dist/system/portal.js +19 -5
- package/dist/system/theme-provider.js +54 -9
- package/dist/system/use-density.d.ts +9 -0
- package/dist/system/use-density.js +9 -0
- package/dist/system/use-isomorphic-layout-effect.js +19 -1
- package/dist/theming/_presets.d.ts +1 -1
- package/dist/theming/_presets.js +74 -11
- package/dist/theming/contrast.d.ts +16 -4
- package/dist/theming/contrast.js +33 -6
- package/dist/theming/create-theme.d.ts +6 -2
- package/dist/theming/create-theme.js +32 -5
- package/dist/theming/serialize.d.ts +10 -1
- package/dist/theming/serialize.js +62 -8
- package/manifest/components/activity-graph.json +88 -0
- package/manifest/components/agent-card.json +120 -0
- package/manifest/components/agent-handoff.json +87 -0
- package/manifest/components/agent-mode-badge.json +84 -0
- package/manifest/components/agent-plan.json +67 -0
- package/manifest/components/agent-status.json +73 -0
- package/manifest/components/agent-surface.json +78 -0
- package/manifest/components/alert-dialog.json +1 -1
- package/manifest/components/animated-number.json +67 -0
- package/manifest/components/app-shell.json +142 -9
- package/manifest/components/approval-card.json +106 -0
- package/manifest/components/artifact-card.json +81 -0
- package/manifest/components/audience-icon.json +52 -0
- package/manifest/components/autocomplete.json +2 -0
- package/manifest/components/background-inbox.json +71 -0
- package/manifest/components/branch-picker.json +124 -0
- package/manifest/components/button.json +1 -0
- package/manifest/components/canvas-split-body.json +62 -0
- package/manifest/components/canvas-split-document.json +54 -0
- package/manifest/components/canvas-split-header.json +83 -0
- package/manifest/components/canvas-split-line.json +62 -0
- package/manifest/components/canvas-split-message.json +62 -0
- package/manifest/components/canvas-split-thread.json +54 -0
- package/manifest/components/canvas-split.json +60 -0
- package/manifest/components/catalogue-icon.json +52 -0
- package/manifest/components/channel-beta-icon.json +52 -0
- package/manifest/components/channel-released-icon.json +52 -0
- package/manifest/components/chart.json +93 -0
- package/manifest/components/chat-empty-state.json +55 -0
- package/manifest/components/chat-panel-assistant-message.json +51 -0
- package/manifest/components/chat-panel-composer.json +66 -0
- package/manifest/components/chat-panel-messages.json +51 -0
- package/manifest/components/chat-panel-typing.json +51 -0
- package/manifest/components/chat-panel-user-message.json +51 -0
- package/manifest/components/chat-panel.json +57 -0
- package/manifest/components/checkpoint-history.json +80 -0
- package/manifest/components/chip.json +24 -12
- package/manifest/components/clamp.json +102 -0
- package/manifest/components/cli-tool-icon.json +52 -0
- package/manifest/components/code-diff.json +87 -0
- package/manifest/components/code-runner.json +97 -0
- package/manifest/components/color-field.json +2 -0
- package/manifest/components/color-picker.json +2 -0
- package/manifest/components/combobox.json +2 -0
- package/manifest/components/compaction-row.json +100 -0
- package/manifest/components/comparison-card.json +83 -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 +75 -0
- package/manifest/components/composer-attachments.json +60 -0
- package/manifest/components/composer-bar.json +73 -0
- package/manifest/components/composer-command-item.json +79 -0
- package/manifest/components/composer-context.json +67 -0
- package/manifest/components/composer-input.json +73 -0
- package/manifest/components/composer-menu-item.json +72 -0
- package/manifest/components/composer-menu.json +79 -0
- package/manifest/components/composer-model-item.json +75 -0
- package/manifest/components/composer-model-trigger.json +75 -0
- package/manifest/components/composer-person-item.json +79 -0
- package/manifest/components/composer-send.json +80 -0
- package/manifest/components/composer-toolbar.json +65 -0
- package/manifest/components/composer-voice-button.json +68 -0
- package/manifest/components/composer-voice.json +75 -0
- package/manifest/components/composer.json +2 -0
- package/manifest/components/computer-use.json +84 -0
- package/manifest/components/confidence-marker.json +74 -0
- package/manifest/components/connection-state.json +84 -0
- package/manifest/components/context-breakdown.json +65 -0
- package/manifest/components/context-usage.json +85 -0
- package/manifest/components/conversation-search.json +92 -0
- package/manifest/components/cost-meter.json +74 -0
- package/manifest/components/cue-portal-frame.json +1 -1
- package/manifest/components/data-row.json +203 -0
- package/manifest/components/data-tree.json +151 -0
- package/manifest/components/date-field.json +2 -0
- package/manifest/components/date-picker.json +2 -0
- package/manifest/components/date-range-picker.json +2 -0
- package/manifest/components/day-separator.json +58 -0
- package/manifest/components/delegation-card.json +1 -1
- package/manifest/components/density.json +1 -1
- package/manifest/components/diagram.json +100 -0
- package/manifest/components/document-reference.json +90 -0
- package/manifest/components/draft-restore.json +82 -0
- package/manifest/components/drawer.json +1 -1
- package/manifest/components/dropdown-menu.json +1 -1
- package/manifest/components/edit-message.json +105 -0
- package/manifest/components/elements-command-palette.json +100 -0
- package/manifest/components/elements-composer.json +71 -0
- package/manifest/components/elements-data-table.json +68 -0
- package/manifest/components/elements-timeline.json +69 -0
- package/manifest/components/elicitation-form.json +103 -0
- package/manifest/components/empty-state-composer.json +64 -0
- package/manifest/components/empty-state-greeting.json +49 -0
- package/manifest/components/empty-state-suggestion.json +57 -0
- package/manifest/components/empty-state-suggestions.json +49 -0
- package/manifest/components/end-of-turn-summary.json +77 -0
- package/manifest/components/env-var-input.json +2 -0
- package/manifest/components/error-state.json +80 -0
- package/manifest/components/feedback-dialog.json +107 -0
- package/manifest/components/file-tree.json +83 -0
- package/manifest/components/flow-graph.json +75 -0
- package/manifest/components/folder-icon.json +52 -0
- package/manifest/components/frac.json +59 -0
- package/manifest/components/generation-loader.json +64 -0
- package/manifest/components/generative-ui.json +93 -0
- package/manifest/components/guardrail-notice.json +91 -0
- package/manifest/components/hover-card.json +1 -1
- package/manifest/components/image-generation.json +67 -0
- package/manifest/components/info-tip.json +1 -1
- package/manifest/components/inline-citation.json +77 -0
- package/manifest/components/input-group.json +4 -2
- package/manifest/components/input.json +3 -1
- package/manifest/components/job-progress.json +96 -0
- package/manifest/components/launcher-bubble.json +105 -0
- package/manifest/components/ledger.json +187 -0
- package/manifest/components/live-region-announcer.json +79 -0
- package/manifest/components/map-answer.json +83 -0
- package/manifest/components/markdown-text.json +94 -0
- package/manifest/components/math-block.json +74 -0
- package/manifest/components/mcp-server-icon.json +52 -0
- package/manifest/components/mcp-server-panel.json +87 -0
- package/manifest/components/memory-chips.json +65 -0
- package/manifest/components/message-actions.json +99 -0
- package/manifest/components/message-attachments.json +63 -0
- package/manifest/components/message-branches.json +71 -0
- package/manifest/components/message-list.json +1 -1
- package/manifest/components/message-pair.json +86 -0
- package/manifest/components/message-queue.json +74 -0
- package/manifest/components/message-timing.json +62 -0
- package/manifest/components/mobile-composer.json +126 -0
- package/manifest/components/model-picker.json +76 -0
- package/manifest/components/multi-select.json +2 -0
- package/manifest/components/musical-time-input.json +2 -0
- package/manifest/components/node-card.json +1 -1
- package/manifest/components/node-handle.json +1 -1
- package/manifest/components/number-field.json +3 -1
- package/manifest/components/number-ticker.json +61 -0
- package/manifest/components/onboarding.json +84 -0
- package/manifest/components/otp-field.json +9 -7
- package/manifest/components/password-input.json +2 -0
- package/manifest/components/permission-grant.json +92 -0
- package/manifest/components/permission-scopes.json +139 -0
- package/manifest/components/popover.json +1 -1
- package/manifest/components/prompt-library.json +99 -0
- package/manifest/components/queue-dock.json +110 -0
- package/manifest/components/quota-banner.json +94 -0
- package/manifest/components/quote-reply.json +105 -0
- package/manifest/components/read-aloud.json +111 -0
- package/manifest/components/reasoning-effort.json +81 -0
- package/manifest/components/reasoning-panel.json +108 -0
- package/manifest/components/recommendation-card.json +107 -0
- package/manifest/components/regenerate-menu.json +89 -0
- package/manifest/components/replay-player.json +102 -0
- package/manifest/components/research-report.json +76 -0
- package/manifest/components/retrieval-chunks.json +84 -0
- package/manifest/components/revert-dock.json +150 -0
- package/manifest/components/reviewable-diff.json +93 -0
- package/manifest/components/risk-badge.json +74 -0
- package/manifest/components/schedule-card.json +101 -0
- package/manifest/components/score-breakdown.json +91 -0
- package/manifest/components/scroll-anchor.json +72 -0
- package/manifest/components/scroll-area.json +7 -7
- package/manifest/components/scrub-input.json +2 -0
- package/manifest/components/search-input.json +9 -7
- package/manifest/components/segmented-control.json +21 -21
- package/manifest/components/select.json +1 -0
- package/manifest/components/settings-panel.json +118 -0
- package/manifest/components/shared-conversation.json +89 -0
- package/manifest/components/shimmer-label.json +59 -0
- package/manifest/components/skill-icon.json +52 -0
- package/manifest/components/sources.json +83 -0
- package/manifest/components/speaker-identity.json +61 -0
- package/manifest/components/spec-sheet.json +80 -0
- package/manifest/components/stack-icon.json +52 -0
- package/manifest/components/stacks-matrix-icon.json +52 -0
- package/manifest/components/stat.json +1 -1
- package/manifest/components/status-bar.json +146 -12
- package/manifest/components/status-dot.json +1 -1
- package/manifest/components/stopped-run.json +81 -0
- package/manifest/components/streaming-text.json +71 -0
- package/manifest/components/sub.json +44 -0
- package/manifest/components/subagent-list.json +88 -0
- package/manifest/components/suggestions.json +84 -0
- package/manifest/components/sup.json +44 -0
- package/manifest/components/swap-label.json +71 -0
- package/manifest/components/table-scroll-region.json +6 -0
- package/manifest/components/table.json +88 -4
- package/manifest/components/tags-input.json +2 -0
- package/manifest/components/tail-status.json +109 -0
- package/manifest/components/terminal-block.json +91 -0
- package/manifest/components/textarea.json +3 -1
- package/manifest/components/theme-provider.json +2 -2
- package/manifest/components/thinking-indicator.json +63 -0
- package/manifest/components/thread-list.json +76 -0
- package/manifest/components/thread-search.json +90 -0
- package/manifest/components/threshold-rail.json +2 -2
- package/manifest/components/time-boundary.json +62 -0
- package/manifest/components/time-field.json +2 -0
- package/manifest/components/timeline.json +1 -1
- package/manifest/components/title-bar.json +1 -1
- package/manifest/components/todo-list.json +69 -0
- package/manifest/components/toggle-group.json +9 -7
- package/manifest/components/toggle.json +2 -0
- package/manifest/components/token-editor.json +1 -1
- package/manifest/components/tool-call-card.json +200 -0
- package/manifest/components/tool-call.json +119 -0
- package/manifest/components/tool-error.json +114 -0
- package/manifest/components/tool-group.json +83 -0
- package/manifest/components/tool-timeline.json +119 -0
- package/manifest/components/toolbar.json +7 -7
- package/manifest/components/tooltip.json +1 -1
- package/manifest/components/trace-waterfall.json +74 -0
- package/manifest/components/turn-footer.json +105 -0
- package/manifest/components/typing-indicator.json +53 -0
- package/manifest/components/unread-divider.json +55 -0
- package/manifest/components/usage-chart.json +1 -1
- package/manifest/components/verdict-row.json +91 -0
- package/manifest/components/voice-conversation.json +109 -0
- package/manifest/components/web-preview.json +87 -0
- package/manifest/components/web-search.json +92 -0
- package/manifest/components/work-collapse.json +102 -0
- package/manifest/manifest.json +2736 -60
- package/manifest/tokens.json +22 -1
- package/package.json +44 -2
|
@@ -8,6 +8,115 @@ interface AppShellRootProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
|
8
8
|
defaultNavOpen?: boolean;
|
|
9
9
|
/** Called with the next open state whenever the drawer is opened or dismissed. */
|
|
10
10
|
onNavOpenChange?: (open: boolean) => void;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the navigation column is collapsed to an icon rail, when
|
|
13
|
+
* controlled. Pass with `onRailChange`. Defaults to expanded.
|
|
14
|
+
*
|
|
15
|
+
* It is the column's own collapse, owned one level up. Collapsing is a
|
|
16
|
+
* property of the column, but the header cell over it is a child of the bar
|
|
17
|
+
* — a different branch of the tree — and a length only one of them knows is
|
|
18
|
+
* a length they will eventually disagree about. So the frame holds the
|
|
19
|
+
* state, stamps `data-rail` on itself for anything that has to answer to it,
|
|
20
|
+
* and hands it down to `Sidebar.Root` as its controlled `collapsed`.
|
|
21
|
+
*
|
|
22
|
+
* **Persistence is the caller's.** A rail is set once and expected to be
|
|
23
|
+
* remembered, and where it is remembered — `localStorage`, a cookie the
|
|
24
|
+
* server can read before first paint, a user record — is a decision about
|
|
25
|
+
* hydration and privacy that a layout component has no business making.
|
|
26
|
+
*/
|
|
27
|
+
rail?: boolean;
|
|
28
|
+
/** Initial rail state when uncontrolled. Defaults to `false`. */
|
|
29
|
+
defaultRail?: boolean;
|
|
30
|
+
/** Called with the next rail state whenever the column is collapsed or expanded. */
|
|
31
|
+
onRailChange?: (rail: boolean) => void;
|
|
32
|
+
/** Width of the navigation column while expanded. Any CSS length. Defaults to `"14rem"`. */
|
|
33
|
+
navWidth?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Width of the navigation column while railed. Any CSS length. Defaults to
|
|
36
|
+
* `"3.5rem"` — a `--cue-icon-md` glyph centred in a `--cue-control-md` row,
|
|
37
|
+
* with a gutter either side that still reads as a column rather than a strip.
|
|
38
|
+
*/
|
|
39
|
+
railWidth?: string;
|
|
40
|
+
}
|
|
41
|
+
interface AppShellBarProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
42
|
+
/**
|
|
43
|
+
* The header cell over the navigation column: the app mark, and whatever
|
|
44
|
+
* control rails it.
|
|
45
|
+
*
|
|
46
|
+
* Omit it and the bar is one undivided strip — no empty bordered cell, which
|
|
47
|
+
* is worse than no cell.
|
|
48
|
+
*/
|
|
49
|
+
brand?: React.ReactNode;
|
|
50
|
+
/**
|
|
51
|
+
* Extra classes for the header cell — the bordered box that spans the
|
|
52
|
+
* navigation column, not the row of brand content inside it. Anything about
|
|
53
|
+
* the cell's width, rim or gutter belongs here; anything about how the mark
|
|
54
|
+
* and its controls sit belongs on the nodes passed as `brand`.
|
|
55
|
+
*/
|
|
56
|
+
brandClassName?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Make the bar's dead space a window drag handle. Defaults to `false`.
|
|
59
|
+
*
|
|
60
|
+
* This is the same contract {@link TitleBar} has always offered, on the bar
|
|
61
|
+
* a console with a navigation column actually uses — a desktop app should
|
|
62
|
+
* not need a `TitleBar` *and* an `AppShell.Bar` stacked on top of each other
|
|
63
|
+
* to get one draggable row, which is two chrome rungs of a small window
|
|
64
|
+
* spent on furniture.
|
|
65
|
+
*
|
|
66
|
+
* Every structural surface is attributed and every interactive cluster is
|
|
67
|
+
* carved back out, because the two shells this ships into fail in opposite
|
|
68
|
+
* directions. Tauri matches the *exact* element under the cursor, so the
|
|
69
|
+
* brand cell and the rest cell carry the attribute themselves — a click on
|
|
70
|
+
* the cell's own dead space targets the cell, never the root beneath it, and
|
|
71
|
+
* a bar that only attributed its root would be draggable nowhere. Electron
|
|
72
|
+
* builds a geometric mask from painted boxes instead and excludes nothing on
|
|
73
|
+
* its own, so the brand content, the leading children and `actions` each sit
|
|
74
|
+
* in a cluster marked `app-region: no-drag` — without it a button that merely
|
|
75
|
+
* overlaps the bar stops receiving clicks at all. See `./_drag.ts`.
|
|
76
|
+
*
|
|
77
|
+
* **It changes how the clusters are sized, and that is a trade.** Off, each
|
|
78
|
+
* cluster grows into its cell, so a caller's own `ms-auto` reaches the cell's
|
|
79
|
+
* trailing rim. On, the clusters take their content's width and `actions` is
|
|
80
|
+
* pushed over with `ms-auto` instead, because a cluster that fills its cell
|
|
81
|
+
* is a `no-drag` rectangle painted over every dead pixel the cell just
|
|
82
|
+
* attributed — the bar would be draggable nowhere but its paddings and its
|
|
83
|
+
* one gap. The dead area belongs to the window in drag mode, and a caller who
|
|
84
|
+
* needs content to reach the rim there should say so on a box of their own
|
|
85
|
+
* inside the cluster.
|
|
86
|
+
*
|
|
87
|
+
* `select-none` comes with it: dragging a window and selecting the text you
|
|
88
|
+
* started the drag on are the same gesture, and the shell wins.
|
|
89
|
+
*
|
|
90
|
+
* Not wired here: double-click-to-maximise. Tauri's injected script already
|
|
91
|
+
* does it for any drag region, macOS's cancel-by-dragging-away included.
|
|
92
|
+
* Electron does not, and an Electron app has to listen for `dblclick` and
|
|
93
|
+
* toggle the window itself. Which of those an app is, is not something a
|
|
94
|
+
* layout component can know.
|
|
95
|
+
*/
|
|
96
|
+
platformDrag?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* A title centred on the **bar**, not between the cells beside it.
|
|
99
|
+
*
|
|
100
|
+
* Absolutely positioned against the bar's own box, so it stays put when a
|
|
101
|
+
* button appears in `actions` or the column rails — the whole reason a
|
|
102
|
+
* document name in desktop chrome is not just another flex child.
|
|
103
|
+
* `pointer-events-none` so the dead space around a short title still drags,
|
|
104
|
+
* which is also what makes it click through to the drag surface underneath
|
|
105
|
+
* in Tauri, whose hit-testing is the browser's own.
|
|
106
|
+
*
|
|
107
|
+
* Inert by construction. Anything the reader has to click belongs in
|
|
108
|
+
* `actions` or in `children`, where it can be carved out of the drag region.
|
|
109
|
+
*/
|
|
110
|
+
center?: React.ReactNode;
|
|
111
|
+
/**
|
|
112
|
+
* The trailing cluster: connection state, a run indicator, an overflow menu.
|
|
113
|
+
*
|
|
114
|
+
* Pinned to the bar's trailing edge and never squeezed, so it reads as window
|
|
115
|
+
* furniture rather than the end of a sentence. `children` keeps flowing into
|
|
116
|
+
* the same cell ahead of it, which is what lets an existing web-shell caller
|
|
117
|
+
* pass free-form content and gain a cluster without rearranging anything.
|
|
118
|
+
*/
|
|
119
|
+
actions?: React.ReactNode;
|
|
11
120
|
}
|
|
12
121
|
type AppShellBodyProps = React.ComponentPropsWithoutRef<"div">;
|
|
13
122
|
interface AppShellSidebarProps extends SidebarRootProps {
|
|
@@ -85,7 +194,15 @@ interface AppShellAsideProps extends React.ComponentPropsWithoutRef<"aside"> {
|
|
|
85
194
|
* side; the shell exists so no page has to get them right again.
|
|
86
195
|
*
|
|
87
196
|
* The bars are ordinary children — `TitleBar` and `StatusBar` are already
|
|
88
|
-
* `shrink-0` and need no wrapper — so a shell reads as the page's outline.
|
|
197
|
+
* `shrink-0` and need no wrapper — so a shell reads as the page's outline. The
|
|
198
|
+
* one bar the shell does own is {@link AppShellBar}, and it owns it for one
|
|
199
|
+
* reason: it is divided by the navigation column, which means it has to be
|
|
200
|
+
* measured from the same length the column is.
|
|
201
|
+
*
|
|
202
|
+
* That length is `--cue-nav-width`, written on the frame. `rail` rewrites it,
|
|
203
|
+
* `data-rail` announces it, and the column and the header cell over it move
|
|
204
|
+
* together because neither holds a width of its own. Persistence and the
|
|
205
|
+
* toggle are the caller's — see {@link AppShellRootProps.rail}.
|
|
89
206
|
*
|
|
90
207
|
* This is also the only component in the library with a viewport breakpoint:
|
|
91
208
|
* below `md` the navigation column becomes a drawer and a trigger appears in
|
|
@@ -114,6 +231,7 @@ interface AppShellAsideProps extends React.ComponentPropsWithoutRef<"aside"> {
|
|
|
114
231
|
*/
|
|
115
232
|
declare const AppShell: {
|
|
116
233
|
Root: React.ForwardRefExoticComponent<AppShellRootProps & React.RefAttributes<HTMLDivElement>>;
|
|
234
|
+
Bar: React.ForwardRefExoticComponent<AppShellBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
117
235
|
Body: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
118
236
|
Sidebar: React.ForwardRefExoticComponent<AppShellSidebarProps & React.RefAttributes<HTMLElement>>;
|
|
119
237
|
NavTrigger: React.ForwardRefExoticComponent<AppShellNavTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -122,4 +240,4 @@ declare const AppShell: {
|
|
|
122
240
|
Aside: React.ForwardRefExoticComponent<AppShellAsideProps & React.RefAttributes<HTMLElement>>;
|
|
123
241
|
};
|
|
124
242
|
//#endregion
|
|
125
|
-
export { AppShell, AppShellAsideProps, AppShellBodyProps, AppShellContentProps, AppShellNavTriggerProps, AppShellRootProps, AppShellScrollerProps, AppShellSidebarProps };
|
|
243
|
+
export { AppShell, AppShellAsideProps, AppShellBarProps, AppShellBodyProps, AppShellContentProps, AppShellNavTriggerProps, AppShellRootProps, AppShellScrollerProps, AppShellSidebarProps };
|
package/dist/chrome/app-shell.js
CHANGED
|
@@ -5,14 +5,35 @@ import { Sidebar } from "../layout/sidebar.js";
|
|
|
5
5
|
import { CrossGlyph } from "../overlays/_glyphs.js";
|
|
6
6
|
import { Drawer } from "../overlays/drawer.js";
|
|
7
7
|
import { IconButton } from "../primitives/icon-button.js";
|
|
8
|
+
import { DRAG_CLASSES, NO_DRAG_CLASSES } from "./_drag.js";
|
|
8
9
|
import * as React from "react";
|
|
9
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
11
|
//#region src/chrome/app-shell.tsx
|
|
11
12
|
const AppShellContext = React.createContext({
|
|
12
13
|
navOpen: false,
|
|
13
|
-
setNavOpen: () => {}
|
|
14
|
+
setNavOpen: () => {},
|
|
15
|
+
rail: false,
|
|
16
|
+
setRail: () => {}
|
|
14
17
|
});
|
|
15
18
|
/**
|
|
19
|
+
* The navigation column's current width, written once on the frame and read by
|
|
20
|
+
* everything that has to line up with it.
|
|
21
|
+
*
|
|
22
|
+
* The prototype this came from put it best: collapsing the rail rewrites one
|
|
23
|
+
* length, and the bar's header cell and the column move together because
|
|
24
|
+
* neither of them holds a length of its own. A custom property rather than two
|
|
25
|
+
* inline widths because the two boxes are on opposite sides of the tree — the
|
|
26
|
+
* cell is a child of the bar, above `AppShell.Body`, and the column is inside
|
|
27
|
+
* it — and because it is then also the handle a consumer's own CSS aligns to.
|
|
28
|
+
*
|
|
29
|
+
* {@link AppShellBar} spells the name a second time, in a Tailwind utility,
|
|
30
|
+
* because the scanner reads class strings and not constants. The two spellings
|
|
31
|
+
* move together, and the shell's own suite fails if they stop matching.
|
|
32
|
+
*/
|
|
33
|
+
const NAV_WIDTH_PROPERTY = "--cue-nav-width";
|
|
34
|
+
/** What a box that spans the navigation column sets its width to. */
|
|
35
|
+
const NAV_WIDTH_VALUE = `var(${NAV_WIDTH_PROPERTY})`;
|
|
36
|
+
/**
|
|
16
37
|
* The console frame: title bar, navigation, work area, status bar — one
|
|
17
38
|
* viewport tall, with exactly one thing scrolling.
|
|
18
39
|
*
|
|
@@ -26,7 +47,15 @@ const AppShellContext = React.createContext({
|
|
|
26
47
|
* side; the shell exists so no page has to get them right again.
|
|
27
48
|
*
|
|
28
49
|
* The bars are ordinary children — `TitleBar` and `StatusBar` are already
|
|
29
|
-
* `shrink-0` and need no wrapper — so a shell reads as the page's outline.
|
|
50
|
+
* `shrink-0` and need no wrapper — so a shell reads as the page's outline. The
|
|
51
|
+
* one bar the shell does own is {@link AppShellBar}, and it owns it for one
|
|
52
|
+
* reason: it is divided by the navigation column, which means it has to be
|
|
53
|
+
* measured from the same length the column is.
|
|
54
|
+
*
|
|
55
|
+
* That length is `--cue-nav-width`, written on the frame. `rail` rewrites it,
|
|
56
|
+
* `data-rail` announces it, and the column and the header cell over it move
|
|
57
|
+
* together because neither holds a width of its own. Persistence and the
|
|
58
|
+
* toggle are the caller's — see {@link AppShellRootProps.rail}.
|
|
30
59
|
*
|
|
31
60
|
* This is also the only component in the library with a viewport breakpoint:
|
|
32
61
|
* below `md` the navigation column becomes a drawer and a trigger appears in
|
|
@@ -54,27 +83,88 @@ const AppShellContext = React.createContext({
|
|
|
54
83
|
* </AppShell.Root>
|
|
55
84
|
*/
|
|
56
85
|
const AppShell = {
|
|
57
|
-
Root: React.forwardRef(function AppShellRoot({ className, navOpen: navOpenProp, defaultNavOpen = false, onNavOpenChange, ...elementProps }, ref) {
|
|
86
|
+
Root: React.forwardRef(function AppShellRoot({ className, navOpen: navOpenProp, defaultNavOpen = false, onNavOpenChange, rail: railProp, defaultRail = false, onRailChange, navWidth = "14rem", railWidth = "3.5rem", style, ...elementProps }, ref) {
|
|
58
87
|
const [uncontrolled, setUncontrolled] = React.useState(defaultNavOpen);
|
|
59
88
|
const navOpen = navOpenProp ?? uncontrolled;
|
|
60
89
|
const setNavOpen = React.useCallback((open) => {
|
|
61
90
|
if (navOpenProp === void 0) setUncontrolled(open);
|
|
62
91
|
onNavOpenChange?.(open);
|
|
63
92
|
}, [navOpenProp, onNavOpenChange]);
|
|
93
|
+
const [uncontrolledRail, setUncontrolledRail] = React.useState(defaultRail);
|
|
94
|
+
const rail = railProp ?? uncontrolledRail;
|
|
95
|
+
const setRail = React.useCallback((next) => {
|
|
96
|
+
if (railProp === void 0) setUncontrolledRail(next);
|
|
97
|
+
onRailChange?.(next);
|
|
98
|
+
}, [railProp, onRailChange]);
|
|
64
99
|
const context = React.useMemo(() => ({
|
|
65
100
|
navOpen,
|
|
66
|
-
setNavOpen
|
|
67
|
-
|
|
101
|
+
setNavOpen,
|
|
102
|
+
rail,
|
|
103
|
+
setRail
|
|
104
|
+
}), [
|
|
105
|
+
navOpen,
|
|
106
|
+
setNavOpen,
|
|
107
|
+
rail,
|
|
108
|
+
setRail
|
|
109
|
+
]);
|
|
68
110
|
return /* @__PURE__ */ jsx(AppShellContext.Provider, {
|
|
69
111
|
value: context,
|
|
70
112
|
children: /* @__PURE__ */ jsx("div", {
|
|
71
113
|
ref,
|
|
72
114
|
"data-slot": "app-shell",
|
|
73
|
-
|
|
115
|
+
"data-rail": rail ? "" : void 0,
|
|
116
|
+
className: cn("group/app-shell relative flex h-dvh flex-col overflow-clip bg-bg text-fg", className),
|
|
117
|
+
style: {
|
|
118
|
+
[NAV_WIDTH_PROPERTY]: rail ? railWidth : navWidth,
|
|
119
|
+
...style
|
|
120
|
+
},
|
|
74
121
|
...elementProps
|
|
75
122
|
})
|
|
76
123
|
});
|
|
77
124
|
}),
|
|
125
|
+
Bar: React.forwardRef(function AppShellBar({ className, brand, brandClassName, platformDrag = false, center, actions, children, ...elementProps }, ref) {
|
|
126
|
+
const dragProps = platformDrag ? { "data-tauri-drag-region": "" } : void 0;
|
|
127
|
+
const dragClasses = platformDrag ? DRAG_CLASSES : void 0;
|
|
128
|
+
const clusterClasses = cn("flex min-w-0 items-center gap-(--cue-space-3)", platformDrag ? NO_DRAG_CLASSES : "grow");
|
|
129
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
130
|
+
ref,
|
|
131
|
+
"data-slot": "app-shell-bar",
|
|
132
|
+
...dragProps,
|
|
133
|
+
className: cn("relative flex h-(--cue-chrome-titlebar) w-full shrink-0 items-stretch border-b border-border bg-surface-1", dragClasses, platformDrag ? "select-none" : void 0, className),
|
|
134
|
+
...elementProps,
|
|
135
|
+
children: [
|
|
136
|
+
brand === void 0 ? null : /* @__PURE__ */ jsx("div", {
|
|
137
|
+
"data-slot": "app-shell-brand",
|
|
138
|
+
...dragProps,
|
|
139
|
+
className: cn("flex w-auto min-w-0 shrink-0 items-center gap-(--cue-space-3) border-r border-border px-(--cue-pad-row-x) transition-[width] duration-150 ease-out md:w-(--cue-nav-width) motion-reduce:transition-none", dragClasses, brandClassName),
|
|
140
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
141
|
+
"data-slot": "app-shell-brand-content",
|
|
142
|
+
className: clusterClasses,
|
|
143
|
+
children: brand
|
|
144
|
+
})
|
|
145
|
+
}),
|
|
146
|
+
center === void 0 ? null : /* @__PURE__ */ jsx("div", {
|
|
147
|
+
"data-slot": "app-shell-bar-center",
|
|
148
|
+
className: "pointer-events-none absolute top-1/2 left-1/2 max-w-[50%] -translate-x-1/2 -translate-y-1/2 truncate font-mono text-(length:--cue-text-label) text-fg-muted",
|
|
149
|
+
children: center
|
|
150
|
+
}),
|
|
151
|
+
/* @__PURE__ */ jsxs("div", {
|
|
152
|
+
"data-slot": "app-shell-bar-rest",
|
|
153
|
+
...dragProps,
|
|
154
|
+
className: cn("flex min-w-0 flex-1 items-center gap-(--cue-space-3) px-(--cue-pad-row-x)", dragClasses),
|
|
155
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
156
|
+
"data-slot": "app-shell-bar-leading",
|
|
157
|
+
className: clusterClasses,
|
|
158
|
+
children
|
|
159
|
+
}), actions === void 0 ? null : /* @__PURE__ */ jsx("div", {
|
|
160
|
+
"data-slot": "app-shell-bar-actions",
|
|
161
|
+
className: cn(clusterClasses, "grow-0 shrink-0", platformDrag ? "ms-auto" : void 0),
|
|
162
|
+
children: actions
|
|
163
|
+
})]
|
|
164
|
+
})
|
|
165
|
+
]
|
|
166
|
+
});
|
|
167
|
+
}),
|
|
78
168
|
Body: React.forwardRef(function AppShellBody({ className, ...elementProps }, ref) {
|
|
79
169
|
return /* @__PURE__ */ jsx("div", {
|
|
80
170
|
ref,
|
|
@@ -83,15 +173,24 @@ const AppShell = {
|
|
|
83
173
|
...elementProps
|
|
84
174
|
});
|
|
85
175
|
}),
|
|
86
|
-
Sidebar: React.forwardRef(function AppShellSidebar({ className, drawerClassName, drawerTitle = "Navigation", closeLabel = "Close navigation", collapsible = true, landmark = "navigation", "aria-label": ariaLabel = "Navigation", children, ...sidebarProps }, ref) {
|
|
87
|
-
const { navOpen, setNavOpen } = React.useContext(AppShellContext);
|
|
176
|
+
Sidebar: React.forwardRef(function AppShellSidebar({ className, drawerClassName, drawerTitle = "Navigation", closeLabel = "Close navigation", collapsible = true, landmark = "navigation", "aria-label": ariaLabel = "Navigation", collapsed, defaultCollapsed, onCollapsedChange, width, collapsedWidth, children, ...sidebarProps }, ref) {
|
|
177
|
+
const { navOpen, setNavOpen, rail, setRail } = React.useContext(AppShellContext);
|
|
88
178
|
const DrawerLandmark = landmark === "complementary" ? "aside" : "nav";
|
|
179
|
+
const railed = collapsed === void 0 && defaultCollapsed === void 0;
|
|
89
180
|
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Sidebar.Root, {
|
|
90
181
|
ref,
|
|
91
182
|
"data-slot": "app-shell-sidebar",
|
|
92
183
|
"aria-label": ariaLabel,
|
|
93
184
|
landmark,
|
|
94
185
|
className: cn("hidden md:flex", className),
|
|
186
|
+
collapsed: railed ? rail : collapsed,
|
|
187
|
+
defaultCollapsed,
|
|
188
|
+
onCollapsedChange: railed ? (next) => {
|
|
189
|
+
onCollapsedChange?.(next);
|
|
190
|
+
setRail(next);
|
|
191
|
+
} : onCollapsedChange,
|
|
192
|
+
width: width ?? (railed ? NAV_WIDTH_VALUE : void 0),
|
|
193
|
+
collapsedWidth: collapsedWidth ?? (railed ? NAV_WIDTH_VALUE : void 0),
|
|
95
194
|
...sidebarProps,
|
|
96
195
|
children: [children, collapsible ? /* @__PURE__ */ jsx(Sidebar.Rail, {}) : null]
|
|
97
196
|
}), /* @__PURE__ */ jsx(Drawer.Root, {
|
package/dist/chrome/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ScrollEdges, TAB_FADE_PX, computeScrollEdges, edgeFadeMask } from "./_t
|
|
|
2
2
|
import { BarOverflow } from "./_edge-scroller.js";
|
|
3
3
|
import { TREE_GUIDE_GLYPHS, TreeGuide, TreeItem, TreeRow, flattenTree } from "./_tree.js";
|
|
4
4
|
import { AppBar, AppBarActionsProps, AppBarBrandProps, AppBarLinkProps, AppBarNavProps, AppBarRegister, AppBarRootProps, AppBarSeparatorProps } from "./app-bar.js";
|
|
5
|
-
import { AppShell, AppShellAsideProps, AppShellBodyProps, AppShellContentProps, AppShellNavTriggerProps, AppShellRootProps, AppShellScrollerProps, AppShellSidebarProps } from "./app-shell.js";
|
|
5
|
+
import { AppShell, AppShellAsideProps, AppShellBarProps, AppShellBodyProps, AppShellContentProps, AppShellNavTriggerProps, AppShellRootProps, AppShellScrollerProps, AppShellSidebarProps } from "./app-shell.js";
|
|
6
6
|
import { EmptyState, EmptyStateProps } from "./empty-state.js";
|
|
7
7
|
import { Eyebrow, EyebrowProps } from "./eyebrow.js";
|
|
8
8
|
import { Footer, FooterProps } from "./footer.js";
|
|
@@ -13,9 +13,10 @@ import { Row, RowProps, SeamList, SeamListProps, rowVariants } from "./row.js";
|
|
|
13
13
|
import { ScrollArea, ScrollAreaOrientation, ScrollAreaProps } from "./scroll-area.js";
|
|
14
14
|
import { SectionHeader, SectionHeaderProps } from "./section-header.js";
|
|
15
15
|
import { SegmentedControl, SegmentedControlItem, SegmentedControlProps, SegmentedControlSize } from "./segmented-control.js";
|
|
16
|
-
import {
|
|
16
|
+
import { StatusBarProminence } from "./_status-bar.js";
|
|
17
|
+
import { StatusBar, StatusBarGroupProps, StatusBarItemProps, StatusBarProps, StatusBarTone } from "./status-bar.js";
|
|
17
18
|
import { ScrollableTabsList, ScrollableTabsListProps, Tabs, TabsListProps, TabsPanelProps, TabsRootProps, TabsTabProps } from "./tabs.js";
|
|
18
19
|
import { TitleBar, TitleBarProps } from "./title-bar.js";
|
|
19
20
|
import { Tree, TreeProps, TreeVisibility, TreeVisibilityToggle, TreeVisibilityToggleProps } from "./tree.js";
|
|
20
21
|
import { Toolbar, ToolbarButtonProps, ToolbarGroupProps, ToolbarRootProps, ToolbarSeparatorProps } from "./toolbar.js";
|
|
21
|
-
export { AppBar, type AppBarActionsProps, type AppBarBrandProps, type AppBarLinkProps, type AppBarNavProps, type AppBarRegister, type AppBarRootProps, type AppBarSeparatorProps, AppShell, type AppShellAsideProps, type AppShellBodyProps, type AppShellContentProps, type AppShellNavTriggerProps, type AppShellRootProps, type AppShellScrollerProps, type AppShellSidebarProps, type BarOverflow, EmptyState, type EmptyStateProps, Eyebrow, type EyebrowProps, Footer, type FooterProps, NavigationMenu, type NavigationMenuContentProps, type NavigationMenuItemProps, type NavigationMenuLinkProps, type NavigationMenuListProps, type NavigationMenuRootProps, type NavigationMenuTriggerProps, type NavigationMenuViewportProps, PageShell, type PageShellProps, type PageWidth, Panel, PanelHeader, type PanelHeaderProps, type PanelProps, Row, type RowProps, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, type ScrollEdges, ScrollableTabsList, type ScrollableTabsListProps, SeamList, type SeamListProps, SectionHeader, type SectionHeaderProps, SegmentedControl, type SegmentedControlItem, type SegmentedControlProps, type SegmentedControlSize, StatusBar, type StatusBarItemProps, type StatusBarProps, type StatusBarTone, TAB_FADE_PX, TREE_GUIDE_GLYPHS, Tabs, type TabsListProps, type TabsPanelProps, type TabsRootProps, type TabsTabProps, TitleBar, type TitleBarProps, Toolbar, type ToolbarButtonProps, type ToolbarGroupProps, type ToolbarRootProps, type ToolbarSeparatorProps, Tree, type TreeGuide, type TreeItem, type TreeProps, type TreeRow, type TreeVisibility, TreeVisibilityToggle, type TreeVisibilityToggleProps, computeScrollEdges, edgeFadeMask, flattenTree, rowVariants };
|
|
22
|
+
export { 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, type BarOverflow, EmptyState, type EmptyStateProps, Eyebrow, type EyebrowProps, Footer, type FooterProps, NavigationMenu, type NavigationMenuContentProps, type NavigationMenuItemProps, type NavigationMenuLinkProps, type NavigationMenuListProps, type NavigationMenuRootProps, type NavigationMenuTriggerProps, type NavigationMenuViewportProps, PageShell, type PageShellProps, type PageWidth, Panel, PanelHeader, type PanelHeaderProps, type PanelProps, Row, type RowProps, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, type ScrollEdges, ScrollableTabsList, type ScrollableTabsListProps, SeamList, type SeamListProps, SectionHeader, type SectionHeaderProps, SegmentedControl, type SegmentedControlItem, type SegmentedControlProps, type SegmentedControlSize, StatusBar, type StatusBarGroupProps, type StatusBarItemProps, type StatusBarProminence, type StatusBarProps, type StatusBarTone, TAB_FADE_PX, TREE_GUIDE_GLYPHS, Tabs, type TabsListProps, type TabsPanelProps, type TabsRootProps, type TabsTabProps, TitleBar, type TitleBarProps, Toolbar, type ToolbarButtonProps, type ToolbarGroupProps, type ToolbarRootProps, type ToolbarSeparatorProps, Tree, type TreeGuide, type TreeItem, type TreeProps, type TreeRow, type TreeVisibility, TreeVisibilityToggle, type TreeVisibilityToggleProps, computeScrollEdges, edgeFadeMask, flattenTree, rowVariants };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { StatusBarProminence } from "./_status-bar.js";
|
|
1
2
|
import * as React from "react";
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
4
|
//#region src/chrome/status-bar.d.ts
|
|
3
5
|
/**
|
|
4
6
|
* Ink for a status-bar item. `neutral` inherits the bar's own subtle grey; the
|
|
@@ -19,28 +21,109 @@ interface StatusBarItemProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
|
19
21
|
push?: boolean;
|
|
20
22
|
/** Optional leading icon (e.g. a lucide icon), drawn `aria-hidden`. */
|
|
21
23
|
icon?: React.ElementType;
|
|
24
|
+
/**
|
|
25
|
+
* Make the item a real control: a `<button type="button">` with hover, press
|
|
26
|
+
* and keyboard-focus feedback. Defaults to `false`.
|
|
27
|
+
*
|
|
28
|
+
* A native button, not a `<div>` with an `onClick` — keyboard order is DOM
|
|
29
|
+
* order, `Enter` and `Space` work because the platform makes them work, and
|
|
30
|
+
* assistive technology is told what the thing is by the element rather than
|
|
31
|
+
* by a role attribute that has to be kept honest by hand.
|
|
32
|
+
*
|
|
33
|
+
* **An icon-only interactive item needs an `aria-label`.** There is no text
|
|
34
|
+
* for a screen reader to read and the icon is drawn `aria-hidden`, so without
|
|
35
|
+
* one the control announces as "button" and nothing else.
|
|
36
|
+
*/
|
|
37
|
+
interactive?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* How loudly the item states itself. Defaults to `"quiet"`.
|
|
40
|
+
*
|
|
41
|
+
* `quiet` is a reading: tone ink on the bar's own ground. `filled` is a chip
|
|
42
|
+
* — a full-height tone wash behind tone ink — for the small set of states
|
|
43
|
+
* that earn a colour of their own: a warning, an error, the remote you are
|
|
44
|
+
* attached to. It is loud deliberately, and a bar of five filled items is a
|
|
45
|
+
* bar nobody reads.
|
|
46
|
+
*/
|
|
47
|
+
prominence?: StatusBarProminence;
|
|
48
|
+
/**
|
|
49
|
+
* Replace the rendered element (Base UI render prop) — `render={<a href="…" />}`
|
|
50
|
+
* for a status item that navigates.
|
|
51
|
+
*
|
|
52
|
+
* Implies {@link StatusBarItemProps.interactive}: whatever is rendered gets
|
|
53
|
+
* the control chassis, because an element a reader can click has to look like
|
|
54
|
+
* one whether it is a button or a link.
|
|
55
|
+
*/
|
|
56
|
+
render?: useRender.RenderProp;
|
|
57
|
+
/**
|
|
58
|
+
* Grey the control out, take it out of the pointer's reach and announce it as
|
|
59
|
+
* disabled. Defaults to `false`. Ignored by a static item, which is a reading
|
|
60
|
+
* and not a control.
|
|
61
|
+
*
|
|
62
|
+
* Honoured whatever {@link StatusBarItemProps.render} renders, but by two
|
|
63
|
+
* routes: the `disabled` attribute where it means something — the default
|
|
64
|
+
* `<button>`, a form control, a component that takes a `disabled` prop of its
|
|
65
|
+
* own — and `aria-disabled` plus `data-disabled` everywhere, which is all an
|
|
66
|
+
* anchor gets. There is no such thing as a disabled link; a link that should
|
|
67
|
+
* not be followed should not be a link, and this states the intent rather
|
|
68
|
+
* than pretending to enforce it.
|
|
69
|
+
*/
|
|
70
|
+
disabled?: boolean;
|
|
71
|
+
}
|
|
72
|
+
interface StatusBarGroupProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
73
|
+
/**
|
|
74
|
+
* Start the trailing cluster at this group: pushes it and everything after it
|
|
75
|
+
* to the far edge, exactly as `push` does on a single item.
|
|
76
|
+
*/
|
|
77
|
+
push?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* What the cluster is called. Optional, and worth giving whenever the members
|
|
80
|
+
* only make sense together — "Repository", "Connection" — because a `group`
|
|
81
|
+
* with no name is a landmark a screen reader reads straight past.
|
|
82
|
+
*/
|
|
83
|
+
"aria-label"?: string;
|
|
22
84
|
}
|
|
23
85
|
/**
|
|
24
86
|
* The quiet strip along the bottom of a window.
|
|
25
87
|
*
|
|
26
88
|
* The smallest type in the system in the subtlest ink: a status bar is read
|
|
27
89
|
* when you go looking for it and ignored otherwise, so it must never compete
|
|
28
|
-
* with the work above it. Height comes from `--cue-chrome-statusbar
|
|
90
|
+
* with the work above it. Height comes from `--cue-chrome-statusbar`, and the
|
|
91
|
+
* bar clips rather than wrapping — one rung of the frame, always, whatever it
|
|
92
|
+
* is asked to hold.
|
|
93
|
+
*
|
|
94
|
+
* Items come in two kinds and the difference is deliberate. A plain
|
|
95
|
+
* `StatusBar.Item` is a **reading**: a `<div>`, inert by construction, with no
|
|
96
|
+
* hover, no focus and nothing to click — which is what most of a status bar is.
|
|
97
|
+
* `interactive` (or a `render`) makes one a **control**, and only then does it
|
|
98
|
+
* grow the button chassis, the full-height hover fill and the inset focus ring.
|
|
99
|
+
* `StatusBar.Group` fuses adjacent items into one segmented control.
|
|
29
100
|
*
|
|
30
101
|
* Not a live region — a status bar changes constantly (frame counters, DMX
|
|
31
102
|
* output), and announcing every change would make the app unusable with a
|
|
32
103
|
* screen reader. Put anything that genuinely must be announced in a `Toast`.
|
|
33
104
|
*
|
|
34
|
-
* Static markup — no `"use client"`.
|
|
105
|
+
* Static markup — no `"use client"`. A bar of readings renders on the server
|
|
106
|
+
* and ships no JavaScript at all; the interactive item is the one part that
|
|
107
|
+
* crosses the boundary, and it crosses it alone (`./_status-bar-item.tsx`).
|
|
35
108
|
*
|
|
36
109
|
* @example
|
|
37
110
|
* <StatusBar>
|
|
38
111
|
* <StatusBar.Item icon={Plug} tone="ok">Art-Net connected</StatusBar.Item>
|
|
39
112
|
* <StatusBar.Item push>512 channels</StatusBar.Item>
|
|
40
113
|
* </StatusBar>
|
|
114
|
+
* @example
|
|
115
|
+
* // The VS Code shape: a clickable cluster left, a loud state right.
|
|
116
|
+
* <StatusBar>
|
|
117
|
+
* <StatusBar.Group aria-label="Repository">
|
|
118
|
+
* <StatusBar.Item interactive icon={GitBranch}>main</StatusBar.Item>
|
|
119
|
+
* <StatusBar.Item interactive icon={ArrowUp}>2</StatusBar.Item>
|
|
120
|
+
* </StatusBar.Group>
|
|
121
|
+
* <StatusBar.Item push interactive prominence="filled" tone="danger">3 faults</StatusBar.Item>
|
|
122
|
+
* </StatusBar>
|
|
41
123
|
*/
|
|
42
124
|
declare const StatusBar: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>> & {
|
|
43
|
-
Item: React.ForwardRefExoticComponent<StatusBarItemProps & React.RefAttributes<
|
|
125
|
+
Item: React.ForwardRefExoticComponent<StatusBarItemProps & React.RefAttributes<HTMLElement>>;
|
|
126
|
+
Group: React.ForwardRefExoticComponent<StatusBarGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
44
127
|
};
|
|
45
128
|
//#endregion
|
|
46
|
-
export { StatusBar, StatusBarItemProps, StatusBarProps, StatusBarTone };
|
|
129
|
+
export { StatusBar, StatusBarGroupProps, StatusBarItemProps, type StatusBarProminence, StatusBarProps, StatusBarTone };
|
|
@@ -1,30 +1,41 @@
|
|
|
1
1
|
import { cn } from "../lib/cn.js";
|
|
2
|
+
import { STATUS_BAR_GROUP_CLASSES, statusBarItemClasses } from "./_status-bar.js";
|
|
3
|
+
import { StatusBarInteractiveItem } from "./_status-bar-item.js";
|
|
2
4
|
import * as React from "react";
|
|
3
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
6
|
//#region src/chrome/status-bar.tsx
|
|
5
|
-
const ITEM_TONES = {
|
|
6
|
-
neutral: "",
|
|
7
|
-
accent: "text-accent",
|
|
8
|
-
ok: "text-ok",
|
|
9
|
-
busy: "text-busy",
|
|
10
|
-
warn: "text-warn",
|
|
11
|
-
danger: "text-danger",
|
|
12
|
-
info: "text-info"
|
|
13
|
-
};
|
|
14
7
|
const StatusBarRoot = React.forwardRef(function StatusBar({ className, ...elementProps }, ref) {
|
|
15
8
|
return /* @__PURE__ */ jsx("div", {
|
|
16
9
|
ref,
|
|
17
10
|
"data-slot": "status-bar",
|
|
18
|
-
className: cn("flex h-(--cue-chrome-statusbar) w-full shrink-0 items-center gap-(--cue-space-4) border-t border-border bg-surface-1 px-(--cue-pad-row-x) font-mono text-(length:--cue-text-label) text-fg-subtle", className),
|
|
11
|
+
className: cn("flex h-(--cue-chrome-statusbar) w-full shrink-0 items-center gap-(--cue-space-4) overflow-x-clip border-t border-border bg-surface-1 px-(--cue-pad-row-x) font-mono text-(length:--cue-text-label) text-fg-subtle", className),
|
|
19
12
|
...elementProps
|
|
20
13
|
});
|
|
21
14
|
});
|
|
22
|
-
/**
|
|
23
|
-
|
|
15
|
+
/**
|
|
16
|
+
* One reading in the bar: a mode, a count, a connection state — or, given
|
|
17
|
+
* `interactive`, one control in it.
|
|
18
|
+
*/
|
|
19
|
+
const StatusBarItem = React.forwardRef(function StatusBarItem({ className, tone = "neutral", push = false, icon: Icon, interactive = false, prominence = "quiet", render, disabled, children, ...elementProps }, ref) {
|
|
20
|
+
if (interactive || render !== void 0) return /* @__PURE__ */ jsx(StatusBarInteractiveItem, {
|
|
21
|
+
ref,
|
|
22
|
+
tone,
|
|
23
|
+
prominence,
|
|
24
|
+
className,
|
|
25
|
+
push,
|
|
26
|
+
icon: Icon,
|
|
27
|
+
render,
|
|
28
|
+
disabled,
|
|
29
|
+
elementProps,
|
|
30
|
+
children
|
|
31
|
+
});
|
|
24
32
|
return /* @__PURE__ */ jsxs("div", {
|
|
25
33
|
ref,
|
|
26
34
|
"data-slot": "status-bar-item",
|
|
27
|
-
className: cn(
|
|
35
|
+
className: cn(statusBarItemClasses({
|
|
36
|
+
tone,
|
|
37
|
+
prominence
|
|
38
|
+
}), push ? "ml-auto" : void 0, className),
|
|
28
39
|
...elementProps,
|
|
29
40
|
children: [Icon === void 0 ? null : /* @__PURE__ */ jsx(Icon, {
|
|
30
41
|
"aria-hidden": "true",
|
|
@@ -33,24 +44,77 @@ const StatusBarItem = React.forwardRef(function StatusBarItem({ className, tone
|
|
|
33
44
|
});
|
|
34
45
|
});
|
|
35
46
|
/**
|
|
47
|
+
* Items that belong to each other, one pixel apart.
|
|
48
|
+
*
|
|
49
|
+
* The bar spaces its readings at `--cue-space-4` because they are unrelated
|
|
50
|
+
* facts. A branch name and its ahead/behind count are not unrelated facts; they
|
|
51
|
+
* are one control that happens to have two halves, and the gap between them is
|
|
52
|
+
* what says so. This is VS Code's `compact` mechanic — the seam collapses, and
|
|
53
|
+
* hovering either half grounds both while the half under the cursor goes one
|
|
54
|
+
* rung further — expressed as a wrapper rather than as an id-reference between
|
|
55
|
+
* two items, because a design system's items do not have ids to point at.
|
|
56
|
+
*
|
|
57
|
+
* A `role="group"` rather than nothing: the members are announced as a set, and
|
|
58
|
+
* the DOM order they are announced in is the order they are read in. Give it an
|
|
59
|
+
* `aria-label` when the members only make sense together.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* <StatusBar.Group aria-label="Repository">
|
|
63
|
+
* <StatusBar.Item interactive icon={GitBranch}>main</StatusBar.Item>
|
|
64
|
+
* <StatusBar.Item interactive icon={ArrowUp}>2</StatusBar.Item>
|
|
65
|
+
* </StatusBar.Group>
|
|
66
|
+
*/
|
|
67
|
+
const StatusBarGroup = React.forwardRef(function StatusBarGroup({ className, push = false, role = "group", ...elementProps }, ref) {
|
|
68
|
+
return /* @__PURE__ */ jsx("div", {
|
|
69
|
+
ref,
|
|
70
|
+
"data-slot": "status-bar-group",
|
|
71
|
+
role,
|
|
72
|
+
className: cn(STATUS_BAR_GROUP_CLASSES, push ? "ml-auto" : void 0, className),
|
|
73
|
+
...elementProps
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
/**
|
|
36
77
|
* The quiet strip along the bottom of a window.
|
|
37
78
|
*
|
|
38
79
|
* The smallest type in the system in the subtlest ink: a status bar is read
|
|
39
80
|
* when you go looking for it and ignored otherwise, so it must never compete
|
|
40
|
-
* with the work above it. Height comes from `--cue-chrome-statusbar
|
|
81
|
+
* with the work above it. Height comes from `--cue-chrome-statusbar`, and the
|
|
82
|
+
* bar clips rather than wrapping — one rung of the frame, always, whatever it
|
|
83
|
+
* is asked to hold.
|
|
84
|
+
*
|
|
85
|
+
* Items come in two kinds and the difference is deliberate. A plain
|
|
86
|
+
* `StatusBar.Item` is a **reading**: a `<div>`, inert by construction, with no
|
|
87
|
+
* hover, no focus and nothing to click — which is what most of a status bar is.
|
|
88
|
+
* `interactive` (or a `render`) makes one a **control**, and only then does it
|
|
89
|
+
* grow the button chassis, the full-height hover fill and the inset focus ring.
|
|
90
|
+
* `StatusBar.Group` fuses adjacent items into one segmented control.
|
|
41
91
|
*
|
|
42
92
|
* Not a live region — a status bar changes constantly (frame counters, DMX
|
|
43
93
|
* output), and announcing every change would make the app unusable with a
|
|
44
94
|
* screen reader. Put anything that genuinely must be announced in a `Toast`.
|
|
45
95
|
*
|
|
46
|
-
* Static markup — no `"use client"`.
|
|
96
|
+
* Static markup — no `"use client"`. A bar of readings renders on the server
|
|
97
|
+
* and ships no JavaScript at all; the interactive item is the one part that
|
|
98
|
+
* crosses the boundary, and it crosses it alone (`./_status-bar-item.tsx`).
|
|
47
99
|
*
|
|
48
100
|
* @example
|
|
49
101
|
* <StatusBar>
|
|
50
102
|
* <StatusBar.Item icon={Plug} tone="ok">Art-Net connected</StatusBar.Item>
|
|
51
103
|
* <StatusBar.Item push>512 channels</StatusBar.Item>
|
|
52
104
|
* </StatusBar>
|
|
105
|
+
* @example
|
|
106
|
+
* // The VS Code shape: a clickable cluster left, a loud state right.
|
|
107
|
+
* <StatusBar>
|
|
108
|
+
* <StatusBar.Group aria-label="Repository">
|
|
109
|
+
* <StatusBar.Item interactive icon={GitBranch}>main</StatusBar.Item>
|
|
110
|
+
* <StatusBar.Item interactive icon={ArrowUp}>2</StatusBar.Item>
|
|
111
|
+
* </StatusBar.Group>
|
|
112
|
+
* <StatusBar.Item push interactive prominence="filled" tone="danger">3 faults</StatusBar.Item>
|
|
113
|
+
* </StatusBar>
|
|
53
114
|
*/
|
|
54
|
-
const StatusBar = Object.assign(StatusBarRoot, {
|
|
115
|
+
const StatusBar = Object.assign(StatusBarRoot, {
|
|
116
|
+
Item: StatusBarItem,
|
|
117
|
+
Group: StatusBarGroup
|
|
118
|
+
});
|
|
55
119
|
//#endregion
|
|
56
120
|
export { StatusBar };
|
|
@@ -9,7 +9,17 @@ interface TitleBarProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
|
9
9
|
* the same component ships into both shells and neither one recognises the
|
|
10
10
|
* other's contract. The interactive clusters are carved back out with
|
|
11
11
|
* `app-region: no-drag`, or the buttons in the bar would only ever move the
|
|
12
|
-
* window instead of firing.
|
|
12
|
+
* window instead of firing. Both halves of that contract live in
|
|
13
|
+
* `./_drag.ts`, which `AppShell.Bar` emits from as well — the two bars are
|
|
14
|
+
* draggable the same way or they are not draggable the same way.
|
|
15
|
+
*
|
|
16
|
+
* Double-click-to-maximise is not wired here. Tauri's own injected script
|
|
17
|
+
* already provides it on any drag region, cancel-by-dragging-away on macOS
|
|
18
|
+
* included; Electron provides nothing, and an Electron app has to listen for
|
|
19
|
+
* `dblclick` and toggle the window itself. Neither is a decision a component
|
|
20
|
+
* in a design system can make on the window's behalf.
|
|
21
|
+
*
|
|
22
|
+
* Defaults to `false`.
|
|
13
23
|
*/
|
|
14
24
|
platformDrag?: boolean;
|
|
15
25
|
/**
|
package/dist/chrome/title-bar.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { DRAG_CLASSES, NO_DRAG_CLASSES } from "./_drag.js";
|
|
3
4
|
import * as React from "react";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
//#region src/chrome/title-bar.tsx
|
|
6
|
-
/** `app-region` needs the unprefixed and the WebKit form to cover both shells. */
|
|
7
|
-
const DRAG_CLASSES = "[app-region:drag] [-webkit-app-region:drag]";
|
|
8
|
-
const NO_DRAG_CLASSES = "[app-region:no-drag] [-webkit-app-region:no-drag]";
|
|
9
7
|
/**
|
|
10
8
|
* The window's own bar: app mark left, document name centred, controls right.
|
|
11
9
|
*
|
|
@@ -14,13 +14,14 @@ const SURFACE_ANCHORS = [
|
|
|
14
14
|
"surface-2",
|
|
15
15
|
"surface-3"
|
|
16
16
|
];
|
|
17
|
-
/** The status tones, as `ThemeAnchors.status` spells them. */
|
|
17
|
+
/** The status tones and the live hue, as `ThemeAnchors.status` spells them. */
|
|
18
18
|
const STATUS_ANCHORS = [
|
|
19
19
|
"ok",
|
|
20
20
|
"busy",
|
|
21
21
|
"warn",
|
|
22
22
|
"danger",
|
|
23
|
-
"info"
|
|
23
|
+
"info",
|
|
24
|
+
"stream"
|
|
24
25
|
];
|
|
25
26
|
/** `--cue-font-mono` → the `fonts.mono` key `ThemeAnchors` uses. */
|
|
26
27
|
const FONT_ANCHORS = {
|