/// <reference types="node" />
export type ScreenSelection = {
    sx: number;
    sy: number;
    ex: number;
    ey: number;
};
export type FrameCell = {
    type: 'char';
    value: string;
    fullWidth: boolean;
    styles: unknown[];
    selectable: boolean;
    flowId: number | null;
};
export type FrameBoundary = {
    kind: 'soft' | 'hard';
    joiner: string;
    selectable: boolean;
    flowId: number;
};
export type ReadonlyFrame = {
    width: number;
    height: number;
    cells: ReadonlyArray<ReadonlyArray<FrameCell>>;
    boundaries: ReadonlyArray<ReadonlyArray<FrameBoundary | null>>;
};
export type FrameController = {
    getFrame(): ReadonlyFrame | null;
    getSelection(): ScreenSelection | null;
    setSelection(selection: ScreenSelection | null): void;
    subscribe(listener: (frame: ReadonlyFrame) => void): () => void;
    publishFrame(frame: ReadonlyFrame): void;
};
export declare const createFrameController: (requestRender: () => void) => FrameController;
export declare const getFrameController: (stdout: NodeJS.WriteStream) => FrameController | undefined;
