import type { PDFPageProxy } from '../pdf.js/src/display/api';
import type { BaseCanvasFactory } from '../pdf.js/src/display/canvas_factory';
import type { PageViewport } from '../pdf.js/src/display/display_utils';
import { type AnnotationData } from './AnnotationData';
export interface TextLayerNode {
    id?: string;
    role: string;
}
export interface TextLayerElement extends TextLayerNode {
    children: (string | TextLayerNode)[];
}
export interface TextLayerRoot extends TextLayerElement {
    width: number;
    height: number;
}
export interface TextLayerAnchor extends TextLayerElement {
    role: 'a';
    href: string;
}
export interface TextLayerText extends TextLayerNode {
    role: 'text';
    text: string;
    hyphen?: boolean;
    top: number;
    left: number;
    fontSize: number;
    fontFamily: string;
    fontFallback: string;
    dir: string;
    scale: number;
    angle: number;
}
export interface TextLayerImage extends TextLayerNode {
    role: 'img';
    src: string;
}
export declare function isTextNode(node: TextLayerNode): node is TextLayerText;
export declare function isAnchorNode(node: TextLayerNode): node is TextLayerAnchor;
export declare function isImageNode(node: TextLayerNode): node is TextLayerImage;
export declare function createTextLayer(page: PDFPageProxy, { canvasFactory, viewport, outputScale, annotations, }: {
    canvasFactory: BaseCanvasFactory;
    viewport?: PageViewport;
    outputScale?: number;
    annotations?: AnnotationData[];
}): Promise<TextLayerRoot>;
