/** * Line mode: one plain line per event, for screen readers, log capture, and * terminals where a full-screen repaint is the wrong shape. * * The TUI normally paints a framed screen: absolute cursor addressing, an * alternate screen buffer, only the rows that changed, and a spinner that * redraws in place. None of that survives a pipe, a screen reader, or a * recording — the same event can appear twice, out of order, or not at all. * This module turns a transcript row into the lines a log would carry, and the * caller appends them once, in order, and never repaints. * * Colour is deliberately absent: the caller may style a line, but the text has * to stand on its own because that is the point of the mode. * @module dsh-ssh-tui/line-mode */ import type { Row } from './transcript-types.js'; /** Whether the environment asks for line mode. `1/true/on/yes` all count. */ export declare function lineModeEnabled(env?: NodeJS.ProcessEnv): boolean; /** * The lines one row contributes to the log. * * A row with embedded newlines contributes several lines — the alternative is * joining them, which corrupts a report's structure for the reader this mode * exists for. Rows that only make sense on a screen (the logo, a transient * reasoning buffer) contribute nothing rather than noise. * @param row - the transcript row that was just pushed. * @returns the lines to append, in order; empty when the row is screen-only. */ export declare function lineModeLines(row: Row): string[]; /** * What one row's lines look like once appended. * * A trailing newline per line, and nothing else: no carriage returns (they * would overwrite the line just written on a terminal) and no escape sequences. */ export declare function appendRow(lines: readonly string[]): string;