@tangle-network/sandbox-ui 0.6.1 → 0.9.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.
Files changed (68) hide show
  1. package/README.md +5 -6
  2. package/dist/auth.d.ts +10 -6
  3. package/dist/auth.js +3 -3
  4. package/dist/{chat-container-Cg-GwyiK.d.ts → chat-container-f4yEs6KN.d.ts} +9 -1
  5. package/dist/chat.d.ts +12 -2
  6. package/dist/chat.js +10 -10
  7. package/dist/{chunk-WBQ7VULC.js → chunk-34A66VBG.js} +7 -7
  8. package/dist/{chunk-JP725R4W.js → chunk-34I7UFSX.js} +2 -2
  9. package/dist/{chunk-CNWVHQFY.js → chunk-54SQQMMM.js} +6 -24
  10. package/dist/{chunk-DLCFZDGX.js → chunk-5UM2XMEJ.js} +39 -14
  11. package/dist/{chunk-YYGECNZZ.js → chunk-66EZOYZR.js} +3 -3
  12. package/dist/{chunk-6V4XVKFY.js → chunk-7YWFOGKQ.js} +344 -338
  13. package/dist/{chunk-DCPYTL4W.js → chunk-D4CZWJCD.js} +72 -148
  14. package/dist/{chunk-XTPAWK7L.js → chunk-DI3NZ5ZX.js} +15 -51
  15. package/dist/{chunk-MXRQ4MJE.js → chunk-DXMIEK4K.js} +34 -23
  16. package/dist/{chunk-ZMWWE5RF.js → chunk-EXSOPXIY.js} +141 -123
  17. package/dist/{chunk-GW4GRAWJ.js → chunk-GSZA3TSY.js} +18 -12
  18. package/dist/{chunk-W4LM3QYZ.js → chunk-HB5Y37YU.js} +8 -8
  19. package/dist/{chunk-RKXIRRKQ.js → chunk-JLKYXLFN.js} +70 -66
  20. package/dist/{chunk-BRBTD7RH.js → chunk-MA7YKRUP.js} +28 -18
  21. package/dist/{chunk-TSE423UF.js → chunk-MKTSMWVD.js} +6 -6
  22. package/dist/{chunk-MJUDMVRU.js → chunk-MT5FJ3ZT.js} +17 -17
  23. package/dist/{chunk-565V6JTN.js → chunk-OHPW55EV.js} +60 -99
  24. package/dist/chunk-OKLQVY3Y.js +139 -0
  25. package/dist/{chunk-OVNLOE3Y.js → chunk-PLTZB5BC.js} +41 -41
  26. package/dist/{chunk-E2XT3G52.js → chunk-QC4BJEG6.js} +136 -137
  27. package/dist/{chunk-KH5UDAJ2.js → chunk-QDH5GEGY.js} +58 -54
  28. package/dist/{chunk-33W2TLUL.js → chunk-QID2OOMG.js} +12 -3
  29. package/dist/{chunk-FJSVPBKY.js → chunk-S7OXQTST.js} +17 -3
  30. package/dist/chunk-T7HMZEVO.js +216 -0
  31. package/dist/{chunk-FNYJFCGU.js → chunk-U6QTHMY6.js} +145 -256
  32. package/dist/{chunk-YS66Q3RC.js → chunk-US6JKJKH.js} +2 -2
  33. package/dist/chunk-VX3XOUEB.js +63 -0
  34. package/dist/{chunk-TDYQBLL5.js → chunk-ZMNSRDMH.js} +6 -6
  35. package/dist/dashboard.d.ts +156 -4
  36. package/dist/dashboard.js +885 -8
  37. package/dist/{document-editor-pane-DWWUTTTZ.js → document-editor-pane-TLPVRBBU.js} +3 -3
  38. package/dist/editor.d.ts +9 -8
  39. package/dist/editor.js +3 -3
  40. package/dist/files.js +3 -3
  41. package/dist/globals.css +4787 -69
  42. package/dist/hooks.d.ts +1 -1
  43. package/dist/hooks.js +7 -7
  44. package/dist/index.d.ts +4 -4
  45. package/dist/index.js +28 -28
  46. package/dist/markdown.js +1 -1
  47. package/dist/openui.js +5 -5
  48. package/dist/pages.d.ts +114 -5
  49. package/dist/pages.js +1978 -365
  50. package/dist/primitives.d.ts +5 -2
  51. package/dist/primitives.js +10 -10
  52. package/dist/run.js +4 -4
  53. package/dist/sdk-hooks.d.ts +2 -3
  54. package/dist/sdk-hooks.js +5 -5
  55. package/dist/styles.css +4787 -69
  56. package/dist/template-card-BAtvcAkU.d.ts +18 -0
  57. package/dist/terminal.d.ts +3 -1
  58. package/dist/terminal.js +66 -32
  59. package/dist/tokens.css +289 -237
  60. package/dist/{usage-chart-XCoB_7Xu.d.ts → usage-chart-SSiOgeQI.d.ts} +3 -1
  61. package/dist/{use-pty-session-COzVkhtc.d.ts → use-pty-session-0AOuwXgq.d.ts} +2 -0
  62. package/dist/{index-BT_-ecpc.d.ts → variant-list-CsS6ydgm.d.ts} +16 -7
  63. package/dist/workspace.d.ts +2 -2
  64. package/dist/workspace.js +13 -13
  65. package/package.json +18 -3
  66. package/tailwind.config.cjs +3 -2
  67. package/dist/chunk-3HW53XTH.js +0 -228
  68. package/dist/chunk-OKCIKTXQ.js +0 -63
@@ -5,11 +5,11 @@ import {
5
5
  TableHead,
6
6
  TableHeader,
7
7
  TableRow
8
- } from "./chunk-JP725R4W.js";
8
+ } from "./chunk-34I7UFSX.js";
9
9
  import {
10
10
  CodeBlock,
11
11
  Markdown
12
- } from "./chunk-3HW53XTH.js";
12
+ } from "./chunk-T7HMZEVO.js";
13
13
  import {
14
14
  Badge,
15
15
  Card,
@@ -17,10 +17,10 @@ import {
17
17
  CardDescription,
18
18
  CardHeader,
19
19
  CardTitle
20
- } from "./chunk-TDYQBLL5.js";
20
+ } from "./chunk-ZMNSRDMH.js";
21
21
  import {
22
22
  Button
23
- } from "./chunk-TSE423UF.js";
23
+ } from "./chunk-MKTSMWVD.js";
24
24
  import {
25
25
  cn
26
26
  } from "./chunk-RQHJBTEU.js";
@@ -32,7 +32,7 @@ function InlineCode({ className, children, ...props }) {
32
32
  "code",
33
33
  {
34
34
  className: cn(
35
- "rounded border border-[var(--border-subtle)] bg-[var(--depth-2)] px-1.5 py-0.5 font-mono text-[0.85em] text-[var(--code-keyword)]",
35
+ "rounded border border-border bg-card px-1.5 py-0.5 font-mono text-[0.85em] text-[var(--code-keyword)]",
36
36
  className
37
37
  ),
38
38
  ...props,
@@ -64,7 +64,7 @@ var ALIGN_STYLES = {
64
64
  };
65
65
  function formatValue(value) {
66
66
  if (value === null || value === void 0) {
67
- return /* @__PURE__ */ jsx2("span", { className: "text-[var(--text-muted)]", children: "\u2014" });
67
+ return /* @__PURE__ */ jsx2("span", { className: "text-muted-foreground", children: "\u2014" });
68
68
  }
69
69
  if (typeof value === "boolean") {
70
70
  return value ? "Yes" : "No";
@@ -95,12 +95,12 @@ function renderNode(node, onAction) {
95
95
  const level = node.level ?? 2;
96
96
  const HeadingTag = `h${level}`;
97
97
  return /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
98
- node.kicker && /* @__PURE__ */ jsx2("div", { className: "text-[10px] font-semibold uppercase tracking-[0.16em] text-[var(--text-muted)]", children: node.kicker }),
98
+ node.kicker && /* @__PURE__ */ jsx2("div", { className: "text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-foreground", children: node.kicker }),
99
99
  /* @__PURE__ */ jsx2(
100
100
  HeadingTag,
101
101
  {
102
102
  className: cn(
103
- "font-semibold tracking-tight text-[var(--text-primary)]",
103
+ "font-semibold tracking-tight text-foreground",
104
104
  level === 1 && "text-2xl",
105
105
  level === 2 && "text-xl",
106
106
  level === 3 && "text-lg",
@@ -109,7 +109,7 @@ function renderNode(node, onAction) {
109
109
  children: node.text
110
110
  }
111
111
  ),
112
- node.meta && /* @__PURE__ */ jsx2("p", { className: "text-sm text-[var(--text-muted)]", children: node.meta })
112
+ node.meta && /* @__PURE__ */ jsx2("p", { className: "text-sm text-muted-foreground", children: node.meta })
113
113
  ] });
114
114
  }
115
115
  case "text":
@@ -117,12 +117,12 @@ function renderNode(node, onAction) {
117
117
  "p",
118
118
  {
119
119
  className: cn(
120
- "text-sm leading-6 text-[var(--text-secondary)]",
121
- node.tone === "muted" && "text-[var(--text-muted)]",
120
+ "text-sm leading-6 text-foreground",
121
+ node.tone === "muted" && "text-muted-foreground",
122
122
  node.tone === "success" && "text-[var(--surface-success-text)]",
123
123
  node.tone === "warning" && "text-[var(--surface-warning-text)]",
124
124
  node.tone === "error" && "text-[var(--surface-danger-text)]",
125
- node.mono && "font-[var(--font-mono)] text-[13px]"
125
+ node.mono && "font-mono text-[13px]"
126
126
  ),
127
127
  children: node.text
128
128
  }
@@ -130,9 +130,9 @@ function renderNode(node, onAction) {
130
130
  case "badge":
131
131
  return /* @__PURE__ */ jsx2(Badge, { variant: node.tone ?? "outline", children: node.label });
132
132
  case "stat":
133
- return /* @__PURE__ */ jsx2(Card, { variant: "glass", className: "border-[var(--border-subtle)] shadow-[var(--shadow-card)]", children: /* @__PURE__ */ jsxs(CardContent, { className: "space-y-2 p-4", children: [
134
- /* @__PURE__ */ jsx2("div", { className: "text-xs uppercase tracking-[0.12em] text-[var(--text-muted)]", children: node.label }),
135
- /* @__PURE__ */ jsx2("div", { className: "text-2xl font-semibold tracking-tight text-[var(--text-primary)]", children: node.value }),
133
+ return /* @__PURE__ */ jsx2(Card, { variant: "glass", className: "border-border shadow-[var(--shadow-card)]", children: /* @__PURE__ */ jsxs(CardContent, { className: "space-y-2 p-4", children: [
134
+ /* @__PURE__ */ jsx2("div", { className: "text-xs uppercase tracking-[0.12em] text-muted-foreground", children: node.label }),
135
+ /* @__PURE__ */ jsx2("div", { className: "text-2xl font-semibold tracking-tight text-foreground", children: node.value }),
136
136
  node.change && /* @__PURE__ */ jsx2(
137
137
  "div",
138
138
  {
@@ -142,7 +142,7 @@ function renderNode(node, onAction) {
142
142
  node.tone === "warning" && "text-[var(--surface-warning-text)]",
143
143
  node.tone === "error" && "text-[var(--surface-danger-text)]",
144
144
  node.tone === "info" && "text-[var(--surface-info-text)]",
145
- !node.tone || node.tone === "default" ? "text-[var(--text-muted)]" : void 0
145
+ !node.tone || node.tone === "default" ? "text-muted-foreground" : void 0
146
146
  ),
147
147
  children: node.change
148
148
  }
@@ -152,15 +152,15 @@ function renderNode(node, onAction) {
152
152
  return /* @__PURE__ */ jsx2("dl", { className: "grid gap-3 sm:grid-cols-2", children: node.items.map((item, index) => /* @__PURE__ */ jsxs(
153
153
  "div",
154
154
  {
155
- className: "rounded-[var(--radius-lg)] border border-[var(--border-subtle)] bg-[var(--bg-card)] px-4 py-3",
155
+ className: "rounded-[var(--radius-lg)] border border-border bg-card px-4 py-3",
156
156
  children: [
157
- /* @__PURE__ */ jsx2("dt", { className: "text-[11px] uppercase tracking-[0.12em] text-[var(--text-muted)]", children: item.label }),
157
+ /* @__PURE__ */ jsx2("dt", { className: "text-[11px] uppercase tracking-[0.12em] text-muted-foreground", children: item.label }),
158
158
  /* @__PURE__ */ jsx2(
159
159
  "dd",
160
160
  {
161
161
  className: cn(
162
- "mt-1 text-sm font-medium text-[var(--text-primary)]",
163
- item.tone === "muted" && "text-[var(--text-secondary)]"
162
+ "mt-1 text-sm font-medium text-foreground",
163
+ item.tone === "muted" && "text-foreground"
164
164
  ),
165
165
  children: formatValue(item.value)
166
166
  }
@@ -171,38 +171,38 @@ function renderNode(node, onAction) {
171
171
  )) });
172
172
  case "code":
173
173
  return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
174
- node.title && /* @__PURE__ */ jsx2("div", { className: "text-xs uppercase tracking-[0.12em] text-[var(--text-muted)]", children: node.title }),
174
+ node.title && /* @__PURE__ */ jsx2("div", { className: "text-xs uppercase tracking-[0.12em] text-muted-foreground", children: node.title }),
175
175
  /* @__PURE__ */ jsx2(
176
176
  CodeBlock,
177
177
  {
178
178
  code: node.code,
179
179
  language: node.language,
180
180
  showLineNumbers: node.showLineNumbers,
181
- className: "border-[var(--border-subtle)] bg-[var(--bg-input)]"
181
+ className: "border-border bg-background"
182
182
  }
183
183
  )
184
184
  ] });
185
185
  case "markdown":
186
- return /* @__PURE__ */ jsx2("div", { className: "rounded-[var(--radius-lg)] border border-[var(--border-subtle)] bg-[var(--bg-card)] p-5", children: /* @__PURE__ */ jsx2(Markdown, { className: "prose-sm max-w-none", children: node.content }) });
186
+ return /* @__PURE__ */ jsx2("div", { className: "rounded-[var(--radius-lg)] border border-border bg-card p-5", children: /* @__PURE__ */ jsx2(Markdown, { className: "prose-sm max-w-none", children: node.content }) });
187
187
  case "table":
188
- return /* @__PURE__ */ jsxs("div", { className: "overflow-hidden rounded-[var(--radius-lg)] border border-[var(--border-subtle)] bg-[var(--bg-card)]", children: [
188
+ return /* @__PURE__ */ jsxs("div", { className: "overflow-hidden rounded-[var(--radius-lg)] border border-border bg-card", children: [
189
189
  /* @__PURE__ */ jsxs(Table, { children: [
190
- /* @__PURE__ */ jsx2(TableHeader, { children: /* @__PURE__ */ jsx2(TableRow, { className: "border-[var(--border-subtle)]", children: node.columns.map((column) => /* @__PURE__ */ jsx2(
190
+ /* @__PURE__ */ jsx2(TableHeader, { children: /* @__PURE__ */ jsx2(TableRow, { className: "border-border", children: node.columns.map((column) => /* @__PURE__ */ jsx2(
191
191
  TableHead,
192
192
  {
193
193
  className: cn(
194
- "h-10 text-[11px] uppercase tracking-[0.1em] text-[var(--text-muted)]",
194
+ "h-10 text-[11px] uppercase tracking-[0.1em] text-muted-foreground",
195
195
  column.align === "right" && "text-right"
196
196
  ),
197
197
  children: column.header
198
198
  },
199
199
  column.key
200
200
  )) }) }),
201
- /* @__PURE__ */ jsx2(TableBody, { children: node.rows.map((row, rowIndex) => /* @__PURE__ */ jsx2(TableRow, { className: "border-[var(--border-subtle)]", children: node.columns.map((column) => /* @__PURE__ */ jsx2(
201
+ /* @__PURE__ */ jsx2(TableBody, { children: node.rows.map((row, rowIndex) => /* @__PURE__ */ jsx2(TableRow, { className: "border-border", children: node.columns.map((column) => /* @__PURE__ */ jsx2(
202
202
  TableCell,
203
203
  {
204
204
  className: cn(
205
- "py-3 text-sm text-[var(--text-secondary)]",
205
+ "py-3 text-sm text-foreground",
206
206
  column.align === "right" && "text-right tabular-nums"
207
207
  ),
208
208
  children: formatValue(row[column.key])
@@ -210,15 +210,15 @@ function renderNode(node, onAction) {
210
210
  column.key
211
211
  )) }, rowIndex)) })
212
212
  ] }),
213
- node.caption && /* @__PURE__ */ jsx2("div", { className: "border-t border-[var(--border-subtle)] px-4 py-2 text-xs text-[var(--text-muted)]", children: node.caption })
213
+ node.caption && /* @__PURE__ */ jsx2("div", { className: "border-t border-border px-4 py-2 text-xs text-muted-foreground", children: node.caption })
214
214
  ] });
215
215
  case "actions":
216
216
  return renderActions(node.actions, onAction);
217
217
  case "separator":
218
218
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
219
- /* @__PURE__ */ jsx2("div", { className: "h-px flex-1 bg-[var(--border-subtle)]" }),
220
- node.label && /* @__PURE__ */ jsx2("span", { className: "text-[10px] uppercase tracking-[0.14em] text-[var(--text-muted)]", children: node.label }),
221
- /* @__PURE__ */ jsx2("div", { className: "h-px flex-1 bg-[var(--border-subtle)]" })
219
+ /* @__PURE__ */ jsx2("div", { className: "h-px flex-1 bg-border" }),
220
+ node.label && /* @__PURE__ */ jsx2("span", { className: "text-[10px] uppercase tracking-[0.14em] text-muted-foreground", children: node.label }),
221
+ /* @__PURE__ */ jsx2("div", { className: "h-px flex-1 bg-border" })
222
222
  ] });
223
223
  case "stack":
224
224
  return /* @__PURE__ */ jsx2(
@@ -237,13 +237,13 @@ function renderNode(node, onAction) {
237
237
  case "grid":
238
238
  return /* @__PURE__ */ jsx2("div", { className: cn("grid", GRID_STYLES[node.columns ?? 2], GAP_STYLES[node.gap ?? "md"]), children: node.children.map((child, index) => /* @__PURE__ */ jsx2(Fragment, { children: renderNode(child, onAction) }, child.id ?? `${child.type}-${index}`)) });
239
239
  case "card":
240
- return /* @__PURE__ */ jsxs(Card, { variant: "glass", className: "border-[var(--border-subtle)] shadow-[var(--shadow-card)]", children: [
240
+ return /* @__PURE__ */ jsxs(Card, { variant: "glass", className: "border-border shadow-[var(--shadow-card)]", children: [
241
241
  (node.eyebrow || node.title || node.description || node.badge || node.actions) && /* @__PURE__ */ jsxs(CardHeader, { className: "gap-2 p-4 pb-0", children: [
242
242
  /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-3", children: [
243
243
  /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 space-y-1", children: [
244
- node.eyebrow && /* @__PURE__ */ jsx2("div", { className: "text-[10px] font-semibold uppercase tracking-[0.16em] text-[var(--text-muted)]", children: node.eyebrow }),
245
- node.title && /* @__PURE__ */ jsx2(CardTitle, { className: "text-base text-[var(--text-primary)]", children: node.title }),
246
- node.description && /* @__PURE__ */ jsx2(CardDescription, { className: "text-[var(--text-muted)]", children: node.description })
244
+ node.eyebrow && /* @__PURE__ */ jsx2("div", { className: "text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-foreground", children: node.eyebrow }),
245
+ node.title && /* @__PURE__ */ jsx2(CardTitle, { className: "text-base text-foreground", children: node.title }),
246
+ node.description && /* @__PURE__ */ jsx2(CardDescription, { className: "text-muted-foreground", children: node.description })
247
247
  ] }),
248
248
  node.badge && /* @__PURE__ */ jsx2(Badge, { variant: node.badge.tone ?? "outline", children: node.badge.label })
249
249
  ] }),
@@ -264,20 +264,20 @@ function OpenUIArtifactRenderer({
264
264
  "div",
265
265
  {
266
266
  className: cn(
267
- "flex h-full min-h-[16rem] items-center justify-center rounded-[var(--radius-xl)] border border-dashed border-[var(--border-subtle)] bg-[var(--bg-card)] p-6 text-center",
267
+ "flex h-full min-h-[16rem] items-center justify-center rounded-[var(--radius-xl)] border border-dashed border-border bg-card p-6 text-center",
268
268
  className
269
269
  ),
270
270
  children: /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
271
- /* @__PURE__ */ jsx2("div", { className: "mx-auto flex h-10 w-10 items-center justify-center rounded-full bg-[var(--bg-elevated)] text-[var(--text-muted)]", children: /* @__PURE__ */ jsx2(Minus, { className: "h-4 w-4" }) }),
272
- /* @__PURE__ */ jsx2("div", { className: "text-sm font-medium text-[var(--text-primary)]", children: "No structured artifact payload" }),
273
- /* @__PURE__ */ jsx2("div", { className: "text-sm text-[var(--text-muted)]", children: "Pass an OpenUI-like schema to render dynamic result panels with sandbox-ui primitives." })
271
+ /* @__PURE__ */ jsx2("div", { className: "mx-auto flex h-10 w-10 items-center justify-center rounded-full bg-muted/50 text-muted-foreground", children: /* @__PURE__ */ jsx2(Minus, { className: "h-4 w-4" }) }),
272
+ /* @__PURE__ */ jsx2("div", { className: "text-sm font-medium text-foreground", children: "No structured artifact payload" }),
273
+ /* @__PURE__ */ jsx2("div", { className: "text-sm text-muted-foreground", children: "Pass an OpenUI-like schema to render dynamic result panels with sandbox-ui primitives." })
274
274
  ] })
275
275
  }
276
276
  );
277
277
  }
278
278
  return /* @__PURE__ */ jsxs("div", { className: cn("space-y-4 p-4", className), children: [
279
279
  nodes.map((node, index) => /* @__PURE__ */ jsx2(Fragment, { children: renderNode(node, onAction) }, node.id ?? `${node.type}-${index}`)),
280
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-[var(--radius-lg)] border border-[var(--border-subtle)] bg-[var(--bg-card)] px-3 py-2 text-xs text-[var(--text-muted)]", children: [
280
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-[var(--radius-lg)] border border-border bg-card px-3 py-2 text-xs text-muted-foreground", children: [
281
281
  /* @__PURE__ */ jsx2(ArrowRight, { className: "h-3.5 w-3.5" }),
282
282
  "Structured artifact rendered through sandbox-ui primitives"
283
283
  ] })