{"version":3,"file":"AiInputField.CDJBvJiu.mjs","names":["useMemo","useState","useRef"],"sources":["https:/framerusercontent.com/modules/HTO41CIHkD7JZSkGUBP5/wKGbT40Wvoog6RVoQFJh/AiInputField.js"],"sourcesContent":["// Modern AI prompt input with animated placeholder typing and rotating prompts. Thick glowing animated gradient border.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect,useRef,startTransition,useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Modern AI Prompt Input Field (v26)\n * @framerIntrinsicWidth 480\n * @framerIntrinsicHeight 72\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function AiInputField(props){const{examplePrompts,backgroundColor,borderRadius,inputFont,inputColor,placeholderFont,placeholderColor,disableInput=true}=props;const prompts=useMemo(()=>examplePrompts?.length>0?examplePrompts:[\"Generate a counter animation to 1,000\",\"Create a bar chart animation for revenue growth\",\"Animate a hook text for the first 3 seconds\",\"Design a simple progress bar animation\"],[examplePrompts]);const[typed,setTyped]=useState(\"\");const[phase,setPhase]=useState(\"typing\");const[promptIdx,setPromptIdx]=useState(0);const[opacity,setOpacity]=useState(1);const typingTimeout=useRef(null);const deletingTimeout=useRef(null);useEffect(()=>{function clearAll(){if(typingTimeout.current)clearTimeout(typingTimeout.current);if(deletingTimeout.current)clearTimeout(deletingTimeout.current);}clearAll();const current=prompts[promptIdx%prompts.length];if(phase===\"typing\"){setOpacity(1);if(typed.length<current.length){typingTimeout.current=window.setTimeout(()=>{setTyped(current.slice(0,typed.length+1));},38);}else{setPhase(\"pausing\");}}if(phase===\"pausing\"){typingTimeout.current=window.setTimeout(()=>{setPhase(\"deleting\");},1300);}else if(phase===\"deleting\"){if(typed.length>0){setOpacity(Math.max(.3,typed.length/current.length));deletingTimeout.current=window.setTimeout(()=>{setTyped(current.slice(0,typed.length-1));},18);}else{setOpacity(0);typingTimeout.current=window.setTimeout(()=>{setPhase(\"typing\");setPromptIdx(i=>(i+1)%prompts.length);},100);}}return clearAll;},[phase,typed,promptIdx,prompts]);// Animated ring state\nconst[pulseStep,setPulseStep]=useState(0);useEffect(()=>{const id=setInterval(()=>{startTransition(()=>setPulseStep(t=>(t+1)%360));},20);return()=>clearInterval(id);},[]);const ringAngle=pulseStep;const[inputValue,setInputValue]=useState(\"\");function handleInputChange(e){startTransition(()=>setInputValue(e.target.value));}function handleKeyDown(e){if(e.key===\"Enter\"&&typeof window!==\"undefined\"){window.location.href=\"https://portal.malloy.sg/\";}}const containerStyle={position:\"relative\",width:\"100%\",minWidth:0,maxWidth:\"100vw\",minHeight:0,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:3,borderRadius};const gradient=`conic-gradient(from ${ringAngle}deg, #FF2E54, #FF9004, #FFD800, #3CE066, #00C2FF, #9D4DFF, #FF2E54)`;const glowStyle={position:\"absolute\",inset:0,borderRadius,zIndex:0,background:gradient,filter:\"blur(12px)\",opacity:.5};const borderStyle={position:\"absolute\",inset:0,borderRadius,zIndex:1,background:gradient};const inputWrapStyle={position:\"relative\",width:\"100%\",zIndex:2,borderRadius:Math.max(0,borderRadius-3),minHeight:0,display:\"flex\",flexDirection:\"row\",alignItems:\"center\",background:backgroundColor,padding:0,overflow:\"hidden\"};const inputStyle={flex:1,background:\"transparent\",border:\"none\",margin:0,outline:\"none\",color:inputColor,...inputFont,fontSize:inputFont?.fontSize||24,minWidth:0,display:\"block\",padding:\"16px 0px 16px 30px\",borderRadius,fontFamily:\"inherit\",fontWeight:inputFont?.fontWeight||500,boxSizing:\"border-box\",letterSpacing:inputFont?.letterSpacing||\"-0.01em\",lineHeight:inputFont?.lineHeight||\"1.4em\",whiteSpace:\"pre-wrap\",overflowWrap:\"break-word\",wordBreak:\"break-word\",textAlign:\"left\",backgroundClip:\"padding-box\",transition:\"background .5s cubic-bezier(.4, .4, .1, 1), box-shadow .4s\",resize:\"none\",pointerEvents:disableInput?\"none\":\"auto\"};const phFontSize=placeholderFont?.fontSize||24;const cssVars={\"--ph-font-size\":typeof phFontSize===\"number\"?`${phFontSize}px`:phFontSize,\"--ph-font-weight\":placeholderFont?.fontWeight||500,\"--ph-line-height\":placeholderFont?.lineHeight||\"1.4em\",\"--ph-letter-spacing\":placeholderFont?.letterSpacing||\"-0.01em\",\"--ph-color\":placeholderColor||\"#9AA2A7\",\"--ph-opacity\":opacity};if(typeof window!==\"undefined\"&&!document.getElementById(\"ai-glow-input-ph\")){const style=document.createElement(\"style\");style.id=\"ai-glow-input-ph\";style.innerHTML=`\n        .ai-glow-input::placeholder { \n            font-size: var(--ph-font-size, 24px)!important;\n            font-weight: var(--ph-font-weight, 500)!important;\n            line-height: var(--ph-line-height, 1.4em)!important;\n            letter-spacing: var(--ph-letter-spacing, -0.01em)!important;\n            color: var(--ph-color, #9AA2A7)!important;\n            opacity: var(--ph-opacity, 1)!important;\n            white-space: pre-wrap!important; \n            word-break: break-word!important; \n            overflow-wrap: break-word!important;\n            transition: opacity 0.15s ease-in-out!important;\n        }\n        `;document.head.appendChild(style);}return /*#__PURE__*/_jsxs(\"div\",{style:containerStyle,children:[/*#__PURE__*/_jsx(\"div\",{style:glowStyle}),/*#__PURE__*/_jsx(\"div\",{style:borderStyle}),/*#__PURE__*/_jsxs(\"div\",{style:inputWrapStyle,children:[/*#__PURE__*/_jsx(\"textarea\",{className:\"ai-glow-input\",style:{...inputStyle,...cssVars},value:inputValue,placeholder:typed,onChange:handleInputChange,onKeyDown:handleKeyDown,\"aria-label\":\"Type your AI prompt\",spellCheck:false,autoComplete:\"off\",rows:2,readOnly:disableInput}),/*#__PURE__*/_jsx(\"div\",{style:{paddingRight:24,paddingLeft:12,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",color:placeholderColor},children:/*#__PURE__*/_jsxs(\"svg\",{width:\"24\",height:\"24\",viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:[/*#__PURE__*/_jsx(\"path\",{d:\"M9.85714 24L7.61905 16.381L0 14.1429L7.61905 11.9048L9.85714 4.28571L12.0952 11.9048L19.7143 14.1429L12.0952 16.381L9.85714 24Z\",fill:\"currentColor\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M19.7143 12L18.5714 8.14286L14.7143 7L18.5714 5.85714L19.7143 2L20.8571 5.85714L24.7143 7L20.8571 8.14286L19.7143 12Z\",fill:\"currentColor\"})]})})]})]});}addPropertyControls(AiInputField,{examplePrompts:{type:ControlType.Array,title:\"Prompts\",control:{type:ControlType.String,placeholder:\"Prompt\"},defaultValue:[\"Generate a counter animation to 1,000\",\"Create a bar chart animation for revenue growth\",\"Animate a hook text for the first 3 seconds\",\"Design a simple progress bar animation\"],maxCount:8},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FAFAFB\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:24,min:0,max:64},inputFont:{type:ControlType.Font,title:\"Input Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:24,lineHeight:\"1.4em\",letterSpacing:\"-0.01em\",variant:\"Medium\"}},inputColor:{type:ControlType.Color,title:\"Input Color\",defaultValue:\"#14161B\"},placeholderFont:{type:ControlType.Font,title:\"Placeholder Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:24,lineHeight:\"1.4em\",letterSpacing:\"-0.01em\",variant:\"Medium\"}},placeholderColor:{type:ControlType.Color,title:\"Placeholder Color\",defaultValue:\"#A9B0B7\"},disableInput:{type:ControlType.Boolean,title:\"Disable Input\",defaultValue:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AiInputField\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"480\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"72\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AiInputField.map"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