ICT30016-Assignment-3/node_modules/framer-motion/dist/es/animation/animate/resolve-subjects.mjs
dlawler489 a79a6afd34 intial
intial
2025-09-16 12:09:52 +10:00

19 lines
546 B
JavaScript

import { resolveElements } from 'motion-dom';
import { isDOMKeyframes } from '../utils/is-dom-keyframes.mjs';
function resolveSubjects(subject, keyframes, scope, selectorCache) {
if (typeof subject === "string" && isDOMKeyframes(keyframes)) {
return resolveElements(subject, scope, selectorCache);
}
else if (subject instanceof NodeList) {
return Array.from(subject);
}
else if (Array.isArray(subject)) {
return subject;
}
else {
return [subject];
}
}
export { resolveSubjects };