framer-motion 12.6.4 → 12.7.0

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.
@@ -1563,7 +1563,7 @@
1563
1563
  * This will be replaced by the build step with the latest version number.
1564
1564
  * When MotionValues are provided to motion components, warn if versions are mixed.
1565
1565
  */
1566
- this.version = "12.6.4";
1566
+ this.version = "12.6.5";
1567
1567
  /**
1568
1568
  * Tracks whether this value can output a velocity. Currently this is only true
1569
1569
  * if the value is numerical, but we might be able to widen the scope here and support
@@ -1841,12 +1841,18 @@
1841
1841
  return new MotionValue(init, options);
1842
1842
  }
1843
1843
 
1844
+ /**
1845
+ * @deprecated
1846
+ *
1847
+ * Import as `frame` instead.
1848
+ */
1849
+ const sync = frame;
1844
1850
  /**
1845
1851
  * @deprecated
1846
1852
  *
1847
1853
  * Use cancelFrame(callback) instead.
1848
1854
  */
1849
- stepsOrder.reduce((acc, key) => {
1855
+ const cancelSync = stepsOrder.reduce((acc, key) => {
1850
1856
  acc[key] = (process) => cancelFrame(process);
1851
1857
  return acc;
1852
1858
  }, {});
@@ -4833,13 +4839,11 @@
4833
4839
  const isPx = (value) => typeof value === "number" || px.test(value);
4834
4840
  function mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) {
4835
4841
  if (shouldCrossfadeOpacity) {
4836
- target.opacity = mixNumber$1(0,
4837
- // TODO Reinstate this if only child
4838
- lead.opacity !== undefined ? lead.opacity : 1, easeCrossfadeIn(progress));
4839
- target.opacityExit = mixNumber$1(follow.opacity !== undefined ? follow.opacity : 1, 0, easeCrossfadeOut(progress));
4842
+ target.opacity = mixNumber$1(0, lead.opacity ?? 1, easeCrossfadeIn(progress));
4843
+ target.opacityExit = mixNumber$1(follow.opacity ?? 1, 0, easeCrossfadeOut(progress));
4840
4844
  }
4841
4845
  else if (isOnlyMember) {
4842
- target.opacity = mixNumber$1(follow.opacity !== undefined ? follow.opacity : 1, lead.opacity !== undefined ? lead.opacity : 1, progress);
4846
+ target.opacity = mixNumber$1(follow.opacity ?? 1, lead.opacity ?? 1, progress);
4843
4847
  }
4844
4848
  /**
4845
4849
  * Mix border radius
@@ -7148,7 +7152,7 @@
7148
7152
  * and warn against mismatches.
7149
7153
  */
7150
7154
  {
7151
- warnOnce(nextValue.version === "12.6.4", `Attempting to mix Motion versions ${nextValue.version} with 12.6.4 may not work as expected.`);
7155
+ warnOnce(nextValue.version === "12.7.0", `Attempting to mix Motion versions ${nextValue.version} with 12.7.0 may not work as expected.`);
7152
7156
  }
7153
7157
  }
7154
7158
  else if (isMotionValue(prevValue)) {
@@ -10198,7 +10202,7 @@
10198
10202
  return visualElement;
10199
10203
  }
10200
10204
  function createProjectionNode(visualElement, props, ProjectionNodeConstructor, initialPromotionConfig) {
10201
- const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, } = props;
10205
+ const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, layoutCrossfade, } = props;
10202
10206
  visualElement.projection = new ProjectionNodeConstructor(visualElement.latestValues, props["data-framer-portal-id"]
10203
10207
  ? undefined
10204
10208
  : getClosestProjectingNode(visualElement.parent));
@@ -10216,6 +10220,7 @@
10216
10220
  */
10217
10221
  animationType: typeof layout === "string" ? layout : "both",
10218
10222
  initialPromotionConfig,
10223
+ crossfade: layoutCrossfade,
10219
10224
  layoutScroll,
10220
10225
  layoutRoot,
10221
10226
  });
@@ -13283,6 +13288,7 @@
13283
13288
  exports.buildTransform = buildTransform;
13284
13289
  exports.calcLength = calcLength;
13285
13290
  exports.cancelFrame = cancelFrame;
13291
+ exports.cancelSync = cancelSync;
13286
13292
  exports.circIn = circIn;
13287
13293
  exports.circInOut = circInOut;
13288
13294
  exports.circOut = circOut;
@@ -13337,6 +13343,7 @@
13337
13343
  exports.stagger = stagger;
13338
13344
  exports.startOptimizedAppearAnimation = startOptimizedAppearAnimation;
13339
13345
  exports.steps = steps;
13346
+ exports.sync = sync;
13340
13347
  exports.time = time;
13341
13348
  exports.transform = transform;
13342
13349
  exports.unwrapMotionComponent = unwrapMotionComponent;