@sayknow-cli/tui 0.4.5 → 0.4.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.
|
@@ -124,10 +124,5 @@ export declare function buildSayknowPixelFrames(options: {
|
|
|
124
124
|
kittyImageId?: number;
|
|
125
125
|
/** Color skin for the sprite palette (default "red"). */
|
|
126
126
|
skin?: PetSkinId;
|
|
127
|
-
/**
|
|
128
|
-
* Optional wrapper applied to each encoded sixel frame (e.g. tmux DCS
|
|
129
|
-
* passthrough). Identity when omitted. Never applied to kitty frames.
|
|
130
|
-
*/
|
|
131
|
-
wrapSixel?: (frame: string) => string;
|
|
132
127
|
}): SayknowPixelFrames;
|
|
133
128
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@sayknow-cli/tui",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.7",
|
|
5
5
|
"description": "Terminal User Interface library with differential rendering for efficient text-based applications",
|
|
6
6
|
"homepage": "https://sayknow-cli.com",
|
|
7
7
|
"author": "jaybeyond",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"fmt": "biome format --write ."
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@sayknow-cli/natives": "0.4.
|
|
42
|
-
"@sayknow-cli/utils": "0.4.
|
|
41
|
+
"@sayknow-cli/natives": "0.4.7",
|
|
42
|
+
"@sayknow-cli/utils": "0.4.7",
|
|
43
43
|
"lru-cache": "11.3.6",
|
|
44
44
|
"marked": "^18.0.3"
|
|
45
45
|
},
|
|
@@ -392,11 +392,6 @@ export function buildSayknowPixelFrames(options: {
|
|
|
392
392
|
kittyImageId?: number;
|
|
393
393
|
/** Color skin for the sprite palette (default "red"). */
|
|
394
394
|
skin?: PetSkinId;
|
|
395
|
-
/**
|
|
396
|
-
* Optional wrapper applied to each encoded sixel frame (e.g. tmux DCS
|
|
397
|
-
* passthrough). Identity when omitted. Never applied to kitty frames.
|
|
398
|
-
*/
|
|
399
|
-
wrapSixel?: (frame: string) => string;
|
|
400
395
|
}): SayknowPixelFrames {
|
|
401
396
|
const targetRows = options.targetRows ?? 2;
|
|
402
397
|
const gridSize = 16;
|
|
@@ -421,7 +416,7 @@ export function buildSayknowPixelFrames(options: {
|
|
|
421
416
|
for (const name of Object.keys(PIXEL_GRIDS) as SayknowPixelFrameName[]) {
|
|
422
417
|
frames[name] =
|
|
423
418
|
options.protocol === "sixel"
|
|
424
|
-
?
|
|
419
|
+
? encodeGridSixel(PIXEL_GRIDS[name], scale, topPaddingPx, palette)
|
|
425
420
|
: encodeGridKitty(
|
|
426
421
|
PIXEL_GRIDS[name],
|
|
427
422
|
scale,
|
package/src/tui.ts
CHANGED
|
@@ -1283,9 +1283,12 @@ export class TUI extends Container {
|
|
|
1283
1283
|
if (!TERMINAL.imageProtocol) {
|
|
1284
1284
|
return;
|
|
1285
1285
|
}
|
|
1286
|
-
// Query terminal for cell size in pixels: CSI 16 t
|
|
1287
|
-
//
|
|
1288
|
-
|
|
1286
|
+
// Query terminal for cell size in pixels: CSI 16 t → CSI 6 ; height ; width t.
|
|
1287
|
+
// Under tmux, wrap it in the DCS passthrough envelope so the OUTER terminal
|
|
1288
|
+
// reports its real cell size; tmux otherwise answers with a wrong value,
|
|
1289
|
+
// which oversizes the sixel pet and pushes it out of bounds (freezing its
|
|
1290
|
+
// animation because the overflowing position resolves to null).
|
|
1291
|
+
this.#writeTerminal(wrapTmuxPassthrough("\x1b[16t"));
|
|
1289
1292
|
}
|
|
1290
1293
|
|
|
1291
1294
|
stop(): void {
|