import { Route, RouterOptions } from './types.js'; /** * Match a route pattern against a pathname. * Returns extracted params if matched, null if not. * Supports `:param` segments and `*` wildcard. */ export declare function matchRoute(pattern: string, pathname: string): Record | null; /** Reactive getter for the current pathname. Subscribes caller to path changes. */ export declare const currentPath: () => string; /** * Reactive getter for current route params. * Reading params() inside a component render auto-subscribes to route changes. */ export declare const params: () => Record; /** * Reactive getter for current URL query string as a key-value map. * Reading query() inside a component render auto-subscribes to route changes. */ export declare const query: () => Record; /** * Programmatic navigation. Pushes to browser history and updates path signal. * No-op during SSR. */ export declare function navigate(to: string): void; /** * Declarative navigation link. Renders an that calls navigate() on click. * Prevents full page reload. * Props: href (required), class?, and any other valid attributes. */ export declare function Link(props: Record): Element; /** * Create a router component from a list of routes. * Returns a component factory compatible with createApp().mount(). * * Routes are matched top-to-bottom. Use `*` as the last route for 404. * * @example * const App = createRouter([ * { path: '/', component: Home }, * { path: '/blog/:slug', component: BlogPost }, * { path: '*', component: NotFound }, * ]); * createApp('#root').mount(App); */ export declare function createRouter(routes: Route[], options?: RouterOptions): () => Element;