@remotion/rough-notation 4.0.540 → 4.0.541

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.
@@ -94,6 +94,7 @@ var useElementSize = (ref) => {
94
94
  };
95
95
 
96
96
  // ../paths/dist/esm/index.mjs
97
+ import { NoReactInternals } from "remotion/no-react";
97
98
  import {
98
99
  interpolate
99
100
  } from "remotion/no-react";
@@ -1336,7 +1337,7 @@ var angleBetween = (v0, v1) => {
1336
1337
  const p = v0.x * v1.x + v0.y * v1.y;
1337
1338
  const n = Math.sqrt((v0.x ** 2 + v0.y ** 2) * (v1.x ** 2 + v1.y ** 2));
1338
1339
  const sign = v0.x * v1.y - v0.y * v1.x < 0 ? -1 : 1;
1339
- const angle = sign * Math.acos(p / n);
1340
+ const angle = sign * Math.acos(Math.max(-1, Math.min(1, p / n)));
1340
1341
  return angle;
1341
1342
  };
1342
1343
  var pointOnEllipticalArc = ({
@@ -1518,10 +1519,9 @@ var makeArc = ({
1518
1519
  const xDist = p2.x - p1.x;
1519
1520
  const yDist = p2.y - p1.y;
1520
1521
  const dist = Math.sqrt(xDist * xDist + yDist * yDist);
1521
- if (fractionLength < length - point_dist) {
1522
- return { x: -xDist / dist, y: -yDist / dist };
1523
- }
1524
- return { x: xDist / dist, y: yDist / dist };
1522
+ const forward = fractionLength < length - point_dist ? 1 : -1;
1523
+ const sign = NoReactInternals.ENABLE_V5_BREAKING_CHANGES ? forward : -forward;
1524
+ return { x: sign * xDist / dist, y: sign * yDist / dist };
1525
1525
  },
1526
1526
  getTotalLength: () => {
1527
1527
  return length;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/rough-notation",
3
- "version": "4.0.540",
3
+ "version": "4.0.541",
4
4
  "description": "Rough annotation primitives for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -26,8 +26,8 @@
26
26
  "url": "https://github.com/remotion-dev/remotion/issues"
27
27
  },
28
28
  "dependencies": {
29
- "@remotion/paths": "4.0.540",
30
- "remotion": "4.0.540",
29
+ "@remotion/paths": "4.0.541",
30
+ "remotion": "4.0.541",
31
31
  "roughjs": "4.6.6"
32
32
  },
33
33
  "peerDependencies": {
@@ -45,7 +45,7 @@
45
45
  "devDependencies": {
46
46
  "react": "19.3.1",
47
47
  "react-dom": "19.3.1",
48
- "@remotion/eslint-config-internal": "4.0.540",
48
+ "@remotion/eslint-config-internal": "4.0.541",
49
49
  "eslint": "9.19.0",
50
50
  "typescript": "7.1.0-beta"
51
51
  },