framer-motion 7.7.1 → 7.7.2

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
@@ -2102,11 +2102,11 @@ const color = {
2102
2102
  const colorToken = "${c}";
2103
2103
  const numberToken = "${n}";
2104
2104
  function test(v) {
2105
- var _a, _b, _c, _d;
2105
+ var _a, _b;
2106
2106
  return (isNaN(v) &&
2107
2107
  isString(v) &&
2108
- ((_b = (_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) +
2109
- ((_d = (_c = v.match(colorRegex)) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) >
2108
+ (((_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) || 0) +
2109
+ (((_b = v.match(colorRegex)) === null || _b === void 0 ? void 0 : _b.length) || 0) >
2110
2110
  0);
2111
2111
  }
2112
2112
  function analyseComplexValue(v) {
@@ -3083,8 +3083,10 @@ function animate$1({ from, autoplay = true, driver = framesync, elapsed = 0, rep
3083
3083
  }
3084
3084
  onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(latest);
3085
3085
  if (isComplete) {
3086
- if (repeatCount === 0)
3087
- computedDuration !== null && computedDuration !== void 0 ? computedDuration : (computedDuration = elapsed);
3086
+ if (repeatCount === 0) {
3087
+ computedDuration =
3088
+ computedDuration !== undefined ? computedDuration : elapsed;
3089
+ }
3088
3090
  if (repeatCount < repeatMax) {
3089
3091
  hasRepeatDelayElapsed(elapsed, computedDuration, repeatDelay, isForwardPlayback) && repeat();
3090
3092
  }
@@ -3245,9 +3247,12 @@ function convertTransitionToAnimationOptions({ ease, times, ...transition }) {
3245
3247
  * Get the delay for a value by checking Transition with decreasing specificity.
3246
3248
  */
3247
3249
  function getDelayFromTransition(transition, key) {
3248
- var _a, _b;
3249
3250
  const valueTransition = getValueTransition(transition, key) || {};
3250
- return (_b = (_a = valueTransition.delay) !== null && _a !== void 0 ? _a : transition.delay) !== null && _b !== void 0 ? _b : 0;
3251
+ return valueTransition.delay !== undefined
3252
+ ? valueTransition.delay
3253
+ : transition.delay !== undefined
3254
+ ? transition.delay
3255
+ : 0;
3251
3256
  }
3252
3257
  function hydrateKeyframes(options) {
3253
3258
  if (Array.isArray(options.to) && options.to[0] === null) {
@@ -3466,7 +3471,7 @@ class MotionValue {
3466
3471
  * This will be replaced by the build step with the latest version number.
3467
3472
  * When MotionValues are provided to motion components, warn if versions are mixed.
3468
3473
  */
3469
- this.version = "7.7.1";
3474
+ this.version = "7.7.2";
3470
3475
  /**
3471
3476
  * Duration, in milliseconds, since last updating frame.
3472
3477
  *
@@ -4090,7 +4095,6 @@ function createAnimationState(visualElement) {
4090
4095
  * what to animate those to.
4091
4096
  */
4092
4097
  function animateChanges(options, changedActiveType) {
4093
- var _a;
4094
4098
  const props = visualElement.getProps();
4095
4099
  const context = visualElement.getVariantContext(true) || {};
4096
4100
  /**
@@ -4123,7 +4127,7 @@ function createAnimationState(visualElement) {
4123
4127
  for (let i = 0; i < numAnimationTypes; i++) {
4124
4128
  const type = reversePriorityOrder[i];
4125
4129
  const typeState = state[type];
4126
- const prop = (_a = props[type]) !== null && _a !== void 0 ? _a : context[type];
4130
+ const prop = props[type] !== undefined ? props[type] : context[type];
4127
4131
  const propIsVariant = isVariantLabel(prop);
4128
4132
  /**
4129
4133
  * If this type has *just* changed isActive status, set activeDelta
@@ -4695,10 +4699,9 @@ function resolveAxisElastic(dragElastic, minLabel, maxLabel) {
4695
4699
  };
4696
4700
  }
4697
4701
  function resolvePointElastic(dragElastic, label) {
4698
- var _a;
4699
4702
  return typeof dragElastic === "number"
4700
4703
  ? dragElastic
4701
- : (_a = dragElastic[label]) !== null && _a !== void 0 ? _a : 0;
4704
+ : dragElastic[label] || 0;
4702
4705
  }
4703
4706
 
4704
4707
  const createAxisDelta = () => ({
@@ -5120,11 +5123,10 @@ class VisualElementDragControls {
5120
5123
  const { drag, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd, } = this.getProps();
5121
5124
  const constraints = this.constraints || {};
5122
5125
  const momentumAnimations = eachAxis((axis) => {
5123
- var _a;
5124
5126
  if (!shouldDrag(axis, drag, this.currentDirection)) {
5125
5127
  return;
5126
5128
  }
5127
- let transition = (_a = constraints === null || constraints === void 0 ? void 0 : constraints[axis]) !== null && _a !== void 0 ? _a : {};
5129
+ let transition = (constraints === null || constraints === void 0 ? void 0 : constraints[axis]) || {};
5128
5130
  if (dragSnapToOrigin)
5129
5131
  transition = { min: 0, max: 0 };
5130
5132
  /**
@@ -5168,12 +5170,12 @@ class VisualElementDragControls {
5168
5170
  * - Otherwise, we apply the delta to the x/y motion values.
5169
5171
  */
5170
5172
  getAxisMotionValue(axis) {
5171
- var _a, _b;
5173
+ var _a;
5172
5174
  const dragKey = "_drag" + axis.toUpperCase();
5173
5175
  const externalMotionValue = this.visualElement.getProps()[dragKey];
5174
5176
  return externalMotionValue
5175
5177
  ? externalMotionValue
5176
- : this.visualElement.getValue(axis, (_b = (_a = this.visualElement.getProps().initial) === null || _a === void 0 ? void 0 : _a[axis]) !== null && _b !== void 0 ? _b : 0);
5178
+ : this.visualElement.getValue(axis, ((_a = this.visualElement.getProps().initial) === null || _a === void 0 ? void 0 : _a[axis]) || 0);
5177
5179
  }
5178
5180
  snapToCursor(point) {
5179
5181
  eachAxis((axis) => {
@@ -5751,7 +5753,7 @@ function updateMotionValuesFromProps(element, next, prev) {
5751
5753
  * and warn against mismatches.
5752
5754
  */
5753
5755
  if (process.env.NODE_ENV === "development") {
5754
- warnOnce(nextValue.version === "7.7.1", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.7.1 may not work as expected.`);
5756
+ warnOnce(nextValue.version === "7.7.2", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.7.2 may not work as expected.`);
5755
5757
  }
5756
5758
  }
5757
5759
  else if (isMotionValue(prevValue)) {
@@ -6610,16 +6612,14 @@ const numBorders = borders.length;
6610
6612
  const asNumber = (value) => typeof value === "string" ? parseFloat(value) : value;
6611
6613
  const isPx = (value) => typeof value === "number" || px.test(value);
6612
6614
  function mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) {
6613
- var _a, _b, _c, _d;
6614
6615
  if (shouldCrossfadeOpacity) {
6615
6616
  target.opacity = mix(0,
6616
- // (follow?.opacity as number) ?? 0,
6617
6617
  // TODO Reinstate this if only child
6618
- (_a = lead.opacity) !== null && _a !== void 0 ? _a : 1, easeCrossfadeIn(progress));
6619
- target.opacityExit = mix((_b = follow.opacity) !== null && _b !== void 0 ? _b : 1, 0, easeCrossfadeOut(progress));
6618
+ lead.opacity !== undefined ? lead.opacity : 1, easeCrossfadeIn(progress));
6619
+ target.opacityExit = mix(follow.opacity !== undefined ? follow.opacity : 1, 0, easeCrossfadeOut(progress));
6620
6620
  }
6621
6621
  else if (isOnlyMember) {
6622
- target.opacity = mix((_c = follow.opacity) !== null && _c !== void 0 ? _c : 1, (_d = lead.opacity) !== null && _d !== void 0 ? _d : 1, progress);
6622
+ target.opacity = mix(follow.opacity !== undefined ? follow.opacity : 1, lead.opacity !== undefined ? lead.opacity : 1, progress);
6623
6623
  }
6624
6624
  /**
6625
6625
  * Mix border radius
@@ -6653,8 +6653,9 @@ function mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnl
6653
6653
  }
6654
6654
  }
6655
6655
  function getRadius(values, radiusName) {
6656
- var _a;
6657
- return (_a = values[radiusName]) !== null && _a !== void 0 ? _a : values.borderRadius;
6656
+ return values[radiusName] !== undefined
6657
+ ? values[radiusName]
6658
+ : values.borderRadius;
6658
6659
  }
6659
6660
  // /**
6660
6661
  // * We only want to mix the background color if there's a follow element
@@ -74,8 +74,10 @@ function animate({ from, autoplay = true, driver = framesync, elapsed = 0, repea
74
74
  }
75
75
  onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(latest);
76
76
  if (isComplete) {
77
- if (repeatCount === 0)
78
- computedDuration !== null && computedDuration !== void 0 ? computedDuration : (computedDuration = elapsed);
77
+ if (repeatCount === 0) {
78
+ computedDuration =
79
+ computedDuration !== undefined ? computedDuration : elapsed;
80
+ }
79
81
  if (repeatCount < repeatMax) {
80
82
  hasRepeatDelayElapsed(elapsed, computedDuration, repeatDelay, isForwardPlayback) && repeat();
81
83
  }
@@ -58,9 +58,12 @@ function convertTransitionToAnimationOptions({ ease, times, ...transition }) {
58
58
  * Get the delay for a value by checking Transition with decreasing specificity.
59
59
  */
60
60
  function getDelayFromTransition(transition, key) {
61
- var _a, _b;
62
61
  const valueTransition = getValueTransition(transition, key) || {};
63
- return (_b = (_a = valueTransition.delay) !== null && _a !== void 0 ? _a : transition.delay) !== null && _b !== void 0 ? _b : 0;
62
+ return valueTransition.delay !== undefined
63
+ ? valueTransition.delay
64
+ : transition.delay !== undefined
65
+ ? transition.delay
66
+ : 0;
64
67
  }
65
68
  function hydrateKeyframes(options) {
66
69
  if (Array.isArray(options.to) && options.to[0] === null) {
@@ -236,11 +236,10 @@ class VisualElementDragControls {
236
236
  const { drag, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd, } = this.getProps();
237
237
  const constraints = this.constraints || {};
238
238
  const momentumAnimations = eachAxis((axis) => {
239
- var _a;
240
239
  if (!shouldDrag(axis, drag, this.currentDirection)) {
241
240
  return;
242
241
  }
243
- let transition = (_a = constraints === null || constraints === void 0 ? void 0 : constraints[axis]) !== null && _a !== void 0 ? _a : {};
242
+ let transition = (constraints === null || constraints === void 0 ? void 0 : constraints[axis]) || {};
244
243
  if (dragSnapToOrigin)
245
244
  transition = { min: 0, max: 0 };
246
245
  /**
@@ -284,12 +283,12 @@ class VisualElementDragControls {
284
283
  * - Otherwise, we apply the delta to the x/y motion values.
285
284
  */
286
285
  getAxisMotionValue(axis) {
287
- var _a, _b;
286
+ var _a;
288
287
  const dragKey = "_drag" + axis.toUpperCase();
289
288
  const externalMotionValue = this.visualElement.getProps()[dragKey];
290
289
  return externalMotionValue
291
290
  ? externalMotionValue
292
- : this.visualElement.getValue(axis, (_b = (_a = this.visualElement.getProps().initial) === null || _a === void 0 ? void 0 : _a[axis]) !== null && _b !== void 0 ? _b : 0);
291
+ : this.visualElement.getValue(axis, ((_a = this.visualElement.getProps().initial) === null || _a === void 0 ? void 0 : _a[axis]) || 0);
293
292
  }
294
293
  snapToCursor(point) {
295
294
  eachAxis((axis) => {
@@ -117,10 +117,9 @@ function resolveAxisElastic(dragElastic, minLabel, maxLabel) {
117
117
  };
118
118
  }
119
119
  function resolvePointElastic(dragElastic, label) {
120
- var _a;
121
120
  return typeof dragElastic === "number"
122
121
  ? dragElastic
123
- : (_a = dragElastic[label]) !== null && _a !== void 0 ? _a : 0;
122
+ : dragElastic[label] || 0;
124
123
  }
125
124
 
126
125
  export { applyConstraints, calcOrigin, calcRelativeAxisConstraints, calcRelativeConstraints, calcViewportAxisConstraints, calcViewportConstraints, defaultElastic, rebaseAxisConstraints, resolveAxisElastic, resolveDragElastic, resolvePointElastic };
@@ -9,16 +9,14 @@ const numBorders = borders.length;
9
9
  const asNumber = (value) => typeof value === "string" ? parseFloat(value) : value;
10
10
  const isPx = (value) => typeof value === "number" || px.test(value);
11
11
  function mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) {
12
- var _a, _b, _c, _d;
13
12
  if (shouldCrossfadeOpacity) {
14
13
  target.opacity = mix(0,
15
- // (follow?.opacity as number) ?? 0,
16
14
  // TODO Reinstate this if only child
17
- (_a = lead.opacity) !== null && _a !== void 0 ? _a : 1, easeCrossfadeIn(progress));
18
- target.opacityExit = mix((_b = follow.opacity) !== null && _b !== void 0 ? _b : 1, 0, easeCrossfadeOut(progress));
15
+ lead.opacity !== undefined ? lead.opacity : 1, easeCrossfadeIn(progress));
16
+ target.opacityExit = mix(follow.opacity !== undefined ? follow.opacity : 1, 0, easeCrossfadeOut(progress));
19
17
  }
20
18
  else if (isOnlyMember) {
21
- target.opacity = mix((_c = follow.opacity) !== null && _c !== void 0 ? _c : 1, (_d = lead.opacity) !== null && _d !== void 0 ? _d : 1, progress);
19
+ target.opacity = mix(follow.opacity !== undefined ? follow.opacity : 1, lead.opacity !== undefined ? lead.opacity : 1, progress);
22
20
  }
23
21
  /**
24
22
  * Mix border radius
@@ -52,8 +50,9 @@ function mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnl
52
50
  }
53
51
  }
54
52
  function getRadius(values, radiusName) {
55
- var _a;
56
- return (_a = values[radiusName]) !== null && _a !== void 0 ? _a : values.borderRadius;
53
+ return values[radiusName] !== undefined
54
+ ? values[radiusName]
55
+ : values.borderRadius;
57
56
  }
58
57
  // /**
59
58
  // * We only want to mix the background color if there's a follow element
@@ -54,7 +54,6 @@ function createAnimationState(visualElement) {
54
54
  * what to animate those to.
55
55
  */
56
56
  function animateChanges(options, changedActiveType) {
57
- var _a;
58
57
  const props = visualElement.getProps();
59
58
  const context = visualElement.getVariantContext(true) || {};
60
59
  /**
@@ -87,7 +86,7 @@ function createAnimationState(visualElement) {
87
86
  for (let i = 0; i < numAnimationTypes; i++) {
88
87
  const type = reversePriorityOrder[i];
89
88
  const typeState = state[type];
90
- const prop = (_a = props[type]) !== null && _a !== void 0 ? _a : context[type];
89
+ const prop = props[type] !== undefined ? props[type] : context[type];
91
90
  const propIsVariant = isVariantLabel(prop);
92
91
  /**
93
92
  * If this type has *just* changed isActive status, set activeDelta
@@ -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.7.1", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.7.1 may not work as expected.`);
25
+ warnOnce(nextValue.version === "7.7.2", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.7.2 may not work as expected.`);
26
26
  }
27
27
  }
28
28
  else if (isMotionValue(prevValue)) {
@@ -25,7 +25,7 @@ class MotionValue {
25
25
  * This will be replaced by the build step with the latest version number.
26
26
  * When MotionValues are provided to motion components, warn if versions are mixed.
27
27
  */
28
- this.version = "7.7.1";
28
+ this.version = "7.7.2";
29
29
  /**
30
30
  * Duration, in milliseconds, since last updating frame.
31
31
  *
@@ -5,11 +5,11 @@ import { isString, floatRegex, colorRegex, sanitize } from '../utils.mjs';
5
5
  const colorToken = "${c}";
6
6
  const numberToken = "${n}";
7
7
  function test(v) {
8
- var _a, _b, _c, _d;
8
+ var _a, _b;
9
9
  return (isNaN(v) &&
10
10
  isString(v) &&
11
- ((_b = (_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) +
12
- ((_d = (_c = v.match(colorRegex)) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) >
11
+ (((_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) || 0) +
12
+ (((_b = v.match(colorRegex)) === null || _b === void 0 ? void 0 : _b.length) || 0) >
13
13
  0);
14
14
  }
15
15
  function analyseComplexValue(v) {
@@ -2115,11 +2115,11 @@
2115
2115
  const colorToken = "${c}";
2116
2116
  const numberToken = "${n}";
2117
2117
  function test(v) {
2118
- var _a, _b, _c, _d;
2118
+ var _a, _b;
2119
2119
  return (isNaN(v) &&
2120
2120
  isString$1(v) &&
2121
- ((_b = (_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) +
2122
- ((_d = (_c = v.match(colorRegex)) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) >
2121
+ (((_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) || 0) +
2122
+ (((_b = v.match(colorRegex)) === null || _b === void 0 ? void 0 : _b.length) || 0) >
2123
2123
  0);
2124
2124
  }
2125
2125
  function analyseComplexValue(v) {
@@ -3096,8 +3096,10 @@
3096
3096
  }
3097
3097
  onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(latest);
3098
3098
  if (isComplete) {
3099
- if (repeatCount === 0)
3100
- computedDuration !== null && computedDuration !== void 0 ? computedDuration : (computedDuration = elapsed);
3099
+ if (repeatCount === 0) {
3100
+ computedDuration =
3101
+ computedDuration !== undefined ? computedDuration : elapsed;
3102
+ }
3101
3103
  if (repeatCount < repeatMax) {
3102
3104
  hasRepeatDelayElapsed(elapsed, computedDuration, repeatDelay, isForwardPlayback) && repeat();
3103
3105
  }
@@ -3258,9 +3260,12 @@
3258
3260
  * Get the delay for a value by checking Transition with decreasing specificity.
3259
3261
  */
3260
3262
  function getDelayFromTransition(transition, key) {
3261
- var _a, _b;
3262
3263
  const valueTransition = getValueTransition(transition, key) || {};
3263
- return (_b = (_a = valueTransition.delay) !== null && _a !== void 0 ? _a : transition.delay) !== null && _b !== void 0 ? _b : 0;
3264
+ return valueTransition.delay !== undefined
3265
+ ? valueTransition.delay
3266
+ : transition.delay !== undefined
3267
+ ? transition.delay
3268
+ : 0;
3264
3269
  }
3265
3270
  function hydrateKeyframes(options) {
3266
3271
  if (Array.isArray(options.to) && options.to[0] === null) {
@@ -3479,7 +3484,7 @@
3479
3484
  * This will be replaced by the build step with the latest version number.
3480
3485
  * When MotionValues are provided to motion components, warn if versions are mixed.
3481
3486
  */
3482
- this.version = "7.7.1";
3487
+ this.version = "7.7.2";
3483
3488
  /**
3484
3489
  * Duration, in milliseconds, since last updating frame.
3485
3490
  *
@@ -4103,7 +4108,6 @@
4103
4108
  * what to animate those to.
4104
4109
  */
4105
4110
  function animateChanges(options, changedActiveType) {
4106
- var _a;
4107
4111
  const props = visualElement.getProps();
4108
4112
  const context = visualElement.getVariantContext(true) || {};
4109
4113
  /**
@@ -4136,7 +4140,7 @@
4136
4140
  for (let i = 0; i < numAnimationTypes; i++) {
4137
4141
  const type = reversePriorityOrder[i];
4138
4142
  const typeState = state[type];
4139
- const prop = (_a = props[type]) !== null && _a !== void 0 ? _a : context[type];
4143
+ const prop = props[type] !== undefined ? props[type] : context[type];
4140
4144
  const propIsVariant = isVariantLabel(prop);
4141
4145
  /**
4142
4146
  * If this type has *just* changed isActive status, set activeDelta
@@ -4708,10 +4712,9 @@
4708
4712
  };
4709
4713
  }
4710
4714
  function resolvePointElastic(dragElastic, label) {
4711
- var _a;
4712
4715
  return typeof dragElastic === "number"
4713
4716
  ? dragElastic
4714
- : (_a = dragElastic[label]) !== null && _a !== void 0 ? _a : 0;
4717
+ : dragElastic[label] || 0;
4715
4718
  }
4716
4719
 
4717
4720
  const createAxisDelta = () => ({
@@ -5133,11 +5136,10 @@
5133
5136
  const { drag, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd, } = this.getProps();
5134
5137
  const constraints = this.constraints || {};
5135
5138
  const momentumAnimations = eachAxis((axis) => {
5136
- var _a;
5137
5139
  if (!shouldDrag(axis, drag, this.currentDirection)) {
5138
5140
  return;
5139
5141
  }
5140
- let transition = (_a = constraints === null || constraints === void 0 ? void 0 : constraints[axis]) !== null && _a !== void 0 ? _a : {};
5142
+ let transition = (constraints === null || constraints === void 0 ? void 0 : constraints[axis]) || {};
5141
5143
  if (dragSnapToOrigin)
5142
5144
  transition = { min: 0, max: 0 };
5143
5145
  /**
@@ -5181,12 +5183,12 @@
5181
5183
  * - Otherwise, we apply the delta to the x/y motion values.
5182
5184
  */
5183
5185
  getAxisMotionValue(axis) {
5184
- var _a, _b;
5186
+ var _a;
5185
5187
  const dragKey = "_drag" + axis.toUpperCase();
5186
5188
  const externalMotionValue = this.visualElement.getProps()[dragKey];
5187
5189
  return externalMotionValue
5188
5190
  ? externalMotionValue
5189
- : this.visualElement.getValue(axis, (_b = (_a = this.visualElement.getProps().initial) === null || _a === void 0 ? void 0 : _a[axis]) !== null && _b !== void 0 ? _b : 0);
5191
+ : this.visualElement.getValue(axis, ((_a = this.visualElement.getProps().initial) === null || _a === void 0 ? void 0 : _a[axis]) || 0);
5190
5192
  }
5191
5193
  snapToCursor(point) {
5192
5194
  eachAxis((axis) => {
@@ -5764,7 +5766,7 @@
5764
5766
  * and warn against mismatches.
5765
5767
  */
5766
5768
  {
5767
- warnOnce(nextValue.version === "7.7.1", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.7.1 may not work as expected.`);
5769
+ warnOnce(nextValue.version === "7.7.2", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.7.2 may not work as expected.`);
5768
5770
  }
5769
5771
  }
5770
5772
  else if (isMotionValue(prevValue)) {
@@ -6623,16 +6625,14 @@
6623
6625
  const asNumber = (value) => typeof value === "string" ? parseFloat(value) : value;
6624
6626
  const isPx = (value) => typeof value === "number" || px.test(value);
6625
6627
  function mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) {
6626
- var _a, _b, _c, _d;
6627
6628
  if (shouldCrossfadeOpacity) {
6628
6629
  target.opacity = mix$1(0,
6629
- // (follow?.opacity as number) ?? 0,
6630
6630
  // TODO Reinstate this if only child
6631
- (_a = lead.opacity) !== null && _a !== void 0 ? _a : 1, easeCrossfadeIn(progress));
6632
- target.opacityExit = mix$1((_b = follow.opacity) !== null && _b !== void 0 ? _b : 1, 0, easeCrossfadeOut(progress));
6631
+ lead.opacity !== undefined ? lead.opacity : 1, easeCrossfadeIn(progress));
6632
+ target.opacityExit = mix$1(follow.opacity !== undefined ? follow.opacity : 1, 0, easeCrossfadeOut(progress));
6633
6633
  }
6634
6634
  else if (isOnlyMember) {
6635
- target.opacity = mix$1((_c = follow.opacity) !== null && _c !== void 0 ? _c : 1, (_d = lead.opacity) !== null && _d !== void 0 ? _d : 1, progress);
6635
+ target.opacity = mix$1(follow.opacity !== undefined ? follow.opacity : 1, lead.opacity !== undefined ? lead.opacity : 1, progress);
6636
6636
  }
6637
6637
  /**
6638
6638
  * Mix border radius
@@ -6666,8 +6666,9 @@
6666
6666
  }
6667
6667
  }
6668
6668
  function getRadius(values, radiusName) {
6669
- var _a;
6670
- return (_a = values[radiusName]) !== null && _a !== void 0 ? _a : values.borderRadius;
6669
+ return values[radiusName] !== undefined
6670
+ ? values[radiusName]
6671
+ : values.borderRadius;
6671
6672
  }
6672
6673
  // /**
6673
6674
  // * We only want to mix the background color if there's a follow element