/** * @jorvel/types — File-based routing compiler (phase-0 foundation). * * The CLI currently implements route scanning directly. * This module formalizes the contract so we can: * - swap compilers (React Router, TanStack Router, etc.) * - add validation (duplicates/conflicts) * - support non-React runtimes */ export type JorvelPageRoute = { /** Route pathname relative to app base, e.g. "/" or "/reports/:id" */ path: string; /** Source file path, relative to app root */ file: string; }; export type JorvelRoutesManifest = { app: string; basePath: string; routes: JorvelPageRoute[]; }; export type JorvelHostRoutesManifest = { host: string; routes: Array<{ path: string; remote: string; module: string; }>; }; export type JorvelRoutingCompiler = { /** * Convert a page file (relative to `src/pages/`) into a route path. * * Example: * - index.tsx -> / * - users/[id].tsx -> /users/:id * - docs/[...slug].tsx -> /docs/* */ routeFromPageFile(relFromPages: string): string; /** Sort routes by matching priority (most specific first). */ sortRoutesForMatching(routes: JorvelPageRoute[]): JorvelPageRoute[]; }; export declare const defaultRoutingCompiler: JorvelRoutingCompiler; //# sourceMappingURL=routing-compiler.d.ts.map