{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/0JY360msZmziqo9LRHq7/c42GRT2sIybgviDZub4V/Typewriter.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function Typewriter(props){const[text,setText]=useState(\"\");const[wordIndex,setWordIndex]=useState(0);const[isDeleting,setIsDeleting]=useState(false);const words=props.content.split(\",\").map(word=>word.trim());const longestWord=words.reduce((max,word)=>word.length>max.length?word:max,words[0]);// Calculate responsive font sizes based on the base font size\nconst getFontStyles=baseFontProps=>{const{fontSize,...otherFontProps}=baseFontProps;return{mobile:{...otherFontProps,fontSize:Math.round(fontSize*.267),lineHeight:1.4,minHeight:`${Math.round(fontSize*.267*1.4)}px`},bigMobile:{...otherFontProps,fontSize:Math.round(fontSize*.333),lineHeight:1.4,minHeight:`${Math.round(fontSize*.333*1.4)}px`},tablet:{...otherFontProps,fontSize:Math.round(fontSize*.4),lineHeight:1.4,minHeight:`${Math.round(fontSize*.4*1.4)}px`},desktop:{...otherFontProps,fontSize:Math.round(fontSize*.467),lineHeight:1.4,minHeight:`${Math.round(fontSize*.467*1.4)}px`},largeDesktop:{...otherFontProps,fontSize:fontSize,lineHeight:1.1,minHeight:`${Math.round(fontSize*1.1)}px`}};};const fontStyles=getFontStyles(props.font);useEffect(()=>{const currentWord=words[wordIndex];const typeSpeed=isDeleting?props.deleteSpeed:props.typeSpeed;if(!isDeleting&&text===currentWord){const timeout=setTimeout(()=>{setIsDeleting(true);},props.delayBeforeDelete);return()=>clearTimeout(timeout);}if(isDeleting&&text===\"\"){setIsDeleting(false);setWordIndex(prev=>(prev+1)%words.length);return;}const timeout=setTimeout(()=>{setText(prev=>{if(isDeleting){return prev.slice(0,-1);}return currentWord.slice(0,prev.length+1);});},typeSpeed);return()=>clearTimeout(timeout);},[text,isDeleting,wordIndex,words,props.typeSpeed,props.deleteSpeed,props.delayBeforeDelete]);return /*#__PURE__*/_jsxs(motion.div,{style:{color:props.textColor,display:\"flex\",alignItems:\"center\",...fontStyles.largeDesktop,\"@media (max-width: 400px)\":{...fontStyles.mobile},\"@media (min-width: 401px) and (max-width: 720px)\":{...fontStyles.bigMobile},\"@media (min-width: 721px) and (max-width: 960px)\":{...fontStyles.tablet},\"@media (min-width: 961px) and (max-width: 1440px)\":{...fontStyles.desktop},\"@media (min-width: 1441px)\":{...fontStyles.largeDesktop}},children:[/*#__PURE__*/_jsx(\"span\",{style:{visibility:text?\"visible\":\"hidden\"},children:text||longestWord}),/*#__PURE__*/_jsx(motion.span,{animate:{opacity:[1,1,0,0],transition:{times:[0,.5,.5,1],repeat:Infinity,duration:isDeleting?.25:.75}},children:\"|\"})]});}Typewriter.defaultProps={content:\"Hello, World, Type, Writer, Effect\",typeSpeed:100,deleteSpeed:50,delayBeforeDelete:1500,textColor:\"#000000\",font:{family:\"Archivo\",weight:600,fontSize:60,letterSpacing:0}};addPropertyControls(Typewriter,{content:{type:ControlType.String,title:\"Words (comma-separated)\",description:\"Separate words with commas: word1, word2, word3\"},typeSpeed:{type:ControlType.Number,title:\"Type Speed (ms)\",defaultValue:100,min:10,max:500,step:10},deleteSpeed:{type:ControlType.Number,title:\"Delete Speed (ms)\",defaultValue:50,min:10,max:500,step:10},delayBeforeDelete:{type:ControlType.Number,title:\"Pause Before Delete (ms)\",defaultValue:1500,min:0,max:5e3,step:100},textColor:{type:ControlType.Color,title:\"Text Color\"},font:{type:ControlType.Font,title:\"Font Settings\",controls:\"extended\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Typewriter\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n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IAAI,YAAY,GAAG,kBAAkB,KAAK,UAAU,UAAU,KAAK,CAAC,OAAO,UAAU,OAAO,IAAI,SAAS,GAAG,cAAc,CAAC,CAAC,EAAEwB,EAAoBxB,EAAW,CAAC,QAAQ,CAAC,KAAKyB,EAAY,OAAO,MAAM,0BAA0B,YAAY,iDAAiD,EAAE,UAAU,CAAC,KAAKA,EAAY,OAAO,MAAM,kBAAkB,aAAa,IAAI,IAAI,GAAG,IAAI,IAAI,KAAK,EAAE,EAAE,YAAY,CAAC,KAAKA,EAAY,OAAO,MAAM,oBAAoB,aAAa,GAAG,IAAI,GAAG,IAAI,IAAI,KAAK,EAAE,EAAE,kBAAkB,CAAC,KAAKA,EAAY,OAAO,MAAM,2BAA2B,aAAa,KAAK,IAAI,EAAE,IAAI,IAAI,KAAK,GAAG,EAAE,UAAU,CAAC,KAAKA,EAAY,MAAM,MAAM,YAAY,EAAE,KAAK,CAAC,KAAKA,EAAY,KAAK,MAAM,gBAAgB,SAAS,UAAU,CAAC,CAAC",
  "names": ["Typewriter", "props", "text", "setText", "ye", "wordIndex", "setWordIndex", "isDeleting", "setIsDeleting", "words", "word", "longestWord", "max", "fontStyles", "baseFontProps", "fontSize", "otherFontProps", "ue", "currentWord", "typeSpeed", "timeout", "prev", "u", "motion", "addPropertyControls", "ControlType"]
}
