v2.3.0
版本发布时间: 2024-06-25 21:28:01
tldraw/tldraw最新发布版本:v3.0.3(2024-09-17 20:52:54)
The headlines
- 🖼️ Images/video storage improvements/hooks
- ⛲️ Font/Icons CDN
- 🗜️ Images network/performance improvements/hooks (dogfooding currently, public release soon)
- 🪗 Flattening
- 📚Documentation improvements
- 🔐 Security improvements
🖼️ Images/video storage improvements/hooks
When using a local-only storage of the whiteboard, we now store the images and videos in a separate indexedDB table. This is instead of storing them as base64-encoded blobs in the room's JSON. That wasn't very performant and blew up the size of the room's JSON quite a bit. This separates out those assets into a separate retrieval mechanism for better separation-of-concerns.
⛲️ Font/Icons CDN
We improved our out-of-the-box/batteries-included CDN for our assets (fonts/icons). We were using unpkg before but now we're just using Cloudflare directly for more fine-grained control.
🗜️ Images network/performance improvements/hooks (dogfooding currently, public release soon)
We've been working on something we call 'level-of-detail' internally for images. We're testing this currently on tldraw.com where for higher-resolution images (over a couple megabytes), the image will get transformed to an appropriate size depending on things like your viewport, zoom level, current network speed, among other considerations. This helps with bandwidth usage and browser memory usage especially when you have multiple high-res images on the board.
🪗 Flattening
@steveruizok worked on adding being able to select multiple shapes and flatten them into an image. For those moments when you need to press 🙏, clamp 🗜️, and squeeze things together. 🪗
📚 Documentation improvements
@SomeHats did a ton of unglorious work to make our documentation much more manageable. So sparkly ✨
🔐 Security improvements
We locked down our referrer network requests in #3884 and #3881 to make sure we weren't leaking tldraw rooms to external media/iframe requests.
🚀 Features
-
Styling: Secretly adds a fill-fill style (
Alt
-F
) #3966 (@steveruizok) - Flattening: Add Flatten, a new menu item to flatten shapes into images #3933 (@steveruizok)
- Images/videos: make option to transform urls dynamically to provide different sized images on demand. (only internal API for now) #3827 (@mimecuvalo)
- Images/videos: store as reference to blob in indexedDB instead of storing directly as base64 in the snapshot. #3836 (@mimecuvalo)
- Font/Icons CDN: Start using our own cdn instead of unpkg. #3923 (@MitjaBezensek)
-
API Change: Make
ArrowBindingUtil
public. #3913 (@ds300)
🔐 Security
- Security: enforce use of our fetch function and its default
referrerpolicy
#3884 (@mimecuvalo)
💄 Improvements
- Theme: Allow users to use system's appearance (dark / light) mode. #3703 (@MitjaBezensek)
-
Font/Icons CDN: improve font loading timing on
tldraw.com
. #3927 (@mimecuvalo) (@steveruizok) -
API Change:
getSnapshot
andloadSnapshot
onEditor
class #3912 (@ds300) - Document name: Remove ability to rename document while in readonly mode #3911 (@Taha-Hassan-Git)
- Viewport: Add a delay and easing to edge scrolling. #3950 (@steveruizok)
🐛 Bug Fixes
- Images/videos: follow-up fixes for Level-of-detail #3934 (@mimecuvalo)
- Images/videos: avoid double request for animated images. #3924 (@mimecuvalo)
- Images/videos: don't transform SVGs #3972 (@mimecuvalo)
- Images/videos: don't resize images that are culled #3970 (@mimecuvalo)
- Images/videos: use correct id for asset #3968 (@mimecuvalo)
-
Images/videos: fix
isAnimated
checks when adding an image to a shared room. #3967 (@mimecuvalo) - Images/videos: fix copy/paste for new asset resolver mechanic. #3959 (@mimecuvalo)
-
Images/videos: fix up videos with
indexedDB
#3954 (@mimecuvalo) - Images/videos: fix up missing timeout from bad merge #3964 (@mimecuvalo)
- Font/Icons CDN: add crossorigin tag for preloaded fonts #3953 (@mimecuvalo)
- Font/Icons CDN: Retrigger canary packaging. #3944 (@MitjaBezensek)
- Font/Icons CDN: Retrigger canary package build to publish a new package and upload assets to R2. #3943 (@MitjaBezensek)
- Font/Icons CDN: Retrigger canary package build to publish a new package and upload assets to R2. #3942 (@MitjaBezensek)
- Font/Icons CDN: Fix an issue with uploading the static assets. #3941 (@MitjaBezensek)
- Font/Icons CDN: Upload our static assets (fonts, icons, embed-icons, translations) to a R2 bucket so that we can move away from using unpkg and start using our own cdn. #3921 (@MitjaBezensek)
- Fix copy/paste for older versions of Firefox #4008 (@mimecuvalo)
- Fix copy/paste in Firefox 127+ #4003 (@mimecuvalo)
- Fix not allowing editing locked shapes when edit→edit mode. #4007 (@mimecuvalo)
- Fix a bug causing text shape measurement to work incorrectly when using react strict mode #4001 (@SomeHats)
- Fix typo on
CardShapeUtil
name in the custom shape example documentation. #3998 (@bholmesdev) - Fix border color for following user. #3975 (@ds300)
- Fix scale issue with new draw lines #3971 (@steveruizok)
- Fix edge scrolling at odd browser zoom levels. #3973 (@ds300)
- Fix the appearance of solid-style heart shapes. #3963 (@steveruizok)
- Fix the position of multiple assets when pasted / dropped onto the canvas. #3965 (@steveruizok)
- Fix a bug with the indicator for stylus-drawn draw shapes. #3962 (@steveruizok)
- Fix bookmark padding #3955 (@mimecuvalo)
- Rename
color-scheme
totheme
#3991 (@mimecuvalo)
📚 Documentation
- Generated docs cleanup #3935 (@SomeHats)
- Inline documentation links in type excerpts #3931 (@SomeHats)
- Better generated docs for react components #3930 (@SomeHats)
- Assets: mark assetOptions as
@internal
#4014 (@mimecuvalo) - Fix the license in the readme file for the
store
package. #3990 (@MitjaBezensek) - Better auto-generated docs for Tldraw and TldrawEditor #4012 (@SomeHats)
- Document inherited members in reference #3956 (@SomeHats)
- Improve filtering of examples #3929 (@Taha-Hassan-Git)
🛠️ VS Code
- VS Code 2.0.36 release. #3922 (@MitjaBezensek)
- Fix VS Code publishing. #3976 (@MitjaBezensek)
- Automate publishing of the VS Code extension. #3905 (@MitjaBezensek)
- Introduce a new CI environment and use it for publishing vs code extension. #3981 (@MitjaBezensek)
Authors: 7
- alex (@SomeHats)
- Ben Holmes (@bholmesdev)
- David Sheldrick (@ds300)
- Mime Čuvalo (@mimecuvalo)
- Mitja Bezenšek (@MitjaBezensek)
- Steve Ruiz (@steveruizok)
- Taha (@Taha-Hassan-Git)