* save penMode and penDetected to browser cache
* added on pointer down
* added onPointerDown
* factor out and merge handlers
Co-authored-by: dwelle <luzar.david@gmail.com>
* feat: Support binding text to closest container
* Bind text to selected container
* show bind action in canvas and selected container after binding
* allow binding if container has no bound text
* fix
* move logic to show/hide bind actions to contextMenuPredicate
* don't show bind action when clicking on bounding box and not elemnts
* feat: update eraser cursor
* fix dark theme
* check before adding active class
* use custom cursor instead of DOM manipulation
* cache canvas and redraw only when theme changes
* use oc colors
* remove
* cache preview data url
* increase linwidth
* update coords for cursor
* add white 2px outline
* improvements
* use 1px line width 6px radius for outer
* improve
* feat: Add Eraser 🎉
* Eraser working
* remove unused state
* fix
* toggle eraser
* Support deselect with Alt/Option
* rename actionDelete -> actionErase
* Add util isEraserActive
* show eraser in mobile
* render eraser conditionally in mobile
* use selection if eraser in local storage state
* Add sampling to erase accurately
* use pointerDownState
* set eraser to false in AllowedExcalidrawElementTypes
* rename/reword fixes
* don't use updateScene
* handle bound text when erasing
* fix hover state in mobile
* consider all hitElements instead of a single
* code improvements
* revert to select if eraser active and elements selected
* show eraser in zenmode
* erase element when clicked on element while eraser active
* set groupIds to empty when eraser active
* fix test
* remove dragged distance
* fix: ensure verticalAlign properties not shown when no element selected
* show verticalAlign prop if selection contains at least one applicable element
* simplify
* feat: support vertical text align for bound containers
* update icons
* use const
* fix lint
* rename to and show when text editor active
* don't update vertical align if not center
* fix svgs
* fix y coords when vertical align bottm
Co-authored-by: dwelle <luzar.david@gmail.com>
* feat: support custom colors 🎉
* remove canvasBackground
* fix tests
* Remove custom color when elements deleted
* persist custom color across sessions
* Choose 5 latest custom colors when populating from elements
* fix tests
* styling
* don't use up/down arrow for custom colors
* Always push latest color to the begining
* don't check if valid in custom color
* calculate custom colors on color picker open
* revert unnecessary changes
* remove newlines
* simplify state
* tweak label
* fix custom color shortcuts throwing if color not exists
* fix
* early return
Co-authored-by: dwelle <luzar.david@gmail.com>
* feat: Scale font size when bound text containers resized with shift pressed
* revert fontsize once shift pressed/released after resize
* make slightly more typesafe
Co-authored-by: dwelle <luzar.david@gmail.com>
* fix: restore cursor position after bound text container value updated
* only restore cursor when the cursor is not at the end of the line
* compute diff before setting the cursor
* chore: Add tracking for hyperlinks
* update
* fix
* remove
* tweak
* disable ga logging in dev again
* add logging for hyperlink `edit` & support for tracking in manager
* event label tweaks
* fix tests & make more typesafe
Co-authored-by: dwelle <luzar.david@gmail.com>
* fix: fallback to primary color if --color-primary-chubb not present
* rename to --color-primary-contrast-offset
* use contarst-offset
Co-authored-by: David Luzar <luzar.david@gmail.com>
* Update src/packages/excalidraw/README_NEXT.md
* remove
* Update src/packages/excalidraw/README_NEXT.md
Co-authored-by: David Luzar <luzar.david@gmail.com>
Co-authored-by: David Luzar <luzar.david@gmail.com>