{"version":3,"file":"ProjectTicker.FxM1cLoc.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/kfoVCjOPgyxXOhxT91mp/kXVdVapZHqPFpZBAl4RH/ProjectTicker.js"],"sourcesContent":["// Dual ticker component with song names and corresponding images that change on hover\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useRef,useEffect}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,setCurrentImage}=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;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:\"transparent\",WebkitTextStroke:isHovered?\"0px transparent\":`2px ${tickerColor}`,whiteSpace:\"nowrap\",userSelect:\"none\",textTransform:\"uppercase\",transition:\"color 0.3s ease, -webkit-text-stroke 0.3s ease\",cursor:\"pointer\",position:\"relative\",zIndex:2},onMouseEnter:()=>{setHoveredKey(uniqueKey);const img=projects[originalIndex].image;setCurrentImage(img?.src?img:{src:PLACEHOLDER_IMAGES[originalIndex%PLACEHOLDER_IMAGES.length],alt:\"Placeholder\"});},onMouseLeave:()=>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 fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ProjectTicker(props){const{projects=[{name:\"Obsiidian\",image:{src:\"https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?q=80&w=600&h=800&auto=format&fit=crop\",alt:\"Obsiidian\"}},{name:\"Nebula\",image:{src:\"https://images.unsplash.com/photo-1634152962476-4b8a00e1915c?q=80&w=600&h=800&auto=format&fit=crop\",alt:\"Nebula\"}},{name:\"Ember\",image:{src:\"https://images.unsplash.com/photo-1550684848-fac1c5b4e853?q=80&w=600&h=800&auto=format&fit=crop\",alt:\"Ember\"}},{name:\"Solstics\",image:{src:\"https://images.unsplash.com/photo-1506744038136-46273834b3fb?q=80&w=600&h=800&auto=format&fit=crop\",alt:\"Solstics\"}},{name:\"Prism\",image:{src:\"https://images.unsplash.com/photo-1494587351196-bbf560c52327?q=80&w=600&h=800&auto=format&fit=crop\",alt:\"Prism\"}}],tickerSpeed=30,tickerGap=60,rowGap=60,showSecondTicker=true,tickerFont,tickerColor=\"#FFFFFF\",tickerHoverColor=\"#FFFFFF\",imageHeight=450,backgroundColor=\"#000000\",style}=props;const[hoveredKey,setHoveredKey]=useState(null);const[currentImage,setCurrentImage]=useState(projects[0]?.image?.src?projects[0].image:{src:PLACEHOLDER_IMAGES[0],alt:\"Placeholder\"});return /*#__PURE__*/_jsxs(\"div\",{style:{...style,width:\"100%\",height:\"100%\",backgroundColor,display:\"flex\",flexDirection:\"column\",overflow:\"hidden\",position:\"relative\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:\"50%\",left:\"50%\",transform:\"translate(-50%, -50%)\",height:imageHeight,width:\"auto\",maxWidth:\"90%\",overflow:\"hidden\",borderRadius:8,boxShadow:\"0 4px 20px rgba(0,0,0,0.2)\",opacity:hoveredKey?1:0,transition:\"opacity 0.3s ease\",zIndex:1,pointerEvents:\"none\"},children:/*#__PURE__*/_jsx(motion.img,{src:currentImage.src,alt:currentImage.alt,initial:{scale:1},animate:{scale:hoveredKey?1.05:1},transition:{duration:.8,ease:\"easeOut\"},style:{height:\"100%\",width:\"auto\",objectFit:\"cover\"}},currentImage.src)}),/*#__PURE__*/_jsxs(\"div\",{style:{flex:1,display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",gap:rowGap,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,setCurrentImage:setCurrentImage}),showSecondTicker&&/*#__PURE__*/_jsx(TickerRow,{direction:\"left\",projects:projects,tickerSpeed:tickerSpeed,tickerGap:tickerGap,tickerFont:tickerFont,tickerColor:tickerColor,tickerHoverColor:tickerHoverColor,hoveredKey:hoveredKey,setHoveredKey:setHoveredKey,setCurrentImage:setCurrentImage})]})]});}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:\"Obsiidian\",image:{src:\"https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?q=80&w=600&h=800&auto=format&fit=crop\",alt:\"Obsiidian\"}},{name:\"Nebula\",image:{src:\"https://images.unsplash.com/photo-1634152962476-4b8a00e1915c?q=80&w=600&h=800&auto=format&fit=crop\",alt:\"Nebula\"}},{name:\"Ember\",image:{src:\"https://images.unsplash.com/photo-1550684848-fac1c5b4e853?q=80&w=600&h=800&auto=format&fit=crop\",alt:\"Ember\"}},{name:\"Solstics\",image:{src:\"https://images.unsplash.com/photo-1506744038136-46273834b3fb?q=80&w=600&h=800&auto=format&fit=crop\",alt:\"Solstics\"}},{name:\"Prism\",image:{src:\"https://images.unsplash.com/photo-1494587351196-bbf560c52327?q=80&w=600&h=800&auto=format&fit=crop\",alt:\"Prism\"}}]},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\"},rowGap:{type:ControlType.Number,title:\"Row Gap\",description:\"Vertical spacing between the two ticker rows.\",defaultValue:60,min:0,max:200,step:10,unit:\"px\"},showSecondTicker:{type:ControlType.Boolean,title:\"Second Row\",description:\"Toggle visibility of the second ticker row.\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},tickerFont:{type:ControlType.Font,title:\"Ticker Font\",description:\"Typography settings for the ticker text.\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"100px\",variant:\"Black\",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\"},imageHeight:{type:ControlType.Number,title:\"Image Height\",description:\"Height of the revealed project image.\",defaultValue:450,min:100,max:600,step:10,unit:\"px\"},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\":{\"framerIntrinsicWidth\":\"800\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicHeight\":\"600\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProjectTicker.map"],"mappings":"2OASG,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,WAAS,CAAC,CAAC,KAAK,YAAY,MAAM,CAAC,IAAI,qGAAqG,IAAI,YAAY,CAAC,CAAC,CAAC,KAAK,SAAS,MAAM,CAAC,IAAI,qGAAqG,IAAI,SAAS,CAAC,CAAC,CAAC,KAAK,QAAQ,MAAM,CAAC,IAAI,kGAAkG,IAAI,QAAQ,CAAC,CAAC,CAAC,KAAK,WAAW,MAAM,CAAC,IAAI,qGAAqG,IAAI,WAAW,CAAC,CAAC,CAAC,KAAK,QAAQ,MAAM,CAAC,IAAI,qGAAqG,IAAI,QAAQ,CAAC,CAAC,CAAC,cAAY,GAAG,YAAU,GAAG,SAAO,GAAG,mBAAiB,GAAK,aAAW,cAAY,UAAU,mBAAiB,UAAU,cAAY,IAAI,kBAAgB,UAAU,SAAO,EAAW,CAAC,EAAW,GAAeA,EAAS,KAAK,CAAM,CAAC,EAAa,GAAiBA,EAAS,EAAS,IAAI,OAAO,IAAI,EAAS,GAAG,MAAM,CAAC,IAAI,EAAmB,GAAG,IAAI,cAAc,CAAC,CAAC,OAAoB,EAAM,MAAM,CAAC,MAAM,C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