/** * Dynamic route patterns stored as database keys, e.g. `/jedi/:id`, `/starships/:id`, `/test/:a/:b`. * Static segments must match exactly; `:param` segments capture any single path segment. */ export declare function normalizeRoutePath(path: string): string; /** Public page URL for navigation (e.g. structure “View”). */ export declare function publicPagePathHref(routePath: string): string; /** * P1 editor URL for a stored route. Maps to `/p1/`. */ export declare function editorPathHref(routePath: string): string; /** * Build the storage path from Next.js `[...catchAll]` segments. Each segment is URI-decoded * so template keys like `/jedi/:id` work when the URL contains encoded colons (`%3A`). */ export declare function pagePathFromCatchAllSegments(segments: string[] | undefined): string; /** True if the path is a template (at least one `:param` segment). */ export declare function isRouteTemplatePath(path: string): boolean; export declare function pathSegments(path: string): string[]; /** * Example concrete path for a template (each `:param` segment becomes `1`), for structure UI defaults. */ export declare function defaultInstancePathFromTemplate(templatePath: string): string; /** * If `concrete` matches `template`, returns captured params. Otherwise null. */ export declare function matchConcretePathToTemplateParams(concretePath: string, templatePath: string): Record | null; /** Keys that look like collection templates (`:param` segments). */ export declare function listRouteTemplateKeys(allDatabaseKeys: string[]): string[]; /** * If `concretePath` is an instance of a known template, returns that template's storage key. * Returns null when `concretePath` is itself the template row or does not match any template. */ export declare function pickTemplateSourcePath(concretePath: string, templateKeys: string[]): string | null; export declare function resolveTemplateMatch(concretePath: string, templateKeys: string[]): { templateKey: string; params: Record; } | null; /** True when this path is a template row stored in the database (canonical layout). */ export declare function isCanonicalTemplatePath(path: string, templateKeys: string[]): boolean; /** Parameter names declared on a template path, in order. */ export declare function templatePathParamNames(templatePath: string): string[];