{"version":3,"file":"ProjectTicker.B74KEWRX.mjs","names":["useState","useRef","startTransition"],"sources":["https:/framerusercontent.com/modules/04jNEDJSCOCEOk0z6wU3/7AZhTErURLm4sYL9uyBY/ProjectTicker.js"],"sourcesContent":["// Dual ticker component with song names and corresponding images that change on hover\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useRef,useEffect,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";const PLACEHOLDER_IMAGES=[\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",\"https://framerusercontent.com/images/BYnxEV1zjYb9bhWh1IwBZ1ZoS60.jpg\",\"https://framerusercontent.com/images/2uTNEj5aTl2K3NJaEFWMbnrA.jpg\",\"https://framerusercontent.com/images/f9RiWoNpmlCMqVRIHz8l8wYfeI.jpg\"];const TickerRow=props=>{const{projects,direction,tickerSpeed,tickerGap,tickerFont,tickerColor,tickerHoverColor,hoveredKey,setHoveredKey}=props;const duplicatedProjects=[...projects,...projects,...projects];const tickerRef=useRef(null);const[tickerWidth,setTickerWidth]=useState(0);useEffect(()=>{if(tickerRef.current){const children=Array.from(tickerRef.current.children);let totalWidth=0;for(let i=0;i<projects.length;i++){const child=children[i];if(child){totalWidth+=child.offsetWidth;}}totalWidth+=projects.length*tickerGap;startTransition(()=>setTickerWidth(totalWidth));}},[projects,tickerGap,tickerFont]);return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",overflow:\"hidden\",position:\"relative\",zIndex:2},children:/*#__PURE__*/_jsx(motion.div,{ref:tickerRef,style:{display:\"flex\",gap:tickerGap,width:\"max-content\",position:\"relative\"},initial:{x:direction===\"left\"?0:-tickerWidth},animate:{x:direction===\"left\"?-tickerWidth:0},transition:{duration:tickerSpeed,repeat:Infinity,ease:\"linear\",repeatType:\"loop\"},children:duplicatedProjects.map((project,index)=>{const originalIndex=index%projects.length;const uniqueKey=`${direction}-${index}`;const isHovered=hoveredKey===uniqueKey;return /*#__PURE__*/_jsx(\"div\",{style:{...tickerFont,color:isHovered?tickerHoverColor:tickerColor,whiteSpace:\"nowrap\",userSelect:\"none\",textTransform:\"uppercase\",transition:\"color 0.3s ease\",cursor:\"pointer\",position:\"relative\",zIndex:2},onMouseEnter:()=>{startTransition(()=>setHoveredKey(uniqueKey));},onMouseLeave:()=>startTransition(()=>setHoveredKey(null)),onPointerDown:()=>{startTransition(()=>setHoveredKey(uniqueKey));},onPointerUp:()=>startTransition(()=>setHoveredKey(null)),onPointerCancel:()=>startTransition(()=>setHoveredKey(null)),children:project.name},uniqueKey);})},`ticker-${direction}-${tickerWidth}`)});};/**\n * Dual Ticker with Image Switcher\n *\n * @framerIntrinsicWidth 800\n * @framerIntrinsicHeight 600\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function ProjectTicker(props){const{projects=[{name:\"VARYNX Lite (Free \\xb7 Standalone)\",image:{src:\"https://framerusercontent.com/images/f9RiWoNpmlCMqVRIHz8l8wYfeI.jpg\",alt:\"VARYNX Lite\"}},{name:\"VARYNX 2.0 (Beta \\xb7 Guardian Node)\",image:{src:\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",alt:\"VARYNX 2.0\"}},{name:\"Ecosystem (In Development)\",image:{src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Ecosystem\"}}],tickerSpeed=30,tickerGap=60,tickerFont={},tickerColor=\"#FFFFFF\",tickerHoverColor=\"#FFFFFF\",backgroundColor=\"#000000\",style}=props;const[hoveredKey,setHoveredKey]=useState(null);return /*#__PURE__*/_jsx(\"div\",{style:{...style,width:\"100%\",height:\"100%\",backgroundColor,display:\"flex\",flexDirection:\"column\",overflow:\"hidden\",position:\"relative\"},children:/*#__PURE__*/_jsx(\"div\",{style:{flex:1,display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",padding:\"20px 0\",position:\"relative\",zIndex:2},children:/*#__PURE__*/_jsx(TickerRow,{direction:\"right\",projects:projects,tickerSpeed:tickerSpeed,tickerGap:tickerGap,tickerFont:tickerFont,tickerColor:tickerColor,tickerHoverColor:tickerHoverColor,hoveredKey:hoveredKey,setHoveredKey:setHoveredKey})})});}addPropertyControls(ProjectTicker,{projects:{type:ControlType.Array,title:\"Projects\",description:\"List of projects to display in the ticker.\",control:{type:ControlType.Object,controls:{name:{type:ControlType.String,title:\"Project Name\",defaultValue:\"Project Title\"},image:{type:ControlType.ResponsiveImage,title:\"Image\"}}},defaultValue:[{name:\"VARYNX Lite (Free \\xb7 Standalone)\"},{name:\"VARYNX 2.0 (Beta \\xb7 Guardian Node)\"},{name:\"Ecosystem (In Development)\"}]},tickerSpeed:{type:ControlType.Number,title:\"Speed\",description:\"Duration of one complete loop in seconds.\",defaultValue:30,min:10,max:100,step:5,unit:\"s\"},tickerGap:{type:ControlType.Number,title:\"Gap\",description:\"Horizontal spacing between project names.\",defaultValue:60,min:20,max:200,step:10,unit:\"px\"},tickerFont:{type:ControlType.Font,title:\"Ticker Font\",description:\"Typography settings for the ticker text.\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"16px\",variant:\"Regular\",letterSpacing:\"-0.03em\",lineHeight:\"1em\"}},tickerColor:{type:ControlType.Color,title:\"Ticker Color\",description:\"Color of the text outline.\",defaultValue:\"#FFFFFF\"},tickerHoverColor:{type:ControlType.Color,title:\"Hover Color\",description:\"Color of the text when hovered.\",defaultValue:\"#FFFFFF\"},backgroundColor:{type:ControlType.Color,title:\"Background\",description:\"Background color of the component container.\",defaultValue:\"#000000\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProjectTicker\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"800\",\"framerIntrinsicHeight\":\"600\",\"framerSupportedLayoutH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