@remotion/animation-utils 4.0.97 → 4.0.100
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
|
@@ -119,15 +119,15 @@ const classifyParts = (parts) => {
|
|
|
119
119
|
const functionValues = classifyArgsOfFunction(functionMatch[2]);
|
|
120
120
|
return { function: { name: functionName, values: functionValues } };
|
|
121
121
|
}
|
|
122
|
-
// Check for a number possibly followed by a unit
|
|
123
|
-
const numberUnitMatch = part.match(/^(
|
|
122
|
+
// Check for a number possibly followed by a unit like '10px' or '10' or '-10px'
|
|
123
|
+
const numberUnitMatch = part.match(/^(-?\d+(?:\.\d+)?)([a-zA-Z%]*)$/);
|
|
124
124
|
if (numberUnitMatch) {
|
|
125
125
|
const number = parseFloat(numberUnitMatch[1]);
|
|
126
126
|
const unit = numberUnitMatch[2];
|
|
127
127
|
return unit ? { number, unit } : { number };
|
|
128
128
|
}
|
|
129
|
-
// Check for a number without a unit
|
|
130
|
-
const numberMatch = part.match(/^(
|
|
129
|
+
// Check for a number without a unit like '10' or '-10'
|
|
130
|
+
const numberMatch = part.match(/^(-?\d+(?:\.\d+)?)$/);
|
|
131
131
|
if (numberMatch) {
|
|
132
132
|
const number = parseFloat(numberMatch[1]);
|
|
133
133
|
return { number };
|
|
@@ -120,15 +120,15 @@ const classifyParts = (parts) => {
|
|
|
120
120
|
const functionValues = classifyArgsOfFunction(functionMatch[2]);
|
|
121
121
|
return { function: { name: functionName, values: functionValues } };
|
|
122
122
|
}
|
|
123
|
-
// Check for a number possibly followed by a unit
|
|
124
|
-
const numberUnitMatch = part.match(/^(
|
|
123
|
+
// Check for a number possibly followed by a unit like '10px' or '10' or '-10px'
|
|
124
|
+
const numberUnitMatch = part.match(/^(-?\d+(?:\.\d+)?)([a-zA-Z%]*)$/);
|
|
125
125
|
if (numberUnitMatch) {
|
|
126
126
|
const number = parseFloat(numberUnitMatch[1]);
|
|
127
127
|
const unit = numberUnitMatch[2];
|
|
128
128
|
return unit ? { number, unit } : { number };
|
|
129
129
|
}
|
|
130
|
-
// Check for a number without a unit
|
|
131
|
-
const numberMatch = part.match(/^(
|
|
130
|
+
// Check for a number without a unit like '10' or '-10'
|
|
131
|
+
const numberMatch = part.match(/^(-?\d+(?:\.\d+)?)$/);
|
|
132
132
|
if (numberMatch) {
|
|
133
133
|
const number = parseFloat(numberMatch[1]);
|
|
134
134
|
return { number };
|
package/package.json
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
"name": "Chetan Karwa",
|
|
5
5
|
"email": "cbkarwa@gmail.com"
|
|
6
6
|
},
|
|
7
|
-
"version": "4.0.
|
|
7
|
+
"version": "4.0.100",
|
|
8
8
|
"description": "A set of animation utilities for Remotion",
|
|
9
9
|
"main": "./dist/index.js",
|
|
10
10
|
"module": "./dist/index.mjs",
|
|
11
11
|
"types": "./dist/index.d.ts",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"remotion": "4.0.
|
|
13
|
+
"remotion": "4.0.100"
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
16
|
"dist",
|