framer-motion 12.42.0 → 12.42.1

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.
@@ -6366,6 +6366,31 @@
6366
6366
  }
6367
6367
  continue;
6368
6368
  }
6369
+ /**
6370
+ * Drop the orphaned half of the default crossfade. The UA
6371
+ * fades old out and new in as a *pair*; if the opposing half
6372
+ * was explicitly overridden with something other than an
6373
+ * opacity fade (a clip or transform reveal), this side's
6374
+ * default opacity fade has no partner - left to run it would
6375
+ * dissolve what should be a static backdrop (e.g.
6376
+ * `.new({ clipPath })` should reveal over a still old view,
6377
+ * not fade the old out around the growing clip). Cancel it -
6378
+ * and its `plus-lighter` sibling on the same pseudo, which
6379
+ * would otherwise flash bright where the two opaque layers
6380
+ * overlap. A genuine crossfade (the opposing side also fading
6381
+ * opacity) keeps both halves and is handled above.
6382
+ */
6383
+ const opposite = name.type === "old"
6384
+ ? "new"
6385
+ : name.type === "new"
6386
+ ? "old"
6387
+ : undefined;
6388
+ if (opposite &&
6389
+ explicitlyAnimated.has(`${name.layer}:${opposite}`) &&
6390
+ !opacityAnimated.has(`${name.layer}:${opposite}`)) {
6391
+ animation.cancel();
6392
+ continue;
6393
+ }
6369
6394
  /**
6370
6395
  * Otherwise retime the browser-generated animation to
6371
6396
  * Motion's timing. This auto-enables the layout (group)