feat: implement Story 2.2 — ELK.js auto-layout engine in Web Worker

Add automatic diagram layout via ELK.js running in a dedicated Web Worker.
Nodes animate smoothly (200ms ease-out) to computed positions using the
Sugiyama/layered algorithm. Includes layout direction controls (DOWN/RIGHT/
LEFT/UP), edge routing modes (orthogonal/splines/polyline), 200-node soft
cap warning, single-flight race condition protection, and 10s worker timeout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Alejandro Gutiérrez
2026-02-24 19:24:37 +00:00
parent 5033109656
commit 7dd5af17ac
15 changed files with 1239 additions and 10 deletions

8
pnpm-lock.yaml generated
View File

@@ -448,6 +448,9 @@ importers:
dayjs:
specifier: 1.11.19
version: 1.11.19
elkjs:
specifier: 0.11.0
version: 0.11.0
envin:
specifier: 'catalog:'
version: 1.1.10(arktype@2.1.20)(typescript@5.9.3)(zod@4.1.13)
@@ -10076,6 +10079,9 @@ packages:
electron-to-chromium@1.5.182:
resolution: {integrity: sha512-Lv65Btwv9W4J9pyODI6EWpdnhfvrve/us5h1WspW8B2Fb0366REPtY3hX7ounk1CkV/TBjWCEvCBBbYbmV0qCA==}
elkjs@0.11.0:
resolution: {integrity: sha512-u4J8h9mwEDaYMqo0RYJpqNMFDoMK7f+pu4GjcV+N8jIC7TRdORgzkfSjTJemhqONFfH6fBI3wpysgWbhgVWIXw==}
emoji-regex@10.4.0:
resolution: {integrity: sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==}
@@ -25445,6 +25451,8 @@ snapshots:
electron-to-chromium@1.5.182: {}
elkjs@0.11.0: {}
emoji-regex@10.4.0: {}
emoji-regex@8.0.0: {}