@tldraw/editor 5.7.0-next.c1f7f00fa975 → 5.7.0-next.f64b0c9050e1

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 (31) hide show
  1. package/dist-cjs/index.d.ts +2 -8
  2. package/dist-cjs/index.js +1 -1
  3. package/dist-cjs/lib/components/default-components/DefaultErrorFallback.js +91 -29
  4. package/dist-cjs/lib/components/default-components/DefaultErrorFallback.js.map +2 -2
  5. package/dist-cjs/lib/editor/Editor.js +8 -2
  6. package/dist-cjs/lib/editor/Editor.js.map +2 -2
  7. package/dist-cjs/lib/editor/managers/ThemeManager/defaultThemes.js +3 -1
  8. package/dist-cjs/lib/editor/managers/ThemeManager/defaultThemes.js.map +2 -2
  9. package/dist-cjs/lib/editor/managers/ThemeManager/drawFontCheckbox.js +35 -0
  10. package/dist-cjs/lib/editor/managers/ThemeManager/drawFontCheckbox.js.map +7 -0
  11. package/dist-cjs/version.js +3 -3
  12. package/dist-cjs/version.js.map +1 -1
  13. package/dist-esm/index.d.mts +2 -8
  14. package/dist-esm/index.mjs +1 -1
  15. package/dist-esm/lib/components/default-components/DefaultErrorFallback.mjs +91 -29
  16. package/dist-esm/lib/components/default-components/DefaultErrorFallback.mjs.map +2 -2
  17. package/dist-esm/lib/editor/Editor.mjs +8 -2
  18. package/dist-esm/lib/editor/Editor.mjs.map +2 -2
  19. package/dist-esm/lib/editor/managers/ThemeManager/defaultThemes.mjs +3 -1
  20. package/dist-esm/lib/editor/managers/ThemeManager/defaultThemes.mjs.map +2 -2
  21. package/dist-esm/lib/editor/managers/ThemeManager/drawFontCheckbox.mjs +15 -0
  22. package/dist-esm/lib/editor/managers/ThemeManager/drawFontCheckbox.mjs.map +7 -0
  23. package/dist-esm/version.mjs +3 -3
  24. package/dist-esm/version.mjs.map +1 -1
  25. package/editor.css +266 -58
  26. package/package.json +7 -7
  27. package/src/lib/components/default-components/DefaultErrorFallback.tsx +84 -38
  28. package/src/lib/editor/Editor.ts +6 -2
  29. package/src/lib/editor/managers/ThemeManager/defaultThemes.ts +2 -0
  30. package/src/lib/editor/managers/ThemeManager/drawFontCheckbox.ts +18 -0
  31. package/src/version.ts +3 -3
@@ -1696,7 +1696,7 @@ class Editor extends EventEmitter {
1696
1696
  * can't be tabbed to. Use this for the children of a frame or group, which
1697
1697
  * {@link Editor.getCurrentPageShapesInReadingOrder} leaves out.
1698
1698
  *
1699
- * @public
1699
+ * @internal
1700
1700
  */
1701
1701
  getShapesInReadingOrder(shapes) {
1702
1702
  const SHALLOW_ANGLE = 20;
@@ -6667,7 +6667,7 @@ class Editor extends EventEmitter {
6667
6667
  }
6668
6668
  if (opacity !== null) return { type: "shared", value: opacity };
6669
6669
  }
6670
- return { type: "shared", value: this.getInstanceState().opacityForNextShape };
6670
+ return { type: "shared", value: this.getOpacityForNextShape() };
6671
6671
  }
6672
6672
  /**
6673
6673
  * Set the opacity for the next shapes. This will effect subsequently created shapes.
@@ -6684,6 +6684,9 @@ class Editor extends EventEmitter {
6684
6684
  this.updateInstanceState({ opacityForNextShape: opacity }, historyOptions);
6685
6685
  return this;
6686
6686
  }
6687
+ getOpacityForNextShape() {
6688
+ return this.getInstanceState().opacityForNextShape;
6689
+ }
6687
6690
  /**
6688
6691
  * Set the current opacity. This will effect any selected shapes.
6689
6692
  *
@@ -8672,6 +8675,9 @@ __decorateClass([
8672
8675
  __decorateClass([
8673
8676
  computed
8674
8677
  ], Editor.prototype, "getSharedOpacity", 1);
8678
+ __decorateClass([
8679
+ computed
8680
+ ], Editor.prototype, "getOpacityForNextShape", 1);
8675
8681
  __decorateClass([
8676
8682
  computed
8677
8683
  ], Editor.prototype, "getIsFocused", 1);