{"version":3,"file":"Code_Typer.DF2k1tRH.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/gMuDqyz8yu59jm7MoNhj/Bx9TuXcQ73YY8xGchlYh/GWRfWbnWp.js","https:/framerusercontent.com/modules/8M42Eq0pCopksP014x7g/iGWyVoo7Le4fhUdwYWLc/Code_Typer.js"],"sourcesContent":["// Generated by Framer (6ca5d98)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,cx,motion,useSVGTemplate,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const mask=\"var(--framer-icon-mask)\";const Base=/*#__PURE__*/forwardRef(function(props,ref){return /*#__PURE__*/_jsx(\"svg\",{...props,ref:ref,children:props.children});});const MotionSVG=motion.create(Base);const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(MotionSVG,{...rest,layoutId:layoutId,ref:ref,children:children}):/*#__PURE__*/_jsx(\"svg\",{...rest,ref:ref,children:children});});const svg='<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 10.5 0 L 0 10.5\" fill=\"transparent\" height=\"10.5px\" id=\"dJkACGH8G\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--1335ju, 1.5)\" stroke=\"var(--18mrqx2, rgb(0, 0, 0))\" transform=\"translate(6.75 6.75)\" width=\"10.5px\"/><path d=\"M 0 0 L 10.5 10.5\" fill=\"transparent\" height=\"10.5px\" id=\"pgy_UnrTc\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--1335ju, 1.5)\" stroke=\"var(--18mrqx2, rgb(0, 0, 0))\" transform=\"translate(6.75 6.75)\" width=\"10.5px\"/></svg>';const getProps=({dots,height,id,stroke,width,width1,...props})=>{return{...props,BKVe8Pgvw:dots??props.BKVe8Pgvw??1,fICyAUQY1:stroke??props.fICyAUQY1??\"rgb(0, 0, 0)\",lKf_CQTz5:width1??props.lKf_CQTz5??1.5};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,fICyAUQY1,lKf_CQTz5,BKVe8Pgvw,...restProps}=getProps(props);const href=useSVGTemplate(\"3527454627\",svg);return /*#__PURE__*/_jsx(SVG,{...restProps,className:cx(\"framer-KpKpK\",className),layoutId:layoutId,ref:ref,role:\"presentation\",style:{\"--1335ju\":lKf_CQTz5,\"--18mrqx2\":fICyAUQY1,...style},viewBox:\"0 0 24 24\",children:/*#__PURE__*/_jsx(\"use\",{href:href})});});const css=[`.framer-KpKpK { -webkit-mask: ${mask}; aspect-ratio: 1; display: block; mask: ${mask}; width: 24px; }`];/**\n * This is a generated Framer component.\n * @framerIntrinsicWidth 24\n * @framerIntrinsicHeight 24\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerVariables {\"fICyAUQY1\":\"stroke\",\"lKf_CQTz5\":\"width1\",\"BKVe8Pgvw\":\"dots\"}\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"Close\",\"color\":{\"type\":\"variable\",\"value\":\"18mrqx2\"},\"set\":{\"localId\":\"vectorSet/SuYHhKUZG\",\"id\":\"SuYHhKUZG\",\"moduleId\":\"EqX8thWQjdZcOB1c6p5N\"}}\n * @framerDisableUnlink true\n */const Icon=withCSS(Component,css,\"framer-KpKpK\");Icon.displayName=\"Close\";export default Icon;addPropertyControls(Icon,{fICyAUQY1:{defaultValue:\"rgb(0, 0, 0)\",hidden:false,title:\"Stroke\",type:ControlType.Color},lKf_CQTz5:{defaultValue:1.5,displayStepper:true,hidden:false,max:4,min:0,step:.5,title:\"Width\",type:ControlType.Number},BKVe8Pgvw:{defaultValue:1,displayStepper:true,hidden:true,max:4,min:1,title:\"Dots\",type:ControlType.Number}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerVector\":\"{\\\"name\\\":\\\"Close\\\",\\\"color\\\":{\\\"type\\\":\\\"variable\\\",\\\"value\\\":\\\"18mrqx2\\\"},\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/SuYHhKUZG\\\",\\\"id\\\":\\\"SuYHhKUZG\\\",\\\"moduleId\\\":\\\"EqX8thWQjdZcOB1c6p5N\\\"}}\",\"framerIntrinsicWidth\":\"24\",\"framerDisableUnlink\":\"true\",\"framerImmutableVariables\":\"true\",\"framerVariables\":\"{\\\"fICyAUQY1\\\":\\\"stroke\\\",\\\"lKf_CQTz5\\\":\\\"width1\\\",\\\"BKVe8Pgvw\\\":\\\"dots\\\"}\",\"framerIntrinsicHeight\":\"24\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function AnalogTyping({text,speed=50,startDelay=0,loop=false,loopDelay=800}){const[displayed,setDisplayed]=useState(\"\");const iRef=useRef(0);const timerRef=useRef(null);const cancelledRef=useRef(false);useEffect(()=>{setDisplayed(\"\");iRef.current=0;cancelledRef.current=false;const clearTimer=()=>{if(timerRef.current!==null){window.clearTimeout(timerRef.current);timerRef.current=null;}};const tick=()=>{if(cancelledRef.current)return;if(iRef.current<=text.length){setDisplayed(text.slice(0,iRef.current));iRef.current+=1;timerRef.current=window.setTimeout(tick,speed);}else if(loop){// restart after a pause\ntimerRef.current=window.setTimeout(()=>{iRef.current=0;setDisplayed(\"\");tick();},loopDelay);}};timerRef.current=window.setTimeout(tick,startDelay);return()=>{cancelledRef.current=true;clearTimer();};},[text,speed,startDelay,loop,loopDelay]);return /*#__PURE__*/_jsxs(\"div\",{\"aria-live\":\"polite\",style:{fontFamily:\"monospace\",fontSize:14,color:\"#ffffff\",background:\"black\",padding:\"1em\",borderRadius:6,lineHeight:1.8,textAlign:\"center\",whiteSpace:\"pre-wrap\"},children:[displayed,/*#__PURE__*/_jsx(\"span\",{style:{animation:\"blink 1s step-end infinite\"},children:\"|\"}),/*#__PURE__*/_jsx(\"style\",{children:`\n        @keyframes blink { 50% { opacity: 0; } }\n      `})]});}// ---- Framer Controls (optional) ----\naddPropertyControls(AnalogTyping,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Hello, world.\\nWelcome to Roomance — type, type, type...\",displayTextArea:true},speed:{type:ControlType.Number,title:\"Speed (ms/char)\",defaultValue:50,min:5,max:200,step:5},startDelay:{type:ControlType.Number,title:\"Start Delay (ms)\",defaultValue:0,min:0,max:5e3,step:50},loop:{type:ControlType.Boolean,title:\"Loop (∞)\",defaultValue:false},loopDelay:{type:ControlType.Number,title:\"Loop Delay (ms)\",defaultValue:800,min:0,max:5e3,step:50}})// ---- Example usage (outside Framer) ----\n// <AnalogTyping\n//   text={`Merging the physical and digital worlds.\\nBuilt by Studio.init()`}\n//   speed={40}\n//   startDelay={300}\n//   loop={false}\n// />\n;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AnalogTyping\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Code_Typer.map"],"mappings":"qcAC2C,IAAqF,IAA4B,CAAoC,EAAK,0BAAgC,EAAkB,EAAW,SAAS,EAAM,EAAI,CAAC,OAAoB,EAAK,MAAM,CAAC,GAAG,EAAU,MAAI,SAAS,EAAM,SAAS,CAAC,EAAG,CAAO,EAAU,EAAO,OAAO,EAAK,CAAO,EAAiB,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,WAAS,WAAS,WAAS,GAAG,GAAM,EAAM,OAAO,EAAsB,EAAK,EAAU,CAAC,GAAG,EAAc,WAAa,M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