framer-motion 12.6.5 → 12.7.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/client.js +1 -1
- package/dist/cjs/{create-lh01IiO5.js → create-CQMHX9tY.js} +6 -7
- package/dist/cjs/dom.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/m.js +2 -1
- package/dist/dom-mini.js +1 -1
- package/dist/dom.js +1 -1
- package/dist/es/motion/utils/use-visual-element.mjs +2 -1
- package/dist/es/projection/animation/mix-values.mjs +3 -5
- package/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/framer-motion.dev.js +8 -12
- package/dist/framer-motion.js +1 -1
- package/dist/mini.js +1 -1
- package/dist/size-rollup-animate.js +1 -1
- package/dist/size-rollup-dom-animation-m.js +1 -1
- package/dist/size-rollup-dom-animation.js +1 -1
- package/dist/size-rollup-dom-max.js +1 -1
- package/dist/size-rollup-m.js +1 -1
- package/dist/size-rollup-motion.js +1 -1
- package/dist/size-rollup-waapi-animate.js +1 -1
- package/package.json +3 -3
|
@@ -937,11 +937,8 @@
|
|
|
937
937
|
this.animation.onfinish = () => {
|
|
938
938
|
if (!pseudoElement) {
|
|
939
939
|
style.set(element, name, getFinalKeyframe$1(keyframes, transition));
|
|
940
|
+
this.cancel();
|
|
940
941
|
}
|
|
941
|
-
else {
|
|
942
|
-
this.commitStyles();
|
|
943
|
-
}
|
|
944
|
-
this.cancel();
|
|
945
942
|
};
|
|
946
943
|
/**
|
|
947
944
|
* TODO: Check for VisualElement before using animation state.
|
|
@@ -1563,7 +1560,7 @@
|
|
|
1563
1560
|
* This will be replaced by the build step with the latest version number.
|
|
1564
1561
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
1565
1562
|
*/
|
|
1566
|
-
this.version = "12.
|
|
1563
|
+
this.version = "12.7.1";
|
|
1567
1564
|
/**
|
|
1568
1565
|
* Tracks whether this value can output a velocity. Currently this is only true
|
|
1569
1566
|
* if the value is numerical, but we might be able to widen the scope here and support
|
|
@@ -4839,13 +4836,11 @@
|
|
|
4839
4836
|
const isPx = (value) => typeof value === "number" || px.test(value);
|
|
4840
4837
|
function mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) {
|
|
4841
4838
|
if (shouldCrossfadeOpacity) {
|
|
4842
|
-
target.opacity = mixNumber$1(0,
|
|
4843
|
-
|
|
4844
|
-
lead.opacity !== undefined ? lead.opacity : 1, easeCrossfadeIn(progress));
|
|
4845
|
-
target.opacityExit = mixNumber$1(follow.opacity !== undefined ? follow.opacity : 1, 0, easeCrossfadeOut(progress));
|
|
4839
|
+
target.opacity = mixNumber$1(0, lead.opacity ?? 1, easeCrossfadeIn(progress));
|
|
4840
|
+
target.opacityExit = mixNumber$1(follow.opacity ?? 1, 0, easeCrossfadeOut(progress));
|
|
4846
4841
|
}
|
|
4847
4842
|
else if (isOnlyMember) {
|
|
4848
|
-
target.opacity = mixNumber$1(follow.opacity
|
|
4843
|
+
target.opacity = mixNumber$1(follow.opacity ?? 1, lead.opacity ?? 1, progress);
|
|
4849
4844
|
}
|
|
4850
4845
|
/**
|
|
4851
4846
|
* Mix border radius
|
|
@@ -7154,7 +7149,7 @@
|
|
|
7154
7149
|
* and warn against mismatches.
|
|
7155
7150
|
*/
|
|
7156
7151
|
{
|
|
7157
|
-
warnOnce(nextValue.version === "12.
|
|
7152
|
+
warnOnce(nextValue.version === "12.7.1", `Attempting to mix Motion versions ${nextValue.version} with 12.7.1 may not work as expected.`);
|
|
7158
7153
|
}
|
|
7159
7154
|
}
|
|
7160
7155
|
else if (isMotionValue(prevValue)) {
|
|
@@ -10204,7 +10199,7 @@
|
|
|
10204
10199
|
return visualElement;
|
|
10205
10200
|
}
|
|
10206
10201
|
function createProjectionNode(visualElement, props, ProjectionNodeConstructor, initialPromotionConfig) {
|
|
10207
|
-
const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, } = props;
|
|
10202
|
+
const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, layoutCrossfade, } = props;
|
|
10208
10203
|
visualElement.projection = new ProjectionNodeConstructor(visualElement.latestValues, props["data-framer-portal-id"]
|
|
10209
10204
|
? undefined
|
|
10210
10205
|
: getClosestProjectingNode(visualElement.parent));
|
|
@@ -10222,6 +10217,7 @@
|
|
|
10222
10217
|
*/
|
|
10223
10218
|
animationType: typeof layout === "string" ? layout : "both",
|
|
10224
10219
|
initialPromotionConfig,
|
|
10220
|
+
crossfade: layoutCrossfade,
|
|
10225
10221
|
layoutScroll,
|
|
10226
10222
|
layoutRoot,
|
|
10227
10223
|
});
|