import { BookLocation, TextProvider } from './location'; export declare const REBOOK_PAGE_SURFACE_MODEL_VERSION = 1; export type PageSurfaceKind = 'fixed-page' | 'reflowable-page' | 'image-page' | 'spread'; export type PageSurfaceLayerKind = 'content' | 'text' | 'annotation' | 'overlay' | 'interaction'; export type PageSurfaceLayerContentKind = 'dom' | 'canvas' | 'image' | 'texture' | 'custom'; export interface PageSurfaceLayer { readonly id: string; readonly kind: PageSurfaceLayerKind; readonly contentKind: PageSurfaceLayerContentKind; readonly content: TContent; readonly zIndex?: number; readonly selectable?: boolean; readonly pointerEvents?: 'auto' | 'none'; readonly opacity?: number; readonly location?: BookLocation; destroy?(): void; } export interface PageSurface { readonly id: string; readonly kind: PageSurfaceKind; readonly pageIndex?: number; readonly width: number; readonly height: number; readonly scale: number; readonly location?: BookLocation; readonly layers: readonly TLayer[]; readonly textProvider?: TextProvider; readonly metadata?: Readonly>; destroy?(): void; } export interface PageSurfaceRequest { readonly pageIndex: number; readonly scale: number; readonly reason?: string; } export interface ContentRenderer { readonly id: string; readonly format?: string; renderSurface(context: TContext, request?: PageSurfaceRequest): Promise | TSurface; destroy?(): Promise | void; } export interface PageCompositor { readonly id: string; compose(surface: TSurface, target?: TTarget): Promise | TResult; clear?(): void; destroy?(): Promise | void; } export interface PageSurfaceControllerConfig { readonly contentRenderer: ContentRenderer; readonly compositor: PageCompositor; readonly decorators?: readonly PageSurfaceDecorator[]; } export interface PageSurfaceDecorator { readonly id: string; decorate(surface: TSurface): Promise | TSurface; destroy?(): Promise | void; } export interface PageSurfaceComposeOutcome { readonly surface: TSurface; readonly result: TResult; } export declare class PageSurfaceController { private readonly contentRenderer; private readonly compositor; private readonly decorators; private sequence; private currentSurface; constructor(config: PageSurfaceControllerConfig); render(context: TContext, target?: TTarget, request?: PageSurfaceRequest): PageSurfaceComposeOutcome | Promise | null> | null; getCurrentSurface(): TSurface | null; cancelPending(): void; clear(): void; destroy(): void; private decorateAndComposeCurrent; private applyDecorators; private composeCurrent; } //# sourceMappingURL=page-surface.d.ts.map