David Luzar 14bb42edee feat(editor): lay Mermaid diagrams out with Pele (mermaid-to-excalidraw v3) (#12480)
* chore: type-check linked packages' `@excalidraw/excalidraw/{element,common}/*` imports against the sources

Packages linked into the monorepo (e.g. a local `@excalidraw/mermaid-to-excalidraw`)
import types from `@excalidraw/excalidraw/element/*` and `.../common/*`, which
didn't map to the sources and fell back to the linked package's own (published)
copy of `@excalidraw/excalidraw`, failing the type check. The mocked arrows in
the Mermaid tests now use the `LocalPoint` their points are typed as.

Claude Opus 5.5 (xhigh)

* feat(editor): TTD Mermaid errors on their source line, with guidance by diagram type

- Mermaid (and Pele) number lines as they parse the definition: without its
  front matter, directives, comment lines and leading blank lines (and in
  flowcharts and ER diagrams, a line ending with a comment runs on into the
  next one). Errors are now mapped back to the line of the source they're on
  for the highlighted line, the summary, the shown message, the auto-fixer and
  the AI repair prompt. Errors past the end (e.g. a missing `end`) are on its
  last non-empty line.
- The likely causes depend on the diagram type: an unclosed class body,
  composite state or entity (not "a decision node"), sequence blocks missing
  their `end`, labels with brackets or parentheses that need quoting, `end`
  used as a node.
- Definitions without a (known) diagram type get a summary and hint, and their
  first line is highlighted. Mermaid and Pele word that error differently.

Claude Opus 5.5 (xhigh)

* feat(editor): auto-fix more common Mermaid mistakes in TTD

New auto-fix candidates (each still only offered if it parses):

- quote labels with brackets or parentheses in them:
  `A[Process (main)]` -> `A["Process (main)"]`
- close unclosed blocks (`subgraph`/`loop`/... `end`s, class/state/entity
  `}`s) where their indentation ends, not only at the end of the definition
- close a node label left open before its edge (`A[Start --> B` ->
  `A[Start] --> B`), and drop closing brackets that close nothing
- `->` -> `-->` in flowcharts and state diagrams (labels left alone)
- `end` used as a flowchart node -> `End`
- the `:` missing before a sequence message's or ER relationship's label
- an invalid flowchart direction -> `TD`
- a misspelled diagram type (`flowchar TD`, `sequencediagram`), or a missing
  one

Claude Opus 5.5 (xhigh)

* feat(editor): fix and explain invalid or misplaced directions in TTD Mermaid

- A flowchart subgraph's `direction` is uppercased (`lr` -> `LR`), `TD` is
  `TB` there (unlike in the flowchart's header), and one that isn't any
  direction is dropped, for the subgraph to keep the flowchart's.
- A direction on the first line of a class, state or ER diagram
  (`classDiagram LR`, `erDiagram direction LR`) is moved to a `direction`
  statement on the next line, unless the diagram has one already.
- Sequence diagrams have no direction: it's dropped from their first line and
  their `direction` statements.
- The likely causes explain all of these.

Claude Opus 5.5 (xhigh)

* feat(editor): mark TTD assistant messages rendered with Pele

Assistant messages are saved with the chat with `renderer: "pele"`, to tell
their diagrams from those of chats saved before mermaid-to-excalidraw v3,
which Mermaid rendered (and which can't be told apart later).

Claude Opus 5.5 (xhigh)

* feat(editor): paste `swimlane-beta` diagrams as Mermaid

mermaid-to-excalidraw v3 converts them (Pele renders them, Mermaid doesn't),
but pasting one inserted it as text, as `swimlane` wasn't a diagram type
that marks pasted text as Mermaid.

Claude Opus 5.5 (xhigh)

* feat(editor): lay Mermaid diagrams out with Pele (mermaid-to-excalidraw 3.0.0)

mermaid-to-excalidraw 3.0.0 parses and lays out diagrams with Pele instead
of Mermaid, which is no longer bundled. It keeps labels where Pele placed
them along their arrows with `label.labelPosition`, which skeleton arrows
support since #12425.

Claude Opus 5.5 (xhigh)

* docs: changelog for mermaid-to-excalidraw v3 and skeleton bound arrows

Claude Opus 5.5 (xhigh)
2026-10-27 17:35:28 +01:00
2024-08-06 13:21:20 +02:00
2020-04-03 19:19:01 +02:00
2024-09-09 17:12:07 +02:00
2020-09-15 21:59:00 +02:00
2025-05-25 21:23:40 +02:00
2023-05-18 16:06:27 +02:00
2025-05-25 21:23:40 +02:00
2020-01-05 13:09:29 -08:00

Excalidraw

Excalidraw Editor | Blog | Documentation | Excalidraw+

An open source virtual hand-drawn style whiteboard.
Collaborative and end-to-end encrypted.


Excalidraw is released under the MIT license. npm downloads/month PRs welcome! Chat on Discord Ask DeepWiki Follow Excalidraw on Twitter

Product showcase

Create beautiful hand-drawn like diagrams, wireframes, or whatever you like.

Features

The Excalidraw editor (npm package) supports:

  • 💯 Free & open-source.
  • 🎨 Infinite, canvas-based whiteboard.
  • ✍️ Hand-drawn like style.
  • 🌓 Dark mode.
  • 🏗️ Customizable.
  • 📷 Image support.
  • 😀 Shape libraries support.
  • 🌐 Localization (i18n) support.
  • 🖼️ Export to PNG, SVG & clipboard.
  • 💾 Open format - export drawings as an .excalidraw json file.
  • ⚒️ Wide range of tools - rectangle, circle, diamond, arrow, line, free-draw, eraser...
  • ➡️ Arrow-binding & labeled arrows.
  • 🔙 Undo / Redo.
  • 🔍 Zoom and panning support.

Excalidraw.com

The app hosted at excalidraw.com is a minimal showcase of what you can build with Excalidraw. Its source code is part of this repository as well, and the app features:

  • 📡 PWA support (works offline).
  • 🤼 Real-time collaboration.
  • 🔒 End-to-end encryption.
  • 💾 Local-first support (autosaves to the browser).
  • 🔗 Shareable links (export to a readonly link you can share with others).

We'll be adding these features as drop-in plugins for the npm package in the future.

Quick start

Note: following instructions are for installing the Excalidraw npm package when integrating Excalidraw into your own app. To run the repository locally for development, please refer to our Development Guide.

Use npm or yarn to install the package.

npm install react react-dom @excalidraw/excalidraw
# or
yarn add react react-dom @excalidraw/excalidraw

Check out our documentation for more details!

Contributing

Integrations

Who's integrating Excalidraw

Google Cloud • Meta • CodeSandbox • Obsidian Excalidraw • Replit • Slite • Notion • HackerRank • and many others

Sponsors & support

If you like the project, you can become a sponsor at Open Collective or use Excalidraw+.

Thank you for supporting Excalidraw

Last but not least, we're thankful to these companies for offering their services for free:

Vercel Sentry Crowdin

Languages
TypeScript 94.4%
SCSS 2.4%
MDX 1.5%
JavaScript 1.4%
HTML 0.3%