@remotion/paths 4.0.497 → 4.0.499
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/dist/esm/index.mjs
CHANGED
|
@@ -2866,6 +2866,9 @@ var getInstructionIndexAtLength = (path, length2) => {
|
|
|
2866
2866
|
// src/get-point-at-length.ts
|
|
2867
2867
|
var getPointAtLength = (path, length2) => {
|
|
2868
2868
|
const constructed = construct(path);
|
|
2869
|
+
if (length2 > constructed.totalLength) {
|
|
2870
|
+
return null;
|
|
2871
|
+
}
|
|
2869
2872
|
const fractionPart = getInstructionIndexAtLengthFromConstructed(constructed, length2);
|
|
2870
2873
|
const functionAtPart = constructed.functions[fractionPart.index + 1];
|
|
2871
2874
|
if (functionAtPart) {
|
|
@@ -2887,6 +2890,9 @@ var getSubpaths = (path) => {
|
|
|
2887
2890
|
// src/get-tangent-at-length.ts
|
|
2888
2891
|
var getTangentAtLength = (path, length2) => {
|
|
2889
2892
|
const constructed = construct(path);
|
|
2893
|
+
if (length2 > constructed.totalLength) {
|
|
2894
|
+
return null;
|
|
2895
|
+
}
|
|
2890
2896
|
const fractionPart = getInstructionIndexAtLengthFromConstructed(constructed, length2);
|
|
2891
2897
|
const functionAtPart = constructed.functions[fractionPart.index + 1];
|
|
2892
2898
|
if (functionAtPart) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getPointAtLength: (path: string, length: number) => import("./helpers/types").Point;
|
|
1
|
+
export declare const getPointAtLength: (path: string, length: number) => import("./helpers/types").Point | null;
|
|
@@ -9,6 +9,9 @@ const construct_1 = require("./helpers/construct");
|
|
|
9
9
|
*/
|
|
10
10
|
const getPointAtLength = (path, length) => {
|
|
11
11
|
const constructed = (0, construct_1.construct)(path);
|
|
12
|
+
if (length > constructed.totalLength) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
12
15
|
const fractionPart = (0, get_instruction_index_at_length_1.getInstructionIndexAtLengthFromConstructed)(constructed, length);
|
|
13
16
|
const functionAtPart = constructed.functions[fractionPart.index + 1];
|
|
14
17
|
if (functionAtPart) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getTangentAtLength: (path: string, length: number) => import("./helpers/types").Point;
|
|
1
|
+
export declare const getTangentAtLength: (path: string, length: number) => import("./helpers/types").Point | null;
|
|
@@ -9,6 +9,9 @@ const construct_1 = require("./helpers/construct");
|
|
|
9
9
|
*/
|
|
10
10
|
const getTangentAtLength = (path, length) => {
|
|
11
11
|
const constructed = (0, construct_1.construct)(path);
|
|
12
|
+
if (length > constructed.totalLength) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
12
15
|
const fractionPart = (0, get_instruction_index_at_length_1.getInstructionIndexAtLengthFromConstructed)(constructed, length);
|
|
13
16
|
const functionAtPart = constructed.functions[fractionPart.index + 1];
|
|
14
17
|
if (functionAtPart) {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/paths"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/paths",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.499",
|
|
7
7
|
"description": "Utilities for working with SVG paths",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"utilities"
|
|
27
27
|
],
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
29
|
+
"@remotion/eslint-config-internal": "4.0.499",
|
|
30
30
|
"eslint": "9.19.0",
|
|
31
31
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
32
32
|
},
|