{"version":3,"file":"Hover_Image_Reveal.Do_Nq58b.mjs","names":[],"sources":["https:/framerusercontent.com/modules/BCRshRhSwX7cWS7cmlbq/AUwooBBzzo7l4b3ij0uP/Hover_Image_Reveal.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export function HoverRevealBox({image,widthBreakpoints,heightBreakpoints,alignment}){const[isHovered,setIsHovered]=useState(false);const[mousePosition,setMousePosition]=useState({x:0,y:0});const handleMouseEnter=()=>{setIsHovered(true);};const handleMouseLeave=()=>{setIsHovered(false);};const handleMouseMove=event=>{setMousePosition({x:event.clientX,y:event.clientY});};let positionStyle={};switch(alignment){case\"TopLeft\":positionStyle={top:mousePosition.y,left:mousePosition.x};break;case\"TopRight\":positionStyle={top:mousePosition.y,right:window.innerWidth-mousePosition.x};break;case\"BottomLeft\":positionStyle={bottom:window.innerHeight-mousePosition.y,left:mousePosition.x};break;case\"BottomRight\":positionStyle={bottom:window.innerHeight-mousePosition.y,right:window.innerWidth-mousePosition.x};break;case\"Center\":default:positionStyle={top:mousePosition.y-heightBreakpoints/2,left:mousePosition.x-widthBreakpoints/2};break;}return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",backgroundColor:\"transparent\",position:\"relative\"},onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,onMouseMove:handleMouseMove,children:isHovered&&/*#__PURE__*/_jsx(\"img\",{src:image,style:{width:widthBreakpoints,height:heightBreakpoints,position:\"fixed\",borderRadius:0,pointerEvents:\"none\",objectFit:\"cover\",...positionStyle}})});}addPropertyControls(HoverRevealBox,{image:{type:ControlType.Image},widthBreakpoints:{type:ControlType.Number,title:\"Width\",defaultValue:400,displayStepper:true,step:10,min:0,max:1300,unit:\"px\"},heightBreakpoints:{type:ControlType.Number,title:\"Height\",defaultValue:500,displayStepper:true,step:10,min:0,max:1300,unit:\"px\"},alignment:{type:ControlType.Enum,title:\"Alignment\",defaultValue:\"Center\",options:[\"Center\",\"TopLeft\",\"TopRight\",\"BottomLeft\",\"BottomRight\"],optionTitles:[\"Center\",\"Top Left\",\"Top Right\",\"Bottom Left\",\"Bottom Right\"]}});\nexport const __FramerMetadata__ = {\"exports\":{\"HoverRevealBox\":{\"type\":\"reactComponent\",\"name\":\"HoverRevealBox\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Hover_Image_Reveal.map"],"mappings":"0SAA2H,SAAgB,EAAe,CAAC,QAAM,mBAAiB,oBAAkB,YAAU,CAAC,CAAC,GAAK,CAAC,EAAU,EAAa,CAAC,GAAS,EAAM,CAAM,CAAC,EAAc,EAAiB,CAAC,EAAS,CAAC,EAAE,EAAE,EAAE,CAAE,EAAC,CAAO,EAAiB,IAAI,CAAC,GAAa,EAAK,AAAE,EAAO,EAAiB,IAAI,CAAC,GAAa,EAAM,AAAE,EAAO,EAAgB,GAAO,CAAC,EAAiB,CAAC,EAAE,EAAM,QAAQ,EAAE,EAAM,OAAQ,EAAC,AAAE,EAAK,EAAc,CAAE,EAAC,OAAO,EAAP,CAAkB,IAAI,UAAU,EAAc,CAAC,IAAI,EAAc,EAAE,KAAK,EAAc,CAAE,EAAC,MAAM,IAAI,WAAW,EAAc,CAAC,IAAI,EAAc,EAAE,MAAM,EAAO,WAAW,EAAc,CAAE,EAAC,MAAM,IAAI,aAAa,EAAc,CAAC,OAAO,EAAO,YAAY,EAAc,EAAE,KAAK,EAAc,CAAE,EAAC,MAAM,IAAI,cAAc,EAAc,CAAC,OAAO,EAAO,YAAY,EAAc,EAAE,MAAM,EAAO,WAAW,EAAc,CAAE,EAAC,MAAM,IAAI,SAAS,QAAQ,EAAc,CAAC,IAAI,EAAc,EAAE,EAAkB,EAAE,KAAK,EAAc,EAAE,EAAiB,CAAE,EAAC,KAAO,OAAoB,GAAK,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,OAAO,OA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