@remotion/shapes 4.0.142 → 4.0.144
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.
- package/bunfig.toml +2 -0
- package/dist/utils/make-polygon.js +6 -3
- package/dist/utils/make-star.js +6 -3
- package/happydom.ts +3 -0
- package/package.json +2 -2
package/bunfig.toml
ADDED
|
@@ -35,10 +35,13 @@ const makePolygon = ({ points, radius, cornerRadius = 0, edgeRoundness = null, }
|
|
|
35
35
|
cornerRadius,
|
|
36
36
|
edgeRoundness,
|
|
37
37
|
});
|
|
38
|
+
const reduced = (0, paths_1.reduceInstructions)(polygonPathInstructions);
|
|
39
|
+
const path = (0, paths_1.resetPath)((0, paths_1.serializeInstructions)(reduced));
|
|
40
|
+
const boundingBox = paths_1.PathInternals.getBoundingBoxFromInstructions(reduced);
|
|
38
41
|
return {
|
|
39
|
-
path
|
|
40
|
-
width,
|
|
41
|
-
height,
|
|
42
|
+
path,
|
|
43
|
+
width: boundingBox.width,
|
|
44
|
+
height: boundingBox.height,
|
|
42
45
|
transformOrigin: `${centerX} ${centerY}`,
|
|
43
46
|
instructions: polygonPathInstructions,
|
|
44
47
|
};
|
package/dist/utils/make-star.js
CHANGED
|
@@ -47,10 +47,13 @@ const makeStar = ({ points, innerRadius, outerRadius, cornerRadius = 0, edgeRoun
|
|
|
47
47
|
cornerRadius,
|
|
48
48
|
edgeRoundness,
|
|
49
49
|
});
|
|
50
|
+
const reduced = (0, paths_1.reduceInstructions)(starPathInstructions);
|
|
51
|
+
const path = (0, paths_1.resetPath)((0, paths_1.serializeInstructions)(reduced));
|
|
52
|
+
const boundingBox = paths_1.PathInternals.getBoundingBoxFromInstructions(reduced);
|
|
50
53
|
return {
|
|
51
|
-
path
|
|
52
|
-
width,
|
|
53
|
-
height,
|
|
54
|
+
path,
|
|
55
|
+
width: boundingBox.width,
|
|
56
|
+
height: boundingBox.height,
|
|
54
57
|
transformOrigin: `${centerX} ${centerY}`,
|
|
55
58
|
instructions: starPathInstructions,
|
|
56
59
|
};
|
package/happydom.ts
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/shapes",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.144",
|
|
4
4
|
"description": "Utility functions and components for SVG shapes",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"react-dom": ">=16.8.0"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@remotion/paths": "4.0.
|
|
41
|
+
"@remotion/paths": "4.0.144"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"formatting": "prettier src --check",
|