Releases: excalidraw/excalidraw
v0.11.0 (2022-02-17)
Excalidraw API
Features
-
Add
onLinkOpen
prop which will be triggered when clicked on element hyperlink if present #4694. -
Support updating library using
updateScene
API #4546. -
Introduced primary colors to the app. The colors can be overriden. Check readme on how to do so #4387.
-
exportToBlob
now automatically setsappState.exportBackground
totrue
if exporting toimage/jpeg
MIME type (to ensure that alpha channel is not compressed to black color) #4342.BREAKING CHANGE
Remove
getElementMap
util #4306. -
Changes to
exportToCanvas
util function #4321:- Add
maxWidthOrHeight?: number
attribute. scale
returned fromgetDimensions()
is now optional (default to1
).
- Add
-
Image support added for host PR
General notes:
- File data are encoded as DataURLs (base64) for portability reasons.
- added
getFiles()
to get currentBinaryFiles
(Record<FileId, BinaryFileData>
). It may contain files that aren't referenced by any element, so if you're persisting the files to a storage, you should compare them against stored elements.
Excalidraw app props:
- added
generateIdForFile(file: File)
optional prop so you can generate your own ids for added files. onChange(elements, appState, files)
prop callback is now passedBinaryFiles
as third argument.onPaste(data, event)
data prop should containdata.files
(BinaryFiles
) if the elements pasted are referencing new files.initialData
object now supports additionalfiles
(BinaryFiles
) attribute.
Other notes:
.excalidraw
files may now contain top-levelfiles
key in format ofRecord<FileId, BinaryFileData>
when exporting any (image) elements.- Changes were made to various export utilities exported from the package so that they take
files
, you can refer to the docs for the same.
-
Export
isLinearElement
andgetNonDeletedElements
#4072. -
Support
renderTopRightUI
in mobile UI #4065. -
Export
THEME
constant from the package so host can use this when passing the theme #4055.BREAKING CHANGE
The
Appearance
type is now removed and renamed toTheme
soTheme
type needs to be used.
Fixes
- Reset
unmounted
state on the component once component mounts to fix the mounting/unmounting repeatedly when used withuseEffect
#4682. - Panning the canvas using
mousewheel-drag
andspace-drag
now prevents the browser from scrolling the container/page #4489. - Scope drag and drop events to Excalidraw container to prevent overriding host application drag and drop events #4445.
Build
- Release preview package @excalidraw/excalidraw-preview when triggered via comment
@excalibot trigger release
-
Added an example to test and develop the package locally using
yarn start
#4488 -
Remove
file-loader
so font assets are not duplicated by webpack and use webpack asset modules for font generation #4380. -
We're now compiling to
es2017
target. Notably,async/await
is not compiled down to generators. #4341.
Excalidraw Library
This section lists the updates made to the excalidraw library and will not affect the integration.
Features
-
Show group/group and link action in mobile #4795
-
Support background fill for freedraw shapes #4610
-
Keep selected tool on canvas reset #4728
-
Make whole element clickable in view mode when it has hyperlink #4735
-
Allow any precision when zooming #4730
-
Throttle
pointermove
events per framerate #4727 -
Support hyperlinks 🔥 #4620
-
Added penMode for palm rejection #4657
-
Support unbinding bound text #4686
-
Sync local storage state across tabs when out of sync #4545
-
Support contextMenuLabel to be of function type to support dynmaic labels #4654
-
Support decreasing/increasing
fontSize
via keyboard #4553 -
Link to new LP for excalidraw plus #4549
-
Update stroke color of bounded text along with container #4541
-
Hints and shortcuts help around deep selection #4502
-
Support updating text properties by clicking on container #4499
-
Bind text to shapes when pressing enter and support sticky notes 🎉 #4343
-
Change
boundElementIds
→boundElements
#4404 -
Support selecting multiple points when editing line #4373
-
Horizontally center toolbar menu commit link
-
Add support for rounded corners in diamond #4369
-
Allow zooming up to 3000% #4358
-
Stop discarding precision when rendering #4357
-
Support Image binding #4347
-
Add
element.updated
#4070 -
Compress shareLink data when uploading to json server #4225
-
Supply
version
param when installing libraries #4305 -
Log FS abortError to console #4279
-
Add validation for website and remove validation for library item name #4269
-
Allow publishing libraries from UI #4115
-
Create confirm dialog to use instead of window.confirm #4256
-
Allow letters in IDs for storing files in backend #4224
-
Remove support for V1 unencrypted backend #4189
-
Use separate backend for local storage #4187
-
Add hint around canvas panning #4159
-
Stop using production services for development #4113
-
Add triangle arrowhead #4024
-
Add rewrite to webex landing page #4102
-
Switch collab server #4092
-
Use dialog component for clear canvas instead of window confirm #4075
Fixes
-
Rename --color-primary-chubb to --color-primary-contrast-offset and fallback to primary color if not present #4803
-
Add commits directly pushed to master in changelog #4798
-
Don't bump element version when adding files data [#4794](https://github.com/excalidraw/excalidraw/pull...
v0.10.0
Excalidraw API
Fixes
-
onPaste
prop should return false to prevent the native excalidraw paste action #3974.BREAKING CHANGE
- Earlier the paste action was prevented when the prop
onPaste
returned true, but now it should return false to prevent the paste action. This was done to make it semantically more correct and intuitive.
- Earlier the paste action was prevented when the prop
Build
- Enable jsx transform in webpack #4049
Docs
- Correct exportToBackend in README to onExportToBackend #3952
Excalidraw Library
This section lists the updates made to the excalidraw library and will not affect the integration.
Features
-
Improve freedraw shape #3984
-
Make color ARIA labels better #3871
-
Add origin trial tokens #3853
-
Re-order zoom buttons #3837
-
Add undo/redo buttons & tweak footer #3832
-
Resave to png/svg with metadata if you loaded your scene from a png/svg file #3645
Fixes
-
Abstract and fix legacy fs #4032
-
Context menu positioning #4025
-
Added alert for bad encryption key #3998
-
OnPaste should return false to prevent paste action #3974
-
Help-icon now visible on Safari #3939
-
Permanent zoom mode #3931
-
Undo/redo buttons gap in Safari #3836
-
Prevent gradual canvas misalignment #3833
-
Color picker shortcuts not working when elements selected #3817
v0.9.0 (2021-07-10)
Excalidraw API
Features
-
restore(data, localAppState, localElements)
andrestoreElements(elements, localElements)
now takelocalElements
argument which will be used to ensure existing elements' versions are used and incremented. This fixes an issue where importing the same file would resolve to elements with older versions, potentially causing issues when reconciling #3797.BREAKING CHANGE
localElements
argument is mandatory (can benull
/undefined
) if using TypeScript.
-
Support
appState.exportEmbedScene
attribute inexportToSvg
which allows to embed the scene data #3777.BREAKING CHANGE
- The attribute
metadata
is now removed asmetadata
was only used to embed scene data which is now supported with theappState.exportEmbedScene
attribute. exportToSvg
now resolves to a promise which resolves tosvg
of the exported drawing.
- The attribute
-
Expose
loadLibraryFromBlob
,loadFromBlob
, andgetFreeDrawSvgPath
#3764. -
Expose
FONT_FAMILY
so that consumer can use when passinginitialData.appState.currentItemFontFamily
#3710. -
Added prop
autoFocus
to focus the excalidraw component on page load when enabled, defaults to false #3691.Note: Earlier Excalidraw component was focussed by default on page load, you need to enable
autoFocus
prop to retain the same behaviour. -
Added prop
UIOptions.canvasActions.export.renderCustomUI
to support Custom UI rendering inside export dialog #3666. -
Added prop
UIOptions.canvasActions.saveAsImage
to show/hide the Save as image button in the canvas actions. Defauls totrue
hence the Save as Image button is rendered #3662. -
Export dialog can be customised with
UiOptions.canvasActions.export
#3658.Also,
UIOptions
is now memoized to avoid unnecessary rerenders.BREAKING CHANGE
UIOptions.canvasActions.saveAsScene
is now renamed toUiOptions.canvasActions.export.saveFileToDisk
. Defaults totrue
hence the save file to disk button is rendered inside the export dialog.exportToBackend
is now renamed toUIOptions.canvasActions.export.exportToBackend
. If this prop is not passed, the shareable-link button will not be rendered, same as before.
Fixes
- Use excalidraw Id in elements so every element has unique id #3696.
Refactor
-
BREAKING CHANGE
- Rename
UIOptions.canvasActions.saveScene
toUIOptions.canvasActions.saveToActiveFile
#3657. - Removed
shouldAddWatermark: boolean
attribute from options for export APIs #3639. - Removed
appState.shouldAddWatermark
so in case you were passingshouldAddWatermark
in initialData.AppState it will not work anymore.
- Rename
Excalidraw Library
This section lists the updates made to the excalidraw library and will not affect the integration.
Features
-
Switch to selection tool on library item insert #3773
-
Show active file name when saving to current file #3733
-
Add hint around text editing #3708
-
Change library icon to be more clear #3583
-
Pass current
theme
when installing libraries #3701 -
Update virgil font #3692
-
Support exporting json to excalidraw plus #3678
-
Save exportScale in AppState #3580
-
Add shortcuts for stroke and background color picker #3318
-
Exporting redesign #3613
-
Auto-position tooltip and suport overflowing container #3631
-
Auto release @excalidraw/excalidraw-next on every change #3614
-
Allow inner-drag-selecting with cmd/ctrl #3603
Fixes
-
view mode cursor adjustments #3809.
-
Pass next release to updatePackageVersion & replace ## unreleased with new version #3806
-
Include deleted elements when passing to restore #3802
-
Import React before using jsx #3804
-
Ensure
s
andg
shortcuts work on no selection #3800 -
Keep binding for attached arrows after changing text #3754
-
Deselect elements on viewMode toggle #3741
-
Allow pointer events for disable zen mode button #3743
-
Use rgba instead of shorthand alpha #3688
-
Color pickers not opening on mobile #3676
-
On contextMenu, use selected element regardless of z-index #3668
-
SelectedGroupIds not being stored in history #3630
-
Overscroll on touch devices #3663
-
Small UI issues around image export dialog #3642
-
Normalize linear element points on restore #3633
-
Disable pointer-events on footer-center container #3629
Refactor
Performance
- Improve arrow head sizing #3480