import type { Editor } from '@tiptap/core'; import type { OfficeKernelPageMetrics, OfficeKernelTextLayoutParagraphResult } from '../../kernel/office-kernel-protocol'; import type { DocumentPaginationSnapshot } from './work-document-pagination-types'; import type { WorkDocumentSectionLayout } from './work-types'; export interface IncrementalDocumentLayoutMeasurementOptions { checkpoint?: (signal?: AbortSignal) => Promise; signal?: AbortSignal; } export declare function measureDocumentLayoutBlocks(editor: Editor, previous?: DocumentPaginationSnapshot | null, dirtyFrom?: number, textLayouts?: ReadonlyMap, maximumFragmentedTableRowHeight?: number): DocumentPaginationSnapshot; /** * Measures the same canonical editor DOM as `measureDocumentLayoutBlocks` * while yielding between top-level blocks. The browser keeps input, media, * and animation tasks schedulable during large-document pagination without * weakening the layout result or replacing the controlled editor model. */ export declare function measureDocumentLayoutBlocksIncrementally(editor: Editor, previous?: DocumentPaginationSnapshot | null, dirtyFrom?: number, textLayouts?: ReadonlyMap, maximumFragmentedTableRowHeight?: number, options?: IncrementalDocumentLayoutMeasurementOptions): Promise; export declare function documentPageMetrics(layout: WorkDocumentSectionLayout, physicalPage?: number): OfficeKernelPageMetrics; export declare function documentPageBodyHeight(page: OfficeKernelPageMetrics): number; export declare function documentPaginationSurfaceHeight(pageCount: number, page: OfficeKernelPageMetrics): number;