{"version":3,"file":"TimelineGrid.CigUthOr.mjs","names":["React.useRef","React.useState","gsap","ScrollTrigger"],"sources":["https:/framerusercontent.com/modules/HcBeT7BsRoWhk6FzGvei/0QOEyTSIbmz0ZzzQdChl/TimelineGrid.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";import gsap from\"gsap\";import{ScrollTrigger}from\"gsap/ScrollTrigger\";gsap.registerPlugin(ScrollTrigger);const MAX_COLUMNS=4;const MOBILE_BREAKPOINT=768;export default function TimelineGrid(props){const{items,header}=props;const sectionRef=React.useRef(null);const cardsRef=React.useRef([]);const wrapperRef=React.useRef(null);const[isMobile,setIsMobile]=React.useState(false);const columns=Math.min(MAX_COLUMNS,Math.max(1,items.length));const rows=Math.max(1,Math.ceil(items.length/MAX_COLUMNS));React.useEffect(()=>{const update=()=>{setIsMobile(window.innerWidth<MOBILE_BREAKPOINT);};update();window.addEventListener(\"resize\",update);return()=>{window.removeEventListener(\"resize\",update);};},[]);React.useLayoutEffect(()=>{if(isMobile)return;const section=sectionRef.current;if(!section)return;const ctx=gsap.context(()=>{const cards=cardsRef.current.filter(Boolean);gsap.set(cards,{opacity:0,y:50,filter:\"blur(7px)\"});const tl=gsap.timeline({scrollTrigger:{trigger:wrapperRef.current,start:\"top top\",end:()=>`+=${rows*window.innerHeight*1.5}`,pin:true,scrub:.5,invalidateOnRefresh:true,pinType:\"transform\"}});cards.forEach((card,index)=>{const rowIndex=Math.floor(index/MAX_COLUMNS);const columnIndex=index%MAX_COLUMNS;const position=rowIndex*1.5+columnIndex*.25;tl.to(card,{opacity:1,y:0,filter:\"blur(0px)\",duration:2,ease:\"power2.out\"},\"<50%\");});},section);return()=>ctx.revert();},[items,rows,isMobile]);const getCardPosition=index=>{const visualIndex=index%MAX_COLUMNS;const positions=[.02,.22,.42,.7];return{top:`${positions[visualIndex]*100}%`,transform:index>0?\"translateY(-50%)\":undefined};};if(isMobile){return /*#__PURE__*/_jsxs(\"section\",{style:{...mobileStyles.section,height:\"100vh\"},children:[/*#__PURE__*/_jsx(\"h2\",{style:mobileStyles.sectionTitle,children:header.title||\"Timeline\"}),header.subtitle&&/*#__PURE__*/_jsx(\"p\",{style:mobileStyles.sectionSubtitle,children:header.subtitle}),/*#__PURE__*/_jsx(\"div\",{style:mobileStyles.timeline,children:items.map((item,index)=>/*#__PURE__*/_jsxs(\"div\",{style:mobileStyles.item,children:[/*#__PURE__*/_jsx(\"div\",{style:{...mobileStyles.line,background:\"#64DCA5\"}}),/*#__PURE__*/_jsx(\"div\",{style:mobileStyles.dot}),/*#__PURE__*/_jsxs(\"div\",{style:mobileStyles.content,children:[/*#__PURE__*/_jsx(\"h3\",{style:mobileStyles.title,children:item.title}),/*#__PURE__*/_jsx(\"p\",{style:mobileStyles.description,children:item.description})]})]},index))})]});}return /*#__PURE__*/_jsx(\"section\",{ref:sectionRef,style:styles.section,children:/*#__PURE__*/_jsxs(\"div\",{ref:wrapperRef,style:styles.wrapper,children:[/*#__PURE__*/_jsx(\"h2\",{style:styles.sectionTitle,children:header.title||\"Timeline\"}),header.subtitle&&/*#__PURE__*/_jsx(\"p\",{style:styles.sectionSubtitle,children:header.subtitle}),/*#__PURE__*/_jsx(\"div\",{style:{...styles.grid,gridTemplateColumns:`repeat(${columns}, minmax(0, 1fr))`},children:items.map((item,index)=>/*#__PURE__*/_jsxs(\"div\",{style:styles.column,children:[/*#__PURE__*/_jsx(\"div\",{style:{...styles.line,background:\"linear-gradient(180deg, #64DCA5 0%, #FFFFFF 100%\"}}),/*#__PURE__*/_jsxs(\"div\",{ref:el=>cardsRef.current[index]=el,style:{...styles.content,...getCardPosition(index)},children:[/*#__PURE__*/_jsx(\"h3\",{style:styles.title,children:item.title}),/*#__PURE__*/_jsx(\"p\",{style:styles.description,children:item.description})]})]},index))})]})});}TimelineGrid.defaultProps={items:[{title:\"Tumbler\",description:\"Multiparameter optimisation in as little as 4 months\"},{title:\"In silico approach\",description:\"Up to 80% timeline reduction versus library-based approaches.\"},{title:\"Library-based engineering\",description:\"12–14 weeks\"},{title:\"Cryo-EM structure determination\",description:\"1–3 weeks, runs in parallel\"}]};const styles={section:{position:\"relative\",width:\"100%\",minHeight:\"100vh\",fontFamily:\"var(--framer-font-family-preview, var(--framer-blockquote-font-family, var(--framer-font-family)))\"},wrapper:{width:\"100%\",maxWidth:\"100%\",height:\"100vh\",boxSizing:\"border-box\"},sectionTitle:{fontSize:48,lineHeight:1.1,fontWeight:400,color:\"#18304A\",paddingTop:120,fontFamily:\"var(--framer-font-family-preview, var(--framer-blockquote-font-family, var(--framer-font-family)))\"},grid:{display:\"grid\",width:\"100%\",height:\"calc(100vh - 160px)\",gap:\"48px\",marginTop:60},column:{position:\"relative\",height:\"100%\",paddingLeft:32},line:{position:\"absolute\",left:0,top:0,bottom:0,width:2},content:{position:\"absolute\",maxWidth:280,opacity:0,willChange:\"transform, opacity, filter\"},title:{margin:0,marginBottom:10,fontSize:22,lineHeight:1.2,fontWeight:700,color:\"#18304A\"},description:{margin:0,fontSize:16,lineHeight:1.5,color:\"#44556A\"},sectionSubtitle:{fontWeight:300,marginTop:10,fontSize:20,fontFamily:\"var(--framer-font-family-preview, var(--framer-blockquote-font-family, var(--framer-font-family)))\"}};const mobileStyles={section:{width:\"100%\",padding:\"80px 24px\",boxSizing:\"border-box\",fontFamily:\"var(--framer-font-family-preview, var(--framer-blockquote-font-family, var(--framer-font-family)))\"},sectionTitle:{fontSize:36,lineHeight:1.1,fontWeight:400,color:\"#18304A\",margin:\"0 0 60px\",fontFamily:\"var(--framer-font-family-preview, var(--framer-blockquote-font-family, var(--framer-font-family)))\"},sectionSubtitle:{fontWeight:300,fontSize:18,marginTop:5,fontFamily:\"var(--framer-font-family-preview, var(--framer-blockquote-font-family, var(--framer-font-family)))\"},timeline:{position:\"relative\"},item:{position:\"relative\",paddingLeft:36,paddingBottom:48,fontFamily:\"var(--framer-font-family-preview, var(--framer-blockquote-font-family, var(--framer-font-family)))\"},line:{position:\"absolute\",left:8,top:0,bottom:0,width:2,background:\"linear-gradient(180deg, #64DCA5 0%, #FFFFFF 100%)\"},dot:{position:\"absolute\",left:0,top:4,width:18,height:18,borderRadius:\"50%\",background:\"#64DCA5\"},content:{maxWidth:\"100%\"},title:{margin:0,marginBottom:10,fontSize:22,lineHeight:1.2,fontWeight:700,color:\"#18304A\"},description:{margin:0,fontSize:16,lineHeight:1.6,color:\"#44556A\"}};addPropertyControls(TimelineGrid,{header:{title:\"Header\",type:ControlType.Object,controls:{title:{type:ControlType.String,title:\"Title\",defaultValue:\"Timeline\"},subtitle:{type:ControlType.String,title:\"Subtitle\",defaultValue:\"\"}}},items:{title:\"Items\",type:ControlType.Array,propertyControl:{type:ControlType.Object,controls:{title:{type:ControlType.String,title:\"Title\"},description:{type:ControlType.String,title:\"Description\",displayTextArea:true}}}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TimelineGrid\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TimelineGrid.map"],"mappings":"qUAAiS,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,QAAM,UAAQ,EAAY,EAAWA,EAAa,KAAK,CAAO,EAASA,EAAa,EAAE,CAAC,CAAO,EAAWA,EAAa,KAAK,CAAM,CAAC,EAAS,GAAaC,EAAe,GAAM,CAAO,EAAQ,KAAK,IAAI,EAAY,KAAK,IAAI,EAAE,EAAM,OAAO,CAAC,CAAO,EAAK,KAAK,IAAI,EAAE,KAAK,KAAK,EAAM,OAAO,EAAY,CAAC,CAAC,MAAoB,CAAC,IAAM,MAAW,CAAC,EAAY,EAAO,WAAW,EAAkB,EAAqD,OAAlD,GAAQ,CAAC,EAAO,iBAAiB,SAAS,EAAO,KAAW,CAAC,EAAO,oBAAoB,SAAS,EAAO,GAAK,EAAE,CAAC,CAAC,MAA0B,CAA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