@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,62 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { field, mono, paper } from "./surfaces.js";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { FileTextIcon } from "lucide-react";
|
|
7
|
+
//#region src/components/assistant-ui/elements/document-reference.tsx
|
|
8
|
+
var document_reference_exports = /* @__PURE__ */ __exportAll({ DocumentReference: () => DocumentReference });
|
|
9
|
+
function DocumentReference({ title, pages, anchors, activePage, onJump, className, ...props }) {
|
|
10
|
+
const currentIndex = anchors.findIndex((anchor) => anchor.page === activePage);
|
|
11
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
12
|
+
"data-slot": "document-reference",
|
|
13
|
+
className: cn(paper, "flex w-full max-w-sm flex-col gap-3 rounded-2xl p-3.5", className),
|
|
14
|
+
...props,
|
|
15
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
16
|
+
className: "flex items-center gap-2.5",
|
|
17
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
18
|
+
className: "bg-foreground/[0.05] text-muted-foreground flex size-8 shrink-0 items-center justify-center rounded-lg",
|
|
19
|
+
children: /* @__PURE__ */ jsx(FileTextIcon, { className: "size-3.5" })
|
|
20
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
21
|
+
className: "flex min-w-0 flex-1 flex-col",
|
|
22
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
23
|
+
className: "truncate text-[13.5px] font-medium",
|
|
24
|
+
children: title
|
|
25
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
26
|
+
className: cn(mono, "text-muted-foreground"),
|
|
27
|
+
children: [
|
|
28
|
+
pages,
|
|
29
|
+
" pages · ",
|
|
30
|
+
anchors.length,
|
|
31
|
+
" cited"
|
|
32
|
+
]
|
|
33
|
+
})]
|
|
34
|
+
})]
|
|
35
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
36
|
+
className: "flex flex-col gap-1.5",
|
|
37
|
+
children: anchors.map((anchor, i) => {
|
|
38
|
+
const className = cn("flex flex-col gap-1 rounded-xl px-2.5 py-2 text-start transition-colors", onJump && "focus-visible:ring-ring/40 outline-none focus-visible:ring-1 focus-visible:ring-inset", anchor.page === activePage && onJump ? field : onJump ? "hover:bg-foreground/[0.035] focus-visible:bg-foreground/[0.035]" : void 0);
|
|
39
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("span", {
|
|
40
|
+
className: cn(mono, "text-muted-foreground"),
|
|
41
|
+
children: ["p. ", anchor.page]
|
|
42
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
43
|
+
className: "text-muted-foreground border-foreground/15 border-s-2 ps-2 text-xs leading-relaxed break-words",
|
|
44
|
+
children: anchor.quote
|
|
45
|
+
})] });
|
|
46
|
+
return onJump ? /* @__PURE__ */ jsx("button", {
|
|
47
|
+
type: "button",
|
|
48
|
+
"aria-current": i === currentIndex || void 0,
|
|
49
|
+
onClick: () => onJump(anchor.page),
|
|
50
|
+
className,
|
|
51
|
+
children: content
|
|
52
|
+
}, `${anchor.page}-${i}`) : /* @__PURE__ */ jsx("div", {
|
|
53
|
+
"aria-current": i === currentIndex || void 0,
|
|
54
|
+
className,
|
|
55
|
+
children: content
|
|
56
|
+
}, `${anchor.page}-${i}`);
|
|
57
|
+
})
|
|
58
|
+
})]
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
62
|
+
export { DocumentReference, document_reference_exports };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace draft_restore_d_exports {
|
|
3
|
+
export { DraftRestore };
|
|
4
|
+
}
|
|
5
|
+
export declare function DraftRestore({ draft, savedAt, onRestore, onDiscard, className, ...props }: Omit<ComponentProps<"div">, "children" | "draft" | "savedAt" | "onRestore" | "onDiscard"> & {
|
|
6
|
+
draft: string;
|
|
7
|
+
savedAt: string;
|
|
8
|
+
onRestore?: () => void;
|
|
9
|
+
onDiscard?: () => void;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { draft_restore_d_exports };
|
|
@@ -0,0 +1,43 @@
|
|
|
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 { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { PencilLineIcon, XIcon } from "lucide-react";
|
|
7
|
+
//#region src/components/assistant-ui/elements/draft-restore.tsx
|
|
8
|
+
var draft_restore_exports = /* @__PURE__ */ __exportAll({ DraftRestore: () => DraftRestore });
|
|
9
|
+
function DraftRestore({ draft, savedAt, onRestore, onDiscard, className, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
11
|
+
"data-slot": "draft-restore",
|
|
12
|
+
className: cn(paper, "fade-in slide-in-from-bottom-1 animate-in flex w-full max-w-sm items-center gap-2.5 rounded-2xl py-2 pr-2 pl-3.5 duration-300", className),
|
|
13
|
+
...props,
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ jsx(PencilLineIcon, { className: "text-muted-foreground size-3.5 shrink-0" }),
|
|
16
|
+
/* @__PURE__ */ jsxs("div", {
|
|
17
|
+
className: "flex min-w-0 flex-1 flex-col",
|
|
18
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
19
|
+
className: "text-muted-foreground truncate text-[13px]",
|
|
20
|
+
children: draft
|
|
21
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
22
|
+
className: cn(mono, "text-muted-foreground"),
|
|
23
|
+
children: ["unsent draft · ", savedAt]
|
|
24
|
+
})]
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ jsx("button", {
|
|
27
|
+
type: "button",
|
|
28
|
+
onClick: onRestore,
|
|
29
|
+
className: "text-muted-foreground hover:bg-foreground/[0.06] hover:text-foreground/95 shrink-0 rounded-full px-2.5 py-1 text-xs font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96]",
|
|
30
|
+
children: "Restore"
|
|
31
|
+
}),
|
|
32
|
+
/* @__PURE__ */ jsx("button", {
|
|
33
|
+
type: "button",
|
|
34
|
+
"aria-label": "Discard the draft",
|
|
35
|
+
onClick: onDiscard,
|
|
36
|
+
className: cn(ghostButton, "size-7 shrink-0"),
|
|
37
|
+
children: /* @__PURE__ */ jsx(XIcon, { className: "size-3.5" })
|
|
38
|
+
})
|
|
39
|
+
]
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { DraftRestore, draft_restore_exports };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace edit_message_d_exports {
|
|
3
|
+
export { EditMessage };
|
|
4
|
+
}
|
|
5
|
+
export declare function EditMessage({ value, discardedReplies, editing, onValueChange, onSave, onCancel, onStartEdit, className, ...props }: Omit<ComponentProps<"div">, "children" | "value" | "discardedReplies" | "editing" | "onValueChange" | "onSave" | "onCancel" | "onStartEdit"> & {
|
|
6
|
+
value: string;
|
|
7
|
+
discardedReplies: number;
|
|
8
|
+
editing: boolean;
|
|
9
|
+
onValueChange?: (value: string) => void;
|
|
10
|
+
onSave?: () => void;
|
|
11
|
+
onCancel?: () => void;
|
|
12
|
+
onStartEdit?: () => void;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { edit_message_d_exports };
|
|
@@ -0,0 +1,63 @@
|
|
|
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 { AlertTriangleIcon } from "lucide-react";
|
|
7
|
+
//#region src/components/assistant-ui/elements/edit-message.tsx
|
|
8
|
+
var edit_message_exports = /* @__PURE__ */ __exportAll({ EditMessage: () => EditMessage });
|
|
9
|
+
function EditMessage({ value, discardedReplies, editing, onValueChange, onSave, onCancel, onStartEdit, className, ...props }) {
|
|
10
|
+
if (!editing) return /* @__PURE__ */ jsx("div", {
|
|
11
|
+
"data-slot": "edit-message",
|
|
12
|
+
className: cn("flex w-full max-w-sm justify-end", className),
|
|
13
|
+
...props,
|
|
14
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
15
|
+
type: "button",
|
|
16
|
+
onClick: onStartEdit,
|
|
17
|
+
className: cn(field, "hover:bg-foreground/[0.07] max-w-[85%] rounded-2xl px-3.5 py-2.5 text-start text-[13.5px] transition-colors"),
|
|
18
|
+
children: value
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
22
|
+
"data-slot": "edit-message",
|
|
23
|
+
className: cn(paper, "flex w-full max-w-sm flex-col gap-3 rounded-[20px] p-3.5", className),
|
|
24
|
+
...props,
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ jsx("textarea", {
|
|
27
|
+
value,
|
|
28
|
+
onChange: (event) => onValueChange?.(event.target.value),
|
|
29
|
+
rows: 2,
|
|
30
|
+
"aria-label": "Edit your message",
|
|
31
|
+
className: cn(field, "text-foreground/90 focus-visible:ring-foreground/20 resize-none rounded-xl px-3 py-2.5 text-[13.5px] leading-relaxed outline-none focus-visible:ring-1")
|
|
32
|
+
}),
|
|
33
|
+
discardedReplies > 0 && /* @__PURE__ */ jsxs("div", {
|
|
34
|
+
className: "flex items-center gap-2 text-warning dark:text-warning",
|
|
35
|
+
children: [/* @__PURE__ */ jsx(AlertTriangleIcon, { className: "size-3.5 shrink-0" }), /* @__PURE__ */ jsxs("span", {
|
|
36
|
+
className: cn("font-mono text-[11px] tracking-tight", "tabular-nums"),
|
|
37
|
+
children: [
|
|
38
|
+
"sending discards ",
|
|
39
|
+
discardedReplies,
|
|
40
|
+
" ",
|
|
41
|
+
discardedReplies === 1 ? "reply" : "replies"
|
|
42
|
+
]
|
|
43
|
+
})]
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ jsxs("div", {
|
|
46
|
+
className: "flex items-center justify-end gap-2",
|
|
47
|
+
children: [/* @__PURE__ */ jsx("button", {
|
|
48
|
+
type: "button",
|
|
49
|
+
onClick: onCancel,
|
|
50
|
+
className: "text-muted-foreground hover:bg-foreground/[0.06] hover:text-foreground/90 h-8 rounded-full px-3.5 text-xs font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96]",
|
|
51
|
+
children: "Cancel"
|
|
52
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
53
|
+
type: "button",
|
|
54
|
+
onClick: onSave,
|
|
55
|
+
className: cn(inkButton, "flex h-8 items-center rounded-full px-3.5 text-xs font-medium"),
|
|
56
|
+
children: "Send"
|
|
57
|
+
})]
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
//#endregion
|
|
63
|
+
export { EditMessage, edit_message_exports };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace elicitation_form_d_exports {
|
|
3
|
+
export { ElicitationField, ElicitationForm, ElicitationState };
|
|
4
|
+
}
|
|
5
|
+
export type ElicitationState = "request" | "accepted" | "declined";
|
|
6
|
+
export interface ElicitationField {
|
|
7
|
+
name: string;
|
|
8
|
+
label: string;
|
|
9
|
+
value: string;
|
|
10
|
+
kind: "text" | "choice" | "toggle";
|
|
11
|
+
options?: readonly string[];
|
|
12
|
+
required?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function ElicitationForm({ server, message, fields, state, onAccept, onDecline, className, ...props }: Omit<ComponentProps<"div">, "children" | "server" | "message" | "fields" | "state" | "onAccept" | "onDecline"> & {
|
|
15
|
+
server: string;
|
|
16
|
+
message: string;
|
|
17
|
+
fields: readonly ElicitationField[];
|
|
18
|
+
state: ElicitationState;
|
|
19
|
+
onAccept?: () => void;
|
|
20
|
+
onDecline?: () => void;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { elicitation_form_d_exports };
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { field, inkButton, mono, paper } from "./surfaces.js";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { CheckIcon, PlugIcon, XIcon } from "lucide-react";
|
|
7
|
+
//#region src/components/assistant-ui/elements/elicitation-form.tsx
|
|
8
|
+
var elicitation_form_exports = /* @__PURE__ */ __exportAll({ ElicitationForm: () => ElicitationForm });
|
|
9
|
+
function ElicitationForm({ server, message, fields, state, onAccept, onDecline, className, ...props }) {
|
|
10
|
+
const settled = state !== "request";
|
|
11
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
12
|
+
"data-slot": "elicitation-form",
|
|
13
|
+
className: cn(paper, "flex w-full max-w-sm flex-col gap-3.5 rounded-[20px] p-4", className),
|
|
14
|
+
...props,
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ jsxs("div", {
|
|
17
|
+
className: "flex items-center gap-2.5",
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ jsx("span", {
|
|
20
|
+
className: "bg-foreground/[0.05] text-muted-foreground flex size-7 shrink-0 items-center justify-center rounded-lg",
|
|
21
|
+
children: /* @__PURE__ */ jsx(PlugIcon, { className: "size-3.5" })
|
|
22
|
+
}),
|
|
23
|
+
/* @__PURE__ */ jsx("span", {
|
|
24
|
+
className: "min-w-0 flex-1 truncate text-[13.5px] font-medium",
|
|
25
|
+
children: server
|
|
26
|
+
}),
|
|
27
|
+
/* @__PURE__ */ jsxs("span", {
|
|
28
|
+
className: cn(mono, "text-muted-foreground flex shrink-0 items-center gap-1.5"),
|
|
29
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
30
|
+
"aria-hidden": true,
|
|
31
|
+
className: cn("size-1.5 rounded-full", state === "request" ? "bg-warning" : state === "accepted" ? "bg-success" : "bg-foreground/40")
|
|
32
|
+
}), state === "request" ? "needs input" : state === "accepted" ? "sent" : "declined"]
|
|
33
|
+
})
|
|
34
|
+
]
|
|
35
|
+
}),
|
|
36
|
+
/* @__PURE__ */ jsx("p", {
|
|
37
|
+
className: "text-muted-foreground text-xs leading-relaxed",
|
|
38
|
+
children: message
|
|
39
|
+
}),
|
|
40
|
+
settled ? /* @__PURE__ */ jsx("div", {
|
|
41
|
+
className: "flex flex-col gap-2.5",
|
|
42
|
+
children: fields.map((item) => /* @__PURE__ */ jsxs("div", {
|
|
43
|
+
className: "flex flex-col gap-1",
|
|
44
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
45
|
+
className: cn(mono, "text-muted-foreground"),
|
|
46
|
+
children: [item.label, item.required && /* @__PURE__ */ jsx("span", {
|
|
47
|
+
className: "text-muted-foreground",
|
|
48
|
+
children: " *"
|
|
49
|
+
})]
|
|
50
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
51
|
+
className: "text-foreground/80 text-xs",
|
|
52
|
+
children: item.kind === "toggle" ? item.value === "true" ? "On" : "Off" : item.value
|
|
53
|
+
})]
|
|
54
|
+
}, item.name))
|
|
55
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
56
|
+
className: "flex flex-col gap-2.5",
|
|
57
|
+
children: fields.map((item) => /* @__PURE__ */ jsxs("div", {
|
|
58
|
+
className: "flex flex-col gap-1",
|
|
59
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
60
|
+
className: cn(mono, "text-muted-foreground"),
|
|
61
|
+
children: [item.label, item.required && /* @__PURE__ */ jsx("span", {
|
|
62
|
+
className: "text-muted-foreground",
|
|
63
|
+
children: " *"
|
|
64
|
+
})]
|
|
65
|
+
}), item.kind === "choice" ? /* @__PURE__ */ jsx("div", {
|
|
66
|
+
className: "flex flex-wrap gap-1.5",
|
|
67
|
+
children: item.options?.map((option) => /* @__PURE__ */ jsx("span", {
|
|
68
|
+
className: cn("rounded-full px-2.5 py-1 text-xs transition-colors", option === item.value ? "bg-foreground text-background" : cn(field, "text-muted-foreground")),
|
|
69
|
+
children: option
|
|
70
|
+
}, option))
|
|
71
|
+
}) : item.kind === "toggle" ? /* @__PURE__ */ jsxs("span", {
|
|
72
|
+
className: "flex items-center gap-2",
|
|
73
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
74
|
+
"aria-hidden": true,
|
|
75
|
+
className: cn("flex h-4 w-7 items-center rounded-full p-0.5 transition-colors duration-200", item.value === "true" ? "bg-foreground/80" : "bg-foreground/15"),
|
|
76
|
+
children: /* @__PURE__ */ jsx("span", { className: cn("bg-background size-3 rounded-full transition-transform duration-200 motion-reduce:transition-none", item.value === "true" && "translate-x-3") })
|
|
77
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
78
|
+
className: "text-muted-foreground text-xs",
|
|
79
|
+
children: item.value === "true" ? "On" : "Off"
|
|
80
|
+
})]
|
|
81
|
+
}) : /* @__PURE__ */ jsx("span", {
|
|
82
|
+
className: cn(field, "text-foreground/80 rounded-lg px-2.5 py-1.5 text-xs"),
|
|
83
|
+
children: item.value
|
|
84
|
+
})]
|
|
85
|
+
}, item.name))
|
|
86
|
+
}),
|
|
87
|
+
/* @__PURE__ */ jsx("div", {
|
|
88
|
+
className: "flex h-8 items-center justify-end gap-2",
|
|
89
|
+
children: state === "request" ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("button", {
|
|
90
|
+
type: "button",
|
|
91
|
+
onClick: onDecline,
|
|
92
|
+
className: "text-muted-foreground hover:bg-foreground/[0.06] hover:text-foreground/90 h-8 rounded-full px-3.5 text-xs font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96]",
|
|
93
|
+
children: "Decline"
|
|
94
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
95
|
+
type: "button",
|
|
96
|
+
onClick: onAccept,
|
|
97
|
+
className: cn(inkButton, "flex h-8 items-center rounded-full px-3.5 text-xs font-medium"),
|
|
98
|
+
children: "Send"
|
|
99
|
+
})] }) : /* @__PURE__ */ jsx("span", {
|
|
100
|
+
className: "fade-in animate-in text-muted-foreground flex items-center gap-2 text-xs duration-300",
|
|
101
|
+
children: state === "accepted" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
102
|
+
/* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5 text-success" }),
|
|
103
|
+
"Sent to ",
|
|
104
|
+
server
|
|
105
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(XIcon, { className: "text-muted-foreground size-3.5" }), "Declined"] })
|
|
106
|
+
}, state)
|
|
107
|
+
})
|
|
108
|
+
]
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
//#endregion
|
|
112
|
+
export { ElicitationForm, elicitation_form_exports };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace empty_state_d_exports {
|
|
3
|
+
export { EmptyState, EmptyStateComposer, EmptyStateGreeting, EmptyStateSuggestion, EmptyStateSuggestions };
|
|
4
|
+
}
|
|
5
|
+
export declare function EmptyState({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
6
|
+
export declare function EmptyStateGreeting({ className, ...props }: ComponentProps<"h2">): import("react").JSX.Element;
|
|
7
|
+
export declare function EmptyStateSuggestions({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
8
|
+
export declare function EmptyStateSuggestion({ index, className, style, ...props }: ComponentProps<"button"> & {
|
|
9
|
+
index?: number;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
export declare function EmptyStateComposer({ placeholder, onSend, className, style, ...props }: Omit<ComponentProps<"div">, "children" | "placeholder"> & {
|
|
12
|
+
placeholder: string;
|
|
13
|
+
onSend?: () => void;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { empty_state_d_exports };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { 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/empty-state.tsx
|
|
8
|
+
var empty_state_exports = /* @__PURE__ */ __exportAll({
|
|
9
|
+
EmptyState: () => EmptyState,
|
|
10
|
+
EmptyStateComposer: () => EmptyStateComposer,
|
|
11
|
+
EmptyStateGreeting: () => EmptyStateGreeting,
|
|
12
|
+
EmptyStateSuggestion: () => EmptyStateSuggestion,
|
|
13
|
+
EmptyStateSuggestions: () => EmptyStateSuggestions
|
|
14
|
+
});
|
|
15
|
+
function EmptyState({ className, ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsx("div", {
|
|
17
|
+
"data-slot": "empty-state",
|
|
18
|
+
className: cn("flex w-full max-w-md flex-col items-center gap-7", className),
|
|
19
|
+
...props
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function EmptyStateGreeting({ className, ...props }) {
|
|
23
|
+
return /* @__PURE__ */ jsx("h2", {
|
|
24
|
+
"data-slot": "empty-state-greeting",
|
|
25
|
+
className: cn("fade-in slide-in-from-bottom-1 animate-in fill-mode-both text-center text-2xl font-medium tracking-tight duration-500 motion-reduce:animate-none", className),
|
|
26
|
+
...props
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function EmptyStateSuggestions({ className, ...props }) {
|
|
30
|
+
return /* @__PURE__ */ jsx("div", {
|
|
31
|
+
"data-slot": "empty-state-suggestions",
|
|
32
|
+
className: cn("flex flex-wrap justify-center gap-2", className),
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function EmptyStateSuggestion({ index = 0, className, style, ...props }) {
|
|
37
|
+
return /* @__PURE__ */ jsx("button", {
|
|
38
|
+
type: "button",
|
|
39
|
+
"data-slot": "empty-state-suggestion",
|
|
40
|
+
style: {
|
|
41
|
+
animationDelay: `${120 + index * 70}ms`,
|
|
42
|
+
...style
|
|
43
|
+
},
|
|
44
|
+
className: cn(paper, "fade-in slide-in-from-bottom-2 animate-in fill-mode-both focus-visible:ring-foreground/20 rounded-full px-4 py-2 text-[13px] transition-transform duration-500 outline-none hover:-translate-y-px focus-visible:ring-1 active:scale-[0.96] motion-reduce:animate-none", className),
|
|
45
|
+
...props
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function EmptyStateComposer({ placeholder, onSend, className, style, ...props }) {
|
|
49
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
50
|
+
"data-slot": "empty-state-composer",
|
|
51
|
+
style: {
|
|
52
|
+
animationDelay: "360ms",
|
|
53
|
+
...style
|
|
54
|
+
},
|
|
55
|
+
className: cn(paper, "fade-in slide-in-from-bottom-2 animate-in fill-mode-both flex h-13 w-full items-center justify-between rounded-full py-2 ps-5 pe-2.5 duration-500 motion-reduce:animate-none", className),
|
|
56
|
+
...props,
|
|
57
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
58
|
+
className: "text-muted-foreground text-[15px]",
|
|
59
|
+
children: placeholder
|
|
60
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
61
|
+
type: "button",
|
|
62
|
+
"aria-label": "Send",
|
|
63
|
+
onClick: onSend,
|
|
64
|
+
disabled: !onSend,
|
|
65
|
+
className: cn(inkButton, "flex size-8 items-center justify-center rounded-full disabled:pointer-events-none disabled:opacity-30"),
|
|
66
|
+
children: /* @__PURE__ */ jsx(ArrowUpIcon, { className: "size-4" })
|
|
67
|
+
})]
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
export { EmptyState, EmptyStateComposer, EmptyStateGreeting, EmptyStateSuggestion, EmptyStateSuggestions, empty_state_exports };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace error_state_d_exports {
|
|
3
|
+
export { ErrorState, ErrorStateProps };
|
|
4
|
+
}
|
|
5
|
+
export interface ErrorStateProps extends Omit<ComponentProps<"div">, "children" | "role"> {
|
|
6
|
+
title: string;
|
|
7
|
+
detail: string;
|
|
8
|
+
retrying: boolean;
|
|
9
|
+
onRetry: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function ErrorState({ title, detail, retrying, onRetry, className, ...props }: ErrorStateProps): import("react").JSX.Element;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { error_state_d_exports };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { ShimmerLabel } from "./surfaces.js";
|
|
5
|
+
import { useEffect, useRef } from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { CircleAlertIcon, RefreshCwIcon } from "lucide-react";
|
|
8
|
+
//#region src/components/assistant-ui/elements/error-state.tsx
|
|
9
|
+
var error_state_exports = /* @__PURE__ */ __exportAll({ ErrorState: () => ErrorState });
|
|
10
|
+
function ErrorState({ title, detail, retrying, onRetry, className, ...props }) {
|
|
11
|
+
const retryRef = useRef(null);
|
|
12
|
+
const wasRetrying = useRef(false);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
if (wasRetrying.current && !retrying) retryRef.current?.focus();
|
|
15
|
+
wasRetrying.current = retrying;
|
|
16
|
+
}, [retrying]);
|
|
17
|
+
if (retrying) return /* @__PURE__ */ jsxs("div", {
|
|
18
|
+
"data-slot": "error-state",
|
|
19
|
+
role: "status",
|
|
20
|
+
className: cn("fade-in animate-in flex w-full max-w-sm items-center gap-2.5 text-sm duration-300 motion-reduce:animate-none", className),
|
|
21
|
+
...props,
|
|
22
|
+
children: [/* @__PURE__ */ jsx(RefreshCwIcon, { className: "text-muted-foreground size-3.5 shrink-0 animate-spin motion-reduce:animate-none" }), /* @__PURE__ */ jsx(ShimmerLabel, {
|
|
23
|
+
className: "text-muted-foreground relative inline-block",
|
|
24
|
+
children: "Retrying"
|
|
25
|
+
})]
|
|
26
|
+
}, "retrying");
|
|
27
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
28
|
+
"data-slot": "error-state",
|
|
29
|
+
role: "alert",
|
|
30
|
+
className: cn("fade-in animate-in flex w-full max-w-sm items-start gap-2.5 rounded-2xl bg-destructive/[0.06] px-4 py-3 text-sm duration-300 motion-reduce:animate-none dark:bg-destructive/10", className),
|
|
31
|
+
...props,
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ jsx(CircleAlertIcon, { className: "mt-0.5 size-4 shrink-0 text-destructive/80" }),
|
|
34
|
+
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
|
|
35
|
+
className: "font-medium text-destructive dark:text-destructive",
|
|
36
|
+
children: title
|
|
37
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
38
|
+
className: "mt-0.5 text-[13px] leading-snug text-destructive/80 dark:text-destructive/80",
|
|
39
|
+
children: detail
|
|
40
|
+
})] }),
|
|
41
|
+
/* @__PURE__ */ jsxs("button", {
|
|
42
|
+
ref: retryRef,
|
|
43
|
+
type: "button",
|
|
44
|
+
onClick: onRetry,
|
|
45
|
+
className: "ms-auto flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-medium text-destructive transition-colors hover:bg-destructive/10 outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 dark:text-destructive",
|
|
46
|
+
children: [/* @__PURE__ */ jsx(RefreshCwIcon, { className: "size-3" }), "Retry"]
|
|
47
|
+
})
|
|
48
|
+
]
|
|
49
|
+
}, "error");
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
export { ErrorState, error_state_exports };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace feedback_dialog_d_exports {
|
|
3
|
+
export { FeedbackDialog };
|
|
4
|
+
}
|
|
5
|
+
export declare function FeedbackDialog({ reasons, selected, note, sent, onToggleReason, onNoteChange, onSubmit, className, ...props }: Omit<ComponentProps<"div">, "children" | "reasons" | "selected" | "note" | "sent" | "onToggleReason" | "onNoteChange" | "onSubmit"> & {
|
|
6
|
+
reasons: readonly string[];
|
|
7
|
+
selected: readonly string[];
|
|
8
|
+
note: string;
|
|
9
|
+
sent: boolean;
|
|
10
|
+
onToggleReason?: (reason: string) => void;
|
|
11
|
+
onNoteChange?: (note: string) => void;
|
|
12
|
+
onSubmit?: () => void;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { feedback_dialog_d_exports };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { field, mono, paper } from "./surfaces.js";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { CheckIcon, ThumbsDownIcon } from "lucide-react";
|
|
7
|
+
//#region src/components/assistant-ui/elements/feedback-dialog.tsx
|
|
8
|
+
var feedback_dialog_exports = /* @__PURE__ */ __exportAll({ FeedbackDialog: () => FeedbackDialog });
|
|
9
|
+
function FeedbackDialog({ reasons, selected, note, sent, onToggleReason, onNoteChange, onSubmit, className, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
11
|
+
"data-slot": "feedback-dialog",
|
|
12
|
+
className: cn(paper, "flex w-full max-w-sm rounded-[20px] p-4", sent ? "items-center gap-2.5 text-[13.5px]" : "flex-col gap-3", className),
|
|
13
|
+
...props,
|
|
14
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
15
|
+
role: "status",
|
|
16
|
+
className: sent ? "fade-in animate-in flex items-center gap-2.5 duration-300" : "sr-only",
|
|
17
|
+
children: sent && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(CheckIcon, { className: "size-4 shrink-0 text-success" }), "Thanks. That helps us tune the model."] })
|
|
18
|
+
}), sent ? null : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
19
|
+
/* @__PURE__ */ jsxs("div", {
|
|
20
|
+
className: "flex items-center gap-2.5",
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ jsx("span", {
|
|
23
|
+
className: "bg-foreground/[0.05] text-muted-foreground flex size-7 shrink-0 items-center justify-center rounded-lg",
|
|
24
|
+
children: /* @__PURE__ */ jsx(ThumbsDownIcon, { className: "size-3.5" })
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ jsx("span", {
|
|
27
|
+
className: "text-[13.5px] font-medium",
|
|
28
|
+
children: "What went wrong?"
|
|
29
|
+
}),
|
|
30
|
+
/* @__PURE__ */ jsx("span", {
|
|
31
|
+
className: cn(mono, "text-muted-foreground ms-auto"),
|
|
32
|
+
children: "optional"
|
|
33
|
+
})
|
|
34
|
+
]
|
|
35
|
+
}),
|
|
36
|
+
/* @__PURE__ */ jsx("div", {
|
|
37
|
+
className: "flex flex-wrap gap-1.5",
|
|
38
|
+
children: reasons.map((reason) => {
|
|
39
|
+
const active = selected.includes(reason);
|
|
40
|
+
const className = cn("rounded-full px-2.5 py-1 text-xs transition-[background-color,color,scale] duration-150", onToggleReason && "active:scale-[0.96]", active ? "bg-foreground text-background" : cn(field, "text-muted-foreground", onToggleReason && "hover:text-foreground/90"));
|
|
41
|
+
return onToggleReason ? /* @__PURE__ */ jsx("button", {
|
|
42
|
+
type: "button",
|
|
43
|
+
"aria-pressed": active,
|
|
44
|
+
onClick: () => onToggleReason(reason),
|
|
45
|
+
className,
|
|
46
|
+
children: reason
|
|
47
|
+
}, reason) : active && /* @__PURE__ */ jsx("span", {
|
|
48
|
+
role: "button",
|
|
49
|
+
"aria-disabled": "true",
|
|
50
|
+
"aria-pressed": active,
|
|
51
|
+
className,
|
|
52
|
+
children: reason
|
|
53
|
+
}, reason);
|
|
54
|
+
})
|
|
55
|
+
}),
|
|
56
|
+
onNoteChange ? /* @__PURE__ */ jsx("textarea", {
|
|
57
|
+
value: note,
|
|
58
|
+
onChange: (event) => onNoteChange(event.target.value),
|
|
59
|
+
rows: 2,
|
|
60
|
+
placeholder: "Anything else?",
|
|
61
|
+
"aria-label": "Anything else?",
|
|
62
|
+
className: cn(field, "text-foreground/80 placeholder:text-muted-foreground focus-visible:ring-foreground/20 resize-none rounded-xl px-3 py-2 text-xs outline-none focus-visible:ring-1")
|
|
63
|
+
}) : note.trim() !== "" ? /* @__PURE__ */ jsx("p", {
|
|
64
|
+
className: "text-muted-foreground text-xs leading-relaxed",
|
|
65
|
+
children: note
|
|
66
|
+
}) : null,
|
|
67
|
+
onSubmit && /* @__PURE__ */ jsx("button", {
|
|
68
|
+
type: "button",
|
|
69
|
+
onClick: onSubmit,
|
|
70
|
+
className: cn("bg-foreground text-background transition-[opacity,scale] duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] hover:opacity-90 active:scale-[0.96] motion-reduce:transition-none", "flex h-8 items-center justify-center self-end rounded-full px-3.5 text-xs font-medium"),
|
|
71
|
+
children: "Send feedback"
|
|
72
|
+
})
|
|
73
|
+
] })]
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
//#endregion
|
|
77
|
+
export { FeedbackDialog, feedback_dialog_exports };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace file_tree_d_exports {
|
|
3
|
+
export { FileTree, FileTreeNode };
|
|
4
|
+
}
|
|
5
|
+
export interface FileTreeNode {
|
|
6
|
+
path: string;
|
|
7
|
+
name: string;
|
|
8
|
+
depth: number;
|
|
9
|
+
kind: "folder" | "file";
|
|
10
|
+
additions?: number;
|
|
11
|
+
deletions?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function FileTree({ nodes, visibleCount, totalAdditions, totalDeletions, className, ...props }: Omit<ComponentProps<"div">, "children" | "nodes" | "visibleCount" | "totalAdditions" | "totalDeletions"> & {
|
|
14
|
+
nodes: readonly FileTreeNode[];
|
|
15
|
+
visibleCount: number;
|
|
16
|
+
totalAdditions: number;
|
|
17
|
+
totalDeletions: number;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { file_tree_d_exports };
|