framer-motion 8.3.3 → 8.4.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
@@ -588,8 +588,8 @@ const scale = {
588
588
  // to avoid exponents
589
589
  const sanitize = (v) => Math.round(v * 100000) / 100000;
590
590
  const floatRegex = /(-)?([\d]*\.?[\d])+/g;
591
- const colorRegex = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi;
592
- const singleColorRegex = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;
591
+ const colorRegex = /(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi;
592
+ const singleColorRegex = /^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;
593
593
  function isString(v) {
594
594
  return typeof v === "string";
595
595
  }
@@ -2072,7 +2072,7 @@ class MotionValue {
2072
2072
  * This will be replaced by the build step with the latest version number.
2073
2073
  * When MotionValues are provided to motion components, warn if versions are mixed.
2074
2074
  */
2075
- this.version = "8.3.3";
2075
+ this.version = "8.4.0";
2076
2076
  /**
2077
2077
  * Duration, in milliseconds, since last updating frame.
2078
2078
  *
@@ -5928,7 +5928,7 @@ function updateMotionValuesFromProps(element, next, prev) {
5928
5928
  * and warn against mismatches.
5929
5929
  */
5930
5930
  if (process.env.NODE_ENV === "development") {
5931
- warnOnce(nextValue.version === "8.3.3", `Attempting to mix Framer Motion versions ${nextValue.version} with 8.3.3 may not work as expected.`);
5931
+ warnOnce(nextValue.version === "8.4.0", `Attempting to mix Framer Motion versions ${nextValue.version} with 8.4.0 may not work as expected.`);
5932
5932
  }
5933
5933
  }
5934
5934
  else if (isMotionValue(prevValue)) {
@@ -9932,6 +9932,7 @@ exports.easeIn = easeIn;
9932
9932
  exports.easeInOut = easeInOut;
9933
9933
  exports.easeOut = easeOut;
9934
9934
  exports.filterProps = filterProps;
9935
+ exports.frameData = frameData;
9935
9936
  exports.isBrowser = isBrowser;
9936
9937
  exports.isDragActive = isDragActive;
9937
9938
  exports.isMotionComponent = isMotionComponent;
@@ -9947,6 +9948,7 @@ exports.pipe = pipe;
9947
9948
  exports.resolveMotionValue = resolveMotionValue;
9948
9949
  exports.spring = spring;
9949
9950
  exports.startOptimizedAppearAnimation = startOptimizedAppearAnimation;
9951
+ exports.sync = sync;
9950
9952
  exports.transform = transform;
9951
9953
  exports.unwrapMotionComponent = unwrapMotionComponent;
9952
9954
  exports.useAnimation = useAnimation;
package/dist/es/index.mjs CHANGED
@@ -50,6 +50,8 @@ export { distance, distance2D } from './utils/distance.mjs';
50
50
  export { mix } from './utils/mix.mjs';
51
51
  export { pipe } from './utils/pipe.mjs';
52
52
  export { wrap } from './utils/wrap.mjs';
53
+ export { sync } from './frameloop/index.mjs';
54
+ export { frameData } from './frameloop/data.mjs';
53
55
  export { startOptimizedAppearAnimation } from './animation/optimized-appear/start.mjs';
54
56
  export { optimizedAppearDataAttribute } from './animation/optimized-appear/data-id.mjs';
55
57
  export { spring } from './animation/legacy-popmotion/spring.mjs';
@@ -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.3", `Attempting to mix Framer Motion versions ${nextValue.version} with 8.3.3 may not work as expected.`);
25
+ warnOnce(nextValue.version === "8.4.0", `Attempting to mix Framer Motion versions ${nextValue.version} with 8.4.0 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.3";
28
+ this.version = "8.4.0";
29
29
  /**
30
30
  * Duration, in milliseconds, since last updating frame.
31
31
  *
@@ -6,8 +6,8 @@
6
6
  // to avoid exponents
7
7
  const sanitize = (v) => Math.round(v * 100000) / 100000;
8
8
  const floatRegex = /(-)?([\d]*\.?[\d])+/g;
9
- const colorRegex = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi;
10
- const singleColorRegex = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;
9
+ const colorRegex = /(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi;
10
+ const singleColorRegex = /^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;
11
11
  function isString(v) {
12
12
  return typeof v === "string";
13
13
  }
@@ -586,8 +586,8 @@
586
586
  // to avoid exponents
587
587
  const sanitize = (v) => Math.round(v * 100000) / 100000;
588
588
  const floatRegex = /(-)?([\d]*\.?[\d])+/g;
589
- const colorRegex = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi;
590
- const singleColorRegex = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;
589
+ const colorRegex = /(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi;
590
+ const singleColorRegex = /^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;
591
591
  function isString$1(v) {
592
592
  return typeof v === "string";
593
593
  }
@@ -2070,7 +2070,7 @@
2070
2070
  * This will be replaced by the build step with the latest version number.
2071
2071
  * When MotionValues are provided to motion components, warn if versions are mixed.
2072
2072
  */
2073
- this.version = "8.3.3";
2073
+ this.version = "8.4.0";
2074
2074
  /**
2075
2075
  * Duration, in milliseconds, since last updating frame.
2076
2076
  *
@@ -5941,7 +5941,7 @@
5941
5941
  * and warn against mismatches.
5942
5942
  */
5943
5943
  {
5944
- warnOnce(nextValue.version === "8.3.3", `Attempting to mix Framer Motion versions ${nextValue.version} with 8.3.3 may not work as expected.`);
5944
+ warnOnce(nextValue.version === "8.4.0", `Attempting to mix Framer Motion versions ${nextValue.version} with 8.4.0 may not work as expected.`);
5945
5945
  }
5946
5946
  }
5947
5947
  else if (isMotionValue(prevValue)) {
@@ -10551,6 +10551,7 @@
10551
10551
  exports.easeInOut = easeInOut;
10552
10552
  exports.easeOut = easeOut;
10553
10553
  exports.filterProps = filterProps;
10554
+ exports.frameData = frameData;
10554
10555
  exports.isBrowser = isBrowser;
10555
10556
  exports.isDragActive = isDragActive;
10556
10557
  exports.isMotionComponent = isMotionComponent;
@@ -10566,6 +10567,7 @@
10566
10567
  exports.resolveMotionValue = resolveMotionValue;
10567
10568
  exports.spring = spring;
10568
10569
  exports.startOptimizedAppearAnimation = startOptimizedAppearAnimation;
10570
+ exports.sync = sync;
10569
10571
  exports.transform = transform;
10570
10572
  exports.unwrapMotionComponent = unwrapMotionComponent;
10571
10573
  exports.useAnimation = useAnimation;