Skip to content

Replace Beautiful Mermaid with Pele #590

Open

Description

@jinghaihan

Description

Would you consider replacing Beautiful Mermaid with Pele, a lightweight Mermaid renderer from the Obsidian team? It has zero dependencies, broader diagram coverage, and supports on-demand loading.

Motivation

Beautiful Mermaid has seen limited upstream activity in recent months.

Pele also has a smaller bundle size. The comparison below uses esbuild with minification and gzip:

[Bundle size table]

Scenario Beautiful Mermaid 1.1.3 Pele 1.13.0
Bundled renderer ~460 KiB ~269 KiB
First flowchart with lazy loading ~460 KiB ~62 KiB

[Diagram coverage table]

Diagram type Mermaid Beautiful Mermaid Pele
Flowchart ✓ ✓ ✓
Sequence diagram ✓ ✓ ✓
Class diagram ✓ ✓ ✓
State diagram ✓ ✓ ✓
Entity relationship diagram ✓ ✓ ✓
XY chart ✓ ✓ ✓
Swimlane diagram ✓ ✗ ✓
Gantt chart ✓ ✗ ✓
Git graph ✓ ✗ ✓
Pie chart ✓ ✗ ✓
Mindmap ✓ ✗ ✓
Kanban ✓ ✗ ✓
Timeline ✓ ✗ ✓
User journey ✓ ✗ ✓
Quadrant chart ✓ ✗ ✓
Requirement diagram ✓ ✗ ✓
Sankey diagram ✓ ✗ ✓
Architecture diagram ✓ ✗ ✓
C4 diagram ✓ ✗ ✓
Block diagram ✓ ✗ ✓
Agentflow ✓ ✗ ✓
Railroad diagram ✓ ✗ ✓
Tree view ✓ ✗ ✓
Cynefin diagram ✓ ✗ ✓
Wardley map ✓ ✗ ✓
Event modeling ✓ ✗ ✓
Use case diagram ✓ ✗ ✓
Venn diagram ✓ ✗ ✓
Ishikawa diagram ✓ ✗ ✓
Packet diagram ✓ ✗ ✓
Radar chart ✓ ✗ ✓
Treemap ✓ ✗ ✓
Info ✓ ✗ ✓
Total 33 6 33

Proposed solution

Replace Beautiful Mermaid with Pele for web and HTML rendering, while keeping Beautiful Mermaid for @comark/ansi, since Pele does not plan to support ASCII output.

If you agree with this direction, I’d be happy to open a PR.

Alternatives considered

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions