@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.
Files changed (67) hide show
  1. package/README.md +201 -10
  2. package/dist/auth.js +2 -2
  3. package/dist/chat-container-C8eHLw8z.d.ts +67 -0
  4. package/dist/chat.d.ts +70 -78
  5. package/dist/chat.js +8 -8
  6. package/dist/chunk-4F2GJRGU.js +756 -0
  7. package/dist/{chunk-HYEAX3DC.js → chunk-5LV6DZZF.js} +445 -114
  8. package/dist/chunk-67C53XVV.js +1106 -0
  9. package/dist/{chunk-QSQBDR3N.js → chunk-BX6AQMUS.js} +5 -2
  10. package/dist/chunk-CCKNIAS7.js +124 -0
  11. package/dist/chunk-CJ2RYVZH.js +128 -0
  12. package/dist/{chunk-KMXV7DDX.js → chunk-CNWVHQFY.js} +1 -1
  13. package/dist/{chunk-OU4TRNQZ.js → chunk-COCSO7FG.js} +3 -3
  14. package/dist/chunk-FJSVPBKY.js +85 -0
  15. package/dist/chunk-FRGMMANX.js +102 -0
  16. package/dist/{chunk-E6FS7R4X.js → chunk-HWLX5NME.js} +1 -1
  17. package/dist/chunk-JF6E2DS5.js +610 -0
  18. package/dist/chunk-MUOL44AE.js +121 -0
  19. package/dist/chunk-MXCSSOGH.js +105 -0
  20. package/dist/{chunk-J4OADEUK.js → chunk-OM6ON27W.js} +24 -9
  21. package/dist/{chunk-NI2EI43H.js → chunk-PDV7W4NY.js} +9 -124
  22. package/dist/chunk-TQN3VR4F.js +92 -0
  23. package/dist/{chunk-SOT2V7TX.js → chunk-TXI4MZAZ.js} +62 -144
  24. package/dist/chunk-WUR652Y3.js +1140 -0
  25. package/dist/chunk-YDBXQQLC.js +336 -0
  26. package/dist/{chunk-4EIWPJMJ.js → chunk-ZP6GSX4D.js} +36 -27
  27. package/dist/dashboard.d.ts +5 -2
  28. package/dist/dashboard.js +5 -4
  29. package/dist/{expanded-tool-detail-OkXGqTHe.d.ts → expanded-tool-detail-BDi_h_dZ.d.ts} +11 -4
  30. package/dist/file-tabs-CmaoDVBI.d.ts +72 -0
  31. package/dist/files.d.ts +25 -44
  32. package/dist/files.js +8 -3
  33. package/{src/styles → dist}/globals.css +16 -67
  34. package/dist/hooks.d.ts +5 -4
  35. package/dist/hooks.js +14 -9
  36. package/dist/index.d.ts +38 -9
  37. package/dist/index.js +100 -126
  38. package/dist/markdown.d.ts +1 -24
  39. package/dist/markdown.js +1 -7
  40. package/dist/openui.d.ts +115 -0
  41. package/dist/openui.js +11 -0
  42. package/dist/pages.d.ts +3 -2
  43. package/dist/pages.js +19 -16
  44. package/dist/primitives.js +25 -19
  45. package/dist/run.d.ts +2 -2
  46. package/dist/run.js +8 -7
  47. package/dist/{use-sidecar-auth-Bb0-w3lX.d.ts → sdk-hooks.d.ts} +61 -72
  48. package/dist/sdk-hooks.js +29 -0
  49. package/dist/styles.css +179 -0
  50. package/dist/tokens.css +165 -0
  51. package/dist/{tool-display-BvsVW_Ur.d.ts → tool-display-Ct9nFAzJ.d.ts} +1 -1
  52. package/dist/types.d.ts +1 -1
  53. package/dist/{usage-chart-DINgSVL5.d.ts → usage-chart-CY9xo3KX.d.ts} +8 -3
  54. package/dist/use-pty-session-DeZSxOCN.d.ts +69 -0
  55. package/dist/utils.d.ts +1 -1
  56. package/dist/utils.js +1 -1
  57. package/dist/workspace.d.ts +171 -33
  58. package/dist/workspace.js +25 -1
  59. package/package.json +10 -3
  60. package/dist/chunk-2UHPE5T7.js +0 -201
  61. package/dist/chunk-6MQIDUPA.js +0 -502
  62. package/dist/chunk-KYY2X6LY.js +0 -318
  63. package/dist/chunk-L6ZDH5F4.js +0 -334
  64. package/dist/chunk-M34OA6PQ.js +0 -233
  65. package/dist/chunk-M6VLC32S.js +0 -219
  66. package/dist/chunk-U62G5TS7.js +0 -472
  67. package/src/styles/tokens.css +0 -73
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-OU4TRNQZ.js";
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-HYEAX3DC.js";
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-SOT2V7TX.js";
47
+ } from "./chunk-TXI4MZAZ.js";
53
48
  import {
54
49
  Avatar,
55
50
  AvatarFallback,
@@ -66,73 +61,100 @@ 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-67C53XVV.js";
84
+ import {
85
+ EmptyState,
86
+ Input,
75
87
  Textarea
76
- } from "./chunk-NI2EI43H.js";
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-U62G5TS7.js";
97
+ } from "./chunk-4F2GJRGU.js";
86
98
  import {
87
99
  useAutoScroll,
88
100
  useRunCollapseState,
89
101
  useRunGroups
90
- } from "./chunk-KMXV7DDX.js";
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-6MQIDUPA.js";
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-QSQBDR3N.js";
129
+ } from "./chunk-BX6AQMUS.js";
124
130
  import {
125
- AuditResults,
126
- StatusBanner,
127
- StatusBar,
128
- TerminalPanel,
129
- WorkspaceLayout
130
- } from "./chunk-KYY2X6LY.js";
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
- } from "./chunk-L6ZDH5F4.js";
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 {
137
159
  BackendSelector,
138
160
  DashboardLayout,
@@ -141,12 +163,12 @@ import {
141
163
  ThemeToggle,
142
164
  VariantList,
143
165
  useTheme
144
- } from "./chunk-J4OADEUK.js";
166
+ } from "./chunk-OM6ON27W.js";
145
167
  import {
146
168
  BillingDashboard,
147
169
  PricingPage,
148
170
  UsageChart
149
- } from "./chunk-4EIWPJMJ.js";
171
+ } from "./chunk-ZP6GSX4D.js";
150
172
  import {
151
173
  Logo,
152
174
  TangleKnot
@@ -168,6 +190,12 @@ import {
168
190
  DropdownMenuSubTrigger,
169
191
  DropdownMenuTrigger
170
192
  } from "./chunk-MCGKDCOR.js";
193
+ import {
194
+ Progress,
195
+ Skeleton,
196
+ SkeletonCard,
197
+ SkeletonTable
198
+ } from "./chunk-FRGMMANX.js";
171
199
  import {
172
200
  Badge,
173
201
  Card,
@@ -176,82 +204,19 @@ import {
176
204
  CardFooter,
177
205
  CardHeader,
178
206
  CardTitle,
179
- Progress,
180
- Skeleton,
181
- SkeletonCard,
182
- SkeletonTable,
183
207
  badgeVariants
184
- } from "./chunk-2UHPE5T7.js";
208
+ } from "./chunk-MXCSSOGH.js";
185
209
  import {
186
210
  Button,
187
211
  buttonVariants
188
- } from "./chunk-E6FS7R4X.js";
212
+ } from "./chunk-HWLX5NME.js";
189
213
  import {
190
214
  cn
191
215
  } from "./chunk-RQHJBTEU.js";
192
-
193
- // src/primitives/code-block.tsx
194
- import { clsx } from "clsx";
195
- import { useState } from "react";
196
- import { jsx, jsxs } from "react/jsx-runtime";
197
- function CodeBlock2({
198
- code,
199
- language,
200
- showCopy = true,
201
- showLineNumbers = false,
202
- className,
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
- ] });
240
- }
241
- function InlineCode({ className, children, ...props }) {
242
- return /* @__PURE__ */ jsx(
243
- "code",
244
- {
245
- className: clsx(
246
- "rounded border border-[#262626] bg-[#1a1a1a] px-1.5 py-0.5 font-mono text-sm",
247
- className
248
- ),
249
- ...props,
250
- children
251
- }
252
- );
253
- }
254
216
  export {
217
+ AgentTimeline,
218
+ AgentWorkbench,
219
+ ArtifactPane,
255
220
  AuditResults,
256
221
  AuthHeader,
257
222
  Avatar,
@@ -270,9 +235,8 @@ export {
270
235
  ChatContainer,
271
236
  ChatInput,
272
237
  ChatMessage,
273
- ChatMessageList,
274
- CodeBlock,
275
- CodeBlock2 as CodeBlockDisplay,
238
+ CodeBlock2 as CodeBlock,
239
+ CodeBlock as CodeBlockDisplay,
276
240
  CommandPreview,
277
241
  CopyButton,
278
242
  DashboardLayout,
@@ -286,6 +250,8 @@ export {
286
250
  DialogPortal,
287
251
  DialogTitle,
288
252
  DialogTrigger,
253
+ DiffPreview,
254
+ DirectoryPane,
289
255
  DropdownMenu,
290
256
  DropdownMenuCheckboxItem,
291
257
  DropdownMenuContent,
@@ -303,10 +269,13 @@ export {
303
269
  DropdownMenuTrigger,
304
270
  EmptyState,
305
271
  ExpandedToolDetail,
272
+ FileArtifactPane,
306
273
  FilePreview,
307
274
  FileTabs,
308
275
  FileTree,
309
276
  GitHubLoginButton,
277
+ GlobResultsPreview,
278
+ GrepResultsPreview,
310
279
  InlineCode,
311
280
  InlineThinkingItem,
312
281
  InlineToolItem,
@@ -315,11 +284,15 @@ export {
315
284
  Logo,
316
285
  Markdown,
317
286
  MessageList,
287
+ OpenUIArtifactRenderer,
318
288
  PricingPage as PricingCards,
319
289
  ProfileComparison,
320
290
  ProfileSelector,
321
291
  Progress,
292
+ QuestionPreview,
322
293
  RunGroup,
294
+ RuntimePane,
295
+ SandboxWorkbench,
323
296
  Select,
324
297
  SelectContent,
325
298
  SelectGroup,
@@ -330,7 +303,6 @@ export {
330
303
  SelectSeparator,
331
304
  SelectTrigger,
332
305
  SelectValue,
333
- SimpleMarkdown,
334
306
  Skeleton,
335
307
  SkeletonCard,
336
308
  SkeletonTable,
@@ -369,6 +341,7 @@ export {
369
341
  UserMenu,
370
342
  UserMessage,
371
343
  VariantList,
344
+ WebSearchPreview,
372
345
  WorkspaceLayout,
373
346
  WriteFilePreview,
374
347
  badgeVariants,
@@ -376,12 +349,12 @@ export {
376
349
  cn,
377
350
  copyText,
378
351
  createAuthFetcher,
352
+ filterFileTree,
379
353
  formatDuration,
380
354
  getToolCategory,
381
355
  getToolDisplayMetadata,
382
356
  getToolErrorText,
383
357
  parseToolEvent,
384
- simpleMarkdownStyles,
385
358
  timeAgo,
386
359
  truncateText,
387
360
  useApiKey,
@@ -392,6 +365,7 @@ export {
392
365
  useRunCollapseState,
393
366
  useRunGroups,
394
367
  useSSEStream,
368
+ useSdkSession,
395
369
  useSessionStream,
396
370
  useSidecarAuth,
397
371
  useTheme,
@@ -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, SimpleMarkdown, type SimpleMarkdownProps, simpleMarkdownStyles };
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
  };
@@ -0,0 +1,115 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+
4
+ type OpenUIPrimitive = string | number | boolean | null | undefined;
5
+ interface OpenUIAction {
6
+ id: string;
7
+ label: string;
8
+ tone?: "default" | "secondary" | "outline" | "ghost" | "destructive";
9
+ disabled?: boolean;
10
+ onPress?: () => void;
11
+ }
12
+ interface OpenUIBaseNode {
13
+ id?: string;
14
+ }
15
+ interface OpenUIHeadingNode extends OpenUIBaseNode {
16
+ type: "heading";
17
+ text: string;
18
+ level?: 1 | 2 | 3 | 4;
19
+ kicker?: string;
20
+ meta?: string;
21
+ }
22
+ interface OpenUITextNode extends OpenUIBaseNode {
23
+ type: "text";
24
+ text: string;
25
+ tone?: "default" | "muted" | "success" | "warning" | "error";
26
+ mono?: boolean;
27
+ }
28
+ interface OpenUIBadgeNode extends OpenUIBaseNode {
29
+ type: "badge";
30
+ label: string;
31
+ tone?: "default" | "secondary" | "success" | "warning" | "error" | "info" | "sandbox";
32
+ }
33
+ interface OpenUIStatNode extends OpenUIBaseNode {
34
+ type: "stat";
35
+ label: string;
36
+ value: string;
37
+ change?: string;
38
+ tone?: "default" | "success" | "warning" | "error" | "info";
39
+ }
40
+ interface OpenUIKeyValueNode extends OpenUIBaseNode {
41
+ type: "key_value";
42
+ items: Array<{
43
+ id?: string;
44
+ label: string;
45
+ value: ReactNode | OpenUIPrimitive;
46
+ tone?: "default" | "muted";
47
+ }>;
48
+ }
49
+ interface OpenUICodeNode extends OpenUIBaseNode {
50
+ type: "code";
51
+ code: string;
52
+ language?: string;
53
+ title?: string;
54
+ showLineNumbers?: boolean;
55
+ }
56
+ interface OpenUIMarkdownNode extends OpenUIBaseNode {
57
+ type: "markdown";
58
+ content: string;
59
+ }
60
+ interface OpenUITableNode extends OpenUIBaseNode {
61
+ type: "table";
62
+ columns: Array<{
63
+ key: string;
64
+ header: string;
65
+ align?: "left" | "right";
66
+ }>;
67
+ rows: Array<Record<string, ReactNode | OpenUIPrimitive>>;
68
+ caption?: string;
69
+ }
70
+ interface OpenUIActionsNode extends OpenUIBaseNode {
71
+ type: "actions";
72
+ actions: OpenUIAction[];
73
+ }
74
+ interface OpenUISeparatorNode extends OpenUIBaseNode {
75
+ type: "separator";
76
+ label?: string;
77
+ }
78
+ interface OpenUIStackNode extends OpenUIBaseNode {
79
+ type: "stack";
80
+ direction?: "row" | "column";
81
+ gap?: "sm" | "md" | "lg";
82
+ align?: "start" | "center" | "end" | "stretch";
83
+ wrap?: boolean;
84
+ children: OpenUIComponentNode[];
85
+ }
86
+ interface OpenUIGridNode extends OpenUIBaseNode {
87
+ type: "grid";
88
+ columns?: 1 | 2 | 3 | 4;
89
+ gap?: "sm" | "md" | "lg";
90
+ children: OpenUIComponentNode[];
91
+ }
92
+ interface OpenUICardNode extends OpenUIBaseNode {
93
+ type: "card";
94
+ title?: string;
95
+ description?: string;
96
+ eyebrow?: string;
97
+ badge?: OpenUIBadgeNode;
98
+ actions?: OpenUIAction[];
99
+ children?: OpenUIComponentNode[];
100
+ }
101
+ type OpenUIComponentNode = OpenUIActionsNode | OpenUIBadgeNode | OpenUICardNode | OpenUICodeNode | OpenUIGridNode | OpenUIHeadingNode | OpenUIKeyValueNode | OpenUIMarkdownNode | OpenUISeparatorNode | OpenUIStackNode | OpenUIStatNode | OpenUITableNode | OpenUITextNode;
102
+ interface OpenUIArtifactRendererProps {
103
+ schema: OpenUIComponentNode | OpenUIComponentNode[];
104
+ onAction?: (action: OpenUIAction) => void;
105
+ className?: string;
106
+ }
107
+ /**
108
+ * OpenUIArtifactRenderer — contained renderer for OpenUI-like structured
109
+ * artifact payloads using sandbox-ui primitives and theme tokens. This is an
110
+ * extension surface for generated inspectors/results, not a replacement for
111
+ * the sandbox shell.
112
+ */
113
+ declare function OpenUIArtifactRenderer({ schema, onAction, className, }: OpenUIArtifactRendererProps): react_jsx_runtime.JSX.Element;
114
+
115
+ export { type OpenUIAction, type OpenUIActionsNode, OpenUIArtifactRenderer, type OpenUIArtifactRendererProps, type OpenUIBadgeNode, type OpenUICardNode, type OpenUICodeNode, type OpenUIComponentNode, type OpenUIGridNode, type OpenUIHeadingNode, type OpenUIKeyValueNode, type OpenUIMarkdownNode, type OpenUIPrimitive, type OpenUISeparatorNode, type OpenUIStackNode, type OpenUIStatNode, type OpenUITableNode, type OpenUITextNode };
package/dist/openui.js ADDED
@@ -0,0 +1,11 @@
1
+ import {
2
+ OpenUIArtifactRenderer
3
+ } from "./chunk-YDBXQQLC.js";
4
+ import "./chunk-TQN3VR4F.js";
5
+ import "./chunk-LTFK464G.js";
6
+ import "./chunk-MXCSSOGH.js";
7
+ import "./chunk-HWLX5NME.js";
8
+ import "./chunk-RQHJBTEU.js";
9
+ export {
10
+ OpenUIArtifactRenderer
11
+ };
package/dist/pages.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { B as BillingSubscription, a as BillingBalance, b as BillingUsage, U as UsageDataPoint, P as PricingTier } from './usage-chart-DINgSVL5.js';
2
+ import { B as BillingSubscription, a as BillingBalance, b as BillingUsage, U as UsageDataPoint, P as PricingTier } from './usage-chart-CY9xo3KX.js';
3
3
 
4
4
  type ProductVariant$1 = "sandbox";
5
5
  interface BillingPageData {
@@ -29,8 +29,9 @@ interface StandalonePricingPageProps {
29
29
  fetchTiers?: () => Promise<PricingTier[]>;
30
30
  title?: string;
31
31
  subtitle?: string;
32
+ className?: string;
32
33
  }
33
- declare function StandalonePricingPage({ variant, initialTiers, apiBasePath, onSelectTier, fetchTiers, title, subtitle, }: StandalonePricingPageProps): react_jsx_runtime.JSX.Element;
34
+ declare function StandalonePricingPage({ variant, initialTiers, apiBasePath, onSelectTier, fetchTiers, title, subtitle, className, }: StandalonePricingPageProps): react_jsx_runtime.JSX.Element;
34
35
 
35
36
  interface ProfileMetrics {
36
37
  total_runs: number;
package/dist/pages.js CHANGED
@@ -5,27 +5,31 @@ import {
5
5
  DialogFooter,
6
6
  DialogHeader,
7
7
  DialogTitle,
8
- EmptyState,
9
- Input,
10
8
  Tabs,
11
9
  TabsContent,
12
10
  TabsList,
13
11
  TabsTrigger
14
- } from "./chunk-NI2EI43H.js";
12
+ } from "./chunk-PDV7W4NY.js";
13
+ import {
14
+ EmptyState,
15
+ Input
16
+ } from "./chunk-MUOL44AE.js";
15
17
  import {
16
18
  BillingDashboard,
17
19
  PricingPage,
18
20
  UsageChart
19
- } from "./chunk-4EIWPJMJ.js";
21
+ } from "./chunk-ZP6GSX4D.js";
20
22
  import {
21
- Badge,
22
- Card,
23
23
  Skeleton,
24
24
  SkeletonCard
25
- } from "./chunk-2UHPE5T7.js";
25
+ } from "./chunk-FRGMMANX.js";
26
+ import {
27
+ Badge,
28
+ Card
29
+ } from "./chunk-MXCSSOGH.js";
26
30
  import {
27
31
  Button
28
- } from "./chunk-E6FS7R4X.js";
32
+ } from "./chunk-HWLX5NME.js";
29
33
  import {
30
34
  cn
31
35
  } from "./chunk-RQHJBTEU.js";
@@ -292,9 +296,8 @@ import * as React2 from "react";
292
296
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
293
297
  var variantColors = {
294
298
  sandbox: {
295
- accent: "text-purple-400",
296
- gradientFrom: "from-purple-600",
297
- gradientTo: "to-purple-400"
299
+ accent: "text-[var(--accent-text)]",
300
+ gradient: "bg-[image:var(--accent-gradient-strong)]"
298
301
  }
299
302
  };
300
303
  async function fetchTiersFromApi(apiBasePath) {
@@ -364,7 +367,8 @@ function StandalonePricingPage({
364
367
  onSelectTier,
365
368
  fetchTiers,
366
369
  title = "Simple, transparent pricing",
367
- subtitle = "Choose the plan that fits your needs. Upgrade or downgrade at any time."
370
+ subtitle = "Choose the plan that fits your needs. Upgrade or downgrade at any time.",
371
+ className
368
372
  }) {
369
373
  const colors = variantColors[variant];
370
374
  const [state, setState] = React2.useState({
@@ -433,16 +437,15 @@ function StandalonePricingPage({
433
437
  },
434
438
  []
435
439
  );
436
- return /* @__PURE__ */ jsxs2("div", { className: "w-full space-y-12", children: [
440
+ return /* @__PURE__ */ jsxs2("div", { className: cn("w-full space-y-12", className), children: [
437
441
  /* @__PURE__ */ jsxs2("div", { className: "space-y-4 text-center", children: [
438
442
  /* @__PURE__ */ jsx2(
439
443
  "h1",
440
444
  {
441
445
  className: cn(
442
446
  "font-bold text-4xl tracking-tight sm:text-5xl",
443
- "bg-gradient-to-r bg-clip-text text-transparent",
444
- colors.gradientFrom,
445
- colors.gradientTo
447
+ "bg-clip-text text-transparent",
448
+ colors.gradient
446
449
  ),
447
450
  children: title
448
451
  }