framer-motion 7.3.4 → 7.3.6

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/cjs/index.js CHANGED
@@ -506,7 +506,7 @@ function isForcedMotionValue(key, { layout, layoutId }) {
506
506
  (!!scaleCorrectors[key] || key === "opacity")));
507
507
  }
508
508
 
509
- const isMotionValue = (value) => value === undefined ? false : !!value.getVelocity;
509
+ const isMotionValue = (value) => !!(value === null || value === void 0 ? void 0 : value.getVelocity);
510
510
 
511
511
  const translateAlias = {
512
512
  x: "translateX",
@@ -2242,7 +2242,7 @@ class MotionValue {
2242
2242
  * This will be replaced by the build step with the latest version number.
2243
2243
  * When MotionValues are provided to motion components, warn if versions are mixed.
2244
2244
  */
2245
- this.version = "7.3.4";
2245
+ this.version = "7.3.6";
2246
2246
  /**
2247
2247
  * Duration, in milliseconds, since last updating frame.
2248
2248
  *
@@ -4218,7 +4218,7 @@ function updateMotionValuesFromProps(element, next, prev) {
4218
4218
  * and warn against mismatches.
4219
4219
  */
4220
4220
  if (process.env.NODE_ENV === "development") {
4221
- warnOnce(nextValue.version === "7.3.4", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.3.4 may not work as expected.`);
4221
+ warnOnce(nextValue.version === "7.3.6", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.3.6 may not work as expected.`);
4222
4222
  }
4223
4223
  }
4224
4224
  else if (isMotionValue(prevValue)) {
@@ -5573,7 +5573,7 @@ function boxEquals(a, b) {
5573
5573
  function aspectRatio(box) {
5574
5574
  return calcLength(box.x) / calcLength(box.y);
5575
5575
  }
5576
- function isCloseTo(a, b, max = 0.01) {
5576
+ function isCloseTo(a, b, max = 0.1) {
5577
5577
  return popmotion.distance(a, b) <= max;
5578
5578
  }
5579
5579
 
@@ -6942,7 +6942,7 @@ function roundBox(box) {
6942
6942
  function shouldAnimatePositionOnly(animationType, snapshot, layout) {
6943
6943
  return (animationType === "position" ||
6944
6944
  (animationType === "preserve-aspect" &&
6945
- !isCloseTo(aspectRatio(snapshot), aspectRatio(layout))));
6945
+ !isCloseTo(aspectRatio(snapshot), aspectRatio(layout), 0.2)));
6946
6946
  }
6947
6947
 
6948
6948
  const DocumentProjectionNode = createProjectionNode({
@@ -16,7 +16,7 @@ function boxEquals(a, b) {
16
16
  function aspectRatio(box) {
17
17
  return calcLength(box.x) / calcLength(box.y);
18
18
  }
19
- function isCloseTo(a, b, max = 0.01) {
19
+ function isCloseTo(a, b, max = 0.1) {
20
20
  return distance(a, b) <= max;
21
21
  }
22
22
 
@@ -1219,7 +1219,7 @@ function roundBox(box) {
1219
1219
  function shouldAnimatePositionOnly(animationType, snapshot, layout) {
1220
1220
  return (animationType === "position" ||
1221
1221
  (animationType === "preserve-aspect" &&
1222
- !isCloseTo(aspectRatio(snapshot), aspectRatio(layout))));
1222
+ !isCloseTo(aspectRatio(snapshot), aspectRatio(layout), 0.2)));
1223
1223
  }
1224
1224
 
1225
1225
  export { createProjectionNode, mixAxis, mixAxisDelta, mixBox };
@@ -22,7 +22,7 @@ function updateMotionValuesFromProps(element, next, prev) {
22
22
  * and warn against mismatches.
23
23
  */
24
24
  if (process.env.NODE_ENV === "development") {
25
- warnOnce(nextValue.version === "7.3.4", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.3.4 may not work as expected.`);
25
+ warnOnce(nextValue.version === "7.3.6", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.3.6 may not work as expected.`);
26
26
  }
27
27
  }
28
28
  else if (isMotionValue(prevValue)) {
@@ -24,7 +24,7 @@ class MotionValue {
24
24
  * This will be replaced by the build step with the latest version number.
25
25
  * When MotionValues are provided to motion components, warn if versions are mixed.
26
26
  */
27
- this.version = "7.3.4";
27
+ this.version = "7.3.6";
28
28
  /**
29
29
  * Duration, in milliseconds, since last updating frame.
30
30
  *
@@ -1,3 +1,3 @@
1
- const isMotionValue = (value) => value === undefined ? false : !!value.getVelocity;
1
+ const isMotionValue = (value) => !!(value === null || value === void 0 ? void 0 : value.getVelocity);
2
2
 
3
3
  export { isMotionValue };
@@ -500,7 +500,7 @@
500
500
  (!!scaleCorrectors[key] || key === "opacity")));
501
501
  }
502
502
 
503
- const isMotionValue = (value) => value === undefined ? false : !!value.getVelocity;
503
+ const isMotionValue = (value) => !!(value === null || value === void 0 ? void 0 : value.getVelocity);
504
504
 
505
505
  const translateAlias = {
506
506
  x: "translateX",
@@ -3410,7 +3410,7 @@
3410
3410
  * This will be replaced by the build step with the latest version number.
3411
3411
  * When MotionValues are provided to motion components, warn if versions are mixed.
3412
3412
  */
3413
- this.version = "7.3.4";
3413
+ this.version = "7.3.6";
3414
3414
  /**
3415
3415
  * Duration, in milliseconds, since last updating frame.
3416
3416
  *
@@ -5386,7 +5386,7 @@
5386
5386
  * and warn against mismatches.
5387
5387
  */
5388
5388
  {
5389
- warnOnce(nextValue.version === "7.3.4", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.3.4 may not work as expected.`);
5389
+ warnOnce(nextValue.version === "7.3.6", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.3.6 may not work as expected.`);
5390
5390
  }
5391
5391
  }
5392
5392
  else if (isMotionValue(prevValue)) {
@@ -6741,7 +6741,7 @@
6741
6741
  function aspectRatio(box) {
6742
6742
  return calcLength(box.x) / calcLength(box.y);
6743
6743
  }
6744
- function isCloseTo(a, b, max = 0.01) {
6744
+ function isCloseTo(a, b, max = 0.1) {
6745
6745
  return distance(a, b) <= max;
6746
6746
  }
6747
6747
 
@@ -8110,7 +8110,7 @@
8110
8110
  function shouldAnimatePositionOnly(animationType, snapshot, layout) {
8111
8111
  return (animationType === "position" ||
8112
8112
  (animationType === "preserve-aspect" &&
8113
- !isCloseTo(aspectRatio(snapshot), aspectRatio(layout))));
8113
+ !isCloseTo(aspectRatio(snapshot), aspectRatio(layout), 0.2)));
8114
8114
  }
8115
8115
 
8116
8116
  const DocumentProjectionNode = createProjectionNode({