{"version":3,"file":"GlowContainer.DWHMoPiY.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/otbVE6TFVKgNkDdSxqVE/5Kl0v5HoDo51PTN4xyg9/GlowContainer.js"],"sourcesContent":["// Glow container that reveals color on mouse proximity with glowing border\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useRef,useEffect,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function GlowContainer(props){const{children,glowColor=\"#0099FF\",backgroundColor=\"#FFFFFF\",ghostBorderColor=\"#CCCCCC\",glowIntensity=.8,revealRadius=200,borderTopWidth=2,borderRightWidth=2,borderBottomWidth=2,borderLeftWidth=2,borderRadius=16,padding=20}=props;const containerRef=useRef(null);const[mousePosition,setMousePosition]=useState({x:-1e3,y:-1e3});const[isHovering,setIsHovering]=useState(false);const[isNearby,setIsNearby]=useState(false);useEffect(()=>{const container=containerRef.current;if(!container)return;const handleMouseMove=e=>{const rect=container.getBoundingClientRect();const x=e.clientX-rect.left;const y=e.clientY-rect.top;// Check if mouse is nearby (within proximity distance)\nconst proximityDistance=revealRadius*1.5;const isWithinProximity=e.clientX>=rect.left-proximityDistance&&e.clientX<=rect.right+proximityDistance&&e.clientY>=rect.top-proximityDistance&&e.clientY<=rect.bottom+proximityDistance;startTransition(()=>{setMousePosition({x,y});setIsNearby(isWithinProximity);});};const handleMouseEnter=()=>{startTransition(()=>setIsHovering(true));};const handleMouseLeave=()=>{startTransition(()=>{setIsHovering(false);});};window.addEventListener(\"mousemove\",handleMouseMove);container.addEventListener(\"mouseenter\",handleMouseEnter);container.addEventListener(\"mouseleave\",handleMouseLeave);return()=>{window.removeEventListener(\"mousemove\",handleMouseMove);container.removeEventListener(\"mouseenter\",handleMouseEnter);container.removeEventListener(\"mouseleave\",handleMouseLeave);};},[revealRadius]);const gradientStyle={background:`radial-gradient(circle ${revealRadius}px at ${mousePosition.x}px ${mousePosition.y}px, ${glowColor}${Math.round(glowIntensity*255).toString(16).padStart(2,\"0\")}, transparent)`};const borderGradientStyle={background:`radial-gradient(circle ${revealRadius}px at ${mousePosition.x}px ${mousePosition.y}px, ${glowColor}, transparent)`};const backgroundGradientStyle={background:`radial-gradient(circle ${revealRadius}px at ${mousePosition.x}px ${mousePosition.y}px, ${backgroundColor}, transparent)`};return /*#__PURE__*/_jsxs(\"div\",{ref:containerRef,style:{position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"hidden\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,borderRadius:borderRadius,borderTop:`${borderTopWidth}px solid ${ghostBorderColor}`,borderRight:`${borderRightWidth}px solid ${ghostBorderColor}`,borderBottom:`${borderBottomWidth}px solid ${ghostBorderColor}`,borderLeft:`${borderLeftWidth}px solid ${ghostBorderColor}`,pointerEvents:\"none\",zIndex:1}}),/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",inset:0,borderRadius:borderRadius,paddingTop:borderTopWidth,paddingRight:borderRightWidth,paddingBottom:borderBottomWidth,paddingLeft:borderLeftWidth,...borderGradientStyle,WebkitMask:\"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)\",WebkitMaskComposite:\"xor\",maskComposite:\"exclude\",pointerEvents:\"none\",zIndex:2},animate:{opacity:isNearby?1:0,filter:isNearby?`drop-shadow(0 0 ${glowIntensity*10}px ${glowColor})`:\"drop-shadow(0 0 0px transparent)\"},transition:{duration:.3}}),/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",top:borderTopWidth,right:borderRightWidth,bottom:borderBottomWidth,left:borderLeftWidth,borderRadius:borderRadius-Math.max(borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth),...backgroundGradientStyle,pointerEvents:\"none\"},animate:{opacity:isHovering?1:0},transition:{duration:.3}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\",borderRadius:borderRadius,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",overflow:\"hidden\",padding:padding},children:children})]});}addPropertyControls(GlowContainer,{glowColor:{type:ControlType.Color,title:\"Glow Color\",defaultValue:\"#0099FF\"},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"#FFFFFF\"},ghostBorderColor:{type:ControlType.Color,title:\"Ghost Border Color\",defaultValue:\"#CCCCCC\"},glowIntensity:{type:ControlType.Number,title:\"Glow Intensity\",defaultValue:.8,min:0,max:1,step:.1},revealRadius:{type:ControlType.Number,title:\"Reveal Radius\",defaultValue:200,min:50,max:500,step:10,unit:\"px\"},padding:{type:ControlType.Number,title:\"Padding\",defaultValue:20,min:0,max:100,step:1,unit:\"px\"},borderTopWidth:{type:ControlType.Number,title:\"Border Top\",defaultValue:2,min:0,max:10,step:1,unit:\"px\"},borderRightWidth:{type:ControlType.Number,title:\"Border Right\",defaultValue:2,min:0,max:10,step:1,unit:\"px\"},borderBottomWidth:{type:ControlType.Number,title:\"Border Bottom\",defaultValue:2,min:0,max:10,step:1,unit:\"px\"},borderLeftWidth:{type:ControlType.Number,title:\"Border Left\",defaultValue:2,min:0,max:10,step:1,unit:\"px\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:16,min:0,max:50,step:1,unit:\"px\"},children:{type:ControlType.Slot,title:\"Content\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GlowContainer\",\"slots\":[\"children\"],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GlowContainer.map"],"mappings":"gQAIG,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,WAAS,YAAU,UAAU,kBAAgB,UAAU,mBAAiB,UAAU,gBAAc,GAAG,eAAa,IAAI,iBAAe,EAAE,mBAAiB,EAAE,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