merman-render 0.5.0

Headless layout + SVG renderer for Mermaid (parity-focused; upstream SVG goldens).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::Result;
use crate::model::ErrorDiagramLayout;
use crate::text::TextMeasurer;

pub const UPSTREAM_MERMAID_VERSION: &str = "11.12.3";

pub fn layout_error_diagram(
    _semantic: &serde_json::Value,
    _effective_config: &serde_json::Value,
    _measurer: &dyn TextMeasurer,
) -> Result<ErrorDiagramLayout> {
    Ok(ErrorDiagramLayout {
        viewbox_width: 2412.0,
        viewbox_height: 512.0,
        max_width_px: 512.0,
    })
}