import type { IdmlSafetyLimits } from './idmlLimits.js'; import type { IdmlOpenResult, IdmlRenderedPage } from './idmlProtocol.js'; export interface IdmlInspectorLike { free(): void; tree(): string; renderPage(pageIndex: number, dpi: number): Uint8Array; } export interface IdmlInspectorRuntime { Inspector: new (idml: Uint8Array) => IdmlInspectorLike; } export type IdmlInspectorRuntimeLoader = (wasmUrl?: string) => Promise; export interface IdmlEngineOptions { wasmUrl?: string; runtimeLoader?: IdmlInspectorRuntimeLoader; signal?: AbortSignal; } export declare class IdmlEngineError extends Error { readonly code: string; constructor(code: string, message: string); } export declare class IdmlDocumentSession { private inspector; private readonly limits; private readonly pageBounds; readonly opened: IdmlOpenResult; private destroyed; private constructor(); static open(source: ArrayBuffer | Uint8Array, limits: IdmlSafetyLimits, options?: IdmlEngineOptions): Promise; renderPage(pageIndex: number, dpi: number, signal?: AbortSignal): Promise; destroy(): void; }