export type Direction = 'ltr' | 'rtl'; /** * How pages group into spreads: * - `double`: paired from the start — `[0|1] [2|3] …` * - `single`: one page per spread — `[0] [1] …` * - `cover`: first page alone, then paired — `[·|0] [1|2] …` * - `book`: first AND last alone (front + back cover) — `[·|0] [1|2] … [N-1|·]` */ export type SpreadMode = 'double' | 'single' | 'cover' | 'book'; export interface Spread { /** Page index shown on the left, or null for a blank side. */ left: number | null; /** Page index shown on the right, or null for a blank side. */ right: number | null; } export interface SpreadOptions { direction?: Direction; mode?: SpreadMode; } /** * Map a flat page list (indices 0..pageCount-1) into display spreads. * * Reading order is always preserved; `direction` only mirrors each spread's * left/right positions, so RTL is just an LTR layout with the sides swapped. * Out-of-range slots are `null` (a blank half on odd counts / a lone cover). */ export declare function buildSpreads(pageCount: number, options?: SpreadOptions): Spread[]; /** Whether a container this wide should fall back to one page per spread. */ export declare function shouldSinglePage(containerWidth: number, threshold: number): boolean;