Commit Graph

2097 Commits

Author SHA1 Message Date
David Luzar 11b8cc2caa
fix: remove `draw` element from codebase (#3559) 2021-05-10 11:01:10 +02:00
David Luzar 6bebfe63be
fix: handle render errors (#3557) 2021-05-09 21:43:36 +02:00
David Luzar 91ab7f36e2
fix: restore on paste or lib import (#3558) 2021-05-09 21:42:12 +02:00
dwelle 5ee8e8249c log instead of throw on unimplemented render type 2021-05-09 17:47:52 +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
Excalidraw Bot 18cdafbcbe
chore: Update translations from Crowdin (#3472)
Co-authored-by: dwelle <luzar.david@gmail.com>
2021-05-06 22:13:35 +02:00
David Luzar 286e9a1524
feat: add temporary Excalidraw+ promo (#3540)
* feat: add temporary Excalidraw+ promo

* add seemingly required query params
2021-05-06 21:29:05 +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
Luca Colonnello f28f7ffb6e
fix: improve mobile user experience (#3508) 2021-04-27 12:46:30 +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 81108bf580
fix: prevent selecting `.visually-hidden` elements (#3501) 2021-04-26 00:03:53 +02:00
Aakansha Doshi 23030a15f2
docs: release @excalidraw/excalidraw 0.7.0 🎉 (#3497)
* docs: release version 0.7.0

* update

* fix

* fix

* fix

* fix

* fix

* fix

* version bump

* fix readme

* tweaks

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

* update link

Co-authored-by: David Luzar <luzar.david@gmail.com>
2021-04-25 19:02:06 +05:30
David Luzar 4ef7cb7365
feat: bump element version on z-index change (#3483)
* feat: bump element version on z-index change

* update snaps

* update changelog
2021-04-25 14:09:38 +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
dependabot[bot] 004d3180b5
chore(deps-dev): bump webpack in /src/packages/utils (#3491)
Bumps [webpack](https://github.com/webpack/webpack) from 5.33.2 to 5.35.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.33.2...v5.35.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-25 12:59:13 +05:30
dependabot[bot] c12119278a
chore(deps-dev): bump webpack in /src/packages/excalidraw (#3492)
Bumps [webpack](https://github.com/webpack/webpack) from 5.34.0 to 5.35.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.34.0...v5.35.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-25 12:58:51 +05:30
dependabot[bot] 4d628844de
chore(deps-dev): bump css-loader in /src/packages/utils (#3489)
Bumps [css-loader](https://github.com/webpack-contrib/css-loader) from 5.2.2 to 5.2.4.
- [Release notes](https://github.com/webpack-contrib/css-loader/releases)
- [Changelog](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/css-loader/compare/v5.2.2...v5.2.4)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-25 12:58:02 +05:30
dependabot[bot] 946a209927
chore(deps-dev): bump @babel/core in /src/packages/excalidraw (#3487)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.13.15 to 7.13.16.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.13.16/packages/babel-core)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-25 12:57:11 +05:30
dependabot[bot] 811437724b
chore(deps-dev): bump css-loader in /src/packages/excalidraw (#3486)
Bumps [css-loader](https://github.com/webpack-contrib/css-loader) from 5.2.3 to 5.2.4.
- [Release notes](https://github.com/webpack-contrib/css-loader/releases)
- [Changelog](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/css-loader/compare/v5.2.3...v5.2.4)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-25 12:56:40 +05:30
dependabot[bot] 9dcde502aa
chore(deps-dev): bump @babel/core in /src/packages/utils (#3493)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.13.15 to 7.13.16.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.13.16/packages/babel-core)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-25 12:56:18 +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 354976e08e
build: Add vendor prefixes to css rules (#3476)
* build: Add vendor prefixes to css files

* changelog

* fix
2021-04-23 11:31:38 +05:30
David Luzar 5c73c5813c
chore: fix CHANGELOG links 2021-04-21 23:40:51 +02:00
David Luzar 3a0b6fb41b
refactor: move getSyncableElements to CollabWrapper & expose isInvisiblySmallElement helper (#3471)
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
2021-04-21 23:37:44 +02:00
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
Aakansha Doshi 46624cc953
docs: update local installation instructions in readme (#3452)
* docs: tweak readme

* remove editors

* Update README.md

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

* Update README.md

Co-authored-by: Lipis <lipiridis@gmail.com>
Co-authored-by: David Luzar <luzar.david@gmail.com>
2021-04-21 14:52:38 +05:30
dependabot[bot] 0d23c8dd76
chore(deps): bump sass from 1.32.8 to 1.32.10 (#3460)
Bumps [sass](https://github.com/sass/dart-sass) from 1.32.8 to 1.32.10.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.32.8...1.32.10)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-21 00:32:37 +03:00
Excalidraw Bot 51ef4cd97b
chore: Update translations from Crowdin (#3377) 2021-04-20 23:48:57 +03:00
dependabot[bot] b558d19d37
chore(deps-dev): bump eslint-config-prettier from 8.1.0 to 8.2.0 (#3461)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.1.0 to 8.2.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.1.0...v8.2.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-20 23:48:30 +03:00
dependabot[bot] b8fb6580ef
chore(deps-dev): bump @babel/plugin-transform-runtime (#3434)
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.13.10 to 7.13.15.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.13.15/packages/babel-plugin-transform-runtime)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-20 15:55:13 +05:30
David Luzar 6730eb41c2
fix: scrollToContent only on visible elements (#3466) 2021-04-19 17:29:13 +02:00
dependabot[bot] 87c42cb327
chore(deps-dev): bump webpack in /src/packages/excalidraw (#3469)
Bumps [webpack](https://github.com/webpack/webpack) from 5.31.2 to 5.34.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.31.2...v5.34.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-19 15:15:46 +00:00
dependabot[bot] 8cfd05aa95
chore(deps-dev): bump css-loader in /src/packages/excalidraw (#3470)
Bumps [css-loader](https://github.com/webpack-contrib/css-loader) from 5.2.1 to 5.2.3.
- [Release notes](https://github.com/webpack-contrib/css-loader/releases)
- [Changelog](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/css-loader/compare/v5.2.1...v5.2.3)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-19 15:14:24 +00:00
dependabot[bot] 3ed8271344
chore(deps-dev): bump webpack-bundle-analyzer in /src/packages/utils (#3458)
Bumps [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer) from 4.4.0 to 4.4.1.
- [Release notes](https://github.com/webpack-contrib/webpack-bundle-analyzer/releases)
- [Changelog](https://github.com/webpack-contrib/webpack-bundle-analyzer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/webpack-bundle-analyzer/compare/v4.4.0...v4.4.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-19 20:41:14 +05:30
dependabot[bot] 73515b5a83
chore(deps-dev): bump webpack-bundle-analyzer (#3455)
Bumps [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer) from 4.4.0 to 4.4.1.
- [Release notes](https://github.com/webpack-contrib/webpack-bundle-analyzer/releases)
- [Changelog](https://github.com/webpack-contrib/webpack-bundle-analyzer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/webpack-bundle-analyzer/compare/v4.4.0...v4.4.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-19 20:40:27 +05:30
dependabot[bot] 63d3da9a54
chore(deps-dev): bump mini-css-extract-plugin (#3456)
Bumps [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) from 1.4.1 to 1.5.0.
- [Release notes](https://github.com/webpack-contrib/mini-css-extract-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/mini-css-extract-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.4.1...v1.5.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-19 20:39:53 +05:30
dependabot[bot] 215fb5e357
chore(deps-dev): bump css-loader in /src/packages/utils (#3457)
Bumps [css-loader](https://github.com/webpack-contrib/css-loader) from 5.2.1 to 5.2.2.
- [Release notes](https://github.com/webpack-contrib/css-loader/releases)
- [Changelog](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/css-loader/compare/v5.2.1...v5.2.2)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-19 20:39:18 +05:30
dependabot[bot] 886177816b
chore(deps-dev): bump webpack in /src/packages/utils (#3459)
Bumps [webpack](https://github.com/webpack/webpack) from 5.31.2 to 5.33.2.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.31.2...v5.33.2)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-19 20:35:56 +05:30
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
Clément Lafont e0a449aa40
feat: support tab in text Wyswig (#3411)
* fix: support tab in text Wyswig

* Refactor tab handling

Tab now indent the whole line, instead of inserting at the cursor
position.

Shift+Tab now deindent the whole line.

* Add multi-line tabulation support

* rename

* simplify algo for selected lines start indices & naming tweaks

* add cmd-bracket shortcuts as alias to indent/outdent

* support outdenting partial tabs

Co-authored-by: dwelle <luzar.david@gmail.com>
2021-04-13 16:23:46 +02:00
Aakansha Doshi d5a270f643
fix: tweak readme for syncable elements (#3444)
* fix: tweak readme for syncable elements

* fix

* tweak

Co-authored-by: David Luzar <luzar.david@gmail.com>
2021-04-13 15:04:02 +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 2c8ec6be8e.

* 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
dependabot[bot] 153ca6a7c6
chore(deps-dev): bump typescript in /src/packages/excalidraw (#3438)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.2.3 to 4.2.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.2.3...v4.2.4)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-12 19:06:44 +00:00
dependabot[bot] 2618ac9f6e
chore(deps-dev): bump @babel/core in /src/packages/utils (#3432)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.13.14 to 7.13.15.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.13.15/packages/babel-core)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-12 19:05:54 +00:00