@dungle-scrubs/admin-ui-soft 0.0.0-stage → 0.1.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 +131 -3
|
@@ -0,0 +1,74 @@
|
|
|
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 { take } from "../utils/range.js";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { ChevronDownIcon, FileIcon, FolderIcon } from "lucide-react";
|
|
8
|
+
//#region src/components/assistant-ui/elements/file-tree.tsx
|
|
9
|
+
var file_tree_exports = /* @__PURE__ */ __exportAll({ FileTree: () => FileTree });
|
|
10
|
+
function FileTree({ nodes, visibleCount, totalAdditions, totalDeletions, className, ...props }) {
|
|
11
|
+
const files = nodes.filter((node) => node.kind === "file").length;
|
|
12
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
13
|
+
"data-slot": "file-tree",
|
|
14
|
+
className: cn(paper, "flex w-full max-w-sm flex-col gap-2 rounded-2xl p-3.5", className),
|
|
15
|
+
...props,
|
|
16
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
17
|
+
className: "flex items-baseline justify-between px-1",
|
|
18
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
19
|
+
className: "text-[13.5px] font-medium",
|
|
20
|
+
children: [
|
|
21
|
+
files,
|
|
22
|
+
" ",
|
|
23
|
+
files === 1 ? "file" : "files",
|
|
24
|
+
" changed"
|
|
25
|
+
]
|
|
26
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
27
|
+
className: cn(mono, "tabular-nums"),
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ jsxs("span", {
|
|
30
|
+
className: "text-success dark:text-success",
|
|
31
|
+
children: ["+", totalAdditions]
|
|
32
|
+
}),
|
|
33
|
+
" ",
|
|
34
|
+
/* @__PURE__ */ jsxs("span", {
|
|
35
|
+
className: "text-destructive dark:text-destructive",
|
|
36
|
+
children: ["−", totalDeletions]
|
|
37
|
+
})
|
|
38
|
+
]
|
|
39
|
+
})]
|
|
40
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
41
|
+
className: "flex flex-col",
|
|
42
|
+
children: take(nodes, visibleCount).map((node) => /* @__PURE__ */ jsx("div", {
|
|
43
|
+
className: "fade-in slide-in-from-left-1 animate-in fill-mode-both hover:bg-foreground/[0.03] flex items-center gap-2 rounded-lg px-1 py-1 text-[13px] transition-colors duration-300",
|
|
44
|
+
style: { paddingInlineStart: `${.25 + node.depth * .85}rem` },
|
|
45
|
+
children: node.kind === "folder" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
46
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, { className: "text-muted-foreground size-3 shrink-0" }),
|
|
47
|
+
/* @__PURE__ */ jsx(FolderIcon, { className: "text-muted-foreground size-3.5 shrink-0" }),
|
|
48
|
+
/* @__PURE__ */ jsx("span", {
|
|
49
|
+
className: "text-muted-foreground min-w-0 flex-1 truncate",
|
|
50
|
+
children: node.name
|
|
51
|
+
})
|
|
52
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
53
|
+
/* @__PURE__ */ jsx(FileIcon, { className: "text-muted-foreground ms-3 size-3.5 shrink-0" }),
|
|
54
|
+
/* @__PURE__ */ jsx("span", {
|
|
55
|
+
className: "text-foreground/85 min-w-0 flex-1 truncate",
|
|
56
|
+
children: node.name
|
|
57
|
+
}),
|
|
58
|
+
(node.additions || node.deletions) && /* @__PURE__ */ jsxs("span", {
|
|
59
|
+
className: cn("font-mono text-[11px] tracking-tight", "flex shrink-0 gap-1.5 tabular-nums"),
|
|
60
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
61
|
+
className: "w-7 text-end text-success dark:text-success",
|
|
62
|
+
children: node.additions ? `+${node.additions}` : ""
|
|
63
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
64
|
+
className: "w-7 text-end text-destructive dark:text-destructive",
|
|
65
|
+
children: node.deletions ? `−${node.deletions}` : ""
|
|
66
|
+
})]
|
|
67
|
+
})
|
|
68
|
+
] })
|
|
69
|
+
}, node.path))
|
|
70
|
+
})]
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
74
|
+
export { FileTree, file_tree_exports };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import { FileMessagePartComponent } from "@assistant-ui/react";
|
|
4
|
+
declare namespace file_d_exports {
|
|
5
|
+
export { File, FileDataKind, FileDownload, FileIconDisplay, FileName, FilePlayer, FilePlayerProps, FileRoot, FileRootProps, FileSize, fileVariants, formatFileSize, getBase64Size, getFileDataKind, getMimeTypeIcon };
|
|
6
|
+
}
|
|
7
|
+
declare const fileVariants: (props?: ({
|
|
8
|
+
variant?: "ghost" | "muted" | "outline" | null | undefined;
|
|
9
|
+
size?: "default" | "lg" | "sm" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
+
declare function getMimeTypeIcon(mimeType: string): FC<{
|
|
12
|
+
className?: string;
|
|
13
|
+
}>;
|
|
14
|
+
export type FileDataKind = "data-uri" | "url" | "base64" | "id";
|
|
15
|
+
declare function getFileDataKind(data: string, sourceType?: "url" | "id"): FileDataKind;
|
|
16
|
+
declare function getBase64Size(base64: string): number;
|
|
17
|
+
declare function formatFileSize(bytes: number): string;
|
|
18
|
+
export type FileRootProps = React.ComponentProps<"div"> & VariantProps<typeof fileVariants>;
|
|
19
|
+
declare function FileRoot({ className, variant, size, children, ...props }: FileRootProps): import("react").JSX.Element;
|
|
20
|
+
type FileIconDisplayProps = React.ComponentProps<"span"> & {
|
|
21
|
+
mimeType?: string;
|
|
22
|
+
};
|
|
23
|
+
declare function FileIconDisplay({ mimeType, className, children, ...props }: FileIconDisplayProps): import("react").JSX.Element;
|
|
24
|
+
declare function FileName({ className, children, ...props }: React.ComponentProps<"span">): import("react").JSX.Element;
|
|
25
|
+
type FileSizeProps = React.ComponentProps<"span"> & {
|
|
26
|
+
bytes: number;
|
|
27
|
+
};
|
|
28
|
+
declare function FileSize({ bytes, className, ...props }: FileSizeProps): import("react").JSX.Element;
|
|
29
|
+
type FileDownloadProps = Omit<React.ComponentProps<"a">, "href"> & {
|
|
30
|
+
data: string;
|
|
31
|
+
mimeType: string;
|
|
32
|
+
filename?: string;
|
|
33
|
+
sourceType?: "url" | "id";
|
|
34
|
+
};
|
|
35
|
+
declare function FileDownload({ data, mimeType, filename, sourceType, className, children, ...props }: FileDownloadProps): import("react").JSX.Element | null;
|
|
36
|
+
export interface FilePlayerProps extends Omit<React.ComponentProps<"div">, "children"> {
|
|
37
|
+
data: string;
|
|
38
|
+
mimeType: string;
|
|
39
|
+
filename?: string | undefined;
|
|
40
|
+
sourceType?: "url" | "id" | undefined;
|
|
41
|
+
}
|
|
42
|
+
declare function FilePlayer({ data, mimeType, filename, sourceType, className, ...props }: FilePlayerProps): import("react").JSX.Element | null;
|
|
43
|
+
declare const File: FileMessagePartComponent & {
|
|
44
|
+
Root: typeof FileRoot;
|
|
45
|
+
Icon: typeof FileIconDisplay;
|
|
46
|
+
Name: typeof FileName;
|
|
47
|
+
Size: typeof FileSize;
|
|
48
|
+
Download: typeof FileDownload;
|
|
49
|
+
Player: typeof FilePlayer;
|
|
50
|
+
};
|
|
51
|
+
//#endregion
|
|
52
|
+
export { File, FileDownload, FileIconDisplay, FileName, FilePlayer, FileRoot, FileSize, fileVariants, file_d_exports, formatFileSize, getBase64Size, getFileDataKind, getMimeTypeIcon };
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { AudioPlayer, VideoPlayer } from "./media-player.js";
|
|
5
|
+
import { memo } from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { BracesIcon, DownloadIcon, FileIcon, FileTextIcon, ImageIcon, MusicIcon, VideoIcon } from "lucide-react";
|
|
8
|
+
import { cva } from "class-variance-authority";
|
|
9
|
+
//#region src/components/assistant-ui/elements/file.tsx
|
|
10
|
+
var file_exports = /* @__PURE__ */ __exportAll({
|
|
11
|
+
File: () => File,
|
|
12
|
+
FileDownload: () => FileDownload,
|
|
13
|
+
FileIconDisplay: () => FileIconDisplay,
|
|
14
|
+
FileName: () => FileName,
|
|
15
|
+
FilePlayer: () => FilePlayer,
|
|
16
|
+
FileRoot: () => FileRoot,
|
|
17
|
+
FileSize: () => FileSize,
|
|
18
|
+
fileVariants: () => fileVariants,
|
|
19
|
+
formatFileSize: () => formatFileSize,
|
|
20
|
+
getBase64Size: () => getBase64Size,
|
|
21
|
+
getFileDataKind: () => getFileDataKind,
|
|
22
|
+
getMimeTypeIcon: () => getMimeTypeIcon
|
|
23
|
+
});
|
|
24
|
+
const fileVariants = cva("aui-file-root inline-flex items-center gap-3 rounded-lg transition-colors", {
|
|
25
|
+
variants: {
|
|
26
|
+
variant: {
|
|
27
|
+
outline: "border-border hover:bg-muted/50 border",
|
|
28
|
+
ghost: "hover:bg-muted/50",
|
|
29
|
+
muted: "bg-muted/50 hover:bg-muted/70"
|
|
30
|
+
},
|
|
31
|
+
size: {
|
|
32
|
+
sm: "px-2.5 py-1.5 text-xs",
|
|
33
|
+
default: "px-3 py-2 text-sm",
|
|
34
|
+
lg: "px-4 py-3 text-base"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
defaultVariants: {
|
|
38
|
+
variant: "outline",
|
|
39
|
+
size: "default"
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
function getMimeTypeIcon(mimeType) {
|
|
43
|
+
const type = mimeType.toLowerCase();
|
|
44
|
+
if (type.startsWith("image/")) return ImageIcon;
|
|
45
|
+
if (type === "application/pdf") return FileTextIcon;
|
|
46
|
+
if (type === "application/json") return BracesIcon;
|
|
47
|
+
if (type.startsWith("text/")) return FileTextIcon;
|
|
48
|
+
if (type.startsWith("audio/")) return MusicIcon;
|
|
49
|
+
if (type.startsWith("video/")) return VideoIcon;
|
|
50
|
+
return FileIcon;
|
|
51
|
+
}
|
|
52
|
+
function getFileDataKind(data, sourceType) {
|
|
53
|
+
if (sourceType === "url" && /^data:/i.test(data)) return "data-uri";
|
|
54
|
+
if (sourceType) return sourceType;
|
|
55
|
+
if (/^data:/i.test(data)) return "data-uri";
|
|
56
|
+
if (/^(https?:\/\/|blob:)/i.test(data)) return "url";
|
|
57
|
+
return "base64";
|
|
58
|
+
}
|
|
59
|
+
function isUnsafeScheme(data) {
|
|
60
|
+
return /^[a-z][a-z\d+.-]*:/i.test(data) && !/^(data:|https?:\/\/|blob:)/i.test(data);
|
|
61
|
+
}
|
|
62
|
+
function getFileHref(data, mimeType, sourceType) {
|
|
63
|
+
if (isUnsafeScheme(data)) return null;
|
|
64
|
+
const kind = getFileDataKind(data, sourceType);
|
|
65
|
+
if (kind === "id") return null;
|
|
66
|
+
if (kind === "data-uri") return /^data:[^,]*,/i.test(data) ? data : null;
|
|
67
|
+
if (kind === "url") return /^(https?:\/\/|blob:)/i.test(data) ? data : null;
|
|
68
|
+
return `data:${mimeType};base64,${data}`;
|
|
69
|
+
}
|
|
70
|
+
function getBase64PayloadSize(payload) {
|
|
71
|
+
const padding = payload.endsWith("==") ? 2 : payload.endsWith("=") ? 1 : 0;
|
|
72
|
+
const firstNonBase64 = payload.search(/[^A-Za-z\d+/]/);
|
|
73
|
+
if (firstNonBase64 !== -1 && firstNonBase64 !== payload.length - padding || payload.length % 4 === 1 || padding > 0 && payload.length % 4 !== 0) return 0;
|
|
74
|
+
return Math.floor(payload.length * 3 / 4) - padding;
|
|
75
|
+
}
|
|
76
|
+
function getBase64Size(base64) {
|
|
77
|
+
return getBase64PayloadSize(/[\t\n\f\r ]/.test(base64) ? base64.replace(/[\t\n\f\r ]/g, "") : base64);
|
|
78
|
+
}
|
|
79
|
+
function getDataUrlSize(data) {
|
|
80
|
+
const fragment = data.indexOf("#");
|
|
81
|
+
const end = fragment < 0 ? data.length : fragment;
|
|
82
|
+
const comma = data.indexOf(",");
|
|
83
|
+
if (comma < 0 || comma >= end) return 0;
|
|
84
|
+
let payload = data.slice(comma + 1, end);
|
|
85
|
+
if (/;base64$/i.test(data.slice(0, comma))) {
|
|
86
|
+
if (/[%\t\n\f\r ]/.test(payload)) payload = payload.replace(/%([\da-f]{2})/gi, (_match, hex) => String.fromCharCode(Number.parseInt(hex, 16))).replace(/[\t\n\f\r ]/g, "");
|
|
87
|
+
return getBase64PayloadSize(payload);
|
|
88
|
+
}
|
|
89
|
+
return new TextEncoder().encode(payload.replace(/%[\da-f]{2}/gi, "_")).byteLength;
|
|
90
|
+
}
|
|
91
|
+
function formatFileSize(bytes) {
|
|
92
|
+
if (bytes < 1024) return `${bytes} B`;
|
|
93
|
+
if (bytes < 1048576) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
94
|
+
return `${(bytes / 1048576).toFixed(1)} MB`;
|
|
95
|
+
}
|
|
96
|
+
function FileRoot({ className, variant, size, children, ...props }) {
|
|
97
|
+
return /* @__PURE__ */ jsx("div", {
|
|
98
|
+
"data-slot": "file-root",
|
|
99
|
+
"data-variant": variant,
|
|
100
|
+
"data-size": size,
|
|
101
|
+
className: cn(fileVariants({
|
|
102
|
+
variant,
|
|
103
|
+
size,
|
|
104
|
+
className
|
|
105
|
+
})),
|
|
106
|
+
...props,
|
|
107
|
+
children
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
function FileIconDisplay({ mimeType, className, children, ...props }) {
|
|
111
|
+
const IconComponent = mimeType ? getMimeTypeIcon(mimeType) : FileIcon;
|
|
112
|
+
return /* @__PURE__ */ jsx("span", {
|
|
113
|
+
"data-slot": "file-icon",
|
|
114
|
+
className: cn("text-muted-foreground shrink-0", className),
|
|
115
|
+
...props,
|
|
116
|
+
children: children ?? /* @__PURE__ */ jsx(IconComponent, { className: "size-5" })
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
function FileName({ className, children, ...props }) {
|
|
120
|
+
return /* @__PURE__ */ jsx("span", {
|
|
121
|
+
"data-slot": "file-name",
|
|
122
|
+
className: cn("min-w-0 flex-1 truncate font-medium", className),
|
|
123
|
+
...props,
|
|
124
|
+
children: children || "Unnamed file"
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
function FileSize({ bytes, className, ...props }) {
|
|
128
|
+
return /* @__PURE__ */ jsx("span", {
|
|
129
|
+
"data-slot": "file-size",
|
|
130
|
+
className: cn("text-muted-foreground shrink-0", className),
|
|
131
|
+
...props,
|
|
132
|
+
children: formatFileSize(bytes)
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
function FileDownload({ data, mimeType, filename, sourceType, className, children, ...props }) {
|
|
136
|
+
if (typeof data !== "string") return null;
|
|
137
|
+
const kind = getFileDataKind(data, sourceType);
|
|
138
|
+
const href = getFileHref(data, mimeType, sourceType);
|
|
139
|
+
if (!href) return null;
|
|
140
|
+
return /* @__PURE__ */ jsx("a", {
|
|
141
|
+
"data-slot": "file-download",
|
|
142
|
+
href,
|
|
143
|
+
download: filename || "download",
|
|
144
|
+
...kind === "url" && {
|
|
145
|
+
target: "_blank",
|
|
146
|
+
rel: "noopener noreferrer"
|
|
147
|
+
},
|
|
148
|
+
className: cn("text-muted-foreground hover:bg-accent hover:text-accent-foreground shrink-0 rounded-md p-1 transition-colors", className),
|
|
149
|
+
"aria-label": !children ? `Download ${filename || "file"}` : void 0,
|
|
150
|
+
...props,
|
|
151
|
+
children: children || /* @__PURE__ */ jsx(DownloadIcon, { className: "size-4" })
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
function FilePlayer({ data, mimeType, filename, sourceType, className, ...props }) {
|
|
155
|
+
const src = getFileHref(data, mimeType, sourceType);
|
|
156
|
+
const normalizedMimeType = mimeType.toLowerCase();
|
|
157
|
+
if (!src || !normalizedMimeType.startsWith("audio/") && !normalizedMimeType.startsWith("video/")) return null;
|
|
158
|
+
return /* @__PURE__ */ jsx("div", {
|
|
159
|
+
"data-slot": "file-player",
|
|
160
|
+
className: cn("w-full", className),
|
|
161
|
+
...props,
|
|
162
|
+
children: normalizedMimeType.startsWith("audio/") ? /* @__PURE__ */ jsx(AudioPlayer, {
|
|
163
|
+
src,
|
|
164
|
+
title: filename
|
|
165
|
+
}) : /* @__PURE__ */ jsx(VideoPlayer, {
|
|
166
|
+
src,
|
|
167
|
+
title: filename
|
|
168
|
+
})
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
const FileImpl = ({ filename, data, mimeType, sourceType }) => {
|
|
172
|
+
const kind = getFileDataKind(data, sourceType);
|
|
173
|
+
const showSize = typeof data === "string" && (kind === "base64" || kind === "data-uri");
|
|
174
|
+
const mediaSource = getFileHref(data, mimeType, sourceType);
|
|
175
|
+
const isMedia = mimeType.toLowerCase().startsWith("audio/") || mimeType.toLowerCase().startsWith("video/");
|
|
176
|
+
if (mediaSource && isMedia) return /* @__PURE__ */ jsxs("div", {
|
|
177
|
+
className: "flex w-full max-w-xl flex-col gap-2",
|
|
178
|
+
children: [/* @__PURE__ */ jsx(FilePlayer, {
|
|
179
|
+
data,
|
|
180
|
+
mimeType,
|
|
181
|
+
...filename !== void 0 && { filename },
|
|
182
|
+
...sourceType !== void 0 && { sourceType }
|
|
183
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
184
|
+
className: "flex min-w-0 items-center justify-end gap-2 px-1",
|
|
185
|
+
children: [showSize && /* @__PURE__ */ jsx(FileSize, {
|
|
186
|
+
bytes: kind === "data-uri" ? getDataUrlSize(data) : getBase64Size(data),
|
|
187
|
+
className: "text-muted-foreground text-[11px]"
|
|
188
|
+
}), /* @__PURE__ */ jsx(FileDownload, {
|
|
189
|
+
data,
|
|
190
|
+
mimeType,
|
|
191
|
+
...filename !== void 0 && { filename },
|
|
192
|
+
...sourceType !== void 0 && { sourceType }
|
|
193
|
+
})]
|
|
194
|
+
})]
|
|
195
|
+
});
|
|
196
|
+
return /* @__PURE__ */ jsxs(FileRoot, { children: [
|
|
197
|
+
/* @__PURE__ */ jsx(FileIconDisplay, { mimeType }),
|
|
198
|
+
/* @__PURE__ */ jsxs("div", {
|
|
199
|
+
className: "flex min-w-0 flex-1 flex-col gap-0.5",
|
|
200
|
+
children: [/* @__PURE__ */ jsx(FileName, { children: filename }), showSize && /* @__PURE__ */ jsx(FileSize, {
|
|
201
|
+
bytes: kind === "data-uri" ? getDataUrlSize(data) : getBase64Size(data),
|
|
202
|
+
className: "text-xs"
|
|
203
|
+
})]
|
|
204
|
+
}),
|
|
205
|
+
/* @__PURE__ */ jsx(FileDownload, {
|
|
206
|
+
data,
|
|
207
|
+
mimeType,
|
|
208
|
+
...filename !== void 0 && { filename },
|
|
209
|
+
...sourceType !== void 0 && { sourceType }
|
|
210
|
+
})
|
|
211
|
+
] });
|
|
212
|
+
};
|
|
213
|
+
const File = memo(FileImpl);
|
|
214
|
+
File.displayName = "File";
|
|
215
|
+
File.Root = FileRoot;
|
|
216
|
+
File.Icon = FileIconDisplay;
|
|
217
|
+
File.Name = FileName;
|
|
218
|
+
File.Size = FileSize;
|
|
219
|
+
File.Download = FileDownload;
|
|
220
|
+
File.Player = FilePlayer;
|
|
221
|
+
//#endregion
|
|
222
|
+
export { File, FileDownload, FileIconDisplay, FileName, FilePlayer, FileRoot, FileSize, fileVariants, file_exports, formatFileSize, getBase64Size, getFileDataKind, getMimeTypeIcon };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace flow_graph_d_exports {
|
|
3
|
+
export { FlowEdge, FlowGraph, FlowNode, FlowNodeState };
|
|
4
|
+
}
|
|
5
|
+
export type FlowNodeState = "done" | "active" | "pending";
|
|
6
|
+
export interface FlowNode {
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
column: number;
|
|
10
|
+
row: number;
|
|
11
|
+
state: FlowNodeState;
|
|
12
|
+
}
|
|
13
|
+
export interface FlowEdge {
|
|
14
|
+
from: string;
|
|
15
|
+
to: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function FlowGraph({ nodes, edges, visibleCount, className, ...props }: Omit<ComponentProps<"div">, "children" | "nodes" | "edges" | "visibleCount"> & {
|
|
18
|
+
nodes: readonly FlowNode[];
|
|
19
|
+
edges: readonly FlowEdge[];
|
|
20
|
+
visibleCount: number;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { flow_graph_d_exports };
|
|
@@ -0,0 +1,72 @@
|
|
|
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 { take } from "../utils/range.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/assistant-ui/elements/flow-graph.tsx
|
|
8
|
+
var flow_graph_exports = /* @__PURE__ */ __exportAll({ FlowGraph: () => FlowGraph });
|
|
9
|
+
const COL_W = 96;
|
|
10
|
+
const ROW_H = 58;
|
|
11
|
+
const NODE_W = 78;
|
|
12
|
+
const NODE_H = 30;
|
|
13
|
+
function FlowGraph({ nodes, edges, visibleCount, className, ...props }) {
|
|
14
|
+
const shown = take(nodes, visibleCount);
|
|
15
|
+
const shownIds = new Set(shown.map((node) => node.id));
|
|
16
|
+
const columns = Math.max(0, ...nodes.map((node) => node.column)) + 1;
|
|
17
|
+
const rows = Math.max(0, ...nodes.map((node) => node.row)) + 1;
|
|
18
|
+
const width = (columns - 1) * COL_W + NODE_W;
|
|
19
|
+
const height = (rows - 1) * ROW_H + NODE_H;
|
|
20
|
+
const center = (node) => ({
|
|
21
|
+
x: node.column * COL_W + NODE_W / 2,
|
|
22
|
+
y: node.row * ROW_H + NODE_H / 2
|
|
23
|
+
});
|
|
24
|
+
return /* @__PURE__ */ jsx("div", {
|
|
25
|
+
"data-slot": "flow-graph",
|
|
26
|
+
className: cn(paper, "w-full max-w-md overflow-x-auto rounded-2xl p-4", className),
|
|
27
|
+
...props,
|
|
28
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
29
|
+
className: "relative",
|
|
30
|
+
style: {
|
|
31
|
+
width,
|
|
32
|
+
height,
|
|
33
|
+
minWidth: width
|
|
34
|
+
},
|
|
35
|
+
children: [/* @__PURE__ */ jsx("svg", {
|
|
36
|
+
"aria-hidden": true,
|
|
37
|
+
className: "absolute inset-0 overflow-visible",
|
|
38
|
+
width,
|
|
39
|
+
height,
|
|
40
|
+
children: edges.map((edge) => {
|
|
41
|
+
const from = nodes.find((node) => node.id === edge.from);
|
|
42
|
+
const to = nodes.find((node) => node.id === edge.to);
|
|
43
|
+
if (!from || !to) return null;
|
|
44
|
+
const live = shownIds.has(edge.from) && shownIds.has(edge.to);
|
|
45
|
+
const a = center(from);
|
|
46
|
+
const b = center(to);
|
|
47
|
+
const midX = (a.x + b.x) / 2;
|
|
48
|
+
return /* @__PURE__ */ jsx("path", {
|
|
49
|
+
d: `M ${a.x + NODE_W / 2} ${a.y} C ${midX} ${a.y}, ${midX} ${b.y}, ${b.x - NODE_W / 2} ${b.y}`,
|
|
50
|
+
fill: "none",
|
|
51
|
+
strokeWidth: "1.5",
|
|
52
|
+
className: cn("transition-opacity duration-500 motion-reduce:transition-none", live ? "stroke-foreground/20" : "stroke-foreground/5")
|
|
53
|
+
}, `${edge.from}-${edge.to}`);
|
|
54
|
+
})
|
|
55
|
+
}), shown.map((node) => /* @__PURE__ */ jsx("div", {
|
|
56
|
+
className: cn("fade-in zoom-in-95 animate-in fill-mode-both absolute flex items-center justify-center rounded-xl border text-center text-[11.5px] leading-tight duration-300", node.state === "done" && "border-foreground/10 bg-foreground/[0.04] text-muted-foreground", node.state === "active" && "text-foreground/90 border-blue-500/30 bg-blue-500/10 dark:border-blue-400/30", node.state === "pending" && "border-foreground/8 text-muted-foreground border-dashed"),
|
|
57
|
+
style: {
|
|
58
|
+
left: node.column * COL_W,
|
|
59
|
+
top: node.row * ROW_H,
|
|
60
|
+
width: NODE_W,
|
|
61
|
+
height: NODE_H
|
|
62
|
+
},
|
|
63
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
64
|
+
className: cn(mono, "px-2"),
|
|
65
|
+
children: node.label
|
|
66
|
+
})
|
|
67
|
+
}, node.id))]
|
|
68
|
+
})
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
//#endregion
|
|
72
|
+
export { FlowGraph, flow_graph_exports };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { AuiIf, ThreadPrimitive, useAuiState } from "@assistant-ui/react";
|
|
5
|
+
//#region src/components/assistant-ui/elements/follow-up-suggestions.aui.tsx
|
|
6
|
+
var follow_up_suggestions_aui_exports = /* @__PURE__ */ __exportAll({ ThreadFollowupSuggestions: () => ThreadFollowupSuggestions });
|
|
7
|
+
const FollowupSuggestionsRow = () => {
|
|
8
|
+
const suggestions = useAuiState((s) => s.thread.suggestions);
|
|
9
|
+
return /* @__PURE__ */ jsx("div", {
|
|
10
|
+
className: "aui-thread-followup-suggestions w-full",
|
|
11
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
12
|
+
className: "mx-auto flex w-full flex-wrap items-center justify-center gap-2",
|
|
13
|
+
children: suggestions.map((suggestion, idx) => /* @__PURE__ */ jsxs(ThreadPrimitive.Suggestion, {
|
|
14
|
+
className: "aui-thread-followup-suggestion border-foreground/10 hover:bg-foreground/[0.03] hover:border-foreground/25 rounded-md border px-2.5 py-1 text-sm whitespace-nowrap transition-colors ease-in motion-reduce:transition-none",
|
|
15
|
+
prompt: suggestion.prompt,
|
|
16
|
+
send: true,
|
|
17
|
+
children: [suggestion.title ?? suggestion.prompt, suggestion.label && /* @__PURE__ */ jsxs(Fragment, { children: [" ", /* @__PURE__ */ jsx("span", {
|
|
18
|
+
className: "aui-thread-followup-suggestion-label text-muted-foreground",
|
|
19
|
+
children: suggestion.label
|
|
20
|
+
})] })]
|
|
21
|
+
}, idx))
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
const ThreadFollowupSuggestions = () => /* @__PURE__ */ jsx(AuiIf, {
|
|
26
|
+
condition: (s) => !s.thread.isEmpty && !s.thread.isRunning && s.thread.suggestions.length > 0 && s.thread.messages.at(-1)?.role !== "user",
|
|
27
|
+
children: /* @__PURE__ */ jsx(FollowupSuggestionsRow, {})
|
|
28
|
+
});
|
|
29
|
+
//#endregion
|
|
30
|
+
export { ThreadFollowupSuggestions, follow_up_suggestions_aui_exports };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GenerativeUILibrary } from "@assistant-ui/react-generative-ui";
|
|
2
|
+
declare namespace generative_ui_d_exports {
|
|
3
|
+
export { styledGenerativeUILibrary };
|
|
4
|
+
}
|
|
5
|
+
/** `MarkdownTextPrimitive` cannot be reused here: it reads from message-part context, not a prop string. */
|
|
6
|
+
export declare const styledGenerativeUILibrary: GenerativeUILibrary;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { generative_ui_d_exports };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import remarkGfm from "remark-gfm";
|
|
5
|
+
import { defaultGenerativeUILibrary } from "@assistant-ui/react-generative-ui";
|
|
6
|
+
import ReactMarkdown from "react-markdown";
|
|
7
|
+
//#region src/components/assistant-ui/elements/generative-ui.tsx
|
|
8
|
+
var generative_ui_exports = /* @__PURE__ */ __exportAll({ styledGenerativeUILibrary: () => styledGenerativeUILibrary });
|
|
9
|
+
const markdownBase = defaultGenerativeUILibrary.Markdown;
|
|
10
|
+
/** `MarkdownTextPrimitive` cannot be reused here: it reads from message-part context, not a prop string. */
|
|
11
|
+
const styledGenerativeUILibrary = {
|
|
12
|
+
...defaultGenerativeUILibrary,
|
|
13
|
+
Markdown: {
|
|
14
|
+
properties: markdownBase.properties,
|
|
15
|
+
streamProperties: markdownBase.streamProperties,
|
|
16
|
+
description: "A markdown string, rendered with GitHub-flavored markdown.",
|
|
17
|
+
render: ({ value, children }) => /* @__PURE__ */ jsxs("div", {
|
|
18
|
+
"data-aui": "markdown",
|
|
19
|
+
children: [/* @__PURE__ */ jsx(ReactMarkdown, {
|
|
20
|
+
remarkPlugins: [remarkGfm],
|
|
21
|
+
children: value ?? ""
|
|
22
|
+
}), children]
|
|
23
|
+
})
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { generative_ui_exports, styledGenerativeUILibrary };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace geo_map_d_exports {
|
|
3
|
+
export { GeoMap, GeoMapPlace, GeoMapProps, GeoMapRoute };
|
|
4
|
+
}
|
|
5
|
+
export interface GeoMapPlace {
|
|
6
|
+
id: string;
|
|
7
|
+
lat: number;
|
|
8
|
+
lng: number;
|
|
9
|
+
label: string;
|
|
10
|
+
description?: string | undefined;
|
|
11
|
+
}
|
|
12
|
+
export interface GeoMapRoute {
|
|
13
|
+
id: string;
|
|
14
|
+
points: readonly (readonly [lat: number, lng: number])[];
|
|
15
|
+
label?: string | undefined;
|
|
16
|
+
}
|
|
17
|
+
export interface GeoMapProps extends Omit<ComponentProps<"div">, "children" | "onSelect"> {
|
|
18
|
+
places: readonly GeoMapPlace[];
|
|
19
|
+
routes?: readonly GeoMapRoute[] | undefined;
|
|
20
|
+
selectedId?: string | undefined;
|
|
21
|
+
onSelect?: ((id: string) => void) | undefined;
|
|
22
|
+
theme?: "light" | "dark" | "auto" | undefined;
|
|
23
|
+
tileUrl?: string | undefined;
|
|
24
|
+
attribution?: string | undefined;
|
|
25
|
+
height?: number | undefined;
|
|
26
|
+
}
|
|
27
|
+
export declare function GeoMap({ places, routes, selectedId, onSelect, theme, tileUrl, attribution, height, className, ...props }: GeoMapProps): import("react").JSX.Element;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { geo_map_d_exports };
|