📚 Documentação inicial do ALETHEIA
- MANUAL-PRODUTO.md: Manual do usuário final - MANUAL-VENDAS.md: Estratégia comercial e vendas - MANUAL-TECNICO.md: Infraestrutura e deploy - README.md: Visão geral do projeto
This commit is contained in:
36
frontend/node_modules/framer-motion/dist/es/render/utils/resolve-variants.mjs
generated
vendored
Normal file
36
frontend/node_modules/framer-motion/dist/es/render/utils/resolve-variants.mjs
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
function getValueState(visualElement) {
|
||||
const state = [{}, {}];
|
||||
visualElement === null || visualElement === void 0 ? void 0 : visualElement.values.forEach((value, key) => {
|
||||
state[0][key] = value.get();
|
||||
state[1][key] = value.getVelocity();
|
||||
});
|
||||
return state;
|
||||
}
|
||||
function resolveVariantFromProps(props, definition, custom, visualElement) {
|
||||
/**
|
||||
* If the variant definition is a function, resolve.
|
||||
*/
|
||||
if (typeof definition === "function") {
|
||||
const [current, velocity] = getValueState(visualElement);
|
||||
definition = definition(custom !== undefined ? custom : props.custom, current, velocity);
|
||||
}
|
||||
/**
|
||||
* If the variant definition is a variant label, or
|
||||
* the function returned a variant label, resolve.
|
||||
*/
|
||||
if (typeof definition === "string") {
|
||||
definition = props.variants && props.variants[definition];
|
||||
}
|
||||
/**
|
||||
* At this point we've resolved both functions and variant labels,
|
||||
* but the resolved variant label might itself have been a function.
|
||||
* If so, resolve. This can only have returned a valid target object.
|
||||
*/
|
||||
if (typeof definition === "function") {
|
||||
const [current, velocity] = getValueState(visualElement);
|
||||
definition = definition(custom !== undefined ? custom : props.custom, current, velocity);
|
||||
}
|
||||
return definition;
|
||||
}
|
||||
|
||||
export { resolveVariantFromProps };
|
||||
Reference in New Issue
Block a user