framer-motion 11.2.1 → 11.2.3

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/index.d.ts CHANGED
@@ -5187,7 +5187,7 @@ interface NativeAnimationOptions {
5187
5187
  repeatType?: "loop" | "reverse" | "mirror";
5188
5188
  }
5189
5189
 
5190
- type HandoffFunction = (storeId: string, valueName: string, _value?: MotionValue, _frame?: Batcher) => null | number;
5190
+ type HandoffFunction = (storeId: string, valueName: string, value?: MotionValue, frame?: Batcher) => null | number;
5191
5191
  /**
5192
5192
  * The window global object acts as a bridge between our inline script
5193
5193
  * triggering the optimized appear animations, and Framer Motion.
@@ -1013,7 +1013,7 @@
1013
1013
  * This will be replaced by the build step with the latest version number.
1014
1014
  * When MotionValues are provided to motion components, warn if versions are mixed.
1015
1015
  */
1016
- this.version = "11.2.1";
1016
+ this.version = "11.2.3";
1017
1017
  /**
1018
1018
  * Tracks whether this value can output a velocity. Currently this is only true
1019
1019
  * if the value is numerical, but we might be able to widen the scope here and support
@@ -1021,7 +1021,7 @@
1021
1021
  *
1022
1022
  * @internal
1023
1023
  */
1024
- this.canTrackVelocity = false;
1024
+ this.canTrackVelocity = null;
1025
1025
  /**
1026
1026
  * An object containing a SubscriptionManager for each active event.
1027
1027
  */
@@ -1049,12 +1049,14 @@
1049
1049
  };
1050
1050
  this.hasAnimated = false;
1051
1051
  this.setCurrent(init);
1052
- this.canTrackVelocity = isFloat(this.current);
1053
1052
  this.owner = options.owner;
1054
1053
  }
1055
1054
  setCurrent(current) {
1056
1055
  this.current = current;
1057
1056
  this.updatedAt = time.now();
1057
+ if (this.canTrackVelocity === null && current !== undefined) {
1058
+ this.canTrackVelocity = isFloat(this.current);
1059
+ }
1058
1060
  }
1059
1061
  setPrevFrameValue(prevFrameValue = this.current) {
1060
1062
  this.prevFrameValue = prevFrameValue;
@@ -4040,7 +4042,7 @@
4040
4042
  * and warn against mismatches.
4041
4043
  */
4042
4044
  {
4043
- warnOnce(nextValue.version === "11.2.1", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.2.1 may not work as expected.`);
4045
+ warnOnce(nextValue.version === "11.2.3", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.2.3 may not work as expected.`);
4044
4046
  }
4045
4047
  }
4046
4048
  else if (isMotionValue(prevValue)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "framer-motion",
3
- "version": "11.2.1",
3
+ "version": "11.2.3",
4
4
  "description": "A simple and powerful JavaScript animation library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/es/index.mjs",
@@ -87,7 +87,7 @@
87
87
  "bundlesize": [
88
88
  {
89
89
  "path": "./dist/size-rollup-motion.js",
90
- "maxSize": "32.8 kB"
90
+ "maxSize": "32.81 kB"
91
91
  },
92
92
  {
93
93
  "path": "./dist/size-rollup-m.js",
@@ -118,5 +118,5 @@
118
118
  "maxSize": "34.1 kB"
119
119
  }
120
120
  ],
121
- "gitHead": "c53765c1508b1d6d341ba8cbf7beeb532e9a984d"
121
+ "gitHead": "d4826ad89b9836dc7fc3cbd5bf83df6f6c669834"
122
122
  }