export type ParagraphMatch = { para_id: string; para_index_1based: number; list_label: string; header: string; match_count_in_paragraph: number; match_text: string; context: string; }; export type XmlMatch = { char_start: number; char_end: number; line: number; match_text: string; context: string; }; export type SearchParagraphsResult = { matches: ParagraphMatch[]; totalMatches: number; paragraphsWithMatches: number; matchesTruncated: boolean; }; /** A paragraph's locator context (DOCX-only; ODF passes empty strings). */ export type Locator = { list_label: string; header: string; }; /** * Search a paragraph list with `re`. `locatorById` supplies optional list-label / * header context per paragraph id (DOCX); pass `null` when unavailable (ODF). */ export declare function searchParagraphsCore(paragraphs: Array<{ id: string; text: string; }>, re: RegExp, opts: { maxResults: number; contextChars: number; dedupeByParagraph: boolean; }, locatorById: Map | null): SearchParagraphsResult; /** Search a raw XML string with `re`, returning matches with approximate line numbers. */ export declare function searchRawXmlCore(xml: string, re: RegExp, opts: { maxResults: number; contextChars: number; }): { matches: XmlMatch[]; totalMatches: number; matchesTruncated: boolean; }; //# sourceMappingURL=grep_core.d.ts.map