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