import { FuseResult } from 'fuse.js'; interface SnippetOptions { contextChars?: number; matchKey?: string; collapseWhitespace?: boolean; /** * Render up to N highlighted snippets per result, instead of just the * single longest match span. Default `1` — backward compatible. * * When > 1, the picker greedily takes the N longest non-overlapping * spans (overlap = `[start-ctx, end+ctx]` windows intersect), then * re-sorts them by start position so snippets appear in document * order. Joined with `separator` between snippets. */ maxSnippets?: number; /** * String inserted between snippets when `maxSnippets > 1`. Default * `' … '` (space + horizontal ellipsis + space). * * **Security note (audit V8, 2026-05-16):** This string is concatenated * raw into the returned HTML, by design — so consumers can pass `'
'` * or `'
'` if they want a markup separator. Treat `separator` as * developer-controlled input only. Do NOT wire it to untrusted end-user * input (e.g. a UI textbox the user types into) — that would let the * user inject arbitrary HTML between snippets. The library does not * escape this parameter; the contract is "developer literal, like the * default ` … `". */ separator?: string; } declare function escapeHTML(s: string): string; declare function snippetHTMLFor(r: FuseResult, options?: SnippetOptions): string; export { type SnippetOptions, escapeHTML, snippetHTMLFor };