Commit Graph

52 Commits (104664cb9eda69df696fee458801fd460a3f75a9)

Author SHA1 Message Date
David Luzar cc4b0c2932
feat: supply `version` param when installing libraries (#4305) 3 years ago
David Luzar 6143d5195a
refactor: deduplicate encryption helpers (#4146) 3 years ago
David Luzar 163ad1f4c4
feat: image support (#4011)
Co-authored-by: Emil Atanasov <heitara@gmail.com>
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
3 years ago
Aakansha Doshi 463857ad9a
feat: Export THEME from the package (#4055)
* Use Theme type everywhere
* Rename Appearance type to Theme for consistency
* Reorder headers in readme
The host don't need to pass hardcoded strings any more and instead can use the exported constant
3 years ago
David Luzar 54739cd2df
fix: abstract and fix legacy fs (#4032) 3 years ago
connorhanafee 5fabc57277
fix: view mode cursor adjustments (#3809) 4 years ago
Aakansha Doshi 6dee02e320
feat: expose fontfamily and refactor FONT_FAMILY (#3710)
* feat: expose fontfamily and refactor FONT_FAMILY for better readability

* fix

* fix

* fix

* docs

* fix
4 years ago
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>
4 years ago
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
4 years ago
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>
4 years ago
Aakansha Doshi bc0b6e1888
refactor: rename UIOptions.canvasActions.saveScene to UIOptions.canvasActions.saveToActiveFile (#3657)
* refactor rename action saveScene to saveFileToDisk

* docs

* fix

* fix
4 years ago
Preet 07839f8d20
perf: Reduce SVG export size by more than half by reducing precision to 2 decimal places (#3567)
* render svg with a specified precision

* moved precision to a constant

* fix test case  to use rounded values
4 years ago
David Luzar a7cbe68ae8
refactor: improve types around dataState and libraryData (#3427) 4 years ago
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>
4 years ago
David Luzar 09dfd16b17
feat: use component dimensions to break to mobile (#3414)
Co-authored-by: Jed Fox <git@jedfox.com>
4 years ago
Arun 233576628c
feat: Support customising canvas actions 🎉 (#3364)
* feat: Support hiding save, save as, clear & export

* Remove canvasActions from state & minor changes

* Rename prop to UIOptions & pass default value

* Make requested changes

* better type checking so that optional check not needed at every point

* remove optional checks

* Add few tests

* Add describe block for canvasActions & use snapshot tests

* Add support for hiding canvas background picker

* Take snapshot of canvasActions instead of the whole app

* Add support for hiding dark mode toggle

* Update README.md

* Rename table heading

* Update changelog

* Make requested changes

* Update test name

* tweaks

Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
4 years ago
David Luzar cf9e29834d
feat: prefer hash when importing libraries & expose importLibrary (#3320) 4 years ago
David Luzar 94ad8eaa19
feat: support pasting file contents & always prefer system clip (#3257) 4 years ago
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
4 years ago
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>
4 years ago
Arun 4e421e6e9e
feat: Support exporting with dark mode (#3046)
Co-authored-by: Lipis <lipiridis@gmail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
David Luzar e6cd97c4f2
feat: adjust line-confirm-threshold based on zoom (#2884)
Co-authored-by: Lipis <lipiridis@gmail.com>
4 years ago
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
4 years ago
Aakansha Doshi b5fc8757a4
fix: allow to toggle between modes when view only mode to make UI consistent (#3009) 4 years ago
Thomas Steiner 1837147c55
feat: Add idle detection to collaboration feature (#2877)
* Start idle detection implementation

* First working version

* Add screen state

* Add type safety

* Better rendering, enum types, localization

* Add origin trial token

* Fix

* Refactor idle detection to no longer use IdleDetector API

* Cleanup some leftovers

* Fix

* Apply suggestions from code review

* Three state: active 🟢, idle 💤, away ️

* Address feedback from code review
Thanks, @lipis

* Deal with unmount

Co-authored-by: Panayiotis Lipiridis <lipiridis@gmail.com>
4 years ago
David Luzar 10cd6a24b0
feat: increase max zoom (#2881) 4 years ago
Lipis b1c8c538ee
fix: Change the timeout for reporting the version to 30s (#2858) 4 years ago
Lipis c799b28a0e
fix: Count all versions (#2798) 4 years ago
Arun 543c624405
feat: Add toast (#2772)
Co-authored-by: Lipis <lipiridis@gmail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
Lipis 001880ba88
feat: Track current version (#2731) 4 years ago
Lipis 6adb45ef5a
feat: Change title to Excalidraw after a timeout (#2656)
* feat: Change title to Excalidraw after a timeout

* clear timeout
4 years ago
Aakansha Doshi e617ccc252
Factor out collaboration code (#2313)
Co-authored-by: Lipis <lipiridis@gmail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
David Luzar ba3f548b91
Fix library dnd (#2314) 4 years ago
David Luzar 5950fa9a40
support embedding scene data to PNG/SVG (#2219)
Co-authored-by: Lipis <lipiridis@gmail.com>
4 years ago
João Forja e7d186b439
Fix drag multiple elements bug (#2023)
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Herb Caudill 29f803e25d
Fix display of some emoji on Windows (#1933) 5 years ago
David Luzar 7ab0c1aba8
reload scene on hashchange (#1893)
* reload scene on hashchange

* tweak isLoading
5 years ago
David Luzar d5e7d08586
prompt when loading external scene before overriding local one (#1862) 5 years ago
David Luzar cd87bd6901
do not center text when not applicable (#1783) 5 years ago
Daishi Kato baa8fb6c14
grid support (1st iteration) (#1788)
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Steven Nguyen fd75b88bd3
Double finger zoom should not select things (#1333) 5 years ago
Aakansha Doshi 17e9cc4506
Some cleanup in App.tsx (#1681) 5 years ago
David Luzar 63c10743fb
split font into fontSize and fontFamily (#1635) 5 years ago
Daishi Kato 51608c07b0
15-degree rotation locking (#1627) 5 years ago
Thomas Steiner ad81033a78
Prompt for reload when new service worker is available (#1588) 5 years ago
David Luzar 6771b505ad
rewrite wysiwyg property updating (#1387)
* rewrite wysiwyg property updating

* reuse existing class

* fix case of focus being stolen by other UIs

* revert mistake csp removal

* ensure we don't run cleanup twice

* fix opacity updating

* add shape actions menu class to constants
5 years ago
Aakansha Doshi 227ff60909
refactor(app.tsx): move Portal to new file and some refactoring (#1398) 5 years ago
Aakansha Doshi e98fba38be
refactor(app.tsx): use constants instead of hard coded strings for better readablility (#1391)
don't use inline function as it will create a new refrence everytime
5 years ago
Preet 57bbc9fe55
Fill a looped curve with the selected background color (#1315) 5 years ago
José Quinto 030954badb
shift locking 22.5 degree and move to constants (#1216)
* shift locking 22.5 degree and move to constants #1171

* review SHIFT_LOCKING_ANGLE
5 years ago