claudescreenfix-hardwicksoftware 2.2.0 → 2.2.1

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.
Files changed (2) hide show
  1. package/index.cjs +4 -1
  2. package/package.json +1 -1
package/index.cjs CHANGED
@@ -35,12 +35,15 @@ const CLEAR_SCREEN = '\x1b[2J';
35
35
  const HOME_CURSOR = '\x1b[H';
36
36
 
37
37
  // regex patterns for ANSI sequences we want to strip in headless mode
38
- // ONLY background colors - foreground colors stay intact
38
+ // background colors + inverse video (which swaps FG to BG)
39
39
  const ANSI_BG_PATTERNS = [
40
40
  /\x1b\[48;5;\d+m/g, // 256-color background: \x1b[48;5;XXXm
41
41
  /\x1b\[48;2;\d+;\d+;\d+m/g, // true color background: \x1b[48;2;R;G;Bm
42
42
  /\x1b\[4[0-7]m/g, // standard background colors: \x1b[40m - \x1b[47m
43
43
  /\x1b\[10[0-7]m/g, // bright background colors: \x1b[100m - \x1b[107m
44
+ /\x1b\[7m/g, // inverse video - swaps FG/BG, causes same glitch
45
+ /\x1b\[27m/g, // inverse off (no-op but clean it up)
46
+ /\x1b\[49m/g, // default background color
44
47
  ];
45
48
 
46
49
  // config - tweak these if needed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudescreenfix-hardwicksoftware",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "fixes scroll glitch + VNC/headless rendering in claude code cli - strips BG colors that break VTE on Xvfb",
5
5
  "main": "index.cjs",
6
6
  "bin": {