@tangle-network/sandbox-ui 0.2.2 → 0.3.4
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 +201 -10
- package/dist/auth.js +2 -2
- package/dist/chat-container-C8eHLw8z.d.ts +67 -0
- package/dist/chat.d.ts +70 -78
- package/dist/chat.js +8 -8
- package/dist/chunk-4F2GJRGU.js +756 -0
- package/dist/{chunk-HYEAX3DC.js → chunk-5LV6DZZF.js} +445 -114
- package/dist/{chunk-QSQBDR3N.js → chunk-BX6AQMUS.js} +5 -2
- package/dist/chunk-CCKNIAS7.js +124 -0
- package/dist/chunk-CJ2RYVZH.js +128 -0
- package/dist/{chunk-KMXV7DDX.js → chunk-CNWVHQFY.js} +1 -1
- package/dist/{chunk-OU4TRNQZ.js → chunk-COCSO7FG.js} +3 -3
- package/dist/chunk-FJSVPBKY.js +85 -0
- package/dist/chunk-FRGMMANX.js +102 -0
- package/dist/{chunk-E6FS7R4X.js → chunk-HWLX5NME.js} +1 -1
- package/dist/chunk-HY5IBRCE.js +1171 -0
- package/dist/chunk-JF6E2DS5.js +610 -0
- package/dist/chunk-MUOL44AE.js +121 -0
- package/dist/chunk-MXCSSOGH.js +105 -0
- package/dist/{chunk-NI2EI43H.js → chunk-PDV7W4NY.js} +9 -124
- package/dist/chunk-QGI5E7JD.js +1106 -0
- package/dist/chunk-TQN3VR4F.js +92 -0
- package/dist/{chunk-SOT2V7TX.js → chunk-TXI4MZAZ.js} +62 -144
- package/dist/chunk-WUR652Y3.js +1140 -0
- package/dist/chunk-YDBXQQLC.js +336 -0
- package/dist/{chunk-4EIWPJMJ.js → chunk-ZP6GSX4D.js} +36 -27
- package/dist/dashboard.d.ts +4 -111
- package/dist/dashboard.js +17 -4
- package/dist/{expanded-tool-detail-OkXGqTHe.d.ts → expanded-tool-detail-BDi_h_dZ.d.ts} +11 -4
- package/dist/file-tabs-CmaoDVBI.d.ts +72 -0
- package/dist/files.d.ts +25 -44
- package/dist/files.js +8 -3
- package/{src/styles → dist}/globals.css +16 -67
- package/dist/hooks.d.ts +5 -4
- package/dist/hooks.js +14 -9
- package/dist/index-BOjBJwzD.d.ts +219 -0
- package/dist/index.d.ts +39 -10
- package/dist/index.js +190 -121
- package/dist/markdown.d.ts +1 -24
- package/dist/markdown.js +1 -7
- package/dist/openui.d.ts +115 -0
- package/dist/openui.js +11 -0
- package/dist/pages.d.ts +3 -2
- package/dist/pages.js +19 -16
- package/dist/primitives.js +25 -19
- package/dist/run.d.ts +2 -2
- package/dist/run.js +8 -7
- package/dist/{use-sidecar-auth-Bb0-w3lX.d.ts → sdk-hooks.d.ts} +61 -72
- package/dist/sdk-hooks.js +29 -0
- package/dist/styles.css +179 -0
- package/dist/tokens.css +275 -0
- package/dist/{tool-display-BvsVW_Ur.d.ts → tool-display-Ct9nFAzJ.d.ts} +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/{usage-chart-DINgSVL5.d.ts → usage-chart-CY9xo3KX.d.ts} +8 -3
- package/dist/use-pty-session-DeZSxOCN.d.ts +69 -0
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/dist/workspace.d.ts +171 -33
- package/dist/workspace.js +25 -1
- package/package.json +10 -3
- package/tailwind.config.cjs +39 -0
- package/dist/chunk-2UHPE5T7.js +0 -201
- package/dist/chunk-6MQIDUPA.js +0 -502
- package/dist/chunk-J4OADEUK.js +0 -814
- package/dist/chunk-KYY2X6LY.js +0 -318
- package/dist/chunk-L6ZDH5F4.js +0 -334
- package/dist/chunk-M34OA6PQ.js +0 -233
- package/dist/chunk-M6VLC32S.js +0 -219
- package/dist/chunk-U62G5TS7.js +0 -472
- package/src/styles/tokens.css +0 -73
package/dist/index.d.ts
CHANGED
|
@@ -3,21 +3,25 @@ export { Avatar, AvatarFallback, AvatarImage, Badge, BadgeProps, Card, CardConte
|
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as React from 'react';
|
|
5
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 {
|
|
6
|
+
export { AgentWorkbench, AuditCheck, AuditResults, AuditResultsProps, BannerType, ContextBadge, DirectoryPane, DirectoryPaneProps, FormAudit, RuntimePane, RuntimePaneProps, SandboxWorkbench, SandboxWorkbenchArtifact, SandboxWorkbenchCustomArtifact, SandboxWorkbenchFileArtifact, SandboxWorkbenchLayoutOptions, SandboxWorkbenchMarkdownArtifact, SandboxWorkbenchOpenUIArtifact, SandboxWorkbenchProps, SandboxWorkbenchSessionProps, StatusBanner, StatusBannerProps, StatusBar, StatusBarProps, TerminalLine, TerminalPanel, TerminalProps, WorkspaceLayout, WorkspaceLayoutProps } from './workspace.js';
|
|
7
|
+
export { A as ArtifactPane, a as ArtifactPaneProps, F as FileNode, b as FileTabData, c as FileTabs, d as FileTabsProps, e as FileTree, f as FileTreeProps, g as FileTreeVisibilityOptions, h as filterFileTree } from './file-tabs-CmaoDVBI.js';
|
|
8
|
+
export { OpenUIAction, OpenUIActionsNode, OpenUIArtifactRenderer, OpenUIArtifactRendererProps, OpenUIBadgeNode, OpenUICardNode, OpenUICodeNode, OpenUIComponentNode, OpenUIGridNode, OpenUIHeadingNode, OpenUIKeyValueNode, OpenUIMarkdownNode, OpenUIPrimitive, OpenUISeparatorNode, OpenUIStackNode, OpenUIStatNode, OpenUITableNode, OpenUITextNode } from './openui.js';
|
|
9
|
+
export { AgentTimeline, AgentTimelineArtifactItem, AgentTimelineCustomItem, AgentTimelineItem, AgentTimelineMessageItem, AgentTimelineProps, AgentTimelineStatusItem, AgentTimelineTone, AgentTimelineToolGroupItem, AgentTimelineToolItem, ChatMessage, ChatMessageProps, MessageList, MessageRole, ThinkingIndicator, ThinkingIndicatorProps, UserMessage } from './chat.js';
|
|
10
|
+
export { C as ChatContainer, a as ChatInput, b as ChatInputProps, P as PendingFile } from './chat-container-C8eHLw8z.js';
|
|
8
11
|
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-
|
|
12
|
+
export { E as ExpandedToolDetail, I as InlineThinkingItem, c as InlineToolItem, R as RunGroup } from './expanded-tool-detail-BDi_h_dZ.js';
|
|
10
13
|
import { b as ToolPart } from './parts-CyGkM6Fp.js';
|
|
11
14
|
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 {
|
|
13
|
-
export { Backend, BackendSelector, BackendSelectorProps, DashboardLayout, DashboardLayoutProps, DashboardUser, NavItem, ProfileComparison, ProfileComparisonProps, ProfileSelector, ProfileSelectorProps, VariantList, VariantListProps } from './
|
|
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-
|
|
15
|
+
export { FileArtifactPane, FileArtifactPaneProps, FilePreview, FilePreviewProps } from './files.js';
|
|
16
|
+
export { A as AppSidebar, a as AppSidebarProps, B as Backend, b as BackendSelector, c as BackendSelectorProps, C as ClusterStatusBar, d as ClusterStatusBarProps, e as ClusterStatusItem, D as DashboardLayout, f as DashboardLayoutProps, g as DashboardUser, N as NavItem, h as NewSandboxCard, i as NewSandboxCardProps, P as ProfileComparison, j as ProfileComparisonProps, k as ProfileSelector, l as ProfileSelectorProps, R as ResourceMeter, m as ResourceMeterProps, S as SandboxCard, n as SandboxCardData, o as SandboxCardProps, p as SandboxStatus, q as SandboxTable, r as SandboxTableProps, s as SidebarNavItem, t as SidebarSandbox, T as TopNavLink, V as VariantList, u as VariantListProps } from './index-BOjBJwzD.js';
|
|
17
|
+
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-CY9xo3KX.js';
|
|
15
18
|
export { AuthHeader, GitHubLoginButton, UserMenu } from './auth.js';
|
|
16
|
-
export { CodeBlock, CopyButton, Markdown, MarkdownProps
|
|
17
|
-
export {
|
|
19
|
+
export { CodeBlock, CopyButton, Markdown, MarkdownProps } from './markdown.js';
|
|
20
|
+
export { AppendUserMessageOptions, ApplySdkEventOptions, BeginAssistantMessageOptions, CompleteAssistantMessageOptions, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, UseSdkSessionOptions, UseSdkSessionReturn, UseToolCallStreamReturn, useAutoScroll, useDropdownMenu, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionStream, useSidecarAuth, useToolCallStream } from './sdk-hooks.js';
|
|
21
|
+
export { d as createAuthFetcher, u as useApiKey, e as useAuth, f as usePtySession } from './use-pty-session-DeZSxOCN.js';
|
|
18
22
|
export { G as GroupedMessage, R as Run, b as RunStats, T as ToolCategory } from './run-CtFZ6s-D.js';
|
|
19
23
|
export { S as Session } from './sidecar-CFU2W9j1.js';
|
|
20
|
-
export { C as CustomToolRenderer, D as DisplayVariant, T as ToolDisplayMetadata } from './tool-display-
|
|
24
|
+
export { C as CustomToolRenderer, D as DisplayVariant, T as ToolDisplayMetadata } from './tool-display-Ct9nFAzJ.js';
|
|
21
25
|
export { A as AgentBranding } from './branding-DCi5VEik.js';
|
|
22
26
|
export { TOOL_CATEGORY_ICONS, cn, copyText, formatDuration, getToolCategory, getToolDisplayMetadata, getToolErrorText, timeAgo, truncateText } from './utils.js';
|
|
23
27
|
import 'class-variance-authority/types';
|
|
@@ -67,4 +71,29 @@ interface WriteFilePreviewProps {
|
|
|
67
71
|
*/
|
|
68
72
|
declare const WriteFilePreview: React.MemoExoticComponent<({ part }: WriteFilePreviewProps) => react_jsx_runtime.JSX.Element | null>;
|
|
69
73
|
|
|
70
|
-
|
|
74
|
+
interface GrepResultsPreviewProps {
|
|
75
|
+
part: ToolPart;
|
|
76
|
+
}
|
|
77
|
+
declare const GrepResultsPreview: React.MemoExoticComponent<({ part }: GrepResultsPreviewProps) => react_jsx_runtime.JSX.Element>;
|
|
78
|
+
|
|
79
|
+
interface GlobResultsPreviewProps {
|
|
80
|
+
part: ToolPart;
|
|
81
|
+
}
|
|
82
|
+
declare const GlobResultsPreview: React.MemoExoticComponent<({ part }: GlobResultsPreviewProps) => react_jsx_runtime.JSX.Element>;
|
|
83
|
+
|
|
84
|
+
interface WebSearchPreviewProps {
|
|
85
|
+
part: ToolPart;
|
|
86
|
+
}
|
|
87
|
+
declare const WebSearchPreview: React.MemoExoticComponent<({ part }: WebSearchPreviewProps) => react_jsx_runtime.JSX.Element>;
|
|
88
|
+
|
|
89
|
+
interface QuestionPreviewProps {
|
|
90
|
+
part: ToolPart;
|
|
91
|
+
}
|
|
92
|
+
declare const QuestionPreview: React.MemoExoticComponent<({ part }: QuestionPreviewProps) => react_jsx_runtime.JSX.Element>;
|
|
93
|
+
|
|
94
|
+
interface DiffPreviewProps {
|
|
95
|
+
part: ToolPart;
|
|
96
|
+
}
|
|
97
|
+
declare const DiffPreview: React.MemoExoticComponent<({ part }: DiffPreviewProps) => react_jsx_runtime.JSX.Element>;
|
|
98
|
+
|
|
99
|
+
export { CodeBlock as CodeBlockDisplay, CommandPreview, DiffPreview, GlobResultsPreview, GrepResultsPreview, InlineCode, QuestionPreview, ThemeToggle, ToolPart, WebSearchPreview, WriteFilePreview, useTheme };
|
package/dist/index.js
CHANGED
|
@@ -1,25 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
copyText,
|
|
3
|
+
timeAgo
|
|
4
|
+
} from "./chunk-QD4QE5P5.js";
|
|
1
5
|
import {
|
|
2
6
|
AuthHeader,
|
|
3
7
|
GitHubLoginButton,
|
|
4
8
|
UserMenu
|
|
5
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-COCSO7FG.js";
|
|
6
10
|
import {
|
|
7
11
|
createAuthFetcher,
|
|
8
12
|
useApiKey,
|
|
9
|
-
useAuth
|
|
13
|
+
useAuth
|
|
14
|
+
} from "./chunk-FJSVPBKY.js";
|
|
15
|
+
import {
|
|
16
|
+
usePtySession
|
|
17
|
+
} from "./chunk-GRYHFH5O.js";
|
|
18
|
+
import {
|
|
10
19
|
useDropdownMenu,
|
|
11
20
|
useSSEStream,
|
|
21
|
+
useSdkSession,
|
|
12
22
|
useSessionStream,
|
|
13
23
|
useSidecarAuth,
|
|
14
24
|
useToolCallStream
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
usePtySession
|
|
18
|
-
} from "./chunk-GRYHFH5O.js";
|
|
19
|
-
import {
|
|
20
|
-
copyText,
|
|
21
|
-
timeAgo
|
|
22
|
-
} from "./chunk-QD4QE5P5.js";
|
|
25
|
+
} from "./chunk-5LV6DZZF.js";
|
|
23
26
|
import {
|
|
24
27
|
Label,
|
|
25
28
|
Select,
|
|
@@ -34,14 +37,6 @@ import {
|
|
|
34
37
|
SelectValue,
|
|
35
38
|
StatCard,
|
|
36
39
|
Switch,
|
|
37
|
-
Table,
|
|
38
|
-
TableBody,
|
|
39
|
-
TableCaption,
|
|
40
|
-
TableCell,
|
|
41
|
-
TableFooter,
|
|
42
|
-
TableHead,
|
|
43
|
-
TableHeader,
|
|
44
|
-
TableRow,
|
|
45
40
|
TerminalCursor,
|
|
46
41
|
TerminalDisplay,
|
|
47
42
|
TerminalInput,
|
|
@@ -49,7 +44,7 @@ import {
|
|
|
49
44
|
ToastContainer,
|
|
50
45
|
ToastProvider,
|
|
51
46
|
useToast
|
|
52
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-TXI4MZAZ.js";
|
|
53
48
|
import {
|
|
54
49
|
Avatar,
|
|
55
50
|
AvatarFallback,
|
|
@@ -66,87 +61,118 @@ import {
|
|
|
66
61
|
DialogPortal,
|
|
67
62
|
DialogTitle,
|
|
68
63
|
DialogTrigger,
|
|
69
|
-
EmptyState,
|
|
70
|
-
Input,
|
|
71
64
|
Tabs,
|
|
72
65
|
TabsContent,
|
|
73
66
|
TabsList,
|
|
74
|
-
TabsTrigger
|
|
67
|
+
TabsTrigger
|
|
68
|
+
} from "./chunk-PDV7W4NY.js";
|
|
69
|
+
import {
|
|
70
|
+
ToolCallFeed,
|
|
71
|
+
parseToolEvent
|
|
72
|
+
} from "./chunk-CCKNIAS7.js";
|
|
73
|
+
import {
|
|
74
|
+
AgentWorkbench,
|
|
75
|
+
AuditResults,
|
|
76
|
+
DirectoryPane,
|
|
77
|
+
RuntimePane,
|
|
78
|
+
SandboxWorkbench,
|
|
79
|
+
StatusBanner,
|
|
80
|
+
StatusBar,
|
|
81
|
+
TerminalPanel,
|
|
82
|
+
WorkspaceLayout
|
|
83
|
+
} from "./chunk-QGI5E7JD.js";
|
|
84
|
+
import {
|
|
85
|
+
EmptyState,
|
|
86
|
+
Input,
|
|
75
87
|
Textarea
|
|
76
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-MUOL44AE.js";
|
|
77
89
|
import {
|
|
90
|
+
AgentTimeline,
|
|
78
91
|
ChatContainer,
|
|
79
92
|
ChatInput,
|
|
80
93
|
ChatMessage,
|
|
81
|
-
ChatMessageList,
|
|
82
94
|
MessageList,
|
|
83
95
|
ThinkingIndicator,
|
|
84
96
|
UserMessage
|
|
85
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-4F2GJRGU.js";
|
|
86
98
|
import {
|
|
87
99
|
useAutoScroll,
|
|
88
100
|
useRunCollapseState,
|
|
89
101
|
useRunGroups
|
|
90
|
-
} from "./chunk-
|
|
91
|
-
import {
|
|
92
|
-
ToolCallFeed,
|
|
93
|
-
ToolCallGroup,
|
|
94
|
-
ToolCallStep,
|
|
95
|
-
parseToolEvent
|
|
96
|
-
} from "./chunk-M6VLC32S.js";
|
|
102
|
+
} from "./chunk-CNWVHQFY.js";
|
|
97
103
|
import {
|
|
98
104
|
CommandPreview,
|
|
105
|
+
DiffPreview,
|
|
99
106
|
ExpandedToolDetail,
|
|
107
|
+
GlobResultsPreview,
|
|
108
|
+
GrepResultsPreview,
|
|
100
109
|
InlineThinkingItem,
|
|
101
110
|
InlineToolItem,
|
|
111
|
+
QuestionPreview,
|
|
102
112
|
RunGroup,
|
|
113
|
+
WebSearchPreview,
|
|
103
114
|
WriteFilePreview
|
|
104
|
-
} from "./chunk-
|
|
105
|
-
import {
|
|
106
|
-
CodeBlock,
|
|
107
|
-
CopyButton,
|
|
108
|
-
Markdown
|
|
109
|
-
} from "./chunk-LTFK464G.js";
|
|
110
|
-
import {
|
|
111
|
-
SimpleMarkdown,
|
|
112
|
-
simpleMarkdownStyles
|
|
113
|
-
} from "./chunk-M34OA6PQ.js";
|
|
115
|
+
} from "./chunk-WUR652Y3.js";
|
|
114
116
|
import {
|
|
115
117
|
formatDuration,
|
|
116
118
|
truncateText
|
|
117
119
|
} from "./chunk-HRMUF35V.js";
|
|
120
|
+
import {
|
|
121
|
+
ToolCallGroup,
|
|
122
|
+
ToolCallStep
|
|
123
|
+
} from "./chunk-CJ2RYVZH.js";
|
|
118
124
|
import {
|
|
119
125
|
TOOL_CATEGORY_ICONS,
|
|
120
126
|
getToolCategory,
|
|
121
127
|
getToolDisplayMetadata,
|
|
122
128
|
getToolErrorText
|
|
123
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-BX6AQMUS.js";
|
|
124
130
|
import {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
+
CodeBlock,
|
|
132
|
+
InlineCode,
|
|
133
|
+
OpenUIArtifactRenderer
|
|
134
|
+
} from "./chunk-YDBXQQLC.js";
|
|
135
|
+
import {
|
|
136
|
+
Table,
|
|
137
|
+
TableBody,
|
|
138
|
+
TableCaption,
|
|
139
|
+
TableCell,
|
|
140
|
+
TableFooter,
|
|
141
|
+
TableHead,
|
|
142
|
+
TableHeader,
|
|
143
|
+
TableRow
|
|
144
|
+
} from "./chunk-TQN3VR4F.js";
|
|
131
145
|
import {
|
|
146
|
+
ArtifactPane,
|
|
147
|
+
FileArtifactPane,
|
|
132
148
|
FilePreview,
|
|
133
149
|
FileTabs,
|
|
134
|
-
FileTree
|
|
135
|
-
|
|
150
|
+
FileTree,
|
|
151
|
+
filterFileTree
|
|
152
|
+
} from "./chunk-JF6E2DS5.js";
|
|
153
|
+
import {
|
|
154
|
+
CodeBlock as CodeBlock2,
|
|
155
|
+
CopyButton,
|
|
156
|
+
Markdown
|
|
157
|
+
} from "./chunk-LTFK464G.js";
|
|
136
158
|
import {
|
|
159
|
+
AppSidebar,
|
|
137
160
|
BackendSelector,
|
|
161
|
+
ClusterStatusBar,
|
|
138
162
|
DashboardLayout,
|
|
163
|
+
NewSandboxCard,
|
|
139
164
|
ProfileComparison,
|
|
140
165
|
ProfileSelector,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
166
|
+
ResourceMeter,
|
|
167
|
+
SandboxCard,
|
|
168
|
+
SandboxTable,
|
|
169
|
+
VariantList
|
|
170
|
+
} from "./chunk-HY5IBRCE.js";
|
|
145
171
|
import {
|
|
146
172
|
BillingDashboard,
|
|
147
173
|
PricingPage,
|
|
148
174
|
UsageChart
|
|
149
|
-
} from "./chunk-
|
|
175
|
+
} from "./chunk-ZP6GSX4D.js";
|
|
150
176
|
import {
|
|
151
177
|
Logo,
|
|
152
178
|
TangleKnot
|
|
@@ -168,6 +194,12 @@ import {
|
|
|
168
194
|
DropdownMenuSubTrigger,
|
|
169
195
|
DropdownMenuTrigger
|
|
170
196
|
} from "./chunk-MCGKDCOR.js";
|
|
197
|
+
import {
|
|
198
|
+
Progress,
|
|
199
|
+
Skeleton,
|
|
200
|
+
SkeletonCard,
|
|
201
|
+
SkeletonTable
|
|
202
|
+
} from "./chunk-FRGMMANX.js";
|
|
171
203
|
import {
|
|
172
204
|
Badge,
|
|
173
205
|
Card,
|
|
@@ -176,82 +208,105 @@ import {
|
|
|
176
208
|
CardFooter,
|
|
177
209
|
CardHeader,
|
|
178
210
|
CardTitle,
|
|
179
|
-
Progress,
|
|
180
|
-
Skeleton,
|
|
181
|
-
SkeletonCard,
|
|
182
|
-
SkeletonTable,
|
|
183
211
|
badgeVariants
|
|
184
|
-
} from "./chunk-
|
|
212
|
+
} from "./chunk-MXCSSOGH.js";
|
|
185
213
|
import {
|
|
186
214
|
Button,
|
|
187
215
|
buttonVariants
|
|
188
|
-
} from "./chunk-
|
|
216
|
+
} from "./chunk-HWLX5NME.js";
|
|
189
217
|
import {
|
|
190
218
|
cn
|
|
191
219
|
} from "./chunk-RQHJBTEU.js";
|
|
192
220
|
|
|
193
|
-
// src/primitives/
|
|
194
|
-
import {
|
|
195
|
-
import { useState } from "react";
|
|
221
|
+
// src/primitives/theme-toggle.tsx
|
|
222
|
+
import { useCallback, useEffect, useState } from "react";
|
|
196
223
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
197
|
-
function
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
...props
|
|
204
|
-
}) {
|
|
205
|
-
const [copied, setCopied] = useState(false);
|
|
206
|
-
const handleCopy = async () => {
|
|
207
|
-
await navigator.clipboard.writeText(code);
|
|
208
|
-
setCopied(true);
|
|
209
|
-
setTimeout(() => setCopied(false), 2e3);
|
|
210
|
-
};
|
|
211
|
-
const lines = code.split("\n");
|
|
212
|
-
return /* @__PURE__ */ jsxs("div", { className: "group relative", children: [
|
|
213
|
-
/* @__PURE__ */ jsx(
|
|
214
|
-
"pre",
|
|
215
|
-
{
|
|
216
|
-
className: clsx(
|
|
217
|
-
"overflow-x-auto rounded-lg border border-[#262626] bg-[#0a0a0a] p-4 font-mono text-sm",
|
|
218
|
-
className
|
|
219
|
-
),
|
|
220
|
-
...props,
|
|
221
|
-
children: /* @__PURE__ */ jsx("code", { className: language ? `language-${language}` : void 0, children: showLineNumbers ? /* @__PURE__ */ jsx("table", { className: "w-full", children: /* @__PURE__ */ jsx("tbody", { children: lines.map((line, i) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
222
|
-
/* @__PURE__ */ jsx("td", { className: "w-8 select-none pr-4 text-right text-[#525252]", children: i + 1 }),
|
|
223
|
-
/* @__PURE__ */ jsx("td", { className: "text-[#a1a1a1]", children: line || " " })
|
|
224
|
-
] }, i)) }) }) : /* @__PURE__ */ jsx("span", { className: "text-[#a1a1a1]", children: code }) })
|
|
225
|
-
}
|
|
226
|
-
),
|
|
227
|
-
showCopy && /* @__PURE__ */ jsx(
|
|
228
|
-
"button",
|
|
229
|
-
{
|
|
230
|
-
onClick: handleCopy,
|
|
231
|
-
className: clsx(
|
|
232
|
-
"absolute top-2 right-2 rounded px-2 py-1 text-xs",
|
|
233
|
-
"bg-[#262626] text-[#a1a1a1] hover:bg-[#363636] hover:text-white",
|
|
234
|
-
"opacity-0 transition-opacity group-hover:opacity-100"
|
|
235
|
-
),
|
|
236
|
-
children: copied ? "Copied!" : "Copy"
|
|
237
|
-
}
|
|
238
|
-
)
|
|
239
|
-
] });
|
|
224
|
+
function getSystemTheme() {
|
|
225
|
+
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
226
|
+
}
|
|
227
|
+
function applyTheme(theme) {
|
|
228
|
+
const resolved = theme === "system" ? getSystemTheme() : theme;
|
|
229
|
+
document.documentElement.classList.toggle("dark", resolved === "dark");
|
|
240
230
|
}
|
|
241
|
-
function
|
|
231
|
+
function useTheme() {
|
|
232
|
+
const [theme, setThemeState] = useState(() => {
|
|
233
|
+
if (typeof window === "undefined") return "system";
|
|
234
|
+
return localStorage.getItem("theme") ?? "system";
|
|
235
|
+
});
|
|
236
|
+
const setTheme = useCallback((next) => {
|
|
237
|
+
setThemeState(next);
|
|
238
|
+
if (next === "system") {
|
|
239
|
+
localStorage.removeItem("theme");
|
|
240
|
+
} else {
|
|
241
|
+
localStorage.setItem("theme", next);
|
|
242
|
+
}
|
|
243
|
+
applyTheme(next);
|
|
244
|
+
}, []);
|
|
245
|
+
useEffect(() => {
|
|
246
|
+
applyTheme(theme);
|
|
247
|
+
if (theme !== "system") return;
|
|
248
|
+
const mq = window.matchMedia("(prefers-color-scheme: dark)");
|
|
249
|
+
const handler = () => applyTheme("system");
|
|
250
|
+
mq.addEventListener("change", handler);
|
|
251
|
+
return () => mq.removeEventListener("change", handler);
|
|
252
|
+
}, [theme]);
|
|
253
|
+
return { theme, setTheme };
|
|
254
|
+
}
|
|
255
|
+
var iconClass = "h-4 w-4";
|
|
256
|
+
function SunIcon() {
|
|
257
|
+
return /* @__PURE__ */ jsxs(
|
|
258
|
+
"svg",
|
|
259
|
+
{
|
|
260
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
261
|
+
viewBox: "0 0 24 24",
|
|
262
|
+
fill: "none",
|
|
263
|
+
stroke: "currentColor",
|
|
264
|
+
strokeWidth: 2,
|
|
265
|
+
strokeLinecap: "round",
|
|
266
|
+
strokeLinejoin: "round",
|
|
267
|
+
className: iconClass,
|
|
268
|
+
children: [
|
|
269
|
+
/* @__PURE__ */ jsx("circle", { cx: 12, cy: 12, r: 5 }),
|
|
270
|
+
/* @__PURE__ */ jsx("path", { d: "M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42" })
|
|
271
|
+
]
|
|
272
|
+
}
|
|
273
|
+
);
|
|
274
|
+
}
|
|
275
|
+
function MoonIcon() {
|
|
242
276
|
return /* @__PURE__ */ jsx(
|
|
243
|
-
"
|
|
277
|
+
"svg",
|
|
244
278
|
{
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
279
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
280
|
+
viewBox: "0 0 24 24",
|
|
281
|
+
fill: "none",
|
|
282
|
+
stroke: "currentColor",
|
|
283
|
+
strokeWidth: 2,
|
|
284
|
+
strokeLinecap: "round",
|
|
285
|
+
strokeLinejoin: "round",
|
|
286
|
+
className: iconClass,
|
|
287
|
+
children: /* @__PURE__ */ jsx("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" })
|
|
288
|
+
}
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
function ThemeToggle() {
|
|
292
|
+
const { theme, setTheme } = useTheme();
|
|
293
|
+
const resolved = theme === "system" ? getSystemTheme() : theme;
|
|
294
|
+
return /* @__PURE__ */ jsx(
|
|
295
|
+
"button",
|
|
296
|
+
{
|
|
297
|
+
type: "button",
|
|
298
|
+
onClick: () => setTheme(resolved === "dark" ? "light" : "dark"),
|
|
299
|
+
className: "inline-flex items-center justify-center rounded-md p-2 text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors",
|
|
300
|
+
"aria-label": `Switch to ${resolved === "dark" ? "light" : "dark"} mode`,
|
|
301
|
+
children: resolved === "dark" ? /* @__PURE__ */ jsx(SunIcon, {}) : /* @__PURE__ */ jsx(MoonIcon, {})
|
|
251
302
|
}
|
|
252
303
|
);
|
|
253
304
|
}
|
|
254
305
|
export {
|
|
306
|
+
AgentTimeline,
|
|
307
|
+
AgentWorkbench,
|
|
308
|
+
AppSidebar,
|
|
309
|
+
ArtifactPane,
|
|
255
310
|
AuditResults,
|
|
256
311
|
AuthHeader,
|
|
257
312
|
Avatar,
|
|
@@ -270,9 +325,9 @@ export {
|
|
|
270
325
|
ChatContainer,
|
|
271
326
|
ChatInput,
|
|
272
327
|
ChatMessage,
|
|
273
|
-
|
|
274
|
-
CodeBlock,
|
|
275
|
-
|
|
328
|
+
ClusterStatusBar,
|
|
329
|
+
CodeBlock2 as CodeBlock,
|
|
330
|
+
CodeBlock as CodeBlockDisplay,
|
|
276
331
|
CommandPreview,
|
|
277
332
|
CopyButton,
|
|
278
333
|
DashboardLayout,
|
|
@@ -286,6 +341,8 @@ export {
|
|
|
286
341
|
DialogPortal,
|
|
287
342
|
DialogTitle,
|
|
288
343
|
DialogTrigger,
|
|
344
|
+
DiffPreview,
|
|
345
|
+
DirectoryPane,
|
|
289
346
|
DropdownMenu,
|
|
290
347
|
DropdownMenuCheckboxItem,
|
|
291
348
|
DropdownMenuContent,
|
|
@@ -303,10 +360,13 @@ export {
|
|
|
303
360
|
DropdownMenuTrigger,
|
|
304
361
|
EmptyState,
|
|
305
362
|
ExpandedToolDetail,
|
|
363
|
+
FileArtifactPane,
|
|
306
364
|
FilePreview,
|
|
307
365
|
FileTabs,
|
|
308
366
|
FileTree,
|
|
309
367
|
GitHubLoginButton,
|
|
368
|
+
GlobResultsPreview,
|
|
369
|
+
GrepResultsPreview,
|
|
310
370
|
InlineCode,
|
|
311
371
|
InlineThinkingItem,
|
|
312
372
|
InlineToolItem,
|
|
@@ -315,11 +375,19 @@ export {
|
|
|
315
375
|
Logo,
|
|
316
376
|
Markdown,
|
|
317
377
|
MessageList,
|
|
378
|
+
NewSandboxCard,
|
|
379
|
+
OpenUIArtifactRenderer,
|
|
318
380
|
PricingPage as PricingCards,
|
|
319
381
|
ProfileComparison,
|
|
320
382
|
ProfileSelector,
|
|
321
383
|
Progress,
|
|
384
|
+
QuestionPreview,
|
|
385
|
+
ResourceMeter,
|
|
322
386
|
RunGroup,
|
|
387
|
+
RuntimePane,
|
|
388
|
+
SandboxCard,
|
|
389
|
+
SandboxTable,
|
|
390
|
+
SandboxWorkbench,
|
|
323
391
|
Select,
|
|
324
392
|
SelectContent,
|
|
325
393
|
SelectGroup,
|
|
@@ -330,7 +398,6 @@ export {
|
|
|
330
398
|
SelectSeparator,
|
|
331
399
|
SelectTrigger,
|
|
332
400
|
SelectValue,
|
|
333
|
-
SimpleMarkdown,
|
|
334
401
|
Skeleton,
|
|
335
402
|
SkeletonCard,
|
|
336
403
|
SkeletonTable,
|
|
@@ -369,6 +436,7 @@ export {
|
|
|
369
436
|
UserMenu,
|
|
370
437
|
UserMessage,
|
|
371
438
|
VariantList,
|
|
439
|
+
WebSearchPreview,
|
|
372
440
|
WorkspaceLayout,
|
|
373
441
|
WriteFilePreview,
|
|
374
442
|
badgeVariants,
|
|
@@ -376,12 +444,12 @@ export {
|
|
|
376
444
|
cn,
|
|
377
445
|
copyText,
|
|
378
446
|
createAuthFetcher,
|
|
447
|
+
filterFileTree,
|
|
379
448
|
formatDuration,
|
|
380
449
|
getToolCategory,
|
|
381
450
|
getToolDisplayMetadata,
|
|
382
451
|
getToolErrorText,
|
|
383
452
|
parseToolEvent,
|
|
384
|
-
simpleMarkdownStyles,
|
|
385
453
|
timeAgo,
|
|
386
454
|
truncateText,
|
|
387
455
|
useApiKey,
|
|
@@ -392,6 +460,7 @@ export {
|
|
|
392
460
|
useRunCollapseState,
|
|
393
461
|
useRunGroups,
|
|
394
462
|
useSSEStream,
|
|
463
|
+
useSdkSession,
|
|
395
464
|
useSessionStream,
|
|
396
465
|
useSidecarAuth,
|
|
397
466
|
useTheme,
|
package/dist/markdown.d.ts
CHANGED
|
@@ -2,29 +2,6 @@ import * as React from 'react';
|
|
|
2
2
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* SimpleMarkdown — lightweight markdown renderer with Tangle styling.
|
|
7
|
-
*
|
|
8
|
-
* GFM tables, fenced code blocks with syntax highlighting,
|
|
9
|
-
* lists, links, blockquotes, headings. Tangle dark theme.
|
|
10
|
-
* No external dependencies (no react-markdown).
|
|
11
|
-
*/
|
|
12
|
-
interface SimpleMarkdownProps {
|
|
13
|
-
content: string;
|
|
14
|
-
className?: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Lightweight markdown renderer — no external dependency.
|
|
18
|
-
* Handles the common patterns: headings, bold, italic, code, links, lists, tables, blockquotes.
|
|
19
|
-
* For full GFM, consumers can swap in react-markdown at the app level.
|
|
20
|
-
*/
|
|
21
|
-
declare function SimpleMarkdown({ content, className }: SimpleMarkdownProps): react_jsx_runtime.JSX.Element;
|
|
22
|
-
/**
|
|
23
|
-
* CSS for the markdown renderer. Import this in your app's global styles
|
|
24
|
-
* or include via <style> tag.
|
|
25
|
-
*/
|
|
26
|
-
declare const simpleMarkdownStyles = "\n.tangle-prose {\n font-family: var(--font-sans);\n color: var(--text-primary);\n font-size: 0.9375rem;\n line-height: 1.6;\n}\n.tangle-prose p { margin: 0.5em 0; }\n.tangle-prose p:last-child { margin-bottom: 0; }\n.tangle-h1 { font-size: 1.5rem; font-weight: 700; margin: 1em 0 0.5em; }\n.tangle-h2 { font-size: 1.25rem; font-weight: 700; margin: 1em 0 0.5em; }\n.tangle-h3 { font-size: 1.1rem; font-weight: 600; margin: 0.75em 0 0.4em; }\n.tangle-h4, .tangle-h5, .tangle-h6 { font-size: 1rem; font-weight: 600; margin: 0.5em 0 0.3em; }\n.tangle-inline-code {\n font-family: var(--font-mono);\n font-size: 0.85em;\n background: var(--bg-input);\n border: 1px solid var(--border-subtle);\n border-radius: 4px;\n padding: 0.15em 0.4em;\n}\n.tangle-code-block {\n position: relative;\n margin: 0.75em 0;\n background: var(--bg-input);\n border: 1px solid var(--border-subtle);\n border-radius: var(--radius-md);\n overflow: hidden;\n}\n.tangle-code-lang {\n position: absolute;\n top: 8px;\n right: 12px;\n font-family: var(--font-mono);\n font-size: 11px;\n color: var(--text-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.tangle-code-block pre {\n margin: 0;\n padding: 1rem;\n overflow-x: auto;\n font-family: var(--font-mono);\n font-size: 13px;\n line-height: 1.55;\n color: var(--text-secondary);\n}\n.tangle-link {\n color: var(--brand-cool);\n text-decoration: none;\n}\n.tangle-link:hover { text-decoration: underline; }\n.tangle-blockquote {\n border-left: 3px solid var(--border-accent);\n padding: 0.5em 1em;\n margin: 0.5em 0;\n color: var(--text-secondary);\n}\n.tangle-list {\n margin: 0.5em 0;\n padding-left: 1.5em;\n}\n.tangle-list li { margin: 0.2em 0; }\n.tangle-list-ordered { list-style-type: decimal; }\n.tangle-table-wrap { overflow-x: auto; margin: 0.75em 0; }\n.tangle-table {\n width: 100%;\n border-collapse: collapse;\n font-size: 0.875rem;\n}\n.tangle-table th {\n text-align: left;\n padding: 0.5em 0.75em;\n border-bottom: 2px solid var(--border-default);\n font-weight: 600;\n color: var(--text-secondary);\n white-space: nowrap;\n}\n.tangle-table td {\n padding: 0.4em 0.75em;\n border-bottom: 1px solid var(--border-subtle);\n color: var(--text-secondary);\n}\n.tangle-table tr:hover td { background: var(--bg-hover); }\n.tangle-hr {\n border: none;\n border-top: 1px solid var(--border-subtle);\n margin: 1em 0;\n}\nstrong { font-weight: 700; }\nem { font-style: italic; }\n";
|
|
27
|
-
|
|
28
5
|
interface MarkdownProps {
|
|
29
6
|
children: string;
|
|
30
7
|
className?: string;
|
|
@@ -52,4 +29,4 @@ declare const CopyButton: React.MemoExoticComponent<({ text }: {
|
|
|
52
29
|
text: string;
|
|
53
30
|
}) => react_jsx_runtime.JSX.Element>;
|
|
54
31
|
|
|
55
|
-
export { CodeBlock, type CodeBlockProps, CopyButton, Markdown, type MarkdownProps
|
|
32
|
+
export { CodeBlock, type CodeBlockProps, CopyButton, Markdown, type MarkdownProps };
|
package/dist/markdown.js
CHANGED
|
@@ -3,15 +3,9 @@ import {
|
|
|
3
3
|
CopyButton,
|
|
4
4
|
Markdown
|
|
5
5
|
} from "./chunk-LTFK464G.js";
|
|
6
|
-
import {
|
|
7
|
-
SimpleMarkdown,
|
|
8
|
-
simpleMarkdownStyles
|
|
9
|
-
} from "./chunk-M34OA6PQ.js";
|
|
10
6
|
import "./chunk-RQHJBTEU.js";
|
|
11
7
|
export {
|
|
12
8
|
CodeBlock,
|
|
13
9
|
CopyButton,
|
|
14
|
-
Markdown
|
|
15
|
-
SimpleMarkdown,
|
|
16
|
-
simpleMarkdownStyles
|
|
10
|
+
Markdown
|
|
17
11
|
};
|