@tldraw/editor 3.14.0-canary.cbdb3d4e5362 → 3.14.0-canary.d926f92ca8d6

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.
Files changed (35) hide show
  1. package/dist-cjs/index.d.ts +8 -0
  2. package/dist-cjs/index.js +1 -1
  3. package/dist-cjs/lib/editor/Editor.js +1 -2
  4. package/dist-cjs/lib/editor/Editor.js.map +2 -2
  5. package/dist-cjs/lib/editor/derivations/notVisibleShapes.js +16 -20
  6. package/dist-cjs/lib/editor/derivations/notVisibleShapes.js.map +3 -3
  7. package/dist-cjs/lib/editor/managers/FocusManager.js +2 -0
  8. package/dist-cjs/lib/editor/managers/FocusManager.js.map +2 -2
  9. package/dist-cjs/lib/editor/shapes/ShapeUtil.js +8 -0
  10. package/dist-cjs/lib/editor/shapes/ShapeUtil.js.map +2 -2
  11. package/dist-cjs/lib/editor/shapes/group/GroupShapeUtil.js +6 -0
  12. package/dist-cjs/lib/editor/shapes/group/GroupShapeUtil.js.map +2 -2
  13. package/dist-cjs/version.js +3 -3
  14. package/dist-cjs/version.js.map +1 -1
  15. package/dist-esm/index.d.mts +8 -0
  16. package/dist-esm/index.mjs +1 -1
  17. package/dist-esm/lib/editor/Editor.mjs +1 -2
  18. package/dist-esm/lib/editor/Editor.mjs.map +2 -2
  19. package/dist-esm/lib/editor/derivations/notVisibleShapes.mjs +16 -20
  20. package/dist-esm/lib/editor/derivations/notVisibleShapes.mjs.map +3 -3
  21. package/dist-esm/lib/editor/managers/FocusManager.mjs +2 -0
  22. package/dist-esm/lib/editor/managers/FocusManager.mjs.map +2 -2
  23. package/dist-esm/lib/editor/shapes/ShapeUtil.mjs +8 -0
  24. package/dist-esm/lib/editor/shapes/ShapeUtil.mjs.map +2 -2
  25. package/dist-esm/lib/editor/shapes/group/GroupShapeUtil.mjs +6 -0
  26. package/dist-esm/lib/editor/shapes/group/GroupShapeUtil.mjs.map +2 -2
  27. package/dist-esm/version.mjs +3 -3
  28. package/dist-esm/version.mjs.map +1 -1
  29. package/package.json +7 -7
  30. package/src/lib/editor/Editor.ts +1 -2
  31. package/src/lib/editor/derivations/notVisibleShapes.ts +24 -25
  32. package/src/lib/editor/managers/FocusManager.ts +2 -0
  33. package/src/lib/editor/shapes/ShapeUtil.ts +9 -0
  34. package/src/lib/editor/shapes/group/GroupShapeUtil.tsx +8 -0
  35. package/src/version.ts +3 -3
@@ -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
@@ -361,7 +361,7 @@ function debugEnableLicensing() {
361
361
  }
362
362
  (0, import_utils.registerTldrawLibraryVersion)(
363
363
  "@tldraw/editor",
364
- "3.14.0-canary.cbdb3d4e5362",
364
+ "3.14.0-canary.d926f92ca8d6",
365
365
  "cjs"
366
366
  );
367
367
  //# sourceMappingURL=index.js.map
@@ -4339,8 +4339,7 @@ class Editor extends (_a = import_eventemitter3.default, _getIsShapeHiddenCache_
4339
4339
  * @public
4340
4340
  */
4341
4341
  visitDescendants(parent, visitor) {
4342
- const parentId = typeof parent === "string" ? parent : parent.id;
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);