import type { Meta } from "./manifest.js"; import type { ClientRouter } from "./router.js"; /** * Everything the generated client entry needs, re-exported here so that entry imports ONE module and * that module is DOM-only. It used to take these from `@nifrajs/web`, whose graph includes `renderPage` * and the static-file server: bundled builds tree-shook the server half away, but Vite's dev server * serves modules as written, so the browser evaluated `public-dir.ts` and died on `node:fs/promises` * before hydrating. The fix is for the entry not to name the server module in the first place. */ export { mergeHeads, resolveMeta } from "./internal/head-merge.js"; export { getBrowserNavigate, IDLE_BLOCKER, registerBlocker, resolveNavigate, } from "./navigation.js"; export { createMutation, createQueryClient } from "./query.js"; export { createClientRouter, createMatcher } from "./router.js"; export { searchOf, searchOfChain } from "./search.js"; export interface InstallHistoryOptions { /** Full-page fallback when a client navigation can't proceed (default: `location.assign`). */ readonly fallback?: (path: string) => void; } /** * Attach history + link interception to a router. Returns a teardown function that removes the * listeners. A data-fetch failure during a client navigation falls back to a full-page load, so * navigation degrades gracefully rather than leaving the user stuck. */ export declare function installHistory(router: ClientRouter, options?: InstallHistoryOptions): () => void; /** * Intercept submissions of same-origin `
` whose action targets an app route: * submit via the router (no full reload - POST the action, then revalidate the active loader). On * failure it falls back to a native submit, so the form still works. Returns a teardown function. */ /** * Sync the document head to a route's resolved {@link Meta} on client navigation. Sets the title * (when provided) and replaces the **managed** (`data-nifra`) ``/`` tags - static head * content (charset, hand-written tags) is never touched. SSR injects the same `data-nifra` tags, so * the first navigation cleanly takes over from the server-rendered head. */ export declare function applyHead(head: Meta): void; export declare function installForms(router: ClientRouter): () => void; /** * Mark the document interactive once the client has hydrated: sets `data-nifra-hydrated` on `` * and fires a one-shot `nifra:hydrated` event. The generated client entry calls this on the next frame * after the adapter mounts (so every framework binding gets it), letting apps gate a custom JS-only * interaction that would otherwise fire before its handler is attached. Idempotent. nifra's own * progressive-enhancement forms/links don't need it - only hand-wired onClick/onSubmit handlers with no * native fallback do. See the Hydration guide. */ export declare function signalHydrated(): void; //# sourceMappingURL=client.d.ts.map