import { type Origin, type Run } from "./run.js"; import { type View } from "./view.js"; /** An outlined window: the view to show and the spans (1-based file lines) it folded. */ export interface Outline { view: View; folded: [number, number][]; } /** * Outline of a printed code window. `content` is the window's source lines, `shown` the same lines as printed * (prefixes kept), `first` the 1-based file line of `content[0]`, `origin` where its lines are in the run's base * (for the heat; `null`: nowhere). Undefined when the window is too short, has no blocks, or the outline would hide * too little. */ export declare function outlineWindow(run: Run, content: readonly string[], shown: readonly string[], first: number, origin: Origin | null): Promise; /** Result of outlining the code windows of one output. */ export interface Outlined { /** The shaped view, or undefined when nothing was outlined. */ view?: View; /** Some window was a read of folded code (shown whole). */ recovery: boolean; } /** Outline of one `read` of a source file; a read overlapping folded code is shown whole. */ export declare function outlineRead(run: Run, abs: string): Promise; /** Outlines every long code window a bash command printed; windows inside a span folded earlier stay whole. */ export declare function outlineBash(run: Run, output: string): Promise<{ text?: string; recovery: boolean; }>;