Built-in Node renderers

Import these from slackmark-node/renderers.

MermaidRenderer

FieldDefaultEffect
theme"default"Mermaid theme
backgroundColor"white"PNG background
deviceScaleFactor2Screenshot pixel density
maxSourceChars50000Source limit
maxEdges500Graph complexity limit
maxOutputBytes10 MiBPNG byte limit
maxWidth, maxHeight4096Output pixels

Identity: "mermaid". Language: mermaid. Successful result: PNG bytes.

The renderer uses strict Mermaid security, fixed secure keys, local bundle bytes, CSP, request denial, and pre-screenshot dimension checks.

KatexRenderer

FieldDefaultEffect
backgroundColor"white"PNG background
deviceScaleFactor2Screenshot pixel density
fontSizePx20Formula font size
paddingPx16PNG padding
maxExpand1000Macro expansion bound
maxSize50KaTeX element-size bound
maxSourceChars20000Source limit
maxOutputBytes10 MiBPNG byte limit
maxWidth, maxHeight4096Output pixels

Identity: "katex". Languages: math, katex, latex, tex. Successful result: PNG bytes.

KaTeX JavaScript, CSS, and fonts load from installed package bytes. Parsing and layout run inside the cancellable browser context with trust: false.

Both renderers receive source metadata in RenderRequest and cancellation/deadline state separately in the internal OperationContext argument. Both declare output: "bytes".