import { type PanelOptions } from './sidebar'; import type { SearchHit, Zine } from '../zine'; /** The query and its results, so a closed panel can be reopened where the reader left it rather * than blank. Held by the toolbar (which outlives the panel) and handed back on reopen. */ export interface SearchState { query: string; results: SearchHit[]; } /** Panel options plus the optional state to reopen with. */ export interface SearchOptions extends PanelOptions { /** Query and results from a previous open, put back so the reader continues where they left off. */ state?: SearchState; } /** * Full-text search beside the book: a query field over its results. * * It lives in the same rail as the thumbnails and outline rather than a popover, because results * are an open-ended list — a floating panel over the book would either cover the page being * searched or clip the very results it found. */ export declare class Search { #private; /** The panel's themed root, so the toolbar can stamp its colour scheme. */ readonly root: HTMLElement; constructor(zine: Zine, container: HTMLElement, options?: SearchOptions); /** The query and results as they stand, for the toolbar to stash across a close. */ getState(): SearchState; destroy(): void; }