Skip to content
ChartForgeX
Class

MermaidDocument

ChartForgeX.Mermaid

Namespace
ChartForgeX.Mermaid
Assembly
ChartForgeX.Mermaid

Describes a parsed Mermaid document.

Inheritance

  • object
  • MermaidDocument

Derived Types

Usage

Explore 9 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 2

Accepted by parameters 7

Constructors

public MermaidDocument() #

Properties

public MermaidDiagramKind Kind { get; set; } #

Gets or sets the Mermaid diagram family.

public bool IsDiagnosticOnly { get; } #

Gets whether the recognized family retains source without a semantic parser or native renderer.

public string SourceText { get; set; } #

Gets or sets the full Mermaid source text.

public MermaidSourceSpan HeaderSpan { get; set; } #

Gets or sets the source span for the diagram header line.

public string Header { get; set; } #

Gets or sets the diagram header line.

public string? FrontMatter { get; set; } #

Gets or sets optional YAML frontmatter text.

public VisualAccessibility Accessibility { get; } #

Gets the text alternative declared by accTitle and accDescr statements.

public string? Theme { get; set; } #

Gets or sets the theme declared in source configuration.

public MermaidSourceConfiguration Configuration { get; internal set; } #

Gets bounded source declarations and the effective configuration for this diagram family.

public List<MermaidDirective> Directives { get; } #

Gets parsed Mermaid directives.

public List<MermaidRawStatement> RawStatements { get; } #

Gets unclassified or unsupported body statements retained independently from rendered semantic facts.

Extension Methods

public static byte[] ToPng(MermaidDocument document, MermaidRenderOptions? options = null) #

Renders an already parsed document to PNG.

Parameters

document ChartForgeX.Mermaid.MermaidDocument required
options ChartForgeX.Mermaid.MermaidRenderOptions? = null optional

Returns

byte[]
public static string ToSvg(MermaidDocument document, MermaidRenderOptions? options = null) #

Renders an already parsed document to SVG.

Parameters

document ChartForgeX.Mermaid.MermaidDocument required
options ChartForgeX.Mermaid.MermaidRenderOptions? = null optional

Returns

string
public static VisualArtifact ToVisualArtifact(MermaidDocument document, MermaidRenderOptions? options = null) #

Converts a parsed document through its native family using shared host defaults.

Parameters

document ChartForgeX.Mermaid.MermaidDocument required
options ChartForgeX.Mermaid.MermaidRenderOptions? = null optional