feat: Mermaid diagram blocks in docs + SVG import in diagrams (#610 #611)
Docs — Mermaid blocks:
- New MermaidBlock TipTap extension (src/docs/extensions/mermaid-block.ts)
- NodeView with textarea code editor + rendered SVG preview
- Slash command /diagram and /mermaid insert the block
- Copy SVG button; double-click diagram to open editor
- Mermaid dynamically imported (zero initial bundle impact)
- CSS styles for mermaid-block, toolbar, preview, error, and dark-mode SVG fix
Diagrams — SVG import:
- New src/diagrams/svg-import.ts pure parser (DOMParser + coordinate scaling)
- Handles rect, circle, ellipse, line, polyline, polygon, text, nested <g> groups
- Reads viewBox or width/height for coordinate normalisation
- Simple translate/scale transforms on groups applied to children
- "Import SVG" button + hidden file input wired in toolbar-wiring.ts
- 22 new tests in tests/svg-import.test.ts; all 8379/8379 passing
- Version 0.36.1 → 0.37.0