David Luzar
fd4460be37
feat: add hint around text editing ( #3708 )
2021-06-12 22:58:34 +02:00
David Luzar
6690215cd1
feat: change library icon to be more clear ( #3583 )
2021-06-11 23:13:05 +02:00
Aakansha Doshi
9325109836
fix: use excal id so every element has unique id ( #3696 )
...
* fix: use excal id so every element has unique id
* fix
* fix
* fix
* add docs
* fix
2021-06-10 02:46:56 +05:30
David Luzar
69b6fbb3f4
feat: pass current theme
when installing libraries ( #3701 )
...
* pass current `theme` when installing libraries
* pass `theme` instead of `appState`
2021-06-08 23:14:02 +02:00
Sakito Mukai
6b6002baae
refactor: Delete React SyntheticEvent persist ( #3700 )
2021-06-07 10:32:30 +02:00
Aakansha Doshi
d0867d1c3b
refatcor: make ProjectName a functional component ( #3695 )
2021-06-04 21:22:09 +05:30
Arun
4249de41d4
feat: Add prop autoFocus
to set focus on the Excalidraw component ( #3691 )
...
* feat: Add prop autofocus to set focus on Excalidraw component
* Update PR number
* Make requested changes
* Add note
* Update src/packages/excalidraw/CHANGELOG.md
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
* Update src/tests/excalidrawPackage.test.tsx
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
* Remove duplicate sentence
* Indent note
* autofocus -> autoFocus
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
2021-06-02 19:54:21 +05:30
Aakansha Doshi
15f02ba191
refactor: code clean up ( #3681 )
...
* refactor: code clean up
Move types from App.tsx to types.ts
Move excalidrawPackage.test.tsx inside src/tests/package
* import type
2021-06-01 23:52:13 +05:30
David Luzar
a2e1199907
feat: support exporting json to excalidraw plus ( #3678 )
...
* feat: support exporting json to excalidraw plus
* add Firebase Storage rules to codebase
* factor the onClick handler out
* move excal icon to icons.tsx
* handle export error
2021-06-01 14:05:09 +02:00
David Luzar
c08e9c4172
fix: use rgba instead of shorthand alpha ( #3688 )
2021-05-31 14:29:40 +05:30
David Laban
abfc58eb24
feat: save exportScale in AppState ( #3580 )
...
Co-authored-by: David Luzar <luzar.david@gmail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
2021-05-30 16:31:12 +02:00
David Luzar
035c7affff
fix: color pickers not opening on mobile ( #3676 )
2021-05-30 12:05:07 +02:00
David Luzar
c819b653bf
fix: on contextMenu, use selected element regardless of z-index ( #3668 )
2021-05-29 22:33:53 +02:00
Aakansha Doshi
d63b6a3469
feat: support custom UI rendering inside export dialog ( #3666 )
...
* feat: support custom UI rendering inside export dialog
* docs
* add
* remove assertion
Co-authored-by: dwelle <luzar.david@gmail.com>
2021-05-30 00:37:38 +05:30
Aakansha Doshi
360310de31
feat: Add prop UIOptions.canvasActions.saveAsImage to show/hide save image button ( #3662 )
...
* feat: Add prop UIOptions.canvasActions.saveAsImage which implies whether the save as image dialog should be shown
* Add docs
* fix specs
2021-05-29 19:41:50 +05:30
Aakansha Doshi
ba48974351
feat: customise export dialog with UIOptions.canvasActions.export prop ( #3658 )
...
* refactor: update UIOptions.canvasActions.export to be a an object
* fix
* fix
* dnt show export icon when false
* fix
* inline
* memoize UIOptions
* update docs
* fix
* tweak readme
Co-authored-by: David Luzar <luzar.david@gmail.com>
2021-05-29 02:56:25 +05:30
Arun
6c3e4417e1
feat: Add shortcuts for stroke and background color picker ( #3318 )
...
* feat: Add shortcuts for opening stroke and background color picker
* Use App.tsx keydown handler
* only get selectedElements if applicable (perf)
* fix tests and snaps
* reuse `appState.openMenu`
Co-authored-by: dwelle <luzar.david@gmail.com>
2021-05-28 13:52:42 +02:00
Aakansha Doshi
bc0b6e1888
refactor: rename UIOptions.canvasActions.saveScene to UIOptions.canvasActions.saveToActiveFile ( #3657 )
...
* refactor rename action saveScene to saveFileToDisk
* docs
* fix
* fix
2021-05-28 02:10:33 +05:30
David Luzar
dd12abc583
refactor: remove watermark code ( #3639 )
...
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
2021-05-26 21:44:54 +02:00
David Luzar
abebf9aff8
fix: small UI issues around image export dialog ( #3642 )
2021-05-26 14:44:03 +02:00
David Luzar
790c9fd02e
feat: exporting redesign ( #3613 )
...
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
2021-05-25 21:37:14 +02:00
David Luzar
357266e9ab
feat: auto-position tooltip and suport overflowing container ( #3631 )
2021-05-25 13:52:04 +02:00
David Luzar
d201d0be1b
fix: disable pointer-events on footer-center container ( #3629 )
2021-05-23 17:09:39 +02:00
David Luzar
6d40039f08
feat: allow inner-drag-selecting with cmd/ctrl ( #3603 )
...
* feat: allow inner-drag-selecting with cmd/ctrl
* don't use cursor when pressing cmd/ctrl
* ensure we reset deselected groups
* add tests
* add docs
* couple fixes around group selection
2021-05-20 22:28:34 +02:00
Aakansha Doshi
6271a031a3
fix: move encrypted icon to excalidraw-app add separate animation for renderFooter
prop ( #3577 )
...
* fix: move encrypted icon to excalidraw-app
* use grid & separate animation for custom footer
* update docs
* fix
2021-05-15 14:49:58 +05:30
Aakansha Doshi
78da4c075e
feat: support updating appState in updateScene API ( #3576 )
...
* feat: support updating appState in updateScene API
* make `updateScene.data.appState` more type-safe
* restore `appState` when passing to `updateScene`
* fix
Co-authored-by: dwelle <luzar.david@gmail.com>
2021-05-14 17:52:56 +05:30
David Laban
f1cf28a84e
refactor: reduce passing-around of canvas in export code ( #3571 )
2021-05-13 19:21:15 +02:00
Aakansha Doshi
3b9290831a
refactor: rename renderTopRight prop to renderTopRightUI ( #3572 )
...
* refactor: rename renderTopRight prop to renderTopRightUI
* update
* fix
* update
2021-05-13 21:02:59 +05:30
Gurkiran Singh
bec34f2d57
feat: Shortcut key for nerd stats ( #3552 )
...
* added alt+/ as the shortcut key for nerd stats
Signed-off-by: gurkiran_singh <gurkiransinghk@gmail.com>
* added shortcut info in HelpDialog.ts
Signed-off-by: gurkiran_singh <gurkiransinghk@gmail.com>
* resolved conflicts
Signed-off-by: gurkiran_singh <gurkiransinghk@gmail.com>
* added shortcut info in HelpDialog.ts
Signed-off-by: gurkiran_singh <gurkiransinghk@gmail.com>
2021-05-12 14:27:35 +05:30
David Luzar
91ab7f36e2
fix: restore on paste or lib import ( #3558 )
2021-05-09 21:42:12 +02:00
Steve Ruiz
49c6bdd520
feat: improved freedraw ( #3512 )
...
Co-authored-by: dwelle <luzar.david@gmail.com>
2021-05-09 17:42:10 +02:00
Arun
198800136e
feat: Add shortcut for dark mode ( #3543 )
...
* Create and move toggle into an action
* Add shortcut on help dialog
2021-05-08 11:47:30 +02:00
David Luzar
178ee04d82
feat: Adds rounded icons, joins and caps. ( #3521 )
...
Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-05-07 18:03:23 +02:00
David Luzar
bac76778ce
feat: add renderTopRight
prop & remove GH corner from core ( #3539 )
...
* feat: add `renderTopRight` prop & remove GH corner from core
* reuse `--space-factor` var
* update readme & changelog
2021-05-06 21:00:17 +02:00
David Luzar
12e8cc853f
feat: remove backdrop-filter
to improve perf ( #3506 )
...
* feat: remove `backdrop-filter` to improve perf
* remove `backdrop-filter` from Modal
2021-04-27 10:55:59 +02:00
David Luzar
5cc3f7db80
feat: support scroll to center to single element and rename setScrollToContent
( #3482 )
...
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
2021-04-25 12:28:41 +02:00
Aakansha Doshi
5c42cb5be4
fix: only handle cut/paste events inside excalidraw ( #3484 )
...
* fix: only hand cut/paste events inside excalidraw
* changelog
* check if excalidraw is active for copy event
* check if active element is part of excalidraw
2021-04-25 15:13:42 +05:30
Aakansha Doshi
d3106495b2
fix: make history local to a given excalidraw instance ( #3481 )
...
* fix: make history local to a given excalidraw instance
* changelog
* Update src/packages/excalidraw/CHANGELOG.md
2021-04-24 18:21:02 +05:30
Aakansha Doshi
891ac82447
fix: use active Excalidraw component when editing text ( #3478 )
...
* fix: use active excalidraw component when editing text
* changelog
* tweak
2021-04-23 21:11:18 +05:30
Aakansha Doshi
37d513ad59
feat: Make library local to given excalidraw instance and allow consumer to control it ( #3451 )
...
* feat: dnt share library & attach to the excalidraw instance
* fix
* Add addToLibrary, resetLibrary and libraryItems in initialData
* remove comment
* handle errors & improve types
* remove resetLibrary and addToLibrary and add onLibraryChange prop
* set library cache to empty arrary on reset
* Add i18n for remove/add library
* Update src/locales/en.json
Co-authored-by: David Luzar <luzar.david@gmail.com>
* update docs
* Assign unique ID to
each excalidraw component and remove csrfToken from library as its not needed
* tweaks
Co-authored-by: David Luzar <luzar.david@gmail.com>
* update
* tweak
Co-authored-by: dwelle <luzar.david@gmail.com>
2021-04-21 23:38:24 +05:30
David Luzar
6730eb41c2
fix: scrollToContent only on visible elements ( #3466 )
2021-04-19 17:29:13 +02:00
David Luzar
7d29351d66
fix: library onClick paste off-center ( #3462 )
2021-04-18 13:33:05 +02:00
Aakansha Doshi
c0047269c1
fix: focus on last active element when dialog closes ( #3447 )
...
* fix: focus on last active element when dialog closes
* useState instead of ref
2021-04-15 20:29:00 +05:30
Aakansha Doshi
793b69e592
fix: Apply theme to only to active excalidraw component ( #3446 )
...
* feat: Apply theme to only current instance of excalidraw
* fix
* fix
* fix
* fix
* fix
* update changelog
* fix
2021-04-13 23:02:57 +05:30
Aakansha Doshi
d126d04d17
feat: Bind keyboard events to the current excalidraw container and add handleKeyboardGlobally prop to allow host to bind to document ( #3430 )
...
* fix: Bind keyboard events to excalidraw container
* fix cases around blurring
* fix modal rendering so keyboard shortcuts work on modal as well
* Revert "fix modal rendering so keyboard shortcuts work on modal as well"
This reverts commit 2c8ec6be8eff7d308591467fe2c33cfbca16138f.
* Attach keyboard event in react way so we need not handle portals separately (modals)
* dnt propagate esc event when modal shown
* focus the container when help dialog closed with shift+?
* focus the help icon when help dialog on close triggered
* move focusNearestTabbableParent to util
* rename util to focusNearestParent and remove outline from excal and modal
* Add prop bindKeyGlobally to decide if keyboard events should be binded to document and allow it in excal app, revert tests
* fix
* focus container after installing library, reset library and closing error dialog
* fix tests and create util to focus container
* Add excalidraw-container class to focus on the container
* pass focus container to library to focus current instance of excal
* update docs
* remove util as it wont be used anywhere
* fix propagation not being stopped for React keyboard handling
* tweak reamde
Co-authored-by: David Luzar <luzar.david@gmail.com>
* tweak changelog
* rename prop to handleKeyboardGlobally
Co-authored-by: dwelle <luzar.david@gmail.com>
2021-04-13 01:29:25 +05:30
David Luzar
a7cbe68ae8
refactor: improve types around dataState and libraryData ( #3427 )
2021-04-10 19:17:49 +02:00
Aakansha Doshi
c19c8ecd27
feat: Add scroll listener to the nearest scrollable container and allow consumer to disable it ( #3408 )
...
* fix: Add scroll listener to the nearest scrollable container
* fix
* use loop instead of recursion
* fix
* return document
* calculate nearest scrollable container in settimeout to unblock main thread
* Add prop detectNearestScroll and clear timeout on unmount
* disable scroll listener on excal app
* update prop name to detectScroll
* update docs
* remove settimeout
* tweak docs
Co-authored-by: David Luzar <luzar.david@gmail.com>
* tweak changelog
Co-authored-by: David Luzar <luzar.david@gmail.com>
* lint
Co-authored-by: David Luzar <luzar.david@gmail.com>
2021-04-09 20:44:54 +05:30
Fabien BERNARD
d91950bd03
feat: Add onPaste prop to customise clipboard paste event ( #3420 )
...
* Add Awaited type util
* Expose onPasteFromClipboard props
* Add `event` as second param for advanced usages
* Add support for async flows
* Extract ClipboardData type
* Rename `onPasteFromClipboard` to `onPaste`
* Remove unused type helper
* Add `onPaste` documentation
* tweak docs
* fix
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
2021-04-09 20:19:58 +05:30
David Luzar
09dfd16b17
feat: use component dimensions to break to mobile ( #3414 )
...
Co-authored-by: Jed Fox <git@jedfox.com>
2021-04-08 19:54:50 +02:00
David Luzar
1e48aafb9c
fix: incorrectly caching png file handle ( #3407 )
2021-04-06 21:27:15 +02:00