first commit
This commit is contained in:
19
node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs
generated
vendored
Normal file
19
node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import { isMotionValue } from 'motion-dom';
|
||||
import { isForcedMotionValue } from '../../../motion/utils/is-forced-motion-value.mjs';
|
||||
|
||||
function scrapeMotionValuesFromProps(props, prevProps, visualElement) {
|
||||
const { style } = props;
|
||||
const newValues = {};
|
||||
for (const key in style) {
|
||||
if (isMotionValue(style[key]) ||
|
||||
(prevProps.style &&
|
||||
isMotionValue(prevProps.style[key])) ||
|
||||
isForcedMotionValue(key, props) ||
|
||||
visualElement?.getValue(key)?.liveStyle !== undefined) {
|
||||
newValues[key] = style[key];
|
||||
}
|
||||
}
|
||||
return newValues;
|
||||
}
|
||||
|
||||
export { scrapeMotionValuesFromProps };
|
||||
Reference in New Issue
Block a user