/**
* Static handler definition for build-time rendering of individual segments.
*
* Static wraps a handler so that in production the segment is
* rendered once at build time. The handler is then replaced with a static
* asset import -- no runtime store lookup needed.
*
* In dev mode, Static behaves as a normal handler: the wrapped
* function runs on every request, identical to a regular layout/path handler.
*
* The $$id is auto-generated by the Vite exposeInternalIds plugin based on
* file path and export name. No manual naming required.
*
* Key difference from Prerender:
* - Prerender: route-scoped, produces URLs via getParams, renders subtree per-params
* - Static: segment-scoped, renders once, no URLs, no params
*
* Works on: layout(), parallel(), and path().
*
* @example
* ```ts
* export const DocsNav = Static((ctx) => );
* export const DocShell = Static((ctx) => );
*
* urls(({ path, layout }) => [
* layout(DocsNav, () => [
* path("/getting-started", DocShell, { name: "doc.gs" }),
* path("/:slug", Prerender(getParams, DocPageHandler)),
* ]),
* ]);
* ```
*/
import type { ReactNode } from "react";
import type { Handler, HandlerContext } from "./types.js";
import type { PrerenderOptions } from "./prerender.js";
export interface StaticHandlerDefinition = any> {
readonly __brand: "staticHandler";
/** Auto-generated unique ID (injected by Vite plugin). */
$$id: string;
/** In dev mode, the actual handler function that layout/path/parallel can call. */
handler: Handler;
/** Static handler options (passthrough support). */
options?: PrerenderOptions;
}
export declare function Static = {}>(handler: (ctx: HandlerContext) => ReactNode | Promise, options?: PrerenderOptions, __injectedId?: string): StaticHandlerDefinition;
/**
* Type guard to check if a value is a StaticHandlerDefinition.
*/
export declare function isStaticHandler(value: unknown): value is StaticHandlerDefinition;
//# sourceMappingURL=static-handler.d.ts.map