@tldraw/editor 4.3.0-canary.c7096a59bf3b → 4.3.0-canary.cf5673a789a1
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.js +1 -1
- package/dist-cjs/lib/editor/Editor.js +19 -0
- package/dist-cjs/lib/editor/Editor.js.map +2 -2
- package/dist-cjs/version.js +3 -3
- package/dist-cjs/version.js.map +1 -1
- package/dist-esm/index.mjs +1 -1
- package/dist-esm/lib/editor/Editor.mjs +19 -0
- package/dist-esm/lib/editor/Editor.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/editor/Editor.ts +24 -0
- package/src/version.ts +3 -3
package/dist-esm/version.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const version = "4.3.0-canary.
|
|
1
|
+
const version = "4.3.0-canary.cf5673a789a1";
|
|
2
2
|
const publishDates = {
|
|
3
3
|
major: "2025-09-18T14:39:22.803Z",
|
|
4
|
-
minor: "2025-12-
|
|
5
|
-
patch: "2025-12-
|
|
4
|
+
minor: "2025-12-05T09:37:06.859Z",
|
|
5
|
+
patch: "2025-12-05T09:37:06.859Z"
|
|
6
6
|
};
|
|
7
7
|
export {
|
|
8
8
|
publishDates,
|
package/dist-esm/version.mjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/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 = '4.3.0-canary.
|
|
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 = '4.3.0-canary.cf5673a789a1'\nexport const publishDates = {\n\tmajor: '2025-09-18T14:39:22.803Z',\n\tminor: '2025-12-05T09:37:06.859Z',\n\tpatch: '2025-12-05T09:37:06.859Z',\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/editor",
|
|
3
3
|
"description": "tldraw infinite canvas SDK (editor).",
|
|
4
|
-
"version": "4.3.0-canary.
|
|
4
|
+
"version": "4.3.0-canary.cf5673a789a1",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "tldraw Inc.",
|
|
7
7
|
"email": "hello@tldraw.com"
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
"@tiptap/core": "^3.6.2",
|
|
51
51
|
"@tiptap/pm": "^3.6.2",
|
|
52
52
|
"@tiptap/react": "^3.6.2",
|
|
53
|
-
"@tldraw/state": "4.3.0-canary.
|
|
54
|
-
"@tldraw/state-react": "4.3.0-canary.
|
|
55
|
-
"@tldraw/store": "4.3.0-canary.
|
|
56
|
-
"@tldraw/tlschema": "4.3.0-canary.
|
|
57
|
-
"@tldraw/utils": "4.3.0-canary.
|
|
58
|
-
"@tldraw/validate": "4.3.0-canary.
|
|
53
|
+
"@tldraw/state": "4.3.0-canary.cf5673a789a1",
|
|
54
|
+
"@tldraw/state-react": "4.3.0-canary.cf5673a789a1",
|
|
55
|
+
"@tldraw/store": "4.3.0-canary.cf5673a789a1",
|
|
56
|
+
"@tldraw/tlschema": "4.3.0-canary.cf5673a789a1",
|
|
57
|
+
"@tldraw/utils": "4.3.0-canary.cf5673a789a1",
|
|
58
|
+
"@tldraw/validate": "4.3.0-canary.cf5673a789a1",
|
|
59
59
|
"@types/core-js": "^2.5.8",
|
|
60
60
|
"@use-gesture/react": "^10.3.1",
|
|
61
61
|
"classnames": "^2.5.1",
|
package/src/lib/editor/Editor.ts
CHANGED
|
@@ -9149,6 +9149,30 @@ export class Editor extends EventEmitter<TLEventMap> {
|
|
|
9149
9149
|
}
|
|
9150
9150
|
}
|
|
9151
9151
|
|
|
9152
|
+
if (point) {
|
|
9153
|
+
const shapesById = new Map<TLShapeId, TLShape>(shapes.map((shape) => [shape.id, shape]))
|
|
9154
|
+
const rootShapesFromContent = compact(rootShapeIds.map((id) => shapesById.get(id)))
|
|
9155
|
+
if (rootShapesFromContent.length > 0) {
|
|
9156
|
+
const targetParent = this.getShapeAtPoint(point, {
|
|
9157
|
+
hitInside: true,
|
|
9158
|
+
hitFrameInside: true,
|
|
9159
|
+
hitLocked: true,
|
|
9160
|
+
filter: (shape) => {
|
|
9161
|
+
const util = this.getShapeUtil(shape)
|
|
9162
|
+
if (!util.canReceiveNewChildrenOfType) return false
|
|
9163
|
+
return rootShapesFromContent.every((rootShape) =>
|
|
9164
|
+
util.canReceiveNewChildrenOfType!(shape, rootShape.type)
|
|
9165
|
+
)
|
|
9166
|
+
},
|
|
9167
|
+
})
|
|
9168
|
+
|
|
9169
|
+
// When pasting at a specific point (e.g. paste-at-cursor) prefer the
|
|
9170
|
+
// parent under the pointer so that we don't keep using the original
|
|
9171
|
+
// selection's parent (which can keep shapes clipped inside frames).
|
|
9172
|
+
pasteParentId = targetParent ? targetParent.id : currentPageId
|
|
9173
|
+
}
|
|
9174
|
+
}
|
|
9175
|
+
|
|
9152
9176
|
let isDuplicating = false
|
|
9153
9177
|
|
|
9154
9178
|
if (!isPageId(pasteParentId)) {
|
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 = '4.3.0-canary.
|
|
4
|
+
export const version = '4.3.0-canary.cf5673a789a1'
|
|
5
5
|
export const publishDates = {
|
|
6
6
|
major: '2025-09-18T14:39:22.803Z',
|
|
7
|
-
minor: '2025-12-
|
|
8
|
-
patch: '2025-12-
|
|
7
|
+
minor: '2025-12-05T09:37:06.859Z',
|
|
8
|
+
patch: '2025-12-05T09:37:06.859Z',
|
|
9
9
|
}
|