@tldraw/editor 3.14.0-canary.ba997e465fde → 3.14.0-canary.c0df84d88f32
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 +6 -5
- package/dist-cjs/index.js +1 -3
- package/dist-cjs/index.js.map +2 -2
- package/dist-cjs/lib/config/TLSessionStateSnapshot.js +1 -12
- package/dist-cjs/lib/config/TLSessionStateSnapshot.js.map +3 -3
- package/dist-cjs/lib/editor/Editor.js +8 -5
- package/dist-cjs/lib/editor/Editor.js.map +2 -2
- package/dist-cjs/lib/editor/bindings/BindingUtil.js.map +2 -2
- package/dist-cjs/lib/editor/shapes/group/GroupShapeUtil.js +1 -1
- package/dist-cjs/lib/editor/shapes/group/GroupShapeUtil.js.map +1 -1
- package/dist-cjs/lib/primitives/Box.js +0 -6
- package/dist-cjs/lib/primitives/Box.js.map +2 -2
- package/dist-cjs/lib/utils/areShapesContentEqual.js +1 -1
- package/dist-cjs/lib/utils/areShapesContentEqual.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 +6 -5
- package/dist-esm/index.mjs +1 -3
- package/dist-esm/index.mjs.map +2 -2
- package/dist-esm/lib/config/TLSessionStateSnapshot.mjs +1 -1
- package/dist-esm/lib/config/TLSessionStateSnapshot.mjs.map +2 -2
- package/dist-esm/lib/editor/Editor.mjs +8 -5
- package/dist-esm/lib/editor/Editor.mjs.map +2 -2
- package/dist-esm/lib/editor/bindings/BindingUtil.mjs.map +2 -2
- package/dist-esm/lib/editor/shapes/group/GroupShapeUtil.mjs +1 -1
- package/dist-esm/lib/editor/shapes/group/GroupShapeUtil.mjs.map +1 -1
- package/dist-esm/lib/primitives/Box.mjs +0 -6
- package/dist-esm/lib/primitives/Box.mjs.map +2 -2
- package/dist-esm/lib/utils/areShapesContentEqual.mjs +1 -1
- package/dist-esm/lib/utils/areShapesContentEqual.mjs.map +2 -2
- package/dist-esm/version.mjs +3 -3
- package/dist-esm/version.mjs.map +1 -1
- package/package.json +8 -9
- package/src/index.ts +0 -1
- package/src/lib/config/TLSessionStateSnapshot.ts +1 -1
- package/src/lib/editor/Editor.ts +4 -2
- package/src/lib/editor/bindings/BindingUtil.ts +6 -0
- package/src/lib/editor/shapes/group/GroupShapeUtil.tsx +1 -1
- package/src/lib/primitives/Box.ts +0 -8
- package/src/lib/utils/areShapesContentEqual.ts +1 -2
- package/src/version.ts +3 -3
|
@@ -593,20 +593,21 @@ class Editor extends (_a = EventEmitter, _getIsShapeHiddenCache_dec = [computed]
|
|
|
593
593
|
shape: {
|
|
594
594
|
afterChange: (shapeBefore, shapeAfter) => {
|
|
595
595
|
for (const binding of this.getBindingsInvolvingShape(shapeAfter)) {
|
|
596
|
-
if (areShapesContentEqual(shapeBefore, shapeAfter)) continue;
|
|
597
596
|
invalidBindingTypes.add(binding.type);
|
|
598
597
|
if (binding.fromId === shapeAfter.id) {
|
|
599
598
|
this.getBindingUtil(binding).onAfterChangeFromShape?.({
|
|
600
599
|
binding,
|
|
601
600
|
shapeBefore,
|
|
602
|
-
shapeAfter
|
|
601
|
+
shapeAfter,
|
|
602
|
+
reason: "self"
|
|
603
603
|
});
|
|
604
604
|
}
|
|
605
605
|
if (binding.toId === shapeAfter.id) {
|
|
606
606
|
this.getBindingUtil(binding).onAfterChangeToShape?.({
|
|
607
607
|
binding,
|
|
608
608
|
shapeBefore,
|
|
609
|
-
shapeAfter
|
|
609
|
+
shapeAfter,
|
|
610
|
+
reason: "self"
|
|
610
611
|
});
|
|
611
612
|
}
|
|
612
613
|
}
|
|
@@ -620,14 +621,16 @@ class Editor extends (_a = EventEmitter, _getIsShapeHiddenCache_dec = [computed]
|
|
|
620
621
|
this.getBindingUtil(binding).onAfterChangeFromShape?.({
|
|
621
622
|
binding,
|
|
622
623
|
shapeBefore: descendantShape,
|
|
623
|
-
shapeAfter: descendantShape
|
|
624
|
+
shapeAfter: descendantShape,
|
|
625
|
+
reason: "ancestry"
|
|
624
626
|
});
|
|
625
627
|
}
|
|
626
628
|
if (binding.toId === descendantShape.id) {
|
|
627
629
|
this.getBindingUtil(binding).onAfterChangeToShape?.({
|
|
628
630
|
binding,
|
|
629
631
|
shapeBefore: descendantShape,
|
|
630
|
-
shapeAfter: descendantShape
|
|
632
|
+
shapeAfter: descendantShape,
|
|
633
|
+
reason: "ancestry"
|
|
631
634
|
});
|
|
632
635
|
}
|
|
633
636
|
}
|