storymode-cli 1.3.7 → 1.3.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/package.json +1 -1
- package/src/player.mjs +11 -12
package/package.json
CHANGED
package/src/player.mjs
CHANGED
|
@@ -439,19 +439,18 @@ export async function playReactiveCompanion(animMap, opts = {}) {
|
|
|
439
439
|
const delSeq = `\x1b_Ga=d,d=a\x1b\\`;
|
|
440
440
|
stdout.write(hdInTmux ? wrapForTmux(delSeq) : delSeq);
|
|
441
441
|
writeKitty(currentPngFrames[idx], null, imageRows || undefined, hdInTmux);
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
if (!fullscreen) {
|
|
446
|
-
// Clear the image area to release old images
|
|
447
|
-
for (let i = 0; i < maxLines; i++) stdout.write('\x1b[K\n');
|
|
448
|
-
stdout.write(fullscreen ? '\x1b[H' : '\x1b8');
|
|
442
|
+
// Kitty needs explicit cursor positioning after image
|
|
443
|
+
if (imageRows > 0) {
|
|
444
|
+
stdout.write(`\x1b[${imageRows + 1};1H`);
|
|
449
445
|
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
446
|
+
} else {
|
|
447
|
+
// iTerm2: clear screen to release previous inline images from memory,
|
|
448
|
+
// then render new image. Cursor advances past the image automatically.
|
|
449
|
+
stdout.write('\x1b[2J\x1b[H');
|
|
450
|
+
// Use width=pane columns, let preserveAspectRatio size the height
|
|
451
|
+
const paneCols = process.stdout.columns || 80;
|
|
452
|
+
writeIterm2(currentPngFrames[idx], paneCols, null, hdInTmux);
|
|
453
|
+
stdout.write('\n'); // ensure cursor is on next line after image
|
|
455
454
|
}
|
|
456
455
|
} else {
|
|
457
456
|
// --- ANSI fallback path ---
|