{"version":3,"file":"TextGlowH1.CD122X2v.mjs","names":["useRef","useState","_Fragment","__esmMin","le","init_npm_react_18_3_1","_e","de","init_jsx_runtime","p","ce","motion","init_framer_motion_DhsWWWsN","addPropertyControls","init_framer_CaDWdxiz","ControlType","TextGlowH1","props","containerRef","computedSize","setComputedSize","fontSize","calcSize","containerWidth","w","el","observer","entry","glowShadow","glowSize","glowColor","l","style","animate","glowIntensity","animationSpeed","textColor","text","init_TextGlowH1"],"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\":{\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TextGlowH1.map"],"mappings":"A,yPAIG,SAAwBgB,EAAW,EAAM,CAAC,GAAK,CAAC,OAAK,YAAY,YAAU,UAAU,YAAU,UAAU,gBAAc,EAAE,WAAS,GAAG,UAAQ,GAAK,iBAAe,EAAE,WAAS,GAAG,QAAM,aAAWC,EAAYC,EAAalB,EAAO,IAAI,EAClO,CAACmB,EAAaC,GAAiBnB,EAASoB,CAAQ,EAAQC,EAAS,GAAgB,KAAK,IAAID,EAAS,KAAK,IAAI,GAAG,KAAK,MAAME,EAAe,IAAI,CAAC,CAAC,EACpJnB,MAAoB,CAAC,GAAG,CAACc,EAAa,QAAQ,OAAO,IAAMM,EAAEN,EAAa,QAAQ,YAAeM,EAAE,GAAEJ,EAAgBE,EAASE,CAAC,CAAC,CAAE,EAAE,CAACH,CAAQ,CAAC,EAC9IX,MAAc,CAAC,IAAMe,EAAGP,EAAa,QAAQ,GAAG,CAACO,EAAG,OAAO,IAAMC,EAAS,IAAI,gBAAgB,CAACC,KAAS,CAACP,EAAgBE,EAASK,EAAM,YAAY,KAAK,CAAC,CAAE,CAAC,EAAuB,OAArBD,EAAS,QAAQD,CAAE,MAAYC,EAAS,WAAW,CAAE,EAAE,CAACL,CAAQ,CAAC,EAAE,IAAMO,EAAW,OAAOC,EAAS,GAAG,KAAKC,EAAU,QAAQD,EAAS,KAAKC,EAAU,QAAQD,EAAS,IAAI,KAAKC,IAAY,MAAoB,gBAA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