@datalayer/agent-runtimes 0.0.8 → 0.0.10
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/README.md +2 -1
- package/lib/{examples/components → components}/AgentConfiguration.d.ts +27 -12
- package/lib/{examples/components → components}/AgentConfiguration.js +170 -22
- package/lib/{examples/components → components}/FooterMetrics.d.ts +1 -2
- package/lib/{examples/components → components}/Header.d.ts +1 -6
- package/lib/{examples/components → components}/Header.js +5 -39
- package/lib/{examples/components → components}/HeaderControls.d.ts +1 -2
- package/lib/{examples/components → components}/HeaderControls.js +1 -1
- package/lib/{examples/components → components}/LexicalEditor.d.ts +2 -3
- package/lib/{examples/components → components}/LexicalEditor.js +2 -2
- package/lib/components/MainContent.d.ts +34 -0
- package/lib/{examples/components → components}/MainContent.js +18 -9
- package/lib/components/McpServerManager.d.ts +30 -0
- package/lib/components/McpServerManager.js +331 -0
- package/lib/{examples/components → components}/MockFileBrowser.d.ts +1 -2
- package/lib/{examples/components → components}/SessionTabs.d.ts +2 -3
- package/lib/{examples/components → components}/TimeTravel.d.ts +1 -2
- package/lib/components/chat/components/AgentDetails.d.ts +3 -1
- package/lib/components/chat/components/AgentDetails.js +323 -31
- package/lib/components/chat/components/Chat.d.ts +37 -3
- package/lib/components/chat/components/Chat.js +29 -10
- package/lib/components/chat/components/ChatFloating.d.ts +27 -2
- package/lib/components/chat/components/ChatFloating.js +17 -10
- package/lib/components/chat/components/ChatPopupStandalone.js +1 -1
- package/lib/components/chat/components/ChatSidebar.d.ts +1 -1
- package/lib/components/chat/components/ChatStandalone.d.ts +1 -1
- package/lib/components/chat/components/ChatStandalone.js +1 -1
- package/lib/components/chat/components/ContextDistribution.d.ts +70 -6
- package/lib/components/chat/components/ContextDistribution.js +11 -4
- package/lib/components/chat/components/ContextInspector.d.ts +81 -0
- package/lib/components/chat/components/ContextInspector.js +261 -0
- package/lib/components/chat/components/ContextPanel.d.ts +112 -0
- package/lib/components/chat/components/ContextPanel.js +373 -0
- package/lib/components/chat/components/base/ChatBase.d.ts +74 -19
- package/lib/components/chat/components/base/ChatBase.js +296 -37
- package/lib/components/chat/components/index.d.ts +3 -1
- package/lib/components/chat/components/index.js +2 -0
- package/lib/components/chat/extensions/ExtensionRegistry.d.ts +1 -1
- package/lib/components/chat/extensions/index.d.ts +1 -0
- package/lib/components/chat/index.d.ts +3 -3
- package/lib/components/chat/protocols/AGUIAdapter.js +24 -4
- package/lib/components/chat/protocols/VercelAIAdapter.js +35 -1
- package/lib/components/chat/store/chatStore.d.ts +2 -3
- package/lib/components/chat/store/conversationStore.d.ts +83 -0
- package/lib/components/chat/store/conversationStore.js +174 -0
- package/lib/components/chat/store/index.d.ts +2 -1
- package/lib/components/chat/store/index.js +1 -0
- package/lib/components/chat/types/inference.d.ts +17 -0
- package/lib/components/chat/types/protocol.d.ts +10 -0
- package/lib/components/index.d.ts +23 -0
- package/lib/components/index.js +11 -0
- package/lib/config/agents.d.ts +33 -0
- package/lib/config/agents.js +424 -0
- package/lib/config/index.d.ts +4 -0
- package/lib/config/index.js +8 -0
- package/lib/config/mcpServers.d.ts +18 -0
- package/lib/config/mcpServers.js +129 -0
- package/lib/config/skills.d.ts +25 -0
- package/lib/config/skills.js +54 -0
- package/lib/{lib → config}/utils.d.ts +1 -1
- package/lib/{lib → config}/utils.js +2 -2
- package/lib/examples/AgentRuntimeLexical2Example.d.ts +1 -0
- package/lib/examples/AgentRuntimeLexical2Example.js +3 -2
- package/lib/examples/AgentRuntimeLexicalExample.d.ts +1 -0
- package/lib/examples/AgentRuntimeLexicalExample.js +5 -3
- package/lib/examples/AgentRuntimeLexicalSidebarExample.d.ts +1 -0
- package/lib/examples/AgentRuntimeLexicalSidebarExample.js +3 -3
- package/lib/examples/AgentRuntimeNotebookExample.js +1 -1
- package/lib/examples/AgentSpaceFormExample.d.ts +2 -2
- package/lib/examples/AgentSpaceFormExample.js +167 -29
- package/lib/examples/CopilotKitLexicalExample.d.ts +1 -0
- package/lib/examples/CopilotKitLexicalExample.js +3 -2
- package/lib/examples/index.d.ts +1 -0
- package/lib/examples/stores/notebooks/NotebookExample2.ipynb.json +43 -43
- package/lib/hooks/useAGUI.d.ts +1 -1
- package/lib/hooks/useAGUI.js +1 -1
- package/lib/identity/types.d.ts +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +1 -0
- package/lib/runtime/index.d.ts +3 -0
- package/lib/runtime/runtimeStore.d.ts +3 -4
- package/lib/runtime/useAgentConnection.d.ts +2 -3
- package/lib/runtime/useAgentRuntime.d.ts +2 -3
- package/lib/stories/Cell.stories.js +1 -1
- package/lib/tools/adapters/agent-runtimes/notebookHooks.js +1 -0
- package/lib/tools/adapters/copilotkit/notebookHooks.js +1 -0
- package/lib/types.d.ts +150 -0
- package/package.json +4 -5
- package/scripts/apply-patches.sh +32 -0
- package/scripts/codegen/generate_agents.py +452 -0
- package/scripts/codegen/generate_mcp_servers.py +424 -0
- package/scripts/codegen/generate_skills.py +321 -0
- package/scripts/download-ai-elements.py +35 -20
- package/scripts/sync-jupyter.sh +6 -0
- package/lib/components/ui/accordion.d.ts +0 -7
- package/lib/components/ui/accordion.js +0 -22
- package/lib/components/ui/alert-dialog.d.ts +0 -14
- package/lib/components/ui/alert-dialog.js +0 -43
- package/lib/components/ui/alert.d.ts +0 -9
- package/lib/components/ui/alert.js +0 -24
- package/lib/components/ui/aspect-ratio.d.ts +0 -3
- package/lib/components/ui/aspect-ratio.js +0 -11
- package/lib/components/ui/avatar.d.ts +0 -6
- package/lib/components/ui/avatar.js +0 -18
- package/lib/components/ui/badge.d.ts +0 -9
- package/lib/components/ui/badge.js +0 -22
- package/lib/components/ui/breadcrumb.d.ts +0 -11
- package/lib/components/ui/breadcrumb.js +0 -27
- package/lib/components/ui/button-group.d.ts +0 -11
- package/lib/components/ui/button-group.js +0 -31
- package/lib/components/ui/button.d.ts +0 -13
- package/lib/components/ui/button.js +0 -39
- package/lib/components/ui/calendar.d.ts +0 -8
- package/lib/components/ui/calendar.js +0 -80
- package/lib/components/ui/card.d.ts +0 -9
- package/lib/components/ui/card.js +0 -24
- package/lib/components/ui/carousel.d.ts +0 -19
- package/lib/components/ui/carousel.js +0 -95
- package/lib/components/ui/chart.d.ts +0 -53
- package/lib/components/ui/chart.js +0 -136
- package/lib/components/ui/checkbox.d.ts +0 -4
- package/lib/components/ui/checkbox.js +0 -13
- package/lib/components/ui/collapsible.d.ts +0 -5
- package/lib/components/ui/collapsible.js +0 -17
- package/lib/components/ui/command.d.ts +0 -18
- package/lib/components/ui/command.js +0 -38
- package/lib/components/ui/context-menu.d.ts +0 -25
- package/lib/components/ui/context-menu.js +0 -55
- package/lib/components/ui/dialog.d.ts +0 -15
- package/lib/components/ui/dialog.js +0 -40
- package/lib/components/ui/drawer.d.ts +0 -13
- package/lib/components/ui/drawer.js +0 -39
- package/lib/components/ui/dropdown-menu.d.ts +0 -25
- package/lib/components/ui/dropdown-menu.js +0 -55
- package/lib/components/ui/empty.d.ts +0 -11
- package/lib/components/ui/empty.js +0 -37
- package/lib/components/ui/field.d.ts +0 -24
- package/lib/components/ui/field.js +0 -80
- package/lib/components/ui/form.d.ts +0 -24
- package/lib/components/ui/form.js +0 -63
- package/lib/components/ui/hover-card.d.ts +0 -6
- package/lib/components/ui/hover-card.js +0 -18
- package/lib/components/ui/input-group.d.ts +0 -19
- package/lib/components/ui/input-group.js +0 -69
- package/lib/components/ui/input-otp.d.ts +0 -11
- package/lib/components/ui/input-otp.js +0 -25
- package/lib/components/ui/input.d.ts +0 -3
- package/lib/components/ui/input.js +0 -6
- package/lib/components/ui/item.d.ts +0 -23
- package/lib/components/ui/item.js +0 -66
- package/lib/components/ui/kbd.d.ts +0 -3
- package/lib/components/ui/kbd.js +0 -13
- package/lib/components/ui/label.d.ts +0 -4
- package/lib/components/ui/label.js +0 -12
- package/lib/components/ui/menubar.d.ts +0 -26
- package/lib/components/ui/menubar.js +0 -58
- package/lib/components/ui/navigation-menu.d.ts +0 -14
- package/lib/components/ui/navigation-menu.js +0 -31
- package/lib/components/ui/pagination.d.ts +0 -13
- package/lib/components/ui/pagination.js +0 -29
- package/lib/components/ui/popover.d.ts +0 -7
- package/lib/components/ui/popover.js +0 -21
- package/lib/components/ui/progress.d.ts +0 -4
- package/lib/components/ui/progress.js +0 -12
- package/lib/components/ui/radio-group.d.ts +0 -5
- package/lib/components/ui/radio-group.js +0 -16
- package/lib/components/ui/resizable.d.ts +0 -8
- package/lib/components/ui/resizable.js +0 -19
- package/lib/components/ui/scroll-area.d.ts +0 -5
- package/lib/components/ui/scroll-area.js +0 -17
- package/lib/components/ui/select.d.ts +0 -15
- package/lib/components/ui/select.js +0 -42
- package/lib/components/ui/separator.d.ts +0 -4
- package/lib/components/ui/separator.js +0 -12
- package/lib/components/ui/sheet.d.ts +0 -13
- package/lib/components/ui/sheet.js +0 -44
- package/lib/components/ui/sidebar.d.ts +0 -69
- package/lib/components/ui/sidebar.js +0 -216
- package/lib/components/ui/skeleton.d.ts +0 -2
- package/lib/components/ui/skeleton.js +0 -10
- package/lib/components/ui/slider.d.ts +0 -4
- package/lib/components/ui/slider.js +0 -18
- package/lib/components/ui/sonner.d.ts +0 -3
- package/lib/components/ui/sonner.js +0 -25
- package/lib/components/ui/spinner.d.ts +0 -2
- package/lib/components/ui/spinner.js +0 -11
- package/lib/components/ui/switch.d.ts +0 -4
- package/lib/components/ui/switch.js +0 -12
- package/lib/components/ui/table.d.ts +0 -10
- package/lib/components/ui/table.js +0 -32
- package/lib/components/ui/tabs.d.ts +0 -7
- package/lib/components/ui/tabs.js +0 -21
- package/lib/components/ui/textarea.d.ts +0 -3
- package/lib/components/ui/textarea.js +0 -6
- package/lib/components/ui/toast.d.ts +0 -15
- package/lib/components/ui/toast.js +0 -38
- package/lib/components/ui/toaster.d.ts +0 -1
- package/lib/components/ui/toaster.js +0 -14
- package/lib/components/ui/toggle-group.d.ts +0 -9
- package/lib/components/ui/toggle-group.js +0 -26
- package/lib/components/ui/toggle.d.ts +0 -9
- package/lib/components/ui/toggle.js +0 -30
- package/lib/components/ui/tooltip.d.ts +0 -7
- package/lib/components/ui/tooltip.js +0 -21
- package/lib/components/vercel-ai-elements/artifact.d.ts +0 -23
- package/lib/components/vercel-ai-elements/artifact.js +0 -24
- package/lib/components/vercel-ai-elements/code-block.d.ts +0 -17
- package/lib/components/vercel-ai-elements/code-block.js +0 -94
- package/lib/components/vercel-ai-elements/conversation.d.ts +0 -15
- package/lib/components/vercel-ai-elements/conversation.js +0 -21
- package/lib/components/vercel-ai-elements/loader.d.ts +0 -5
- package/lib/components/vercel-ai-elements/loader.js +0 -8
- package/lib/components/vercel-ai-elements/message.d.ts +0 -46
- package/lib/components/vercel-ai-elements/message.js +0 -109
- package/lib/components/vercel-ai-elements/model-selector.d.ts +0 -35
- package/lib/components/vercel-ai-elements/model-selector.js +0 -22
- package/lib/components/vercel-ai-elements/prompt-input.d.ts +0 -195
- package/lib/components/vercel-ai-elements/prompt-input.js +0 -589
- package/lib/components/vercel-ai-elements/reasoning.d.ts +0 -26
- package/lib/components/vercel-ai-elements/reasoning.js +0 -80
- package/lib/components/vercel-ai-elements/shimmer.d.ts +0 -9
- package/lib/components/vercel-ai-elements/shimmer.js +0 -22
- package/lib/components/vercel-ai-elements/sources.d.ts +0 -12
- package/lib/components/vercel-ai-elements/sources.js +0 -13
- package/lib/components/vercel-ai-elements/suggestion.d.ts +0 -10
- package/lib/components/vercel-ai-elements/suggestion.js +0 -16
- package/lib/components/vercel-ai-elements/tool.d.ts +0 -23
- package/lib/components/vercel-ai-elements/tool.js +0 -52
- package/lib/examples/components/MainContent.d.ts +0 -19
- package/lib/examples/components/index.d.ts +0 -10
- package/lib/examples/components/index.js +0 -13
- package/lib/examples/vercel-ai-elements/VercelAiElementsShowcase.d.ts +0 -12
- package/lib/examples/vercel-ai-elements/VercelAiElementsShowcase.js +0 -69
- package/lib/examples/vercel-ai-elements/components/ArtifactShowcase.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/components/ArtifactShowcase.js +0 -85
- package/lib/examples/vercel-ai-elements/components/CodeBlockShowcase.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/components/CodeBlockShowcase.js +0 -62
- package/lib/examples/vercel-ai-elements/components/ConversationShowcase.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/components/ConversationShowcase.js +0 -51
- package/lib/examples/vercel-ai-elements/components/LoaderShowcase.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/components/LoaderShowcase.js +0 -9
- package/lib/examples/vercel-ai-elements/components/MessageShowcase.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/components/MessageShowcase.js +0 -56
- package/lib/examples/vercel-ai-elements/components/ModelSelectorShowcase.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/components/ModelSelectorShowcase.js +0 -50
- package/lib/examples/vercel-ai-elements/components/PromptInputShowcase.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/components/PromptInputShowcase.js +0 -16
- package/lib/examples/vercel-ai-elements/components/ReasoningShowcase.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/components/ReasoningShowcase.js +0 -72
- package/lib/examples/vercel-ai-elements/components/ShimmerShowcase.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/components/ShimmerShowcase.js +0 -9
- package/lib/examples/vercel-ai-elements/components/SourcesShowcase.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/components/SourcesShowcase.js +0 -43
- package/lib/examples/vercel-ai-elements/components/SuggestionShowcase.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/components/SuggestionShowcase.js +0 -31
- package/lib/examples/vercel-ai-elements/components/ToolShowcase.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/components/ToolShowcase.js +0 -54
- package/lib/examples/vercel-ai-elements/index.d.ts +0 -13
- package/lib/examples/vercel-ai-elements/index.js +0 -17
- package/lib/examples/vercel-ai-elements/main.d.ts +0 -1
- package/lib/examples/vercel-ai-elements/main.js +0 -9
- package/lib/examples/vercel-ai-elements/showcase.css +0 -128
- package/lib/hooks/useToast.d.ts +0 -44
- package/lib/hooks/useToast.js +0 -128
- package/patches/@datalayer+jupyter-lexical+1.0.8.patch +0 -11628
- package/patches/@datalayer+jupyter-react+2.0.2.patch +0 -5338
- package/style/showcase-vercel-ai.css +0 -137
- /package/lib/{examples/components → components}/FooterMetrics.js +0 -0
- /package/lib/{examples/components → components}/MockFileBrowser.js +0 -0
- /package/lib/{examples/components → components}/SessionTabs.js +0 -0
- /package/lib/{examples/components → components}/TimeTravel.js +0 -0
- /package/lib/{models → types}/AIAgent.d.ts +0 -0
- /package/lib/{models → types}/AIAgent.js +0 -0
- /package/lib/{models → types}/index.d.ts +0 -0
- /package/lib/{models → types}/index.js +0 -0
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
declare function Table({ className, ...props }: React.ComponentProps<'table'>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
declare function TableHeader({ className, ...props }: React.ComponentProps<'thead'>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
declare function TableBody({ className, ...props }: React.ComponentProps<'tbody'>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
declare function TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
declare function TableRow({ className, ...props }: React.ComponentProps<'tr'>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
declare function TableHead({ className, ...props }: React.ComponentProps<'th'>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
declare function TableCell({ className, ...props }: React.ComponentProps<'td'>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
declare function TableCaption({ className, ...props }: React.ComponentProps<'caption'>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
|
-
* Distributed under the terms of the Modified BSD License.
|
|
4
|
-
*/
|
|
5
|
-
'use client';
|
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
import { cn } from '@/lib/utils';
|
|
8
|
-
function Table({ className, ...props }) {
|
|
9
|
-
return (_jsx("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: _jsx("table", { "data-slot": "table", className: cn('w-full caption-bottom text-sm', className), ...props }) }));
|
|
10
|
-
}
|
|
11
|
-
function TableHeader({ className, ...props }) {
|
|
12
|
-
return (_jsx("thead", { "data-slot": "table-header", className: cn('[&_tr]:border-b', className), ...props }));
|
|
13
|
-
}
|
|
14
|
-
function TableBody({ className, ...props }) {
|
|
15
|
-
return (_jsx("tbody", { "data-slot": "table-body", className: cn('[&_tr:last-child]:border-0', className), ...props }));
|
|
16
|
-
}
|
|
17
|
-
function TableFooter({ className, ...props }) {
|
|
18
|
-
return (_jsx("tfoot", { "data-slot": "table-footer", className: cn('bg-muted/50 border-t font-medium [&>tr]:last:border-b-0', className), ...props }));
|
|
19
|
-
}
|
|
20
|
-
function TableRow({ className, ...props }) {
|
|
21
|
-
return (_jsx("tr", { "data-slot": "table-row", className: cn('hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors', className), ...props }));
|
|
22
|
-
}
|
|
23
|
-
function TableHead({ className, ...props }) {
|
|
24
|
-
return (_jsx("th", { "data-slot": "table-head", className: cn('text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]', className), ...props }));
|
|
25
|
-
}
|
|
26
|
-
function TableCell({ className, ...props }) {
|
|
27
|
-
return (_jsx("td", { "data-slot": "table-cell", className: cn('p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]', className), ...props }));
|
|
28
|
-
}
|
|
29
|
-
function TableCaption({ className, ...props }) {
|
|
30
|
-
return (_jsx("caption", { "data-slot": "table-caption", className: cn('text-muted-foreground mt-4 text-sm', className), ...props }));
|
|
31
|
-
}
|
|
32
|
-
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
3
|
-
declare function Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
declare function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
declare function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
|
-
* Distributed under the terms of the Modified BSD License.
|
|
4
|
-
*/
|
|
5
|
-
'use client';
|
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
8
|
-
import { cn } from '@/lib/utils';
|
|
9
|
-
function Tabs({ className, ...props }) {
|
|
10
|
-
return (_jsx(TabsPrimitive.Root, { "data-slot": "tabs", className: cn('flex flex-col gap-2', className), ...props }));
|
|
11
|
-
}
|
|
12
|
-
function TabsList({ className, ...props }) {
|
|
13
|
-
return (_jsx(TabsPrimitive.List, { "data-slot": "tabs-list", className: cn('bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]', className), ...props }));
|
|
14
|
-
}
|
|
15
|
-
function TabsTrigger({ className, ...props }) {
|
|
16
|
-
return (_jsx(TabsPrimitive.Trigger, { "data-slot": "tabs-trigger", className: cn("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props }));
|
|
17
|
-
}
|
|
18
|
-
function TabsContent({ className, ...props }) {
|
|
19
|
-
return (_jsx(TabsPrimitive.Content, { "data-slot": "tabs-content", className: cn('flex-1 outline-none', className), ...props }));
|
|
20
|
-
}
|
|
21
|
-
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from '@/lib/utils';
|
|
3
|
-
function Textarea({ className, ...props }) {
|
|
4
|
-
return (_jsx("textarea", { "data-slot": "textarea", className: cn('border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', className), ...props }));
|
|
5
|
-
}
|
|
6
|
-
export { Textarea };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
3
|
-
import { type VariantProps } from 'class-variance-authority';
|
|
4
|
-
declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
|
|
5
|
-
declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
|
6
|
-
declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
|
|
7
|
-
variant?: "default" | "destructive" | null | undefined;
|
|
8
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLLIElement>>;
|
|
9
|
-
declare const ToastAction: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
-
declare const ToastClose: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
-
declare const ToastTitle: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
-
declare const ToastDescription: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
-
type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
|
|
14
|
-
type ToastActionElement = React.ReactElement<typeof ToastAction>;
|
|
15
|
-
export { type ToastProps, type ToastActionElement, ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction, };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
|
-
* Distributed under the terms of the Modified BSD License.
|
|
4
|
-
*/
|
|
5
|
-
'use client';
|
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
import * as React from 'react';
|
|
8
|
-
import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
9
|
-
import { cva } from 'class-variance-authority';
|
|
10
|
-
import { cn } from '@/lib/utils';
|
|
11
|
-
import { Cross2Icon } from '@radix-ui/react-icons';
|
|
12
|
-
const ToastProvider = ToastPrimitives.Provider;
|
|
13
|
-
const ToastViewport = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Viewport, { ref: ref, className: cn('fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]', className), ...props })));
|
|
14
|
-
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
15
|
-
const toastVariants = cva('group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full', {
|
|
16
|
-
variants: {
|
|
17
|
-
variant: {
|
|
18
|
-
default: 'border bg-background text-foreground',
|
|
19
|
-
destructive: 'destructive group border-destructive bg-destructive text-destructive-foreground',
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
defaultVariants: {
|
|
23
|
-
variant: 'default',
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
const Toast = React.forwardRef(({ className, variant, ...props }, ref) => {
|
|
27
|
-
return (_jsx(ToastPrimitives.Root, { ref: ref, className: cn(toastVariants({ variant }), className), ...props }));
|
|
28
|
-
});
|
|
29
|
-
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
30
|
-
const ToastAction = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Action, { ref: ref, className: cn('inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive', className), ...props })));
|
|
31
|
-
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
32
|
-
const ToastClose = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Close, { ref: ref, className: cn('absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600', className), "toast-close": "", ...props, children: _jsx(Cross2Icon, { className: "h-4 w-4" }) })));
|
|
33
|
-
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
34
|
-
const ToastTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Title, { ref: ref, className: cn('text-sm font-semibold [&+div]:text-xs', className), ...props })));
|
|
35
|
-
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
36
|
-
const ToastDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Description, { ref: ref, className: cn('text-sm opacity-90', className), ...props })));
|
|
37
|
-
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
38
|
-
export { ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction, };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function Toaster(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
|
-
* Distributed under the terms of the Modified BSD License.
|
|
4
|
-
*/
|
|
5
|
-
'use client';
|
|
6
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { useToast } from '@/hooks/useToast';
|
|
8
|
-
import { Toast, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, } from '@/components/ui/toast';
|
|
9
|
-
export function Toaster() {
|
|
10
|
-
const { toasts } = useToast();
|
|
11
|
-
return (_jsxs(ToastProvider, { children: [toasts.map(function ({ id, title, description, action, ...props }) {
|
|
12
|
-
return (_jsxs(Toast, { ...props, children: [_jsxs("div", { className: "grid gap-1", children: [title && _jsx(ToastTitle, { children: title }), description && (_jsx(ToastDescription, { children: description }))] }), action, _jsx(ToastClose, {})] }, id));
|
|
13
|
-
}), _jsx(ToastViewport, {})] }));
|
|
14
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
3
|
-
import { type VariantProps } from 'class-variance-authority';
|
|
4
|
-
import { toggleVariants } from '@/components/ui/toggle';
|
|
5
|
-
declare function ToggleGroup({ className, variant, size, spacing, children, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants> & {
|
|
6
|
-
spacing?: number;
|
|
7
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
declare function ToggleGroupItem({ className, children, variant, size, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
|
-
* Distributed under the terms of the Modified BSD License.
|
|
4
|
-
*/
|
|
5
|
-
'use client';
|
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
import * as React from 'react';
|
|
8
|
-
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
9
|
-
import { cn } from '@/lib/utils';
|
|
10
|
-
import { toggleVariants } from '@/components/ui/toggle';
|
|
11
|
-
const ToggleGroupContext = React.createContext({
|
|
12
|
-
size: 'default',
|
|
13
|
-
variant: 'default',
|
|
14
|
-
spacing: 0,
|
|
15
|
-
});
|
|
16
|
-
function ToggleGroup({ className, variant, size, spacing = 0, children, ...props }) {
|
|
17
|
-
return (_jsx(ToggleGroupPrimitive.Root, { "data-slot": "toggle-group", "data-variant": variant, "data-size": size, "data-spacing": spacing, style: { '--gap': spacing }, className: cn('group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs', className), ...props, children: _jsx(ToggleGroupContext.Provider, { value: { variant, size, spacing }, children: children }) }));
|
|
18
|
-
}
|
|
19
|
-
function ToggleGroupItem({ className, children, variant, size, ...props }) {
|
|
20
|
-
const context = React.useContext(ToggleGroupContext);
|
|
21
|
-
return (_jsx(ToggleGroupPrimitive.Item, { "data-slot": "toggle-group-item", "data-variant": context.variant || variant, "data-size": context.size || size, "data-spacing": context.spacing, className: cn(toggleVariants({
|
|
22
|
-
variant: context.variant || variant,
|
|
23
|
-
size: context.size || size,
|
|
24
|
-
}), 'w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10', 'data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l', className), ...props, children: children }));
|
|
25
|
-
}
|
|
26
|
-
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
3
|
-
import { type VariantProps } from 'class-variance-authority';
|
|
4
|
-
declare const toggleVariants: (props?: ({
|
|
5
|
-
variant?: "default" | "outline" | null | undefined;
|
|
6
|
-
size?: "default" | "sm" | "lg" | null | undefined;
|
|
7
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
-
declare function Toggle({ className, variant, size, ...props }: React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export { Toggle, toggleVariants };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
|
-
* Distributed under the terms of the Modified BSD License.
|
|
4
|
-
*/
|
|
5
|
-
'use client';
|
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
8
|
-
import { cva } from 'class-variance-authority';
|
|
9
|
-
import { cn } from '@/lib/utils';
|
|
10
|
-
const toggleVariants = cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap", {
|
|
11
|
-
variants: {
|
|
12
|
-
variant: {
|
|
13
|
-
default: 'bg-transparent',
|
|
14
|
-
outline: 'border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground',
|
|
15
|
-
},
|
|
16
|
-
size: {
|
|
17
|
-
default: 'h-9 px-2 min-w-9',
|
|
18
|
-
sm: 'h-8 px-1.5 min-w-8',
|
|
19
|
-
lg: 'h-10 px-2.5 min-w-10',
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
defaultVariants: {
|
|
23
|
-
variant: 'default',
|
|
24
|
-
size: 'default',
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
function Toggle({ className, variant, size, ...props }) {
|
|
28
|
-
return (_jsx(TogglePrimitive.Root, { "data-slot": "toggle", className: cn(toggleVariants({ variant, size, className })), ...props }));
|
|
29
|
-
}
|
|
30
|
-
export { Toggle, toggleVariants };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
3
|
-
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
|
-
* Distributed under the terms of the Modified BSD License.
|
|
4
|
-
*/
|
|
5
|
-
'use client';
|
|
6
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
8
|
-
import { cn } from '@/lib/utils';
|
|
9
|
-
function TooltipProvider({ delayDuration = 0, ...props }) {
|
|
10
|
-
return (_jsx(TooltipPrimitive.Provider, { "data-slot": "tooltip-provider", delayDuration: delayDuration, ...props }));
|
|
11
|
-
}
|
|
12
|
-
function Tooltip({ ...props }) {
|
|
13
|
-
return (_jsx(TooltipProvider, { children: _jsx(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) }));
|
|
14
|
-
}
|
|
15
|
-
function TooltipTrigger({ ...props }) {
|
|
16
|
-
return _jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
17
|
-
}
|
|
18
|
-
function TooltipContent({ className, sideOffset = 0, children, ...props }) {
|
|
19
|
-
return (_jsx(TooltipPrimitive.Portal, { children: _jsxs(TooltipPrimitive.Content, { "data-slot": "tooltip-content", sideOffset: sideOffset, className: cn('bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance', className), ...props, children: [children, _jsx(TooltipPrimitive.Arrow, { className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })] }) }));
|
|
20
|
-
}
|
|
21
|
-
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Button } from '@/components/ui/button';
|
|
2
|
-
import { type LucideIcon } from 'lucide-react';
|
|
3
|
-
import type { ComponentProps, HTMLAttributes } from 'react';
|
|
4
|
-
export type ArtifactProps = HTMLAttributes<HTMLDivElement>;
|
|
5
|
-
export declare const Artifact: ({ className, ...props }: ArtifactProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export type ArtifactHeaderProps = HTMLAttributes<HTMLDivElement>;
|
|
7
|
-
export declare const ArtifactHeader: ({ className, ...props }: ArtifactHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export type ArtifactCloseProps = ComponentProps<typeof Button>;
|
|
9
|
-
export declare const ArtifactClose: ({ className, children, size, variant, ...props }: ArtifactCloseProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export type ArtifactTitleProps = HTMLAttributes<HTMLParagraphElement>;
|
|
11
|
-
export declare const ArtifactTitle: ({ className, ...props }: ArtifactTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export type ArtifactDescriptionProps = HTMLAttributes<HTMLParagraphElement>;
|
|
13
|
-
export declare const ArtifactDescription: ({ className, ...props }: ArtifactDescriptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export type ArtifactActionsProps = HTMLAttributes<HTMLDivElement>;
|
|
15
|
-
export declare const ArtifactActions: ({ className, ...props }: ArtifactActionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export type ArtifactActionProps = ComponentProps<typeof Button> & {
|
|
17
|
-
tooltip?: string;
|
|
18
|
-
label?: string;
|
|
19
|
-
icon?: LucideIcon;
|
|
20
|
-
};
|
|
21
|
-
export declare const ArtifactAction: ({ tooltip, label, icon: Icon, children, className, size, variant, ...props }: ArtifactActionProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
export type ArtifactContentProps = HTMLAttributes<HTMLDivElement>;
|
|
23
|
-
export declare const ArtifactContent: ({ className, ...props }: ArtifactContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
|
-
* Distributed under the terms of the Modified BSD License.
|
|
4
|
-
*/
|
|
5
|
-
'use client';
|
|
6
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { Button } from '@/components/ui/button';
|
|
8
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from '@/components/ui/tooltip';
|
|
9
|
-
import { cn } from '@/lib/utils';
|
|
10
|
-
import { XIcon } from 'lucide-react';
|
|
11
|
-
export const Artifact = ({ className, ...props }) => (_jsx("div", { className: cn('flex flex-col overflow-hidden rounded-lg border bg-background shadow-sm', className), ...props }));
|
|
12
|
-
export const ArtifactHeader = ({ className, ...props }) => (_jsx("div", { className: cn('flex items-center justify-between border-b bg-muted/50 px-4 py-3', className), ...props }));
|
|
13
|
-
export const ArtifactClose = ({ className, children, size = 'sm', variant = 'ghost', ...props }) => (_jsxs(Button, { className: cn('size-8 p-0 text-muted-foreground hover:text-foreground', className), size: size, type: "button", variant: variant, ...props, children: [children ?? _jsx(XIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Close" })] }));
|
|
14
|
-
export const ArtifactTitle = ({ className, ...props }) => (_jsx("p", { className: cn('font-medium text-foreground text-sm', className), ...props }));
|
|
15
|
-
export const ArtifactDescription = ({ className, ...props }) => (_jsx("p", { className: cn('text-muted-foreground text-sm', className), ...props }));
|
|
16
|
-
export const ArtifactActions = ({ className, ...props }) => (_jsx("div", { className: cn('flex items-center gap-1', className), ...props }));
|
|
17
|
-
export const ArtifactAction = ({ tooltip, label, icon: Icon, children, className, size = 'sm', variant = 'ghost', ...props }) => {
|
|
18
|
-
const button = (_jsxs(Button, { className: cn('size-8 p-0 text-muted-foreground hover:text-foreground', className), size: size, type: "button", variant: variant, ...props, children: [Icon ? _jsx(Icon, { className: "size-4" }) : children, _jsx("span", { className: "sr-only", children: label || tooltip })] }));
|
|
19
|
-
if (tooltip) {
|
|
20
|
-
return (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: button }), _jsx(TooltipContent, { children: _jsx("p", { children: tooltip }) })] }) }));
|
|
21
|
-
}
|
|
22
|
-
return button;
|
|
23
|
-
};
|
|
24
|
-
export const ArtifactContent = ({ className, ...props }) => (_jsx("div", { className: cn('flex-1 overflow-auto p-4', className), ...props }));
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Button } from '@/components/ui/button';
|
|
2
|
-
import { type ComponentProps, type HTMLAttributes } from 'react';
|
|
3
|
-
import { type BundledLanguage } from 'shiki';
|
|
4
|
-
type CodeBlockProps = HTMLAttributes<HTMLDivElement> & {
|
|
5
|
-
code: string;
|
|
6
|
-
language: BundledLanguage;
|
|
7
|
-
showLineNumbers?: boolean;
|
|
8
|
-
};
|
|
9
|
-
export declare function highlightCode(code: string, language: BundledLanguage, showLineNumbers?: boolean): Promise<[string, string]>;
|
|
10
|
-
export declare const CodeBlock: ({ code, language, showLineNumbers, className, children, ...props }: CodeBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export type CodeBlockCopyButtonProps = ComponentProps<typeof Button> & {
|
|
12
|
-
onCopy?: () => void;
|
|
13
|
-
onError?: (error: Error) => void;
|
|
14
|
-
timeout?: number;
|
|
15
|
-
};
|
|
16
|
-
export declare const CodeBlockCopyButton: ({ onCopy, onError, timeout, children, className, ...props }: CodeBlockCopyButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export {};
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
|
-
* Distributed under the terms of the Modified BSD License.
|
|
4
|
-
*/
|
|
5
|
-
'use client';
|
|
6
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { Button } from '@/components/ui/button';
|
|
8
|
-
import { cn } from '@/lib/utils';
|
|
9
|
-
import { CheckIcon, CopyIcon } from 'lucide-react';
|
|
10
|
-
import { createContext, useContext, useEffect, useRef, useState, } from 'react';
|
|
11
|
-
import { codeToHtml } from 'shiki';
|
|
12
|
-
const CodeBlockContext = createContext({
|
|
13
|
-
code: '',
|
|
14
|
-
});
|
|
15
|
-
const lineNumberTransformer = {
|
|
16
|
-
name: 'line-numbers',
|
|
17
|
-
line(node, line) {
|
|
18
|
-
node.children.unshift({
|
|
19
|
-
type: 'element',
|
|
20
|
-
tagName: 'span',
|
|
21
|
-
properties: {
|
|
22
|
-
className: [
|
|
23
|
-
'inline-block',
|
|
24
|
-
'min-w-10',
|
|
25
|
-
'mr-4',
|
|
26
|
-
'text-right',
|
|
27
|
-
'select-none',
|
|
28
|
-
'text-muted-foreground',
|
|
29
|
-
],
|
|
30
|
-
},
|
|
31
|
-
children: [{ type: 'text', value: String(line) }],
|
|
32
|
-
});
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
export async function highlightCode(code, language, showLineNumbers = false) {
|
|
36
|
-
const transformers = showLineNumbers
|
|
37
|
-
? [lineNumberTransformer]
|
|
38
|
-
: [];
|
|
39
|
-
return await Promise.all([
|
|
40
|
-
codeToHtml(code, {
|
|
41
|
-
lang: language,
|
|
42
|
-
theme: 'one-light',
|
|
43
|
-
transformers,
|
|
44
|
-
}),
|
|
45
|
-
codeToHtml(code, {
|
|
46
|
-
lang: language,
|
|
47
|
-
theme: 'one-dark-pro',
|
|
48
|
-
transformers,
|
|
49
|
-
}),
|
|
50
|
-
]);
|
|
51
|
-
}
|
|
52
|
-
export const CodeBlock = ({ code, language, showLineNumbers = false, className, children, ...props }) => {
|
|
53
|
-
const [html, setHtml] = useState('');
|
|
54
|
-
const [darkHtml, setDarkHtml] = useState('');
|
|
55
|
-
const mounted = useRef(false);
|
|
56
|
-
useEffect(() => {
|
|
57
|
-
highlightCode(code, language, showLineNumbers).then(([light, dark]) => {
|
|
58
|
-
if (!mounted.current) {
|
|
59
|
-
setHtml(light);
|
|
60
|
-
setDarkHtml(dark);
|
|
61
|
-
mounted.current = true;
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
return () => {
|
|
65
|
-
mounted.current = false;
|
|
66
|
-
};
|
|
67
|
-
}, [code, language, showLineNumbers]);
|
|
68
|
-
return (_jsx(CodeBlockContext.Provider, { value: { code }, children: _jsx("div", { className: cn('group relative w-full overflow-hidden rounded-md border bg-background text-foreground', className), ...props, children: _jsxs("div", { className: "relative", children: [_jsx("div", { className: "overflow-auto dark:hidden [&>pre]:m-0 [&>pre]:bg-background! [&>pre]:p-4 [&>pre]:text-foreground! [&>pre]:text-sm [&_code]:font-mono [&_code]:text-sm",
|
|
69
|
-
// biome-ignore lint/security/noDangerouslySetInnerHtml: "this is needed."
|
|
70
|
-
dangerouslySetInnerHTML: { __html: html } }), _jsx("div", { className: "hidden overflow-auto dark:block [&>pre]:m-0 [&>pre]:bg-background! [&>pre]:p-4 [&>pre]:text-foreground! [&>pre]:text-sm [&_code]:font-mono [&_code]:text-sm",
|
|
71
|
-
// biome-ignore lint/security/noDangerouslySetInnerHtml: "this is needed."
|
|
72
|
-
dangerouslySetInnerHTML: { __html: darkHtml } }), children && (_jsx("div", { className: "absolute top-2 right-2 flex items-center gap-2", children: children }))] }) }) }));
|
|
73
|
-
};
|
|
74
|
-
export const CodeBlockCopyButton = ({ onCopy, onError, timeout = 2000, children, className, ...props }) => {
|
|
75
|
-
const [isCopied, setIsCopied] = useState(false);
|
|
76
|
-
const { code } = useContext(CodeBlockContext);
|
|
77
|
-
const copyToClipboard = async () => {
|
|
78
|
-
if (typeof window === 'undefined' || !navigator?.clipboard?.writeText) {
|
|
79
|
-
onError?.(new Error('Clipboard API not available'));
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
try {
|
|
83
|
-
await navigator.clipboard.writeText(code);
|
|
84
|
-
setIsCopied(true);
|
|
85
|
-
onCopy?.();
|
|
86
|
-
setTimeout(() => setIsCopied(false), timeout);
|
|
87
|
-
}
|
|
88
|
-
catch (error) {
|
|
89
|
-
onError?.(error);
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
const Icon = isCopied ? CheckIcon : CopyIcon;
|
|
93
|
-
return (_jsx(Button, { className: cn('shrink-0', className), onClick: copyToClipboard, size: "icon", variant: "ghost", ...props, children: children ?? _jsx(Icon, { size: 14 }) }));
|
|
94
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Button } from '@/components/ui/button';
|
|
2
|
-
import type { ComponentProps } from 'react';
|
|
3
|
-
import { StickToBottom } from 'use-stick-to-bottom';
|
|
4
|
-
export type ConversationProps = ComponentProps<typeof StickToBottom>;
|
|
5
|
-
export declare const Conversation: ({ className, ...props }: ConversationProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export type ConversationContentProps = ComponentProps<typeof StickToBottom.Content>;
|
|
7
|
-
export declare const ConversationContent: ({ className, ...props }: ConversationContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export type ConversationEmptyStateProps = ComponentProps<'div'> & {
|
|
9
|
-
title?: string;
|
|
10
|
-
description?: string;
|
|
11
|
-
icon?: React.ReactNode;
|
|
12
|
-
};
|
|
13
|
-
export declare const ConversationEmptyState: ({ className, title, description, icon, children, ...props }: ConversationEmptyStateProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export type ConversationScrollButtonProps = ComponentProps<typeof Button>;
|
|
15
|
-
export declare const ConversationScrollButton: ({ className, ...props }: ConversationScrollButtonProps) => false | import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
|
-
* Distributed under the terms of the Modified BSD License.
|
|
4
|
-
*/
|
|
5
|
-
'use client';
|
|
6
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
7
|
-
import { Button } from '@/components/ui/button';
|
|
8
|
-
import { cn } from '@/lib/utils';
|
|
9
|
-
import { ArrowDownIcon } from 'lucide-react';
|
|
10
|
-
import { useCallback } from 'react';
|
|
11
|
-
import { StickToBottom, useStickToBottomContext } from 'use-stick-to-bottom';
|
|
12
|
-
export const Conversation = ({ className, ...props }) => (_jsx(StickToBottom, { className: cn('relative flex-1 overflow-y-hidden', className), initial: "smooth", resize: "smooth", role: "log", ...props }));
|
|
13
|
-
export const ConversationContent = ({ className, ...props }) => (_jsx(StickToBottom.Content, { className: cn('flex flex-col gap-8 p-4', className), ...props }));
|
|
14
|
-
export const ConversationEmptyState = ({ className, title = 'No messages yet', description = 'Start a conversation to see messages here', icon, children, ...props }) => (_jsx("div", { className: cn('flex size-full flex-col items-center justify-center gap-3 p-8 text-center', className), ...props, children: children ?? (_jsxs(_Fragment, { children: [icon && _jsx("div", { className: "text-muted-foreground", children: icon }), _jsxs("div", { className: "space-y-1", children: [_jsx("h3", { className: "font-medium text-sm", children: title }), description && (_jsx("p", { className: "text-muted-foreground text-sm", children: description }))] })] })) }));
|
|
15
|
-
export const ConversationScrollButton = ({ className, ...props }) => {
|
|
16
|
-
const { isAtBottom, scrollToBottom } = useStickToBottomContext();
|
|
17
|
-
const handleScrollToBottom = useCallback(() => {
|
|
18
|
-
scrollToBottom();
|
|
19
|
-
}, [scrollToBottom]);
|
|
20
|
-
return (!isAtBottom && (_jsx(Button, { className: cn('absolute bottom-4 left-[50%] translate-x-[-50%] rounded-full', className), onClick: handleScrollToBottom, size: "icon", type: "button", variant: "outline", ...props, children: _jsx(ArrowDownIcon, { className: "size-4" }) })));
|
|
21
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
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 { cn } from '@/lib/utils';
|
|
7
|
-
const LoaderIcon = ({ size = 16 }) => (_jsxs("svg", { height: size, strokeLinejoin: "round", style: { color: 'currentcolor' }, viewBox: "0 0 16 16", width: size, children: [_jsx("title", { children: "Loader" }), _jsxs("g", { clipPath: "url(#clip0_2393_1490)", children: [_jsx("path", { d: "M8 0V4", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { d: "M8 16V12", opacity: "0.5", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { d: "M3.29773 1.52783L5.64887 4.7639", opacity: "0.9", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { d: "M12.7023 1.52783L10.3511 4.7639", opacity: "0.1", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { d: "M12.7023 14.472L10.3511 11.236", opacity: "0.4", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { d: "M3.29773 14.472L5.64887 11.236", opacity: "0.6", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { d: "M15.6085 5.52783L11.8043 6.7639", opacity: "0.2", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { d: "M0.391602 10.472L4.19583 9.23598", opacity: "0.7", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { d: "M15.6085 10.4722L11.8043 9.2361", opacity: "0.3", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { d: "M0.391602 5.52783L4.19583 6.7639", opacity: "0.8", stroke: "currentColor", strokeWidth: "1.5" })] }), _jsx("defs", { children: _jsx("clipPath", { id: "clip0_2393_1490", children: _jsx("rect", { fill: "white", height: "16", width: "16" }) }) })] }));
|
|
8
|
-
export const Loader = ({ className, size = 16, ...props }) => (_jsx("div", { className: cn('inline-flex animate-spin items-center justify-center', className), ...props, children: _jsx(LoaderIcon, { size: size }) }));
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Button } from '@/components/ui/button';
|
|
2
|
-
import type { FileUIPart, UIMessage } from 'ai';
|
|
3
|
-
import type { ComponentProps, HTMLAttributes } from 'react';
|
|
4
|
-
import { Streamdown } from 'streamdown';
|
|
5
|
-
export type MessageProps = HTMLAttributes<HTMLDivElement> & {
|
|
6
|
-
from: UIMessage['role'];
|
|
7
|
-
};
|
|
8
|
-
export declare const Message: ({ className, from, ...props }: MessageProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export type MessageContentProps = HTMLAttributes<HTMLDivElement>;
|
|
10
|
-
export declare const MessageContent: ({ children, className, ...props }: MessageContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export type MessageActionsProps = ComponentProps<'div'>;
|
|
12
|
-
export declare const MessageActions: ({ className, children, ...props }: MessageActionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export type MessageActionProps = ComponentProps<typeof Button> & {
|
|
14
|
-
tooltip?: string;
|
|
15
|
-
label?: string;
|
|
16
|
-
};
|
|
17
|
-
export declare const MessageAction: ({ tooltip, children, label, variant, size, ...props }: MessageActionProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export type MessageBranchProps = HTMLAttributes<HTMLDivElement> & {
|
|
19
|
-
defaultBranch?: number;
|
|
20
|
-
onBranchChange?: (branchIndex: number) => void;
|
|
21
|
-
};
|
|
22
|
-
export declare const MessageBranch: ({ defaultBranch, onBranchChange, className, ...props }: MessageBranchProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
export type MessageBranchContentProps = HTMLAttributes<HTMLDivElement>;
|
|
24
|
-
export declare const MessageBranchContent: ({ children, ...props }: MessageBranchContentProps) => import("react/jsx-runtime").JSX.Element[];
|
|
25
|
-
export type MessageBranchSelectorProps = HTMLAttributes<HTMLDivElement> & {
|
|
26
|
-
from: UIMessage['role'];
|
|
27
|
-
};
|
|
28
|
-
export declare const MessageBranchSelector: ({ className, from, ...props }: MessageBranchSelectorProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
29
|
-
export type MessageBranchPreviousProps = ComponentProps<typeof Button>;
|
|
30
|
-
export declare const MessageBranchPrevious: ({ children, ...props }: MessageBranchPreviousProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
-
export type MessageBranchNextProps = ComponentProps<typeof Button>;
|
|
32
|
-
export declare const MessageBranchNext: ({ children, className, ...props }: MessageBranchNextProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
-
export type MessageBranchPageProps = HTMLAttributes<HTMLSpanElement>;
|
|
34
|
-
export declare const MessageBranchPage: ({ className, ...props }: MessageBranchPageProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
-
export type MessageResponseProps = ComponentProps<typeof Streamdown>;
|
|
36
|
-
export declare const MessageResponse: import("react").MemoExoticComponent<({ className, ...props }: MessageResponseProps) => import("react/jsx-runtime").JSX.Element>;
|
|
37
|
-
export type MessageAttachmentProps = HTMLAttributes<HTMLDivElement> & {
|
|
38
|
-
data: FileUIPart;
|
|
39
|
-
className?: string;
|
|
40
|
-
onRemove?: () => void;
|
|
41
|
-
};
|
|
42
|
-
export declare function MessageAttachment({ data, className, onRemove, ...props }: MessageAttachmentProps): import("react/jsx-runtime").JSX.Element;
|
|
43
|
-
export type MessageAttachmentsProps = ComponentProps<'div'>;
|
|
44
|
-
export declare function MessageAttachments({ children, className, ...props }: MessageAttachmentsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
45
|
-
export type MessageToolbarProps = ComponentProps<'div'>;
|
|
46
|
-
export declare const MessageToolbar: ({ className, children, ...props }: MessageToolbarProps) => import("react/jsx-runtime").JSX.Element;
|