{"version":3,"file":"AnimatedHeader.SY4vfelK.mjs","names":["React.useMemo","React.useState"],"sources":["https:/framerusercontent.com/modules/divxwxKZZxGnev6okJGX/Exi9KyvNTybnlPL0vvNb/AnimatedHeader.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{AnimatePresence,motion,useReducedMotion}from\"framer-motion\";export default function RotatingHeadline({prefix=\"Create A Printed Book About\",words=\"Mom,Mum,Dad,Grandma,Grandpa\",intervalMs=3200,color=\"#30A766\",fontSize=40,driftPx=8,transitionMs=320}){const reduced=useReducedMotion();const list=React.useMemo(()=>words.split(\",\").map(w=>w.trim()).filter(Boolean),[words]);const[i,setI]=React.useState(0);React.useEffect(()=>{if(list.length<=1)return;const id=setInterval(()=>setI(v=>(v+1)%list.length),Math.max(1200,intervalMs));return()=>clearInterval(id);},[list.length,intervalMs]);const word=list[i]??\"\";return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",alignItems:\"center\",textAlign:\"center\",width:\"100%\",margin:\"0 auto\",fontFamily:\"Sentient, ui-serif, Georgia, Cambria, 'Times New Roman', serif\",fontWeight:500,fontSize,lineHeight:1.1},children:[/*#__PURE__*/_jsx(\"span\",{children:prefix}),/*#__PURE__*/_jsx(\"span\",{style:{height:\"1.25em\",display:\"inline-flex\",alignItems:\"baseline\",justifyContent:\"center\",color,whiteSpace:\"nowrap\"},children:/*#__PURE__*/_jsx(AnimatePresence,{mode:\"wait\",initial:false,children:/*#__PURE__*/_jsx(motion.span,{initial:reduced?{opacity:1,y:0}:{opacity:0,y:driftPx},animate:{opacity:1,y:0},exit:reduced?{opacity:1,y:0}:{opacity:0,y:-driftPx},transition:{duration:transitionMs/1e3,ease:\"easeOut\"},style:{display:\"inline-block\",fontStyle:\"italic\",fontWeight:500},children:word},word)})})]});}addPropertyControls(RotatingHeadline,{prefix:{type:ControlType.String,title:\"Prefix\"},words:{type:ControlType.String,title:\"Words\"},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:40,min:16,step:1},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#30A766\"},intervalMs:{type:ControlType.Number,title:\"Interval (ms)\",defaultValue:3200,min:1200,step:100},driftPx:{type:ControlType.Number,title:\"Drift (px)\",defaultValue:8,min:0,max:20,step:1},transitionMs:{type:ControlType.Number,title:\"Transition (ms)\",defaultValue:320,min:120,max:900,step:10}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RotatingHeadline\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AnimatedHeader.map"],"mappings":"8PAA4M,SAAwB,EAAiB,CAAC,SAAO,8BAA8B,QAAM,8BAA8B,aAAW,KAAK,QAAM,UAAU,WAAS,GAAG,UAAQ,EAAE,eAAa,KAAK,CAAC,IAAM,EAAQ,GAAkB,CAAO,EAAKA,MAAkB,EAAM,MAAM,IAAI,CAAC,IAAI,GAAG,EAAE,MAAM,CAAC,CAAC,OAAO,QAAQ,CAAC,CAAC,EAAM,CAAC,CAAM,CAAC,EAAE,GAAMC,EAAe,EAAE,CAAC,MAAoB,CAAC,GAAG,EAAK,QAAQ,EAAE,OAAO,IAAM,EAAG,gBAAgB,EAAK,IAAI,EAAE,GAAG,EAAK,OAAO,CAAC,KAAK,IAAI,KAAK,EAAW,CAAC,CAAC,UAAU,cAAc,EAAG,EAAG,CAAC,EAAK,OAAO,EAAW,CAAC,CAAC,IAAM,EAAK,EAAK,IAAI,GAAG,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,OAAO,cAAc,SAAS,WAAW,SAAS,UAAU,SAAS,MAAM,OAAO,OAAO,SAAS,WAAW,iEAAiE,WAAW,IAAI,WAAS,WAAW,IAAI,CAAC,SAAS,CAAc,EAAK,OAAO,CAAC,SAAS,EAAO,CAAC,CAA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