@gajae-code/tui 0.11.8 → 0.11.9
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/CHANGELOG.md +1 -1
- package/package.json +3 -3
- package/src/tui.ts +4 -4
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@gajae-code/tui",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.9",
|
|
5
5
|
"description": "Terminal User Interface library with differential rendering for efficient text-based applications",
|
|
6
6
|
"homepage": "https://gajae-code.com",
|
|
7
7
|
"author": "Yeachan-Heo and Gajae Code Contributors",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"fmt": "biome format --write ."
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@gajae-code/natives": "0.11.
|
|
40
|
-
"@gajae-code/utils": "0.11.
|
|
39
|
+
"@gajae-code/natives": "0.11.9",
|
|
40
|
+
"@gajae-code/utils": "0.11.9",
|
|
41
41
|
"lru-cache": "11.3.6",
|
|
42
42
|
"marked": "18.0.6"
|
|
43
43
|
},
|
package/src/tui.ts
CHANGED
|
@@ -660,7 +660,7 @@ export class TUI extends Container {
|
|
|
660
660
|
readonly #useImeBlockCursor = $flag("GJC_TUI_IME_CURSOR", process.platform === "darwin");
|
|
661
661
|
// showHardwareCursor=false but cursor is shown for IME anchoring (macOS).
|
|
662
662
|
#imeCursorActive = false;
|
|
663
|
-
#clearOnShrink = $
|
|
663
|
+
#clearOnShrink = $pickflag("GJC_CLEAR_ON_SHRINK", "PI_CLEAR_ON_SHRINK"); // Clear empty rows when content shrinks (default: off)
|
|
664
664
|
// Default-on: reuse the previous normalized off-screen prefix and only normalize/diff the
|
|
665
665
|
// visible window, bounding per-frame work on huge transcripts. Output stays byte-identical;
|
|
666
666
|
// set PI_TUI_VIRTUAL_VIEWPORT=0 to restore legacy full-transcript normalization.
|
|
@@ -693,7 +693,7 @@ export class TUI extends Container {
|
|
|
693
693
|
|
|
694
694
|
static #readDebugRedrawFlag(): boolean {
|
|
695
695
|
TUI.#renderCounters.debugRedrawEnvReads += 1;
|
|
696
|
-
return $
|
|
696
|
+
return $pickflag("GJC_DEBUG_REDRAW", "PI_DEBUG_REDRAW");
|
|
697
697
|
}
|
|
698
698
|
|
|
699
699
|
#appendDebugRedrawLog(message: string): void {
|
|
@@ -2451,7 +2451,7 @@ export class TUI extends Container {
|
|
|
2451
2451
|
|
|
2452
2452
|
// Content shrunk below the previous render and no overlays - re-render to clear empty rows
|
|
2453
2453
|
// (overlays need the padding, so only do this when no overlays are active)
|
|
2454
|
-
// Configurable via setClearOnShrink() or
|
|
2454
|
+
// Configurable via setClearOnShrink() or GJC_CLEAR_ON_SHRINK=0 env var
|
|
2455
2455
|
if (this.#clearOnShrink && newLines.length < this.#previousLines.length && this.overlayStack.length === 0) {
|
|
2456
2456
|
logRedraw(`clearOnShrink (prev=${this.#previousLines.length}, new=${newLines.length})`);
|
|
2457
2457
|
if (
|
|
@@ -2662,7 +2662,7 @@ export class TUI extends Container {
|
|
|
2662
2662
|
buffer += seq;
|
|
2663
2663
|
buffer += "\x1b[?2026l"; // End synchronized output
|
|
2664
2664
|
|
|
2665
|
-
if ($
|
|
2665
|
+
if ($pickflag("GJC_TUI_DEBUG", "PI_TUI_DEBUG")) {
|
|
2666
2666
|
const debugDir = "/tmp/tui";
|
|
2667
2667
|
fs.mkdirSync(debugDir, { recursive: true });
|
|
2668
2668
|
const debugPath = path.join(debugDir, `render-${Date.now()}-${Math.random().toString(36).slice(2)}.log`);
|