framer-motion 8.3.1 → 8.3.3
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 +7 -9
- package/dist/es/gestures/use-hover-gesture.mjs +1 -4
- package/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/value/index.mjs +1 -1
- package/dist/es/value/use-motion-template.mjs +5 -3
- package/dist/framer-motion.dev.js +7 -9
- package/dist/framer-motion.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/projection.dev.js +2 -2
- package/dist/size-rollup-dom-animation.js +1 -1
- package/dist/size-rollup-dom-max.js +1 -1
- package/dist/size-rollup-motion.js +1 -1
- package/dist/size-webpack-dom-animation.js +1 -1
- package/dist/size-webpack-dom-max.js +1 -1
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -1456,12 +1456,9 @@ function isDragActive() {
|
|
|
1456
1456
|
return false;
|
|
1457
1457
|
}
|
|
1458
1458
|
|
|
1459
|
-
function isMouseEvent(event) {
|
|
1460
|
-
return event.type !== "pen" && event.type !== "touch";
|
|
1461
|
-
}
|
|
1462
1459
|
function createHoverEvent(visualElement, isActive, callback) {
|
|
1463
1460
|
return (event, info) => {
|
|
1464
|
-
if (
|
|
1461
|
+
if (event.type === "touch" || isDragActive())
|
|
1465
1462
|
return;
|
|
1466
1463
|
/**
|
|
1467
1464
|
* Ensure we trigger animations before firing event callback
|
|
@@ -2075,7 +2072,7 @@ class MotionValue {
|
|
|
2075
2072
|
* This will be replaced by the build step with the latest version number.
|
|
2076
2073
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
2077
2074
|
*/
|
|
2078
|
-
this.version = "8.3.
|
|
2075
|
+
this.version = "8.3.3";
|
|
2079
2076
|
/**
|
|
2080
2077
|
* Duration, in milliseconds, since last updating frame.
|
|
2081
2078
|
*
|
|
@@ -5931,7 +5928,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
5931
5928
|
* and warn against mismatches.
|
|
5932
5929
|
*/
|
|
5933
5930
|
if (process.env.NODE_ENV === "development") {
|
|
5934
|
-
warnOnce(nextValue.version === "8.3.
|
|
5931
|
+
warnOnce(nextValue.version === "8.3.3", `Attempting to mix Framer Motion versions ${nextValue.version} with 8.3.3 may not work as expected.`);
|
|
5935
5932
|
}
|
|
5936
5933
|
}
|
|
5937
5934
|
else if (isMotionValue(prevValue)) {
|
|
@@ -9211,12 +9208,13 @@ function useMotionTemplate(fragments, ...values) {
|
|
|
9211
9208
|
for (let i = 0; i < numFragments; i++) {
|
|
9212
9209
|
output += fragments[i];
|
|
9213
9210
|
const value = values[i];
|
|
9214
|
-
if (value)
|
|
9215
|
-
output +=
|
|
9211
|
+
if (value) {
|
|
9212
|
+
output += isMotionValue(value) ? value.get() : value;
|
|
9213
|
+
}
|
|
9216
9214
|
}
|
|
9217
9215
|
return output;
|
|
9218
9216
|
}
|
|
9219
|
-
return useCombineMotionValues(values, buildValue);
|
|
9217
|
+
return useCombineMotionValues(values.filter(isMotionValue), buildValue);
|
|
9220
9218
|
}
|
|
9221
9219
|
|
|
9222
9220
|
/**
|
|
@@ -3,12 +3,9 @@ import { usePointerEvent } from '../events/use-pointer-event.mjs';
|
|
|
3
3
|
import { isDragActive } from './drag/utils/lock.mjs';
|
|
4
4
|
import { useMemo } from 'react';
|
|
5
5
|
|
|
6
|
-
function isMouseEvent(event) {
|
|
7
|
-
return event.type !== "pen" && event.type !== "touch";
|
|
8
|
-
}
|
|
9
6
|
function createHoverEvent(visualElement, isActive, callback) {
|
|
10
7
|
return (event, info) => {
|
|
11
|
-
if (
|
|
8
|
+
if (event.type === "touch" || isDragActive())
|
|
12
9
|
return;
|
|
13
10
|
/**
|
|
14
11
|
* Ensure we trigger animations before firing event callback
|
|
@@ -22,7 +22,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
22
22
|
* and warn against mismatches.
|
|
23
23
|
*/
|
|
24
24
|
if (process.env.NODE_ENV === "development") {
|
|
25
|
-
warnOnce(nextValue.version === "8.3.
|
|
25
|
+
warnOnce(nextValue.version === "8.3.3", `Attempting to mix Framer Motion versions ${nextValue.version} with 8.3.3 may not work as expected.`);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
else if (isMotionValue(prevValue)) {
|
package/dist/es/value/index.mjs
CHANGED
|
@@ -25,7 +25,7 @@ class MotionValue {
|
|
|
25
25
|
* This will be replaced by the build step with the latest version number.
|
|
26
26
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
27
27
|
*/
|
|
28
|
-
this.version = "8.3.
|
|
28
|
+
this.version = "8.3.3";
|
|
29
29
|
/**
|
|
30
30
|
* Duration, in milliseconds, since last updating frame.
|
|
31
31
|
*
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useCombineMotionValues } from './use-combine-values.mjs';
|
|
2
|
+
import { isMotionValue } from './utils/is-motion-value.mjs';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Combine multiple motion values into a new one using a string template literal.
|
|
@@ -32,12 +33,13 @@ function useMotionTemplate(fragments, ...values) {
|
|
|
32
33
|
for (let i = 0; i < numFragments; i++) {
|
|
33
34
|
output += fragments[i];
|
|
34
35
|
const value = values[i];
|
|
35
|
-
if (value)
|
|
36
|
-
output +=
|
|
36
|
+
if (value) {
|
|
37
|
+
output += isMotionValue(value) ? value.get() : value;
|
|
38
|
+
}
|
|
37
39
|
}
|
|
38
40
|
return output;
|
|
39
41
|
}
|
|
40
|
-
return useCombineMotionValues(values, buildValue);
|
|
42
|
+
return useCombineMotionValues(values.filter(isMotionValue), buildValue);
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
export { useMotionTemplate };
|
|
@@ -1454,12 +1454,9 @@
|
|
|
1454
1454
|
return false;
|
|
1455
1455
|
}
|
|
1456
1456
|
|
|
1457
|
-
function isMouseEvent(event) {
|
|
1458
|
-
return event.type !== "pen" && event.type !== "touch";
|
|
1459
|
-
}
|
|
1460
1457
|
function createHoverEvent(visualElement, isActive, callback) {
|
|
1461
1458
|
return (event, info) => {
|
|
1462
|
-
if (
|
|
1459
|
+
if (event.type === "touch" || isDragActive())
|
|
1463
1460
|
return;
|
|
1464
1461
|
/**
|
|
1465
1462
|
* Ensure we trigger animations before firing event callback
|
|
@@ -2073,7 +2070,7 @@
|
|
|
2073
2070
|
* This will be replaced by the build step with the latest version number.
|
|
2074
2071
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
2075
2072
|
*/
|
|
2076
|
-
this.version = "8.3.
|
|
2073
|
+
this.version = "8.3.3";
|
|
2077
2074
|
/**
|
|
2078
2075
|
* Duration, in milliseconds, since last updating frame.
|
|
2079
2076
|
*
|
|
@@ -5944,7 +5941,7 @@
|
|
|
5944
5941
|
* and warn against mismatches.
|
|
5945
5942
|
*/
|
|
5946
5943
|
{
|
|
5947
|
-
warnOnce(nextValue.version === "8.3.
|
|
5944
|
+
warnOnce(nextValue.version === "8.3.3", `Attempting to mix Framer Motion versions ${nextValue.version} with 8.3.3 may not work as expected.`);
|
|
5948
5945
|
}
|
|
5949
5946
|
}
|
|
5950
5947
|
else if (isMotionValue(prevValue)) {
|
|
@@ -9222,12 +9219,13 @@
|
|
|
9222
9219
|
for (let i = 0; i < numFragments; i++) {
|
|
9223
9220
|
output += fragments[i];
|
|
9224
9221
|
const value = values[i];
|
|
9225
|
-
if (value)
|
|
9226
|
-
output +=
|
|
9222
|
+
if (value) {
|
|
9223
|
+
output += isMotionValue(value) ? value.get() : value;
|
|
9224
|
+
}
|
|
9227
9225
|
}
|
|
9228
9226
|
return output;
|
|
9229
9227
|
}
|
|
9230
|
-
return useCombineMotionValues(values, buildValue);
|
|
9228
|
+
return useCombineMotionValues(values.filter(isMotionValue), buildValue);
|
|
9231
9229
|
}
|
|
9232
9230
|
|
|
9233
9231
|
/**
|