Converts a parsed diagram against its rendered SVG.
Separate from createMaidrFromMermaid so a caller that already holds the parsed diagram -- or a test with a stand-in database -- need not parse again.
The parsed diagram: its type and database
The diagram type Mermaid detected
The diagram's database
Optional
The text it was parsed from
The SVG Mermaid rendered from the same text
Figure options
The MAIDR figure
Error when the diagram type is not one the adapter reads. A diagram of a type it reads but with nothing in it becomes a figure with no layers, which MAIDR announces as empty
Converts a parsed diagram against its rendered SVG.
Separate from createMaidrFromMermaid so a caller that already holds the parsed diagram -- or a test with a stand-in database -- need not parse again.