import type { RouteManifestEntry } from "./manifest.ts"; /** * Nesting and group-stripping for the neutral route manifest. * * This module is deliberately free of Node and bundler imports: delivery * adapters run it at build time (the Vite adapter serializes the resulting * tree into the virtual module), and runtime consumers that receive only a * flat manifest can run it themselves. */ export interface RouteTreeEntry extends RouteManifestEntry { /** The manifest path this node was nested under, group segments included. */ id: string; children?: RouteTreeEntry[]; } /** Removes `(group)` segments from a route path: `/(app)/home` → `/home`. */ export declare function stripRouteGroups(path: string): string; /** * Nests a flat manifest by path prefix and strips `(group)` segments, so * `/(app)/dashboard` renders at `/dashboard` inside the `/(app)` layout. * * Nested entries keep the path *relative to their parent*, which is what * nested routers expect. Pass only the entries that participate in the tree * (typically `entries.filter(entry => entry.page)`); the input is not * mutated. */ export declare function buildRouteTree(entries: readonly RouteManifestEntry[]): RouteTreeEntry[];