import { DiscoveredRoute, ParsedRouteSegment, DiscoveryConfig } from './types'; /** * Parse a filename or directory name into a route segment * @see core/segment-parser.ts for implementation details */ export declare function parseRouteSegment(filename: string): ParsedRouteSegment; /** * Convert parsed segments to URL path * @see core/segment-parser.ts for implementation details */ export declare function segmentsToUrlPath(segments: readonly ParsedRouteSegment[]): string; /** * Parse a full directory path into route segments * @see core/segment-parser.ts for implementation details */ export declare function parseDirectoryPath(dirPath: string, filename: string): readonly ParsedRouteSegment[]; /** * Scan a directory for route files (Node.js environment only - for build time) * * Note: This function uses dynamic imports for Node.js modules * and should only be called in build context (Vite plugin) */ export declare function scanRouteFiles(rootDir: string, config: DiscoveryConfig): Promise; /** * Scan routes with caching support */ export declare function scanRouteFilesCached(rootDir: string, config: DiscoveryConfig, maxAge?: number): Promise; /** * Clear the route cache */ export declare function clearRouteCache(): void; /** * Invalidate cache for a specific root directory */ export declare function invalidateCache(rootDir: string): void; /** * Extract parameter names from a URL path pattern * @see core/path-utils.ts for implementation details */ export declare function extractParamNames(path: string): string[]; /** * Check if a path has dynamic segments * @see core/path-utils.ts for implementation details */ export declare function hasDynamicSegments(path: string): boolean; /** * Get the static prefix of a path (before first dynamic segment) * @see core/path-utils.ts for implementation details */ export declare function getStaticPrefix(path: string): string; /** * Generate a route ID from a discovered route * @see core/segment-parser.ts for implementation details */ export declare function generateRouteId(route: DiscoveredRoute): string; /** * Generate a display name from a discovered route * @see core/segment-parser.ts for implementation details */ export declare function generateDisplayName(route: DiscoveredRoute): string; /** * Options for parallel scanning */ export interface ParallelScanOptions { /** Maximum concurrent directory scans */ maxConcurrency?: number; /** Timeout per directory scan (ms) */ scanTimeout?: number; /** Enable progress reporting */ onProgress?: (progress: ScanProgress) => void; } /** * Scan progress information */ export interface ScanProgress { /** Total directories found */ totalDirs: number; /** Directories scanned */ scannedDirs: number; /** Routes discovered so far */ routesFound: number; /** Current directory being scanned */ currentDir: string; /** Elapsed time (ms) */ elapsedMs: number; } /** * Scan route files with parallel processing for large codebases */ export declare function scanRouteFilesParallel(rootDir: string, config: DiscoveryConfig, options?: ParallelScanOptions): Promise; /** * File change event for incremental scanning */ export interface FileChangeEvent { type: 'add' | 'unlink' | 'change'; filePath: string; } /** * Result of incremental scan */ export interface IncrementalScanResult { /** Routes added */ added: DiscoveredRoute[]; /** Routes removed */ removed: DiscoveredRoute[]; /** Routes modified */ modified: DiscoveredRoute[]; /** Whether a full rescan is needed */ requiresFullRescan: boolean; } /** * Apply incremental file changes to cached routes */ export declare function applyIncrementalChanges(cachedRoutes: DiscoveredRoute[], changes: FileChangeEvent[], config: DiscoveryConfig): IncrementalScanResult; /** * Calculate discovery statistics for routes */ export declare function calculateDiscoveryStats(routes: DiscoveredRoute[], scanDurationMs: number, filesScanned: number, filesIgnored: number): import('./types').RouteDiscoveryStats; /** * Build a layout tree from discovered routes */ export declare function buildLayoutTree(routes: DiscoveredRoute[]): import('./types').RouteLayoutTree;