@oh-my-pi/pi-tui 15.11.6 → 15.11.7

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 +12 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-tui",
4
- "version": "15.11.6",
4
+ "version": "15.11.7",
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": "15.11.6",
41
- "@oh-my-pi/pi-utils": "15.11.6",
40
+ "@oh-my-pi/pi-natives": "15.11.7",
41
+ "@oh-my-pi/pi-utils": "15.11.7",
42
42
  "lru-cache": "11.5.1",
43
43
  "marked": "^18.0.4"
44
44
  },
package/src/tui.ts CHANGED
@@ -2712,6 +2712,18 @@ export class TUI extends Container {
2712
2712
  #emitAltFrame(lines: string[], width: number, height: number): void {
2713
2713
  const fitted: string[] = new Array(height);
2714
2714
  for (let r = 0; r < height; r++) fitted[r] = lines[r] ?? "";
2715
+ // Flush queued image-data transmits (`a=t`, no visible output) before the
2716
+ // paint so id-keyed placements and placeholder cells composed into this
2717
+ // frame resolve against loaded data. The normal-screen path flushes these
2718
+ // ahead of its paint; without this, an image first shown inside a
2719
+ // fullscreen overlay (e.g. the settings shape preview) would render as
2720
+ // blank placeholder cells until the overlay closed.
2721
+ const imageTransmits = this.#imageBudget.takeTransmits();
2722
+ if (imageTransmits.length > 0) {
2723
+ let transmitBuffer = "";
2724
+ for (const seq of imageTransmits) transmitBuffer += seq;
2725
+ this.terminal.write(transmitBuffer);
2726
+ }
2715
2727
  // Skip an identical repaint (the modal is mostly static between
2716
2728
  // keystrokes) — unless a forced repaint (resetDisplay,
2717
2729
  // requestRender(true)) is pending: the redraw gesture must repair a