export interface RouterOptions { showProgress?: boolean; } export interface BoostFormEventDetail { form: HTMLFormElement; url: string; status: number | null; outcome: NavigationOutcome | null; committed: boolean; fallback: boolean; } export type NavigationOutcome = 'success' | 'http-error' | 'network-error' | 'aborted' | 'invalid-response' | 'fallback' | 'error'; export interface NavigationContext { from: string; url: string; method: string; trigger: Element | null; target: HTMLElement | null; form: HTMLFormElement | null; popstate: boolean; signal: AbortSignal; status: number | null; committed: boolean; fallback: boolean; outcome: NavigationOutcome | null; } type NavigationHook = (url: string, context: NavigationContext) => void; interface NavigateOptions { url: string; method: string; trigger?: Element | null; form?: HTMLFormElement | null; formData?: FormData | null; formEncoding?: string; jsonData?: Record | null; replace?: boolean; changeState?: boolean; popstate?: boolean; savedScroll?: { x: number; y: number; }; targetSelector?: string | null; targetOutletIndex?: number | null; swapMode?: string; currentHead?: boolean; historyFragment?: HTMLElement; historyEntryId?: string | null; scrollSourceEntryId?: string | null; } interface Snapshot { html: string; fullDocument: boolean; } export declare function onBeforeNavigate(callback: NavigationHook): () => void; export declare function onAfterNavigate(callback: NavigationHook): () => void; export declare function onBeforeSwap(callback: NavigationHook): () => void; export declare function onNavigationEnd(callback: (context: NavigationContext) => void): () => void; export declare function startRouter(options?: RouterOptions): void; declare function saveSnapshot(url: string, html: string): void; declare function navigate(opts: NavigateOptions): Promise; declare function resetRouterState(): void; export declare const __routerTest: { navigate: typeof navigate; saveSnapshot: typeof saveSnapshot; snapshots: Map; preloadCache: Map>; resetRouterState: typeof resetRouterState; }; export {}; //# sourceMappingURL=router.d.ts.map