/** * Parser - extracts the content zone the user wants to monitor. * * Supports both CSS selectors and XPath expressions as target. * XPath is detected automatically when target starts with "/" or "./". * * CSS path: cheerio DOM traversal (default) * XPath path: @xmldom/xmldom + xpath for W3C-compliant evaluation */ import type { CheerioAPI } from "cheerio"; import { type Snapshot, type WatchConfig } from "../models.js"; export declare class ParserError extends Error { constructor(message: string); } export declare class Parser { /** * Extract a Snapshot from a cleaned cheerio document. * * When config.target starts with "/" or "./" it is treated as an XPath * expression; otherwise it is a CSS selector. * * @param $ - Cleaned cheerio root (output of Cleaner.clean) * @param config - WatchConfig describing what to monitor * @throws ParserError if the target selector/expression matched nothing */ extract($: CheerioAPI, config: WatchConfig): Snapshot; private extractCss; private extractXPath; } /** Detect XPath expressions - they start with "/" or "./" */ export declare function isXPath(selector: string): boolean; //# sourceMappingURL=index.d.ts.map