Metadata-Version: 2.5
Name: aidiagram
Version: 0.1.1
Summary: Turn supported Mermaid flowcharts and sequence diagrams into interactive, offline animated walkthroughs.
Project-URL: Homepage, https://github.com/MervinPraison/praisonai-diagram
Project-URL: Repository, https://github.com/MervinPraison/praisonai-diagram
Project-URL: Issues, https://github.com/MervinPraison/praisonai-diagram/issues
Author: PraisonAI
License-Expression: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Keywords: diagram,flowchart,interactive,mermaid,praisonai,sequence-diagram,svg
Requires-Python: >=3.10
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: pyyaml>=6; extra == 'dev'
Provides-Extra: yaml
Requires-Dist: pyyaml>=6; extra == 'yaml'
Description-Content-Type: text/markdown

# PraisonAI Diagram (`aidiagram`)

Turn supported Mermaid flowcharts and sequence diagrams into self-contained, interactive, offline-ready HTML walkthroughs — with zero external dependencies and no CDN requests.

## Install

```bash
python -m pip install aidiagram
```

## CLI quick start

```bash
aidiagram html workflow.mmd --out workflow.html
aidiagram html workflow.mmd --out workflow.html --theme light --accent indigo
aidiagram convert workflow.mmd --out workflow.json
aidiagram info
```

Open `workflow.html` directly in any browser — it works completely offline via `file://` with keyboard navigation (`←` / `→` / `Home` / `End`), Play/Pause walkthrough, hover path highlighting, pan/zoom, fullscreen, source copy, and animated SVG + 2x PNG export.

## Python API

```python
from aidiagram import write_interactive_html, render_interactive_html, mermaid_to_diagram

write_interactive_html("workflow.mmd", "workflow.html", theme="dark", accent="amber")
```

## Supported Mermaid subset

- `flowchart` / `graph` (`LR`, `TB`, `TD`, <= 14 nodes): subgraphs (1 level), chained arrows, edge labels, solid/dashed/thick arrows, bidirectional (`<-->`, `<==>`, `<-.->`), and undirected (`---`) links.
- `sequenceDiagram` (<= 6 actors): `participant`/`actor` aliases, solid/dashed messages, self-calls, `autonumber`, and `Note over / left of / right of`.
- Unsupported Mermaid diagrams (Gantt, ER, nested subgraphs, `alt`/`loop`/`rect`, `RL`/`BT`, `%% diagram: off`, `%% visual: off`) never fail silently: `mermaid_to_diagram()` returns `None` and the standalone HTML preserves the verbatim original Mermaid source with a Copy button.

## License

Licensed under the Apache License, Version 2.0. See `LICENSE` and `NOTICE` bundled in this distribution. Exported offline HTML pages embed the Apache-2.0 license and attribution notices directly inside the output file.
