@tangle-network/sandbox-ui 0.2.2 → 0.3.3
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-67C53XVV.js +1106 -0
- 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-JF6E2DS5.js +610 -0
- package/dist/chunk-MUOL44AE.js +121 -0
- package/dist/chunk-MXCSSOGH.js +105 -0
- package/dist/{chunk-J4OADEUK.js → chunk-OM6ON27W.js} +24 -9
- package/dist/{chunk-NI2EI43H.js → chunk-PDV7W4NY.js} +9 -124
- 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 +5 -2
- package/dist/dashboard.js +5 -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.d.ts +38 -9
- package/dist/index.js +100 -126
- 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 +165 -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/dist/chunk-2UHPE5T7.js +0 -201
- package/dist/chunk-6MQIDUPA.js +0 -502
- 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/primitives.js
CHANGED
|
@@ -12,14 +12,6 @@ import {
|
|
|
12
12
|
SelectValue,
|
|
13
13
|
StatCard,
|
|
14
14
|
Switch,
|
|
15
|
-
Table,
|
|
16
|
-
TableBody,
|
|
17
|
-
TableCaption,
|
|
18
|
-
TableCell,
|
|
19
|
-
TableFooter,
|
|
20
|
-
TableHead,
|
|
21
|
-
TableHeader,
|
|
22
|
-
TableRow,
|
|
23
15
|
TerminalCursor,
|
|
24
16
|
TerminalDisplay,
|
|
25
17
|
TerminalInput,
|
|
@@ -27,7 +19,7 @@ import {
|
|
|
27
19
|
ToastContainer,
|
|
28
20
|
ToastProvider,
|
|
29
21
|
useToast
|
|
30
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-TXI4MZAZ.js";
|
|
31
23
|
import {
|
|
32
24
|
Avatar,
|
|
33
25
|
AvatarFallback,
|
|
@@ -44,14 +36,26 @@ import {
|
|
|
44
36
|
DialogPortal,
|
|
45
37
|
DialogTitle,
|
|
46
38
|
DialogTrigger,
|
|
47
|
-
EmptyState,
|
|
48
|
-
Input,
|
|
49
39
|
Tabs,
|
|
50
40
|
TabsContent,
|
|
51
41
|
TabsList,
|
|
52
|
-
TabsTrigger
|
|
42
|
+
TabsTrigger
|
|
43
|
+
} from "./chunk-PDV7W4NY.js";
|
|
44
|
+
import {
|
|
45
|
+
EmptyState,
|
|
46
|
+
Input,
|
|
53
47
|
Textarea
|
|
54
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-MUOL44AE.js";
|
|
49
|
+
import {
|
|
50
|
+
Table,
|
|
51
|
+
TableBody,
|
|
52
|
+
TableCaption,
|
|
53
|
+
TableCell,
|
|
54
|
+
TableFooter,
|
|
55
|
+
TableHead,
|
|
56
|
+
TableHeader,
|
|
57
|
+
TableRow
|
|
58
|
+
} from "./chunk-TQN3VR4F.js";
|
|
55
59
|
import {
|
|
56
60
|
Logo,
|
|
57
61
|
TangleKnot
|
|
@@ -73,6 +77,12 @@ import {
|
|
|
73
77
|
DropdownMenuSubTrigger,
|
|
74
78
|
DropdownMenuTrigger
|
|
75
79
|
} from "./chunk-MCGKDCOR.js";
|
|
80
|
+
import {
|
|
81
|
+
Progress,
|
|
82
|
+
Skeleton,
|
|
83
|
+
SkeletonCard,
|
|
84
|
+
SkeletonTable
|
|
85
|
+
} from "./chunk-FRGMMANX.js";
|
|
76
86
|
import {
|
|
77
87
|
Badge,
|
|
78
88
|
Card,
|
|
@@ -81,16 +91,12 @@ import {
|
|
|
81
91
|
CardFooter,
|
|
82
92
|
CardHeader,
|
|
83
93
|
CardTitle,
|
|
84
|
-
Progress,
|
|
85
|
-
Skeleton,
|
|
86
|
-
SkeletonCard,
|
|
87
|
-
SkeletonTable,
|
|
88
94
|
badgeVariants
|
|
89
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-MXCSSOGH.js";
|
|
90
96
|
import {
|
|
91
97
|
Button,
|
|
92
98
|
buttonVariants
|
|
93
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-HWLX5NME.js";
|
|
94
100
|
import "./chunk-RQHJBTEU.js";
|
|
95
101
|
export {
|
|
96
102
|
Avatar,
|
package/dist/run.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { E as ExpandedToolDetail, a as ExpandedToolDetailProps, I as InlineThinkingItem, b as InlineThinkingItemProps, c as InlineToolItem, d as InlineToolItemProps, R as RunGroup, e as RunGroupProps } from './expanded-tool-detail-
|
|
1
|
+
export { E as ExpandedToolDetail, a as ExpandedToolDetailProps, I as InlineThinkingItem, b as InlineThinkingItemProps, c as InlineToolItem, d as InlineToolItemProps, R as RunGroup, e as RunGroupProps } from './expanded-tool-detail-BDi_h_dZ.js';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
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';
|
|
4
4
|
import 'react';
|
|
5
5
|
import './run-CtFZ6s-D.js';
|
|
6
6
|
import './parts-CyGkM6Fp.js';
|
|
7
7
|
import './branding-DCi5VEik.js';
|
|
8
|
-
import './tool-display-
|
|
8
|
+
import './tool-display-Ct9nFAzJ.js';
|
|
9
9
|
|
|
10
10
|
declare function LiveDuration({ startTime }: {
|
|
11
11
|
startTime: number;
|
package/dist/run.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ToolCallFeed,
|
|
3
|
-
ToolCallGroup,
|
|
4
|
-
ToolCallStep,
|
|
5
3
|
parseToolEvent
|
|
6
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CCKNIAS7.js";
|
|
7
5
|
import {
|
|
8
6
|
ExpandedToolDetail,
|
|
9
7
|
InlineThinkingItem,
|
|
10
8
|
InlineToolItem,
|
|
11
9
|
LiveDuration,
|
|
12
10
|
RunGroup
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-LTFK464G.js";
|
|
15
|
-
import "./chunk-M34OA6PQ.js";
|
|
11
|
+
} from "./chunk-WUR652Y3.js";
|
|
16
12
|
import "./chunk-HRMUF35V.js";
|
|
17
|
-
import
|
|
13
|
+
import {
|
|
14
|
+
ToolCallGroup,
|
|
15
|
+
ToolCallStep
|
|
16
|
+
} from "./chunk-CJ2RYVZH.js";
|
|
17
|
+
import "./chunk-BX6AQMUS.js";
|
|
18
|
+
import "./chunk-LTFK464G.js";
|
|
18
19
|
import "./chunk-RQHJBTEU.js";
|
|
19
20
|
export {
|
|
20
21
|
ExpandedToolDetail,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { F as FeedSegment } from './tool-call-feed-D5Ume-Pt.js';
|
|
2
|
-
import { S as SessionMessage, a as SessionPart } from './parts-CyGkM6Fp.js';
|
|
3
|
-
import { G as GroupedMessage, R as Run } from './run-CtFZ6s-D.js';
|
|
4
1
|
import * as React from 'react';
|
|
5
2
|
import { RefObject } from 'react';
|
|
3
|
+
import { G as GroupedMessage, R as Run } from './run-CtFZ6s-D.js';
|
|
4
|
+
import { S as SessionMessage, a as SessionPart } from './parts-CyGkM6Fp.js';
|
|
5
|
+
import { F as FeedSegment } from './tool-call-feed-D5Ume-Pt.js';
|
|
6
|
+
import 'react/jsx-runtime';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* useToolCallStream — parses SSE events into ToolCallFeed segments.
|
|
@@ -32,45 +33,6 @@ interface UseToolCallStreamReturn {
|
|
|
32
33
|
}
|
|
33
34
|
declare function useToolCallStream(): UseToolCallStreamReturn;
|
|
34
35
|
|
|
35
|
-
interface AuthUser {
|
|
36
|
-
customer_id: string;
|
|
37
|
-
email: string;
|
|
38
|
-
name?: string;
|
|
39
|
-
tier: string;
|
|
40
|
-
github?: {
|
|
41
|
-
login: string;
|
|
42
|
-
connected: boolean;
|
|
43
|
-
} | null;
|
|
44
|
-
session_expires_at?: string;
|
|
45
|
-
}
|
|
46
|
-
interface UseAuthOptions {
|
|
47
|
-
apiBaseUrl: string;
|
|
48
|
-
revalidateOnFocus?: boolean;
|
|
49
|
-
shouldRetryOnError?: boolean;
|
|
50
|
-
}
|
|
51
|
-
interface UseAuthResult {
|
|
52
|
-
user: AuthUser | null;
|
|
53
|
-
isLoading: boolean;
|
|
54
|
-
isError: boolean;
|
|
55
|
-
error: Error | null;
|
|
56
|
-
mutate: () => Promise<void>;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Hook for managing authentication state.
|
|
60
|
-
* Fetches user session from the API and provides loading/error states.
|
|
61
|
-
*/
|
|
62
|
-
declare function useAuth({ apiBaseUrl, revalidateOnFocus, shouldRetryOnError, }: UseAuthOptions): UseAuthResult;
|
|
63
|
-
/**
|
|
64
|
-
* Creates a fetcher function that includes auth credentials.
|
|
65
|
-
* Uses both cookie-based session and localStorage API key for backwards compatibility.
|
|
66
|
-
*/
|
|
67
|
-
declare function createAuthFetcher(_apiBaseUrl: string): <T = unknown>(url: string, options?: RequestInit) => Promise<T>;
|
|
68
|
-
/**
|
|
69
|
-
* Hook to get the API key from localStorage.
|
|
70
|
-
* For backwards compatibility with API key-based auth.
|
|
71
|
-
*/
|
|
72
|
-
declare function useApiKey(): string | null;
|
|
73
|
-
|
|
74
36
|
/**
|
|
75
37
|
* SSE Event data structure
|
|
76
38
|
*/
|
|
@@ -194,6 +156,62 @@ interface BotStreamEvent {
|
|
|
194
156
|
timestamp: number;
|
|
195
157
|
}
|
|
196
158
|
|
|
159
|
+
interface SdkSessionAttachment {
|
|
160
|
+
name: string;
|
|
161
|
+
size?: number;
|
|
162
|
+
}
|
|
163
|
+
interface SdkSessionSeed {
|
|
164
|
+
id: string;
|
|
165
|
+
role: SessionMessage["role"];
|
|
166
|
+
createdAt?: number | string | Date;
|
|
167
|
+
content?: string;
|
|
168
|
+
attachments?: SdkSessionAttachment[];
|
|
169
|
+
parts?: SessionPart[];
|
|
170
|
+
}
|
|
171
|
+
interface SdkSessionEvent {
|
|
172
|
+
type: string;
|
|
173
|
+
data?: Record<string, unknown>;
|
|
174
|
+
}
|
|
175
|
+
interface BeginAssistantMessageOptions {
|
|
176
|
+
id?: string;
|
|
177
|
+
role?: Extract<SessionMessage["role"], "assistant" | "system">;
|
|
178
|
+
createdAt?: number | string | Date;
|
|
179
|
+
}
|
|
180
|
+
interface AppendUserMessageOptions {
|
|
181
|
+
id?: string;
|
|
182
|
+
role?: Extract<SessionMessage["role"], "user" | "system">;
|
|
183
|
+
content: string;
|
|
184
|
+
createdAt?: number | string | Date;
|
|
185
|
+
attachments?: SdkSessionAttachment[];
|
|
186
|
+
}
|
|
187
|
+
interface CompleteAssistantMessageOptions {
|
|
188
|
+
messageId?: string;
|
|
189
|
+
finalText?: string;
|
|
190
|
+
}
|
|
191
|
+
interface ApplySdkEventOptions {
|
|
192
|
+
messageId?: string;
|
|
193
|
+
}
|
|
194
|
+
interface UseSdkSessionOptions {
|
|
195
|
+
initialMessages?: SdkSessionSeed[];
|
|
196
|
+
}
|
|
197
|
+
interface UseSdkSessionReturn {
|
|
198
|
+
messages: SessionMessage[];
|
|
199
|
+
partMap: Record<string, SessionPart[]>;
|
|
200
|
+
isStreaming: boolean;
|
|
201
|
+
activeAssistantMessageId: string | null;
|
|
202
|
+
replaceHistory: (messages: SdkSessionSeed[]) => void;
|
|
203
|
+
appendUserMessage: (message: AppendUserMessageOptions) => string;
|
|
204
|
+
beginAssistantMessage: (options?: BeginAssistantMessageOptions) => string;
|
|
205
|
+
applySdkEvent: (event: SdkSessionEvent, options?: ApplySdkEventOptions) => void;
|
|
206
|
+
completeAssistantMessage: (options?: CompleteAssistantMessageOptions) => void;
|
|
207
|
+
failAssistantMessage: (error: string, options?: {
|
|
208
|
+
messageId?: string;
|
|
209
|
+
}) => void;
|
|
210
|
+
setStreaming: (value: boolean) => void;
|
|
211
|
+
reset: () => void;
|
|
212
|
+
}
|
|
213
|
+
declare function useSdkSession({ initialMessages, }?: UseSdkSessionOptions): UseSdkSessionReturn;
|
|
214
|
+
|
|
197
215
|
interface UseRunGroupsOptions {
|
|
198
216
|
messages: SessionMessage[];
|
|
199
217
|
partMap: Record<string, SessionPart[]>;
|
|
@@ -276,35 +294,6 @@ declare function useDropdownMenu(options?: UseDropdownMenuOptions): {
|
|
|
276
294
|
close: () => void;
|
|
277
295
|
};
|
|
278
296
|
|
|
279
|
-
interface UsePtySessionOptions {
|
|
280
|
-
/** Base URL of the sidecar (e.g. "http://localhost:9100"). */
|
|
281
|
-
apiUrl: string;
|
|
282
|
-
/** Bearer token for authentication. */
|
|
283
|
-
token: string;
|
|
284
|
-
/** Called with raw PTY output (may contain ANSI escape codes). */
|
|
285
|
-
onData: (data: string) => void;
|
|
286
|
-
}
|
|
287
|
-
interface UsePtySessionReturn {
|
|
288
|
-
/** Whether the SSE stream is connected and receiving data. */
|
|
289
|
-
isConnected: boolean;
|
|
290
|
-
/** Connection or API error, if any. */
|
|
291
|
-
error: string | null;
|
|
292
|
-
/** Send a command to the PTY session. */
|
|
293
|
-
sendCommand: (command: string) => Promise<void>;
|
|
294
|
-
/** Tear down and reconnect. */
|
|
295
|
-
reconnect: () => void;
|
|
296
|
-
}
|
|
297
|
-
/**
|
|
298
|
-
* Manages a PTY session against the sidecar terminal API.
|
|
299
|
-
*
|
|
300
|
-
* Protocol:
|
|
301
|
-
* - POST /terminals → create session → { data: { sessionId } }
|
|
302
|
-
* - GET /terminals/{id}/stream → SSE output (raw PTY with ANSI codes)
|
|
303
|
-
* - POST /terminals/{id}/execute → send command { command: "..." }
|
|
304
|
-
* - DELETE /terminals/{id} → close session
|
|
305
|
-
*/
|
|
306
|
-
declare function usePtySession({ apiUrl, token, onData }: UsePtySessionOptions): UsePtySessionReturn;
|
|
307
|
-
|
|
308
297
|
interface UseSidecarAuthOptions {
|
|
309
298
|
/** Scoping key for token storage (e.g. botId, sandboxId). */
|
|
310
299
|
resourceId: string;
|
|
@@ -336,4 +325,4 @@ interface SidecarAuth {
|
|
|
336
325
|
*/
|
|
337
326
|
declare function useSidecarAuth({ resourceId, apiUrl, signMessage }: UseSidecarAuthOptions): SidecarAuth;
|
|
338
327
|
|
|
339
|
-
export { type AgentStreamEvent
|
|
328
|
+
export { type AgentStreamEvent, type AppendUserMessageOptions, type ApplySdkEventOptions, type AutomationStreamEvent, type BeginAssistantMessageOptions, type BotStreamEvent, type CompleteAssistantMessageOptions, type ConnectionState, type SSEEvent, type SdkSessionAttachment, type SdkSessionEvent, type SdkSessionSeed, type SessionInfo, type SidecarAuth, type TaskStreamEvent, type TerminalStreamEvent, type UseRunGroupsOptions, type UseSSEStreamOptions, type UseSSEStreamResult, type UseSdkSessionOptions, type UseSdkSessionReturn, type UseSessionStreamOptions, type UseSessionStreamResult, type UseSidecarAuthOptions, type UseToolCallStreamReturn, useAutoScroll, useDropdownMenu, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionStream, useSidecarAuth, useToolCallStream };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useDropdownMenu,
|
|
3
|
+
useSSEStream,
|
|
4
|
+
useSdkSession,
|
|
5
|
+
useSessionStream,
|
|
6
|
+
useSidecarAuth,
|
|
7
|
+
useToolCallStream
|
|
8
|
+
} from "./chunk-5LV6DZZF.js";
|
|
9
|
+
import "./chunk-CCKNIAS7.js";
|
|
10
|
+
import {
|
|
11
|
+
useAutoScroll,
|
|
12
|
+
useRunCollapseState,
|
|
13
|
+
useRunGroups
|
|
14
|
+
} from "./chunk-CNWVHQFY.js";
|
|
15
|
+
import "./chunk-CJ2RYVZH.js";
|
|
16
|
+
import "./chunk-BX6AQMUS.js";
|
|
17
|
+
import "./chunk-LTFK464G.js";
|
|
18
|
+
import "./chunk-RQHJBTEU.js";
|
|
19
|
+
export {
|
|
20
|
+
useAutoScroll,
|
|
21
|
+
useDropdownMenu,
|
|
22
|
+
useRunCollapseState,
|
|
23
|
+
useRunGroups,
|
|
24
|
+
useSSEStream,
|
|
25
|
+
useSdkSession,
|
|
26
|
+
useSessionStream,
|
|
27
|
+
useSidecarAuth,
|
|
28
|
+
useToolCallStream
|
|
29
|
+
};
|
package/dist/styles.css
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
@import "./tokens.css";
|
|
2
|
+
|
|
3
|
+
@tailwind base;
|
|
4
|
+
@tailwind components;
|
|
5
|
+
@tailwind utilities;
|
|
6
|
+
|
|
7
|
+
@layer base {
|
|
8
|
+
:root {
|
|
9
|
+
--sandbox: var(--primary);
|
|
10
|
+
--sandbox-glow: var(--info);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
* {
|
|
14
|
+
border-color: hsl(var(--border));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
body {
|
|
18
|
+
@apply antialiased;
|
|
19
|
+
background-color: hsl(var(--background));
|
|
20
|
+
color: hsl(var(--foreground));
|
|
21
|
+
font-family: var(--font-sans);
|
|
22
|
+
font-feature-settings:
|
|
23
|
+
"rlig" 1,
|
|
24
|
+
"calt" 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Custom scrollbar */
|
|
28
|
+
::-webkit-scrollbar {
|
|
29
|
+
width: 8px;
|
|
30
|
+
height: 8px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
::-webkit-scrollbar-track {
|
|
34
|
+
@apply bg-transparent;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
::-webkit-scrollbar-thumb {
|
|
38
|
+
@apply bg-border rounded-full;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
::-webkit-scrollbar-thumb:hover {
|
|
42
|
+
@apply bg-muted-foreground/50;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@layer utilities {
|
|
47
|
+
/* Gradient text -- Tangle default accent */
|
|
48
|
+
.text-gradient-sandbox {
|
|
49
|
+
background-image: var(--tangle-gradient);
|
|
50
|
+
@apply bg-clip-text text-transparent;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* Glow effects */
|
|
54
|
+
.glow-sandbox {
|
|
55
|
+
box-shadow: 0 0 40px -10px hsl(var(--sandbox) / 0.4);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Glass effect */
|
|
59
|
+
.glass {
|
|
60
|
+
backdrop-filter: blur(24px);
|
|
61
|
+
background-color: hsl(var(--card) / 0.8);
|
|
62
|
+
border: 1px solid hsl(var(--border) / 0.5);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Subtle noise texture */
|
|
66
|
+
.noise {
|
|
67
|
+
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
|
|
68
|
+
opacity: 0.02;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* Terminal styling */
|
|
72
|
+
.terminal-cursor {
|
|
73
|
+
@apply inline-block w-2 h-5 bg-foreground animate-pulse;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* Shimmer animation */
|
|
77
|
+
.shimmer {
|
|
78
|
+
background: linear-gradient(
|
|
79
|
+
90deg,
|
|
80
|
+
hsl(var(--muted)) 0%,
|
|
81
|
+
hsl(var(--accent)) 50%,
|
|
82
|
+
hsl(var(--muted)) 100%
|
|
83
|
+
);
|
|
84
|
+
background-size: 200% 100%;
|
|
85
|
+
animation: shimmer 2s infinite;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@keyframes shimmer {
|
|
89
|
+
0% {
|
|
90
|
+
background-position: -200% 0;
|
|
91
|
+
}
|
|
92
|
+
100% {
|
|
93
|
+
background-position: 200% 0;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* Fade in animation */
|
|
98
|
+
.animate-in {
|
|
99
|
+
animation: fade-in 0.3s ease-out;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@keyframes fade-in {
|
|
103
|
+
from {
|
|
104
|
+
opacity: 0;
|
|
105
|
+
transform: translateY(10px);
|
|
106
|
+
}
|
|
107
|
+
to {
|
|
108
|
+
opacity: 1;
|
|
109
|
+
transform: translateY(0);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* Pulse ring animation */
|
|
114
|
+
.pulse-ring {
|
|
115
|
+
@apply relative;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.pulse-ring::before {
|
|
119
|
+
content: "";
|
|
120
|
+
@apply absolute inset-0 rounded-full;
|
|
121
|
+
animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@keyframes pulse-ring {
|
|
125
|
+
0%,
|
|
126
|
+
100% {
|
|
127
|
+
box-shadow: 0 0 0 0 currentColor;
|
|
128
|
+
opacity: 0.4;
|
|
129
|
+
}
|
|
130
|
+
50% {
|
|
131
|
+
box-shadow: 0 0 0 8px currentColor;
|
|
132
|
+
opacity: 0;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* Fonts -- Inter (UI) + JetBrains Mono (code). */
|
|
138
|
+
@font-face {
|
|
139
|
+
font-family: "Inter";
|
|
140
|
+
src: url("https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfAZ9hiA.woff2") format("woff2");
|
|
141
|
+
font-weight: 300;
|
|
142
|
+
font-style: normal;
|
|
143
|
+
font-display: swap;
|
|
144
|
+
}
|
|
145
|
+
@font-face {
|
|
146
|
+
font-family: "Inter";
|
|
147
|
+
src: url("https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfAZ9hiA.woff2") format("woff2");
|
|
148
|
+
font-weight: 400;
|
|
149
|
+
font-style: normal;
|
|
150
|
+
font-display: swap;
|
|
151
|
+
}
|
|
152
|
+
@font-face {
|
|
153
|
+
font-family: "Inter";
|
|
154
|
+
src: url("https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuI2fAZ9hiA.woff2") format("woff2");
|
|
155
|
+
font-weight: 500;
|
|
156
|
+
font-style: normal;
|
|
157
|
+
font-display: swap;
|
|
158
|
+
}
|
|
159
|
+
@font-face {
|
|
160
|
+
font-family: "Inter";
|
|
161
|
+
src: url("https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuFuYAZ9hiA.woff2") format("woff2");
|
|
162
|
+
font-weight: 700;
|
|
163
|
+
font-style: normal;
|
|
164
|
+
font-display: swap;
|
|
165
|
+
}
|
|
166
|
+
@font-face {
|
|
167
|
+
font-family: "JetBrains Mono";
|
|
168
|
+
src: url("https://fonts.gstatic.com/s/jetbrainsmono/v18/tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKxTOlOV.woff2") format("woff2");
|
|
169
|
+
font-weight: 400;
|
|
170
|
+
font-style: normal;
|
|
171
|
+
font-display: swap;
|
|
172
|
+
}
|
|
173
|
+
@font-face {
|
|
174
|
+
font-family: "JetBrains Mono";
|
|
175
|
+
src: url("https://fonts.gstatic.com/s/jetbrainsmono/v18/tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKxTPlOV.woff2") format("woff2");
|
|
176
|
+
font-weight: 500;
|
|
177
|
+
font-style: normal;
|
|
178
|
+
font-display: swap;
|
|
179
|
+
}
|
package/dist/tokens.css
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/* Tangle Sandbox UI design tokens */
|
|
2
|
+
|
|
3
|
+
:root,
|
|
4
|
+
[data-sandbox-ui] {
|
|
5
|
+
/* Semantic HSL bridge for shadcn/radix primitives */
|
|
6
|
+
--hsl-background: 245 18% 7%;
|
|
7
|
+
--hsl-foreground: 220 20% 96%;
|
|
8
|
+
--hsl-card: 246 21% 10%;
|
|
9
|
+
--hsl-card-foreground: 220 20% 96%;
|
|
10
|
+
--hsl-popover: 246 21% 10%;
|
|
11
|
+
--hsl-popover-foreground: 220 20% 96%;
|
|
12
|
+
--hsl-primary: 226 84% 66%;
|
|
13
|
+
--hsl-primary-foreground: 220 20% 98%;
|
|
14
|
+
--hsl-secondary: 243 18% 16%;
|
|
15
|
+
--hsl-secondary-foreground: 220 18% 92%;
|
|
16
|
+
--hsl-muted: 243 18% 14%;
|
|
17
|
+
--hsl-muted-foreground: 230 16% 68%;
|
|
18
|
+
--hsl-accent: 243 18% 18%;
|
|
19
|
+
--hsl-accent-foreground: 220 18% 94%;
|
|
20
|
+
--hsl-destructive: 0 82% 63%;
|
|
21
|
+
--hsl-destructive-foreground: 220 20% 98%;
|
|
22
|
+
--hsl-border: 242 17% 20%;
|
|
23
|
+
--hsl-input: 243 18% 16%;
|
|
24
|
+
--hsl-ring: 226 84% 66%;
|
|
25
|
+
--hsl-success: 142 70% 48%;
|
|
26
|
+
--hsl-warning: 41 96% 58%;
|
|
27
|
+
--hsl-info: 199 89% 60%;
|
|
28
|
+
|
|
29
|
+
/* Tailwind/shadcn variable aliases */
|
|
30
|
+
--background: var(--hsl-background);
|
|
31
|
+
--foreground: var(--hsl-foreground);
|
|
32
|
+
--card: var(--hsl-card);
|
|
33
|
+
--card-foreground: var(--hsl-card-foreground);
|
|
34
|
+
--popover: var(--hsl-popover);
|
|
35
|
+
--popover-foreground: var(--hsl-popover-foreground);
|
|
36
|
+
--primary: var(--hsl-primary);
|
|
37
|
+
--primary-foreground: var(--hsl-primary-foreground);
|
|
38
|
+
--secondary: var(--hsl-secondary);
|
|
39
|
+
--secondary-foreground: var(--hsl-secondary-foreground);
|
|
40
|
+
--muted: var(--hsl-muted);
|
|
41
|
+
--muted-foreground: var(--hsl-muted-foreground);
|
|
42
|
+
--accent: var(--hsl-accent);
|
|
43
|
+
--accent-foreground: var(--hsl-accent-foreground);
|
|
44
|
+
--destructive: var(--hsl-destructive);
|
|
45
|
+
--destructive-foreground: var(--hsl-destructive-foreground);
|
|
46
|
+
--border: var(--hsl-border);
|
|
47
|
+
--input: var(--hsl-input);
|
|
48
|
+
--ring: var(--hsl-ring);
|
|
49
|
+
--success: var(--hsl-success);
|
|
50
|
+
--warning: var(--hsl-warning);
|
|
51
|
+
--error: var(--hsl-destructive);
|
|
52
|
+
--info: var(--hsl-info);
|
|
53
|
+
|
|
54
|
+
/* Brand gradients */
|
|
55
|
+
--tangle-gradient: linear-gradient(135deg, hsl(226 84% 66%), hsl(199 89% 60%));
|
|
56
|
+
--tangle-gradient-text: linear-gradient(45deg, hsl(226 84% 72%), hsl(199 89% 66%));
|
|
57
|
+
--accent-gradient-strong: linear-gradient(135deg, hsl(var(--hsl-primary)), var(--brand-glow));
|
|
58
|
+
--accent-surface-soft: hsl(var(--hsl-primary) / 0.12);
|
|
59
|
+
--accent-surface-strong: hsl(var(--hsl-primary) / 0.18);
|
|
60
|
+
--accent-text: var(--brand-cool);
|
|
61
|
+
|
|
62
|
+
/* Surfaces */
|
|
63
|
+
--bg-root: hsl(var(--hsl-background));
|
|
64
|
+
--bg-dark: hsl(246 19% 9%);
|
|
65
|
+
--bg-card: hsl(var(--hsl-card));
|
|
66
|
+
--bg-elevated: hsl(245 20% 12%);
|
|
67
|
+
--bg-section: hsl(246 18% 8%);
|
|
68
|
+
--bg-input: hsl(var(--hsl-input));
|
|
69
|
+
--bg-hover: hsl(243 18% 18%);
|
|
70
|
+
--bg-selection: hsl(226 84% 66% / 0.15);
|
|
71
|
+
|
|
72
|
+
/* Text */
|
|
73
|
+
--text-primary: hsl(var(--hsl-foreground));
|
|
74
|
+
--text-secondary: hsl(220 18% 88%);
|
|
75
|
+
--text-muted: hsl(var(--hsl-muted-foreground));
|
|
76
|
+
|
|
77
|
+
/* Brand accents */
|
|
78
|
+
--brand-primary: hsl(var(--hsl-primary));
|
|
79
|
+
--brand-strong: hsl(226 80% 60%);
|
|
80
|
+
--brand-cool: hsl(220 88% 70%);
|
|
81
|
+
--brand-glow: hsl(199 89% 66%);
|
|
82
|
+
--brand-purple: hsl(254 84% 72%);
|
|
83
|
+
--brand-vibrant: hsl(214 90% 63%);
|
|
84
|
+
|
|
85
|
+
/* Borders */
|
|
86
|
+
--border-subtle: hsl(var(--hsl-border) / 0.55);
|
|
87
|
+
--border-default: hsl(var(--hsl-border) / 0.8);
|
|
88
|
+
--border-hover: hsl(var(--hsl-border) / 1);
|
|
89
|
+
--border-accent: hsl(var(--hsl-primary) / 0.35);
|
|
90
|
+
--border-accent-hover: hsl(var(--hsl-primary) / 0.55);
|
|
91
|
+
|
|
92
|
+
/* Buttons */
|
|
93
|
+
--btn-primary-bg: hsl(var(--hsl-primary));
|
|
94
|
+
--btn-primary-hover: hsl(226 84% 72%);
|
|
95
|
+
--btn-cta-bg: hsl(220 20% 98%);
|
|
96
|
+
--btn-cta-text: hsl(245 18% 10%);
|
|
97
|
+
|
|
98
|
+
/* Code / runtime syntax */
|
|
99
|
+
--code-keyword: hsl(254 88% 76%);
|
|
100
|
+
--code-string: hsl(199 89% 72%);
|
|
101
|
+
--code-function: hsl(214 90% 72%);
|
|
102
|
+
--code-number: hsl(41 96% 66%);
|
|
103
|
+
--code-success: hsl(var(--hsl-success));
|
|
104
|
+
--code-comment: hsl(230 14% 60%);
|
|
105
|
+
--code-error: hsl(var(--hsl-destructive));
|
|
106
|
+
|
|
107
|
+
/* Shadows */
|
|
108
|
+
--shadow-card: 0 18px 60px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(118, 146, 255, 0.08);
|
|
109
|
+
--shadow-dropdown: 0 24px 80px rgba(0, 0, 0, 0.45);
|
|
110
|
+
--shadow-glow: 0 0 40px rgba(96, 165, 250, 0.14);
|
|
111
|
+
--shadow-accent: 0 18px 48px rgba(0, 0, 0, 0.24), 0 0 0 1px hsl(var(--hsl-primary) / 0.12);
|
|
112
|
+
|
|
113
|
+
/* Radii */
|
|
114
|
+
--radius-sm: 10px;
|
|
115
|
+
--radius-md: 14px;
|
|
116
|
+
--radius-lg: 18px;
|
|
117
|
+
--radius-xl: 24px;
|
|
118
|
+
--radius-pill: 999px;
|
|
119
|
+
--radius-full: 999px;
|
|
120
|
+
--radius: 0.875rem;
|
|
121
|
+
|
|
122
|
+
/* Density-aware metrics */
|
|
123
|
+
--control-height: 2.5rem;
|
|
124
|
+
--panel-padding: 1rem;
|
|
125
|
+
--content-max-width: 80rem;
|
|
126
|
+
|
|
127
|
+
/* Transitions */
|
|
128
|
+
--transition-fast: 0.15s ease;
|
|
129
|
+
--transition-default: 0.2s ease;
|
|
130
|
+
--transition-medium: 0.3s ease;
|
|
131
|
+
|
|
132
|
+
/* Fonts */
|
|
133
|
+
--font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
|
|
134
|
+
--font-mono: "JetBrains Mono", ui-monospace, monospace;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
[data-sandbox-theme="builder"] {
|
|
138
|
+
--hsl-primary: 214 90% 63%;
|
|
139
|
+
--hsl-ring: 214 90% 63%;
|
|
140
|
+
--brand-cool: hsl(214 90% 68%);
|
|
141
|
+
--brand-glow: hsl(190 92% 62%);
|
|
142
|
+
--tangle-gradient: linear-gradient(135deg, hsl(214 90% 63%), hsl(190 92% 62%));
|
|
143
|
+
--accent-gradient-strong: linear-gradient(135deg, hsl(214 90% 63%), hsl(190 92% 62%));
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
[data-sandbox-theme="consumer"] {
|
|
147
|
+
--hsl-background: 222 16% 10%;
|
|
148
|
+
--hsl-card: 223 18% 13%;
|
|
149
|
+
--hsl-input: 223 18% 15%;
|
|
150
|
+
--hsl-primary: 187 75% 48%;
|
|
151
|
+
--hsl-ring: 187 75% 48%;
|
|
152
|
+
--brand-cool: hsl(187 75% 54%);
|
|
153
|
+
--brand-glow: hsl(164 74% 56%);
|
|
154
|
+
--tangle-gradient: linear-gradient(135deg, hsl(187 75% 48%), hsl(164 74% 56%));
|
|
155
|
+
--accent-gradient-strong: linear-gradient(135deg, hsl(187 75% 48%), hsl(164 74% 56%));
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
[data-density="compact"] {
|
|
159
|
+
--radius-sm: 8px;
|
|
160
|
+
--radius-md: 12px;
|
|
161
|
+
--radius-lg: 16px;
|
|
162
|
+
--radius-xl: 20px;
|
|
163
|
+
--control-height: 2.25rem;
|
|
164
|
+
--panel-padding: 0.75rem;
|
|
165
|
+
}
|
|
@@ -5,7 +5,7 @@ import { ReactNode } from 'react';
|
|
|
5
5
|
* Variant-specific rendering instructions for tool output.
|
|
6
6
|
* Maps directly to specialised preview components.
|
|
7
7
|
*/
|
|
8
|
-
type DisplayVariant = "command" | "write-file" | "question" | "web-search" | "grep" | "glob" | "default";
|
|
8
|
+
type DisplayVariant = "command" | "write-file" | "read-file" | "diff" | "question" | "web-search" | "grep" | "glob" | "default";
|
|
9
9
|
/**
|
|
10
10
|
* Custom renderer for tool details. Return a ReactNode to override the
|
|
11
11
|
* default ExpandedToolDetail, or null to fall back to the built-in renderer.
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { R as ReasoningPart, S as SessionMessage, a as SessionPart, T as TextPart, b as ToolPart, c as ToolState, d as ToolStatus, e as ToolTime } from './parts-CyGkM6Fp.js';
|
|
2
2
|
export { F as FinalTextPart, G as GroupedMessage, M as MessageRun, a as MessageUser, R as Run, b as RunStats, T as ToolCategory } from './run-CtFZ6s-D.js';
|
|
3
3
|
export { S as Session } from './sidecar-CFU2W9j1.js';
|
|
4
|
-
export { C as CustomToolRenderer, D as DisplayVariant, T as ToolDisplayMetadata } from './tool-display-
|
|
4
|
+
export { C as CustomToolRenderer, D as DisplayVariant, T as ToolDisplayMetadata } from './tool-display-Ct9nFAzJ.js';
|
|
5
5
|
export { A as AgentBranding } from './branding-DCi5VEik.js';
|
|
6
6
|
import 'react';
|