import * as react_jsx_runtime from 'react/jsx-runtime'; import * as React from 'react'; import { S as SearchOptions, a as SearchResult, H as Hit } from '../../index-BZlRtKT9.js'; export { d as AskAiOptions, A as AskAiResult, c as Highlight, b as askAi, g as getSearchClientRaw, s as search } from '../../index-BZlRtKT9.js'; import 'typesense'; import 'typesense/lib/Typesense/Documents.js'; /** * See https://typesense.org/docs/26.0/api/search.html#search-parameters * for more information about available search options. */ type UseSearchParams = { /** * The _searchKey taken from a collection of our GraphQL API. */ _searchKey: SearchKey; saveRecentSearches?: { key: string; getStorage: () => Storage | null; }; } & SearchOptions; type UseSearchResult> = { result: SearchResult | undefined; query: string; onQueryChange: (q: string) => Promise; recentSearches?: { hits: (Hit & { addedAt: number; })[] | undefined; add: (hit: Hit) => void; remove: (_key: string) => void; clear: () => void; }; }; /** * Everything you need to create an instant-search experience. */ declare const useSearch: , SearchKey extends string | null = string | null>({ _searchKey, saveRecentSearches, ...searchOptions }: UseSearchParams) => SearchKey extends null ? { valid: false; } & Partial> : { valid: true; } & UseSearchResult; type SearchBoxContext> = UseSearchResult & { id: string; selectedIndex: number; onIndexChange: (op: { scrollIntoView?: boolean; } & ({ type: "incr" | "decr"; } | { type: "set"; value: number; })) => void; onHitSelect?: (hit: Hit) => void; }; declare const SearchBox: { Root: = Record>({ children, search, onHitSelect, }: { children?: React.ReactNode; search: ReturnType>; onHitSelect?: (hit: Hit) => void; }) => react_jsx_runtime.JSX.Element | null; Input: React.ForwardRefExoticComponent & React.InputHTMLAttributes & { asChild?: boolean; disableSelectionPrefill?: boolean; }, "ref"> & React.RefAttributes>; Placeholder: React.ForwardRefExoticComponent & React.HTMLAttributes & { asChild?: boolean; }, "ref"> & React.RefAttributes>; Empty: React.ForwardRefExoticComponent & React.HTMLAttributes & { asChild?: boolean; }, "ref"> & React.RefAttributes>; HitList: React.ForwardRefExoticComponent & React.HTMLAttributes & { asChild?: boolean; }, "ref"> & React.RefAttributes>; HitItem: React.ForwardRefExoticComponent & React.AnchorHTMLAttributes & { asChild?: boolean; hit: Hit; href: string; }, "ref"> & React.RefAttributes>; HitSnippet: ({ fieldPath, fallbackFieldPaths, components, }: { fieldPath: string; fallbackFieldPaths?: string[]; components?: { container?: ({ children, }: { children: React.ReactNode; }) => React.ReactNode; mark?: ({ children }: { children: string; }) => React.ReactNode; text?: ({ children }: { children: string; }) => React.ReactNode; }; }) => react_jsx_runtime.JSX.Element | null; useContext: () => SearchBoxContext>; useHitContext: () => { hit: Hit; }; }; export { Hit, SearchBox, type SearchBoxContext, SearchOptions, SearchResult, type UseSearchParams, type UseSearchResult, useSearch };