{"version":3,"file":"CardMouseHover.B4MNyc8-.mjs","names":["__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/bmda95lEJ6G6aRblR5ap/YWUmLX89f7A2W0BKCTQ0/CardMouseHover.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";const clamp=(n,min,max)=>Math.max(min,Math.min(max,n));/**\n * Made in Stylokit\n * Dmytri — Creator\n *\n * Hover Card Move Override:\n * - Tilts and translates the card based on pointer position\n * - Applies a subtle scale on hover\n * - Resets to default on pointer leave\n */export function HoverCardMove(opts={}){const{maxTilt=10,maxMove=14,hoverScale=1.04,perspective=900}=opts;return{// Runs when the pointer enters the card\nonPointerEnter:e=>{const el=e.currentTarget;if(!el)return;// Optimize for transform animations\nel.style.willChange=\"transform\";el.style.transformStyle=\"preserve-3d\";el.style.transition=\"transform 140ms ease-out\";// Set the initial hover transform state\nel.style.transform=`perspective(${perspective}px) translate3d(0px,0px,0px) rotateX(0deg) rotateY(0deg) scale(${hoverScale})`;},// Runs while the pointer moves over the card\nonPointerMove:e=>{const el=e.currentTarget;if(!el)return;// Get element bounds for normalized pointer position\nconst r=el.getBoundingClientRect();if(!r.width||!r.height)return;// Pointer position normalized to 0..1\nconst px=(e.clientX-r.left)/r.width;const py=(e.clientY-r.top)/r.height;// Convert to centered range (-1..1)\nconst cx=(px-.5)*2;const cy=(py-.5)*2;// Translate amount (clamped)\nconst tx=clamp(cx*maxMove,-maxMove,maxMove);const ty=clamp(cy*maxMove,-maxMove,maxMove);// Tilt amount (clamped)\nconst rx=clamp(-cy*maxTilt,-maxTilt,maxTilt);const ry=clamp(cx*maxTilt,-maxTilt,maxTilt);// Apply interactive transform\nel.style.transition=\"transform 40ms linear\";el.style.transform=`perspective(${perspective}px) `+`translate3d(${tx}px, ${ty}px, 0px) `+`rotateX(${rx}deg) rotateY(${ry}deg) `+`scale(${hoverScale})`;},// Runs when the pointer leaves the card\nonPointerLeave:e=>{const el=e.currentTarget;if(!el)return;// Reset to the default (non-hover) state\nel.style.transition=\"transform 180ms ease-out\";el.style.transform=`perspective(${perspective}px) translate3d(0px,0px,0px) rotateX(0deg) rotateY(0deg) scale(1)`;}};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withHoverCardMove(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...HoverCardMove(props)});};}withHoverCardMove.displayName=\"HoverCardMove\";\nexport const __FramerMetadata__ = {\"exports\":{\"withHoverCardMove\":{\"type\":\"reactHoc\",\"name\":\"withHoverCardMove\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"HoverCardMove\":{\"type\":\"override\",\"name\":\"HoverCardMove\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CardMouseHover.map"],"mappings":"mKAQG,SAAgB,EAAc,EAAK,CAAC,EAAE,CAAC,GAAK,CAAC,UAAQ,GAAG,UAAQ,GAAG,aAAW,KAAK,cAAY,KAAK,EAAK,MAAM,CAClH,eAAe,GAAG,CAAC,IAAM,EAAG,EAAE,cAAkB,IAChD,EAAG,MAAM,WAAW,YAAY,EAAG,MAAM,eAAe,cAAc,EAAG,MAAM,WAAW,2BAC1F,EAAG,MAAM,UAAU,eAAe,EAAY,iEAAiE,EAAW,GAAG,EAC7H,cAAc,GAAG,CAAC,IAAM,EAAG,EAAE,cAAc,GAAG,CAAC,EAAG,OAClD,IAAM,EAAE,EAAG,sBAAsB,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,OAC1D,IAAM,GAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAY,GAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAC3D,GAAI,EAAG,IAAI,EAAQ,GAAI,EAAG,IAAI,EAC9B,EAAG,EAAM,EAAG,EAAQ,CAAC,EAAQ,CAAO,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