@tangle-network/sandbox-ui 0.113.1 → 0.113.2

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.
@@ -1860,7 +1860,7 @@ function SandboxWorkbench({
1860
1860
  children: transcript
1861
1861
  }
1862
1862
  );
1863
- const artifactPanel = artifacts.length > 0 ? /* @__PURE__ */ jsxs9("section", { className: "flex h-full min-h-0 flex-col bg-surface-container", children: [
1863
+ const artifactPanel = artifacts.length > 0 || emptyArtifactState ? /* @__PURE__ */ jsxs9("section", { className: "flex h-full min-h-0 flex-col bg-surface-container", children: [
1864
1864
  /* @__PURE__ */ jsx10(
1865
1865
  ArtifactTabs,
1866
1866
  {
@@ -1880,7 +1880,7 @@ function SandboxWorkbench({
1880
1880
  ) }) })
1881
1881
  ] }) : null;
1882
1882
  const directoryPlacement = layout?.directoryPlacement ?? (directory ? "left" : "hidden");
1883
- const artifactPlacement = layout?.artifactPlacement ?? (artifacts.length > 0 ? "right" : "hidden");
1883
+ const artifactPlacement = layout?.artifactPlacement ?? (artifactPanel ? "right" : "hidden");
1884
1884
  const runtimePlacement = layout?.runtimePlacement ?? (runtime ? "bottom" : "hidden");
1885
1885
  const regionSections = {
1886
1886
  left: [],
@@ -7796,7 +7796,7 @@ function ChangesPane({
7796
7796
  showFileHeader: false,
7797
7797
  className: "flex-1"
7798
7798
  }
7799
- ) : /* @__PURE__ */ jsx10("p", { className: "px-3 py-3 text-xs text-muted-foreground", role: "status", children: "Loading diff\u2026" })
7799
+ ) : selected.loadError ? /* @__PURE__ */ jsx10("p", { className: "px-3 py-3 text-xs text-destructive", role: "alert", children: selected.loadError }) : /* @__PURE__ */ jsx10("p", { className: "px-3 py-3 text-xs text-muted-foreground", role: "status", children: "Loading diff\u2026" })
7800
7800
  ] }) : showList && /* @__PURE__ */ jsx10("p", { className: "px-3 py-3 text-xs text-muted-foreground", children: "Select a file to read its diff." }) }),
7801
7801
  (onCommit || onPush) && /* @__PURE__ */ jsxs7("div", { className: cn("shrink-0 space-y-2 border-t bg-surface-container-low p-3", BORDER), children: [
7802
7802
  onCommit && /* @__PURE__ */ jsx10(
package/dist/index.js CHANGED
@@ -133,7 +133,7 @@ import {
133
133
  formatRelativeAge,
134
134
  shellShouldRevalidate,
135
135
  useOptimisticSessionItems
136
- } from "./chunk-2Q3KDQX7.js";
136
+ } from "./chunk-OUHP3YN4.js";
137
137
  import {
138
138
  BRAND_PRISM_THEME,
139
139
  ChangesPane,
@@ -150,7 +150,7 @@ import {
150
150
  buildUnifiedPatch,
151
151
  computeDiffStats,
152
152
  resolveLanguage
153
- } from "./chunk-VEK3EZIW.js";
153
+ } from "./chunk-RDUYWQQ7.js";
154
154
  import {
155
155
  FileArtifactPane,
156
156
  FilePreview,
@@ -87,6 +87,11 @@ interface ChangedFile {
87
87
  /** Present once the consumer has resolved contents for the selected file. */
88
88
  baseline?: string;
89
89
  current?: string;
90
+ /**
91
+ * Why the sides could not be resolved. Shown under the file's header in
92
+ * place of the loading line, so a failed read never looks like a slow one.
93
+ */
94
+ loadError?: string;
90
95
  }
91
96
  interface ChangesPaneProps {
92
97
  /** Current branch; `null` when the tree has no commits yet or is not a repository. */
package/dist/workbench.js CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  buildUnifiedPatch,
15
15
  computeDiffStats,
16
16
  resolveLanguage
17
- } from "./chunk-VEK3EZIW.js";
17
+ } from "./chunk-RDUYWQQ7.js";
18
18
  import "./chunk-PZVUIUUW.js";
19
19
  import "./chunk-K4Q4E7D7.js";
20
20
  import "./chunk-OMUIPJQZ.js";
@@ -573,6 +573,10 @@ interface SandboxWorkbenchProps {
573
573
  onArtifactClose?: (artifactId: string) => void;
574
574
  runtime?: RuntimePaneProps;
575
575
  layout?: SandboxWorkbenchLayoutOptions;
576
+ /**
577
+ * Shown in the artifact region while no artifact is selected. When given,
578
+ * the region renders before the first artifact exists.
579
+ */
576
580
  emptyArtifactState?: ReactNode;
577
581
  className?: string;
578
582
  }
package/dist/workspace.js CHANGED
@@ -21,7 +21,7 @@ import {
21
21
  formatRelativeAge,
22
22
  shellShouldRevalidate,
23
23
  useOptimisticSessionItems
24
- } from "./chunk-2Q3KDQX7.js";
24
+ } from "./chunk-OUHP3YN4.js";
25
25
  import "./chunk-BGVEHENC.js";
26
26
  import "./chunk-EI44GEQ5.js";
27
27
  import "./chunk-CZ7CSFO4.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox-ui",
3
- "version": "0.113.1",
3
+ "version": "0.113.2",
4
4
  "description": "Unified UI component library for Tangle Sandbox — primitives, chat, dashboard, terminal, editor, and workspace components",
5
5
  "repository": {
6
6
  "type": "git",