import { type LogEntry, type PhaseState, type RunState, type StepState } from "../state.js"; import type { LogPlacement } from "../types.js"; export interface Renderer { start(state: RunState): void; /** State mutated; repaint when the renderer is live. */ refresh(): void; /** `step` is a routing hint — where the entry came from, for placements that nest it there. */ log(entry: LogEntry, step?: StepState): void; onPhaseStart(phase: PhaseState): void; onStepStart(step: StepState): void; onStepEnd(step: StepState): void; /** Stop repainting and free the live region so a prompt can draw in its place. */ suspend(): void; /** Undo {@link suspend} — resume repainting from a clean slate. */ resume(): void; stop(): void; } /** Repaints an in-place region below permanently-written output. */ export declare class LiveRenderer implements Renderer { private state; private stream; private liveLines; private tick; private timer; private stopped; private lastPaintAt; private lastFrame; /** Never lowered mid-run — see {@link renderBodyTiered} for why. */ private tier; private readonly logPlacement; constructor(logPlacement?: LogPlacement); start(state: RunState): void; /** * A resize reflows whatever is already on screen, so the line count we * recorded no longer describes it. Abandon the old region and redraw below * it — a stale frame left in scrollback beats a corrupted cursor. */ private readonly onResize; /** * Handlers may call this thousands of times (a progress bar in a tight * loop), so coalesce; the frame timer guarantees the last state lands. */ refresh(): void; log(entry: LogEntry, step?: StepState): void; onPhaseStart(): void; onStepStart(): void; onStepEnd(): void; /** Erases the live region and stops the frame timer so a prompt owns the terminal. */ suspend(): void; /** Restarts the frame timer and repaints from scratch below whatever a prompt left behind. */ resume(): void; stop(): void; private paint; /** Returns the escape sequence to erase the live region, and marks it erased. */ private eraseSequence; /** * Single write so the erase and the new content always land together. * On Windows Terminal that alone can still leave a gap the DirectX * renderer presents as a blank frame, so it additionally gets the * synchronized-output bookend — see `supportsSyncOutput()`. */ private paintFrame; private write; } /** Line-per-event output for CI, pipes, and dumb terminals. */ export declare class PlainRenderer implements Renderer { private stream; start(state: RunState): void; refresh(): void; log(entry: LogEntry): void; onPhaseStart(phase: PhaseState): void; onStepStart(step: StepState): void; onStepEnd(step: StepState): void; suspend(): void; resume(): void; stop(): void; } /** Plain renderer that still prints the closing summary block. */ export declare class PlainSummaryRenderer extends PlainRenderer { private captured; start(state: RunState): void; stop(): void; } export declare class SilentRenderer implements Renderer { start(): void; refresh(): void; log(): void; onPhaseStart(): void; onStepStart(): void; onStepEnd(): void; suspend(): void; resume(): void; stop(): void; } export declare function createRenderer(options: { plain?: boolean; silent?: boolean; logPlacement?: LogPlacement; }): Renderer; export declare const uiPalette: { accent: import("./ansi.js").Styler; success: import("./ansi.js").Styler; warning: import("./ansi.js").Styler; error: import("./ansi.js").Styler; info: import("./ansi.js").Styler; muted: import("./ansi.js").Styler; faint: import("./ansi.js").Styler; bold: import("./ansi.js").Styler; dim: import("./ansi.js").Styler; }; //# sourceMappingURL=renderer.d.ts.map