import type { PdfDocument, PdfPage } from '@pdfrx/engine'; import type { PagePlacement } from '@pdfrx/viewer-core'; import type { PdfrxPageMutationOptions, PdfrxViewer } from '@pdfrx/viewer'; /** Resolves session-level source IDs to the open PDF documents owned by one client. */ export declare class PageSourceRegistry { #private; /** * Registers an open PDF and captures its immutable physical source pages. * * @param documentId - The stable document identifier. * @param document - The PDF document to process. * */ register(documentId: string, document: PdfDocument): void; /** * Removes a source mapping without disposing the caller-owned document. * * @param documentId - The stable document identifier. * */ unregister(documentId: string): void; /** * Returns whether a live document is registered for `documentId`. * * @param documentId - The stable document identifier. * @returns Whether the condition is satisfied. * */ has(documentId: string): boolean; /** * @throws `Error` when the source is missing or disposed. * * @param documentId - The stable document identifier. * @returns The resulting PdfDocument. * */ document(documentId: string): PdfDocument; /** * Resolves a zero-based physical source page. @throws `RangeError` if missing. * * @param documentId - The stable document identifier. * @param pageIndex - The 0-based page index. * @returns The resulting PdfPage. * */ page(documentId: string, pageIndex: number): PdfPage; /** * Resolves the session id previously assigned to a PDF document. * * @param document - The PDF document to process. * @returns The resulting string. * */ documentId(document: PdfDocument): string; } /** * Converts a session arrangement into rotated engine page proxies for this client. * * @param placements - The placements value. * @param sources - The sources value (PageSourceRegistry). * @returns The resolved value. * */ export declare function resolvePagePlacements(placements: readonly PagePlacement[], sources: PageSourceRegistry): readonly PdfPage[]; /** * Captures an engine arrangement as independently addressable placements. * @throws `Error` for unregistered documents or empty/duplicate generated ids. * @param pages - The pages to process, in document order. * @param sources - The sources value (PageSourceRegistry). * @param createPlacementId - The stable create placement identifier. * @returns The updated result. * */ export declare function createPagePlacements(pages: readonly PdfPage[], sources: PageSourceRegistry, createPlacementId?: () => string): readonly PagePlacement[]; /** * Applies resolved placements through the viewer's origin-aware page API. * Remote replay should use `origin: 'remote'` and `recordHistory: false`. * @param viewer - The viewer value (PdfrxViewer). * @param placements - The placements value. * @param sources - The sources value (PageSourceRegistry). * @param options - Options that customize the operation. * */ export declare function applyPagePlacementsToViewer(viewer: PdfrxViewer, placements: readonly PagePlacement[], sources: PageSourceRegistry, options: PdfrxPageMutationOptions): void; //# sourceMappingURL=page-adapter.d.ts.map