{"version":3,"file":"shared-lib.BVXfCvRU.mjs","names":["useState","useRef","useMemo"],"sources":["https:/framerusercontent.com/modules/rZc3s682Ccs4sJi26YUJ/bK9cBcVQoxOzzh1zjKLJ/TypewriterEffect.js","https:/framerusercontent.com/modules/rpoBylCcTsRC7JbaQ4kS/5N9kTBO5YNAUzidJyEJp/HrfXwPYXZ.js"],"sourcesContent":["// Dynamic Typing Animation Component with Customizable Cursor and Typography\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect,useRef,useMemo,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Dynamic Typing Animation\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function TypewriterEffect(props){const{words=[{word:\"Hello\"},{word:\"World\"},{word:\"Framer\"}],typingSpeed,deletingSpeed,pauseDuration,cursorColor,cursorWidth,cursorHeight,font,fontSize,textColor,loop,style,lineColor,lineThickness,lineSpacing}=props;const[displayed,setDisplayed]=useState(\"\");const[wordIndex,setWordIndex]=useState(0);const[charIndex,setCharIndex]=useState(0);const[isDeleting,setIsDeleting]=useState(false);const[showCursor,setShowCursor]=useState(true);const[completedWords,setCompletedWords]=useState([]);const[isTypingComplete,setIsTypingComplete]=useState(false);const timeoutRef=useRef(null);const blinkRef=useRef(null);const currentWord=words.length>0?words[wordIndex%words.length].word:\"\";// Typing Effect\nuseEffect(()=>{if(timeoutRef.current)clearTimeout(timeoutRef.current);const isLastWord=wordIndex===words.length-1;if(charIndex<currentWord.length){// Typing forward\ntimeoutRef.current=window.setTimeout(()=>{startTransition(()=>{const nextText=currentWord.substring(0,charIndex+1);setDisplayed(nextText);setCharIndex(charIndex+1);});},typingSpeed);}else if(charIndex===currentWord.length&&currentWord.length>0){// Finished typing current word\nif(isLastWord){// Last word is complete - just keep it displayed\nstartTransition(()=>{setIsTypingComplete(true);});return;}// Not the last word - wait then clear and move to next\ntimeoutRef.current=window.setTimeout(()=>{startTransition(()=>{setDisplayed(\"\");setCharIndex(0);setWordIndex(wordIndex+1);});},pauseDuration);}return()=>{if(timeoutRef.current)clearTimeout(timeoutRef.current);};},[charIndex,wordIndex,currentWord,typingSpeed,pauseDuration,words.length]);// Blinking Cursor Effect\nuseEffect(()=>{if(blinkRef.current)clearInterval(blinkRef.current);blinkRef.current=window.setInterval(()=>{startTransition(()=>setShowCursor(v=>!v));},500);return()=>{if(blinkRef.current)clearInterval(blinkRef.current);};},[]);// Font size for cursor height calculation\nconst actualFontSize=useMemo(()=>{return fontSize;},[fontSize]);return /*#__PURE__*/_jsxs(\"div\",{style:{...style,display:\"flex\",flexDirection:\"column\",alignItems:\"flex-start\",width:\"100%\",gap:lineSpacing},children:[/*#__PURE__*/_jsxs(\"span\",{style:{...font,fontSize:fontSize,color:textColor,display:\"inline-flex\",alignItems:\"center\",minWidth:1,minHeight:actualFontSize,width:\"max-content\",height:\"max-content\",whiteSpace:\"pre\"},\"aria-live\":\"polite\",children:[displayed||\"\\xa0\",/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{display:\"inline-block\",background:cursorColor,width:cursorWidth,height:actualFontSize*(cursorHeight/100),marginLeft:2,marginRight:2,verticalAlign:\"bottom\",opacity:showCursor?1:0,transition:\"opacity 0.1s\",borderRadius:2}})]}),/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:lineThickness,backgroundColor:lineColor,marginTop:lineSpacing}})]});}addPropertyControls(TypewriterEffect,{words:{type:ControlType.Array,title:\"Words\",control:{type:ControlType.Object,controls:{word:{type:ControlType.String,defaultValue:\"Hello\"}}},defaultValue:[{word:\"Hello\"},{word:\"World\"},{word:\"Framer\"},{word:\"Motion\"}],maxCount:10},lineSpacing:{type:ControlType.Number,title:\"Line Spacing\",defaultValue:16,min:0,max:100,unit:\"px\",step:1},loop:{type:ControlType.Boolean,title:\"Loop\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\"},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:32,min:8,max:500,unit:\"px\",step:1},typingSpeed:{type:ControlType.Number,title:\"Typing Speed\",defaultValue:100,min:20,max:500,unit:\"ms\",step:5},deletingSpeed:{type:ControlType.Number,title:\"Deleting Speed\",defaultValue:60,min:10,max:500,unit:\"ms\",step:5,hidden:({loop})=>!loop},pauseDuration:{type:ControlType.Number,title:\"Pause Duration\",defaultValue:1e3,min:200,max:3e3,unit:\"ms\",step:50},lineColor:{type:ControlType.Color,title:\"Line Color\",defaultValue:\"#FFFFFF\"},lineThickness:{type:ControlType.Number,title:\"Line Thickness\",defaultValue:2,min:1,max:10,unit:\"px\",step:1},cursorColor:{type:ControlType.Color,title:\"Cursor Color\",defaultValue:\"#FFFFFF\"},cursorWidth:{type:ControlType.Number,title:\"Cursor Width\",defaultValue:2,min:1,max:8,unit:\"px\",step:1},cursorHeight:{type:ControlType.Number,title:\"Cursor Height\",defaultValue:100,min:50,max:120,unit:\"%\",step:1},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",displayFontSize:false,defaultValue:{variant:\"Bold\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"}},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#FFFFFF\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TypewriterEffect\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TypewriterEffect.map","// Generated by Framer (36277c8)\nimport{fontStore}from\"framer\";fontStore.loadFonts([]);export const fonts=[{explicitInter:true,fonts:[]}];export const css=[\".framer-EW5XO .framer-styles-preset-cz9qlf:not(.rich-text-wrapper), .framer-EW5XO .framer-styles-preset-cz9qlf.rich-text-wrapper a {  }\"];export const className=\"framer-EW5XO\";\nexport const __FramerMetadata__ = {\"exports\":{\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"kOAMG,SAAwB,EAAiB,EAAM,CAAC,GAAK,CAAC,QAAM,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,cAAY,gBAAc,gBAAc,cAAY,cAAY,eAAa,OAAK,WAAS,YAAU,OAAK,QAAM,YAAU,gBAAc,eAAa,EAAW,CAAC,EAAU,GAAcA,EAAS,GAAG,CAAM,CAAC,EAAU,GAAcA,EAAS,EAAE,CAAM,CAAC,EAAU,GAAcA,EAAS,EAAE,CAAM,CAAC,EAAW,GAAeA,EAAS,GAAM,CAAM,CAAC,EAAW,GAAeA,EAAS,GAAK,CAAM,CAAC,EAAe,GAAmBA,EAAS,EAAE,CAAC,CAAM,CAAC,EAAiB,GAAqBA,EAAS,GAAM,CAAO,EAAWC,EAAO,KAAK,CAAO,EAASA,EAAO,KAAK,CAAO,EAAY,EAAM,OAAO,EAAE,EAAM,EAAU,EAAM,QAAQ,KAAK,GACvtB,MAAc,CAAI,EAAW,SAAQ,aAAa,EAAW,QAAQ,CAAC,IAAM,EAAW,IAAY,EAAM,OAAO,EAAE,GAAG,EAAU,EAAY,OAC3I,EAAW,QAAQ,EAAO,eAAe,CAAC,MAAoB,CAAqD,EAArC,EAAY,UAAU,EAAE,EAAU,EAAE,CAAuB,CAAC,EAAa,EAAU,EAAE,EAAG,EAAG,EAAY,SAAU,IAAY,EAAY,QAAQ,EAAY,OAAO,EAAE,CACpP,GAAG,EAAW,CACd,MAAoB,CAAC,EAAoB,GAAK,EAAG,CAAC,OAClD,EAAW,QAAQ,EAAO,eAAe,CAAC,MAAoB,CAAC,EAAa,GAAG,CAAC,EAA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