Mission Control Dashboard - Initial implementation
This commit is contained in:
20
node_modules/framer-motion/dist/es/value/use-will-change/WillChangeMotionValue.mjs
generated
vendored
Normal file
20
node_modules/framer-motion/dist/es/value/use-will-change/WillChangeMotionValue.mjs
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import { MotionValue, transformProps, acceleratedValues } from 'motion-dom';
|
||||
|
||||
class WillChangeMotionValue extends MotionValue {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.isEnabled = false;
|
||||
}
|
||||
add(name) {
|
||||
if (transformProps.has(name) || acceleratedValues.has(name)) {
|
||||
this.isEnabled = true;
|
||||
this.update();
|
||||
}
|
||||
}
|
||||
update() {
|
||||
this.set(this.isEnabled ? "transform" : "auto");
|
||||
}
|
||||
}
|
||||
|
||||
export { WillChangeMotionValue };
|
||||
//# sourceMappingURL=WillChangeMotionValue.mjs.map
|
||||
1
node_modules/framer-motion/dist/es/value/use-will-change/WillChangeMotionValue.mjs.map
generated
vendored
Normal file
1
node_modules/framer-motion/dist/es/value/use-will-change/WillChangeMotionValue.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"WillChangeMotionValue.mjs","sources":["../../../../src/value/use-will-change/WillChangeMotionValue.ts"],"sourcesContent":["import {\n acceleratedValues,\n MotionValue,\n transformProps,\n type WillChange,\n} from \"motion-dom\"\n\nexport class WillChangeMotionValue\n extends MotionValue<string>\n implements WillChange\n{\n private isEnabled = false\n\n add(name: string) {\n if (transformProps.has(name) || acceleratedValues.has(name)) {\n this.isEnabled = true\n this.update()\n }\n }\n\n private update() {\n this.set(this.isEnabled ? \"transform\" : \"auto\")\n }\n}\n"],"names":[],"mappings":";;AAOM,MAAO,qBACT,SAAQ,WAAmB,CAAA;AAD/B,IAAA,WAAA,GAAA;;QAIY,IAAA,CAAA,SAAS,GAAG,KAAK;IAY7B;AAVI,IAAA,GAAG,CAAC,IAAY,EAAA;AACZ,QAAA,IAAI,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;AACzD,YAAA,IAAI,CAAC,SAAS,GAAG,IAAI;YACrB,IAAI,CAAC,MAAM,EAAE;QACjB;IACJ;IAEQ,MAAM,GAAA;AACV,QAAA,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,GAAG,WAAW,GAAG,MAAM,CAAC;IACnD;AACH;;;;"}
|
||||
10
node_modules/framer-motion/dist/es/value/use-will-change/index.mjs
generated
vendored
Normal file
10
node_modules/framer-motion/dist/es/value/use-will-change/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
"use client";
|
||||
import { useConstant } from '../../utils/use-constant.mjs';
|
||||
import { WillChangeMotionValue } from './WillChangeMotionValue.mjs';
|
||||
|
||||
function useWillChange() {
|
||||
return useConstant(() => new WillChangeMotionValue("auto"));
|
||||
}
|
||||
|
||||
export { useWillChange };
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
1
node_modules/framer-motion/dist/es/value/use-will-change/index.mjs.map
generated
vendored
Normal file
1
node_modules/framer-motion/dist/es/value/use-will-change/index.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.mjs","sources":["../../../../src/value/use-will-change/index.ts"],"sourcesContent":["\"use client\"\n\nimport type { WillChange } from \"motion-dom\"\nimport { useConstant } from \"../../utils/use-constant\"\nimport { WillChangeMotionValue } from \"./WillChangeMotionValue\"\n\nexport function useWillChange(): WillChange {\n return useConstant(() => new WillChangeMotionValue(\"auto\"))\n}\n"],"names":[],"mappings":";;;;;;AAQA;;"}
|
||||
Reference in New Issue
Block a user