import type { Fallback, Options, SyncHistoryEntryOptions } from "./types.js"; export declare const supportsViewTransitions: boolean; export declare const transitionEnabledOnThisPage: () => boolean; export declare function getFallback(): Fallback; /** * Write a router-managed history entry (push or replace) WITHOUT any * navigation, DOM, or lifecycle side effect. This is the supported path for * consumers deep-linking transient UI state (dialogs/modals, a photo * viewer's `/photos//` URL). Hand-rolled raw `history.pushState` * desyncs `originalLocation` and the index bookkeeping that popstate * direction detection ({@link derivePopDirection}) and the same-page * traverse fast-path depend on; `navigate()` can't be used instead because * it forces a fetch. See #1377 / #1374. * * Never scrolls the viewport itself — but the entry it writes IS stamped * with the CURRENT scroll position (`scrollX`/`scrollY` at call time), not * `(0, 0)` (issue #1398). This matters only for a later Forward-traversal * back to this entry: the same-page traverse fast-path restores whatever * scroll position was stamped on the entry, so a same-page push (e.g. * opening a dialog) does not snap the underlying page to the top when the * dialog is later reopened via Forward. * * @param url - The URL to write. Cross-origin URLs throw rather than * silently falling back to a full-page load. * @param options.replace - Use `history.replaceState` instead of * `history.pushState` (no new Back-button entry). Default: push. * @param options.state - Merged into the entry's `history.state`; the * router's own bookkeeping keys (`index`, `scrollX`, `scrollY`) always win * on a colliding key. */ export declare function syncHistoryEntry(url: string | URL, options?: SyncHistoryEntryOptions): void; export declare function navigate(href: string, options?: Options): Promise; export interface InitOptions { /** Reserved for forward-compat with Astro's prefetch integration. Ignored in v1. */ prefetchAll?: boolean; } /** * Bootstrap the client router on this page: restore its history entry, mark * the already-executed scripts, and wire up the navigation, click and * form-submit listeners. Safe to call multiple times — each of the two phases * runs at most once (idempotent). * * Evaluating this module does nothing; every side effect the router performs * at startup happens here (#2436). Two once-guards rather than one, because * the phases have different eligibility — see `pageStateSeeded`. * * @param _options - Forward-compat hook matching Astro's init() signature. Ignored in v1. */ export declare function init(_options?: InitOptions): void;