framer-motion 12.24.5 → 12.24.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/client.js +1 -1
- package/dist/cjs/dom.js +17 -9
- package/dist/cjs/dom.js.map +1 -1
- package/dist/cjs/{feature-bundle-BwaqZAbT.js → feature-bundle-C6mMBZjn.js} +18 -10
- package/dist/cjs/feature-bundle-C6mMBZjn.js.map +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/dom.js +1 -1
- package/dist/es/render/VisualElement.mjs +16 -8
- package/dist/es/render/VisualElement.mjs.map +1 -1
- package/dist/framer-motion.dev.js +16 -8
- package/dist/framer-motion.js +1 -1
- package/dist/size-rollup-animate.js +1 -1
- package/dist/size-rollup-animate.js.map +1 -1
- package/dist/size-rollup-dom-animation.js +1 -1
- package/dist/size-rollup-dom-max.js +1 -1
- package/dist/size-rollup-motion.js +1 -1
- package/dist/size-rollup-motion.js.map +1 -1
- package/package.json +2 -2
- package/dist/cjs/feature-bundle-BwaqZAbT.js.map +0 -1
package/dist/cjs/client.js
CHANGED
package/dist/cjs/dom.js
CHANGED
|
@@ -974,15 +974,23 @@ class VisualElement {
|
|
|
974
974
|
this.removeFromVariantTree = this.parent.addVariantChild(this);
|
|
975
975
|
}
|
|
976
976
|
this.values.forEach((value, key) => this.bindToMotionValue(key, value));
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
977
|
+
/**
|
|
978
|
+
* Determine reduced motion preference. Only initialize the matchMedia
|
|
979
|
+
* listener if we actually need the dynamic value (i.e., when config
|
|
980
|
+
* is neither "never" nor "always").
|
|
981
|
+
*/
|
|
982
|
+
if (this.reducedMotionConfig === "never") {
|
|
983
|
+
this.shouldReduceMotion = false;
|
|
984
|
+
}
|
|
985
|
+
else if (this.reducedMotionConfig === "always") {
|
|
986
|
+
this.shouldReduceMotion = true;
|
|
987
|
+
}
|
|
988
|
+
else {
|
|
989
|
+
if (!hasReducedMotionListener.current) {
|
|
990
|
+
initPrefersReducedMotion();
|
|
991
|
+
}
|
|
992
|
+
this.shouldReduceMotion = prefersReducedMotion.current;
|
|
993
|
+
}
|
|
986
994
|
if (process.env.NODE_ENV !== "production") {
|
|
987
995
|
motionUtils.warnOnce(this.shouldReduceMotion !== true, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled");
|
|
988
996
|
}
|