@vincemakes/kiso-tui 0.44.0 → 0.45.0
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/dist/compositor.js +6 -4
- package/dist/editor.d.ts +4 -0
- package/dist/editor.js +14 -0
- package/package.json +2 -2
package/dist/compositor.js
CHANGED
|
@@ -1464,11 +1464,13 @@ export class Body {
|
|
|
1464
1464
|
// lost anywhere.
|
|
1465
1465
|
if (panel !== null)
|
|
1466
1466
|
return { status: panelStatusOf(panel), hint: undefined, expand: null };
|
|
1467
|
-
//
|
|
1468
|
-
//
|
|
1467
|
+
// ADR-0057: while steers wait for the run's next quiescent boundary,
|
|
1468
|
+
// the right hint counts them — the chips carry the lines. Short on
|
|
1469
|
+
// purpose: the running status shares the row, and a hint that does
|
|
1470
|
+
// not fit is dropped whole.
|
|
1469
1471
|
const queued = this.#queueState?.().length ?? 0;
|
|
1470
1472
|
if (queued > 0)
|
|
1471
|
-
return { status: this.#status, hint: `+${queued}
|
|
1473
|
+
return { status: this.#status, hint: `+${queued} steer`, expand: null };
|
|
1472
1474
|
// D-S2-1 (owner-ruled 2026-09-06): the idle hint names the ctrl+o
|
|
1473
1475
|
// SWITCH — `expand all` or `collapse all` by its state — and only
|
|
1474
1476
|
// while a committed card has something behind the key (#collapsed
|
|
@@ -2158,7 +2160,7 @@ export class Body {
|
|
|
2158
2160
|
return pendingQueueRows(lines, W);
|
|
2159
2161
|
const p = palette();
|
|
2160
2162
|
const hidden = lines.length - keep;
|
|
2161
|
-
return [...pendingQueueRows(lines.slice(0, keep), W), `${p.dim}□ …${hidden} more
|
|
2163
|
+
return [...pendingQueueRows(lines.slice(0, keep), W), `${p.dim}□ …${hidden} more${p.reset}`];
|
|
2162
2164
|
}
|
|
2163
2165
|
/**
|
|
2164
2166
|
* The band ABOVE the box top. Two occupants share it — the slash
|
package/dist/editor.d.ts
CHANGED
|
@@ -129,6 +129,10 @@ export declare class Editor {
|
|
|
129
129
|
* pop walks them (each pop leaves the queue, cancelling the turn);
|
|
130
130
|
* esc ends the walk after one more pop. */
|
|
131
131
|
bindQueue(state: () => readonly string[], pop: () => string | null): void;
|
|
132
|
+
/** ADR-0057: put text back into the buffer — the steers a stop handed
|
|
133
|
+
* back before they landed. It goes AHEAD of a draft already there, on
|
|
134
|
+
* its own line, and the draft stays recoverable (undo). */
|
|
135
|
+
restore(text: string): void;
|
|
132
136
|
/** The whole buffer as text (the CLI's line()/clearLine()). */
|
|
133
137
|
line(): string;
|
|
134
138
|
bindViewer(isUp: () => boolean, cb: (cmd: "open" | "up" | "down" | "toggle" | "all" | "pageUp" | "pageDown" | "home" | "end" | "close") => void): void;
|
package/dist/editor.js
CHANGED
|
@@ -572,6 +572,20 @@ export class Editor {
|
|
|
572
572
|
this.#queueState = state;
|
|
573
573
|
this.#queuePop = pop;
|
|
574
574
|
}
|
|
575
|
+
/** ADR-0057: put text back into the buffer — the steers a stop handed
|
|
576
|
+
* back before they landed. It goes AHEAD of a draft already there, on
|
|
577
|
+
* its own line, and the draft stays recoverable (undo). */
|
|
578
|
+
restore(text) {
|
|
579
|
+
if (text === "")
|
|
580
|
+
return;
|
|
581
|
+
if (this.#chars.length > 0)
|
|
582
|
+
this.#checkpoint();
|
|
583
|
+
const merged = this.#chars.length > 0 ? `${text}\n${this.line()}` : text;
|
|
584
|
+
this.#chars = [...merged].map((ch) => ch.codePointAt(0));
|
|
585
|
+
this.#cursor = this.#chars.length;
|
|
586
|
+
this.#verticalGoalCol = null;
|
|
587
|
+
this.#onRender();
|
|
588
|
+
}
|
|
575
589
|
/** The whole buffer as text (the CLI's line()/clearLine()). */
|
|
576
590
|
line() {
|
|
577
591
|
return String.fromCodePoint(...this.#chars);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vincemakes/kiso-tui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.0",
|
|
4
4
|
"description": "kiso tui \u2014 the pure terminal layer (cell renderer, dock, raw editor, diff, palette). Zero runtime dependencies: input is data, output is bytes.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,6 +35,6 @@
|
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://github.com/vincemakes/kiso/tree/main/packages/tui#readme",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@vincemakes/kiso-tui-cells": "0.
|
|
38
|
+
"@vincemakes/kiso-tui-cells": "0.45.0"
|
|
39
39
|
}
|
|
40
40
|
}
|