//#region src/types.d.ts interface PagefindIndexOptions { basePath?: string; baseUrl?: string; excerptLength?: number; indexWeight?: number; mergeFilter?: Record; highlightParam?: string; language?: string; primary?: boolean; ranking?: PagefindRankingWeights; } interface PagefindRankingWeights { termSimilarity?: number; pageLength?: number; termSaturation?: number; termFrequency?: number; } interface PagefindSearchOptions { preload?: boolean; verbose?: boolean; filters?: Record; sort?: Record; } interface PagefindFilterCounts extends Record> {} interface PagefindSearchResults { results: PagefindSearchResult[]; unfilteredResultCount: number; filters: PagefindFilterCounts; totalFilters: PagefindFilterCounts; timings: { preload: number; search: number; total: number; }; } interface PagefindSearchResult { id: string; score: number; words: number[]; data: () => Promise; } interface PagefindSearchFragment { url: string; raw_url?: string; content: string; raw_content?: string; excerpt: string; sub_results: PagefindSubResult[]; word_count: number; locations: number[]; weighted_locations: PagefindWordLocation[]; filters: Record; meta: Record; anchors: PagefindSearchAnchor[]; } interface PagefindSubResult { title: string; url: string; locations: number[]; weighted_locations: PagefindWordLocation[]; excerpt: string; anchor?: PagefindSearchAnchor; } interface PagefindWordLocation { weight: number; balanced_score: number; location: number; } interface PagefindSearchAnchor { element: string; id: string; text?: string; location: number; } interface Pagefind { debouncedSearch: (query: string, options?: PagefindSearchOptions, duration?: number) => Promise; destroy: () => Promise; filters: () => Promise; init: () => Promise; mergeIndex: (indexPath: string, options?: Record) => Promise; options: (options: PagefindIndexOptions) => Promise; preload: (term: string, options?: PagefindIndexOptions) => Promise; search: (term: string | null, options?: PagefindSearchOptions) => Promise; } //#endregion export { type Pagefind, type PagefindFilterCounts, type PagefindIndexOptions, type PagefindRankingWeights, type PagefindSearchAnchor, type PagefindSearchFragment, type PagefindSearchOptions, type PagefindSearchResult, type PagefindSearchResults, type PagefindSubResult, type PagefindWordLocation };