Skip to content

v1.3.0 — DOT export, SQL → ER, diagram narration

Choose a tag to compare

@clintecker clintecker released this 17 Jul 01:55
· 65 commits to main since this release

Three new capabilities on the front/back-end seam. All additive — the rendered output of existing diagrams is unchanged.

DOT export

DOTExporter.export(_:) emits a Flowchart as Graphviz DOT — the inverse of the DOT front-end, so MermaidKit is now a Mermaid ⇄ DOT converter. Flat charts round-trip exactly; clustered charts round-trip structurally.

SQL DDL → ER front-end

SQLDDLParser.parse(_:) turns a CREATE TABLE schema dump into an ER diagram: typed columns, PRIMARY/FOREIGN/UNIQUE keys (inline and table-level), and REFERENCES → one-to-many crow's-foot relationships. Handles dialect quoting and comments; degrades to nil on malformed input.

  • New: ERDiagram.Attribute.keys renders PK/FK/UK badges (no-op when empty, so existing erDiagram output is unchanged).

Diagram narration

MermaidAltText.narrate(_:) — a step-by-step accessibility walkthrough (richer than describe's summary): follows a flowchart through its decisions, reads a state machine from its initial state, spells out ER cardinalities, replays a sequence message by message. Every other type falls back to describe. Deterministic and length-bounded.

Full notes in CHANGELOG.md.

🤖 Generated with Claude Code