{"version":3,"file":"Typewriter.BDGukoMP.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/hPYE8ROyAqr6NYwfXKu3/sjMtX6D4O3M0RllFEjTp/Typewriter.js"],"sourcesContent":["// Typewriter effect component that simulates text being written in real-time\n// with controls for content, font, color, and typing speed\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function Typewriter(props){const{text=\"Hello, World!\",fadeDuration=250,revealOnHover=false,font,textColor,showCursor=true,cursorColor}=props;const[displayedText,setDisplayedText]=useState(\"\");const[isHovered,setIsHovered]=useState(false);const isStatic=useIsStaticRenderer();useEffect(()=>{startTransition(()=>{setDisplayedText(text);});},[text]);return /*#__PURE__*/_jsx(\"div\",{style:{...props.style,position:\"relative\",display:\"inline-block\",width:\"max-content\"},onMouseEnter:isStatic?undefined:()=>{startTransition(()=>setIsHovered(true));},onMouseLeave:isStatic?undefined:()=>{startTransition(()=>setIsHovered(false));},children:/*#__PURE__*/_jsxs(\"span\",{style:{...font,color:textColor,whiteSpace:\"pre-wrap\",wordBreak:\"break-word\",opacity:isStatic?1:revealOnHover?isHovered?1:0:1,transition:isStatic||!revealOnHover?\"none\":`opacity ${fadeDuration}ms ease`},children:[displayedText,showCursor&&/*#__PURE__*/_jsx(\"span\",{style:{color:cursorColor,marginLeft:\"2px\"},children:\"|\"})]})});}addPropertyControls(Typewriter,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Hello, World!\",displayTextArea:true},revealOnHover:{type:ControlType.Boolean,title:\"Reveal On Hover\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\"},fadeDuration:{type:ControlType.Number,title:\"Fade\",defaultValue:250,min:0,max:2e3,step:10,unit:\"ms\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"32px\",variant:\"Semibold\",letterSpacing:\"-0.03em\",lineHeight:\"1.2em\"}},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},showCursor:{type:ControlType.Boolean,title:\"Show Cursor\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},cursorColor:{type:ControlType.Color,title:\"Cursor Color\",defaultValue:\"#000000\",hidden:({showCursor})=>!showCursor}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Typewriter\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Typewriter.map"],"mappings":"uMAKG,SAAwB,EAAW,EAAM,CAAC,GAAK,CAAC,OAAK,gBAAgB,eAAa,IAAI,gBAAc,GAAM,OAAK,YAAU,aAAW,GAAK,eAAa,EAAW,CAAC,EAAc,GAAkBA,EAAS,GAAG,CAAM,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAO,EAAS,GAAqB,CAAyE,OAAxE,MAAc,CAAC,MAAoB,CAAC,EAAiB,EAAK,EAAG,EAAG,CAAC,EAAK,CAAC,CAAqB,EAAK,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,MAAM,SAAS,WAAW,QAAQ,eAAe,MAAM,cAAc,CAAC,aAAa,EAAS,IAAA,OAAc,CAAC,MAAoB,EAAa,GAAK,CAAC,EAAG,aAAa,EAAS,IAAA,OAAc,CAAC,MAAoB,EAAa,GAAM,CAAC,EAAG,SAAsB,EAAM,OAAO,CAAC,MAAM,CAAC,GAAG,EAAK,MAAM,EAAU,WAAW,WAAW,UAAU,aAAa,QAAQ,EAAS,EAAE,EAAc,EAAU,EAAE,EAAE,EAAE,WAAW,GAAU,CAAC,EAAc,OAAO,WAAW,EAAa,SAAS,CAAC,SAAS,CAAC,EAAc,GAAyB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