{"version":3,"file":"TerminalDemo.p7WPDGrK.mjs","names":["useRef","useState","useMemo"],"sources":["https:/framerusercontent.com/modules/yR0l7M55XXhx84eoBLFr/d2dzVs35avIWz2MDMtpE/TerminalDemo.js"],"sourcesContent":["// TerminalDemo component with typing animation effects for command-line interfaces\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion,useInView}from\"framer-motion\";import{useEffect,useState,startTransition,useRef,useMemo}from\"react\";// Predefined color themes\nconst THEMES={default:{backgroundColor:\"#000000\",textColor:\"#FFFFFF\",borderColor:\"#333333\"},dracula:{backgroundColor:\"#282a36\",textColor:\"#f8f8f2\",borderColor:\"#44475a\"},monokai:{backgroundColor:\"#272822\",textColor:\"#f8f8f2\",borderColor:\"#49483e\"},solarizedDark:{backgroundColor:\"#002b36\",textColor:\"#839496\",borderColor:\"#073642\"},solarizedLight:{backgroundColor:\"#fdf6e3\",textColor:\"#657b83\",borderColor:\"#eee8d5\"},nord:{backgroundColor:\"#2e3440\",textColor:\"#d8dee9\",borderColor:\"#3b4252\"},oneDark:{backgroundColor:\"#282c34\",textColor:\"#abb2bf\",borderColor:\"#3e4451\"},githubLight:{backgroundColor:\"#ffffff\",textColor:\"#24292e\",borderColor:\"#e1e4e8\"},atomLight:{backgroundColor:\"#fafafa\",textColor:\"#383a42\",borderColor:\"#e5e5e6\"},custom:{backgroundColor:\"#000000\",textColor:\"#FFFFFF\",borderColor:\"#333333\"}};/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function TerminalDemo(props){const{lines,theme,customBackgroundColor,customTextColor,customBorderColor,borderRadius,maxHeight,typingSpeed,font,style}=props;// Determine colors based on theme\nconst backgroundColor=theme===\"custom\"?customBackgroundColor:THEMES[theme].backgroundColor;const textColor=theme===\"custom\"?customTextColor:THEMES[theme].textColor;const borderColor=theme===\"custom\"?customBorderColor:THEMES[theme].borderColor;const containerRef=useRef(null);const isInView=useInView(containerRef,{once:false,amount:.3});const isStatic=useIsStaticRenderer();return /*#__PURE__*/_jsxs(\"div\",{ref:containerRef,style:{...style,position:\"relative\",width:\"100%\",height:\"100%\",maxHeight:`${maxHeight}px`,borderRadius:`${borderRadius}px`,border:`1px solid ${borderColor}`,backgroundColor,overflow:\"hidden\",display:\"flex\",flexDirection:\"column\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:8,borderBottom:`1px solid ${borderColor}`,padding:16},children:/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",gap:8},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:8,height:8,borderRadius:\"50%\",backgroundColor:\"#EF4444\"}}),/*#__PURE__*/_jsx(\"div\",{style:{width:8,height:8,borderRadius:\"50%\",backgroundColor:\"#EAB308\"}}),/*#__PURE__*/_jsx(\"div\",{style:{width:8,height:8,borderRadius:\"50%\",backgroundColor:\"#22C55E\"}})]})}),/*#__PURE__*/_jsx(\"pre\",{style:{padding:16,margin:0,overflow:\"auto\",flex:1},children:/*#__PURE__*/_jsx(\"code\",{style:{display:\"grid\",gap:4,...font,color:textColor},children:lines.map((line,index)=>line.isTyping?/*#__PURE__*/_jsx(TypingLine,{text:line.text,color:line.color,delay:line.delay,duration:typingSpeed,font:font,isInView:isInView,isStatic:isStatic},index):/*#__PURE__*/_jsx(AnimatedLine,{text:line.text,color:line.color,delay:line.delay,font:font,isInView:isInView,isStatic:isStatic},index))})})]});}function TypingLine({text,color,delay,duration,font,isInView,isStatic}){const[displayedText,setDisplayedText]=useState(\"\");const[started,setStarted]=useState(false);// Show full text in static renderer\nuseEffect(()=>{if(isStatic){setDisplayedText(text);setStarted(true);}},[isStatic,text]);useEffect(()=>{if(isStatic||!isInView)return;const startTimeout=setTimeout(()=>{startTransition(()=>setStarted(true));},delay);return()=>clearTimeout(startTimeout);},[delay,isInView,isStatic]);useEffect(()=>{if(isStatic||!started||!isInView)return;let i=0;const typingEffect=setInterval(()=>{if(i<text.length){startTransition(()=>setDisplayedText(text.substring(0,i+1)));i++;}else{clearInterval(typingEffect);}},duration);return()=>{clearInterval(typingEffect);};},[text,duration,started,isInView,isStatic]);return /*#__PURE__*/_jsx(\"span\",{style:{...font,color,whiteSpace:\"pre-wrap\"},children:displayedText});}function AnimatedLine({text,color,delay,font,isInView,isStatic}){const animationProps=useMemo(()=>isStatic?{}:{initial:{opacity:0,y:-5},animate:isInView?{opacity:1,y:0}:{opacity:0,y:-5},transition:{duration:.3,delay:delay/1e3}},[isStatic,isInView,delay]);return /*#__PURE__*/_jsx(motion.div,{...animationProps,style:{display:\"grid\",...font},children:/*#__PURE__*/_jsx(\"span\",{style:{color,whiteSpace:\"pre-wrap\"},children:text})});}addPropertyControls(TerminalDemo,{lines:{type:ControlType.Array,title:\"Lines\",description:\"Configure each line of terminal output with custom text, color, delay, and typing effect\",control:{type:ControlType.Object,controls:{text:{type:ControlType.String,title:\"Text\",description:\"The text content to display on this line\",defaultValue:\"> command\",displayTextArea:true},color:{type:ControlType.Color,title:\"Color\",description:\"Text color for this line\",defaultValue:\"#FFFFFF\"},delay:{type:ControlType.Number,title:\"Delay (ms)\",description:\"Time in milliseconds before this line appears\",defaultValue:0,min:0,max:1e4,step:100},isTyping:{type:ControlType.Boolean,title:\"Typing Effect\",description:\"Enable character-by-character typing animation for this line\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\"}}},defaultValue:[{text:\"> pnpm run dev\",color:\"#9CA3AF\",delay:0,isTyping:true},{text:\"✔ Starting development server...\",color:\"#22C55E\",delay:1500,isTyping:false},{text:\"✔ Compiling Framer component bundle...\",color:\"#22C55E\",delay:2e3,isTyping:false},{text:\"✔ Loading Tailwind configuration...\",color:\"#22C55E\",delay:2500,isTyping:false},{text:\"✔ Building interactive preview...\",color:\"#22C55E\",delay:3e3,isTyping:false},{text:\"[info] Live reload enabled.\",color:\"#60A5FA\",delay:3500,isTyping:false},{text:\"[info] Detected Framer components:\",color:\"#60A5FA\",delay:4e3,isTyping:false},{text:\"      ButtonGlow, PixelGrid, NeonHeader\",color:\"#FACC15\",delay:4200,isTyping:false},{text:\"[info] Watching for file changes...\",color:\"#60A5FA\",delay:4500,isTyping:false},{text:\"✅ Build successful in 2.8s\",color:\"#4ADE80\",delay:5e3,isTyping:false},{text:\"Local:   http://localhost:3000\",color:\"#D1D5DB\",delay:5500,isTyping:false},{text:\"Network: http://192.168.0.21:3000\",color:\"#D1D5DB\",delay:6e3,isTyping:false},{text:\"> tip: press ⌘ + R in Framer to refresh preview\",color:\"#A78BFA\",delay:6500,isTyping:false}]},theme:{type:ControlType.Enum,title:\"Theme\",description:\"Choose a predefined color theme or select 'custom' to define your own colors\",options:Object.keys(THEMES),defaultValue:\"default\"},customBackgroundColor:{type:ControlType.Color,title:\"Custom Background\",description:\"Background color when using custom theme\",hidden:props=>props.theme!==\"custom\",defaultValue:\"#000000\"},customTextColor:{type:ControlType.Color,title:\"Custom Text\",description:\"Default text color when using custom theme\",hidden:props=>props.theme!==\"custom\",defaultValue:\"#FFFFFF\"},customBorderColor:{type:ControlType.Color,title:\"Custom Border\",description:\"Border and divider color when using custom theme\",hidden:props=>props.theme!==\"custom\",defaultValue:\"#333333\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",description:\"Roundness of the terminal window corners\",defaultValue:12,min:0,max:32,step:1,unit:\"px\"},maxHeight:{type:ControlType.Number,title:\"Max Height\",description:\"Maximum height of the terminal window\",defaultValue:400,min:200,max:800,step:10,unit:\"px\"},typingSpeed:{type:ControlType.Number,title:\"Typing Speed\",description:\"Speed of the typing animation in milliseconds per character\",defaultValue:60,min:20,max:200,step:10,unit:\"ms\"},font:{type:ControlType.Font,title:\"Font\",description:\"Font styling for all terminal text\",controls:\"extended\",defaultFontType:\"monospace\",defaultValue:{fontSize:\"14px\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TerminalDemo\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TerminalDemo.map"],"mappings":"4QAKG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,QAAM,QAAM,wBAAsB,kBAAgB,oBAAkB,eAAa,YAAU,cAAY,OAAK,SAAO,EAClK,EAAgB,IAAQ,SAAS,EAAsB,EAAO,GAAO,gBAAsB,EAAU,IAAQ,SAAS,EAAgB,EAAO,GAAO,UAAgB,EAAY,IAAQ,SAAS,EAAkB,EAAO,GAAO,YAAkB,EAAaA,EAAO,KAAK,CAAO,EAAS,EAAU,EAAa,CAAC,KAAK,GAAM,OAAO,GAAG,CAAC,CAAO,EAAS,GAAqB,CAAC,OAAoB,EAAM,MAAM,CAAC,IAAI,EAAa,MAAM,CAAC,GAAG,EAAM,SAAS,WAAW,MAAM,OAAO,OAAO,OAAO,UAAU,GAAG,EAAU,IAAI,aAAa,GAAG,EAAa,IAAI,OAAO,aAAa,IAAc,kBAAgB,SAAS,SAAS,QAAQ,OAAO,cAAc,SAAS,CAAC,SAAS,CAAc,EAAK,MAAM,CAAC,MAAM,CAAC,QAAQ,OAAO,cAAc,SAAS,IAAI,EAAE,aAAa,aAAa,IAAc,QAAQ,GAAG,CAAC,SAAsB,EAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,OAAO,IAAI,EAAE,CAAC,SAAS,CAAc,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,aAAa,MAAM,gBAAgB,UAAU,CAAC,CAAC,CAAc,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,aAAa,MAAM,gBAAgB,UAAU,CAAC,CAAC,CAAc,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO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