@tangle-network/sandbox-ui 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -0
- package/dist/auth.d.ts +57 -0
- package/dist/auth.js +14 -0
- package/dist/branding-DCi5VEik.d.ts +13 -0
- package/dist/button-BidTtuRS.d.ts +15 -0
- package/dist/chat.d.ts +121 -0
- package/dist/chat.js +25 -0
- package/dist/chunk-2UHPE5T7.js +201 -0
- package/dist/chunk-4EIWPJMJ.js +545 -0
- package/dist/chunk-6MQIDUPA.js +502 -0
- package/dist/chunk-B26TQ7SA.js +47 -0
- package/dist/chunk-E6FS7R4X.js +109 -0
- package/dist/chunk-GRYHFH5O.js +110 -0
- package/dist/chunk-HMND7JPA.js +868 -0
- package/dist/chunk-HRMUF35V.js +19 -0
- package/dist/chunk-HYEAX3DC.js +822 -0
- package/dist/chunk-KMXV7DDX.js +174 -0
- package/dist/chunk-KYY2X6LY.js +318 -0
- package/dist/chunk-L6ZDH5F4.js +334 -0
- package/dist/chunk-LTFK464G.js +103 -0
- package/dist/chunk-M34OA6PQ.js +233 -0
- package/dist/chunk-M6VLC32S.js +219 -0
- package/dist/chunk-MCGKDCOR.js +173 -0
- package/dist/chunk-NI2EI43H.js +294 -0
- package/dist/chunk-OU4TRNQZ.js +173 -0
- package/dist/chunk-QD4QE5P5.js +40 -0
- package/dist/chunk-QSQBDR3N.js +180 -0
- package/dist/chunk-RQHJBTEU.js +10 -0
- package/dist/chunk-U62G5TS7.js +472 -0
- package/dist/chunk-ZOL2TR5M.js +475 -0
- package/dist/dashboard.d.ts +111 -0
- package/dist/dashboard.js +26 -0
- package/dist/editor.d.ts +196 -0
- package/dist/editor.js +713 -0
- package/dist/expanded-tool-detail-OkXGqTHe.d.ts +52 -0
- package/dist/files.d.ts +66 -0
- package/dist/files.js +11 -0
- package/dist/hooks.d.ts +22 -0
- package/dist/hooks.js +107 -0
- package/dist/index.d.ts +107 -0
- package/dist/index.js +551 -0
- package/dist/markdown.d.ts +55 -0
- package/dist/markdown.js +17 -0
- package/dist/pages.d.ts +89 -0
- package/dist/pages.js +1181 -0
- package/dist/parts-CyGkM6Fp.d.ts +50 -0
- package/dist/primitives.d.ts +189 -0
- package/dist/primitives.js +161 -0
- package/dist/run-CtFZ6s-D.d.ts +41 -0
- package/dist/run.d.ts +14 -0
- package/dist/run.js +29 -0
- package/dist/sidecar-CFU2W9j1.d.ts +8 -0
- package/dist/stores.d.ts +28 -0
- package/dist/stores.js +49 -0
- package/dist/terminal.d.ts +44 -0
- package/dist/terminal.js +160 -0
- package/dist/tool-call-feed-D5Ume-Pt.d.ts +66 -0
- package/dist/tool-display-BvsVW_Ur.d.ts +32 -0
- package/dist/types.d.ts +6 -0
- package/dist/types.js +0 -0
- package/dist/usage-chart-DINgSVL5.d.ts +60 -0
- package/dist/use-sidecar-auth-Bb0-w3lX.d.ts +339 -0
- package/dist/utils.d.ts +28 -0
- package/dist/utils.js +28 -0
- package/dist/workspace.d.ts +113 -0
- package/dist/workspace.js +15 -0
- package/package.json +174 -0
- package/src/styles/globals.css +230 -0
- package/src/styles/tokens.css +73 -0
- package/tailwind.config.cjs +99 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import { R as Run } from './run-CtFZ6s-D.js';
|
|
4
|
+
import { a as SessionPart, b as ToolPart, R as ReasoningPart } from './parts-CyGkM6Fp.js';
|
|
5
|
+
import { A as AgentBranding } from './branding-DCi5VEik.js';
|
|
6
|
+
import { C as CustomToolRenderer } from './tool-display-BvsVW_Ur.js';
|
|
7
|
+
|
|
8
|
+
interface RunGroupProps {
|
|
9
|
+
run: Run;
|
|
10
|
+
partMap: Record<string, SessionPart[]>;
|
|
11
|
+
collapsed: boolean;
|
|
12
|
+
onToggle: () => void;
|
|
13
|
+
branding?: AgentBranding;
|
|
14
|
+
renderToolDetail?: CustomToolRenderer;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Collapsible container for a consecutive group of assistant messages (a "run").
|
|
18
|
+
* Shows a summary header with stats and renders tool/thinking/text parts.
|
|
19
|
+
*/
|
|
20
|
+
declare const RunGroup: React.MemoExoticComponent<({ run, partMap, collapsed, onToggle, branding, renderToolDetail, }: RunGroupProps) => react_jsx_runtime.JSX.Element>;
|
|
21
|
+
|
|
22
|
+
interface InlineToolItemProps {
|
|
23
|
+
part: ToolPart;
|
|
24
|
+
renderToolDetail?: CustomToolRenderer;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Compact single-line tool call display (32px height).
|
|
28
|
+
* Shows icon, title, description, duration, and status indicator.
|
|
29
|
+
* Expands on click to show ExpandedToolDetail.
|
|
30
|
+
*/
|
|
31
|
+
declare const InlineToolItem: React.MemoExoticComponent<({ part, renderToolDetail }: InlineToolItemProps) => react_jsx_runtime.JSX.Element>;
|
|
32
|
+
|
|
33
|
+
interface InlineThinkingItemProps {
|
|
34
|
+
part: ReasoningPart;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Minimal collapsible display for thinking/reasoning parts.
|
|
38
|
+
* Shows "Thinking..." with optional preview text and duration.
|
|
39
|
+
*/
|
|
40
|
+
declare const InlineThinkingItem: React.MemoExoticComponent<({ part }: InlineThinkingItemProps) => react_jsx_runtime.JSX.Element>;
|
|
41
|
+
|
|
42
|
+
interface ExpandedToolDetailProps {
|
|
43
|
+
part: ToolPart;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Renders full tool details when a tool item is expanded.
|
|
47
|
+
* Dispatches to specialised previews (CommandPreview, WriteFilePreview)
|
|
48
|
+
* or falls back to a generic input/output code view.
|
|
49
|
+
*/
|
|
50
|
+
declare const ExpandedToolDetail: React.MemoExoticComponent<({ part }: ExpandedToolDetailProps) => react_jsx_runtime.JSX.Element>;
|
|
51
|
+
|
|
52
|
+
export { ExpandedToolDetail as E, InlineThinkingItem as I, RunGroup as R, type ExpandedToolDetailProps as a, type InlineThinkingItemProps as b, InlineToolItem as c, type InlineToolItemProps as d, type RunGroupProps as e };
|
package/dist/files.d.ts
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* FileTree — directory browser with file type icons.
|
|
5
|
+
*
|
|
6
|
+
* Renders a hierarchical file system view. Clicking a file
|
|
7
|
+
* triggers onSelect with the full path.
|
|
8
|
+
*/
|
|
9
|
+
interface FileNode {
|
|
10
|
+
name: string;
|
|
11
|
+
path: string;
|
|
12
|
+
type: "file" | "directory";
|
|
13
|
+
children?: FileNode[];
|
|
14
|
+
size?: number;
|
|
15
|
+
mimeType?: string;
|
|
16
|
+
}
|
|
17
|
+
interface FileTreeProps {
|
|
18
|
+
root: FileNode;
|
|
19
|
+
selectedPath?: string;
|
|
20
|
+
onSelect?: (path: string, node: FileNode) => void;
|
|
21
|
+
className?: string;
|
|
22
|
+
defaultExpanded?: boolean;
|
|
23
|
+
}
|
|
24
|
+
declare function FileTree({ root, selectedPath, onSelect, className, defaultExpanded }: FileTreeProps): react_jsx_runtime.JSX.Element;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* FilePreview — universal file renderer.
|
|
28
|
+
*
|
|
29
|
+
* Renders any file type beautifully:
|
|
30
|
+
* - PDF: react-pdf paginated viewer
|
|
31
|
+
* - CSV/XLSX: sortable table
|
|
32
|
+
* - Code (py/json/yaml/ts/js): syntax highlighted
|
|
33
|
+
* - Markdown: rendered prose
|
|
34
|
+
* - Images: inline display
|
|
35
|
+
* - Text: monospace pre
|
|
36
|
+
*/
|
|
37
|
+
interface FilePreviewProps {
|
|
38
|
+
filename: string;
|
|
39
|
+
content?: string;
|
|
40
|
+
blobUrl?: string;
|
|
41
|
+
mimeType?: string;
|
|
42
|
+
onClose?: () => void;
|
|
43
|
+
onDownload?: () => void;
|
|
44
|
+
className?: string;
|
|
45
|
+
}
|
|
46
|
+
declare function FilePreview({ filename, content, blobUrl, mimeType, onClose, onDownload, className, }: FilePreviewProps): react_jsx_runtime.JSX.Element;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* FileTabs — tab bar for open files in the preview panel.
|
|
50
|
+
*/
|
|
51
|
+
interface FileTabData {
|
|
52
|
+
id: string;
|
|
53
|
+
name: string;
|
|
54
|
+
path: string;
|
|
55
|
+
dirty?: boolean;
|
|
56
|
+
}
|
|
57
|
+
interface FileTabsProps {
|
|
58
|
+
tabs: FileTabData[];
|
|
59
|
+
activeId?: string;
|
|
60
|
+
onSelect: (id: string) => void;
|
|
61
|
+
onClose: (id: string) => void;
|
|
62
|
+
className?: string;
|
|
63
|
+
}
|
|
64
|
+
declare function FileTabs({ tabs, activeId, onSelect, onClose, className }: FileTabsProps): react_jsx_runtime.JSX.Element | null;
|
|
65
|
+
|
|
66
|
+
export { type FileNode, FilePreview, type FilePreviewProps, type FileTabData, FileTabs, type FileTabsProps, FileTree, type FileTreeProps };
|
package/dist/files.js
ADDED
package/dist/hooks.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { A as AgentStreamEvent, a as AuthUser, b as AutomationStreamEvent, B as BotStreamEvent, C as ConnectionState, S as SSEEvent, c as SessionInfo, d as SidecarAuth, T as TaskStreamEvent, e as TerminalStreamEvent, U as UseAuthOptions, f as UseAuthResult, g as UsePtySessionOptions, h as UsePtySessionReturn, i as UseRunGroupsOptions, j as UseSSEStreamOptions, k as UseSSEStreamResult, l as UseSessionStreamOptions, m as UseSessionStreamResult, n as UseSidecarAuthOptions, o as UseToolCallStreamReturn, p as createAuthFetcher, u as useApiKey, q as useAuth, r as useAutoScroll, s as useDropdownMenu, t as usePtySession, v as useRunCollapseState, w as useRunGroups, x as useSSEStream, y as useSessionStream, z as useSidecarAuth, D as useToolCallStream } from './use-sidecar-auth-Bb0-w3lX.js';
|
|
2
|
+
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
3
|
+
import { S as Session } from './sidecar-CFU2W9j1.js';
|
|
4
|
+
import './tool-call-feed-D5Ume-Pt.js';
|
|
5
|
+
import 'react/jsx-runtime';
|
|
6
|
+
import 'react';
|
|
7
|
+
import './parts-CyGkM6Fp.js';
|
|
8
|
+
import './run-CtFZ6s-D.js';
|
|
9
|
+
|
|
10
|
+
/** List all sessions for a sidecar. */
|
|
11
|
+
declare function useSessions(apiUrl: string, token: string | null): _tanstack_react_query.UseQueryResult<Session[], Error>;
|
|
12
|
+
/** Create a new session. */
|
|
13
|
+
declare function useCreateSession(apiUrl: string, token: string | null): _tanstack_react_query.UseMutationResult<Session, Error, string, unknown>;
|
|
14
|
+
/** Delete a session by ID. */
|
|
15
|
+
declare function useDeleteSession(apiUrl: string, token: string | null): _tanstack_react_query.UseMutationResult<unknown, Error, string, unknown>;
|
|
16
|
+
/** Rename a session. */
|
|
17
|
+
declare function useRenameSession(apiUrl: string, token: string | null): _tanstack_react_query.UseMutationResult<Session, Error, {
|
|
18
|
+
sessionId: string;
|
|
19
|
+
title: string;
|
|
20
|
+
}, unknown>;
|
|
21
|
+
|
|
22
|
+
export { useCreateSession, useDeleteSession, useRenameSession, useSessions };
|
package/dist/hooks.js
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createAuthFetcher,
|
|
3
|
+
useApiKey,
|
|
4
|
+
useAuth,
|
|
5
|
+
useDropdownMenu,
|
|
6
|
+
useSSEStream,
|
|
7
|
+
useSessionStream,
|
|
8
|
+
useSidecarAuth,
|
|
9
|
+
useToolCallStream
|
|
10
|
+
} from "./chunk-HYEAX3DC.js";
|
|
11
|
+
import {
|
|
12
|
+
usePtySession
|
|
13
|
+
} from "./chunk-GRYHFH5O.js";
|
|
14
|
+
import {
|
|
15
|
+
useAutoScroll,
|
|
16
|
+
useRunCollapseState,
|
|
17
|
+
useRunGroups
|
|
18
|
+
} from "./chunk-KMXV7DDX.js";
|
|
19
|
+
import "./chunk-M6VLC32S.js";
|
|
20
|
+
import "./chunk-M34OA6PQ.js";
|
|
21
|
+
import "./chunk-QSQBDR3N.js";
|
|
22
|
+
import "./chunk-RQHJBTEU.js";
|
|
23
|
+
|
|
24
|
+
// src/hooks/use-session-crud.ts
|
|
25
|
+
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
|
|
26
|
+
async function sessionFetch(apiUrl, token, path, opts) {
|
|
27
|
+
const res = await fetch(`${apiUrl}${path}`, {
|
|
28
|
+
...opts,
|
|
29
|
+
headers: {
|
|
30
|
+
"Content-Type": "application/json",
|
|
31
|
+
Authorization: `Bearer ${token}`,
|
|
32
|
+
...opts?.headers ?? {}
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
if (!res.ok) {
|
|
36
|
+
const text = await res.text();
|
|
37
|
+
throw new Error(text || `API error: ${res.status}`);
|
|
38
|
+
}
|
|
39
|
+
return res.json();
|
|
40
|
+
}
|
|
41
|
+
function useSessions(apiUrl, token) {
|
|
42
|
+
return useQuery({
|
|
43
|
+
queryKey: ["sessions", apiUrl, token],
|
|
44
|
+
queryFn: () => sessionFetch(apiUrl, token, "/session/sessions"),
|
|
45
|
+
enabled: !!token,
|
|
46
|
+
staleTime: 3e4
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function useCreateSession(apiUrl, token) {
|
|
50
|
+
const queryClient = useQueryClient();
|
|
51
|
+
return useMutation({
|
|
52
|
+
mutationFn: async (title) => {
|
|
53
|
+
return sessionFetch(apiUrl, token, "/session/sessions", {
|
|
54
|
+
method: "POST",
|
|
55
|
+
body: JSON.stringify({ title, backend: { type: "opencode" } })
|
|
56
|
+
});
|
|
57
|
+
},
|
|
58
|
+
onSuccess: () => {
|
|
59
|
+
queryClient.invalidateQueries({ queryKey: ["sessions", apiUrl, token] });
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function useDeleteSession(apiUrl, token) {
|
|
64
|
+
const queryClient = useQueryClient();
|
|
65
|
+
return useMutation({
|
|
66
|
+
mutationFn: async (sessionId) => {
|
|
67
|
+
return sessionFetch(apiUrl, token, `/session/sessions/${encodeURIComponent(sessionId)}`, {
|
|
68
|
+
method: "DELETE"
|
|
69
|
+
});
|
|
70
|
+
},
|
|
71
|
+
onSuccess: () => {
|
|
72
|
+
queryClient.invalidateQueries({ queryKey: ["sessions", apiUrl, token] });
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
function useRenameSession(apiUrl, token) {
|
|
77
|
+
const queryClient = useQueryClient();
|
|
78
|
+
return useMutation({
|
|
79
|
+
mutationFn: async ({ sessionId, title }) => {
|
|
80
|
+
return sessionFetch(apiUrl, token, `/session/sessions/${encodeURIComponent(sessionId)}`, {
|
|
81
|
+
method: "PATCH",
|
|
82
|
+
body: JSON.stringify({ title })
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
onSuccess: () => {
|
|
86
|
+
queryClient.invalidateQueries({ queryKey: ["sessions", apiUrl, token] });
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
export {
|
|
91
|
+
createAuthFetcher,
|
|
92
|
+
useApiKey,
|
|
93
|
+
useAuth,
|
|
94
|
+
useAutoScroll,
|
|
95
|
+
useCreateSession,
|
|
96
|
+
useDeleteSession,
|
|
97
|
+
useDropdownMenu,
|
|
98
|
+
usePtySession,
|
|
99
|
+
useRenameSession,
|
|
100
|
+
useRunCollapseState,
|
|
101
|
+
useRunGroups,
|
|
102
|
+
useSSEStream,
|
|
103
|
+
useSessionStream,
|
|
104
|
+
useSessions,
|
|
105
|
+
useSidecarAuth,
|
|
106
|
+
useToolCallStream
|
|
107
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
export { B as Button, a as ButtonProps, b as buttonVariants } from './button-BidTtuRS.js';
|
|
2
|
+
export { Avatar, AvatarFallback, AvatarImage, Badge, BadgeProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, EmptyStateProps, Input, InputProps, Label, Progress, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Skeleton, SkeletonCard, SkeletonTable, StatCard, StatCardProps, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, TextareaProps, Toast, ToastContainer, ToastProvider, badgeVariants, useToast } from './primitives.js';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import React__default from 'react';
|
|
6
|
+
export { AuditCheck, AuditResults, AuditResultsProps, BannerType, ContextBadge, FormAudit, StatusBanner, StatusBannerProps, StatusBar, StatusBarProps, TerminalLine, TerminalPanel, TerminalProps, WorkspaceLayout, WorkspaceLayoutProps } from './workspace.js';
|
|
7
|
+
export { ChatContainer, ChatInput, ChatInputProps, ChatMessage, ChatMessageList, ChatMessageListProps, ChatMessageProps, Message, MessageList, MessageRole, PendingFile, ThinkingIndicator, UserMessage } from './chat.js';
|
|
8
|
+
export { F as FeedSegment, T as ToolCallData, a as ToolCallFeed, b as ToolCallFeedProps, c as ToolCallGroup, d as ToolCallGroupProps, e as ToolCallStatus, f as ToolCallStep, g as ToolCallStepProps, h as ToolCallType, p as parseToolEvent } from './tool-call-feed-D5Ume-Pt.js';
|
|
9
|
+
export { E as ExpandedToolDetail, I as InlineThinkingItem, c as InlineToolItem, R as RunGroup } from './expanded-tool-detail-OkXGqTHe.js';
|
|
10
|
+
import { b as ToolPart } from './parts-CyGkM6Fp.js';
|
|
11
|
+
export { R as ReasoningPart, S as SessionMessage, a as SessionPart, T as TextPart, c as ToolState, d as ToolStatus, e as ToolTime } from './parts-CyGkM6Fp.js';
|
|
12
|
+
export { FileNode, FilePreview, FilePreviewProps, FileTabData, FileTabs, FileTabsProps, FileTree, FileTreeProps } from './files.js';
|
|
13
|
+
export { Backend, BackendSelector, BackendSelectorProps, DashboardLayout, DashboardLayoutProps, DashboardUser, NavItem, ProfileComparison, ProfileComparisonProps, ProfileSelector, ProfileSelectorProps, VariantList, VariantListProps } from './dashboard.js';
|
|
14
|
+
export { c as BillingDashboard, d as BillingDashboardProps, e as PricingCards, f as PricingPageProps, g as UsageChart, h as UsageChartProps, U as UsageDataPoint } from './usage-chart-DINgSVL5.js';
|
|
15
|
+
export { AuthHeader, GitHubLoginButton, UserMenu } from './auth.js';
|
|
16
|
+
export { CodeBlock, CopyButton, Markdown, MarkdownProps, SimpleMarkdown, SimpleMarkdownProps, simpleMarkdownStyles } from './markdown.js';
|
|
17
|
+
export { o as UseToolCallStreamReturn, p as createAuthFetcher, u as useApiKey, q as useAuth, r as useAutoScroll, s as useDropdownMenu, t as usePtySession, v as useRunCollapseState, w as useRunGroups, x as useSSEStream, y as useSessionStream, z as useSidecarAuth, D as useToolCallStream } from './use-sidecar-auth-Bb0-w3lX.js';
|
|
18
|
+
export { G as GroupedMessage, R as Run, b as RunStats, T as ToolCategory } from './run-CtFZ6s-D.js';
|
|
19
|
+
export { S as Session } from './sidecar-CFU2W9j1.js';
|
|
20
|
+
export { C as CustomToolRenderer, D as DisplayVariant, T as ToolDisplayMetadata } from './tool-display-BvsVW_Ur.js';
|
|
21
|
+
export { A as AgentBranding } from './branding-DCi5VEik.js';
|
|
22
|
+
export { TOOL_CATEGORY_ICONS, cn, copyText, formatDuration, getToolCategory, getToolDisplayMetadata, getToolErrorText, timeAgo, truncateText } from './utils.js';
|
|
23
|
+
import 'class-variance-authority/types';
|
|
24
|
+
import 'class-variance-authority';
|
|
25
|
+
import '@radix-ui/react-dialog';
|
|
26
|
+
import '@radix-ui/react-avatar';
|
|
27
|
+
import '@radix-ui/react-dropdown-menu';
|
|
28
|
+
import '@radix-ui/react-select';
|
|
29
|
+
import '@radix-ui/react-tabs';
|
|
30
|
+
import '@radix-ui/react-progress';
|
|
31
|
+
import '@radix-ui/react-switch';
|
|
32
|
+
import '@radix-ui/react-label';
|
|
33
|
+
import 'clsx';
|
|
34
|
+
|
|
35
|
+
interface LogoProps {
|
|
36
|
+
variant?: "sandbox";
|
|
37
|
+
size?: "sm" | "md" | "lg" | "xl";
|
|
38
|
+
className?: string;
|
|
39
|
+
iconOnly?: boolean;
|
|
40
|
+
}
|
|
41
|
+
declare function TangleKnot({ size, className }: {
|
|
42
|
+
size: number;
|
|
43
|
+
className?: string;
|
|
44
|
+
}): react_jsx_runtime.JSX.Element;
|
|
45
|
+
declare function Logo({ variant, size, className, iconOnly }: LogoProps): react_jsx_runtime.JSX.Element;
|
|
46
|
+
declare namespace Logo {
|
|
47
|
+
var displayName: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
type Theme = "light" | "dark" | "system";
|
|
51
|
+
declare function useTheme(): {
|
|
52
|
+
theme: Theme;
|
|
53
|
+
setTheme: (next: Theme) => void;
|
|
54
|
+
};
|
|
55
|
+
declare function ThemeToggle(): react_jsx_runtime.JSX.Element;
|
|
56
|
+
|
|
57
|
+
interface CodeBlockProps extends React__default.HTMLAttributes<HTMLPreElement> {
|
|
58
|
+
code: string;
|
|
59
|
+
language?: string;
|
|
60
|
+
showCopy?: boolean;
|
|
61
|
+
showLineNumbers?: boolean;
|
|
62
|
+
}
|
|
63
|
+
declare function CodeBlock({ code, language, showCopy, showLineNumbers, className, ...props }: CodeBlockProps): react_jsx_runtime.JSX.Element;
|
|
64
|
+
interface InlineCodeProps extends React__default.HTMLAttributes<HTMLElement> {
|
|
65
|
+
}
|
|
66
|
+
declare function InlineCode({ className, children, ...props }: InlineCodeProps): react_jsx_runtime.JSX.Element;
|
|
67
|
+
|
|
68
|
+
interface TerminalDisplayProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
69
|
+
variant?: "default" | "sandbox";
|
|
70
|
+
title?: string;
|
|
71
|
+
showHeader?: boolean;
|
|
72
|
+
autoScroll?: boolean;
|
|
73
|
+
maxHeight?: string;
|
|
74
|
+
}
|
|
75
|
+
declare const TerminalDisplay: React.ForwardRefExoticComponent<TerminalDisplayProps & React.RefAttributes<HTMLDivElement>>;
|
|
76
|
+
interface TerminalLineProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
77
|
+
type?: "input" | "output" | "error" | "success" | "info" | "thinking" | "command" | "warning";
|
|
78
|
+
prompt?: string;
|
|
79
|
+
timestamp?: string;
|
|
80
|
+
}
|
|
81
|
+
declare const TerminalLine: React.ForwardRefExoticComponent<TerminalLineProps & React.RefAttributes<HTMLDivElement>>;
|
|
82
|
+
declare const TerminalCursor: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
|
|
83
|
+
interface TerminalInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onSubmit"> {
|
|
84
|
+
onSubmit?: (value: string) => void;
|
|
85
|
+
variant?: "default" | "sandbox";
|
|
86
|
+
}
|
|
87
|
+
declare const TerminalInput: React.ForwardRefExoticComponent<TerminalInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
88
|
+
|
|
89
|
+
interface CommandPreviewProps {
|
|
90
|
+
part: ToolPart;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Terminal-style command output preview.
|
|
94
|
+
* Shows the command, exit code, and stdout/stderr with expand/collapse.
|
|
95
|
+
*/
|
|
96
|
+
declare const CommandPreview: React.MemoExoticComponent<({ part }: CommandPreviewProps) => react_jsx_runtime.JSX.Element>;
|
|
97
|
+
|
|
98
|
+
interface WriteFilePreviewProps {
|
|
99
|
+
part: ToolPart;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Preview for file write/create operations.
|
|
103
|
+
* Shows file path, line count, and the written content.
|
|
104
|
+
*/
|
|
105
|
+
declare const WriteFilePreview: React.MemoExoticComponent<({ part }: WriteFilePreviewProps) => react_jsx_runtime.JSX.Element | null>;
|
|
106
|
+
|
|
107
|
+
export { CodeBlock as CodeBlockDisplay, CommandPreview, InlineCode, Logo, type LogoProps, TangleKnot, TerminalDisplay, TerminalCursor as TerminalDisplayCursor, TerminalInput as TerminalDisplayInput, TerminalLine as TerminalDisplayLine, ThemeToggle, ToolPart, WriteFilePreview, useTheme };
|