tldraw 5.6.0-canary.e9e8ec003426 → 5.6.0-next.65a0c658db13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/DOCS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # tldraw Documentation
2
2
 
3
- Version: `5.6.0-canary.e9e8ec003426`
3
+ Version: `5.6.0-next.65a0c658db13`
4
4
 
5
5
  This file is generated during package publishing from the tldraw docs content for this exact package version.
6
6
 
@@ -383,7 +383,6 @@ We ship an experimental `tldraw-migrate` agent skill that helps a coding agent u
383
383
 
384
384
  #### v5.x
385
385
 
386
- - [v5.5](https://tldraw.dev/releases/v5.5.0) - Smart typography and matched-pair wrapping in rich text, pasting links onto shapes, a replaceable note attribution badge, TipTap's extension API re-exported from tldraw, and a reliability pass across the SDK
387
386
  - [v5.4](https://tldraw.dev/releases/v5.4.0) - A center align operation, a tleditors registry of mounted editors, faster signals and store layers, and a broad reliability pass across the SDK
388
387
  - [v5.3](https://tldraw.dev/releases/v5.3.0) - Commenting with anchored threads on the canvas, new collaboration packages, geo shape flipping, crop snapping, and faster viewport culling
389
388
  - [v5.2](https://tldraw.dev/releases/v5.2.0) - Faster freehand ink, a frame selection action, SDK-wide performance improvements, and breaking changes to the collaborator user-id types and Node support
@@ -6781,8 +6780,6 @@ Mount the layer through the `InFrontOfTheCanvas` component slot so it sits above
6781
6780
 
6782
6781
  `commentToolOverrides` puts the comment tool in Quick Actions with the `C` shortcut. With the tool active, clicking empty canvas starts a thread anchored to that point, and clicking a shape anchors a comment to the shape. You can also turn on region comments, where dragging the tool out covers an area. Either way the click only opens a composer: nothing is written to the store until the comment is posted.
6783
6782
 
6784
- To start a comment from somewhere other than the tool, such as a context menu item, call `startCommentAt(editor, point)` with a page point. It enters the comment tool and opens the composer there, anchored the same way a click would be.
6785
-
6786
6783
  Once a comment thread exists, its pin is the handle for everything else.
6787
6784
 
6788
6785
  | Input | Result |
@@ -7320,19 +7317,19 @@ This is the same question the client's [`canModifyComment`](#who-can-edit-and-de
7320
7317
 
7321
7318
  `CanvasComments` is one way to assemble the parts, and every part it uses is exported. You can rebuild it, or build something quite different, from the same pieces.
7322
7319
 
7323
- | Export | Description |
7324
- | ------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
7325
- | `CommentTool`, `commentToolOverrides`, `startCommentAt` | Placement: the tool state machine, its toolbar entry, and starting a comment at a point. |
7326
- | `CommentPin`, `CountBadge` | The pin marker and the clustered-count badge. |
7327
- | `CommentThread`, `CommentCard`, `Byline` | A thread and its comments. |
7328
- | `CommentComposer`, `SendButton` | The composer and its send control. |
7329
- | `CommentsList`, `CommentListItem` | A list of threads and one row of it. |
7330
- | `EmptyState`, `sortSidebarRows` | The list's empty state, and the sidebar's ordering. |
7331
- | `Avatar`, `Mention`, `MentionList` | Author avatars and the mention picker. |
7332
- | `Reaction`, `Reactions` | A reaction pill and a comment's row of them. |
7333
- | `anchorPagePoint`, `shapeAnchorAt` | Anchor math: page position from an anchor, and the reverse. |
7334
- | `editComment`, `deleteComment` | The write verbs. See [Writing comments](#writing-comments). |
7335
- | `registerCommentAnchorLifecycle` | Keeps shape-anchored threads alive across shape deletion. |
7320
+ | Export | Description |
7321
+ | ---------------------------------------- | ----------------------------------------------------------- |
7322
+ | `CommentTool`, `commentToolOverrides` | Placement: the tool state machine and its toolbar entry. |
7323
+ | `CommentPin`, `CountBadge` | The pin marker and the clustered-count badge. |
7324
+ | `CommentThread`, `CommentCard`, `Byline` | A thread and its comments. |
7325
+ | `CommentComposer`, `SendButton` | The composer and its send control. |
7326
+ | `CommentsList`, `CommentListItem` | A list of threads and one row of it. |
7327
+ | `EmptyState`, `sortSidebarRows` | The list's empty state, and the sidebar's ordering. |
7328
+ | `Avatar`, `Mention`, `MentionList` | Author avatars and the mention picker. |
7329
+ | `Reaction`, `Reactions` | A reaction pill and a comment's row of them. |
7330
+ | `anchorPagePoint`, `shapeAnchorAt` | Anchor math: page position from an anchor, and the reverse. |
7331
+ | `editComment`, `deleteComment` | The write verbs. See [Writing comments](#writing-comments). |
7332
+ | `registerCommentAnchorLifecycle` | Keeps shape-anchored threads alive across shape deletion. |
7336
7333
 
7337
7334
  The presentational components take plain props and know nothing about the editor. The canvas layer, the tool, and the hooks build on them. `CanvasComments` registers the anchor lifecycle for you, so call `registerCommentAnchorLifecycle` yourself only if you're replacing the layer wholesale.
7338
7335
 
package/RELEASE_NOTES.md CHANGED
@@ -1,190 +1,9 @@
1
1
  # Releases
2
2
 
3
- Version: `5.6.0-canary.e9e8ec003426`
3
+ Version: `5.6.0-next.65a0c658db13`
4
4
 
5
5
  This file is generated during package publishing from the tldraw release notes content for this exact package version.
6
6
 
7
- ## v5.5.0
8
-
9
- [View on GitHub](https://github.com/tldraw/tldraw/releases/tag/v5.5.0)
10
-
11
- This release adds smart typography to rich text, sets a shape's link when you paste a url onto it, lets you hide or replace the note shape's attribution badge, and re-exports TipTap's extension API from `tldraw`. It is also a broad reliability pass, with fixes across gestures, selection, arrows, exports, the store, sync, and local persistence, and `Editor.setCamera` now rejects non-finite values.
12
-
13
- ### What's new
14
-
15
- #### Smart typography and TipTap extensions in rich text ([#10767](https://github.com/tldraw/tldraw/pull/10767), [#10691](https://github.com/tldraw/tldraw/pull/10691))
16
-
17
- Text typed on the canvas now reads like typeset text. Straight quotes curl, `--` becomes an em dash, `...` an ellipsis, and `->` an arrow. Pressing Backspace straight after a rewrite restores what you typed. The rules are TipTap's Typography extension, added as a standalone entry in `getTipTapDefaultExtensions()`, so filter it out to keep literal punctuation:
18
-
19
- ```tsx
20
- import { getTipTapDefaultExtensions } from 'tldraw'
21
-
22
- const extensions = getTipTapDefaultExtensions().filter((e) => e.name !== 'typography')
23
- ```
24
-
25
- With text selected, typing an opening bracket or quote wraps the selection instead of replacing it: select a word and press `(` to get `(word)`. Pressing `` ` `` over a selection toggles inline code. Quotes stay straight inside code and in the mono font. The new `WrapSelectionExtension` does the wrapping, and `defaultWrappingPairs` lists the pairs it uses.
26
-
27
- `tldraw` now also re-exports TipTap's extension API: `Node`, `Mark`, `Extension`, `mergeAttributes`, and `getSchema`, the `Extensions` and `JSONContent` types, and the `TaskList` and `TaskItem` extensions. Custom rich text extensions no longer need their own `@tiptap/*` dependency, which also rules out loading two copies of TipTap.
28
-
29
- ```tsx
30
- import { Mark, mergeAttributes } from 'tldraw'
31
- ```
32
-
33
- ### API changes
34
-
35
- - 💥 **`Editor.setCamera`** now throws on a non-finite `x`, `y`, or `z` instead of silently coercing it to `0` or the current zoom level, and no longer mutates the point object passed to it. ([#9903](https://github.com/tldraw/tldraw/pull/9903))
36
- - 💥 **`store.query.filterHistory()`** now returns its own change counter rather than a value that always matches `store.history.get()`. After a rolled-back transaction it can be ahead of the store's counter, and it reports a change even for record types the transaction didn't touch. This also fixes `store.query.ids()` and `store.query.index()` going permanently out of date after a transaction that read them was rolled back. ([#10200](https://github.com/tldraw/tldraw/pull/10200))
37
- - 💥 **`debugFlags`** no longer includes the unused `reconnectOnPing` and `debugCursors` flags. This also fixes the canvas staying empty when debug mode is turned off with the **Hide shapes** debug flag still on, and stops keys that don't type a character from starting to edit a selected note. ([#10536](https://github.com/tldraw/tldraw/pull/10536))
38
- - Add `MESSAGE_TOO_LARGE` to `TLSyncErrorCloseEventReason`. A client that sends a message over the size limit now gets this error, instead of getting stuck in a disconnect-and-reconnect loop while the server held the partial message in memory. Clients that switch on the reason to pick an error message will want a case for it. ([#10810](https://github.com/tldraw/tldraw/pull/10810))
39
- - Add `LruCache.delete(key)` to `@tldraw/utils`. ([#10338](https://github.com/tldraw/tldraw/pull/10338))
40
- - Add an `AttributionComponent` option to `NoteShapeUtil` to hide or replace the note's "last edited by" badge, on the canvas and in exports. Pass `null` to hide it, or a component that receives `TLNoteShapeAttributionProps`. The default is exported as `DefaultNoteShapeAttribution`. ([#9407](https://github.com/tldraw/tldraw/pull/9407))
41
-
42
- ```tsx
43
- <Tldraw shapeUtils={[NoteShapeUtil.configure({ AttributionComponent: null })]} />
44
- ```
45
-
46
- - `EditorManager.addEditorEvent()` now returns an unsubscribe function, and managers can call the new protected `unregister()` to tear down a resource before the editor is disposed. ([#10732](https://github.com/tldraw/tldraw/pull/10732))
47
- - `Group2d.transform` now takes the same arguments as `Geometry2d.transform`, and keeps the group's ignored children, flags such as `isInternal`, and any options you pass. ([#10603](https://github.com/tldraw/tldraw/pull/10603))
48
-
49
- ### Improvements
50
-
51
- - `npm create tldraw .` now scaffolds into the current directory, prompting first when the directory isn't empty, and `create-tldraw -t <template>` no longer crashes on startup. ([#10657](https://github.com/tldraw/tldraw/pull/10657))
52
- - Update the AI starter kit templates to current Claude, Gemini, and GPT model ids. ([#10058](https://github.com/tldraw/tldraw/pull/10058), [#10869](https://github.com/tldraw/tldraw/pull/10869))
53
- - Paste a link with a single shape selected to set that shape's link, instead of creating a bookmark or embed. For custom handlers, `TLUrlExternalContent` gains a `shapeId` naming the target shape, which `defaultHandleExternalUrlContent` uses. ([#10765](https://github.com/tldraw/tldraw/pull/10765))
54
- - Toggle snapping while dragging handles, and wrap mode while brush selecting, with Cmd on Mac and Ctrl elsewhere, the same key used when moving, resizing, and cropping. ([#10172](https://github.com/tldraw/tldraw/pull/10172))
55
- - The keyboard shortcuts dialog now says when keyboard shortcuts are turned off in accessibility preferences. ([#10532](https://github.com/tldraw/tldraw/pull/10532))
56
-
57
- ### Bug fixes
58
-
59
- #### Crashes
60
-
61
- - Fix a rare crash, which could replace the editor with your app's error screen, when a shape inside a group was deleted. A group whose children are all gone now behaves as a small empty box. ([#10668](https://github.com/tldraw/tldraw/pull/10668))
62
- - Fix a crash when a shape is deleted, for example by a collaborator, between pressing on it and starting to drag it or one of its handles. ([#10179](https://github.com/tldraw/tldraw/pull/10179))
63
- - Fix a crash when a collaborator deletes a shape you're dragging, or the frame you're dragging it into, before you release it. ([#10171](https://github.com/tldraw/tldraw/pull/10171))
64
- - Fix `editor.createShape({ type: 'draw' })` or `{ type: 'highlight' }` without any `segments` breaking clicks on the page. The empty shape is now treated as a dot. ([#10224](https://github.com/tldraw/tldraw/pull/10224))
65
- - Fix duplicating a line whose points are all in the same place throwing an error. `LineShapeUtil.onBeforeCreate` no longer changes the points object you pass in. ([#10248](https://github.com/tldraw/tldraw/pull/10248))
66
- - Fix a line shape with fewer than two points, such as one created from code or loaded from a file, breaking clicks and hover across the whole page. It now renders as a dot. ([#10222](https://github.com/tldraw/tldraw/pull/10222))
67
-
68
- #### Selection and tools
69
-
70
- - Fix changes made during a drag, resize, rotate, or crop being undone by the next pointer move. Pressing the rotate shortcut mid-drag, or a collaborator's edit arriving mid-gesture, now sticks. ([#9215](https://github.com/tldraw/tldraw/pull/9215))
71
- - Fix tapping a toolbar tool with a stylus, finger, or trackpad sometimes creating a shape instead of selecting the tool. Dragging a tool out of the toolbar now requires the pointer to leave the toolbar, and sliding along the toolbar no longer starts a drag. ([#10651](https://github.com/tldraw/tldraw/pull/10651))
72
- - Fix touch gestures staying stuck when the browser cancels the pointer, as it does for an edge swipe, an incoming call, or palm rejection. ([#10464](https://github.com/tldraw/tldraw/pull/10464))
73
- - Fix Tab, Shift+Tab, and Ctrl/Cmd+arrow keyboard traversal selecting locked shapes, which clicking and select all never do. ([#10482](https://github.com/tldraw/tldraw/pull/10482))
74
- - Fix the right Shift key not giving the large nudge step when moving shapes with the arrow keys. ([#10477](https://github.com/tldraw/tldraw/pull/10477))
75
- - Fix keyboard shape navigation, and `Editor.selectAdjacentShape('prev')`, selecting the second-to-last shape instead of the last one when nothing is selected. ([#10601](https://github.com/tldraw/tldraw/pull/10601))
76
- - Fix Ctrl/Cmd+arrow shape navigation preferring a nearer diagonal shape over an aligned one. ([#10339](https://github.com/tldraw/tldraw/pull/10339))
77
- - Fix dragging inside a rotated multi-selection sometimes grabbing only the shape under the cursor instead of moving the whole selection, and clicking an already-selected locked shape with `selectLockedShapes` on selecting the shape behind it. ([#10166](https://github.com/tldraw/tldraw/pull/10166))
78
- - Fix a resize crashing, or undoing your previous resize and everything after it, when a collaborator deleted the shape between your press on the handle and the start of the drag. ([#10165](https://github.com/tldraw/tldraw/pull/10165))
79
- - Fix the select tool becoming unresponsive after clicking an arrow's label in a read-only editor, or on an arrow that was deleted as you clicked. ([#10183](https://github.com/tldraw/tldraw/pull/10183))
80
- - Fix pressing Escape while dragging a new note out of a note's clone handle leaving the new note behind and switching to the note tool. The new note is now removed and you stay in the select tool. ([#10187](https://github.com/tldraw/tldraw/pull/10187))
81
- - Fix two glitches when holding Z to zoom: the toolbar stopped highlighting the tool you were using, and pressing Z straight after clicking a toolbar button left the zoom tool stuck on. ([#10185](https://github.com/tldraw/tldraw/pull/10185))
82
- - Fix the **Frame selection** action and shortcut doing nothing when a single shape is selected. Locked shapes, and arrows bound to shapes outside the new frame, are now left out of it. ([#10627](https://github.com/tldraw/tldraw/pull/10627))
83
- - Fix the enlarge and shrink shortcuts pulling shapes apart when several shapes are selected. The selection now scales about its original center. ([#10070](https://github.com/tldraw/tldraw/pull/10070))
84
- - Fix clicking the edge of an arrow or hollow shape that's larger than the screen not selecting it. ([#10333](https://github.com/tldraw/tldraw/pull/10333))
85
- - Fix `Editor.animateShapes` moving locked shapes. Deleting, duplicating, grouping, and ungrouping now also skip shapes inside a locked frame or group, matching `updateShapes`. ([#10334](https://github.com/tldraw/tldraw/pull/10334))
86
- - Fix the select tool getting stuck mid-drag when a custom tool creates a shape and hands it over for dragging without an `onCreate` callback. ([#10190](https://github.com/tldraw/tldraw/pull/10190))
87
- - Fix quickly pressing a resize, rotate, or crop handle twice, or an image being cropped, counting as a double click instead of letting the second press drag. ([#10176](https://github.com/tldraw/tldraw/pull/10176))
88
- - Fix the wrong cursor showing, and the select tool staying active in the background, after finishing a text edit with the text tool locked. ([#10174](https://github.com/tldraw/tldraw/pull/10174))
89
- - Fix cropping an image inside a rotated frame or group moving the crop, and nudging it, along the wrong axis. ([#10170](https://github.com/tldraw/tldraw/pull/10170))
90
- - Fix a handle drag sometimes switching to precise arrow binding on its own, because a timer from the previous drag was still running. ([#10164](https://github.com/tldraw/tldraw/pull/10164))
91
- - Fix three stylus issues: in pen mode, a palm resting on the screen could disturb the pen's stroke; double clicks with a desktop graphics tablet pen weren't detected; and pressing a stylus's eraser button crashed editors that don't include the eraser tool. ([#10346](https://github.com/tldraw/tldraw/pull/10346))
92
- - Fix shapes snapping to hidden shapes, and handles snapping to a note's text label instead of its edges. Gap snapping also now behaves the same horizontally and vertically. ([#10331](https://github.com/tldraw/tldraw/pull/10331))
93
- - Fix several grouping bugs: grouping a selection that included locked shapes could throw, grouping at the page's shape limit made the shapes vanish, ungrouping nested groups deleted the inner group's children, and `groupShapes` and `ungroupShapes` did nothing when called while a tool other than select was active. ([#10330](https://github.com/tldraw/tldraw/pull/10330))
94
-
95
- #### Camera and viewport
96
-
97
- - Fix the camera not panning to a note created with Tab, Ctrl/Cmd+Enter, or a note's clone handle when the new note landed outside the viewport. ([#10486](https://github.com/tldraw/tldraw/pull/10486))
98
- - Fix camera coasting after a fling, and edge scrolling, running roughly twice as fast on a 120 Hz display as on a 60 Hz one. Both now move at the same speed at any refresh rate. ([#10501](https://github.com/tldraw/tldraw/pull/10501))
99
- - Fix a click made while the camera is moving, such as during a pan to a new note or the glide after a fling, being treated as a drag. ([#10714](https://github.com/tldraw/tldraw/pull/10714))
100
- - Fix three camera input issues: the space bar and arrow keys still panned a locked camera, pinching a locked camera acted on the current tool, and the input device preference turned wheel input back on when `wheelBehavior` is `'none'`. ([#10348](https://github.com/tldraw/tldraw/pull/10348))
101
- - Fix `setCamera` resetting the zoom to 100% when called with a plain `{ x, y }` point. ([#10385](https://github.com/tldraw/tldraw/pull/10385))
102
- - Fix animated camera moves made with `force: true` jumping back inside the camera constraints on their last frame. ([#10386](https://github.com/tldraw/tldraw/pull/10386))
103
- - Fix a deep link with a zero-width or zero-height viewport moving the camera to the page's top-left corner. The link is now ignored and the editor zooms to fit the page content. ([#10628](https://github.com/tldraw/tldraw/pull/10628))
104
-
105
- #### Arrows and shapes
106
-
107
- - Fix the stack, pack, and distribute commands moving an arrow separately from the shapes it connects when the arrow was selected before them. ([#10382](https://github.com/tldraw/tldraw/pull/10382))
108
- - Fix an arrow's ends flipping back and forth when you resize it together with a shape it's bound to and drag past the opposite edge. ([#10197](https://github.com/tldraw/tldraw/pull/10197))
109
- - Fix rotated images jumping on the canvas when their aspect ratio or crop zoom changed, or when the image was replaced. ([#10233](https://github.com/tldraw/tldraw/pull/10233))
110
- - Fix image and video shapes keeping a removed asset on screen. ([#10250](https://github.com/tldraw/tldraw/pull/10250))
111
- - Fix the attached end of an arrow moving by the wrong amount when you drag a rotated arrow, or move an arrow with the arrow keys or from code. ([#10198](https://github.com/tldraw/tldraw/pull/10198))
112
- - Fix short draw strokes that include straight segments, drawn by holding Shift, closing into a loop as if they were long strokes. ([#10241](https://github.com/tldraw/tldraw/pull/10241))
113
- - Fix the opposite edge of a geo shape with a scale other than 1 moving when you resize it past the minimum size its label allows. ([#10217](https://github.com/tldraw/tldraw/pull/10217))
114
- - Fix points disappearing partway through animating a line to one with more points. ([#10247](https://github.com/tldraw/tldraw/pull/10247))
115
- - Fix animated highlight shapes switching to the end shape's color and size at the start of the animation instead of halfway through. ([#10246](https://github.com/tldraw/tldraw/pull/10246))
116
- - Fix draw strokes with straight segments ignoring the newest point when checking whether the stroke has closed, so they closed one update late. ([#10242](https://github.com/tldraw/tldraw/pull/10242))
117
- - Fix a draw stroke freezing when you release Shift quickly after starting a straight segment. ([#10239](https://github.com/tldraw/tldraw/pull/10239))
118
- - Fix notes created inside a rotated frame appearing off-centre from the click. ([#10235](https://github.com/tldraw/tldraw/pull/10235))
119
- - Fix a bookmark keeping its old preview after its url changes. ([#10208](https://github.com/tldraw/tldraw/pull/10208))
120
- - Fix a frame's contents jumping when double-clicking a frame edge to fit it to its children. ([#10206](https://github.com/tldraw/tldraw/pull/10206))
121
- - Fix pasting Excalidraw drawings that use a custom stroke width. ([#10779](https://github.com/tldraw/tldraw/pull/10779))
122
-
123
- #### Editor
124
-
125
- - Fix keyboard shortcuts that use the `+` key, such as `cmd++`, being dropped, and shortcuts that use a shifted character, such as `shift+:`, never firing. ([#10512](https://github.com/tldraw/tldraw/pull/10512))
126
- - Fix undo after switching pages from the page menu or with Alt+arrow also reverting the edit made before the switch. Switching pages is now its own undo step, matching the "Go back" button on the move-to-page toast. ([#10472](https://github.com/tldraw/tldraw/pull/10472))
127
- - Fix the editor being thrown away and recreated on every re-render when `TldrawEditor`'s `options` prop is written inline with nested `camera`, `deepLinks`, `text`, or `gridSteps` objects. ([#10373](https://github.com/tldraw/tldraw/pull/10373))
128
- - Fix clicks on the canvas doing nothing in preserve-focus mode (`autoFocus` with `noAutoFocus()`), because the editor was focused and then immediately blurred. ([#10374](https://github.com/tldraw/tldraw/pull/10374))
129
- - Fix double-clicking a custom shape that allows read-only editing doing nothing in a read-only editor. The editor now checks `ShapeUtil.canEditInReadonly` instead of a fixed list of shape types. ([#10173](https://github.com/tldraw/tldraw/pull/10173))
130
- - Fix a read-only editor still letting code create, update, or delete bindings and change document settings. Also fix a binding from a shape to itself firing its change callbacks twice. ([#10340](https://github.com/tldraw/tldraw/pull/10340))
131
- - Fix selected text disappearing when a whole list is selected, such as by triple-clicking its bullet. ([#10808](https://github.com/tldraw/tldraw/pull/10808))
132
- - Fix text measurement throwing, or measuring the wrong characters, in elements with more than one text node. ([#10357](https://github.com/tldraw/tldraw/pull/10357))
133
- - Fix a license key passed after the editor first renders being ignored, and stop failures in watermark tracking showing up as unhandled promise rejections. ([#10327](https://github.com/tldraw/tldraw/pull/10327))
134
- - Fix copying content dropping images and other assets that your asset store can't resolve. They're now copied unchanged. ([#10366](https://github.com/tldraw/tldraw/pull/10366))
135
- - Fix an error from your asset store's `remove` method becoming an unhandled promise rejection when `deleteAssets` runs. It's now logged instead. ([#10368](https://github.com/tldraw/tldraw/pull/10368))
136
- - Fix hit testing and distance and length calculations on a shape's geometry losing precision after `getSvgPathData` was called on it, which rounded the geometry's stored points to two decimals. ([#10600](https://github.com/tldraw/tldraw/pull/10600))
137
- - Fix `Editor.getCurrentTheme()` returning `undefined` after `setCurrentTheme()` was called with a theme id that isn't registered. The call is now ignored and the current theme stays. ([#10602](https://github.com/tldraw/tldraw/pull/10602))
138
- - Fix `editor.timers` holding on to the id of every timer ever set, so its memory grew for as long as the editor lived. ([#10782](https://github.com/tldraw/tldraw/pull/10782))
139
- - Fix the debug menu's hard reset running without confirmation and stalling when another tldraw tab is open. ([#10529](https://github.com/tldraw/tldraw/pull/10529))
140
- - Fix embed hostname matching trusting lookalike hosts such as `tldraw.com.evil.io`, which were rendered with the matched definition's relaxed iframe permissions. A host must now be the pattern itself or a subdomain of it. ([#10196](https://github.com/tldraw/tldraw/pull/10196))
141
-
142
- #### Exports
143
-
144
- - Fix an export waiting until it timed out and returning an empty image when a shape's `toSvg` throws. It now fails straight away with the error. ([#10342](https://github.com/tldraw/tldraw/pull/10342))
145
- - Fix exported SVGs and PNGs missing images and fonts referenced from CSS, such as values with several urls, font-family lists, and `@import` rules. ([#10338](https://github.com/tldraw/tldraw/pull/10338))
146
- - Fix every export of an animated GIF or video hanging after one export of it failed, for example because the file was blocked or missing. ([#10226](https://github.com/tldraw/tldraw/pull/10226))
147
-
148
- #### Store and signals
149
-
150
- - Fix an effect (from `react()`, `reactor.start()`, or `useQuickReactor`) that sets a value it depends on during its first run silently stopping reacting to one of its dependencies. ([#10146](https://github.com/tldraw/tldraw/pull/10146))
151
- - Fix a side-effect handler being skipped when the handler registered before it removes itself while running. ([#10231](https://github.com/tldraw/tldraw/pull/10231))
152
- - Fix store changes made just before `store.dispose()` never reaching listeners. ([#10223](https://github.com/tldraw/tldraw/pull/10223))
153
- - Fix one store listener throwing an error stopping the other listeners from hearing about the same changes. ([#10216](https://github.com/tldraw/tldraw/pull/10216))
154
-
155
- #### Persistence and sync
156
-
157
- - Fix very large rooms, around 120,000 records, failing to open with `InMemorySyncStorage` because of a stack overflow. ([#10110](https://github.com/tldraw/tldraw/pull/10110))
158
- - Fix the sync client crashing while reconnecting in browsers where the global `WebSocket` has been removed, for example by a browser extension. ([#10783](https://github.com/tldraw/tldraw/pull/10783))
159
- - Fix local persistence silently dropping edits: changes another tab made while this one was still loading, edits queued in the last few hundred milliseconds before unmount, and writes still in flight when the database closed. ([#10332](https://github.com/tldraw/tldraw/pull/10332))
160
- - Fix sync giving up for good when fetching the connection url failed, for example when the auth-token request in the usual `useSync` setup failed once. It now retries with the normal backoff, and a sync client that has been closed no longer tries to reconnect. ([#10107](https://github.com/tldraw/tldraw/pull/10107))
161
- - Fix each tab's session state, such as its camera and selection, piling up in IndexedDB forever. Rows for old tabs are now cleared on load. ([#10533](https://github.com/tldraw/tldraw/pull/10533))
162
- - Fix a rare server-side case where a client removed while it was still connecting came back as a broken session and later triggered a second `session_removed` event. ([#10121](https://github.com/tldraw/tldraw/pull/10121))
163
- - Fix `useSync` still reporting a previous room's error after the `uri` changed to a new, healthy room. ([#10108](https://github.com/tldraw/tldraw/pull/10108))
164
- - Fix `TLSocketRoom.closeSession` failing to close the socket when the close reason is longer than 123 bytes, the WebSocket limit. The reason is now shortened to fit. ([#10116](https://github.com/tldraw/tldraw/pull/10116))
165
- - Fix `TLSocketRoom.updateStore` not being able to read or delete records served through the room's object-store lane, such as comments. ([#10114](https://github.com/tldraw/tldraw/pull/10114))
166
- - Fix errors and rejections from your `TLSocketRoom` authorizer being silently swallowed when the room was created without a `log` option. They're now logged to the console. ([#10117](https://github.com/tldraw/tldraw/pull/10117))
167
- - Fix emoji and some other characters arriving corrupted when a large sync message was split into chunks in the middle of one. ([#10119](https://github.com/tldraw/tldraw/pull/10119))
168
- - Fix a closed `TLSyncRoom` still firing `session_removed` and `room_became_empty` events, and throwing from timers as it tried to send to closed sockets. One socket failing to close no longer leaves the others open. ([#10120](https://github.com/tldraw/tldraw/pull/10120))
169
- - Fix `SQLiteSyncStorage` throwing an uncaught error when the database was closed right after a delete. Pruning tombstones, the markers left by deleted records, is now all-or-nothing, so a failure part-way can't leave the room's history inconsistent. ([#10112](https://github.com/tldraw/tldraw/pull/10112))
170
-
171
- #### Mermaid conversion
172
-
173
- - Fix converted sequence diagrams crowding tall notes, fragment titles, and participants that are created and destroyed close together. Rows are now placed where mermaid drew them rather than on an even grid. ([#10817](https://github.com/tldraw/tldraw/pull/10817))
174
- - Fix sequence diagrams with a created or destroyed participant being drawn much taller than they should be. ([#10822](https://github.com/tldraw/tldraw/pull/10822))
175
- - Fix long participant names and notes in sequence diagrams wrapping or breaking mid-word. ([#10806](https://github.com/tldraw/tldraw/pull/10806))
176
- - Fix several edges between the same two nodes swapping each other's curves. ([#10826](https://github.com/tldraw/tldraw/pull/10826))
177
- - Fix flowchart and state diagram edge labels rendering a size smaller than node labels. ([#10804](https://github.com/tldraw/tldraw/pull/10804))
178
- - Fix sequence diagram participant boxes being dropped, along with their labels and colors, on conversion. ([#10813](https://github.com/tldraw/tldraw/pull/10813))
179
- - Fix sequence diagrams dropping a participant's bottom box, and tilting their arrows, when the source uses `destroy`. ([#10750](https://github.com/tldraw/tldraw/pull/10750))
180
- - Fix self-loops in flowcharts and state diagrams drawing their label on top of the node. ([#10773](https://github.com/tldraw/tldraw/pull/10773))
181
- - Fix multi-line notes in sequence diagrams rendering far wider than their text needs, and labels breaking mid-word in diagrams that set their own font size. ([#10753](https://github.com/tldraw/tldraw/pull/10753))
182
- - Fix the `autonumber` options (`start`, `step`, `off`) being ignored in sequence diagrams. ([#10079](https://github.com/tldraw/tldraw/pull/10079))
183
-
184
- #### CLI
185
-
186
- - Fix `create-tldraw --no-telemetry` being ignored. ([#10789](https://github.com/tldraw/tldraw/pull/10789))
187
-
188
7
  ## v5.4.0
189
8
 
190
9
  [View on GitHub](https://github.com/tldraw/tldraw/releases/tag/v5.4.0)
@@ -368,12 +187,6 @@ This release adds a `center` operation to `Editor.alignShapes`, a `tleditors` re
368
187
 
369
188
  [View release on GitHub](https://github.com/tldraw/tldraw/releases/tag/v5.4.1)
370
189
 
371
- #### v5.4.2
372
-
373
- - Declare the MIT license in the `@tldraw/utils` and `@tldraw/validate` package metadata. ([#10738](https://github.com/tldraw/tldraw/pull/10738))
374
-
375
- [View release on GitHub](https://github.com/tldraw/tldraw/releases/tag/v5.4.2)
376
-
377
190
  ## v5.3.0
378
191
 
379
192
  [View on GitHub](https://github.com/tldraw/tldraw/releases/tag/v5.3.0)
package/dist-cjs/index.js CHANGED
@@ -666,7 +666,7 @@ var import_buildFromV1Document = require("./lib/utils/tldr/buildFromV1Document")
666
666
  var import_file = require("./lib/utils/tldr/file");
667
667
  (0, import_editor.registerTldrawLibraryVersion)(
668
668
  "tldraw",
669
- "5.6.0-canary.e9e8ec003426",
669
+ "5.6.0-next.65a0c658db13",
670
670
  "cjs"
671
671
  );
672
672
  //# sourceMappingURL=index.js.map
@@ -22,10 +22,10 @@ __export(version_exports, {
22
22
  version: () => version
23
23
  });
24
24
  module.exports = __toCommonJS(version_exports);
25
- const version = "5.6.0-canary.e9e8ec003426";
25
+ const version = "5.6.0-next.65a0c658db13";
26
26
  const publishDates = {
27
27
  major: "2026-05-06T16:28:18.473Z",
28
- minor: "2026-10-01T10:49:00.293Z",
29
- patch: "2026-10-01T10:49:00.293Z"
28
+ minor: "2026-10-02T16:24:30.496Z",
29
+ patch: "2026-10-02T16:24:30.496Z"
30
30
  };
31
31
  //# sourceMappingURL=version.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/lib/ui/version.ts"],
4
- "sourcesContent": ["// This file is automatically generated by internal/scripts/refresh-assets.ts.\n// Do not edit manually. Or do, I'm a comment, not a cop.\n\nexport const version = '5.6.0-canary.e9e8ec003426'\nexport const publishDates = {\n\tmajor: '2026-05-06T16:28:18.473Z',\n\tminor: '2026-10-01T10:49:00.293Z',\n\tpatch: '2026-10-01T10:49:00.293Z',\n}\n"],
4
+ "sourcesContent": ["// This file is automatically generated by internal/scripts/refresh-assets.ts.\n// Do not edit manually. Or do, I'm a comment, not a cop.\n\nexport const version = '5.6.0-next.65a0c658db13'\nexport const publishDates = {\n\tmajor: '2026-05-06T16:28:18.473Z',\n\tminor: '2026-10-02T16:24:30.496Z',\n\tpatch: '2026-10-02T16:24:30.496Z',\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,MAAM,UAAU;AAChB,MAAM,eAAe;AAAA,EAC3B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;",
6
6
  "names": []
7
7
  }
@@ -653,7 +653,7 @@ import {
653
653
  } from "./lib/utils/tldr/file.mjs";
654
654
  registerTldrawLibraryVersion(
655
655
  "tldraw",
656
- "5.6.0-canary.e9e8ec003426",
656
+ "5.6.0-next.65a0c658db13",
657
657
  "esm"
658
658
  );
659
659
  export {
@@ -1,8 +1,8 @@
1
- const version = "5.6.0-canary.e9e8ec003426";
1
+ const version = "5.6.0-next.65a0c658db13";
2
2
  const publishDates = {
3
3
  major: "2026-05-06T16:28:18.473Z",
4
- minor: "2026-10-01T10:49:00.293Z",
5
- patch: "2026-10-01T10:49:00.293Z"
4
+ minor: "2026-10-02T16:24:30.496Z",
5
+ patch: "2026-10-02T16:24:30.496Z"
6
6
  };
7
7
  export {
8
8
  publishDates,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/lib/ui/version.ts"],
4
- "sourcesContent": ["// This file is automatically generated by internal/scripts/refresh-assets.ts.\n// Do not edit manually. Or do, I'm a comment, not a cop.\n\nexport const version = '5.6.0-canary.e9e8ec003426'\nexport const publishDates = {\n\tmajor: '2026-05-06T16:28:18.473Z',\n\tminor: '2026-10-01T10:49:00.293Z',\n\tpatch: '2026-10-01T10:49:00.293Z',\n}\n"],
4
+ "sourcesContent": ["// This file is automatically generated by internal/scripts/refresh-assets.ts.\n// Do not edit manually. Or do, I'm a comment, not a cop.\n\nexport const version = '5.6.0-next.65a0c658db13'\nexport const publishDates = {\n\tmajor: '2026-05-06T16:28:18.473Z',\n\tminor: '2026-10-02T16:24:30.496Z',\n\tpatch: '2026-10-02T16:24:30.496Z',\n}\n"],
5
5
  "mappings": "AAGO,MAAM,UAAU;AAChB,MAAM,eAAe;AAAA,EAC3B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tldraw",
3
3
  "description": "A tiny little drawing editor.",
4
- "version": "5.6.0-canary.e9e8ec003426",
4
+ "version": "5.6.0-next.65a0c658db13",
5
5
  "author": {
6
6
  "name": "tldraw Inc.",
7
7
  "email": "hello@tldraw.com"
@@ -56,11 +56,11 @@
56
56
  "@tiptap/pm": "^3.12.1",
57
57
  "@tiptap/react": "^3.12.1",
58
58
  "@tiptap/starter-kit": "^3.12.1",
59
- "@tldraw/driver": "5.6.0-canary.e9e8ec003426",
60
- "@tldraw/editor": "5.6.0-canary.e9e8ec003426",
61
- "@tldraw/state": "5.6.0-canary.e9e8ec003426",
62
- "@tldraw/store": "5.6.0-canary.e9e8ec003426",
63
- "@tldraw/tlschema": "5.6.0-canary.e9e8ec003426",
59
+ "@tldraw/driver": "5.6.0-next.65a0c658db13",
60
+ "@tldraw/editor": "5.6.0-next.65a0c658db13",
61
+ "@tldraw/state": "5.6.0-next.65a0c658db13",
62
+ "@tldraw/store": "5.6.0-next.65a0c658db13",
63
+ "@tldraw/tlschema": "5.6.0-next.65a0c658db13",
64
64
  "classnames": "^2.5.1",
65
65
  "idb": "^7.1.1",
66
66
  "lz-string": "^1.5.0",
@@ -1,9 +1,9 @@
1
1
  // This file is automatically generated by internal/scripts/refresh-assets.ts.
2
2
  // Do not edit manually. Or do, I'm a comment, not a cop.
3
3
 
4
- export const version = '5.6.0-canary.e9e8ec003426'
4
+ export const version = '5.6.0-next.65a0c658db13'
5
5
  export const publishDates = {
6
6
  major: '2026-05-06T16:28:18.473Z',
7
- minor: '2026-10-01T10:49:00.293Z',
8
- patch: '2026-10-01T10:49:00.293Z',
7
+ minor: '2026-10-02T16:24:30.496Z',
8
+ patch: '2026-10-02T16:24:30.496Z',
9
9
  }
package/tldraw.css CHANGED
@@ -79,9 +79,10 @@
79
79
 
80
80
  /* Cursor SVGs */
81
81
  --tl-cursor-none: none;
82
+ /* Hotspot sits between the white outline tip and the black tip: on either tip alone, hit-testing feels offset from one direction (#10855) */
82
83
  --tl-cursor-default:
83
84
  url("data:image/svg+xml,<svg height='32' width='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg' style='color: black;'><defs><filter id='shadow' y='-40%' x='-40%' width='180px' height='180%' color-interpolation-filters='sRGB'><feDropShadow dx='1' dy='1' stdDeviation='1.2' flood-opacity='.5'/></filter></defs><g fill='none' transform='rotate(0 16 16)' filter='url(%23shadow)'><path d='m12 24.4219v-16.015l11.591 11.619h-6.781l-.411.124z' fill='white'/><path d='m21.0845 25.0962-3.605 1.535-4.682-11.089 3.686-1.553z' fill='white'/><path d='m19.751 24.4155-1.844.774-3.1-7.374 1.841-.775z' fill='black'/><path d='m13 10.814v11.188l2.969-2.866.428-.139h4.768z' fill='black'/></g></svg>")
84
- 12 8,
85
+ 12 10,
85
86
  default;
86
87
  --tl-cursor-pointer:
87
88
  url("data:image/svg+xml,<svg height='32' width='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg' style='color: black;'><defs><filter id='shadow' y='-40%' x='-40%' width='180px' height='180%' color-interpolation-filters='sRGB'><feDropShadow dx='1' dy='1' stdDeviation='1.2' flood-opacity='.5'/></filter></defs><g fill='none' transform='rotate(0 16 16)' filter='url(%23shadow)'><path d='m13.3315 21.3799c-.284-.359-.629-1.093-1.243-1.984-.348-.504-1.211-1.453-1.468-1.935-.223-.426-.199-.617-.146-.97.094-.628.738-1.117 1.425-1.051.519.049.959.392 1.355.716.239.195.533.574.71.788.163.196.203.277.377.509.23.307.302.459.214.121-.071-.496-.187-1.343-.355-2.092-.128-.568-.159-.657-.281-1.093-.129-.464-.195-.789-.316-1.281-.084-.348-.235-1.059-.276-1.459-.057-.547-.087-1.439.264-1.849.275-.321.906-.418 1.297-.22.512.259.803 1.003.936 1.3.239.534.387 1.151.516 1.961.164 1.031.466 2.462.476 2.763.024-.369-.068-1.146-.004-1.5.058-.321.328-.694.666-.795.286-.085.621-.116.916-.055.313.064.643.288.766.499.362.624.369 1.899.384 1.831.086-.376.071-1.229.284-1.584.14-.234.497-.445.687-.479.294-.052.655-.068.964-.008.249.049.586.345.677.487.218.344.342 1.317.379 1.658.015.141.074-.392.293-.736.406-.639 1.843-.763 1.898.639.025.654.02.624.02 1.064 0 .517-.012.828-.04 1.202-.031.4-.117 1.304-.242 1.742-.086.301-.371.978-.652 1.384 0 0-1.074 1.25-1.191 1.813-.118.562-.079.566-.102.965-.023.398.121.922.121.922s-.802.104-1.234.035c-.391-.063-.875-.841-1-1.079-.172-.328-.539-.265-.682-.023-.225.383-.709 1.07-1.051 1.113-.668.084-2.054.031-3.139.02 0 0 .185-1.011-.227-1.358-.305-.259-.83-.784-1.144-1.06z' fill='white'/><g stroke='black' stroke-linecap='round' stroke-width='.75'><path d='m13.3315 21.3799c-.284-.359-.629-1.093-1.243-1.984-.348-.504-1.211-1.453-1.468-1.935-.223-.426-.199-.617-.146-.97.094-.628.738-1.117 1.425-1.051.519.049.959.392 1.355.716.239.195.533.574.71.788.163.196.203.277.377.509.23.307.302.459.214.121-.071-.496-.187-1.343-.355-2.092-.128-.568-.159-.657-.281-1.093-.129-.464-.195-.789-.316-1.281-.084-.348-.235-1.059-.276-1.459-.057-.547-.087-1.439.264-1.849.275-.321.906-.418 1.297-.22.512.259.803 1.003.936 1.3.239.534.387 1.151.516 1.961.164 1.031.466 2.462.476 2.763.024-.369-.068-1.146-.004-1.5.058-.321.328-.694.666-.795.286-.085.621-.116.916-.055.313.064.643.288.766.499.362.624.369 1.899.384 1.831.086-.376.071-1.229.284-1.584.14-.234.497-.445.687-.479.294-.052.655-.068.964-.008.249.049.586.345.677.487.218.344.342 1.317.379 1.658.015.141.074-.392.293-.736.406-.639 1.843-.763 1.898.639.025.654.02.624.02 1.064 0 .517-.012.828-.04 1.202-.031.4-.117 1.304-.242 1.742-.086.301-.371.978-.652 1.384 0 0-1.074 1.25-1.191 1.813-.118.562-.079.566-.102.965-.023.398.121.922.121.922s-.802.104-1.234.035c-.391-.063-.875-.841-1-1.079-.172-.328-.539-.265-.682-.023-.225.383-.709 1.07-1.051 1.113-.668.084-2.054.031-3.139.02 0 0 .185-1.011-.227-1.358-.305-.259-.83-.784-1.144-1.06z' stroke-linejoin='round'/><path d='m21.5664 21.7344v-3.459'/><path d='m19.5508 21.7461-.016-3.473'/><path d='m17.5547 18.3047.021 3.426'/></g></g></svg>")