motion-dom 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.
- package/dist/cjs/index.js +25 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/view/start.mjs +25 -0
- package/dist/es/view/start.mjs.map +1 -1
- package/dist/motion-dom.dev.js +25 -0
- package/dist/motion-dom.js +1 -1
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -5985,6 +5985,31 @@ function startViewAnimation(builder) {
|
|
|
5985
5985
|
}
|
|
5986
5986
|
continue;
|
|
5987
5987
|
}
|
|
5988
|
+
/**
|
|
5989
|
+
* Drop the orphaned half of the default crossfade. The UA
|
|
5990
|
+
* fades old out and new in as a *pair*; if the opposing half
|
|
5991
|
+
* was explicitly overridden with something other than an
|
|
5992
|
+
* opacity fade (a clip or transform reveal), this side's
|
|
5993
|
+
* default opacity fade has no partner - left to run it would
|
|
5994
|
+
* dissolve what should be a static backdrop (e.g.
|
|
5995
|
+
* `.new({ clipPath })` should reveal over a still old view,
|
|
5996
|
+
* not fade the old out around the growing clip). Cancel it -
|
|
5997
|
+
* and its `plus-lighter` sibling on the same pseudo, which
|
|
5998
|
+
* would otherwise flash bright where the two opaque layers
|
|
5999
|
+
* overlap. A genuine crossfade (the opposing side also fading
|
|
6000
|
+
* opacity) keeps both halves and is handled above.
|
|
6001
|
+
*/
|
|
6002
|
+
const opposite = name.type === "old"
|
|
6003
|
+
? "new"
|
|
6004
|
+
: name.type === "new"
|
|
6005
|
+
? "old"
|
|
6006
|
+
: undefined;
|
|
6007
|
+
if (opposite &&
|
|
6008
|
+
explicitlyAnimated.has(`${name.layer}:${opposite}`) &&
|
|
6009
|
+
!opacityAnimated.has(`${name.layer}:${opposite}`)) {
|
|
6010
|
+
animation.cancel();
|
|
6011
|
+
continue;
|
|
6012
|
+
}
|
|
5988
6013
|
/**
|
|
5989
6014
|
* Otherwise retime the browser-generated animation to
|
|
5990
6015
|
* Motion's timing. This auto-enables the layout (group)
|