@nifrajs/cli 5.9.0 → 5.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -0
- package/dist/check-diagnostics.d.ts +1 -0
- package/dist/check-diagnostics.d.ts.map +1 -1
- package/dist/check-diagnostics.js +4 -0
- package/dist/check-diagnostics.js.map +1 -1
- package/dist/check-scan.d.ts +1 -0
- package/dist/check-scan.d.ts.map +1 -1
- package/dist/check-scan.js +8 -1
- package/dist/check-scan.js.map +1 -1
- package/dist/check.d.ts.map +1 -1
- package/dist/check.js +7 -2
- package/dist/check.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +12 -8
- package/dist/cli.js.map +1 -1
- package/dist/command-catalog.d.ts +1 -5
- package/dist/command-catalog.d.ts.map +1 -1
- package/dist/command-catalog.js +2 -21
- package/dist/command-catalog.js.map +1 -1
- package/dist/internal/source-facts.d.ts +30 -0
- package/dist/internal/source-facts.d.ts.map +1 -1
- package/dist/internal/source-facts.js +127 -0
- package/dist/internal/source-facts.js.map +1 -1
- package/dist/load.d.ts +2 -0
- package/dist/load.d.ts.map +1 -1
- package/dist/load.js +5 -0
- package/dist/load.js.map +1 -1
- package/dist/mcp-http.js +1 -1
- package/dist/mcp-http.js.map +1 -1
- package/dist/mcp-tool-meta.d.ts.map +1 -1
- package/dist/mcp-tool-meta.js +0 -1
- package/dist/mcp-tool-meta.js.map +1 -1
- package/dist/recipes/5.10.0.d.ts +12 -0
- package/dist/recipes/5.10.0.d.ts.map +1 -0
- package/dist/recipes/5.10.0.js +44 -0
- package/dist/recipes/5.10.0.js.map +1 -0
- package/dist/recipes/index.d.ts.map +1 -1
- package/dist/recipes/index.js +2 -0
- package/dist/recipes/index.js.map +1 -1
- package/dist/review.d.ts.map +1 -1
- package/dist/review.js +3 -0
- package/dist/review.js.map +1 -1
- package/dist/rules/codes.d.ts +3 -0
- package/dist/rules/codes.d.ts.map +1 -1
- package/dist/rules/codes.js +3 -0
- package/dist/rules/codes.js.map +1 -1
- package/dist/rules/explanations.d.ts.map +1 -1
- package/dist/rules/explanations.js +15 -0
- package/dist/rules/explanations.js.map +1 -1
- package/dist/rules/internal-links.d.ts +5 -0
- package/dist/rules/internal-links.d.ts.map +1 -0
- package/dist/rules/internal-links.js +418 -0
- package/dist/rules/internal-links.js.map +1 -0
- package/dist/rules/legacy.d.ts.map +1 -1
- package/dist/rules/legacy.js +20 -0
- package/dist/rules/legacy.js.map +1 -1
- package/dist/rules/server-fn-namespace.d.ts +8 -0
- package/dist/rules/server-fn-namespace.d.ts.map +1 -0
- package/dist/rules/server-fn-namespace.js +43 -0
- package/dist/rules/server-fn-namespace.js.map +1 -0
- package/dist/rules/source-scan.d.ts +29 -0
- package/dist/rules/source-scan.d.ts.map +1 -0
- package/dist/rules/source-scan.js +38 -0
- package/dist/rules/source-scan.js.map +1 -0
- package/dist/rules/text-slot-boolean.d.ts.map +1 -1
- package/dist/rules/text-slot-boolean.js +21 -43
- package/dist/rules/text-slot-boolean.js.map +1 -1
- package/dist/source-rewrites.d.ts.map +1 -1
- package/dist/source-rewrites.js +118 -3
- package/dist/source-rewrites.js.map +1 -1
- package/dist/typecheck-coverage.d.ts +9 -0
- package/dist/typecheck-coverage.d.ts.map +1 -1
- package/dist/typecheck-coverage.js +16 -0
- package/dist/typecheck-coverage.js.map +1 -1
- package/docs/examples.json +19 -7
- package/docs/llms-full.txt +555 -200
- package/docs/types.json +560 -115
- package/package.json +11 -11
- package/src/check-diagnostics.ts +5 -0
- package/src/check-scan.ts +9 -1
- package/src/check.ts +15 -3
- package/src/cli.ts +16 -8
- package/src/command-catalog.ts +2 -26
- package/src/internal/source-facts.ts +155 -0
- package/src/load.ts +9 -0
- package/src/mcp-http.ts +1 -1
- package/src/mcp-tool-meta.ts +0 -1
- package/src/recipes/5.10.0.ts +45 -0
- package/src/recipes/index.ts +2 -0
- package/src/review.ts +3 -0
- package/src/rules/codes.ts +3 -0
- package/src/rules/explanations.ts +15 -0
- package/src/rules/internal-links.ts +490 -0
- package/src/rules/legacy.ts +21 -0
- package/src/rules/server-fn-namespace.ts +47 -0
- package/src/rules/source-scan.ts +66 -0
- package/src/rules/text-slot-boolean.ts +26 -42
- package/src/source-rewrites.ts +133 -4
- package/src/typecheck-coverage.ts +23 -0
- package/dist/sync-routes.d.ts +0 -29
- package/dist/sync-routes.d.ts.map +0 -1
- package/dist/sync-routes.js +0 -56
- package/dist/sync-routes.js.map +0 -1
- package/src/sync-routes.ts +0 -70
package/docs/types.json
CHANGED
|
@@ -2375,7 +2375,7 @@
|
|
|
2375
2375
|
"name": "BuildTargetOptions",
|
|
2376
2376
|
"kind": "interface",
|
|
2377
2377
|
"package": "@nifrajs/web",
|
|
2378
|
-
"signature": "export interface BuildTargetOptions {\n /** The `routes/` directory to discover (absolute path). */\n readonly routesDir: string;\n /** Output directory for the assembled deploy dir (absolute path). Cleared and recreated, so the\n * build refuses one that is a filesystem root or is or contains the routes directory, the public\n * directory, an absolute entry module, or the working directory. */\n readonly outDir: string;\n /** A scratch directory for intermediate codegen (the generated server entry + manifest) and the\n * server bundle, cleaned up after. Absolute path. Checked the same way as `outDir`. */\n readonly workDir: string;\n /** The adapter's client runtime module (exports `mountRouter`), e.g. `\"@nifrajs/web-react/client\"`. */\n readonly clientModule: string;\n /** Import specifier (resolvable from `workDir`) of the module exporting `adapter`. */\n readonly adapterImport: string;\n /** Import specifier (resolvable from `workDir`) of the module exporting `backend`, or `undefined`. */\n readonly backendImport?: string;\n /** Import specifier (resolvable from `workDir`) of the module exporting `use` (app-level middleware\n * applied before page routes are declared), or `undefined`. Must resolve to the same edge-safe\n * module as `adapterImport`. */\n readonly useImport?: string;\n /** `createWebApp` options the server entry imports by name (`apiPrefix`, `mounts`, `csp`, ...), each\n * mapped to the specifier (resolvable from `workDir`) of the same edge-safe module as `adapterImport`. */\n readonly optionImports?: ServerEntryOptionImports;\n /** Factory that builds the app for `static` prerendering, GIVEN the client build's manifest - so the\n * emitted hydration `<script src>` uses the REAL content-hashed entry (`client.entry`) plus the same\n * styles/route-preload the server targets use. A pre-built instance can't work here: the hash isn't known\n * until `buildClient` runs inside `buildTarget`, so a hardcoded entry 404s → pages render but never\n * hydrate. Required for `target: \"static\"` (SSG drives `app.fetch`). For `bun` and `node` it is\n * optional: given, the opted-in routes are prerendered into `_prerendered/` and the server answers\n * them from their file; the other targets ignore it. */\n readonly prerenderApp?: (client: BuildManifest) => PrerenderAppLike | Promise<PrerenderAppLike>;\n /** Client-build plugins (e.g. the MDX/Vue/Solid Bun plugins). */\n readonly clientPlugins?: readonly BunPlugin[];\n /** Server-build plugins (e.g. the SSR variants). */\n readonly serverPlugins?: readonly BunPlugin[];\n /** Extra Bun.build resolve conditions for the CLIENT build. */\n readonly conditions?: readonly string[];\n /** Compile-time `define` replacements layered onto both builds. */\n readonly define?: Readonly<Record<string, string>>;\n /** Project-root static directory copied to deploy root. `false` disables it. */\n readonly publicDir?: string | false;\n /** Prefix of environment variables allowed into the client bundle (default `\"PUBLIC_\"`). */\n readonly publicEnvPrefix?: string;\n /** Reviewed false positives of the secret scan over the bundle, `public/` and prerendered pages. */\n readonly secretExemptions?: readonly SecretExemption[];\n /**\n * Vite-only CSS output policy. `false` emits one aggregate stylesheet. The native Bun build does not\n * support this switch and fails closed if it is supplied instead of silently ignoring it.\n */\n readonly cssCodeSplit?: boolean;\n /**\n * Activation policy for framework-owned SSR stylesheet links. Defaults to `\"blocking\"`; `\"deferred\"`\n * fetches with `media=\"print\"` and promotes before hydration. With Vite, pair it with\n * `cssCodeSplit: false`; the native Bun build supports the activation policy but keeps its existing\n * CSS output strategy.\n */\n readonly cssLoading?: CssLoadingMode;\n /** Document `<title>` for the generated server entry. */\n readonly title?: string;\n /** Trust the edge platform's client-address header for `c.clientIp` (`cloudflare`, `vercel`). Off by\n * default, leaving an edge app with no caller address. See {@link ServerEntryClientIp}. */\n readonly clientIp?: ServerEntryClientIp;\n /** How a `bun`, `node` or `deno` server stops and keeps idle connections. See\n * {@link ServerEntrySelfHost}. */\n readonly selfHost?: ServerEntrySelfHost;\n /** The client entry for a server built with `optionImports.live`: that runtime's `clientEntry`. */\n readonly live?: LiveClientEntry | undefined;\n}"
|
|
2378
|
+
"signature": "export interface BuildTargetOptions {\n /** Vercel-only: opt into Node.js 22 serverless SSR instead of the default Edge function. */\n readonly vercelRuntime?: VercelRuntime;\n /** The `routes/` directory to discover (absolute path). */\n readonly routesDir: string;\n /** Output directory for the assembled deploy dir (absolute path). Cleared and recreated, so the\n * build refuses one that is a filesystem root or is or contains the routes directory, the public\n * directory, an absolute entry module, or the working directory. */\n readonly outDir: string;\n /** A scratch directory for intermediate codegen (the generated server entry + manifest) and the\n * server bundle, cleaned up after. Absolute path. Checked the same way as `outDir`. */\n readonly workDir: string;\n /** The adapter's client runtime module (exports `mountRouter`), e.g. `\"@nifrajs/web-react/client\"`. */\n readonly clientModule: string;\n /** Import specifier (resolvable from `workDir`) of the module exporting `adapter`. */\n readonly adapterImport: string;\n /** Import specifier (resolvable from `workDir`) of the module exporting `backend`, or `undefined`. */\n readonly backendImport?: string;\n /** Import specifier (resolvable from `workDir`) of the module exporting `use` (app-level middleware\n * applied before page routes are declared), or `undefined`. Must resolve to the same edge-safe\n * module as `adapterImport`. */\n readonly useImport?: string;\n /** `createWebApp` options the server entry imports by name (`apiPrefix`, `mounts`, `csp`, ...), each\n * mapped to the specifier (resolvable from `workDir`) of the same edge-safe module as `adapterImport`. */\n readonly optionImports?: ServerEntryOptionImports;\n /** Factory that builds the app for `static` prerendering, GIVEN the client build's manifest - so the\n * emitted hydration `<script src>` uses the REAL content-hashed entry (`client.entry`) plus the same\n * styles/route-preload the server targets use. A pre-built instance can't work here: the hash isn't known\n * until `buildClient` runs inside `buildTarget`, so a hardcoded entry 404s → pages render but never\n * hydrate. Required for `target: \"static\"` (SSG drives `app.fetch`). For `bun` and `node` it is\n * optional: given, the opted-in routes are prerendered into `_prerendered/` and the server answers\n * them from their file; the other targets ignore it. */\n readonly prerenderApp?: (client: BuildManifest) => PrerenderAppLike | Promise<PrerenderAppLike>;\n /** Client-build plugins (e.g. the MDX/Vue/Solid Bun plugins). */\n readonly clientPlugins?: readonly BunPlugin[];\n /** Server-build plugins (e.g. the SSR variants). */\n readonly serverPlugins?: readonly BunPlugin[];\n /** Extra Bun.build resolve conditions for the CLIENT build. */\n readonly conditions?: readonly string[];\n /** Compile-time `define` replacements layered onto both builds. */\n readonly define?: Readonly<Record<string, string>>;\n /** Project-root static directory copied to deploy root. `false` disables it. */\n readonly publicDir?: string | false;\n /** Prefix of environment variables allowed into the client bundle (default `\"PUBLIC_\"`). */\n readonly publicEnvPrefix?: string;\n /** Reviewed false positives of the secret scan over the bundle, `public/` and prerendered pages. */\n readonly secretExemptions?: readonly SecretExemption[];\n /**\n * Vite-only CSS output policy. `false` emits one aggregate stylesheet. The native Bun build does not\n * support this switch and fails closed if it is supplied instead of silently ignoring it.\n */\n readonly cssCodeSplit?: boolean;\n /**\n * Activation policy for framework-owned SSR stylesheet links. Defaults to `\"blocking\"`; `\"deferred\"`\n * fetches with `media=\"print\"` and promotes before hydration. With Vite, pair it with\n * `cssCodeSplit: false`; the native Bun build supports the activation policy but keeps its existing\n * CSS output strategy.\n */\n readonly cssLoading?: CssLoadingMode;\n /** Document `<title>` for the generated server entry. */\n readonly title?: string;\n /** Trust the edge platform's client-address header for `c.clientIp` (`cloudflare`, `vercel`). Off by\n * default, leaving an edge app with no caller address. See {@link ServerEntryClientIp}. */\n readonly clientIp?: ServerEntryClientIp;\n /** How a `bun`, `node` or `deno` server stops and keeps idle connections. See\n * {@link ServerEntrySelfHost}. */\n readonly selfHost?: ServerEntrySelfHost;\n /** The client entry for a server built with `optionImports.live`: that runtime's `clientEntry`. */\n readonly live?: LiveClientEntry | undefined;\n}"
|
|
2379
2379
|
},
|
|
2380
2380
|
{
|
|
2381
2381
|
"name": "BuildTargetPlan",
|
|
@@ -4264,12 +4264,33 @@
|
|
|
4264
4264
|
"package": "@nifrajs/web",
|
|
4265
4265
|
"signature": "export interface CreateCspPolicyOptions {\n /**\n * Build the complete Content-Security-Policy value for one document, or `undefined` to send none:\n *\n * ```ts\n * header: ({ sources }) => `default-src 'self'; script-src 'self' ${sources}; object-src 'none'`\n * ```\n */\n readonly header: (context: CspHeaderContext) => string | undefined;\n /** Generate the nonce for a document that needs one. Default: 122 random bits, CSP base64-safe. */\n readonly generate?: () => string;\n}"
|
|
4266
4266
|
},
|
|
4267
|
+
{
|
|
4268
|
+
"name": "CreateInfiniteQueryOptions",
|
|
4269
|
+
"kind": "interface",
|
|
4270
|
+
"package": "@nifrajs/web-solid",
|
|
4271
|
+
"signature": "export interface CreateInfiniteQueryOptions<T, P> extends InfiniteQueryOptions<T, P> {\n readonly enabled?: boolean;\n}",
|
|
4272
|
+
"doc": "/** Options for a Solid infinite query. */"
|
|
4273
|
+
},
|
|
4274
|
+
{
|
|
4275
|
+
"name": "CreateInfiniteQueryResult",
|
|
4276
|
+
"kind": "interface",
|
|
4277
|
+
"package": "@nifrajs/web-solid",
|
|
4278
|
+
"signature": "export interface CreateInfiniteQueryResult<T, P> {\n readonly state: Accessor<QueryState<InfiniteData<T, P>>>;\n readonly isPending: Accessor<boolean>;\n readonly isError: Accessor<boolean>;\n readonly isSuccess: Accessor<boolean>;\n readonly hasNextPage: Accessor<boolean>;\n readonly hasPreviousPage: Accessor<boolean>;\n readonly fetchNextPage: () => Promise<InfiniteData<T, P>>;\n readonly fetchPreviousPage: () => Promise<InfiniteData<T, P>>;\n readonly refetch: () => Promise<InfiniteData<T, P>>;\n}",
|
|
4279
|
+
"doc": "/** Infinite-query state and page controls expressed as Solid accessors. */"
|
|
4280
|
+
},
|
|
4267
4281
|
{
|
|
4268
4282
|
"name": "CreateMcpServerOptions",
|
|
4269
4283
|
"kind": "interface",
|
|
4270
4284
|
"package": "@nifrajs/mcp",
|
|
4271
4285
|
"signature": "export interface CreateMcpServerOptions {\n readonly name: string;\n readonly version: string;\n readonly tools?: readonly McpTool[];\n /** MCP Apps widgets - their resources are registered and the UI capability is advertised. */\n readonly widgets?: readonly McpWidget[];\n /** Extra (non-widget) resources to expose. */\n readonly resources?: readonly McpResource[];\n readonly prompts?: readonly McpPrompt[];\n /** GET health-page text. */\n readonly health?: string;\n /** Max JSON-RPC body size in bytes (default 1 MB). */\n readonly maxBodyBytes?: number;\n /** Max serialized JSON-RPC response or SSE frame size (default 1 MB). */\n readonly maxResponseBytes?: number;\n /** Max bytes an SSE stream queues for a client that is not reading (default 4 MiB). */\n readonly maxPendingBytes?: number;\n /** Natural-language guidance for LLMs, surfaced in the modern `server/discover` result (2026-07-28). */\n readonly instructions?: string;\n /** Explicitly allow browser clients from any origin. Omit for the secure same-origin default. */\n readonly allowAnyOrigin?: boolean;\n /** Origin allowlist for the DNS-rebinding guard. Set it to permit exact cross-origin clients. */\n readonly allowedOrigins?: readonly string[];\n /** Host allowlist; set it for a server on localhost or a private network. See {@link McpHttpOptions}. */\n readonly allowedHosts?: readonly string[];\n /** Shared state for one authenticated MCP session; prefer `resolveState` for multi-session hosts. */\n readonly state?: McpProtocolState;\n /** Resolve a session-scoped request registry after per-message authorization. */\n readonly resolveState?: McpHttpOptions[\"resolveState\"];\n /**\n * Per-message authorization, applied after the message parses and before any tool runs. Return\n * `false` to answer 403 with a JSON-RPC `unauthorized` error (`MCP_ERROR.UNAUTHORIZED`) and no result.\n *\n * This is the seam for \"this caller may list tools but may not call the write ones\" - the HTTP\n * layer above only sees one opaque POST, so a route guard cannot make that distinction.\n * `fetch(request, { authorizeMessage })` overrides it per request when the decision depends on\n * something the surrounding handler resolved (a session, a tenant). With it set, a GET for the\n * server-message stream is answered `405`, since that stream has no message to authorize.\n */\n readonly authorizeMessage?: (message: JsonRpcRequest, request: Request) => boolean | Promise<boolean>;\n}"
|
|
4272
4286
|
},
|
|
4287
|
+
{
|
|
4288
|
+
"name": "CreateMutationResult",
|
|
4289
|
+
"kind": "interface",
|
|
4290
|
+
"package": "@nifrajs/web-solid",
|
|
4291
|
+
"signature": "export interface CreateMutationResult<TData, TVariables> {\n readonly state: Accessor<MutationState<TData, TVariables>>;\n readonly isIdle: Accessor<boolean>;\n readonly isPending: Accessor<boolean>;\n readonly isError: Accessor<boolean>;\n readonly isSuccess: Accessor<boolean>;\n readonly mutate: (variables: TVariables) => void;\n readonly mutateAsync: (variables: TVariables) => Promise<TData>;\n readonly reset: () => void;\n readonly cancel: () => void;\n}",
|
|
4292
|
+
"doc": "/** A mutation result expressed as Solid accessors and imperative controls. */"
|
|
4293
|
+
},
|
|
4273
4294
|
{
|
|
4274
4295
|
"name": "CreateNonceResolverOptions",
|
|
4275
4296
|
"kind": "interface",
|
|
@@ -4323,7 +4344,7 @@
|
|
|
4323
4344
|
"name": "CreateWebAppOptions",
|
|
4324
4345
|
"kind": "interface",
|
|
4325
4346
|
"package": "@nifrajs/web",
|
|
4326
|
-
"signature": "export interface CreateWebAppOptions<Env = unknown> {\n readonly serverComponents?: import(\"../server-components/types.js\").ServerComponentRuntime;\n readonly adapter: RenderAdapter;\n readonly manifest: Manifest;\n /** Cache production module imports and layout preparation, never request data. Defaults to NODE_ENV === \"production\"; disable for a mutable manifest. */\n readonly cacheRouteModules?: boolean;\n /** URL of the built client entry (module script) injected into every page. */\n readonly clientEntry: string;\n /** Default document title for all pages. */\n readonly title?: string;\n /**\n * Resolve a fresh CSP nonce for each document request. The value is applied to every\n * framework-owned executable script; return `undefined` to keep the default nonce-free output.\n * Nonce-bearing documents are marked `private, no-store` so the request-specific value is not\n * replayed by browser, CDN, or ISR caches. Pass {@link cspHeader} to have nifra write the\n * Content-Security-Policy header from the same value.\n */\n readonly nonce?: NonceResolver<Env>;\n /**\n * Build the Content-Security-Policy value for each document a {@link nonce} app renders, or return\n * `undefined` to send none. nifra sets it on every document it renders - pages, status pages,\n * `_error`, streamed and deferred documents - from the nonce it put on that document's scripts, so\n * the header never depends on which `Request` object a wrapper holds. `sources` is the\n * `script-src` list the document needs: `'nonce-…'` plus a `'sha256-…'` hash for each constant\n * inline script nifra writes, which covers a document the resolver left nonce-free.\n *\n * ```ts\n * cspHeader: ({ sources }) => `default-src 'self'; script-src 'self' ${sources}; object-src 'none'`\n * ```\n *\n * Needs `nonce`; `csp` writes its own header, so the two are refused together.\n */\n readonly cspHeader?: (context: CspHeaderContext) => string | undefined;\n /**\n * A hash-based Content-Security-Policy from `createCspPolicy`, instead of `nonce`. A document then\n * carries a nonce only when it needs one (it `defer()`s a value, or `meta` names the nonce in\n * `unsafeInlineScript`); every other page is nonce-free, gets the same CSP header on every request,\n * and stays cacheable by `withISR` or a CDN. `meta` still receives a nonce to name.\n */\n readonly csp?: CspPolicy;\n /** Experimental and unstable: features whose API may change in any release. */\n readonly experimental?: {\n /**\n * Partial prerendering, from `partialPrerendering()` in `@nifrajs/web/ppr`. A route whose backend\n * half exports `shellLoader` streams a shell shared by every visitor, then each `dynamic` boundary\n * as it settles. Needs `csp` (hashes), not `nonce`.\n */\n readonly ppr?: PprSetup;\n };\n /**\n * Options for the underlying `server()` - `requestTimeoutMs`, `admission`, `gracefulSignals`, and\n * the rest of {@link ServerOptions}.\n *\n * Needed because the `Server` is constructed in here, so a caller has no other way to reach its\n * constructor: a page app could set no request timeout and no capacity gate, which are exactly the\n * two knobs a production readiness check looks for. An SSR app wants them MORE than a backend does -\n * a render is slow and allocation-heavy, so a burst that a JSON API would absorb is the one that\n * exhausts the pod.\n *\n * Applies to the whole app, {@link mounts} and the {@link api} auto-mount included: the capacity gate\n * sits at the fetch entry, ahead of the request hooks those are dispatched from.\n */\n readonly server?: ServerOptions;\n /**\n * Runs against the app BEFORE any page route is registered - the seam for `securityHeaders()`,\n * `requestId()`, `logger()`, a rate limit, or anything else applied with `use`.\n *\n * ```ts\n * createWebApp({\n * …,\n * use: (app) => {\n * app.use(securityHeaders())\n * app.use(requestId())\n * },\n * })\n * ```\n *\n * A callback rather than an array because `use` is overloaded - `Middleware`, `IdentityPlugin`,\n * `ContextPlugin` - and only the real call site instantiates the right overload. The return value\n * is ignored: this is for cross-cutting concerns, not for declaring routes (declare those on the\n * returned app, where they get their types).\n *\n * **Why the timing matters.** `beforeHandle`, `afterHandle`, `around`, `derive`/`decorate`, and\n * `onError` are snapshotted into each route AS IT IS DECLARED, and `createWebApp` declares every\n * page (plus the `/*` catch-all) before it returns - so a caller's `app.use(…)` afterwards would\n * bind them to no page, and outside production it throws (`HOOK_AFTER_PAGES`). `requestId()` is\n * exactly that case: it is a `derive`, so applied late it would leave every page without\n * `c.requestId`. A `group()` is its own scope and stays allowed. Route assurance evidence is order-scoped the same\n * way, so a late `securityHeaders()` leaves the pages unable to PROVE the header to `nifra assure`\n * even though it does still set it.\n *\n * `onRequest`/`onResponse` (and the response header/body hooks) are app-global arrays read at\n * request time, so those alone DO work when added late. Using this seam for everything avoids\n * having to remember which is which.\n *\n * Runs ahead of the {@link mounts} / {@link api} request hooks, so an `onRequest` middleware guards\n * a mounted auth handler too.\n *\n * A `ContextPlugin` applied here takes runtime effect but cannot widen the declared return type of\n * this function, so `c.requestId` is not typed on routes you declare afterwards. Named plugins are\n * idempotent, so `app.use(requestId())` on the returned app recovers the TYPE without applying the\n * plugin a second time.\n */\n readonly use?: (app: ReturnType<typeof server<Env>>) => void;\n /** Injected into each loader's `ctx.api` - typically an `inProcessClient(app)` (typed\n * per-route via `@nifrajs/client`'s `createRoutes`). Opaque to the core.\n *\n * **Auto-mount.** Every `inProcessClient(backend)` exposes the symbol-keyed platform-aware backend\n * mount interface from `@nifrajs/core/mount`; given an {@link apiPrefix}, `createWebApp` also serves\n * that backend over HTTP there: a request whose pathname starts with the prefix is dispatched before\n * page routing with the same `env`/`waitUntil` platform context, and the backend's `Response` is\n * returned untouched. The mount runs in `nifra dev` too. Without `apiPrefix` the backend is\n * loader-only.\n *\n * **Request-scoped loader calls.** While a page renders, its loaders, actions and boundaries get a\n * `ctx.api` bound to that request's platform identity: a backend handler reached through it sees the\n * visitor's `c.clientIp` (derived under this app's `server.clientIp` trust declaration), `c.env` and\n * `c.waitUntil`, so a per-caller rate limit or audit field keys on the real visitor. `c.clientIp` is\n * the supported way to read the caller - identity travels in the platform, so rebuilding a `Request`\n * does not lose it. Headers do NOT travel: the page request's `cookie` and `authorization` are never\n * copied, so a loader call is anonymous unless the loader passes headers on the call itself. */\n readonly api?: unknown;\n /** HTTP path prefix the {@link api} backend is mounted at, such as `\"/api\"`. A request whose\n * pathname is exactly the prefix or starts with `prefix + \"/\"` is dispatched to the backend before\n * page routing; the backend therefore defines its routes at the **full** path (`server().post(\"/api/\n * sync\", …)`), matching the in-process `inProcessClient` call sites. Unset or `\"\"`, nothing is\n * mounted: the app serves pages only and `api` stays a loader-only `ctx.api`. Mounting is also a\n * no-op when `api` does not expose the symbol mount.\n *\n * A page file under the prefix (`routes/api/report.tsx`) could never render - the backend answers\n * first and its 404 is final - so `createWebApp` throws, naming the file. The same holds for every\n * other pre-route mount. */\n readonly apiPrefix?: string;\n /**\n * Strip {@link apiPrefix} from the pathname before dispatching to `api` (default `false`).\n *\n * The default suits a backend that declares FULL paths (`server().post(\"/api/sync\", …)`), which is\n * right when it is only ever mounted here. Set this when the backend declares its routes WITHOUT the\n * prefix because it also runs standalone behind its own shell, so its paths cannot carry a prefix that\n * only exists when it is mounted. Without it every request 404s inside the backend, and the workaround\n * is a `Proxy` that rewrites each URL.\n */\n readonly apiStrip?: boolean;\n /**\n * Sub-apps mounted ahead of page routing - an auth handler, a webhook receiver, a stack's routes.\n *\n * Structural on purpose: anything with `{ path, app: { fetch } }` fits, so a library that exposes its\n * routes as such a list mounts as `mounts: theirRoutes` without `@nifrajs/web` taking a dependency on\n * it. `better-auth` is the motivating case - it is not a `backend` route, so `/api/auth/*` used to 404\n * silently.\n *\n * Tried longest-path-first and BEFORE the `api` mount, so a mount at `/api/auth` wins over a backend\n * at `/api` no matter which was declared first. `stripPrefix` is the per-mount form of {@link apiStrip}:\n * leave it off to pass the full path through. `opaque` states why a mount whose routes nifra cannot\n * read (better-auth's handler) is outside assurance; it is then listed as a known gap, with any\n * routes it declares reported as declared.\n */\n readonly mounts?: ReadonlyArray<{\n readonly path: string;\n readonly app: MountableApp<Env>;\n readonly stripPrefix?: boolean;\n readonly priority?: number;\n readonly fallbackOn?: 404;\n readonly opaque?: MountOptions<Env>[\"opaque\"];\n }>;\n /** Secret for **draft / preview mode** (see `enableDraft`). When set, a request carrying a valid\n * signed `__nifra_draft` cookie gets `ctx.draft === true` in loaders/actions (else always `false`).\n * Pair with `withISR({ draftSecret })` so editors bypass the cache. Omit to disable draft mode. */\n readonly draftSecret?: string;\n /**\n * Live data refresh, from `live()` in `@nifrajs/web/live`. Loaders declare keys with `ctx.live()`;\n * the app answers live loads at the runtime's load endpoint. Omit and nothing live is loaded.\n */\n readonly live?: LiveRuntimeHandle;\n /** Per-route chunk URLs (`buildClient`'s `BuildManifest.routes`) - `routeId → [layout chunks…, own\n * chunk]`. When present, each page `modulepreload`s its matched route's chunks alongside the entry,\n * so the route code downloads in parallel (no entry→route-chunk waterfall). Omit ⇒ entry-only. */\n readonly routePreload?: Readonly<Record<string, readonly string[]>>;\n /** The app's bundled stylesheet URLs (`buildClient`'s `BuildManifest.css`) - the aggregate, injected\n * as `<link rel=\"stylesheet\">` in a page's `<head>`. Used as the fallback for any route absent from\n * {@link routeStyles}. Omit ⇒ no links (dev, where Vite injects CSS, or a CSS-free app). */\n readonly styles?: readonly string[];\n /** Per-route stylesheet URLs (`buildClient`'s `BuildManifest.routeStyles`) - `routeId → [chain CSS]`.\n * When a matched route has an entry here, only those (its layout chain + own CSS) are linked instead\n * of the aggregate `styles`, so a page ships only the CSS it uses. An empty array ⇒ no `<link>` (the\n * page imports no CSS). Routes absent here fall back to `styles`. Omit ⇒ always use `styles`. */\n readonly routeStyles?: Readonly<Record<string, readonly string[]>>;\n /** Locale key -> copy chunk URL (`buildClient`'s `BuildManifest.copyChunks`, the server manifest's\n * `copyChunks`). A production client build moves copy tables (`@nifrajs/i18n/copy`) into one chunk per\n * locale; each page lists them for the browser and preloads its own. Omit ⇒ tables keep their values. */\n readonly copyChunks?: Readonly<Record<string, string>>;\n /**\n * The app's locale routing, `defineI18nRouting()` from `@nifrajs/i18n/routing`, registered once:\n * export it as `i18n` from `backend/framework.ts`. Every document then takes its locale from the\n * URL: `<html lang dir>` from the registry unless the route's meta sets `lang`, a `Content-Language`\n * header, and the locale each adapter's `useLocale()` and `<I18nProvider>` read. A route under a\n * `[lang]` or `[[lang]]` directory is checked with its `matchSegment()` before any middleware: an\n * unserved locale, or a page missing from it, is a 404, and a non-canonical prefix (`/en/x` when the\n * default is unprefixed) redirects with a 308.\n */\n readonly i18n?: WebAppI18n;\n /**\n * Activation policy for framework-owned stylesheet links (default `\"blocking\"`). `\"deferred\"`\n * emits `media=\"print\"` links; the generated client waits for them and switches them to `all` before\n * mounting. Pair with an aggregate Vite stylesheet (`cssCodeSplit: false`) to prevent lazy-prefetch\n * CSS insertion. Non-hydrated pages always keep their stylesheet links blocking.\n */\n readonly cssLoading?: CssLoadingMode;\n /** SSG: the prerendered-path set (e.g. `enumerateStaticRoutes(routes).paths` or the build's\n * `prerendered.json`). Handed over as `window.__NIFRA_PRERENDERED__` on every page so a client soft-nav\n * into a prerendered route fetches its static `_data.json` instead of hitting the worker, unless the\n * target carries a query string, which renders on demand as a hard request does. A set over\n * 4 KB of JSON is served once from `/__nifra/prerendered.json?v=<version>`, cacheable for good, and\n * pages hand over only that URL; `prerenderRoutes` writes the file into a static output. */\n readonly prerenderedPaths?: readonly string[];\n /**\n * Pages a self-hosted build prerendered, answered from their file instead of rendered. `nifra build\n * --target bun|node` wires this from its prerender pass. The page is served from the page route,\n * so `use` middleware and every request hook run first; a request with a query string, a navigation\n * data or component request, or a draft-mode visitor renders on demand as before. Ignored with\n * {@link nonce}, whose documents need a nonce minted for their request.\n */\n readonly prerenderedPages?: PrerenderedPages;\n /**\n * Which pages and files each host serves, from `createHostPolicy()`. Evaluated before everything\n * else the app answers (prerendered pages, mounts, the API, every page) and, in a `nifra build`\n * server entry, before its static files too. A refused path answers the policy's refusal.\n */\n readonly hostPolicy?: HostPolicy;\n /**\n * Which cookies say who is signed in, for an app with a `keepAlive` route. A response that changes\n * or deletes one rotates the readable identity epoch cookie, and every tab drops the pages it kept\n * for the previous visitor. The session cookies of `@nifrajs/auth` and Auth.js count under their\n * default names, Better Auth's under any `cookiePrefix`; name any other in `identityCookies`. An app\n * run by `nifra dev` and `nifra build` exports this from `backend/framework.ts`. Development reports, once per\n * name, an `HttpOnly` cookie that changes and is in neither list (`NIFRA_KEEPALIVE_IDENTITY_COOKIE`).\n */\n readonly keepAlive?: KeepAliveServerOptions;\n /**\n * The files the build emitted, by request path: `buildAssets` from the generated server manifest.\n * A {@link hostPolicy} rule's `buildAssets` token matches exactly these. `nifra dev` serves the\n * client bundle and `public/` ahead of the app, so the app's own check never sees them there.\n */\n readonly buildAssets?: BuildAssetSet;\n /** Publish the project's `AGENTS.md` inside `/llms.txt` and `/llms-full.txt`. **Off by default**:\n * those endpoints are public and unauthenticated, while `AGENTS.md` is a repo file written for the\n * team - unreleased feature names, internal hostnames, and \"don't touch X yet\" notes live there\n * routinely. Turn it on only for a repo whose guidelines you would publish as a page. */\n readonly publishLocalGuidelines?: boolean;\n /** Serve `/llms.txt` and `/llms-full.txt`: the page routes, and the backend routes when the backend\n * is mounted over HTTP at {@link apiPrefix}, with their request and response schemas in the full\n * text. **Off by default**: both are public and unauthenticated, and they list every route, admin\n * and internal ones included. Turn it on for an app whose whole surface you would publish. */\n readonly llmsTxt?: boolean;\n /** SSG: per dynamic route pattern, its `getStaticPaths` `fallback` (from `enumerateStaticRoutes` or\n * the build's `prerendered.json`). A route mapped to `\"404\"` rejects any path NOT in\n * `prerenderedPaths` with the 404 page - the unlisted path simply doesn't exist. `\"ssr\"` (the\n * default for unmapped routes) renders unlisted paths on-demand. */\n readonly staticFallbacks?: Readonly<Record<string, \"ssr\" | \"404\">>;\n /** In-memory reference cache for explicitly `static` boundary values. It never persists payloads\n * across processes; operated/durable cache implementations stay outside the public framework. */\n readonly staticBoundaryCache?: import(\"../boundary.js\").StaticBoundaryCache;\n /** Observe every loader/action failure - for error-reporting plugins (Sentry-style). Called for\n * real throws (not control-flow `Response`s like `redirect`), **before** the nearest `_error`\n * boundary renders / a soft-nav 500 / a rethrow. A failure a boundary answers is also written to the\n * server's `logger` (under its `errorLogDetail`) whether or not this is set, exactly as an unhandled\n * error is. Observation only; its own throws are swallowed so a faulty reporter can't break\n * rendering. (`beforeLoader` is intentionally omitted - the core HTTP hooks already cover\n * pre-request work.) */\n readonly onLoaderError?: (error: unknown, ctx: {\n readonly request: Request;\n readonly params: Readonly<Record<string, string>>;\n readonly route: string;\n }) => void;\n}"
|
|
4347
|
+
"signature": "export interface CreateWebAppOptions<Env = unknown> {\n readonly serverComponents?: import(\"../server-components/types.js\").ServerComponentRuntime;\n readonly adapter: RenderAdapter;\n readonly manifest: Manifest;\n /** Cache production module imports and layout preparation, never request data. Defaults to NODE_ENV === \"production\"; disable for a mutable manifest. */\n readonly cacheRouteModules?: boolean;\n /** URL of the built client entry (module script) injected into every page. */\n readonly clientEntry: string;\n /** Default document title for all pages. */\n readonly title?: string;\n /**\n * Resolve a fresh CSP nonce for each document request. The value is applied to every\n * framework-owned executable script; return `undefined` to keep the default nonce-free output.\n * Nonce-bearing documents are marked `private, no-store` so the request-specific value is not\n * replayed by browser, CDN, or ISR caches. Pass {@link cspHeader} to have nifra write the\n * Content-Security-Policy header from the same value.\n */\n readonly nonce?: NonceResolver<Env>;\n /**\n * Build the Content-Security-Policy value for each document a {@link nonce} app renders, or return\n * `undefined` to send none. nifra sets it on every document it renders - pages, status pages,\n * `_error`, streamed and deferred documents - from the nonce it put on that document's scripts, so\n * the header never depends on which `Request` object a wrapper holds. `sources` is the\n * `script-src` list the document needs: `'nonce-…'` plus a `'sha256-…'` hash for each constant\n * inline script nifra writes, which covers a document the resolver left nonce-free.\n *\n * ```ts\n * cspHeader: ({ sources }) => `default-src 'self'; script-src 'self' ${sources}; object-src 'none'`\n * ```\n *\n * Needs `nonce`; `csp` writes its own header, so the two are refused together.\n */\n readonly cspHeader?: (context: CspHeaderContext) => string | undefined;\n /**\n * A hash-based Content-Security-Policy from `createCspPolicy`, instead of `nonce`. A document then\n * carries a nonce only when it needs one (it `defer()`s a value, or `meta` names the nonce in\n * `unsafeInlineScript`); every other page is nonce-free, gets the same CSP header on every request,\n * and stays cacheable by `withISR` or a CDN. `meta` still receives a nonce to name.\n */\n readonly csp?: CspPolicy;\n /**\n * Partial prerendering, from `partialPrerendering()` in `@nifrajs/web/ppr`. A route whose backend\n * half exports `shellLoader` streams a shell shared by every visitor, then each `dynamic` boundary\n * as it settles. `csp` (hashes) is optional; `nonce` is refused, since a per-request nonce would\n * make every shell unique.\n */\n readonly ppr?: PprSetup;\n /**\n * Options for the underlying `server()` - `requestTimeoutMs`, `admission`, `gracefulSignals`, and\n * the rest of {@link ServerOptions}.\n *\n * Needed because the `Server` is constructed in here, so a caller has no other way to reach its\n * constructor: a page app could set no request timeout and no capacity gate, which are exactly the\n * two knobs a production readiness check looks for. An SSR app wants them MORE than a backend does -\n * a render is slow and allocation-heavy, so a burst that a JSON API would absorb is the one that\n * exhausts the pod.\n *\n * Applies to the whole app, {@link mounts} and the {@link api} auto-mount included: the capacity gate\n * sits at the fetch entry, ahead of the request hooks those are dispatched from.\n */\n readonly server?: ServerOptions;\n /**\n * Runs against the app BEFORE any page route is registered - the seam for `securityHeaders()`,\n * `requestId()`, `logger()`, a rate limit, or anything else applied with `use`.\n *\n * ```ts\n * createWebApp({\n * …,\n * use: (app) => {\n * app.use(securityHeaders())\n * app.use(requestId())\n * },\n * })\n * ```\n *\n * A callback rather than an array because `use` is overloaded - `Middleware`, `IdentityPlugin`,\n * `ContextPlugin` - and only the real call site instantiates the right overload. The return value\n * is ignored: this is for cross-cutting concerns, not for declaring routes (declare those on the\n * returned app, where they get their types).\n *\n * **Why the timing matters.** `beforeHandle`, `afterHandle`, `around`, `derive`/`decorate`, and\n * `onError` are snapshotted into each route AS IT IS DECLARED, and `createWebApp` declares every\n * page (plus the `/*` catch-all) before it returns - so a caller's `app.use(…)` afterwards would\n * bind them to no page, and outside production it throws (`HOOK_AFTER_PAGES`). `requestId()` is\n * exactly that case: it is a `derive`, so applied late it would leave every page without\n * `c.requestId`. A `group()` is its own scope and stays allowed. Route assurance evidence is order-scoped the same\n * way, so a late `securityHeaders()` leaves the pages unable to PROVE the header to `nifra assure`\n * even though it does still set it.\n *\n * `onRequest`/`onResponse` (and the response header/body hooks) are app-global arrays read at\n * request time, so those alone DO work when added late. Using this seam for everything avoids\n * having to remember which is which.\n *\n * Runs ahead of the {@link mounts} / {@link api} request hooks, so an `onRequest` middleware guards\n * a mounted auth handler too.\n *\n * A `ContextPlugin` applied here takes runtime effect but cannot widen the declared return type of\n * this function, so `c.requestId` is not typed on routes you declare afterwards. Named plugins are\n * idempotent, so `app.use(requestId())` on the returned app recovers the TYPE without applying the\n * plugin a second time.\n */\n readonly use?: (app: ReturnType<typeof server<Env>>) => void;\n /** Injected into each loader's `ctx.api` - typically an `inProcessClient(app)` (typed\n * per-route via `@nifrajs/client`'s `createRoutes`). Opaque to the core.\n *\n * **Auto-mount.** Every `inProcessClient(backend)` exposes the symbol-keyed platform-aware backend\n * mount interface from `@nifrajs/core/mount`; given an {@link apiPrefix}, `createWebApp` also serves\n * that backend over HTTP there: a request whose pathname starts with the prefix is dispatched before\n * page routing with the same `env`/`waitUntil` platform context, and the backend's `Response` is\n * returned untouched. The mount runs in `nifra dev` too. Without `apiPrefix` the backend is\n * loader-only.\n *\n * **Request-scoped loader calls.** While a page renders, its loaders, actions and boundaries get a\n * `ctx.api` bound to that request's platform identity: a backend handler reached through it sees the\n * visitor's `c.clientIp` (derived under this app's `server.clientIp` trust declaration), `c.env` and\n * `c.waitUntil`, so a per-caller rate limit or audit field keys on the real visitor. `c.clientIp` is\n * the supported way to read the caller - identity travels in the platform, so rebuilding a `Request`\n * does not lose it. Headers do NOT travel: the page request's `cookie` and `authorization` are never\n * copied, so a loader call is anonymous unless the loader passes headers on the call itself. */\n readonly api?: unknown;\n /** HTTP path prefix the {@link api} backend is mounted at, such as `\"/api\"`. A request whose\n * pathname is exactly the prefix or starts with `prefix + \"/\"` is dispatched to the backend before\n * page routing; the backend therefore defines its routes at the **full** path (`server().post(\"/api/\n * sync\", …)`), matching the in-process `inProcessClient` call sites. Unset or `\"\"`, nothing is\n * mounted: the app serves pages only and `api` stays a loader-only `ctx.api`. Mounting is also a\n * no-op when `api` does not expose the symbol mount.\n *\n * A page file under the prefix (`routes/api/report.tsx`) could never render - the backend answers\n * first and its 404 is final - so `createWebApp` throws, naming the file. The same holds for every\n * other pre-route mount. */\n readonly apiPrefix?: string;\n /**\n * Strip {@link apiPrefix} from the pathname before dispatching to `api` (default `false`).\n *\n * The default suits a backend that declares FULL paths (`server().post(\"/api/sync\", …)`), which is\n * right when it is only ever mounted here. Set this when the backend declares its routes WITHOUT the\n * prefix because it also runs standalone behind its own shell, so its paths cannot carry a prefix that\n * only exists when it is mounted. Without it every request 404s inside the backend, and the workaround\n * is a `Proxy` that rewrites each URL.\n */\n readonly apiStrip?: boolean;\n /**\n * Sub-apps mounted ahead of page routing - an auth handler, a webhook receiver, a stack's routes.\n *\n * Structural on purpose: anything with `{ path, app: { fetch } }` fits, so a library that exposes its\n * routes as such a list mounts as `mounts: theirRoutes` without `@nifrajs/web` taking a dependency on\n * it. `better-auth` is the motivating case - it is not a `backend` route, so `/api/auth/*` used to 404\n * silently.\n *\n * Tried longest-path-first and BEFORE the `api` mount, so a mount at `/api/auth` wins over a backend\n * at `/api` no matter which was declared first. `stripPrefix` is the per-mount form of {@link apiStrip}:\n * leave it off to pass the full path through. `opaque` states why a mount whose routes nifra cannot\n * read (better-auth's handler) is outside assurance; it is then listed as a known gap, with any\n * routes it declares reported as declared.\n */\n readonly mounts?: ReadonlyArray<{\n readonly path: string;\n readonly app: MountableApp<Env>;\n readonly stripPrefix?: boolean;\n readonly priority?: number;\n readonly fallbackOn?: 404;\n readonly opaque?: MountOptions<Env>[\"opaque\"];\n }>;\n /** Secret for **draft / preview mode** (see `enableDraft`). When set, a request carrying a valid\n * signed `__nifra_draft` cookie gets `ctx.draft === true` in loaders/actions (else always `false`).\n * Pair with `withISR({ draftSecret })` so editors bypass the cache. Omit to disable draft mode. */\n readonly draftSecret?: string;\n /**\n * Live data refresh, from `live()` in `@nifrajs/web/live`. Loaders declare keys with `ctx.live()`;\n * the app answers live loads at the runtime's load endpoint. Omit and nothing live is loaded.\n */\n readonly live?: LiveRuntimeHandle;\n /** Per-route chunk URLs (`buildClient`'s `BuildManifest.routes`) - `routeId → [layout chunks…, own\n * chunk]`. When present, each page `modulepreload`s its matched route's chunks alongside the entry,\n * so the route code downloads in parallel (no entry→route-chunk waterfall). Omit ⇒ entry-only. */\n readonly routePreload?: Readonly<Record<string, readonly string[]>>;\n /** The app's bundled stylesheet URLs (`buildClient`'s `BuildManifest.css`) - the aggregate, injected\n * as `<link rel=\"stylesheet\">` in a page's `<head>`. Used as the fallback for any route absent from\n * {@link routeStyles}. Omit ⇒ no links (dev, where Vite injects CSS, or a CSS-free app). */\n readonly styles?: readonly string[];\n /** Per-route stylesheet URLs (`buildClient`'s `BuildManifest.routeStyles`) - `routeId → [chain CSS]`.\n * When a matched route has an entry here, only those (its layout chain + own CSS) are linked instead\n * of the aggregate `styles`, so a page ships only the CSS it uses. An empty array ⇒ no `<link>` (the\n * page imports no CSS). Routes absent here fall back to `styles`. Omit ⇒ always use `styles`. */\n readonly routeStyles?: Readonly<Record<string, readonly string[]>>;\n /** Locale key -> copy chunk URL (`buildClient`'s `BuildManifest.copyChunks`, the server manifest's\n * `copyChunks`). A production client build moves copy tables (`@nifrajs/i18n/copy`) into one chunk per\n * locale; each page lists them for the browser and preloads its own. Omit ⇒ tables keep their values. */\n readonly copyChunks?: Readonly<Record<string, string>>;\n /**\n * The app's locale routing, `defineI18nRouting()` from `@nifrajs/i18n/routing`, registered once:\n * export it as `i18n` from `backend/framework.ts`. Every document then takes its locale from the\n * URL: `<html lang dir>` from the registry unless the route's meta sets `lang`, a `Content-Language`\n * header, and the locale each adapter's `useLocale()` and `<I18nProvider>` read. A route under a\n * `[lang]` or `[[lang]]` directory is checked with its `matchSegment()` before any middleware: an\n * unserved locale, or a page missing from it, is a 404, and a non-canonical prefix (`/en/x` when the\n * default is unprefixed) redirects with a 308.\n */\n readonly i18n?: WebAppI18n;\n /**\n * Activation policy for framework-owned stylesheet links (default `\"blocking\"`). `\"deferred\"`\n * emits `media=\"print\"` links; the generated client waits for them and switches them to `all` before\n * mounting. Pair with an aggregate Vite stylesheet (`cssCodeSplit: false`) to prevent lazy-prefetch\n * CSS insertion. Non-hydrated pages always keep their stylesheet links blocking.\n */\n readonly cssLoading?: CssLoadingMode;\n /** SSG: the prerendered-path set (e.g. `enumerateStaticRoutes(routes).paths` or the build's\n * `prerendered.json`). Handed over as `window.__NIFRA_PRERENDERED__` on every page so a client soft-nav\n * into a prerendered route fetches its static `_data.json` instead of hitting the worker, unless the\n * target carries a query string, which renders on demand as a hard request does. A set over\n * 4 KB of JSON is served once from `/__nifra/prerendered.json?v=<version>`, cacheable for good, and\n * pages hand over only that URL; `prerenderRoutes` writes the file into a static output. */\n readonly prerenderedPaths?: readonly string[];\n /**\n * Pages a self-hosted build prerendered, answered from their file instead of rendered. `nifra build\n * --target bun|node` wires this from its prerender pass. The page is served from the page route,\n * so `use` middleware and every request hook run first; a request with a query string, a navigation\n * data or component request, or a draft-mode visitor renders on demand as before. Ignored with\n * {@link nonce}, whose documents need a nonce minted for their request.\n */\n readonly prerenderedPages?: PrerenderedPages;\n /**\n * Which pages and files each host serves, from `createHostPolicy()`. Evaluated before everything\n * else the app answers (prerendered pages, mounts, the API, every page) and, in a `nifra build`\n * server entry, before its static files too. A refused path answers the policy's refusal.\n */\n readonly hostPolicy?: HostPolicy;\n /**\n * Which cookies say who is signed in, for an app with a `keepAlive` route. A response that changes\n * or deletes one rotates the readable identity epoch cookie, and every tab drops the pages it kept\n * for the previous visitor. The session cookies of `@nifrajs/auth` and Auth.js count under their\n * default names, Better Auth's under any `cookiePrefix`; name any other in `identityCookies`. An app\n * run by `nifra dev` and `nifra build` exports this from `backend/framework.ts`. Development reports, once per\n * name, an `HttpOnly` cookie that changes and is in neither list (`NIFRA_KEEPALIVE_IDENTITY_COOKIE`).\n */\n readonly keepAlive?: KeepAliveServerOptions;\n /**\n * The files the build emitted, by request path: `buildAssets` from the generated server manifest.\n * A {@link hostPolicy} rule's `buildAssets` token matches exactly these. `nifra dev` serves the\n * client bundle and `public/` ahead of the app, so the app's own check never sees them there.\n */\n readonly buildAssets?: BuildAssetSet;\n /** Publish the project's `AGENTS.md` inside `/llms.txt` and `/llms-full.txt`. **Off by default**:\n * those endpoints are public and unauthenticated, while `AGENTS.md` is a repo file written for the\n * team - unreleased feature names, internal hostnames, and \"don't touch X yet\" notes live there\n * routinely. Turn it on only for a repo whose guidelines you would publish as a page. */\n readonly publishLocalGuidelines?: boolean;\n /** Serve `/llms.txt` and `/llms-full.txt`: the page routes, and the backend routes when the backend\n * is mounted over HTTP at {@link apiPrefix}, with their request and response schemas in the full\n * text. **Off by default**: both are public and unauthenticated, and they list every route, admin\n * and internal ones included. Turn it on for an app whose whole surface you would publish. */\n readonly llmsTxt?: boolean;\n /** SSG: per dynamic route pattern, its `getStaticPaths` `fallback` (from `enumerateStaticRoutes` or\n * the build's `prerendered.json`). A route mapped to `\"404\"` rejects any path NOT in\n * `prerenderedPaths` with the 404 page - the unlisted path simply doesn't exist. `\"ssr\"` (the\n * default for unmapped routes) renders unlisted paths on-demand. */\n readonly staticFallbacks?: Readonly<Record<string, \"ssr\" | \"404\">>;\n /** In-memory reference cache for explicitly `static` boundary values. It never persists payloads\n * across processes; operated/durable cache implementations stay outside the public framework. */\n readonly staticBoundaryCache?: import(\"../boundary.js\").StaticBoundaryCache;\n /** Observe every loader/action failure - for error-reporting plugins (Sentry-style). Called for\n * real throws (not control-flow `Response`s like `redirect`), **before** the nearest `_error`\n * boundary renders / a soft-nav 500 / a rethrow. A failure a boundary answers is also written to the\n * server's `logger` (under its `errorLogDetail`) whether or not this is set, exactly as an unhandled\n * error is. Observation only; its own throws are swallowed so a faulty reporter can't break\n * rendering. (`beforeLoader` is intentionally omitted - the core HTTP hooks already cover\n * pre-request work.) */\n readonly onLoaderError?: (error: unknown, ctx: {\n readonly request: Request;\n readonly params: Readonly<Record<string, string>>;\n readonly route: string;\n }) => void;\n}"
|
|
4327
4348
|
},
|
|
4328
4349
|
{
|
|
4329
4350
|
"name": "CronError",
|
|
@@ -5004,6 +5025,20 @@
|
|
|
5004
5025
|
"package": "nifra",
|
|
5005
5026
|
"signature": "export type DefinePluginResult<In extends AnyServer, Out extends AnyServer> = ServerTypeUnpinned<In> extends true ? PluginTypeCollapsed : NifraPlugin<In, Out>;"
|
|
5006
5027
|
},
|
|
5028
|
+
{
|
|
5029
|
+
"name": "DehydrateOptions",
|
|
5030
|
+
"kind": "interface",
|
|
5031
|
+
"package": "@nifrajs/web",
|
|
5032
|
+
"signature": "export interface DehydrateOptions {\n /** Every dehydrated value is serialized into the page and readable by the visitor, so a query is\n * included only when this returns `true`. Without it `dehydrate` sends nothing. */\n readonly shouldDehydrateQuery?: (query: DehydratedQueryInfo) => boolean;\n}",
|
|
5033
|
+
"doc": "/** Select which successful query values may cross the SSR-to-browser boundary. */"
|
|
5034
|
+
},
|
|
5035
|
+
{
|
|
5036
|
+
"name": "DehydratedQueryInfo",
|
|
5037
|
+
"kind": "interface",
|
|
5038
|
+
"package": "@nifrajs/web",
|
|
5039
|
+
"signature": "export interface DehydratedQueryInfo {\n readonly kind: \"query\" | \"infinite\";\n readonly key: unknown;\n readonly data: unknown;\n readonly updatedAt: number;\n}",
|
|
5040
|
+
"doc": "/** Metadata passed to a dehydration filter before query data is sent to the browser. */"
|
|
5041
|
+
},
|
|
5007
5042
|
{
|
|
5008
5043
|
"name": "DehydratedState",
|
|
5009
5044
|
"kind": "interface",
|
|
@@ -5557,7 +5592,7 @@
|
|
|
5557
5592
|
"name": "DynamicBoundary",
|
|
5558
5593
|
"kind": "type",
|
|
5559
5594
|
"package": "@nifrajs/web",
|
|
5560
|
-
"signature": "export type DynamicBoundary<Data, UI> = BoundaryBase<Data, UI> & {\n readonly mode: \"dynamic\";\n readonly load?: (ctx: BoundaryRequestCtx) => Data | Promise<Data>;\n /**
|
|
5595
|
+
"signature": "export type DynamicBoundary<Data, UI> = BoundaryBase<Data, UI> & {\n readonly mode: \"dynamic\";\n readonly load?: (ctx: BoundaryRequestCtx) => Data | Promise<Data>;\n /** Partial prerendering: the hole ships its props and hydrates. Default `false`. */\n readonly interactive?: boolean;\n /** Partial prerendering: the hole's deadline in milliseconds. Default 5000. */\n readonly timeout?: number;\n};"
|
|
5561
5596
|
},
|
|
5562
5597
|
{
|
|
5563
5598
|
"name": "DynamicBoundaryBatch",
|
|
@@ -6452,6 +6487,12 @@
|
|
|
6452
6487
|
"signature": "export interface FileVersion {\n readonly dev: number;\n readonly ino: number;\n readonly size: number;\n readonly mtimeMs: number;\n readonly ctimeMs: number;\n}",
|
|
6453
6488
|
"doc": "/**\n * The stat fields that tell one version of a file from another on one host: node:fs `Stats` as it is,\n * or Deno's `FileInfo` with its dates as epoch milliseconds and a field it lacks as `NaN`.\n */"
|
|
6454
6489
|
},
|
|
6490
|
+
{
|
|
6491
|
+
"name": "FilledRoutePath",
|
|
6492
|
+
"kind": "type",
|
|
6493
|
+
"package": "@nifrajs/core",
|
|
6494
|
+
"signature": "export type FilledRoutePath = {\n readonly ok: true;\n readonly path: string;\n} | {\n readonly ok: false;\n /** Params the pattern names that `params` leaves out or holds as the empty string. */\n readonly missing: readonly string[];\n /** Params whose value cannot be carried or would be split differently by this pattern. */\n readonly invalid: readonly string[];\n};"
|
|
6495
|
+
},
|
|
6455
6496
|
{
|
|
6456
6497
|
"name": "FixOption",
|
|
6457
6498
|
"kind": "interface",
|
|
@@ -6629,12 +6670,6 @@
|
|
|
6629
6670
|
"package": "@nifrajs/testing",
|
|
6630
6671
|
"signature": "export interface GenerateRegressionTestOptions {\n /** Import specifier for the app under test. Default `\"../src/app\"`. */\n readonly importPath?: string;\n /** Named export of the app. Default `\"app\"`. */\n readonly appExport?: string;\n /** Also assert the response shape. Default false (status-only is the robust regression signal). */\n readonly assertShape?: boolean;\n /** Dotted key paths in the request body whose string values are safe to embed verbatim. */\n readonly allow?: readonly string[];\n /** Query parameter names whose values are safe to embed verbatim. Default none. */\n readonly allowQuery?: readonly string[];\n /** Header names (any case) whose values are safe to embed verbatim. Default `[\"content-type\"]`. */\n readonly allowHeaders?: readonly string[];\n /** Embed the capsule's `note` verbatim. Default false: a note is free text and is redacted. */\n readonly keepNote?: boolean;\n}"
|
|
6631
6672
|
},
|
|
6632
|
-
{
|
|
6633
|
-
"name": "GenerateRouteSearchTypesOptions",
|
|
6634
|
-
"kind": "interface",
|
|
6635
|
-
"package": "@nifrajs/web",
|
|
6636
|
-
"signature": "export interface GenerateRouteSearchTypesOptions {\n /** Turn a route source file into a module specifier for a `typeof import(...)` type - the same contract\n * as `generateClientEntry`'s `resolve`, but WITHOUT a file extension (a `.d.ts` imports a module, not a\n * path). Relative to wherever the emitted `.d.ts` is written. */\n readonly resolve: (file: string) => string;\n /** The module whose `RouteSearch` interface is augmented (default `\"@nifrajs/web\"`). Every adapter's\n * `NavigateTarget` reads `@nifrajs/web`'s `RouteSearch`, so the default types `navigate` on all of them. */\n readonly module?: string;\n}"
|
|
6637
|
-
},
|
|
6638
6673
|
{
|
|
6639
6674
|
"name": "GenerateServerManifestOptions",
|
|
6640
6675
|
"kind": "interface",
|
|
@@ -6860,28 +6895,28 @@
|
|
|
6860
6895
|
"kind": "function",
|
|
6861
6896
|
"package": "@nifrajs/web-preact",
|
|
6862
6897
|
"signature": "export declare function Hole<Data>(props: HoleProps<Data>): ComponentChildren;",
|
|
6863
|
-
"doc": "/**\n *
|
|
6898
|
+
"doc": "/**\n * One `dynamic` or `shared` boundary of a partially prerendered page.\n *\n * In a shared shell the hole is an empty host Preact never fills or diffs: the PPR runtime puts the\n * server's HTML into it, and an interactive hole then hydrates as its own root from the frame's props.\n * When the page reloads, after an action or a live change, the host takes the new fill in place: an\n * interactive root re-renders with the new props and keeps its state. After a client navigation the\n * hole renders like any streamed boundary.\n */"
|
|
6864
6899
|
},
|
|
6865
6900
|
{
|
|
6866
6901
|
"name": "Hole",
|
|
6867
6902
|
"kind": "function",
|
|
6868
6903
|
"package": "@nifrajs/web-react",
|
|
6869
6904
|
"signature": "export declare function Hole<Data>(props: HoleProps<Data>): ReactNode;",
|
|
6870
|
-
"doc": "/**\n *
|
|
6905
|
+
"doc": "/**\n * One `dynamic` or `shared` boundary of a partially prerendered page.\n *\n * In a shared shell the hole is an empty host React never fills or diffs: the PPR runtime puts the\n * server's HTML into it, and an interactive hole then hydrates as its own root from the frame's props.\n * When the page reloads, after an action or a live change, the host takes the new fill in place: an\n * interactive root re-renders with the new props and keeps its state. After a client navigation the\n * hole renders like any streamed boundary.\n */"
|
|
6871
6906
|
},
|
|
6872
6907
|
{
|
|
6873
6908
|
"name": "Hole",
|
|
6874
6909
|
"kind": "function",
|
|
6875
6910
|
"package": "@nifrajs/web-solid",
|
|
6876
6911
|
"signature": "export declare function Hole<Data>(props: HoleProps<Data>): JSX.Element;",
|
|
6877
|
-
"doc": "/**\n *
|
|
6912
|
+
"doc": "/**\n * One `dynamic` or `shared` boundary of a partially prerendered page.\n *\n * In a shared shell the hole is an empty host Solid never fills: the PPR runtime puts the server's\n * HTML into it, and an interactive hole then hydrates as its own root from the frame's props. When the\n * page reloads, after an action or a live change, the same host takes the new fill in place: an\n * interactive root gets the new props through its store and keeps its state. After a client\n * navigation the hole renders like any streamed boundary.\n */"
|
|
6878
6913
|
},
|
|
6879
6914
|
{
|
|
6880
6915
|
"name": "Hole",
|
|
6881
6916
|
"kind": "const",
|
|
6882
6917
|
"package": "@nifrajs/web-vue",
|
|
6883
6918
|
"signature": "export declare const Hole: new <Data>(props: HoleProps<Data> & {} & import(\"vue\").VNodeProps & import(\"vue\").AllowedComponentProps & import(\"vue\").ComponentCustomProps) => import(\"vue\").CreateComponentPublicInstanceWithMixins<HoleProps<Data> & {}, {}, {}, {}, {}, import(\"vue\").ComponentOptionsMixin, import(\"vue\").ComponentOptionsMixin, {}, import(\"vue\").PublicProps, {}, false, {}, HoleSlots, {}, {}, string, {}, any, import(\"vue\").ComponentProvideOptions, {\n P: {};\n B: {};\n D: {};\n C: {};\n M: {};\n Defaults: {};\n}, HoleProps<Data> & {}, {}, {}, {}, {}, {}>;",
|
|
6884
|
-
"doc": "/**\n *
|
|
6919
|
+
"doc": "/**\n * One `dynamic` or `shared` boundary of a partially prerendered page.\n *\n * In a shared shell the hole is an empty host Vue never fills or diffs: the PPR runtime puts the\n * server's HTML into it, and an interactive hole then hydrates as its own app from the frame's props.\n * When the page reloads, after an action or a live change, the host takes the new fill in place: an\n * interactive app re-renders with the new props and keeps its state. After a client navigation the\n * hole renders like any streamed boundary.\n */"
|
|
6885
6920
|
},
|
|
6886
6921
|
{
|
|
6887
6922
|
"name": "HoleDefinition",
|
|
@@ -7014,6 +7049,20 @@
|
|
|
7014
7049
|
"package": "@nifrajs/agent",
|
|
7015
7050
|
"signature": "export type HostileCodeIsolation = \"none\" | \"os\";"
|
|
7016
7051
|
},
|
|
7052
|
+
{
|
|
7053
|
+
"name": "Href",
|
|
7054
|
+
"kind": "type",
|
|
7055
|
+
"package": "@nifrajs/web",
|
|
7056
|
+
"signature": "export type Href<Pattern extends string = string> = string & {\n readonly \"~nifraHref\": Pattern;\n};",
|
|
7057
|
+
"doc": "/**\n * An in-app URL: what `href()` builds from a route and `rawHref()` returns for a checked path. A string\n * at runtime, a branded string to the compiler, so a plain string or a template literal is not assignable\n * to it. `Pattern` is the {@link RouteTable} key it was built for. The brand is a named property, not a\n * `unique symbol`, so an `Href` from one copy of this package is assignable to another's.\n */"
|
|
7058
|
+
},
|
|
7059
|
+
{
|
|
7060
|
+
"name": "HrefOptions",
|
|
7061
|
+
"kind": "type",
|
|
7062
|
+
"package": "@nifrajs/web",
|
|
7063
|
+
"signature": "export type HrefOptions<K extends Pattern> = {\n readonly to: K;\n readonly search?: SearchOfRoute<K> | undefined;\n readonly hash?: string | undefined;\n} & ParamsOption<K>;",
|
|
7064
|
+
"doc": "/**\n * What {@link href} takes: the route's pattern as `to`, its `params` (required when the pattern has\n * any, absent when it has none), the route's `search` as its `searchSchema` outputs it, and the `hash`\n * without its `#`.\n */"
|
|
7065
|
+
},
|
|
7017
7066
|
{
|
|
7018
7067
|
"name": "HreflangLink",
|
|
7019
7068
|
"kind": "interface",
|
|
@@ -7076,6 +7125,13 @@
|
|
|
7076
7125
|
"signature": "export interface HydrationAssuranceOptions {\n readonly onWarning?: (message: string) => void;\n}",
|
|
7077
7126
|
"doc": "/** Hydrate a server-rendered Vue layout `chain` (with the loader `props`) inside `container`. */"
|
|
7078
7127
|
},
|
|
7128
|
+
{
|
|
7129
|
+
"name": "HydrationBoundary",
|
|
7130
|
+
"kind": "function",
|
|
7131
|
+
"package": "@nifrajs/web-preact",
|
|
7132
|
+
"signature": "export declare function HydrationBoundary(props: {\n readonly state: DehydratedState | undefined;\n readonly children?: ComponentChildren;\n}): ComponentChildren;",
|
|
7133
|
+
"doc": "/** Seed the provider's cache before its child queries read their first snapshot. */"
|
|
7134
|
+
},
|
|
7079
7135
|
{
|
|
7080
7136
|
"name": "HydrationBoundary",
|
|
7081
7137
|
"kind": "function",
|
|
@@ -7140,7 +7196,7 @@
|
|
|
7140
7196
|
"name": "I18nRoutingOptions",
|
|
7141
7197
|
"kind": "interface",
|
|
7142
7198
|
"package": "@nifrajs/i18n",
|
|
7143
|
-
"signature": "export interface I18nRoutingOptions<K extends string = string> {\n /** Prefix the default locale too (`/en/about` instead of `/about`). Default `false`. */\n readonly prefixDefaultLocale?: boolean;\n /**\n * The locales a page exists in, by its pathname without the locale prefix, query or hash\n * (`/learn/x
|
|
7199
|
+
"signature": "export interface I18nRoutingOptions<K extends string = string> {\n /** Prefix the default locale too (`/en/about` instead of `/about`). Default `false`. */\n readonly prefixDefaultLocale?: boolean;\n /** Explicit static, unprefixed canonical path → locale path mappings. Missing translations keep\n * the canonical pathname; availability still comes from `pageLocales`. No filesystem aliases,\n * dynamic slug translation or domain routing are created. Unicode is emitted percent-encoded. */\n readonly pathnames?: Readonly<Record<string, Partial<Record<K, string | undefined>>>>;\n /**\n * The locales a page exists in, by its canonical pathname without the locale prefix, query or hash\n * (`/learn/x`, the declared key for a mapped page); `undefined` for every served locale. It must be\n * pure: every page of one cluster has to answer the same set, or alternates stop being reciprocal.\n * A draft locale it names is left out; a key the registry does not declare throws.\n *\n * ```ts\n * pageLocales: (pathname) => (pathname.startsWith(\"/learn/\") ? [\"en\", \"hi\"] : undefined)\n * ```\n */\n readonly pageLocales?: (pathname: string) => readonly K[] | undefined;\n}"
|
|
7144
7200
|
},
|
|
7145
7201
|
{
|
|
7146
7202
|
"name": "IDEMPOTENT_REPLAY_HEADER",
|
|
@@ -7379,28 +7435,40 @@
|
|
|
7379
7435
|
"name": "Image",
|
|
7380
7436
|
"kind": "function",
|
|
7381
7437
|
"package": "@nifrajs/web-preact",
|
|
7382
|
-
"signature": "export declare function Image(props: ImageComponentProps): VNode;",
|
|
7383
|
-
"doc": "/**\n * Render a responsive, CLS-safe `<img>`.
|
|
7438
|
+
"signature": "export declare function Image(props: ImageComponentProps | StaticImageComponentProps): VNode;",
|
|
7439
|
+
"doc": "/**\n * Render a responsive, CLS-safe `<img>`. String URLs require dimensions; asset imports infer them;\n * `priority` marks the LCP image (`eager` + `fetchpriority=\"high\"`). Extra DOM props pass through.\n */"
|
|
7384
7440
|
},
|
|
7385
7441
|
{
|
|
7386
7442
|
"name": "Image",
|
|
7387
7443
|
"kind": "function",
|
|
7388
7444
|
"package": "@nifrajs/web-react",
|
|
7389
|
-
"signature": "export declare function Image(props: ImageComponentProps): ReactElement;",
|
|
7390
|
-
"doc": "/**\n * Render a responsive, CLS-safe `<img>`.
|
|
7445
|
+
"signature": "export declare function Image(props: ImageComponentProps | StaticImageComponentProps): ReactElement;",
|
|
7446
|
+
"doc": "/**\n * Render a responsive, CLS-safe `<img>`. String URLs require dimensions; asset imports infer them;\n * `priority` marks the LCP image (`eager` + `fetchpriority=\"high\"`). Extra DOM props pass through.\n */"
|
|
7391
7447
|
},
|
|
7392
7448
|
{
|
|
7393
7449
|
"name": "Image",
|
|
7394
7450
|
"kind": "function",
|
|
7395
7451
|
"package": "@nifrajs/web-solid",
|
|
7396
|
-
"signature": "export declare function Image(props: ImageComponentProps): JSX.Element;",
|
|
7397
|
-
"doc": "/**\n * Render a responsive, CLS-safe `<img>`.
|
|
7452
|
+
"signature": "export declare function Image(props: ImageComponentProps | StaticImageComponentProps): JSX.Element;",
|
|
7453
|
+
"doc": "/**\n * Render a responsive, CLS-safe `<img>`. String URLs require dimensions; asset imports infer them;\n * `priority` marks the LCP image (`eager` + `fetchpriority=\"high\"`). Extra DOM props pass through.\n */"
|
|
7398
7454
|
},
|
|
7399
7455
|
{
|
|
7400
7456
|
"name": "Image",
|
|
7401
7457
|
"kind": "const",
|
|
7402
7458
|
"package": "@nifrajs/web-vue",
|
|
7403
|
-
"signature": "export declare const Image: import(\"vue\").DefineComponent<import(\"vue\").ExtractPropTypes<{\n src: {\n type:
|
|
7459
|
+
"signature": "export declare const Image: import(\"vue\").DefineComponent<import(\"vue\").ExtractPropTypes<{\n src: {\n type: PropType<string | StaticImageData>;\n required: true;\n };\n width: {\n type: NumberConstructor;\n required: false;\n default: undefined;\n };\n height: {\n type: NumberConstructor;\n required: false;\n default: undefined;\n };\n alt: {\n type: StringConstructor;\n required: true;\n };\n sizes: {\n type: StringConstructor;\n required: false;\n default: undefined;\n };\n widths: {\n type: PropType<readonly number[]>;\n required: false;\n default: undefined;\n };\n quality: {\n type: NumberConstructor;\n required: false;\n default: undefined;\n };\n loading: {\n type: PropType<\"lazy\" | \"eager\">;\n required: false;\n default: undefined;\n };\n priority: {\n type: BooleanConstructor;\n required: false;\n default: undefined;\n };\n loader: {\n type: PropType<ImageLoader>;\n required: false;\n default: undefined;\n };\n}>, () => import(\"vue\").VNode<import(\"vue\").RendererNode, import(\"vue\").RendererElement, {\n [key: string]: any;\n}>, {}, {}, {}, import(\"vue\").ComponentOptionsMixin, import(\"vue\").ComponentOptionsMixin, {}, string, import(\"vue\").PublicProps, Readonly<import(\"vue\").ExtractPropTypes<{\n src: {\n type: PropType<string | StaticImageData>;\n required: true;\n };\n width: {\n type: NumberConstructor;\n required: false;\n default: undefined;\n };\n height: {\n type: NumberConstructor;\n required: false;\n default: undefined;\n };\n alt: {\n type: StringConstructor;\n required: true;\n };\n sizes: {\n type: StringConstructor;\n required: false;\n default: undefined;\n };\n widths: {\n type: PropType<readonly number[]>;\n required: false;\n default: undefined;\n };\n quality: {\n type: NumberConstructor;\n required: false;\n default: undefined;\n };\n loading: {\n type: PropType<\"lazy\" | \"eager\">;\n required: false;\n default: undefined;\n };\n priority: {\n type: BooleanConstructor;\n required: false;\n default: undefined;\n };\n loader: {\n type: PropType<ImageLoader>;\n required: false;\n default: undefined;\n };\n}>> & Readonly<{}>, {\n width: number;\n height: number;\n sizes: string;\n widths: readonly number[];\n quality: number;\n loading: \"lazy\" | \"eager\";\n priority: boolean;\n loader: ImageLoader;\n}, {}, {}, {}, string, import(\"vue\").ComponentProvideOptions, true, {}, any>;"
|
|
7460
|
+
},
|
|
7461
|
+
{
|
|
7462
|
+
"name": "ImageAssetPlugin",
|
|
7463
|
+
"kind": "interface",
|
|
7464
|
+
"package": "@nifrajs/image",
|
|
7465
|
+
"signature": "export interface ImageAssetPlugin {\n /** Nifra emits these content-hashed files with the bundle, never into the application's sources. */\n nifraStaticAssets(): readonly ImageBuildAsset[];\n /** The URL prefix baked into the imports; a build with another publicPath refuses the plugin. */\n readonly nifraPublicPath?: string;\n}"
|
|
7466
|
+
},
|
|
7467
|
+
{
|
|
7468
|
+
"name": "ImageAssets",
|
|
7469
|
+
"kind": "interface",
|
|
7470
|
+
"package": "@nifrajs/image",
|
|
7471
|
+
"signature": "export interface ImageAssets {\n /** Start a new module graph without retaining images from an earlier build. */\n clear(): void;\n load(file: string): Promise<StaticImageData>;\n assets(): readonly ImageBuildAsset[];\n}"
|
|
7404
7472
|
},
|
|
7405
7473
|
{
|
|
7406
7474
|
"name": "ImageBackend",
|
|
@@ -7409,6 +7477,26 @@
|
|
|
7409
7477
|
"signature": "export interface ImageBackend {\n /** Cheap, header-only metadata read. Throws {@link ImageProcessingError} (`decode` / `too_large`). */\n probe(bytes: Uint8Array): Promise<ImageProbe>;\n /** Decode → resize to `input.width` (aspect-preserving) → encode to `input.format`. */\n transform(input: ResizeInput): Promise<ResizeOutput>;\n}",
|
|
7410
7478
|
"doc": "/**\n * The codec seam. The handler owns all request-level security (validation, SSRF, byte/pixel caps,\n * concurrency, caching); a backend only decodes/resizes/encodes. Backends MUST translate codec failures\n * into {@link ImageProcessingError} so the handler can map them to stable HTTP statuses.\n */"
|
|
7411
7479
|
},
|
|
7480
|
+
{
|
|
7481
|
+
"name": "ImageBuildAsset",
|
|
7482
|
+
"kind": "interface",
|
|
7483
|
+
"package": "@nifrajs/image",
|
|
7484
|
+
"signature": "export interface ImageBuildAsset {\n readonly fileName: string;\n readonly source: Uint8Array;\n}",
|
|
7485
|
+
"doc": "/** The structural asset hook consumed by Nifra's build pipelines. Paths are relative to /assets/. */"
|
|
7486
|
+
},
|
|
7487
|
+
{
|
|
7488
|
+
"name": "ImageBuildOptions",
|
|
7489
|
+
"kind": "interface",
|
|
7490
|
+
"package": "@nifrajs/image",
|
|
7491
|
+
"signature": "export interface ImageBuildOptions {\n /** Only local files beneath this directory may be imported (symlinks are resolved). */\n readonly root?: string;\n /** Match the client build's publicPath: a root-relative prefix or an absolute http(s) CDN URL.\n * Default `/assets/`. */\n readonly publicPath?: string;\n /** Omit for codec-free metadata imports. Requested widths are clamped to the source width. */\n readonly widths?: readonly number[];\n /** Required when widths are requested; inject sharp, Bun.Image, or a WASM backend explicitly. */\n readonly backend?: ImageBackend;\n readonly format?: OutputFormat;\n readonly quality?: number;\n readonly maxSourceBytes?: number;\n readonly maxSourcePixels?: number;\n}"
|
|
7492
|
+
},
|
|
7493
|
+
{
|
|
7494
|
+
"name": "ImageBunPlugin",
|
|
7495
|
+
"kind": "interface",
|
|
7496
|
+
"package": "@nifrajs/image",
|
|
7497
|
+
"signature": "export interface ImageBunPlugin extends ImageAssetPlugin {\n readonly name: string;\n setup(build: ImageBunBuild): void;\n}",
|
|
7498
|
+
"doc": "/** Structural Bun hooks keep the shared plugin entry usable without Bun's ambient types. */"
|
|
7499
|
+
},
|
|
7412
7500
|
{
|
|
7413
7501
|
"name": "ImageComponentProps",
|
|
7414
7502
|
"kind": "interface",
|
|
@@ -7452,6 +7540,12 @@
|
|
|
7452
7540
|
"package": "@nifrajs/image",
|
|
7453
7541
|
"signature": "export interface ImageInfo {\n readonly width: number;\n readonly height: number;\n readonly format: ImageFormat;\n}"
|
|
7454
7542
|
},
|
|
7543
|
+
{
|
|
7544
|
+
"name": "ImageInputProps",
|
|
7545
|
+
"kind": "type",
|
|
7546
|
+
"package": "@nifrajs/image",
|
|
7547
|
+
"signature": "export type ImageInputProps = ImageProps | StaticImageProps;"
|
|
7548
|
+
},
|
|
7455
7549
|
{
|
|
7456
7550
|
"name": "ImageLoader",
|
|
7457
7551
|
"kind": "type",
|
|
@@ -7466,6 +7560,12 @@
|
|
|
7466
7560
|
"signature": "export declare class ImagePixelLimitError extends Error {\n readonly width: number;\n readonly height: number;\n readonly maxPixels: number;\n constructor(width: number, height: number, maxPixels: number);\n}",
|
|
7467
7561
|
"doc": "/** Thrown before decoding a source larger than `maxPixels`; answer it with a `413`. */"
|
|
7468
7562
|
},
|
|
7563
|
+
{
|
|
7564
|
+
"name": "ImagePresentationProps",
|
|
7565
|
+
"kind": "interface",
|
|
7566
|
+
"package": "@nifrajs/image",
|
|
7567
|
+
"signature": "export interface ImagePresentationProps {\n /** Alt text - **required** for accessibility (use `alt=\"\"` for decorative images). */\n readonly alt: string;\n /** `sizes` attribute for responsive selection (e.g. `\"(max-width: 600px) 100vw, 600px\"`). */\n readonly sizes?: string;\n /** Widths to generate `srcSet` entries for. Default: `[width, width*2]` (1×/2× retina). */\n readonly widths?: readonly number[];\n /** Quality passed to the loader. */\n readonly quality?: number;\n /** `lazy` (default) or `eager`. `priority` overrides this to eager. */\n readonly loading?: \"lazy\" | \"eager\";\n /** Mark the LCP image: `loading=\"eager\"` + `fetchpriority=\"high\"`. */\n readonly priority?: boolean;\n}"
|
|
7568
|
+
},
|
|
7469
7569
|
{
|
|
7470
7570
|
"name": "ImageProbe",
|
|
7471
7571
|
"kind": "interface",
|
|
@@ -7484,7 +7584,8 @@
|
|
|
7484
7584
|
"name": "ImageProps",
|
|
7485
7585
|
"kind": "interface",
|
|
7486
7586
|
"package": "@nifrajs/image",
|
|
7487
|
-
"signature": "export interface ImageProps {\n readonly src: string;\n
|
|
7587
|
+
"signature": "export interface ImageProps extends ImagePresentationProps {\n readonly src: string;\n readonly width: number;\n readonly height: number;\n}",
|
|
7588
|
+
"doc": "/** String URLs retain the original, extendable props contract. */"
|
|
7488
7589
|
},
|
|
7489
7590
|
{
|
|
7490
7591
|
"name": "ImageReencoder",
|
|
@@ -7493,6 +7594,13 @@
|
|
|
7493
7594
|
"signature": "export interface ImageReencoder {\n probe(bytes: Uint8Array): Promise<{\n readonly width: number;\n readonly height: number;\n readonly format: string;\n }>;\n transform(input: {\n readonly bytes: Uint8Array;\n readonly width: number;\n readonly quality: number;\n readonly format: StripFormat;\n }): Promise<{\n readonly bytes: Uint8Array;\n }>;\n}",
|
|
7494
7595
|
"doc": "/** The slice of `@nifrajs/image`'s `ImageBackend` this needs - `probe` for dims/format, `transform` to re-encode. */"
|
|
7495
7596
|
},
|
|
7597
|
+
{
|
|
7598
|
+
"name": "ImageVitePlugin",
|
|
7599
|
+
"kind": "interface",
|
|
7600
|
+
"package": "@nifrajs/image",
|
|
7601
|
+
"signature": "export interface ImageVitePlugin extends ImageAssetPlugin {\n readonly name: string;\n readonly enforce: \"pre\";\n configResolved(): void;\n load(this: ImageLoadContext, id: string): Promise<string | undefined>;\n configureServer(server: ImageDevServer): void;\n}",
|
|
7602
|
+
"doc": "/** Structural Vite plugin type: the image package does not depend on Vite at runtime. */"
|
|
7603
|
+
},
|
|
7496
7604
|
{
|
|
7497
7605
|
"name": "ImpactReport",
|
|
7498
7606
|
"kind": "interface",
|
|
@@ -7689,6 +7797,20 @@
|
|
|
7689
7797
|
"signature": "export interface InfiniteQueryOptions<T, P> extends QueryOptions {\n /** The param the FIRST page is fetched with. */\n readonly initialPageParam: P;\n /** Derive the next page's param from the last fetched page (and all pages/params). `undefined`/`null`\n * ⇒ no next page (`hasNextPage` is false). */\n readonly getNextPageParam: (lastPage: T, allPages: readonly T[], lastPageParam: P, allPageParams: readonly P[]) => P | undefined | null;\n /** Derive the previous page's param (for bidirectional infinite lists). Omit ⇒ no previous page. */\n readonly getPreviousPageParam?: (firstPage: T, allPages: readonly T[], firstPageParam: P, allPageParams: readonly P[]) => P | undefined | null;\n}",
|
|
7690
7798
|
"doc": "/** Options for an {@link InfiniteQueryHandle}. `getNextPageParam` (required) derives the param for the\n * next page from the last page - return `undefined`/`null` to signal there is no next page. */"
|
|
7691
7799
|
},
|
|
7800
|
+
{
|
|
7801
|
+
"name": "InfiniteQuerySnapshot",
|
|
7802
|
+
"kind": "interface",
|
|
7803
|
+
"package": "@nifrajs/web-svelte",
|
|
7804
|
+
"signature": "export interface InfiniteQuerySnapshot<T, P> extends QueryState<InfiniteData<T, P>> {\n readonly hasNextPage: boolean;\n readonly hasPreviousPage: boolean;\n}",
|
|
7805
|
+
"doc": "/** Svelte's infinite-query snapshot includes page availability alongside the shared query state. */"
|
|
7806
|
+
},
|
|
7807
|
+
{
|
|
7808
|
+
"name": "InfiniteQueryStore",
|
|
7809
|
+
"kind": "type",
|
|
7810
|
+
"package": "@nifrajs/web-svelte",
|
|
7811
|
+
"signature": "export type InfiniteQueryStore<T, P> = Readable<InfiniteQuerySnapshot<T, P>> & {\n readonly fetchNextPage: () => Promise<InfiniteData<T, P>>;\n readonly fetchPreviousPage: () => Promise<InfiniteData<T, P>>;\n readonly refetch: () => Promise<InfiniteData<T, P>>;\n};",
|
|
7812
|
+
"doc": "/** A Svelte readable infinite-query snapshot with page controls. */"
|
|
7813
|
+
},
|
|
7692
7814
|
{
|
|
7693
7815
|
"name": "InjectedClock",
|
|
7694
7816
|
"kind": "interface",
|
|
@@ -8487,7 +8609,7 @@
|
|
|
8487
8609
|
"name": "LinkProps",
|
|
8488
8610
|
"kind": "interface",
|
|
8489
8611
|
"package": "@nifrajs/web-react",
|
|
8490
|
-
"signature": "export interface LinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, \"href\"> {\n /**
|
|
8612
|
+
"signature": "export interface LinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, \"href\"> {\n /** The destination: an `Href` from `href()` or `rawHref()`. Rendered as the `<a href>`. A value that is\n * not a same-origin path (a forged `Href`) renders the `<a>` without an `href`, does nothing on click and\n * logs a `console.error`; a link to another site is a plain `<a>`. */\n readonly to: Href;\n /** Replace the current history entry instead of pushing. */\n readonly replace?: boolean;\n /** When the link warms its route ahead of a click - rendered as `data-nifra-prefetch`. Unset, the\n * nearest ancestor's `data-nifra-prefetch` decides, else `intent` (hover or focus). */\n readonly prefetch?: PrefetchMode;\n}",
|
|
8491
8613
|
"doc": "/** {@link Link} props: every `<a>` attribute except `href` (set from `to`), plus `to`, `replace` and\n * `prefetch`. */"
|
|
8492
8614
|
},
|
|
8493
8615
|
{
|
|
@@ -8820,7 +8942,7 @@
|
|
|
8820
8942
|
"name": "LocalizedRouter",
|
|
8821
8943
|
"kind": "interface",
|
|
8822
8944
|
"package": "@nifrajs/i18n",
|
|
8823
|
-
"signature": "export interface LocalizedRouter<K extends string = string> {\n /** The registry this router reads. */\n readonly locales: Locales<K>;\n /** Prefix `path` with `locale` (`/about` → `/fr/about`), unless it is the unprefixed default.\n * The query and trailing slash ride along, the hash too; an already-
|
|
8945
|
+
"signature": "export interface LocalizedRouter<K extends string = string> {\n /** The registry this router reads. */\n readonly locales: Locales<K>;\n /** Prefix `path` with `locale` (`/about` → `/fr/about`), unless it is the unprefixed default.\n * The query and trailing slash ride along, the hash too; an already-localized path is translated\n * through its canonical mapping. A locale that is not served throws. */\n localizePathname(path: string, locale: K, options?: LocalizeOptions): string;\n /** Strip a served locale prefix and resolve a translated static pathname to its canonical path.\n * Unmapped paths keep their spelling; unknown and draft prefixes remain ordinary segments. */\n unlocalizePathname(path: string): UnlocalizedPath<K>;\n /** The served locale a path's first segment names, or `undefined` when unprefixed. */\n getPathLocale(path: string): K | undefined;\n /** The locale a path is in: its prefix, or the default for an unprefixed path. */\n localeOf(path: string): K;\n /** The served locales the page at `path` exists in (any prefix, or none), in registry order: what\n * `pageLocales` says, or every served locale. The callback sees the canonical mapping key. */\n localesOf(path: string): readonly K[];\n /** Mapped public paths only, in mapping declaration then served registry order, filtered by\n * `pageLocales`. Unmapped filesystem routes are not enumerated. No query, hash or trailing slash. */\n staticPathnames(): readonly string[];\n /** The page's canonical URL and its `hreflang` alternates, one per locale the page exists in\n * (`pageLocales`, unless `options.locales` names them). `path` may carry any served prefix or none\n * (it decides the canonical's locale); its query is kept and its hash dropped. A page in one locale\n * only, or in none, has no alternates. */\n alternates(path: string, options?: AlternatesOptions<K>): Alternates;\n /**\n * Check the value of a `[lang]` / `[[lang]]` route segment that is the path's first segment.\n * `pathname` is the request's path (query allowed), used to build a redirect. A page that does not\n * exist in the locale (`pageLocales`) is not found.\n *\n * ```ts\n * // routes/[lang]/_layout.backend.ts\n * import { notFound, type RouteMiddleware, redirect } from \"@nifrajs/web\"\n * import { urls } from \"../../shared/i18n\"\n *\n * export const middleware: RouteMiddleware = (ctx) => {\n * const { pathname, search } = new URL(ctx.request.url)\n * const match = urls.matchSegment(ctx.params.lang, pathname + search)\n * if (match.kind === \"not-found\") notFound()\n * if (match.kind === \"redirect\") return redirect(match.location, { status: 308 })\n * }\n * ```\n */\n matchSegment(value: string | undefined, pathname: string): SegmentMatch<K>;\n}"
|
|
8824
8946
|
},
|
|
8825
8947
|
{
|
|
8826
8948
|
"name": "Location",
|
|
@@ -9920,14 +10042,28 @@
|
|
|
9920
10042
|
"name": "MutationCallbacks",
|
|
9921
10043
|
"kind": "interface",
|
|
9922
10044
|
"package": "@nifrajs/web",
|
|
9923
|
-
"signature": "export interface MutationCallbacks<TData, TVariables> {\n readonly onMutate?: (variables: TVariables) => void | Promise<void>;\n readonly onSuccess?: (data: TData, variables: TVariables) => void | Promise<void>;\n readonly onError?: (error: unknown, variables: TVariables) => void | Promise<void>;\n readonly onSettled?: (data: TData | undefined, error: unknown, variables: TVariables) => void | Promise<void>;\n}",
|
|
10045
|
+
"signature": "export interface MutationCallbacks<TData, TVariables> {\n readonly onMutate?: (variables: TVariables, context: MutationContext) => void | Promise<void>;\n readonly onSuccess?: (data: TData, variables: TVariables, context: MutationContext) => void | Promise<void>;\n readonly onError?: (error: unknown, variables: TVariables, context: MutationContext) => void | Promise<void>;\n readonly onSettled?: (data: TData | undefined, error: unknown, variables: TVariables, context: MutationContext) => void | Promise<void>;\n}",
|
|
9924
10046
|
"doc": "/** Lifecycle callbacks for a mutation. All optional; `onSettled` runs after success OR error. */"
|
|
9925
10047
|
},
|
|
10048
|
+
{
|
|
10049
|
+
"name": "MutationCancelledError",
|
|
10050
|
+
"kind": "class",
|
|
10051
|
+
"package": "@nifrajs/web",
|
|
10052
|
+
"signature": "export declare class MutationCancelledError extends Error {\n constructor();\n}",
|
|
10053
|
+
"doc": "/** Rejection returned when {@link MutationHandle.cancel} discards an in-flight result. */"
|
|
10054
|
+
},
|
|
10055
|
+
{
|
|
10056
|
+
"name": "MutationContext",
|
|
10057
|
+
"kind": "interface",
|
|
10058
|
+
"package": "@nifrajs/web",
|
|
10059
|
+
"signature": "export interface MutationContext {\n readonly signal: AbortSignal;\n}",
|
|
10060
|
+
"doc": "/** Cooperative cancellation context supplied to mutation functions and callbacks. */"
|
|
10061
|
+
},
|
|
9926
10062
|
{
|
|
9927
10063
|
"name": "MutationHandle",
|
|
9928
10064
|
"kind": "interface",
|
|
9929
10065
|
"package": "@nifrajs/web",
|
|
9930
|
-
"signature": "export interface MutationHandle<TData, TVariables> {\n snapshot: () => MutationState<TData, TVariables>;\n subscribe: (listener: () => void) => () => void;\n /** Run the mutation. Resolves to the data (and runs onSuccess/onSettled) or rejects (onError/onSettled);\n * a throwing `onMutate` fails it the same way. A throwing `onSuccess` or `onSettled` after the write\n * rejects the call but leaves the state `success` and never calls `onError`. The latest concurrent\n * call wins the published state (older results are dropped). */\n mutate: (variables: TVariables) => Promise<TData>;\n /** Rebind the latest `fn`/callbacks (closures change between renders) without losing state. */\n rebind: (fn: (variables: TVariables) => Promise<TData>, callbacks: MutationCallbacks<TData, TVariables>) => void;\n /** Reset to the idle state (clears data/error/variables). */\n reset: () => void;\n}",
|
|
10066
|
+
"signature": "export interface MutationHandle<TData, TVariables> {\n snapshot: () => MutationState<TData, TVariables>;\n subscribe: (listener: () => void) => () => void;\n /** Run the mutation. Resolves to the data (and runs onSuccess/onSettled) or rejects (onError/onSettled);\n * a throwing `onMutate` fails it the same way. A throwing `onSuccess` or `onSettled` after the write\n * rejects the call but leaves the state `success` and never calls `onError`. The latest concurrent\n * call wins the published state (older results are dropped). */\n mutate: (variables: TVariables) => Promise<TData>;\n /** Rebind the latest `fn`/callbacks (closures change between renders) without losing state. */\n rebind: (fn: (variables: TVariables, context: MutationContext) => Promise<TData>, callbacks: MutationCallbacks<TData, TVariables>) => void;\n /** Reset to the idle state (clears data/error/variables). */\n reset: () => void;\n /** Reject pending mutate promises, discard local state and abort the signal. Uncooperative work may\n * continue; the server may still finish an accepted request. */\n cancel: () => void;\n}",
|
|
9931
10067
|
"doc": "/** A standalone mutation store: subscribe to its state, fire `mutate`, `reset` back to idle. */"
|
|
9932
10068
|
},
|
|
9933
10069
|
{
|
|
@@ -9944,6 +10080,13 @@
|
|
|
9944
10080
|
"signature": "export type MutationStatus = \"idle\" | \"pending\" | \"success\" | \"error\";",
|
|
9945
10081
|
"doc": "/** A mutation's lifecycle status. */"
|
|
9946
10082
|
},
|
|
10083
|
+
{
|
|
10084
|
+
"name": "MutationStore",
|
|
10085
|
+
"kind": "type",
|
|
10086
|
+
"package": "@nifrajs/web-svelte",
|
|
10087
|
+
"signature": "export type MutationStore<TData, TVariables> = Readable<MutationState<TData, TVariables>> & {\n readonly mutate: (variables: TVariables) => void;\n readonly mutateAsync: (variables: TVariables) => Promise<TData>;\n readonly reset: () => void;\n readonly cancel: () => void;\n};",
|
|
10088
|
+
"doc": "/** A Svelte readable mutation state, augmented with imperative controls. */"
|
|
10089
|
+
},
|
|
9947
10090
|
{
|
|
9948
10091
|
"name": "NAMESPACED_KEYS",
|
|
9949
10092
|
"kind": "const",
|
|
@@ -10164,49 +10307,49 @@
|
|
|
10164
10307
|
"kind": "function",
|
|
10165
10308
|
"package": "@nifrajs/web-react",
|
|
10166
10309
|
"signature": "export declare function Navigate({ to, replace }: NavigateProps): null;",
|
|
10167
|
-
"doc": "/**\n * Declaratively navigate on mount - the component analogue of `useNavigate` (e.g. a guard that renders\n * `<Navigate to
|
|
10310
|
+
"doc": "/**\n * Declaratively navigate on mount - the component analogue of `useNavigate` (e.g. a guard that renders\n * `<Navigate to={href({ to: \"/login\" })} replace />`). Navigates in an effect, so it's a safe no-op during SSR (renders\n * `null`); the redirect happens once on the client after hydration.\n */"
|
|
10168
10311
|
},
|
|
10169
10312
|
{
|
|
10170
10313
|
"name": "NavigateFunction",
|
|
10171
|
-
"kind": "
|
|
10314
|
+
"kind": "type",
|
|
10172
10315
|
"package": "@nifrajs/web",
|
|
10173
|
-
"signature": "export
|
|
10174
|
-
"doc": "/**\n * A programmatic navigate, shared by every adapter's `useNavigate`.
|
|
10316
|
+
"signature": "export type NavigateFunction = (to: Href | number, options?: NavigateOptions) => void;",
|
|
10317
|
+
"doc": "/**\n * A programmatic navigate, shared by every adapter's `useNavigate`. It takes an {@link Href}, built by\n * `href({ to, params, search, hash })` or `rawHref(path)` (push, or replace with `{ replace: true }`), or a\n * history delta (`-1` back, `1` forward). A plain string or a template literal is a compile error: the\n * route, its params and its search are checked where the link is built. A no-op on the server and before\n * hydration.\n */"
|
|
10175
10318
|
},
|
|
10176
10319
|
{
|
|
10177
10320
|
"name": "NavigateFunction",
|
|
10178
|
-
"kind": "
|
|
10321
|
+
"kind": "type",
|
|
10179
10322
|
"package": "@nifrajs/web-preact",
|
|
10180
|
-
"signature": "export
|
|
10181
|
-
"doc": "/**\n * A programmatic navigate, shared by every adapter's `useNavigate`.
|
|
10323
|
+
"signature": "export type NavigateFunction = (to: Href | number, options?: NavigateOptions) => void;",
|
|
10324
|
+
"doc": "/**\n * A programmatic navigate, shared by every adapter's `useNavigate`. It takes an {@link Href}, built by\n * `href({ to, params, search, hash })` or `rawHref(path)` (push, or replace with `{ replace: true }`), or a\n * history delta (`-1` back, `1` forward). A plain string or a template literal is a compile error: the\n * route, its params and its search are checked where the link is built. A no-op on the server and before\n * hydration.\n */"
|
|
10182
10325
|
},
|
|
10183
10326
|
{
|
|
10184
10327
|
"name": "NavigateFunction",
|
|
10185
|
-
"kind": "
|
|
10328
|
+
"kind": "type",
|
|
10186
10329
|
"package": "@nifrajs/web-react",
|
|
10187
|
-
"signature": "export
|
|
10188
|
-
"doc": "/**\n * A programmatic navigate, shared by every adapter's `useNavigate`.
|
|
10330
|
+
"signature": "export type NavigateFunction = (to: Href | number, options?: NavigateOptions) => void;",
|
|
10331
|
+
"doc": "/**\n * A programmatic navigate, shared by every adapter's `useNavigate`. It takes an {@link Href}, built by\n * `href({ to, params, search, hash })` or `rawHref(path)` (push, or replace with `{ replace: true }`), or a\n * history delta (`-1` back, `1` forward). A plain string or a template literal is a compile error: the\n * route, its params and its search are checked where the link is built. A no-op on the server and before\n * hydration.\n */"
|
|
10189
10332
|
},
|
|
10190
10333
|
{
|
|
10191
10334
|
"name": "NavigateFunction",
|
|
10192
|
-
"kind": "
|
|
10335
|
+
"kind": "type",
|
|
10193
10336
|
"package": "@nifrajs/web-solid",
|
|
10194
|
-
"signature": "export
|
|
10195
|
-
"doc": "/**\n * A programmatic navigate, shared by every adapter's `useNavigate`.
|
|
10337
|
+
"signature": "export type NavigateFunction = (to: Href | number, options?: NavigateOptions) => void;",
|
|
10338
|
+
"doc": "/**\n * A programmatic navigate, shared by every adapter's `useNavigate`. It takes an {@link Href}, built by\n * `href({ to, params, search, hash })` or `rawHref(path)` (push, or replace with `{ replace: true }`), or a\n * history delta (`-1` back, `1` forward). A plain string or a template literal is a compile error: the\n * route, its params and its search are checked where the link is built. A no-op on the server and before\n * hydration.\n */"
|
|
10196
10339
|
},
|
|
10197
10340
|
{
|
|
10198
10341
|
"name": "NavigateFunction",
|
|
10199
|
-
"kind": "
|
|
10342
|
+
"kind": "type",
|
|
10200
10343
|
"package": "@nifrajs/web-svelte",
|
|
10201
|
-
"signature": "export
|
|
10202
|
-
"doc": "/**\n * A programmatic navigate, shared by every adapter's `useNavigate`.
|
|
10344
|
+
"signature": "export type NavigateFunction = (to: Href | number, options?: NavigateOptions) => void;",
|
|
10345
|
+
"doc": "/**\n * A programmatic navigate, shared by every adapter's `useNavigate`. It takes an {@link Href}, built by\n * `href({ to, params, search, hash })` or `rawHref(path)` (push, or replace with `{ replace: true }`), or a\n * history delta (`-1` back, `1` forward). A plain string or a template literal is a compile error: the\n * route, its params and its search are checked where the link is built. A no-op on the server and before\n * hydration.\n */"
|
|
10203
10346
|
},
|
|
10204
10347
|
{
|
|
10205
10348
|
"name": "NavigateFunction",
|
|
10206
|
-
"kind": "
|
|
10349
|
+
"kind": "type",
|
|
10207
10350
|
"package": "@nifrajs/web-vue",
|
|
10208
|
-
"signature": "export
|
|
10209
|
-
"doc": "/**\n * A programmatic navigate, shared by every adapter's `useNavigate`.
|
|
10351
|
+
"signature": "export type NavigateFunction = (to: Href | number, options?: NavigateOptions) => void;",
|
|
10352
|
+
"doc": "/**\n * A programmatic navigate, shared by every adapter's `useNavigate`. It takes an {@link Href}, built by\n * `href({ to, params, search, hash })` or `rawHref(path)` (push, or replace with `{ replace: true }`), or a\n * history delta (`-1` back, `1` forward). A plain string or a template literal is a compile error: the\n * route, its params and its search are checked where the link is built. A no-op on the server and before\n * hydration.\n */"
|
|
10210
10353
|
},
|
|
10211
10354
|
{
|
|
10212
10355
|
"name": "NavigateOptions",
|
|
@@ -10219,23 +10362,9 @@
|
|
|
10219
10362
|
"name": "NavigateProps",
|
|
10220
10363
|
"kind": "interface",
|
|
10221
10364
|
"package": "@nifrajs/web-react",
|
|
10222
|
-
"signature": "export interface NavigateProps {\n readonly to:
|
|
10365
|
+
"signature": "export interface NavigateProps {\n readonly to: Href;\n readonly replace?: boolean;\n}",
|
|
10223
10366
|
"doc": "/** {@link Navigate} props: the destination `to` and whether to `replace` the history entry. */"
|
|
10224
10367
|
},
|
|
10225
|
-
{
|
|
10226
|
-
"name": "NavigateSearchOf",
|
|
10227
|
-
"kind": "type",
|
|
10228
|
-
"package": "@nifrajs/web",
|
|
10229
|
-
"signature": "export type NavigateSearchOf<To extends string> = To extends keyof RouteSearch ? RouteSearch[To] : Record<string, unknown>;",
|
|
10230
|
-
"doc": "/**\n * The `search` type for a navigate to `To`: the route's schema output when `To` is a mapped\n * {@link RouteSearch} key, otherwise the loose `Record<string, unknown>` (so a navigate to any path is\n * always allowed). Keyed on `To` rather than a union, so a mapped route can't fall back to the loose form\n * with a wrong shape - `navigate({ to: \"/reports\", search: { page: \"x\" } })` is a compile error.\n */"
|
|
10231
|
-
},
|
|
10232
|
-
{
|
|
10233
|
-
"name": "NavigateTargetInput",
|
|
10234
|
-
"kind": "interface",
|
|
10235
|
-
"package": "@nifrajs/web",
|
|
10236
|
-
"signature": "export interface NavigateTargetInput {\n readonly to: string;\n readonly search?: Record<string, unknown>;\n readonly replace?: boolean;\n readonly state?: unknown;\n}",
|
|
10237
|
-
"doc": "/** The runtime shape of an object-form navigate target (loose - the typed narrowing lives in\n * {@link NavigateFunction}'s generic call signature). `to` is a bare pathname; `search` is serialized\n * onto it; `replace` folds into the options. */"
|
|
10238
|
-
},
|
|
10239
10368
|
{
|
|
10240
10369
|
"name": "Navigation",
|
|
10241
10370
|
"kind": "interface",
|
|
@@ -11415,7 +11544,7 @@
|
|
|
11415
11544
|
"kind": "interface",
|
|
11416
11545
|
"package": "@nifrajs/web",
|
|
11417
11546
|
"signature": "export interface PprSetup {\n readonly [PPR_SETUP]: (environment: PprEnvironment) => PprIntegration;\n}",
|
|
11418
|
-
"doc": "/** What `partialPrerendering()` returns for `createWebApp({
|
|
11547
|
+
"doc": "/** What `partialPrerendering()` returns for `createWebApp({ ppr })`. */"
|
|
11419
11548
|
},
|
|
11420
11549
|
{
|
|
11421
11550
|
"name": "PprShells",
|
|
@@ -11912,7 +12041,7 @@
|
|
|
11912
12041
|
"name": "QueryClient",
|
|
11913
12042
|
"kind": "interface",
|
|
11914
12043
|
"package": "@nifrajs/web",
|
|
11915
|
-
"signature": "export interface QueryClient {\n /** Get the stable {@link QueryHandle} for `key`, fetched via `fn`. Re-binds the latest `fn` (and\n * `options`) each call (closures change between renders); returns the same handle for the same\n * (hashed) key. */\n query: <T>(key: unknown, fn: () => Promise<T>, options?: QueryOptions) => QueryHandle<T>;\n /** Get the stable {@link InfiniteQueryHandle} for `key`, whose pages are fetched via `fn(pageParam)`. */\n infiniteQuery: <T, P>(key: unknown, fn: (pageParam: P) => Promise<T>, options: InfiniteQueryOptions<T, P>) => InfiniteQueryHandle<T, P>;\n /** Mark matching cached queries, infinite ones included, stale and refetch the **mounted** ones\n * (subscribers > 0). Array keys match by **prefix** (`[\"todo\"]` ⇒ every `[\"todo\", …]`); other keys\n * match exactly. */\n invalidateQueries: (keyOrPrefix: unknown) => void;\n /** Read a cached query's data (`undefined` if absent or not yet successful). Synchronous, no fetch. */\n getQueryData: <T>(key: unknown) => T | undefined;\n /** Write a query's data directly (optimistic updates, or seeding). Creates the entry if absent; marks\n * it fresh (`updatedAt = now`). `updater` may be a value or a function of the previous data. */\n setQueryData: <T>(key: unknown, updater: T | ((prev: T | undefined) => T)) => void;\n /** Fetch + cache a query's data WITHOUT subscribing (SSR prefetch, hover warm). Resolves when cached;\n * a fresh entry is a no-op. Rejects if the fetch throws (caller may swallow). */\n prefetchQuery: <T>(key: unknown, fn: () => Promise<T>, options?: QueryOptions) => Promise<void>;\n /** Serialize
|
|
12044
|
+
"signature": "export interface QueryClient {\n /** Get the stable {@link QueryHandle} for `key`, fetched via `fn`. Re-binds the latest `fn` (and\n * `options`) each call (closures change between renders); returns the same handle for the same\n * (hashed) key. */\n query: <T>(key: unknown, fn: () => Promise<T>, options?: QueryOptions) => QueryHandle<T>;\n /** Get the stable {@link InfiniteQueryHandle} for `key`, whose pages are fetched via `fn(pageParam)`. */\n infiniteQuery: <T, P>(key: unknown, fn: (pageParam: P) => Promise<T>, options: InfiniteQueryOptions<T, P>) => InfiniteQueryHandle<T, P>;\n /** Mark matching cached queries, infinite ones included, stale and refetch the **mounted** ones\n * (subscribers > 0). Array keys match by **prefix** (`[\"todo\"]` ⇒ every `[\"todo\", …]`); other keys\n * match exactly. */\n invalidateQueries: (keyOrPrefix: unknown) => void;\n /** Read a cached query's data (`undefined` if absent or not yet successful). Synchronous, no fetch. */\n getQueryData: <T>(key: unknown) => T | undefined;\n /** Write a query's data directly (optimistic updates, or seeding). Creates the entry if absent; marks\n * it fresh (`updatedAt = now`). `updater` may be a value or a function of the previous data. */\n setQueryData: <T>(key: unknown, updater: T | ((prev: T | undefined) => T)) => void;\n /** Fetch + cache a query's data WITHOUT subscribing (SSR prefetch, hover warm). Resolves when cached;\n * a fresh entry is a no-op. Rejects if the fetch throws (caller may swallow). */\n prefetchQuery: <T>(key: unknown, fn: () => Promise<T>, options?: QueryOptions) => Promise<void>;\n /** Serialize the successful queries that `options.shouldDehydrateQuery` selects to a transferable\n * snapshot (server → client SSR bridge). Deny by default: with no filter the snapshot is empty. */\n dehydrate: (options?: DehydrateOptions) => DehydratedState;\n /** Seed the cache from a {@link dehydrate} snapshot (client boot). Existing fresher entries win. */\n hydrate: (state: DehydratedState) => void;\n /** Drop every cached query: mounted ones go back to pending and refetch, the rest are removed. Every\n * client in the page runs it when the visitor changes: `identityChanged()` in this tab, a live\n * account switch, or, on the client's next read, a new identity epoch cookie. */\n clear: () => void;\n}",
|
|
11916
12045
|
"doc": "/** The keyed query cache. One per app (a binding registers it like the router). */"
|
|
11917
12046
|
},
|
|
11918
12047
|
{
|
|
@@ -11921,6 +12050,13 @@
|
|
|
11921
12050
|
"package": "@nifrajs/web",
|
|
11922
12051
|
"signature": "export interface QueryClientOptions {\n /** Monotonic clock in ms - injected so the core stays deterministic + testable; the adapter binding\n * passes `() => Date.now()`. */\n readonly now: () => number;\n /** Data stays fresh this long after a fetch; older ⇒ refetch on the next `fetch()` (default `0`). */\n readonly staleTime?: number;\n /** Evict an entry this long (ms) after its last subscriber leaves (default 5 min). */\n readonly gcTime?: number;\n /** Hard cap on cached entries - LRU-evict the oldest *unsubscribed* entry past it (default 1000). */\n readonly max?: number;\n}"
|
|
11923
12052
|
},
|
|
12053
|
+
{
|
|
12054
|
+
"name": "QueryClientProvider",
|
|
12055
|
+
"kind": "function",
|
|
12056
|
+
"package": "@nifrajs/web-preact",
|
|
12057
|
+
"signature": "export declare function QueryClientProvider(props: {\n readonly client: QueryClient;\n readonly children?: ComponentChildren;\n}): ComponentChildren;",
|
|
12058
|
+
"doc": "/** Provide an SSR/request-scoped query client or an application-specific client. */"
|
|
12059
|
+
},
|
|
11924
12060
|
{
|
|
11925
12061
|
"name": "QueryClientProvider",
|
|
11926
12062
|
"kind": "function",
|
|
@@ -11928,6 +12064,13 @@
|
|
|
11928
12064
|
"signature": "export declare function QueryClientProvider(props: {\n readonly client: QueryClient;\n readonly children?: ReactNode;\n}): ReactNode;",
|
|
11929
12065
|
"doc": "/** Provide a {@link QueryClient} to the tree - required for SSR dehydrate/hydrate and for tests; a\n * client-only app can omit it and rely on the built-in client-side singleton. */"
|
|
11930
12066
|
},
|
|
12067
|
+
{
|
|
12068
|
+
"name": "QueryClientProvider",
|
|
12069
|
+
"kind": "function",
|
|
12070
|
+
"package": "@nifrajs/web-solid",
|
|
12071
|
+
"signature": "export declare function QueryClientProvider(props: {\n readonly client: QueryClient;\n readonly state?: DehydratedState;\n readonly children?: JSX.Element;\n}): JSX.Element;",
|
|
12072
|
+
"doc": "/** Provide a request-scoped client and optionally seed it before descendants run. */"
|
|
12073
|
+
},
|
|
11931
12074
|
{
|
|
11932
12075
|
"name": "QueryHandle",
|
|
11933
12076
|
"kind": "interface",
|
|
@@ -12175,6 +12318,13 @@
|
|
|
12175
12318
|
"signature": "export declare const ROUTE_PATTERN_OVERLAP_MAX_STATES = 100000;",
|
|
12176
12319
|
"doc": "/** Hard budget for the offline route-language intersection. Never use this on the request path. */"
|
|
12177
12320
|
},
|
|
12321
|
+
{
|
|
12322
|
+
"name": "ROUTE_TABLE_FILE",
|
|
12323
|
+
"kind": "const",
|
|
12324
|
+
"package": "@nifrajs/web",
|
|
12325
|
+
"signature": "export declare const ROUTE_TABLE_FILE = \".nifra/types/routes.d.ts\";",
|
|
12326
|
+
"doc": "/** The generated `RouteTable`, relative to the app root. */"
|
|
12327
|
+
},
|
|
12178
12328
|
{
|
|
12179
12329
|
"name": "ROUTE_TYPES_DIR",
|
|
12180
12330
|
"kind": "const",
|
|
@@ -13687,7 +13837,7 @@
|
|
|
13687
13837
|
"name": "RouteModule",
|
|
13688
13838
|
"kind": "interface",
|
|
13689
13839
|
"package": "@nifrajs/web",
|
|
13690
|
-
"signature": "export interface RouteModule {\n readonly default: unknown;\n readonly loader?: Loader;\n /** Layout loader that must run before actions and is not retained across the action's render. */\n readonly gate?: boolean;\n readonly action?: Action;\n /**\n * Backend half only: which browser origins may POST to {@link action}. When omitted, a request\n * whose `Origin` is another site's is refused with 403 before middleware, gates or the action run;\n * requests without an `Origin` (non-browser clients) pass. An array allows exactly those origins\n * (and refuses a request without one); a function decides, receiving `null` when there is none.\n * Use it for a callback a third party posts to, such as an identity provider's `form_post`.\n * `Origin` is browser-enforced, not authentication: keep the action's own auth checks.\n */\n readonly allowedOrigins?: ReadonlyArray<string> | ((origin: string | null) => boolean);\n /**\n * Backend half only: the schema of what {@link loader} sends to the browser. Required whenever the\n * loader returns data. Keys it does not declare are dropped before the page renders; a declared\n * field of the wrong shape fails the request with a 500 naming the field's path.\n */\n readonly loaderOutput?: StandardSchemaV1;\n /** Backend half only: the schema of what {@link action} sends back, held to the same rule. */\n readonly actionOutput?: StandardSchemaV1;\n /**\n * Experimental, backend half only: the loader of a partially prerendered page's shared shell. It\n * receives no request, so its output is the same for every visitor and the shell is cached.\n */\n readonly shellLoader?: (ctx: ShellCtx) => unknown;\n /** Experimental, backend half only: the schema of what {@link shellLoader} returns. */\n readonly shellOutput?: StandardSchemaV1;\n /**\n * Experimental, backend half only: query parameters that select a different shell, each with its\n * closed set of values (`{ search: { color: [\"red\", \"blue\"] } }`). Any other parameter, or a value\n * outside its set, builds the default shell; holes still read the whole query.\n */\n readonly shellVariations?: ShellVariations;\n /** Optional client-only loader. It runs after hydration and on client navigations. */\n readonly clientLoader?: ClientLoader;\n /** Optional client-only submit wrapper. The server action remains mandatory for mutations. */\n readonly clientAction?: ClientAction;\n /** Named async boundaries owned by this route. The adapter renders their neutral state seam. A\n * boundary's `load` comes from {@link boundaryLoaders} in the route's backend half; the frontend\n * file declares only how it renders. */\n readonly boundaries?: readonly BoundaryRegistration[];\n /** Backend half only: each boundary's server loader, keyed by boundary name. */\n readonly boundaryLoaders?: Readonly<Record<string, BoundaryLoaderEntry>>;\n /** A Standard Schema validating this route's URL search params. When present, `ctx.search` is parsed +\n * validated against it (failing closed to the schema's defaults on invalid input); type it into the\n * loader with `LoaderArgs<Api, Env, typeof searchSchema>`. */\n readonly searchSchema?: StandardSchemaV1<unknown, Record<string, unknown>>;\n /** Search keys that are purely client-side UI (`\"tab\"`, a client-side `\"sort\"`, `\"modal\"`) and do NOT\n * affect this route's loader. When a client navigation stays on the same route + pathname and changes\n * ONLY these keys, the router updates the URL (so `useSearch` re-renders) WITHOUT re-running the loader.\n * Any other key change revalidates as usual - so omitting a data-affecting key here can never serve\n * stale data, it only forgoes the optimization. Client-only: the server always renders fresh. */\n readonly searchClientKeys?: readonly string[];\n /**\n * `false` gives every client reload of this page (an action's revalidation, `invalidate()`, a live\n * refresh) fresh data. By default a reload keeps the identity of the parts of `data` and the layouts'\n * data that it did not change, so an unchanged row keeps its DOM and component state, and a renderer\n * that memoizes on identity skips it. Not every unchanged row, though: an array whose first 32\n * elements all changed is taken whole, later unchanged elements included, so code that needs a row's\n * identity must not count on it. Opt out for a page whose code compares `data` against its value\n * from before the reload, or whose rows re-render whatever their identity, which then pay the\n * comparison for nothing. Client-only.\n */\n readonly shareData?: boolean;\n /**\n * Keep this page mounted after the visitor leaves it, so back and forward show it again as it was\n * left: its component state, form fields, inner scroll offsets and focus. At most three pages are\n * kept per tab, each for at most 10 minutes; a kept page is shown again only by a back or forward to\n * its own history entry, and its data reloads in place. A sign-in or sign-out drops every kept page.\n * Client-only.\n */\n readonly keepAlive?: true | KeepAliveOptions;\n readonly meta?: MetaInput;\n /**\n * Opt this route out of nifra's full-document client hydration. The server still renders the full\n * HTML document, loaders/actions still run, and native links/forms still work; the generated app\n * client, route chunks, and loader globals are omitted for hard navigations. Intended for static or\n * island-hydrated pages where interactivity is mounted by smaller, explicit client entries.\n */\n readonly hydrate?: boolean;\n /**\n * `false` renders this route's component in the browser only. The server still matches the route,\n * runs its gates and loaders, renders the layouts around it and embeds the data - it skips the\n * component alone, putting {@link HydrateFallback} (or nothing) in the page slot. The browser\n * hydrates against that, then renders the component. For a component that cannot render on a\n * server: one that reads `window` or a browser-only API while it renders.\n *\n * The module itself is still imported on the server, for its loader and options - so an import\n * that needs a browser at load time belongs inside the component (a dynamic `import()`), not at the\n * top of the file. Cannot be combined with `hydrate = false`: nothing would ever render the page.\n */\n readonly ssr?: boolean;\n /**\n * What the server renders in the page slot of an `ssr = false` route, and what the browser hydrates\n * before the component takes over - a skeleton, a spinner. Receives the same props as the\n * component, loader `data` included. Omitted ⇒ the slot is empty until the component renders.\n */\n readonly HydrateFallback?: unknown;\n /**\n * Any value to report through `useMatches` - a breadcrumb label, a render function, a flag a layout\n * reads about the page inside it. Layouts, pages, and status pages may export one. It is read from\n * the module on the server and in the browser, so it must be the same value on both.\n */\n readonly handle?: unknown;\n /**\n * On a root status page (`_404.tsx`, `_<status>.tsx`) or an `_error.tsx`. By default (`true`) the\n * page renders inside the layouts above it with their loader data and `meta`, as a nested `_404`\n * renders. When those layouts cannot render it - a loader throws, a gate or the middleware refuses -\n * a root status page renders alone and an `_error` inside its layouts without their data, with the\n * same status. `false` always renders them that way, and runs no layout loader for them.\n */\n readonly inLayouts?: boolean;\n /**\n * Opt a **static** route (no `:param`/`*`) into build-time prerendering (SSG): `prerenderRoutes`\n * (from `@nifrajs/web/build`) renders it to a static `index.html` at build. The loader runs at build\n * with the in-process `api` (build-safe data only - no per-request cookies/secrets); `defer()` on a\n * prerendered route resolves at build. For **dynamic** routes use {@link getStaticPaths} instead.\n */\n readonly prerender?: boolean;\n /**\n * Enumerate the concrete params to prerender for a **dynamic** (`:param`) route - the SSG path list\n * (blogs/docs/etc.). Runs at build; `prerenderRoutes` renders one `index.html` per returned path.\n */\n readonly getStaticPaths?: GetStaticPaths;\n /**\n * ISR freshness for this route, in **seconds**. `createWebApp` emits it as an\n * `x-nifra-isr-revalidate` response header that `withISR` reads to set the page's cache TTL\n * (overriding the wrapper's default). Older-than-`revalidate` cached pages are served stale while\n * regenerating. (Distinct from the action-revalidation `x-nifra-revalidate` header - a CSV path\n * list the client parses to refetch - so the two channels never alias.)\n */\n readonly revalidate?: number;\n /**\n * Bounded tags ISR on-demand invalidation (`?tag=...`) and a CDN purge reach this page by. A list, or\n * a function of the route's params and URL (`({ params }) => [\\`product:${params.id}\\`]`) for tags\n * per page. Tags travel to the CDN and reach anyone reading the origin: never put personal data in one.\n */\n readonly revalidateTags?: RevalidateTags;\n /**\n * No-framework island bundles (`@nifrajs/web/islands`) to load on this route, as `<script\n * type=\"module\">` in the document tail. Loaded **regardless of `hydrate`** - pair with\n * `export const hydrate = false` for a static page that ships zero framework JS and mounts\n * interactivity through `<Island>` markers + `mountIslands` enhancers instead.\n */\n readonly islandScripts?: readonly string[];\n}",
|
|
13840
|
+
"signature": "export interface RouteModule {\n readonly default: unknown;\n readonly loader?: Loader;\n /** Layout loader that must run before actions and is not retained across the action's render. */\n readonly gate?: boolean;\n readonly action?: Action;\n /**\n * Backend half only: which browser origins may POST to {@link action}. When omitted, a request\n * whose `Origin` is another site's is refused with 403 before middleware, gates or the action run;\n * requests without an `Origin` (non-browser clients) pass. An array allows exactly those origins\n * (and refuses a request without one); a function decides, receiving `null` when there is none.\n * Use it for a callback a third party posts to, such as an identity provider's `form_post`.\n * `Origin` is browser-enforced, not authentication: keep the action's own auth checks.\n */\n readonly allowedOrigins?: ReadonlyArray<string> | ((origin: string | null) => boolean);\n /**\n * Backend half only: the schema of what {@link loader} sends to the browser. Required whenever the\n * loader returns data. Keys it does not declare are dropped before the page renders; a declared\n * field of the wrong shape fails the request with a 500 naming the field's path.\n */\n readonly loaderOutput?: StandardSchemaV1;\n /** Backend half only: the schema of what {@link action} sends back, held to the same rule. */\n readonly actionOutput?: StandardSchemaV1;\n /**\n * Backend half only: the loader of a partially prerendered page's shared shell. It\n * receives no request, so its output is the same for every visitor and the shell is cached.\n */\n readonly shellLoader?: (ctx: ShellCtx) => unknown;\n /** Backend half only: the schema of what {@link shellLoader} returns. */\n readonly shellOutput?: StandardSchemaV1;\n /**\n * Backend half only: query parameters that select a different shell, each with its\n * closed set of values (`{ search: { color: [\"red\", \"blue\"] } }`). Any other parameter, or a value\n * outside its set, builds the default shell; holes still read the whole query.\n */\n readonly shellVariations?: ShellVariations;\n /** Optional client-only loader. It runs after hydration and on client navigations. */\n readonly clientLoader?: ClientLoader;\n /** Optional client-only submit wrapper. The server action remains mandatory for mutations. */\n readonly clientAction?: ClientAction;\n /** Named async boundaries owned by this route. The adapter renders their neutral state seam. A\n * boundary's `load` comes from {@link boundaryLoaders} in the route's backend half; the frontend\n * file declares only how it renders. */\n readonly boundaries?: readonly BoundaryRegistration[];\n /** Backend half only: each boundary's server loader, keyed by boundary name. */\n readonly boundaryLoaders?: Readonly<Record<string, BoundaryLoaderEntry>>;\n /** A Standard Schema validating this route's URL search params. When present, `ctx.search` is parsed +\n * validated against it (failing closed to the schema's defaults on invalid input); type it into the\n * loader with `LoaderArgs<Api, Env, typeof searchSchema>`. */\n readonly searchSchema?: StandardSchemaV1<unknown, Record<string, unknown>>;\n /** Search keys that are purely client-side UI (`\"tab\"`, a client-side `\"sort\"`, `\"modal\"`) and do NOT\n * affect this route's loader. When a client navigation stays on the same route + pathname and changes\n * ONLY these keys, the router updates the URL (so `useSearch` re-renders) WITHOUT re-running the loader.\n * Any other key change revalidates as usual - so omitting a data-affecting key here can never serve\n * stale data, it only forgoes the optimization. Client-only: the server always renders fresh. */\n readonly searchClientKeys?: readonly string[];\n /**\n * `false` gives every client reload of this page (an action's revalidation, `invalidate()`, a live\n * refresh) fresh data. By default a reload keeps the identity of the parts of `data` and the layouts'\n * data that it did not change, so an unchanged row keeps its DOM and component state, and a renderer\n * that memoizes on identity skips it. Not every unchanged row, though: an array whose first 32\n * elements all changed is taken whole, later unchanged elements included, so code that needs a row's\n * identity must not count on it. Opt out for a page whose code compares `data` against its value\n * from before the reload, or whose rows re-render whatever their identity, which then pay the\n * comparison for nothing. Client-only.\n */\n readonly shareData?: boolean;\n /**\n * Keep this page mounted after the visitor leaves it, so back and forward show it again as it was\n * left: its component state, form fields, inner scroll offsets and focus. At most three pages are\n * kept per tab, each for at most 10 minutes; a kept page is shown again only by a back or forward to\n * its own history entry, and its data reloads in place. A sign-in or sign-out drops every kept page.\n * Client-only.\n */\n readonly keepAlive?: true | KeepAliveOptions;\n readonly meta?: MetaInput;\n /**\n * Opt this route out of nifra's full-document client hydration. The server still renders the full\n * HTML document, loaders/actions still run, and native links/forms still work; the generated app\n * client, route chunks, and loader globals are omitted for hard navigations. Intended for static or\n * island-hydrated pages where interactivity is mounted by smaller, explicit client entries.\n */\n readonly hydrate?: boolean;\n /**\n * `false` renders this route's component in the browser only. The server still matches the route,\n * runs its gates and loaders, renders the layouts around it and embeds the data - it skips the\n * component alone, putting {@link HydrateFallback} (or nothing) in the page slot. The browser\n * hydrates against that, then renders the component. For a component that cannot render on a\n * server: one that reads `window` or a browser-only API while it renders.\n *\n * The module itself is still imported on the server, for its loader and options - so an import\n * that needs a browser at load time belongs inside the component (a dynamic `import()`), not at the\n * top of the file. Cannot be combined with `hydrate = false`: nothing would ever render the page.\n */\n readonly ssr?: boolean;\n /**\n * What the server renders in the page slot of an `ssr = false` route, and what the browser hydrates\n * before the component takes over - a skeleton, a spinner. Receives the same props as the\n * component, loader `data` included. Omitted ⇒ the slot is empty until the component renders.\n */\n readonly HydrateFallback?: unknown;\n /**\n * Any value to report through `useMatches` - a breadcrumb label, a render function, a flag a layout\n * reads about the page inside it. Layouts, pages, and status pages may export one. It is read from\n * the module on the server and in the browser, so it must be the same value on both.\n */\n readonly handle?: unknown;\n /**\n * On a root status page (`_404.tsx`, `_<status>.tsx`) or an `_error.tsx`. By default (`true`) the\n * page renders inside the layouts above it with their loader data and `meta`, as a nested `_404`\n * renders. When those layouts cannot render it - a loader throws, a gate or the middleware refuses -\n * a root status page renders alone and an `_error` inside its layouts without their data, with the\n * same status. `false` always renders them that way, and runs no layout loader for them.\n */\n readonly inLayouts?: boolean;\n /**\n * Opt a **static** route (no `:param`/`*`) into build-time prerendering (SSG): `prerenderRoutes`\n * (from `@nifrajs/web/build`) renders it to a static `index.html` at build. The loader runs at build\n * with the in-process `api` (build-safe data only - no per-request cookies/secrets); `defer()` on a\n * prerendered route resolves at build. For **dynamic** routes use {@link getStaticPaths} instead.\n */\n readonly prerender?: boolean;\n /**\n * Enumerate the concrete params to prerender for a **dynamic** (`:param`) route - the SSG path list\n * (blogs/docs/etc.). Runs at build; `prerenderRoutes` renders one `index.html` per returned path.\n */\n readonly getStaticPaths?: GetStaticPaths;\n /**\n * ISR freshness for this route, in **seconds**. `createWebApp` emits it as an\n * `x-nifra-isr-revalidate` response header that `withISR` reads to set the page's cache TTL\n * (overriding the wrapper's default). Older-than-`revalidate` cached pages are served stale while\n * regenerating. (Distinct from the action-revalidation `x-nifra-revalidate` header - a CSV path\n * list the client parses to refetch - so the two channels never alias.)\n */\n readonly revalidate?: number;\n /**\n * Bounded tags ISR on-demand invalidation (`?tag=...`) and a CDN purge reach this page by. A list, or\n * a function of the route's params and URL (`({ params }) => [\\`product:${params.id}\\`]`) for tags\n * per page. Tags travel to the CDN and reach anyone reading the origin: never put personal data in one.\n */\n readonly revalidateTags?: RevalidateTags;\n /**\n * No-framework island bundles (`@nifrajs/web/islands`) to load on this route, as `<script\n * type=\"module\">` in the document tail. Loaded **regardless of `hydrate`** - pair with\n * `export const hydrate = false` for a static page that ships zero framework JS and mounts\n * interactivity through `<Island>` markers + `mountIslands` enhancers instead.\n */\n readonly islandScripts?: readonly string[];\n}",
|
|
13691
13841
|
"doc": "/** A route module - the default component + optional loader / action / meta. */"
|
|
13692
13842
|
},
|
|
13693
13843
|
{
|
|
@@ -13742,13 +13892,6 @@
|
|
|
13742
13892
|
"signature": "export interface RouteSchema {\n /** Explicit external-protocol mode. The handler owns raw `c.req` parsing/streaming; no JSON body\n * parser or schema-driven 422 path is installed. A finite transport cap still applies by default. */\n readonly wire?: \"raw\";\n /**\n * Choose trust-boundary order for sensitive routes. Public routes validate first by default;\n * routes with `authenticate()` default to auth first. `validate-before-auth` is an explicit\n * compatibility escape hatch, while `auth-before-validation` can reject without parsing the body.\n */\n readonly validationOrder?: \"validate-before-auth\" | \"auth-before-validation\";\n /** Transport body cap for this route. Defaults to the server's maxBodyBytes. Use a finite\n * smaller/larger limit for a specific endpoint. The 'unlimited' value is an explicit\n * streaming/upload exemption and requires a non-empty bodyLimitReason for auditability.\n *\n * 'unlimited' is legal only for schema-less streaming/upload routes. It is rejected with `body` or\n * `idempotency`, because those lanes buffer the body before user code can apply a protocol-specific\n * bound. Read an unlimited route from `c.req.body` as a stream and bound it by the protocol it speaks;\n * `nifra.body-bounded` is deliberately NOT published for an unlimited route. */\n readonly bodyLimit?: number | \"unlimited\";\n /** Required explanation when bodyLimit is 'unlimited' (for example, a streaming upload is\n * bounded by an upstream object-store protocol). */\n readonly bodyLimitReason?: string;\n /** Declared effect tokens. Reflected for assurance; never read by validation or serialization. */\n readonly capabilities?: readonly string[];\n /**\n * Dedupe retries of this (mutating) route on an `Idempotency-Key` header. The first request runs and\n * its response is stored; a retry with the same key replays that response without re-running the\n * handler, and a key reused with a different body is rejected (409). A missing key on an\n * idempotency-required route fails closed (400). Off the hot path - routes without it are unchanged.\n */\n readonly idempotency?: IdempotencyConfig;\n /**\n * Highest data-sensitivity this route's response body carries (`public` | `pii` | `secret`). A\n * declarative, compile-time + introspection fact - never validated at runtime. Reflected for tooling,\n * recorded in the capability lockfile (so a route that starts returning PII is a reviewable change),\n * and read by downstream policy (e.g. a partner-API surface refusing to expose `pii`/`secret`).\n */\n readonly classification?: DataClassification;\n /**\n * Inline **route-assurance evidence**: the enforcement posture this route carries, declared adjacent to\n * the handler (e.g. `[NIFRA_ASSURANCE.AUTHENTICATED]`). Each id becomes route-scoped `declared` evidence\n * in reflection, so a `nifra.assurance.ts` policy `require:` clause is satisfiable WITHOUT rewriting an\n * in-handler guard into a `withRouteAssurance`-marked middleware. Ids are lowercase dot/dash segments\n * (invalid ids throw at registration). Reflected for the assurance gate; never read on the hot path.\n *\n * This is an author ASSERTION (recorded as `source: \"declared\"`), not runtime proof - like every\n * assurance marker it is trusted by the static gate, which matches on the evidence id, not its source.\n * Declare an id only on a route whose guard actually enforces it; a false declaration silently satisfies\n * the policy. (`source` is retained in reflection, so a stricter policy or reviewer can still tell\n * declared evidence from enforcement-module evidence.)\n */\n readonly assurance?: readonly string[];\n /**\n * Mark this route a **dynamic route family**: a template (`/api/:slug/:resource`) whose concrete\n * resources are resolved at runtime (auto-CRUD over tenant-defined tables, a catch-all dispatcher).\n * Purely declarative - it does not change dispatch. It surfaces in reflection so the assurance gate and\n * tooling treat the one templated route as a deliberate family whose evidence covers every runtime-\n * resolved resource, instead of reading it as a single forgotten route.\n */\n readonly family?: boolean;\n /** Optional **path-params schema**. Path params arrive as strings (`/users/:id` -> `c.params.id`);\n * declaring a schema validates them at the boundary (a malformed `:id` is a `422` before the handler,\n * like `body`/`query`) and can coerce them (use `t.query({ id: t.integer() })` for a numeric param).\n * The schema must cover every path param; with the strict default an undeclared path param is rejected.\n * When omitted, `c.params` stays the path-inferred `Record<name, string>`. */\n readonly params?: StandardSchemaV1;\n /** Optional request-header schema; the validated output is `c.headers` and a failure is a `422`.\n * Every client sends headers a route never declares (`host`, `user-agent`, `accept`), so a closed\n * object schema (`t.object`) validates only the names it declares, each read case-insensitively and\n * keyed as declared. `t.headers` is the open form: it receives every header, names lower-cased,\n * and coerces values like `t.query`. A schema that does not expose its JSON Schema (a zod\n * `.strict()` or valibot `strictObject`) receives every header, so declare it open. */\n readonly headers?: StandardSchemaV1;\n /** Optional request-cookie schema. It validates the cookies parsed from the `Cookie` header -\n * names as sent, values URL-decoded strings, the first of a repeated name - before the handler\n * runs, and the validated output is `c.cookies`. A failure is a `422`, like `headers`. A browser\n * sends every cookie the site has set, so declare the ones the route reads with an open schema\n * (`t.cookies`, `t.looseObject`) rather than rejecting the rest. */\n readonly cookies?: StandardSchemaV1;\n readonly body?: StandardSchemaV1;\n readonly query?: StandardSchemaV1;\n /** Optional **response contract**. When declared: the handler's return is type-checked against it\n * (the implementation can't drift from the contract), the typed client sees THIS as the response type\n * (the contract - not the handler's incidental return), and it's emitted into OpenAPI/JSON-Schema so\n * tooling and coding agents can read the exact shape. It is **not** validated at runtime (zero\n * hot-path cost) - purely a compile-time + introspection contract. */\n readonly response?: StandardSchemaV1;\n /**\n * Optional **error-response contract**: a map of HTTP status code → the Standard Schema of that error's\n * body. Declares a route's failure modes so they flow into OpenAPI (as non-2xx `responses`), the\n * `/llms.txt` context, and other introspection - the whole contract, not just the happy path, is legible\n * to tooling and coding agents. Like `response`, it is **not** validated at runtime (zero hot-path cost);\n * it's a compile-time + introspection contract. Example: `{ 404: NotFound, 409: Conflict }`. */\n readonly errors?: Readonly<Record<number, StandardSchemaV1>>;\n /**\n * Optional **SSE event contract**: the Standard Schema of each event's `data` payload on a\n * streaming route (declared via `app.sse()`). Marks the route as a typed event stream - the\n * typed client grows a `.subscribe()` for it, and the schema flows into reflection. Like\n * `response`, it is **not** validated at runtime (zero hot-path cost); the server-side\n * `stream.send()` is compile-time-checked against it instead.\n */\n readonly sse?: StandardSchemaV1;\n /**\n * Hook fired when the request fails `headers`/`cookies`/`params`/`body`/`query` validation, before the handler\n * runs. `kind` says which input failed. Its return value selects one of three outcomes (may be async):\n * - a **`Response`** → returned as-is, short-circuiting the route (custom error envelope, redirect, …).\n * - **any other value** → treated as a repaired payload and **re-validated once** against the same\n * schema. If it now passes, the handler runs with it; if it still fails, the original `422` stands.\n * Re-validation means a bad return can't bypass the schema - the trust boundary holds.\n * - **`undefined`** → give up; the original validation `422` is returned unchanged.\n * A route hook **overrides** the app-wide default set via `server({ onValidationError })`; return\n * `undefined` to fall through to the plain `422` even when an app default exists. Typical uses: a custom\n * error envelope, coercing the input, or prompting an LLM to repair the payload (re-validated, so it can't\n * bypass the schema).\n */\n readonly onValidationError?: (issues: ReadonlyArray<StandardIssue>, ctx: Context, kind: \"body\" | \"query\" | \"params\" | \"headers\" | \"cookies\") => Response | unknown | Promise<Response | unknown>;\n}",
|
|
13743
13893
|
"doc": "/** Per-route input schemas. Each is any Standard Schema (zod/valibot/arktype/…). */"
|
|
13744
13894
|
},
|
|
13745
|
-
{
|
|
13746
|
-
"name": "RouteSearch",
|
|
13747
|
-
"kind": "interface",
|
|
13748
|
-
"package": "@nifrajs/web",
|
|
13749
|
-
"signature": "export interface RouteSearch {\n}",
|
|
13750
|
-
"doc": "/**\n * The augmentable route -> search-type map for typed cross-route navigation. Empty by default (so an\n * object-form navigate to any path is allowed with a loose `search`). A build step (`nifra sync-routes`)\n * OR the app declares one entry per route path against its `searchSchema` output:\n *\n * ```ts\n * declare module \"@nifrajs/web\" {\n * interface RouteSearch {\n * \"/reports\": { page: number; q: string }\n * }\n * }\n * ```\n *\n * With that, `navigate({ to: \"/reports\", search: { page: 2 } })` type-checks `search` against\n * `/reports`'s schema, and a wrong shape is a compile error. See {@link NavigateTarget}.\n */"
|
|
13751
|
-
},
|
|
13752
13895
|
{
|
|
13753
13896
|
"name": "RouteSnapshot",
|
|
13754
13897
|
"kind": "interface",
|
|
@@ -13762,6 +13905,13 @@
|
|
|
13762
13905
|
"package": "@nifrajs/core",
|
|
13763
13906
|
"signature": "export interface RouteSnapshotSchema {\n readonly headers?: SchemaSnapshot;\n readonly cookies?: SchemaSnapshot;\n readonly body?: SchemaSnapshot;\n readonly query?: SchemaSnapshot;\n readonly params?: SchemaSnapshot;\n readonly response?: SchemaSnapshot;\n readonly sse?: SchemaSnapshot;\n readonly errors?: Readonly<Record<string, SchemaSnapshot>>;\n}"
|
|
13764
13907
|
},
|
|
13908
|
+
{
|
|
13909
|
+
"name": "RouteTable",
|
|
13910
|
+
"kind": "interface",
|
|
13911
|
+
"package": "@nifrajs/web",
|
|
13912
|
+
"signature": "export interface RouteTable {\n}",
|
|
13913
|
+
"doc": "/**\n * Every route the app serves, keyed by URL pattern. An entry is `{ params, search }`: `params` is the\n * object a link to the route needs (`Record<string, never>` when the pattern has none), `search` the\n * output of the route's `searchSchema` (the raw query when it declares none). Empty here; `nifra types`\n * writes `.nifra/types/routes.d.ts`, which fills it from the route files:\n *\n * ```ts\n * declare module \"@nifrajs/web\" {\n * interface RouteTable {\n * \"/users/:id\": { readonly params: { readonly id: string }; readonly search: { tab: string } }\n * }\n * }\n * ```\n *\n * There is one key per pattern, so an optional segment (`[[lang]]`) is two keys with exact params each.\n * With an empty table every `to` is accepted and `search` is loose.\n */"
|
|
13914
|
+
},
|
|
13765
13915
|
{
|
|
13766
13916
|
"name": "RouteTypesOptions",
|
|
13767
13917
|
"kind": "interface",
|
|
@@ -14700,7 +14850,7 @@
|
|
|
14700
14850
|
"kind": "type",
|
|
14701
14851
|
"package": "@nifrajs/web",
|
|
14702
14852
|
"signature": "export type SearchOf<Module> = Module extends {\n searchSchema: infer S;\n} ? S extends StandardSchemaV1 ? InferOutput<S> extends Record<string, unknown> ? InferOutput<S> : never : Record<string, unknown> : Record<string, unknown>;",
|
|
14703
|
-
"doc": "/**\n * The search OUTPUT type for a route MODULE - its `searchSchema`'s validated output, or the raw parsed\n * query (`Record<string, unknown>`) when it declares none. The building block for typed cross-route\n * navigation:
|
|
14853
|
+
"doc": "/**\n * The search OUTPUT type for a route MODULE - its `searchSchema`'s validated output, or the raw parsed\n * query (`Record<string, unknown>`) when it declares none. The building block for typed cross-route\n * navigation: `nifra types` maps each route pattern to\n * `SearchOf<typeof import(\"./routes/<file>\")>` in `.nifra/types/routes.d.ts`, populating the augmentable\n * `RouteTable` interface.\n */"
|
|
14704
14854
|
},
|
|
14705
14855
|
{
|
|
14706
14856
|
"name": "SearchParamsInit",
|
|
@@ -14792,7 +14942,7 @@
|
|
|
14792
14942
|
"name": "SegmentMatch",
|
|
14793
14943
|
"kind": "type",
|
|
14794
14944
|
"package": "@nifrajs/i18n",
|
|
14795
|
-
"signature": "export type SegmentMatch<K extends string = string> = {\n readonly kind: \"ok\";\n readonly locale: K;\n}\n/** Not a served locale (unknown, or a draft): answer 404. */\n | {\n readonly kind: \"not-found\";\n}\n/** A served locale under a non-canonical URL - the default's prefix when the default is served\n * unprefixed,
|
|
14945
|
+
"signature": "export type SegmentMatch<K extends string = string> = {\n readonly kind: \"ok\";\n readonly locale: K;\n}\n/** Not a served locale (unknown, or a draft): answer 404. */\n | {\n readonly kind: \"not-found\";\n}\n/** A served locale under a non-canonical URL - the default's prefix when the default is served\n * unprefixed, the wrong case, or a mapped page's canonical source spelling instead of its translated\n * spelling. `location` is the canonical localized path, query kept and hash dropped. */\n | {\n readonly kind: \"redirect\";\n readonly location: string;\n};",
|
|
14796
14946
|
"doc": "/** What a `[lang]` segment value means for the request. */"
|
|
14797
14947
|
},
|
|
14798
14948
|
{
|
|
@@ -14993,7 +15143,7 @@
|
|
|
14993
15143
|
"name": "ServerComponentsOptions",
|
|
14994
15144
|
"kind": "interface",
|
|
14995
15145
|
"package": "@nifrajs/web",
|
|
14996
|
-
"signature": "export interface ServerComponentsOptions {\n readonly build: string;\n readonly adapter: ServerComponentRenderAdapter;\n readonly owners: Readonly<Record<string, ComponentOwner>>;\n /**\n *
|
|
15146
|
+
"signature": "export interface ServerComponentsOptions {\n readonly build: string;\n readonly adapter: ServerComponentRenderAdapter;\n readonly owners: Readonly<Record<string, ComponentOwner>>;\n /**\n * Route id to the server components its partially prerendered holes may show, each\n * through `serverHole`. A route is an owner or hosts holes, never both.\n */\n readonly holes?: Readonly<Record<string, ComponentHoles>>;\n readonly capabilities?: readonly CapabilityDefinition[];\n readonly assets?: readonly string[];\n}"
|
|
14997
15147
|
},
|
|
14998
15148
|
{
|
|
14999
15149
|
"name": "ServerComponentsPluginOptions",
|
|
@@ -15322,14 +15472,14 @@
|
|
|
15322
15472
|
"kind": "type",
|
|
15323
15473
|
"package": "@nifrajs/web",
|
|
15324
15474
|
"signature": "export type SharedBoundary<Data, UI> = BoundaryBase<Data, UI> & {\n readonly mode: \"shared\";\n readonly load?: (ctx: SharedHoleCtx) => Data | Promise<Data>;\n /** The hole ships its props and hydrates. Default `false`. */\n readonly interactive?: boolean;\n /** How long a visitor waits for a build in milliseconds, then gets the error slot. Default 5000. */\n readonly timeout?: number;\n};",
|
|
15325
|
-
"doc": "/**\n *
|
|
15475
|
+
"doc": "/**\n * Partial prerendering: a hole that is the same for every visitor, built like the shell\n * from a request-free context and cached on its own `revalidate`, then written right after the shell.\n * Its loader entry in `boundaryLoaders` needs `revalidate`.\n */"
|
|
15326
15476
|
},
|
|
15327
15477
|
{
|
|
15328
15478
|
"name": "SharedHoleCtx",
|
|
15329
15479
|
"kind": "interface",
|
|
15330
15480
|
"package": "@nifrajs/web",
|
|
15331
15481
|
"signature": "export interface SharedHoleCtx extends ShellCtx {\n readonly live: (...keys: string[]) => void;\n}",
|
|
15332
|
-
"doc": "/**\n *
|
|
15482
|
+
"doc": "/**\n * What a shared hole's loader receives. The keys it declares are kept with the built\n * entry and watched for every visitor it serves; a change reloads the hole, which the shared entry\n * answers until a purge by one of its `revalidateTags` drops it, so publish each key with a tag.\n */"
|
|
15333
15483
|
},
|
|
15334
15484
|
{
|
|
15335
15485
|
"name": "SharedKey",
|
|
@@ -15382,7 +15532,7 @@
|
|
|
15382
15532
|
"kind": "interface",
|
|
15383
15533
|
"package": "@nifrajs/web",
|
|
15384
15534
|
"signature": "export interface ShellCtx {\n /** `\"shell\"`: built on demand at runtime, under the same rules as a build. */\n readonly phase: \"build\" | \"shell\";\n /** The deployment's origin from config, never from a Host header. */\n readonly origin?: string;\n /** Decoded params, as the route pattern matched them. */\n readonly params: Readonly<Record<string, string>>;\n readonly locale: string | undefined;\n /** The route's declared `shellVariations` this request selected: declared keys and values only. */\n readonly variations: Readonly<Record<string, string>>;\n /** Aborts on the shell build deadline, never on one visitor's disconnect. */\n readonly signal: AbortSignal;\n /** The in-process api, unbound to any request: build-safe calls only, as in a prerender. */\n readonly api: unknown;\n}",
|
|
15385
|
-
"doc": "/**\n *
|
|
15535
|
+
"doc": "/**\n * What a partially prerendered page's `shellLoader` receives. No request, env, draft or\n * search: the shell is shared by every visitor whose URL maps to the same params and locale.\n */"
|
|
15386
15536
|
},
|
|
15387
15537
|
{
|
|
15388
15538
|
"name": "ShouldRevalidate",
|
|
@@ -15821,6 +15971,50 @@
|
|
|
15821
15971
|
"signature": "export interface StaticFileAccess {\n /** The real path the file was opened at: what tags and types it. */\n readonly path: string;\n readonly version: FileVersion;\n /** Read the whole file, up to {@link CONTENT_SNAPSHOT_MAX} bytes, through the open descriptor. */\n readonly readWhole: () => Promise<Uint8Array>;\n /** Stat the open descriptor again. */\n readonly restat: () => Promise<FileVersion>;\n readonly tags: ContentTags;\n /** `@nifrajs/core/range`'s parser, passed in so this module imports nothing. */\n readonly parseRange: (value: string, size: number) => {\n readonly kind: \"none\" | \"unsatisfiable\";\n } | {\n readonly kind: \"satisfiable\";\n readonly ranges: readonly {\n readonly start: number;\n readonly end: number;\n }[];\n };\n}",
|
|
15822
15972
|
"doc": "/** How a reader reaches the opened, pinned file for {@link planStatic}. */"
|
|
15823
15973
|
},
|
|
15974
|
+
{
|
|
15975
|
+
"name": "StaticImageComponentProps",
|
|
15976
|
+
"kind": "type",
|
|
15977
|
+
"package": "@nifrajs/web-preact",
|
|
15978
|
+
"signature": "export type StaticImageComponentProps = StaticImageProps & Omit<ImageComponentProps, \"src\" | \"width\" | \"height\">;"
|
|
15979
|
+
},
|
|
15980
|
+
{
|
|
15981
|
+
"name": "StaticImageComponentProps",
|
|
15982
|
+
"kind": "type",
|
|
15983
|
+
"package": "@nifrajs/web-react",
|
|
15984
|
+
"signature": "export type StaticImageComponentProps = StaticImageProps & Omit<ImageComponentProps, \"src\" | \"width\" | \"height\">;"
|
|
15985
|
+
},
|
|
15986
|
+
{
|
|
15987
|
+
"name": "StaticImageComponentProps",
|
|
15988
|
+
"kind": "type",
|
|
15989
|
+
"package": "@nifrajs/web-solid",
|
|
15990
|
+
"signature": "export type StaticImageComponentProps = StaticImageProps & Omit<ImageComponentProps, \"src\" | \"width\" | \"height\">;"
|
|
15991
|
+
},
|
|
15992
|
+
{
|
|
15993
|
+
"name": "StaticImageComponentProps",
|
|
15994
|
+
"kind": "type",
|
|
15995
|
+
"package": "@nifrajs/web-svelte",
|
|
15996
|
+
"signature": "export type StaticImageComponentProps = StaticImageProps &\n Omit<ImageComponentProps, \"src\" | \"width\" | \"height\">"
|
|
15997
|
+
},
|
|
15998
|
+
{
|
|
15999
|
+
"name": "StaticImageData",
|
|
16000
|
+
"kind": "interface",
|
|
16001
|
+
"package": "@nifrajs/image",
|
|
16002
|
+
"signature": "export interface StaticImageData {\n readonly src: string;\n readonly width: number;\n readonly height: number;\n readonly variants?: readonly StaticImageVariant[];\n}",
|
|
16003
|
+
"doc": "/** Intrinsic display dimensions (including EXIF orientation), plus optional prebuilt variants. */"
|
|
16004
|
+
},
|
|
16005
|
+
{
|
|
16006
|
+
"name": "StaticImageProps",
|
|
16007
|
+
"kind": "interface",
|
|
16008
|
+
"package": "@nifrajs/image",
|
|
16009
|
+
"signature": "export interface StaticImageProps extends ImagePresentationProps {\n readonly src: StaticImageData;\n readonly width?: number;\n readonly height?: number;\n}"
|
|
16010
|
+
},
|
|
16011
|
+
{
|
|
16012
|
+
"name": "StaticImageVariant",
|
|
16013
|
+
"kind": "interface",
|
|
16014
|
+
"package": "@nifrajs/image",
|
|
16015
|
+
"signature": "export interface StaticImageVariant {\n readonly src: string;\n readonly width: number;\n readonly height: number;\n}",
|
|
16016
|
+
"doc": "/** Browser-safe output of an `?image` import. No filesystem or codec enters the client. */"
|
|
16017
|
+
},
|
|
15824
16018
|
{
|
|
15825
16019
|
"name": "StaticMatch",
|
|
15826
16020
|
"kind": "type",
|
|
@@ -16877,8 +17071,8 @@
|
|
|
16877
17071
|
"name": "UnlocalizedPath",
|
|
16878
17072
|
"kind": "interface",
|
|
16879
17073
|
"package": "@nifrajs/i18n",
|
|
16880
|
-
"signature": "export interface UnlocalizedPath<K extends string = string> {\n /** The served locale the leading segment named, or `undefined` for an unprefixed path. */\n readonly locale: K | undefined;\n /** The
|
|
16881
|
-
"doc": "/** A pathname with its locale prefix removed (or not, when it carries none). */"
|
|
17074
|
+
"signature": "export interface UnlocalizedPath<K extends string = string> {\n /** The served locale the leading segment named, or `undefined` for an unprefixed path. */\n readonly locale: K | undefined;\n /** The canonical unprefixed path, always starting with `/`; mapped Unicode is URL-encoded. */\n readonly pathname: string;\n}",
|
|
17075
|
+
"doc": "/** A canonical pathname with its locale prefix removed (or not, when it carries none). */"
|
|
16882
17076
|
},
|
|
16883
17077
|
{
|
|
16884
17078
|
"name": "UnsafeScriptDescriptor",
|
|
@@ -16919,6 +17113,13 @@
|
|
|
16919
17113
|
"signature": "export interface UseCapabilityOptions {\n /** Adapter/resource token recorded on the ledger entry (`repo:orders`). */\n readonly target?: string;\n /** Dimensionless resource counters recorded on the ledger entry. */\n readonly cost?: EffectCost;\n /** Keyed payload digest (see `computeEffectDigest`). */\n readonly digest?: string;\n}",
|
|
16920
17114
|
"doc": "/**\n * Optional effect-ledger fields for one `useCapability` beacon. Token-only by design: an adapter\n * names *what* it touched and *how much resource* it used - never the value it read or wrote.\n */"
|
|
16921
17115
|
},
|
|
17116
|
+
{
|
|
17117
|
+
"name": "UseInfiniteQueryOptions",
|
|
17118
|
+
"kind": "interface",
|
|
17119
|
+
"package": "@nifrajs/web-preact",
|
|
17120
|
+
"signature": "export interface UseInfiniteQueryOptions<T, P> extends InfiniteQueryOptions<T, P> {\n readonly enabled?: boolean;\n}",
|
|
17121
|
+
"doc": "/** Options for an infinite query. */"
|
|
17122
|
+
},
|
|
16922
17123
|
{
|
|
16923
17124
|
"name": "UseInfiniteQueryOptions",
|
|
16924
17125
|
"kind": "interface",
|
|
@@ -16926,6 +17127,27 @@
|
|
|
16926
17127
|
"signature": "export interface UseInfiniteQueryOptions<T, P> extends InfiniteQueryOptions<T, P> {\n readonly enabled?: boolean;\n}",
|
|
16927
17128
|
"doc": "/** Options for {@link useInfiniteQuery} - the engine's {@link InfiniteQueryOptions} plus `enabled`. */"
|
|
16928
17129
|
},
|
|
17130
|
+
{
|
|
17131
|
+
"name": "UseInfiniteQueryOptions",
|
|
17132
|
+
"kind": "interface",
|
|
17133
|
+
"package": "@nifrajs/web-svelte",
|
|
17134
|
+
"signature": "export interface UseInfiniteQueryOptions<T, P> extends InfiniteQueryOptions<T, P> {\n readonly enabled?: boolean;\n}",
|
|
17135
|
+
"doc": "/** Options for a Svelte infinite query. */"
|
|
17136
|
+
},
|
|
17137
|
+
{
|
|
17138
|
+
"name": "UseInfiniteQueryOptions",
|
|
17139
|
+
"kind": "interface",
|
|
17140
|
+
"package": "@nifrajs/web-vue",
|
|
17141
|
+
"signature": "export interface UseInfiniteQueryOptions<T, P> extends InfiniteQueryOptions<T, P> {\n readonly enabled?: boolean;\n}",
|
|
17142
|
+
"doc": "/** Options for a Vue infinite query. */"
|
|
17143
|
+
},
|
|
17144
|
+
{
|
|
17145
|
+
"name": "UseInfiniteQueryResult",
|
|
17146
|
+
"kind": "interface",
|
|
17147
|
+
"package": "@nifrajs/web-preact",
|
|
17148
|
+
"signature": "export interface UseInfiniteQueryResult<T, P> extends QueryState<InfiniteData<T, P>> {\n readonly isPending: boolean;\n readonly isError: boolean;\n readonly isSuccess: boolean;\n readonly fetchNextPage: () => Promise<InfiniteData<T, P>>;\n readonly fetchPreviousPage: () => Promise<InfiniteData<T, P>>;\n readonly hasNextPage: boolean;\n readonly hasPreviousPage: boolean;\n readonly refetch: () => Promise<InfiniteData<T, P>>;\n}",
|
|
17149
|
+
"doc": "/** Infinite-query state and page controls. */"
|
|
17150
|
+
},
|
|
16929
17151
|
{
|
|
16930
17152
|
"name": "UseInfiniteQueryResult",
|
|
16931
17153
|
"kind": "interface",
|
|
@@ -16933,13 +17155,34 @@
|
|
|
16933
17155
|
"signature": "export interface UseInfiniteQueryResult<T, P> extends QueryState<InfiniteData<T, P>> {\n readonly isPending: boolean;\n readonly isError: boolean;\n readonly isSuccess: boolean;\n readonly fetchNextPage: () => Promise<InfiniteData<T, P>>;\n readonly fetchPreviousPage: () => Promise<InfiniteData<T, P>>;\n readonly hasNextPage: boolean;\n readonly hasPreviousPage: boolean;\n readonly refetch: () => Promise<InfiniteData<T, P>>;\n}",
|
|
16934
17156
|
"doc": "/** An infinite query's reactive state + paging controls. */"
|
|
16935
17157
|
},
|
|
17158
|
+
{
|
|
17159
|
+
"name": "UseInfiniteQueryResult",
|
|
17160
|
+
"kind": "interface",
|
|
17161
|
+
"package": "@nifrajs/web-vue",
|
|
17162
|
+
"signature": "export interface UseInfiniteQueryResult<T, P> {\n readonly state: Readonly<ShallowRef<QueryState<InfiniteData<T, P>>>>;\n readonly isPending: ComputedRef<boolean>;\n readonly isError: ComputedRef<boolean>;\n readonly isSuccess: ComputedRef<boolean>;\n readonly hasNextPage: ComputedRef<boolean>;\n readonly hasPreviousPage: ComputedRef<boolean>;\n readonly fetchNextPage: () => Promise<InfiniteData<T, P>>;\n readonly fetchPreviousPage: () => Promise<InfiniteData<T, P>>;\n readonly refetch: () => Promise<InfiniteData<T, P>>;\n}",
|
|
17163
|
+
"doc": "/** Infinite-query state and page controls as Vue refs/computed values. */"
|
|
17164
|
+
},
|
|
17165
|
+
{
|
|
17166
|
+
"name": "UseMutationResult",
|
|
17167
|
+
"kind": "interface",
|
|
17168
|
+
"package": "@nifrajs/web-preact",
|
|
17169
|
+
"signature": "export interface UseMutationResult<TData, TVariables> extends MutationState<TData, TVariables> {\n readonly isIdle: boolean;\n readonly isPending: boolean;\n readonly isError: boolean;\n readonly isSuccess: boolean;\n readonly mutate: (variables: TVariables) => void;\n readonly mutateAsync: (variables: TVariables) => Promise<TData>;\n readonly reset: () => void;\n readonly cancel: () => void;\n}",
|
|
17170
|
+
"doc": "/** Observable mutation state and imperative controls. */"
|
|
17171
|
+
},
|
|
16936
17172
|
{
|
|
16937
17173
|
"name": "UseMutationResult",
|
|
16938
17174
|
"kind": "interface",
|
|
16939
17175
|
"package": "@nifrajs/web-react",
|
|
16940
|
-
"signature": "export interface UseMutationResult<TData, TVariables> extends MutationState<TData, TVariables> {\n readonly isIdle: boolean;\n readonly isPending: boolean;\n readonly isError: boolean;\n readonly isSuccess: boolean;\n /** Fire-and-forget: runs the mutation and swallows rejection (read `error`/`isError` for failures). */\n readonly mutate: (variables: TVariables) => void;\n /** Run the mutation and return the promise (rejects on failure) - for `await`. */\n readonly mutateAsync: (variables: TVariables) => Promise<TData>;\n /** Reset back to idle. */\n readonly reset: () => void;\n}",
|
|
17176
|
+
"signature": "export interface UseMutationResult<TData, TVariables> extends MutationState<TData, TVariables> {\n readonly isIdle: boolean;\n readonly isPending: boolean;\n readonly isError: boolean;\n readonly isSuccess: boolean;\n /** Fire-and-forget: runs the mutation and swallows rejection (read `error`/`isError` for failures). */\n readonly mutate: (variables: TVariables) => void;\n /** Run the mutation and return the promise (rejects on failure) - for `await`. */\n readonly mutateAsync: (variables: TVariables) => Promise<TData>;\n /** Reset back to idle. */\n readonly reset: () => void;\n /** Cancel pending mutation work. */\n readonly cancel: () => void;\n}",
|
|
16941
17177
|
"doc": "/** A mutation's reactive state + imperative controls (the TanStack `useMutation` shape). */"
|
|
16942
17178
|
},
|
|
17179
|
+
{
|
|
17180
|
+
"name": "UseMutationResult",
|
|
17181
|
+
"kind": "interface",
|
|
17182
|
+
"package": "@nifrajs/web-vue",
|
|
17183
|
+
"signature": "export interface UseMutationResult<TData, TVariables> {\n readonly state: Readonly<ShallowRef<MutationState<TData, TVariables>>>;\n readonly isIdle: ComputedRef<boolean>;\n readonly isPending: ComputedRef<boolean>;\n readonly isError: ComputedRef<boolean>;\n readonly isSuccess: ComputedRef<boolean>;\n readonly mutate: (variables: TVariables) => void;\n readonly mutateAsync: (variables: TVariables) => Promise<TData>;\n readonly reset: () => void;\n readonly cancel: () => void;\n}",
|
|
17184
|
+
"doc": "/** A Vue mutation result with reactive state and promise/fire-and-forget controls. */"
|
|
17185
|
+
},
|
|
16943
17186
|
{
|
|
16944
17187
|
"name": "UseQueryOptions",
|
|
16945
17188
|
"kind": "interface",
|
|
@@ -16972,14 +17215,14 @@
|
|
|
16972
17215
|
"name": "VERSION",
|
|
16973
17216
|
"kind": "const",
|
|
16974
17217
|
"package": "@nifrajs/core",
|
|
16975
|
-
"signature": "export declare const VERSION: \"5.
|
|
17218
|
+
"signature": "export declare const VERSION: \"5.10.0\";",
|
|
16976
17219
|
"doc": "/**\n * Current package version. A hardcoded literal on purpose - core runs on the edge (no fs), so it can't\n * read its own package.json at runtime. `scripts/version.ts` rewrites it on every release bump and\n * `check:publish` asserts it equals `@nifrajs/core`'s package version.\n */"
|
|
16977
17220
|
},
|
|
16978
17221
|
{
|
|
16979
17222
|
"name": "VERSION",
|
|
16980
17223
|
"kind": "const",
|
|
16981
17224
|
"package": "nifra",
|
|
16982
|
-
"signature": "export declare const VERSION: \"5.
|
|
17225
|
+
"signature": "export declare const VERSION: \"5.10.0\";",
|
|
16983
17226
|
"doc": "/**\n * Current package version. A hardcoded literal on purpose - core runs on the edge (no fs), so it can't\n * read its own package.json at runtime. `scripts/version.ts` rewrites it on every release bump and\n * `check:publish` asserts it equals `@nifrajs/core`'s package version.\n */"
|
|
16984
17227
|
},
|
|
16985
17228
|
{
|
|
@@ -17025,6 +17268,13 @@
|
|
|
17025
17268
|
"package": "@nifrajs/web",
|
|
17026
17269
|
"signature": "export type VercelOptions = ({\n /** `invalidateByTag` from `@vercel/functions`: inside a Vercel Function, no token needed. */\n readonly invalidateByTag: TagPurge;\n /** `dangerouslyDeleteByTag` from `@vercel/functions`, for `mode: \"delete\"`. */\n readonly dangerouslyDeleteByTag?: TagPurge;\n} | {\n /** A Vercel access token for the REST API. Keep it in an env var. */\n readonly token: string;\n readonly projectId: string;\n readonly teamId?: string;\n /** Purge one environment only; default both. */\n readonly target?: \"production\" | \"preview\";\n /** The fetch purge calls go through; tests pass their own. */\n readonly fetch?: typeof fetch;\n}) & {\n /**\n * `invalidate` (default) marks tagged pages stale: the next visitor gets the old page while Vercel\n * refetches. `delete` drops them, so the next visitors wait on the origin together.\n */\n readonly mode?: \"invalidate\" | \"delete\";\n readonly queue?: PurgeQueueOptions;\n};"
|
|
17027
17270
|
},
|
|
17271
|
+
{
|
|
17272
|
+
"name": "VercelRuntime",
|
|
17273
|
+
"kind": "type",
|
|
17274
|
+
"package": "@nifrajs/web",
|
|
17275
|
+
"signature": "export type VercelRuntime = \"edge\" | \"node\";",
|
|
17276
|
+
"doc": "/** Ordinary Vercel SSR uses Edge unless Node is explicitly selected. */"
|
|
17277
|
+
},
|
|
17028
17278
|
{
|
|
17029
17279
|
"name": "VerificationCompletedView",
|
|
17030
17280
|
"kind": "interface",
|
|
@@ -17965,6 +18215,13 @@
|
|
|
17965
18215
|
"signature": "export declare function browserDenial(classification: Classification, specifier?: string): string | undefined;",
|
|
17966
18216
|
"doc": "/**\n * Why a classified file may not ship to a browser, or `undefined` when it may. A `drizzle-orm` driver\n * entry is recognized by the import as written (`specifier`) or by the file's path in the package.\n */"
|
|
17967
18217
|
},
|
|
18218
|
+
{
|
|
18219
|
+
"name": "browserPathSegment",
|
|
18220
|
+
"kind": "function",
|
|
18221
|
+
"package": "@nifrajs/core",
|
|
18222
|
+
"signature": "export declare function browserPathSegment(value: string): string;",
|
|
18223
|
+
"doc": "/**\n * `value` as a browser spells it in a request URL: {@link encodePathSegment} with `; [ ] |` left as\n * written. Used for one thing, registering a public file under the spelling its page links request;\n * it differs from the canonical form on those four characters only.\n */"
|
|
18224
|
+
},
|
|
17968
18225
|
{
|
|
17969
18226
|
"name": "buildAssetPaths",
|
|
17970
18227
|
"kind": "function",
|
|
@@ -19051,6 +19308,13 @@
|
|
|
19051
19308
|
"signature": "export declare function createHostPolicy(options: HostPolicyOptions): HostPolicy;",
|
|
19052
19309
|
"doc": "/**\n * Declare which pages and files each host serves. Hand the result to `createWebApp({ hostPolicy })`\n * (or export it as `hostPolicy` from the framework module, which `nifra build`'s server entry reads):\n * it is evaluated before the build's static files, the prerendered pages, the mounts and every page.\n * On Vercel the CDN answers the build's files before the function runs, so there it covers the rest.\n * A hand-written entry calls `check(request, buildAssets)` first, before its own static handler.\n *\n * ```ts\n * export const hostPolicy = createHostPolicy({\n * rules: [{\n * hosts: (host) => !OWN_HOSTS.has(host),\n * pages: [\"/\", \"/p/:id\", \"/share/*\"],\n * paths: [\"/api/submissions/*\"],\n * }],\n * })\n * ```\n */"
|
|
19053
19310
|
},
|
|
19311
|
+
{
|
|
19312
|
+
"name": "createImageAssets",
|
|
19313
|
+
"kind": "function",
|
|
19314
|
+
"package": "@nifrajs/image",
|
|
19315
|
+
"signature": "export declare function createImageAssets(options?: ImageBuildOptions): ImageAssets;",
|
|
19316
|
+
"doc": "/** Shared builder for client/SSR imports. Processing results depend on bytes, never absolute paths. */"
|
|
19317
|
+
},
|
|
19054
19318
|
{
|
|
19055
19319
|
"name": "createImageHandler",
|
|
19056
19320
|
"kind": "function",
|
|
@@ -19058,6 +19322,13 @@
|
|
|
19058
19322
|
"signature": "export declare function createImageHandler(options?: ImageHandlerOptions): (req: Request) => Promise<Response>;",
|
|
19059
19323
|
"doc": "/**\n * Build the resize request handler. Mount its return value at the `selfHostedLoader` endpoint:\n *\n * ```ts\n * const image = createImageHandler({ root: \"./public\", allowedOrigins: [\"https://cdn.example\"] })\n * // inside your router: if (url.pathname === \"/_image\") return image(req)\n * ```\n */"
|
|
19060
19324
|
},
|
|
19325
|
+
{
|
|
19326
|
+
"name": "createInfiniteQuery",
|
|
19327
|
+
"kind": "function",
|
|
19328
|
+
"package": "@nifrajs/web-solid",
|
|
19329
|
+
"signature": "export declare function createInfiniteQuery<T, P>(key: unknown, fn: (pageParam: P) => Promise<T>, options: CreateInfiniteQueryOptions<T, P>): CreateInfiniteQueryResult<T, P>;",
|
|
19330
|
+
"doc": "/** Bind a paged query to a Solid owner and fetch its first page on mount. */"
|
|
19331
|
+
},
|
|
19061
19332
|
{
|
|
19062
19333
|
"name": "createInvalidator",
|
|
19063
19334
|
"kind": "function",
|
|
@@ -19163,9 +19434,16 @@
|
|
|
19163
19434
|
"name": "createMutation",
|
|
19164
19435
|
"kind": "function",
|
|
19165
19436
|
"package": "@nifrajs/web",
|
|
19166
|
-
"signature": "export declare function createMutation<TData, TVariables>(fn: (variables: TVariables) => Promise<TData>, callbacks?: MutationCallbacks<TData, TVariables>): MutationHandle<TData, TVariables>;",
|
|
19437
|
+
"signature": "export declare function createMutation<TData, TVariables>(fn: (variables: TVariables, context: MutationContext) => Promise<TData>, callbacks?: MutationCallbacks<TData, TVariables>): MutationHandle<TData, TVariables>;",
|
|
19167
19438
|
"doc": "/**\n * Create a standalone mutation state machine - framework-agnostic, so a per-adapter `useMutation`\n * binding just subscribes to it. Single-flight by a monotonic token: overlapping `mutate` calls each\n * run their `fn`, but only the latest publishes state (an older, slower response can't clobber a newer\n * one). The callbacks fire in TanStack order: `onMutate` (before), then `onSuccess`/`onError`, then\n * `onSettled`.\n */"
|
|
19168
19439
|
},
|
|
19440
|
+
{
|
|
19441
|
+
"name": "createMutation",
|
|
19442
|
+
"kind": "function",
|
|
19443
|
+
"package": "@nifrajs/web-solid",
|
|
19444
|
+
"signature": "export declare function createMutation<TData, TVariables = void>(fn: (variables: TVariables, context: MutationContext) => Promise<TData>, callbacks?: MutationCallbacks<TData, TVariables>): CreateMutationResult<TData, TVariables>;",
|
|
19445
|
+
"doc": "/** Bind a mutation to a Solid owner. Identity changes discard late results and callbacks. */"
|
|
19446
|
+
},
|
|
19169
19447
|
{
|
|
19170
19448
|
"name": "createNativeGatewayModelPort",
|
|
19171
19449
|
"kind": "function",
|
|
@@ -19534,6 +19812,13 @@
|
|
|
19534
19812
|
"signature": "export declare function decodeCursor<T = unknown>(cursor: string | null | undefined): T | undefined;",
|
|
19535
19813
|
"doc": "/** Decode a cursor back to its value. Returns `undefined` for a null/empty/malformed cursor - treat that\n * as \"start from the beginning\" rather than erroring on a client-supplied string. */"
|
|
19536
19814
|
},
|
|
19815
|
+
{
|
|
19816
|
+
"name": "decodePathSegment",
|
|
19817
|
+
"kind": "function",
|
|
19818
|
+
"package": "@nifrajs/core",
|
|
19819
|
+
"signature": "export declare function decodePathSegment(raw: string): string | undefined;",
|
|
19820
|
+
"doc": "/**\n * `raw` with its percent-escapes decoded, or `undefined` when one is malformed. The inverse of\n * {@link encodePathSegment} and of {@link browserPathSegment}; a segment in any other spelling decodes\n * too. What a malformed escape means is the caller's policy.\n */"
|
|
19821
|
+
},
|
|
19537
19822
|
{
|
|
19538
19823
|
"name": "decodeRouteParams",
|
|
19539
19824
|
"kind": "function",
|
|
@@ -20150,6 +20435,13 @@
|
|
|
20150
20435
|
"signature": "export declare function encodeCursor(value: unknown): string;",
|
|
20151
20436
|
"doc": "/** Encode any JSON-serializable value (e.g. the last row's sort key) into an opaque cursor string. */"
|
|
20152
20437
|
},
|
|
20438
|
+
{
|
|
20439
|
+
"name": "encodePathSegment",
|
|
20440
|
+
"kind": "function",
|
|
20441
|
+
"package": "@nifrajs/core",
|
|
20442
|
+
"signature": "export declare function encodePathSegment(value: string): string;",
|
|
20443
|
+
"doc": "/**\n * `value` as one path segment. Left as written: letters, digits, the at sign and `- . _ ~ ! $ & ' ( ) * + , : =`.\n * Everything else is percent-encoded, UTF-8 and upper-case hex, including `; [ ] | / ? # % \\`.\n *\n * Throws a `RangeError` for a value that no segment can carry: exactly `.` or `..` (a URL parser reads\n * `%2E` and `%2E%2E` as dot segments too) and a lone surrogate (substituting U+FFFD would map distinct\n * values to one URL). The empty string is returned as is; a caller that cannot use it checks for it.\n */"
|
|
20444
|
+
},
|
|
20153
20445
|
{
|
|
20154
20446
|
"name": "encodeTransportFrame",
|
|
20155
20447
|
"kind": "function",
|
|
@@ -20387,6 +20679,13 @@
|
|
|
20387
20679
|
"package": "@nifrajs/web",
|
|
20388
20680
|
"signature": "export declare function filePathToPatterns(file: string): string[];"
|
|
20389
20681
|
},
|
|
20682
|
+
{
|
|
20683
|
+
"name": "fillRoutePath",
|
|
20684
|
+
"kind": "function",
|
|
20685
|
+
"package": "@nifrajs/core",
|
|
20686
|
+
"signature": "export declare function fillRoutePath(pattern: string | CompiledRoutePattern, params: Readonly<Record<string, string | undefined>>): FilledRoutePath;",
|
|
20687
|
+
"doc": "/**\n * The path `pattern` names for `params`, every value spelled by {@link encodePathSegment}. A wildcard\n * value is split on `/` and each part encoded, empty parts dropped; a `.` or `..` part is invalid, as\n * a whole-segment value is. Nothing is thrown for a bad value: the caller decides what a missing or\n * invalid param means. A param inside a mixed segment is invalid when its value holds the literal that ends it (`name` = `a.b` in\n * `:name.:ext`), or when it touches the next param and encodes to more than one character, because the\n * router would split it differently. A param's constraint (`:id{[0-9]+}`) is not checked here.\n */"
|
|
20688
|
+
},
|
|
20390
20689
|
{
|
|
20391
20690
|
"name": "filterDevToolsEvents",
|
|
20392
20691
|
"kind": "function",
|
|
@@ -20595,18 +20894,11 @@
|
|
|
20595
20894
|
"signature": "export declare function generateRegressionTest(capsule: IncidentCapsule, options?: GenerateRegressionTestOptions): string;",
|
|
20596
20895
|
"doc": "/**\n * Emit a committable regression test from a capsule. Body strings, query values, header values (bar\n * `content-type`) and the note are redacted BY DEFAULT with a sanitize banner - replace the\n * `<redacted>` placeholders with safe, reproducing values before you commit. The path is kept\n * verbatim because it selects the route, so the file always asks for it to be reviewed. The test\n * asserts the response contract via {@link assertIncidentReplays}.\n */"
|
|
20597
20896
|
},
|
|
20598
|
-
{
|
|
20599
|
-
"name": "generateRouteSearchTypes",
|
|
20600
|
-
"kind": "function",
|
|
20601
|
-
"package": "@nifrajs/web",
|
|
20602
|
-
"signature": "export declare function generateRouteSearchTypes(manifest: Manifest, options: GenerateRouteSearchTypesOptions): string;",
|
|
20603
|
-
"doc": "/**\n * Codegen: emit a `.d.ts` that types cross-route `navigate({ to, search })` against each route's\n * `searchSchema`. It augments the {@link RouteSearch} map with `\"<pattern>\": SearchOf<typeof import(...)>`\n * for every **static** route (one with no `:param`/`*` segment - a concrete `to` a caller can pass; a\n * dynamic route's concrete path can't match its pattern key, so those keep the loose object form). Written\n * by `nifra sync-routes` next to the route tree and included in the app's `tsconfig`; because it is\n * regenerated from the route files, a `navigate` whose `search` no longer matches the route's schema\n * becomes a `tsc` error - the same drift guarantee as nifra's typed client, no hand-maintained map.\n */"
|
|
20604
|
-
},
|
|
20605
20897
|
{
|
|
20606
20898
|
"name": "generateServerEntry",
|
|
20607
20899
|
"kind": "function",
|
|
20608
20900
|
"package": "@nifrajs/web",
|
|
20609
|
-
"signature": "export declare function generateServerEntry(options: {\n readonly target: BuildTarget;\n /** Import specifier for the module exporting `adapter` (e.g. `\"../framework.ts\"`). */\n readonly adapterImport: string;\n /** Import specifier for the module exporting `backend`, or `undefined` for a frontend-only app. */\n readonly backendImport?: string;\n /** Import specifier for the module exporting `use`, or `undefined`. Must resolve to the\n * same edge-safe module as `adapterImport`. */\n readonly useImport?: string;\n /** `createWebApp` options to import by name, each mapped to the specifier of the edge-safe module\n * that exports it. */\n readonly optionImports?: ServerEntryOptionImports;\n /** Document `<title>` passed to `createWebApp`. */\n readonly title?: string;\n /** Encoded root-relative public file paths copied into the deploy directory. */\n readonly publicFiles?: readonly string[];\n /** URL paths of the content-hashed client outputs (the build manifest's `assets`). When given, a\n * self-hosted entry caches only these immutably; otherwise every file under `/assets/` is. */\n readonly hashedFiles?: readonly string[];\n /** Trust the edge platform's client-address header for `c.clientIp`. See {@link ServerEntryClientIp}. */\n readonly clientIp?: ServerEntryClientIp;\n /** How a self-hosted server stops and keeps idle connections. See {@link ServerEntrySelfHost}. */\n readonly selfHost?: ServerEntrySelfHost;\n /** The server manifest exports `copyChunks` (the client build split copy tables by locale). */\n readonly copyChunks?: boolean;\n /** `bun` / `node` only: the pages the build prerendered into `_prerendered/`, by request path, which\n * the app answers from their file (see `createWebApp`'s `prerenderedPages`). */\n readonly prerenderedPages?: Readonly<Record<string, ServerPrerenderedPage>>;\n}): string;",
|
|
20901
|
+
"signature": "export declare function generateServerEntry(options: {\n readonly target: BuildTarget;\n /** Vercel-only runtime selection; Edge remains the default. */\n readonly vercelRuntime?: VercelRuntime;\n /** Import specifier for the module exporting `adapter` (e.g. `\"../framework.ts\"`). */\n readonly adapterImport: string;\n /** Import specifier for the module exporting `backend`, or `undefined` for a frontend-only app. */\n readonly backendImport?: string;\n /** Import specifier for the module exporting `use`, or `undefined`. Must resolve to the\n * same edge-safe module as `adapterImport`. */\n readonly useImport?: string;\n /** `createWebApp` options to import by name, each mapped to the specifier of the edge-safe module\n * that exports it. */\n readonly optionImports?: ServerEntryOptionImports;\n /** Document `<title>` passed to `createWebApp`. */\n readonly title?: string;\n /** Encoded root-relative public file paths copied into the deploy directory. */\n readonly publicFiles?: readonly string[];\n /** URL paths of the content-hashed client outputs (the build manifest's `assets`). When given, a\n * self-hosted entry caches only these immutably; otherwise every file under `/assets/` is. */\n readonly hashedFiles?: readonly string[];\n /** Trust the edge platform's client-address header for `c.clientIp`. See {@link ServerEntryClientIp}. */\n readonly clientIp?: ServerEntryClientIp;\n /** How a self-hosted server stops and keeps idle connections. See {@link ServerEntrySelfHost}. */\n readonly selfHost?: ServerEntrySelfHost;\n /** The server manifest exports `copyChunks` (the client build split copy tables by locale). */\n readonly copyChunks?: boolean;\n /** `bun` / `node` only: the pages the build prerendered into `_prerendered/`, by request path, which\n * the app answers from their file (see `createWebApp`'s `prerenderedPages`). */\n readonly prerenderedPages?: Readonly<Record<string, ServerPrerenderedPage>>;\n}): string;",
|
|
20610
20902
|
"doc": "/**\n * Codegen the per-target **server entry** module (source text) for `buildServer` to bundle. It imports\n * the app's `adapter` (from `framework.ts`), the optional `backend` (from `backend.ts`), and the\n * generated `{ manifest, clientEntry }` (from `./server-manifest`), builds `createWebApp`, then wires\n * the right host:\n * - `cloudflare` / `vercel`: `export default` the fetch handler (the platform serves /assets/* itself).\n * - `deno`: a `@nifrajs/deno` server that serves the client bundle with Deno's file API.\n * - `bun` / `node`: a self-hosting server that ALSO serves the client bundle from disk (those\n * runtimes have a filesystem; the static `/assets/*` sit next to the entry).\n * `adapterImport`/`backendImport` are the specifiers the entry uses (relative to where it's written) -\n * `buildServer` writes the entry next to `serverEntry`, so they're resolved from there. Pure (string in,\n * string out) so the generation is unit-testable without a real build.\n */"
|
|
20611
20903
|
},
|
|
20612
20904
|
{
|
|
@@ -20809,7 +21101,7 @@
|
|
|
20809
21101
|
"kind": "function",
|
|
20810
21102
|
"package": "@nifrajs/web",
|
|
20811
21103
|
"signature": "export declare function holeComponents(client: ComponentClientAdapter | undefined): void;",
|
|
20812
|
-
"doc": "/**\n *
|
|
21104
|
+
"doc": "/**\n * How the client islands inside partially prerendered holes that show server\n * components mount, as the adapter's component client, such as `vueComponentClient({ islands })`;\n * `undefined` forgets it. Call it in the client entry before the router mounts. Without one such a\n * hole shows its error slot.\n */"
|
|
20813
21105
|
},
|
|
20814
21106
|
{
|
|
20815
21107
|
"name": "hotUpdateNeedsReload",
|
|
@@ -20818,6 +21110,48 @@
|
|
|
20818
21110
|
"signature": "export declare const hotUpdateNeedsReload = true;",
|
|
20819
21111
|
"doc": "/**\n * Preact cannot apply Bun's hot updates, so the generated client entry reloads instead.\n *\n * Bun's dev server runs React Fast Refresh over JSX modules. A Preact component compiles to JSX that\n * looks the same, so the update is ACCEPTED - and then dropped, because Preact's refresh runtime\n * (prefresh) is not the one Bun installs. Measured: `bun:beforeUpdate` and `bun:afterUpdate` both fire,\n * the server logs the rebuild, the browser keeps rendering the old component and never reloads. The\n * edit simply appears not to happen.\n *\n * Reloading loses component state, which React keeps here. That is the honest trade until Bun's dev\n * server can install prefresh: a visible reload beats an edit that silently does nothing.\n */"
|
|
20820
21112
|
},
|
|
21113
|
+
{
|
|
21114
|
+
"name": "href",
|
|
21115
|
+
"kind": "function",
|
|
21116
|
+
"package": "@nifrajs/web",
|
|
21117
|
+
"signature": "export declare function href<K extends Pattern>(options: HrefOptions<K>): Href<K>;",
|
|
21118
|
+
"doc": "/**\n * The in-app URL for a route: the pattern filled with `params` (each value encoded as one path\n * segment), then `search` serialized as the router reads it, then the `hash`. `to` is a key of the\n * generated route table, so a misspelt route, a missing or misspelt param and a `search` that breaks the\n * route's schema are compile errors; the result is an {@link Href}, the only thing `navigate` takes.\n *\n * ```ts\n * navigate(href({ to: \"/users/:id\", params: { id }, search: { tab: \"posts\" }, hash: \"top\" }))\n * ```\n *\n * A param that is missing, empty, or holds a value no path segment can carry (`.`, `..`, an unpaired\n * surrogate) throws a `TypeError` naming it, in production too: a link built from it would go\n * somewhere else. The result is a pure function of its input, so the server and the browser build the\n * same string. A link to a path built elsewhere is {@link rawHref}; one to another site is a plain `<a>`.\n */"
|
|
21119
|
+
},
|
|
21120
|
+
{
|
|
21121
|
+
"name": "href",
|
|
21122
|
+
"kind": "function",
|
|
21123
|
+
"package": "@nifrajs/web-preact",
|
|
21124
|
+
"signature": "export declare function href<K extends Pattern>(options: HrefOptions<K>): Href<K>;",
|
|
21125
|
+
"doc": "/**\n * The in-app URL for a route: the pattern filled with `params` (each value encoded as one path\n * segment), then `search` serialized as the router reads it, then the `hash`. `to` is a key of the\n * generated route table, so a misspelt route, a missing or misspelt param and a `search` that breaks the\n * route's schema are compile errors; the result is an {@link Href}, the only thing `navigate` takes.\n *\n * ```ts\n * navigate(href({ to: \"/users/:id\", params: { id }, search: { tab: \"posts\" }, hash: \"top\" }))\n * ```\n *\n * A param that is missing, empty, or holds a value no path segment can carry (`.`, `..`, an unpaired\n * surrogate) throws a `TypeError` naming it, in production too: a link built from it would go\n * somewhere else. The result is a pure function of its input, so the server and the browser build the\n * same string. A link to a path built elsewhere is {@link rawHref}; one to another site is a plain `<a>`.\n */"
|
|
21126
|
+
},
|
|
21127
|
+
{
|
|
21128
|
+
"name": "href",
|
|
21129
|
+
"kind": "function",
|
|
21130
|
+
"package": "@nifrajs/web-react",
|
|
21131
|
+
"signature": "export declare function href<K extends Pattern>(options: HrefOptions<K>): Href<K>;",
|
|
21132
|
+
"doc": "/**\n * The in-app URL for a route: the pattern filled with `params` (each value encoded as one path\n * segment), then `search` serialized as the router reads it, then the `hash`. `to` is a key of the\n * generated route table, so a misspelt route, a missing or misspelt param and a `search` that breaks the\n * route's schema are compile errors; the result is an {@link Href}, the only thing `navigate` takes.\n *\n * ```ts\n * navigate(href({ to: \"/users/:id\", params: { id }, search: { tab: \"posts\" }, hash: \"top\" }))\n * ```\n *\n * A param that is missing, empty, or holds a value no path segment can carry (`.`, `..`, an unpaired\n * surrogate) throws a `TypeError` naming it, in production too: a link built from it would go\n * somewhere else. The result is a pure function of its input, so the server and the browser build the\n * same string. A link to a path built elsewhere is {@link rawHref}; one to another site is a plain `<a>`.\n */"
|
|
21133
|
+
},
|
|
21134
|
+
{
|
|
21135
|
+
"name": "href",
|
|
21136
|
+
"kind": "function",
|
|
21137
|
+
"package": "@nifrajs/web-solid",
|
|
21138
|
+
"signature": "export declare function href<K extends Pattern>(options: HrefOptions<K>): Href<K>;",
|
|
21139
|
+
"doc": "/**\n * The in-app URL for a route: the pattern filled with `params` (each value encoded as one path\n * segment), then `search` serialized as the router reads it, then the `hash`. `to` is a key of the\n * generated route table, so a misspelt route, a missing or misspelt param and a `search` that breaks the\n * route's schema are compile errors; the result is an {@link Href}, the only thing `navigate` takes.\n *\n * ```ts\n * navigate(href({ to: \"/users/:id\", params: { id }, search: { tab: \"posts\" }, hash: \"top\" }))\n * ```\n *\n * A param that is missing, empty, or holds a value no path segment can carry (`.`, `..`, an unpaired\n * surrogate) throws a `TypeError` naming it, in production too: a link built from it would go\n * somewhere else. The result is a pure function of its input, so the server and the browser build the\n * same string. A link to a path built elsewhere is {@link rawHref}; one to another site is a plain `<a>`.\n */"
|
|
21140
|
+
},
|
|
21141
|
+
{
|
|
21142
|
+
"name": "href",
|
|
21143
|
+
"kind": "function",
|
|
21144
|
+
"package": "@nifrajs/web-svelte",
|
|
21145
|
+
"signature": "export declare function href<K extends Pattern>(options: HrefOptions<K>): Href<K>;",
|
|
21146
|
+
"doc": "/**\n * The in-app URL for a route: the pattern filled with `params` (each value encoded as one path\n * segment), then `search` serialized as the router reads it, then the `hash`. `to` is a key of the\n * generated route table, so a misspelt route, a missing or misspelt param and a `search` that breaks the\n * route's schema are compile errors; the result is an {@link Href}, the only thing `navigate` takes.\n *\n * ```ts\n * navigate(href({ to: \"/users/:id\", params: { id }, search: { tab: \"posts\" }, hash: \"top\" }))\n * ```\n *\n * A param that is missing, empty, or holds a value no path segment can carry (`.`, `..`, an unpaired\n * surrogate) throws a `TypeError` naming it, in production too: a link built from it would go\n * somewhere else. The result is a pure function of its input, so the server and the browser build the\n * same string. A link to a path built elsewhere is {@link rawHref}; one to another site is a plain `<a>`.\n */"
|
|
21147
|
+
},
|
|
21148
|
+
{
|
|
21149
|
+
"name": "href",
|
|
21150
|
+
"kind": "function",
|
|
21151
|
+
"package": "@nifrajs/web-vue",
|
|
21152
|
+
"signature": "export declare function href<K extends Pattern>(options: HrefOptions<K>): Href<K>;",
|
|
21153
|
+
"doc": "/**\n * The in-app URL for a route: the pattern filled with `params` (each value encoded as one path\n * segment), then `search` serialized as the router reads it, then the `hash`. `to` is a key of the\n * generated route table, so a misspelt route, a missing or misspelt param and a `search` that breaks the\n * route's schema are compile errors; the result is an {@link Href}, the only thing `navigate` takes.\n *\n * ```ts\n * navigate(href({ to: \"/users/:id\", params: { id }, search: { tab: \"posts\" }, hash: \"top\" }))\n * ```\n *\n * A param that is missing, empty, or holds a value no path segment can carry (`.`, `..`, an unpaired\n * surrogate) throws a `TypeError` naming it, in production too: a link built from it would go\n * somewhere else. The result is a pure function of its input, so the server and the browser build the\n * same string. A link to a path built elsewhere is {@link rawHref}; one to another site is a plain `<a>`.\n */"
|
|
21154
|
+
},
|
|
20821
21155
|
{
|
|
20822
21156
|
"name": "html",
|
|
20823
21157
|
"kind": "function",
|
|
@@ -20933,6 +21267,13 @@
|
|
|
20933
21267
|
"signature": "export declare function ifRangeAllowsPartial(ifRange: string | null, etag: string | undefined, lastModified: number | undefined): boolean;",
|
|
20934
21268
|
"doc": "/**\n * Whether `If-Range` (the header, or `null`) lets a range request be answered partially; otherwise the\n * whole file is the conformant answer, not a fallback. An entity tag must equal the file's strong\n * `etag` (RFC 9110 section 13.1.5). A date must equal `lastModified` to the second, and counts only\n * for a file with no strong tag: a client holding the tag sends it, and a date cannot tell apart two\n * versions dated in the same second - here or on another instance - so resuming by one could splice\n * them.\n */"
|
|
20935
21269
|
},
|
|
21270
|
+
{
|
|
21271
|
+
"name": "imageBunPlugin",
|
|
21272
|
+
"kind": "function",
|
|
21273
|
+
"package": "@nifrajs/image",
|
|
21274
|
+
"signature": "export declare function imageBunPlugin(options?: ImageBuildOptions): ImageBunPlugin;",
|
|
21275
|
+
"doc": "/** Install in both clientPlugins and serverPlugins; no codec is loaded unless explicitly supplied. */"
|
|
21276
|
+
},
|
|
20936
21277
|
{
|
|
20937
21278
|
"name": "imageDimensions",
|
|
20938
21279
|
"kind": "function",
|
|
@@ -20940,6 +21281,13 @@
|
|
|
20940
21281
|
"signature": "export declare function imageDimensions(bytes: Uint8Array): ImageInfo | null;",
|
|
20941
21282
|
"doc": "/** Parse intrinsic dimensions + format from image header bytes, or `null` if unrecognized/too short. */"
|
|
20942
21283
|
},
|
|
21284
|
+
{
|
|
21285
|
+
"name": "imageVitePlugin",
|
|
21286
|
+
"kind": "function",
|
|
21287
|
+
"package": "@nifrajs/image",
|
|
21288
|
+
"signature": "export declare function imageVitePlugin(options?: ImageBuildOptions): ImageVitePlugin;",
|
|
21289
|
+
"doc": "/** Use in vitePlugins for both development and production; the dev middleware serves hashed bytes. */"
|
|
21290
|
+
},
|
|
20943
21291
|
{
|
|
20944
21292
|
"name": "implement",
|
|
20945
21293
|
"kind": "function",
|
|
@@ -21273,14 +21621,14 @@
|
|
|
21273
21621
|
"kind": "function",
|
|
21274
21622
|
"package": "@nifrajs/core",
|
|
21275
21623
|
"signature": "export declare function isSameOriginPath(value: string): boolean;",
|
|
21276
|
-
"doc": "/**\n * Is `value` a destination that stays on this origin?\n *\n * True only for an absolute path: one leading `/`, never `//` (protocol-relative → another origin),\n * and free of any character a URL parser turns into an origin escape. A leading `/` alone is not\n * enough: under a special scheme `\\` parses as `/`, and tab/CR/LF are STRIPPED before parsing, so\n * `/\\evil.example` and `/<TAB>/evil.example` both resolve to the external host `evil.example` while\n * passing a `//` test. Rejecting CR/LF here also keeps a validated destination out of the\n * response-splitting sink it usually flows into.\n *\n * One implementation, because every caller is the same open-redirect gate: `redirect()`
|
|
21624
|
+
"doc": "/**\n * Is `value` a destination that stays on this origin?\n *\n * True only for an absolute path: one leading `/`, never `//` (protocol-relative → another origin),\n * and free of any character a URL parser turns into an origin escape. A leading `/` alone is not\n * enough: under a special scheme `\\` parses as `/`, and tab/CR/LF are STRIPPED before parsing, so\n * `/\\evil.example` and `/<TAB>/evil.example` both resolve to the external host `evil.example` while\n * passing a `//` test. Rejecting CR/LF here also keeps a validated destination out of the\n * response-splitting sink it usually flows into.\n *\n * One implementation, because every caller is the same open-redirect gate: `redirect()` and\n * `rawHref()` in `@nifrajs/web`, the `redirectTo` of the `@nifrajs/auth` and `@nifrajs/better-auth` guards. Three\n * copies of a security predicate is three chances for one of them to be hardened alone.\n *\n * It answers about a PATH, not a URL: an absolute `https://this.host/x` is false even for the\n * current origin, because the whole point is that the value never got to name a host.\n *\n * It sits in a leaf with no imports, so browser code (`rawHref` in `@nifrajs/web`) can use it without\n * the server entry; `@nifrajs/core/server` and `@nifrajs/core/pattern` both export it.\n */"
|
|
21277
21625
|
},
|
|
21278
21626
|
{
|
|
21279
21627
|
"name": "isSameOriginPath",
|
|
21280
21628
|
"kind": "function",
|
|
21281
21629
|
"package": "nifra",
|
|
21282
21630
|
"signature": "export declare function isSameOriginPath(value: string): boolean;",
|
|
21283
|
-
"doc": "/**\n * Is `value` a destination that stays on this origin?\n *\n * True only for an absolute path: one leading `/`, never `//` (protocol-relative → another origin),\n * and free of any character a URL parser turns into an origin escape. A leading `/` alone is not\n * enough: under a special scheme `\\` parses as `/`, and tab/CR/LF are STRIPPED before parsing, so\n * `/\\evil.example` and `/<TAB>/evil.example` both resolve to the external host `evil.example` while\n * passing a `//` test. Rejecting CR/LF here also keeps a validated destination out of the\n * response-splitting sink it usually flows into.\n *\n * One implementation, because every caller is the same open-redirect gate: `redirect()`
|
|
21631
|
+
"doc": "/**\n * Is `value` a destination that stays on this origin?\n *\n * True only for an absolute path: one leading `/`, never `//` (protocol-relative → another origin),\n * and free of any character a URL parser turns into an origin escape. A leading `/` alone is not\n * enough: under a special scheme `\\` parses as `/`, and tab/CR/LF are STRIPPED before parsing, so\n * `/\\evil.example` and `/<TAB>/evil.example` both resolve to the external host `evil.example` while\n * passing a `//` test. Rejecting CR/LF here also keeps a validated destination out of the\n * response-splitting sink it usually flows into.\n *\n * One implementation, because every caller is the same open-redirect gate: `redirect()` and\n * `rawHref()` in `@nifrajs/web`, the `redirectTo` of the `@nifrajs/auth` and `@nifrajs/better-auth` guards. Three\n * copies of a security predicate is three chances for one of them to be hardened alone.\n *\n * It answers about a PATH, not a URL: an absolute `https://this.host/x` is false even for the\n * current origin, because the whole point is that the value never got to name a host.\n *\n * It sits in a leaf with no imports, so browser code (`rawHref` in `@nifrajs/web`) can use it without\n * the server entry; `@nifrajs/core/server` and `@nifrajs/core/pattern` both export it.\n */"
|
|
21284
21632
|
},
|
|
21285
21633
|
{
|
|
21286
21634
|
"name": "isSameOriginRequest",
|
|
@@ -22624,7 +22972,7 @@
|
|
|
22624
22972
|
"kind": "function",
|
|
22625
22973
|
"package": "@nifrajs/web",
|
|
22626
22974
|
"signature": "export declare function partialPrerendering(config: PprConfig): PprSetup;",
|
|
22627
|
-
"doc": "/**\n *
|
|
22975
|
+
"doc": "/**\n * Partial prerendering for `createWebApp({ ppr })`. Options are\n * checked here, at startup; each app the value is given to gets its own shell cache.\n */"
|
|
22628
22976
|
},
|
|
22629
22977
|
{
|
|
22630
22978
|
"name": "pathTag",
|
|
@@ -22683,7 +23031,7 @@
|
|
|
22683
23031
|
"name": "planBuildTarget",
|
|
22684
23032
|
"kind": "function",
|
|
22685
23033
|
"package": "@nifrajs/web",
|
|
22686
|
-
"signature": "export declare function planBuildTarget(target: BuildTarget, outDir: string): BuildTargetPlan;",
|
|
23034
|
+
"signature": "export declare function planBuildTarget(target: BuildTarget, outDir: string, vercelRuntime?: VercelRuntime): BuildTargetPlan;",
|
|
22687
23035
|
"doc": "/**\n * Resolve the target-specific deploy shape before any bundling starts. Keeping this decision pure\n * means Bun and Vite strategies share the same output filename, server target, and hand-off text;\n * the filesystem emitter only has to execute the plan.\n */"
|
|
22688
23036
|
},
|
|
22689
23037
|
{
|
|
@@ -22760,7 +23108,7 @@
|
|
|
22760
23108
|
"kind": "function",
|
|
22761
23109
|
"package": "@nifrajs/web",
|
|
22762
23110
|
"signature": "export declare function pprShells(app: object): PprShells;",
|
|
22763
|
-
"doc": "/**\n * The shell cache of an app made with `
|
|
23111
|
+
"doc": "/**\n * The shell cache of an app made with `ppr`. Pass it in `createInvalidator`'s\n * `dataCaches` so a purge by tag also drops the shells built from the purged data.\n */"
|
|
22764
23112
|
},
|
|
22765
23113
|
{
|
|
22766
23114
|
"name": "preRouteMountPaths",
|
|
@@ -22877,6 +23225,20 @@
|
|
|
22877
23225
|
"signature": "export declare function proveIdempotency(options: {\n readonly run: () => Promise<EffectLedger> | EffectLedger;\n readonly runs?: number;\n}): Promise<IdempotencyProof>;",
|
|
22878
23226
|
"doc": "/** Run a token-only effect workload repeatedly and report the first stable replay differences. */"
|
|
22879
23227
|
},
|
|
23228
|
+
{
|
|
23229
|
+
"name": "provideQueryClient",
|
|
23230
|
+
"kind": "function",
|
|
23231
|
+
"package": "@nifrajs/web-svelte",
|
|
23232
|
+
"signature": "export declare function provideQueryClient(client: QueryClient, state?: DehydratedState): void;",
|
|
23233
|
+
"doc": "/** Set the component-tree client and hydrate it before descendants subscribe to queries. */"
|
|
23234
|
+
},
|
|
23235
|
+
{
|
|
23236
|
+
"name": "provideQueryClient",
|
|
23237
|
+
"kind": "function",
|
|
23238
|
+
"package": "@nifrajs/web-vue",
|
|
23239
|
+
"signature": "export declare function provideQueryClient(client: QueryClient, state?: DehydratedState): void;",
|
|
23240
|
+
"doc": "/** Provide a request-scoped client and optionally hydrate it before child setup runs. */"
|
|
23241
|
+
},
|
|
22880
23242
|
{
|
|
22881
23243
|
"name": "publicDocsTools",
|
|
22882
23244
|
"kind": "function",
|
|
@@ -22972,6 +23334,48 @@
|
|
|
22972
23334
|
"signature": "export declare function raw(trusted: string): RawHtml;",
|
|
22973
23335
|
"doc": "/**\n * Mark a string as trusted, pre-escaped markup - it is emitted verbatim. The deliberate escape\n * hatch (CMS-sanitized HTML, pre-rendered markdown): every call site is greppable, exactly like\n * React's dangerouslySetInnerHTML, without the JSX.\n */"
|
|
22974
23336
|
},
|
|
23337
|
+
{
|
|
23338
|
+
"name": "rawHref",
|
|
23339
|
+
"kind": "function",
|
|
23340
|
+
"package": "@nifrajs/web",
|
|
23341
|
+
"signature": "export declare function rawHref(path: string): Href;",
|
|
23342
|
+
"doc": "/**\n * An {@link Href} for a same-origin path built elsewhere: a CMS link, a `@nifrajs/content` page, a public\n * file such as `/llms.txt`. The path is returned as written, never encoded, after `isSameOriginPath`\n * (the check `redirect()` makes) accepts it: one leading `/`, not `//`, no backslash and no control\n * character. Anything else throws a `TypeError`. A route of this app is {@link href}; another site is a\n * plain `<a href>`.\n */"
|
|
23343
|
+
},
|
|
23344
|
+
{
|
|
23345
|
+
"name": "rawHref",
|
|
23346
|
+
"kind": "function",
|
|
23347
|
+
"package": "@nifrajs/web-preact",
|
|
23348
|
+
"signature": "export declare function rawHref(path: string): Href;",
|
|
23349
|
+
"doc": "/**\n * An {@link Href} for a same-origin path built elsewhere: a CMS link, a `@nifrajs/content` page, a public\n * file such as `/llms.txt`. The path is returned as written, never encoded, after `isSameOriginPath`\n * (the check `redirect()` makes) accepts it: one leading `/`, not `//`, no backslash and no control\n * character. Anything else throws a `TypeError`. A route of this app is {@link href}; another site is a\n * plain `<a href>`.\n */"
|
|
23350
|
+
},
|
|
23351
|
+
{
|
|
23352
|
+
"name": "rawHref",
|
|
23353
|
+
"kind": "function",
|
|
23354
|
+
"package": "@nifrajs/web-react",
|
|
23355
|
+
"signature": "export declare function rawHref(path: string): Href;",
|
|
23356
|
+
"doc": "/**\n * An {@link Href} for a same-origin path built elsewhere: a CMS link, a `@nifrajs/content` page, a public\n * file such as `/llms.txt`. The path is returned as written, never encoded, after `isSameOriginPath`\n * (the check `redirect()` makes) accepts it: one leading `/`, not `//`, no backslash and no control\n * character. Anything else throws a `TypeError`. A route of this app is {@link href}; another site is a\n * plain `<a href>`.\n */"
|
|
23357
|
+
},
|
|
23358
|
+
{
|
|
23359
|
+
"name": "rawHref",
|
|
23360
|
+
"kind": "function",
|
|
23361
|
+
"package": "@nifrajs/web-solid",
|
|
23362
|
+
"signature": "export declare function rawHref(path: string): Href;",
|
|
23363
|
+
"doc": "/**\n * An {@link Href} for a same-origin path built elsewhere: a CMS link, a `@nifrajs/content` page, a public\n * file such as `/llms.txt`. The path is returned as written, never encoded, after `isSameOriginPath`\n * (the check `redirect()` makes) accepts it: one leading `/`, not `//`, no backslash and no control\n * character. Anything else throws a `TypeError`. A route of this app is {@link href}; another site is a\n * plain `<a href>`.\n */"
|
|
23364
|
+
},
|
|
23365
|
+
{
|
|
23366
|
+
"name": "rawHref",
|
|
23367
|
+
"kind": "function",
|
|
23368
|
+
"package": "@nifrajs/web-svelte",
|
|
23369
|
+
"signature": "export declare function rawHref(path: string): Href;",
|
|
23370
|
+
"doc": "/**\n * An {@link Href} for a same-origin path built elsewhere: a CMS link, a `@nifrajs/content` page, a public\n * file such as `/llms.txt`. The path is returned as written, never encoded, after `isSameOriginPath`\n * (the check `redirect()` makes) accepts it: one leading `/`, not `//`, no backslash and no control\n * character. Anything else throws a `TypeError`. A route of this app is {@link href}; another site is a\n * plain `<a href>`.\n */"
|
|
23371
|
+
},
|
|
23372
|
+
{
|
|
23373
|
+
"name": "rawHref",
|
|
23374
|
+
"kind": "function",
|
|
23375
|
+
"package": "@nifrajs/web-vue",
|
|
23376
|
+
"signature": "export declare function rawHref(path: string): Href;",
|
|
23377
|
+
"doc": "/**\n * An {@link Href} for a same-origin path built elsewhere: a CMS link, a `@nifrajs/content` page, a public\n * file such as `/llms.txt`. The path is returned as written, never encoded, after `isSameOriginPath`\n * (the check `redirect()` makes) accepts it: one leading `/`, not `//`, no backslash and no control\n * character. Anything else throws a `TypeError`. A route of this app is {@link href}; another site is a\n * plain `<a href>`.\n */"
|
|
23378
|
+
},
|
|
22975
23379
|
{
|
|
22976
23380
|
"name": "reactAdapter",
|
|
22977
23381
|
"kind": "const",
|
|
@@ -23205,8 +23609,7 @@
|
|
|
23205
23609
|
"name": "redirect",
|
|
23206
23610
|
"kind": "function",
|
|
23207
23611
|
"package": "@nifrajs/web",
|
|
23208
|
-
"signature": "export declare function redirect(location: string, options
|
|
23209
|
-
"doc": "/**\n * Build a redirect - return it from a route `action` for the Post/Redirect/Get pattern (POST\n * mutates, 303 sends the browser to a fresh GET, so a reload doesn't re-submit). Defaults to 303\n * (See Other); pass `{ status: 307 }` or `{ status: 308 }` to preserve the method.\n *\n * **Secure by default:** `location` must be a same-origin path (begins with `/`, not `//`). An\n * off-origin/absolute destination throws unless you pass `{ external: true }` - this closes the\n * open-redirect footgun of `return redirect(formData.get(\"next\"))` on the no-JS (native-form) path,\n * which serves the action's control-flow value verbatim.\n *\n * Returns a plain render, not a `Response`. A redirect is a status line and one header - the most\n * body-less response there is - and building a `Response` for it costs the whole Web object plus, on\n * Node, a stream drained back out. As data it renders on the same lane a handler's return takes.\n * `redirect(...)` is still returned or thrown from exactly the same places; only `.status` /\n * `.headers` are gone from the value, replaced by `options.headers` and the request's `c.set`.\n *\n * @param options redirect status, extra headers, and whether an off-origin destination is intentional.\n */"
|
|
23612
|
+
"signature": "export declare function redirect(location: string, options: RedirectOptions & {\n readonly external: true;\n}): ResponseResult;"
|
|
23210
23613
|
},
|
|
23211
23614
|
{
|
|
23212
23615
|
"name": "redisLiveBus",
|
|
@@ -23574,8 +23977,8 @@
|
|
|
23574
23977
|
"name": "resolveImage",
|
|
23575
23978
|
"kind": "function",
|
|
23576
23979
|
"package": "@nifrajs/image",
|
|
23577
|
-
"signature": "export declare function resolveImage(props:
|
|
23578
|
-
"doc": "/**\n * Resolve
|
|
23980
|
+
"signature": "export declare function resolveImage(props: ImageInputProps, loader?: ImageLoader): ResolvedImage;",
|
|
23981
|
+
"doc": "/**\n * Resolve a URL or imported asset into CLS-safe attributes. Explicit dimensions override imported\n * metadata; supplying just one scales the other to preserve the source's aspect ratio. Prebuilt\n * variants need no runtime loader. An explicit CDN loader takes precedence over those variants.\n */"
|
|
23579
23982
|
},
|
|
23580
23983
|
{
|
|
23581
23984
|
"name": "resolveLocale",
|
|
@@ -23591,13 +23994,6 @@
|
|
|
23591
23994
|
"signature": "export declare function resolveMeta(meta: MetaInput | undefined, args: MetaArgs): Meta;",
|
|
23592
23995
|
"doc": "/** Resolve a route's `meta` export - a static object, or a function of the route's data/params. */"
|
|
23593
23996
|
},
|
|
23594
|
-
{
|
|
23595
|
-
"name": "resolveNavigate",
|
|
23596
|
-
"kind": "function",
|
|
23597
|
-
"package": "@nifrajs/web",
|
|
23598
|
-
"signature": "export declare function resolveNavigate(to: string | number | NavigateTargetInput, options?: NavigateOptions): {\n readonly to: string | number;\n readonly options: NavigateOptions | undefined;\n};",
|
|
23599
|
-
"doc": "/**\n * Normalize a navigate argument to the bridge's `(to, options)`: a string path or history-delta passes\n * through; an object target has its `search` serialized onto `to` and its `replace` folded into the\n * options. The one place the object form becomes a URL, so every adapter's `navigate` resolves it\n * identically.\n */"
|
|
23600
|
-
},
|
|
23601
23997
|
{
|
|
23602
23998
|
"name": "resolvePublicPath",
|
|
23603
23999
|
"kind": "function",
|
|
@@ -25355,7 +25751,7 @@
|
|
|
25355
25751
|
"kind": "function",
|
|
25356
25752
|
"package": "@nifrajs/web-svelte",
|
|
25357
25753
|
"signature": "export declare function ui<Props extends Record<string, unknown>>(component: Component<Props>, ...props: Record<string, never> extends Props ? [props?: Props] : [props: Props]): SvelteUI;",
|
|
25358
|
-
"doc": "/**
|
|
25754
|
+
"doc": "/** `component` rendered with `props`, for a partially prerendered hole. */"
|
|
25359
25755
|
},
|
|
25360
25756
|
{
|
|
25361
25757
|
"name": "uiResourceMeta",
|
|
@@ -25537,6 +25933,13 @@
|
|
|
25537
25933
|
"signature": "export declare function useFetchers(): Readonly<ShallowRef<readonly Fetcher[]>>;",
|
|
25538
25934
|
"doc": "/**\n * Subscribe to the whole live fetcher collection - for a global busy view (e.g. \"3 saving…\"). Read\n * each entry's `.snapshot()` for its state. The ref updates whenever any fetcher transitions or a new\n * one is created.\n */"
|
|
25539
25935
|
},
|
|
25936
|
+
{
|
|
25937
|
+
"name": "useInfiniteQuery",
|
|
25938
|
+
"kind": "function",
|
|
25939
|
+
"package": "@nifrajs/web-preact",
|
|
25940
|
+
"signature": "export declare function useInfiniteQuery<T, P>(key: unknown, fn: (pageParam: P) => Promise<T>, options: UseInfiniteQueryOptions<T, P>): UseInfiniteQueryResult<T, P>;",
|
|
25941
|
+
"doc": "/** A paged query binding that follows Preact's mount and subscription lifecycle. */"
|
|
25942
|
+
},
|
|
25540
25943
|
{
|
|
25541
25944
|
"name": "useInfiniteQuery",
|
|
25542
25945
|
"kind": "function",
|
|
@@ -25544,6 +25947,20 @@
|
|
|
25544
25947
|
"signature": "export declare function useInfiniteQuery<T, P>(key: unknown, fn: (pageParam: P) => Promise<T>, options: UseInfiniteQueryOptions<T, P>): UseInfiniteQueryResult<T, P>;",
|
|
25545
25948
|
"doc": "/**\n * Subscribe to a paged (infinite-scroll) query. Returns the accumulated `data.pages` plus\n * `fetchNextPage`/`fetchPreviousPage`/`hasNextPage`/`hasPreviousPage`. Fetches the first page on mount.\n * SSR-idle unless a `QueryClientProvider` supplies a hydrated client.\n */"
|
|
25546
25949
|
},
|
|
25950
|
+
{
|
|
25951
|
+
"name": "useInfiniteQuery",
|
|
25952
|
+
"kind": "function",
|
|
25953
|
+
"package": "@nifrajs/web-svelte",
|
|
25954
|
+
"signature": "export declare function useInfiniteQuery<T, P>(key: unknown, fn: (pageParam: P) => Promise<T>, options: UseInfiniteQueryOptions<T, P>): InfiniteQueryStore<T, P>;",
|
|
25955
|
+
"doc": "/** Bind a paged query as a Svelte readable store. Fetching starts on the first browser subscription. */"
|
|
25956
|
+
},
|
|
25957
|
+
{
|
|
25958
|
+
"name": "useInfiniteQuery",
|
|
25959
|
+
"kind": "function",
|
|
25960
|
+
"package": "@nifrajs/web-vue",
|
|
25961
|
+
"signature": "export declare function useInfiniteQuery<T, P>(key: unknown, fn: (pageParam: P) => Promise<T>, options: UseInfiniteQueryOptions<T, P>): UseInfiniteQueryResult<T, P>;",
|
|
25962
|
+
"doc": "/** Bind a paged query to Vue's mount and effect-scope lifecycles. */"
|
|
25963
|
+
},
|
|
25547
25964
|
{
|
|
25548
25965
|
"name": "useLocale",
|
|
25549
25966
|
"kind": "function",
|
|
@@ -25628,47 +26045,68 @@
|
|
|
25628
26045
|
"signature": "export declare function useMatches(): Readonly<Ref<readonly UIMatch[]>>;",
|
|
25629
26046
|
"doc": "/**\n * The rendered chain - each layout, then the page - with the URL prefix, params and loader data each\n * one owns, plus its `handle` export, as a reactive ref. The same list on the server render and the\n * client mount, so a layout can render breadcrumbs from its children's `handle`s without a hydration\n * mismatch.\n *\n * ```vue\n * // page: export const handle = { crumb: \"Settings\" } (a plain <script> block)\n * const matches = useMatches()\n * const crumbs = computed(() => matches.value.flatMap((m) => (m.handle as { crumb?: string } | undefined)?.crumb ?? []))\n * ```\n */"
|
|
25630
26047
|
},
|
|
26048
|
+
{
|
|
26049
|
+
"name": "useMutation",
|
|
26050
|
+
"kind": "function",
|
|
26051
|
+
"package": "@nifrajs/web-preact",
|
|
26052
|
+
"signature": "export declare function useMutation<TData, TVariables = void>(fn: (variables: TVariables, context: MutationContext) => Promise<TData>, callbacks?: MutationCallbacks<TData, TVariables>): UseMutationResult<TData, TVariables>;",
|
|
26053
|
+
"doc": "/** A mutation binding with Preact state subscriptions and identity-boundary cancellation. */"
|
|
26054
|
+
},
|
|
25631
26055
|
{
|
|
25632
26056
|
"name": "useMutation",
|
|
25633
26057
|
"kind": "function",
|
|
25634
26058
|
"package": "@nifrajs/web-react",
|
|
25635
|
-
"signature": "export declare function useMutation<TData, TVariables = void>(fn: (variables: TVariables) => Promise<TData>, callbacks?: MutationCallbacks<TData, TVariables>): UseMutationResult<TData, TVariables>;",
|
|
25636
|
-
"doc": "/**\n * A mutation hook (create/update/delete). Returns `{ mutate, mutateAsync, data, error, variables, isIdle,\n * isPending, isError, isSuccess, reset }`. Invalidate affected queries from `onSuccess` via\n * `useQueryClient().invalidateQueries(...)`. The handle is stable across renders; the latest `fn`/\n * callbacks re-bind each render.\n */"
|
|
26059
|
+
"signature": "export declare function useMutation<TData, TVariables = void>(fn: (variables: TVariables, context: MutationContext) => Promise<TData>, callbacks?: MutationCallbacks<TData, TVariables>): UseMutationResult<TData, TVariables>;",
|
|
26060
|
+
"doc": "/**\n * A mutation hook (create/update/delete). Returns `{ mutate, mutateAsync, data, error, variables, isIdle,\n * isPending, isError, isSuccess, reset, cancel }`. Invalidate affected queries from `onSuccess` via\n * `useQueryClient().invalidateQueries(...)`. The handle is stable across renders; the latest `fn`/\n * callbacks re-bind each render.\n */"
|
|
26061
|
+
},
|
|
26062
|
+
{
|
|
26063
|
+
"name": "useMutation",
|
|
26064
|
+
"kind": "function",
|
|
26065
|
+
"package": "@nifrajs/web-svelte",
|
|
26066
|
+
"signature": "export declare function useMutation<TData, TVariables = void>(fn: (variables: TVariables, context: MutationContext) => Promise<TData>, callbacks?: MutationCallbacks<TData, TVariables>): MutationStore<TData, TVariables>;",
|
|
26067
|
+
"doc": "/** Bind a mutation as a Svelte store. Identity changes discard late results and callbacks. */"
|
|
26068
|
+
},
|
|
26069
|
+
{
|
|
26070
|
+
"name": "useMutation",
|
|
26071
|
+
"kind": "function",
|
|
26072
|
+
"package": "@nifrajs/web-vue",
|
|
26073
|
+
"signature": "export declare function useMutation<TData, TVariables = void>(fn: (variables: TVariables, context: MutationContext) => Promise<TData>, callbacks?: MutationCallbacks<TData, TVariables>): UseMutationResult<TData, TVariables>;",
|
|
26074
|
+
"doc": "/** Bind a mutation to Vue's effect scope. Identity changes discard late results and callbacks. */"
|
|
25637
26075
|
},
|
|
25638
26076
|
{
|
|
25639
26077
|
"name": "useNavigate",
|
|
25640
26078
|
"kind": "function",
|
|
25641
26079
|
"package": "@nifrajs/web-preact",
|
|
25642
26080
|
"signature": "export declare function useNavigate(): NavigateFunction;",
|
|
25643
|
-
"doc": "/** Get the {@link NavigateFunction} (
|
|
26081
|
+
"doc": "/** Get the {@link NavigateFunction} (an `Href` from `href()` or `rawHref()`, or a history delta).\n * Stable across renders; resolves the browser navigate at call time, so it works as soon as\n * `installHistory` has run and no-ops before then / on the server. */"
|
|
25644
26082
|
},
|
|
25645
26083
|
{
|
|
25646
26084
|
"name": "useNavigate",
|
|
25647
26085
|
"kind": "function",
|
|
25648
26086
|
"package": "@nifrajs/web-react",
|
|
25649
26087
|
"signature": "export declare function useNavigate(): NavigateFunction;",
|
|
25650
|
-
"doc": "/** Get the {@link NavigateFunction} (
|
|
26088
|
+
"doc": "/** Get the {@link NavigateFunction} (an `Href` from `href()` or `rawHref()`, or a history delta;\n * a render-time navigate isn't valid - use {@link Navigate}, which navigates in an effect). Stable across\n * renders; resolves the browser navigate at call time (so it works as soon as `installHistory` has run,\n * and no-ops before then / on the server). */"
|
|
25651
26089
|
},
|
|
25652
26090
|
{
|
|
25653
26091
|
"name": "useNavigate",
|
|
25654
26092
|
"kind": "function",
|
|
25655
26093
|
"package": "@nifrajs/web-solid",
|
|
25656
26094
|
"signature": "export declare function useNavigate(): NavigateFunction;",
|
|
25657
|
-
"doc": "/** Get the {@link NavigateFunction} (
|
|
26095
|
+
"doc": "/** Get the {@link NavigateFunction} (an `Href` from `href()` or `rawHref()`, or a history delta).\n * Resolves the browser navigate at call time, so it works as soon as `installHistory` has run and no-ops\n * before then / on the server. */"
|
|
25658
26096
|
},
|
|
25659
26097
|
{
|
|
25660
26098
|
"name": "useNavigate",
|
|
25661
26099
|
"kind": "function",
|
|
25662
26100
|
"package": "@nifrajs/web-svelte",
|
|
25663
26101
|
"signature": "export declare function useNavigate(): NavigateFunction;",
|
|
25664
|
-
"doc": "/** Get the {@link NavigateFunction} (
|
|
26102
|
+
"doc": "/** Get the {@link NavigateFunction} (an `Href` from `href()` or `rawHref()`, or a history delta).\n * Resolves the browser navigate at call time, so it works as soon as `installHistory` has run and no-ops\n * before then / on the server. */"
|
|
25665
26103
|
},
|
|
25666
26104
|
{
|
|
25667
26105
|
"name": "useNavigate",
|
|
25668
26106
|
"kind": "function",
|
|
25669
26107
|
"package": "@nifrajs/web-vue",
|
|
25670
26108
|
"signature": "export declare function useNavigate(): NavigateFunction;",
|
|
25671
|
-
"doc": "/** Get the {@link NavigateFunction} (
|
|
26109
|
+
"doc": "/** Get the {@link NavigateFunction} (an `Href` from `href()` or `rawHref()`, or a history delta).\n * Resolves the browser navigate at call time, so it works as soon as `installHistory` has run and no-ops\n * before then / on the server. */"
|
|
25672
26110
|
},
|
|
25673
26111
|
{
|
|
25674
26112
|
"name": "useNavigation",
|
|
@@ -25948,6 +26386,13 @@
|
|
|
25948
26386
|
"signature": "export declare function validateUpload(input: Uint8Array | ArrayBuffer | Blob, options: ValidateUploadOptions): Promise<UploadResult>;",
|
|
25949
26387
|
"doc": "/** Validate uploaded bytes/Blob: size cap + magic-byte type sniff against an optional allow-list. */"
|
|
25950
26388
|
},
|
|
26389
|
+
{
|
|
26390
|
+
"name": "validateVercelRuntime",
|
|
26391
|
+
"kind": "function",
|
|
26392
|
+
"package": "@nifrajs/web",
|
|
26393
|
+
"signature": "export declare function validateVercelRuntime(target: BuildTarget, runtime: unknown): void;",
|
|
26394
|
+
"doc": "/** Validate before any deploy directory is cleared, including untyped config/API callers. */"
|
|
26395
|
+
},
|
|
25951
26396
|
{
|
|
25952
26397
|
"name": "vanillaAdapter",
|
|
25953
26398
|
"kind": "const",
|