Expand description
Mermaid parser + semantic model (headless).
Design goals:
- 1:1 parity with the repository’s pinned upstream Mermaid baseline
- deterministic, testable outputs (semantic snapshot goldens)
- runtime-agnostic async APIs (no specific executor required)
Default features are empty. Select diagram-* features for the required logical families or
all-diagrams for the complete parser surface. Family-exclusive public model types and enum
variants are conditional; recognition and custom registries remain available without a family.
Re-exports§
pub use config::MermaidConfig;pub use detect::Detector;pub use detect::DetectorRegistry;pub use diagram::AGENTFLOW_CONTAINMENT_VIOLATION_WARNING_RULE_ID;pub use diagram::AGENTFLOW_SHAPE_REMOVED_WARNING_RULE_ID;pub use diagram::AGENTFLOW_SHAPE_UNSUPPORTED_WARNING_RULE_ID;pub use diagram::BLOCK_WIDTH_WARNING_RULE_ID;pub use diagram::BuiltinRenderSemantic;pub use diagram::CapturedPanic;pub use diagram::CustomJsonProvenance;pub use diagram::CustomJsonRenderModel;pub use diagram::CustomJsonRenderParser;pub use diagram::DiagramParseOutcome;pub use diagram::DiagramParseSnapshot;pub use diagram::DiagramRegistry;pub use diagram::DiagramSemanticParser;pub use diagram::DiagramSnapshotCapture;pub use diagram::DiagramWarningFact;pub use diagram::FLOWCHART_EXPLICIT_DIRECTION_WARNING_RULE_ID;pub use diagram::FLOWCHART_UNKNOWN_STYLE_TARGET_WARNING_RULE_ID;pub use diagram::GIT_GRAPH_DUPLICATE_COMMIT_WARNING_RULE_ID;pub use diagram::ParsedDiagram;pub use diagram::ParsedDiagramRender;pub use diagram::ParsedEditorFacts;pub use diagram::RenderDiagramRegistry;pub use diagram::RenderSemanticModel;pub use editor::EditorExpectedSyntax;pub use editor::EditorExpectedSyntaxKind;pub use editor::EditorFamilySemantics;pub use editor::EditorRenamePolicy;pub use editor::EditorSemanticCompleteness;pub use editor::EditorSemanticDiagnostic;pub use editor::EditorSemanticDiagnosticKind;pub use editor::EditorSemanticFacts;pub use editor::EditorSemanticKind;pub use editor::EditorSemanticRole;pub use editor::EditorSemanticSymbol;pub use editor::SourceSpan;pub use error::Error;pub use error::ParseDiagnostic;pub use error::ParseDiagnosticSpanKind;pub use error::Result;pub use operation::CancelReason;pub use operation::OperationCancelled;pub use operation::OperationControl;pub use operation::OperationControlResult;pub use operation::OperationLedgerError;pub use operation::OperationPhase;pub use operation::OperationResourceDomain;pub use operation::OperationResourceLimitExceeded;pub use operation::OperationResourceOverride;pub use operation::OperationResourceProvenance;pub use preprocess::PreprocessResult;pub use preprocess::PreprocessedSource;pub use preprocess::preprocess_diagram;pub use preprocess::preprocess_diagram_with_known_type;
Modules§
- baseline
- Active upstream Mermaid baseline metadata.
- common
- common_
db - config
- detect
- diagram
- diagrams
- Public data models for Mermaid diagram families.
- editor
- entities
- error
- generated
- geom
- models
- operation
- Target-neutral lifecycle primitives for CPU-bound Merman operations.
- preprocess
- resources
- Backend-independent Mermaid source and semantic-model resource policy.
- runtime
- sanitize
- svg_
security - theme_
color - Source-backed color operations used by Mermaid themes and renderers.
- time
- utils
Structs§
- Built
InTyped Render Family - Canonical public identity for one compiled concrete built-in typed render family.
- Diagram
Family Capability - Diagram
Family Id - Closed, catalog-owned identity for one logical Mermaid diagram family.
- Diagram
Family Selector - Public Cargo selector for one logical family, regardless of this build’s availability.
- Diagram
Header Fact - Engine
- Headless Mermaid parser engine.
- Managed
Semantic Json - Mermaid-compatible JSON with iterative ownership and export.
- Parse
Metadata - Metadata extracted before semantic diagram parsing.
- Parse
Options - Parser behavior switches for model-producing parse facades.
Constants§
- MAX_
DIAGRAM_ NESTING_ DEPTH - Maximum nested diagram/include depth accepted by recursive parsers.
Functions§
- built_
in_ typed_ render_ families - Returns each compiled concrete built-in typed render-model family exactly once.
- diagram_
family_ capabilities - Returns every known Mermaid diagram id in the pinned baseline, including unavailable ones.
- diagram_
family_ selectors - Returns the complete catalog-owned mapping from logical families to Cargo selectors.
- diagram_
header_ facts - Returns known header facts for Mermaid diagram starters in the pinned baseline.
- diagram_
type_ family_ id - diagram_
type_ family_ kind - diagram_
type_ metadata_ id - diagram_
type_ render_ model_ kind - supported_
diagrams - Returns metadata names backed by semantic parsers compiled into this build.
- supported_
themes - Returns Mermaid theme names supported by the pinned baseline.