{"version":3,"file":"PulseDot.Datpg4ct.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/pXUUAXjtDpD74bnbv4D5/0Zpe5SXgpdNDIDaergbC/PulseDot.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect,useRef,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion,AnimatePresence}from\"framer-motion\";/**\n * A little 8px dot that has a radar-like pulse every few seconds being animated from the inside out\n * \n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function PulseDot(props){const{dotColor,pulseColor,dotSize,pulseInterval,pulseCount,pulseSpeed,style}=props;const[isPulsing,setIsPulsing]=useState(false);const intervalRef=useRef(null);const isStatic=useIsStaticRenderer();// Clear interval on unmount\nuseEffect(()=>{if(isStatic)return;// Start the pulse interval\nconst startPulseInterval=()=>{if(intervalRef.current){window.clearInterval(intervalRef.current);}if(pulseInterval>0){intervalRef.current=window.setInterval(()=>{startTransition(()=>{setIsPulsing(true);// Reset pulsing state after animation completes\nif(pulseSpeed>0){setTimeout(()=>{startTransition(()=>setIsPulsing(false));},pulseSpeed*1e3);}});},pulseInterval*1e3);}};startPulseInterval();// Trigger initial pulse\nstartTransition(()=>setIsPulsing(true));if(pulseSpeed>0){setTimeout(()=>{startTransition(()=>setIsPulsing(false));},pulseSpeed*1e3);}return()=>{if(intervalRef.current){window.clearInterval(intervalRef.current);}};},[pulseInterval,pulseSpeed,isStatic]);// For static renderer, show a simplified version\nif(isStatic){return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:dotSize*5,height:dotSize*5,display:\"flex\",justifyContent:\"center\",alignItems:\"center\",...style},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:dotSize,height:dotSize,borderRadius:\"50%\",backgroundColor:dotColor,position:\"relative\",zIndex:2}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",width:dotSize*3,height:dotSize*3,borderRadius:\"50%\",backgroundColor:pulseColor,opacity:.3}})]});}return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:dotSize*5,height:dotSize*5,display:\"flex\",justifyContent:\"center\",alignItems:\"center\",...style},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:dotSize,height:dotSize,borderRadius:\"50%\",backgroundColor:dotColor,position:\"relative\",zIndex:2}}),/*#__PURE__*/_jsx(AnimatePresence,{children:isPulsing&&pulseCount>0&&Array.from({length:pulseCount}).map((_,index)=>/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",width:dotSize,height:dotSize,borderRadius:\"50%\",backgroundColor:pulseColor,opacity:0,backfaceVisibility:\"hidden\",WebkitBackfaceVisibility:\"hidden\",willChange:\"transform, opacity\",transform:\"translateZ(0)\"},initial:{scale:1,opacity:0},animate:{scale:[1,5],opacity:[.7,0],transition:{duration:pulseSpeed>0?pulseSpeed:.1,delay:pulseCount>1?index*(pulseSpeed/pulseCount):0,ease:\"easeOut\"}},exit:{opacity:0}},`pulse-${index}`))})]});}addPropertyControls(PulseDot,{dotColor:{type:ControlType.Color,title:\"Dot Color\",defaultValue:\"#FF5588\"},pulseColor:{type:ControlType.Color,title:\"Pulse Color\",defaultValue:\"#FF5588\"},dotSize:{type:ControlType.Number,title:\"Dot Size\",defaultValue:8,min:4,max:24,step:1,unit:\"px\"},pulseInterval:{type:ControlType.Number,title:\"Interval\",defaultValue:3,min:1,max:10,step:.5,unit:\"s\"},pulseSpeed:{type:ControlType.Number,title:\"Duration\",defaultValue:1.5,min:.5,max:5,step:.1,unit:\"s\"},pulseCount:{type:ControlType.Number,title:\"Pulse Count\",defaultValue:3,min:1,max:5,step:1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PulseDot\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__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