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
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
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
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
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
Lipis
722e5ca845
refactor: Use arrow function where possible ( #3315 )
2021-03-29 17:09:20 +03:00
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
Riley Schnee
b0d7ff290f
feat: Add option to flip single element on the context menu ( #2520 )
...
Co-authored-by: dwelle <luzar.david@gmail.com>
2021-03-26 16:45:08 +01:00
David Luzar
458e6d6c24
fix: state selection state on opening contextMenu ( #3333 )
2021-03-26 16:41:57 +01:00