/** * Renderer-independent responsive layout engine (V2-032). * * Computes the shell region rectangles from terminal dimensions and user * preferences following the density rules in ARCHITECTURE.md. It performs no * IO and reads no globals so layout can be snapshot-tested at any dimension * without a live terminal. */ export type LayoutDensity = "compact" | "single" | "wide"; export type PlanPlacement = "hidden" | "overlay" | "split"; export interface Rect { readonly x: number; readonly y: number; readonly width: number; readonly height: number; } export interface LayoutInput { readonly columns: number; readonly rows: number; /** User toggle: whether the plan pane is requested at all. */ readonly planVisible?: boolean | undefined; /** User/config toggle: whether split view is permitted on wide terminals. */ readonly splitEnabled?: boolean | undefined; } export interface LayoutModel { readonly density: LayoutDensity; readonly columns: number; readonly rows: number; /** Optional chrome (borders, hints, condensed status detail) survives. */ readonly showOptionalChrome: boolean; readonly statusCondensed: boolean; readonly chat: Rect; readonly composer: Rect; readonly status: Rect; readonly plan: Rect & { readonly placement: PlanPlacement; }; /** Full-screen portal target for blocking overlays/pickers/modals. */ readonly overlay: Rect; } export declare const COMPACT_MAX_COLS = 79; export declare const SINGLE_MAX_COLS = 119; export declare const MIN_ROWS_FOR_STANDARD = 20; export declare const PLAN_MIN_WIDTH = 34; export declare const PLAN_MAX_WIDTH = 52; export declare const CHAT_MIN_WIDTH_SPLIT = 72; export declare const DIVIDER_WIDTH = 1; export declare const MIN_CHAT_ROWS = 6; export declare const STATUS_HEIGHT = 1; /** * Cap on editable composer text rows (not including border chrome). * Grows with Shift+Enter / wrap up to this; classic could take most of the * terminal — ~18 (~10% over the prior 16) keeps multi-line usable without * eating the transcript. */ export declare const COMPOSER_MAX_HEIGHT = 18; export declare const COMPOSER_MIN_HEIGHT = 1; /** Single editable line by default (classic Ink). Grows only if content needs it. */ export declare const COMPOSER_PREFERRED_HEIGHT = 1; export declare function computeLayout(input: LayoutInput): LayoutModel;