632 Commits

Author SHA1 Message Date
David Luzar
1b626175de
feat: use origin + pathname as libraryReturnUrl default (#3325) 2021-03-25 18:27:40 +01:00
Aakansha Doshi
77b873251a
fix: Add unique key for library header to resolve dev warnings (#3316) 2021-03-23 22:25:54 +05:30
Furkan Demir
b50b8f7b0d
fix: disallow create text in viewMode on mobile (#3219) 2021-03-23 19:36:16 +05:30
Arun
40656c70d1
fix: Make help toggle tabbable (#3310)
* fix: Make help toggle tabbable

* Update src/components/HelpIcon.tsx

Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>

Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
2021-03-23 16:48:10 +05:30
Arun
0480753581
fix: Show Windows share icon for Windows users (#3306)
* fix: Show Windows share icon for Windows users

* move function outside t he component
2021-03-22 17:02:20 +01:00
Thomas Steiner
f7e17a28fa
fix: Update browser-fs-access to use new supported export (#3303)
* Use new exported supported

* Bump to v0.15.3
2021-03-22 14:58:26 +01:00
Hitesh Goyal
78f3a92dd1
feat: replaces fontSize and fontFamily text with icons (#2857)
Co-authored-by: Hitesh Goyal <hiteshlyearn@Hiteshs-MacBook-Pro.local>
Co-authored-by: dwelle <luzar.david@gmail.com>
2021-03-22 14:26:35 +01:00
Aakansha Doshi
7ee8de0a46
feat: set window.name in excalidraw app & also support target for excalidraw libraries (#3299)
* feat: set window.name in excalidraw app so library installation always opens on same tab & also support target for excalidraw libraries

* update changelog and readme

* Update public/index.html

Co-authored-by: David Luzar <luzar.david@gmail.com>

* use level 4 heading

* Update src/packages/excalidraw/README.md

Co-authored-by: David Luzar <luzar.david@gmail.com>

Co-authored-by: David Luzar <luzar.david@gmail.com>
2021-03-21 18:13:52 +05:30
Aakansha Doshi
13d9374cde
fix: Don't show export and delete when library is empty (#3288) 2021-03-20 21:58:37 +05:30
Aakansha Doshi
efb6d0825b
feat: Add label for name field and use input when editable in export dialog (#3286)
* feat: Add label for name field and use input when editable in export dialog

* fix

* review fix

* dnt allow to edit file name when view mode

* Update src/components/ProjectName.tsx

Co-authored-by: David Luzar <luzar.david@gmail.com>

Co-authored-by: David Luzar <luzar.david@gmail.com>
2021-03-20 21:57:58 +05:30
Aakansha Doshi
80a61db72f
fix: overflow in textinput in export dialog (#3284)
* fix: overflow in textinput in export dialog

* use width
2021-03-20 18:21:48 +05:30
David Luzar
cf6a5ff16b
fix: state continuously updated when holding ctrl/cmd (#3283) 2021-03-20 13:28:28 +01:00
Arun
c3ecbcb3ab
feat: Allow host app to update title of drawing (#3273)
* Allow updating name on updateScene

* Revert "Allow updating name on updateScene"

This reverts commit 4e07a608d38a585e0f3c04e26b9f5e0e404824b1.

* Make requested changes

* Make requested changes

* Remove customName from state

* Remove redundant if statement

* Add tests, update changelog and minor fixes

* remove eempty lines

* minor fixes

* no border and on hover no background change

* Give preference to name prop when initialData.appState.name is present and update specs

* minor fix

* Fix name input style in dark mode

Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
2021-03-20 16:08:03 +05:30
Aakansha Doshi
de99484a1f
feat: Expose the API to calculate offsets and remove offsetTop and offsetLeft props (#3265)
* feat: Expose the API to calculate offsets and remove offsetTop and offsetLeft props

* update

* fix tests

* fix

* update readme and changelog

* fix

* better
2021-03-20 13:00:49 +05:30
David Luzar
add1785ace
fix: allow copying text outside the component (#3275) 2021-03-19 18:36:23 +01:00
David Luzar
c1379c3c10
fix: Revert 906faaf0 #3206 (#3269) 2021-03-17 14:43:58 +01:00
Aakansha Doshi
052b73d95b
refactor: Rename prop scrollToCenter and setScrollToCenter to scrollToContent and setScrollToContent respectively (#3261)
* refactor: Rename prop scrollToCenter and setScrollToCenter to scrollToContent and setScrollToContent respectively

* fix

* update changelog/readme

* fix
2021-03-16 23:02:17 +05:30
David Luzar
e90e56452f
fix: stop preventing canvas pointerdown/tapend events (#3207) 2021-03-16 18:04:53 +01:00
Jeremy Press
84a1863233
feat: Add theme prop (#3228)
* support appearance when updating scene data

* works!

* whoops, missed a prop

* hide appearance button when prop is not set

* cleanup

* fix export + rename prop to theme

* rename to showThemeBtn, hide via react instead of css

* adapt to new state name

* add tests and css selector to target the dark mode toggle

* updated changelog and readme

* fix markdown rendering in readme

* pr feedback
2021-03-16 00:03:46 +05:30
David Luzar
8f45aa2924
fix: double scrollbar on modals (#3226) 2021-03-14 14:30:12 +01:00
Arun
b9e70ec666
feat: Implement the Web Share Target API (#3230)
* Use the web share target API

* Make requested changes

* Remove line

* Add application/json back

* Add application/vnd.excalidraw+json

* Add 'POST' check back

* Make requested changes

* Update src/appState.ts

Co-authored-by: Thomas Steiner <tomac@google.com>

* Update test

* Override initializeScene

* Use Excalidraw MIME type

* Minor fixes

* More MIME type tweaks

* More permissive file open

* Be overpermissive in file open

Co-authored-by: Thomas Steiner <tomac@google.com>
Co-authored-by: tomayac <steiner.thomas@gmail.com>
2021-03-13 22:42:54 +01:00
Aakansha Doshi
f1daff2437
refactor: Rename appearance to theme (#3237)
* refactor: Rename appearance to theme

* fix

* update changelog

* rename theme_dark to theme--dark

* add about migration
2021-03-13 18:58:06 +05:30
David Luzar
91c8b6ecbf
feat: support libraryReturnUrl when installing libraries (#3227)
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
2021-03-13 12:35:35 +01:00
Arun
6252b22b42
feat: Implement the Web Share API for the collaboration dialog (#3222)
* feat: Implement the Web Share API for the collaboration dialog

* Make requested changes
2021-03-11 12:21:17 +01:00
Aakansha Doshi
00ac804dd8
fix: Allow copy of excalidraw elements only when inside excalidraw (#3206)
* fix: Allow copy event only inside canvas

* use pointerdown

* use document.getSelection

* remove poiterdown

* remove keyTest

* update changelog
2021-03-09 11:52:28 +05:30
Thomas Steiner
1f7f07fbfb
Remove left-over ToDo comment 2021-03-08 17:47:01 +01:00
Aakansha Doshi
3a0a638a0d
fix: Position text editor absolute and fix the offsets so it doesn't remain fixed when container is scrolled (#3200)
* fix: Position text editor absolute and fix the offsets so it doesn't remain fixed when container is scrolled

* update changelog

* Update src/packages/excalidraw/CHANGELOG.md
2021-03-07 21:12:10 +05:30
dependabot[bot]
862c065e33
chore(deps): bump typescript from 4.1.5 to 4.2.3 (#3196)
* chore(deps): bump typescript from 4.1.5 to 4.2.3

Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.1.5 to 4.2.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.1.5...v4.2.3)

Signed-off-by: dependabot[bot] <support@github.com>

* hack types

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
2021-03-07 15:52:59 +01:00
Aakansha Doshi
eb24e8ffe4
fix: Wrap excalidraw in position relative & hide scrollbars in zen mode (#3174)
* fix: wrap excalidraw in position relative so that host need not add it explicitly to fix positioning when non zero offsets

* patch version

* Hide scrollbars on excalidraw container

* remove overflow hidden from index.html since its handled in excalidraw container

* review fix

* update changelog
2021-03-06 20:11:26 +05:30
Aakansha Doshi
07e71a8071
fix: Reduce the scroll debounce timeout to 100ms and update only if offset changes (#3182)
* fix: Reduce the scroll debounce timeout to 100ms so offsets get updated faster when the container scrolled
fixes https://github.com/excalidraw/excalidraw/issues/3175

* update changelog

* update offsets only when if it changes

* up

* Update src/components/App.tsx

Co-authored-by: David Luzar <luzar.david@gmail.com>
2021-03-06 19:06:42 +05:30
David Luzar
bf97414530
fix: rerender UI on renderFooter prop change (#3183) 2021-03-06 14:23:25 +01:00
David Luzar
c77c9ce65a
fix: cursor being leaked outside of canvas (#3161) 2021-03-03 14:04:02 +01:00
Arun
f295ba98c5
feat: Add export info on copy PNG to clipboard toast message (#3159)
Co-authored-by: dwelle <luzar.david@gmail.com>
2021-03-03 14:15:10 +02:00
Arun
4e421e6e9e
feat: Support exporting with dark mode (#3046)
Co-authored-by: Lipis <lipiridis@gmail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
2021-02-24 15:22:17 +01:00
Aakansha Doshi
7c5481b877
feat: Add support for scrollToCenter in initialData so host can control whether to scroll to center on mount (#3070)
* feat: Add support for scrollToCenter in initialData so host can control whether to scroll to center on mount

* fix

* update changelog and readme

* fix

* Scroll to center only for collab and shareable links in excalidraw app

* fix test

* update readme

* Update src/packages/excalidraw/README.md
2021-02-21 19:01:34 +05:30
Arun
74e82d0d7c
fix: Hide scrollbars on mobile (#3044)
* Hide scrollbars on mobile

* Fix package build

* Revert "Fix package build"

This reverts commit 7bf4a0aac1cbf370d682e827628ac72e99fb39d3.

* Make requested changes
2021-02-19 12:55:58 +01:00
Lipis
9dd2257932
chore: Consistent CSS variable names and general housekeeping of styles (#2947) 2021-02-16 20:22:18 +02:00
David Luzar
e6cd97c4f2
feat: adjust line-confirm-threshold based on zoom (#2884)
Co-authored-by: Lipis <lipiridis@gmail.com>
2021-02-14 14:43:23 +01:00
Aakansha Doshi
830fb64a25
fix: Support Excalidraw inside scrollable container (#3018)
* refactor: remove position fixed from excalidraw container, modal and stats

* remove unused css

* remove position fixed from toast and scroll to content

* Make excal interactable by fixing offsets and set popover as fixed since position needs to be calculate from viewport  top

* Assign 200px less than height of Excalidraw to the selected shapes actions o UI doesn't overflow

* update changelog, readme and package.json
2021-02-14 18:18:34 +05:30
Ivan Kurnosov
f8beb305de
refactor: Removed redundant import from App.tsx (#3040)
Given it's followed by qualified import - unqualified import looks redundant, unless I'm missing some tricky edge case.
2021-02-14 11:25:57 +02:00
Aakansha Doshi
b5fc8757a4
fix: allow to toggle between modes when view only mode to make UI consistent (#3009) 2021-02-12 10:40:40 +02:00
David Luzar
4b253c7362
fix: refresh wysiwyg position on canvas resize (#3008) 2021-02-11 12:24:26 +01:00
Arun
5ab0ce5a33
feat: Add the ability to clear library (#2997)
* Add the ability to clear libraries

* Update 'libraries' to 'library'

* Update en.json
2021-02-09 11:19:04 +01:00
Jed Fox
73cba59d2d
feat: Updates to Collaboration and RTL UX (#2994) 2021-02-08 21:43:51 +01:00
Aakansha Doshi
066560311b
feat: add props zenModeEnabled and gridModeEnabled so host can control completely (#2901)
* feat: add props zenModeEnabled and gridModeEnabled so host can control completely

* dnt show exit zenmode button when prop present

* fix

* update when props change

* Add tests

* Add tests

* update changelog and readme

* update

* Update src/tests/excalidrawPackage.test.tsx

* Update src/packages/excalidraw/README.md

Co-authored-by: Lipis <lipiridis@gmail.com>

* Update src/packages/excalidraw/README.md

Co-authored-by: David Luzar <luzar.david@gmail.com>

* Apply suggestions from code review

Co-authored-by: David Luzar <luzar.david@gmail.com>

* fix specs

Co-authored-by: Lipis <lipiridis@gmail.com>
Co-authored-by: David Luzar <luzar.david@gmail.com>
2021-02-06 21:22:28 +05:30
Arun
d6ca981f7a
fix: Rename 'Grid mode' to 'Show grid' (#2944) 2021-02-05 23:50:53 +02:00
David Luzar
00209ef9c3
fix: hide collaborator list on mobile if empty (#2938)
Co-authored-by: Lipis <lipiridis@gmail.com>
2021-02-05 15:45:44 +01:00
David Luzar
1e17c1967b
fix: toolbar unnecessarily eats too much width (#2924) 2021-02-04 16:52:16 +01:00
David Luzar
6c81a32d62
fix: text editor not visible in dark mode (#2920) 2021-02-04 16:21:48 +01:00
David Luzar
e18e945cd3
fix: incorrect z-index of text editor (#2914) 2021-02-04 14:54:00 +01:00