{"version":3,"file":"Rotate_hover.DQCcdHW0.mjs","names":["__esmMin","c","J","init_jsx_runtime","init_npm_react_18_3_1","getRotation","value","withHoverTilt","current","props","target","FALLBACK_ANGLE","Component","SCALE","DURATION","init_Rotate_hover"],"sources":["https:/framerusercontent.com/modules/acI4MLBy8rwYeERfZHM0/e5UdJAwKZrOSmpNAAa1M/Rotate_hover.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef}from\"react\";// ✏️ Edit these\nconst SCALE=1// set to 1.03, for example, to also grow slightly\n;const DURATION=.25// seconds\n;const FALLBACK_ANGLE=0// tilt used if the container has no rotation set (0 = no tilt)\n;// Reads a rotation value whether it's a number, a \"-6deg\" string, or a motion value\nfunction getRotation(value){if(value==null)return 0;if(typeof value===\"number\")return value;if(typeof value===\"string\")return parseFloat(value)||0;if(typeof value.get===\"function\")return getRotation(value.get());return 0;}export function withHoverTilt(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const current=getRotation(props?.style?.rotate);const target=current===0?FALLBACK_ANGLE:-current;return /*#__PURE__*/_jsx(Component,{ref:ref,...props,whileHover:{rotate:target,scale:SCALE},transition:{type:\"spring\",stiffness:300,damping:20,duration:DURATION}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withHoverTilt\":{\"type\":\"reactHoc\",\"name\":\"withHoverTilt\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Rotate_hover.map"],"mappings":"A,kHAKA,SAASK,EAAY,EAAM,CAAyL,OAArLC,GAAO,KAAY,EAAK,OAAOA,GAAQ,SAAgBA,EAAS,OAAOA,GAAQ,SAAgB,WAAWA,CAAK,GAAG,EAAK,OAAOA,EAAM,KAAM,WAAkBD,EAAYC,EAAM,IAAI,CAAC,EAAS,CAAE,CAAC,SAAgBC,EAAc,EAAU,CAAC,MAAoB,iBAAY,EAAM,IAAM,CAAC,IAAMC,EAAQH,EAAYI,GAAO,OAAO,MAAM,EAAQC,EAAOF,IAAU,EAAEG,EAAe,CAACH,EAAQ,MAAoB,gBAAKI,EAAU,CAAK,MAAI,GAAGH,EAAM,WAAW,CAAC,OAAOC,EAAO,MAAMG,CAAK,EAAE,WAAW,CAAC,KAAK,SAAS,UAAU,IAAI,QAAQ,GAAG,SAASC,CAAQ,CAAC,CAAC,CAAE,CAAC,CAAE,C,gDAJtjB,EAAM,EACL,EAAS,IACT,EAAe,C"}