@remotion/animation-utils 4.0.107 → 4.0.109

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.
@@ -76,7 +76,7 @@ const classifyArgsOfFunction = (value) => {
76
76
  values.push(currentValue.trim());
77
77
  // Classify each value
78
78
  return values.map((val) => {
79
- const numberUnitMatch = val.match(/^(\d+(?:\.\d+)?)([a-zA-Z%]*)$/);
79
+ const numberUnitMatch = val.match(/^(-?\d+(?:\.\d+)?)([a-zA-Z%]*)$/);
80
80
  if (numberUnitMatch) {
81
81
  const number = parseFloat(numberUnitMatch[1]);
82
82
  const unit = numberUnitMatch[2];
@@ -232,7 +232,8 @@ const interpolateProperty = ({ inputValue, inputRange, initialStyleProperty, fin
232
232
  const interpolateStylesFunction = ({ inputValue, inputRange, initialStyle, finalStyle, options, }) => {
233
233
  const [startingValue, endingValue] = inputRange;
234
234
  return Object.keys(initialStyle).reduce((acc, key) => {
235
- if (!finalStyle[key]) {
235
+ const value = finalStyle[key];
236
+ if (value === undefined || value === null) {
236
237
  return {
237
238
  ...acc,
238
239
  [key]: initialStyle[key],
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { InterpolateOptions } from 'remotion';
3
2
  import type { Style } from '../../type';
4
3
  /**
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { InterpolateOptions } from 'remotion';
3
2
  import type { Style } from '../../type';
4
3
  /**
@@ -88,7 +88,8 @@ const interpolateProperty = ({ inputValue, inputRange, initialStyleProperty, fin
88
88
  const interpolateStylesFunction = ({ inputValue, inputRange, initialStyle, finalStyle, options, }) => {
89
89
  const [startingValue, endingValue] = inputRange;
90
90
  return Object.keys(initialStyle).reduce((acc, key) => {
91
- if (!finalStyle[key]) {
91
+ const value = finalStyle[key];
92
+ if (value === undefined || value === null) {
92
93
  return {
93
94
  ...acc,
94
95
  [key]: initialStyle[key],
@@ -77,7 +77,7 @@ const classifyArgsOfFunction = (value) => {
77
77
  values.push(currentValue.trim());
78
78
  // Classify each value
79
79
  return values.map((val) => {
80
- const numberUnitMatch = val.match(/^(\d+(?:\.\d+)?)([a-zA-Z%]*)$/);
80
+ const numberUnitMatch = val.match(/^(-?\d+(?:\.\d+)?)([a-zA-Z%]*)$/);
81
81
  if (numberUnitMatch) {
82
82
  const number = parseFloat(numberUnitMatch[1]);
83
83
  const unit = numberUnitMatch[2];
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.107",
7
+ "version": "4.0.109",
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.107"
13
+ "remotion": "4.0.109"
14
14
  },
15
15
  "files": [
16
16
  "dist",