UNPKG

r2-navigator-js

Version:

Readium 2 'navigator' for NodeJS (TypeScript)

21 lines (20 loc) 2.06 kB
import * as debounce from "debounce"; import { IColor, IHighlight, IHighlightDefinition, ITextPopup } from "../../common/highlight"; import { ISelectionInfo } from "../../common/selection"; import { ReadiumElectronWebviewWindow } from "./state"; export declare const ENABLE_FLOATING_UI = true; export declare const ENABLE_CSS_HIGHLIGHTS = true; export declare const ENABLE_PAGEBREAK_MARGIN_TEXT_EXPERIMENT = false; export declare const HIGHLIGHT_GROUP_TTS = "tts"; export declare const HIGHLIGHT_GROUP_PAGEBREAK = "pagebreak"; export declare const setDrawMargin: (win: ReadiumElectronWebviewWindow, drawMargin: boolean | string[]) => void; export declare function getBoundingClientRectOfDocumentBody(win: ReadiumElectronWebviewWindow): DOMRect; export declare function hideAllhighlights(_documant: Document): void; export declare function destroyAllhighlights(documant: Document): void; export declare function destroyHighlight(documant: Document, id: string): void; export declare function destroyHighlightsGroup(documant: Document, group: string): void; export declare function recreateAllHighlightsRaw(win: ReadiumElectronWebviewWindow, highlights?: IHighlight[]): void; export declare const recreateAllHighlightsDebounced: debounce.DebouncedFunction<(win: ReadiumElectronWebviewWindow) => void>; export declare function recreateAllHighlights(win: ReadiumElectronWebviewWindow): void; export declare function createHighlights(win: ReadiumElectronWebviewWindow, highDefs: IHighlightDefinition[], pointerInteraction: boolean): Array<IHighlight | null>; export declare function createHighlight(win: ReadiumElectronWebviewWindow, selectionInfo: ISelectionInfo | undefined, range: Range | undefined, color: IColor | undefined, pointerInteraction: boolean, drawType: number | undefined, expand: number | undefined, group: string | undefined, marginText: string | undefined, textPopup: ITextPopup | undefined, bodyRect: DOMRect, bodyComputedStyle: CSSStyleDeclaration, rootComputedStyle: CSSStyleDeclaration): [IHighlight, HTMLDivElement | null] | undefined;