import type { CompletedItem } from "../app-items.js"; import { type TerminalHistoryContext } from "../terminal-history.js"; /** * Flatten a list of completed transcript items into the exact flat ANSI line * buffer the scrollback printer would have written. Reuses the same serializer * (`serializeCompletedItemToTerminalHistory`) and the same inter-item spacing * rules (`formatHistoryWrite` + `shouldSeparateTranscriptItems`) so the * in-Ink viewport renders byte-identically to the legacy scrollback transcript. * * Pure (no Ink, no stdout) so it can be unit-tested and windowed cheaply at the * line level instead of relying on fragile React height measurement. */ export declare function buildTranscriptLines(items: readonly CompletedItem[], context: TerminalHistoryContext): string[]; export interface TranscriptWindow { /** The slice of lines to render, top-to-bottom. */ lines: string[]; /** Blank rows to pad above `lines` so content stays bottom-anchored. */ topPadding: number; /** Clamped scroll offset from the bottom (0 = stuck to newest). */ offset: number; /** Total line count (for scroll math / "more above" affordances). */ total: number; } /** * Window a flat transcript line buffer to a bottom-anchored viewport of * `viewportRows` rows. `offsetFromBottom` scrolls the window upward (0 keeps * the newest line pinned to the bottom). When the content is shorter than the * viewport, `topPadding` blank rows are reported so the controls region stays * pinned to the very bottom of the screen. */ export declare function windowTranscriptLines(lines: readonly string[], viewportRows: number, offsetFromBottom: number): TranscriptWindow; //# sourceMappingURL=transcript-lines.d.ts.map