{"version":3,"file":"ProcessScrollytelling.D_SWxdsn.mjs","names":["useRef","useState","startTransition","p"],"sources":["https:/framerusercontent.com/modules/B8EUScaLIS466NusBbmL/O6ki4qL1oha2LYbRN4E3/ProcessScrollytelling.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useEffect,useRef,useState,startTransition}from\"react\";// Canonical 6-step process — used as the source of truth so the rendered\n// output is correct even if a cached/older instance still holds a stale\n// 5-step array on the canvas.\nconst CANONICAL_STEPS=[{number:\"01\",title:\"Sign the partnership\",description:\"Choose your plan. Sign digitally. Onboarding begins immediately.\"},{number:\"02\",title:\"Submit your briefs\",description:\"Our AI engine suggests content ideas. You pick 10 per shoot day. Or write your own.\"},{number:\"03\",title:\"We film\",description:\"Your dedicated videographer handles everything on location. One day. Ten pieces.\"},{number:\"04\",title:\"We edit\",description:\"Platform-specific cuts. Colour. Sound. Graphics. Delivered in 5 business days.\"},{number:\"05\",title:\"Review and approve\",description:\"Timecoded comments. Two revision rounds. Admin-approved before you see it.\"},{number:\"06\",title:\"Publish\",description:\"AI-generated captions and hashtags. Schedule or publish to your social channels with one click. No social media manager needed.\"}];function resolveSteps(stored){// If the stored array doesn't match the canonical length, fall back.\n// This catches the legacy 5-step instance and any partially populated state.\nif(!stored||stored.length!==CANONICAL_STEPS.length){return CANONICAL_STEPS;}// If any title clearly looks like the legacy \"From brief to delivered\"\n// process and step 6 is missing or empty, prefer canonical.\nconst hasEmpty=stored.some(s=>!s||!s.title||!s.title.trim()||!s.number);if(hasEmpty)return CANONICAL_STEPS;return stored;}/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 1280\n * @framerIntrinsicHeight 2400\n */export default function ProcessScrollytelling(props){const{steps:storedSteps,stepHeightVh,bgColor,textPrimary,textSecondary,textMuted,accentColor,borderColor}=props;const steps=resolveSteps(storedSteps);const isStatic=useIsStaticRenderer();const sectionRef=useRef(null);const[active,setActive]=useState(0);const[progress,setProgress]=useState(0);const[isMobile,setIsMobile]=useState(false);useEffect(()=>{if(typeof window===\"undefined\")return;const mq=window.matchMedia(\"(max-width: 1023px)\");const update=()=>startTransition(()=>setIsMobile(mq.matches));update();mq.addEventListener(\"change\",update);return()=>mq.removeEventListener(\"change\",update);},[]);useEffect(()=>{if(isStatic||typeof window===\"undefined\")return;const onScroll=()=>{const el=sectionRef.current;if(!el)return;const rect=el.getBoundingClientRect();const sectionH=el.offsetHeight;const viewportH=window.innerHeight;const totalScroll=Math.max(1,sectionH-viewportH);const scrolled=-rect.top;const p=Math.max(0,Math.min(1,scrolled/totalScroll));const epsilon=1e-4;const idx=Math.min(steps.length-1,Math.max(0,Math.floor(p*steps.length-epsilon)));startTransition(()=>{setActive(prev=>prev!==idx?idx:prev);setProgress(p);});};onScroll();window.addEventListener(\"scroll\",onScroll,{passive:true});window.addEventListener(\"resize\",onScroll);return()=>{window.removeEventListener(\"scroll\",onScroll);window.removeEventListener(\"resize\",onScroll);};},[isStatic,steps.length]);const totalLabel=String(steps.length).padStart(2,\"0\");return /*#__PURE__*/_jsx(\"div\",{ref:sectionRef,style:{position:\"relative\",width:\"100%\",background:bgColor,boxSizing:\"border-box\",...props.style},children:/*#__PURE__*/_jsx(\"div\",{style:{maxWidth:1280,margin:\"0 auto\",padding:isMobile?\"0 24px\":\"0 80px\",boxSizing:\"border-box\"},children:isMobile?/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:56},children:steps.map((step,i)=>/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:16,paddingTop:32,borderTop:i===0?\"none\":`1px solid ${borderColor}`},children:[/*#__PURE__*/_jsx(\"div\",{style:{fontFamily:\"'Syne', system-ui, sans-serif\",fontWeight:800,fontSize:80,lineHeight:.9,letterSpacing:\"-3px\",color:accentColor},children:step.number}),/*#__PURE__*/_jsx(\"div\",{style:{fontFamily:\"'Syne', system-ui, sans-serif\",fontWeight:700,fontSize:28,lineHeight:\"34px\",letterSpacing:\"-1px\",color:textPrimary},children:step.title}),/*#__PURE__*/_jsx(\"div\",{style:{fontFamily:\"'DM Sans', system-ui, sans-serif\",fontWeight:400,fontSize:16,lineHeight:\"27px\",color:textSecondary,maxWidth:600},children:step.description})]},i))}):/*#__PURE__*/_jsxs(\"div\",{style:{display:\"grid\",gridTemplateColumns:\"1fr 1.4fr\",gap:80,alignItems:\"flex-start\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"sticky\",top:0,height:\"100vh\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",display:\"flex\",flexDirection:\"column\",alignItems:\"flex-start\",gap:20},children:[/*#__PURE__*/_jsxs(\"div\",{style:{fontFamily:\"'Space Mono', ui-monospace, monospace\",fontWeight:700,fontSize:12,letterSpacing:\"3px\",textTransform:\"uppercase\",color:textMuted},children:[\"STEP \",String(active+1).padStart(2,\"0\"),\" OF \",totalLabel]}),/*#__PURE__*/_jsx(NumberRoll,{number:steps[active]?.number||\"\",color:accentColor,isStatic:isStatic}),/*#__PURE__*/_jsx(\"div\",{style:{width:200,height:2,background:borderColor,borderRadius:999,overflow:\"hidden\",marginTop:24},children:/*#__PURE__*/_jsx(\"div\",{style:{width:`${progress*100}%`,height:\"100%\",background:accentColor,transition:isStatic?\"none\":\"width 80ms linear\"}})})]})}),/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexDirection:\"column\"},children:steps.map((step,i)=>{const isActive=i===active;return /*#__PURE__*/_jsxs(\"div\",{style:{minHeight:`${stepHeightVh}vh`,display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",gap:20,opacity:isStatic?1:isActive?1:.25,transform:isStatic?\"translateY(0)\":isActive?\"translateY(0)\":\"translateY(12px)\",transition:\"opacity 500ms ease, transform 500ms cubic-bezier(0.16,1,0.3,1)\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{fontFamily:\"'Syne', system-ui, sans-serif\",fontWeight:700,fontSize:44,lineHeight:\"50px\",letterSpacing:\"-1.5px\",color:textPrimary},children:step.title}),/*#__PURE__*/_jsx(\"div\",{style:{fontFamily:\"'DM Sans', system-ui, sans-serif\",fontWeight:400,fontSize:18,lineHeight:\"31px\",color:textSecondary,maxWidth:560},children:step.description})]},i);})})]})})});}function NumberRoll({number,color,isStatic}){const[displayed,setDisplayed]=useState(number);const[phase,setPhase]=useState(\"in\");useEffect(()=>{if(number===displayed)return;if(isStatic){setDisplayed(number);return;}setPhase(\"out\");const t=window.setTimeout(()=>{startTransition(()=>{setDisplayed(number);setPhase(\"in\");});},200);return()=>window.clearTimeout(t);},[number,displayed,isStatic]);return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",height:168,display:\"flex\",alignItems:\"flex-start\"},children:/*#__PURE__*/_jsx(\"div\",{style:{fontFamily:\"'Syne', system-ui, sans-serif\",fontWeight:800,fontSize:168,lineHeight:1,letterSpacing:\"-6px\",color,opacity:phase===\"in\"?1:0,transform:phase===\"in\"?\"translateY(0)\":\"translateY(-30px)\",transition:isStatic?\"none\":\"opacity 200ms ease, transform 320ms cubic-bezier(0.16,1,0.3,1)\"},children:displayed})});}addPropertyControls(ProcessScrollytelling,{steps:{type:ControlType.Array,title:\"Steps\",control:{type:ControlType.Object,controls:{number:{type:ControlType.String,defaultValue:\"01\"},title:{type:ControlType.String,defaultValue:\"Step title\"},description:{type:ControlType.String,displayTextArea:true,defaultValue:\"\"}}},defaultValue:CANONICAL_STEPS,maxCount:12},stepHeightVh:{type:ControlType.Number,defaultValue:90,min:50,max:150,step:5,unit:\"vh\",title:\"Step Height\"},bgColor:{type:ControlType.Color,defaultValue:\"rgba(0,0,0,0)\",title:\"Background\"},textPrimary:{type:ControlType.Color,defaultValue:\"#0A0A0A\",title:\"Text Primary\"},textSecondary:{type:ControlType.Color,defaultValue:\"#555555\",title:\"Text Secondary\"},textMuted:{type:ControlType.Color,defaultValue:\"#999999\",title:\"Text Muted\"},accentColor:{type:ControlType.Color,defaultValue:\"#E63946\",title:\"Accent\"},borderColor:{type:ControlType.Color,defaultValue:\"#E5E5E5\",title:\"Border\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProcessScrollytelling\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicWidth\":\"1280\",\"framerIntrinsicHeight\":\"2400\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProcessScrollytelling.map"],"mappings":"sNAGm0B,SAAS,EAAa,EAAO,CAIrvB,MAFxG,CAAC,GAAQ,EAAO,SAAS,EAAgB,QAE7B,EAAO,KAAK,GAAG,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,MAAM,EAAE,CAAC,EAAE,OAAO,CAAoB,EAAuB,EAK/G,SAAwB,EAAsB,EAAM,CAAC,GAAK,CAAC,MAAM,EAAY,eAAa,UAAQ,cAAY,gBAAc,YAAU,cAAY,eAAa,EAAY,EAAM,EAAa,EAAY,CAAO,EAAS,GAAqB,CAAO,EAAWA,EAAO,KAAK,CAAM,CAAC,EAAO,GAAWC,EAAS,EAAE,CAAM,CAAC,EAAS,GAAaA,EAAS,EAAE,CAAM,CAAC,EAAS,GAAaA,EAAS,GAAM,CAAC,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,EAAG,EAAO,WAAW,sBAAsB,CAAO,MAAWC,MAAoB,EAAY,EAAG,QAAQ,CAAC,CAA+C,OAA9C,GAAQ,CAAC,EAAG,iBAAiB,SAAS,EAAO,KAAW,EAAG,oBAAoB,SAAS,EAAO,EAAG,EAAE,CAAC,CAAC,MAAc,CAAC,GAAG,GAAiB,IAAS,OAAY,OAAO,IAAM,MAAa,CAAC,IAAM,EAA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