/** A page route discovered by the scanner. */ export interface PageRoute { /** URL path, e.g. "/blog/:slug". */ path: string; /** File system path to the page.ts module. */ pagePath: string; /** File system path to the page.data.ts module, if any. */ dataPath?: string; /** File system path to the page.action.ts module, if any. */ actionPath?: string; /** Ordered list of layout.ts modules from root to leaf. */ layouts: string[]; /** File system path to the loading.ts module, if any. */ loadingPath?: string; /** Dynamic parameter names extracted from the path. */ params: string[]; /** Whether the route has an optional catch-all segment. */ optionalCatchAll?: boolean; /** * Named slot modules discovered in the same directory as the page. * Keyed by slot name (filename without `.slot.ts` suffix). * (v2.1 — Fix #2: Layout Slots) */ slots?: Record; } /** An API route discovered by the scanner. */ export interface ApiRoute { /** URL path, e.g. "/api/posts". */ path: string; /** File system path to the route.ts module. */ routePath: string; /** Dynamic parameter names extracted from the path. */ params: string[]; } /** Result of scanning the app directory. */ export interface ScannedRoutes { pages: PageRoute[]; api: ApiRoute[]; /** Optional 404 error page. */ error404?: PageRoute; /** Optional 500 error page. */ error500?: PageRoute; } /** * Scans an app directory for Nix.js Kit file-based routes. * * @param appDir Absolute path to the app directory (e.g. "src/app"). * @returns Discovered page and API routes. */ export declare function scanRoutes(appDir: string): Promise;