@tldraw/editor 3.15.0-canary.0f6bd23d7755 → 3.15.0-canary.14c6b9d1aa1e

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.
@@ -22,10 +22,10 @@ __export(version_exports, {
22
22
  version: () => version
23
23
  });
24
24
  module.exports = __toCommonJS(version_exports);
25
- const version = "3.15.0-canary.0f6bd23d7755";
25
+ const version = "3.15.0-canary.14c6b9d1aa1e";
26
26
  const publishDates = {
27
27
  major: "2024-09-13T14:36:29.063Z",
28
- minor: "2025-07-09T16:03:20.314Z",
29
- patch: "2025-07-09T16:03:20.314Z"
28
+ minor: "2025-07-10T10:11:22.062Z",
29
+ patch: "2025-07-10T10:11:22.062Z"
30
30
  };
31
31
  //# sourceMappingURL=version.js.map
@@ -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 = '3.15.0-canary.0f6bd23d7755'\nexport const publishDates = {\n\tmajor: '2024-09-13T14:36:29.063Z',\n\tminor: '2025-07-09T16:03:20.314Z',\n\tpatch: '2025-07-09T16:03:20.314Z',\n}\n"],
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 = '3.15.0-canary.14c6b9d1aa1e'\nexport const publishDates = {\n\tmajor: '2024-09-13T14:36:29.063Z',\n\tminor: '2025-07-10T10:11:22.062Z',\n\tpatch: '2025-07-10T10:11:22.062Z',\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
  }
@@ -1553,7 +1553,9 @@ export declare class Editor extends EventEmitter<TLEventMap> {
1553
1553
  */
1554
1554
  deselect(...shapes: TLShape[] | TLShapeId[]): this;
1555
1555
  /**
1556
- * Select all direct children of the current page.
1556
+ * Select all shapes. If the user has selected shapes that share a parent,
1557
+ * select all shapes within that parent. If the user has not selected any shapes,
1558
+ * or if the shapes shapes are only on select all shapes on the current page.
1557
1559
  *
1558
1560
  * @example
1559
1561
  * ```ts
@@ -298,7 +298,7 @@ function debugEnableLicensing() {
298
298
  }
299
299
  registerTldrawLibraryVersion(
300
300
  "@tldraw/editor",
301
- "3.15.0-canary.0f6bd23d7755",
301
+ "3.15.0-canary.14c6b9d1aa1e",
302
302
  "esm"
303
303
  );
304
304
  export {
@@ -1466,7 +1466,9 @@ class Editor extends (_a = EventEmitter, _getIsShapeHiddenCache_dec = [computed]
1466
1466
  return this;
1467
1467
  }
1468
1468
  /**
1469
- * Select all direct children of the current page.
1469
+ * Select all shapes. If the user has selected shapes that share a parent,
1470
+ * select all shapes within that parent. If the user has not selected any shapes,
1471
+ * or if the shapes shapes are only on select all shapes on the current page.
1470
1472
  *
1471
1473
  * @example
1472
1474
  * ```ts
@@ -1476,7 +1478,23 @@ class Editor extends (_a = EventEmitter, _getIsShapeHiddenCache_dec = [computed]
1476
1478
  * @public
1477
1479
  */
1478
1480
  selectAll() {
1479
- const ids = this.getSortedChildIdsForParent(this.getCurrentPageId());
1481
+ let parentToSelectWithinId = null;
1482
+ const selectedShapeIds = this.getSelectedShapeIds();
1483
+ if (selectedShapeIds.length > 0) {
1484
+ for (const id of selectedShapeIds) {
1485
+ const shape = this.getShape(id);
1486
+ if (!shape) continue;
1487
+ if (parentToSelectWithinId === null) {
1488
+ parentToSelectWithinId = shape.parentId;
1489
+ } else if (parentToSelectWithinId !== shape.parentId) {
1490
+ return this;
1491
+ }
1492
+ }
1493
+ }
1494
+ if (!parentToSelectWithinId) {
1495
+ parentToSelectWithinId = this.getCurrentPageId();
1496
+ }
1497
+ const ids = this.getSortedChildIdsForParent(parentToSelectWithinId);
1480
1498
  if (ids.length <= 0) return this;
1481
1499
  this.setSelectedShapes(this._getUnlockedShapeIds(ids));
1482
1500
  return this;