import type { CoreTerminal } from '../core/terminal.js'; import type { RenderFrame, TerminalBufferState } from '../core/types.js'; import type { CoreBenchmarkAccumulator } from './benchmark.js'; /** The part of the hybrid renderer a {@link RenderPipeline} drives. @internal */ export interface FramePainter { render(frame: RenderFrame): void | Promise; } /** Where a {@link RenderPipeline} schedules frames and reports their results. @internal */ export interface RenderPipelineHost { /** Runs `callback` before the next frame is presented. */ schedule(callback: () => void): void; /** Whether the terminal session still exists. */ isActive(): boolean; /** Reports the buffer state of a painted frame. */ rendered(state: TerminalBufferState): void; /** Mirrors the painted viewport text for assistive technology. */ accessibilityRows(rows: readonly string[]): void; /** Reports a failure that rejected the pending frame. */ error(error: Error): void; } /** Starts timing one benchmark write. @internal */ export declare function startBenchmark(): CoreBenchmarkAccumulator; /** * Parses output into one terminal and paints it, frame by frame. * * @remarks * The worker host and the main-thread backend both run terminals through this pipeline, so * writes and frame boundaries behave the same in both. * @internal */ export declare class RenderPipeline { /** Whether painted frames also mirror the viewport text for assistive technology. */ accessibility: boolean; private renderPending; private readonly waiters; private readonly terminal; private readonly painter; private readonly host; constructor(terminal: CoreTerminal, painter: FramePainter, host: RenderPipelineHost, accessibility: boolean); /** Whether a frame is scheduled but not painted yet. */ get pending(): boolean; /** Parses output and returns the boundary of the frame that paints it. */ write(data: Uint8Array, benchmark?: CoreBenchmarkAccumulator): Promise; /** Schedules a frame and returns its boundary. */ scheduleRender(benchmark?: CoreBenchmarkAccumulator): Promise; /** Rejects every waiting frame boundary. The owner disposes the terminal and painter. */ dispose(): void; private renderFrame; } //# sourceMappingURL=render-pipeline.d.ts.map