import { FootnotePageLedger, Measure } from '../../contracts/src/index.js'; import { FootnoteRange, FootnoteSlice } from './footnote-content.js'; export type PendingFootnote = { id: string; ranges: FootnoteRange[]; }; type IncomingFootnote = { readonly id: string; readonly ranges: readonly FootnoteRange[]; }; export type FootnotePageLedgerDraft = Omit; export type FootnotePagePlanInput = { pageIndex: number; columnCount: number; /** Physical capacity for this page's note band, including separator, padding, and gaps. */ availableHeight: number; idsByColumn: ReadonlyMap; rangesByFootnoteId: ReadonlyMap; measuresById: ReadonlyMap; fullHeightById: ReadonlyMap; firstLineHeightById: ReadonlyMap; pendingByColumn: ReadonlyMap; separatorSpacingBefore: number; dividerHeight: number; continuationDividerHeight: number; topPadding: number; gap: number; }; export type FootnotePagePlan = { slices: FootnoteSlice[]; pendingByColumn: Map; ledger: FootnotePageLedgerDraft; /** Rounded reserve capped at the supplied capacity; not a proof that every slice fits. */ reserve: number; /** Unrounded, uncapped height of the tallest placed column. */ actualReserve: number; hasContinuationByColumn: Map; capped: boolean; overflowHeightPx: number; overflowHeightByColumn: Map; /** Outgoing ranges or physical overflow still require a controller decision. */ hasUnresolvedContent: boolean; }; /** * Places one page from exact incoming ranges. Global inventories are lookup-only; * body placement and any future-page capacity decision belong to the caller. */ export declare const planFootnotePage: (input: FootnotePagePlanInput) => FootnotePagePlan; export {};