@dungle-scrubs/admin-ui-soft 0.0.0-stage → 0.0.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/GUIDE.md +110 -0
- package/LICENSE +21 -0
- package/README.md +36 -2
- package/THIRD-PARTY-NOTICES.md +25 -0
- package/UPSTREAM-VENDORED-CHANGES.md +317 -0
- package/VENDORED-CHANGES.md +60 -0
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/ai/compositions/agent-console/agent-console.d.ts +109 -0
- package/dist/ai/compositions/agent-console/agent-console.js +644 -0
- package/dist/ai/compositions/attention-feed/attention-feed.d.ts +127 -0
- package/dist/ai/compositions/attention-feed/attention-feed.js +626 -0
- package/dist/ai/compositions/conversation-browser/conversation-browser.d.ts +126 -0
- package/dist/ai/compositions/conversation-browser/conversation-browser.js +364 -0
- package/dist/ai/compositions/redaction-marker/redaction-marker.d.ts +42 -0
- package/dist/ai/compositions/redaction-marker/redaction-marker.js +202 -0
- package/dist/ai/compositions/run-inspector/json-view.js +164 -0
- package/dist/ai/compositions/run-inspector/run-inspector.d.ts +66 -0
- package/dist/ai/compositions/run-inspector/run-inspector.js +703 -0
- package/dist/ai/compositions/run-inspector/run-model.js +155 -0
- package/dist/ai/compositions/tool-approval/json-args.js +54 -0
- package/dist/ai/compositions/tool-approval/tool-approval.d.ts +57 -0
- package/dist/ai/compositions/tool-approval/tool-approval.js +331 -0
- package/dist/ai/compositions/tool-call-row/tool-call-row.js +74 -0
- package/dist/ai/compositions/transcript-viewer/to-thread-messages.js +65 -0
- package/dist/ai/compositions/transcript-viewer/transcript-viewer.d.ts +63 -0
- package/dist/ai/compositions/transcript-viewer/transcript-viewer.js +471 -0
- package/dist/ai/compositions/usage-meter/usage-format.js +107 -0
- package/dist/ai/compositions/usage-meter/usage-meter.d.ts +32 -0
- package/dist/ai/compositions/usage-meter/usage-meter.js +258 -0
- package/dist/ai/testing/mock-clock.d.ts +31 -0
- package/dist/ai/testing/mock-clock.js +66 -0
- package/dist/ai/testing/mock-reply.d.ts +70 -0
- package/dist/ai/testing/mock-reply.js +100 -0
- package/dist/ai/testing/mock-runtime.d.ts +86 -0
- package/dist/ai/testing/mock-runtime.js +384 -0
- package/dist/ai/types.d.ts +323 -0
- package/dist/ai.css +1088 -0
- package/dist/ai.d.ts +160 -0
- package/dist/ai.js +158 -0
- package/dist/components/assistant-ui/elements/activity-graph.d.ts +14 -0
- package/dist/components/assistant-ui/elements/activity-graph.js +69 -0
- package/dist/components/assistant-ui/elements/agent-card.d.ts +21 -0
- package/dist/components/assistant-ui/elements/agent-card.js +75 -0
- package/dist/components/assistant-ui/elements/agent-handoff.d.ts +13 -0
- package/dist/components/assistant-ui/elements/agent-handoff.js +47 -0
- package/dist/components/assistant-ui/elements/agent-plan.d.ts +16 -0
- package/dist/components/assistant-ui/elements/agent-plan.js +93 -0
- package/dist/components/assistant-ui/elements/agent-status.aui.d.ts +24 -0
- package/dist/components/assistant-ui/elements/agent-status.aui.js +161 -0
- package/dist/components/assistant-ui/elements/agent-status.d.ts +17 -0
- package/dist/components/assistant-ui/elements/agent-status.js +47 -0
- package/dist/components/assistant-ui/elements/approval-card.d.ts +31 -0
- package/dist/components/assistant-ui/elements/approval-card.js +99 -0
- package/dist/components/assistant-ui/elements/artifact-card.d.ts +12 -0
- package/dist/components/assistant-ui/elements/artifact-card.js +47 -0
- package/dist/components/assistant-ui/elements/assistant-modal.aui.d.ts +7 -0
- package/dist/components/assistant-ui/elements/assistant-modal.aui.js +276 -0
- package/dist/components/assistant-ui/elements/assistant-sidebar.aui.d.ts +7 -0
- package/dist/components/assistant-ui/elements/assistant-sidebar.aui.js +18 -0
- package/dist/components/assistant-ui/elements/attachment.aui.d.ts +9 -0
- package/dist/components/assistant-ui/elements/attachment.aui.js +143 -0
- package/dist/components/assistant-ui/elements/background-inbox.d.ts +18 -0
- package/dist/components/assistant-ui/elements/background-inbox.js +65 -0
- package/dist/components/assistant-ui/elements/canvas-split.d.ts +25 -0
- package/dist/components/assistant-ui/elements/canvas-split.js +106 -0
- package/dist/components/assistant-ui/elements/chart.d.ts +19 -0
- package/dist/components/assistant-ui/elements/chart.js +105 -0
- package/dist/components/assistant-ui/elements/chat-panel.d.ts +15 -0
- package/dist/components/assistant-ui/elements/chat-panel.js +82 -0
- package/dist/components/assistant-ui/elements/checkpoint-history.d.ts +17 -0
- package/dist/components/assistant-ui/elements/checkpoint-history.js +60 -0
- package/dist/components/assistant-ui/elements/code-diff.d.ts +18 -0
- package/dist/components/assistant-ui/elements/code-diff.js +89 -0
- package/dist/components/assistant-ui/elements/code-runner.d.ts +15 -0
- package/dist/components/assistant-ui/elements/code-runner.js +108 -0
- package/dist/components/assistant-ui/elements/command-palette.d.ts +20 -0
- package/dist/components/assistant-ui/elements/command-palette.js +129 -0
- package/dist/components/assistant-ui/elements/comparison-card.d.ts +18 -0
- package/dist/components/assistant-ui/elements/comparison-card.js +58 -0
- package/dist/components/assistant-ui/elements/composer-trigger-popover.aui.d.ts +51 -0
- package/dist/components/assistant-ui/elements/composer-trigger-popover.aui.js +104 -0
- package/dist/components/assistant-ui/elements/composer.d.ts +91 -0
- package/dist/components/assistant-ui/elements/composer.js +416 -0
- package/dist/components/assistant-ui/elements/computer-use.d.ts +19 -0
- package/dist/components/assistant-ui/elements/computer-use.js +84 -0
- package/dist/components/assistant-ui/elements/confidence-marker.d.ts +20 -0
- package/dist/components/assistant-ui/elements/confidence-marker.js +58 -0
- package/dist/components/assistant-ui/elements/connection-state.d.ts +13 -0
- package/dist/components/assistant-ui/elements/connection-state.js +59 -0
- package/dist/components/assistant-ui/elements/context-breakdown.d.ts +15 -0
- package/dist/components/assistant-ui/elements/context-breakdown.js +91 -0
- package/dist/components/assistant-ui/elements/context-display.aui.d.ts +25 -0
- package/dist/components/assistant-ui/elements/context-display.aui.js +26 -0
- package/dist/components/assistant-ui/elements/context-display.d.ts +43 -0
- package/dist/components/assistant-ui/elements/context-display.js +300 -0
- package/dist/components/assistant-ui/elements/conversation-map.aui.d.ts +9 -0
- package/dist/components/assistant-ui/elements/conversation-map.aui.js +177 -0
- package/dist/components/assistant-ui/elements/conversation-map.d.ts +19 -0
- package/dist/components/assistant-ui/elements/conversation-map.js +84 -0
- package/dist/components/assistant-ui/elements/conversation-search.d.ts +20 -0
- package/dist/components/assistant-ui/elements/conversation-search.js +75 -0
- package/dist/components/assistant-ui/elements/cost-meter.d.ts +19 -0
- package/dist/components/assistant-ui/elements/cost-meter.js +76 -0
- package/dist/components/assistant-ui/elements/data-table.d.ts +72 -0
- package/dist/components/assistant-ui/elements/data-table.js +368 -0
- package/dist/components/assistant-ui/elements/day-separator.d.ts +16 -0
- package/dist/components/assistant-ui/elements/day-separator.js +44 -0
- package/dist/components/assistant-ui/elements/diagram.d.ts +15 -0
- package/dist/components/assistant-ui/elements/diagram.js +65 -0
- package/dist/components/assistant-ui/elements/directive-text.aui.d.ts +11 -0
- package/dist/components/assistant-ui/elements/directive-text.aui.js +18 -0
- package/dist/components/assistant-ui/elements/directive-text.d.ts +32 -0
- package/dist/components/assistant-ui/elements/directive-text.js +35 -0
- package/dist/components/assistant-ui/elements/document-reference.d.ts +17 -0
- package/dist/components/assistant-ui/elements/document-reference.js +62 -0
- package/dist/components/assistant-ui/elements/draft-restore.d.ts +12 -0
- package/dist/components/assistant-ui/elements/draft-restore.js +43 -0
- package/dist/components/assistant-ui/elements/edit-message.d.ts +15 -0
- package/dist/components/assistant-ui/elements/edit-message.js +63 -0
- package/dist/components/assistant-ui/elements/elicitation-form.d.ts +23 -0
- package/dist/components/assistant-ui/elements/elicitation-form.js +112 -0
- package/dist/components/assistant-ui/elements/empty-state.d.ts +16 -0
- package/dist/components/assistant-ui/elements/empty-state.js +71 -0
- package/dist/components/assistant-ui/elements/error-state.d.ts +13 -0
- package/dist/components/assistant-ui/elements/error-state.js +52 -0
- package/dist/components/assistant-ui/elements/feedback-dialog.d.ts +15 -0
- package/dist/components/assistant-ui/elements/feedback-dialog.js +77 -0
- package/dist/components/assistant-ui/elements/file-tree.d.ts +20 -0
- package/dist/components/assistant-ui/elements/file-tree.js +74 -0
- package/dist/components/assistant-ui/elements/file.d.ts +52 -0
- package/dist/components/assistant-ui/elements/file.js +222 -0
- package/dist/components/assistant-ui/elements/flow-graph.d.ts +23 -0
- package/dist/components/assistant-ui/elements/flow-graph.js +72 -0
- package/dist/components/assistant-ui/elements/follow-up-suggestions.aui.d.ts +7 -0
- package/dist/components/assistant-ui/elements/follow-up-suggestions.aui.js +30 -0
- package/dist/components/assistant-ui/elements/generative-ui.d.ts +8 -0
- package/dist/components/assistant-ui/elements/generative-ui.js +27 -0
- package/dist/components/assistant-ui/elements/geo-map.d.ts +29 -0
- package/dist/components/assistant-ui/elements/geo-map.js +190 -0
- package/dist/components/assistant-ui/elements/guardrail-notice.d.ts +15 -0
- package/dist/components/assistant-ui/elements/guardrail-notice.js +59 -0
- package/dist/components/assistant-ui/elements/heat-graph.d.ts +9 -0
- package/dist/components/assistant-ui/elements/heat-graph.js +90 -0
- package/dist/components/assistant-ui/elements/image-gallery.d.ts +22 -0
- package/dist/components/assistant-ui/elements/image-gallery.js +192 -0
- package/dist/components/assistant-ui/elements/image-generation.d.ts +11 -0
- package/dist/components/assistant-ui/elements/image-generation.js +64 -0
- package/dist/components/assistant-ui/elements/image.d.ts +59 -0
- package/dist/components/assistant-ui/elements/image.js +416 -0
- package/dist/components/assistant-ui/elements/inline-citation.d.ts +23 -0
- package/dist/components/assistant-ui/elements/inline-citation.js +90 -0
- package/dist/components/assistant-ui/elements/job-progress.d.ts +25 -0
- package/dist/components/assistant-ui/elements/job-progress.js +102 -0
- package/dist/components/assistant-ui/elements/launcher-bubble.d.ts +15 -0
- package/dist/components/assistant-ui/elements/launcher-bubble.js +71 -0
- package/dist/components/assistant-ui/elements/link-preview.d.ts +17 -0
- package/dist/components/assistant-ui/elements/link-preview.js +77 -0
- package/dist/components/assistant-ui/elements/loading-state.d.ts +13 -0
- package/dist/components/assistant-ui/elements/loading-state.js +33 -0
- package/dist/components/assistant-ui/elements/logos.d.ts +10 -0
- package/dist/components/assistant-ui/elements/logos.js +63 -0
- package/dist/components/assistant-ui/elements/map-answer.d.ts +19 -0
- package/dist/components/assistant-ui/elements/map-answer.js +120 -0
- package/dist/components/assistant-ui/elements/markdown-text.d.ts +11 -0
- package/dist/components/assistant-ui/elements/markdown-text.js +152 -0
- package/dist/components/assistant-ui/elements/math-block.d.ts +25 -0
- package/dist/components/assistant-ui/elements/math-block.js +60 -0
- package/dist/components/assistant-ui/elements/mcp-config.aui.d.ts +28 -0
- package/dist/components/assistant-ui/elements/mcp-config.aui.js +380 -0
- package/dist/components/assistant-ui/elements/mcp-server-panel.d.ts +20 -0
- package/dist/components/assistant-ui/elements/mcp-server-panel.js +114 -0
- package/dist/components/assistant-ui/elements/media-player.d.ts +21 -0
- package/dist/components/assistant-ui/elements/media-player.js +302 -0
- package/dist/components/assistant-ui/elements/memory-chips.d.ts +16 -0
- package/dist/components/assistant-ui/elements/memory-chips.js +44 -0
- package/dist/components/assistant-ui/elements/mermaid-diagram.aui.d.ts +14 -0
- package/dist/components/assistant-ui/elements/mermaid-diagram.aui.js +43 -0
- package/dist/components/assistant-ui/elements/mermaid-diagram.d.ts +20 -0
- package/dist/components/assistant-ui/elements/mermaid-diagram.js +258 -0
- package/dist/components/assistant-ui/elements/message-actions.d.ts +17 -0
- package/dist/components/assistant-ui/elements/message-actions.js +57 -0
- package/dist/components/assistant-ui/elements/message-attachment.d.ts +18 -0
- package/dist/components/assistant-ui/elements/message-attachment.js +58 -0
- package/dist/components/assistant-ui/elements/message-branches.d.ts +12 -0
- package/dist/components/assistant-ui/elements/message-branches.js +55 -0
- package/dist/components/assistant-ui/elements/message-pair.d.ts +16 -0
- package/dist/components/assistant-ui/elements/message-pair.js +63 -0
- package/dist/components/assistant-ui/elements/message-queue.d.ts +15 -0
- package/dist/components/assistant-ui/elements/message-queue.js +70 -0
- package/dist/components/assistant-ui/elements/message-timing.aui.d.ts +30 -0
- package/dist/components/assistant-ui/elements/message-timing.aui.js +98 -0
- package/dist/components/assistant-ui/elements/message-timing.d.ts +14 -0
- package/dist/components/assistant-ui/elements/message-timing.js +26 -0
- package/dist/components/assistant-ui/elements/mobile-composer.d.ts +18 -0
- package/dist/components/assistant-ui/elements/mobile-composer.js +76 -0
- package/dist/components/assistant-ui/elements/model-picker.d.ts +19 -0
- package/dist/components/assistant-ui/elements/model-picker.js +68 -0
- package/dist/components/assistant-ui/elements/model-selector.aui.d.ts +23 -0
- package/dist/components/assistant-ui/elements/model-selector.aui.js +79 -0
- package/dist/components/assistant-ui/elements/model-selector.d.ts +130 -0
- package/dist/components/assistant-ui/elements/model-selector.js +399 -0
- package/dist/components/assistant-ui/elements/number-ticker.d.ts +10 -0
- package/dist/components/assistant-ui/elements/number-ticker.js +41 -0
- package/dist/components/assistant-ui/elements/onboarding.d.ts +17 -0
- package/dist/components/assistant-ui/elements/onboarding.js +69 -0
- package/dist/components/assistant-ui/elements/option-list.d.ts +39 -0
- package/dist/components/assistant-ui/elements/option-list.js +176 -0
- package/dist/components/assistant-ui/elements/permission-grant.d.ts +14 -0
- package/dist/components/assistant-ui/elements/permission-grant.js +84 -0
- package/dist/components/assistant-ui/elements/prompt-library.d.ts +20 -0
- package/dist/components/assistant-ui/elements/prompt-library.js +121 -0
- package/dist/components/assistant-ui/elements/question-flow.d.ts +24 -0
- package/dist/components/assistant-ui/elements/question-flow.js +180 -0
- package/dist/components/assistant-ui/elements/quota-banner.d.ts +14 -0
- package/dist/components/assistant-ui/elements/quota-banner.js +68 -0
- package/dist/components/assistant-ui/elements/quote-reply.d.ts +20 -0
- package/dist/components/assistant-ui/elements/quote-reply.js +66 -0
- package/dist/components/assistant-ui/elements/quote.aui.d.ts +61 -0
- package/dist/components/assistant-ui/elements/quote.aui.js +170 -0
- package/dist/components/assistant-ui/elements/read-aloud.d.ts +16 -0
- package/dist/components/assistant-ui/elements/read-aloud.js +66 -0
- package/dist/components/assistant-ui/elements/reasoning-effort.d.ts +17 -0
- package/dist/components/assistant-ui/elements/reasoning-effort.js +67 -0
- package/dist/components/assistant-ui/elements/reasoning-panel.d.ts +20 -0
- package/dist/components/assistant-ui/elements/reasoning-panel.js +60 -0
- package/dist/components/assistant-ui/elements/reasoning.aui.d.ts +24 -0
- package/dist/components/assistant-ui/elements/reasoning.aui.js +70 -0
- package/dist/components/assistant-ui/elements/reasoning.d.ts +38 -0
- package/dist/components/assistant-ui/elements/reasoning.js +194 -0
- package/dist/components/assistant-ui/elements/recommendation-card.d.ts +16 -0
- package/dist/components/assistant-ui/elements/recommendation-card.js +65 -0
- package/dist/components/assistant-ui/elements/regenerate-menu.d.ts +18 -0
- package/dist/components/assistant-ui/elements/regenerate-menu.js +46 -0
- package/dist/components/assistant-ui/elements/research-report.d.ts +19 -0
- package/dist/components/assistant-ui/elements/research-report.js +63 -0
- package/dist/components/assistant-ui/elements/retrieval-chunks.d.ts +19 -0
- package/dist/components/assistant-ui/elements/retrieval-chunks.js +86 -0
- package/dist/components/assistant-ui/elements/reviewable-diff.d.ts +21 -0
- package/dist/components/assistant-ui/elements/reviewable-diff.js +104 -0
- package/dist/components/assistant-ui/elements/schedule-card.d.ts +19 -0
- package/dist/components/assistant-ui/elements/schedule-card.js +80 -0
- package/dist/components/assistant-ui/elements/score-breakdown.d.ts +19 -0
- package/dist/components/assistant-ui/elements/score-breakdown.js +107 -0
- package/dist/components/assistant-ui/elements/scroll-anchor.d.ts +15 -0
- package/dist/components/assistant-ui/elements/scroll-anchor.js +104 -0
- package/dist/components/assistant-ui/elements/settings-panel.d.ts +23 -0
- package/dist/components/assistant-ui/elements/settings-panel.js +108 -0
- package/dist/components/assistant-ui/elements/shared-conversation.d.ts +18 -0
- package/dist/components/assistant-ui/elements/shared-conversation.js +56 -0
- package/dist/components/assistant-ui/elements/shiki-highlighter.aui.d.ts +29 -0
- package/dist/components/assistant-ui/elements/shiki-highlighter.aui.js +31 -0
- package/dist/components/assistant-ui/elements/shiki-highlighter.d.ts +26 -0
- package/dist/components/assistant-ui/elements/shiki-highlighter.js +49 -0
- package/dist/components/assistant-ui/elements/sources.aui.d.ts +24 -0
- package/dist/components/assistant-ui/elements/sources.aui.js +121 -0
- package/dist/components/assistant-ui/elements/sources.d.ts +21 -0
- package/dist/components/assistant-ui/elements/sources.js +109 -0
- package/dist/components/assistant-ui/elements/speaker-identity.d.ts +17 -0
- package/dist/components/assistant-ui/elements/speaker-identity.js +45 -0
- package/dist/components/assistant-ui/elements/spec-sheet.d.ts +17 -0
- package/dist/components/assistant-ui/elements/spec-sheet.js +39 -0
- package/dist/components/assistant-ui/elements/stopped-run.d.ts +12 -0
- package/dist/components/assistant-ui/elements/stopped-run.js +44 -0
- package/dist/components/assistant-ui/elements/streaming-text.d.ts +15 -0
- package/dist/components/assistant-ui/elements/streaming-text.js +45 -0
- package/dist/components/assistant-ui/elements/subagent-list.d.ts +17 -0
- package/dist/components/assistant-ui/elements/subagent-list.js +74 -0
- package/dist/components/assistant-ui/elements/suggestions.d.ts +14 -0
- package/dist/components/assistant-ui/elements/suggestions.js +25 -0
- package/dist/components/assistant-ui/elements/surfaces.d.ts +42 -0
- package/dist/components/assistant-ui/elements/surfaces.js +87 -0
- package/dist/components/assistant-ui/elements/syntax-highlighter.d.ts +7 -0
- package/dist/components/assistant-ui/elements/syntax-highlighter.js +41 -0
- package/dist/components/assistant-ui/elements/task-card.aui.d.ts +24 -0
- package/dist/components/assistant-ui/elements/task-card.aui.js +136 -0
- package/dist/components/assistant-ui/elements/task-card.d.ts +22 -0
- package/dist/components/assistant-ui/elements/task-card.js +104 -0
- package/dist/components/assistant-ui/elements/terminal-block.d.ts +27 -0
- package/dist/components/assistant-ui/elements/terminal-block.js +266 -0
- package/dist/components/assistant-ui/elements/thinking-indicator.d.ts +10 -0
- package/dist/components/assistant-ui/elements/thinking-indicator.js +30 -0
- package/dist/components/assistant-ui/elements/thread-list.aui.d.ts +39 -0
- package/dist/components/assistant-ui/elements/thread-list.aui.js +331 -0
- package/dist/components/assistant-ui/elements/thread-list.d.ts +19 -0
- package/dist/components/assistant-ui/elements/thread-list.js +72 -0
- package/dist/components/assistant-ui/elements/thread-search.d.ts +20 -0
- package/dist/components/assistant-ui/elements/thread-search.js +94 -0
- package/dist/components/assistant-ui/elements/thread.aui.d.ts +36 -0
- package/dist/components/assistant-ui/elements/thread.aui.js +625 -0
- package/dist/components/assistant-ui/elements/threadlist-sidebar.aui.d.ts +19 -0
- package/dist/components/assistant-ui/elements/threadlist-sidebar.aui.js +75 -0
- package/dist/components/assistant-ui/elements/timeline.d.ts +18 -0
- package/dist/components/assistant-ui/elements/timeline.js +40 -0
- package/dist/components/assistant-ui/elements/todo-list.d.ts +21 -0
- package/dist/components/assistant-ui/elements/todo-list.js +100 -0
- package/dist/components/assistant-ui/elements/tool-call.d.ts +17 -0
- package/dist/components/assistant-ui/elements/tool-call.js +70 -0
- package/dist/components/assistant-ui/elements/tool-error.d.ts +16 -0
- package/dist/components/assistant-ui/elements/tool-error.js +62 -0
- package/dist/components/assistant-ui/elements/tool-fallback.aui.d.ts +44 -0
- package/dist/components/assistant-ui/elements/tool-fallback.aui.js +542 -0
- package/dist/components/assistant-ui/elements/tool-group.aui.d.ts +37 -0
- package/dist/components/assistant-ui/elements/tool-group.aui.js +104 -0
- package/dist/components/assistant-ui/elements/tool-group.d.ts +20 -0
- package/dist/components/assistant-ui/elements/tool-group.js +71 -0
- package/dist/components/assistant-ui/elements/tool-timeline.d.ts +44 -0
- package/dist/components/assistant-ui/elements/tool-timeline.js +109 -0
- package/dist/components/assistant-ui/elements/tooltip-icon-button.d.ts +12 -0
- package/dist/components/assistant-ui/elements/tooltip-icon-button.js +30 -0
- package/dist/components/assistant-ui/elements/trace-waterfall.d.ts +33 -0
- package/dist/components/assistant-ui/elements/trace-waterfall.js +102 -0
- package/dist/components/assistant-ui/elements/typing-indicator.d.ts +9 -0
- package/dist/components/assistant-ui/elements/typing-indicator.js +45 -0
- package/dist/components/assistant-ui/elements/voice-conversation.aui.d.ts +11 -0
- package/dist/components/assistant-ui/elements/voice-conversation.aui.js +54 -0
- package/dist/components/assistant-ui/elements/voice-conversation.d.ts +21 -0
- package/dist/components/assistant-ui/elements/voice-conversation.js +110 -0
- package/dist/components/assistant-ui/elements/voice.aui.d.ts +22 -0
- package/dist/components/assistant-ui/elements/voice.aui.js +100 -0
- package/dist/components/assistant-ui/elements/voice.d.ts +15 -0
- package/dist/components/assistant-ui/elements/voice.js +400 -0
- package/dist/components/assistant-ui/elements/web-preview.d.ts +18 -0
- package/dist/components/assistant-ui/elements/web-preview.js +61 -0
- package/dist/components/assistant-ui/elements/web-search.d.ts +17 -0
- package/dist/components/assistant-ui/elements/web-search.js +54 -0
- package/dist/components/assistant-ui/utils/href.d.ts +13 -0
- package/dist/components/assistant-ui/utils/href.js +39 -0
- package/dist/components/assistant-ui/utils/range.d.ts +22 -0
- package/dist/components/assistant-ui/utils/range.js +48 -0
- package/dist/components/assistant-ui/utils/task.d.ts +14 -0
- package/dist/components/assistant-ui/utils/task.js +75 -0
- package/dist/components/icons/github.js +13 -0
- package/dist/components/theme-provider.d.ts +16 -0
- package/dist/components/theme-provider.js +116 -0
- package/dist/components/ui/accordion.d.ts +8 -0
- package/dist/components/ui/accordion.js +53 -0
- package/dist/components/ui/alert-dialog.d.ts +20 -0
- package/dist/components/ui/alert-dialog.js +93 -0
- package/dist/components/ui/alert.d.ts +12 -0
- package/dist/components/ui/alert.js +42 -0
- package/dist/components/ui/aspect-ratio.d.ts +6 -0
- package/dist/components/ui/aspect-ratio.js +13 -0
- package/dist/components/ui/attachment.d.ts +25 -0
- package/dist/components/ui/attachment.js +103 -0
- package/dist/components/ui/avatar.d.ts +13 -0
- package/dist/components/ui/avatar.js +50 -0
- package/dist/components/ui/badge.d.ts +14 -0
- package/dist/components/ui/badge.js +30 -0
- package/dist/components/ui/breadcrumb.d.ts +12 -0
- package/dist/components/ui/breadcrumb.js +71 -0
- package/dist/components/ui/bubble.d.ts +18 -0
- package/dist/components/ui/bubble.js +72 -0
- package/dist/components/ui/button-group.d.ts +12 -0
- package/dist/components/ui/button-group.js +41 -0
- package/dist/components/ui/button.d.ts +19 -0
- package/dist/components/ui/button.js +71 -0
- package/dist/components/ui/calendar.d.ts +12 -0
- package/dist/components/ui/calendar.js +108 -0
- package/dist/components/ui/card.d.ts +13 -0
- package/dist/components/ui/card.js +55 -0
- package/dist/components/ui/carousel.d.ts +30 -0
- package/dist/components/ui/carousel.js +131 -0
- package/dist/components/ui/chart.d.ts +46 -0
- package/dist/components/ui/chart.js +148 -0
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox.js +20 -0
- package/dist/components/ui/collapsible.d.ts +7 -0
- package/dist/components/ui/collapsible.js +23 -0
- package/dist/components/ui/combobox.d.ts +26 -0
- package/dist/components/ui/combobox.js +161 -0
- package/dist/components/ui/command.d.ts +21 -0
- package/dist/components/ui/command.js +87 -0
- package/dist/components/ui/context-menu.d.ts +31 -0
- package/dist/components/ui/context-menu.js +132 -0
- package/dist/components/ui/dialog.d.ts +19 -0
- package/dist/components/ui/dialog.js +91 -0
- package/dist/components/ui/diff-viewer.d.ts +100 -0
- package/dist/components/ui/diff-viewer.js +461 -0
- package/dist/components/ui/direction.d.ts +2 -0
- package/dist/components/ui/direction.js +2 -0
- package/dist/components/ui/dot-matrix.d.ts +150 -0
- package/dist/components/ui/dot-matrix.js +248 -0
- package/dist/components/ui/drawer.d.ts +18 -0
- package/dist/components/ui/drawer.js +123 -0
- package/dist/components/ui/dropdown-menu.d.ts +31 -0
- package/dist/components/ui/dropdown-menu.js +136 -0
- package/dist/components/ui/empty.d.ts +13 -0
- package/dist/components/ui/empty.js +59 -0
- package/dist/components/ui/field.d.ts +26 -0
- package/dist/components/ui/field.js +109 -0
- package/dist/components/ui/hover-card.d.ts +7 -0
- package/dist/components/ui/hover-card.js +36 -0
- package/dist/components/ui/input-group.d.ts +20 -0
- package/dist/components/ui/input-group.js +77 -0
- package/dist/components/ui/input-otp.d.ts +13 -0
- package/dist/components/ui/input-otp.js +46 -0
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/input.js +14 -0
- package/dist/components/ui/item.d.ts +24 -0
- package/dist/components/ui/item.js +120 -0
- package/dist/components/ui/kbd.d.ts +5 -0
- package/dist/components/ui/kbd.js +19 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/label.js +12 -0
- package/dist/components/ui/marker.d.ts +12 -0
- package/dist/components/ui/marker.js +42 -0
- package/dist/components/ui/menubar.d.ts +31 -0
- package/dist/components/ui/menubar.js +135 -0
- package/dist/components/ui/message-scroller.d.ts +12 -0
- package/dist/components/ui/message-scroller.js +59 -0
- package/dist/components/ui/message.d.ts +12 -0
- package/dist/components/ui/message.js +48 -0
- package/dist/components/ui/native-select.d.ts +10 -0
- package/dist/components/ui/native-select.js +37 -0
- package/dist/components/ui/navigation-menu.d.ts +13 -0
- package/dist/components/ui/navigation-menu.js +82 -0
- package/dist/components/ui/number-roll.d.ts +21 -0
- package/dist/components/ui/number-roll.js +269 -0
- package/dist/components/ui/pagination.d.ts +19 -0
- package/dist/components/ui/pagination.js +79 -0
- package/dist/components/ui/popover.d.ts +11 -0
- package/dist/components/ui/popover.js +54 -0
- package/dist/components/ui/progress.d.ts +9 -0
- package/dist/components/ui/progress.js +44 -0
- package/dist/components/ui/questionnaire.d.ts +21 -0
- package/dist/components/ui/questionnaire.js +169 -0
- package/dist/components/ui/radio-group.d.ts +7 -0
- package/dist/components/ui/radio-group.js +26 -0
- package/dist/components/ui/resizable.d.ts +9 -0
- package/dist/components/ui/resizable.js +28 -0
- package/dist/components/ui/scroll-area.d.ts +6 -0
- package/dist/components/ui/scroll-area.js +35 -0
- package/dist/components/ui/select.d.ts +17 -0
- package/dist/components/ui/select.js +96 -0
- package/dist/components/ui/separator.d.ts +5 -0
- package/dist/components/ui/separator.js +14 -0
- package/dist/components/ui/sheet.d.ts +16 -0
- package/dist/components/ui/sheet.js +87 -0
- package/dist/components/ui/sidebar.d.ts +65 -0
- package/dist/components/ui/sidebar.js +386 -0
- package/dist/components/ui/skeleton.d.ts +4 -0
- package/dist/components/ui/skeleton.js +12 -0
- package/dist/components/ui/slider.d.ts +5 -0
- package/dist/components/ui/slider.js +33 -0
- package/dist/components/ui/spinner.d.ts +4 -0
- package/dist/components/ui/spinner.js +15 -0
- package/dist/components/ui/switch.d.ts +7 -0
- package/dist/components/ui/switch.js +19 -0
- package/dist/components/ui/table.d.ts +12 -0
- package/dist/components/ui/table.js +65 -0
- package/dist/components/ui/tabs.d.ts +12 -0
- package/dist/components/ui/tabs.js +45 -0
- package/dist/components/ui/textarea.d.ts +5 -0
- package/dist/components/ui/textarea.js +12 -0
- package/dist/components/ui/toast.d.ts +18 -0
- package/dist/components/ui/toast.js +121 -0
- package/dist/components/ui/toggle-group.d.ts +13 -0
- package/dist/components/ui/toggle-group.js +51 -0
- package/dist/components/ui/toggle.d.ts +10 -0
- package/dist/components/ui/toggle.js +35 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.js +43 -0
- package/dist/compositions/app-rail/app-rail.d.ts +19 -0
- package/dist/compositions/app-rail/app-rail.js +58 -0
- package/dist/compositions/app-shell/app-shell.d.ts +56 -0
- package/dist/compositions/app-shell/app-shell.js +143 -0
- package/dist/compositions/app-shell/theme-toggle.d.ts +10 -0
- package/dist/compositions/app-shell/theme-toggle.js +65 -0
- package/dist/compositions/confirm-action/confirm-action.d.ts +48 -0
- package/dist/compositions/confirm-action/confirm-action.js +48 -0
- package/dist/compositions/data-table/data-table-state.d.ts +23 -0
- package/dist/compositions/data-table/data-table-state.js +46 -0
- package/dist/compositions/data-table/data-table.d.ts +185 -0
- package/dist/compositions/data-table/data-table.js +615 -0
- package/dist/compositions/date-range-picker/date-range-options.d.ts +28 -0
- package/dist/compositions/date-range-picker/date-range-options.js +61 -0
- package/dist/compositions/date-range-picker/date-range-picker.d.ts +55 -0
- package/dist/compositions/date-range-picker/date-range-picker.js +409 -0
- package/dist/compositions/decision-queue/decision-queue.d.ts +114 -0
- package/dist/compositions/decision-queue/decision-queue.js +478 -0
- package/dist/compositions/event-feed/event-feed.d.ts +59 -0
- package/dist/compositions/event-feed/event-feed.js +105 -0
- package/dist/compositions/feedback.d.ts +20 -0
- package/dist/compositions/feedback.js +49 -0
- package/dist/compositions/fields.d.ts +64 -0
- package/dist/compositions/fields.js +293 -0
- package/dist/compositions/form-kit/form-context.d.ts +10 -0
- package/dist/compositions/form-kit/form-context.js +12 -0
- package/dist/compositions/form-kit/form-fields.d.ts +95 -0
- package/dist/compositions/form-kit/form-fields.js +233 -0
- package/dist/compositions/form-kit/form-kit.d.ts +128 -0
- package/dist/compositions/form-kit/form-kit.js +119 -0
- package/dist/compositions/inspector/inspector.d.ts +53 -0
- package/dist/compositions/inspector/inspector.js +80 -0
- package/dist/compositions/layout.d.ts +36 -0
- package/dist/compositions/layout.js +86 -0
- package/dist/compositions/state-blocks/state-blocks.d.ts +42 -0
- package/dist/compositions/state-blocks/state-blocks.js +81 -0
- package/dist/compositions/status-panel/status-panel.d.ts +94 -0
- package/dist/compositions/status-panel/status-panel.js +189 -0
- package/dist/fonts/InterVariable.woff2 +0 -0
- package/dist/fonts/inter.css +15 -0
- package/dist/hooks/use-attachment-src.js +35 -0
- package/dist/hooks/use-copy-to-clipboard.js +34 -0
- package/dist/hooks/use-mobile.d.ts +3 -0
- package/dist/hooks/use-mobile.js +18 -0
- package/dist/index.d.ts +102 -0
- package/dist/index.js +102 -0
- package/dist/lib/context-level.js +7 -0
- package/dist/lib/elapsed.js +61 -0
- package/dist/lib/iso-date.js +30 -0
- package/dist/lib/motion-loop.js +41 -0
- package/dist/lib/pointer.js +14 -0
- package/dist/lib/status-tone.d.ts +7 -0
- package/dist/lib/status-tone.js +55 -0
- package/dist/lib/triage-keys.js +229 -0
- package/dist/lib/utils.js +2 -0
- package/dist/motion/alert-toast/alert-toast.d.ts +51 -0
- package/dist/motion/alert-toast/alert-toast.js +226 -0
- package/dist/motion/branch-menu/branch-menu.d.ts +47 -0
- package/dist/motion/branch-menu/branch-menu.js +287 -0
- package/dist/motion/check-item/check-item.d.ts +24 -0
- package/dist/motion/check-item/check-item.js +110 -0
- package/dist/motion/dial/dial.d.ts +39 -0
- package/dist/motion/dial/dial.js +290 -0
- package/dist/motion/dictation-button/dictation-button.d.ts +45 -0
- package/dist/motion/dictation-button/dictation-button.js +232 -0
- package/dist/motion/hold-button/hold-button.d.ts +37 -0
- package/dist/motion/hold-button/hold-button.js +192 -0
- package/dist/motion/masonry-grid/masonry-grid.d.ts +42 -0
- package/dist/motion/masonry-grid/masonry-grid.js +145 -0
- package/dist/motion/prompt-composer/prompt-composer.d.ts +90 -0
- package/dist/motion/prompt-composer/prompt-composer.js +374 -0
- package/dist/motion/scrub-select/scrub-select.d.ts +33 -0
- package/dist/motion/scrub-select/scrub-select.js +346 -0
- package/dist/motion/spotlight-grid/spotlight-grid.d.ts +40 -0
- package/dist/motion/spotlight-grid/spotlight-grid.js +171 -0
- package/dist/motion/star-rating/star-rating.d.ts +32 -0
- package/dist/motion/star-rating/star-rating.js +191 -0
- package/dist/motion/status-glyph/status-glyph.d.ts +28 -0
- package/dist/motion/status-glyph/status-glyph.js +171 -0
- package/dist/motion/stepper/stepper.d.ts +56 -0
- package/dist/motion/stepper/stepper.js +211 -0
- package/dist/motion/swipe-row/swipe-row.d.ts +52 -0
- package/dist/motion/swipe-row/swipe-row.js +208 -0
- package/dist/motion/thinking-trace/thinking-trace.d.ts +32 -0
- package/dist/motion/thinking-trace/thinking-trace.js +186 -0
- package/dist/motion/tool-call-chip/tool-call-chip.d.ts +36 -0
- package/dist/motion/tool-call-chip/tool-call-chip.js +135 -0
- package/dist/motion/working-indicator/working-indicator.d.ts +38 -0
- package/dist/motion/working-indicator/working-indicator.js +171 -0
- package/dist/styles.css +828 -0
- package/dist/tokens.css +230 -0
- package/licenses/Inter-OFL.txt +92 -0
- package/licenses/assistant-ui-MIT.txt +21 -0
- package/licenses/shadcn-MIT.md +21 -0
- package/package.json +133 -4
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { field, ghostButton, mono, paper } from "./surfaces.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { CheckIcon, CopyIcon, FileTextIcon, XIcon } from "lucide-react";
|
|
7
|
+
//#region src/components/assistant-ui/elements/canvas-split.tsx
|
|
8
|
+
var canvas_split_exports = /* @__PURE__ */ __exportAll({
|
|
9
|
+
CanvasSplit: () => CanvasSplit,
|
|
10
|
+
CanvasSplitBody: () => CanvasSplitBody,
|
|
11
|
+
CanvasSplitDocument: () => CanvasSplitDocument,
|
|
12
|
+
CanvasSplitHeader: () => CanvasSplitHeader,
|
|
13
|
+
CanvasSplitLine: () => CanvasSplitLine,
|
|
14
|
+
CanvasSplitMessage: () => CanvasSplitMessage,
|
|
15
|
+
CanvasSplitThread: () => CanvasSplitThread
|
|
16
|
+
});
|
|
17
|
+
function CanvasSplit({ className, ...props }) {
|
|
18
|
+
return /* @__PURE__ */ jsx("div", {
|
|
19
|
+
"data-slot": "canvas-split",
|
|
20
|
+
className: cn(paper, "flex w-full max-w-3xl flex-col overflow-hidden rounded-[20px] md:h-80 md:flex-row", className),
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function CanvasSplitThread({ className, ...props }) {
|
|
25
|
+
return /* @__PURE__ */ jsx("div", {
|
|
26
|
+
"data-slot": "canvas-split-thread",
|
|
27
|
+
className: cn("border-foreground/[0.07] 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),
|
|
28
|
+
...props
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function CanvasSplitMessage({ speaker, className, ...props }) {
|
|
32
|
+
return /* @__PURE__ */ jsx("div", {
|
|
33
|
+
"data-slot": "canvas-split-message",
|
|
34
|
+
"data-speaker": speaker,
|
|
35
|
+
className: cn("fade-in animate-in fill-mode-both text-[13px] leading-relaxed duration-300", speaker === "user" ? cn(field, "text-foreground/80 ms-auto rounded-2xl px-3 py-2") : "text-muted-foreground", className),
|
|
36
|
+
...props
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function CanvasSplitDocument({ className, ...props }) {
|
|
40
|
+
return /* @__PURE__ */ jsx("div", {
|
|
41
|
+
"data-slot": "canvas-split-document",
|
|
42
|
+
className: cn("flex min-w-0 flex-1 flex-col", className),
|
|
43
|
+
...props
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function CanvasSplitHeader({ title, version, saved, onCopy, onClose, className, ...props }) {
|
|
47
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
48
|
+
"data-slot": "canvas-split-header",
|
|
49
|
+
className: cn("border-foreground/[0.07] flex items-center gap-2 border-b px-3.5 py-2.5", className),
|
|
50
|
+
...props,
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ jsx(FileTextIcon, { className: "text-muted-foreground size-3.5 shrink-0" }),
|
|
53
|
+
/* @__PURE__ */ jsx("span", {
|
|
54
|
+
className: "min-w-0 flex-1 truncate text-[13px] font-medium",
|
|
55
|
+
children: title
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ jsxs("span", {
|
|
58
|
+
className: cn(mono, "text-muted-foreground shrink-0"),
|
|
59
|
+
children: ["v", version]
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ jsx("span", {
|
|
62
|
+
className: cn(mono, "shrink-0 transition-colors duration-300", saved ? "text-success dark:text-success" : "text-muted-foreground"),
|
|
63
|
+
children: saved ? /* @__PURE__ */ jsxs("span", {
|
|
64
|
+
className: "flex items-center gap-1",
|
|
65
|
+
children: [/* @__PURE__ */ jsx(CheckIcon, { className: "size-3" }), "saved"]
|
|
66
|
+
}) : "editing"
|
|
67
|
+
}),
|
|
68
|
+
/* @__PURE__ */ jsx("button", {
|
|
69
|
+
type: "button",
|
|
70
|
+
"aria-label": `Copy ${title}`,
|
|
71
|
+
onClick: onCopy,
|
|
72
|
+
disabled: !onCopy,
|
|
73
|
+
className: cn(ghostButton, "size-7 shrink-0 disabled:pointer-events-none disabled:opacity-30"),
|
|
74
|
+
children: /* @__PURE__ */ jsx(CopyIcon, { className: "size-3.5" })
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ jsx("button", {
|
|
77
|
+
type: "button",
|
|
78
|
+
"aria-label": "Close the canvas",
|
|
79
|
+
onClick: onClose,
|
|
80
|
+
disabled: !onClose,
|
|
81
|
+
className: cn(ghostButton, "size-7 shrink-0 disabled:pointer-events-none disabled:opacity-30"),
|
|
82
|
+
children: /* @__PURE__ */ jsx(XIcon, { className: "size-3.5" })
|
|
83
|
+
})
|
|
84
|
+
]
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
function CanvasSplitBody({ writing, className, children, ...props }) {
|
|
88
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
89
|
+
"data-slot": "canvas-split-body",
|
|
90
|
+
className: cn("flex min-h-[9rem] flex-1 flex-col gap-1.5 overflow-y-auto p-4", className),
|
|
91
|
+
...props,
|
|
92
|
+
children: [children, writing && /* @__PURE__ */ jsx("span", {
|
|
93
|
+
"aria-hidden": true,
|
|
94
|
+
className: "bg-foreground/70 h-[1.05em] w-[2px] animate-pulse rounded-full motion-reduce:animate-none"
|
|
95
|
+
})]
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
function CanvasSplitLine({ heading, className, ...props }) {
|
|
99
|
+
return /* @__PURE__ */ jsx("p", {
|
|
100
|
+
"data-slot": "canvas-split-line",
|
|
101
|
+
className: cn("fade-in slide-in-from-bottom-1 animate-in fill-mode-both text-[13px] leading-relaxed duration-300", heading ? "text-foreground/95 font-medium" : "text-muted-foreground", className),
|
|
102
|
+
...props
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
//#endregion
|
|
106
|
+
export { CanvasSplit, CanvasSplitBody, CanvasSplitDocument, CanvasSplitHeader, CanvasSplitLine, CanvasSplitMessage, CanvasSplitThread, canvas_split_exports };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace chart_d_exports {
|
|
3
|
+
export { Chart, ChartVariant };
|
|
4
|
+
}
|
|
5
|
+
export type ChartVariant = "area" | "line" | "bars";
|
|
6
|
+
export declare function Chart({ label, value, delta, points, visibleCount, variant, trend, upIsGood, className, ...props }: Omit<ComponentProps<"div">, "children" | "label" | "value" | "delta" | "points" | "visibleCount" | "variant" | "trend" | "upIsGood"> & {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string;
|
|
9
|
+
delta?: string | undefined;
|
|
10
|
+
points: readonly number[];
|
|
11
|
+
visibleCount: number;
|
|
12
|
+
variant?: ChartVariant | undefined;
|
|
13
|
+
/** The direction `delta` moved in. Without it, a leading minus sign reads as down. */
|
|
14
|
+
trend?: "up" | "down" | "flat" | undefined;
|
|
15
|
+
/** Whether a rise is good news, as for revenue, or bad news, as for latency. */
|
|
16
|
+
upIsGood?: boolean | undefined;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { chart_d_exports };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { mono, paper } from "./surfaces.js";
|
|
5
|
+
import { clamp, take } from "../utils/range.js";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/assistant-ui/elements/chart.tsx
|
|
8
|
+
var chart_exports = /* @__PURE__ */ __exportAll({ Chart: () => Chart });
|
|
9
|
+
const W = 300;
|
|
10
|
+
const H = 88;
|
|
11
|
+
const PAD = 6;
|
|
12
|
+
const scale = (points) => {
|
|
13
|
+
const max = Math.max(...points, 1);
|
|
14
|
+
const min = Math.min(...points, 0);
|
|
15
|
+
const span = max - min || 1;
|
|
16
|
+
return (value) => 82 - (value - min) / span * 76;
|
|
17
|
+
};
|
|
18
|
+
function Chart({ label, value, delta, points, visibleCount, variant = "area", trend, upIsGood = true, className, ...props }) {
|
|
19
|
+
const shown = take(points, clamp(visibleCount, 1, points.length));
|
|
20
|
+
const y = scale(points);
|
|
21
|
+
const step = points.length > 1 ? 288 / (points.length - 1) : 0;
|
|
22
|
+
const x = (i) => PAD + i * step;
|
|
23
|
+
const coords = shown.map((p, i) => ({
|
|
24
|
+
x: x(i),
|
|
25
|
+
y: y(p)
|
|
26
|
+
}));
|
|
27
|
+
const line = coords.map((c) => `${c.x},${c.y}`).join(" ");
|
|
28
|
+
const last = coords.at(-1);
|
|
29
|
+
const area = last ? `M ${PAD},82 ${coords.map((c) => `L ${c.x},${c.y}`).join(" ")} L ${last.x},82 Z` : "";
|
|
30
|
+
const lastIndex = shown.length - 1;
|
|
31
|
+
const direction = trend ?? (delta === void 0 ? void 0 : /\d/.test(delta) && !/[1-9]/.test(delta) ? "flat" : /^\s*[-−–]/.test(delta) ? "down" : "up");
|
|
32
|
+
const good = direction === "up" || direction === "down" ? direction === "up" === upIsGood : void 0;
|
|
33
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
34
|
+
"data-slot": "chart",
|
|
35
|
+
className: cn(paper, "flex w-full max-w-sm flex-col gap-3 rounded-2xl p-4", className),
|
|
36
|
+
...props,
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ jsxs("div", {
|
|
39
|
+
className: "flex items-baseline justify-between",
|
|
40
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
41
|
+
className: cn(mono, "text-muted-foreground"),
|
|
42
|
+
children: label
|
|
43
|
+
}), delta !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
44
|
+
"data-trend": direction,
|
|
45
|
+
className: cn("font-mono text-[11px] tracking-tight", "tabular-nums", good === void 0 ? "text-muted-foreground" : good ? "text-emerald-700 dark:text-emerald-400" : "text-red-600 dark:text-red-400"),
|
|
46
|
+
children: delta
|
|
47
|
+
})]
|
|
48
|
+
}),
|
|
49
|
+
/* @__PURE__ */ jsx("span", {
|
|
50
|
+
className: "text-2xl font-medium tracking-tight tabular-nums",
|
|
51
|
+
children: value
|
|
52
|
+
}),
|
|
53
|
+
/* @__PURE__ */ jsxs("svg", {
|
|
54
|
+
viewBox: `0 0 ${W} ${H}`,
|
|
55
|
+
role: "img",
|
|
56
|
+
"aria-label": `${label}: ${value}`,
|
|
57
|
+
className: "h-[88px] w-full overflow-visible",
|
|
58
|
+
preserveAspectRatio: "none",
|
|
59
|
+
children: [/* @__PURE__ */ jsx("line", {
|
|
60
|
+
x1: "0",
|
|
61
|
+
x2: W,
|
|
62
|
+
y1: 82,
|
|
63
|
+
y2: 82,
|
|
64
|
+
className: "stroke-foreground/[0.08]",
|
|
65
|
+
strokeWidth: "1",
|
|
66
|
+
vectorEffect: "non-scaling-stroke"
|
|
67
|
+
}), variant === "bars" ? shown.map((p, i) => {
|
|
68
|
+
const top = y(p);
|
|
69
|
+
const barWidth = Math.max(2, step * .55);
|
|
70
|
+
return /* @__PURE__ */ jsx("rect", {
|
|
71
|
+
x: x(i) - barWidth / 2,
|
|
72
|
+
y: top,
|
|
73
|
+
width: barWidth,
|
|
74
|
+
height: Math.max(1, 82 - top),
|
|
75
|
+
rx: "1.5",
|
|
76
|
+
className: cn("fade-in animate-in fill-mode-both duration-300", i === lastIndex ? "fill-blue-500 dark:fill-blue-400" : "fill-foreground/25"),
|
|
77
|
+
style: { animationDelay: `${i * 40}ms` }
|
|
78
|
+
}, i);
|
|
79
|
+
}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
80
|
+
variant === "area" && shown.length > 1 && /* @__PURE__ */ jsx("path", {
|
|
81
|
+
d: area,
|
|
82
|
+
className: "fill-blue-500/12 dark:fill-blue-400/15"
|
|
83
|
+
}),
|
|
84
|
+
/* @__PURE__ */ jsx("polyline", {
|
|
85
|
+
points: line,
|
|
86
|
+
fill: "none",
|
|
87
|
+
strokeWidth: "1.75",
|
|
88
|
+
strokeLinecap: "round",
|
|
89
|
+
strokeLinejoin: "round",
|
|
90
|
+
vectorEffect: "non-scaling-stroke",
|
|
91
|
+
className: "stroke-blue-500 dark:stroke-blue-400"
|
|
92
|
+
}),
|
|
93
|
+
last && /* @__PURE__ */ jsx("circle", {
|
|
94
|
+
cx: last.x,
|
|
95
|
+
cy: last.y,
|
|
96
|
+
r: "3",
|
|
97
|
+
className: "fill-blue-500 dark:fill-blue-400"
|
|
98
|
+
})
|
|
99
|
+
] })]
|
|
100
|
+
})
|
|
101
|
+
]
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
//#endregion
|
|
105
|
+
export { Chart, chart_exports };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace chat_panel_d_exports {
|
|
3
|
+
export { ChatPanel, ChatPanelAssistantMessage, ChatPanelComposer, ChatPanelMessages, ChatPanelTyping, ChatPanelUserMessage };
|
|
4
|
+
}
|
|
5
|
+
export declare function ChatPanel({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
6
|
+
export declare function ChatPanelMessages({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
7
|
+
export declare function ChatPanelUserMessage({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
8
|
+
export declare function ChatPanelAssistantMessage({ className, ...props }: ComponentProps<"p">): import("react").JSX.Element;
|
|
9
|
+
export declare function ChatPanelTyping({ className, ...props }: Omit<ComponentProps<"div">, "children">): import("react").JSX.Element;
|
|
10
|
+
export declare function ChatPanelComposer({ placeholder, onSend, className, ...props }: Omit<ComponentProps<"div">, "children" | "placeholder"> & {
|
|
11
|
+
placeholder: string;
|
|
12
|
+
onSend?: () => void;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { chat_panel_d_exports };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { field, inkButton, paper } from "./surfaces.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { ArrowUpIcon } from "lucide-react";
|
|
7
|
+
//#region src/components/assistant-ui/elements/chat-panel.tsx
|
|
8
|
+
var chat_panel_exports = /* @__PURE__ */ __exportAll({
|
|
9
|
+
ChatPanel: () => ChatPanel,
|
|
10
|
+
ChatPanelAssistantMessage: () => ChatPanelAssistantMessage,
|
|
11
|
+
ChatPanelComposer: () => ChatPanelComposer,
|
|
12
|
+
ChatPanelMessages: () => ChatPanelMessages,
|
|
13
|
+
ChatPanelTyping: () => ChatPanelTyping,
|
|
14
|
+
ChatPanelUserMessage: () => ChatPanelUserMessage
|
|
15
|
+
});
|
|
16
|
+
function ChatPanel({ className, ...props }) {
|
|
17
|
+
return /* @__PURE__ */ jsx("div", {
|
|
18
|
+
"data-slot": "chat-panel",
|
|
19
|
+
className: cn(paper, "flex h-[270px] w-full max-w-md flex-col overflow-hidden rounded-[24px]", className),
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function ChatPanelMessages({ className, ...props }) {
|
|
24
|
+
return /* @__PURE__ */ jsx("div", {
|
|
25
|
+
"data-slot": "chat-panel-messages",
|
|
26
|
+
className: cn("flex flex-1 flex-col justify-end gap-2.5 overflow-y-auto p-4", className),
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function ChatPanelUserMessage({ className, ...props }) {
|
|
31
|
+
return /* @__PURE__ */ jsx("div", {
|
|
32
|
+
"data-slot": "chat-panel-user-message",
|
|
33
|
+
className: cn(field, "fade-in slide-in-from-bottom-1 animate-in self-end rounded-2xl px-3 py-1.5 text-xs duration-300", className),
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function ChatPanelAssistantMessage({ className, ...props }) {
|
|
38
|
+
return /* @__PURE__ */ jsx("p", {
|
|
39
|
+
"data-slot": "chat-panel-assistant-message",
|
|
40
|
+
className: cn("text-muted-foreground max-w-[85%] self-start text-xs leading-relaxed", className),
|
|
41
|
+
...props
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function ChatPanelTyping({ className, ...props }) {
|
|
45
|
+
return /* @__PURE__ */ jsx("div", {
|
|
46
|
+
"data-slot": "chat-panel-typing",
|
|
47
|
+
className: cn("fade-in animate-in flex gap-1 self-start px-1 duration-300", className),
|
|
48
|
+
...props,
|
|
49
|
+
children: [
|
|
50
|
+
"-0.32s",
|
|
51
|
+
"-0.16s",
|
|
52
|
+
"0s"
|
|
53
|
+
].map((delay) => /* @__PURE__ */ jsx("span", {
|
|
54
|
+
"aria-hidden": true,
|
|
55
|
+
className: "bg-foreground/40 size-1 animate-bounce rounded-full motion-reduce:animate-none",
|
|
56
|
+
style: {
|
|
57
|
+
animationDelay: delay,
|
|
58
|
+
animationDuration: "1.1s"
|
|
59
|
+
}
|
|
60
|
+
}, delay))
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function ChatPanelComposer({ placeholder, onSend, className, ...props }) {
|
|
64
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
65
|
+
"data-slot": "chat-panel-composer",
|
|
66
|
+
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),
|
|
67
|
+
...props,
|
|
68
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
69
|
+
className: "text-muted-foreground text-[13px]",
|
|
70
|
+
children: placeholder
|
|
71
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
72
|
+
type: "button",
|
|
73
|
+
"aria-label": "Send",
|
|
74
|
+
onClick: onSend,
|
|
75
|
+
disabled: !onSend,
|
|
76
|
+
className: cn(inkButton, "flex size-7 items-center justify-center rounded-full disabled:pointer-events-none disabled:opacity-30"),
|
|
77
|
+
children: /* @__PURE__ */ jsx(ArrowUpIcon, { className: "size-3.5" })
|
|
78
|
+
})]
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
//#endregion
|
|
82
|
+
export { ChatPanel, ChatPanelAssistantMessage, ChatPanelComposer, ChatPanelMessages, ChatPanelTyping, ChatPanelUserMessage, chat_panel_exports };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace checkpoint_history_d_exports {
|
|
3
|
+
export { Checkpoint, CheckpointHistory };
|
|
4
|
+
}
|
|
5
|
+
export interface Checkpoint {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
at: string;
|
|
9
|
+
files: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function CheckpointHistory({ checkpoints, currentId, onRestore, className, ...props }: Omit<ComponentProps<"div">, "children" | "checkpoints" | "currentId" | "onRestore"> & {
|
|
12
|
+
checkpoints: readonly Checkpoint[];
|
|
13
|
+
currentId: string;
|
|
14
|
+
onRestore?: (id: string) => void;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { checkpoint_history_d_exports };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { mono, paper } from "./surfaces.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { RotateCcwIcon } from "lucide-react";
|
|
7
|
+
//#region src/components/assistant-ui/elements/checkpoint-history.tsx
|
|
8
|
+
var checkpoint_history_exports = /* @__PURE__ */ __exportAll({ CheckpointHistory: () => CheckpointHistory });
|
|
9
|
+
function CheckpointHistory({ checkpoints, currentId, onRestore, className, ...props }) {
|
|
10
|
+
const currentIndex = checkpoints.findIndex((checkpoint) => checkpoint.id === currentId);
|
|
11
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
12
|
+
"data-slot": "checkpoint-history",
|
|
13
|
+
className: cn(paper, "flex w-full max-w-sm flex-col gap-1 rounded-2xl p-3", className),
|
|
14
|
+
...props,
|
|
15
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
16
|
+
className: "px-1.5 pb-1 text-[13.5px] font-medium",
|
|
17
|
+
children: "Checkpoints"
|
|
18
|
+
}), checkpoints.map((checkpoint, i) => {
|
|
19
|
+
const ahead = currentIndex >= 0 && i > currentIndex;
|
|
20
|
+
const current = checkpoint.id === currentId;
|
|
21
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
22
|
+
className: cn("group relative flex items-center gap-2.5 rounded-xl px-1.5 py-1.5 transition-colors", current ? "bg-foreground/[0.05]" : "hover:bg-foreground/[0.03]", ahead && "text-muted-foreground"),
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ jsx("span", {
|
|
25
|
+
"aria-hidden": true,
|
|
26
|
+
className: cn("size-1.5 shrink-0 rounded-full", current ? "bg-info dark:bg-info" : ahead ? "border-foreground/25 border" : "bg-foreground/25")
|
|
27
|
+
}),
|
|
28
|
+
/* @__PURE__ */ jsxs("span", {
|
|
29
|
+
className: "flex min-w-0 flex-1 flex-col",
|
|
30
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
31
|
+
className: "text-[13px] leading-snug break-words",
|
|
32
|
+
children: checkpoint.label
|
|
33
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
34
|
+
className: cn(mono, "text-muted-foreground"),
|
|
35
|
+
children: [
|
|
36
|
+
checkpoint.at,
|
|
37
|
+
" · ",
|
|
38
|
+
checkpoint.files,
|
|
39
|
+
" ",
|
|
40
|
+
checkpoint.files === 1 ? "file" : "files"
|
|
41
|
+
]
|
|
42
|
+
})]
|
|
43
|
+
}),
|
|
44
|
+
current ? /* @__PURE__ */ jsx("span", {
|
|
45
|
+
className: cn(mono, "text-muted-foreground shrink-0"),
|
|
46
|
+
children: "current"
|
|
47
|
+
}) : onRestore ? /* @__PURE__ */ jsxs("button", {
|
|
48
|
+
type: "button",
|
|
49
|
+
"aria-label": `Restore to ${checkpoint.label}`,
|
|
50
|
+
onClick: () => onRestore(checkpoint.id),
|
|
51
|
+
className: "text-muted-foreground hover:text-foreground/90 ring-border/60 bg-background dark:bg-popover absolute end-1.5 top-1/2 flex h-6 -translate-y-1/2 items-center gap-1 rounded-full px-2 text-[11px] font-medium opacity-0 shadow-xs ring-1 transition-[color,opacity,scale] duration-150 outline-none group-hover:opacity-100 focus-visible:opacity-100 focus-visible:ring-[3px] focus-visible:ring-ring/50 active:scale-[0.96]",
|
|
52
|
+
children: [/* @__PURE__ */ jsx(RotateCcwIcon, { className: "size-2.5" }), "Restore"]
|
|
53
|
+
}) : null
|
|
54
|
+
]
|
|
55
|
+
}, checkpoint.id);
|
|
56
|
+
})]
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
export { CheckpointHistory, checkpoint_history_exports };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace code_diff_d_exports {
|
|
3
|
+
export { CodeDiff, DiffKind, DiffLine };
|
|
4
|
+
}
|
|
5
|
+
export type DiffKind = "context" | "added" | "removed";
|
|
6
|
+
export interface DiffLine {
|
|
7
|
+
kind: DiffKind;
|
|
8
|
+
text: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function CodeDiff({ filename, additions, deletions, lines, cycle, className, ...props }: Omit<ComponentProps<"div">, "children" | "filename" | "additions" | "deletions" | "lines" | "cycle"> & {
|
|
11
|
+
filename: string;
|
|
12
|
+
additions: number;
|
|
13
|
+
deletions: number;
|
|
14
|
+
lines: readonly DiffLine[];
|
|
15
|
+
cycle: number;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { code_diff_d_exports };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { mono, paper } from "./surfaces.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { PrismLight } from "react-syntax-highlighter";
|
|
7
|
+
import json from "react-syntax-highlighter/dist/esm/languages/prism/json";
|
|
8
|
+
import python from "react-syntax-highlighter/dist/esm/languages/prism/python";
|
|
9
|
+
import tsx from "react-syntax-highlighter/dist/esm/languages/prism/tsx";
|
|
10
|
+
import yaml from "react-syntax-highlighter/dist/esm/languages/prism/yaml";
|
|
11
|
+
//#region src/components/assistant-ui/elements/code-diff.tsx
|
|
12
|
+
var code_diff_exports = /* @__PURE__ */ __exportAll({ CodeDiff: () => CodeDiff });
|
|
13
|
+
PrismLight.registerLanguage("yaml", yaml);
|
|
14
|
+
PrismLight.registerLanguage("tsx", tsx);
|
|
15
|
+
PrismLight.registerLanguage("json", json);
|
|
16
|
+
PrismLight.registerLanguage("python", python);
|
|
17
|
+
const LANGUAGE_BY_EXTENSION = {
|
|
18
|
+
yaml: "yaml",
|
|
19
|
+
yml: "yaml",
|
|
20
|
+
ts: "tsx",
|
|
21
|
+
tsx: "tsx",
|
|
22
|
+
js: "tsx",
|
|
23
|
+
jsx: "tsx",
|
|
24
|
+
mjs: "tsx",
|
|
25
|
+
cjs: "tsx",
|
|
26
|
+
json: "json",
|
|
27
|
+
py: "python"
|
|
28
|
+
};
|
|
29
|
+
const languageOf = (filename) => LANGUAGE_BY_EXTENSION[filename.split(".").pop()?.toLowerCase() ?? ""];
|
|
30
|
+
const tokenColors = cn("[&_.token.comment]:text-[#3c526d] dark:[&_.token.comment]:text-[#8da1b9]", "[&_.token.key]:text-[#005a8e] [&_.token.property]:text-[#005a8e] [&_.token.class-name]:text-[#005a8e] [&_.token.parameter]:text-[#005a8e] [&_.token.variable]:text-[#005a8e]", "dark:[&_.token.key]:text-[#6cb8e6] dark:[&_.token.property]:text-[#6cb8e6] dark:[&_.token.class-name]:text-[#6cb8e6] dark:[&_.token.parameter]:text-[#6cb8e6] dark:[&_.token.variable]:text-[#6cb8e6]", "[&_.token.string]:text-[#116b00] [&_.token.attr-value]:text-[#116b00] dark:[&_.token.string]:text-[#91d076] dark:[&_.token.attr-value]:text-[#91d076]", "[&_.token.number]:text-[#755f00] [&_.token.boolean]:text-[#755f00] [&_.token.constant]:text-[#755f00] dark:[&_.token.number]:text-[#e6d37a] dark:[&_.token.boolean]:text-[#e6d37a] dark:[&_.token.constant]:text-[#e6d37a]", "[&_.token.keyword]:text-[#a04900] [&_.token.atrule]:text-[#a04900] [&_.token.operator]:text-[#a04900] dark:[&_.token.keyword]:text-[#e9ae7e] dark:[&_.token.atrule]:text-[#e9ae7e] dark:[&_.token.operator]:text-[#e9ae7e]", "[&_.token.function]:text-[#7c00aa] dark:[&_.token.function]:text-[#c699e3]");
|
|
31
|
+
function LineCode({ text, language }) {
|
|
32
|
+
if (language === void 0) return text;
|
|
33
|
+
return /* @__PURE__ */ jsx(PrismLight, {
|
|
34
|
+
language,
|
|
35
|
+
useInlineStyles: false,
|
|
36
|
+
wrapLongLines: true,
|
|
37
|
+
PreTag: "span",
|
|
38
|
+
CodeTag: "span",
|
|
39
|
+
children: text
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
const GUTTER = {
|
|
43
|
+
context: "",
|
|
44
|
+
added: "+",
|
|
45
|
+
removed: "−"
|
|
46
|
+
};
|
|
47
|
+
function CodeDiff({ filename, additions, deletions, lines, cycle, className, ...props }) {
|
|
48
|
+
const language = languageOf(filename);
|
|
49
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
50
|
+
"data-slot": "code-diff",
|
|
51
|
+
className: cn(paper, "w-full max-w-md overflow-hidden rounded-2xl font-mono text-xs", tokenColors, className),
|
|
52
|
+
...props,
|
|
53
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
54
|
+
className: "flex items-center justify-between px-4 pt-3 pb-2",
|
|
55
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
56
|
+
className: "text-foreground/90",
|
|
57
|
+
children: filename
|
|
58
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
59
|
+
className: cn(mono, "tabular-nums"),
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ jsxs("span", {
|
|
62
|
+
className: "text-emerald-700 dark:text-emerald-400",
|
|
63
|
+
children: ["+", additions]
|
|
64
|
+
}),
|
|
65
|
+
" ",
|
|
66
|
+
/* @__PURE__ */ jsxs("span", {
|
|
67
|
+
className: "text-red-600 dark:text-red-400",
|
|
68
|
+
children: ["−", deletions]
|
|
69
|
+
})
|
|
70
|
+
]
|
|
71
|
+
})]
|
|
72
|
+
}), /* @__PURE__ */ jsx("div", { children: lines.map((line, i) => /* @__PURE__ */ jsxs("div", {
|
|
73
|
+
className: cn("fade-in animate-in fill-mode-both flex gap-1 px-4 py-0.5 leading-relaxed duration-300", line.kind === "context" && "text-muted-foreground", line.kind === "added" && "bg-emerald-500/10 text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-300", line.kind === "removed" && "bg-red-500/10 text-red-700 dark:text-red-300"),
|
|
74
|
+
style: { animationDelay: `${i * 60}ms` },
|
|
75
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
76
|
+
className: "w-4 shrink-0 select-none",
|
|
77
|
+
children: GUTTER[line.kind]
|
|
78
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
79
|
+
className: "min-w-0 flex-1 break-words whitespace-pre-wrap",
|
|
80
|
+
children: /* @__PURE__ */ jsx(LineCode, {
|
|
81
|
+
text: line.text,
|
|
82
|
+
language
|
|
83
|
+
})
|
|
84
|
+
})]
|
|
85
|
+
}, `${cycle}-${i}-${line.text}`)) })]
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
export { CodeDiff, code_diff_exports };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace code_runner_d_exports {
|
|
3
|
+
export { CodeRunner, RunState };
|
|
4
|
+
}
|
|
5
|
+
export type RunState = "idle" | "running" | "ok" | "error";
|
|
6
|
+
export declare function CodeRunner({ language, code, state, output, durationMs, onRun, className, ...props }: Omit<ComponentProps<"div">, "children" | "language" | "code" | "state" | "output" | "durationMs" | "onRun"> & {
|
|
7
|
+
language: string;
|
|
8
|
+
code: string;
|
|
9
|
+
state: RunState;
|
|
10
|
+
output: readonly string[];
|
|
11
|
+
durationMs?: number;
|
|
12
|
+
onRun?: () => void;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { code_runner_d_exports };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { ghostButton, mono, paper } from "./surfaces.js";
|
|
5
|
+
import { SyntaxHighlighter } from "./syntax-highlighter.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { Loader2Icon, PlayIcon } from "lucide-react";
|
|
8
|
+
//#region src/components/assistant-ui/elements/code-runner.tsx
|
|
9
|
+
var code_runner_exports = /* @__PURE__ */ __exportAll({ CodeRunner: () => CodeRunner });
|
|
10
|
+
/** Display names the stories use, mapped to the registered Prism keys. */
|
|
11
|
+
const PRISM_LANGUAGE = {
|
|
12
|
+
typescript: "ts",
|
|
13
|
+
javascript: "js",
|
|
14
|
+
ts: "ts",
|
|
15
|
+
js: "js",
|
|
16
|
+
tsx: "tsx",
|
|
17
|
+
jsx: "jsx",
|
|
18
|
+
python: "python",
|
|
19
|
+
py: "python"
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* The code panel: Prism tokens on the card's own surface. The theme's
|
|
23
|
+
* tinted background, padding and margin are swapped for the runner's tight
|
|
24
|
+
* rows; the className carries the light/dark visibility, so it must survive.
|
|
25
|
+
*/
|
|
26
|
+
const CodePre = ({ style, className, ...props }) => /* @__PURE__ */ jsx("pre", {
|
|
27
|
+
tabIndex: 0,
|
|
28
|
+
...props,
|
|
29
|
+
style: {
|
|
30
|
+
...style,
|
|
31
|
+
background: "transparent",
|
|
32
|
+
fontFamily: void 0,
|
|
33
|
+
padding: "0.625rem 0.875rem",
|
|
34
|
+
margin: 0
|
|
35
|
+
},
|
|
36
|
+
className: cn("border-foreground/[0.07] overflow-x-auto border-t font-mono text-xs leading-relaxed", className)
|
|
37
|
+
});
|
|
38
|
+
function CodeRunner({ language, code, state, output, durationMs, onRun, className, ...props }) {
|
|
39
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
40
|
+
"data-slot": "code-runner",
|
|
41
|
+
className: cn(paper, "flex w-full max-w-md flex-col overflow-hidden rounded-2xl", className),
|
|
42
|
+
...props,
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ jsxs("div", {
|
|
45
|
+
className: "flex items-center gap-2 px-3.5 py-2",
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ jsx("span", {
|
|
48
|
+
className: cn(mono, "text-muted-foreground min-w-0 flex-1"),
|
|
49
|
+
children: language
|
|
50
|
+
}),
|
|
51
|
+
durationMs !== void 0 && state !== "running" && /* @__PURE__ */ jsxs("span", {
|
|
52
|
+
className: cn("font-mono text-[11px] tracking-tight", "text-muted-foreground shrink-0 tabular-nums"),
|
|
53
|
+
children: [durationMs, "ms"]
|
|
54
|
+
}),
|
|
55
|
+
onRun || state === "running" ? /* @__PURE__ */ jsx("button", {
|
|
56
|
+
type: "button",
|
|
57
|
+
"aria-label": "Run this snippet",
|
|
58
|
+
onClick: onRun,
|
|
59
|
+
disabled: state === "running",
|
|
60
|
+
className: cn(ghostButton, "size-7 shrink-0 disabled:pointer-events-none"),
|
|
61
|
+
children: state === "running" ? /* @__PURE__ */ jsx(Loader2Icon, { className: "size-3.5 animate-spin motion-reduce:animate-none" }) : /* @__PURE__ */ jsx(PlayIcon, { className: "size-3.5 translate-x-px" })
|
|
62
|
+
}) : null
|
|
63
|
+
]
|
|
64
|
+
}),
|
|
65
|
+
/* @__PURE__ */ jsx(SyntaxHighlighter, {
|
|
66
|
+
language: PRISM_LANGUAGE[language.toLowerCase()] ?? language.toLowerCase(),
|
|
67
|
+
code,
|
|
68
|
+
components: {
|
|
69
|
+
Pre: CodePre,
|
|
70
|
+
Code: ({ style, ...props }) => /* @__PURE__ */ jsx("code", {
|
|
71
|
+
...props,
|
|
72
|
+
style: {
|
|
73
|
+
...style,
|
|
74
|
+
fontFamily: void 0
|
|
75
|
+
}
|
|
76
|
+
})
|
|
77
|
+
}
|
|
78
|
+
}),
|
|
79
|
+
state !== "idle" && /* @__PURE__ */ jsxs("div", {
|
|
80
|
+
className: "border-foreground/[0.07] fade-in animate-in flex flex-col border-t px-3.5 py-2.5 duration-300",
|
|
81
|
+
children: [
|
|
82
|
+
/* @__PURE__ */ jsx("span", {
|
|
83
|
+
className: cn("font-mono text-[11px] tracking-tight", "text-muted-foreground pb-1"),
|
|
84
|
+
children: "output"
|
|
85
|
+
}),
|
|
86
|
+
/* @__PURE__ */ jsx("div", {
|
|
87
|
+
className: "overflow-x-auto",
|
|
88
|
+
tabIndex: 0,
|
|
89
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
90
|
+
className: cn("w-max min-w-full", "flex flex-col"),
|
|
91
|
+
children: output.map((line, i) => /* @__PURE__ */ jsx("span", {
|
|
92
|
+
className: cn("fade-in animate-in fill-mode-both font-mono text-xs leading-relaxed whitespace-pre", state === "error" ? "text-red-600 dark:text-red-400" : "text-muted-foreground"),
|
|
93
|
+
style: { animationDelay: `${i * 80}ms` },
|
|
94
|
+
children: line
|
|
95
|
+
}, `${i}-${line}`))
|
|
96
|
+
})
|
|
97
|
+
}),
|
|
98
|
+
state === "running" && /* @__PURE__ */ jsx("span", {
|
|
99
|
+
"aria-hidden": true,
|
|
100
|
+
className: "bg-foreground/40 h-[1em] w-[2px] animate-pulse rounded-full motion-reduce:animate-none"
|
|
101
|
+
})
|
|
102
|
+
]
|
|
103
|
+
})
|
|
104
|
+
]
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
export { CodeRunner, code_runner_exports };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace command_palette_d_exports {
|
|
3
|
+
export { CommandPalette, PaletteCommand };
|
|
4
|
+
}
|
|
5
|
+
export interface PaletteCommand {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
group: string;
|
|
9
|
+
keys: readonly string[];
|
|
10
|
+
}
|
|
11
|
+
export declare function CommandPalette({ commands, query, activeId, onQueryChange, onActiveChange, onRun, className, ...props }: Omit<ComponentProps<"div">, "children" | "commands" | "query" | "activeId" | "onQueryChange" | "onActiveChange" | "onRun"> & {
|
|
12
|
+
commands: readonly PaletteCommand[];
|
|
13
|
+
query: string;
|
|
14
|
+
activeId: string;
|
|
15
|
+
onQueryChange?: (query: string) => void;
|
|
16
|
+
onActiveChange?: (id: string) => void;
|
|
17
|
+
onRun?: (id: string) => void;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { command_palette_d_exports };
|