/** * Railroad-diagram (syntax-diagram) emitter. Converts the spec model to a * self-contained HTML page that renders SVG railroad diagrams — one per * production — using a vendored copy of tabatkins/railroad-diagrams (CC0). * * The page has no external dependencies: the diagram library and its CSS are * inlined, so it renders offline and drops straight into a docs site. */ import type { SpecModel } from './model.ts'; /** One production rendered to a static SVG string. */ export type RailroadSvg = { name: string; svg: string; }; /** * Render each production to a self-contained **static SVG** string — no DOM and * no client-side script, so a diagram can be inlined straight into a docs page, * README, or any HTML. Pair each SVG with [`RAILROAD_CSS`](./railroad-lib) (scope * it to a container) to style the strokes and boxes. */ export declare function renderRailroadSvg(model: SpecModel): RailroadSvg[]; export type RailroadHtmlOptions = { /** Page `` and top heading. Default: "Grammar". */ title?: string; /** Show the EBNF production text under each diagram. Default: true. */ showEbnf?: boolean; }; /** Render the spec model as a self-contained HTML page of railroad diagrams. */ export declare function renderRailroadHtml(model: SpecModel, options?: RailroadHtmlOptions): string; //# sourceMappingURL=railroad.d.ts.map