@industry-theme/xterm-terminal-panel 0.5.34 → 0.5.35

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.34",
38
+ version: "0.5.35",
39
39
  description: "Industry-themed xterm.js terminal components with panel framework integration",
40
40
  type: "module",
41
41
  main: "dist/index.js",
@@ -1856,6 +1856,21 @@ var TerminalPanel = ({
1856
1856
  useEffect3(() => {
1857
1857
  hasNotifiedPtyRef.current = false;
1858
1858
  }, [sessionId]);
1859
+ useEffect3(() => {
1860
+ if (!sessionId || !actions.resizeTerminal)
1861
+ return;
1862
+ if (hasNotifiedPtyRef.current)
1863
+ return;
1864
+ const term = terminalRef.current?.getTerminal();
1865
+ if (!term || !term.cols || !term.rows)
1866
+ return;
1867
+ actions.resizeTerminal(sessionId, term.cols, term.rows);
1868
+ hasNotifiedPtyRef.current = true;
1869
+ if (actions.writeToTerminal) {
1870
+ const writeFn = actions.writeToTerminal;
1871
+ setTimeout(() => writeFn(sessionId, "\f"), 50);
1872
+ }
1873
+ }, [sessionId, actions.resizeTerminal, actions.writeToTerminal]);
1859
1874
  const handleScrollPositionChange = useCallback4((position) => {
1860
1875
  setScrollPosition(position);
1861
1876
  isScrollLockedRef.current = position.isScrollLocked;
@@ -1 +1 @@
1
- {"version":3,"file":"TerminalPanel.d.ts","sourceRoot":"","sources":["../../../src/panels/TerminalPanel.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AA+BzD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA+VtD,CAAC"}
1
+ {"version":3,"file":"TerminalPanel.d.ts","sourceRoot":"","sources":["../../../src/panels/TerminalPanel.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AA+BzD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA2XtD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@industry-theme/xterm-terminal-panel",
3
- "version": "0.5.34",
3
+ "version": "0.5.35",
4
4
  "description": "Industry-themed xterm.js terminal components with panel framework integration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",