framer-motion 8.5.2-alpha.1 → 8.5.2-alpha.4
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 +15 -10
- package/dist/es/animation/optimized-appear/handoff.mjs +1 -1
- package/dist/es/animation/optimized-appear/start.mjs +12 -7
- package/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/value/index.mjs +1 -1
- package/dist/framer-motion.dev.js +15 -10
- 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/dist/size-rollup-motion.js +1 -1
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -2105,7 +2105,7 @@ class MotionValue {
|
|
|
2105
2105
|
* This will be replaced by the build step with the latest version number.
|
|
2106
2106
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
2107
2107
|
*/
|
|
2108
|
-
this.version = "8.5.2-alpha.
|
|
2108
|
+
this.version = "8.5.2-alpha.4";
|
|
2109
2109
|
/**
|
|
2110
2110
|
* Duration, in milliseconds, since last updating frame.
|
|
2111
2111
|
*
|
|
@@ -5953,7 +5953,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
5953
5953
|
* and warn against mismatches.
|
|
5954
5954
|
*/
|
|
5955
5955
|
if (process.env.NODE_ENV === "development") {
|
|
5956
|
-
warnOnce(nextValue.version === "8.5.2-alpha.
|
|
5956
|
+
warnOnce(nextValue.version === "8.5.2-alpha.4", `Attempting to mix Framer Motion versions ${nextValue.version} with 8.5.2-alpha.4 may not work as expected.`);
|
|
5957
5957
|
}
|
|
5958
5958
|
}
|
|
5959
5959
|
else if (isMotionValue(prevValue)) {
|
|
@@ -9868,7 +9868,7 @@ sync) {
|
|
|
9868
9868
|
* it synchronously would prevent subsequent transforms from handing off.
|
|
9869
9869
|
*/
|
|
9870
9870
|
sync.render(cancelOptimisedAnimation);
|
|
9871
|
-
console.log("handing off from", animation.currentTime);
|
|
9871
|
+
console.log("handing off from", animation, animation.currentTime);
|
|
9872
9872
|
return animation.currentTime || 0;
|
|
9873
9873
|
}
|
|
9874
9874
|
else {
|
|
@@ -9894,16 +9894,21 @@ function startOptimizedAppearAnimation(element, name, keyframes, options, onRead
|
|
|
9894
9894
|
ready: false,
|
|
9895
9895
|
});
|
|
9896
9896
|
const startAnimation = () => {
|
|
9897
|
-
|
|
9898
|
-
|
|
9897
|
+
readyAnimation.cancel();
|
|
9898
|
+
const appearAnimation = animateStyle(element, name, keyframes, options);
|
|
9899
|
+
if (document.timeline) {
|
|
9900
|
+
appearAnimation.startTime = document.timeline.currentTime;
|
|
9901
|
+
console.log(appearAnimation.startTime, appearAnimation.currentTime, performance.now());
|
|
9902
|
+
}
|
|
9903
|
+
appearAnimationStore.set(storeId, {
|
|
9904
|
+
animation: appearAnimation,
|
|
9905
|
+
ready: true,
|
|
9906
|
+
});
|
|
9899
9907
|
if (onReady)
|
|
9900
|
-
onReady(
|
|
9908
|
+
onReady(appearAnimation);
|
|
9901
9909
|
};
|
|
9902
9910
|
if (readyAnimation.ready) {
|
|
9903
|
-
readyAnimation.ready.then(
|
|
9904
|
-
readyAnimation.cancel();
|
|
9905
|
-
startAnimation();
|
|
9906
|
-
});
|
|
9911
|
+
readyAnimation.ready.then(startAnimation);
|
|
9907
9912
|
}
|
|
9908
9913
|
else {
|
|
9909
9914
|
startAnimation();
|
|
@@ -51,7 +51,7 @@ sync) {
|
|
|
51
51
|
* it synchronously would prevent subsequent transforms from handing off.
|
|
52
52
|
*/
|
|
53
53
|
sync.render(cancelOptimisedAnimation);
|
|
54
|
-
console.log("handing off from", animation.currentTime);
|
|
54
|
+
console.log("handing off from", animation, animation.currentTime);
|
|
55
55
|
return animation.currentTime || 0;
|
|
56
56
|
}
|
|
57
57
|
else {
|
|
@@ -21,16 +21,21 @@ function startOptimizedAppearAnimation(element, name, keyframes, options, onRead
|
|
|
21
21
|
ready: false,
|
|
22
22
|
});
|
|
23
23
|
const startAnimation = () => {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
readyAnimation.cancel();
|
|
25
|
+
const appearAnimation = animateStyle(element, name, keyframes, options);
|
|
26
|
+
if (document.timeline) {
|
|
27
|
+
appearAnimation.startTime = document.timeline.currentTime;
|
|
28
|
+
console.log(appearAnimation.startTime, appearAnimation.currentTime, performance.now());
|
|
29
|
+
}
|
|
30
|
+
appearAnimationStore.set(storeId, {
|
|
31
|
+
animation: appearAnimation,
|
|
32
|
+
ready: true,
|
|
33
|
+
});
|
|
26
34
|
if (onReady)
|
|
27
|
-
onReady(
|
|
35
|
+
onReady(appearAnimation);
|
|
28
36
|
};
|
|
29
37
|
if (readyAnimation.ready) {
|
|
30
|
-
readyAnimation.ready.then(
|
|
31
|
-
readyAnimation.cancel();
|
|
32
|
-
startAnimation();
|
|
33
|
-
});
|
|
38
|
+
readyAnimation.ready.then(startAnimation);
|
|
34
39
|
}
|
|
35
40
|
else {
|
|
36
41
|
startAnimation();
|
|
@@ -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.5.2-alpha.
|
|
25
|
+
warnOnce(nextValue.version === "8.5.2-alpha.4", `Attempting to mix Framer Motion versions ${nextValue.version} with 8.5.2-alpha.4 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.5.2-alpha.
|
|
28
|
+
this.version = "8.5.2-alpha.4";
|
|
29
29
|
/**
|
|
30
30
|
* Duration, in milliseconds, since last updating frame.
|
|
31
31
|
*
|
|
@@ -2103,7 +2103,7 @@
|
|
|
2103
2103
|
* This will be replaced by the build step with the latest version number.
|
|
2104
2104
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
2105
2105
|
*/
|
|
2106
|
-
this.version = "8.5.2-alpha.
|
|
2106
|
+
this.version = "8.5.2-alpha.4";
|
|
2107
2107
|
/**
|
|
2108
2108
|
* Duration, in milliseconds, since last updating frame.
|
|
2109
2109
|
*
|
|
@@ -5966,7 +5966,7 @@
|
|
|
5966
5966
|
* and warn against mismatches.
|
|
5967
5967
|
*/
|
|
5968
5968
|
{
|
|
5969
|
-
warnOnce(nextValue.version === "8.5.2-alpha.
|
|
5969
|
+
warnOnce(nextValue.version === "8.5.2-alpha.4", `Attempting to mix Framer Motion versions ${nextValue.version} with 8.5.2-alpha.4 may not work as expected.`);
|
|
5970
5970
|
}
|
|
5971
5971
|
}
|
|
5972
5972
|
else if (isMotionValue(prevValue)) {
|
|
@@ -10487,7 +10487,7 @@
|
|
|
10487
10487
|
* it synchronously would prevent subsequent transforms from handing off.
|
|
10488
10488
|
*/
|
|
10489
10489
|
sync.render(cancelOptimisedAnimation);
|
|
10490
|
-
console.log("handing off from", animation.currentTime);
|
|
10490
|
+
console.log("handing off from", animation, animation.currentTime);
|
|
10491
10491
|
return animation.currentTime || 0;
|
|
10492
10492
|
}
|
|
10493
10493
|
else {
|
|
@@ -10513,16 +10513,21 @@
|
|
|
10513
10513
|
ready: false,
|
|
10514
10514
|
});
|
|
10515
10515
|
const startAnimation = () => {
|
|
10516
|
-
|
|
10517
|
-
|
|
10516
|
+
readyAnimation.cancel();
|
|
10517
|
+
const appearAnimation = animateStyle(element, name, keyframes, options);
|
|
10518
|
+
if (document.timeline) {
|
|
10519
|
+
appearAnimation.startTime = document.timeline.currentTime;
|
|
10520
|
+
console.log(appearAnimation.startTime, appearAnimation.currentTime, performance.now());
|
|
10521
|
+
}
|
|
10522
|
+
appearAnimationStore.set(storeId, {
|
|
10523
|
+
animation: appearAnimation,
|
|
10524
|
+
ready: true,
|
|
10525
|
+
});
|
|
10518
10526
|
if (onReady)
|
|
10519
|
-
onReady(
|
|
10527
|
+
onReady(appearAnimation);
|
|
10520
10528
|
};
|
|
10521
10529
|
if (readyAnimation.ready) {
|
|
10522
|
-
readyAnimation.ready.then(
|
|
10523
|
-
readyAnimation.cancel();
|
|
10524
|
-
startAnimation();
|
|
10525
|
-
});
|
|
10530
|
+
readyAnimation.ready.then(startAnimation);
|
|
10526
10531
|
}
|
|
10527
10532
|
else {
|
|
10528
10533
|
startAnimation();
|