@tldraw/editor 3.11.0 → 3.11.2

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 (34) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/dist-cjs/index.js +1 -1
  3. package/dist-cjs/lib/editor/Editor.js +7 -12
  4. package/dist-cjs/lib/editor/Editor.js.map +2 -2
  5. package/dist-cjs/lib/exports/StyleEmbedder.js +19 -5
  6. package/dist-cjs/lib/exports/StyleEmbedder.js.map +2 -2
  7. package/dist-cjs/lib/exports/cssRules.js +127 -0
  8. package/dist-cjs/lib/exports/cssRules.js.map +7 -0
  9. package/dist-cjs/lib/exports/parseCss.js +0 -69
  10. package/dist-cjs/lib/exports/parseCss.js.map +2 -2
  11. package/dist-cjs/lib/hooks/useGestureEvents.js +12 -6
  12. package/dist-cjs/lib/hooks/useGestureEvents.js.map +2 -2
  13. package/dist-cjs/version.js +2 -2
  14. package/dist-cjs/version.js.map +1 -1
  15. package/dist-esm/index.mjs +1 -1
  16. package/dist-esm/lib/editor/Editor.mjs +7 -12
  17. package/dist-esm/lib/editor/Editor.mjs.map +2 -2
  18. package/dist-esm/lib/exports/StyleEmbedder.mjs +21 -12
  19. package/dist-esm/lib/exports/StyleEmbedder.mjs.map +2 -2
  20. package/dist-esm/lib/exports/cssRules.mjs +107 -0
  21. package/dist-esm/lib/exports/cssRules.mjs.map +7 -0
  22. package/dist-esm/lib/exports/parseCss.mjs +0 -69
  23. package/dist-esm/lib/exports/parseCss.mjs.map +2 -2
  24. package/dist-esm/lib/hooks/useGestureEvents.mjs +12 -6
  25. package/dist-esm/lib/hooks/useGestureEvents.mjs.map +2 -2
  26. package/dist-esm/version.mjs +2 -2
  27. package/dist-esm/version.mjs.map +1 -1
  28. package/package.json +7 -7
  29. package/src/lib/editor/Editor.ts +7 -12
  30. package/src/lib/exports/StyleEmbedder.ts +25 -15
  31. package/src/lib/exports/cssRules.ts +126 -0
  32. package/src/lib/exports/parseCss.ts +0 -79
  33. package/src/lib/hooks/useGestureEvents.ts +12 -6
  34. package/src/version.ts +2 -2
package/CHANGELOG.md CHANGED
@@ -1,3 +1,47 @@
1
+ # v3.11.2 (Thu Aug 28 2025)
2
+
3
+ ### Release Notes
4
+
5
+ #### Alex/3.11.1 ([#5811](https://github.com/tldraw/tldraw/pull/5811))
6
+
7
+ - Fix the zoomSpeed setting not being correctly applied to pinch gestures
8
+ - Fix unexpected borders showing in exports from pages that use tailwindcss
9
+
10
+ ---
11
+
12
+ #### 🐛 Bug Fix
13
+
14
+ - Update CHANGELOG.md \[skip ci\] ([@huppy-bot[bot]](https://github.com/huppy-bot[bot]))
15
+ - Alex/3.11.1 [#5811](https://github.com/tldraw/tldraw/pull/5811) ([@SomeHats](https://github.com/SomeHats))
16
+
17
+ #### Authors: 2
18
+
19
+ - [@huppy-bot[bot]](https://github.com/huppy-bot[bot])
20
+ - alex ([@SomeHats](https://github.com/SomeHats))
21
+
22
+ ---
23
+
24
+ # v3.11.1 (Thu Apr 03 2025)
25
+
26
+ ### Release Notes
27
+
28
+ #### Alex/3.11.1 ([#5811](https://github.com/tldraw/tldraw/pull/5811))
29
+
30
+ - Fix the zoomSpeed setting not being correctly applied to pinch gestures
31
+ - Fix unexpected borders showing in exports from pages that use tailwindcss
32
+
33
+ ---
34
+
35
+ #### 🐛 Bug Fix
36
+
37
+ - Alex/3.11.1 [#5811](https://github.com/tldraw/tldraw/pull/5811) ([@SomeHats](https://github.com/SomeHats))
38
+
39
+ #### Authors: 1
40
+
41
+ - alex ([@SomeHats](https://github.com/SomeHats))
42
+
43
+ ---
44
+
1
45
  # v3.11.0 (Thu Mar 20 2025)
2
46
 
3
47
  ### Release Notes
package/dist-cjs/index.js CHANGED
@@ -374,7 +374,7 @@ function debugEnableLicensing() {
374
374
  }
375
375
  (0, import_utils.registerTldrawLibraryVersion)(
376
376
  "@tldraw/editor",
377
- "3.11.0",
377
+ "3.11.2",
378
378
  "cjs"
379
379
  );
380
380
  //# sourceMappingURL=index.js.map
@@ -7201,12 +7201,12 @@ class Editor extends (_a = import_eventemitter3.default, _getIsShapeHiddenCache_
7201
7201
  this.stopFollowingUser();
7202
7202
  }
7203
7203
  const { x: cx, y: cy, z: cz } = (0, import_state.unsafe__withoutCapture)(() => this.getCamera());
7204
- const { panSpeed, zoomSpeed } = cameraOptions;
7204
+ const { panSpeed } = cameraOptions;
7205
7205
  this._setCamera(
7206
7206
  new import_Vec.Vec(
7207
- cx + dx * panSpeed / cz - x / cz + x / (z * zoomSpeed),
7208
- cy + dy * panSpeed / cz - y / cz + y / (z * zoomSpeed),
7209
- z * zoomSpeed
7207
+ cx + dx * panSpeed / cz - x / cz + x / z,
7208
+ cy + dy * panSpeed / cz - y / cz + y / z,
7209
+ z
7210
7210
  ),
7211
7211
  { immediate: true }
7212
7212
  );
@@ -7257,14 +7257,9 @@ class Editor extends (_a = import_eventemitter3.default, _getIsShapeHiddenCache_
7257
7257
  }
7258
7258
  }
7259
7259
  const zoom = cz + (delta ?? 0) * zoomSpeed * cz;
7260
- this._setCamera(
7261
- new import_Vec.Vec(
7262
- cx + (x / zoom - x) - (x / cz - x),
7263
- cy + (y / zoom - y) - (y / cz - y),
7264
- zoom
7265
- ),
7266
- { immediate: true }
7267
- );
7260
+ this._setCamera(new import_Vec.Vec(cx + x / zoom - x / cz, cy + y / zoom - y / cz, zoom), {
7261
+ immediate: true
7262
+ });
7268
7263
  this.maybeTrackPerformance("Zooming");
7269
7264
  return;
7270
7265
  }