{"version":3,"file":"LogoScroller.BhQZ2PBQ.mjs","names":["useRef","useState","totalWidth","startTransition"],"sources":["https:/framerusercontent.com/modules/AAVdILdR9q5c0OdnlycH/lPuqmWBDzFOSspMAlCMx/LogoScroller.js"],"sourcesContent":["// Horizontal scrolling logo section with adjustable speed and hover effects\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{motion,useMotionValue,useAnimationFrame}from\"framer-motion\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function LogoScroller(props){const{logos=[{image:{src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Logo 1\"},link:\"\"},{image:{src:\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",alt:\"Logo 2\"},link:\"\"},{image:{src:\"https://framerusercontent.com/images/BYnxEV1zjYb9bhWh1IwBZ1ZoS60.jpg\",alt:\"Logo 3\"},link:\"\"},{image:{src:\"https://framerusercontent.com/images/2uTNEj5aTl2K3NJaEFWMbnrA.jpg\",alt:\"Logo 4\"},link:\"\"},{image:{src:\"https://framerusercontent.com/images/f9RiWoNpmlCMqVRIHz8l8wYfeI.jpg\",alt:\"Logo 5\"},link:\"\"}],speed=50,gap=40,logoHeight=60,backgroundColor=\"#FFFFFF\",hoverOpacity=1,pauseOnHover=true,borderColor=\"#0099FF\",borderWidth=2,opacity=1}=props;const containerRef=useRef(null);const[isHovered,setIsHovered]=useState(false);const x=useMotionValue(0);const[containerWidth,setContainerWidth]=useState(0);const isStatic=RenderTarget.current()===RenderTarget.thumbnail;useEffect(()=>{if(!containerRef.current)return;const updateWidth=()=>{if(containerRef.current){startTransition(()=>setContainerWidth(containerRef.current.offsetWidth));}};updateWidth();if(typeof window!==\"undefined\"){window.addEventListener(\"resize\",updateWidth);return()=>window.removeEventListener(\"resize\",updateWidth);}},[]);useAnimationFrame((t,delta)=>{if(isStatic||pauseOnHover&&isHovered)return;const logoWidth=logoHeight*1.5;const totalWidth=(logoWidth+gap)*logos.length;const pixelsPerSecond=speed;const movement=delta/1e3*pixelsPerSecond;let newX=x.get()-movement;if(newX<=-totalWidth){newX=newX+totalWidth;}x.set(newX);});const logoWidth=logoHeight*1.5;const totalWidth=(logoWidth+gap)*logos.length;const duplicates=Math.max(1,Math.ceil(containerWidth/totalWidth)+2);return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{position:\"relative\",width:\"100%\",height:\"100%\",backgroundColor,overflow:\"hidden\",display:\"flex\",alignItems:\"center\"},onMouseEnter:()=>startTransition(()=>setIsHovered(true)),onMouseLeave:()=>startTransition(()=>setIsHovered(false)),children:/*#__PURE__*/_jsx(motion.div,{style:{display:\"flex\",gap:`${gap}px`,x,willChange:\"transform\",opacity:opacity},children:Array.from({length:duplicates}).map((_,duplicateIndex)=>logos.map((logo,logoIndex)=>{const key=`${duplicateIndex}-${logoIndex}`;const LogoWrapper=logo.link?\"a\":\"div\";return /*#__PURE__*/_jsx(LogoWrapper,{href:logo.link||undefined,target:logo.link?\"_blank\":undefined,rel:logo.link?\"noopener noreferrer\":undefined,style:{display:\"block\",flexShrink:0,cursor:logo.link?\"pointer\":\"default\"},children:/*#__PURE__*/_jsx(motion.div,{style:{width:`${logoWidth}px`,height:`${logoHeight}px`,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",border:\"2px solid transparent\",borderRadius:\"4px\",opacity:opacity},whileHover:{borderColor:borderColor,opacity:hoverOpacity},transition:{duration:.2,ease:\"easeOut\"},children:/*#__PURE__*/_jsx(\"img\",{src:logo.image.src,alt:logo.image.alt,style:{width:\"100%\",height:\"100%\",objectFit:\"contain\",userSelect:\"none\",pointerEvents:\"none\"},draggable:false})})},key);}))})});}addPropertyControls(LogoScroller,{logos:{type:ControlType.Array,title:\"Logos\",control:{type:ControlType.Object,controls:{image:{type:ControlType.ResponsiveImage,title:\"Logo\"},link:{type:ControlType.Link,title:\"Link\"}}},defaultValue:[{image:{src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Logo 1\"},link:\"\"},{image:{src:\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",alt:\"Logo 2\"},link:\"\"},{image:{src:\"https://framerusercontent.com/images/BYnxEV1zjYb9bhWh1IwBZ1ZoS60.jpg\",alt:\"Logo 3\"},link:\"\"},{image:{src:\"https://framerusercontent.com/images/2uTNEj5aTl2K3NJaEFWMbnrA.jpg\",alt:\"Logo 4\"},link:\"\"},{image:{src:\"https://framerusercontent.com/images/f9RiWoNpmlCMqVRIHz8l8wYfeI.jpg\",alt:\"Logo 5\"},link:\"\"}]},speed:{type:ControlType.Number,title:\"Speed\",defaultValue:50,min:10,max:200,step:10,unit:\"px/s\"},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:40,min:10,max:100,step:5,unit:\"px\"},logoHeight:{type:ControlType.Number,title:\"Logo Height\",defaultValue:60,min:30,max:150,step:5,unit:\"px\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#0099FF\"},borderWidth:{type:ControlType.Number,title:\"Border Width\",defaultValue:2,min:1,max:5,step:1,unit:\"px\"},pauseOnHover:{type:ControlType.Boolean,title:\"Pause on Hover\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"},hoverOpacity:{type:ControlType.Number,title:\"Hover Opacity\",defaultValue:1,min:.5,max:1,step:.05},opacity:{type:ControlType.Number,title:\"Opacity\",defaultValue:1,min:0,max:1,step:.05}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LogoScroller\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed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