framer-motion 6.4.1 → 6.4.2
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 +2 -2
- package/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/value/index.mjs +1 -1
- package/dist/framer-motion.dev.js +18 -3
- package/dist/framer-motion.js +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/package.json +4 -4
package/dist/cjs/index.js
CHANGED
|
@@ -473,7 +473,7 @@ var MotionValue = /** @class */ (function () {
|
|
|
473
473
|
* This will be replaced by the build step with the latest version number.
|
|
474
474
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
475
475
|
*/
|
|
476
|
-
this.version = "6.4.
|
|
476
|
+
this.version = "6.4.2";
|
|
477
477
|
/**
|
|
478
478
|
* Duration, in milliseconds, since last updating frame.
|
|
479
479
|
*
|
|
@@ -5984,7 +5984,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
5984
5984
|
* and warn against mismatches.
|
|
5985
5985
|
*/
|
|
5986
5986
|
if (process.env.NODE_ENV === "development") {
|
|
5987
|
-
warnOnce(nextValue.version === "6.4.
|
|
5987
|
+
warnOnce(nextValue.version === "6.4.2", "Attempting to mix Framer Motion versions ".concat(nextValue.version, " with 6.4.2 may not work as expected."));
|
|
5988
5988
|
}
|
|
5989
5989
|
}
|
|
5990
5990
|
else if (isMotionValue(prevValue)) {
|
|
@@ -18,7 +18,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
18
18
|
* and warn against mismatches.
|
|
19
19
|
*/
|
|
20
20
|
if (process.env.NODE_ENV === "development") {
|
|
21
|
-
warnOnce(nextValue.version === "6.4.
|
|
21
|
+
warnOnce(nextValue.version === "6.4.2", "Attempting to mix Framer Motion versions ".concat(nextValue.version, " with 6.4.2 may not work as expected."));
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
else if (isMotionValue(prevValue)) {
|
package/dist/es/value/index.mjs
CHANGED
|
@@ -25,7 +25,7 @@ var MotionValue = /** @class */ (function () {
|
|
|
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 = "6.4.
|
|
28
|
+
this.version = "6.4.2";
|
|
29
29
|
/**
|
|
30
30
|
* Duration, in milliseconds, since last updating frame.
|
|
31
31
|
*
|
|
@@ -1706,7 +1706,7 @@
|
|
|
1706
1706
|
* This will be replaced by the build step with the latest version number.
|
|
1707
1707
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
1708
1708
|
*/
|
|
1709
|
-
this.version = "6.4.
|
|
1709
|
+
this.version = "6.4.2";
|
|
1710
1710
|
/**
|
|
1711
1711
|
* Duration, in milliseconds, since last updating frame.
|
|
1712
1712
|
*
|
|
@@ -7217,7 +7217,7 @@
|
|
|
7217
7217
|
* and warn against mismatches.
|
|
7218
7218
|
*/
|
|
7219
7219
|
{
|
|
7220
|
-
warnOnce(nextValue.version === "6.4.
|
|
7220
|
+
warnOnce(nextValue.version === "6.4.2", "Attempting to mix Framer Motion versions ".concat(nextValue.version, " with 6.4.2 may not work as expected."));
|
|
7221
7221
|
}
|
|
7222
7222
|
}
|
|
7223
7223
|
else if (isMotionValue(prevValue)) {
|
|
@@ -9420,6 +9420,8 @@
|
|
|
9420
9420
|
return [item, runCycle];
|
|
9421
9421
|
}
|
|
9422
9422
|
|
|
9423
|
+
const noop = () => { };
|
|
9424
|
+
|
|
9423
9425
|
function resolveElements(elements, selectorCache) {
|
|
9424
9426
|
var _a;
|
|
9425
9427
|
if (typeof elements === "string") {
|
|
@@ -9440,6 +9442,19 @@
|
|
|
9440
9442
|
return Array.from(elements || []);
|
|
9441
9443
|
}
|
|
9442
9444
|
|
|
9445
|
+
let supportsDocumentRoot;
|
|
9446
|
+
function getDefaultRoot() {
|
|
9447
|
+
if (supportsDocumentRoot === undefined) {
|
|
9448
|
+
try {
|
|
9449
|
+
new IntersectionObserver(noop, { root: document });
|
|
9450
|
+
supportsDocumentRoot = true;
|
|
9451
|
+
}
|
|
9452
|
+
catch (e) {
|
|
9453
|
+
supportsDocumentRoot = false;
|
|
9454
|
+
}
|
|
9455
|
+
}
|
|
9456
|
+
return supportsDocumentRoot ? document : undefined;
|
|
9457
|
+
}
|
|
9443
9458
|
const thresholds = {
|
|
9444
9459
|
any: 0,
|
|
9445
9460
|
all: 1,
|
|
@@ -9481,7 +9496,7 @@
|
|
|
9481
9496
|
});
|
|
9482
9497
|
};
|
|
9483
9498
|
const observer = new IntersectionObserver(onIntersectionChange, {
|
|
9484
|
-
root,
|
|
9499
|
+
root: root || getDefaultRoot(),
|
|
9485
9500
|
rootMargin,
|
|
9486
9501
|
threshold: typeof amount === "number" ? amount : thresholds[amount],
|
|
9487
9502
|
});
|