import { Readable } from 'stream'; import { PipeDecoder } from './charset'; /** * The still-delivering input, like less's non-seekable ch file: the * entry paths set it before contentPager attaches it. */ export declare const pipeInput: { source: Readable | null; decoder: PipeDecoder | null; }; export declare function pipeRetained(): number; /** * True while less's initial forw() would still be blocked reading the * input: the first screenful is not painted and the length is not * learned. Keys arriving now queue like less's check_poll ungetting * tty chars, and the prompt row stays unwritten. */ export declare function pipeFilling(): boolean; /** * The --intr char (or ^C) breaks out of the wait, like less's * check_poll returning READ_INTR: the fill stops, the queued keys * are discarded (getcc_clear), and less lands at the bottom of the * buffered data — clear + home, null-line tildes above BOF, the * partial content bottom-anchored (jump_loc's !full_screen lclear * + forw painting nblank lines first). */ export declare function abortPipeFill(): void; export declare function attachPipe(): void; /** * --file-size reads the whole pipe before the terminal initializes, * like edit() calling scan_eof under want_filesize: less blocks the * first paint until the length is known, painting "Determining * length of file" on the main screen once the scan runs LONGTIME * (2s); ^X or ^C abandons the scan and pages with it unknown. */ export declare function pipeFullProbe(): Promise; /** * Reads the pipe until the content exceeds one screen or it ends, * growing the session silently, like less's get_one_screen blocking * in forw_line before the terminal initializes. */ export declare function pipeOneScreenProbe(): Promise; /** * Wakes the pipe for a forward move that clamped short, like less's * forw_line starting its blocking read: the stream resumes (it may * have paused on back-pressure) and a 4s data stall shows the wait * message on the cleared command line. */ export declare function startPendingScroll(): void; /** * Abandons a blocked forward move, like less's READ_INTR breaking the * forw loop: queued keys are discarded (getcc_clear), and with no * line painted forw's nlines == 0 rings the eof bell. * * @param sigint - True for ^C, whose u_interrupt handler also bells. */ export declare function abortPendingScroll(sigint: boolean): void; /** Resumes a paused pipe when the view nears the buffered end. */ export declare function pipeDemand(): void; /** * G and % on a streaming pipe read to end-of-file first, like less's * ch_end_seek loop; the interrupt key cancels it. less's G runs with * a blank command line, % with ierror's "Determining length" note. * * @param jump - The jump to run once the pipe ends. * @param note - The ierror text shown while reading (less's %). * @param cancelMessage - The message an interrupt reports. * @returns True when the jump waits for the pipe to drain. */ export declare function pipeDrain(jump: () => void, note: string, cancelMessage: string): boolean;