framer-motion 8.5.2-alpha.1 → 8.5.2-alpha.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 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.1";
2108
+ this.version = "8.5.2-alpha.3";
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.1", `Attempting to mix Framer Motion versions ${nextValue.version} with 8.5.2-alpha.1 may not work as expected.`);
5956
+ warnOnce(nextValue.version === "8.5.2-alpha.3", `Attempting to mix Framer Motion versions ${nextValue.version} with 8.5.2-alpha.3 may not work as expected.`);
5957
5957
  }
5958
5958
  }
5959
5959
  else if (isMotionValue(prevValue)) {
@@ -9894,10 +9894,15 @@ function startOptimizedAppearAnimation(element, name, keyframes, options, onRead
9894
9894
  ready: false,
9895
9895
  });
9896
9896
  const startAnimation = () => {
9897
- const animation = animateStyle(element, name, keyframes, options);
9898
- appearAnimationStore.set(storeId, { animation, ready: true });
9897
+ var _a;
9898
+ const appearAnimation = animateStyle(element, name, keyframes, options);
9899
+ const current = (_a = document.timeline) === null || _a === void 0 ? void 0 : _a.currentTime;
9900
+ if (current) {
9901
+ appearAnimation.startTime = current;
9902
+ }
9903
+ appearAnimationStore.set(storeId, { animation: appearAnimation, ready: true });
9899
9904
  if (onReady)
9900
- onReady(animation);
9905
+ onReady(appearAnimation);
9901
9906
  };
9902
9907
  if (readyAnimation.ready) {
9903
9908
  readyAnimation.ready.then(() => {
@@ -21,10 +21,15 @@ function startOptimizedAppearAnimation(element, name, keyframes, options, onRead
21
21
  ready: false,
22
22
  });
23
23
  const startAnimation = () => {
24
- const animation = animateStyle(element, name, keyframes, options);
25
- appearAnimationStore.set(storeId, { animation, ready: true });
24
+ var _a;
25
+ const appearAnimation = animateStyle(element, name, keyframes, options);
26
+ const current = (_a = document.timeline) === null || _a === void 0 ? void 0 : _a.currentTime;
27
+ if (current) {
28
+ appearAnimation.startTime = current;
29
+ }
30
+ appearAnimationStore.set(storeId, { animation: appearAnimation, ready: true });
26
31
  if (onReady)
27
- onReady(animation);
32
+ onReady(appearAnimation);
28
33
  };
29
34
  if (readyAnimation.ready) {
30
35
  readyAnimation.ready.then(() => {
@@ -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.1", `Attempting to mix Framer Motion versions ${nextValue.version} with 8.5.2-alpha.1 may not work as expected.`);
25
+ warnOnce(nextValue.version === "8.5.2-alpha.3", `Attempting to mix Framer Motion versions ${nextValue.version} with 8.5.2-alpha.3 may not work as expected.`);
26
26
  }
27
27
  }
28
28
  else if (isMotionValue(prevValue)) {
@@ -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.1";
28
+ this.version = "8.5.2-alpha.3";
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.1";
2106
+ this.version = "8.5.2-alpha.3";
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.1", `Attempting to mix Framer Motion versions ${nextValue.version} with 8.5.2-alpha.1 may not work as expected.`);
5969
+ warnOnce(nextValue.version === "8.5.2-alpha.3", `Attempting to mix Framer Motion versions ${nextValue.version} with 8.5.2-alpha.3 may not work as expected.`);
5970
5970
  }
5971
5971
  }
5972
5972
  else if (isMotionValue(prevValue)) {
@@ -10513,10 +10513,15 @@
10513
10513
  ready: false,
10514
10514
  });
10515
10515
  const startAnimation = () => {
10516
- const animation = animateStyle(element, name, keyframes, options);
10517
- appearAnimationStore.set(storeId, { animation, ready: true });
10516
+ var _a;
10517
+ const appearAnimation = animateStyle(element, name, keyframes, options);
10518
+ const current = (_a = document.timeline) === null || _a === void 0 ? void 0 : _a.currentTime;
10519
+ if (current) {
10520
+ appearAnimation.startTime = current;
10521
+ }
10522
+ appearAnimationStore.set(storeId, { animation: appearAnimation, ready: true });
10518
10523
  if (onReady)
10519
- onReady(animation);
10524
+ onReady(appearAnimation);
10520
10525
  };
10521
10526
  if (readyAnimation.ready) {
10522
10527
  readyAnimation.ready.then(() => {