@routevn/creator-model 1.13.0 → 1.13.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/model.js +18 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@routevn/creator-model",
3
- "version": "1.13.0",
3
+ "version": "1.13.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/model.js CHANGED
@@ -1685,7 +1685,14 @@ const validateAnimationKeyframes = ({ keyframes, path, errorFactory }) => {
1685
1685
  {
1686
1686
  const result = validateAllowedKeys({
1687
1687
  value: keyframe,
1688
- allowedKeys: ["value", "duration", "delay", "easing", "relative"],
1688
+ allowedKeys: [
1689
+ "startValue",
1690
+ "value",
1691
+ "duration",
1692
+ "delay",
1693
+ "easing",
1694
+ "relative",
1695
+ ],
1689
1696
  path: keyframePath,
1690
1697
  errorFactory,
1691
1698
  });
@@ -1715,6 +1722,16 @@ const validateAnimationKeyframes = ({ keyframes, path, errorFactory }) => {
1715
1722
  );
1716
1723
  }
1717
1724
 
1725
+ if (
1726
+ keyframe.startValue !== undefined &&
1727
+ !isFiniteNumber(keyframe.startValue)
1728
+ ) {
1729
+ return invalidFromErrorFactory(
1730
+ errorFactory,
1731
+ `${keyframePath}.startValue must be a finite number when provided`,
1732
+ );
1733
+ }
1734
+
1718
1735
  if (!isFiniteNumber(keyframe.duration) || keyframe.duration < 1) {
1719
1736
  return invalidFromErrorFactory(
1720
1737
  errorFactory,