{"version":3,"file":"TextGlowH1.CLujfgl3.mjs","names":["useRef","useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/zrUoPaVRT6d8DjracPew/FiODsx10SKMiDtllWrLa/TextGlowH1.js"],"sourcesContent":["// Glow effect on text with customizable color, intensity, and animation — renders as <h1> for SEO\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useState,useEffect,useLayoutEffect,useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function TextGlowH1(props){const{text=\"Glow Text\",textColor=\"#FFFFFF\",glowColor=\"#0099FF\",glowIntensity=1,glowSize=20,animate=true,animationSpeed=2,fontSize=88,style,textAlign}=props;const containerRef=useRef(null);// Start at fontSize prop; useLayoutEffect adjusts before first paint based on actual container width\nconst[computedSize,setComputedSize]=useState(fontSize);const calcSize=containerWidth=>Math.min(fontSize,Math.max(20,Math.round(containerWidth*.073)));// Fires synchronously after DOM layout, before browser paint — no flash\nuseLayoutEffect(()=>{if(!containerRef.current)return;const w=containerRef.current.offsetWidth;if(w>0)setComputedSize(calcSize(w));},[fontSize]);// Keep in sync on resize (live site window resize)\nuseEffect(()=>{const el=containerRef.current;if(!el)return;const observer=new ResizeObserver(([entry])=>{setComputedSize(calcSize(entry.contentRect.width));});observer.observe(el);return()=>observer.disconnect();},[fontSize]);const glowShadow=`0 0 ${glowSize*.5}px ${glowColor}, 0 0 ${glowSize}px ${glowColor}, 0 0 ${glowSize*1.5}px ${glowColor}`;return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"link\",{href:\"https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap\",rel:\"stylesheet\"}),/*#__PURE__*/_jsx(motion.div,{ref:containerRef,style:{...style,position:\"relative\",width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},animate:animate?{filter:[`drop-shadow(${glowShadow}) brightness(${glowIntensity})`,`drop-shadow(0 0 ${glowSize*.3}px ${glowColor}, 0 0 ${glowSize*.6}px ${glowColor}, 0 0 ${glowSize*.9}px ${glowColor}) brightness(${glowIntensity*.7})`,`drop-shadow(${glowShadow}) brightness(${glowIntensity})`]}:undefined,transition:animate?{duration:animationSpeed,repeat:Infinity,ease:\"easeInOut\"}:undefined,children:/*#__PURE__*/_jsx(\"h1\",{style:{margin:0,padding:0,fontSize:`${computedSize}px`,fontWeight:600,lineHeight:\"1em\",letterSpacing:\"-0.0015em\",fontFamily:\"Montserrat, sans-serif\",color:textColor,textShadow:glowShadow,whiteSpace:\"pre-wrap\",wordWrap:\"break-word\",overflowWrap:\"break-word\",width:\"100%\",textAlign:textAlign},children:text})})]});}addPropertyControls(TextGlowH1,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"The Future of Indian\\nManufacturing is AI\"},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:88,min:16,max:120,step:1,unit:\"px\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#FFFFFF\"},glowColor:{type:ControlType.Color,title:\"Glow Color\",defaultValue:\"#0099FF\"},glowIntensity:{type:ControlType.Number,title:\"Intensity\",defaultValue:1,min:.5,max:2,step:.1},glowSize:{type:ControlType.Number,title:\"Glow Size\",defaultValue:20,min:5,max:50,step:1,unit:\"px\"},animate:{type:ControlType.Boolean,title:\"Animate\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},animationSpeed:{type:ControlType.Number,title:\"Speed\",defaultValue:2,min:.5,max:5,step:.1,unit:\"s\",hidden:({animate})=>!animate},textAlign:{type:ControlType.Enum,title:\"Text Align\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"],defaultValue:\"center\",displaySegmentedControl:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TextGlowH1\",\"slots\":[],\"annotations\":{\"framerSup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