import type { AnimationPreset } from "../actions/animateTypes"; import type { ComponentType } from "../Template/x-x.types"; import { type RouterScrollOption } from "./scrollOutlet"; export interface AnimatedRouteConfig { path: string; component: ComponentType; props?: Record; enter?: AnimationPreset; exit?: AnimationPreset; } export interface AnimatedRouterOptions { notFound?: ComponentType; enter?: AnimationPreset; exit?: AnimationPreset; /** * Scroll this router's outlet into view when `patternsAtom` changes. * - `true` / omitted — enabled (default) * - `false` — opt out * - `ScrollIntoViewOptions` — enabled with custom options */ scroll?: RouterScrollOption; } export { animateContainer, nextFrame } from "../actions/animateSwap"; /** * Animated client-side router with exit → swap → enter transitions. * * **Only one** {@link Router} or {@link animatedRouter} may be mounted per * app/scope. Nest screens with conditionals on `paramsAtom` / `qsAtom` / * `pathAtom` — do not nest routers. * * Matches the current URL (`pathAtom`) against `routes` in order and renders * the first match. When the matched route changes, the old component plays * its exit animation, the new component is mounted, and the enter animation * plays. * * ### Scroll behaviour * * By default, scrolls the outlet into view when **`patternsAtom` changes** * (different matched pattern). Param-only updates keep the same pattern, so * they do not scroll. Opt out with `{ scroll: false }`. * * @param routes - Ordered array of `{ path, component, enter?, exit? }`. * @param options - Global enter/exit presets, notFound, and scroll. */ export declare function animatedRouter(routes: AnimatedRouteConfig[], options?: AnimatedRouterOptions): import("lit-html").TemplateResult<1>; //# sourceMappingURL=animatedRouter.d.ts.map