/** * Mapa de rutas con tipos de params. Vacío por default. * El consumidor lo extiende vía declaration merging desde `.arckode/routes.d.ts` * (generado automático por `ark stubs`). */ export interface RouteMap { } export type RoutePath = keyof RouteMap & string; export interface RouteDefinition { /** URL path, e.g. '/users/:id' */ path: string; /** Relative file path, e.g. 'src/pages/users/[id].ark' */ filePath: string; /** Dynamic param names extracted from the path, e.g. ['id'] */ params: string[]; /** true when the file is _layout.ark */ isLayout: boolean; /** true when the file is _error.ark */ isError: boolean; /** filePath of the _layout.ark that wraps this route, if any */ layoutPath?: string; } export type RouteRef = RouteDefinition; export interface Router { match(path: string): { route: RouteDefinition; params: Record; } | null; navigate(path: string): void; } export declare const _pathSignal: import('..').Signal; export declare const _paramsSignal: import('..').Signal>; export declare const _querySignal: import('..').Signal>; export declare let _globalRouter: Router | null; export declare function getCurrentPath(): string; /** Reset module state between tests. Not part of the public API. */ export declare function _resetRouterState(): void; /** * Match a concrete URL path against a route pattern. * Returns extracted params or null if no match. */ export declare function matchPath(pattern: string, actual: string): Record | null; export declare function createRouter(routes: RouteDefinition[]): Router; /** * Navegación. Si el consumidor extendió RouteMap (vía `.arckode/routes.d.ts` * generado por `ark stubs`), el primer overload da autocomplete + params tipados. * Sino cae al overload string genérico. */ export declare function navigateTo

(path: P, params: RouteMap[P]): void; export declare function navigateTo(urlPath: string): void; /** * Typed navigate. Builds the URL from a RouteRef + param values. */ export declare function navigate(routeDef: RouteRef, params?: Record): void; export interface RouteInfo { params: Record; query: Record; path: string; } /** * Returns current route info — reactive when called inside computed(). * params: extracted from the URL by the router (e.g. { id: '42' } for /users/:id). * Always call inside computed() for reactivity: computed(() => useRoute().params.id) */ export declare function useRoute(): RouteInfo; //# sourceMappingURL=router.d.ts.map