Next release

So far this release adds a ThrottledFunction type to @tldraw/utils, thins the hinted shape outline, and fixes bugs in resizing, page duplication, local persistence, the store, and sync.

API changes

  • Add a ThrottledFunction<T> type to @tldraw/utils for annotating the result of throttle. throttle now returns this type, with the same runtime behavior. (#10927)

Improvements

  • Draw the hinted outline around shapes, such as a frame you're dragging a shape into, at 2px instead of 2.5px. (#10952)
  • Speed up store.query.index() and store.query.ids() updates by no longer allocating for each change. (#10228)

Bug fixes

  • Fix three resize issues: flipping a rotated selection gave its children the wrong rotation, shapes not aligned with the selection received onResizeStart and onResizeEnd more than once, and resizeBox slid the fixed edge when a shape hit its maxWidth or maxHeight. (#10351)
  • Fix duplicating a page moving its shapes when they were off screen, and starting the new page with the current page's camera instead of the duplicated page's. (#10465)
  • Fix the arrow tool's precise mode carrying over when you move to a different target shape. (#10244)
  • Fix holding Cmd/Ctrl+Shift+Arrow switching from selecting a parent or child to selecting the adjacent shape once the key starts repeating. (#10184)
  • Fix editor.setCursor throwing for the rotate and resize cursor types, and hex cursor colors breaking SVG cursors. (#10350)
  • Fix edits being lost when an editor remounts with the same persistenceKey while the previous one is still saving. (#10752)
  • Fix store changes made in the last frame before a listener is removed never reaching that listener. (#10802)
  • Fix a reaction that writes to the store re-running on every unrelated store change. (#10236)
  • Fix undo restoring an in-between state after a single put updated the same record twice. (#10203)
  • Fix migrateStoreSnapshot throwing on a malformed persisted schema instead of returning a migration error. (#10220)
  • Fix migrations rerunning on records when a persisted schema's sequence version isn't a number. (#10917)
  • Fix a resumed sync session on a hibernating host skipping the version checks made on first connect, so after a server redeploy a client could be sent changes its schema couldn't handle. It's now rejected with SERVER_TOO_OLD or CLIENT_TOO_OLD, as on connect. (#10122)
  • Fix a record field set to undefined getting the sync session kicked with INVALID_RECORD, and ignore __proto__ keys in incoming changes. (#10118)
  • Fix older sync clients (protocol version 7) silently falling out of sync when the server sent them text-append changes they don't support. (#10095)
Prev
Releases
Next
v5.5.0