| 12345678910111213141516171819 |
- import { isForcedMotionValue } from '../../../motion/utils/is-forced-motion-value.mjs';
- import { isMotionValue } from '../../../value/utils/is-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 };
|