@tldraw/editor 3.14.0-canary.d8a1c8c23469 → 3.14.0-canary.dbe17bbcfb3d
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 +8 -0
- package/dist-cjs/index.js +1 -1
- package/dist-cjs/lib/editor/Editor.js +1 -2
- package/dist-cjs/lib/editor/Editor.js.map +2 -2
- package/dist-cjs/lib/editor/derivations/notVisibleShapes.js +16 -20
- package/dist-cjs/lib/editor/derivations/notVisibleShapes.js.map +3 -3
- package/dist-cjs/lib/editor/shapes/ShapeUtil.js +8 -0
- package/dist-cjs/lib/editor/shapes/ShapeUtil.js.map +2 -2
- package/dist-cjs/lib/editor/shapes/group/GroupShapeUtil.js +6 -0
- package/dist-cjs/lib/editor/shapes/group/GroupShapeUtil.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 +8 -0
- package/dist-esm/index.mjs +1 -1
- package/dist-esm/lib/editor/Editor.mjs +1 -2
- package/dist-esm/lib/editor/Editor.mjs.map +2 -2
- package/dist-esm/lib/editor/derivations/notVisibleShapes.mjs +16 -20
- package/dist-esm/lib/editor/derivations/notVisibleShapes.mjs.map +3 -3
- package/dist-esm/lib/editor/shapes/ShapeUtil.mjs +8 -0
- package/dist-esm/lib/editor/shapes/ShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/editor/shapes/group/GroupShapeUtil.mjs +6 -0
- package/dist-esm/lib/editor/shapes/group/GroupShapeUtil.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 +1 -2
- package/src/lib/editor/derivations/notVisibleShapes.ts +24 -25
- package/src/lib/editor/shapes/ShapeUtil.ts +9 -0
- package/src/lib/editor/shapes/group/GroupShapeUtil.tsx +8 -0
- package/src/version.ts +3 -3
package/dist-cjs/index.d.ts
CHANGED
|
@@ -4300,6 +4300,8 @@ export declare class GroupShapeUtil extends ShapeUtil<TLGroupShape> {
|
|
|
4300
4300
|
static migrations: TLPropsMigrations;
|
|
4301
4301
|
hideSelectionBoundsFg(): boolean;
|
|
4302
4302
|
canBind(): boolean;
|
|
4303
|
+
canResize(): boolean;
|
|
4304
|
+
canResizeChildren(): boolean;
|
|
4303
4305
|
getDefaultProps(): TLGroupShape['props'];
|
|
4304
4306
|
getGeometry(shape: TLGroupShape): Geometry2d;
|
|
4305
4307
|
component(shape: TLGroupShape): JSX_2.Element | null;
|
|
@@ -5097,6 +5099,12 @@ export declare abstract class ShapeUtil<Shape extends TLUnknownShape = TLUnknown
|
|
|
5097
5099
|
* @public
|
|
5098
5100
|
*/
|
|
5099
5101
|
canResize(_shape: Shape): boolean;
|
|
5102
|
+
/**
|
|
5103
|
+
* When the shape is resized, whether the shape's children should also be resized.
|
|
5104
|
+
*
|
|
5105
|
+
* @public
|
|
5106
|
+
*/
|
|
5107
|
+
canResizeChildren(_shape: Shape): boolean;
|
|
5100
5108
|
/**
|
|
5101
5109
|
* Whether the shape can be edited in read-only mode.
|
|
5102
5110
|
*
|
package/dist-cjs/index.js
CHANGED
|
@@ -4339,8 +4339,7 @@ class Editor extends (_a = import_eventemitter3.default, _getIsShapeHiddenCache_
|
|
|
4339
4339
|
* @public
|
|
4340
4340
|
*/
|
|
4341
4341
|
visitDescendants(parent, visitor) {
|
|
4342
|
-
const
|
|
4343
|
-
const children = this.getSortedChildIdsForParent(parentId);
|
|
4342
|
+
const children = this.getSortedChildIdsForParent(parent);
|
|
4344
4343
|
for (const id of children) {
|
|
4345
4344
|
if (visitor(id) === false) continue;
|
|
4346
4345
|
this.visitDescendants(id, visitor);
|