3767 Commits

Author SHA1 Message Date
dwelle
7c3190d4bb Merge branch 'master' into zsviczian-loop-lock
# Conflicts:
#	packages/element/src/typeChecks.ts
#	packages/excalidraw/actions/actionProperties.tsx
2025-05-10 20:07:46 +02:00
David Luzar
51dbd4831b
refactor: make element type conversion more generic (#9504)
* feat: add `reduceToCommonValue()` & improve opacity slider

* feat: generalize and simplify type conversion cache

* refactor: change cache from atoms to Map

* feat: always attempt to reuse original fontSize when converting generic types
2025-05-10 20:06:16 +02:00
dwelle
e7deda0404 Merge branch 'master' into zsviczian-loop-lock
# Conflicts:
#	packages/element/src/linearElementEditor.ts
#	packages/excalidraw/actions/actionFinalize.tsx
#	packages/excalidraw/actions/actionLinearEditor.tsx
2025-05-10 10:14:59 +02:00
Marcel Mraz
7e41026812
refactor: export everything from @excalidraw/element, don't import from subpaths (#9466)
* Don't import from subpaths

* Fix tests, move related tests to element
2025-05-09 23:01:33 +02:00
shindi-renuo
a8ebe514da
Replace tongue emoji with globe emoji (#9489) 2025-05-09 16:59:06 +00:00
Ryan Di
a30e1b25c6
feat: include frame names in canvas searches (#9484)
* fix frame name clipping on zooming

* include assistant font

* default frame name

* extend search to frame names

* add a simple test

* collpase search match items

* id check out of loop

* fix frame name check

* include focusedId for small perf improvement

* optionally show and hide collapse icon

* update section title

* fix tests

* rename `serverSide` -> `private`

* revert: do not reset zoom on zoom change

* feat: do not close menu on repeated ctrl+f

* remove collapsible

* tweak results CSS

* remove redundant check

* set `appState.searchMatches` to null if empty

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
2025-05-09 18:32:16 +02:00
dwelle
74dcaeebda loopLock -> polygon 2025-05-08 23:09:41 +02:00
dwelle
35fa4fc041 add to command palette 2025-05-08 23:01:19 +02:00
dwelle
b0174503d0 labels tweak 2025-05-08 23:01:06 +02:00
dwelle
0f18b9832f convert to polygon when creating line 2025-05-08 23:00:30 +02:00
dwelle
d1fa9005b9 fix polygon behavior when adding/removing/moving points within line editor 2025-05-08 22:59:44 +02:00
dwelle
ac1ad31921 Merge branch 'master' into zsviczian-loop-lock
# Conflicts:
#	packages/element/src/linearElementEditor.ts
#	packages/excalidraw/actions/actionLinearEditor.tsx
#	packages/excalidraw/tests/__snapshots__/regressionTests.test.tsx.snap
2025-05-08 17:09:49 +02:00
David Luzar
ff2ed5d26a
refactor: change movePoints pointUpdates type (#9499) 2025-05-08 16:47:13 +02:00
dwelle
703e37f84c TBD: only show polygon button for enabled polygons 2025-05-07 23:10:35 +02:00
dwelle
012076a3e9 TBD: remove bg color when disabling polygon 2025-05-07 23:04:45 +02:00
dwelle
b3eb93f130 auto-enable polygon when aligning start/end points 2025-05-07 23:04:45 +02:00
dwelle
904c209f96 do not disable polygon when creating new points via alt 2025-05-07 23:04:45 +02:00
dwelle
d0be24bd6a tweak point rendering inside line editor 2025-05-07 23:04:45 +02:00
dwelle
6d6b958f27 refactor 2025-05-07 23:04:43 +02:00
dwelle
f832bf9fde rewrite color picker to support no (mixed) colors & fix focus handling 2025-05-07 20:50:46 +02:00
Narek Malkhasyan
e058a08b33
fix: use rimraf instead of rm -rf (#9460) 2025-05-07 14:13:27 +02:00
Narek Malkhasyan
a306a909a0
fix: don't scroll page when TTDDialog is opened (#9455) 2025-05-07 13:33:18 +02:00
Marcel Mraz
3dc54a724a
feat: add onIncrement API (#9450) 2025-05-06 19:23:02 +02:00
David Luzar
a7c61319dd
fix: do not translate bound elements twice (#9486) 2025-05-06 13:09:00 +02:00
Narek Malkhasyan
cec5232a7a
fix: when resizing element, update bound elements after final size of element is determined (#9475) 2025-05-05 12:15:42 +02:00
dwelle
a7b4b08e86 do not split points on de-polygonizing & highlight overlapping points 2025-05-05 11:52:34 +02:00
Márk Tolmács
d4f70e9f31
feat: Quarter snap points for diamonds (#9387) 2025-05-05 11:34:40 +02:00
dwelle
eb619f8fde keep polygon icon constant 2025-05-05 11:28:19 +02:00
Márk Tolmács
e19fd1332a
feat: Precise highlights for bindings (#9472) 2025-05-05 09:51:20 +02:00
dwelle
1fdf8967ed POC: auto-transform to polygon on bg set 2025-05-04 19:20:27 +02:00
dwelle
a9a2c953b4 change icon & turn into a state style button 2025-05-04 18:03:05 +02:00
zsviczian
6aea288dcd dislocate enpoint when breaking the loop. 2025-05-04 14:11:43 +00:00
zsviczian
ce9257b6fc lint 2025-05-04 13:03:04 +00:00
zsviczian
3ee5e62c0e added loopLock to newElement, updated test snapshots 2025-05-04 12:59:24 +00:00
zsviczian
9dc588efa2 lint + added loopLock to restore.ts 2025-05-04 12:22:11 +00:00
zsviczian
bab365bc62 extracted updateLoopLock to improve readability. Removed unnecessary SVG attributes 2025-05-04 12:11:54 +00:00
zsviczian
417d6de2e4 fixed condition. 4 line points are required for the action to be available 2025-05-04 11:38:57 +00:00
zsviczian
54b4a304c9 Loop Lock/Unlock 2025-05-04 11:00:19 +00:00
Hazem Krimi
6e655cdb24
fix: When moving a frame through the stats inputs or drags move along its children (#9433)
Co-authored-by: Mark Tolmacs <mark@lazycat.hu>
2025-05-02 17:07:17 +02:00
Gowtham Selvaraj
192c4e7658
docs: added shape cycling shortcut in helper dialog (#9465)
* docs: added shape cycling shortcut in helper dialog

- Document Tab and Shift+Tab usage for shape cycling

* docs: added shape cycling shortcut in helper dialog

* Update packages/excalidraw/components/HelpDialog.tsx

* Update packages/excalidraw/locales/en.json

---------

Co-authored-by: David Luzar <5153846+dwelle@users.noreply.github.com>
2025-05-01 12:12:45 +02:00
Ryan Di
195a743874
feat: switch between basic shapes (#9270)
* feat: switch between basic shapes

* add tab for testing

* style tweaks

* only show hint when a new node is created

* fix panel state

* refactor

* combine captures into one

* keep original font size

* switch multi

* switch different types altogether

* use tab only

* fix font size atom

* do not switch from active tool change

* prefer generic when mixed

* provide an optional direction when shape switching

* adjust panel bg & shadow

* redraw to correctly position text

* remove redundant code

* only tab to switch if focusing on app container

* limit which linear elements can be switched

* add shape switch to command palette

* remove hint

* cache initial panel position

* bend line to elbow if needed

* remove debug logic

* clean switch of arrows using app state

* safe conversion between line, sharp, curved, and elbow

* cache linear when panel shows up

* type safe element conversion

* rename type

* respect initial type when switching between linears

* fix elbow segment indexing

* use latest linear

* merge converted elbow points if too close

* focus on panel after click

* set roudness to null to fix drag points offset for elbows

* remove Mutable

* add arrowBoundToElement check

* make it dependent on one signle state

* unmount when not showing

* simpler types, tidy up code

* can change linear when it's linear + non-generic

* fix popup component lifecycle

* move constant to CLASSES

* DRY out type detection

* file & variable renaming

* refactor

* throw in not-prod instead

* simplify

* semi-fix bindings on `generic` type conversion

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
2025-04-30 18:07:31 +02:00
David Luzar
4a60fe3d22
fix: remove noreferrer on internal links (#9452)
* fix: remove `noreferrer` on internal links

* fix snaps

* fix lint
2025-04-29 18:45:17 +02:00
Narek Malkhasyan
2a0d15799c
fix: when dragging arrow endpoint, update binding only on the dragged side (#9367) 2025-04-25 10:46:58 +02:00
CharitSinghChauhan
a18b139a60
fix: laser pointer trail disappearing on pointerup (#9413) (#9427)
* Fix laser pointer trail disappearing on pointerup (#9413)

Previously, the laser pointer trail would disappear as soon as the pointerup event was triggered. This fix delays the trail removal to ensure it persists for a smoother visual experience.

Fixes #9413.

* Remove extra blank lines

Minor formatting cleanup. No functional changes.
2025-04-24 10:05:08 +10:00
Marcel Mraz
1913599594
refactor: remove dependency on the (static) Scene (#9389) 2025-04-23 13:45:08 +02: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