import { ModuleFilePath, SourcePath } from "@valbuild/core"; export type PageNode = { type: "leaf"; name: string; fullPath?: string; moduleFilePath: ModuleFilePath; sourcePath: SourcePath | ModuleFilePath; pattern?: string; children: (SitemapNode | PageNode)[]; }; export type SitemapNode = { type: "node"; name: string; page?: { /** If a page is present this is a folder that is also a page */ fullPath: string; }; /** If a pattern is present you can add new children to this node */ pattern?: string; /** Means that there is only one child essentially */ isLinear?: true; children: (SitemapNode | PageNode)[]; moduleFilePath?: ModuleFilePath; sourcePath?: SourcePath | ModuleFilePath; }; export declare function getPageRouterSitemapTree(srcFolder: string, paths: { urlPath: string; moduleFilePath: string; }[]): SitemapNode; /** * The route pattern a page-router module serves, e.g. `/blogs/[blog]`. * * Written in Next's vocabulary for both routers on purpose: the pattern is read * by `parseRoutePattern`, the sitemap and the Studio's key inputs, none of which * should have to know which framework the project uses. The TanStack branch * translates that framework's conventions into it; see * `tanStackSegmentsOfRoutePath` in `@valbuild/core` for the rules. */ export declare function getPatternFromModuleFilePath(moduleFilePath: string, srcFolder: string): string;