@tangle-network/sandbox-ui 0.137.0 → 0.137.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.
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { n as __reExport, t as __exportAll } from "./rolldown-runtime-BBjsoOtd.js";
2
2
  import { i as TangleKnot, n as SectionTitle, r as Logo, t as primitives_exports } from "./primitives-CLOVnjWz.js";
3
3
  import { i as WorkspacePaneHeader, n as SHELL_INSET_GUTTER, r as ShellHeader, t as SHELL_HEADER_HEIGHT } from "./shell-header-CTh3oV_e.js";
4
- import { C as WorkspaceSurfaceTitle, S as WorkspaceSurfaceFrame, _ as StatusBar, a as TaskBoard, b as WorkspaceLayout, c as createShellShouldRevalidate, d as SESSION_CREATED_EVENT, f as dispatchSessionCreated, g as TerminalPanel, h as RuntimePane, i as CalendarView, l as shellShouldRevalidate, m as formatRelativeAge, n as WorkspaceFilesPane, o as SandboxWorkbench, p as useOptimisticSessionItems, r as ApprovalQueue, s as WorkspaceArtifactView, t as ArtifactPane, u as SessionSidebar, v as StatusBanner, x as WorkspaceSurface, y as DirectoryPane } from "./workspace-Bg1MFr9I.js";
4
+ import { C as WorkspaceSurfaceTitle, S as WorkspaceSurfaceFrame, _ as StatusBar, a as TaskBoard, b as WorkspaceLayout, c as createShellShouldRevalidate, d as SESSION_CREATED_EVENT, f as dispatchSessionCreated, g as TerminalPanel, h as RuntimePane, i as CalendarView, l as shellShouldRevalidate, m as formatRelativeAge, n as WorkspaceFilesPane, o as SandboxWorkbench, p as useOptimisticSessionItems, r as ApprovalQueue, s as WorkspaceArtifactView, t as ArtifactPane, u as SessionSidebar, v as StatusBanner, x as WorkspaceSurface, y as DirectoryPane } from "./workspace-cjk0axyT.js";
5
5
  import { i as VaultTree, n as filterFileNodes, r as VAULT_TREE_CHILD_PAGE, t as fileTreeFromPaths } from "./tree-data-DtoCNNBJ.js";
6
6
  import { $ as useSidebar, A as parseInsufficientBalance, B as SidebarPanel, C as SandboxStatusPill, D as ResourceMeter, E as ResourceSnapshot, F as RailHeader, G as SidebarRailNav, H as SidebarPanelHeader, I as RailModeButton, J as SIDEBAR_PANEL_WIDTH, K as RailTooltip, L as RailSeparator, M as RailButton, N as RailExpandable, O as INSUFFICIENT_BALANCE_CODE, P as RailFlyout, Q as SidebarProvider, R as Sidebar, S as SANDBOX_STATUS, T as ActivityFeed, U as SidebarRail, V as SidebarPanelContent, W as SidebarRailFooter, X as SIDEBAR_RAIL_WIDTH, Y as SIDEBAR_RAIL_LABELED_WIDTH, Z as SIDEBAR_TOTAL_WIDTH, _ as BackendSelector, a as PortsList, b as SandboxCard, c as SystemLogsViewer, d as DashboardLayout, f as HARNESS_OPTIONS, g as HarnessLogo, h as HARNESS_BRAND, i as TemplateCard, j as ProfileAvatar, k as OutOfCreditsModal, l as MetricAreaChart, m as chatCapableHarnesses, n as SnapshotList, o as GitPanel, p as HarnessPicker, q as SIDEBAR_MOBILE_WIDTH, r as ProcessList, s as UsageSummary, t as PromoBanner, u as SidebarLayout, v as SandboxTable, w as sandboxStatus, x as canAdminSandbox, y as NewSandboxCard, z as SidebarContent } from "./dashboard-SFakZEtu.js";
7
7
  import { i as modelBrandFor, n as ProviderMark, r as canonicalModelId, t as ModelBrandStack } from "./model-brand-BSr9on8C.js";
8
8
  import { a as formatPrice, i as PricingPage, n as SandboxPageShell, o as BillingDashboard, r as UsageChart, t as DashboardPageHeader } from "./page-layout-2IRtfx51.js";
9
9
  import { t as usePtySession } from "./use-pty-session-B5Q_i9RI.js";
10
- import { a as computeDiffStats, c as BRAND_PRISM_THEME, d as DiffStatsBadge, f as GitStatusBadge, i as buildUnifiedPatch, l as CodeSurface, m as PillTabs, n as SandboxArtifactPane, o as CodeView, p as PanelHeader, r as DiffView, s as FileBreadcrumb, t as ChangesPane, u as resolveLanguage } from "./workbench-BdW-YQ68.js";
10
+ import { a as computeDiffStats, c as BRAND_PRISM_THEME, d as DiffStatsBadge, f as GitStatusBadge, i as buildUnifiedPatch, l as CodeSurface, m as PillTabs, n as SandboxArtifactPane, o as CodeView, p as PanelHeader, r as DiffView, s as FileBreadcrumb, t as ChangesPane, u as resolveLanguage } from "./workbench-DPZ6LXqf.js";
11
11
  import { CSV_PREVIEW_ROW_LIMIT, FileArtifactPane, FileCard, FileList, FilePreview, FileTabs, FileTree, PdfViewer, RichFileTree, configurePdfViewer, detectFileFormat, fileExtension, filterFileTree, getCodeLanguage, getFormatLabel, getSyntaxLanguage, parseCsv, resolveFilePreviewKind } from "./files.js";
12
12
  import { n as PreviewView, t as EmbeddedAppView } from "./embedded-app-view-CYb9hevq.js";
13
13
  import { OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, OpenUIArtifactRenderer, findUnsupportedOpenUINode, validateOpenUIJsonArtifact, validateOpenUIJsonNode } from "./openui.js";
@@ -7538,7 +7538,6 @@ function DiffView({ filename, baseline, current, showFileHeader = true, defaultW
7538
7538
  current
7539
7539
  ]);
7540
7540
  const [wrap, setWrap] = React$1.useState(defaultWrap);
7541
- const hintId = React$1.useId();
7542
7541
  const hostRef = React$1.useRef(null);
7543
7542
  const instanceRef = React$1.useRef(null);
7544
7543
  const latestThemeType = React$1.useRef(themeType);
@@ -7592,27 +7591,22 @@ function DiffView({ filename, baseline, current, showFileHeader = true, defaultW
7592
7591
  return /* @__PURE__ */ jsxs("div", {
7593
7592
  className: cn$1("flex h-full min-h-0 min-w-0 max-w-full flex-col overflow-hidden bg-surface-container", className),
7594
7593
  children: [
7595
- /* @__PURE__ */ jsxs("div", {
7594
+ /* @__PURE__ */ jsx("div", {
7596
7595
  className: "flex shrink-0 flex-wrap items-center gap-2 border-b border-border px-3 py-2",
7597
- children: [/* @__PURE__ */ jsx(Button, {
7596
+ children: /* @__PURE__ */ jsx(Button, {
7598
7597
  type: "button",
7599
7598
  variant: "outline",
7600
7599
  size: "sm",
7601
7600
  "aria-pressed": wrap,
7602
7601
  onClick: () => setWrap((value) => !value),
7603
7602
  children: "Wrap lines"
7604
- }), /* @__PURE__ */ jsx("p", {
7605
- id: hintId,
7606
- className: "min-w-0 flex-1 text-xs text-muted-foreground",
7607
- children: wrap ? "Long lines wrap within this pane." : "Long lines scroll horizontally. Turn on Wrap lines to read without scrolling."
7608
- })]
7603
+ })
7609
7604
  }),
7610
7605
  /* @__PURE__ */ jsx("div", {
7611
7606
  ref: hostRef,
7612
7607
  "data-testid": "diff-view",
7613
7608
  role: "region",
7614
7609
  "aria-label": `Diff for ${filename}`,
7615
- "aria-describedby": hintId,
7616
7610
  tabIndex: 0,
7617
7611
  className: "min-h-0 min-w-0 max-w-full flex-1 overflow-auto text-[13px]"
7618
7612
  }),
package/dist/workbench.js CHANGED
@@ -1,3 +1,3 @@
1
- import { a as computeDiffStats, c as BRAND_PRISM_THEME, d as DiffStatsBadge, f as GitStatusBadge, i as buildUnifiedPatch, l as CodeSurface, m as PillTabs, n as SandboxArtifactPane, o as CodeView, p as PanelHeader, r as DiffView, s as FileBreadcrumb, t as ChangesPane, u as resolveLanguage } from "./workbench-BdW-YQ68.js";
1
+ import { a as computeDiffStats, c as BRAND_PRISM_THEME, d as DiffStatsBadge, f as GitStatusBadge, i as buildUnifiedPatch, l as CodeSurface, m as PillTabs, n as SandboxArtifactPane, o as CodeView, p as PanelHeader, r as DiffView, s as FileBreadcrumb, t as ChangesPane, u as resolveLanguage } from "./workbench-DPZ6LXqf.js";
2
2
  import { n as PreviewView, t as EmbeddedAppView } from "./embedded-app-view-CYb9hevq.js";
3
3
  export { BRAND_PRISM_THEME, ChangesPane, CodeSurface, CodeView, DiffStatsBadge, DiffView, EmbeddedAppView, FileBreadcrumb, GitStatusBadge, PanelHeader, PillTabs, PreviewView, SandboxArtifactPane, buildUnifiedPatch, computeDiffStats, resolveLanguage };
@@ -2557,13 +2557,15 @@ function WorkspaceFilesPane({ root, paths, selectedPath, onSelect, preview, onBa
2557
2557
  const isEmpty = nodes.length === 0;
2558
2558
  const normalizedSelection = selectedPath?.replace(/^(\.\/|\/)+/, "").replace(/\/+$/, "");
2559
2559
  const mountedRef = useRef(false);
2560
+ const openedByReaderRef = useRef(false);
2560
2561
  useEffect(() => {
2561
2562
  if (!mountedRef.current) {
2562
2563
  mountedRef.current = true;
2563
2564
  wasPreviewRef.current = hasPreview;
2564
2565
  return;
2565
2566
  }
2566
- if (hasPreview && !wasPreviewRef.current) backRef.current?.focus({ preventScroll: true });
2567
+ if (hasPreview && !wasPreviewRef.current && openedByReaderRef.current) backRef.current?.focus({ preventScroll: true });
2568
+ openedByReaderRef.current = false;
2567
2569
  if (!hasPreview && wasPreviewRef.current) {
2568
2570
  const target = returnFocusRef.current;
2569
2571
  if (target?.isConnected) target.focus({ preventScroll: true });
@@ -2641,6 +2643,7 @@ function WorkspaceFilesPane({ root, paths, selectedPath, onSelect, preview, onBa
2641
2643
  selectedPath: normalizedSelection,
2642
2644
  onSelect: (path) => {
2643
2645
  if (treeRef.current) returnFocusRef.current = activeElementWithin(treeRef.current);
2646
+ openedByReaderRef.current = true;
2644
2647
  onSelect?.(path, index.get(path));
2645
2648
  },
2646
2649
  onFolderSelect: (path) => onSelect?.(`${path}/`, index.get(path)),
package/dist/workspace.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { i as WorkspacePaneHeader, n as SHELL_INSET_GUTTER, r as ShellHeader, t as SHELL_HEADER_HEIGHT } from "./shell-header-CTh3oV_e.js";
2
- import { C as WorkspaceSurfaceTitle, S as WorkspaceSurfaceFrame, _ as StatusBar, a as TaskBoard, b as WorkspaceLayout, c as createShellShouldRevalidate, d as SESSION_CREATED_EVENT, f as dispatchSessionCreated, g as TerminalPanel, h as RuntimePane, i as CalendarView, l as shellShouldRevalidate, m as formatRelativeAge, n as WorkspaceFilesPane, o as SandboxWorkbench, p as useOptimisticSessionItems, r as ApprovalQueue, s as WorkspaceArtifactView, t as ArtifactPane, u as SessionSidebar, v as StatusBanner, x as WorkspaceSurface, y as DirectoryPane } from "./workspace-Bg1MFr9I.js";
2
+ import { C as WorkspaceSurfaceTitle, S as WorkspaceSurfaceFrame, _ as StatusBar, a as TaskBoard, b as WorkspaceLayout, c as createShellShouldRevalidate, d as SESSION_CREATED_EVENT, f as dispatchSessionCreated, g as TerminalPanel, h as RuntimePane, i as CalendarView, l as shellShouldRevalidate, m as formatRelativeAge, n as WorkspaceFilesPane, o as SandboxWorkbench, p as useOptimisticSessionItems, r as ApprovalQueue, s as WorkspaceArtifactView, t as ArtifactPane, u as SessionSidebar, v as StatusBanner, x as WorkspaceSurface, y as DirectoryPane } from "./workspace-cjk0axyT.js";
3
3
  export { ApprovalQueue, ArtifactPane, CalendarView, DirectoryPane, RuntimePane, SESSION_CREATED_EVENT, SHELL_HEADER_HEIGHT, SHELL_INSET_GUTTER, SandboxWorkbench, SessionSidebar, ShellHeader, StatusBanner, StatusBar, TaskBoard, TerminalPanel, WorkspaceArtifactView, WorkspaceFilesPane, WorkspaceLayout, WorkspacePaneHeader, WorkspaceSurface, WorkspaceSurfaceFrame, WorkspaceSurfaceTitle, createShellShouldRevalidate, dispatchSessionCreated, formatRelativeAge, shellShouldRevalidate, useOptimisticSessionItems };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox-ui",
3
- "version": "0.137.0",
3
+ "version": "0.137.1",
4
4
  "license": "MIT",
5
5
  "description": "Unified UI component library for Tangle Sandbox — primitives, chat, dashboard, terminal, editor, and workspace components",
6
6
  "repository": {