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

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.css CHANGED
@@ -10,6 +10,7 @@
10
10
  }
11
11
 
12
12
  .terminal-container-fix .xterm {
13
+ box-sizing: border-box;
13
14
  font-variant-ligatures: none;
14
15
  -webkit-font-smoothing: antialiased;
15
16
  -moz-osx-font-smoothing: grayscale;
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.36",
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/dist/styles.css CHANGED
@@ -12,6 +12,11 @@
12
12
 
13
13
  /* Remove default xterm padding */
14
14
  .terminal-container-fix .xterm {
15
+ /* border-box so the 10px top/left padding fits inside the 100% height
16
+ instead of pushing the element 10px taller than its parent — without
17
+ this the last row gets clipped by the parent's overflow:hidden, and
18
+ the user can't scroll all the way to the bottom. */
19
+ box-sizing: border-box;
15
20
  padding: 10px 0 0 10px;
16
21
  margin: 0;
17
22
  height: 100%;
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.36",
4
4
  "description": "Industry-themed xterm.js terminal components with panel framework integration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",