@tldraw/editor 5.3.0-canary.fceaae5e9feb → 5.3.0-next.299378752aaf

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.
Files changed (38) hide show
  1. package/dist-cjs/index.d.ts +31 -2
  2. package/dist-cjs/index.js +1 -1
  3. package/dist-cjs/lib/TldrawEditor.js +6 -1
  4. package/dist-cjs/lib/TldrawEditor.js.map +2 -2
  5. package/dist-cjs/lib/editor/Editor.js +65 -13
  6. package/dist-cjs/lib/editor/Editor.js.map +2 -2
  7. package/dist-cjs/lib/editor/managers/FontManager/FontManager.js +9 -0
  8. package/dist-cjs/lib/editor/managers/FontManager/FontManager.js.map +2 -2
  9. package/dist-cjs/lib/editor/shapes/BaseFrameLikeShapeUtil.js +3 -0
  10. package/dist-cjs/lib/editor/shapes/BaseFrameLikeShapeUtil.js.map +2 -2
  11. package/dist-cjs/lib/editor/types/emit-types.js.map +1 -1
  12. package/dist-cjs/lib/options.js +2 -1
  13. package/dist-cjs/lib/options.js.map +2 -2
  14. package/dist-cjs/version.js +3 -3
  15. package/dist-cjs/version.js.map +1 -1
  16. package/dist-esm/index.d.mts +31 -2
  17. package/dist-esm/index.mjs +1 -1
  18. package/dist-esm/lib/TldrawEditor.mjs +6 -1
  19. package/dist-esm/lib/TldrawEditor.mjs.map +2 -2
  20. package/dist-esm/lib/editor/Editor.mjs +65 -13
  21. package/dist-esm/lib/editor/Editor.mjs.map +2 -2
  22. package/dist-esm/lib/editor/managers/FontManager/FontManager.mjs +9 -0
  23. package/dist-esm/lib/editor/managers/FontManager/FontManager.mjs.map +2 -2
  24. package/dist-esm/lib/editor/shapes/BaseFrameLikeShapeUtil.mjs +3 -0
  25. package/dist-esm/lib/editor/shapes/BaseFrameLikeShapeUtil.mjs.map +2 -2
  26. package/dist-esm/lib/options.mjs +2 -1
  27. package/dist-esm/lib/options.mjs.map +2 -2
  28. package/dist-esm/version.mjs +3 -3
  29. package/dist-esm/version.mjs.map +1 -1
  30. package/package.json +7 -7
  31. package/src/lib/TldrawEditor.tsx +10 -1
  32. package/src/lib/editor/Editor.ts +97 -18
  33. package/src/lib/editor/managers/FontManager/FontManager.test.ts +66 -0
  34. package/src/lib/editor/managers/FontManager/FontManager.ts +14 -0
  35. package/src/lib/editor/shapes/BaseFrameLikeShapeUtil.tsx +6 -1
  36. package/src/lib/editor/types/emit-types.ts +1 -0
  37. package/src/lib/options.ts +3 -1
  38. package/src/version.ts +3 -3
@@ -5,7 +5,7 @@ import { BaseBoxShapeUtil, TLBaseBoxShape } from './BaseBoxShapeUtil'
5
5
  import { TLDragShapesInInfo, TLDragShapesOutInfo } from './ShapeUtil'
6
6
 
7
7
  /**
8
- * A base class for frame-like shapes — containers that clip their children,
8
+ * A base class for frame-like shapes — containers that clip their children except arrows,
9
9
  * require full-brush selection, block erasure from inside, and support
10
10
  * drag-and-drop reparenting.
11
11
  *
@@ -17,6 +17,7 @@ import { TLDragShapesInInfo, TLDragShapesOutInfo } from './ShapeUtil'
17
17
  * - `canReceiveNewChildrenOfType()` returns `true` unless the container is locked
18
18
  * - `canRemoveChildrenOfType()` returns `true` unless the container is locked
19
19
  * - `getClipPath()` returns the shape geometry's vertices
20
+ * - `shouldClipChild()` clips all children except arrows
20
21
  * - `onDragShapesIn()` reparents shapes into the frame (with index restoration)
21
22
  * - `onDragShapesOut()` reparents shapes back to the page
22
23
  *
@@ -69,6 +70,10 @@ export abstract class BaseFrameLikeShapeUtil<
69
70
  return this.editor.getShapeGeometry(shape.id).vertices
70
71
  }
71
72
 
73
+ override shouldClipChild(child: TLShape): boolean {
74
+ return child.type !== 'arrow'
75
+ }
76
+
72
77
  override onDragShapesIn(
73
78
  shape: Shape,
74
79
  draggingShapes: TLShape[],
@@ -6,6 +6,7 @@ import { TLEventInfo } from './event-types'
6
6
  export interface TLEventMap {
7
7
  // Lifecycle / Internal
8
8
  mount: []
9
+ unmount: []
9
10
  'max-shapes': [{ name: string; pageId: TLPageId; count: number }]
10
11
  change: [HistoryEntry<TLRecord>]
11
12
  update: []
@@ -86,6 +86,7 @@ export interface TldrawOptions {
86
86
  readonly collaboratorCheckIntervalMs: number
87
87
  readonly cameraMovingTimeoutMs: number
88
88
  readonly hitTestMargin: number
89
+ readonly coarseHitTestMargin: number
89
90
  readonly edgeScrollDelay: number
90
91
  readonly edgeScrollEaseDuration: number
91
92
  readonly edgeScrollSpeed: number
@@ -312,7 +313,8 @@ export const defaultTldrawOptions = {
312
313
  collaboratorIdleTimeoutMs: 3000,
313
314
  collaboratorCheckIntervalMs: 1200,
314
315
  cameraMovingTimeoutMs: 64,
315
- hitTestMargin: 8,
316
+ hitTestMargin: 3,
317
+ coarseHitTestMargin: 4,
316
318
  edgeScrollDelay: 200,
317
319
  edgeScrollEaseDuration: 200,
318
320
  edgeScrollSpeed: 25,
package/src/version.ts CHANGED
@@ -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.3.0-canary.fceaae5e9feb'
4
+ export const version = '5.3.0-next.299378752aaf'
5
5
  export const publishDates = {
6
6
  major: '2026-05-06T16:28:18.473Z',
7
- minor: '2026-07-01T09:33:16.670Z',
8
- patch: '2026-07-01T09:33:16.670Z',
7
+ minor: '2026-07-13T13:51:04.172Z',
8
+ patch: '2026-07-13T13:51:04.172Z',
9
9
  }