/**
 * MK2 Layout Engine - Deterministic layout computation
 *
 * Fixed layout engine that ensures no overflow:
 * - All boxes must satisfy: x + w <= safeW (so maxX = x + w - 1 <= safeW - 1)
 * - Accounts for gutters and borders
 * - Supports wide (3-column), compact (2-column), and narrow (1-column) layouts
 */
export declare const TOP_GUARD = 1;
export declare const GUTTER_X = 1;
export declare const GUTTER_Y = 1;
export declare const BORDER_THICKNESS = 1;
export { MIN_PANEL_W, MIN_PANEL_H, CMD_MIN_W, CMD_MIN_H } from '../safeViewport.js';
/**
 * Get safe margins - uses terminal profile
 */
export declare function getSafeMargins(): {
    marginX: number;
    marginY: number;
};
export interface LayoutRect {
    x: number;
    y: number;
    w: number;
    h: number;
}
export type LayoutMode = 'wide' | 'compact' | 'narrow';
export interface LayoutSpec {
    mode: LayoutMode;
    safeW: number;
    safeH: number;
    cols: number;
    rows: number;
    leftW: number;
    centerW: number;
    rightW: number;
    leftX: number;
    centerX: number;
    rightX: number;
    cmdH: number;
    usableH: number;
    topGuard: number;
    rightGuard: number;
    bottomGuard: number;
    safeMarginX: number;
    safeMarginY: number;
    maxRightEdge: number;
    maxBottomEdge: number;
    rects: {
        posture: LayoutRect;
        resources: LayoutRect;
        assets: LayoutRect;
        operations: LayoutRect;
        network: LayoutRect;
        capabilities: LayoutRect;
        command: LayoutRect;
    };
}
/**
 * Compute safe canvas dimensions with margins
 * DEPRECATED: Use getSafeViewport() from safeViewport.ts instead
 * Kept for backward compatibility - redirects to viewport system
 * FIXED: Now uses actual getSafeViewport() to get RIGHT=3, BOTTOM=2
 */
export declare function getSafeCanvas(cols: number, rows: number): Promise<{
    safeW: number;
    safeH: number;
    marginX: number;
    marginY: number;
}>;
/**
 * Hard clamp pass - uses clampRect helper
 * Clamps BEFORE creating widgets, accounting for borders
 */
export declare function clampLayout(layout: LayoutSpec): void;
/**
 * Compute max edges for debug overlay
 */
export declare function computeMaxEdges(layout: LayoutSpec): {
    maxRightEdge: number;
    maxBottomEdge: number;
};
/**
 * Validate layout - CRITICAL FIX
 * Acceptance: maxRight <= safeW - 2, maxBottom <= safeH - 2
 */
export declare function validateLayout(layout: LayoutSpec): {
    errors: string[];
    clamped: boolean;
};
/**
 * Compute layout spec from screen dimensions
 * FIXED: Single source of truth - uses getDims() from dimensions.ts
 * NEVER throws "Terminal too small" - that's handled by the caller
 */
export declare function computeLayout(cols: number, rows: number): Promise<LayoutSpec>;
//# sourceMappingURL=computeLayout.d.ts.map