@sayknow-cli/tui 0.4.5 → 0.4.6

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/package.json +3 -3
  2. package/src/tui.ts +6 -3
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@sayknow-cli/tui",
4
- "version": "0.4.5",
4
+ "version": "0.4.6",
5
5
  "description": "Terminal User Interface library with differential rendering for efficient text-based applications",
6
6
  "homepage": "https://sayknow-cli.com",
7
7
  "author": "jaybeyond",
@@ -38,8 +38,8 @@
38
38
  "fmt": "biome format --write ."
39
39
  },
40
40
  "dependencies": {
41
- "@sayknow-cli/natives": "0.4.5",
42
- "@sayknow-cli/utils": "0.4.5",
41
+ "@sayknow-cli/natives": "0.4.6",
42
+ "@sayknow-cli/utils": "0.4.6",
43
43
  "lru-cache": "11.3.6",
44
44
  "marked": "^18.0.3"
45
45
  },
package/src/tui.ts CHANGED
@@ -1283,9 +1283,12 @@ export class TUI extends Container {
1283
1283
  if (!TERMINAL.imageProtocol) {
1284
1284
  return;
1285
1285
  }
1286
- // Query terminal for cell size in pixels: CSI 16 t
1287
- // Response format: CSI 6 ; height ; width t
1288
- this.#writeTerminal("\x1b[16t");
1286
+ // Query terminal for cell size in pixels: CSI 16 t → CSI 6 ; height ; width t.
1287
+ // Under tmux, wrap it in the DCS passthrough envelope so the OUTER terminal
1288
+ // reports its real cell size; tmux otherwise answers with a wrong value,
1289
+ // which oversizes the sixel pet and pushes it out of bounds (freezing its
1290
+ // animation because the overflowing position resolves to null).
1291
+ this.#writeTerminal(wrapTmuxPassthrough("\x1b[16t"));
1289
1292
  }
1290
1293
 
1291
1294
  stop(): void {