@vincemakes/kiso-tui-cells 0.22.0 → 0.24.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.
@@ -44,6 +44,13 @@ export interface FrameCtx {
44
44
  * for the whole stretch, which is the fact it is there to carry:
45
45
  * work is in flight. Owner-ruled 2026-08-31. */
46
46
  readonly grouped?: boolean;
47
+ /** R13 E2 / DC-43 — how many PREVIEW rows a running card may take this
48
+ * frame. Undefined is the full window (`CAP_PREVIEW`); the compositor
49
+ * lowers it when the live region is tight, and 0 degrades the card to
50
+ * its head row alone. It is a frame input, not a property of the
51
+ * cell: the same call renders taller or shorter as the room changes,
52
+ * and never as its own content changes. */
53
+ readonly liveWindow?: number;
47
54
  }
48
55
  /** ONE screen line a component emits (raw, SGR included). */
49
56
  export type RenderLine = string;
@@ -122,24 +129,6 @@ export type BodyCell = {
122
129
  * created this cell (the fold-hold's owner; −1 when no turn
123
130
  * exists yet — the pre-turn cells never hold). */
124
131
  turn: number;
125
- /** W13: the rolled-up group summary — set at COMMIT time when
126
- * the head of an N > 2 same-tool run renders the group (the
127
- * work order's claimed shape: "✓ read 5 files (2.4k lines,
128
- * 1.1s)" + the target children). The members carry null — the
129
- * compositor's rolled-heads bookkeeping renders them [].
130
- * TUI2-R1 (B): `parts` is set when the run spans MORE THAN ONE
131
- * read-only tool — the same mechanism, the exploration row.
132
- * Absent (a single-name run) keeps W13's row byte for byte. */
133
- rolled: null | {
134
- count: number;
135
- lines: number;
136
- elapsed: string;
137
- targets: string[];
138
- parts?: readonly {
139
- name: string;
140
- subjects: readonly string[];
141
- }[];
142
- };
143
132
  /** W19: a DENIED call's reason (the CLI extracted it from the
144
133
  * result's "[Permission denied] " prefix, keyed on the "denied"
145
134
  * tag). Non-null renders the pinned row — the full call name,
@@ -279,20 +268,6 @@ export declare const ROLLUP_NOUN: Readonly<Record<string, string>>;
279
268
  * side effects is a list of things that HAPPENED, and every row of it
280
269
  * carries meaning). */
281
270
  export declare function isExploreTool(name: string): boolean;
282
- /** "8 files · 14 searches" — the per-tool counts in first-call order. */
283
- export declare function exploreCounts(parts: readonly {
284
- name: string;
285
- subjects: readonly string[];
286
- }[]): string;
287
- /** TUI2-R1 (B) — the expanded list: ONE row per tool, the verb column
288
- * then the distinct subjects in first-call order, a repeated subject
289
- * carrying its ×count, the first three shown and the rest counted.
290
- * A search's subject is its PATTERN (quoted — the thing that was
291
- * looked for); a read's or a list's is its path. */
292
- export declare function exploreRows(parts: readonly {
293
- name: string;
294
- subjects: readonly string[];
295
- }[], W: number): string[];
296
271
  /** Does this tool's fold term count distinct targets rather than calls? */
297
272
  export declare function foldCountsObjects(name: string): boolean;
298
273
  export declare function foldTerms(reads: number, edits: number, others: readonly [string, number][]): string[];
@@ -382,41 +357,17 @@ export interface StretchTerms {
382
357
  /** the live mark; the caller passes the spinner's current frame. */
383
358
  readonly mark?: string;
384
359
  }
385
- /**
386
- * R4 (C1) the fold NAMES ITS OWN TARGET.
387
- *
388
- * `ctrl+o` used to be printed identically on every fold on the screen,
389
- * and the key walked a ring whose order nothing on screen expressed —
390
- * so the owner's report was exact: "there is no way to know which
391
- * stretch it opens". The tint that marks the next target can only be
392
- * drawn on a LIVE row, and every fold worth reopening is, by
393
- * construction, in the scrollback where nothing can be tinted.
394
- *
395
- * A pointer cannot fix this either, and the bound is worth stating
396
- * once: SGR mouse reports address the VIEWPORT, so a fold that has
397
- * scrolled into the terminal's own scrollback is unreachable by any
398
- * pointer, permanently, on the primary screen. The ordinal is not a
399
- * cheaper substitute for clicking — it is the form of the affordance
400
- * that reaches every fold, and it survives a pipe as characters.
401
- *
402
- * The number rides the KEY, inside the width ladder, so it is paid for
403
- * by the same give-way order as every other span (law: the key never
404
- * gives way — it just got two characters longer).
405
- */
406
- export declare function stretchLine(t: StretchTerms & {
407
- readonly phase: "thinking" | "acting" | "settled";
408
- readonly mark?: string;
409
- }, W: number): string[];
410
- /** R6/D3: the quiet turn's fold wears no mark either — the SECOND
411
- * emission site, and the one the D3 brief did not name. Same ruling,
412
- * same two-space indent; see stretchLine above for the argument. */
413
- export declare function turnFold(t: {
414
- words: string;
415
- thoughtSeconds: number;
416
- reads: number;
417
- edits: number;
418
- others: [string, number][];
419
- }, W: number): string[];
360
+ /** The caps — screen rows counted AFTER the fold, at the current width
361
+ * (the W7 table). The renderer-cut row is inside the cap. */
362
+ /** R13 — ONE preview cap, every tool. It was the shell's alone while
363
+ * the shell was the only settled call with rows on screen. */
364
+ export declare const CAP_PREVIEW = 5;
365
+ /** DC-46 the running window's ceiling is the SETTLED preview's, and a
366
+ * running card reaches it by growing rather than by being handed it.
367
+ * `LIVE_WINDOW` (CAP_PREVIEW + 1) retires with the allocation it sized. */
368
+ /** The rows a card costs besides its window: two pads, the head, two
369
+ * blanks and the status row. Below this there is no card (DC-43). */
370
+ export declare const CARD_CHROME = 6;
420
371
  /**
421
372
  * R4 — the standing act slot.
422
373
  *