mermaid.ts

Source

4 documented symbols. Read the signatures first, then expand each item for parameters, return types, and examples.

4 symbols 1 functions 2 variables 1 modules 2 parameters 1 returns 1 deprecated

Reference

modulemermaidMermaid Plugin - Native Rust renderer via NAPI Renders mermaid code blocks to SVG using the native Rust renderer via NA…

Mermaid Plugin - Native Rust renderer via NAPI

Renders mermaid code blocks to SVG using the native Rust renderer via NAPI. Delegates to the NAPI transformMermaid function which extracts mermaid code blocks from HTML and renders them using mmdc.

View source

variableconst mermaidClientScript = ""

Signature

export const mermaidClientScript = ""

View source

variablelet napiBindings: { transformMermaid: (html: string, mmdcPath: string) => { html: string; errors: string[] } } | nullCached NAPI bindings

Cached NAPI bindings

Signature

let napiBindings: { transformMermaid: (html: string, mmdcPath: string) => { html: string; errors: string[] } } | null

View source

fntransformMermaidStatic(html: string, _options?: MermaidOptions): Promise<string>Transforms mermaid code blocks in HTML to rendered SVG diagrams. Uses the nativ…

Transforms mermaid code blocks in HTML to rendered SVG diagrams. Uses the native Rust NAPI transformMermaid function.

Signature

export async function transformMermaidStatic(html: string, _options?: MermaidOptions): Promise<string>

View source

Parameters

  • html string
  • _options MermaidOptions

    optional

Returns

Promise<string>