2034 Commits

Author SHA1 Message Date
Aakansha Doshi
da94eb1284
fix: use excalidraw asset path in fonts when exporting to svg ()
* fix: use excalidraw asset path in fonts when exporting

* fix

* fix

* introduce env variables and determine asset path correctly

* fix snaps

* use env vars to determine pkg name and version

* update docs

* quotes
2022-04-28 20:19:41 +05:30
Achille Lacoin
ea51251fe6
fix: propagate keydown events from excalidraw-wysiwyg inputs ()
* fix: allow propagation for keydown events originating from `excalidraw-wysiwyg`

* revert check on the handleKeyDown function
2022-04-27 20:28:41 +02:00
Aakansha Doshi
399ce1e01a
fix: don't bind text to container if double clicked else instead of center () 2022-04-27 17:04:21 +05:30
dependabot[bot]
7df8302ba2
chore(deps-dev): bump babel-loader in /src/packages/utils ()
Bumps [babel-loader](https://github.com/babel/babel-loader) from 8.2.3 to 8.2.5.
- [Release notes](https://github.com/babel/babel-loader/releases)
- [Changelog](https://github.com/babel/babel-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel-loader/compare/v8.2.3...v8.2.5)

---
updated-dependencies:
- dependency-name: babel-loader
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-27 10:03:17 +00:00
dependabot[bot]
af8c59b5bb
chore(deps): bump minimist in /src/packages/excalidraw ()
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-27 15:27:56 +05:30
dependabot[bot]
cf0f00285b
chore(deps): bump minimist from 1.2.5 to 1.2.6 in /src/packages/utils ()
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-27 15:27:43 +05:30
Achille Lacoin
af93cedc08
EXCALIDRAW_EXPORT_SOURCE_PATH -> EXCALIDRAW_EXPORT_SOURCE () 2022-04-27 10:49:02 +02:00
Achille Lacoin
b6a6f2d465
feat: Expose window.EXCALIDRAW_EXPORT_SOURCE which host can use to overwrite the source field in exports ()
* Expose `window.EXCALIDRAW_EXPORT_SOURCE` which host can use to overwrite the source field in exports

* Update src/packages/excalidraw/CHANGELOG.md

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

* address review comments

* Update src/packages/excalidraw/README_NEXT.md

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

* Update src/packages/excalidraw/README_NEXT.md

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

* EXCALIDRAW_EXPORT_SOURCE -> EXCALIDRAW_EXPORT_SOURCE_PATH

Co-authored-by: David Luzar <luzar.david@gmail.com>
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
2022-04-26 13:28:39 +02:00
dependabot[bot]
6bcbf8b50a
chore(deps): bump node-forge in /src/packages/excalidraw ()
Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.2.1 to 1.3.1.
- [Release notes](https://github.com/digitalbazaar/forge/releases)
- [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalbazaar/forge/compare/v1.2.1...v1.3.1)

---
updated-dependencies:
- dependency-name: node-forge
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-26 07:40:12 +00:00
dependabot[bot]
666516d7e9
chore(deps): bump async from 2.6.3 to 2.6.4 in /src/packages/excalidraw ()
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-26 07:32:29 +00:00
dependabot[bot]
b941c5b661
chore(deps-dev): bump webpack in /src/packages/excalidraw ()
Bumps [webpack](https://github.com/webpack/webpack) from 5.65.0 to 5.72.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.65.0...v5.72.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-26 13:01:35 +05:30
dependabot[bot]
aa2971e8c5
chore(deps-dev): bump autoprefixer in /src/packages/excalidraw ()
Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 10.4.2 to 10.4.5.
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/autoprefixer/compare/10.4.2...10.4.5)

---
updated-dependencies:
- dependency-name: autoprefixer
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-26 12:58:53 +05:30
David Luzar
e6a9ff1b96
fix: toolIcon height not using rem () 2022-04-24 19:21:41 +02:00
David Luzar
832b88249c
feat: stop event propagation when key handled ()
* feat: stop event propagation when key handled

* don't handle s/g shortcuts if cmd/ctrl/alt pressed
2022-04-24 18:29:38 +02:00
Aakansha Doshi
9902092fd1
fix setting webpack public path () 2022-04-23 13:48:57 +05:30
Achille Lacoin
8f0863d335
add a prefix to the extension for image embbedding sceneData () 2022-04-22 18:31:31 +02:00
David Luzar
9423ac3263
fix: Excalidraw named export type () 2022-04-22 15:49:36 +02:00
Aakansha Doshi
a66cfe2627
fix: boundElementIds when arrows bound to elements are deleted ()
* fix: boundElementIds when arrows bound to elements are deleted

* fix type checks and updating unrelated elements

Co-authored-by: dwelle <luzar.david@gmail.com>
2022-04-21 18:57:06 +05:30
Achille Lacoin
86cf28f2b4
fix: don't merge libraryItems on updateScene () 2022-04-21 10:54:02 +02:00
Achille Lacoin
b5a46dd671
fix: SVG metadata extraction regex on multiline elements ()
* Fix SVG metadata extraction regex on multiline elements

* remove multiline flag
2022-04-20 17:07:58 +02:00
David Luzar
cd942c3e3b
feat: rewrite library state management & related refactor ()
* support libraryItems promise for `updateScene()` and use `importLibrary`

* fix typing for `getLibraryItemsFromStorage()`

* remove `libraryItemsFromStorage` hack

if there was a point to it then I'm missing it, but this part will be rewritten anyway

* rewrite state handling

(temporarily removed loading states)

* add async support

* refactor and deduplicate library importing logic

* hide hints when library open

* fix snaps

* support promise in `initialData.libraryItems`

* add default to params instead
2022-04-20 14:40:03 +02:00
David Luzar
55ccd5b79b
feat: delay initial loading message & tweak design () 2022-04-19 19:08:13 +02:00
Excalidraw Bot
4348c55c31
chore: Update translations from Crowdin () 2022-04-18 00:16:43 +02:00
David Luzar
a3fbe40b26
fix: eraser cursor showing on theme change when not using eraser () 2022-04-17 22:47:36 +02:00
David Luzar
4d13dbf625
feat: reconcile when saving to firebase ()
* naming tweaks

* do not mark local element as duplicate when there's no remote counterpart

* merge instead of overwrite elements when saving to firebase & reconcile local state

* decouple syncing from persistence

* fix ts

* clarify doc

* fix reconciliation not removing duplicates
2022-04-17 22:40:39 +02:00
Achille Lacoin
3840e2f4e6
feat: embed scene support for png export in npm package ()
* feat: embed scene support for png export in npm package

* move logic to the callback function

* add exportEmbedScene checkbox in package example

* update readme and changelog

* add PR link in changelog

* reverse sort changelog items
2022-04-16 16:30:11 +02:00
Aakansha Doshi
52d10bb41e
feat: hide trash button during collaboration ()
* feat: hide trash button during collaboration

* visually hide the trash icon

* pointer events none

* tweak env docs

* fix typo

Co-authored-by: dwelle <luzar.david@gmail.com>
2022-04-15 09:21:41 -07:00
Aakansha Doshi
96c87f920a
build: export only named exports from the package ()
* build: export only named exports from the package

* update docs

* Update src/packages/excalidraw/CHANGELOG.md

* fix lint
2022-04-15 18:12:57 +05:30
zsviczian
7d4189c624
fix: Add image button not working on iPad () 2022-04-15 12:20:51 +02:00
David Luzar
f3e17c90d3
fix: ensure svg image dimensions are always set () 2022-04-15 12:05:10 +02:00
David Luzar
70b3a9de49
feat: library restoring changes ()
* restore library items in all cases & refactor

* export `restoreLibraryItems` from package

* feat: rerender library menu when updating via API

* update readme & changelog

* fix changelog
2022-04-14 16:20:35 +02:00
zsviczian
bf6d0eeef7
fix: Pinch zoom in view mode () 2022-04-12 12:39:28 +02:00
David Luzar
5359e4fec9
feat: refactor local persistence & fix race condition on SW reload () 2022-04-11 22:15:49 +02:00
David Luzar
58fe639b8d
fix: select whole group on righclick & few lock-related fixes () 2022-04-07 17:53:55 +02:00
Tom Sherman
327ed0e2d1
feat: Element locking ()
Co-authored-by: dwelle <luzar.david@gmail.com>
Co-authored-by: Zsolt Viczian <viczian.zsolt@gmail.com>
2022-04-07 13:43:29 +02:00
Achille Lacoin
c2fce6d8c4
fix: export serializeLibraryAsJSON from the package () 2022-04-07 12:35:44 +05:30
David Luzar
cb6b7559b4
fix: support copying PNG to clipboard on Safari () 2022-04-06 14:05:09 +02:00
David Luzar
77d789ed8e
fix: more copyText fixes () 2022-04-05 23:11:00 +02:00
Faustino Kialungila
89471094ce
fix: Copy to clipboard all text nodes as text ()
* fix: Copy to clipboard all text nodes as text

* fix: support copying text even if there are selected elements that are no text

* patch: makes paragraphs betwen texts of each element

* patch: allow copying text for bound text
2022-04-05 21:48:59 +02:00
Faustino Kialungila
670ceafc84
feat: Copy to clipboard all text nodes as text ()
* Copy to clipboard all text nodes as text

* fix: only show the option for text elements
2022-04-05 15:31:19 +02:00
Achille Lacoin
873afdacd3
feat: create and expose serializeLibraryAsJSON ()
Co-authored-by: David Luzar <luzar.david@gmail.com>
2022-04-05 14:35:38 +02:00
Valerii Gusev
880e4feede
fix: update cursorButton once freedraw is released ()
Co-authored-by: dwelle <luzar.david@gmail.com>
2022-04-01 18:25:21 +02:00
David Luzar
9ba7ca3845
feat: hide penMode button on reload if not enabled () 2022-03-30 10:53:22 +02:00
zsviczian
734bb4d2ed
fix: decouple actionFinalize and actionErase ()
* Update actionCanvas.tsx

* Update actionFinalize.tsx

* lint

* remove Escape trigger from actionErase

* revert to lastActiveTool only if coming from eraser tool

* unrelated: fix restoring `appState.activeTool`

* one more restoring fix

* fix tests

Co-authored-by: dwelle <luzar.david@gmail.com>
2022-03-29 21:37:09 +02:00
David Luzar
f2d2f97546
fix: using stale state when switching tools () 2022-03-29 17:00:19 +02:00
Aakansha Doshi
2fa69ddc32
refactor: move elementLocked to activeTool.locked ()
* refactor: move elementLocked to activeTool.locked

* fix

* fix snap

* update docs

* Update src/packages/excalidraw/CHANGELOG.md

* revert

* make lastActiveToolBeforeEraser required and nullable

* fix snap
2022-03-29 17:10:19 +05:30
zsviczian
1331cffe93
feat: Eraser toggle to switch back to the previous tool ()
* add typeBeforeEraser

* ESC to switch to lastActiveToolBeforeEraser
2022-03-28 21:33:32 +02:00
David Luzar
f242721f3b
chore: add ga for most actions () 2022-03-28 14:46:40 +02:00
zsviczian
e940aeb1a3
fix: updateWysiwygStyle updatedElement is undefined TypeError ()
Co-authored-by: dwelle <luzar.david@gmail.com>
2022-03-28 00:14:04 +02:00
connorhanafee
580e719580
fix: adding check for link length to prevent early return ()
Co-authored-by: Connor Hanafee <connorp@Connors-MacBook-Pro.local>
Co-authored-by: dwelle <luzar.david@gmail.com>
2022-03-27 23:50:41 +02:00