@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.
- package/dist-cjs/index.d.ts +31 -2
- package/dist-cjs/index.js +1 -1
- package/dist-cjs/lib/TldrawEditor.js +6 -1
- package/dist-cjs/lib/TldrawEditor.js.map +2 -2
- package/dist-cjs/lib/editor/Editor.js +65 -13
- package/dist-cjs/lib/editor/Editor.js.map +2 -2
- package/dist-cjs/lib/editor/managers/FontManager/FontManager.js +9 -0
- package/dist-cjs/lib/editor/managers/FontManager/FontManager.js.map +2 -2
- package/dist-cjs/lib/editor/shapes/BaseFrameLikeShapeUtil.js +3 -0
- package/dist-cjs/lib/editor/shapes/BaseFrameLikeShapeUtil.js.map +2 -2
- package/dist-cjs/lib/editor/types/emit-types.js.map +1 -1
- package/dist-cjs/lib/options.js +2 -1
- package/dist-cjs/lib/options.js.map +2 -2
- package/dist-cjs/version.js +3 -3
- package/dist-cjs/version.js.map +1 -1
- package/dist-esm/index.d.mts +31 -2
- package/dist-esm/index.mjs +1 -1
- package/dist-esm/lib/TldrawEditor.mjs +6 -1
- package/dist-esm/lib/TldrawEditor.mjs.map +2 -2
- package/dist-esm/lib/editor/Editor.mjs +65 -13
- package/dist-esm/lib/editor/Editor.mjs.map +2 -2
- package/dist-esm/lib/editor/managers/FontManager/FontManager.mjs +9 -0
- package/dist-esm/lib/editor/managers/FontManager/FontManager.mjs.map +2 -2
- package/dist-esm/lib/editor/shapes/BaseFrameLikeShapeUtil.mjs +3 -0
- package/dist-esm/lib/editor/shapes/BaseFrameLikeShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/options.mjs +2 -1
- package/dist-esm/lib/options.mjs.map +2 -2
- package/dist-esm/version.mjs +3 -3
- package/dist-esm/version.mjs.map +1 -1
- package/package.json +7 -7
- package/src/lib/TldrawEditor.tsx +10 -1
- package/src/lib/editor/Editor.ts +97 -18
- package/src/lib/editor/managers/FontManager/FontManager.test.ts +66 -0
- package/src/lib/editor/managers/FontManager/FontManager.ts +14 -0
- package/src/lib/editor/shapes/BaseFrameLikeShapeUtil.tsx +6 -1
- package/src/lib/editor/types/emit-types.ts +1 -0
- package/src/lib/options.ts +3 -1
- 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[],
|
package/src/lib/options.ts
CHANGED
|
@@ -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:
|
|
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-
|
|
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-
|
|
8
|
-
patch: '2026-07-
|
|
7
|
+
minor: '2026-07-13T13:51:04.172Z',
|
|
8
|
+
patch: '2026-07-13T13:51:04.172Z',
|
|
9
9
|
}
|