@remotion/rough-notation 4.0.538 → 4.0.540

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.
@@ -1357,7 +1357,11 @@ var pointOnEllipticalArc = ({
1357
1357
  return { x: p0.x, y: p0.y, ellipticalArcAngle: 0 };
1358
1358
  }
1359
1359
  if (rx === 0 || ry === 0) {
1360
- return { x: 0, y: 0, ellipticalArcAngle: 0 };
1360
+ return {
1361
+ x: p0.x + (p1.x - p0.x) * t,
1362
+ y: p0.y + (p1.y - p0.y) * t,
1363
+ ellipticalArcAngle: 0
1364
+ };
1361
1365
  }
1362
1366
  const dx = (p0.x - p1.x) / 2;
1363
1367
  const dy = (p0.y - p1.y) / 2;
@@ -1755,9 +1759,9 @@ var constructFromInstructions = (instructions) => {
1755
1759
  if (instruction.type === "q") {
1756
1760
  if (instruction.cpdx === 0 && instruction.cpdy === 0) {
1757
1761
  const linearCurve = makeLinearPosition({
1758
- x0: cur[0] + instruction.cpdx,
1759
- x1: cur[0] + instruction.cpdy,
1760
- y0: cur[1] + instruction.dx,
1762
+ x0: cur[0],
1763
+ x1: cur[0] + instruction.dx,
1764
+ y0: cur[1],
1761
1765
  y1: cur[1] + instruction.dy
1762
1766
  });
1763
1767
  totalLength += linearCurve.getTotalLength();
@@ -1801,7 +1805,7 @@ var constructFromInstructions = (instructions) => {
1801
1805
  functions.push(linearCurve);
1802
1806
  totalLength += linearCurve.getTotalLength();
1803
1807
  }
1804
- prev_point = [2 * cur[0] - prev_point[0], 2 * cur[1] - prev_point[1]];
1808
+ prev_point = prevWasQ ? [2 * cur[0] - prev_point[0], 2 * cur[1] - prev_point[1]] : [cur[0], cur[1]];
1805
1809
  cur = [instruction.x, instruction.y];
1806
1810
  }
1807
1811
  if (instruction.type === "t") {
@@ -1828,7 +1832,7 @@ var constructFromInstructions = (instructions) => {
1828
1832
  totalLength += linearCurve.getTotalLength();
1829
1833
  functions.push(linearCurve);
1830
1834
  }
1831
- prev_point = [2 * cur[0] - prev_point[0], 2 * cur[1] - prev_point[1]];
1835
+ prev_point = prevWasQ ? [2 * cur[0] - prev_point[0], 2 * cur[1] - prev_point[1]] : [cur[0], cur[1]];
1832
1836
  cur = [instruction.dx + cur[0], instruction.dy + cur[1]];
1833
1837
  }
1834
1838
  if (instruction.type === "A") {
@@ -19,4 +19,4 @@ export declare const renderAnnotation: ({ rect, config, seed, progress, options,
19
19
  readonly seed: number;
20
20
  readonly progress: number;
21
21
  readonly options: RoughAnnotationOptions;
22
- }) => import("react/jsx-runtime").JSX.Element[];
22
+ }) => import("react").JSX.Element[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/rough-notation",
3
- "version": "4.0.538",
3
+ "version": "4.0.540",
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.538",
30
- "remotion": "4.0.538",
29
+ "@remotion/paths": "4.0.540",
30
+ "remotion": "4.0.540",
31
31
  "roughjs": "4.6.6"
32
32
  },
33
33
  "peerDependencies": {
@@ -43,9 +43,9 @@
43
43
  "./package.json": "./package.json"
44
44
  },
45
45
  "devDependencies": {
46
- "react": "19.2.3",
47
- "react-dom": "19.2.3",
48
- "@remotion/eslint-config-internal": "4.0.538",
46
+ "react": "19.3.1",
47
+ "react-dom": "19.3.1",
48
+ "@remotion/eslint-config-internal": "4.0.540",
49
49
  "eslint": "9.19.0",
50
50
  "typescript": "7.1.0-beta"
51
51
  },