Skip to content

Commit 1035355

Browse files
committed
upgrade motion
1 parent 7f329c2 commit 1035355

File tree

10 files changed

+224
-293
lines changed

10 files changed

+224
-293
lines changed

docs/tools/templates/reaflow-codesandbox-template/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "",
55
"main": "src/index.js",
66
"dependencies": {
7-
"framer-motion": "^2.1.2",
7+
"motion": "^11.18.0",
88
"react": "latest",
99
"react-dom": "latest",
1010
"react-scripts": "3.0.1",

package-lock.json

Lines changed: 94 additions & 58 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@
5454
"d3-shape": "^3.0.1",
5555
"elkjs": "^0.8.2",
5656
"ellipsize": "^0.2.0",
57-
"framer-motion": "^11.0.6",
57+
"motion": "^11.18.0",
5858
"kld-affine": "^2.1.1",
5959
"kld-intersections": "^0.7.0",
6060
"p-cancelable": "^3.0.0",
61-
"reablocks": "^8.0.3",
61+
"reablocks": "^8.7.4",
6262
"react-cool-dimensions": "^2.0.7",
6363
"react-fast-compare": "^3.2.2",
6464
"react-use-gesture": "^8.0.1",

src/Canvas.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { CanvasPosition, EdgeData, NodeData, PortData } from './types';
99
import classNames from 'classnames';
1010
import { CanvasProvider, useCanvas } from './utils/CanvasProvider';
1111
import { getDragNodeData } from './utils/helpers';
12-
import { motion } from 'framer-motion';
12+
import { motion } from 'motion/react';
1313
import { ZoomResult } from './utils/useZoom';
1414
import css from './Canvas.module.css';
1515

@@ -327,17 +327,17 @@ const InternalCanvas: FC<CanvasProps & { ref?: Ref<CanvasRef> }> = forwardRef(({
327327
scale: zoom,
328328
transition: animated
329329
? {
330-
velocity: 100,
331-
translateX: { duration: mount.current ? 0.3 : 0 },
332-
translateY: { duration: mount.current ? 0.3 : 0 },
333-
opacity: { duration: 0.8 },
334-
when: 'beforeChildren'
335-
}
330+
velocity: 100,
331+
translateX: { duration: mount.current ? 0.3 : 0 },
332+
translateY: { duration: mount.current ? 0.3 : 0 },
333+
opacity: { duration: 0.8 },
334+
when: 'beforeChildren'
335+
}
336336
: {
337-
type: false,
338-
duration: 0,
339-
when: 'beforeChildren'
340-
}
337+
type: false,
338+
duration: 0,
339+
when: 'beforeChildren'
340+
}
341341
}}
342342
>
343343
{layout?.children?.map(({ children, ...n }) => {

0 commit comments

Comments
 (0)