1
0
mirror of https://github.com/excalidraw/excalidraw.git synced 2024-11-02 03:25:53 +01:00
Commit Graph

1922 Commits

Author SHA1 Message Date
Thang Vu
a0899966ff
feat: enable drop event on the whole component (#3406)
Co-authored-by: Thang Vu <thang.huu.vu@mgm-tp.com>
2021-04-06 17:17:00 +02:00
Aakansha Doshi
c2b40dff92
docs: changelog tweaks and add Library updates for 0.6.0 (#3404)
* docs: changelog tweaks and Library updates for 0.6.0
* update readme_next to be same as readme
2021-04-06 00:38:14 +05:30
David Luzar
9733ecb3df
fix: popover positioning (#3399) 2021-04-05 17:26:37 +02:00
dependabot[bot]
189b721eed
chore(deps): bump @testing-library/jest-dom from 5.11.9 to 5.11.10 (#3393)
Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.11.9 to 5.11.10.
- [Release notes](https://github.com/testing-library/jest-dom/releases)
- [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/jest-dom/compare/v5.11.9...v5.11.10)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-05 20:47:02 +05:30
Aakansha Doshi
90fd4a95df
refactor: rename setCanvasOffsets to refresh and release @excalidraw/excalidraw v0.6.0 🎉 (#3398)
* docs: Release @excalidraw/excalidraw v0.6.0

* update

* fix

* Update src/packages/excalidraw/README.md

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

* rename setCanvasOffsets to refresh

* fix

* fix

* typo fix

Co-authored-by: David Luzar <luzar.david@gmail.com>
2021-04-04 22:05:02 +05:30
David Luzar
5d3e98fa04
chore: bump browser-fs-access to 0.16.2 (#3396) 2021-04-04 14:45:02 +02:00
David Luzar
422c25449f
fix: export dialog canvas positioning (#3397) 2021-04-04 14:41:22 +02:00
Thang Vu
67289ef4ce
feat: reopen library menu on import from file (#3383)
Co-authored-by: Thang Vu <thang.huu.vu@mgm-tp.com>
2021-04-04 14:06:10 +02:00
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>
2021-04-04 15:57:14 +05:30
Aakansha Doshi
c54a099010
feat: Calculate width/height of canvas based on container dimensions (".excalidraw" selector) & remove props width & height (#3379)
* Remove width/height from the ".excalidraw" container so it will sized automatically.
* updated all ref calculation to ".excalidraw" instead of parent since now ".excalidraw" will get resized
* Remove props width/height as its not needed anymore.
* Resize handler is also not needed anymore.
* Position absolute canvas due to #3379 (comment)

* move css to style and remove one extra rerendering

* factor out mock logic for test

* set height, width so as to avoid unnecessary updates of regression snap

* better mock

* better type checking and omit width,height from getDefaultAppState and also restore

* revert

* default to window dimensions in constructor

* update docs

* update

* update

* tweaks
2021-04-04 15:05:16 +05:30
dependabot[bot]
3b976613ba
chore(deps-dev): bump ts-loader in /src/packages/utils (#3388)
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 8.0.18 to 8.1.0.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v8.0.18...v8.1.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-04 09:12:34 +00:00
dependabot[bot]
bee59747d1
chore(deps-dev): bump ts-loader in /src/packages/excalidraw (#3385)
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 8.0.18 to 8.1.0.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v8.0.18...v8.1.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-04 09:11:09 +00:00
dependabot[bot]
2e1352f3fa
chore(deps-dev): bump @babel/core in /src/packages/utils (#3386)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.13.13 to 7.13.14.
- [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.14/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-04 14:39:06 +05:30
dependabot[bot]
6b65db7b68
chore(deps-dev): bump @babel/core in /src/packages/excalidraw (#3387)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.13.13 to 7.13.14.
- [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.14/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-04 14:38:14 +05:30
dependabot[bot]
e4c5ebf867
chore(deps-dev): bump webpack in /src/packages/excalidraw (#3389)
Bumps [webpack](https://github.com/webpack/webpack) from 5.28.0 to 5.30.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.28.0...v5.30.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-04 14:37:16 +05:30
dependabot[bot]
0602f3cfe4
chore(deps-dev): bump webpack in /src/packages/utils (#3390)
Bumps [webpack](https://github.com/webpack/webpack) from 5.28.0 to 5.30.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.28.0...v5.30.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-04 14:36:59 +05:30
dependabot[bot]
eade72b744
chore(deps): bump @types/jest from 26.0.21 to 26.0.22 (#3349)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.21 to 26.0.22.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-02 01:24:24 +03:00
dependabot[bot]
ef5c9002ad
chore(deps): bump react and react-dom (#3348)
Bumps [react](https://github.com/facebook/react/tree/HEAD/packages/react) and [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom). These dependencies needed to be updated together.

Updates `react` from 17.0.1 to 17.0.2
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v17.0.2/packages/react)

Updates `react-dom` from 17.0.1 to 17.0.2
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v17.0.2/packages/react-dom)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-02 01:24:04 +03:00
Excalidraw Bot
aa9e1c4566
chore: Update translations from Crowdin (#3371) 2021-04-01 18:47:48 +03:00
Aakansha Doshi
edc7f7bf47
feat: calculate offsets when excalidraw container resizes (#3374)
* feat: calculate offsets when excalidraw container resizes

* fix

* rename

* update docs

* Update src/packages/excalidraw/README_NEXT.md

Co-authored-by: David Luzar <luzar.david@gmail.com>
2021-04-01 21:10:11 +05:30
Aakansha Doshi
1310256dcc
fix: remove JSON.stringify when calculating storage as its not needed (#3373) 2021-04-01 11:19:31 +02:00
Hampus Lavin
4ac1841d92
test: Add unit tests for package/utils (#3357)
* Update return type to reflect actual signature

* add tests

* Set getDimensions as optional

* add newlines between specs

* remove redundant assertion

* move fixtures to separate files

* Add spacing

* Move tests, add cases

* Add unit tests for package/utils exportToSvg

* extract default object in test

* Move test suite to new file
2021-03-31 17:58:25 +05:30
Arun
bdf6e53289
fix: Add aria-label to end-to-end encryption blog link (#3367) 2021-03-31 17:02:54 +05:30
Aakansha Doshi
a6706cff20
feat: export types for package @excalidraw/excalidraw 🎉 (#3337)
* feat: export types for package @excalidraw/excalidraw

* update

* remove

* Add lib in tsconfig-types and Add global.d.ts, and errors down to 39 :)

* Add declaration for scss so typescript allows scss imports, errors down to 37 :)

* Add css.d.ts, errors down to 32 yay

* set target to es6, all errors resolved yay

* move types outside dist

* update docs

* fix
2021-03-30 23:51:55 +05:30
Excalidraw Bot
c739ac5c61
chore: Update translations from Crowdin (#3335)
* New translations en.json (Greek)

* Auto commit: Calculate translation coverage

* New translations en.json (Turkish)

* Auto commit: Calculate translation coverage

* New translations en.json (Swedish)

* Auto commit: Calculate translation coverage

* New translations en.json (Occitan)

* Auto commit: Calculate translation coverage

* New translations en.json (Finnish)

* Auto commit: Calculate translation coverage

* New translations en.json (Spanish)

* Auto commit: Calculate translation coverage

* New translations en.json (Slovak)

* Auto commit: Calculate translation coverage

* New translations en.json (Chinese Simplified)

* Auto commit: Calculate translation coverage

* New translations en.json (Chinese Simplified)

* New translations en.json (Ukrainian)

* Auto commit: Calculate translation coverage
2021-03-30 12:22:15 +03:00
Aakansha Doshi
0d818f3810
feat: Add renderCustomStats prop and expose setToastMessage API via refs to update toast (#3360)
* feat: Add renderCustomStats prop to render extra stats & move storage and version to renderCustomStats

* expose Api to update toast message so single instance of toast is used

* rename to setToastMessage

* update docs
2021-03-29 20:06:34 +05:30
dependabot[bot]
58a7568c9f
chore(deps): bump nanoid from 3.1.21 to 3.1.22 (#3350)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.21 to 3.1.22.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.1.21...3.1.22)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-29 17:09:44 +03:00
Lipis
722e5ca845
refactor: Use arrow function where possible (#3315) 2021-03-29 17:09:20 +03:00
harishcalvin
bb568a9670
chore: Remove duplicate Twitter og:image (#3359)
* removed-duplicate-twitter-ogtags

* put favicon back

* fix lint
2021-03-29 13:18:21 +05:30
Aakansha Doshi
0f5b0d1d1d
docs: revert README to last version and add README_NEXT with changes for next version (#3355) 2021-03-29 01:12:27 +05:30
Aakansha Doshi
25fd275158
fix: Don't share collab types with core (#3353)
* fix: Don't share collab types with core

* fix

* remove

* fix
2021-03-28 19:26:03 +05:30
Aakansha Doshi
3d047d57a7
build: Add separate dev and prod builds and add source-maps to dev build 🎉 (#3330)
* build: Add separate dev and prod builds and add sourcemaps to dev build

* update

* add

* update changelog
2021-03-28 13:48:26 +05:30
dependabot[bot]
26a6f9e76d
chore(deps-dev): bump webpack-cli in /src/packages/utils (#3342)
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 4.5.0 to 4.6.0.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@4.5.0...webpack-cli@4.6.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-28 08:13:04 +00:00
dependabot[bot]
1c11bb5b41
chore(deps-dev): bump @babel/preset-env in /src/packages/excalidraw (#3351)
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.13.10 to 7.13.12.
- [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.12/packages/babel-preset-env)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-28 13:42:20 +05:30
dependabot[bot]
aced1cc6f5
chore(deps-dev): bump css-loader in /src/packages/utils (#3341)
Bumps [css-loader](https://github.com/webpack-contrib/css-loader) from 5.1.3 to 5.2.0.
- [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.1.3...v5.2.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-28 08:11:35 +00:00
dependabot[bot]
f3f85b4c90
chore(deps-dev): bump @babel/preset-react in /src/packages/excalidraw (#3343)
Bumps [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) from 7.12.13 to 7.13.13.
- [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.13/packages/babel-preset-react)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-28 13:36:35 +05:30
dependabot[bot]
86781f09dd
chore(deps-dev): bump webpack in /src/packages/utils (#3344)
Bumps [webpack](https://github.com/webpack/webpack) from 5.27.1 to 5.28.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.27.1...v5.28.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-28 13:35:59 +05:30
dependabot[bot]
a94b44440e
chore(deps-dev): bump webpack in /src/packages/excalidraw (#3339)
Bumps [webpack](https://github.com/webpack/webpack) from 5.27.1 to 5.28.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.27.1...v5.28.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-28 13:35:28 +05:30
dependabot[bot]
77bf553ed8
chore(deps-dev): bump @babel/preset-env in /src/packages/utils (#3346)
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.13.10 to 7.13.12.
- [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.12/packages/babel-preset-env)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-28 13:34:56 +05:30
dependabot[bot]
fce7047199
chore(deps-dev): bump css-loader in /src/packages/excalidraw (#3352)
Bumps [css-loader](https://github.com/webpack-contrib/css-loader) from 5.1.3 to 5.2.0.
- [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.1.3...v5.2.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-28 13:34:22 +05:30
dependabot[bot]
9905deb4b4
chore(deps-dev): bump webpack-cli in /src/packages/excalidraw (#3338)
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 4.5.0 to 4.6.0.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@4.5.0...webpack-cli@4.6.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-28 13:08:57 +05:30
dependabot[bot]
fee84f3807
chore(deps-dev): bump mini-css-extract-plugin (#3340)
Bumps [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) from 1.3.9 to 1.4.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.3.9...v1.4.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-28 13:08:14 +05:30
dependabot[bot]
9020ab3761
chore(deps-dev): bump @babel/core in /src/packages/excalidraw (#3345)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.13.10 to 7.13.13.
- [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.13/packages/babel-core)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-28 13:07:31 +05:30
dependabot[bot]
136f8b2279
chore(deps-dev): bump @babel/core in /src/packages/utils (#3347)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.13.10 to 7.13.13.
- [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.13/packages/babel-core)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-28 13:06:56 +05:30
David Luzar
8670b2d587
fix: support d&d of files without extension (#3168) 2021-03-26 22:12:02 +01:00
David Luzar
b081a09962
fix: positions stats for linear elements (#3331) 2021-03-26 22:56:27 +02:00
Excalidraw Bot
10a23a10a5
chore: Update translations from Crowdin (#3313) 2021-03-26 22:54:57 +02:00
David Luzar
30ae4b8bf2
feat: don't unnecessarily prompt when installing libraries (#3329) 2021-03-26 18:32:38 +01:00
David Luzar
cf9e29834d
feat: prefer hash when importing libraries & expose importLibrary (#3320) 2021-03-26 18:10:43 +01:00
David Luzar
5d26c15daf
fix: debounce.flush invokes func even if never queued before (#3326)
* fix: `debounce.flush` invokes func even if never queued before

* reset after debounced invocation

* account for fn throwing
2021-03-26 17:12:32 +01:00