Appearance
Render API
Use the render package for DOM-free registries, deterministic text measurement, layout, and SVG or standalone HTML serialization.
| Entry point | Main exports | Boundary |
|---|---|---|
@coral-viz/render | shapes, symbols, notations, text metrics, renderSvg, renderHtml | Serializes supplied geometry |
@coral-viz/render/layout | computeElkLayout, resolveSpatialLayout, option normalization, layout diagnostics | Computes and resolves geometry |
Geometry and spatial behavior
renderSvg and renderHtml don't run layout. Call the layout subpath, then apply positions, dimensions, and route sections before rendering. The root renderer rejects unresolved label placement and route intent rather than pretending it resolved them.
The layout API supports layered, mrtree, stress, force, radial, box, and fixed; four directions; three routing styles; and nested or separate hierarchy handling. Invalid options produce layout.option.invalid. Execution, ports, spatial constraints, routes, and worker fallback have their own closed LayoutDiagnosticCode values.
GraphIR 2.0 Exact positions, required/preferred spatial constraints, and route intent are current. Durable conversational relations such as “keep these services near each other” aren't a separate persisted 0.2.5 intent model.
Fonts and deterministic output
The default SVG path embeds one 400-weight Inter face (48,256 bytes). Supplying font settings, fontWeight, or lineHeight enables portable font resolution; fontFamily or fontSize alone doesn't. Portable output embeds each used family/weight request. Current variable-font assets can embed the same file twice when both 400 and 700 are requested.
The four packaged fonts contain the pinned Latin range, not arbitrary Unicode. Unsupported characters can affect both glyph fallback and measured geometry. Coral disables kerning, optical sizing, ligatures, and related shaping features for deterministic measurement.
The render tarball carries four OFL-1.1 notices under third_party/fonts/ for the sans, serif, monospace, and handwritten assets. Applications that redistribute the rendered package or its assets must preserve applicable notices.