framer-motion 6.3.1 → 6.3.4
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 +6 -10
- package/dist/es/components/AnimatePresence/index.mjs +0 -6
- package/dist/es/components/AnimateSharedLayout.mjs +4 -0
- package/dist/es/components/MotionConfig/index.mjs +1 -1
- package/dist/es/render/svg/config-motion.mjs +0 -1
- package/dist/es/render/svg/utils/render.mjs +2 -2
- package/dist/framer-motion.dev.js +6 -9
- package/dist/framer-motion.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-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 +8 -7
- package/types/components/LazyMotion/index.d.ts +1 -0
- package/types/components/Reorder/Group.d.ts +12 -12
- package/types/components/Reorder/Item.d.ts +12 -12
- package/types/components/Reorder/index.d.ts +24 -24
- package/types/motion/features/layout/MeasureLayout.d.ts +1 -0
- package/types/motion/features/use-features.d.ts +1 -0
- package/types/motion/utils/VisualElementHandler.d.ts +1 -1
- package/types/render/svg/utils/render.d.ts +3 -1
package/dist/cjs/index.js
CHANGED
|
@@ -3723,8 +3723,8 @@ var camelCaseAttributes = new Set([
|
|
|
3723
3723
|
"pathLength",
|
|
3724
3724
|
]);
|
|
3725
3725
|
|
|
3726
|
-
function renderSVG(element, renderState) {
|
|
3727
|
-
renderHTML(element, renderState);
|
|
3726
|
+
function renderSVG(element, renderState, _styleProp, projection) {
|
|
3727
|
+
renderHTML(element, renderState, undefined, projection);
|
|
3728
3728
|
for (var key in renderState.attrs) {
|
|
3729
3729
|
element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);
|
|
3730
3730
|
}
|
|
@@ -3852,7 +3852,6 @@ var svgMotionConfig = {
|
|
|
3852
3852
|
};
|
|
3853
3853
|
}
|
|
3854
3854
|
buildSVGAttrs(renderState, latestValues, { enableHardwareAcceleration: false }, props.transformTemplate);
|
|
3855
|
-
// TODO: Replace with direct assignment
|
|
3856
3855
|
renderSVG(instance, renderState);
|
|
3857
3856
|
},
|
|
3858
3857
|
}),
|
|
@@ -7204,15 +7203,9 @@ function newChildrenMap() {
|
|
|
7204
7203
|
}
|
|
7205
7204
|
|
|
7206
7205
|
var getChildKey = function (child) { return child.key || ""; };
|
|
7207
|
-
var isDev = process$1.env.NODE_ENV !== "production";
|
|
7208
7206
|
function updateChildLookup(children, allChildren) {
|
|
7209
|
-
var seenChildren = isDev ? new Set() : null;
|
|
7210
7207
|
children.forEach(function (child) {
|
|
7211
7208
|
var key = getChildKey(child);
|
|
7212
|
-
if (isDev && seenChildren && seenChildren.has(key)) {
|
|
7213
|
-
console.warn("Children of AnimatePresence require unique keys. \"".concat(key, "\" is a duplicate."));
|
|
7214
|
-
seenChildren.add(key);
|
|
7215
|
-
}
|
|
7216
7209
|
allChildren.set(key, child);
|
|
7217
7210
|
});
|
|
7218
7211
|
}
|
|
@@ -7416,6 +7409,9 @@ var LayoutGroup = function (_a) {
|
|
|
7416
7409
|
var id = 0;
|
|
7417
7410
|
var AnimateSharedLayout = function (_a) {
|
|
7418
7411
|
var children = _a.children;
|
|
7412
|
+
React__namespace.useEffect(function () {
|
|
7413
|
+
heyListen.warning(false, "AnimateSharedLayout is deprecated: https://www.framer.com/docs/guide-upgrade/##shared-layout-animations");
|
|
7414
|
+
}, []);
|
|
7419
7415
|
return (React__namespace.createElement(LayoutGroup, { id: useConstant(function () { return "asl-".concat(id++); }) }, children));
|
|
7420
7416
|
};
|
|
7421
7417
|
|
|
@@ -7452,7 +7448,7 @@ function MotionConfig(_a) {
|
|
|
7452
7448
|
* Creating a new config context object will re-render every `motion` component
|
|
7453
7449
|
* every time it renders. So we only want to create a new one sparingly.
|
|
7454
7450
|
*/
|
|
7455
|
-
var context = React.useMemo(function () { return config; }, [JSON.stringify(config.transition), config.transformPagePoint]);
|
|
7451
|
+
var context = React.useMemo(function () { return config; }, [JSON.stringify(config.transition), config.transformPagePoint, config.reducedMotion]);
|
|
7456
7452
|
return (React__namespace.createElement(MotionConfigContext.Provider, { value: context }, children));
|
|
7457
7453
|
}
|
|
7458
7454
|
|
|
@@ -10,15 +10,9 @@ import { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs
|
|
|
10
10
|
import { useUnmountEffect } from '../../utils/use-unmount-effect.mjs';
|
|
11
11
|
|
|
12
12
|
var getChildKey = function (child) { return child.key || ""; };
|
|
13
|
-
var isDev = process.env.NODE_ENV !== "production";
|
|
14
13
|
function updateChildLookup(children, allChildren) {
|
|
15
|
-
var seenChildren = isDev ? new Set() : null;
|
|
16
14
|
children.forEach(function (child) {
|
|
17
15
|
var key = getChildKey(child);
|
|
18
|
-
if (isDev && seenChildren && seenChildren.has(key)) {
|
|
19
|
-
console.warn("Children of AnimatePresence require unique keys. \"".concat(key, "\" is a duplicate."));
|
|
20
|
-
seenChildren.add(key);
|
|
21
|
-
}
|
|
22
16
|
allChildren.set(key, child);
|
|
23
17
|
});
|
|
24
18
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { warning } from 'hey-listen';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import { useConstant } from '../utils/use-constant.mjs';
|
|
3
4
|
import { LayoutGroup } from './LayoutGroup/index.mjs';
|
|
@@ -5,6 +6,9 @@ import { LayoutGroup } from './LayoutGroup/index.mjs';
|
|
|
5
6
|
var id = 0;
|
|
6
7
|
var AnimateSharedLayout = function (_a) {
|
|
7
8
|
var children = _a.children;
|
|
9
|
+
React.useEffect(function () {
|
|
10
|
+
warning(false, "AnimateSharedLayout is deprecated: https://www.framer.com/docs/guide-upgrade/##shared-layout-animations");
|
|
11
|
+
}, []);
|
|
8
12
|
return (React.createElement(LayoutGroup, { id: useConstant(function () { return "asl-".concat(id++); }) }, children));
|
|
9
13
|
};
|
|
10
14
|
|
|
@@ -38,7 +38,7 @@ function MotionConfig(_a) {
|
|
|
38
38
|
* Creating a new config context object will re-render every `motion` component
|
|
39
39
|
* every time it renders. So we only want to create a new one sparingly.
|
|
40
40
|
*/
|
|
41
|
-
var context = useMemo(function () { return config; }, [JSON.stringify(config.transition), config.transformPagePoint]);
|
|
41
|
+
var context = useMemo(function () { return config; }, [JSON.stringify(config.transition), config.transformPagePoint, config.reducedMotion]);
|
|
42
42
|
return (React.createElement(MotionConfigContext.Provider, { value: context }, children));
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -2,8 +2,8 @@ import { camelToDash } from '../../dom/utils/camel-to-dash.mjs';
|
|
|
2
2
|
import { renderHTML } from '../../html/utils/render.mjs';
|
|
3
3
|
import { camelCaseAttributes } from './camel-case-attrs.mjs';
|
|
4
4
|
|
|
5
|
-
function renderSVG(element, renderState) {
|
|
6
|
-
renderHTML(element, renderState);
|
|
5
|
+
function renderSVG(element, renderState, _styleProp, projection) {
|
|
6
|
+
renderHTML(element, renderState, undefined, projection);
|
|
7
7
|
for (var key in renderState.attrs) {
|
|
8
8
|
element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);
|
|
9
9
|
}
|
|
@@ -4948,8 +4948,8 @@
|
|
|
4948
4948
|
"pathLength",
|
|
4949
4949
|
]);
|
|
4950
4950
|
|
|
4951
|
-
function renderSVG(element, renderState) {
|
|
4952
|
-
renderHTML(element, renderState);
|
|
4951
|
+
function renderSVG(element, renderState, _styleProp, projection) {
|
|
4952
|
+
renderHTML(element, renderState, undefined, projection);
|
|
4953
4953
|
for (var key in renderState.attrs) {
|
|
4954
4954
|
element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);
|
|
4955
4955
|
}
|
|
@@ -5077,7 +5077,6 @@
|
|
|
5077
5077
|
};
|
|
5078
5078
|
}
|
|
5079
5079
|
buildSVGAttrs(renderState, latestValues, { enableHardwareAcceleration: false }, props.transformTemplate);
|
|
5080
|
-
// TODO: Replace with direct assignment
|
|
5081
5080
|
renderSVG(instance, renderState);
|
|
5082
5081
|
},
|
|
5083
5082
|
}),
|
|
@@ -8430,13 +8429,8 @@
|
|
|
8430
8429
|
|
|
8431
8430
|
var getChildKey = function (child) { return child.key || ""; };
|
|
8432
8431
|
function updateChildLookup(children, allChildren) {
|
|
8433
|
-
var seenChildren = new Set() ;
|
|
8434
8432
|
children.forEach(function (child) {
|
|
8435
8433
|
var key = getChildKey(child);
|
|
8436
|
-
if (seenChildren && seenChildren.has(key)) {
|
|
8437
|
-
console.warn("Children of AnimatePresence require unique keys. \"".concat(key, "\" is a duplicate."));
|
|
8438
|
-
seenChildren.add(key);
|
|
8439
|
-
}
|
|
8440
8434
|
allChildren.set(key, child);
|
|
8441
8435
|
});
|
|
8442
8436
|
}
|
|
@@ -8639,6 +8633,9 @@
|
|
|
8639
8633
|
var id = 0;
|
|
8640
8634
|
var AnimateSharedLayout = function (_a) {
|
|
8641
8635
|
var children = _a.children;
|
|
8636
|
+
React__namespace.useEffect(function () {
|
|
8637
|
+
warning(false, "AnimateSharedLayout is deprecated: https://www.framer.com/docs/guide-upgrade/##shared-layout-animations");
|
|
8638
|
+
}, []);
|
|
8642
8639
|
return (React__namespace.createElement(LayoutGroup, { id: useConstant(function () { return "asl-".concat(id++); }) }, children));
|
|
8643
8640
|
};
|
|
8644
8641
|
|
|
@@ -8675,7 +8672,7 @@
|
|
|
8675
8672
|
* Creating a new config context object will re-render every `motion` component
|
|
8676
8673
|
* every time it renders. So we only want to create a new one sparingly.
|
|
8677
8674
|
*/
|
|
8678
|
-
var context = React.useMemo(function () { return config; }, [JSON.stringify(config.transition), config.transformPagePoint]);
|
|
8675
|
+
var context = React.useMemo(function () { return config; }, [JSON.stringify(config.transition), config.transformPagePoint, config.reducedMotion]);
|
|
8679
8676
|
return (React__namespace.createElement(MotionConfigContext.Provider, { value: context }, children));
|
|
8680
8677
|
}
|
|
8681
8678
|
|