loading code fetching the highlighted snippet
A Mermaid diagram drawn while its fence is still open. With renderOpenFences, each completed line reaches pele and the diagram redraws in the same frame — no waiting for the closing fence.
markedMermaid({ renderOpenFences: true }) emits a diagram token while
the fence is open, built from complete lines only.MermaidRenderer keeps the last good diagram on screen while a line is half-written,
and only shows an error after the fence closes.State, gantt, pie, mindmap, and entity relationship diagrams in one editable document. Each type is a separate import, so only the ones you register are bundled.
createPeleEngine({ diagrams }) registers only the types you import
from pele/diagrams/*.pele diagrams take their colors from --pele-* CSS variables. Switch palettes and the same SVG restyles in place, without a re-render.
--pele-* variables on .pele or any parent element — no theme
objects, no engine options..pele {
--pele-bg: #fffcf0;
--pele-fg: #100f0f;
--pele-muted: #6f6e69;
--pele-line: #100f0f;
--pele-surface: #f2f0e5;
--pele-border: #cecdc3;
--pele-accent: #205ea6;
}