{"version":3,"file":"LogoTicker.DxzaDMAR.mjs","names":["useState","useRef","pixelsPerSecond","_Fragment"],"sources":["https:/framerusercontent.com/modules/lnT98UTSTbmQzUu8HWIt/gojXT2NgIaU9OmIRo1Lg/LogoTicker.js"],"sourcesContent":["// Enterprise-style logo ticker with infinite scrolling, configurable speed, direction, and pause on hover\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useRef,useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{useAnimationFrame}from\"framer-motion\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function LogoTicker(props){const{logos=[{image:{src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Logo 1\"}},{image:{src:\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",alt:\"Logo 2\"}},{image:{src:\"https://framerusercontent.com/images/BYnxEV1zjYb9bhWh1IwBZ1ZoS60.jpg\",alt:\"Logo 3\"}},{image:{src:\"https://framerusercontent.com/images/2uTNEj5aTl2K3NJaEFWMbnrA.jpg\",alt:\"Logo 4\"}},{image:{src:\"https://framerusercontent.com/images/f9RiWoNpmlCMqVRIHz8l8wYfeI.jpg\",alt:\"Logo 5\"}}],speed=50,spacing=60,direction=\"left\",pauseOnHover=true,fadeEdges=true,fadeWidth=80,fadeColorLeft=\"#FFFFFF\",fadeColorRight=\"#FFFFFF\",grayscaleAmount=100,logoOpacity=.6,colorTint=\"none\",enableHoverEffect=true}=props;const[isPaused,setIsPaused]=useState(false);const[offset,setOffset]=useState(0);const containerRef=useRef(null);const contentRef=useRef(null);const[contentWidth,setContentWidth]=useState(0);// Measure content width\nuseEffect(()=>{if(contentRef.current){const width=contentRef.current.scrollWidth/4// Divide by 4 because we render 4 sets\n;setContentWidth(width);}},[logos,spacing]);// Animation loop\nuseAnimationFrame((time,delta)=>{if(isPaused||contentWidth===0)return;const pixelsPerSecond=speed;const movement=pixelsPerSecond*delta/1e3;setOffset(prevOffset=>{const newOffset=direction===\"left\"?prevOffset+movement:prevOffset-movement;// Reset when we've scrolled one full set\nif(direction===\"left\"&&newOffset>=contentWidth){return newOffset-contentWidth;}else if(direction===\"right\"&&newOffset<=-contentWidth){return newOffset+contentWidth;}return newOffset;});});const handleMouseEnter=()=>{if(pauseOnHover){startTransition(()=>setIsPaused(true));}};const handleMouseLeave=()=>{if(pauseOnHover){startTransition(()=>setIsPaused(false));}};// Duplicate logos for seamless loop - render 4 sets to ensure smooth looping\nconst duplicatedLogos=[...logos,...logos,...logos,...logos];return /*#__PURE__*/_jsxs(\"div\",{ref:containerRef,style:{position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"hidden\",backgroundColor:\"transparent\",display:\"flex\",alignItems:\"center\"},onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,children:[/*#__PURE__*/_jsx(\"div\",{ref:contentRef,style:{display:\"flex\",alignItems:\"center\",gap:`${spacing}px`,transform:`translateX(-${offset}px)`,willChange:\"transform\"},children:duplicatedLogos.map((logo,index)=>/*#__PURE__*/_jsx(\"div\",{style:{height:\"28px\",display:\"flex\",alignItems:\"center\",flexShrink:0},children:/*#__PURE__*/_jsx(\"img\",{src:logo.image.src,alt:logo.image.alt||`Logo ${index+1}`,style:{height:\"28px\",width:\"auto\",objectFit:\"contain\",display:\"block\",filter:`grayscale(${grayscaleAmount}%)${colorTint!==\"none\"?` sepia(100%) saturate(300%) hue-rotate(${colorTint===\"blue\"?\"180deg\":colorTint===\"green\"?\"90deg\":colorTint===\"red\"?\"0deg\":colorTint===\"purple\"?\"270deg\":\"0deg\"})`:\"\"}`,opacity:logoOpacity,transition:\"all 0.3s ease\"},onMouseEnter:e=>{if(enableHoverEffect){e.currentTarget.style.filter=\"grayscale(0%)\";e.currentTarget.style.opacity=\"1\";}},onMouseLeave:e=>{if(enableHoverEffect){e.currentTarget.style.filter=`grayscale(${grayscaleAmount}%)${colorTint!==\"none\"?` sepia(100%) saturate(300%) hue-rotate(${colorTint===\"blue\"?\"180deg\":colorTint===\"green\"?\"90deg\":colorTint===\"red\"?\"0deg\":colorTint===\"purple\"?\"270deg\":\"0deg\"})`:\"\"}`;e.currentTarget.style.opacity=`${logoOpacity}`;}}})},index))}),fadeEdges&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",left:0,top:0,bottom:0,width:`${fadeWidth}px`,background:`linear-gradient(to right, ${fadeColorLeft}, transparent)`,pointerEvents:\"none\",zIndex:1}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",right:0,top:0,bottom:0,width:`${fadeWidth}px`,background:`linear-gradient(to left, ${fadeColorRight}, transparent)`,pointerEvents:\"none\",zIndex:1}})]})]});}addPropertyControls(LogoTicker,{logos:{type:ControlType.Array,title:\"Logos\",control:{type:ControlType.Object,controls:{image:{type:ControlType.ResponsiveImage,title:\"Logo\"}}},defaultValue:[{image:{src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Logo 1\"}},{image:{src:\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",alt:\"Logo 2\"}},{image:{src:\"https://framerusercontent.com/images/BYnxEV1zjYb9bhWh1IwBZ1ZoS60.jpg\",alt:\"Logo 3\"}},{image:{src:\"https://framerusercontent.com/images/2uTNEj5aTl2K3NJaEFWMbnrA.jpg\",alt:\"Logo 4\"}},{image:{src:\"https://framerusercontent.com/images/f9RiWoNpmlCMqVRIHz8l8wYfeI.jpg\",alt:\"Logo 5\"}}]},speed:{type:ControlType.Number,title:\"Speed\",defaultValue:50,min:10,max:200,step:5,unit:\"px/s\",displayStepper:false},spacing:{type:ControlType.Number,title:\"Spacing\",defaultValue:60,min:20,max:200,step:5,unit:\"px\",displayStepper:false},direction:{type:ControlType.Enum,title:\"Direction\",options:[\"left\",\"right\"],optionTitles:[\"Left\",\"Right\"],defaultValue:\"left\",displaySegmentedControl:true},pauseOnHover:{type:ControlType.Boolean,title:\"Pause on Hover\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"},fadeEdges:{type:ControlType.Boolean,title:\"Edge Fade\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},fadeWidth:{type:ControlType.Number,title:\"Fade Width\",defaultValue:80,min:20,max:200,step:10,unit:\"px\",displayStepper:false,hidden:({fadeEdges})=>!fadeEdges},fadeColorLeft:{type:ControlType.Color,title:\"Left Fade\",defaultValue:\"#FFFFFF\",hidden:({fadeEdges})=>!fadeEdges},fadeColorRight:{type:ControlType.Color,title:\"Right Fade\",defaultValue:\"#FFFFFF\",hidden:({fadeEdges})=>!fadeEdges},grayscaleAmount:{type:ControlType.Number,title:\"Grayscale\",defaultValue:100,min:0,max:100,step:5,unit:\"%\",displayStepper:false},logoOpacity:{type:ControlType.Number,title:\"Opacity\",defaultValue:.6,min:0,max:1,step:.05,displayStepper:false},colorTint:{type:ControlType.Enum,title:\"Color Tint\",options:[\"none\",\"blue\",\"green\",\"red\",\"purple\"],optionTitles:[\"None\",\"Blue\",\"Green\",\"Red\",\"Purple\"],defaultValue:\"none\"},enableHoverEffect:{type:ControlType.Boolean,title:\"Hover Effect\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LogoTicker\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LogoTicker.map"],"mappings":"8PAIG,SAAwB,EAAW,EAAM,CAAC,GAAK,CAAC,QAAM,CAAC,CAAC,MAAM,CAAC,IAAI,sEAAsE,IAAI,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,oEAAoE,IAAI,QAAQ,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