Most knowledge bases force you into a separate diagramming tool, then make you screenshot the result and paste it in. Daneshbase treats diagrams as part of the doc.
Open a fenced code block with mermaid and the viewer renders the text as a real SVG:
```mermaid
flowchart LR
A[Rinse filter] --> B(Bloom · 30 s) --> C{Drawdown ~3:00?}
C -->|yes| D([Serve])
C -->|off| E[Adjust grind]
```
The whole mermaid surface is available — flowchart, sequenceDiagram, classDiagram, stateDiagram, erDiagram, gantt, mindmap, gitGraph, pie, xychart-beta, block, packet, kanban, more.
Lazy-loaded per diagram type
Mermaid's renderer is hefty (~800 KB monolith), so Daneshbase splits it into per-type chunks. A doc with one flowchart pulls down the flowchart renderer. A doc with a sequence pulls down that one. A doc with no diagram pays zero bundle cost.
Theme-aware
Light/dark mode picks the right colour palette automatically — no hardcoded fills, no diagrams that look right in one theme and wrong in the other. The agent doesn't need to think about it; the viewer handles the swap.
The AI authors them too
When the agent rewrites a doc and the content is fundamentally a flow, sequence, or hierarchy, it'll prefer a mermaid block to text-walls or ASCII art. You don't ask for a diagram — you describe the process and the diagram appears in the rendered version.