271 Commits
Author SHA1 Message Date
David Luzar 7ded689cad feat(editor): bump mermaid-to-excalidraw to 3.6.0 (elbow flowcharts, Gantt, quadrant charts, timelines) (#12535)
* feat(editor): bump mermaid-to-excalidraw to 3.3.0 (Pele 1.13, stepped edges)

- mermaid-to-excalidraw 3.1.0 -> 3.3.0 (Pele 1.8.0 -> 1.13.0): flowchart
  edges and state transitions are elbow arrows when the definition asks for
  a stepped curve (`curve: "step"`, `linkStyle … interpolate step`); class
  namespaces are drawn as boxes like subgraphs (3.2.0)
- Pele 1.13 reports syntax errors on the source line (counting front matter,
  directives, comments and blank lines) and errors past the end on the last
  line, so the TTD dialog no longer converts them: the conversion would shift
  them twice

Claude Opus 5.5 (low)

* docs: link #12535 in the changelog

Claude Opus 5.5 (low)

* feat(editor): draw Mermaid flowchart and state edges as elbow arrows

Convert Mermaid diagrams (TTD dialog and paste) with `flowchart.curve:
"step"` (`MERMAID_TO_EXCALIDRAW_CONFIG`), which m2e 3.3 turns into elbow
arrows for flowchart edges and state transitions. A curve the definition
sets itself (front matter, `%%{init}%%`, `linkStyle … interpolate`) still
wins; class and ER diagrams are unaffected.

Claude Opus 5.5 (low)

* feat(editor): elbow arrows for Mermaid flowcharts only (mermaid-to-excalidraw 3.4.0)

mermaid-to-excalidraw 3.4.0 replaces `flowchart.curve` with `elbow`, per
diagram type. Use `elbow: { flowchart: true }`: state diagrams' elbow
transitions need more work in m2e, so they stay as before.

Claude Opus 5.5 (low)

* feat(editor): bump mermaid-to-excalidraw to 3.5.0 (Gantt, quadrant charts, timelines)

mermaid-to-excalidraw 3.5.0 converts Gantt charts, quadrant charts and
timelines to Excalidraw elements instead of an image. The Mermaid dialog's
description lists them (and State diagrams, missing before), its syntax
links built by one helper.

Claude Opus 5.5 (low)

* fix(editor): detect pasted Mermaid after comments and front matter

Pasted text was only taken for Mermaid when its diagram type came first,
or after a single one-line `%%{...}%%` directive. Skip everything Mermaid
allows before it: blank lines, `%%` comments, directives (also over
several lines) and front matter.

A directive doesn't run past the next `%%{`, so text with many unclosed
directives is checked in linear time (searching each to the end of the text
would be quadratic: ReDoS).

Claude Opus 5.5 (low)

* feat(editor): bump mermaid-to-excalidraw to 3.6.0 (diagram types loaded on first use)

mermaid-to-excalidraw 3.6.0 loads each diagram type's parser and converter
on first use: its main chunk is 20.3 KiB (brotli) instead of 35.8, plus
1.5–5.1 KiB for the type converted (a first flowchart: 28.5 KiB).

Claude Opus 5.5 (low)
2026-11-04 20:53:43 +01:00
David Luzar b99a49dbeb perf(editor): load Mermaid diagram code per diagram type (mermaid-to-excalidraw 3.1) (#12481)
* perf(editor): bump @excalidraw/mermaid-to-excalidraw to 3.1.0

3.1.0 loads Pele's code per diagram type, on first use (`pele/lazy`),
instead of all 33 diagram types at once: a first flowchart downloads
~66 KiB (brotli) instead of ~217 KiB. The per-diagram chunks are only
reachable through the lib's dynamic import, so `lazyChunksPlugin` keeps
them out of the PWA precache.

Claude Opus 5.5 (xhigh)

* chore(editor): name Pele's diagram chunks in TTD chunk-load comments

Since mermaid-to-excalidraw v3, it's Pele (not Mermaid) that lazy-loads
a chunk per diagram type, as of 3.1.0.

Claude Opus 5.5 (xhigh)

* feat(app): cache all Mermaid chunks for offline use once the TTD dialog opens

mermaid-to-excalidraw 3.1 splits Pele into a chunk per diagram type,
which aren't precached. With 3.0, the single Pele chunk cached on first
use covered every diagram type offline; now only the types converted
while online would.

`lazyChunksPlugin` emits the list of mermaid chunks as a hashed JSON
asset, which index.html points to with a `<meta>` (+33 B br). Once the
TTD dialog is opened, the app fetches the list and the chunks (after 5 s,
so the dialog's own chunks aren't fetched twice, at low priority) for the
service worker to cache in `lazy-chunks` (~200 kB br on top of what the
dialog loads). App only: package hosts (e.g. E+) are unaffected.

Claude Opus 5.5 (xhigh)
2026-10-30 12:10:15 +01:00
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
David Luzar 4eb1e648aa ci(repo): track bundle size and performance of master builds (#12469)
- `Stats` workflow on master: posts the production build's file sizes (raw, gzip, Brotli; initial load vs. lazy; bytes per source package) and, once staging serves the commit, its page-load and pan/zoom measurements to the Excalidraw+ backend; OSS_STATS_TOKEN lives in the master-only `stats` environment
- `scripts/stats/`: bundle-stats Vite plugin and wrapper config (`yarn stats:bundle`), the Playwright runner (`yarn stats:perf`) and the poster
- `yarn stats:compare`: builds the checkout, serves it with `vite preview` and compares it with staging (alternating loads, Mann-Whitney U test); prints a table or writes CSV with `--out`
- `excalidraw:app-start` mark in the app's entry, ending the runs' "HTML + JS" phase
- `playwright` 1.58.2 dev dependency (installs no browsers by itself)

Claude Opus 5.5 (xhigh)
2026-10-27 15:34:46 +01:00
Márk Tolmácsanddwelle cd514d72d6 feat(editor): LaserPointer based freedraw (#11507)
Introduces constant width freedraw mode, keeping the original variable mode as default.

---------

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
2026-06-24 09:16:22 +02:00
Márk Tolmácsanddwelle 3004c642da fix: Fractional index validation (#11258)
- Vendored fractional-indexing and converted to TypeScript
- Stricter index format validation in fractional-indexing
- Added format validation to fractional index validation

---
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
2026-05-04 11:37:17 +02:00
David Luzar c1082923ee feat(editor): support mermaid staate diagrams (#11031) 2026-03-24 20:20:28 +01:00
Márk Tolmácsanddwelle 75789f620d fix: Other endpoint is not immediately updated on midpoint snap (#10933)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
2026-03-23 14:54:44 +00:00
David Luzar 816c81c12e feat(editor): ERD arrowheads and diagrams (#10940) 2026-03-11 22:00:31 +01:00
David Luzar 21dd1cfacc feat(packages/excalidraw): state tracking, api hook, and others (#10870) 2026-03-08 23:15:18 +01:00
David Luzar c1dbbdf678 feat(editor): mermaid code editor & improve parsing (#10897) 2026-03-05 18:52:41 +01:00
David LuzarandBarnabás Molnár 063533aede feat(packages/excalidraw): support nested dropdown menu (#10749)
Co-authored-by: Barnabás Molnár <38168628+barnabasmolnar@users.noreply.github.com>
2026-02-08 22:27:34 +01:00
David Luzar 24a6941861 fix: retries and related UX fixes (#10657)
* fix: retries and related UX fixes

* bump

* fix package version

* yarn.lock

* naming and clearer type

* ignore test flake
2026-01-16 09:52:18 +01:00
Tamas Landdwelle a0b98a944f feat: TextToDiagram v2 (#10530)
* feat: introducing TextToDiagram v2 feature

* fix: eslint issue

* debug mermaid bundle size

* tests: covering the utils

* fix: import mock chunks dynamically to shrink the bundle size

* fix: removing replay feature

* fix: removing unused prop

* fix: bumping workbox cache limit

* snapshots + yarn.lock

* bump mermaid-to-excalidraw@2 and split into its own chunk

* bump node@20

* css tweaks

* move files around & rewrite stream chunk schema

* random naming & file structure refactor + some tweaks

* fix preview theme

* support custom warning renderer

* label and css fix

* fix and rwrite 429 handling

* fix label

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
2026-01-15 19:15:41 +01:00
David Luzar b9a255407f refactor: update SCSS syntax & remove open-color dep (#10633) 2026-01-10 18:15:14 +01:00
David Luzar 63e1148280 feat: stop using CSS filters for dark mode (static canvas) (#10578)
* feat: stop using CSS filters for dark mode (static canvas)

* fix comment

* remove conditional dark mode export

* make shape cache theme-aware

* refactor

* refactor

* fixes and notes
2026-01-04 15:16:35 +01:00
kish dizonanddwelle 0586fc138c feat: add qr code to live session share dialog. (#10588)
* add qr code to live session share dialog

* use uqr

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
2026-01-02 11:08:27 +01:00
David Luzar d080833f4d chore: bump typescript@5.9.3 (#10431) 2025-12-01 22:37:42 +01:00
David Luzar f29e9df72d chore: bump mermaid-to-excalidraw to 1.1.3 (#9898) 2025-08-21 20:58:04 +02:00
Narek Malkhasyan e058a08b33 fix: use rimraf instead of rm -rf (#9460) 2025-05-07 14:13:27 +02:00
ce267aa0d3 feat: lasso selection (#9169)
* lasso without 'real' shape detection

* select a single linear el

* improve ux

* feed segments to worker

* simplify path threshold adaptive to zoom

* add a tiny threshold for checks

* refactor code

* lasso tests

* fix: ts

* do not capture lasso tool

* try worker-loader in next config

* update config

* refactor

* lint

* feat: show active tool when using "more tools"

* keep lasso if selected from toolbar

* fix incorrect checks for resetting to selection

* shift for additive selection

* bound text related fixes

* lint

* keep alt toggled lasso selection if shift pressed

* fix regression

* fix 'dead' lassos

* lint

* use workerpool and polyfill

* fix worker bundled with window related code

* refactor

* add file extension for worker constructor error

* another attempt at constructor error

* attempt at build issue

* attempt with dynamic import

* test not importing from math

* narrow down imports

* Reusing existing workers infrastructure (fallback to the main thread, type-safety)

* Points on curve inside the shared chunk

* Give up on experimental code splitting

* Remove potentially unnecessary optimisation

* Removing workers as the complexit is much worse, while perf. does not seem to be much better

* fix selecting text containers and containing frames together

* render fill directly from animated trail

* do not re-render static when setting selected element ids in lasso

* remove unnecessary property

* tweak trail animation

* slice points to remove notch

* always start alt-lasso from initial point

* revert build & worker changes (unused)

* remove `lasso` from `hasStrokeColor`

* label change

* remove unused props

* remove unsafe optimization

* snaps

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
Co-authored-by: Marcel Mraz <marcel@excalidraw.com>
2025-04-07 16:44:25 +10:00
Panagiotis Papadopoulosanddwelle c79e892e55 chore: bump @radix-ui/react-tabs version to 1.1.3 (#9329)
* chore: bump @radix-ui/react-tabs version to 1.1.3

bumped the version to latest stable that includes
react ^19 as peerDepenecy.
This fixes peerDependency issues, as reported in #9253

* redeploy

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
2025-04-02 16:23:15 +02:00
Marcel Mraz 21ffaf4d76 refactor: auto ordered imports (#9163) 2025-03-12 15:23:31 +01:00
Marcel Mraz 69bc5bdaab chore: post publish docs & examples changes (#9217) 2025-03-11 13:02:59 +01:00
David Luzar d92384b77d revert: vite@6 -> vite@5 (#9220) 2025-03-04 17:45:52 +00:00
David Luzar d21c6a1bc6 chore: bump vite@6.x (#9210) 2025-03-04 14:00:13 +01:00
Márk Tolmács 2523624f15 fix: React 18 element.ref was accessed error (#9208)
Bump @radix-ui/react-popover to fix element.ref React 19 error

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
2025-03-02 14:24:50 +01:00
Marcel Mraz ecef5d12f4 chore: release @excalidraw/excalidraw@18.0.0 🎉 (#9127) 2025-02-28 16:49:09 +01:00
David Luzar 31e8476c78 chore: upgrade to react@19 (#9182) 2025-02-25 19:18:42 +01:00
David Luzar 16b86d7d16 chore: update firebase@8 to @11 (#9136) 2025-02-13 13:57:14 +01:00
Márk Tolmácsanddwelle f12b92ce9d chore: Upgrade Sentry to latest and update debug messages (#9134)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
2025-02-13 12:47:27 +01:00
David Luzar 424e94a403 fix: duplicating/removing frame while children selected (#9079) 2025-02-04 19:23:47 +01:00
Márk Tolmácsanddwelle 91ebf8b0ea feat: Elbow arrow segment fixing & positioning (#8952)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
Co-authored-by: David Luzar <5153846+dwelle@users.noreply.github.com>
2025-01-17 18:07:03 +01:00
Arnost Pleskotanddwelle 8551823da9 feat: update jotai (#9015)
* feat: update jotai in excalidraw package

* feat: update jotai in excalidraw-app

* fix: exports from excalidraw/jotai

* fix: use isolated react hooks

* test: use jotai provider in <Trans /> test

* remove unused package

* refactor & make safer

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
2025-01-16 16:59:11 +01:00
Ryan Dianddwelle c0b80a03bd feat: in canvas links between shapes (#8812)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
2024-11-26 18:53:25 +01:00
Márk Tolmács b2a6a87b10 chore: Remove @tldraw/vec (#8762)
Not needed.
2024-11-21 15:19:20 +01:00
David Luzar 840f1428c4 chore: bump @excalidraw/mermaid-to-excalidraw@1.1.2 (#8830) 2024-11-20 13:10:07 +01:00
David Luzar 0927431d0d chore: bump @excalidraw/mermaid-to-excalidraw (#8829) 2024-11-19 20:46:55 +01:00
dependabot[bot] 98c0a67333 build(deps): bump cross-spawn from 7.0.3 to 7.0.6 (#8824)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-19 20:34:35 +01:00
Milos Vetesnik 7d52176fea feat: added sitemap & fixed robot txt (#8699) 2024-10-24 12:49:33 +02:00
Marcel Mraz b479f3bd65 feat: add first-class support for CJK (#8530) 2024-10-17 20:14:17 +02:00
Marcel Mraz a80cb5896a feat: self-hosting existing google fonts (#8540) 2024-09-24 17:30:21 +02:00
David Luzar 80f3b75d42 chore: revert vite 5.4.2 -> 5.0.12 (#8499) 2024-09-12 12:56:45 +02:00
Aakansha Doshi 51ea184938 build: upgrade vite to 5.4.x, vitest to 2.x and related vite packages (#8459)
* build: upgrade vite to 5.x, vitest to 2.x and related vite packages

* upgrade vitest-ui and coverage

* pass empty set to fix type error and update snap

* set ignoreEmptyLines to false

* update threshold

* update coverage threshold

* downgrade vite-plugin-pwa as its better to push separately with testing

* add package resolutions for strip-ansi, string-width and wrap-ansi

* disable pwa

* only add resolution for strip-ansi
2024-09-05 18:35:36 +05:30
dependabot[bot] e3d1dee9d0 build(deps): bump micromatch from 4.0.7 to 4.0.8 (#8450)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 00:37:49 +02:00
Marcel Mrazanddwelle ee30225062 feat: subset font glyphs for SVG export (#8384)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
2024-08-30 22:26:06 +02:00
David Luzar f19ce30dfe chore: bump @testing-library/react 12.1.5 -> 16.0.0 (#8322) 2024-08-06 15:17:42 +02:00
Márk Tolmács c641860cb1 fix: CVE-2023-45133 (#7988)
* Upgrade @babel/* versions to 7.24 to ensure non-vulnerable Babel versions
* Pinning React version to 18.2.0 exactly, avoiding test-utils type version clashes
* Fix warning message on yarn start
* Moving react to peer dependencies
* Moving app dependencies from workspace into app
* Bump vitest to 1.6.0 to fix history.test.tsx breaking

---------

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
2024-08-02 14:44:38 +02:00
Marcel Mrazanddwelle 62228e0bbb feat: introduce font picker (#8012)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
2024-07-25 18:55:55 +02:00
Aakansha Doshi d25a7d365b feat: upgrade mermaid-to-excalidraw to v1.1.0 (#8226)
* feat: upgrade mermaid-to-excalidraw to v1.1.0

* fixes

* upgrade and remove config as its redundant

* lint

* upgrade to v1.1.0
2024-07-10 20:57:43 +05:30