haive.core.utils.mermaid_utils¶
Mermaid diagram utilities for Haive.
This module provides utilities for generating and displaying Mermaid diagrams in different environments, with fallback mechanisms.
Classes¶
Execution environment types. |
Functions¶
Detect the current execution environment. |
|
|
Display a Mermaid diagram in the current environment. |
|
Convert Mermaid diagram code to a PNG file. |
Module Contents¶
- class haive.core.utils.mermaid_utils.Environment¶
-
Execution environment types.
Initialize self. See help(type(self)) for accurate signature.
- haive.core.utils.mermaid_utils.detect_environment()¶
Detect the current execution environment.
- Returns:
Environment enum indicating the detected environment
- Return type:
- haive.core.utils.mermaid_utils.display_mermaid(mermaid_code, output_path=None, save_png=False, width='100%')¶
Display a Mermaid diagram in the current environment.
This function detects the current environment and uses the appropriate method to display the diagram, with fallbacks for each environment.
- haive.core.utils.mermaid_utils.mermaid_to_png(mermaid_code, output_path=None)¶
Convert Mermaid diagram code to a PNG file.