@tangle-network/sandbox-ui 2.0.20 → 2.0.22

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 (40) hide show
  1. package/README.md +18 -1
  2. package/dist/{record-Cwyo2oHb.js → AgentTree-KO1TJXBq.js} +203 -313
  3. package/dist/VirtualList-DLh2JE0F.js +205 -0
  4. package/dist/{WorkflowGraph-CADReIDl.js → WorkflowGraph-B8cRtVaw.js} +2 -2
  5. package/dist/event-stream-DNEbvx4s.d.ts +2 -0
  6. package/dist/globals.css +5910 -240
  7. package/dist/hooks.d.ts +2 -2
  8. package/dist/hooks.js +2 -2
  9. package/dist/{index-ByNsP4VC.d.ts → index-BoKSR0s9.d.ts} +62 -4
  10. package/dist/{index-BYkigpIM.d.ts → index-gXcuwPOX.d.ts} +13 -7
  11. package/dist/index.d.ts +4 -4
  12. package/dist/index.js +8 -6
  13. package/dist/record-BGcR48YY.js +47 -0
  14. package/dist/record.d.ts +66 -0
  15. package/dist/record.js +2329 -0
  16. package/dist/report-viewer.js +554 -0
  17. package/dist/run/live.d.ts +1 -1
  18. package/dist/run/live.js +26 -28
  19. package/dist/run/record.d.ts +2 -2
  20. package/dist/run/record.js +4 -1
  21. package/dist/run.d.ts +4 -4
  22. package/dist/run.js +5 -3
  23. package/dist/runtime-viewer/{AgentGraphCanvas-B74GN1o6-DC3EH_ss.js → AgentGraphCanvas-DDvaU9Rg-DlNZxJ20.js} +187 -168
  24. package/dist/runtime-viewer/{latest-events-iiWwpIck-BTK0vSlR.js → latest-events-CabhXynX-Dp_vs0Px.js} +705 -691
  25. package/dist/runtime-viewer/sandbox-ui-CUj4Q1P_.css +2 -0
  26. package/dist/styles.css +5911 -241
  27. package/dist/tailwind.css +5677 -5
  28. package/dist/tokens.css +7 -1
  29. package/dist/{trace-workspace-C8dHRBDV.js → trace-workspace-DkakKRLV.js} +64 -78
  30. package/dist/{tree-data-C8CNt4WE.js → tree-data-B_IXAIgg.js} +171 -121
  31. package/dist/use-follow-tail-Ckx5ZSV2.js +1 -0
  32. package/dist/vault-tree.js +1 -1
  33. package/dist/workflows.js +1 -1
  34. package/dist/{workspace-CzikYt_y.js → workspace--GvnZNpH.js} +1 -1
  35. package/dist/{workspace-files-pane-DB9Nvwh4.js → workspace-files-pane-C0PeY6rY.js} +12 -12
  36. package/dist/workspace-viewer.js +9693 -9462
  37. package/dist/workspace.js +2 -2
  38. package/package.json +27 -13
  39. package/dist/agent-stream-CBZ2fXJ2.d.ts +0 -66
  40. package/dist/runtime-viewer/sandbox-ui-z5RGk327.css +0 -2
@@ -1,5 +1,5 @@
1
1
  import { t as cn } from "./utils-BER_bdgE.js";
2
- import { i as VaultTree, n as filterFileNodes, t as fileTreeFromPaths } from "./tree-data-C8CNt4WE.js";
2
+ import { i as VaultTree, n as filterFileNodes, t as fileTreeFromPaths } from "./tree-data-B_IXAIgg.js";
3
3
  import { Button, EmptyState, Input, SegmentedControl } from "@tangle-network/ui/primitives";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { useEffect, useId, useMemo, useRef, useState } from "react";
@@ -263,7 +263,7 @@ function WorkspaceFilesPane({ root, paths, selectedPath, onSelect, preview, onBa
263
263
  preview,
264
264
  split,
265
265
  tabs: split && tabs,
266
- empty: isEmpty,
266
+ files: index,
267
267
  backRef,
268
268
  onBack,
269
269
  onOpen: (path) => onSelect?.(path, index.get(path)),
@@ -277,7 +277,7 @@ function WorkspaceFilesPane({ root, paths, selectedPath, onSelect, preview, onBa
277
277
  }
278
278
  const baseName = (path) => path.replace(/\/+$/, "").split("/").pop() || path;
279
279
  /** The editor side of the pane: open-file tabs, a File | Diff toggle, the full-screen control, and the open file. */
280
- function FilesViewer({ preview, split, tabs, empty, backRef, onBack, onOpen, expand }) {
280
+ function FilesViewer({ preview, split, tabs, files, backRef, onBack, onOpen, expand }) {
281
281
  const path = preview?.path;
282
282
  const [open, setOpen] = useState(() => path ? [path] : []);
283
283
  useEffect(() => {
@@ -285,12 +285,12 @@ function FilesViewer({ preview, split, tabs, empty, backRef, onBack, onOpen, exp
285
285
  }, [path]);
286
286
  const [mode, setMode] = useState("file");
287
287
  useEffect(() => setMode("file"), [path]);
288
+ const shown = open.filter((entry) => entry === path || files.get(entry)?.type === "file");
288
289
  const close = (target) => {
289
- const at = open.indexOf(target);
290
- const rest = open.filter((entry) => entry !== target);
291
- setOpen(rest);
290
+ const rest = shown.filter((entry) => entry !== target);
291
+ setOpen((paths) => paths.filter((entry) => entry !== target));
292
292
  if (target !== path) return;
293
- const neighbour = rest[Math.min(at, rest.length - 1)];
293
+ const neighbour = rest[Math.min(shown.indexOf(target), rest.length - 1)];
294
294
  if (neighbour) onOpen(neighbour);
295
295
  else onBack?.();
296
296
  };
@@ -299,7 +299,7 @@ function FilesViewer({ preview, split, tabs, empty, backRef, onBack, onOpen, exp
299
299
  return /* @__PURE__ */ jsxs("div", {
300
300
  className: "flex min-h-0 min-w-0 flex-1 flex-col",
301
301
  children: [/* @__PURE__ */ jsxs("div", {
302
- className: cn(HEADER_ROW, "sticky top-0 z-10 gap-2 pr-[var(--files-inset)]", !(tabs && open.length > 0) && "pl-[var(--files-inset)]", !split && "h-auto min-h-11 flex-wrap py-1.5 pointer-coarse:h-auto"),
302
+ className: cn(HEADER_ROW, "sticky top-0 z-10 gap-2 pr-[var(--files-inset)]", !(tabs && shown.length > 0) && "pl-[var(--files-inset)]", !split && "h-auto min-h-11 flex-wrap py-1.5 pointer-coarse:h-auto"),
303
303
  children: [
304
304
  onBack && !split && preview && /* @__PURE__ */ jsxs(Button, {
305
305
  ref: backRef,
@@ -310,8 +310,8 @@ function FilesViewer({ preview, split, tabs, empty, backRef, onBack, onOpen, exp
310
310
  className: "-ml-2 shrink-0 gap-1 px-2 text-muted-foreground",
311
311
  children: [/* @__PURE__ */ jsx(ArrowLeft, { "aria-hidden": "true" }), "Back to files"]
312
312
  }),
313
- tabs && open.length > 0 ? /* @__PURE__ */ jsx(FileTabs, {
314
- tabs: open.map((entry) => ({
313
+ tabs && shown.length > 0 ? /* @__PURE__ */ jsx(FileTabs, {
314
+ tabs: shown.map((entry) => ({
315
315
  id: entry,
316
316
  name: baseName(entry),
317
317
  path: entry
@@ -339,7 +339,7 @@ function FilesViewer({ preview, split, tabs, empty, backRef, onBack, onOpen, exp
339
339
  className: cn("shrink-0 p-0.5 [&>button]:py-1", !split && "order-last")
340
340
  }),
341
341
  preview?.actions && /* @__PURE__ */ jsx("div", {
342
- className: "flex shrink-0 items-center gap-2",
342
+ className: cn("flex min-w-0 max-w-full flex-wrap items-center gap-2", !split && "order-last"),
343
343
  children: preview.actions
344
344
  }),
345
345
  expand && /* @__PURE__ */ jsx(Button, {
@@ -360,7 +360,7 @@ function FilesViewer({ preview, split, tabs, empty, backRef, onBack, onOpen, exp
360
360
  children: mode === "diff" && compare ? compare.content : preview.content
361
361
  }) : /* @__PURE__ */ jsx("div", {
362
362
  className: "flex min-h-0 min-w-0 flex-1 items-center justify-center p-6 text-sm text-muted-foreground",
363
- children: empty ? null : "Select a file to open it here."
363
+ children: files.size === 0 ? null : "Select a file to open it here."
364
364
  })]
365
365
  });
366
366
  }