import type { PageMetadata } from "../types.js"; export interface ShellOptions { /** Rendered inner HTML that goes inside `#app`. */ body: string; /** `` text. */ title?: string; /** `<html lang>` attribute. */ lang?: string; /** Additional attributes for the `<html>` element, e.g. `{ "data-theme": "dark" }`. */ htmlAttributes?: Record<string, string>; /** * Inline scripts injected into `<head>`. They run synchronously while the * document parses — before the first paint and before the (deferred) client * bundle — so they are the right place for no-flash bootstrapping (e.g. * applying a stored theme before the page becomes visible). */ headScripts?: string[]; /** * Raw HTML strings injected into `<head>` — e.g. `<link rel="icon">`, * `<link rel="manifest">`, `<meta name="theme-color">`. Each string is * rendered as-is inside `<head>`. */ headLinks?: string[]; /** Loader data serialized into `<script id="nix-js-data">`. */ data?: unknown; /** Per-page action names serialized into `<script id="nix-js-actions">`. */ actions?: Record<string, string[]>; /** Path to the client entry module, e.g. `/_nix-js/entry-client.js`. */ clientEntry?: string; /** Page metadata emitted as `<meta>`, `<link>` and OG/Twitter tags in `<head>`. */ metadata?: PageMetadata; /** * Whether the SSR render endpoint (`/__nix-js/render`) is available at * runtime. Defaults to `true`. When `false` (static deployments), the shell * emits `<meta name="nix-js:render-endpoint" content="off" />` so the client * router skips probing the endpoint entirely — preventing a storm of 404 * requests on fully static sites. */ renderEndpoint?: boolean; } /** * Builds the `<head>` tags for a `PageMetadata` object. Every tag is marked with * `data-nix-js-head` so the client-side router can replace them on navigation * without touching charset/viewport or user-supplied `headScripts`. */ export declare function buildHeadTags(metadata: PageMetadata, fallbackTitle: string): string; /** Wraps rendered body HTML into a full HTML document. */ export declare function documentShell(opts: ShellOptions): string;