/**
* Island segmentation for [PAGE] bodies.
*
* A page body is markdown prose interleaved with Svelte "islands" — component
* tags, HTML sections, and template blocks like {#snippet}…{/snippet}. Markdown
* tooling (the renderer, prettier) must never look inside an island: markdown's
* paragraph and HTML-block rules split Svelte structure apart (a snippet opened
* inside a
and closed outside fails to compile; a blank line cuts a
* section in half; a formatter re-indents block lines it can't understand).
*
* The rule an author sees: a line that starts a Svelte block ({#…}, {@render …})
* or an HTML/component tag, sitting at the start of a markdown block (preceded
* by a blank line or the body edge), begins an island. The island runs until
* its Svelte blocks and HTML tags are balanced — blank lines inside are part of
* the island. Everything else is prose.
*/
export interface PageSegment {
kind: 'prose' | 'island';
/** Verbatim lines of the segment */
lines: string[];
}
/** Split a page body into prose and island segments. Lines inside markdown
* code fences are always prose — a component tag shown in a fence must stay
* displayed code, never a live island. */
export declare function segmentPageBody(body: string): PageSegment[];