@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,88 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { ghostButton, mono, paper } from "./surfaces.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { ChevronDownIcon, ChevronUpIcon, SearchIcon } from "lucide-react";
|
|
6
|
+
//#region src/elements/conversation-search.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Find inside a long thread, with every hit marked down the scrollbar.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* import { ConversationSearch } from "@cueplusplus/ui/elements";
|
|
12
|
+
*
|
|
13
|
+
* <ConversationSearch
|
|
14
|
+
* query={query}
|
|
15
|
+
* hits={hits}
|
|
16
|
+
* activeIndex={0}
|
|
17
|
+
* onQueryChange={setQuery}
|
|
18
|
+
* onStep={step}
|
|
19
|
+
* />
|
|
20
|
+
*/
|
|
21
|
+
function ConversationSearch({ query, hits, activeIndex, onQueryChange, onStep, className, ...props }) {
|
|
22
|
+
const index = hits.length === 0 ? -1 : Math.min(Math.max(activeIndex, 0), hits.length - 1);
|
|
23
|
+
const active = index === -1 ? void 0 : hits[index];
|
|
24
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
25
|
+
"data-slot": "conversation-search",
|
|
26
|
+
className: cn("flex w-full max-w-sm gap-2", className),
|
|
27
|
+
...props,
|
|
28
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
29
|
+
className: "flex min-w-0 flex-1 flex-col gap-2",
|
|
30
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
31
|
+
className: cn(paper, "flex items-center gap-2 rounded-full py-1.5 pr-1.5 pl-3"),
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ jsx(SearchIcon, { className: "text-fg-subtle size-3.5 shrink-0" }),
|
|
34
|
+
/* @__PURE__ */ jsx("input", {
|
|
35
|
+
value: query,
|
|
36
|
+
onChange: (event) => onQueryChange?.(event.target.value),
|
|
37
|
+
placeholder: "Find in conversation",
|
|
38
|
+
"aria-label": "Find in conversation",
|
|
39
|
+
className: "text-fg-muted placeholder:text-fg-subtle min-w-0 flex-1 bg-transparent text-(length:--cue-text-body) outline-none focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-1 focus-visible:outline-accent"
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ jsx("span", {
|
|
42
|
+
className: cn(mono, "text-fg-subtle shrink-0 tabular-nums"),
|
|
43
|
+
children: hits.length === 0 ? "0" : `${index + 1}/${hits.length}`
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ jsx("button", {
|
|
46
|
+
type: "button",
|
|
47
|
+
"aria-label": "Previous match",
|
|
48
|
+
onClick: () => onStep?.(-1),
|
|
49
|
+
className: cn(ghostButton, "size-6 shrink-0"),
|
|
50
|
+
children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-3.5" })
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ jsx("button", {
|
|
53
|
+
type: "button",
|
|
54
|
+
"aria-label": "Next match",
|
|
55
|
+
onClick: () => onStep?.(1),
|
|
56
|
+
className: cn(ghostButton, "size-6 shrink-0"),
|
|
57
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-3.5" })
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
}), active && /* @__PURE__ */ jsxs("div", {
|
|
61
|
+
className: cn("bg-fg/[0.06]", "cue-elements-fade-in cue-elements-animate-in rounded-(--radius-surface) px-3 py-2 text-(length:--cue-text-ui) leading-relaxed duration-200"),
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ jsx("span", {
|
|
64
|
+
className: "text-fg-muted",
|
|
65
|
+
children: active.before
|
|
66
|
+
}),
|
|
67
|
+
/* @__PURE__ */ jsx("span", {
|
|
68
|
+
className: "text-fg rounded-(--radius-control) bg-warn/35 px-0.5",
|
|
69
|
+
children: active.match
|
|
70
|
+
}),
|
|
71
|
+
/* @__PURE__ */ jsx("span", {
|
|
72
|
+
className: "text-fg-muted",
|
|
73
|
+
children: active.after
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
})]
|
|
77
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
78
|
+
className: "bg-surface-1 relative w-1.5 shrink-0 rounded-full",
|
|
79
|
+
children: hits.map((hit, i) => /* @__PURE__ */ jsx("span", {
|
|
80
|
+
"aria-hidden": true,
|
|
81
|
+
className: cn("absolute inset-x-0 h-1 rounded-full transition-colors duration-200", i === index ? "bg-warn" : "bg-warn/35"),
|
|
82
|
+
style: { top: `${hit.position}%` }
|
|
83
|
+
}, hit.id))
|
|
84
|
+
})]
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
88
|
+
export { ConversationSearch };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/elements/cost-meter.d.ts
|
|
3
|
+
/** One model's share of the spend: what it read, what it wrote, and what that came to. */
|
|
4
|
+
interface CostLine {
|
|
5
|
+
/** Model this line accounts for. */
|
|
6
|
+
model: string;
|
|
7
|
+
/** Input tokens consumed. The element divides by 1000 for display. */
|
|
8
|
+
inputTokens: number;
|
|
9
|
+
/** Output tokens produced. */
|
|
10
|
+
outputTokens: number;
|
|
11
|
+
/** Pre-formatted. The element never does currency math. */
|
|
12
|
+
cost: string;
|
|
13
|
+
/** Fraction of the run's cost, 0 to 1. Drives the stacked bar. */
|
|
14
|
+
share: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* What the run spent, split by model, against the session total.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* import { CostMeter } from "@cueplusplus/ui/elements";
|
|
21
|
+
*
|
|
22
|
+
* <CostMeter runCost="$2.76" sessionCost="$18.40" lines={lines} />
|
|
23
|
+
*/
|
|
24
|
+
declare function CostMeter({ runCost, sessionCost, lines, className, ...props }: Omit<ComponentProps<"div">, "children" | "runCost" | "sessionCost" | "lines"> & {
|
|
25
|
+
/** Pre-formatted cost of this run. */
|
|
26
|
+
runCost: string;
|
|
27
|
+
/** Pre-formatted cumulative cost. */
|
|
28
|
+
sessionCost: string;
|
|
29
|
+
/** Per-model breakdown, ordered largest first so the bar reads left to right. */
|
|
30
|
+
lines: readonly CostLine[];
|
|
31
|
+
}): import("react").JSX.Element;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { CostLine, CostMeter };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { mono, paper } from "./surfaces.js";
|
|
4
|
+
import { pct } from "./range.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/elements/cost-meter.tsx
|
|
7
|
+
/**
|
|
8
|
+
* What the run spent, split by model, against the session total.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* import { CostMeter } from "@cueplusplus/ui/elements";
|
|
12
|
+
*
|
|
13
|
+
* <CostMeter runCost="$2.76" sessionCost="$18.40" lines={lines} />
|
|
14
|
+
*/
|
|
15
|
+
function CostMeter({ runCost, sessionCost, lines, className, ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
17
|
+
"data-slot": "cost-meter",
|
|
18
|
+
className: cn(paper, "flex w-full max-w-sm flex-col gap-3 rounded-(--radius-overlay) p-4", className),
|
|
19
|
+
...props,
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ jsxs("div", {
|
|
22
|
+
className: "flex items-baseline gap-2",
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ jsx("span", {
|
|
25
|
+
className: "text-(length:--cue-text-title) font-medium tracking-tight tabular-nums",
|
|
26
|
+
children: runCost
|
|
27
|
+
}),
|
|
28
|
+
/* @__PURE__ */ jsx("span", {
|
|
29
|
+
className: cn(mono, "text-fg-subtle"),
|
|
30
|
+
children: "this run"
|
|
31
|
+
}),
|
|
32
|
+
/* @__PURE__ */ jsxs("span", {
|
|
33
|
+
className: cn(mono, "text-fg-subtle ms-auto tabular-nums"),
|
|
34
|
+
children: [sessionCost, " session"]
|
|
35
|
+
})
|
|
36
|
+
]
|
|
37
|
+
}),
|
|
38
|
+
/* @__PURE__ */ jsx("div", {
|
|
39
|
+
className: "bg-surface-2 flex h-1.5 w-full overflow-hidden rounded-full",
|
|
40
|
+
children: lines.map((line, i) => /* @__PURE__ */ jsx("span", {
|
|
41
|
+
className: cn("h-full transition-[width] duration-500 motion-reduce:transition-none", i === 0 ? "bg-stream" : i === 1 ? "bg-stream/55" : "bg-surface-3"),
|
|
42
|
+
style: { width: `${pct(line.share, 1)}%` }
|
|
43
|
+
}, line.model))
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ jsx("div", {
|
|
46
|
+
className: "flex flex-col gap-1.5",
|
|
47
|
+
children: lines.map((line) => /* @__PURE__ */ jsxs("div", {
|
|
48
|
+
className: "flex items-baseline gap-2",
|
|
49
|
+
children: [
|
|
50
|
+
/* @__PURE__ */ jsx("span", {
|
|
51
|
+
className: "text-fg-muted min-w-0 flex-1 truncate text-(length:--cue-text-body)",
|
|
52
|
+
children: line.model
|
|
53
|
+
}),
|
|
54
|
+
/* @__PURE__ */ jsxs("span", {
|
|
55
|
+
className: cn(mono, "text-fg-subtle shrink-0 tabular-nums"),
|
|
56
|
+
children: [
|
|
57
|
+
(line.inputTokens / 1e3).toFixed(1),
|
|
58
|
+
"k in ·",
|
|
59
|
+
" ",
|
|
60
|
+
(line.outputTokens / 1e3).toFixed(1),
|
|
61
|
+
"k out"
|
|
62
|
+
]
|
|
63
|
+
}),
|
|
64
|
+
/* @__PURE__ */ jsx("span", {
|
|
65
|
+
className: cn(mono, "text-fg-muted shrink-0 tabular-nums"),
|
|
66
|
+
children: line.cost
|
|
67
|
+
})
|
|
68
|
+
]
|
|
69
|
+
}, line.model))
|
|
70
|
+
})
|
|
71
|
+
]
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
export { CostMeter };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/elements/data-table.d.ts
|
|
3
|
+
/** One row of the table: a model, the context it holds, and what it costs. */
|
|
4
|
+
interface ModelUsage {
|
|
5
|
+
/** The model's name, and the row's key. Its first letter becomes the row's monogram. */
|
|
6
|
+
name: string;
|
|
7
|
+
/** The context window, already formatted — `200K`. This element does no arithmetic. */
|
|
8
|
+
context: string;
|
|
9
|
+
/** The price, already formatted — `$3/M`. Set in tabular figures so the column lines up. */
|
|
10
|
+
cost: string;
|
|
11
|
+
}
|
|
12
|
+
interface DataTableProps extends Omit<ComponentProps<"div">, "children"> {
|
|
13
|
+
/** Table rows with model name, context window, and cost. */
|
|
14
|
+
rows: readonly ModelUsage[];
|
|
15
|
+
/** Identity key that remounts the body so row entrance can replay. */
|
|
16
|
+
cycle: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A small comparison table the model can answer with directly.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* import { DataTable } from "@cueplusplus/ui/elements";
|
|
23
|
+
*
|
|
24
|
+
* <DataTable
|
|
25
|
+
* rows={[{ name: "Sonnet", context: "200k", cost: "$3" }]}
|
|
26
|
+
* cycle={0}
|
|
27
|
+
* />
|
|
28
|
+
*/
|
|
29
|
+
declare function ElementsDataTable({ rows, cycle, className, ...props }: DataTableProps): import("react").JSX.Element;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { DataTableProps, ElementsDataTable, ModelUsage };
|
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
//#region src/elements/data-table.tsx
|
|
6
|
+
/**
|
|
7
|
+
* A small comparison table the model can answer with directly.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* import { DataTable } from "@cueplusplus/ui/elements";
|
|
11
|
+
*
|
|
12
|
+
* <DataTable
|
|
13
|
+
* rows={[{ name: "Sonnet", context: "200k", cost: "$3" }]}
|
|
14
|
+
* cycle={0}
|
|
15
|
+
* />
|
|
16
|
+
*/
|
|
17
|
+
function ElementsDataTable({ rows, cycle, className, ...props }) {
|
|
18
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
19
|
+
"data-slot": "data-table",
|
|
20
|
+
className: cn(paper, "w-full max-w-sm overflow-hidden rounded-(--radius-overlay) text-(length:--cue-text-body)", className),
|
|
21
|
+
...props,
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ jsxs("div", {
|
|
24
|
+
className: "flex items-center px-4 pt-3 pb-2",
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ jsx("span", {
|
|
27
|
+
className: cn(mono, "text-fg-subtle flex-1"),
|
|
28
|
+
children: "Model"
|
|
29
|
+
}),
|
|
30
|
+
/* @__PURE__ */ jsx("span", {
|
|
31
|
+
className: cn(mono, "text-fg-subtle w-16 text-end"),
|
|
32
|
+
children: "Context"
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ jsx("span", {
|
|
35
|
+
className: cn(mono, "text-fg-subtle w-16 text-end"),
|
|
36
|
+
children: "Cost"
|
|
37
|
+
})
|
|
38
|
+
]
|
|
39
|
+
}),
|
|
40
|
+
/* @__PURE__ */ jsx("div", { className: "bg-surface-2 mx-4 h-px" }),
|
|
41
|
+
/* @__PURE__ */ jsx("div", { children: rows.map((row, index) => /* @__PURE__ */ jsxs("div", {
|
|
42
|
+
className: "cue-elements-fade-in cue-elements-slide-in-from-bottom-1 cue-elements-animate-in cue-elements-fill-mode-both hover:bg-surface-1 flex items-center gap-2.5 px-4 py-2.5 transition-colors duration-300",
|
|
43
|
+
style: { animationDelay: `${index * 80}ms` },
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ jsx("span", {
|
|
46
|
+
className: "bg-surface-2 text-fg-muted flex size-5 shrink-0 items-center justify-center rounded-(--radius-control) text-(length:--cue-text-micro) font-medium",
|
|
47
|
+
children: row.name[0]
|
|
48
|
+
}),
|
|
49
|
+
/* @__PURE__ */ jsx("span", {
|
|
50
|
+
className: "text-fg flex-1 truncate",
|
|
51
|
+
children: row.name
|
|
52
|
+
}),
|
|
53
|
+
/* @__PURE__ */ jsx("span", {
|
|
54
|
+
className: cn(mono, "text-fg-muted w-16 text-end tabular-nums"),
|
|
55
|
+
children: row.context
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ jsx("span", {
|
|
58
|
+
className: cn(mono, "text-fg-muted w-16 text-end tabular-nums"),
|
|
59
|
+
children: row.cost
|
|
60
|
+
})
|
|
61
|
+
]
|
|
62
|
+
}, row.name)) }, cycle)
|
|
63
|
+
]
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { ElementsDataTable };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/elements/day-separator.d.ts
|
|
3
|
+
interface DatedMessage {
|
|
4
|
+
/** Stable identity for the row key. */
|
|
5
|
+
id: string;
|
|
6
|
+
/**
|
|
7
|
+
* Pre-formatted day label. Compared against the previous message to decide where a
|
|
8
|
+
* rule goes.
|
|
9
|
+
*/
|
|
10
|
+
day: string;
|
|
11
|
+
/** Pre-formatted time, revealed on hover. */
|
|
12
|
+
time: string;
|
|
13
|
+
/** Who sent it. User turns sit right in a bubble, assistant turns run flush left. */
|
|
14
|
+
role: "user" | "assistant";
|
|
15
|
+
/** Message body. */
|
|
16
|
+
text: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Chronology in a long thread: days marked, times on hover.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* import { DaySeparator } from "@cueplusplus/ui/elements";
|
|
23
|
+
*
|
|
24
|
+
* <DaySeparator messages={messages} />
|
|
25
|
+
*/
|
|
26
|
+
declare function DaySeparator({ messages, className, ...props }: Omit<ComponentProps<"div">, "children" | "messages"> & {
|
|
27
|
+
/**
|
|
28
|
+
* Turns in order. A separator is inserted wherever day changes from the previous
|
|
29
|
+
* message, so grouping needs no pre-processing.
|
|
30
|
+
*/
|
|
31
|
+
messages: readonly DatedMessage[];
|
|
32
|
+
}): import("react").JSX.Element;
|
|
33
|
+
//#endregion
|
|
34
|
+
export { DatedMessage, DaySeparator };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { mono } from "./surfaces.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/elements/day-separator.tsx
|
|
6
|
+
/**
|
|
7
|
+
* Chronology in a long thread: days marked, times on hover.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* import { DaySeparator } from "@cueplusplus/ui/elements";
|
|
11
|
+
*
|
|
12
|
+
* <DaySeparator messages={messages} />
|
|
13
|
+
*/
|
|
14
|
+
function DaySeparator({ messages, className, ...props }) {
|
|
15
|
+
let lastDay = "";
|
|
16
|
+
return /* @__PURE__ */ jsx("div", {
|
|
17
|
+
"data-slot": "day-separator",
|
|
18
|
+
className: cn("flex w-full max-w-sm flex-col gap-2", className),
|
|
19
|
+
...props,
|
|
20
|
+
children: messages.map((message) => {
|
|
21
|
+
const newDay = message.day !== lastDay;
|
|
22
|
+
lastDay = message.day;
|
|
23
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
24
|
+
className: "flex flex-col gap-2",
|
|
25
|
+
children: [newDay && /* @__PURE__ */ jsxs("div", {
|
|
26
|
+
className: "flex items-center gap-2.5 py-1",
|
|
27
|
+
children: [
|
|
28
|
+
/* @__PURE__ */ jsx("span", { className: "bg-surface-2 h-px flex-1" }),
|
|
29
|
+
/* @__PURE__ */ jsx("span", {
|
|
30
|
+
className: cn("font-mono text-(length:--cue-text-label) tracking-tight", "text-fg-subtle"),
|
|
31
|
+
children: message.day
|
|
32
|
+
}),
|
|
33
|
+
/* @__PURE__ */ jsx("span", { className: "bg-surface-2 h-px flex-1" })
|
|
34
|
+
]
|
|
35
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
36
|
+
className: cn("group flex items-baseline gap-2", message.role === "user" && "flex-row-reverse"),
|
|
37
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
38
|
+
className: cn("max-w-[80%] text-(length:--cue-text-body) leading-relaxed break-words", message.role === "user" ? "bg-surface-1 rounded-(--radius-overlay) px-3.5 py-2" : "text-fg-muted"),
|
|
39
|
+
children: message.text
|
|
40
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
41
|
+
className: cn(mono, "text-transparent group-hover:text-fg-subtle shrink-0 tabular-nums transition-colors"),
|
|
42
|
+
children: message.time
|
|
43
|
+
})]
|
|
44
|
+
})]
|
|
45
|
+
}, message.id);
|
|
46
|
+
})
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { DaySeparator };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/elements/diagram.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* A drawn answer with zoom, reset, and a full-bleed view; you hand it the rendered
|
|
5
|
+
* graphic.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* import { Diagram } from "@cueplusplus/ui/elements";
|
|
9
|
+
*
|
|
10
|
+
* <Diagram title="message flow" zoom={zoom} onZoomIn={zoomIn} onReset={reset}>
|
|
11
|
+
* <MermaidSvg chart={chart} />
|
|
12
|
+
* </Diagram>
|
|
13
|
+
*/
|
|
14
|
+
declare function Diagram({ title, zoom, children, onZoomIn, onZoomOut, onReset, onExpand, className, ...props }: Omit<ComponentProps<"div">, "title" | "zoom" | "children" | "onZoomIn" | "onZoomOut" | "onReset" | "onExpand"> & {
|
|
15
|
+
/** What the diagram shows. */
|
|
16
|
+
title: string;
|
|
17
|
+
/** Scale factor applied to the content. 1 is fit; the header prints it as a percentage. */
|
|
18
|
+
zoom: number;
|
|
19
|
+
/**
|
|
20
|
+
* The rendered graphic. The element owns the frame and never parses or injects
|
|
21
|
+
* markup itself, so whatever renders your chart stays your choice.
|
|
22
|
+
*/
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
/** Called from the zoom-in control. Clamp the range yourself. */
|
|
25
|
+
onZoomIn?: () => void;
|
|
26
|
+
/** Called from the zoom-out control. */
|
|
27
|
+
onZoomOut?: () => void;
|
|
28
|
+
/** Called to return to the default view. */
|
|
29
|
+
onReset?: () => void;
|
|
30
|
+
/** Called to open the diagram full screen. */
|
|
31
|
+
onExpand?: () => void;
|
|
32
|
+
}): import("react").JSX.Element;
|
|
33
|
+
//#endregion
|
|
34
|
+
export { Diagram };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { ghostButton, mono, paper } from "./surfaces.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { MaximizeIcon, MinusIcon, PlusIcon, RotateCcwIcon } from "lucide-react";
|
|
6
|
+
//#region src/elements/diagram.tsx
|
|
7
|
+
/**
|
|
8
|
+
* A drawn answer with zoom, reset, and a full-bleed view; you hand it the rendered
|
|
9
|
+
* graphic.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* import { Diagram } from "@cueplusplus/ui/elements";
|
|
13
|
+
*
|
|
14
|
+
* <Diagram title="message flow" zoom={zoom} onZoomIn={zoomIn} onReset={reset}>
|
|
15
|
+
* <MermaidSvg chart={chart} />
|
|
16
|
+
* </Diagram>
|
|
17
|
+
*/
|
|
18
|
+
function Diagram({ title, zoom, children, onZoomIn, onZoomOut, onReset, onExpand, className, ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
20
|
+
"data-slot": "diagram",
|
|
21
|
+
className: cn(paper, "flex w-full max-w-md flex-col overflow-hidden rounded-(--radius-overlay)", className),
|
|
22
|
+
...props,
|
|
23
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
24
|
+
className: "flex items-center gap-1 px-3 py-2",
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ jsx("span", {
|
|
27
|
+
className: "min-w-0 flex-1 truncate text-(length:--cue-text-body) font-medium",
|
|
28
|
+
children: title
|
|
29
|
+
}),
|
|
30
|
+
/* @__PURE__ */ jsxs("span", {
|
|
31
|
+
className: cn(mono, "text-fg-subtle shrink-0 tabular-nums"),
|
|
32
|
+
children: [Math.round(zoom * 100), "%"]
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ jsx("button", {
|
|
35
|
+
type: "button",
|
|
36
|
+
"aria-label": "Zoom out",
|
|
37
|
+
onClick: onZoomOut,
|
|
38
|
+
className: cn(ghostButton, "size-7 shrink-0"),
|
|
39
|
+
children: /* @__PURE__ */ jsx(MinusIcon, { className: "size-3.5" })
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ jsx("button", {
|
|
42
|
+
type: "button",
|
|
43
|
+
"aria-label": "Zoom in",
|
|
44
|
+
onClick: onZoomIn,
|
|
45
|
+
className: cn(ghostButton, "size-7 shrink-0"),
|
|
46
|
+
children: /* @__PURE__ */ jsx(PlusIcon, { className: "size-3.5" })
|
|
47
|
+
}),
|
|
48
|
+
/* @__PURE__ */ jsx("button", {
|
|
49
|
+
type: "button",
|
|
50
|
+
"aria-label": "Reset the view",
|
|
51
|
+
onClick: onReset,
|
|
52
|
+
className: cn(ghostButton, "size-7 shrink-0"),
|
|
53
|
+
children: /* @__PURE__ */ jsx(RotateCcwIcon, { className: "size-3.5" })
|
|
54
|
+
}),
|
|
55
|
+
/* @__PURE__ */ jsx("button", {
|
|
56
|
+
type: "button",
|
|
57
|
+
"aria-label": "Open full screen",
|
|
58
|
+
onClick: onExpand,
|
|
59
|
+
disabled: !onExpand,
|
|
60
|
+
className: cn(ghostButton, "size-7 shrink-0 disabled:pointer-events-none disabled:opacity-30"),
|
|
61
|
+
children: /* @__PURE__ */ jsx(MaximizeIcon, { className: "size-3.5" })
|
|
62
|
+
})
|
|
63
|
+
]
|
|
64
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
65
|
+
className: "border-border flex min-h-[10rem] items-center justify-center overflow-hidden border-t p-4",
|
|
66
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
67
|
+
className: "origin-center transition-transform duration-200 ease-out motion-reduce:transition-none",
|
|
68
|
+
style: { transform: `scale(${zoom})` },
|
|
69
|
+
children
|
|
70
|
+
})
|
|
71
|
+
})]
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
export { Diagram };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/elements/document-reference.d.ts
|
|
3
|
+
/** One place in a document the answer leans on — the page, and what it says there. */
|
|
4
|
+
interface DocumentAnchor {
|
|
5
|
+
/** Which page the quote is on. `onJump` reports it and `activePage` marks it. */
|
|
6
|
+
page: number;
|
|
7
|
+
/** The passage itself, drawn against a rule. Several anchors may share one page. */
|
|
8
|
+
quote: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A document the answer leans on, with the quoted passage and the page to jump to.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* import { DocumentReference } from "@cueplusplus/ui/elements";
|
|
15
|
+
*
|
|
16
|
+
* <DocumentReference
|
|
17
|
+
* title="migration-0.14.pdf"
|
|
18
|
+
* pages={14}
|
|
19
|
+
* anchors={anchors}
|
|
20
|
+
* activePage={4}
|
|
21
|
+
* onJump={setPage}
|
|
22
|
+
* />
|
|
23
|
+
*/
|
|
24
|
+
declare function DocumentReference({ title, pages, anchors, activePage, onJump, className, ...props }: Omit<ComponentProps<"div">, "children" | "title" | "pages" | "anchors" | "activePage" | "onJump"> & {
|
|
25
|
+
/** Document name. */
|
|
26
|
+
title: string;
|
|
27
|
+
/** Total page count. */
|
|
28
|
+
pages: number;
|
|
29
|
+
/** The passages the answer drew on, each pinned to a page. */
|
|
30
|
+
anchors: readonly DocumentAnchor[];
|
|
31
|
+
/** Which anchor is highlighted. A page with no anchor highlights nothing. */
|
|
32
|
+
activePage: number;
|
|
33
|
+
/** Called with the page to open. */
|
|
34
|
+
onJump?: (page: number) => void;
|
|
35
|
+
}): import("react").JSX.Element;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { DocumentAnchor, DocumentReference };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { field, mono, paper } from "./surfaces.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { FileTextIcon } from "lucide-react";
|
|
6
|
+
//#region src/elements/document-reference.tsx
|
|
7
|
+
/**
|
|
8
|
+
* A document the answer leans on, with the quoted passage and the page to jump to.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* import { DocumentReference } from "@cueplusplus/ui/elements";
|
|
12
|
+
*
|
|
13
|
+
* <DocumentReference
|
|
14
|
+
* title="migration-0.14.pdf"
|
|
15
|
+
* pages={14}
|
|
16
|
+
* anchors={anchors}
|
|
17
|
+
* activePage={4}
|
|
18
|
+
* onJump={setPage}
|
|
19
|
+
* />
|
|
20
|
+
*/
|
|
21
|
+
function DocumentReference({ title, pages, anchors, activePage, onJump, className, ...props }) {
|
|
22
|
+
const currentIndex = anchors.findIndex((anchor) => anchor.page === activePage);
|
|
23
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
24
|
+
"data-slot": "document-reference",
|
|
25
|
+
className: cn(paper, "flex w-full max-w-sm flex-col gap-3 rounded-(--radius-overlay) p-3.5", className),
|
|
26
|
+
...props,
|
|
27
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
28
|
+
className: "flex items-center gap-2.5",
|
|
29
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
30
|
+
className: "bg-surface-1 text-fg-muted flex size-8 shrink-0 items-center justify-center rounded-(--radius-surface)",
|
|
31
|
+
children: /* @__PURE__ */ jsx(FileTextIcon, { className: "size-3.5" })
|
|
32
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
33
|
+
className: "flex min-w-0 flex-1 flex-col",
|
|
34
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
35
|
+
className: "truncate text-(length:--cue-text-body) font-medium",
|
|
36
|
+
children: title
|
|
37
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
38
|
+
className: cn(mono, "text-fg-subtle"),
|
|
39
|
+
children: [
|
|
40
|
+
pages,
|
|
41
|
+
" pages · ",
|
|
42
|
+
anchors.length,
|
|
43
|
+
" cited"
|
|
44
|
+
]
|
|
45
|
+
})]
|
|
46
|
+
})]
|
|
47
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
48
|
+
className: "flex flex-col gap-1.5",
|
|
49
|
+
children: anchors.map((anchor, i) => /* @__PURE__ */ jsxs("button", {
|
|
50
|
+
type: "button",
|
|
51
|
+
"aria-current": i === currentIndex || void 0,
|
|
52
|
+
onClick: () => onJump?.(anchor.page),
|
|
53
|
+
className: cn("flex flex-col gap-1 rounded-(--radius-surface) px-2.5 py-2 text-start transition-colors", anchor.page === activePage ? field : "hover:bg-surface-1"),
|
|
54
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
55
|
+
className: cn(mono, "text-fg-subtle"),
|
|
56
|
+
children: ["p. ", anchor.page]
|
|
57
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
58
|
+
className: "text-fg-muted border-border-strong border-s-2 ps-2 text-(length:--cue-text-ui) leading-relaxed break-words",
|
|
59
|
+
children: anchor.quote
|
|
60
|
+
})]
|
|
61
|
+
}, `${anchor.page}-${i}`))
|
|
62
|
+
})]
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
export { DocumentReference };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/elements/draft-restore.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Come back to a thread and the sentence you never sent is still waiting.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* import { DraftRestore } from "@cueplusplus/ui/elements";
|
|
8
|
+
*
|
|
9
|
+
* <DraftRestore
|
|
10
|
+
* draft="Add a regression test for draft restore"
|
|
11
|
+
* savedAt="2 minutes ago"
|
|
12
|
+
* onRestore={restore}
|
|
13
|
+
* onDiscard={discard}
|
|
14
|
+
* />
|
|
15
|
+
*/
|
|
16
|
+
declare function DraftRestore({ draft, savedAt, onRestore, onDiscard, className, ...props }: Omit<ComponentProps<"div">, "children" | "draft" | "savedAt" | "onRestore" | "onDiscard"> & {
|
|
17
|
+
/** The unsent text, truncated to one line. */
|
|
18
|
+
draft: string;
|
|
19
|
+
/** When it was last touched, pre-formatted. */
|
|
20
|
+
savedAt: string;
|
|
21
|
+
/** Called to put the draft back in the composer. */
|
|
22
|
+
onRestore?: () => void;
|
|
23
|
+
/** Called to throw the draft away. */
|
|
24
|
+
onDiscard?: () => void;
|
|
25
|
+
}): import("react").JSX.Element;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { DraftRestore };
|