{"version":3,"file":"OpticalAlign_H1.D4qIZCod.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/pPkRLvTuWYIb6n02xoko/KmorwfhkXMGjy9ciyuYz/OpticalAlign_H1.js"],"sourcesContent":["// Override file: OpticalAlign.tsx\n// Two variants — H1 and H2 — selectable from the Framer override panel.\n// Apply withOpticalAlignH1 or withOpticalAlignH2 per text element.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";// Shared hook — accepts margin values per breakpoint\nfunction useOpticalMargin(desktop,tablet,mobile){const[margin,setMargin]=useState(desktop);useEffect(()=>{const update=()=>{const w=window.innerWidth;if(w>=1200){setMargin(desktop);}else if(w>=810){setMargin(tablet);}else{setMargin(mobile);}};update();window.addEventListener(\"resize\",update);return()=>window.removeEventListener(\"resize\",update);},[]);return margin;}// H1: 144px / 99px / 62px\nexport function withOpticalAlignH1(Component){return props=>{const margin=useOpticalMargin(\"-8px\",\"-5px\",\"-2px\");return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,marginLeft:margin}});};}// H2: desktop -6px, tablet -xpx, mobile -xpx\nexport function withOpticalAlignH2(Component){return props=>{const margin=useOpticalMargin(\"-5px\",\"-2px\",\"-0px\");return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,marginLeft:margin}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withOpticalAlignH1\":{\"type\":\"reactHoc\",\"name\":\"withOpticalAlignH1\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withOpticalAlignH2\":{\"type\":\"reactHoc\",\"name\":\"withOpticalAlignH2\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./OpticalAlign_H1.map"],"mappings":"uIAIA,SAAS,EAAiB,EAAQ,EAAO,EAAO,CAAC,GAAK,CAAC,EAAO,GAAWA,EAAS,EAAQ,CAAuQ,OAAtQ,MAAc,CAAC,IAAM,MAAW,CAAC,IAAM,EAAE,EAAO,WAAuB,EAAT,GAAG,KAAgB,EAAkB,GAAG,IAAe,EAAwB,EAAO,EAAsD,OAAlD,GAAQ,CAAC,EAAO,iBAAiB,SAAS,EAAO,KAAW,EAAO,oBAAoB,SAAS,EAAO,EAAG,EAAE,CAAC,CAAQ,EACxW,SAAgB,EAAmB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAO,EAAiB,OAAO,OAAO,OAAO,CAAC,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,MAAM,CAAC,GAAG,EAAM,MAAM,WAAW,EAAO,CAAC,CAAC,EACxM,SAAgB,EAAmB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAO,EAAiB,OAAO,OAAO,OAAO,CAAC,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,MAAM,CAAC,GAAG,EAAM,MAAM,WAAW,EAAO,CAAC,CAAC,uBAH7J,IAAsC"}