@oh-my-pi/pi-tui 16.4.6 → 16.4.8

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 CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [16.4.7] - 2026-07-12
6
+
7
+ ### Fixed
8
+
9
+ - Fixed keyboard navigation paying an extra frame of input latency after idle; the queue-drain grace now applies only to Ctrl+C and Escape double-press gestures.
10
+
5
11
  ## [16.4.6] - 2026-07-12
6
12
 
7
13
  ### Added
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-tui",
4
- "version": "16.4.6",
4
+ "version": "16.4.8",
5
5
  "description": "Terminal User Interface library with differential rendering for efficient text-based applications",
6
6
  "homepage": "https://omp.sh",
7
7
  "author": "Can Boluk",
@@ -37,8 +37,8 @@
37
37
  "fmt": "biome format --write ."
38
38
  },
39
39
  "dependencies": {
40
- "@oh-my-pi/pi-natives": "16.4.6",
41
- "@oh-my-pi/pi-utils": "16.4.6",
40
+ "@oh-my-pi/pi-natives": "16.4.8",
41
+ "@oh-my-pi/pi-utils": "16.4.8",
42
42
  "lru-cache": "11.5.1",
43
43
  "marked": "^18.0.5"
44
44
  },
package/src/tui.ts CHANGED
@@ -2239,12 +2239,12 @@ export class TUI extends Container {
2239
2239
  }
2240
2240
 
2241
2241
  #handleInput(data: string): void {
2242
- // Raw-mode Ctrl+C/Esc arrive as stdin data, not process signals. If the
2243
- // first key in a double-key gesture schedules an immediate slow repaint,
2244
- // the queued second key can sit behind that repaint long enough for the
2245
- // app-level double-press window to expire. Give the input queue one frame
2246
- // before ordinary paints; forced repaints still bypass this path.
2247
- this.#inputRenderGraceUntilMs = this.#renderScheduler.now() + TUI.#INPUT_RENDER_GRACE_MS;
2242
+ // Ctrl+C/Esc use app-level double-press windows. Give those gestures one
2243
+ // frame to drain queued input before an ordinary repaint; delaying every
2244
+ // key would make idle navigation pay a full frame of latency.
2245
+ if (matchesKey(data, "ctrl+c") || matchesKey(data, "escape")) {
2246
+ this.#inputRenderGraceUntilMs = this.#renderScheduler.now() + TUI.#INPUT_RENDER_GRACE_MS;
2247
+ }
2248
2248
  if (this.#inputListeners.size > 0) {
2249
2249
  let current = data;
2250
2250
  for (const listener of this.#inputListeners) {