apps/docs/content/releases/next.mdx
This release adds a center operation to Editor.alignShapes, iterateGraphemes to @tldraw/utils, and two new reactive methods on AtomMap. It also deprecates useViewportHeight, speeds up the signals and store layers, and fixes a batch of crashes and interaction bugs across dialogs, sync reconnection, undo, and keyboard shortcut tooltips.
useViewportHeight() is deprecated. Read window.visualViewport directly instead. The hook returns only the visible viewport's bottom edge, and keeping a panel clear of the software keyboard generally needs the whole visible rectangle. (#9826)'center' as an Editor.alignShapes operation. It applies the existing 'center-horizontal' and 'center-vertical' operations together, so shapes center on both axes in one command. (#9074)getOrInsert(key, defaultValue) and getOrInsertComputed(key, callback) to AtomMap, matching the Map methods added in newer JavaScript runtimes. Both are reactive, and the callback only runs when the key is absent. (#9752)isPage(record) to @tldraw/tlschema, a type guard that narrows an unknown record to TLPage. (#9774)iterateGraphemes(str) to @tldraw/utils. It iterates a string's grapheme clusters, using Intl.Segmenter when it's available and falling back to code-point iteration when it isn't. (#9896)isPage(record) to @tldraw/tlschema, a type guard for page records that matches the guards already exported for the other record types. (#9774)Group2d and Editor hit-testing. (#8600)@tldraw/state. Capturing a parent used to scan the capturing signal's parent set twice, once to check for the parent and again to add it. (#9690)@tldraw/store history bookkeeping, so squashing record diffs and filtering query history no longer build intermediate copies on every tick. (#9689, #9869)Intl.Segmenter, such as Firefox before 125. (#9896)