Commit graph

3769 commits

Author SHA1 Message Date
Ryan Di
721f5ec0f4 simpler types, tidy up code 2025-04-30 20:04:03 +10:00
Ryan Di
d890ed090c unmount when not showing 2025-04-30 19:07:44 +10:00
dwelle
4630001dee make it dependent on one signle state 2025-04-30 10:32:53 +02:00
dwelle
9ea9275fbd add arrowBoundToElement check 2025-04-30 10:32:43 +02:00
dwelle
0d3e9cb1bc remove Mutable 2025-04-30 09:19:56 +02:00
Ryan Di
662baa3df2 set roudness to null to fix drag points offset for elbows 2025-04-25 21:44:58 +10:00
Ryan Di
989cef51cc focus on panel after click 2025-04-25 21:18:16 +10:00
Ryan Di
a0032fcaf2 merge converted elbow points if too close 2025-04-25 20:48:58 +10:00
Ryan Di
7d5f5b3c62 use latest linear 2025-04-25 19:36:25 +10:00
Ryan Di
900ee41d0f fix elbow segment indexing 2025-04-25 11:09:18 +10:00
Ryan Di
f99fe54797 respect initial type when switching between linears 2025-04-25 10:40:36 +10:00
Ryan Di
63dd599089 rename type 2025-04-25 09:44:39 +10:00
Ryan Di
c83cc025df move logic from mutate to shape switch 2025-04-23 22:39:56 +10:00
Marcel Mraz
1913599594
refactor: remove dependency on the (static) Scene (#9389) 2025-04-23 13:45:08 +02:00
Ryan Di
e8e97adace merge with master 2025-04-23 21:43:12 +10:00
Ryan Di
37e12ec201 type safe element conversion 2025-04-23 21:36:16 +10:00
Ryan Di
de6acc4bad cache linear when panel shows up 2025-04-23 21:01:09 +10:00
Ryan Di
7541fadf9c safe conversion between line, sharp, curved, and elbow 2025-04-23 17:59:03 +10:00
Ryan Di
c90cdb7b74 clean switch of arrows using app state 2025-04-22 23:07:15 +10:00
Ryan Di
67793860b4 remove debug logic 2025-04-22 22:31:02 +10:00
Ryan Di
5ee209c236 bend line to elbow if needed 2025-04-22 18:52:10 +10:00
Ryan Di
eff67c5e01 cache initial panel position 2025-04-22 09:55:02 +10:00
Ryan Di
1c4b3cc0b1 remove hint 2025-04-22 09:07:40 +10:00
Ryan Di
6c2f3afa4e add shape switch to command palette 2025-04-22 08:19:43 +10:00
Vedant Mishra
debf2ad608
docs: Fix missing verb in Footer component documentation (#9393) 2025-04-20 12:35:38 +02:00
David Luzar
8fb2f70414
fix: scrollbar rendering and improve dragging (#9417)
* fix: scrollbar rendering and improve dragging

* tweak offsets
2025-04-20 12:28:41 +02:00
Jack Walsh
5fc13e4309
feat: add props.renderScrollbars (#9399)
* Expose renderScrollbars to AppState

* fix: scrollbar rendering should use al renderable elements

* remove `appState.renderScrollbars`

* clean unused

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
2025-04-19 21:50:44 +00:00
David Luzar
b5d60973b7
fix: duplication tests pointer state leaking between tests (#9414)
* fix: duplication tests pointer state leaking between tests

* fix snapshots
2025-04-18 11:11:12 +02:00
David Luzar
a5d6939826
fix: keep orig elem in place on alt-duplication (#9403)
* fix: keep orig elem in place on alt-duplication

* clarify comment

* fix: incorrect selection on duplicating labeled containers

* fix: duplicating within group outside frame should remove from group
2025-04-17 16:08:07 +02:00
David Luzar
0cf36d6b30
fix: erasing locked elements (#9400)
* fix: erasing locked elements

* signature tweaks
2025-04-16 10:28:56 +02:00
Ryan Di
8e9e0e2709 limit which linear elements can be switched 2025-04-16 18:04:16 +10:00
Ryan Di
58f7d33d80
perf: make eraser great again (#9352)
* perf: make eraser great again

* lint

* refactor and improve perf

* lint
2025-04-15 16:58:45 +02:00
Rubén Norte
6fe7de8020
fix: Add DOCTYPE and XML preamble in exported SVG documents (#9386)
All checks were successful
Tests / test (push) Successful in 4m59s
* Add DOCTYPE and XML preamble in exported SVG documents

* Update packages/excalidraw/data/index.ts

---------

Co-authored-by: David Luzar <5153846+dwelle@users.noreply.github.com>
2025-04-14 21:25:18 +02:00
Márk Tolmács
01304aac49
feat: Keep text label horizontal (#9364)
All checks were successful
Tests / test (push) Successful in 5m5s
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
2025-04-13 21:21:49 +02:00
jhanma17dev
dff69e9191
chore: Element center point util (#9298)
All checks were successful
Tests / test (push) Successful in 5m4s
2025-04-09 17:04:51 +02:00
Ryan Di
6fc85022ae
fix: lasso selection issues (#9353)
Some checks failed
Tests / test (push) Successful in 7m13s
Auto release excalidraw next / Auto-release-excalidraw-next (push) Failing after 1m45s
Build Docker image / build-docker (push) Failing after 6s
Cancel previous runs / cancel (push) Failing after 1s
Publish Docker / publish-docker (push) Failing after 20s
New Sentry production release / sentry (push) Failing after 2m5s
* revert stroke slicing hack for knot

* fix incorrect closing of path

* nonzero enclosure

* lint
2025-04-08 00:50:52 +10:00
Márk Tolmács
e48b63a0ae
fix: Rounded diamond edge elbow arrow U route (#9349)
Some checks failed
Tests / test (push) Successful in 4m54s
Auto release excalidraw next / Auto-release-excalidraw-next (push) Successful in 2m15s
Build Docker image / build-docker (push) Failing after 8s
Cancel previous runs / cancel (push) Failing after 2s
Publish Docker / publish-docker (push) Failing after 27s
New Sentry production release / sentry (push) Failing after 2m58s
2025-04-07 10:43:07 +02:00
David Luzar
c2caf78e95
fix: deselected hit element being duplicated + incorrect re-seeding (#9333)
* fix: deselected hit element being duplicated + incorrect re-seeding

* snapshots

* Fix alt-drag binding

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>

* Add alt-drag bound arrow test

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>

---------

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
Co-authored-by: Mark Tolmacs <mark@lazycat.hu>
2025-04-07 10:41:31 +02:00
Ryan Di
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
Narek Malkhasyan
6e47fadb59
feat: add container to multiple text elements (#9348)
All checks were successful
Tests / test (push) Successful in 4m55s
2025-04-07 00:57:27 +02:00
Márk Tolmács
b3d5ba0567
fix: Linear element is not normalized (#9347)
All checks were successful
Tests / test (push) Successful in 5m4s
* Fix #9292
2025-04-06 13:41:11 +02:00
Panagiotis Papadopoulos
c79e892e55
chore: bump @radix-ui/react-tabs version to 1.1.3 (#9329)
All checks were successful
Tests / test (push) Successful in 6m2s
* 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
David Luzar
57a9e301d4
feat: tweak color swatch, and button bgs (#9330)
* feat: tweak color swatch, and button bgs

* snapshots
2025-04-02 14:36:13 +02:00
Ryan Di
beb0bd1528 only tab to switch if focusing on app container 2025-04-02 20:15:04 +11:00
Ryan Di
f35c4c2b46 merge with latest 2025-04-02 19:04:51 +11:00
Ryan Di
494a0e8266 remove redundant code 2025-04-02 18:52:31 +11:00
Ryan Di
a99ca82389 redraw to correctly position text 2025-04-02 18:48:06 +11:00
Ryan Di
cc224b156d adjust panel bg & shadow 2025-04-02 17:18:54 +11:00
Ryan Di
3272841b23 provide an optional direction when shape switching 2025-04-02 17:05:01 +11:00
David Luzar
7c58477382
feat: tweak properties panel styling (#9322)
All checks were successful
Tests / test (push) Successful in 4m43s
2025-03-30 19:20:13 +02:00