Mission Control Dashboard - Initial implementation
This commit is contained in:
21
node_modules/framer-motion/dist/es/value/use-computed.mjs
generated
vendored
Normal file
21
node_modules/framer-motion/dist/es/value/use-computed.mjs
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
"use client";
|
||||
import { collectMotionValues } from 'motion-dom';
|
||||
import { useCombineMotionValues } from './use-combine-values.mjs';
|
||||
|
||||
function useComputed(compute) {
|
||||
/**
|
||||
* Open session of collectMotionValues. Any MotionValue that calls get()
|
||||
* will be saved into this array.
|
||||
*/
|
||||
collectMotionValues.current = [];
|
||||
compute();
|
||||
const value = useCombineMotionValues(collectMotionValues.current, compute);
|
||||
/**
|
||||
* Synchronously close session of collectMotionValues.
|
||||
*/
|
||||
collectMotionValues.current = undefined;
|
||||
return value;
|
||||
}
|
||||
|
||||
export { useComputed };
|
||||
//# sourceMappingURL=use-computed.mjs.map
|
||||
Reference in New Issue
Block a user