@datalayer/agent-runtimes 0.0.2
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/LICENSE +32 -0
- package/README.md +56 -0
- package/lib/App.css +47 -0
- package/lib/App.d.ts +3 -0
- package/lib/App.js +18 -0
- package/lib/components/chat/components/AgentDetails.d.ts +19 -0
- package/lib/components/chat/components/AgentDetails.js +170 -0
- package/lib/components/chat/components/Chat.d.ts +105 -0
- package/lib/components/chat/components/Chat.js +275 -0
- package/lib/components/chat/components/ChatFloating.d.ts +146 -0
- package/lib/components/chat/components/ChatFloating.js +381 -0
- package/lib/components/chat/components/ChatInline.d.ts +42 -0
- package/lib/components/chat/components/ChatInline.js +327 -0
- package/lib/components/chat/components/ChatPopupStandalone.d.ts +110 -0
- package/lib/components/chat/components/ChatPopupStandalone.js +422 -0
- package/lib/components/chat/components/ChatSidebar.d.ts +78 -0
- package/lib/components/chat/components/ChatSidebar.js +224 -0
- package/lib/components/chat/components/ChatStandalone.d.ts +105 -0
- package/lib/components/chat/components/ChatStandalone.js +320 -0
- package/lib/components/chat/components/base/ChatBase.d.ts +285 -0
- package/lib/components/chat/components/base/ChatBase.js +1192 -0
- package/lib/components/chat/components/display/ToolCallDisplay.d.ts +26 -0
- package/lib/components/chat/components/display/ToolCallDisplay.js +225 -0
- package/lib/components/chat/components/display/index.d.ts +6 -0
- package/lib/components/chat/components/display/index.js +10 -0
- package/lib/components/chat/components/elements/ChatHeader.d.ts +43 -0
- package/lib/components/chat/components/elements/ChatHeader.js +67 -0
- package/lib/components/chat/components/elements/ChatInputPrompt.d.ts +26 -0
- package/lib/components/chat/components/elements/ChatInputPrompt.js +145 -0
- package/lib/components/chat/components/elements/ChatMessages.d.ts +36 -0
- package/lib/components/chat/components/elements/ChatMessages.js +195 -0
- package/lib/components/chat/components/elements/FloatingBrandButton.d.ts +34 -0
- package/lib/components/chat/components/elements/FloatingBrandButton.js +88 -0
- package/lib/components/chat/components/elements/MessagePart.d.ts +50 -0
- package/lib/components/chat/components/elements/MessagePart.js +48 -0
- package/lib/components/chat/components/elements/PoweredByTag.d.ts +26 -0
- package/lib/components/chat/components/elements/PoweredByTag.js +33 -0
- package/lib/components/chat/components/elements/ToolApprovalDialog.d.ts +42 -0
- package/lib/components/chat/components/elements/ToolApprovalDialog.js +96 -0
- package/lib/components/chat/components/index.d.ts +21 -0
- package/lib/components/chat/components/index.js +34 -0
- package/lib/components/chat/components/parts/DynamicToolPart.d.ts +20 -0
- package/lib/components/chat/components/parts/DynamicToolPart.js +13 -0
- package/lib/components/chat/components/parts/ReasoningPart.d.ts +17 -0
- package/lib/components/chat/components/parts/ReasoningPart.js +69 -0
- package/lib/components/chat/components/parts/TextPart.d.ts +28 -0
- package/lib/components/chat/components/parts/TextPart.js +103 -0
- package/lib/components/chat/components/parts/ToolPart.d.ts +17 -0
- package/lib/components/chat/components/parts/ToolPart.js +163 -0
- package/lib/components/chat/components/parts/index.d.ts +9 -0
- package/lib/components/chat/components/parts/index.js +13 -0
- package/lib/components/chat/extensions/A2UIExtension.d.ts +87 -0
- package/lib/components/chat/extensions/A2UIExtension.js +312 -0
- package/lib/components/chat/extensions/ExtensionRegistry.d.ts +66 -0
- package/lib/components/chat/extensions/ExtensionRegistry.js +128 -0
- package/lib/components/chat/extensions/MCPUIExtension.d.ts +77 -0
- package/lib/components/chat/extensions/MCPUIExtension.js +212 -0
- package/lib/components/chat/extensions/index.d.ts +9 -0
- package/lib/components/chat/extensions/index.js +12 -0
- package/lib/components/chat/handler.d.ts +20 -0
- package/lib/components/chat/handler.js +56 -0
- package/lib/components/chat/index.d.ts +61 -0
- package/lib/components/chat/index.js +76 -0
- package/lib/components/chat/inference/BaseInferenceProvider.d.ts +57 -0
- package/lib/components/chat/inference/BaseInferenceProvider.js +69 -0
- package/lib/components/chat/inference/DatalayerInferenceProvider.d.ts +83 -0
- package/lib/components/chat/inference/DatalayerInferenceProvider.js +305 -0
- package/lib/components/chat/inference/SelfHostedInferenceProvider.d.ts +54 -0
- package/lib/components/chat/inference/SelfHostedInferenceProvider.js +246 -0
- package/lib/components/chat/inference/index.d.ts +9 -0
- package/lib/components/chat/inference/index.js +12 -0
- package/lib/components/chat/middleware/MiddlewarePipeline.d.ts +118 -0
- package/lib/components/chat/middleware/MiddlewarePipeline.js +255 -0
- package/lib/components/chat/middleware/index.d.ts +7 -0
- package/lib/components/chat/middleware/index.js +10 -0
- package/lib/components/chat/protocols/A2AAdapter.d.ts +79 -0
- package/lib/components/chat/protocols/A2AAdapter.js +388 -0
- package/lib/components/chat/protocols/ACPAdapter.d.ts +161 -0
- package/lib/components/chat/protocols/ACPAdapter.js +504 -0
- package/lib/components/chat/protocols/AGUIAdapter.d.ts +82 -0
- package/lib/components/chat/protocols/AGUIAdapter.js +518 -0
- package/lib/components/chat/protocols/BaseProtocolAdapter.d.ts +75 -0
- package/lib/components/chat/protocols/BaseProtocolAdapter.js +119 -0
- package/lib/components/chat/protocols/VercelAIAdapter.d.ts +77 -0
- package/lib/components/chat/protocols/VercelAIAdapter.js +252 -0
- package/lib/components/chat/protocols/index.d.ts +11 -0
- package/lib/components/chat/protocols/index.js +14 -0
- package/lib/components/chat/store/chatStore.d.ts +158 -0
- package/lib/components/chat/store/chatStore.js +313 -0
- package/lib/components/chat/store/index.d.ts +6 -0
- package/lib/components/chat/store/index.js +10 -0
- package/lib/components/chat/tools/ToolExecutor.d.ts +49 -0
- package/lib/components/chat/tools/ToolExecutor.js +151 -0
- package/lib/components/chat/tools/index.d.ts +8 -0
- package/lib/components/chat/tools/index.js +11 -0
- package/lib/components/chat/types/extension.d.ts +181 -0
- package/lib/components/chat/types/extension.js +46 -0
- package/lib/components/chat/types/index.d.ts +11 -0
- package/lib/components/chat/types/index.js +16 -0
- package/lib/components/chat/types/inference.d.ts +117 -0
- package/lib/components/chat/types/inference.js +5 -0
- package/lib/components/chat/types/message.d.ts +117 -0
- package/lib/components/chat/types/message.js +50 -0
- package/lib/components/chat/types/middleware.d.ts +153 -0
- package/lib/components/chat/types/middleware.js +32 -0
- package/lib/components/chat/types/protocol.d.ts +209 -0
- package/lib/components/chat/types/protocol.js +5 -0
- package/lib/components/chat/types/tool.d.ts +140 -0
- package/lib/components/chat/types/tool.js +23 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +6 -0
- package/lib/components/sparklines/Sparklines.d.ts +16 -0
- package/lib/components/sparklines/Sparklines.js +65 -0
- package/lib/components/sparklines/SparklinesLine.d.ts +8 -0
- package/lib/components/sparklines/SparklinesLine.js +37 -0
- package/lib/components/sparklines/dataProcessing.d.ts +25 -0
- package/lib/components/sparklines/dataProcessing.js +35 -0
- package/lib/components/sparklines/index.d.ts +4 -0
- package/lib/components/sparklines/index.js +7 -0
- package/lib/components/sparklines/types.d.ts +36 -0
- package/lib/components/sparklines/types.js +5 -0
- package/lib/components/ui/accordion.d.ts +7 -0
- package/lib/components/ui/accordion.js +22 -0
- package/lib/components/ui/alert-dialog.d.ts +14 -0
- package/lib/components/ui/alert-dialog.js +43 -0
- package/lib/components/ui/alert.d.ts +9 -0
- package/lib/components/ui/alert.js +24 -0
- package/lib/components/ui/aspect-ratio.d.ts +3 -0
- package/lib/components/ui/aspect-ratio.js +11 -0
- package/lib/components/ui/avatar.d.ts +6 -0
- package/lib/components/ui/avatar.js +18 -0
- package/lib/components/ui/badge.d.ts +9 -0
- package/lib/components/ui/badge.js +22 -0
- package/lib/components/ui/breadcrumb.d.ts +11 -0
- package/lib/components/ui/breadcrumb.js +27 -0
- package/lib/components/ui/button-group.d.ts +11 -0
- package/lib/components/ui/button-group.js +31 -0
- package/lib/components/ui/button.d.ts +13 -0
- package/lib/components/ui/button.js +39 -0
- package/lib/components/ui/calendar.d.ts +8 -0
- package/lib/components/ui/calendar.js +80 -0
- package/lib/components/ui/card.d.ts +9 -0
- package/lib/components/ui/card.js +24 -0
- package/lib/components/ui/carousel.d.ts +19 -0
- package/lib/components/ui/carousel.js +95 -0
- package/lib/components/ui/chart.d.ts +53 -0
- package/lib/components/ui/chart.js +136 -0
- package/lib/components/ui/checkbox.d.ts +4 -0
- package/lib/components/ui/checkbox.js +13 -0
- package/lib/components/ui/collapsible.d.ts +5 -0
- package/lib/components/ui/collapsible.js +17 -0
- package/lib/components/ui/command.d.ts +18 -0
- package/lib/components/ui/command.js +38 -0
- package/lib/components/ui/context-menu.d.ts +25 -0
- package/lib/components/ui/context-menu.js +55 -0
- package/lib/components/ui/dialog.d.ts +15 -0
- package/lib/components/ui/dialog.js +40 -0
- package/lib/components/ui/drawer.d.ts +13 -0
- package/lib/components/ui/drawer.js +39 -0
- package/lib/components/ui/dropdown-menu.d.ts +25 -0
- package/lib/components/ui/dropdown-menu.js +55 -0
- package/lib/components/ui/empty.d.ts +11 -0
- package/lib/components/ui/empty.js +37 -0
- package/lib/components/ui/field.d.ts +24 -0
- package/lib/components/ui/field.js +80 -0
- package/lib/components/ui/form.d.ts +24 -0
- package/lib/components/ui/form.js +63 -0
- package/lib/components/ui/hover-card.d.ts +6 -0
- package/lib/components/ui/hover-card.js +18 -0
- package/lib/components/ui/input-group.d.ts +19 -0
- package/lib/components/ui/input-group.js +69 -0
- package/lib/components/ui/input-otp.d.ts +11 -0
- package/lib/components/ui/input-otp.js +25 -0
- package/lib/components/ui/input.d.ts +3 -0
- package/lib/components/ui/input.js +6 -0
- package/lib/components/ui/item.d.ts +23 -0
- package/lib/components/ui/item.js +66 -0
- package/lib/components/ui/kbd.d.ts +3 -0
- package/lib/components/ui/kbd.js +13 -0
- package/lib/components/ui/label.d.ts +4 -0
- package/lib/components/ui/label.js +12 -0
- package/lib/components/ui/menubar.d.ts +26 -0
- package/lib/components/ui/menubar.js +58 -0
- package/lib/components/ui/navigation-menu.d.ts +14 -0
- package/lib/components/ui/navigation-menu.js +31 -0
- package/lib/components/ui/pagination.d.ts +13 -0
- package/lib/components/ui/pagination.js +29 -0
- package/lib/components/ui/popover.d.ts +7 -0
- package/lib/components/ui/popover.js +21 -0
- package/lib/components/ui/progress.d.ts +4 -0
- package/lib/components/ui/progress.js +12 -0
- package/lib/components/ui/radio-group.d.ts +5 -0
- package/lib/components/ui/radio-group.js +16 -0
- package/lib/components/ui/resizable.d.ts +8 -0
- package/lib/components/ui/resizable.js +19 -0
- package/lib/components/ui/scroll-area.d.ts +5 -0
- package/lib/components/ui/scroll-area.js +17 -0
- package/lib/components/ui/select.d.ts +15 -0
- package/lib/components/ui/select.js +42 -0
- package/lib/components/ui/separator.d.ts +4 -0
- package/lib/components/ui/separator.js +12 -0
- package/lib/components/ui/sheet.d.ts +13 -0
- package/lib/components/ui/sheet.js +44 -0
- package/lib/components/ui/sidebar.d.ts +69 -0
- package/lib/components/ui/sidebar.js +216 -0
- package/lib/components/ui/skeleton.d.ts +2 -0
- package/lib/components/ui/skeleton.js +10 -0
- package/lib/components/ui/slider.d.ts +4 -0
- package/lib/components/ui/slider.js +18 -0
- package/lib/components/ui/sonner.d.ts +3 -0
- package/lib/components/ui/sonner.js +25 -0
- package/lib/components/ui/spinner.d.ts +2 -0
- package/lib/components/ui/spinner.js +11 -0
- package/lib/components/ui/switch.d.ts +4 -0
- package/lib/components/ui/switch.js +12 -0
- package/lib/components/ui/table.d.ts +10 -0
- package/lib/components/ui/table.js +32 -0
- package/lib/components/ui/tabs.d.ts +7 -0
- package/lib/components/ui/tabs.js +21 -0
- package/lib/components/ui/textarea.d.ts +3 -0
- package/lib/components/ui/textarea.js +6 -0
- package/lib/components/ui/toast.d.ts +15 -0
- package/lib/components/ui/toast.js +38 -0
- package/lib/components/ui/toaster.d.ts +1 -0
- package/lib/components/ui/toaster.js +14 -0
- package/lib/components/ui/toggle-group.d.ts +9 -0
- package/lib/components/ui/toggle-group.js +26 -0
- package/lib/components/ui/toggle.d.ts +9 -0
- package/lib/components/ui/toggle.js +30 -0
- package/lib/components/ui/tooltip.d.ts +7 -0
- package/lib/components/ui/tooltip.js +21 -0
- package/lib/components/vercel-ai-elements/artifact.d.ts +23 -0
- package/lib/components/vercel-ai-elements/artifact.js +24 -0
- package/lib/components/vercel-ai-elements/code-block.d.ts +17 -0
- package/lib/components/vercel-ai-elements/code-block.js +94 -0
- package/lib/components/vercel-ai-elements/conversation.d.ts +15 -0
- package/lib/components/vercel-ai-elements/conversation.js +21 -0
- package/lib/components/vercel-ai-elements/loader.d.ts +5 -0
- package/lib/components/vercel-ai-elements/loader.js +8 -0
- package/lib/components/vercel-ai-elements/message.d.ts +46 -0
- package/lib/components/vercel-ai-elements/message.js +109 -0
- package/lib/components/vercel-ai-elements/model-selector.d.ts +35 -0
- package/lib/components/vercel-ai-elements/model-selector.js +22 -0
- package/lib/components/vercel-ai-elements/prompt-input.d.ts +195 -0
- package/lib/components/vercel-ai-elements/prompt-input.js +589 -0
- package/lib/components/vercel-ai-elements/reasoning.d.ts +26 -0
- package/lib/components/vercel-ai-elements/reasoning.js +80 -0
- package/lib/components/vercel-ai-elements/shimmer.d.ts +9 -0
- package/lib/components/vercel-ai-elements/shimmer.js +22 -0
- package/lib/components/vercel-ai-elements/sources.d.ts +12 -0
- package/lib/components/vercel-ai-elements/sources.js +13 -0
- package/lib/components/vercel-ai-elements/suggestion.d.ts +10 -0
- package/lib/components/vercel-ai-elements/suggestion.js +16 -0
- package/lib/components/vercel-ai-elements/tool.d.ts +23 -0
- package/lib/components/vercel-ai-elements/tool.js +52 -0
- package/lib/examples/A2UiRestaurantExample.d.ts +25 -0
- package/lib/examples/A2UiRestaurantExample.js +305 -0
- package/lib/examples/AgUiAgenticExample.d.ts +25 -0
- package/lib/examples/AgUiAgenticExample.js +63 -0
- package/lib/examples/AgUiBackendToolRenderingExample.d.ts +30 -0
- package/lib/examples/AgUiBackendToolRenderingExample.js +103 -0
- package/lib/examples/AgUiHaikuGenUIExample.d.ts +44 -0
- package/lib/examples/AgUiHaikuGenUIExample.js +151 -0
- package/lib/examples/AgUiHumanInTheLoopExample.d.ts +26 -0
- package/lib/examples/AgUiHumanInTheLoopExample.js +220 -0
- package/lib/examples/AgUiSharedStateExample.d.ts +25 -0
- package/lib/examples/AgUiSharedStateExample.js +181 -0
- package/lib/examples/AgUiToolsBasedGenUIExample.d.ts +25 -0
- package/lib/examples/AgUiToolsBasedGenUIExample.js +257 -0
- package/lib/examples/AgentRuntimeCustomExample.d.ts +9 -0
- package/lib/examples/AgentRuntimeCustomExample.js +68 -0
- package/lib/examples/AgentRuntimeLexical2Example.d.ts +42 -0
- package/lib/examples/AgentRuntimeLexical2Example.js +236 -0
- package/lib/examples/AgentRuntimeLexicalExample.d.ts +36 -0
- package/lib/examples/AgentRuntimeLexicalExample.js +260 -0
- package/lib/examples/AgentRuntimeLexicalSidebarExample.d.ts +41 -0
- package/lib/examples/AgentRuntimeLexicalSidebarExample.js +166 -0
- package/lib/examples/AgentRuntimeNotebookExample.d.ts +9 -0
- package/lib/examples/AgentRuntimeNotebookExample.js +148 -0
- package/lib/examples/AgentRuntimeNotebookSidebarExample.d.ts +13 -0
- package/lib/examples/AgentRuntimeNotebookSidebarExample.js +121 -0
- package/lib/examples/AgentRuntimeStandaloneExample.d.ts +21 -0
- package/lib/examples/AgentRuntimeStandaloneExample.js +158 -0
- package/lib/examples/AgentSpaceFormExample.d.ts +22 -0
- package/lib/examples/AgentSpaceFormExample.js +296 -0
- package/lib/examples/AgentSpaceHomeExample.d.ts +8 -0
- package/lib/examples/AgentSpaceHomeExample.js +171 -0
- package/lib/examples/CopilotKitLexicalExample.d.ts +38 -0
- package/lib/examples/CopilotKitLexicalExample.js +161 -0
- package/lib/examples/CopilotKitNotebookExample.d.ts +11 -0
- package/lib/examples/CopilotKitNotebookExample.js +70 -0
- package/lib/examples/DatalayerNotebookExample.d.ts +16 -0
- package/lib/examples/DatalayerNotebookExample.js +99 -0
- package/lib/examples/JupyterCellExample.d.ts +6 -0
- package/lib/examples/JupyterCellExample.js +19 -0
- package/lib/examples/JupyterNotebookExample.d.ts +6 -0
- package/lib/examples/JupyterNotebookExample.js +21 -0
- package/lib/examples/ag-ui/haiku/HaikuDisplay.d.ts +18 -0
- package/lib/examples/ag-ui/haiku/HaikuDisplay.js +110 -0
- package/lib/examples/ag-ui/haiku/InlineHaikuCard.d.ts +39 -0
- package/lib/examples/ag-ui/haiku/InlineHaikuCard.js +117 -0
- package/lib/examples/ag-ui/haiku/index.d.ts +11 -0
- package/lib/examples/ag-ui/haiku/index.js +15 -0
- package/lib/examples/ag-ui/index.d.ts +10 -0
- package/lib/examples/ag-ui/index.js +16 -0
- package/lib/examples/ag-ui/weather/InlineWeatherCard.d.ts +43 -0
- package/lib/examples/ag-ui/weather/InlineWeatherCard.js +180 -0
- package/lib/examples/ag-ui/weather/index.d.ts +9 -0
- package/lib/examples/ag-ui/weather/index.js +13 -0
- package/lib/examples/components/AgentConfiguration.d.ts +50 -0
- package/lib/examples/components/AgentConfiguration.js +115 -0
- package/lib/examples/components/AgentsDataTable.d.ts +13 -0
- package/lib/examples/components/AgentsDataTable.js +74 -0
- package/lib/examples/components/FooterMetrics.d.ts +12 -0
- package/lib/examples/components/FooterMetrics.js +17 -0
- package/lib/examples/components/Header.d.ts +27 -0
- package/lib/examples/components/Header.js +294 -0
- package/lib/examples/components/HeaderControls.d.ts +11 -0
- package/lib/examples/components/HeaderControls.js +24 -0
- package/lib/examples/components/LexicalEditor.d.ts +27 -0
- package/lib/examples/components/LexicalEditor.js +118 -0
- package/lib/examples/components/MainContent.d.ts +19 -0
- package/lib/examples/components/MainContent.js +68 -0
- package/lib/examples/components/MockFileBrowser.d.ts +12 -0
- package/lib/examples/components/MockFileBrowser.js +131 -0
- package/lib/examples/components/Rating.d.ts +14 -0
- package/lib/examples/components/Rating.js +12 -0
- package/lib/examples/components/SessionTabs.d.ts +21 -0
- package/lib/examples/components/SessionTabs.js +11 -0
- package/lib/examples/components/TimeTravel.d.ts +15 -0
- package/lib/examples/components/TimeTravel.js +23 -0
- package/lib/examples/components/index.d.ts +11 -0
- package/lib/examples/components/index.js +14 -0
- package/lib/examples/example-selector.d.ts +22 -0
- package/lib/examples/example-selector.js +62 -0
- package/lib/examples/index.d.ts +21 -0
- package/lib/examples/index.js +25 -0
- package/lib/examples/lexical/editorConfig.d.ts +76 -0
- package/lib/examples/lexical/editorConfig.js +55 -0
- package/lib/examples/lexical/lexical-theme.css +436 -0
- package/lib/examples/lexical/theme.d.ts +61 -0
- package/lib/examples/lexical/theme.js +72 -0
- package/lib/examples/main.d.ts +2 -0
- package/lib/examples/main.js +334 -0
- package/lib/examples/stores/agents/earthquake-detector.ipynb.json +111 -0
- package/lib/examples/stores/agents/earthquake-detector.json +13 -0
- package/lib/examples/stores/agents/earthquake-detector.lexical.json +2988 -0
- package/lib/examples/stores/agents/sales-forecaster.ipynb.json +111 -0
- package/lib/examples/stores/agents/sales-forecaster.json +13 -0
- package/lib/examples/stores/agents/sales-forecaster.lexical.json +2988 -0
- package/lib/examples/stores/agents/social-post-generator.ipynb.json +111 -0
- package/lib/examples/stores/agents/social-post-generator.json +13 -0
- package/lib/examples/stores/agents/social-post-generator.lexical.json +2988 -0
- package/lib/examples/stores/agents/stock-market.ipynb.json +56 -0
- package/lib/examples/stores/agents/stock-market.json +13 -0
- package/lib/examples/stores/agents/stock-market.lexical.json +1026 -0
- package/lib/examples/stores/examplesStore.d.ts +26 -0
- package/lib/examples/stores/examplesStore.js +60 -0
- package/lib/examples/stores/notebooks/Empty.ipynb.json +33 -0
- package/lib/examples/stores/notebooks/IPyWidgetsExample.ipynb.json +101 -0
- package/lib/examples/stores/notebooks/IPyWidgetsExampleWithState.ipynb.json +112 -0
- package/lib/examples/stores/notebooks/Lite.ipynb.json +128 -0
- package/lib/examples/stores/notebooks/Matplotlib.ipynb.json +137 -0
- package/lib/examples/stores/notebooks/NotebookExample1.ipynb.json +126 -0
- package/lib/examples/stores/notebooks/NotebookExample2.ipynb.json +48 -0
- package/lib/examples/stores/notebooks/NotebookOutputs.ipynb.json +49 -0
- package/lib/examples/stores/notebooks/NotebookToCExample.ipynb.json +102 -0
- package/lib/examples/stores/notebooks/OutputIPyWidgetsExample.d.ts +145 -0
- package/lib/examples/stores/notebooks/OutputIPyWidgetsExample.js +153 -0
- package/lib/examples/stores/notebooks/PyGWalker.ipynb.json +55 -0
- package/lib/examples/vercel-ai-elements/VercelAiElementsShowcase.d.ts +12 -0
- package/lib/examples/vercel-ai-elements/VercelAiElementsShowcase.js +69 -0
- package/lib/examples/vercel-ai-elements/components/ArtifactShowcase.d.ts +1 -0
- package/lib/examples/vercel-ai-elements/components/ArtifactShowcase.js +85 -0
- package/lib/examples/vercel-ai-elements/components/CodeBlockShowcase.d.ts +1 -0
- package/lib/examples/vercel-ai-elements/components/CodeBlockShowcase.js +62 -0
- package/lib/examples/vercel-ai-elements/components/ConversationShowcase.d.ts +1 -0
- package/lib/examples/vercel-ai-elements/components/ConversationShowcase.js +51 -0
- package/lib/examples/vercel-ai-elements/components/LoaderShowcase.d.ts +1 -0
- package/lib/examples/vercel-ai-elements/components/LoaderShowcase.js +9 -0
- package/lib/examples/vercel-ai-elements/components/MessageShowcase.d.ts +1 -0
- package/lib/examples/vercel-ai-elements/components/MessageShowcase.js +56 -0
- package/lib/examples/vercel-ai-elements/components/ModelSelectorShowcase.d.ts +1 -0
- package/lib/examples/vercel-ai-elements/components/ModelSelectorShowcase.js +50 -0
- package/lib/examples/vercel-ai-elements/components/PromptInputShowcase.d.ts +1 -0
- package/lib/examples/vercel-ai-elements/components/PromptInputShowcase.js +16 -0
- package/lib/examples/vercel-ai-elements/components/ReasoningShowcase.d.ts +1 -0
- package/lib/examples/vercel-ai-elements/components/ReasoningShowcase.js +72 -0
- package/lib/examples/vercel-ai-elements/components/ShimmerShowcase.d.ts +1 -0
- package/lib/examples/vercel-ai-elements/components/ShimmerShowcase.js +9 -0
- package/lib/examples/vercel-ai-elements/components/SourcesShowcase.d.ts +1 -0
- package/lib/examples/vercel-ai-elements/components/SourcesShowcase.js +43 -0
- package/lib/examples/vercel-ai-elements/components/SuggestionShowcase.d.ts +1 -0
- package/lib/examples/vercel-ai-elements/components/SuggestionShowcase.js +31 -0
- package/lib/examples/vercel-ai-elements/components/ToolShowcase.d.ts +1 -0
- package/lib/examples/vercel-ai-elements/components/ToolShowcase.js +54 -0
- package/lib/examples/vercel-ai-elements/index.d.ts +13 -0
- package/lib/examples/vercel-ai-elements/index.js +17 -0
- package/lib/examples/vercel-ai-elements/main.d.ts +1 -0
- package/lib/examples/vercel-ai-elements/main.js +9 -0
- package/lib/examples/vercel-ai-elements/showcase.css +128 -0
- package/lib/hooks/index.d.ts +68 -0
- package/lib/hooks/index.js +81 -0
- package/lib/hooks/useA2A.d.ts +75 -0
- package/lib/hooks/useA2A.js +368 -0
- package/lib/hooks/useAGUI.d.ts +63 -0
- package/lib/hooks/useAGUI.js +162 -0
- package/lib/hooks/useAcp.d.ts +121 -0
- package/lib/hooks/useAcp.js +459 -0
- package/lib/hooks/useAgents.d.ts +13 -0
- package/lib/hooks/useAgents.js +71 -0
- package/lib/hooks/useChat.d.ts +62 -0
- package/lib/hooks/useChat.js +363 -0
- package/lib/hooks/useKeyboardShortcuts.d.ts +47 -0
- package/lib/hooks/useKeyboardShortcuts.js +153 -0
- package/lib/hooks/useMobile.d.ts +1 -0
- package/lib/hooks/useMobile.js +19 -0
- package/lib/hooks/useNotebookAIAgent.d.ts +8 -0
- package/lib/hooks/useNotebookAIAgent.js +56 -0
- package/lib/hooks/useToast.d.ts +44 -0
- package/lib/hooks/useToast.js +128 -0
- package/lib/hooks/useTools.d.ts +107 -0
- package/lib/hooks/useTools.js +130 -0
- package/lib/hooks/useVercelChat.d.ts +45 -0
- package/lib/hooks/useVercelChat.js +62 -0
- package/lib/index.css +73 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +5 -0
- package/lib/lexical/ChatInlinePlugin.d.ts +21 -0
- package/lib/lexical/ChatInlinePlugin.js +379 -0
- package/lib/lexical/index.d.ts +6 -0
- package/lib/lexical/index.js +10 -0
- package/lib/lib/utils.d.ts +2 -0
- package/lib/lib/utils.js +9 -0
- package/lib/main.d.ts +1 -0
- package/lib/main.js +12 -0
- package/lib/models/AIAgent.d.ts +17 -0
- package/lib/models/AIAgent.js +5 -0
- package/lib/models/index.d.ts +1 -0
- package/lib/models/index.js +5 -0
- package/lib/renderers/a2ui/components/A2UIRenderer.d.ts +7 -0
- package/lib/renderers/a2ui/components/A2UIRenderer.js +102 -0
- package/lib/renderers/a2ui/components/SurfaceRenderer.d.ts +7 -0
- package/lib/renderers/a2ui/components/SurfaceRenderer.js +101 -0
- package/lib/renderers/a2ui/components/content/AudioPlayer.d.ts +9 -0
- package/lib/renderers/a2ui/components/content/AudioPlayer.js +38 -0
- package/lib/renderers/a2ui/components/content/Divider.d.ts +9 -0
- package/lib/renderers/a2ui/components/content/Divider.js +35 -0
- package/lib/renderers/a2ui/components/content/Icon.d.ts +9 -0
- package/lib/renderers/a2ui/components/content/Icon.js +110 -0
- package/lib/renderers/a2ui/components/content/Image.d.ts +9 -0
- package/lib/renderers/a2ui/components/content/Image.js +61 -0
- package/lib/renderers/a2ui/components/content/Text.d.ts +9 -0
- package/lib/renderers/a2ui/components/content/Text.js +64 -0
- package/lib/renderers/a2ui/components/content/Video.d.ts +9 -0
- package/lib/renderers/a2ui/components/content/Video.js +37 -0
- package/lib/renderers/a2ui/components/content/index.d.ts +6 -0
- package/lib/renderers/a2ui/components/content/index.js +25 -0
- package/lib/renderers/a2ui/components/index.d.ts +5 -0
- package/lib/renderers/a2ui/components/index.js +24 -0
- package/lib/renderers/a2ui/components/interactive/Button.d.ts +11 -0
- package/lib/renderers/a2ui/components/interactive/Button.js +71 -0
- package/lib/renderers/a2ui/components/interactive/CheckBox.d.ts +9 -0
- package/lib/renderers/a2ui/components/interactive/CheckBox.js +48 -0
- package/lib/renderers/a2ui/components/interactive/DateTimeInput.d.ts +9 -0
- package/lib/renderers/a2ui/components/interactive/DateTimeInput.js +62 -0
- package/lib/renderers/a2ui/components/interactive/MultipleChoice.d.ts +9 -0
- package/lib/renderers/a2ui/components/interactive/MultipleChoice.js +73 -0
- package/lib/renderers/a2ui/components/interactive/Slider.d.ts +9 -0
- package/lib/renderers/a2ui/components/interactive/Slider.js +53 -0
- package/lib/renderers/a2ui/components/interactive/TextField.d.ts +9 -0
- package/lib/renderers/a2ui/components/interactive/TextField.js +72 -0
- package/lib/renderers/a2ui/components/interactive/index.d.ts +6 -0
- package/lib/renderers/a2ui/components/interactive/index.js +25 -0
- package/lib/renderers/a2ui/components/layout/Card.d.ts +11 -0
- package/lib/renderers/a2ui/components/layout/Card.js +30 -0
- package/lib/renderers/a2ui/components/layout/Column.d.ts +11 -0
- package/lib/renderers/a2ui/components/layout/Column.js +65 -0
- package/lib/renderers/a2ui/components/layout/List.d.ts +11 -0
- package/lib/renderers/a2ui/components/layout/List.js +55 -0
- package/lib/renderers/a2ui/components/layout/Modal.d.ts +11 -0
- package/lib/renderers/a2ui/components/layout/Modal.js +58 -0
- package/lib/renderers/a2ui/components/layout/Row.d.ts +11 -0
- package/lib/renderers/a2ui/components/layout/Row.js +65 -0
- package/lib/renderers/a2ui/components/layout/Tabs.d.ts +11 -0
- package/lib/renderers/a2ui/components/layout/Tabs.js +48 -0
- package/lib/renderers/a2ui/components/layout/index.d.ts +6 -0
- package/lib/renderers/a2ui/components/layout/index.js +25 -0
- package/lib/renderers/a2ui/context/A2UIContext.d.ts +17 -0
- package/lib/renderers/a2ui/context/A2UIContext.js +54 -0
- package/lib/renderers/a2ui/context/ThemeContext.d.ts +20 -0
- package/lib/renderers/a2ui/context/ThemeContext.js +333 -0
- package/lib/renderers/a2ui/hooks/useA2UI.d.ts +36 -0
- package/lib/renderers/a2ui/hooks/useA2UI.js +62 -0
- package/lib/renderers/a2ui/hooks/useDataBinding.d.ts +8 -0
- package/lib/renderers/a2ui/hooks/useDataBinding.js +83 -0
- package/lib/renderers/a2ui/index.d.ts +9 -0
- package/lib/renderers/a2ui/index.js +28 -0
- package/lib/renderers/a2ui/lib/utils.d.ts +11 -0
- package/lib/renderers/a2ui/lib/utils.js +38 -0
- package/lib/renderers/a2ui/types/index.d.ts +17 -0
- package/lib/renderers/a2ui/types/index.js +5 -0
- package/lib/renderers/index.d.ts +1 -0
- package/lib/renderers/index.js +5 -0
- package/lib/state/index.d.ts +1 -0
- package/lib/state/index.js +5 -0
- package/lib/state/substates/AIAgentState.d.ts +11 -0
- package/lib/state/substates/AIAgentState.js +42 -0
- package/lib/state/substates/index.d.ts +1 -0
- package/lib/state/substates/index.js +5 -0
- package/lib/stories/Button.d.ts +15 -0
- package/lib/stories/Button.js +13 -0
- package/lib/stories/Button.stories.d.ts +23 -0
- package/lib/stories/Button.stories.js +48 -0
- package/lib/stories/Cell.stories.d.ts +12 -0
- package/lib/stories/Cell.stories.js +123 -0
- package/lib/stories/Header.d.ts +12 -0
- package/lib/stories/Header.js +8 -0
- package/lib/stories/Header.stories.d.ts +18 -0
- package/lib/stories/Header.stories.js +30 -0
- package/lib/stories/Page.d.ts +3 -0
- package/lib/stories/Page.js +12 -0
- package/lib/stories/Page.stories.d.ts +12 -0
- package/lib/stories/Page.stories.js +28 -0
- package/lib/stories/assets/accessibility.png +0 -0
- package/lib/stories/assets/accessibility.svg +1 -0
- package/lib/stories/assets/addon-library.png +0 -0
- package/lib/stories/assets/assets.png +0 -0
- package/lib/stories/assets/context.png +0 -0
- package/lib/stories/assets/discord.svg +1 -0
- package/lib/stories/assets/docs.png +0 -0
- package/lib/stories/assets/figma-plugin.png +0 -0
- package/lib/stories/assets/github.svg +1 -0
- package/lib/stories/assets/share.png +0 -0
- package/lib/stories/assets/styling.png +0 -0
- package/lib/stories/assets/testing.png +0 -0
- package/lib/stories/assets/theming.png +0 -0
- package/lib/stories/assets/tutorials.svg +1 -0
- package/lib/stories/assets/youtube.svg +1 -0
- package/lib/stories/button.css +35 -0
- package/lib/stories/header.css +37 -0
- package/lib/stories/page.css +73 -0
- package/lib/test-setup.d.ts +1 -0
- package/lib/test-setup.js +80 -0
- package/lib/tools/adapters/agent-runtimes/AgentRuntimesToolAdapter.d.ts +40 -0
- package/lib/tools/adapters/agent-runtimes/AgentRuntimesToolAdapter.js +110 -0
- package/lib/tools/adapters/agent-runtimes/index.d.ts +9 -0
- package/lib/tools/adapters/agent-runtimes/index.js +13 -0
- package/lib/tools/adapters/agent-runtimes/lexicalHooks.d.ts +24 -0
- package/lib/tools/adapters/agent-runtimes/lexicalHooks.js +50 -0
- package/lib/tools/adapters/agent-runtimes/notebookHooks.d.ts +24 -0
- package/lib/tools/adapters/agent-runtimes/notebookHooks.js +51 -0
- package/lib/tools/adapters/copilotkit/CopilotKitToolAdapter.d.ts +73 -0
- package/lib/tools/adapters/copilotkit/CopilotKitToolAdapter.js +244 -0
- package/lib/tools/adapters/copilotkit/index.d.ts +10 -0
- package/lib/tools/adapters/copilotkit/index.js +14 -0
- package/lib/tools/adapters/copilotkit/lexicalHooks.d.ts +27 -0
- package/lib/tools/adapters/copilotkit/lexicalHooks.js +59 -0
- package/lib/tools/adapters/copilotkit/notebookHooks.d.ts +27 -0
- package/lib/tools/adapters/copilotkit/notebookHooks.js +58 -0
- package/lib/tools/adapters/index.d.ts +1 -0
- package/lib/tools/adapters/index.js +5 -0
- package/lib/tools/index.d.ts +6 -0
- package/lib/tools/index.js +18 -0
- package/lib/types.d.ts +5 -0
- package/lib/types.js +5 -0
- package/package.json +327 -0
- package/style/animation/Animation.module.css +174 -0
- package/style/base.css +204 -0
- package/style/index.css +6 -0
- package/style/showcase-vercel-ai.css +137 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cells": [
|
|
3
|
+
{
|
|
4
|
+
"cell_type": "code",
|
|
5
|
+
"execution_count": 1,
|
|
6
|
+
"metadata": {},
|
|
7
|
+
"outputs": [
|
|
8
|
+
{
|
|
9
|
+
"data": {
|
|
10
|
+
"text/plain": ["2"]
|
|
11
|
+
},
|
|
12
|
+
"execution_count": 1,
|
|
13
|
+
"metadata": {},
|
|
14
|
+
"output_type": "execute_result"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"source": ["1+1"]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"cell_type": "code",
|
|
21
|
+
"execution_count": 1,
|
|
22
|
+
"metadata": {},
|
|
23
|
+
"outputs": [
|
|
24
|
+
{
|
|
25
|
+
"ename": "NameError",
|
|
26
|
+
"evalue": "name 'HTML' is not defined",
|
|
27
|
+
"output_type": "error",
|
|
28
|
+
"traceback": [
|
|
29
|
+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
|
30
|
+
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
|
|
31
|
+
"Cell \u001b[0;32mIn[1], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m display(\u001b[43mHTML\u001b[49m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m\"\u001b[39m));\n",
|
|
32
|
+
"\u001b[0;31mNameError\u001b[0m: name 'HTML' is not defined"
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"source": ["display(HTML(\"\"));"]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"cell_type": "code",
|
|
40
|
+
"execution_count": null,
|
|
41
|
+
"metadata": {},
|
|
42
|
+
"outputs": [],
|
|
43
|
+
"source": []
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"metadata": {},
|
|
47
|
+
"nbformat": 4,
|
|
48
|
+
"nbformat_minor": 4
|
|
49
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cells": [
|
|
3
|
+
{
|
|
4
|
+
"cell_type": "markdown",
|
|
5
|
+
"id": "6ecc7b98-968d-43cd-9fbb-8ceadf863b74",
|
|
6
|
+
"metadata": {},
|
|
7
|
+
"source": ["# Heading 1"]
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"cell_type": "markdown",
|
|
11
|
+
"id": "5099ba4a-88e8-4108-be32-a0ea52a58f79",
|
|
12
|
+
"metadata": {
|
|
13
|
+
"editable": true,
|
|
14
|
+
"slideshow": {
|
|
15
|
+
"slide_type": ""
|
|
16
|
+
},
|
|
17
|
+
"tags": []
|
|
18
|
+
},
|
|
19
|
+
"source": ["LOL"]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"cell_type": "markdown",
|
|
23
|
+
"id": "418b532a-c1eb-4f37-96c2-3465879122de",
|
|
24
|
+
"metadata": {},
|
|
25
|
+
"source": ["**Okay**"]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"cell_type": "markdown",
|
|
29
|
+
"id": "60a3ee36-8ee6-4648-93d7-af587bf3892f",
|
|
30
|
+
"metadata": {},
|
|
31
|
+
"source": ["## Heading 1-1"]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"cell_type": "code",
|
|
35
|
+
"execution_count": 2,
|
|
36
|
+
"id": "113f7bb9-220a-405f-9784-e0de940e0adf",
|
|
37
|
+
"metadata": {},
|
|
38
|
+
"outputs": [
|
|
39
|
+
{
|
|
40
|
+
"name": "stdin",
|
|
41
|
+
"output_type": "stream",
|
|
42
|
+
"text": ["Please input your name: leon\n"]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "stdout",
|
|
46
|
+
"output_type": "stream",
|
|
47
|
+
"text": ["Hello, leon!\n", "finish\n"]
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"source": [
|
|
51
|
+
"name = input(\"Please input your name: \")\n",
|
|
52
|
+
"print(f\"Hello, {name}!\") \n",
|
|
53
|
+
"import time\n",
|
|
54
|
+
"time.sleep(3)\n",
|
|
55
|
+
"print(\"finish\")"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"cell_type": "markdown",
|
|
60
|
+
"id": "dfd17807-2ad3-4d2d-8371-5102d24e0d67",
|
|
61
|
+
"metadata": {},
|
|
62
|
+
"source": ["# Heading 2"]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"cell_type": "markdown",
|
|
66
|
+
"id": "de6a4139-4e4d-49d4-8824-0985baccf704",
|
|
67
|
+
"metadata": {
|
|
68
|
+
"editable": true,
|
|
69
|
+
"slideshow": {
|
|
70
|
+
"slide_type": ""
|
|
71
|
+
},
|
|
72
|
+
"tags": []
|
|
73
|
+
},
|
|
74
|
+
"source": [
|
|
75
|
+
"## Heading 2-1\n",
|
|
76
|
+
"\n",
|
|
77
|
+
"Man! **you know** what I am saying."
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"metadata": {
|
|
82
|
+
"kernelspec": {
|
|
83
|
+
"display_name": "Python 3 (ipykernel)",
|
|
84
|
+
"language": "python",
|
|
85
|
+
"name": "python3"
|
|
86
|
+
},
|
|
87
|
+
"language_info": {
|
|
88
|
+
"codemirror_mode": {
|
|
89
|
+
"name": "ipython",
|
|
90
|
+
"version": 3
|
|
91
|
+
},
|
|
92
|
+
"file_extension": ".py",
|
|
93
|
+
"mimetype": "text/x-python",
|
|
94
|
+
"name": "python",
|
|
95
|
+
"nbconvert_exporter": "python",
|
|
96
|
+
"pygments_lexer": "ipython3",
|
|
97
|
+
"version": "3.10.4"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"nbformat": 4,
|
|
101
|
+
"nbformat_minor": 5
|
|
102
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
export declare const view: {
|
|
2
|
+
version_major: number;
|
|
3
|
+
version_minor: number;
|
|
4
|
+
model_id: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const state: {
|
|
7
|
+
version_major: number;
|
|
8
|
+
version_minor: number;
|
|
9
|
+
state: {
|
|
10
|
+
'8621699ecc804983a612f09b7dfe806b': {
|
|
11
|
+
model_name: string;
|
|
12
|
+
model_module: string;
|
|
13
|
+
model_module_version: string;
|
|
14
|
+
state: {
|
|
15
|
+
_view_module_version: string;
|
|
16
|
+
children: string[];
|
|
17
|
+
_model_module_version: string;
|
|
18
|
+
layout: string;
|
|
19
|
+
_view_count: number;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
'961d612211fe4c64a70f48942d885c14': {
|
|
23
|
+
model_name: string;
|
|
24
|
+
model_module: string;
|
|
25
|
+
model_module_version: string;
|
|
26
|
+
state: {
|
|
27
|
+
_model_module_version: string;
|
|
28
|
+
_view_module_version: string;
|
|
29
|
+
_view_count: number;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
'564e75ddea4c4ea0a32c4bd39ed0ed6d': {
|
|
33
|
+
model_name: string;
|
|
34
|
+
model_module: string;
|
|
35
|
+
model_module_version: string;
|
|
36
|
+
state: {
|
|
37
|
+
_model_module_version: string;
|
|
38
|
+
_view_module_version: string;
|
|
39
|
+
_view_count: number;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
a8b1ae50aada4d929397b907115bfc2c: {
|
|
43
|
+
model_name: string;
|
|
44
|
+
model_module: string;
|
|
45
|
+
model_module_version: string;
|
|
46
|
+
state: {
|
|
47
|
+
style: string;
|
|
48
|
+
_view_module_version: string;
|
|
49
|
+
max: number;
|
|
50
|
+
value: number;
|
|
51
|
+
_model_module_version: string;
|
|
52
|
+
layout: string;
|
|
53
|
+
_view_count: number;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
b63481ca8b7943aa85d097a114a931f5: {
|
|
57
|
+
model_name: string;
|
|
58
|
+
model_module: string;
|
|
59
|
+
model_module_version: string;
|
|
60
|
+
state: {
|
|
61
|
+
_model_module_version: string;
|
|
62
|
+
_view_module_version: string;
|
|
63
|
+
_view_count: number;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
d86e0cb348eb48bf97f14906a9406731: {
|
|
67
|
+
model_name: string;
|
|
68
|
+
model_module: string;
|
|
69
|
+
model_module_version: string;
|
|
70
|
+
state: {
|
|
71
|
+
_model_module_version: string;
|
|
72
|
+
_view_module_version: string;
|
|
73
|
+
_view_count: number;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
'289e54d14b7c4c6d8ac18b4c86ab514c': {
|
|
77
|
+
model_name: string;
|
|
78
|
+
model_module: string;
|
|
79
|
+
model_module_version: string;
|
|
80
|
+
state: {
|
|
81
|
+
style: string;
|
|
82
|
+
_view_module_version: string;
|
|
83
|
+
value: number;
|
|
84
|
+
_model_module_version: string;
|
|
85
|
+
layout: string;
|
|
86
|
+
_view_count: number;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
bb589d8dc365404b94e73a153407128f: {
|
|
90
|
+
model_name: string;
|
|
91
|
+
model_module: string;
|
|
92
|
+
model_module_version: string;
|
|
93
|
+
state: {
|
|
94
|
+
_model_module_version: string;
|
|
95
|
+
_view_module_version: string;
|
|
96
|
+
_view_count: number;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
'19a24d8ea5a248be8db79790290ae2a1': {
|
|
100
|
+
model_name: string;
|
|
101
|
+
model_module: string;
|
|
102
|
+
model_module_version: string;
|
|
103
|
+
state: {
|
|
104
|
+
_model_module_version: string;
|
|
105
|
+
_view_module_version: string;
|
|
106
|
+
_view_count: number;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
'965bbfeaddd74b9baa488c7f6ac13027': {
|
|
110
|
+
model_name: string;
|
|
111
|
+
model_module: string;
|
|
112
|
+
model_module_version: string;
|
|
113
|
+
state: {
|
|
114
|
+
style: string;
|
|
115
|
+
_view_module_version: string;
|
|
116
|
+
icon: string;
|
|
117
|
+
_model_module_version: string;
|
|
118
|
+
layout: string;
|
|
119
|
+
_view_count: number;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
'6edd9d3360cc47c8aceff0ba11edeca9': {
|
|
123
|
+
model_name: string;
|
|
124
|
+
model_module: string;
|
|
125
|
+
model_module_version: string;
|
|
126
|
+
state: {
|
|
127
|
+
_model_module_version: string;
|
|
128
|
+
target: string[];
|
|
129
|
+
source: string[];
|
|
130
|
+
_view_module_version: string;
|
|
131
|
+
_view_name: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
d7d14e74f61f4b3bb5f53a713bcadced: {
|
|
135
|
+
model_name: string;
|
|
136
|
+
model_module: string;
|
|
137
|
+
model_module_version: string;
|
|
138
|
+
state: {
|
|
139
|
+
_model_module_version: string;
|
|
140
|
+
_view_module_version: string;
|
|
141
|
+
_view_count: number;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
};
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
export const view = {
|
|
6
|
+
version_major: 2,
|
|
7
|
+
version_minor: 0,
|
|
8
|
+
model_id: '8621699ecc804983a612f09b7dfe806b',
|
|
9
|
+
};
|
|
10
|
+
export const state = {
|
|
11
|
+
version_major: 2,
|
|
12
|
+
version_minor: 0,
|
|
13
|
+
state: {
|
|
14
|
+
'8621699ecc804983a612f09b7dfe806b': {
|
|
15
|
+
model_name: 'VBoxModel',
|
|
16
|
+
model_module: '@jupyter-widgets/controls',
|
|
17
|
+
model_module_version: '1.0.0',
|
|
18
|
+
state: {
|
|
19
|
+
_view_module_version: '1.0.0',
|
|
20
|
+
children: [
|
|
21
|
+
'IPY_MODEL_a8b1ae50aada4d929397b907115bfc2c',
|
|
22
|
+
'IPY_MODEL_289e54d14b7c4c6d8ac18b4c86ab514c',
|
|
23
|
+
'IPY_MODEL_965bbfeaddd74b9baa488c7f6ac13027',
|
|
24
|
+
],
|
|
25
|
+
_model_module_version: '1.0.0',
|
|
26
|
+
layout: 'IPY_MODEL_d7d14e74f61f4b3bb5f53a713bcadced',
|
|
27
|
+
_view_count: 1,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
'961d612211fe4c64a70f48942d885c14': {
|
|
31
|
+
model_name: 'LayoutModel',
|
|
32
|
+
model_module: '@jupyter-widgets/base',
|
|
33
|
+
model_module_version: '1.0.0',
|
|
34
|
+
state: {
|
|
35
|
+
_model_module_version: '1.0.0',
|
|
36
|
+
_view_module_version: '1.0.0',
|
|
37
|
+
_view_count: 1,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
'564e75ddea4c4ea0a32c4bd39ed0ed6d': {
|
|
41
|
+
model_name: 'SliderStyleModel',
|
|
42
|
+
model_module: '@jupyter-widgets/controls',
|
|
43
|
+
model_module_version: '1.0.0',
|
|
44
|
+
state: {
|
|
45
|
+
_model_module_version: '1.0.0',
|
|
46
|
+
_view_module_version: '1.0.0',
|
|
47
|
+
_view_count: 1,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
a8b1ae50aada4d929397b907115bfc2c: {
|
|
51
|
+
model_name: 'IntSliderModel',
|
|
52
|
+
model_module: '@jupyter-widgets/controls',
|
|
53
|
+
model_module_version: '1.0.0',
|
|
54
|
+
state: {
|
|
55
|
+
style: 'IPY_MODEL_564e75ddea4c4ea0a32c4bd39ed0ed6d',
|
|
56
|
+
_view_module_version: '1.0.0',
|
|
57
|
+
max: 200,
|
|
58
|
+
value: 100,
|
|
59
|
+
_model_module_version: '1.0.0',
|
|
60
|
+
layout: 'IPY_MODEL_961d612211fe4c64a70f48942d885c14',
|
|
61
|
+
_view_count: 1,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
b63481ca8b7943aa85d097a114a931f5: {
|
|
65
|
+
model_name: 'LayoutModel',
|
|
66
|
+
model_module: '@jupyter-widgets/base',
|
|
67
|
+
model_module_version: '1.0.0',
|
|
68
|
+
state: {
|
|
69
|
+
_model_module_version: '1.0.0',
|
|
70
|
+
_view_module_version: '1.0.0',
|
|
71
|
+
_view_count: 1,
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
d86e0cb348eb48bf97f14906a9406731: {
|
|
75
|
+
model_name: 'SliderStyleModel',
|
|
76
|
+
model_module: '@jupyter-widgets/controls',
|
|
77
|
+
model_module_version: '1.0.0',
|
|
78
|
+
state: {
|
|
79
|
+
_model_module_version: '1.0.0',
|
|
80
|
+
_view_module_version: '1.0.0',
|
|
81
|
+
_view_count: 1,
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
'289e54d14b7c4c6d8ac18b4c86ab514c': {
|
|
85
|
+
model_name: 'IntSliderModel',
|
|
86
|
+
model_module: '@jupyter-widgets/controls',
|
|
87
|
+
model_module_version: '1.0.0',
|
|
88
|
+
state: {
|
|
89
|
+
style: 'IPY_MODEL_d86e0cb348eb48bf97f14906a9406731',
|
|
90
|
+
_view_module_version: '1.0.0',
|
|
91
|
+
value: 40,
|
|
92
|
+
_model_module_version: '1.0.0',
|
|
93
|
+
layout: 'IPY_MODEL_b63481ca8b7943aa85d097a114a931f5',
|
|
94
|
+
_view_count: 1,
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
bb589d8dc365404b94e73a153407128f: {
|
|
98
|
+
model_name: 'LayoutModel',
|
|
99
|
+
model_module: '@jupyter-widgets/base',
|
|
100
|
+
model_module_version: '1.0.0',
|
|
101
|
+
state: {
|
|
102
|
+
_model_module_version: '1.0.0',
|
|
103
|
+
_view_module_version: '1.0.0',
|
|
104
|
+
_view_count: 1,
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
'19a24d8ea5a248be8db79790290ae2a1': {
|
|
108
|
+
model_name: 'ButtonStyleModel',
|
|
109
|
+
model_module: '@jupyter-widgets/controls',
|
|
110
|
+
model_module_version: '1.0.0',
|
|
111
|
+
state: {
|
|
112
|
+
_model_module_version: '1.0.0',
|
|
113
|
+
_view_module_version: '1.0.0',
|
|
114
|
+
_view_count: 1,
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
'965bbfeaddd74b9baa488c7f6ac13027': {
|
|
118
|
+
model_name: 'ButtonModel',
|
|
119
|
+
model_module: '@jupyter-widgets/controls',
|
|
120
|
+
model_module_version: '1.0.0',
|
|
121
|
+
state: {
|
|
122
|
+
style: 'IPY_MODEL_19a24d8ea5a248be8db79790290ae2a1',
|
|
123
|
+
_view_module_version: '1.0.0',
|
|
124
|
+
icon: 'legal',
|
|
125
|
+
_model_module_version: '1.0.0',
|
|
126
|
+
layout: 'IPY_MODEL_bb589d8dc365404b94e73a153407128f',
|
|
127
|
+
_view_count: 1,
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
'6edd9d3360cc47c8aceff0ba11edeca9': {
|
|
131
|
+
model_name: 'DirectionalLinkModel',
|
|
132
|
+
model_module: '@jupyter-widgets/controls',
|
|
133
|
+
model_module_version: '1.0.0',
|
|
134
|
+
state: {
|
|
135
|
+
_model_module_version: '1.0.0',
|
|
136
|
+
target: ['IPY_MODEL_289e54d14b7c4c6d8ac18b4c86ab514c', 'max'],
|
|
137
|
+
source: ['IPY_MODEL_a8b1ae50aada4d929397b907115bfc2c', 'value'],
|
|
138
|
+
_view_module_version: '1.0.0',
|
|
139
|
+
_view_name: '',
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
d7d14e74f61f4b3bb5f53a713bcadced: {
|
|
143
|
+
model_name: 'LayoutModel',
|
|
144
|
+
model_module: '@jupyter-widgets/base',
|
|
145
|
+
model_module_version: '1.0.0',
|
|
146
|
+
state: {
|
|
147
|
+
_model_module_version: '1.0.0',
|
|
148
|
+
_view_module_version: '1.0.0',
|
|
149
|
+
_view_count: 1,
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cells": [
|
|
3
|
+
{
|
|
4
|
+
"cell_type": "code",
|
|
5
|
+
"execution_count": 1,
|
|
6
|
+
"metadata": {},
|
|
7
|
+
"outputs": [
|
|
8
|
+
{
|
|
9
|
+
"data": {
|
|
10
|
+
"text/plain": []
|
|
11
|
+
},
|
|
12
|
+
"execution_count": 1,
|
|
13
|
+
"metadata": {},
|
|
14
|
+
"output_type": "execute_result"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"source": [
|
|
18
|
+
"import pygwalker as pyg\n",
|
|
19
|
+
"import pandas as pd\n",
|
|
20
|
+
"\n",
|
|
21
|
+
"df = pd.read_csv(\"https://kanaries-app.s3.ap-northeast-1.amazonaws.com/public-datasets/bike_sharing_dc.csv\")\n",
|
|
22
|
+
"\n",
|
|
23
|
+
"walker = pyg.walk(df)"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"cell_type": "code",
|
|
28
|
+
"execution_count": null,
|
|
29
|
+
"metadata": {},
|
|
30
|
+
"outputs": [],
|
|
31
|
+
"source": []
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"metadata": {
|
|
35
|
+
"kernelspec": {
|
|
36
|
+
"display_name": "Python (ipykernel)",
|
|
37
|
+
"language": "python",
|
|
38
|
+
"name": "python"
|
|
39
|
+
},
|
|
40
|
+
"language_info": {
|
|
41
|
+
"codemirror_mode": {
|
|
42
|
+
"name": "ipython",
|
|
43
|
+
"version": 3
|
|
44
|
+
},
|
|
45
|
+
"file_extension": ".py",
|
|
46
|
+
"mimetype": "text/x-python",
|
|
47
|
+
"name": "python",
|
|
48
|
+
"nbconvert_exporter": "python",
|
|
49
|
+
"pygments_lexer": "ipython3",
|
|
50
|
+
"version": "3.10.4"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"nbformat": 4,
|
|
54
|
+
"nbformat_minor": 4
|
|
55
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import './showcase.css';
|
|
2
|
+
import '../../../style/base.css';
|
|
3
|
+
import '../../../style/showcase-vercel-ai.css';
|
|
4
|
+
/**
|
|
5
|
+
* Vercel AI Elements Showcase
|
|
6
|
+
*
|
|
7
|
+
* A comprehensive showcase of all available Vercel AI Elements components.
|
|
8
|
+
* This page displays static examples of each component to demonstrate their
|
|
9
|
+
* visual appearance and basic functionality.
|
|
10
|
+
*/
|
|
11
|
+
export declare const VercelAiElementsShowcase: React.FC;
|
|
12
|
+
export default VercelAiElementsShowcase;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
4
|
+
* Distributed under the terms of the Modified BSD License.
|
|
5
|
+
*/
|
|
6
|
+
import { useState } from 'react';
|
|
7
|
+
import { MessageShowcase } from './components/MessageShowcase';
|
|
8
|
+
import { LoaderShowcase } from './components/LoaderShowcase';
|
|
9
|
+
import { CodeBlockShowcase } from './components/CodeBlockShowcase';
|
|
10
|
+
import { SuggestionShowcase } from './components/SuggestionShowcase';
|
|
11
|
+
import { ShimmerShowcase } from './components/ShimmerShowcase';
|
|
12
|
+
import { ArtifactShowcase } from './components/ArtifactShowcase';
|
|
13
|
+
import { SourcesShowcase } from './components/SourcesShowcase';
|
|
14
|
+
import { PromptInputShowcase } from './components/PromptInputShowcase';
|
|
15
|
+
import { ConversationShowcase } from './components/ConversationShowcase';
|
|
16
|
+
import { ModelSelectorShowcase } from './components/ModelSelectorShowcase';
|
|
17
|
+
import { ReasoningShowcase } from './components/ReasoningShowcase';
|
|
18
|
+
import { ToolShowcase } from './components/ToolShowcase';
|
|
19
|
+
import './showcase.css';
|
|
20
|
+
import '../../../style/base.css';
|
|
21
|
+
import '../../../style/showcase-vercel-ai.css';
|
|
22
|
+
/**
|
|
23
|
+
* Vercel AI Elements Showcase
|
|
24
|
+
*
|
|
25
|
+
* A comprehensive showcase of all available Vercel AI Elements components.
|
|
26
|
+
* This page displays static examples of each component to demonstrate their
|
|
27
|
+
* visual appearance and basic functionality.
|
|
28
|
+
*/
|
|
29
|
+
export const VercelAiElementsShowcase = () => {
|
|
30
|
+
const [activeTab, setActiveTab] = useState('message');
|
|
31
|
+
const components = [
|
|
32
|
+
{ id: 'message', label: 'Message', component: _jsx(MessageShowcase, {}) },
|
|
33
|
+
{
|
|
34
|
+
id: 'conversation',
|
|
35
|
+
label: 'Conversation',
|
|
36
|
+
component: _jsx(ConversationShowcase, {}),
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: 'prompt-input',
|
|
40
|
+
label: 'Prompt Input',
|
|
41
|
+
component: _jsx(PromptInputShowcase, {}),
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: 'model-selector',
|
|
45
|
+
label: 'Model Selector',
|
|
46
|
+
component: _jsx(ModelSelectorShowcase, {}),
|
|
47
|
+
},
|
|
48
|
+
{ id: 'artifact', label: 'Artifact', component: _jsx(ArtifactShowcase, {}) },
|
|
49
|
+
{ id: 'code-block', label: 'Code Block', component: _jsx(CodeBlockShowcase, {}) },
|
|
50
|
+
{
|
|
51
|
+
id: 'suggestion',
|
|
52
|
+
label: 'Suggestions',
|
|
53
|
+
component: _jsx(SuggestionShowcase, {}),
|
|
54
|
+
},
|
|
55
|
+
{ id: 'sources', label: 'Sources', component: _jsx(SourcesShowcase, {}) },
|
|
56
|
+
{ id: 'reasoning', label: 'Reasoning', component: _jsx(ReasoningShowcase, {}) },
|
|
57
|
+
{ id: 'tool', label: 'Tool', component: _jsx(ToolShowcase, {}) },
|
|
58
|
+
{ id: 'loader', label: 'Loader', component: _jsx(LoaderShowcase, {}) },
|
|
59
|
+
{ id: 'shimmer', label: 'Shimmer', component: _jsx(ShimmerShowcase, {}) },
|
|
60
|
+
];
|
|
61
|
+
return (_jsxs("div", { className: "min-h-screen bg-background", children: [_jsx("header", { className: "border-b bg-card", children: _jsxs("div", { className: "container mx-auto py-6 px-4 md:px-6 lg:px-8", children: [_jsx("h1", { className: "text-3xl font-bold text-foreground", children: "Vercel AI Elements Showcase" }), _jsx("p", { className: "text-muted-foreground mt-2", children: "A comprehensive collection of all available Vercel AI Elements components" })] }) }), _jsx("main", { className: "container mx-auto py-8 px-4 md:px-6 lg:px-8", children: _jsxs("div", { className: "w-full", children: [_jsx("div", { className: "border-b border-border", children: _jsx("nav", { className: "flex gap-1 overflow-x-auto", "aria-label": "Component tabs", children: components.map(component => (_jsx("button", { onClick: () => setActiveTab(component.id), className: `
|
|
62
|
+
px-4 py-2 text-sm font-medium whitespace-nowrap
|
|
63
|
+
border-b-2 transition-colors
|
|
64
|
+
${activeTab === component.id
|
|
65
|
+
? 'border-primary text-primary'
|
|
66
|
+
: 'border-transparent text-muted-foreground hover:text-foreground hover:border-border'}
|
|
67
|
+
`, "aria-current": activeTab === component.id ? 'page' : undefined, children: component.label }, component.id))) }) }), _jsx("div", { className: "mt-6", children: components.map(component => (_jsx("div", { className: activeTab === component.id ? 'block' : 'hidden', role: "tabpanel", children: _jsxs("div", { className: "border rounded-lg bg-card", children: [_jsxs("div", { className: "border-b px-6 py-4", children: [_jsx("h2", { className: "text-2xl font-semibold text-foreground", children: component.label }), _jsxs("p", { className: "text-muted-foreground mt-1", children: ["Example implementations of the ", component.label, " component"] })] }), _jsx("div", { className: "p-6", children: _jsx("div", { className: "max-h-[calc(100vh-350px)] overflow-y-auto", children: component.component }) })] }) }, component.id))) })] }) })] }));
|
|
68
|
+
};
|
|
69
|
+
export default VercelAiElementsShowcase;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ArtifactShowcase: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
4
|
+
* Distributed under the terms of the Modified BSD License.
|
|
5
|
+
*/
|
|
6
|
+
import { Artifact, ArtifactAction, ArtifactActions, ArtifactContent, ArtifactDescription, ArtifactHeader, ArtifactTitle, } from '@/components/vercel-ai-elements/artifact';
|
|
7
|
+
import { CodeBlock } from '@/components/vercel-ai-elements/code-block';
|
|
8
|
+
import { CopyIcon, DownloadIcon, PlayIcon, RefreshCwIcon, ShareIcon, } from 'lucide-react';
|
|
9
|
+
const pythonCode = `# Dijkstra's Algorithm implementation
|
|
10
|
+
import heapq
|
|
11
|
+
|
|
12
|
+
def dijkstra(graph, start):
|
|
13
|
+
distances = {node: float('inf') for node in graph}
|
|
14
|
+
distances[start] = 0
|
|
15
|
+
heap = [(0, start)]
|
|
16
|
+
visited = set()
|
|
17
|
+
|
|
18
|
+
while heap:
|
|
19
|
+
current_distance, current_node = heapq.heappop(heap)
|
|
20
|
+
if current_node in visited:
|
|
21
|
+
continue
|
|
22
|
+
visited.add(current_node)
|
|
23
|
+
|
|
24
|
+
for neighbor, weight in graph[current_node].items():
|
|
25
|
+
distance = current_distance + weight
|
|
26
|
+
if distance < distances[neighbor]:
|
|
27
|
+
distances[neighbor] = distance
|
|
28
|
+
heapq.heappush(heap, (distance, neighbor))
|
|
29
|
+
|
|
30
|
+
return distances
|
|
31
|
+
|
|
32
|
+
# Example graph
|
|
33
|
+
graph = {
|
|
34
|
+
'A': {'B': 1, 'C': 4},
|
|
35
|
+
'B': {'A': 1, 'C': 2, 'D': 5},
|
|
36
|
+
'C': {'A': 4, 'B': 2, 'D': 1},
|
|
37
|
+
'D': {'B': 5, 'C': 1}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
print(dijkstra(graph, 'A'))`;
|
|
41
|
+
const reactCode = `import React, { useState } from 'react';
|
|
42
|
+
|
|
43
|
+
function TodoApp() {
|
|
44
|
+
const [todos, setTodos] = useState([]);
|
|
45
|
+
const [input, setInput] = useState('');
|
|
46
|
+
|
|
47
|
+
const addTodo = () => {
|
|
48
|
+
if (input.trim()) {
|
|
49
|
+
setTodos([...todos, { id: Date.now(), text: input, done: false }]);
|
|
50
|
+
setInput('');
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const toggleTodo = (id) => {
|
|
55
|
+
setTodos(todos.map(todo =>
|
|
56
|
+
todo.id === id ? { ...todo, done: !todo.done } : todo
|
|
57
|
+
));
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<div>
|
|
62
|
+
<h1>Todo List</h1>
|
|
63
|
+
<input
|
|
64
|
+
value={input}
|
|
65
|
+
onChange={(e) => setInput(e.target.value)}
|
|
66
|
+
onKeyPress={(e) => e.key === 'Enter' && addTodo()}
|
|
67
|
+
/>
|
|
68
|
+
<button onClick={addTodo}>Add</button>
|
|
69
|
+
<ul>
|
|
70
|
+
{todos.map(todo => (
|
|
71
|
+
<li
|
|
72
|
+
key={todo.id}
|
|
73
|
+
onClick={() => toggleTodo(todo.id)}
|
|
74
|
+
style={{ textDecoration: todo.done ? 'line-through' : 'none' }}
|
|
75
|
+
>
|
|
76
|
+
{todo.text}
|
|
77
|
+
</li>
|
|
78
|
+
))}
|
|
79
|
+
</ul>
|
|
80
|
+
</div>
|
|
81
|
+
);
|
|
82
|
+
}`;
|
|
83
|
+
export const ArtifactShowcase = () => {
|
|
84
|
+
return (_jsxs("div", { className: "space-y-8", children: [_jsxs("div", { children: [_jsx("h3", { className: "text-lg font-semibold mb-4", children: "Code Artifact" }), _jsxs(Artifact, { children: [_jsxs(ArtifactHeader, { children: [_jsxs("div", { children: [_jsx(ArtifactTitle, { children: "Dijkstra's Algorithm Implementation" }), _jsx(ArtifactDescription, { children: "Updated 1 minute ago" })] }), _jsx("div", { className: "flex items-center gap-2", children: _jsxs(ArtifactActions, { children: [_jsx(ArtifactAction, { icon: PlayIcon, label: "Run", onClick: () => console.log('Run'), tooltip: "Run code" }), _jsx(ArtifactAction, { icon: CopyIcon, label: "Copy", onClick: () => console.log('Copy'), tooltip: "Copy to clipboard" }), _jsx(ArtifactAction, { icon: RefreshCwIcon, label: "Regenerate", onClick: () => console.log('Regenerate'), tooltip: "Regenerate content" }), _jsx(ArtifactAction, { icon: DownloadIcon, label: "Download", onClick: () => console.log('Download'), tooltip: "Download file" }), _jsx(ArtifactAction, { icon: ShareIcon, label: "Share", onClick: () => console.log('Share'), tooltip: "Share artifact" })] }) })] }), _jsx(ArtifactContent, { className: "p-0", children: _jsx(CodeBlock, { className: "border-none", code: pythonCode, language: "python", showLineNumbers: true }) })] })] }), _jsxs("div", { children: [_jsx("h3", { className: "text-lg font-semibold mb-4", children: "React Component Artifact" }), _jsxs(Artifact, { children: [_jsxs(ArtifactHeader, { children: [_jsxs("div", { children: [_jsx(ArtifactTitle, { children: "Todo App Component" }), _jsx(ArtifactDescription, { children: "React component with hooks" })] }), _jsx("div", { className: "flex items-center gap-2", children: _jsxs(ArtifactActions, { children: [_jsx(ArtifactAction, { icon: CopyIcon, label: "Copy", onClick: () => console.log('Copy'), tooltip: "Copy to clipboard" }), _jsx(ArtifactAction, { icon: DownloadIcon, label: "Download", onClick: () => console.log('Download'), tooltip: "Download file" })] }) })] }), _jsx(ArtifactContent, { className: "p-0", children: _jsx(CodeBlock, { className: "border-none", code: reactCode, language: "tsx", showLineNumbers: true }) })] })] }), _jsxs("div", { children: [_jsx("h3", { className: "text-lg font-semibold mb-4", children: "Document Artifact" }), _jsxs(Artifact, { children: [_jsxs(ArtifactHeader, { children: [_jsxs("div", { children: [_jsx(ArtifactTitle, { children: "Project Documentation" }), _jsx(ArtifactDescription, { children: "Generated documentation" })] }), _jsx("div", { className: "flex items-center gap-2", children: _jsxs(ArtifactActions, { children: [_jsx(ArtifactAction, { icon: CopyIcon, label: "Copy", onClick: () => console.log('Copy'), tooltip: "Copy to clipboard" }), _jsx(ArtifactAction, { icon: ShareIcon, label: "Share", onClick: () => console.log('Share'), tooltip: "Share artifact" })] }) })] }), _jsx(ArtifactContent, { children: _jsxs("div", { className: "prose prose-sm max-w-none", children: [_jsx("h1", { children: "Getting Started" }), _jsx("p", { children: "This guide will help you get started with the project." }), _jsx("h2", { children: "Installation" }), _jsx("p", { children: "Install the dependencies using npm:" }), _jsx("pre", { children: _jsx("code", { children: "npm install" }) }), _jsx("h2", { children: "Usage" }), _jsx("p", { children: "Run the development server:" }), _jsx("pre", { children: _jsx("code", { children: "npm run dev" }) })] }) })] })] })] }));
|
|
85
|
+
};
|