framer-motion 8.3.1 → 8.3.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 CHANGED
@@ -2075,7 +2075,7 @@ class MotionValue {
2075
2075
  * This will be replaced by the build step with the latest version number.
2076
2076
  * When MotionValues are provided to motion components, warn if versions are mixed.
2077
2077
  */
2078
- this.version = "8.3.1";
2078
+ this.version = "8.3.2";
2079
2079
  /**
2080
2080
  * Duration, in milliseconds, since last updating frame.
2081
2081
  *
@@ -5931,7 +5931,7 @@ function updateMotionValuesFromProps(element, next, prev) {
5931
5931
  * and warn against mismatches.
5932
5932
  */
5933
5933
  if (process.env.NODE_ENV === "development") {
5934
- warnOnce(nextValue.version === "8.3.1", `Attempting to mix Framer Motion versions ${nextValue.version} with 8.3.1 may not work as expected.`);
5934
+ warnOnce(nextValue.version === "8.3.2", `Attempting to mix Framer Motion versions ${nextValue.version} with 8.3.2 may not work as expected.`);
5935
5935
  }
5936
5936
  }
5937
5937
  else if (isMotionValue(prevValue)) {
@@ -9211,12 +9211,13 @@ function useMotionTemplate(fragments, ...values) {
9211
9211
  for (let i = 0; i < numFragments; i++) {
9212
9212
  output += fragments[i];
9213
9213
  const value = values[i];
9214
- if (value)
9215
- output += values[i].get();
9214
+ if (value) {
9215
+ output += isMotionValue(value) ? value.get() : value;
9216
+ }
9216
9217
  }
9217
9218
  return output;
9218
9219
  }
9219
- return useCombineMotionValues(values, buildValue);
9220
+ return useCombineMotionValues(values.filter(isMotionValue), buildValue);
9220
9221
  }
9221
9222
 
9222
9223
  /**
@@ -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.1", `Attempting to mix Framer Motion versions ${nextValue.version} with 8.3.1 may not work as expected.`);
25
+ warnOnce(nextValue.version === "8.3.2", `Attempting to mix Framer Motion versions ${nextValue.version} with 8.3.2 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.3.1";
28
+ this.version = "8.3.2";
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 += values[i].get();
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 };
@@ -2073,7 +2073,7 @@
2073
2073
  * This will be replaced by the build step with the latest version number.
2074
2074
  * When MotionValues are provided to motion components, warn if versions are mixed.
2075
2075
  */
2076
- this.version = "8.3.1";
2076
+ this.version = "8.3.2";
2077
2077
  /**
2078
2078
  * Duration, in milliseconds, since last updating frame.
2079
2079
  *
@@ -5944,7 +5944,7 @@
5944
5944
  * and warn against mismatches.
5945
5945
  */
5946
5946
  {
5947
- warnOnce(nextValue.version === "8.3.1", `Attempting to mix Framer Motion versions ${nextValue.version} with 8.3.1 may not work as expected.`);
5947
+ warnOnce(nextValue.version === "8.3.2", `Attempting to mix Framer Motion versions ${nextValue.version} with 8.3.2 may not work as expected.`);
5948
5948
  }
5949
5949
  }
5950
5950
  else if (isMotionValue(prevValue)) {
@@ -9222,12 +9222,13 @@
9222
9222
  for (let i = 0; i < numFragments; i++) {
9223
9223
  output += fragments[i];
9224
9224
  const value = values[i];
9225
- if (value)
9226
- output += values[i].get();
9225
+ if (value) {
9226
+ output += isMotionValue(value) ? value.get() : value;
9227
+ }
9227
9228
  }
9228
9229
  return output;
9229
9230
  }
9230
- return useCombineMotionValues(values, buildValue);
9231
+ return useCombineMotionValues(values.filter(isMotionValue), buildValue);
9231
9232
  }
9232
9233
 
9233
9234
  /**