@tldraw/editor 3.15.0-canary.73ea7178c697 → 3.15.0-canary.751e1c683ca5

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 (32) hide show
  1. package/dist-cjs/index.d.ts +4 -5
  2. package/dist-cjs/index.js +1 -1
  3. package/dist-cjs/lib/editor/Editor.js +2 -20
  4. package/dist-cjs/lib/editor/Editor.js.map +2 -2
  5. package/dist-cjs/lib/editor/managers/TextManager/TextManager.js +101 -96
  6. package/dist-cjs/lib/editor/managers/TextManager/TextManager.js.map +2 -2
  7. package/dist-cjs/lib/primitives/intersect.js +4 -4
  8. package/dist-cjs/lib/primitives/intersect.js.map +2 -2
  9. package/dist-cjs/lib/primitives/utils.js +0 -4
  10. package/dist-cjs/lib/primitives/utils.js.map +2 -2
  11. package/dist-cjs/version.js +3 -3
  12. package/dist-cjs/version.js.map +1 -1
  13. package/dist-esm/index.d.mts +4 -5
  14. package/dist-esm/index.mjs +1 -1
  15. package/dist-esm/lib/editor/Editor.mjs +2 -20
  16. package/dist-esm/lib/editor/Editor.mjs.map +2 -2
  17. package/dist-esm/lib/editor/managers/TextManager/TextManager.mjs +101 -96
  18. package/dist-esm/lib/editor/managers/TextManager/TextManager.mjs.map +2 -2
  19. package/dist-esm/lib/primitives/intersect.mjs +5 -5
  20. package/dist-esm/lib/primitives/intersect.mjs.map +2 -2
  21. package/dist-esm/lib/primitives/utils.mjs +0 -4
  22. package/dist-esm/lib/primitives/utils.mjs.map +2 -2
  23. package/dist-esm/version.mjs +3 -3
  24. package/dist-esm/version.mjs.map +1 -1
  25. package/package.json +7 -7
  26. package/src/lib/editor/Editor.test.ts +0 -407
  27. package/src/lib/editor/Editor.ts +4 -29
  28. package/src/lib/editor/managers/TextManager/TextManager.ts +128 -108
  29. package/src/lib/primitives/intersect.ts +5 -12
  30. package/src/lib/primitives/utils.ts +0 -11
  31. package/src/version.ts +3 -3
  32. package/src/lib/primitives/intersect.test.ts +0 -946
@@ -1553,9 +1553,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
1553
1553
  */
1554
1554
  deselect(...shapes: TLShape[] | TLShapeId[]): this;
1555
1555
  /**
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.
1556
+ * Select all direct children of the current page.
1559
1557
  *
1560
1558
  * @example
1561
1559
  * ```ts
@@ -4519,7 +4517,7 @@ export declare function intersectLineSegmentCircle(a1: VecLike, a2: VecLike, c:
4519
4517
  * @param b2 - The second segment's second point.
4520
4518
  * @public
4521
4519
  */
4522
- export declare function intersectLineSegmentLineSegment(a1: VecLike, a2: VecLike, b1: VecLike, b2: VecLike, precision?: number): null | Vec;
4520
+ export declare function intersectLineSegmentLineSegment(a1: VecLike, a2: VecLike, b1: VecLike, b2: VecLike): null | Vec;
4523
4521
 
4524
4522
  /**
4525
4523
  * Find the intersections between a line segment and a closed polygon.
@@ -5797,9 +5795,10 @@ export declare const TAB_ID: string;
5797
5795
  export declare class TextManager {
5798
5796
  editor: Editor;
5799
5797
  private elm;
5798
+ private defaultStyles;
5800
5799
  constructor(editor: Editor);
5801
- private setElementStyles;
5802
5800
  dispose(): void;
5801
+ private resetElmStyles;
5803
5802
  measureText(textToMeasure: string, opts: TLMeasureTextOpts): BoxModel & {
5804
5803
  scrollWidth: number;
5805
5804
  };
@@ -298,7 +298,7 @@ function debugEnableLicensing() {
298
298
  }
299
299
  registerTldrawLibraryVersion(
300
300
  "@tldraw/editor",
301
- "3.15.0-canary.73ea7178c697",
301
+ "3.15.0-canary.751e1c683ca5",
302
302
  "esm"
303
303
  );
304
304
  export {
@@ -1466,9 +1466,7 @@ class Editor extends (_a = EventEmitter, _getIsShapeHiddenCache_dec = [computed]
1466
1466
  return this;
1467
1467
  }
1468
1468
  /**
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.
1469
+ * Select all direct children of the current page.
1472
1470
  *
1473
1471
  * @example
1474
1472
  * ```ts
@@ -1478,23 +1476,7 @@ class Editor extends (_a = EventEmitter, _getIsShapeHiddenCache_dec = [computed]
1478
1476
  * @public
1479
1477
  */
1480
1478
  selectAll() {
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);
1479
+ const ids = this.getSortedChildIdsForParent(this.getCurrentPageId());
1498
1480
  if (ids.length <= 0) return this;
1499
1481
  this.setSelectedShapes(this._getUnlockedShapeIds(ids));
1500
1482
  return this;