import type { RouteManifestEntry } from "./manifest.ts"; import { BaseFileSystemRouter, type FileSystemRouterConfig } from "./router.ts"; /** * The filename convention proven by SolidStart: * - `index` files map to their directory's path * - `[param]` maps to `:param` * - `[[param]]` maps to an optional `:param?` * - `[...rest]` maps to a catch-all `*rest` * - `(group)` segments are retained for emission adapters to nest and strip */ export declare function routePathFromFile(routeFile: string): string; /** * The HTTP methods a route module may export as a request handler. Enabled * per-router via `httpMethods`; frameworks that do not serve requests from * route modules (a client manifest, a static site) leave it off. */ export declare const HTTP_METHODS: readonly ["HEAD", "GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"]; export interface PageFileSystemRouterConfig extends FileSystemRouterConfig { /** * Emit `$component` refs for pages. Set to `false` for manifests that * route without rendering — a server manifest in SPA mode, where the * client owns every component — so page modules stay out of that bundle. * Defaults to `true`. */ components?: boolean; /** * Treat these uppercase exports as request handlers, emitting a `$GET`, * `$POST`, … ref for each (and a `$HEAD` alias for a lone `GET`). A module * with handlers but no default export is a route without being a page. * Pass `true` for the standard set. Defaults to `false`. */ httpMethods?: boolean | readonly string[]; } /** * The module convention proven by SolidStart: a route module is a page when * it has a default export, may export a `route` config object, and — when * `httpMethods` is on — may export `GET`, `POST`, … request handlers. * `.md`/`.mdx` files are always pages. */ export declare class PageFileSystemRouter extends BaseFileSystemRouter { config: PageFileSystemRouterConfig; constructor(config: PageFileSystemRouterConfig); toPath(src: string): string | undefined; toRoute(src: string): RouteManifestEntry | undefined; }