rs_rich.mermaid: rich-mermaid diagrams (no Rich counterpart).
Mermaid draws flowcharts as text (and, in a wheel built with the mmdc
feature and backend="mmdc", every diagram type through Mermaid's CLI);
what it cannot draw shows as source under a note. parse_flowchart and
draw_flowchart raise instead. MermaidFences renders ``mermaid
fences in Markdown; MermaidPlugin registers them with a plugin host.
MERMAID_HAS_MMDC
module-attribute
MERMAID_MAX_EDGES
module-attribute
MERMAID_MAX_LINK_LENGTH
module-attribute
MERMAID_MAX_LINK_LENGTH: int
MERMAID_MAX_NODES
module-attribute
MERMAID_MAX_SOURCE
module-attribute
clean_label
module-attribute
clean_label = mermaid_clean_label
render_png
module-attribute
render_png = mmdc_render_png
HAS_MMDC
module-attribute
HAS_MMDC = MERMAID_HAS_MMDC
MAX_SOURCE
module-attribute
MAX_SOURCE = MERMAID_MAX_SOURCE
MAX_NODES
module-attribute
MAX_NODES = MERMAID_MAX_NODES
MAX_EDGES
module-attribute
MAX_EDGES = MERMAID_MAX_EDGES
MAX_LINK_LENGTH
module-attribute
MAX_LINK_LENGTH = MERMAID_MAX_LINK_LENGTH
MermaidPlugin
module-attribute
MermaidPlugin = _native.MermaidPlugin
Flowchart
direction
property
direction: Literal['TD', 'BT', 'LR', 'RL']
nodes
property
nodes: List[FlowchartNode]
edges
property
edges: List[FlowchartEdge]
FlowchartEdge
source
instance-attribute
target
instance-attribute
stroke
instance-attribute
length
instance-attribute
Mermaid
mmdc
property
mmdc: Optional[MmdcOptions]
MermaidError
Bases: Exception
The base of the Mermaid errors.
MermaidFences
mmdc
property
mmdc: Optional[MmdcOptions]
accepts
accepts(language: str) -> bool
render_fence
render_fence(language: str, code: str, console: Any = None, options: Any = None) -> Optional[Mermaid]
MermaidLayoutError
Bases: MermaidError
A flowchart too large to lay out as text.
MermaidParseError
Bases: MermaidError
Not a flowchart the text renderer draws; kind is "empty",
"unsupported", "too_large" or "syntax" (with line).
MmdcError
Bases: MermaidError
Mermaid's CLI produced no image; kind says why.
MmdcOptions
puppeteer_config
property
puppeteer_config: Optional[str]
draw_flowchart
draw_flowchart(chart: Union[str, Flowchart], ascii: bool = False) -> MermaidDiagram
mermaid_clean_label
mermaid_clean_label(text: str) -> str
mmdc_render_png
mmdc_render_png(source: str, options: Optional[MmdcOptions] = None) -> bytes
parse_flowchart
parse_flowchart(source: str) -> Flowchart