framer-motion 8.4.2 → 8.4.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/cjs/index.js CHANGED
@@ -4166,17 +4166,7 @@ function animateTarget(visualElement, definition, { delay = 0, transitionOverrid
4166
4166
  shouldBlockAnimation(animationTypeState, key))) {
4167
4167
  continue;
4168
4168
  }
4169
- let valueTransition = { delay, elapsed: 0, ...transition };
4170
- /**
4171
- * Make animation instant if this is a transform prop and we should reduce motion.
4172
- */
4173
- if (visualElement.shouldReduceMotion && transformProps.has(key)) {
4174
- valueTransition = {
4175
- ...valueTransition,
4176
- type: false,
4177
- delay: 0,
4178
- };
4179
- }
4169
+ const valueTransition = { delay, elapsed: 0, ...transition };
4180
4170
  /**
4181
4171
  * If this is the first time a value is being animated, check
4182
4172
  * to see if we're handling off from an existing animation.
@@ -4187,7 +4177,9 @@ function animateTarget(visualElement, definition, { delay = 0, transitionOverrid
4187
4177
  valueTransition.elapsed = handoffOptimizedAppearAnimation(appearId, key);
4188
4178
  }
4189
4179
  }
4190
- let animation = value.start(createMotionValueAnimation(key, value, valueTarget, valueTransition));
4180
+ let animation = value.start(createMotionValueAnimation(key, value, valueTarget, visualElement.shouldReduceMotion && transformProps.has(key)
4181
+ ? { type: false }
4182
+ : valueTransition));
4191
4183
  if (isWillChangeMotionValue(willChange)) {
4192
4184
  willChange.add(key);
4193
4185
  animation = animation.then(() => willChange.remove(key));
@@ -83,17 +83,7 @@ function animateTarget(visualElement, definition, { delay = 0, transitionOverrid
83
83
  shouldBlockAnimation(animationTypeState, key))) {
84
84
  continue;
85
85
  }
86
- let valueTransition = { delay, elapsed: 0, ...transition };
87
- /**
88
- * Make animation instant if this is a transform prop and we should reduce motion.
89
- */
90
- if (visualElement.shouldReduceMotion && transformProps.has(key)) {
91
- valueTransition = {
92
- ...valueTransition,
93
- type: false,
94
- delay: 0,
95
- };
96
- }
86
+ const valueTransition = { delay, elapsed: 0, ...transition };
97
87
  /**
98
88
  * If this is the first time a value is being animated, check
99
89
  * to see if we're handling off from an existing animation.
@@ -104,7 +94,9 @@ function animateTarget(visualElement, definition, { delay = 0, transitionOverrid
104
94
  valueTransition.elapsed = handoffOptimizedAppearAnimation(appearId, key);
105
95
  }
106
96
  }
107
- let animation = value.start(createMotionValueAnimation(key, value, valueTarget, valueTransition));
97
+ let animation = value.start(createMotionValueAnimation(key, value, valueTarget, visualElement.shouldReduceMotion && transformProps.has(key)
98
+ ? { type: false }
99
+ : valueTransition));
108
100
  if (isWillChangeMotionValue(willChange)) {
109
101
  willChange.add(key);
110
102
  animation = animation.then(() => willChange.remove(key));
@@ -4179,17 +4179,7 @@
4179
4179
  shouldBlockAnimation(animationTypeState, key))) {
4180
4180
  continue;
4181
4181
  }
4182
- let valueTransition = { delay, elapsed: 0, ...transition };
4183
- /**
4184
- * Make animation instant if this is a transform prop and we should reduce motion.
4185
- */
4186
- if (visualElement.shouldReduceMotion && transformProps.has(key)) {
4187
- valueTransition = {
4188
- ...valueTransition,
4189
- type: false,
4190
- delay: 0,
4191
- };
4192
- }
4182
+ const valueTransition = { delay, elapsed: 0, ...transition };
4193
4183
  /**
4194
4184
  * If this is the first time a value is being animated, check
4195
4185
  * to see if we're handling off from an existing animation.
@@ -4200,7 +4190,9 @@
4200
4190
  valueTransition.elapsed = handoffOptimizedAppearAnimation(appearId, key);
4201
4191
  }
4202
4192
  }
4203
- let animation = value.start(createMotionValueAnimation(key, value, valueTarget, valueTransition));
4193
+ let animation = value.start(createMotionValueAnimation(key, value, valueTarget, visualElement.shouldReduceMotion && transformProps.has(key)
4194
+ ? { type: false }
4195
+ : valueTransition));
4204
4196
  if (isWillChangeMotionValue(willChange)) {
4205
4197
  willChange.add(key);
4206
4198
  animation = animation.then(() => willChange.remove(key));