@tangle-network/sandbox-ui 0.13.0 → 0.15.1

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 (106) hide show
  1. package/dist/auth.d.ts +1 -74
  2. package/dist/auth.js +1 -4
  3. package/dist/chat.d.ts +1 -136
  4. package/dist/chat.js +2 -15
  5. package/dist/chunk-2BUPSB7O.js +0 -0
  6. package/dist/chunk-3J6FG3FJ.js +18 -0
  7. package/dist/chunk-76IQLPW2.js +206 -0
  8. package/dist/chunk-7ZA5SEK3.js +239 -0
  9. package/dist/{chunk-ESVYBDGA.js → chunk-AG7QDC2Q.js} +182 -2
  10. package/dist/chunk-AHBZCBDO.js +2960 -0
  11. package/dist/chunk-AZ3AWMTM.js +8 -0
  12. package/dist/chunk-CMY7W45U.js +380 -0
  13. package/dist/{chunk-QMU2PWOU.js → chunk-DNZ4DTNA.js} +71 -17
  14. package/dist/chunk-EI44GEQ5.js +6 -0
  15. package/dist/{chunk-5OQ27N57.js → chunk-GPT7VKK6.js} +34 -38
  16. package/dist/chunk-JBGKGLD7.js +16 -0
  17. package/dist/chunk-NJNME4J4.js +14 -0
  18. package/dist/chunk-QPAJR74X.js +20 -0
  19. package/dist/chunk-TK46XFLM.js +28 -0
  20. package/dist/chunk-WID73FPH.js +89 -0
  21. package/dist/chunk-YVXK4XRO.js +30 -0
  22. package/dist/dashboard.d.ts +538 -4
  23. package/dist/dashboard.js +15 -886
  24. package/dist/editor.d.ts +1 -120
  25. package/dist/editor.js +1 -5
  26. package/dist/files.d.ts +1 -129
  27. package/dist/files.js +2 -7
  28. package/dist/globals.css +5 -1265
  29. package/dist/hooks.d.ts +114 -11
  30. package/dist/hooks.js +17 -88
  31. package/dist/index.d.ts +24 -99
  32. package/dist/index.js +247 -252
  33. package/dist/markdown.d.ts +1 -29
  34. package/dist/markdown.js +2 -2
  35. package/dist/openui.d.ts +8 -115
  36. package/dist/openui.js +1 -6
  37. package/dist/pages.d.ts +1 -2
  38. package/dist/pages.js +68 -66
  39. package/dist/primitives.d.ts +14 -49
  40. package/dist/primitives.js +69 -77
  41. package/dist/run.d.ts +1 -14
  42. package/dist/run.js +2 -22
  43. package/dist/sdk-hooks.d.ts +3 -283
  44. package/dist/sdk-hooks.js +10 -14
  45. package/dist/stores.d.ts +2 -14
  46. package/dist/stores.js +11 -39
  47. package/dist/styles.css +5 -1265
  48. package/dist/{usage-chart-CPTcNlGs.d.ts → template-card-UhV3pmRC.d.ts} +16 -1
  49. package/dist/terminal.js +39 -2
  50. package/dist/types.d.ts +11 -8
  51. package/dist/types.js +1 -0
  52. package/dist/utils.d.ts +1 -44
  53. package/dist/utils.js +6 -12
  54. package/dist/workspace.d.ts +5 -10
  55. package/dist/workspace.js +3 -19
  56. package/package.json +23 -54
  57. package/dist/active-sessions-store-CeOmXgv5.d.ts +0 -85
  58. package/dist/artifact-pane-Bh45Ssco.d.ts +0 -24
  59. package/dist/branding-DCi5VEik.d.ts +0 -13
  60. package/dist/button-CMQuQEW_.d.ts +0 -17
  61. package/dist/chat-container-f4yEs6KN.d.ts +0 -106
  62. package/dist/chunk-34A66VBG.js +0 -214
  63. package/dist/chunk-34I7UFSX.js +0 -92
  64. package/dist/chunk-36QY2W5G.js +0 -802
  65. package/dist/chunk-4CLN43XT.js +0 -45
  66. package/dist/chunk-54SQQMMM.js +0 -156
  67. package/dist/chunk-66EZOYZR.js +0 -102
  68. package/dist/chunk-BX6AQMUS.js +0 -183
  69. package/dist/chunk-DI3NZ5ZX.js +0 -192
  70. package/dist/chunk-DPGIXDAI.js +0 -220
  71. package/dist/chunk-DXMIEK4K.js +0 -1426
  72. package/dist/chunk-GSZA3TSY.js +0 -79
  73. package/dist/chunk-HB5Y37YU.js +0 -54
  74. package/dist/chunk-LQNEZDRM.js +0 -109
  75. package/dist/chunk-MA7YKRUP.js +0 -131
  76. package/dist/chunk-MKTSMWVD.js +0 -109
  77. package/dist/chunk-MQXABZTB.js +0 -1348
  78. package/dist/chunk-MT5FJ3ZT.js +0 -186
  79. package/dist/chunk-NKUPJC34.js +0 -2070
  80. package/dist/chunk-OEX7NZE3.js +0 -321
  81. package/dist/chunk-OKLQVY3Y.js +0 -139
  82. package/dist/chunk-Q56BYXQF.js +0 -61
  83. package/dist/chunk-QD4QE5P5.js +0 -40
  84. package/dist/chunk-QDH5GEGY.js +0 -630
  85. package/dist/chunk-QID2OOMG.js +0 -133
  86. package/dist/chunk-RQHJBTEU.js +0 -10
  87. package/dist/chunk-T7HMZEVO.js +0 -216
  88. package/dist/chunk-U6QTHMY6.js +0 -1290
  89. package/dist/chunk-US6JKJKH.js +0 -124
  90. package/dist/chunk-VX3XOUEB.js +0 -63
  91. package/dist/chunk-XLG757B6.js +0 -933
  92. package/dist/chunk-ZMNSRDMH.js +0 -127
  93. package/dist/chunk-ZNCEM5CD.js +0 -316
  94. package/dist/document-editor-pane-A70-EhdQ.d.ts +0 -124
  95. package/dist/document-editor-pane-TLPVRBBU.js +0 -11
  96. package/dist/expanded-tool-detail-Dh99mcbY.d.ts +0 -63
  97. package/dist/file-tabs-BLfxfmAH.d.ts +0 -51
  98. package/dist/parts-CyGkM6Fp.d.ts +0 -50
  99. package/dist/run-CtFZ6s-D.d.ts +0 -41
  100. package/dist/sidebar-drop-zone-tDBsuOH5.d.ts +0 -301
  101. package/dist/sidecar-CFU2W9j1.d.ts +0 -8
  102. package/dist/template-card-BAtvcAkU.d.ts +0 -18
  103. package/dist/tool-call-feed-Bs3MyQMT.d.ts +0 -68
  104. package/dist/tool-display-Ct9nFAzJ.d.ts +0 -32
  105. package/dist/use-sandbox-metrics-B64diPqN.d.ts +0 -141
  106. package/dist/variant-list-BrHYcBCk.d.ts +0 -540
@@ -1,186 +0,0 @@
1
- import {
2
- CodeBlock
3
- } from "./chunk-T7HMZEVO.js";
4
- import {
5
- cn
6
- } from "./chunk-RQHJBTEU.js";
7
-
8
- // src/run/tool-call-step.tsx
9
- import { useState } from "react";
10
- import {
11
- Terminal,
12
- FileText,
13
- FileCode,
14
- Search,
15
- CheckCircle,
16
- ChevronRight,
17
- Loader2,
18
- FolderOpen,
19
- Download,
20
- Pencil,
21
- Eye
22
- } from "lucide-react";
23
- import { jsx, jsxs } from "react/jsx-runtime";
24
- var EXT_LANGUAGE = {
25
- ts: "typescript",
26
- tsx: "typescript",
27
- js: "javascript",
28
- jsx: "javascript",
29
- mjs: "javascript",
30
- cjs: "javascript",
31
- css: "css",
32
- scss: "scss",
33
- json: "json",
34
- jsonc: "json",
35
- md: "markdown",
36
- mdx: "markdown",
37
- py: "python",
38
- sh: "bash",
39
- bash: "bash",
40
- zsh: "bash",
41
- html: "html",
42
- htm: "html",
43
- yaml: "yaml",
44
- yml: "yaml",
45
- toml: "toml",
46
- rs: "rust",
47
- go: "go",
48
- sql: "sql",
49
- xml: "xml"
50
- };
51
- function inferLanguage(detail, language) {
52
- if (language) return language;
53
- if (!detail) return void 0;
54
- const ext = detail.split(".").pop()?.toLowerCase();
55
- return ext ? EXT_LANGUAGE[ext] : void 0;
56
- }
57
- function isFilePath(detail) {
58
- return /[/\\]/.test(detail) || /\.\w{1,6}$/.test(detail);
59
- }
60
- function FilePathChip({ path }) {
61
- const parts = path.replace(/\\/g, "/").split("/");
62
- const filename = parts.pop() ?? path;
63
- const dir = parts.length > 0 ? parts.join("/") + "/" : "";
64
- return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 rounded-[var(--radius-sm)] border border-border bg-background px-2.5 py-1.5 font-mono text-xs min-w-0", children: [
65
- /* @__PURE__ */ jsx(FileCode, { className: "h-3.5 w-3.5 shrink-0 text-primary" }),
66
- dir && /* @__PURE__ */ jsx("span", { className: "truncate text-muted-foreground", children: dir }),
67
- /* @__PURE__ */ jsx("span", { className: "shrink-0 font-semibold text-foreground", children: filename })
68
- ] });
69
- }
70
- var ICONS = {
71
- bash: Terminal,
72
- read: Eye,
73
- write: FileText,
74
- edit: Pencil,
75
- glob: FolderOpen,
76
- grep: Search,
77
- list: FolderOpen,
78
- download: Download,
79
- inspect: Search,
80
- audit: CheckCircle,
81
- unknown: FileCode
82
- };
83
- var STATUS_COLORS = {
84
- running: "text-primary",
85
- success: "text-[var(--code-success)]",
86
- error: "text-[var(--code-error)]"
87
- };
88
- function ToolCallStep({
89
- type,
90
- label,
91
- status,
92
- detail,
93
- output,
94
- language,
95
- duration,
96
- className
97
- }) {
98
- const [expanded, setExpanded] = useState(false);
99
- const Icon = ICONS[type] || ICONS.unknown;
100
- const hasExpandable = !!(detail || output);
101
- const lang = inferLanguage(detail, language);
102
- return /* @__PURE__ */ jsxs(
103
- "div",
104
- {
105
- className: cn(
106
- "group overflow-hidden rounded-[var(--radius-lg)] border bg-card transition-colors",
107
- status === "running" && "border-border",
108
- status === "success" && "border-border hover:border-primary/20",
109
- status === "error" && "border-[var(--surface-danger-border)]",
110
- className
111
- ),
112
- children: [
113
- /* @__PURE__ */ jsxs(
114
- "button",
115
- {
116
- onClick: () => hasExpandable && setExpanded(!expanded),
117
- disabled: !hasExpandable,
118
- className: cn(
119
- "flex w-full items-center gap-2.5 px-3 py-2 text-left text-sm",
120
- hasExpandable && "cursor-pointer"
121
- ),
122
- children: [
123
- /* @__PURE__ */ jsx(
124
- "div",
125
- {
126
- className: cn(
127
- "flex h-6 w-6 shrink-0 items-center justify-center rounded-[var(--radius-sm)] border",
128
- status === "running" && "border-[var(--border-accent)] bg-[var(--accent-surface-soft)] text-primary",
129
- status === "success" && "border-[var(--surface-success-border)] bg-[var(--surface-success-bg)] text-[var(--surface-success-text)]",
130
- status === "error" && "border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)] text-[var(--surface-danger-text)]"
131
- ),
132
- children: status === "running" ? /* @__PURE__ */ jsx(Loader2, { className: "h-3 w-3 animate-spin shrink-0" }) : /* @__PURE__ */ jsx(Icon, { className: cn("h-3 w-3 shrink-0", STATUS_COLORS[status]) })
133
- }
134
- ),
135
- /* @__PURE__ */ jsx("span", { className: "truncate flex-1 font-sans text-foreground", children: label }),
136
- /* @__PURE__ */ jsx(
137
- "span",
138
- {
139
- className: cn(
140
- "rounded-full border px-2 py-0.5 text-[11px] font-semibold uppercase tracking-[0.06em]",
141
- status === "running" && "border-border bg-[var(--accent-surface-soft)] text-primary",
142
- status === "success" && "border-[var(--surface-success-border)] bg-[var(--surface-success-bg)] text-[var(--surface-success-text)]",
143
- status === "error" && "border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)] text-[var(--surface-danger-text)]"
144
- ),
145
- children: status
146
- }
147
- ),
148
- duration !== void 0 && status !== "running" && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: duration < 1e3 ? `${duration}ms` : `${(duration / 1e3).toFixed(1)}s` }),
149
- hasExpandable && /* @__PURE__ */ jsx(
150
- ChevronRight,
151
- {
152
- className: cn(
153
- "h-3 w-3 text-muted-foreground transition-transform shrink-0",
154
- expanded && "rotate-90"
155
- )
156
- }
157
- )
158
- ]
159
- }
160
- ),
161
- expanded && (detail || output) && /* @__PURE__ */ jsxs("div", { className: "space-y-2 border-t border-border bg-muted px-3 py-2.5", children: [
162
- detail && (isFilePath(detail) ? /* @__PURE__ */ jsx(FilePathChip, { path: detail }) : /* @__PURE__ */ jsx("div", { className: "text-xs font-mono text-muted-foreground", children: detail })),
163
- output && /* @__PURE__ */ jsx(
164
- CodeBlock,
165
- {
166
- code: output,
167
- language: lang,
168
- className: "max-h-72 overflow-auto text-xs"
169
- }
170
- )
171
- ] })
172
- ]
173
- }
174
- );
175
- }
176
- function ToolCallGroup({ title, children, className }) {
177
- return /* @__PURE__ */ jsxs("div", { className: cn("my-2 space-y-2", className), children: [
178
- title && /* @__PURE__ */ jsx("div", { className: "mb-1 px-1 text-xs font-medium uppercase tracking-wider text-muted-foreground", children: title }),
179
- children
180
- ] });
181
- }
182
-
183
- export {
184
- ToolCallStep,
185
- ToolCallGroup
186
- };