Files
med-notes/.pnpm-store/v10/files/09/04bed10054c1b172bf2f9984faa228f5e60e640584d432e21351d51d3ac4b0b18e9f3b0587390b024b4c3991ddf79736f05f1b6ca4fb0ac6aba1202855758b
2025-05-09 05:30:08 +02:00

58 lines
2.2 KiB
Plaintext

export type PDFPageProxy = import("../src/display/api").PDFPageProxy;
export type PageViewport = import("../src/display/display_utils").PageViewport;
export type TextHighlighter = import("./text_highlighter").TextHighlighter;
export type TextAccessibilityManager = import("./text_accessibility.js").TextAccessibilityManager;
export type TextLayerBuilderOptions = {
pdfPage: PDFPageProxy;
/**
* - Optional object that will handle
* highlighting text from the find controller.
*/
highlighter?: import("./text_highlighter").TextHighlighter | undefined;
accessibilityManager?: import("./text_accessibility.js").TextAccessibilityManager | undefined;
onAppend?: Function | undefined;
};
/**
* @typedef {Object} TextLayerBuilderOptions
* @property {PDFPageProxy} pdfPage
* @property {TextHighlighter} [highlighter] - Optional object that will handle
* highlighting text from the find controller.
* @property {TextAccessibilityManager} [accessibilityManager]
* @property {function} [onAppend]
*/
/**
* The text layer builder provides text selection functionality for the PDF.
* It does this by creating overlay divs over the PDF's text. These divs
* contain text that matches the PDF text they are overlaying.
*/
export class TextLayerBuilder {
static "__#69@#textLayers": Map<any, any>;
static "__#69@#selectionChangeAbortController": null;
static "__#69@#removeGlobalSelectionListener"(textLayerDiv: any): void;
static "__#69@#enableGlobalSelectionListener"(): void;
constructor({ pdfPage, highlighter, accessibilityManager, enablePermissions, onAppend, }: {
pdfPage: any;
highlighter?: null | undefined;
accessibilityManager?: null | undefined;
enablePermissions?: boolean | undefined;
onAppend?: null | undefined;
});
pdfPage: any;
highlighter: any;
accessibilityManager: any;
div: HTMLDivElement;
/**
* Renders the text layer.
* @param {PageViewport} viewport
* @param {Object} [textContentParams]
*/
render(viewport: PageViewport, textContentParams?: Object | undefined): Promise<void>;
hide(): void;
show(): void;
/**
* Cancel rendering of the text layer.
*/
cancel(): void;
#private;
}