/**
 * Cursor-aware view model for the experimental composer. The composer keeps a
 * cursor position so the user can navigate inside the draft with the arrow
 * keys, not just append at the end.
 */
export type ComposerView = {
    rows: string[];
    cursorRow: number;
    cursorCol: number;
    hiddenAbove: number;
    totalRows: number;
};
export type ComposerEditResult = {
    input: string;
    cursor: number;
};
export declare function insertComposerText(input: string, cursor: number, text: string): ComposerEditResult;
export declare function deleteComposerText(input: string, cursor: number, direction: "backward" | "forward"): ComposerEditResult;
/**
 * Build the visible composer view for a given draft, cursor index and width.
 * The window of `editorRows` rows always includes the cursor row, so moving
 * the cursor up into earlier text scrolls the editor to follow it.
 */
export declare function composerView(input: string, cursor: number, width: number, editorRows: number): ComposerView;
