@tangle-network/sandbox-ui 0.53.0 → 0.55.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.
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-3J6FG3FJ.js";
4
4
  import {
5
5
  PortsList
6
- } from "./chunk-KN2ZRAW6.js";
6
+ } from "./chunk-SVNWL3ZR.js";
7
7
  import {
8
8
  TerminalView
9
9
  } from "./chunk-VIREDUBF.js";
@@ -1899,8 +1899,29 @@ function PlanCards({ plans, className }) {
1899
1899
  }
1900
1900
 
1901
1901
  // src/dashboard/dashboard-layout.tsx
1902
- import * as React8 from "react";
1902
+ import * as React9 from "react";
1903
1903
  import { Plus as Plus2, Bell } from "lucide-react";
1904
+
1905
+ // src/dashboard/use-brand-theme-sync.ts
1906
+ import * as React8 from "react";
1907
+ function useBrandThemeSync() {
1908
+ React8.useEffect(() => {
1909
+ if (typeof document === "undefined") return;
1910
+ const el = document.documentElement;
1911
+ const sync = () => {
1912
+ const dark = el.classList.contains("dark");
1913
+ el.classList.toggle("light", !dark);
1914
+ const next = dark ? "dark" : "light";
1915
+ if (el.getAttribute("data-theme") !== next) el.setAttribute("data-theme", next);
1916
+ };
1917
+ sync();
1918
+ const observer = new MutationObserver(sync);
1919
+ observer.observe(el, { attributes: true, attributeFilter: ["class"] });
1920
+ return () => observer.disconnect();
1921
+ }, []);
1922
+ }
1923
+
1924
+ // src/dashboard/dashboard-layout.tsx
1904
1925
  import { Fragment as Fragment9, jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
1905
1926
  function MenuIcon({ className }) {
1906
1927
  return /* @__PURE__ */ jsxs13("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className, children: [
@@ -1958,11 +1979,12 @@ function DashboardLayoutInner({
1958
1979
  appearance,
1959
1980
  notifications: notifData
1960
1981
  }) {
1982
+ useBrandThemeSync();
1961
1983
  const Link = LinkComponent;
1962
- const [mobileMenuOpen, setMobileMenuOpen] = React8.useState(false);
1963
- const [notificationsOpen, setNotificationsOpen] = React8.useState(false);
1964
- const notifRef = React8.useRef(null);
1965
- React8.useEffect(() => {
1984
+ const [mobileMenuOpen, setMobileMenuOpen] = React9.useState(false);
1985
+ const [notificationsOpen, setNotificationsOpen] = React9.useState(false);
1986
+ const notifRef = React9.useRef(null);
1987
+ React9.useEffect(() => {
1966
1988
  if (!notificationsOpen) return;
1967
1989
  const handler = (e) => {
1968
1990
  if (notifRef.current && !notifRef.current.contains(e.target)) {
@@ -1980,13 +2002,13 @@ function DashboardLayoutInner({
1980
2002
  };
1981
2003
  }, [notificationsOpen]);
1982
2004
  const { contentMargin, hidden, mode, hasPanels, panelOpen, toggleRail, railCollapsed } = useSidebar();
1983
- const modeSet = React8.useMemo(() => new Set(modeItems), [modeItems]);
1984
- const sidebarUser = React8.useMemo(
2005
+ const modeSet = React9.useMemo(() => new Set(modeItems), [modeItems]);
2006
+ const sidebarUser = React9.useMemo(
1985
2007
  () => user ? { email: user.email, name: user.name, tier: user.tier, avatarUrl: user.avatarUrl } : void 0,
1986
2008
  [user?.email, user?.name, user?.tier, user?.avatarUrl]
1987
2009
  );
1988
2010
  const activePanel = panels.find((p) => p.mode === mode);
1989
- const buildSidebarContent = React8.useCallback(
2011
+ const buildSidebarContent = React9.useCallback(
1990
2012
  (showLabels, allowCollapse) => /* @__PURE__ */ jsxs13(Fragment9, { children: [
1991
2013
  /* @__PURE__ */ jsxs13(SidebarRail, { wide: showLabels, children: [
1992
2014
  /* @__PURE__ */ jsx14(
@@ -2011,7 +2033,7 @@ function DashboardLayoutInner({
2011
2033
  const isMode = modeSet.has(item.id);
2012
2034
  const prevIsMode = i > 0 && modeSet.has(navItems[i - 1].id);
2013
2035
  const showSep = i > 0 && isMode && !prevIsMode;
2014
- return /* @__PURE__ */ jsxs13(React8.Fragment, { children: [
2036
+ return /* @__PURE__ */ jsxs13(React9.Fragment, { children: [
2015
2037
  showSep && /* @__PURE__ */ jsx14(
2016
2038
  RailSeparator,
2017
2039
  {
@@ -2119,11 +2141,11 @@ function DashboardLayoutInner({
2119
2141
  mode
2120
2142
  ]
2121
2143
  );
2122
- const sidebarContent = React8.useMemo(
2144
+ const sidebarContent = React9.useMemo(
2123
2145
  () => buildSidebarContent(labeledRail && !railCollapsed, labeledRail),
2124
2146
  [buildSidebarContent, labeledRail, railCollapsed]
2125
2147
  );
2126
- const mobileSidebarContent = React8.useMemo(() => buildSidebarContent(true, false), [buildSidebarContent]);
2148
+ const mobileSidebarContent = React9.useMemo(() => buildSidebarContent(true, false), [buildSidebarContent]);
2127
2149
  return /* @__PURE__ */ jsxs13("div", { className: cn("min-h-screen bg-surface text-foreground", className), children: [
2128
2150
  /* @__PURE__ */ jsxs13(
2129
2151
  "nav",
@@ -2296,6 +2318,7 @@ function SidebarLayoutInner({
2296
2318
  sidebarClassName,
2297
2319
  contentClassName
2298
2320
  }) {
2321
+ useBrandThemeSync();
2299
2322
  const Link = LinkComponent ?? DefaultLink3;
2300
2323
  const { panelOpen, togglePanel, setPanelOpen, railCollapsed, toggleRail } = useSidebar();
2301
2324
  const handleNavClick = closePanelOnNavigate && panelOpen ? () => setPanelOpen(false) : void 0;
@@ -2647,7 +2670,7 @@ function ProfileComparison({
2647
2670
  }
2648
2671
 
2649
2672
  // src/dashboard/metric-area-chart.tsx
2650
- import * as React9 from "react";
2673
+ import * as React10 from "react";
2651
2674
  import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
2652
2675
  var TONE_VARS = {
2653
2676
  primary: "var(--brand-primary, hsl(var(--primary)))",
@@ -2694,7 +2717,7 @@ function MetricAreaChart({
2694
2717
  emptyState,
2695
2718
  className
2696
2719
  }) {
2697
- const gradientId = React9.useId();
2720
+ const gradientId = React10.useId();
2698
2721
  const width = 400;
2699
2722
  const values = points.map((p) => p.value).filter((v) => v !== null);
2700
2723
  const latest = values.length > 0 ? values[values.length - 1] : null;
@@ -2754,7 +2777,7 @@ function MetricAreaChart({
2754
2777
  /* @__PURE__ */ jsx17("stop", { offset: "0%", stopColor: color, stopOpacity: 0.28 }),
2755
2778
  /* @__PURE__ */ jsx17("stop", { offset: "100%", stopColor: color, stopOpacity: 0.02 })
2756
2779
  ] }) }),
2757
- segments.map((segment) => /* @__PURE__ */ jsxs16(React9.Fragment, { children: [
2780
+ segments.map((segment) => /* @__PURE__ */ jsxs16(React10.Fragment, { children: [
2758
2781
  /* @__PURE__ */ jsx17("path", { d: segment.area, fill: `url(#${gradientId})` }),
2759
2782
  /* @__PURE__ */ jsx17(
2760
2783
  "path",
@@ -2979,14 +3002,14 @@ function VariantList({
2979
3002
 
2980
3003
  // src/dashboard/system-logs.tsx
2981
3004
  import { Terminal as Terminal2 } from "lucide-react";
2982
- import { useEffect as useEffect4, useRef as useRef4, useState as useState6 } from "react";
3005
+ import { useEffect as useEffect5, useRef as useRef4, useState as useState6 } from "react";
2983
3006
  import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
2984
3007
  function SystemLogsViewer({ apiUrl, token, className }) {
2985
3008
  const [logs, setLogs] = useState6([]);
2986
3009
  const [error, setError] = useState6(null);
2987
3010
  const [isFollowing, setIsFollowing] = useState6(true);
2988
3011
  const scrollRef = useRef4(null);
2989
- useEffect4(() => {
3012
+ useEffect5(() => {
2990
3013
  let timeoutId;
2991
3014
  let backoff = 2e3;
2992
3015
  const controller = new AbortController();
@@ -3022,7 +3045,7 @@ function SystemLogsViewer({ apiUrl, token, className }) {
3022
3045
  clearTimeout(timeoutId);
3023
3046
  };
3024
3047
  }, [apiUrl, token]);
3025
- useEffect4(() => {
3048
+ useEffect5(() => {
3026
3049
  if (isFollowing && scrollRef.current) {
3027
3050
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
3028
3051
  }
@@ -3229,14 +3252,14 @@ function GitPanel({ status, log, loading = false, onRefresh, className }) {
3229
3252
  }
3230
3253
 
3231
3254
  // src/dashboard/ports-list.tsx
3232
- import * as React11 from "react";
3255
+ import * as React12 from "react";
3233
3256
  import { Copy as Copy3, Check as Check5, Globe, Plus as Plus4, Trash2 as Trash23 } from "lucide-react";
3234
3257
  import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
3235
3258
  function PortsList({ ports, onExposePort, onRemovePort, isExposing = false, className }) {
3236
- const [newPort, setNewPort] = React11.useState("");
3237
- const [copiedPort, setCopiedPort] = React11.useState(null);
3238
- const copyTimerRef = React11.useRef(null);
3239
- React11.useEffect(() => {
3259
+ const [newPort, setNewPort] = React12.useState("");
3260
+ const [copiedPort, setCopiedPort] = React12.useState(null);
3261
+ const copyTimerRef = React12.useRef(null);
3262
+ React12.useEffect(() => {
3240
3263
  return () => {
3241
3264
  if (copyTimerRef.current) clearTimeout(copyTimerRef.current);
3242
3265
  };
@@ -3330,7 +3353,7 @@ function PortsList({ ports, onExposePort, onRemovePort, isExposing = false, clas
3330
3353
  }
3331
3354
 
3332
3355
  // src/dashboard/process-list.tsx
3333
- import * as React12 from "react";
3356
+ import * as React13 from "react";
3334
3357
  import { Activity as Activity3, Plus as Plus5, Skull, Terminal as Terminal3 } from "lucide-react";
3335
3358
  import { jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
3336
3359
  function formatUptime(startedAt) {
@@ -3342,7 +3365,7 @@ function formatUptime(startedAt) {
3342
3365
  return `${Math.floor(ms / 36e5)}h ${Math.floor(ms % 36e5 / 6e4)}m`;
3343
3366
  }
3344
3367
  function ProcessList({ processes, onSpawn, onKill, loading = false, className }) {
3345
- const [newCommand, setNewCommand] = React12.useState("");
3368
+ const [newCommand, setNewCommand] = React13.useState("");
3346
3369
  const handleSpawn = () => {
3347
3370
  const cmd = newCommand.trim();
3348
3371
  if (cmd) {
@@ -3415,11 +3438,11 @@ function ProcessList({ processes, onSpawn, onKill, loading = false, className })
3415
3438
  }
3416
3439
 
3417
3440
  // src/dashboard/network-config.tsx
3418
- import * as React13 from "react";
3441
+ import * as React14 from "react";
3419
3442
  import { Network as Network2, Plus as Plus6, Trash2 as Trash24, ShieldAlert } from "lucide-react";
3420
3443
  import { jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
3421
3444
  function NetworkConfig({ config, onUpdate, loading = false, className }) {
3422
- const [newCidr, setNewCidr] = React13.useState("");
3445
+ const [newCidr, setNewCidr] = React14.useState("");
3423
3446
  const isValidCidr = (value) => {
3424
3447
  const match = value.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\/(\d{1,2})$/);
3425
3448
  if (!match) return false;
@@ -3523,7 +3546,7 @@ function NetworkConfig({ config, onUpdate, loading = false, className }) {
3523
3546
  }
3524
3547
 
3525
3548
  // src/dashboard/backend-config.tsx
3526
- import * as React14 from "react";
3549
+ import * as React15 from "react";
3527
3550
  import { Bot, Plus as Plus7, RefreshCw as RefreshCw2, Trash2 as Trash25, Server, Wrench } from "lucide-react";
3528
3551
  import { Fragment as Fragment13, jsx as jsx25, jsxs as jsxs24 } from "react/jsx-runtime";
3529
3552
  function BackendConfig({
@@ -3535,10 +3558,10 @@ function BackendConfig({
3535
3558
  loading = false,
3536
3559
  className
3537
3560
  }) {
3538
- const [showAddMcp, setShowAddMcp] = React14.useState(false);
3539
- const [mcpName, setMcpName] = React14.useState("");
3540
- const [mcpCommand, setMcpCommand] = React14.useState("");
3541
- const [mcpArgs, setMcpArgs] = React14.useState("");
3561
+ const [showAddMcp, setShowAddMcp] = React15.useState(false);
3562
+ const [mcpName, setMcpName] = React15.useState("");
3563
+ const [mcpCommand, setMcpCommand] = React15.useState("");
3564
+ const [mcpArgs, setMcpArgs] = React15.useState("");
3542
3565
  const handleAddMcp = () => {
3543
3566
  const name = mcpName.trim();
3544
3567
  const command = mcpCommand.trim();
@@ -3696,7 +3719,7 @@ function BackendConfig({
3696
3719
  }
3697
3720
 
3698
3721
  // src/dashboard/snapshot-list.tsx
3699
- import * as React15 from "react";
3722
+ import * as React16 from "react";
3700
3723
  import { Camera, Clock as Clock5, HardDrive as HardDrive2, Plus as Plus8, RotateCcw } from "lucide-react";
3701
3724
  import { jsx as jsx26, jsxs as jsxs25 } from "react/jsx-runtime";
3702
3725
  function formatBytes(bytes) {
@@ -3713,8 +3736,8 @@ function formatDate(dateStr) {
3713
3736
  return d.toLocaleDateString(void 0, { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" });
3714
3737
  }
3715
3738
  function SnapshotList({ snapshots, onCreate, onRestore, onSaveAsTemplate, loading = false, className }) {
3716
- const [showCreate, setShowCreate] = React15.useState(false);
3717
- const [tags, setTags] = React15.useState("");
3739
+ const [showCreate, setShowCreate] = React16.useState(false);
3740
+ const [tags, setTags] = React16.useState("");
3718
3741
  const handleCreate = () => {
3719
3742
  const tagList = tags.trim() ? tags.trim().split(",").map((t) => t.trim()).filter(Boolean) : void 0;
3720
3743
  onCreate(tagList);
package/dist/dashboard.js CHANGED
@@ -54,7 +54,7 @@ import {
54
54
  canAdminSandbox,
55
55
  parseInsufficientBalance,
56
56
  useSidebar
57
- } from "./chunk-KN2ZRAW6.js";
57
+ } from "./chunk-SVNWL3ZR.js";
58
58
  import {
59
59
  BillingDashboard,
60
60
  InfoPanel,
package/dist/globals.css CHANGED
@@ -317,9 +317,6 @@
317
317
  .inset-x-0 {
318
318
  inset-inline: calc(var(--spacing) * 0);
319
319
  }
320
- .inset-x-2 {
321
- inset-inline: calc(var(--spacing) * 2);
322
- }
323
320
  .inset-y-0 {
324
321
  inset-block: calc(var(--spacing) * 0);
325
322
  }
@@ -831,9 +828,6 @@
831
828
  .max-h-\[440px\] {
832
829
  max-height: 440px;
833
830
  }
834
- .max-h-\[min\(18rem\,50vh\)\] {
835
- max-height: min(18rem, 50vh);
836
- }
837
831
  .min-h-0 {
838
832
  min-height: calc(var(--spacing) * 0);
839
833
  }
@@ -2767,6 +2761,9 @@
2767
2761
  .pb-2 {
2768
2762
  padding-bottom: calc(var(--spacing) * 2);
2769
2763
  }
2764
+ .pb-2\.5 {
2765
+ padding-bottom: calc(var(--spacing) * 2.5);
2766
+ }
2770
2767
  .pb-3 {
2771
2768
  padding-bottom: calc(var(--spacing) * 3);
2772
2769
  }
@@ -3497,12 +3494,6 @@
3497
3494
  .ring-\[var\(--md3-outline-variant\)\] {
3498
3495
  --tw-ring-color: var(--md3-outline-variant);
3499
3496
  }
3500
- .ring-black\/5 {
3501
- --tw-ring-color: color-mix(in srgb, #000 5%, transparent);
3502
- @supports (color: color-mix(in lab, red, red)) {
3503
- --tw-ring-color: color-mix(in oklab, var(--color-black) 5%, transparent);
3504
- }
3505
- }
3506
3497
  .ring-border {
3507
3498
  --tw-ring-color: var(--color-border);
3508
3499
  }
@@ -5354,6 +5345,11 @@
5354
5345
  }
5355
5346
  }
5356
5347
  }
5348
+ .\[\@media\(hover\:none\)\]\:opacity-100 {
5349
+ @media (hover:none) {
5350
+ opacity: 100%;
5351
+ }
5352
+ }
5357
5353
  }
5358
5354
  :root,
5359
5355
  [data-sandbox-ui],
package/dist/index.js CHANGED
@@ -63,19 +63,6 @@ import {
63
63
  useTotalRunningSessions
64
64
  } from "./chunk-WID73FPH.js";
65
65
  import "./chunk-2BUPSB7O.js";
66
- import {
67
- TOOL_CATEGORY_ICONS,
68
- cn,
69
- copyText,
70
- formatBytes,
71
- formatDuration,
72
- formatUptime,
73
- getToolCategory,
74
- getToolDisplayMetadata,
75
- getToolErrorText,
76
- timeAgo,
77
- truncateText
78
- } from "./chunk-TK46XFLM.js";
79
66
  import {
80
67
  OpenUIArtifactRenderer
81
68
  } from "./chunk-AZ3AWMTM.js";
@@ -105,6 +92,19 @@ import {
105
92
  snapHarnessToModel,
106
93
  snapModelToHarness
107
94
  } from "./chunk-KOUYJ6QP.js";
95
+ import {
96
+ TOOL_CATEGORY_ICONS,
97
+ cn,
98
+ copyText,
99
+ formatBytes,
100
+ formatDuration,
101
+ formatUptime,
102
+ getToolCategory,
103
+ getToolDisplayMetadata,
104
+ getToolErrorText,
105
+ timeAgo,
106
+ truncateText
107
+ } from "./chunk-TK46XFLM.js";
108
108
  import {
109
109
  ExpandedToolDetail,
110
110
  InlineThinkingItem,
@@ -148,7 +148,7 @@ import {
148
148
  buildUnifiedPatch,
149
149
  computeDiffStats,
150
150
  resolveLanguage
151
- } from "./chunk-P6L4KBYK.js";
151
+ } from "./chunk-DLKDWMFM.js";
152
152
  import {
153
153
  FileArtifactPane,
154
154
  FilePreview,
@@ -213,7 +213,7 @@ import {
213
213
  canAdminSandbox,
214
214
  parseInsufficientBalance,
215
215
  useSidebar
216
- } from "./chunk-KN2ZRAW6.js";
216
+ } from "./chunk-SVNWL3ZR.js";
217
217
  import {
218
218
  BillingDashboard,
219
219
  InfoPanel,
package/dist/styles.css CHANGED
@@ -317,9 +317,6 @@
317
317
  .inset-x-0 {
318
318
  inset-inline: calc(var(--spacing) * 0);
319
319
  }
320
- .inset-x-2 {
321
- inset-inline: calc(var(--spacing) * 2);
322
- }
323
320
  .inset-y-0 {
324
321
  inset-block: calc(var(--spacing) * 0);
325
322
  }
@@ -831,9 +828,6 @@
831
828
  .max-h-\[440px\] {
832
829
  max-height: 440px;
833
830
  }
834
- .max-h-\[min\(18rem\,50vh\)\] {
835
- max-height: min(18rem, 50vh);
836
- }
837
831
  .min-h-0 {
838
832
  min-height: calc(var(--spacing) * 0);
839
833
  }
@@ -2767,6 +2761,9 @@
2767
2761
  .pb-2 {
2768
2762
  padding-bottom: calc(var(--spacing) * 2);
2769
2763
  }
2764
+ .pb-2\.5 {
2765
+ padding-bottom: calc(var(--spacing) * 2.5);
2766
+ }
2770
2767
  .pb-3 {
2771
2768
  padding-bottom: calc(var(--spacing) * 3);
2772
2769
  }
@@ -3497,12 +3494,6 @@
3497
3494
  .ring-\[var\(--md3-outline-variant\)\] {
3498
3495
  --tw-ring-color: var(--md3-outline-variant);
3499
3496
  }
3500
- .ring-black\/5 {
3501
- --tw-ring-color: color-mix(in srgb, #000 5%, transparent);
3502
- @supports (color: color-mix(in lab, red, red)) {
3503
- --tw-ring-color: color-mix(in oklab, var(--color-black) 5%, transparent);
3504
- }
3505
- }
3506
3497
  .ring-border {
3507
3498
  --tw-ring-color: var(--color-border);
3508
3499
  }
@@ -5354,6 +5345,11 @@
5354
5345
  }
5355
5346
  }
5356
5347
  }
5348
+ .\[\@media\(hover\:none\)\]\:opacity-100 {
5349
+ @media (hover:none) {
5350
+ opacity: 100%;
5351
+ }
5352
+ }
5357
5353
  }
5358
5354
  :root,
5359
5355
  [data-sandbox-ui],
package/dist/workbench.js CHANGED
@@ -12,9 +12,9 @@ import {
12
12
  buildUnifiedPatch,
13
13
  computeDiffStats,
14
14
  resolveLanguage
15
- } from "./chunk-P6L4KBYK.js";
15
+ } from "./chunk-DLKDWMFM.js";
16
16
  import "./chunk-3J6FG3FJ.js";
17
- import "./chunk-KN2ZRAW6.js";
17
+ import "./chunk-SVNWL3ZR.js";
18
18
  import "./chunk-OMUIPJQZ.js";
19
19
  import "./chunk-VIREDUBF.js";
20
20
  import "./chunk-77WVVJA4.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox-ui",
3
- "version": "0.53.0",
3
+ "version": "0.55.0",
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",