framer-motion 12.6.5 → 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.
- package/dist/cjs/client.js +1 -1
- package/dist/cjs/{create-lh01IiO5.js → create-D7hnMOs3.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/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 +6 -7
- package/dist/framer-motion.js +1 -1
- package/dist/m.d.ts +7 -0
- package/dist/size-rollup-dom-animation-m.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/types/client.d.ts +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/{types.d-B50aGbjN.d.ts → types.d-Bl5P8X-q.d.ts} +7 -0
- package/package.json +2 -2
package/dist/cjs/client.js
CHANGED
|
@@ -3069,13 +3069,11 @@ const asNumber = (value) => typeof value === "string" ? parseFloat(value) : valu
|
|
|
3069
3069
|
const isPx = (value) => typeof value === "number" || px.test(value);
|
|
3070
3070
|
function mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) {
|
|
3071
3071
|
if (shouldCrossfadeOpacity) {
|
|
3072
|
-
target.opacity = mixNumber$1(0,
|
|
3073
|
-
|
|
3074
|
-
lead.opacity !== undefined ? lead.opacity : 1, easeCrossfadeIn(progress));
|
|
3075
|
-
target.opacityExit = mixNumber$1(follow.opacity !== undefined ? follow.opacity : 1, 0, easeCrossfadeOut(progress));
|
|
3072
|
+
target.opacity = mixNumber$1(0, lead.opacity ?? 1, easeCrossfadeIn(progress));
|
|
3073
|
+
target.opacityExit = mixNumber$1(follow.opacity ?? 1, 0, easeCrossfadeOut(progress));
|
|
3076
3074
|
}
|
|
3077
3075
|
else if (isOnlyMember) {
|
|
3078
|
-
target.opacity = mixNumber$1(follow.opacity
|
|
3076
|
+
target.opacity = mixNumber$1(follow.opacity ?? 1, lead.opacity ?? 1, progress);
|
|
3079
3077
|
}
|
|
3080
3078
|
/**
|
|
3081
3079
|
* Mix border radius
|
|
@@ -5423,7 +5421,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
5423
5421
|
* and warn against mismatches.
|
|
5424
5422
|
*/
|
|
5425
5423
|
if (process.env.NODE_ENV === "development") {
|
|
5426
|
-
motionUtils.warnOnce(nextValue.version === "12.
|
|
5424
|
+
motionUtils.warnOnce(nextValue.version === "12.7.0", `Attempting to mix Motion versions ${nextValue.version} with 12.7.0 may not work as expected.`);
|
|
5427
5425
|
}
|
|
5428
5426
|
}
|
|
5429
5427
|
else if (isMotionValue(prevValue)) {
|
|
@@ -8287,7 +8285,7 @@ function useVisualElement(Component, visualState, props, createVisualElement, Pr
|
|
|
8287
8285
|
return visualElement;
|
|
8288
8286
|
}
|
|
8289
8287
|
function createProjectionNode(visualElement, props, ProjectionNodeConstructor, initialPromotionConfig) {
|
|
8290
|
-
const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, } = props;
|
|
8288
|
+
const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, layoutCrossfade, } = props;
|
|
8291
8289
|
visualElement.projection = new ProjectionNodeConstructor(visualElement.latestValues, props["data-framer-portal-id"]
|
|
8292
8290
|
? undefined
|
|
8293
8291
|
: getClosestProjectingNode(visualElement.parent));
|
|
@@ -8305,6 +8303,7 @@ function createProjectionNode(visualElement, props, ProjectionNodeConstructor, i
|
|
|
8305
8303
|
*/
|
|
8306
8304
|
animationType: typeof layout === "string" ? layout : "both",
|
|
8307
8305
|
initialPromotionConfig,
|
|
8306
|
+
crossfade: layoutCrossfade,
|
|
8308
8307
|
layoutScroll,
|
|
8309
8308
|
layoutRoot,
|
|
8310
8309
|
});
|
package/dist/cjs/dom.js
CHANGED
|
@@ -3444,7 +3444,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
3444
3444
|
* and warn against mismatches.
|
|
3445
3445
|
*/
|
|
3446
3446
|
if (process.env.NODE_ENV === "development") {
|
|
3447
|
-
motionUtils.warnOnce(nextValue.version === "12.
|
|
3447
|
+
motionUtils.warnOnce(nextValue.version === "12.7.0", `Attempting to mix Motion versions ${nextValue.version} with 12.7.0 may not work as expected.`);
|
|
3448
3448
|
}
|
|
3449
3449
|
}
|
|
3450
3450
|
else if (isMotionValue(prevValue)) {
|
package/dist/cjs/index.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var create = require('./create-
|
|
7
|
+
var create = require('./create-D7hnMOs3.js');
|
|
8
8
|
var motionDom = require('motion-dom');
|
|
9
9
|
var motionUtils = require('motion-utils');
|
|
10
10
|
|
package/dist/cjs/m.js
CHANGED
|
@@ -266,7 +266,7 @@ function useVisualElement(Component, visualState, props, createVisualElement, Pr
|
|
|
266
266
|
return visualElement;
|
|
267
267
|
}
|
|
268
268
|
function createProjectionNode(visualElement, props, ProjectionNodeConstructor, initialPromotionConfig) {
|
|
269
|
-
const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, } = props;
|
|
269
|
+
const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, layoutCrossfade, } = props;
|
|
270
270
|
visualElement.projection = new ProjectionNodeConstructor(visualElement.latestValues, props["data-framer-portal-id"]
|
|
271
271
|
? undefined
|
|
272
272
|
: getClosestProjectingNode(visualElement.parent));
|
|
@@ -284,6 +284,7 @@ function createProjectionNode(visualElement, props, ProjectionNodeConstructor, i
|
|
|
284
284
|
*/
|
|
285
285
|
animationType: typeof layout === "string" ? layout : "both",
|
|
286
286
|
initialPromotionConfig,
|
|
287
|
+
crossfade: layoutCrossfade,
|
|
287
288
|
layoutScroll,
|
|
288
289
|
layoutRoot,
|
|
289
290
|
});
|
|
@@ -99,7 +99,7 @@ function useVisualElement(Component, visualState, props, createVisualElement, Pr
|
|
|
99
99
|
return visualElement;
|
|
100
100
|
}
|
|
101
101
|
function createProjectionNode(visualElement, props, ProjectionNodeConstructor, initialPromotionConfig) {
|
|
102
|
-
const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, } = props;
|
|
102
|
+
const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, layoutCrossfade, } = props;
|
|
103
103
|
visualElement.projection = new ProjectionNodeConstructor(visualElement.latestValues, props["data-framer-portal-id"]
|
|
104
104
|
? undefined
|
|
105
105
|
: getClosestProjectingNode(visualElement.parent));
|
|
@@ -117,6 +117,7 @@ function createProjectionNode(visualElement, props, ProjectionNodeConstructor, i
|
|
|
117
117
|
*/
|
|
118
118
|
animationType: typeof layout === "string" ? layout : "both",
|
|
119
119
|
initialPromotionConfig,
|
|
120
|
+
crossfade: layoutCrossfade,
|
|
120
121
|
layoutScroll,
|
|
121
122
|
layoutRoot,
|
|
122
123
|
});
|
|
@@ -9,13 +9,11 @@ const asNumber = (value) => typeof value === "string" ? parseFloat(value) : valu
|
|
|
9
9
|
const isPx = (value) => typeof value === "number" || px.test(value);
|
|
10
10
|
function mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) {
|
|
11
11
|
if (shouldCrossfadeOpacity) {
|
|
12
|
-
target.opacity = mixNumber(0,
|
|
13
|
-
|
|
14
|
-
lead.opacity !== undefined ? lead.opacity : 1, easeCrossfadeIn(progress));
|
|
15
|
-
target.opacityExit = mixNumber(follow.opacity !== undefined ? follow.opacity : 1, 0, easeCrossfadeOut(progress));
|
|
12
|
+
target.opacity = mixNumber(0, lead.opacity ?? 1, easeCrossfadeIn(progress));
|
|
13
|
+
target.opacityExit = mixNumber(follow.opacity ?? 1, 0, easeCrossfadeOut(progress));
|
|
16
14
|
}
|
|
17
15
|
else if (isOnlyMember) {
|
|
18
|
-
target.opacity = mixNumber(follow.opacity
|
|
16
|
+
target.opacity = mixNumber(follow.opacity ?? 1, lead.opacity ?? 1, progress);
|
|
19
17
|
}
|
|
20
18
|
/**
|
|
21
19
|
* Mix border radius
|
|
@@ -17,7 +17,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
17
17
|
* and warn against mismatches.
|
|
18
18
|
*/
|
|
19
19
|
if (process.env.NODE_ENV === "development") {
|
|
20
|
-
warnOnce(nextValue.version === "12.
|
|
20
|
+
warnOnce(nextValue.version === "12.7.0", `Attempting to mix Motion versions ${nextValue.version} with 12.7.0 may not work as expected.`);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
else if (isMotionValue(prevValue)) {
|
|
@@ -4839,13 +4839,11 @@
|
|
|
4839
4839
|
const isPx = (value) => typeof value === "number" || px.test(value);
|
|
4840
4840
|
function mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) {
|
|
4841
4841
|
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));
|
|
4842
|
+
target.opacity = mixNumber$1(0, lead.opacity ?? 1, easeCrossfadeIn(progress));
|
|
4843
|
+
target.opacityExit = mixNumber$1(follow.opacity ?? 1, 0, easeCrossfadeOut(progress));
|
|
4846
4844
|
}
|
|
4847
4845
|
else if (isOnlyMember) {
|
|
4848
|
-
target.opacity = mixNumber$1(follow.opacity
|
|
4846
|
+
target.opacity = mixNumber$1(follow.opacity ?? 1, lead.opacity ?? 1, progress);
|
|
4849
4847
|
}
|
|
4850
4848
|
/**
|
|
4851
4849
|
* Mix border radius
|
|
@@ -7154,7 +7152,7 @@
|
|
|
7154
7152
|
* and warn against mismatches.
|
|
7155
7153
|
*/
|
|
7156
7154
|
{
|
|
7157
|
-
warnOnce(nextValue.version === "12.
|
|
7155
|
+
warnOnce(nextValue.version === "12.7.0", `Attempting to mix Motion versions ${nextValue.version} with 12.7.0 may not work as expected.`);
|
|
7158
7156
|
}
|
|
7159
7157
|
}
|
|
7160
7158
|
else if (isMotionValue(prevValue)) {
|
|
@@ -10204,7 +10202,7 @@
|
|
|
10204
10202
|
return visualElement;
|
|
10205
10203
|
}
|
|
10206
10204
|
function createProjectionNode(visualElement, props, ProjectionNodeConstructor, initialPromotionConfig) {
|
|
10207
|
-
const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, } = props;
|
|
10205
|
+
const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, layoutCrossfade, } = props;
|
|
10208
10206
|
visualElement.projection = new ProjectionNodeConstructor(visualElement.latestValues, props["data-framer-portal-id"]
|
|
10209
10207
|
? undefined
|
|
10210
10208
|
: getClosestProjectingNode(visualElement.parent));
|
|
@@ -10222,6 +10220,7 @@
|
|
|
10222
10220
|
*/
|
|
10223
10221
|
animationType: typeof layout === "string" ? layout : "both",
|
|
10224
10222
|
initialPromotionConfig,
|
|
10223
|
+
crossfade: layoutCrossfade,
|
|
10225
10224
|
layoutScroll,
|
|
10226
10225
|
layoutRoot,
|
|
10227
10226
|
});
|