framer-motion 11.5.3 → 11.5.5

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.
@@ -470,11 +470,11 @@ const createUnitType = (unit) => ({
470
470
  parse: parseFloat,
471
471
  transform: (v) => `${v}${unit}`,
472
472
  });
473
- const degrees = createUnitType("deg");
474
- const percent = createUnitType("%");
475
- const px = createUnitType("px");
476
- const vh = createUnitType("vh");
477
- const vw = createUnitType("vw");
473
+ const degrees = /*@__PURE__*/ createUnitType("deg");
474
+ const percent = /*@__PURE__*/ createUnitType("%");
475
+ const px = /*@__PURE__*/ createUnitType("px");
476
+ const vh = /*@__PURE__*/ createUnitType("vh");
477
+ const vw = /*@__PURE__*/ createUnitType("vw");
478
478
  const progressPercentage = {
479
479
  ...percent,
480
480
  parse: (v) => percent.parse(v) / 100,
@@ -751,8 +751,8 @@ const rgbUnit = {
751
751
  transform: (v) => Math.round(clampRgbUnit(v)),
752
752
  };
753
753
  const rgba = {
754
- test: isColorString("rgb", "red"),
755
- parse: splitColor("red", "green", "blue"),
754
+ test: /*@__PURE__*/ isColorString("rgb", "red"),
755
+ parse: /*@__PURE__*/ splitColor("red", "green", "blue"),
756
756
  transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => "rgba(" +
757
757
  rgbUnit.transform(red) +
758
758
  ", " +
@@ -795,14 +795,14 @@ function parseHex(v) {
795
795
  };
796
796
  }
797
797
  const hex = {
798
- test: isColorString("#"),
798
+ test: /*@__PURE__*/ isColorString("#"),
799
799
  parse: parseHex,
800
800
  transform: rgba.transform,
801
801
  };
802
802
 
803
803
  const hsla = {
804
- test: isColorString("hsl", "hue"),
805
- parse: splitColor("hue", "saturation", "lightness"),
804
+ test: /*@__PURE__*/ isColorString("hsl", "hue"),
805
+ parse: /*@__PURE__*/ splitColor("hue", "saturation", "lightness"),
806
806
  transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {
807
807
  return ("hsla(" +
808
808
  Math.round(hue) +
@@ -1766,9 +1766,9 @@ function cubicBezier(mX1, mY1, mX2, mY2) {
1766
1766
  return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);
1767
1767
  }
1768
1768
 
1769
- const easeIn = cubicBezier(0.42, 0, 1, 1);
1770
- const easeOut = cubicBezier(0, 0, 0.58, 1);
1771
- const easeInOut = cubicBezier(0.42, 0, 0.58, 1);
1769
+ const easeIn = /*@__PURE__*/ cubicBezier(0.42, 0, 1, 1);
1770
+ const easeOut = /*@__PURE__*/ cubicBezier(0, 0, 0.58, 1);
1771
+ const easeInOut = /*@__PURE__*/ cubicBezier(0.42, 0, 0.58, 1);
1772
1772
 
1773
1773
  const isEasingArray = (ease) => {
1774
1774
  return Array.isArray(ease) && typeof ease[0] !== "number";
@@ -1786,9 +1786,9 @@ const circIn = (p) => 1 - Math.sin(Math.acos(p));
1786
1786
  const circOut = reverseEasing(circIn);
1787
1787
  const circInOut = mirrorEasing(circIn);
1788
1788
 
1789
- const backOut = cubicBezier(0.33, 1.53, 0.69, 0.99);
1790
- const backIn = reverseEasing(backOut);
1791
- const backInOut = mirrorEasing(backIn);
1789
+ const backOut = /*@__PURE__*/ cubicBezier(0.33, 1.53, 0.69, 0.99);
1790
+ const backIn = /*@__PURE__*/ reverseEasing(backOut);
1791
+ const backInOut = /*@__PURE__*/ mirrorEasing(backIn);
1792
1792
 
1793
1793
  const anticipate = (p) => (p *= 2) < 1 ? 0.5 * backIn(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));
1794
1794
 
@@ -2610,10 +2610,10 @@ const supportedWaapiEasing = {
2610
2610
  easeIn: "ease-in",
2611
2611
  easeOut: "ease-out",
2612
2612
  easeInOut: "ease-in-out",
2613
- circIn: cubicBezierAsString([0, 0.65, 0.55, 1]),
2614
- circOut: cubicBezierAsString([0.55, 0, 1, 0.45]),
2615
- backIn: cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),
2616
- backOut: cubicBezierAsString([0.33, 1.53, 0.69, 0.99]),
2613
+ circIn: /*@__PURE__*/ cubicBezierAsString([0, 0.65, 0.55, 1]),
2614
+ circOut: /*@__PURE__*/ cubicBezierAsString([0.55, 0, 1, 0.45]),
2615
+ backIn: /*@__PURE__*/ cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),
2616
+ backOut: /*@__PURE__*/ cubicBezierAsString([0.33, 1.53, 0.69, 0.99]),
2617
2617
  };
2618
2618
  function mapEasingToNativeEasingWithDefault(easing) {
2619
2619
  return (mapEasingToNativeEasing(easing) ||
@@ -2654,7 +2654,7 @@ function animateStyle(element, valueName, keyframes, { delay = 0, duration = 300
2654
2654
  });
2655
2655
  }
2656
2656
 
2657
- const supportsWaapi = memo(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
2657
+ const supportsWaapi = /*@__PURE__*/ memo(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
2658
2658
  /**
2659
2659
  * 10ms is chosen here as it strikes a balance between smooth
2660
2660
  * results (more than one keyframe per frame at 60fps) and
@@ -3227,7 +3227,7 @@ class MotionValue {
3227
3227
  * This will be replaced by the build step with the latest version number.
3228
3228
  * When MotionValues are provided to motion components, warn if versions are mixed.
3229
3229
  */
3230
- this.version = "11.5.3";
3230
+ this.version = "11.5.5";
3231
3231
  /**
3232
3232
  * Tracks whether this value can output a velocity. Currently this is only true
3233
3233
  * if the value is numerical, but we might be able to widen the scope here and support
@@ -3767,6 +3767,30 @@ function animateVisualElement(visualElement, definition, options = {}) {
3767
3767
  });
3768
3768
  }
3769
3769
 
3770
+ const numVariantProps = variantProps.length;
3771
+ function getVariantContext(visualElement) {
3772
+ if (!visualElement)
3773
+ return undefined;
3774
+ if (!visualElement.isControllingVariants) {
3775
+ const context = visualElement.parent
3776
+ ? getVariantContext(visualElement.parent) || {}
3777
+ : {};
3778
+ if (visualElement.props.initial !== undefined) {
3779
+ context.initial = visualElement.props.initial;
3780
+ }
3781
+ return context;
3782
+ }
3783
+ const context = {};
3784
+ for (let i = 0; i < numVariantProps; i++) {
3785
+ const name = variantProps[i];
3786
+ const prop = visualElement.props[name];
3787
+ if (isVariantLabel(prop) || prop === false) {
3788
+ context[name] = prop;
3789
+ }
3790
+ }
3791
+ return context;
3792
+ }
3793
+
3770
3794
  const reversePriorityOrder = [...variantPriorityOrder].reverse();
3771
3795
  const numAnimationTypes = variantPriorityOrder.length;
3772
3796
  function animateList(visualElement) {
@@ -3809,8 +3833,8 @@ function createAnimationState(visualElement) {
3809
3833
  * what to animate those to.
3810
3834
  */
3811
3835
  function animateChanges(changedActiveType) {
3812
- const props = visualElement.getProps();
3813
- const context = visualElement.getVariantContext(true) || {};
3836
+ const { props } = visualElement;
3837
+ const context = getVariantContext(visualElement.parent) || {};
3814
3838
  /**
3815
3839
  * A list of animations that we'll build into as we iterate through the animation
3816
3840
  * types. This will get executed at the end of the function.
@@ -3994,9 +4018,12 @@ function createAnimationState(visualElement) {
3994
4018
  shouldAnimateType = false;
3995
4019
  }
3996
4020
  /**
3997
- * If this is an inherited prop we want to hard-block animations
4021
+ * If this is an inherited prop we want to skip this animation
4022
+ * unless the inherited variants haven't changed on this render.
3998
4023
  */
3999
- if (shouldAnimateType && (!isInherited || handledRemovedValues)) {
4024
+ const willAnimateViaParent = isInherited && variantDidChange;
4025
+ const needsAnimating = !willAnimateViaParent || handledRemovedValues;
4026
+ if (shouldAnimateType && needsAnimating) {
4000
4027
  animations.push(...definitionList.map((animation) => ({
4001
4028
  animation: animation,
4002
4029
  options: { type },
@@ -5406,8 +5433,8 @@ function getRadius(values, radiusName) {
5406
5433
  // latestLeadValues.backgroundColor as string
5407
5434
  // )(p)
5408
5435
  // }
5409
- const easeCrossfadeIn = compress(0, 0.5, circOut);
5410
- const easeCrossfadeOut = compress(0.5, 0.95, noop);
5436
+ const easeCrossfadeIn = /*@__PURE__*/ compress(0, 0.5, circOut);
5437
+ const easeCrossfadeOut = /*@__PURE__*/ compress(0.5, 0.95, noop);
5411
5438
  function compress(min, max, easing) {
5412
5439
  return (p) => {
5413
5440
  // Could replace ifs with clamp
@@ -5850,7 +5877,7 @@ function updateMotionValuesFromProps(element, next, prev) {
5850
5877
  * and warn against mismatches.
5851
5878
  */
5852
5879
  if (process.env.NODE_ENV === "development") {
5853
- warnOnce(nextValue.version === "11.5.3", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.5.3 may not work as expected.`);
5880
+ warnOnce(nextValue.version === "11.5.5", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.5.5 may not work as expected.`);
5854
5881
  }
5855
5882
  }
5856
5883
  else if (isMotionValue(prevValue)) {
@@ -5934,7 +5961,6 @@ const propEventHandlers = [
5934
5961
  "LayoutAnimationStart",
5935
5962
  "LayoutAnimationComplete",
5936
5963
  ];
5937
- const numVariantProps = variantProps.length;
5938
5964
  /**
5939
5965
  * A VisualElement is an imperative abstraction around UI elements such as
5940
5966
  * HTMLElement, SVGElement, Three.Object3D etc.
@@ -6251,29 +6277,6 @@ class VisualElement {
6251
6277
  ? this.parent.getClosestVariantNode()
6252
6278
  : undefined;
6253
6279
  }
6254
- getVariantContext(startAtParent = false) {
6255
- if (startAtParent) {
6256
- return this.parent ? this.parent.getVariantContext() : undefined;
6257
- }
6258
- if (!this.isControllingVariants) {
6259
- const context = this.parent
6260
- ? this.parent.getVariantContext() || {}
6261
- : {};
6262
- if (this.props.initial !== undefined) {
6263
- context.initial = this.props.initial;
6264
- }
6265
- return context;
6266
- }
6267
- const context = {};
6268
- for (let i = 0; i < numVariantProps; i++) {
6269
- const name = variantProps[i];
6270
- const prop = this.props[name];
6271
- if (isVariantLabel(prop) || prop === false) {
6272
- context[name] = prop;
6273
- }
6274
- }
6275
- return context;
6276
- }
6277
6280
  /**
6278
6281
  * Add a child visual element to our set of children.
6279
6282
  */
@@ -279,7 +279,7 @@ class MotionValue {
279
279
  * This will be replaced by the build step with the latest version number.
280
280
  * When MotionValues are provided to motion components, warn if versions are mixed.
281
281
  */
282
- this.version = "11.5.3";
282
+ this.version = "11.5.5";
283
283
  /**
284
284
  * Tracks whether this value can output a velocity. Currently this is only true
285
285
  * if the value is numerical, but we might be able to widen the scope here and support
@@ -922,11 +922,11 @@ const createUnitType = (unit) => ({
922
922
  parse: parseFloat,
923
923
  transform: (v) => `${v}${unit}`,
924
924
  });
925
- const degrees = createUnitType("deg");
926
- const percent = createUnitType("%");
927
- const px = createUnitType("px");
928
- const vh = createUnitType("vh");
929
- const vw = createUnitType("vw");
925
+ const degrees = /*@__PURE__*/ createUnitType("deg");
926
+ const percent = /*@__PURE__*/ createUnitType("%");
927
+ const px = /*@__PURE__*/ createUnitType("px");
928
+ const vh = /*@__PURE__*/ createUnitType("vh");
929
+ const vw = /*@__PURE__*/ createUnitType("vw");
930
930
  const progressPercentage = {
931
931
  ...percent,
932
932
  parse: (v) => percent.parse(v) / 100,
@@ -1203,8 +1203,8 @@ const rgbUnit = {
1203
1203
  transform: (v) => Math.round(clampRgbUnit(v)),
1204
1204
  };
1205
1205
  const rgba = {
1206
- test: isColorString("rgb", "red"),
1207
- parse: splitColor("red", "green", "blue"),
1206
+ test: /*@__PURE__*/ isColorString("rgb", "red"),
1207
+ parse: /*@__PURE__*/ splitColor("red", "green", "blue"),
1208
1208
  transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => "rgba(" +
1209
1209
  rgbUnit.transform(red) +
1210
1210
  ", " +
@@ -1247,14 +1247,14 @@ function parseHex(v) {
1247
1247
  };
1248
1248
  }
1249
1249
  const hex = {
1250
- test: isColorString("#"),
1250
+ test: /*@__PURE__*/ isColorString("#"),
1251
1251
  parse: parseHex,
1252
1252
  transform: rgba.transform,
1253
1253
  };
1254
1254
 
1255
1255
  const hsla = {
1256
- test: isColorString("hsl", "hue"),
1257
- parse: splitColor("hue", "saturation", "lightness"),
1256
+ test: /*@__PURE__*/ isColorString("hsl", "hue"),
1257
+ parse: /*@__PURE__*/ splitColor("hue", "saturation", "lightness"),
1258
1258
  transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {
1259
1259
  return ("hsla(" +
1260
1260
  Math.round(hue) +
@@ -2172,9 +2172,9 @@ function cubicBezier(mX1, mY1, mX2, mY2) {
2172
2172
  return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);
2173
2173
  }
2174
2174
 
2175
- const easeIn = cubicBezier(0.42, 0, 1, 1);
2176
- const easeOut = cubicBezier(0, 0, 0.58, 1);
2177
- const easeInOut = cubicBezier(0.42, 0, 0.58, 1);
2175
+ const easeIn = /*@__PURE__*/ cubicBezier(0.42, 0, 1, 1);
2176
+ const easeOut = /*@__PURE__*/ cubicBezier(0, 0, 0.58, 1);
2177
+ const easeInOut = /*@__PURE__*/ cubicBezier(0.42, 0, 0.58, 1);
2178
2178
 
2179
2179
  const isEasingArray = (ease) => {
2180
2180
  return Array.isArray(ease) && typeof ease[0] !== "number";
@@ -2192,9 +2192,9 @@ const circIn = (p) => 1 - Math.sin(Math.acos(p));
2192
2192
  const circOut = reverseEasing(circIn);
2193
2193
  const circInOut = mirrorEasing(circIn);
2194
2194
 
2195
- const backOut = cubicBezier(0.33, 1.53, 0.69, 0.99);
2196
- const backIn = reverseEasing(backOut);
2197
- const backInOut = mirrorEasing(backIn);
2195
+ const backOut = /*@__PURE__*/ cubicBezier(0.33, 1.53, 0.69, 0.99);
2196
+ const backIn = /*@__PURE__*/ reverseEasing(backOut);
2197
+ const backInOut = /*@__PURE__*/ mirrorEasing(backIn);
2198
2198
 
2199
2199
  const anticipate = (p) => (p *= 2) < 1 ? 0.5 * backIn(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));
2200
2200
 
@@ -3016,10 +3016,10 @@ const supportedWaapiEasing = {
3016
3016
  easeIn: "ease-in",
3017
3017
  easeOut: "ease-out",
3018
3018
  easeInOut: "ease-in-out",
3019
- circIn: cubicBezierAsString([0, 0.65, 0.55, 1]),
3020
- circOut: cubicBezierAsString([0.55, 0, 1, 0.45]),
3021
- backIn: cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),
3022
- backOut: cubicBezierAsString([0.33, 1.53, 0.69, 0.99]),
3019
+ circIn: /*@__PURE__*/ cubicBezierAsString([0, 0.65, 0.55, 1]),
3020
+ circOut: /*@__PURE__*/ cubicBezierAsString([0.55, 0, 1, 0.45]),
3021
+ backIn: /*@__PURE__*/ cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),
3022
+ backOut: /*@__PURE__*/ cubicBezierAsString([0.33, 1.53, 0.69, 0.99]),
3023
3023
  };
3024
3024
  function mapEasingToNativeEasingWithDefault(easing) {
3025
3025
  return (mapEasingToNativeEasing(easing) ||
@@ -3060,7 +3060,7 @@ function animateStyle(element, valueName, keyframes, { delay = 0, duration = 300
3060
3060
  });
3061
3061
  }
3062
3062
 
3063
- const supportsWaapi = memo(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
3063
+ const supportsWaapi = /*@__PURE__*/ memo(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
3064
3064
  /**
3065
3065
  * 10ms is chosen here as it strikes a balance between smooth
3066
3066
  * results (more than one keyframe per frame at 60fps) and
@@ -3790,7 +3790,7 @@ function updateMotionValuesFromProps(element, next, prev) {
3790
3790
  * and warn against mismatches.
3791
3791
  */
3792
3792
  if (process.env.NODE_ENV === "development") {
3793
- warnOnce(nextValue.version === "11.5.3", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.5.3 may not work as expected.`);
3793
+ warnOnce(nextValue.version === "11.5.5", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.5.5 may not work as expected.`);
3794
3794
  }
3795
3795
  }
3796
3796
  else if (isMotionValue(prevValue)) {
@@ -3880,7 +3880,6 @@ const propEventHandlers = [
3880
3880
  "LayoutAnimationStart",
3881
3881
  "LayoutAnimationComplete",
3882
3882
  ];
3883
- const numVariantProps = variantProps.length;
3884
3883
  /**
3885
3884
  * A VisualElement is an imperative abstraction around UI elements such as
3886
3885
  * HTMLElement, SVGElement, Three.Object3D etc.
@@ -4197,29 +4196,6 @@ class VisualElement {
4197
4196
  ? this.parent.getClosestVariantNode()
4198
4197
  : undefined;
4199
4198
  }
4200
- getVariantContext(startAtParent = false) {
4201
- if (startAtParent) {
4202
- return this.parent ? this.parent.getVariantContext() : undefined;
4203
- }
4204
- if (!this.isControllingVariants) {
4205
- const context = this.parent
4206
- ? this.parent.getVariantContext() || {}
4207
- : {};
4208
- if (this.props.initial !== undefined) {
4209
- context.initial = this.props.initial;
4210
- }
4211
- return context;
4212
- }
4213
- const context = {};
4214
- for (let i = 0; i < numVariantProps; i++) {
4215
- const name = variantProps[i];
4216
- const prop = this.props[name];
4217
- if (isVariantLabel(prop) || prop === false) {
4218
- context[name] = prop;
4219
- }
4220
- }
4221
- return context;
4222
- }
4223
4199
  /**
4224
4200
  * Add a child visual element to our set of children.
4225
4201
  */
package/dist/cjs/index.js CHANGED
@@ -540,11 +540,11 @@ const createUnitType = (unit) => ({
540
540
  parse: parseFloat,
541
541
  transform: (v) => `${v}${unit}`,
542
542
  });
543
- const degrees = createUnitType("deg");
544
- const percent = createUnitType("%");
545
- const px = createUnitType("px");
546
- const vh = createUnitType("vh");
547
- const vw = createUnitType("vw");
543
+ const degrees = /*@__PURE__*/ createUnitType("deg");
544
+ const percent = /*@__PURE__*/ createUnitType("%");
545
+ const px = /*@__PURE__*/ createUnitType("px");
546
+ const vh = /*@__PURE__*/ createUnitType("vh");
547
+ const vw = /*@__PURE__*/ createUnitType("vw");
548
548
  const progressPercentage = {
549
549
  ...percent,
550
550
  parse: (v) => percent.parse(v) / 100,
@@ -821,8 +821,8 @@ const rgbUnit = {
821
821
  transform: (v) => Math.round(clampRgbUnit(v)),
822
822
  };
823
823
  const rgba = {
824
- test: isColorString("rgb", "red"),
825
- parse: splitColor("red", "green", "blue"),
824
+ test: /*@__PURE__*/ isColorString("rgb", "red"),
825
+ parse: /*@__PURE__*/ splitColor("red", "green", "blue"),
826
826
  transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => "rgba(" +
827
827
  rgbUnit.transform(red) +
828
828
  ", " +
@@ -865,14 +865,14 @@ function parseHex(v) {
865
865
  };
866
866
  }
867
867
  const hex = {
868
- test: isColorString("#"),
868
+ test: /*@__PURE__*/ isColorString("#"),
869
869
  parse: parseHex,
870
870
  transform: rgba.transform,
871
871
  };
872
872
 
873
873
  const hsla = {
874
- test: isColorString("hsl", "hue"),
875
- parse: splitColor("hue", "saturation", "lightness"),
874
+ test: /*@__PURE__*/ isColorString("hsl", "hue"),
875
+ parse: /*@__PURE__*/ splitColor("hue", "saturation", "lightness"),
876
876
  transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {
877
877
  return ("hsla(" +
878
878
  Math.round(hue) +
@@ -1836,9 +1836,9 @@ function cubicBezier(mX1, mY1, mX2, mY2) {
1836
1836
  return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);
1837
1837
  }
1838
1838
 
1839
- const easeIn = cubicBezier(0.42, 0, 1, 1);
1840
- const easeOut = cubicBezier(0, 0, 0.58, 1);
1841
- const easeInOut = cubicBezier(0.42, 0, 0.58, 1);
1839
+ const easeIn = /*@__PURE__*/ cubicBezier(0.42, 0, 1, 1);
1840
+ const easeOut = /*@__PURE__*/ cubicBezier(0, 0, 0.58, 1);
1841
+ const easeInOut = /*@__PURE__*/ cubicBezier(0.42, 0, 0.58, 1);
1842
1842
 
1843
1843
  const isEasingArray = (ease) => {
1844
1844
  return Array.isArray(ease) && typeof ease[0] !== "number";
@@ -1856,9 +1856,9 @@ const circIn = (p) => 1 - Math.sin(Math.acos(p));
1856
1856
  const circOut = reverseEasing(circIn);
1857
1857
  const circInOut = mirrorEasing(circIn);
1858
1858
 
1859
- const backOut = cubicBezier(0.33, 1.53, 0.69, 0.99);
1860
- const backIn = reverseEasing(backOut);
1861
- const backInOut = mirrorEasing(backIn);
1859
+ const backOut = /*@__PURE__*/ cubicBezier(0.33, 1.53, 0.69, 0.99);
1860
+ const backIn = /*@__PURE__*/ reverseEasing(backOut);
1861
+ const backInOut = /*@__PURE__*/ mirrorEasing(backIn);
1862
1862
 
1863
1863
  const anticipate = (p) => (p *= 2) < 1 ? 0.5 * backIn(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));
1864
1864
 
@@ -2684,10 +2684,10 @@ const supportedWaapiEasing = {
2684
2684
  easeIn: "ease-in",
2685
2685
  easeOut: "ease-out",
2686
2686
  easeInOut: "ease-in-out",
2687
- circIn: cubicBezierAsString([0, 0.65, 0.55, 1]),
2688
- circOut: cubicBezierAsString([0.55, 0, 1, 0.45]),
2689
- backIn: cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),
2690
- backOut: cubicBezierAsString([0.33, 1.53, 0.69, 0.99]),
2687
+ circIn: /*@__PURE__*/ cubicBezierAsString([0, 0.65, 0.55, 1]),
2688
+ circOut: /*@__PURE__*/ cubicBezierAsString([0.55, 0, 1, 0.45]),
2689
+ backIn: /*@__PURE__*/ cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),
2690
+ backOut: /*@__PURE__*/ cubicBezierAsString([0.33, 1.53, 0.69, 0.99]),
2691
2691
  };
2692
2692
  function mapEasingToNativeEasingWithDefault(easing) {
2693
2693
  return (mapEasingToNativeEasing(easing) ||
@@ -2728,7 +2728,7 @@ function animateStyle(element, valueName, keyframes, { delay = 0, duration = 300
2728
2728
  });
2729
2729
  }
2730
2730
 
2731
- const supportsWaapi = memo(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
2731
+ const supportsWaapi = /*@__PURE__*/ memo(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
2732
2732
  /**
2733
2733
  * 10ms is chosen here as it strikes a balance between smooth
2734
2734
  * results (more than one keyframe per frame at 60fps) and
@@ -3310,7 +3310,7 @@ class MotionValue {
3310
3310
  * This will be replaced by the build step with the latest version number.
3311
3311
  * When MotionValues are provided to motion components, warn if versions are mixed.
3312
3312
  */
3313
- this.version = "11.5.3";
3313
+ this.version = "11.5.5";
3314
3314
  /**
3315
3315
  * Tracks whether this value can output a velocity. Currently this is only true
3316
3316
  * if the value is numerical, but we might be able to widen the scope here and support
@@ -3853,6 +3853,30 @@ function animateVisualElement(visualElement, definition, options = {}) {
3853
3853
  });
3854
3854
  }
3855
3855
 
3856
+ const numVariantProps = variantProps.length;
3857
+ function getVariantContext(visualElement) {
3858
+ if (!visualElement)
3859
+ return undefined;
3860
+ if (!visualElement.isControllingVariants) {
3861
+ const context = visualElement.parent
3862
+ ? getVariantContext(visualElement.parent) || {}
3863
+ : {};
3864
+ if (visualElement.props.initial !== undefined) {
3865
+ context.initial = visualElement.props.initial;
3866
+ }
3867
+ return context;
3868
+ }
3869
+ const context = {};
3870
+ for (let i = 0; i < numVariantProps; i++) {
3871
+ const name = variantProps[i];
3872
+ const prop = visualElement.props[name];
3873
+ if (isVariantLabel(prop) || prop === false) {
3874
+ context[name] = prop;
3875
+ }
3876
+ }
3877
+ return context;
3878
+ }
3879
+
3856
3880
  const reversePriorityOrder = [...variantPriorityOrder].reverse();
3857
3881
  const numAnimationTypes = variantPriorityOrder.length;
3858
3882
  function animateList(visualElement) {
@@ -3895,8 +3919,8 @@ function createAnimationState(visualElement) {
3895
3919
  * what to animate those to.
3896
3920
  */
3897
3921
  function animateChanges(changedActiveType) {
3898
- const props = visualElement.getProps();
3899
- const context = visualElement.getVariantContext(true) || {};
3922
+ const { props } = visualElement;
3923
+ const context = getVariantContext(visualElement.parent) || {};
3900
3924
  /**
3901
3925
  * A list of animations that we'll build into as we iterate through the animation
3902
3926
  * types. This will get executed at the end of the function.
@@ -4080,9 +4104,12 @@ function createAnimationState(visualElement) {
4080
4104
  shouldAnimateType = false;
4081
4105
  }
4082
4106
  /**
4083
- * If this is an inherited prop we want to hard-block animations
4107
+ * If this is an inherited prop we want to skip this animation
4108
+ * unless the inherited variants haven't changed on this render.
4084
4109
  */
4085
- if (shouldAnimateType && (!isInherited || handledRemovedValues)) {
4110
+ const willAnimateViaParent = isInherited && variantDidChange;
4111
+ const needsAnimating = !willAnimateViaParent || handledRemovedValues;
4112
+ if (shouldAnimateType && needsAnimating) {
4086
4113
  animations.push(...definitionList.map((animation) => ({
4087
4114
  animation: animation,
4088
4115
  options: { type },
@@ -5492,8 +5519,8 @@ function getRadius(values, radiusName) {
5492
5519
  // latestLeadValues.backgroundColor as string
5493
5520
  // )(p)
5494
5521
  // }
5495
- const easeCrossfadeIn = compress(0, 0.5, circOut);
5496
- const easeCrossfadeOut = compress(0.5, 0.95, noop);
5522
+ const easeCrossfadeIn = /*@__PURE__*/ compress(0, 0.5, circOut);
5523
+ const easeCrossfadeOut = /*@__PURE__*/ compress(0.5, 0.95, noop);
5497
5524
  function compress(min, max, easing) {
5498
5525
  return (p) => {
5499
5526
  // Could replace ifs with clamp
@@ -5965,7 +5992,7 @@ function updateMotionValuesFromProps(element, next, prev) {
5965
5992
  * and warn against mismatches.
5966
5993
  */
5967
5994
  if (process.env.NODE_ENV === "development") {
5968
- warnOnce(nextValue.version === "11.5.3", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.5.3 may not work as expected.`);
5995
+ warnOnce(nextValue.version === "11.5.5", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.5.5 may not work as expected.`);
5969
5996
  }
5970
5997
  }
5971
5998
  else if (isMotionValue(prevValue)) {
@@ -6049,7 +6076,6 @@ const propEventHandlers = [
6049
6076
  "LayoutAnimationStart",
6050
6077
  "LayoutAnimationComplete",
6051
6078
  ];
6052
- const numVariantProps = variantProps.length;
6053
6079
  /**
6054
6080
  * A VisualElement is an imperative abstraction around UI elements such as
6055
6081
  * HTMLElement, SVGElement, Three.Object3D etc.
@@ -6366,29 +6392,6 @@ class VisualElement {
6366
6392
  ? this.parent.getClosestVariantNode()
6367
6393
  : undefined;
6368
6394
  }
6369
- getVariantContext(startAtParent = false) {
6370
- if (startAtParent) {
6371
- return this.parent ? this.parent.getVariantContext() : undefined;
6372
- }
6373
- if (!this.isControllingVariants) {
6374
- const context = this.parent
6375
- ? this.parent.getVariantContext() || {}
6376
- : {};
6377
- if (this.props.initial !== undefined) {
6378
- context.initial = this.props.initial;
6379
- }
6380
- return context;
6381
- }
6382
- const context = {};
6383
- for (let i = 0; i < numVariantProps; i++) {
6384
- const name = variantProps[i];
6385
- const prop = this.props[name];
6386
- if (isVariantLabel(prop) || prop === false) {
6387
- context[name] = prop;
6388
- }
6389
- }
6390
- return context;
6391
- }
6392
6395
  /**
6393
6396
  * Add a child visual element to our set of children.
6394
6397
  */
@@ -11335,7 +11338,7 @@ function ReorderGroupComponent({ children, as = "ul", axis = "y", onReorder, val
11335
11338
  });
11336
11339
  return (jsxRuntime.jsx(Component, { ...props, ref: externalRef, ignoreStrict: true, children: jsxRuntime.jsx(ReorderContext.Provider, { value: context, children: children }) }));
11337
11340
  }
11338
- const ReorderGroup = React.forwardRef(ReorderGroupComponent);
11341
+ const ReorderGroup = /*@__PURE__*/ React.forwardRef(ReorderGroupComponent);
11339
11342
  function getValue(item) {
11340
11343
  return item.value;
11341
11344
  }
@@ -11465,7 +11468,7 @@ function ReorderItemComponent({ children, style = {}, value, as = "li", onDrag,
11465
11468
  onDrag && onDrag(event, gesturePoint);
11466
11469
  }, onLayoutMeasure: (measured) => registerItem(value, measured), ref: externalRef, ignoreStrict: true, children: children }));
11467
11470
  }
11468
- const ReorderItem = React.forwardRef(ReorderItemComponent);
11471
+ const ReorderItem = /*@__PURE__*/ React.forwardRef(ReorderItemComponent);
11469
11472
 
11470
11473
  var namespace = /*#__PURE__*/Object.freeze({
11471
11474
  __proto__: null,
@@ -961,9 +961,9 @@ const createUnitType = (unit) => ({
961
961
  parse: parseFloat,
962
962
  transform: (v) => `${v}${unit}`,
963
963
  });
964
- const degrees = createUnitType("deg");
965
- const percent = createUnitType("%");
966
- const px = createUnitType("px");
964
+ const degrees = /*@__PURE__*/ createUnitType("deg");
965
+ const percent = /*@__PURE__*/ createUnitType("%");
966
+ const px = /*@__PURE__*/ createUnitType("px");
967
967
  const progressPercentage = {
968
968
  ...percent,
969
969
  parse: (v) => percent.parse(v) / 100,