interface RouteLocationNormalized { fullPath: string; hash: string; matched: unknown[]; meta: Record; name: string | symbol | null | undefined; params: Record; path: string; query: Record; redirectedFrom?: RouteLocationNormalized; } interface Router { beforeResolve(guard: NavigationGuard): () => void; afterEach(guard: NavigationHookAfter): () => void; onError(handler: (error: unknown) => void): () => void; } type NavigationGuard = (to: RouteLocationNormalized, from: RouteLocationNormalized) => Promise | void; type NavigationHookAfter = (to: RouteLocationNormalized, from: RouteLocationNormalized) => void; type ShouldTransition = (to: RouteLocationNormalized, from: RouteLocationNormalized) => boolean; interface Options { shouldTransition?: ShouldTransition; } /** * Wraps route navigations in the View Transitions API. * * Returns a disposer; a no-op when the API is unavailable. Calls for the same * router share one registration, removed once every caller has disposed. * * @param router Router instance to attach the guards to. * @param options.shouldTransition Called with `(to, from)`; returning `false` skips the transition. * @returns A function that removes the guards. */ export declare function useViewTransition(router: Router, options?: Options): () => void; export {};