@tldraw/editor 5.5.0-canary.d64d005dcf06 → 5.5.0-canary.d98ea50911fe
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 +9 -5
- 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 +9 -5
- 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 +20 -10
- 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 = "5.5.0-canary.
|
|
25
|
+
const version = "5.5.0-canary.d98ea50911fe";
|
|
26
26
|
const publishDates = {
|
|
27
27
|
major: "2026-05-06T16:28:18.473Z",
|
|
28
|
-
minor: "2026-09-
|
|
29
|
-
patch: "2026-09-
|
|
28
|
+
minor: "2026-09-07T15:50:38.807Z",
|
|
29
|
+
patch: "2026-09-07T15:50:38.807Z"
|
|
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 = '5.5.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 = '5.5.0-canary.d98ea50911fe'\nexport const publishDates = {\n\tmajor: '2026-05-06T16:28:18.473Z',\n\tminor: '2026-09-07T15:50:38.807Z',\n\tpatch: '2026-09-07T15:50:38.807Z',\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
|
@@ -310,7 +310,7 @@ import { LocalIndexedDb, Table } from "./lib/utils/sync/LocalIndexedDb.mjs";
|
|
|
310
310
|
import { uniq } from "./lib/utils/uniq.mjs";
|
|
311
311
|
registerTldrawLibraryVersion(
|
|
312
312
|
"@tldraw/editor",
|
|
313
|
-
"5.5.0-canary.
|
|
313
|
+
"5.5.0-canary.d98ea50911fe",
|
|
314
314
|
"esm"
|
|
315
315
|
);
|
|
316
316
|
import { getColorValue } from "./lib/editor/managers/ThemeManager/defaultThemes.mjs";
|
|
@@ -1651,12 +1651,15 @@ class Editor extends EventEmitter {
|
|
|
1651
1651
|
const selectedShapeIds = this.getSelectedShapeIds();
|
|
1652
1652
|
const firstParentId = selectedShapeIds[0] ? this.getShape(selectedShapeIds[0])?.parentId : null;
|
|
1653
1653
|
const isSelectedWithinContainer = firstParentId && selectedShapeIds.every((shapeId) => this.getShape(shapeId)?.parentId === firstParentId) && !isPageId(firstParentId);
|
|
1654
|
-
const filteredShapes =
|
|
1655
|
-
|
|
1654
|
+
const filteredShapes = this.getCurrentPageShapes().filter(
|
|
1655
|
+
(shape2) => !this.isShapeOrAncestorLocked(shape2) && (isSelectedWithinContainer ? shape2.parentId === firstParentId : isPageId(shape2.parentId))
|
|
1656
|
+
);
|
|
1657
|
+
const readingOrderShapes = this._getShapesInReadingOrder(filteredShapes);
|
|
1656
1658
|
const currentShapeId = selectedShapeIds.length === 1 ? selectedShapeIds[0] : readingOrderShapes.find((shape2) => selectedShapeIds.includes(shape2.id))?.id;
|
|
1657
1659
|
let adjacentShapeId;
|
|
1658
1660
|
if (direction === "next" || direction === "prev") {
|
|
1659
1661
|
const shapeIds = readingOrderShapes.map((shape2) => shape2.id);
|
|
1662
|
+
if (shapeIds.length === 0) return;
|
|
1660
1663
|
const currentIndex = currentShapeId ? shapeIds.indexOf(currentShapeId) : -1;
|
|
1661
1664
|
const startIndex = currentIndex === -1 && direction === "prev" ? 0 : currentIndex;
|
|
1662
1665
|
const adjacentIndex = (startIndex + (direction === "next" ? 1 : -1) + shapeIds.length) % shapeIds.length;
|
|
@@ -2961,6 +2964,7 @@ class Editor extends EventEmitter {
|
|
|
2961
2964
|
}
|
|
2962
2965
|
const isOnSamePage = presence.currentPageId === this.getCurrentPageId();
|
|
2963
2966
|
if (!isOnSamePage) {
|
|
2967
|
+
this.markHistoryStoppingPoint("change-page");
|
|
2964
2968
|
this.setCurrentPage(presence.currentPageId);
|
|
2965
2969
|
}
|
|
2966
2970
|
if (opts && opts.animation && !isOnSamePage) {
|
|
@@ -5401,7 +5405,7 @@ class Editor extends EventEmitter {
|
|
|
5401
5405
|
const shapesMovingTogether = [shape];
|
|
5402
5406
|
const boundsOfShapesMovingTogether = [shapePageBounds];
|
|
5403
5407
|
this.collectShapesViaArrowBindings({
|
|
5404
|
-
bindings: this.
|
|
5408
|
+
bindings: this.getBindingsInvolvingShape(shape.id, "arrow"),
|
|
5405
5409
|
initialShapes: freshShapes,
|
|
5406
5410
|
resultShapes: shapesMovingTogether,
|
|
5407
5411
|
resultBounds: boundsOfShapesMovingTogether,
|
|
@@ -8338,8 +8342,8 @@ class Editor extends EventEmitter {
|
|
|
8338
8342
|
break;
|
|
8339
8343
|
}
|
|
8340
8344
|
case "keyboard": {
|
|
8341
|
-
if (info.
|
|
8342
|
-
if (info.
|
|
8345
|
+
if (info.code === "ShiftRight") info.code = "ShiftLeft";
|
|
8346
|
+
if (info.code === "AltRight") info.code = "AltLeft";
|
|
8343
8347
|
if (info.code === "ControlRight") info.code = "ControlLeft";
|
|
8344
8348
|
if (info.code === "MetaRight") info.code = "MetaLeft";
|
|
8345
8349
|
switch (info.name) {
|