//#region src/url/adapter.d.ts interface UrlStateAdapter { /** Current query string WITHOUT the leading `"?"` (e.g. `"page=2&q=foo"`). */ getSearch(): string; /** * Replace the query string. * @param search - The next query string (without `"?"`). * @param options - `push: true` adds a history entry; default replaces. */ setSearch(search: string, options?: { push?: boolean; }): void; /** * Subscribe to external changes (back/forward navigation, deep links). * @returns An unsubscribe function. */ subscribe(onChange: () => void): () => void; } /** * Browser History-API adapter. A single instance is shared per `window` * (the query string is global state), so this is safe to memoise as a * module singleton via {@link getHistoryAdapter}. * * @returns A {@link UrlStateAdapter} backed by `window.history` + `popstate`. */ declare function createHistoryAdapter(): UrlStateAdapter; /** * In-memory adapter. Holds the query string in a closure with its own * subscriber set — used for SSR, tests, and when URL sync is disabled * (the table still gets fully working local state). * * @param initialSearch - Optional starting query string (without `"?"`). * @returns A self-contained {@link UrlStateAdapter}. */ declare function createMemoryAdapter(initialSearch?: string): UrlStateAdapter; /** * Lazily create and reuse one History-API adapter per runtime. Returns a * fresh memory adapter when there is no `window` (SSR). * * @returns The shared history adapter, or a memory adapter under SSR. */ declare function getHistoryAdapter(): UrlStateAdapter; /** * Resolve which {@link UrlStateAdapter} a URL-synced hook should use: an * explicit `adapter` wins; otherwise the shared history adapter in the * browser, or a stable per-hook memory adapter when disabled or under SSR. * * @param adapter - Optional explicit adapter (router integration). * @param enabled - When false, always use the local memory adapter. * @returns The adapter to read/write the query string through. */ declare function useResolvedAdapter(adapter: UrlStateAdapter | undefined, enabled: boolean): UrlStateAdapter; //#endregion export { useResolvedAdapter as a, getHistoryAdapter as i, createHistoryAdapter as n, createMemoryAdapter as r, UrlStateAdapter as t }; //# sourceMappingURL=adapter-BD3RX3cl.d.cts.map