export interface OrphanWidowConfig { avoidOrphans: boolean; orphanMinLines: number; orphanPenalty: number; avoidWidows: boolean; widowMinLines: number; widowPenalty: number; slackWeight: number; } export interface SplitChoice { /** Number of lines to place in the current column (0 means push the whole * paragraph to the next column; equals totalLines means keep it here). */ splitAt: number; /** Total demerit assigned to the chosen candidate (for diagnostics/tests). */ demerit: number; } export declare const DEFAULT_ORPHAN_PENALTY = 1000; export declare const DEFAULT_WIDOW_PENALTY = 1000; export declare const DEFAULT_SLACK_WEIGHT = 10; /** * Score each candidate split `k` (place `k` lines in the current column, the * rest in the next) and return the one with minimum total demerit. * * Soft constraints — penalty-based, not hard forbids. If the only way to honor * both orphan and widow constraints is unreasonable, the optimizer picks the * least-bad candidate. * * Pure function — no I/O, deterministic, trivially unit-testable. */ export declare function chooseParagraphSplit(totalLines: number, spaceRemaining: number, cfg: OrphanWidowConfig): SplitChoice; //# sourceMappingURL=orphanWidow.d.ts.map