framer-motion 6.4.2 → 6.4.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/index.js +6108 -6107
- package/dist/es/motion/features/layout/MeasureLayout.mjs +1 -1
- package/dist/es/projection/node/create-projection-node.mjs +2 -18
- package/dist/es/projection/node/id.mjs +1 -1
- package/dist/es/projection/node/state.mjs +19 -0
- package/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/value/index.mjs +1 -1
- package/dist/framer-motion.dev.js +7130 -7129
- package/dist/framer-motion.js +1 -1
- package/dist/projection.dev.js +8 -7
- package/dist/size-rollup-dom-animation.js +1 -1
- package/dist/size-rollup-dom-max.js +1 -1
- package/dist/size-rollup-m.js +1 -1
- package/dist/size-webpack-dom-animation.js +1 -1
- package/dist/size-webpack-dom-max.js +1 -1
- package/dist/size-webpack-m.js +1 -1
- package/package.json +2 -2
|
@@ -4,7 +4,7 @@ import React__default, { useContext } from 'react';
|
|
|
4
4
|
import { usePresence } from '../../../components/AnimatePresence/use-presence.mjs';
|
|
5
5
|
import { LayoutGroupContext } from '../../../context/LayoutGroupContext.mjs';
|
|
6
6
|
import { SwitchLayoutGroupContext } from '../../../context/SwitchLayoutGroupContext.mjs';
|
|
7
|
-
import { globalProjectionState } from '../../../projection/node/
|
|
7
|
+
import { globalProjectionState } from '../../../projection/node/state.mjs';
|
|
8
8
|
import { correctBorderRadius } from '../../../projection/styles/scale-border-radius.mjs';
|
|
9
9
|
import { correctBoxShadow } from '../../../projection/styles/scale-box-shadow.mjs';
|
|
10
10
|
import { addScaleCorrector } from '../../../projection/styles/scale-correction.mjs';
|
|
@@ -19,29 +19,13 @@ import { hasTransform, hasScale } from '../utils/has-transform.mjs';
|
|
|
19
19
|
import { transformAxes } from '../../render/html/utils/transform.mjs';
|
|
20
20
|
import { FlatTree } from '../../render/utils/flat-tree.mjs';
|
|
21
21
|
import { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';
|
|
22
|
+
import { globalProjectionState } from './state.mjs';
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
25
|
* We use 1000 as the animation target as 0-1000 maps better to pixels than 0-1
|
|
25
26
|
* which has a noticeable difference in spring animations
|
|
26
27
|
*/
|
|
27
28
|
var animationTarget = 1000;
|
|
28
|
-
/**
|
|
29
|
-
* This should only ever be modified on the client otherwise it'll
|
|
30
|
-
* persist through server requests. If we need instanced states we
|
|
31
|
-
* could lazy-init via root.
|
|
32
|
-
*/
|
|
33
|
-
var globalProjectionState = {
|
|
34
|
-
/**
|
|
35
|
-
* Global flag as to whether the tree has animated since the last time
|
|
36
|
-
* we resized the window
|
|
37
|
-
*/
|
|
38
|
-
hasAnimatedSinceResize: true,
|
|
39
|
-
/**
|
|
40
|
-
* We set this to true once, on the first update. Any nodes added to the tree beyond that
|
|
41
|
-
* update will be given a `data-projection-id` attribute.
|
|
42
|
-
*/
|
|
43
|
-
hasEverUpdated: false,
|
|
44
|
-
};
|
|
45
29
|
function createProjectionNode(_a) {
|
|
46
30
|
var attachResizeListener = _a.attachResizeListener, defaultParent = _a.defaultParent, measureScroll = _a.measureScroll, checkIsScrollRoot = _a.checkIsScrollRoot, resetTransform = _a.resetTransform;
|
|
47
31
|
return /** @class */ (function () {
|
|
@@ -1220,4 +1204,4 @@ function roundBox(box) {
|
|
|
1220
1204
|
roundAxis(box.y);
|
|
1221
1205
|
}
|
|
1222
1206
|
|
|
1223
|
-
export { createProjectionNode,
|
|
1207
|
+
export { createProjectionNode, mixAxis, mixAxisDelta, mixBox };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This should only ever be modified on the client otherwise it'll
|
|
3
|
+
* persist through server requests. If we need instanced states we
|
|
4
|
+
* could lazy-init via root.
|
|
5
|
+
*/
|
|
6
|
+
var globalProjectionState = {
|
|
7
|
+
/**
|
|
8
|
+
* Global flag as to whether the tree has animated since the last time
|
|
9
|
+
* we resized the window
|
|
10
|
+
*/
|
|
11
|
+
hasAnimatedSinceResize: true,
|
|
12
|
+
/**
|
|
13
|
+
* We set this to true once, on the first update. Any nodes added to the tree beyond that
|
|
14
|
+
* update will be given a `data-projection-id` attribute.
|
|
15
|
+
*/
|
|
16
|
+
hasEverUpdated: false,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { globalProjectionState };
|
|
@@ -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.3", "Attempting to mix Framer Motion versions ".concat(nextValue.version, " with 6.4.3 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.3";
|
|
29
29
|
/**
|
|
30
30
|
* Duration, in milliseconds, since last updating frame.
|
|
31
31
|
*
|