* chore: Dedupe package dependencies and webpack configs.
* Fully dedupe `src/packages` via symlinks
* Merge https://github.com/excalidraw/excalidraw into dedupe-package-deps-configs
* fix: Link `tsc` so `build:example` works in @excalidraw/excalidraw
* @excalidraw/plugins: Revert the `yarn.lock` deduping.
* Drop yarn commands from the root `package.json`.
* Remove more unneeded `package.json` additions.
* One more change to drop in `package.json` files.
* Deduping: Move even more into common webpack configs.
* renaming
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
* feat: Introduce ExcalidrawData provider so that app state and elements need not be passed to children
* fix
* fix zen mode
* Separate providers for data and elements
* pass appState and elements to layerUI
* pass appState and elements to selectedShapeActions
* pass appState and elements to MobileMenu
* pass appState to librarymenu
* rename
* rename to ExcalidrawAppState
* feat: enable midpoint inside linear element editor
* fix
* fix
* hack to set pointerDownState.hit.hasHitElementInside when mid point added
* remove hacks as not needed :)
* remove newline
* fix
* add doc
* feat: Add a mid point for linear elements
* fix tests
* show mid point only on hover
* hacky fix :(
* don't add mid points if present and only add outside editor
* improve styling and always show phantom point instead of just on hover
* fix tests
* fix
* only add polyfill for test
* add hover state for phantom point
* fix tests
* fix
* Add Array.at polyfill
* reuse `centerPoint()` helper
* reuse `distance2d`
* use `Point` type
Co-authored-by: dwelle <luzar.david@gmail.com>
* fix: show bounding box for 3+ linear point elements
* refactor
* show bounding box for 3 points as well
* fix dragging bounding box for linear elements
* Increase margin/padding for linear elements
* fix cursor and keep bounding box same but offset resize handles
* introduce slight padding for selection border
* better
* add constant for spacing
* feat: redesign arrows and lines
* set selectedLinearElement on pointerup
* fix tests
* fix lint
* set selectionLinearElement to null when element is not selected
* fix
* don't set selectedElementIds to empty object when linear element selected
* don't move arrows when clicked on bounding box
* don't consider bounding box when linear element selected
* better hitbox
* show pointer when over the points in linear elements
* highlight points when hovered
* tweak design whene editing linear element points
* tweak
* fix test
* fix multi point editing
* cleanup
* fix
* fix
* remove stroke when hovered
* account for zoom when hover
* review fix
* set selectedLinearElement to null when selectedElementIds doesn't contain the linear element
* remove hover affect when moved away from linear element
* don't set selectedLinearAElement if already set
* fix selection
* render reduced in test :p
* fix box selection for single linear element
* set selectedLinearElement when deselecting selected elements and linear element is selected
* don't show linear element handles when element locked
* selected linear element when only linear present and selected with selectAll
* don't set selectedLinearElement if already set
* store selectedLinearElement in browser to persist
* remove redundant checks
* test fix
* select linear element handles when user has finished multipoint editing
* fix snap
* add comments
* show bounding box for locked linear elements
* add stroke param to fillCircle and remove stroke when linear element point hovered
* set selectedLinearElement when thats the only element left when deselcting others
* skip tests instead of removing for rotation
* (un)bind on pointerUp when moving linear element points outside editor
* render bounding box for linear elements as a fallback on state mismatch
* simplify and remove type assertion
Co-authored-by: dwelle <luzar.david@gmail.com>
* feat: cursor alignment when creating linear elements
* feat: apply cursor alignment to multi-point linear elements
* refactor: rename size helper function