framer-motion 6.4.0 → 6.4.1
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 +5 -3
- package/dist/es/animation/use-animation.mjs +3 -2
- package/dist/es/index.mjs +1 -1
- package/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/value/index.mjs +1 -1
- package/dist/framer-motion.dev.js +5 -3
- package/dist/framer-motion.js +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/projection.dev.js +2 -2
- package/dist/size-rollup-dom-animation.js +1 -1
- package/dist/size-rollup-dom-max.js +1 -1
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -473,7 +473,7 @@ var MotionValue = /** @class */ (function () {
|
|
|
473
473
|
* This will be replaced by the build step with the latest version number.
|
|
474
474
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
475
475
|
*/
|
|
476
|
-
this.version = "6.4.
|
|
476
|
+
this.version = "6.4.1";
|
|
477
477
|
/**
|
|
478
478
|
* Duration, in milliseconds, since last updating frame.
|
|
479
479
|
*
|
|
@@ -5984,7 +5984,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
5984
5984
|
* and warn against mismatches.
|
|
5985
5985
|
*/
|
|
5986
5986
|
if (process.env.NODE_ENV === "development") {
|
|
5987
|
-
warnOnce(nextValue.version === "6.4.
|
|
5987
|
+
warnOnce(nextValue.version === "6.4.1", "Attempting to mix Framer Motion versions ".concat(nextValue.version, " with 6.4.1 may not work as expected."));
|
|
5988
5988
|
}
|
|
5989
5989
|
}
|
|
5990
5990
|
else if (isMotionValue(prevValue)) {
|
|
@@ -8137,11 +8137,12 @@ function animationControls() {
|
|
|
8137
8137
|
*
|
|
8138
8138
|
* @public
|
|
8139
8139
|
*/
|
|
8140
|
-
function
|
|
8140
|
+
function useAnimationControls() {
|
|
8141
8141
|
var controls = useConstant(animationControls);
|
|
8142
8142
|
React.useEffect(controls.mount, []);
|
|
8143
8143
|
return controls;
|
|
8144
8144
|
}
|
|
8145
|
+
var useAnimation = useAnimationControls;
|
|
8145
8146
|
|
|
8146
8147
|
/**
|
|
8147
8148
|
* Cycles through a series of visual properties. Can be used to toggle between or cycle through animations. It works similar to `useState` in React. It is provided an initial array of possible states, and returns an array of two arguments.
|
|
@@ -8472,6 +8473,7 @@ exports.motionValue = motionValue;
|
|
|
8472
8473
|
exports.resolveMotionValue = resolveMotionValue;
|
|
8473
8474
|
exports.transform = transform;
|
|
8474
8475
|
exports.useAnimation = useAnimation;
|
|
8476
|
+
exports.useAnimationControls = useAnimationControls;
|
|
8475
8477
|
exports.useAnimationFrame = useAnimationFrame;
|
|
8476
8478
|
exports.useCycle = useCycle;
|
|
8477
8479
|
exports.useDeprecatedAnimatedState = useAnimatedState;
|
|
@@ -31,10 +31,11 @@ import { useConstant } from '../utils/use-constant.mjs';
|
|
|
31
31
|
*
|
|
32
32
|
* @public
|
|
33
33
|
*/
|
|
34
|
-
function
|
|
34
|
+
function useAnimationControls() {
|
|
35
35
|
var controls = useConstant(animationControls);
|
|
36
36
|
useEffect(controls.mount, []);
|
|
37
37
|
return controls;
|
|
38
38
|
}
|
|
39
|
+
var useAnimation = useAnimationControls;
|
|
39
40
|
|
|
40
|
-
export { useAnimation };
|
|
41
|
+
export { useAnimation, useAnimationControls };
|
package/dist/es/index.mjs
CHANGED
|
@@ -20,7 +20,7 @@ export { useViewportScroll } from './value/scroll/use-viewport-scroll.mjs';
|
|
|
20
20
|
export { useTime } from './value/use-time.mjs';
|
|
21
21
|
export { useReducedMotion, useReducedMotionConfig } from './utils/use-reduced-motion.mjs';
|
|
22
22
|
export { animationControls } from './animation/animation-controls.mjs';
|
|
23
|
-
export { useAnimation } from './animation/use-animation.mjs';
|
|
23
|
+
export { useAnimation, useAnimationControls } from './animation/use-animation.mjs';
|
|
24
24
|
export { useAnimationFrame } from './utils/use-animation-frame.mjs';
|
|
25
25
|
export { animate } from './animation/animate.mjs';
|
|
26
26
|
export { animateVisualElement } from './render/utils/animation.mjs';
|
|
@@ -18,7 +18,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
18
18
|
* and warn against mismatches.
|
|
19
19
|
*/
|
|
20
20
|
if (process.env.NODE_ENV === "development") {
|
|
21
|
-
warnOnce(nextValue.version === "6.4.
|
|
21
|
+
warnOnce(nextValue.version === "6.4.1", "Attempting to mix Framer Motion versions ".concat(nextValue.version, " with 6.4.1 may not work as expected."));
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
else if (isMotionValue(prevValue)) {
|
package/dist/es/value/index.mjs
CHANGED
|
@@ -25,7 +25,7 @@ var MotionValue = /** @class */ (function () {
|
|
|
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 = "6.4.
|
|
28
|
+
this.version = "6.4.1";
|
|
29
29
|
/**
|
|
30
30
|
* Duration, in milliseconds, since last updating frame.
|
|
31
31
|
*
|
|
@@ -1706,7 +1706,7 @@
|
|
|
1706
1706
|
* This will be replaced by the build step with the latest version number.
|
|
1707
1707
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
1708
1708
|
*/
|
|
1709
|
-
this.version = "6.4.
|
|
1709
|
+
this.version = "6.4.1";
|
|
1710
1710
|
/**
|
|
1711
1711
|
* Duration, in milliseconds, since last updating frame.
|
|
1712
1712
|
*
|
|
@@ -7217,7 +7217,7 @@
|
|
|
7217
7217
|
* and warn against mismatches.
|
|
7218
7218
|
*/
|
|
7219
7219
|
{
|
|
7220
|
-
warnOnce(nextValue.version === "6.4.
|
|
7220
|
+
warnOnce(nextValue.version === "6.4.1", "Attempting to mix Framer Motion versions ".concat(nextValue.version, " with 6.4.1 may not work as expected."));
|
|
7221
7221
|
}
|
|
7222
7222
|
}
|
|
7223
7223
|
else if (isMotionValue(prevValue)) {
|
|
@@ -9370,11 +9370,12 @@
|
|
|
9370
9370
|
*
|
|
9371
9371
|
* @public
|
|
9372
9372
|
*/
|
|
9373
|
-
function
|
|
9373
|
+
function useAnimationControls() {
|
|
9374
9374
|
var controls = useConstant(animationControls);
|
|
9375
9375
|
React.useEffect(controls.mount, []);
|
|
9376
9376
|
return controls;
|
|
9377
9377
|
}
|
|
9378
|
+
var useAnimation = useAnimationControls;
|
|
9378
9379
|
|
|
9379
9380
|
/**
|
|
9380
9381
|
* Cycles through a series of visual properties. Can be used to toggle between or cycle through animations. It works similar to `useState` in React. It is provided an initial array of possible states, and returns an array of two arguments.
|
|
@@ -9774,6 +9775,7 @@
|
|
|
9774
9775
|
exports.resolveMotionValue = resolveMotionValue;
|
|
9775
9776
|
exports.transform = transform;
|
|
9776
9777
|
exports.useAnimation = useAnimation;
|
|
9778
|
+
exports.useAnimationControls = useAnimationControls;
|
|
9777
9779
|
exports.useAnimationFrame = useAnimationFrame;
|
|
9778
9780
|
exports.useCycle = useCycle;
|
|
9779
9781
|
exports.useDeprecatedAnimatedState = useAnimatedState;
|