{"version":3,"file":"InfiniteScroll.DQwq9MMO.mjs","names":["useState","useRef","startTransition","__esmMin","window","te","init_ssg_sandbox_shims","init_npm_react_18_3_1","_e","ce","de","useMotionValue","useAnimationFrame","motion","init_framer_motion_DhsWWWsN","addPropertyControls","init_framer_BEr93sCn","ControlType","InfiniteScroll","props","isHovered","setIsHovered","isPaused","setIsPaused","containerRef","containerWidth","setContainerWidth","x","updateWidth","currentSpeed","hoverSpeed","speed","directionMultiplier","direction","sortedBrands","sortAlphabetically","brands","a","b","itemWidth","logoSize","gap","totalWidth","movement","delta","newX","duplicatedBrands","handleClick","pauseOnClick","verticalAlign","brandImage","brand","borderRadius","padding","useGrayscale","index","init_InfiniteScroll","init_jsx_runtime"],"sources":["https:/framerusercontent.com/modules/p6wBwHPSURaRrfAHze21/ZoL6qql1rvanHMM28oPH/InfiniteScroll.js"],"sourcesContent":["// Infinite scroll component for brand logos with automatic scrolling that slows on hover\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion,useAnimationFrame,useMotionValue}from\"framer-motion\";/**\n * Infinite Scroll Brand Logos\n *\n * @framerIntrinsicWidth 800\n * @framerIntrinsicHeight 120\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function InfiniteScroll(props){const{brands=[{image:{src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Brand 1\"},name:\"Brand 1\"},{image:{src:\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",alt:\"Brand 2\"},name:\"Brand 2\"},{image:{src:\"https://framerusercontent.com/images/BYnxEV1zjYb9bhWh1IwBZ1ZoS60.jpg\",alt:\"Brand 3\"},name:\"Brand 3\"},{image:{src:\"https://framerusercontent.com/images/2uTNEj5aTl2K3NJaEFWMbnrA.jpg\",alt:\"Brand 4\"},name:\"Brand 4\"},{image:{src:\"https://framerusercontent.com/images/f9RiWoNpmlCMqVRIHz8l8wYfeI.jpg\",alt:\"Brand 5\"},name:\"Brand 5\"}],speed=1,hoverSpeed=.3,gap=20,logoSize=100,backgroundColor=\"#FFFFFF\",borderRadius=6,padding=16,direction=\"left\",verticalAlign=\"center\",pauseOnClick=true,useGrayscale=true,sortAlphabetically=false}=props;const[isHovered,setIsHovered]=useState(false);const[isPaused,setIsPaused]=useState(false);const containerRef=useRef(null);const[containerWidth,setContainerWidth]=useState(0);const x=useMotionValue(0);useEffect(()=>{if(typeof window!==\"undefined\"&&containerRef.current){const updateWidth=()=>{if(containerRef.current){startTransition(()=>setContainerWidth(containerRef.current.offsetWidth));}};updateWidth();window.addEventListener(\"resize\",updateWidth);return()=>window.removeEventListener(\"resize\",updateWidth);}},[]);const currentSpeed=isPaused?0:isHovered?hoverSpeed:speed;const directionMultiplier=direction===\"left\"?-1:1;// Sort brands alphabetically if enabled\nconst sortedBrands=sortAlphabetically?[...brands].sort((a,b)=>a.name.localeCompare(b.name)):brands;useAnimationFrame((time,delta)=>{const itemWidth=logoSize+gap;const totalWidth=brands.length*itemWidth;const movement=currentSpeed*directionMultiplier*(delta/16);const currentX=x.get();let newX=currentX+movement;// Seamless loop reset\nif(direction===\"left\"&&newX<=-totalWidth){newX+=totalWidth;}else if(direction===\"right\"&&newX>=0){newX-=totalWidth;}x.set(newX);});const duplicatedBrands=[...sortedBrands,...sortedBrands,...sortedBrands];const handleClick=()=>{if(pauseOnClick){startTransition(()=>setIsPaused(!isPaused));}};const getVerticalAlignment=()=>{switch(verticalAlign){case\"top\":return\"flex-start\";case\"bottom\":return\"flex-end\";default:return\"center\";}};return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{width:\"100%\",height:\"100%\",overflow:\"hidden\",position:\"relative\",display:\"flex\",alignItems:getVerticalAlignment()},onMouseEnter:()=>startTransition(()=>setIsHovered(true)),onMouseLeave:()=>startTransition(()=>setIsHovered(false)),onClick:handleClick,role:\"region\",\"aria-label\":\"Brand logos carousel\",tabIndex:0,onKeyDown:e=>{if(e.key===\" \"||e.key===\"Enter\"){e.preventDefault();handleClick();}},children:/*#__PURE__*/_jsx(motion.div,{style:{display:\"flex\",gap:`${gap}px`,x,willChange:\"transform\"},children:duplicatedBrands.map((brand,index)=>{const brandImage=brand.image||{src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Default Brand\"};return /*#__PURE__*/_jsx(motion.div,{style:{width:`${logoSize}px`,height:`${logoSize}px`,backgroundColor:backgroundColor,borderRadius:`${borderRadius}px`,padding:`${padding}px`,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",flexShrink:0},role:\"img\",\"aria-label\":brandImage.alt||brand.name,children:/*#__PURE__*/_jsx(\"img\",{src:brandImage.src,alt:brandImage.alt||brand.name,style:{width:\"100%\",height:\"100%\",objectFit:\"contain\",filter:useGrayscale?\"grayscale(100%)\":\"none\",transition:\"filter 0.3s ease\"}})},`${brand.name}-${index}`);})})});}addPropertyControls(InfiniteScroll,{brands:{type:ControlType.Array,title:\"Brands\",control:{type:ControlType.Object,controls:{image:{type:ControlType.ResponsiveImage,title:\"Logo\"},name:{type:ControlType.String,title:\"Brand Name\",defaultValue:\"Brand\"}}},defaultValue:[{image:{src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Brand 1\"},name:\"Brand 1\"},{image:{src:\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",alt:\"Brand 2\"},name:\"Brand 2\"},{image:{src:\"https://framerusercontent.com/images/BYnxEV1zjYb9bhWh1IwBZ1ZoS60.jpg\",alt:\"Brand 3\"},name:\"Brand 3\"},{image:{src:\"https://framerusercontent.com/images/2uTNEj5aTl2K3NJaEFWMbnrA.jpg\",alt:\"Brand 4\"},name:\"Brand 4\"},{image:{src:\"https://framerusercontent.com/images/f9RiWoNpmlCMqVRIHz8l8wYfeI.jpg\",alt:\"Brand 5\"},name:\"Brand 5\"}]},speed:{type:ControlType.Number,title:\"Speed\",defaultValue:1,min:.1,max:5,step:.1},hoverSpeed:{type:ControlType.Number,title:\"Hover Speed\",defaultValue:.3,min:.1,max:2,step:.1},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:20,min:0,max:100,step:1,unit:\"px\"},logoSize:{type:ControlType.Number,title:\"Logo Size\",defaultValue:100,min:50,max:300,step:10,unit:\"px\"},backgroundColor:{type:ControlType.Color,title:\"Frame Color\",defaultValue:\"#FFFFFF\"},borderRadius:{type:ControlType.Number,title:\"Roundness\",defaultValue:6,min:0,max:50,step:1,unit:\"px\"},padding:{type:ControlType.Number,title:\"Padding\",defaultValue:16,min:0,max:50,step:1,unit:\"px\"},direction:{type:ControlType.Enum,title:\"Direction\",options:[\"left\",\"right\"],optionTitles:[\"Left\",\"Right\"],defaultValue:\"left\",displaySegmentedControl:true},verticalAlign:{type:ControlType.Enum,title:\"Vertical Align\",options:[\"top\",\"center\",\"bottom\"],optionTitles:[\"Top\",\"Center\",\"Bottom\"],defaultValue:\"center\",displaySegmentedControl:true},pauseOnClick:{type:ControlType.Boolean,title:\"Pause on Click\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"},useGrayscale:{type:ControlType.Boolean,title:\"Grayscale Filter\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},sortAlphabetically:{type:ControlType.Boolean,title:\"Sort A-Z\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"InfiniteScroll\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"120\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"800\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./InfiniteScroll.map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