v2.1.0
This release includes completely redesigned sticky notes, an overhaul to our migration system, and significant performance improvements.
What's new
New stickies (#3249)
Sticky notes have been completely redesigned with a fresh look and improved functionality.
💥 New migrations (#3220)
The migrations system has been overhauled for better reliability and developer experience.
- The
Migrationstype is now calledLegacyMigrations - The serialized schema format (returned by
StoreSchema.serialize()andStore.getSnapshot()) has changed compareRecordVersionsandRecordVersionhave been removedcompareSchemasis gone—useschema.getMigrationsSince(prevSchema)insteaddefineMigrationshas been deprecated. See updating legacy shape migrations for upgrade instructionsmigratehas been removed
💥 Input buffering (#3223)
Events are now buffered and sent to state nodes every tick, instead of immediately. This unlocks big performance improvements but could introduce subtle issues with custom tools—make sure to test any custom tools thoroughly.
💥 React-powered SVG exports (#3117)
If any of your shapes implement toSvg for exports, you'll need to replace your implementation with a new version that returns JSX instead of manually constructing SVG DOM nodes.
editor.getSvg is deprecated. Use editor.getSvgElement or editor.getSvgString instead.
💥 Component-based toolbar customization (#3067)
If you're using the toolbar callback to override toolbar items, switch to using the new Toolbar component override. See the toolbar groups example for details.
API changes
- 💥
getRenderingShapesno longer returnsisCulled—usegetCulledShapesinstead. - Add
Editor.getStyleForNextShape. (#3039) - Add
usePreloadAssetsexport. (#3545)
Improvements
- Improve color contrast. (#3486)
- Add long press event. (#3275)
- Add severity colors and icons to toasts. (#2988)
- Improve handling of broken images/videos. (#2990)
- Improve performance of draw shapes. (#3464)
- Use WebGL to draw the minimap. (#3510)
- Improve reactivity bookkeeping performance. (#3471) (#3487)
- Improve selection/erasing performance. (#3454)
- Improve performance of text shapes on iOS/Safari. (#3429)
- Reduce rendered DOM nodes for geo shapes and arrows. (#3283)
- Improve shape rendering performance. (#3176)
Bug fixes
- Fix copy error sound in Safari. (#3536)
- Fix arrow label positioning overlapping bound shapes. (#3512)
- Fix cursor chat button appearing when not in select tool. (#3485)
- Fix alt-duplicating shapes sometimes not working. (#3488)
- Fix camera sliding after pinch. (#3462)
- Fix text shapes overflowing their bounds when resized. (#3327)
- Fix incorrectly rotated handles on rotated cropping images. (#3093)
- Fix videos not being sized correctly. (#3047)
- Fix
localStoragecrash in React Native webviews. (#3043)
Patch releases
v2.1.1
- Fix missing export for
createShapePropsMigrationIds, part of the new migrations API. (#3594) - Add exports for
defaultEditorAssetUrls,PORTRAIT_BREAKPOINT,useDefaultColorTheme, andgetPerfectDashProps. (#3594)
v2.1.2
- Revert a performance optimization that caused computed caches to sometimes not invalidate correctly, leading to stale data and crashes. (#3611)
v2.1.3
- Expose migrations, validators, and versions from tlschema. (#3613)
- Add
defaultShapeSchemaswhich can be passed directly tocreateTLSchema. (#3613)