framer-motion 7.6.19 → 7.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/index.js CHANGED
@@ -1055,6 +1055,9 @@ const camelCaseAttributes = new Set([
1055
1055
  "viewBox",
1056
1056
  "gradientTransform",
1057
1057
  "pathLength",
1058
+ "startOffset",
1059
+ "textLength",
1060
+ "lengthAdjust",
1058
1061
  ]);
1059
1062
 
1060
1063
  function renderSVG(element, renderState, _styleProp, projection) {
@@ -2828,11 +2831,10 @@ function inertia({ from = 0, velocity = 0, min, max, power = 0.8, timeConstant =
2828
2831
  function isTransitionDefined({ when, delay: _delay, delayChildren, staggerChildren, staggerDirection, repeat, repeatType, repeatDelay, from, ...transition }) {
2829
2832
  return !!Object.keys(transition).length;
2830
2833
  }
2831
- let legacyRepeatWarning = false;
2832
2834
  /**
2833
2835
  * Convert Framer Motion's Transition type into Popmotion-compatible options.
2834
2836
  */
2835
- function convertTransitionToAnimationOptions({ ease, times, yoyo, flip, loop, ...transition }) {
2837
+ function convertTransitionToAnimationOptions({ ease, times, ...transition }) {
2836
2838
  const options = { ...transition };
2837
2839
  if (times)
2838
2840
  options["offset"] = times;
@@ -2856,23 +2858,6 @@ function convertTransitionToAnimationOptions({ ease, times, yoyo, flip, loop, ..
2856
2858
  */
2857
2859
  if (transition.type === "tween")
2858
2860
  options.type = "keyframes";
2859
- /**
2860
- * TODO: These options are officially removed from the API.
2861
- */
2862
- if (yoyo || loop || flip) {
2863
- heyListen.warning(!legacyRepeatWarning, "yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options.");
2864
- legacyRepeatWarning = true;
2865
- if (yoyo) {
2866
- options.repeatType = "reverse";
2867
- }
2868
- else if (loop) {
2869
- options.repeatType = "loop";
2870
- }
2871
- else if (flip) {
2872
- options.repeatType = "mirror";
2873
- }
2874
- options.repeat = loop || yoyo || flip || transition.repeat;
2875
- }
2876
2861
  /**
2877
2862
  * TODO: Popmotion 9 has the ability to automatically detect whether to use
2878
2863
  * a keyframes or spring animation, but does so by detecting velocity and other spring options.
@@ -3107,7 +3092,7 @@ class MotionValue {
3107
3092
  * This will be replaced by the build step with the latest version number.
3108
3093
  * When MotionValues are provided to motion components, warn if versions are mixed.
3109
3094
  */
3110
- this.version = "7.6.19";
3095
+ this.version = "7.7.0";
3111
3096
  /**
3112
3097
  * Duration, in milliseconds, since last updating frame.
3113
3098
  *
@@ -5392,7 +5377,7 @@ function updateMotionValuesFromProps(element, next, prev) {
5392
5377
  * and warn against mismatches.
5393
5378
  */
5394
5379
  if (process.env.NODE_ENV === "development") {
5395
- warnOnce(nextValue.version === "7.6.19", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.6.19 may not work as expected.`);
5380
+ warnOnce(nextValue.version === "7.7.0", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.7.0 may not work as expected.`);
5396
5381
  }
5397
5382
  }
5398
5383
  else if (isMotionValue(prevValue)) {
@@ -18,11 +18,10 @@ import { animate } from '../legacy-popmotion/index.mjs';
18
18
  function isTransitionDefined({ when, delay: _delay, delayChildren, staggerChildren, staggerDirection, repeat, repeatType, repeatDelay, from, ...transition }) {
19
19
  return !!Object.keys(transition).length;
20
20
  }
21
- let legacyRepeatWarning = false;
22
21
  /**
23
22
  * Convert Framer Motion's Transition type into Popmotion-compatible options.
24
23
  */
25
- function convertTransitionToAnimationOptions({ ease, times, yoyo, flip, loop, ...transition }) {
24
+ function convertTransitionToAnimationOptions({ ease, times, ...transition }) {
26
25
  const options = { ...transition };
27
26
  if (times)
28
27
  options["offset"] = times;
@@ -46,23 +45,6 @@ function convertTransitionToAnimationOptions({ ease, times, yoyo, flip, loop, ..
46
45
  */
47
46
  if (transition.type === "tween")
48
47
  options.type = "keyframes";
49
- /**
50
- * TODO: These options are officially removed from the API.
51
- */
52
- if (yoyo || loop || flip) {
53
- warning(!legacyRepeatWarning, "yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options.");
54
- legacyRepeatWarning = true;
55
- if (yoyo) {
56
- options.repeatType = "reverse";
57
- }
58
- else if (loop) {
59
- options.repeatType = "loop";
60
- }
61
- else if (flip) {
62
- options.repeatType = "mirror";
63
- }
64
- options.repeat = loop || yoyo || flip || transition.repeat;
65
- }
66
48
  /**
67
49
  * TODO: Popmotion 9 has the ability to automatically detect whether to use
68
50
  * a keyframes or spring animation, but does so by detecting velocity and other spring options.
@@ -22,6 +22,9 @@ const camelCaseAttributes = new Set([
22
22
  "viewBox",
23
23
  "gradientTransform",
24
24
  "pathLength",
25
+ "startOffset",
26
+ "textLength",
27
+ "lengthAdjust",
25
28
  ]);
26
29
 
27
30
  export { camelCaseAttributes };
@@ -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 === "7.6.19", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.6.19 may not work as expected.`);
25
+ warnOnce(nextValue.version === "7.7.0", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.7.0 may not work as expected.`);
26
26
  }
27
27
  }
28
28
  else if (isMotionValue(prevValue)) {
@@ -24,7 +24,7 @@ class MotionValue {
24
24
  * This will be replaced by the build step with the latest version number.
25
25
  * When MotionValues are provided to motion components, warn if versions are mixed.
26
26
  */
27
- this.version = "7.6.19";
27
+ this.version = "7.7.0";
28
28
  /**
29
29
  * Duration, in milliseconds, since last updating frame.
30
30
  *
@@ -1251,6 +1251,9 @@
1251
1251
  "viewBox",
1252
1252
  "gradientTransform",
1253
1253
  "pathLength",
1254
+ "startOffset",
1255
+ "textLength",
1256
+ "lengthAdjust",
1254
1257
  ]);
1255
1258
 
1256
1259
  function renderSVG(element, renderState, _styleProp, projection) {
@@ -3161,11 +3164,10 @@
3161
3164
  function isTransitionDefined({ when, delay: _delay, delayChildren, staggerChildren, staggerDirection, repeat, repeatType, repeatDelay, from, ...transition }) {
3162
3165
  return !!Object.keys(transition).length;
3163
3166
  }
3164
- let legacyRepeatWarning = false;
3165
3167
  /**
3166
3168
  * Convert Framer Motion's Transition type into Popmotion-compatible options.
3167
3169
  */
3168
- function convertTransitionToAnimationOptions({ ease, times, yoyo, flip, loop, ...transition }) {
3170
+ function convertTransitionToAnimationOptions({ ease, times, ...transition }) {
3169
3171
  const options = { ...transition };
3170
3172
  if (times)
3171
3173
  options["offset"] = times;
@@ -3189,23 +3191,6 @@
3189
3191
  */
3190
3192
  if (transition.type === "tween")
3191
3193
  options.type = "keyframes";
3192
- /**
3193
- * TODO: These options are officially removed from the API.
3194
- */
3195
- if (yoyo || loop || flip) {
3196
- warning(!legacyRepeatWarning, "yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options.");
3197
- legacyRepeatWarning = true;
3198
- if (yoyo) {
3199
- options.repeatType = "reverse";
3200
- }
3201
- else if (loop) {
3202
- options.repeatType = "loop";
3203
- }
3204
- else if (flip) {
3205
- options.repeatType = "mirror";
3206
- }
3207
- options.repeat = loop || yoyo || flip || transition.repeat;
3208
- }
3209
3194
  /**
3210
3195
  * TODO: Popmotion 9 has the ability to automatically detect whether to use
3211
3196
  * a keyframes or spring animation, but does so by detecting velocity and other spring options.
@@ -3440,7 +3425,7 @@
3440
3425
  * This will be replaced by the build step with the latest version number.
3441
3426
  * When MotionValues are provided to motion components, warn if versions are mixed.
3442
3427
  */
3443
- this.version = "7.6.19";
3428
+ this.version = "7.7.0";
3444
3429
  /**
3445
3430
  * Duration, in milliseconds, since last updating frame.
3446
3431
  *
@@ -5725,7 +5710,7 @@
5725
5710
  * and warn against mismatches.
5726
5711
  */
5727
5712
  {
5728
- warnOnce(nextValue.version === "7.6.19", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.6.19 may not work as expected.`);
5713
+ warnOnce(nextValue.version === "7.7.0", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.7.0 may not work as expected.`);
5729
5714
  }
5730
5715
  }
5731
5716
  else if (isMotionValue(prevValue)) {