@gajae-code/tui 0.4.0 → 0.4.2

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 +9 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@gajae-code/tui",
4
- "version": "0.4.0",
4
+ "version": "0.4.2",
5
5
  "description": "Terminal User Interface library with differential rendering for efficient text-based applications",
6
6
  "homepage": "https://gaebal-gajae.dev",
7
7
  "author": "Yeachan-Heo",
@@ -38,8 +38,8 @@
38
38
  "fmt": "biome format --write ."
39
39
  },
40
40
  "dependencies": {
41
- "@gajae-code/natives": "0.4.0",
42
- "@gajae-code/utils": "0.4.0",
41
+ "@gajae-code/natives": "0.4.2",
42
+ "@gajae-code/utils": "0.4.2",
43
43
  "lru-cache": "11.3.6",
44
44
  "marked": "^18.0.3"
45
45
  },
package/src/tui.ts CHANGED
@@ -641,6 +641,15 @@ export class TUI extends Container {
641
641
  } catch {
642
642
  this.#markTerminalUnavailable();
643
643
  }
644
+ // Teardown: release the retained rendered transcript so a stopped TUI does
645
+ // not pin a flat copy of every emitted line for the process lifetime.
646
+ // Safe across temporary stop/start (Ctrl-Z resume, external editor): start()
647
+ // issues a forced render that rebuilds this state and fully redraws, and
648
+ // focus/listener state is intentionally preserved so input routing survives
649
+ // a resume.
650
+ this.#previousLines = [];
651
+ this.#previousWidth = 0;
652
+ this.#previousHeight = 0;
644
653
  }
645
654
 
646
655
  requestRender(force = false, source = "unknown"): void {