@industry-theme/xterm-terminal-panel 0.5.27 → 0.5.28
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
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
// package.json
|
|
36
36
|
var package_default = {
|
|
37
37
|
name: "@industry-theme/xterm-terminal-panel",
|
|
38
|
-
version: "0.5.
|
|
38
|
+
version: "0.5.28",
|
|
39
39
|
description: "Industry-themed xterm.js terminal components with panel framework integration",
|
|
40
40
|
type: "module",
|
|
41
41
|
main: "dist/index.js",
|
|
@@ -2265,27 +2265,33 @@ function TerminalTabContentInner(props, ref) {
|
|
|
2265
2265
|
actions.resizeTerminal(localSessionId, cols, rows);
|
|
2266
2266
|
}
|
|
2267
2267
|
}, [localSessionId, actions]);
|
|
2268
|
-
const handleReady = useCallback5(
|
|
2269
|
-
if (localSessionId
|
|
2270
|
-
|
|
2268
|
+
const handleReady = useCallback5((cols, rows) => {
|
|
2269
|
+
if (!localSessionId || !actions.resizeTerminal) {
|
|
2270
|
+
return;
|
|
2271
|
+
}
|
|
2272
|
+
const shouldForce = needsRefreshOnResizeRef.current;
|
|
2273
|
+
if (!shouldForce) {
|
|
2274
|
+
actions.resizeTerminal(localSessionId, cols, rows, false);
|
|
2275
|
+
return;
|
|
2276
|
+
}
|
|
2277
|
+
needsRefreshOnResizeRef.current = false;
|
|
2278
|
+
const restoreBufferAndResize = async () => {
|
|
2271
2279
|
let bufferRestored = false;
|
|
2272
|
-
if (
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
terminalRef.current.write(buffer);
|
|
2279
|
-
bufferRestored = true;
|
|
2280
|
-
}
|
|
2281
|
-
} catch (error) {
|
|
2282
|
-
console.warn("[TabbedTerminalPanel] Failed to restore buffer:", error);
|
|
2280
|
+
if (actions.getTerminalBuffer && terminalRef.current) {
|
|
2281
|
+
try {
|
|
2282
|
+
const buffer = await actions.getTerminalBuffer(localSessionId);
|
|
2283
|
+
if (buffer) {
|
|
2284
|
+
terminalRef.current.write(buffer);
|
|
2285
|
+
bufferRestored = true;
|
|
2283
2286
|
}
|
|
2287
|
+
} catch (error) {
|
|
2288
|
+
console.warn("[TabbedTerminalPanel] Failed to restore buffer:", error);
|
|
2284
2289
|
}
|
|
2285
2290
|
}
|
|
2286
|
-
const forceResize =
|
|
2291
|
+
const forceResize = !bufferRestored;
|
|
2287
2292
|
actions.resizeTerminal(localSessionId, cols, rows, forceResize);
|
|
2288
|
-
}
|
|
2293
|
+
};
|
|
2294
|
+
restoreBufferAndResize();
|
|
2289
2295
|
}, [localSessionId, actions]);
|
|
2290
2296
|
const handleLinkClick = useCallback5((url, modifiers) => {
|
|
2291
2297
|
if (localSessionId) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabbedTerminalPanel.d.ts","sourceRoot":"","sources":["../../../src/panels/TabbedTerminalPanel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAKN,MAAM,OAAO,CAAC;AAKf,OAAO,KAAK,EACV,wBAAwB,EACxB,WAAW,EAMZ,MAAM,gBAAgB,CAAC;AAkExB,MAAM,WAAW,qBAAqB;IACpC,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B;
|
|
1
|
+
{"version":3,"file":"TabbedTerminalPanel.d.ts","sourceRoot":"","sources":["../../../src/panels/TabbedTerminalPanel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAKN,MAAM,OAAO,CAAC;AAKf,OAAO,KAAK,EACV,wBAAwB,EACxB,WAAW,EAMZ,MAAM,gBAAgB,CAAC;AAkExB,MAAM,WAAW,qBAAqB;IACpC,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B;AA2mDD,eAAO,MAAM,mBAAmB,EAAkC,CAAC,IAAI,SAAS,OAAO,cAAc,EAAE,OAAO,GAAG,WAAW,EAC1H,KAAK,EAAE,wBAAwB,CAAC,IAAI,CAAC,KAClC,KAAK,CAAC,YAAY,CAAC"}
|
package/package.json
CHANGED