import type { BuildDomTreeArgs, RawDomTreeNode } from './raw_types'; import { type DOMState, type DOMBaseNode, DOMElementNode } from './views'; import { Page } from 'puppeteer-core'; export interface ReadabilityResult { title: string; content: string; textContent: string; length: number; excerpt: string; byline: string; dir: string; siteName: string; lang: string; publishedTime: string; } declare global { interface Window { buildDomTree: (args: BuildDomTreeArgs) => RawDomTreeNode | null; turn2Markdown: (selector?: string) => string; parserReadability: () => ReadabilityResult | null; } } /** * Get the scroll information for the current page. * @returns A tuple containing the number of pixels above and below the current scroll position. */ export declare function getScrollInfo(page: Page): Promise<[number, number]>; /** * Get the markdown content for the current page. * @param tabId - The ID of the tab to get the markdown content for. * @param selector - The selector to get the markdown content for. If not provided, the body of the entire page will be converted to markdown. * @returns The markdown content for the selected element on the current page. */ export declare function getMarkdownContent(page: Page, selector?: string): Promise; /** * Get the readability content for the current page. * @param tabId - The ID of the tab to get the readability content for. * @returns The readability content for the current page. */ export declare function getReadabilityContent(page: Page): Promise; /** /** * Get the clickable elements for the current page. * @param tabId - The ID of the tab to get the clickable elements for. * @param highlightElements - Whether to highlight the clickable elements. * @param focusElement - The element to focus on. * @param viewportExpansion - The viewport expansion to use. * @returns A DOMState object containing the clickable elements for the current page. */ export declare function getClickableElements(page: Page, highlightElements?: boolean, focusElement?: number, viewportExpansion?: number): Promise; export declare function createSelectorMap(elementTree: DOMElementNode): Map; export declare function parseNode(nodeData: RawDomTreeNode, parent?: DOMElementNode | null): DOMBaseNode | null; export declare function removeHighlights(page: Page): Promise; //# sourceMappingURL=service.d.ts.map