/** * [PAGE] body transform: markdown-first with Svelte conveniences. * * The body is CommonMark/GFM; prose passes through untouched so * `{expression}` interpolation and `` islands compile in the * generated Svelte preview. Code fences and inline code are INERT: they are * highlighted (fences) or wrapped (inline) at transform time with `{` and * `}` escaped, so nothing inside code ever interpolates. */ import type { TocHeading } from '../types.js'; export interface RenderedPage { html: string; toc: TocHeading[]; /** Text of the body's first `#` heading, when present — it takes over as * the page's displayed title. */ bodyTitle?: string; } /** * Render a [PAGE] body: Svelte islands (see segmentPageBody) pass through * verbatim — markdown never splits a snippet or an HTML section — and the * prose between them renders as markdown. Islands land at the top level of * the compiled fragment, so a snippet declared anywhere is renderable from * anywhere on the page. */ /** * Prefix root-absolute src/href URLs in rendered page HTML with the build's * public base path. Markdown like `![x](/sample.svg)` or `[a](/guides/colors)` * refers to the site root; under a sub-path deploy (GitHub project Pages) the * site root is `/repo/`, and Vite only rewrites assets it processes — not * URLs inside runtime HTML strings. Protocol-relative (`//`) URLs and dev * virtual paths (`/@`) pass through; a root base is a no-op. */ export declare function applyBaseToHtml(html: string, base: string): string; export declare function renderPageMarkdown(source: string): Promise;