@tangle-network/sandbox-ui 0.23.4 → 0.24.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.
@@ -39,8 +39,14 @@ interface TerminalViewProps {
39
39
  prompt?: string;
40
40
  /** Whether the terminal tab is currently active and visible. */
41
41
  isActive?: boolean;
42
+ /**
43
+ * Stable id reused across remounts so the sidecar restores the same
44
+ * PTY session instead of spawning a fresh shell. Omit for a new
45
+ * session per mount.
46
+ */
47
+ connectionId?: string;
42
48
  }
43
49
  declare const DEFAULT_TERMINAL_THEME: TerminalTheme;
44
- declare function TerminalView({ apiUrl, token, theme, title, subtitle, isActive, }: TerminalViewProps): react_jsx_runtime.JSX.Element;
50
+ declare function TerminalView({ apiUrl, token, theme, title, subtitle, isActive, connectionId, }: TerminalViewProps): react_jsx_runtime.JSX.Element;
45
51
 
46
52
  export { DEFAULT_TERMINAL_THEME, type TerminalTheme, TerminalView, type TerminalViewProps };
package/dist/terminal.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  usePtySession
3
- } from "./chunk-AG7QDC2Q.js";
3
+ } from "./chunk-77WVVJA4.js";
4
4
 
5
5
  // src/terminal/terminal-view.tsx
6
6
  import "@xterm/xterm/css/xterm.css";
@@ -39,7 +39,8 @@ function TerminalView({
39
39
  theme,
40
40
  title = "Terminal",
41
41
  subtitle = "Connected to PTY session",
42
- isActive = true
42
+ isActive = true,
43
+ connectionId
43
44
  }) {
44
45
  const resolvedTheme = useMemo(
45
46
  () => ({ ...DEFAULT_TERMINAL_THEME, ...theme }),
@@ -65,7 +66,8 @@ function TerminalView({
65
66
  const { isConnected, error, sendCommand, resizeTerminal, reconnect } = usePtySession({
66
67
  apiUrl,
67
68
  token,
68
- onData
69
+ onData,
70
+ connectionId
69
71
  });
70
72
  useEffect(() => {
71
73
  if (!containerRef.current) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox-ui",
3
- "version": "0.23.4",
3
+ "version": "0.24.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",