framer-motion-3d
Advanced tools
Comparing version 11.11.11 to 11.11.12
@@ -6,3 +6,2 @@ 'use strict'; | ||
var three = require('three'); | ||
var tslib = require('tslib'); | ||
var jsxRuntime = require('react/jsx-runtime'); | ||
@@ -108,3 +107,10 @@ var reactMergeRefs = require('react-merge-refs'); | ||
*/ | ||
return React.createElement(Component, Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ ref }, framerMotion.filterProps(props, false, false)), visualProps), { onUpdate: props.onInstanceUpdate }), useHover(isStatic, props, visualElement)), useTap(isStatic, props, visualElement))); | ||
return React.createElement(Component, { | ||
ref, | ||
...framerMotion.filterProps(props, false, false), | ||
...visualProps, | ||
onUpdate: props.onInstanceUpdate, | ||
...useHover(isStatic, props, visualElement), | ||
...useTap(isStatic, props, visualElement), | ||
}); | ||
}; | ||
@@ -295,3 +301,5 @@ function useVisualProps(props) { | ||
}); | ||
const preloadedFeatures = Object.assign({}, framerMotion.animations); | ||
const preloadedFeatures = { | ||
...framerMotion.animations, | ||
}; | ||
function custom(Component) { | ||
@@ -347,4 +355,3 @@ return framerMotion.createRendererMotionComponent({ | ||
ErrorBoundary.getDerivedStateFromError = () => ({ error: true }); | ||
function CanvasComponent(_a, forwardedRef) { | ||
var { children, fallback, tabIndex, id, style, className, events } = _a, props = tslib.__rest(_a, ["children", "fallback", "tabIndex", "id", "style", "className", "events"]); | ||
function CanvasComponent({ children, fallback, tabIndex, id, style, className, events, ...props }, forwardedRef) { | ||
/** | ||
@@ -391,3 +398,8 @@ * Import existing contexts to pass through variants and MotionConfig from | ||
} | ||
root.current.configure(Object.assign(Object.assign({}, props), { dpr: dpr || props.dpr, size: Object.assign(Object.assign({}, size), { top: 0, left: 0 }), events: events || fiber.events })).render(jsxRuntime.jsx(ErrorBoundary, { set: setError, children: jsxRuntime.jsx(React__namespace.Suspense, { fallback: jsxRuntime.jsx(Block, { set: setBlock }), children: jsxRuntime.jsx(MotionCanvasContext.Provider, { value: { | ||
root.current.configure({ | ||
...props, | ||
dpr: dpr || props.dpr, | ||
size: { ...size, top: 0, left: 0 }, | ||
events: events || fiber.events, | ||
}).render(jsxRuntime.jsx(ErrorBoundary, { set: setError, children: jsxRuntime.jsx(React__namespace.Suspense, { fallback: jsxRuntime.jsx(Block, { set: setBlock }), children: jsxRuntime.jsx(MotionCanvasContext.Provider, { value: { | ||
dimensions, | ||
@@ -402,3 +414,9 @@ layoutCamera, | ||
}, []); | ||
return (jsxRuntime.jsx("div", { ref: containerRef, id: id, className: className, tabIndex: tabIndex, style: Object.assign({ position: "relative", width: "100%", height: "100%", overflow: "hidden" }, style), children: jsxRuntime.jsx("canvas", { ref: reactMergeRefs.mergeRefs([canvasRef, forwardedRef]), style: { display: "block" }, children: fallback }) })); | ||
return (jsxRuntime.jsx("div", { ref: containerRef, id: id, className: className, tabIndex: tabIndex, style: { | ||
position: "relative", | ||
width: "100%", | ||
height: "100%", | ||
overflow: "hidden", | ||
...style, | ||
}, children: jsxRuntime.jsx("canvas", { ref: reactMergeRefs.mergeRefs([canvasRef, forwardedRef]), style: { display: "block" }, children: fallback }) })); | ||
} | ||
@@ -501,3 +519,3 @@ const MotionCanvas = React.forwardRef(CanvasComponent); | ||
}); | ||
return (jsxRuntime.jsx(motion.perspectiveCamera, Object.assign({ ref: reactMergeRefs.mergeRefs([cameraRef, ref]) }, props))); | ||
return (jsxRuntime.jsx(motion.perspectiveCamera, { ref: reactMergeRefs.mergeRefs([cameraRef, ref]), ...props })); | ||
}); | ||
@@ -517,3 +535,3 @@ | ||
}); | ||
return (jsxRuntime.jsx(motion.orthographicCamera, Object.assign({ left: size.width / -2, right: size.width / 2, top: size.height / 2, bottom: size.height / -2, ref: reactMergeRefs.mergeRefs([cameraRef, ref]) }, props))); | ||
return (jsxRuntime.jsx(motion.orthographicCamera, { left: size.width / -2, right: size.width / 2, top: size.height / 2, bottom: size.height / -2, ref: reactMergeRefs.mergeRefs([cameraRef, ref]), ...props })); | ||
}); | ||
@@ -520,0 +538,0 @@ |
{ | ||
"name": "framer-motion-3d", | ||
"version": "11.11.11", | ||
"version": "11.11.12", | ||
"description": "A simple and powerful React animation library for @react-three/fiber", | ||
@@ -17,3 +17,3 @@ "main": "dist/cjs/index.js", | ||
"types": "dist/index.d.ts", | ||
"author": "Framer", | ||
"author": "Matt Perry", | ||
"license": "MIT", | ||
@@ -49,7 +49,7 @@ "repository": "https://github.com/framer/motion/", | ||
"dependencies": { | ||
"framer-motion": "^11.11.11", | ||
"framer-motion": "^11.11.12", | ||
"react-merge-refs": "^2.0.1" | ||
}, | ||
"peerDependencies": { | ||
"@react-three/fiber": "^8.2.2", | ||
"@react-three/fiber": "8.2.2", | ||
"react": ">=18.0", | ||
@@ -60,3 +60,3 @@ "react-dom": ">=18.0", | ||
"devDependencies": { | ||
"@react-three/fiber": "^8.2.2", | ||
"@react-three/fiber": "8.2.2", | ||
"@react-three/test-renderer": "^9.0.0", | ||
@@ -66,3 +66,3 @@ "@rollup/plugin-commonjs": "^22.0.1", | ||
}, | ||
"gitHead": "44e1db46d8ec62bf1bdf6bc92bd810135da7a5a3" | ||
"gitHead": "b6b4260815bdd8492dd72d805bbaa13450699709" | ||
} |
<p align="center"> | ||
<img src="https://user-images.githubusercontent.com/22095598/123793419-f5528800-d8e1-11eb-8c5f-e2dad45a9c81.png" width="108" height="108" alt="Framer Motion" /> | ||
<img src="https://user-images.githubusercontent.com/22095598/123793419-f5528800-d8e1-11eb-8c5f-e2dad45a9c81.png" width="108" height="108" alt="Motion" /> | ||
</p> | ||
<h1 align="center">Framer Motion 3D</h1> | ||
<h1 align="center">Motion 3D</h1> | ||
<h3 align="center"> | ||
@@ -32,3 +32,3 @@ An open source motion library for React Three Fiber. | ||
</a> | ||
<a href="https://twitter.com/framer" target="_blank"> | ||
<a href="https://twitter.com/motiondotdev" target="_blank"> | ||
<img src="https://img.shields.io/twitter/follow/framer.svg?style=social&label=Follow" /> | ||
@@ -67,7 +67,7 @@ </a> | ||
Want to contribute to Framer Motion 3D? Our [contributing guide](https://github.com/framer/motion/blob/master/CONTRIBUTING.md) has you covered. | ||
Want to contribute to Motion 3D? Our [contributing guide](https://github.com/framer/motion/blob/master/CONTRIBUTING.md) has you covered. | ||
### 👩🏻⚖️ License | ||
Framer Motion 3D is MIT licensed. | ||
Motion 3D is MIT licensed. | ||
@@ -74,0 +74,0 @@ ## Framer |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1141
50666
+ Added@react-three/fiber@8.2.2(transitive)
+ Addedreact-use-measure@2.1.1(transitive)
+ Addedsuspend-react@0.0.8(transitive)
- Removed@react-three/fiber@8.17.10(transitive)
- Removed@types/debounce@1.2.4(transitive)
- Removed@types/react-reconciler@0.28.8(transitive)
- Removed@types/webxr@0.5.20(transitive)
- Removedbase64-js@1.5.1(transitive)
- Removedbuffer@6.0.3(transitive)
- Removedieee754@1.2.1(transitive)
- Removedits-fine@1.2.5(transitive)
- Removedsuspend-react@0.1.3(transitive)
Updatedframer-motion@^11.11.12