import { n as Principal, r as Session } from "./context-Ewez0LPe.js"; import React from "react"; //#region src/route.d.ts type RenderTarget = "view" | "json" | "md" | "fragment"; type Metadata = { title?: string; description?: string; canonical?: string; robots?: string; openGraph?: { title?: string; description?: string; image?: string; imageAlt?: string; imageWidth?: number; imageHeight?: number; type?: string; }; twitter?: { card?: "summary" | "summary_large_image"; creator?: string; }; breadcrumb?: false | Array<{ name: string; path: string; }>; }; type RouteContext = Record> = { request: Request; url: URL; params: TParams; target: RenderTarget; locale?: string; speculative?: boolean; user?: Principal; session?: Session; }; type RouteCache = { ttl?: number; swr?: number; tags?: string[]; }; type RouteDefinition = { load?: (ctx: RouteContext) => TData | Promise; view?: (data: TData, ctx: RouteContext) => React.ReactNode; json?: ((data: TData, ctx: RouteContext) => unknown | Promise) | false; md?: ((data: TData, ctx: RouteContext) => string | Promise) | false; cache?: RouteCache; prerender?: boolean; staticPaths?: string[] | (() => string[] | Promise); metadata?: Metadata | ((data: TData, ctx: RouteContext) => Metadata); llms?: LlmsDeclaration; }; type LlmsEntry = { path?: string; title?: string; description?: string; section?: string; optional?: boolean; lastModified?: string | Date; }; type LlmsDeclaration = false | LlmsEntry | LlmsEntry[] | (() => LlmsEntry | LlmsEntry[] | Promise); declare const ROUTE_BRAND: unique symbol; type BrandedRoute = RouteDefinition & { [ROUTE_BRAND]: true; }; declare function route(def: RouteDefinition): BrandedRoute; declare function isRouteDefinition(value: unknown): value is BrandedRoute; type Loaded unknown> = Awaited>; declare const LoaderDataContext: React.Context; declare function useLoaderData unknown = () => unknown>(): Loaded; type PageModule = { default?: React.ComponentType>; loader?: (ctx: RouteContext) => unknown; json?: ((data: unknown, ctx: RouteContext) => unknown) | false; md?: ((data: unknown, ctx: RouteContext) => string | Promise) | false; metadata?: Metadata | ((data: unknown, ctx: RouteContext) => Metadata); cache?: RouteCache; prerender?: boolean; staticPaths?: string[] | (() => string[] | Promise); llms?: LlmsDeclaration; }; declare function routeFromModule(mod: unknown): BrandedRoute | null; declare function resolveProjection(def: BrandedRoute, requested: RenderTarget): RenderTarget; //#endregion export { LoaderDataContext as a, RenderTarget as c, RouteDefinition as d, isRouteDefinition as f, useLoaderData as g, routeFromModule as h, Loaded as i, RouteCache as l, route as m, LlmsDeclaration as n, Metadata as o, resolveProjection as p, LlmsEntry as r, PageModule as s, BrandedRoute as t, RouteContext as u };