@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-cjs/version.js
CHANGED
|
@@ -22,10 +22,10 @@ __export(version_exports, {
|
|
|
22
22
|
version: () => version
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(version_exports);
|
|
25
|
-
const version = "4.3.0-canary.
|
|
25
|
+
const version = "4.3.0-canary.cf5673a789a1";
|
|
26
26
|
const publishDates = {
|
|
27
27
|
major: "2025-09-18T14:39:22.803Z",
|
|
28
|
-
minor: "2025-12-
|
|
29
|
-
patch: "2025-12-
|
|
28
|
+
minor: "2025-12-05T09:37:06.859Z",
|
|
29
|
+
patch: "2025-12-05T09:37:06.859Z"
|
|
30
30
|
};
|
|
31
31
|
//# sourceMappingURL=version.js.map
|
package/dist-cjs/version.js.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": ";;;;;;;;;;;;;;;;;;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
|
}
|
package/dist-esm/index.mjs
CHANGED
|
@@ -302,7 +302,7 @@ import { uniq } from "./lib/utils/uniq.mjs";
|
|
|
302
302
|
import { openWindow } from "./lib/utils/window-open.mjs";
|
|
303
303
|
registerTldrawLibraryVersion(
|
|
304
304
|
"@tldraw/editor",
|
|
305
|
-
"4.3.0-canary.
|
|
305
|
+
"4.3.0-canary.cf5673a789a1",
|
|
306
306
|
"esm"
|
|
307
307
|
);
|
|
308
308
|
export {
|
|
@@ -6690,6 +6690,25 @@ class Editor extends (_a = EventEmitter, _getIsShapeHiddenCache_dec = [computed]
|
|
|
6690
6690
|
}
|
|
6691
6691
|
}
|
|
6692
6692
|
}
|
|
6693
|
+
if (point) {
|
|
6694
|
+
const shapesById = new Map(shapes.map((shape) => [shape.id, shape]));
|
|
6695
|
+
const rootShapesFromContent = compact(rootShapeIds.map((id) => shapesById.get(id)));
|
|
6696
|
+
if (rootShapesFromContent.length > 0) {
|
|
6697
|
+
const targetParent = this.getShapeAtPoint(point, {
|
|
6698
|
+
hitInside: true,
|
|
6699
|
+
hitFrameInside: true,
|
|
6700
|
+
hitLocked: true,
|
|
6701
|
+
filter: (shape) => {
|
|
6702
|
+
const util = this.getShapeUtil(shape);
|
|
6703
|
+
if (!util.canReceiveNewChildrenOfType) return false;
|
|
6704
|
+
return rootShapesFromContent.every(
|
|
6705
|
+
(rootShape) => util.canReceiveNewChildrenOfType(shape, rootShape.type)
|
|
6706
|
+
);
|
|
6707
|
+
}
|
|
6708
|
+
});
|
|
6709
|
+
pasteParentId = targetParent ? targetParent.id : currentPageId;
|
|
6710
|
+
}
|
|
6711
|
+
}
|
|
6693
6712
|
let isDuplicating = false;
|
|
6694
6713
|
if (!isPageId(pasteParentId)) {
|
|
6695
6714
|
const parent = this.getShape(pasteParentId);
|