framer-motion 12.17.1 → 12.17.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/dom-mini.js +1 -1
- package/dist/cjs/dom.js +1 -1
- package/dist/cjs/index.js +3 -3
- package/dist/dom-mini.d.ts +1 -3
- package/dist/dom-mini.js +1 -1
- package/dist/dom.d.ts +8 -10
- package/dist/dom.js +1 -1
- package/dist/es/animation/hooks/use-animated-state.mjs +1 -1
- package/dist/es/animation/hooks/use-animation.mjs +3 -3
- package/dist/es/animation/sequence/create.mjs +1 -1
- package/dist/framer-motion.dev.js +9 -4
- package/dist/framer-motion.js +1 -1
- package/dist/m.d.ts +5 -1877
- package/dist/size-rollup-animate.js +1 -1
- 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/dist/size-rollup-scroll.js +1 -1
- package/dist/types/client.d.ts +2 -2
- package/dist/types/index.d.ts +98 -24
- package/dist/types.d-B_QPEvFK.d.ts +941 -0
- package/package.json +3 -3
- package/dist/types.d-CtuPurYT.d.ts +0 -2851
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { animationControls } from './animation-controls.mjs';
|
|
2
1
|
import { useConstant } from '../../utils/use-constant.mjs';
|
|
3
2
|
import { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';
|
|
3
|
+
import { animationControls } from './animation-controls.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* Creates `
|
|
6
|
+
* Creates `LegacyAnimationControls`, which can be used to manually start, stop
|
|
7
7
|
* and sequence animations on one or more components.
|
|
8
8
|
*
|
|
9
|
-
* The returned `
|
|
9
|
+
* The returned `LegacyAnimationControls` should be passed to the `animate` property
|
|
10
10
|
* of the components you want to animate.
|
|
11
11
|
*
|
|
12
12
|
* These components can then be animated with the `start` method.
|
|
@@ -65,7 +65,7 @@ function createAnimationsFromSequence(sequence, { defaultTransition = {}, ...seq
|
|
|
65
65
|
const numKeyframes = valueKeyframesAsList.length;
|
|
66
66
|
const createGenerator = isGenerator(type)
|
|
67
67
|
? type
|
|
68
|
-
: generators?.[type];
|
|
68
|
+
: generators?.[type || "keyframes"];
|
|
69
69
|
if (numKeyframes <= 2 && createGenerator) {
|
|
70
70
|
/**
|
|
71
71
|
* As we're creating an easing function from a spring,
|
|
@@ -760,6 +760,11 @@
|
|
|
760
760
|
? rgba.transform(v)
|
|
761
761
|
: hsla.transform(v);
|
|
762
762
|
},
|
|
763
|
+
getAnimatableNone: (v) => {
|
|
764
|
+
const parsed = color.parse(v);
|
|
765
|
+
parsed.alpha = 0;
|
|
766
|
+
return color.transform(parsed);
|
|
767
|
+
},
|
|
763
768
|
};
|
|
764
769
|
|
|
765
770
|
const colorRegex = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
@@ -836,7 +841,7 @@
|
|
|
836
841
|
return output;
|
|
837
842
|
};
|
|
838
843
|
}
|
|
839
|
-
const convertNumbersToZero = (v) => typeof v === "number" ? 0 : v;
|
|
844
|
+
const convertNumbersToZero = (v) => typeof v === "number" ? 0 : color.test(v) ? color.getAnimatableNone(v) : v;
|
|
840
845
|
function getAnimatableNone$1(v) {
|
|
841
846
|
const parsed = parseComplexValue(v);
|
|
842
847
|
const transformer = createTransformer(v);
|
|
@@ -11962,7 +11967,7 @@
|
|
|
11962
11967
|
const numKeyframes = valueKeyframesAsList.length;
|
|
11963
11968
|
const createGenerator = isGenerator(type)
|
|
11964
11969
|
? type
|
|
11965
|
-
: generators?.[type];
|
|
11970
|
+
: generators?.[type || "keyframes"];
|
|
11966
11971
|
if (numKeyframes <= 2 && createGenerator) {
|
|
11967
11972
|
/**
|
|
11968
11973
|
* As we're creating an easing function from a spring,
|
|
@@ -13273,10 +13278,10 @@
|
|
|
13273
13278
|
}
|
|
13274
13279
|
|
|
13275
13280
|
/**
|
|
13276
|
-
* Creates `
|
|
13281
|
+
* Creates `LegacyAnimationControls`, which can be used to manually start, stop
|
|
13277
13282
|
* and sequence animations on one or more components.
|
|
13278
13283
|
*
|
|
13279
|
-
* The returned `
|
|
13284
|
+
* The returned `LegacyAnimationControls` should be passed to the `animate` property
|
|
13280
13285
|
* of the components you want to animate.
|
|
13281
13286
|
*
|
|
13282
13287
|
* These components can then be animated with the `start` method.
|