import { Process } from "./process";
import { Fragment, Fragmentor, FragmentorEvents, FragmentorOptions } from "./fragments";
import { CountersStack } from "./counters";
import { Point } from "./util/ranges";
import { Flow, FlowIterator, ForcedBreakType } from "./flow";
export declare const printableFormat: string[];
export declare type Size = [number, number];
/**
 * Sequence of pages
 *
 * A sequence is a set of page without a forced page break.
 */
export declare class Sequence {
    range: Range;
    pageName: string;
    pageGroupStart: boolean;
    breakType: ForcedBreakType;
    breakPoint: Point;
    startPageIndex: number;
    endPageIndex: number;
    /**
     * Sequence constructor
     *
     * @param continuousFlow  The range returned by ContinuousFlowIterator.
     */
    constructor(continuousFlow: Flow);
}
export declare class Page extends Fragment {
    marginBoxes: {
        [marginName: string]: HTMLElement;
    };
    side: string;
    blank: boolean;
    parentSequence: Sequence;
    counters: CountersStack;
    areaSize: Size;
    printSize: Size;
}
export interface PaginatorOptions extends FragmentorOptions {
    source?: HTMLElement;
    bookmarks: boolean;
    defaultPageSize: [string, string];
}
export interface PaginatorEvents extends FragmentorEvents {
    'preparation-start': Record<string, never>;
    'prepare': {
        node: Node;
    };
    'preparation-end': Record<string, never>;
    'pagination-start': Record<string, never>;
    'pagination-end': Record<string, never>;
    'sequence-start': {
        sequence: Sequence;
    };
    'sequence-end': {
        sequence: Sequence;
    };
    'page-start': {
        page: Page;
        body: HTMLElement;
    };
    'page-standalone': {
        page: Page;
    };
    'page-end': {
        page: Page;
    };
    'print-start': Record<string, never>;
    'print-end': Record<string, never>;
}
export declare class Paginator extends Fragmentor<PaginatorOptions, PaginatorEvents> {
    static defaultOptions: PaginatorOptions;
    sequences: Sequence[];
    currentSequence: Sequence;
    previousSequence: Sequence;
    firstPageSide: "left" | "right";
    flowIterator: FlowIterator;
    avoidBreakTypes: string[];
    forcedBreakTypes: ForcedBreakType[];
    printSize: Size;
    constructor(options?: Partial<PaginatorOptions>);
    get pages(): Page[];
    get currentPage(): Page;
    set currentPage(page: Page);
    /**
     * The main generator function of the pagination process.
     */
    protected paginationProcess(): Process;
    /**
     * The generator function of the processing of a sequence.
     *
     * @param {Range} flow - A range returned by ContinuousFlowIterator
     * @param {module:layout~Sequence} nextSequence - The following sequence
     * @memberof module:postscriptum~Processor
     */
    sequenceProcess(flow: Flow): Process;
    /**
     * The generator function of the processing of a page.
     *
     * @param {boolean} blank - Signals if the page to process is blank
     */
    pageProcess(body: HTMLElement, abortIfUnderflow?: boolean): Process;
    addStandalonePage(body: HTMLElement, pageName: string, blank?: boolean, refPage?: Page): void;
    continuePageProcess(page: Fragment, flow: Flow): Process;
    addImagesToLoad(page: Page): void;
    onPageEnd(page: Page): void;
    setBleedAndMarks(page: Page): void;
    /**
     * Create a page
     *
     * @param doc {Document}
     * @param name {string}
     * @param number {integer}
     * @param pseudos {string[]}
     */
    createPage(name: string, firstOfGroup: boolean, side: string, blank: boolean): Page;
    updatePagesCounter(): void;
}
