@cueplusplus/ui 0.3.0 → 0.5.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 +2229 -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/app-shell.d.ts +52 -2
- package/dist/chrome/app-shell.js +80 -8
- package/dist/chrome/index.d.ts +2 -2
- 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 +37 -2
- 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/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 +6 -4
- package/dist/index.js +2 -1
- 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 +71 -8
- 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 +99 -7
- 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/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/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/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/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/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/job-progress.json +96 -0
- package/manifest/components/launcher-bubble.json +105 -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/node-card.json +1 -1
- package/manifest/components/node-handle.json +1 -1
- package/manifest/components/number-ticker.json +61 -0
- package/manifest/components/onboarding.json +84 -0
- package/manifest/components/otp-field.json +7 -7
- 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/search-input.json +7 -7
- package/manifest/components/segmented-control.json +21 -21
- 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-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/tail-status.json +109 -0
- package/manifest/components/terminal-block.json +91 -0
- 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/timeline.json +1 -1
- package/manifest/components/todo-list.json +69 -0
- package/manifest/components/toggle-group.json +7 -7
- 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 +2670 -33
- package/manifest/tokens.json +22 -1
- package/package.json +46 -4
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { mono, paper } from "./surfaces.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { CheckIcon, Loader2Icon, XIcon } from "lucide-react";
|
|
6
|
+
//#region src/elements/background-inbox.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Work still going somewhere else, and the results waiting to be collected.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* import { BackgroundInbox } from "@cueplusplus/ui/elements";
|
|
12
|
+
*
|
|
13
|
+
* <BackgroundInbox runs={runs} onCollect={collect} />
|
|
14
|
+
*/
|
|
15
|
+
function BackgroundInbox({ runs, onCollect, className, ...props }) {
|
|
16
|
+
const ready = runs.filter((run) => run.state === "ready").length;
|
|
17
|
+
const running = runs.filter((run) => run.state === "running").length;
|
|
18
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
19
|
+
"data-slot": "background-inbox",
|
|
20
|
+
className: cn(paper, "flex w-full max-w-sm flex-col gap-1 rounded-(--radius-overlay) p-3", className),
|
|
21
|
+
...props,
|
|
22
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
23
|
+
className: "flex items-baseline justify-between px-1 pb-1",
|
|
24
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
25
|
+
className: "text-(length:--cue-text-body) font-medium",
|
|
26
|
+
children: "Running elsewhere"
|
|
27
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
28
|
+
className: cn(mono, "tabular-nums", ready > 0 ? "text-stream" : "text-fg-subtle"),
|
|
29
|
+
children: ready > 0 ? `${ready} ready` : `${running} in flight`
|
|
30
|
+
})]
|
|
31
|
+
}), runs.map((run) => /* @__PURE__ */ jsxs("button", {
|
|
32
|
+
type: "button",
|
|
33
|
+
disabled: run.state === "running",
|
|
34
|
+
onClick: () => onCollect?.(run.id),
|
|
35
|
+
className: cn("flex items-center gap-2.5 rounded-(--radius-surface) px-1.5 py-2 text-start transition-colors", run.state === "running" ? "cursor-default" : "hover:bg-surface-1"),
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ jsx("span", {
|
|
38
|
+
className: "flex size-3.5 shrink-0 items-center justify-center",
|
|
39
|
+
children: run.state === "running" ? /* @__PURE__ */ jsx(Loader2Icon, { className: "text-fg-subtle size-3 animate-spin motion-reduce:animate-none" }) : run.state === "failed" ? /* @__PURE__ */ jsx(XIcon, { className: "size-3 text-danger" }) : /* @__PURE__ */ jsx(CheckIcon, { className: "size-3 text-ok" })
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ jsxs("span", {
|
|
42
|
+
className: "flex min-w-0 flex-1 flex-col gap-0.5",
|
|
43
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
44
|
+
className: cn("truncate text-(length:--cue-text-body)", run.state === "running" ? "text-fg-muted" : "text-fg"),
|
|
45
|
+
children: run.title
|
|
46
|
+
}), run.summary && /* @__PURE__ */ jsx("span", {
|
|
47
|
+
className: cn("font-mono text-(length:--cue-text-label) tracking-tight", "text-fg-subtle truncate"),
|
|
48
|
+
children: run.summary
|
|
49
|
+
})]
|
|
50
|
+
}),
|
|
51
|
+
/* @__PURE__ */ jsx("span", {
|
|
52
|
+
className: cn(mono, "text-fg-subtle shrink-0 tabular-nums"),
|
|
53
|
+
children: run.elapsed
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
}, run.id))]
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
export { BackgroundInbox };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/elements/canvas-split.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* The thread steps aside and the document takes the room, still being written as you
|
|
5
|
+
* read.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* import {
|
|
9
|
+
* CanvasSplit,
|
|
10
|
+
* CanvasSplitBody,
|
|
11
|
+
* CanvasSplitDocument,
|
|
12
|
+
* CanvasSplitHeader,
|
|
13
|
+
* CanvasSplitLine,
|
|
14
|
+
* CanvasSplitMessage,
|
|
15
|
+
* CanvasSplitThread,
|
|
16
|
+
* } from "@cueplusplus/ui/elements";
|
|
17
|
+
*
|
|
18
|
+
* <CanvasSplit>
|
|
19
|
+
* <CanvasSplitThread>
|
|
20
|
+
* <CanvasSplitMessage speaker="user">Draft the note</CanvasSplitMessage>
|
|
21
|
+
* </CanvasSplitThread>
|
|
22
|
+
* <CanvasSplitDocument>
|
|
23
|
+
* <CanvasSplitHeader title="note.md" version={3} saved onCopy={copy} />
|
|
24
|
+
* <CanvasSplitBody writing>
|
|
25
|
+
* <CanvasSplitLine heading>Migrating to 0.14</CanvasSplitLine>
|
|
26
|
+
* </CanvasSplitBody>
|
|
27
|
+
* </CanvasSplitDocument>
|
|
28
|
+
* </CanvasSplit>
|
|
29
|
+
*/
|
|
30
|
+
declare function CanvasSplit({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
31
|
+
/**
|
|
32
|
+
* The conversation, narrowed to a rail beside the document. It keeps scrolling while
|
|
33
|
+
* the document is written, so the turn that asked for the artifact stays in view.
|
|
34
|
+
*/
|
|
35
|
+
declare function CanvasSplitThread({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
36
|
+
/** One turn inside the rail — a filled bubble for the person, plain text for the model. */
|
|
37
|
+
declare function CanvasSplitMessage({ speaker, className, ...props }: ComponentProps<"div"> & {
|
|
38
|
+
/**
|
|
39
|
+
* User turns sit right in a bubble, assistant turns run flush left. Emitted as
|
|
40
|
+
* data-speaker for styling from outside; it is deliberately not called role, so the
|
|
41
|
+
* ARIA attribute stays yours to set.
|
|
42
|
+
*/
|
|
43
|
+
speaker: "user" | "assistant";
|
|
44
|
+
}): import("react").JSX.Element;
|
|
45
|
+
/** The document half of the split: the header, and the body under it. */
|
|
46
|
+
declare function CanvasSplitDocument({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
47
|
+
/**
|
|
48
|
+
* What the document is, which version this is, and whether it has been written down
|
|
49
|
+
* yet — with copy and close beside them.
|
|
50
|
+
*/
|
|
51
|
+
declare function CanvasSplitHeader({ title, version, saved, onCopy, onClose, className, ...props }: Omit<ComponentProps<"div">, "children" | "title"> & {
|
|
52
|
+
/** Document name. */
|
|
53
|
+
title: string;
|
|
54
|
+
/** Which revision is on screen. */
|
|
55
|
+
version: number;
|
|
56
|
+
/** Swaps the status between editing and saved. */
|
|
57
|
+
saved: boolean;
|
|
58
|
+
/** Called from the copy action. Omit it and the control renders disabled. */
|
|
59
|
+
onCopy?: () => void;
|
|
60
|
+
/** Called when the canvas is dismissed. */
|
|
61
|
+
onClose?: () => void;
|
|
62
|
+
}): import("react").JSX.Element;
|
|
63
|
+
/**
|
|
64
|
+
* The document's text, scrolling on its own, with a caret while it is still being
|
|
65
|
+
* written.
|
|
66
|
+
*/
|
|
67
|
+
declare function CanvasSplitBody({ writing, className, children, ...props }: ComponentProps<"div"> & {
|
|
68
|
+
/** Trails a caret after the last line while the document is still being written. */
|
|
69
|
+
writing?: boolean;
|
|
70
|
+
}): import("react").JSX.Element;
|
|
71
|
+
/** One line of the document, arriving as it is written. `heading` sets it apart. */
|
|
72
|
+
declare function CanvasSplitLine({ heading, className, ...props }: ComponentProps<"p"> & {
|
|
73
|
+
/** Renders the line as a heading rather than body text. */
|
|
74
|
+
heading?: boolean;
|
|
75
|
+
}): import("react").JSX.Element;
|
|
76
|
+
//#endregion
|
|
77
|
+
export { CanvasSplit, CanvasSplitBody, CanvasSplitDocument, CanvasSplitHeader, CanvasSplitLine, CanvasSplitMessage, CanvasSplitThread };
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { field, ghostButton, mono, paper } from "./surfaces.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { CheckIcon, CopyIcon, FileTextIcon, XIcon } from "lucide-react";
|
|
6
|
+
//#region src/elements/canvas-split.tsx
|
|
7
|
+
/**
|
|
8
|
+
* The thread steps aside and the document takes the room, still being written as you
|
|
9
|
+
* read.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* import {
|
|
13
|
+
* CanvasSplit,
|
|
14
|
+
* CanvasSplitBody,
|
|
15
|
+
* CanvasSplitDocument,
|
|
16
|
+
* CanvasSplitHeader,
|
|
17
|
+
* CanvasSplitLine,
|
|
18
|
+
* CanvasSplitMessage,
|
|
19
|
+
* CanvasSplitThread,
|
|
20
|
+
* } from "@cueplusplus/ui/elements";
|
|
21
|
+
*
|
|
22
|
+
* <CanvasSplit>
|
|
23
|
+
* <CanvasSplitThread>
|
|
24
|
+
* <CanvasSplitMessage speaker="user">Draft the note</CanvasSplitMessage>
|
|
25
|
+
* </CanvasSplitThread>
|
|
26
|
+
* <CanvasSplitDocument>
|
|
27
|
+
* <CanvasSplitHeader title="note.md" version={3} saved onCopy={copy} />
|
|
28
|
+
* <CanvasSplitBody writing>
|
|
29
|
+
* <CanvasSplitLine heading>Migrating to 0.14</CanvasSplitLine>
|
|
30
|
+
* </CanvasSplitBody>
|
|
31
|
+
* </CanvasSplitDocument>
|
|
32
|
+
* </CanvasSplit>
|
|
33
|
+
*/
|
|
34
|
+
function CanvasSplit({ className, ...props }) {
|
|
35
|
+
return /* @__PURE__ */ jsx("div", {
|
|
36
|
+
"data-slot": "canvas-split",
|
|
37
|
+
className: cn(paper, "flex w-full max-w-3xl flex-col overflow-hidden rounded-(--radius-overlay) md:h-80 md:flex-row", className),
|
|
38
|
+
...props
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The conversation, narrowed to a rail beside the document. It keeps scrolling while
|
|
43
|
+
* the document is written, so the turn that asked for the artifact stays in view.
|
|
44
|
+
*/
|
|
45
|
+
function CanvasSplitThread({ className, ...props }) {
|
|
46
|
+
return /* @__PURE__ */ jsx("div", {
|
|
47
|
+
"data-slot": "canvas-split-thread",
|
|
48
|
+
className: cn("border-border flex flex-col gap-3 border-b p-4 md:w-[15rem] md:shrink-0 md:overflow-y-auto md:border-r md:border-b-0", className),
|
|
49
|
+
...props
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/** One turn inside the rail — a filled bubble for the person, plain text for the model. */
|
|
53
|
+
function CanvasSplitMessage({ speaker, className, ...props }) {
|
|
54
|
+
return /* @__PURE__ */ jsx("div", {
|
|
55
|
+
"data-slot": "canvas-split-message",
|
|
56
|
+
"data-speaker": speaker,
|
|
57
|
+
className: cn("cue-elements-fade-in cue-elements-animate-in cue-elements-fill-mode-both text-(length:--cue-text-body) leading-relaxed duration-300", speaker === "user" ? cn(field, "text-fg-muted ms-auto rounded-(--radius-overlay) px-3 py-2") : "text-fg-muted", className),
|
|
58
|
+
...props
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/** The document half of the split: the header, and the body under it. */
|
|
62
|
+
function CanvasSplitDocument({ className, ...props }) {
|
|
63
|
+
return /* @__PURE__ */ jsx("div", {
|
|
64
|
+
"data-slot": "canvas-split-document",
|
|
65
|
+
className: cn("flex min-w-0 flex-1 flex-col", className),
|
|
66
|
+
...props
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* What the document is, which version this is, and whether it has been written down
|
|
71
|
+
* yet — with copy and close beside them.
|
|
72
|
+
*/
|
|
73
|
+
function CanvasSplitHeader({ title, version, saved, onCopy, onClose, className, ...props }) {
|
|
74
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
75
|
+
"data-slot": "canvas-split-header",
|
|
76
|
+
className: cn("border-border flex items-center gap-2 border-b px-3.5 py-2.5", className),
|
|
77
|
+
...props,
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ jsx(FileTextIcon, { className: "text-fg-subtle size-3.5 shrink-0" }),
|
|
80
|
+
/* @__PURE__ */ jsx("span", {
|
|
81
|
+
className: "min-w-0 flex-1 truncate text-(length:--cue-text-body) font-medium",
|
|
82
|
+
children: title
|
|
83
|
+
}),
|
|
84
|
+
/* @__PURE__ */ jsxs("span", {
|
|
85
|
+
className: cn(mono, "text-fg-subtle shrink-0"),
|
|
86
|
+
children: ["v", version]
|
|
87
|
+
}),
|
|
88
|
+
/* @__PURE__ */ jsx("span", {
|
|
89
|
+
className: cn(mono, "shrink-0 transition-colors duration-300", saved ? "text-ok" : "text-fg-subtle"),
|
|
90
|
+
children: saved ? /* @__PURE__ */ jsxs("span", {
|
|
91
|
+
className: "flex items-center gap-1",
|
|
92
|
+
children: [/* @__PURE__ */ jsx(CheckIcon, { className: "size-3" }), "saved"]
|
|
93
|
+
}) : "editing"
|
|
94
|
+
}),
|
|
95
|
+
/* @__PURE__ */ jsx("button", {
|
|
96
|
+
type: "button",
|
|
97
|
+
"aria-label": `Copy ${title}`,
|
|
98
|
+
onClick: onCopy,
|
|
99
|
+
disabled: !onCopy,
|
|
100
|
+
className: cn(ghostButton, "size-7 shrink-0 disabled:pointer-events-none disabled:opacity-30"),
|
|
101
|
+
children: /* @__PURE__ */ jsx(CopyIcon, { className: "size-3.5" })
|
|
102
|
+
}),
|
|
103
|
+
/* @__PURE__ */ jsx("button", {
|
|
104
|
+
type: "button",
|
|
105
|
+
"aria-label": "Close the canvas",
|
|
106
|
+
onClick: onClose,
|
|
107
|
+
disabled: !onClose,
|
|
108
|
+
className: cn(ghostButton, "size-7 shrink-0 disabled:pointer-events-none disabled:opacity-30"),
|
|
109
|
+
children: /* @__PURE__ */ jsx(XIcon, { className: "size-3.5" })
|
|
110
|
+
})
|
|
111
|
+
]
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* The document's text, scrolling on its own, with a caret while it is still being
|
|
116
|
+
* written.
|
|
117
|
+
*/
|
|
118
|
+
function CanvasSplitBody({ writing, className, children, ...props }) {
|
|
119
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
120
|
+
"data-slot": "canvas-split-body",
|
|
121
|
+
className: cn("flex min-h-[9rem] flex-1 flex-col gap-1.5 overflow-y-auto p-4", className),
|
|
122
|
+
...props,
|
|
123
|
+
children: [children, writing && /* @__PURE__ */ jsx("span", {
|
|
124
|
+
"aria-hidden": true,
|
|
125
|
+
className: "bg-accent h-[1.05em] w-[2px] animate-pulse rounded-full motion-reduce:animate-none"
|
|
126
|
+
})]
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/** One line of the document, arriving as it is written. `heading` sets it apart. */
|
|
130
|
+
function CanvasSplitLine({ heading, className, ...props }) {
|
|
131
|
+
return /* @__PURE__ */ jsx("p", {
|
|
132
|
+
"data-slot": "canvas-split-line",
|
|
133
|
+
className: cn("cue-elements-fade-in cue-elements-slide-in-from-bottom-1 cue-elements-animate-in cue-elements-fill-mode-both text-(length:--cue-text-body) leading-relaxed duration-300", heading ? "text-fg font-medium" : "text-fg-muted", className),
|
|
134
|
+
...props
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
//#endregion
|
|
138
|
+
export { CanvasSplit, CanvasSplitBody, CanvasSplitDocument, CanvasSplitHeader, CanvasSplitLine, CanvasSplitMessage, CanvasSplitThread };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/elements/chart.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* How the series is drawn: a filled `area`, a bare `line`, or `bars`. All three share
|
|
5
|
+
* one geometry and one scale — the variant only changes the marks.
|
|
6
|
+
*/
|
|
7
|
+
type ChartVariant = "area" | "line" | "bars";
|
|
8
|
+
/**
|
|
9
|
+
* Area, line, and bars, with points landing one at a time as the series streams in.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* import { Chart } from "@cueplusplus/ui/elements";
|
|
13
|
+
*
|
|
14
|
+
* <Chart
|
|
15
|
+
* label="Runs this week"
|
|
16
|
+
* value="92"
|
|
17
|
+
* delta="+34%"
|
|
18
|
+
* points={points}
|
|
19
|
+
* visibleCount={points.length}
|
|
20
|
+
* variant="area"
|
|
21
|
+
* />
|
|
22
|
+
*/
|
|
23
|
+
declare function Chart({ label, value, delta, points, visibleCount, variant, className, ...props }: Omit<ComponentProps<"div">, "children" | "label" | "value" | "delta" | "points" | "visibleCount" | "variant"> & {
|
|
24
|
+
/** What the series measures. */
|
|
25
|
+
label: string;
|
|
26
|
+
/** The headline figure, pre-formatted. The chart never formats numbers itself. */
|
|
27
|
+
value: string;
|
|
28
|
+
/** Change against the previous window. Renders green unless it starts with a minus sign. */
|
|
29
|
+
delta?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The full series. The scale is computed from all of it, so the axis does not jump
|
|
32
|
+
* while streaming.
|
|
33
|
+
*/
|
|
34
|
+
points: readonly number[];
|
|
35
|
+
/** How many points have arrived. */
|
|
36
|
+
visibleCount: number;
|
|
37
|
+
/** Mark type. The last point stays emphasized in all three. */
|
|
38
|
+
variant?: ChartVariant;
|
|
39
|
+
}): import("react").JSX.Element;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { Chart, ChartVariant };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { mono, paper } from "./surfaces.js";
|
|
4
|
+
import { clamp, take } from "./range.js";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/elements/chart.tsx
|
|
7
|
+
const W = 300;
|
|
8
|
+
const H = 88;
|
|
9
|
+
const PAD = 6;
|
|
10
|
+
const scale = (points) => {
|
|
11
|
+
const max = Math.max(...points, 1);
|
|
12
|
+
const min = Math.min(...points, 0);
|
|
13
|
+
const span = max - min || 1;
|
|
14
|
+
return (value) => 82 - (value - min) / span * 76;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Area, line, and bars, with points landing one at a time as the series streams in.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* import { Chart } from "@cueplusplus/ui/elements";
|
|
21
|
+
*
|
|
22
|
+
* <Chart
|
|
23
|
+
* label="Runs this week"
|
|
24
|
+
* value="92"
|
|
25
|
+
* delta="+34%"
|
|
26
|
+
* points={points}
|
|
27
|
+
* visibleCount={points.length}
|
|
28
|
+
* variant="area"
|
|
29
|
+
* />
|
|
30
|
+
*/
|
|
31
|
+
function Chart({ label, value, delta, points, visibleCount, variant = "area", className, ...props }) {
|
|
32
|
+
const shown = take(points, clamp(visibleCount, 1, points.length));
|
|
33
|
+
const y = scale(points);
|
|
34
|
+
const step = points.length > 1 ? 288 / (points.length - 1) : 0;
|
|
35
|
+
const x = (i) => PAD + i * step;
|
|
36
|
+
const coords = shown.map((p, i) => ({
|
|
37
|
+
x: x(i),
|
|
38
|
+
y: y(p)
|
|
39
|
+
}));
|
|
40
|
+
const line = coords.map((c) => `${c.x},${c.y}`).join(" ");
|
|
41
|
+
const last = coords.at(-1);
|
|
42
|
+
const area = last ? `M ${PAD},82 ${coords.map((c) => `L ${c.x},${c.y}`).join(" ")} L ${last.x},82 Z` : "";
|
|
43
|
+
const lastIndex = shown.length - 1;
|
|
44
|
+
const falling = delta !== void 0 && /^\s*[-−–]/.test(delta);
|
|
45
|
+
const rising = delta !== void 0 && !falling;
|
|
46
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
47
|
+
"data-slot": "chart",
|
|
48
|
+
className: cn(paper, "flex w-full max-w-sm flex-col gap-3 rounded-(--radius-overlay) p-4", className),
|
|
49
|
+
...props,
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ jsxs("div", {
|
|
52
|
+
className: "flex items-baseline justify-between",
|
|
53
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
54
|
+
className: cn(mono, "text-fg-subtle"),
|
|
55
|
+
children: label
|
|
56
|
+
}), delta !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
57
|
+
className: cn("font-mono text-(length:--cue-text-label) tracking-tight", "tabular-nums", rising ? "text-ok" : "text-danger"),
|
|
58
|
+
children: delta
|
|
59
|
+
})]
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ jsx("span", {
|
|
62
|
+
className: "text-(length:--cue-text-title) font-medium tracking-tight tabular-nums",
|
|
63
|
+
children: value
|
|
64
|
+
}),
|
|
65
|
+
/* @__PURE__ */ jsxs("svg", {
|
|
66
|
+
viewBox: `0 0 ${W} ${H}`,
|
|
67
|
+
role: "img",
|
|
68
|
+
"aria-label": `${label}: ${value}`,
|
|
69
|
+
className: "h-[88px] w-full overflow-visible",
|
|
70
|
+
preserveAspectRatio: "none",
|
|
71
|
+
children: [/* @__PURE__ */ jsx("line", {
|
|
72
|
+
x1: "0",
|
|
73
|
+
x2: W,
|
|
74
|
+
y1: 82,
|
|
75
|
+
y2: 82,
|
|
76
|
+
className: "stroke-fg-subtle",
|
|
77
|
+
strokeWidth: "1",
|
|
78
|
+
vectorEffect: "non-scaling-stroke"
|
|
79
|
+
}), variant === "bars" ? shown.map((p, i) => {
|
|
80
|
+
const top = y(p);
|
|
81
|
+
const barWidth = Math.max(2, step * .55);
|
|
82
|
+
return /* @__PURE__ */ jsx("rect", {
|
|
83
|
+
x: x(i) - barWidth / 2,
|
|
84
|
+
y: top,
|
|
85
|
+
width: barWidth,
|
|
86
|
+
height: Math.max(1, 82 - top),
|
|
87
|
+
rx: "1.5",
|
|
88
|
+
className: cn("cue-elements-fade-in cue-elements-animate-in cue-elements-fill-mode-both duration-300", i === lastIndex ? "fill-stream" : "fill-fg-subtle"),
|
|
89
|
+
style: { animationDelay: `${i * 40}ms` }
|
|
90
|
+
}, i);
|
|
91
|
+
}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
92
|
+
variant === "area" && shown.length > 1 && /* @__PURE__ */ jsx("path", {
|
|
93
|
+
d: area,
|
|
94
|
+
className: "fill-stream/15"
|
|
95
|
+
}),
|
|
96
|
+
/* @__PURE__ */ jsx("polyline", {
|
|
97
|
+
points: line,
|
|
98
|
+
fill: "none",
|
|
99
|
+
strokeWidth: "1.75",
|
|
100
|
+
strokeLinecap: "round",
|
|
101
|
+
strokeLinejoin: "round",
|
|
102
|
+
vectorEffect: "non-scaling-stroke",
|
|
103
|
+
className: "stroke-stream"
|
|
104
|
+
}),
|
|
105
|
+
last && /* @__PURE__ */ jsx("circle", {
|
|
106
|
+
cx: last.x,
|
|
107
|
+
cy: last.y,
|
|
108
|
+
r: "3",
|
|
109
|
+
className: "fill-stream"
|
|
110
|
+
})
|
|
111
|
+
] })]
|
|
112
|
+
})
|
|
113
|
+
]
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
export { Chart };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/elements/chat-panel.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* The whole family working together: a message, a pause, a streamed reply.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* import {
|
|
8
|
+
* ChatPanel,
|
|
9
|
+
* ChatPanelComposer,
|
|
10
|
+
* ChatPanelMessages,
|
|
11
|
+
* ChatPanelTyping,
|
|
12
|
+
* ChatPanelUserMessage,
|
|
13
|
+
* } from "@cueplusplus/ui/elements";
|
|
14
|
+
*
|
|
15
|
+
* <ChatPanel>
|
|
16
|
+
* <ChatPanelMessages>
|
|
17
|
+
* <ChatPanelUserMessage>Why did my draft disappear?</ChatPanelUserMessage>
|
|
18
|
+
* <ChatPanelTyping />
|
|
19
|
+
* </ChatPanelMessages>
|
|
20
|
+
* <ChatPanelComposer placeholder="Message" onSend={send} />
|
|
21
|
+
* </ChatPanel>
|
|
22
|
+
*/
|
|
23
|
+
declare function ChatPanel({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
24
|
+
/**
|
|
25
|
+
* The scrolling transcript inside a `ChatPanel`. Bottom-aligned, so a short
|
|
26
|
+
* conversation sits on the composer rather than floating at the top of the panel.
|
|
27
|
+
*/
|
|
28
|
+
declare function ChatPanelMessages({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
29
|
+
/** One message from the person, drawn as a filled bubble on the trailing edge. */
|
|
30
|
+
declare function ChatPanelUserMessage({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
31
|
+
/** One message from the model: plain text on the leading edge, no bubble. */
|
|
32
|
+
declare function ChatPanelAssistantMessage({ className, ...props }: ComponentProps<"p">): import("react").JSX.Element;
|
|
33
|
+
/** The three-dot rest state, for the gap between sending and the first token. */
|
|
34
|
+
declare function ChatPanelTyping({ className, ...props }: Omit<ComponentProps<"div">, "children">): import("react").JSX.Element;
|
|
35
|
+
/**
|
|
36
|
+
* The panel's composer row. It is a display of a composer rather than a working one —
|
|
37
|
+
* the placeholder is a string and the send button takes a handler.
|
|
38
|
+
*/
|
|
39
|
+
declare function ChatPanelComposer({ placeholder, onSend, className, ...props }: Omit<ComponentProps<"div">, "children" | "placeholder"> & {
|
|
40
|
+
/** Resting text in the input bar. */
|
|
41
|
+
placeholder: string;
|
|
42
|
+
/** Called from the send control. Omit it and the control renders disabled. */
|
|
43
|
+
onSend?: () => void;
|
|
44
|
+
}): import("react").JSX.Element;
|
|
45
|
+
//#endregion
|
|
46
|
+
export { ChatPanel, ChatPanelAssistantMessage, ChatPanelComposer, ChatPanelMessages, ChatPanelTyping, ChatPanelUserMessage };
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { field, inkButton, paper } from "./surfaces.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { ArrowUpIcon } from "lucide-react";
|
|
6
|
+
//#region src/elements/chat-panel.tsx
|
|
7
|
+
/**
|
|
8
|
+
* The whole family working together: a message, a pause, a streamed reply.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* import {
|
|
12
|
+
* ChatPanel,
|
|
13
|
+
* ChatPanelComposer,
|
|
14
|
+
* ChatPanelMessages,
|
|
15
|
+
* ChatPanelTyping,
|
|
16
|
+
* ChatPanelUserMessage,
|
|
17
|
+
* } from "@cueplusplus/ui/elements";
|
|
18
|
+
*
|
|
19
|
+
* <ChatPanel>
|
|
20
|
+
* <ChatPanelMessages>
|
|
21
|
+
* <ChatPanelUserMessage>Why did my draft disappear?</ChatPanelUserMessage>
|
|
22
|
+
* <ChatPanelTyping />
|
|
23
|
+
* </ChatPanelMessages>
|
|
24
|
+
* <ChatPanelComposer placeholder="Message" onSend={send} />
|
|
25
|
+
* </ChatPanel>
|
|
26
|
+
*/
|
|
27
|
+
function ChatPanel({ className, ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsx("div", {
|
|
29
|
+
"data-slot": "chat-panel",
|
|
30
|
+
className: cn(paper, "flex h-[270px] w-full max-w-md flex-col overflow-hidden rounded-(--radius-overlay)", className),
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The scrolling transcript inside a `ChatPanel`. Bottom-aligned, so a short
|
|
36
|
+
* conversation sits on the composer rather than floating at the top of the panel.
|
|
37
|
+
*/
|
|
38
|
+
function ChatPanelMessages({ className, ...props }) {
|
|
39
|
+
return /* @__PURE__ */ jsx("div", {
|
|
40
|
+
"data-slot": "chat-panel-messages",
|
|
41
|
+
className: cn("flex flex-1 flex-col justify-end gap-2.5 overflow-y-auto p-4", className),
|
|
42
|
+
...props
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
/** One message from the person, drawn as a filled bubble on the trailing edge. */
|
|
46
|
+
function ChatPanelUserMessage({ className, ...props }) {
|
|
47
|
+
return /* @__PURE__ */ jsx("div", {
|
|
48
|
+
"data-slot": "chat-panel-user-message",
|
|
49
|
+
className: cn(field, "cue-elements-fade-in cue-elements-slide-in-from-bottom-1 cue-elements-animate-in self-end rounded-(--radius-overlay) px-3 py-1.5 text-(length:--cue-text-ui) duration-300", className),
|
|
50
|
+
...props
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/** One message from the model: plain text on the leading edge, no bubble. */
|
|
54
|
+
function ChatPanelAssistantMessage({ className, ...props }) {
|
|
55
|
+
return /* @__PURE__ */ jsx("p", {
|
|
56
|
+
"data-slot": "chat-panel-assistant-message",
|
|
57
|
+
className: cn("text-fg-muted max-w-[85%] self-start text-(length:--cue-text-ui) leading-relaxed", className),
|
|
58
|
+
...props
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/** The three-dot rest state, for the gap between sending and the first token. */
|
|
62
|
+
function ChatPanelTyping({ className, ...props }) {
|
|
63
|
+
return /* @__PURE__ */ jsx("div", {
|
|
64
|
+
"data-slot": "chat-panel-typing",
|
|
65
|
+
className: cn("cue-elements-fade-in cue-elements-animate-in flex gap-1 self-start px-1 duration-300", className),
|
|
66
|
+
...props,
|
|
67
|
+
children: [
|
|
68
|
+
"-0.32s",
|
|
69
|
+
"-0.16s",
|
|
70
|
+
"0s"
|
|
71
|
+
].map((delay) => /* @__PURE__ */ jsx("span", {
|
|
72
|
+
"aria-hidden": true,
|
|
73
|
+
className: "bg-surface-3 size-1 animate-bounce rounded-full motion-reduce:animate-none",
|
|
74
|
+
style: {
|
|
75
|
+
animationDelay: delay,
|
|
76
|
+
animationDuration: "1.1s"
|
|
77
|
+
}
|
|
78
|
+
}, delay))
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The panel's composer row. It is a display of a composer rather than a working one —
|
|
83
|
+
* the placeholder is a string and the send button takes a handler.
|
|
84
|
+
*/
|
|
85
|
+
function ChatPanelComposer({ placeholder, onSend, className, ...props }) {
|
|
86
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
87
|
+
"data-slot": "chat-panel-composer",
|
|
88
|
+
className: cn(field, "mx-3 mb-3 flex h-10 shrink-0 items-center justify-between rounded-full py-1.5 ps-4 pe-1.5", className),
|
|
89
|
+
...props,
|
|
90
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
91
|
+
className: "text-fg-subtle text-(length:--cue-text-body)",
|
|
92
|
+
children: placeholder
|
|
93
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
94
|
+
type: "button",
|
|
95
|
+
"aria-label": "Send",
|
|
96
|
+
onClick: onSend,
|
|
97
|
+
disabled: !onSend,
|
|
98
|
+
className: cn(inkButton, "flex size-7 items-center justify-center rounded-full disabled:pointer-events-none disabled:opacity-30"),
|
|
99
|
+
children: /* @__PURE__ */ jsx(ArrowUpIcon, { className: "size-3.5" })
|
|
100
|
+
})]
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
export { ChatPanel, ChatPanelAssistantMessage, ChatPanelComposer, ChatPanelMessages, ChatPanelTyping, ChatPanelUserMessage };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/elements/checkpoint-history.d.ts
|
|
3
|
+
/** One point the conversation can fall back to, and how much a fallback would undo. */
|
|
4
|
+
interface Checkpoint {
|
|
5
|
+
/** Stable identity, compared against currentId and reported by onRestore. */
|
|
6
|
+
id: string;
|
|
7
|
+
/** What the checkpoint captured. */
|
|
8
|
+
label: string;
|
|
9
|
+
/** Pre-formatted time. */
|
|
10
|
+
at: string;
|
|
11
|
+
/** How many files that checkpoint touched. */
|
|
12
|
+
files: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Points you can fall back to, with what each one would give back.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* import { CheckpointHistory } from "@cueplusplus/ui/elements";
|
|
19
|
+
*
|
|
20
|
+
* <CheckpointHistory checkpoints={checkpoints} currentId="3" onRestore={restore} />
|
|
21
|
+
*/
|
|
22
|
+
declare function CheckpointHistory({ checkpoints, currentId, onRestore, className, ...props }: Omit<ComponentProps<"div">, "children" | "checkpoints" | "currentId" | "onRestore"> & {
|
|
23
|
+
/** Points in the run you can fall back to, oldest first. */
|
|
24
|
+
checkpoints: readonly Checkpoint[];
|
|
25
|
+
/** Where the run stands. Everything after it dims, since restoring would discard it. */
|
|
26
|
+
currentId: string;
|
|
27
|
+
/** Called with the checkpoint to return to. */
|
|
28
|
+
onRestore?: (id: string) => void;
|
|
29
|
+
}): import("react").JSX.Element;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { Checkpoint, CheckpointHistory };
|