{"version":3,"file":"ViewportHeight.CPd57MSP.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/xfOlTgtdKoVkr4eP8d0b/DLHDdEcJreKCuZwovkFR/ViewportHeight.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";// --- Dynamic Viewport Height Solutions ---\n/**\n * @framerDescription Applies dynamic viewport height with fallback support\n * @param Component The component to wrap\n */export function withDynamicViewportHeight(Component){return props=>{const[height,setHeight]=useState(\"100vh\");useEffect(()=>{// Check if dvh is supported\nif(CSS.supports(\"height\",\"100dvh\")){setHeight(\"100dvh\");}else{// Fallback: Calculate actual viewport height\nconst updateHeight=()=>{const vh=window.innerHeight*.01;document.documentElement.style.setProperty(\"--vh\",`${vh}px`);setHeight(\"calc(var(--vh, 1vh) * 100)\");};updateHeight();window.addEventListener(\"resize\",updateHeight);window.addEventListener(\"orientationchange\",updateHeight);return()=>{window.removeEventListener(\"resize\",updateHeight);window.removeEventListener(\"orientationchange\",updateHeight);};}},[]);const combinedStyle={...props.style,height:height};return /*#__PURE__*/_jsx(Component,{...props,style:combinedStyle});};}/**\n * @framerDescription Simple 100dvh - works on modern browsers\n */export function withDVH(Component){return props=>{const combinedStyle={...props.style,height:\"100dvh\"};return /*#__PURE__*/_jsx(Component,{...props,style:combinedStyle});};}/**\n * @framerDescription Min-height version for flexible layouts\n */export function withMinDynamicHeight(Component){return props=>{const combinedStyle={...props.style,minHeight:\"100dvh\",height:\"auto\"};return /*#__PURE__*/_jsx(Component,{...props,style:combinedStyle});};}/**\n * @framerDescription For sections that should fill remaining space\n */export function withFlexFill(Component){return props=>{const combinedStyle={...props.style,minHeight:\"100dvh\",display:\"flex\",flexDirection:\"column\"};return /*#__PURE__*/_jsx(Component,{...props,style:combinedStyle});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withDVH\":{\"type\":\"reactHoc\",\"name\":\"withDVH\",\"annotations\":{\"framerContractVersion\":\"1\",\"framerDescription\":\"Simple 100dvh - works on modern browsers\"}},\"withDynamicViewportHeight\":{\"type\":\"reactHoc\",\"name\":\"withDynamicViewportHeight\",\"annotations\":{\"framerContractVersion\":\"1\",\"framerDescription\":\"Applies dynamic viewport height with fallback support\"}},\"withFlexFill\":{\"type\":\"reactHoc\",\"name\":\"withFlexFill\",\"annotations\":{\"framerContractVersion\":\"1\",\"framerDescription\":\"For sections that should fill remaining space\"}},\"withMinDynamicHeight\":{\"type\":\"reactHoc\",\"name\":\"withMinDynamicHeight\",\"annotations\":{\"framerDescription\":\"Min-height version for flexible layouts\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ViewportHeight.map"],"mappings":"uIAIG,SAAgB,EAA0B,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAO,GAAWA,EAAS,QAAQ,CAAC,MAAc,CAC/H,GAAG,IAAI,SAAS,SAAS,SAAS,CAAE,EAAU,SAAS,KAAM,CAC7D,IAAM,MAAiB,CAAC,IAAM,EAAG,EAAO,YAAY,IAAI,SAAS,gBAAgB,MAAM,YAAY,OAAO,GAAG,EAAG,IAAI,CAAC,EAAU,6BAA6B,EAA2H,OAAxH,GAAc,CAAC,EAAO,iBAAiB,SAAS,EAAa,CAAC,EAAO,iBAAiB,oBAAoB,EAAa,KAAW,CAAC,EAAO,oBAAoB,SAAS,EAAa,CAAC,EAAO,oBAAoB,oBAAoB,EAAa,IAAM,EAAE,CAAC,CAAC,IAAM,EAAc,CAAC,GAAG,EAAM,MAAa,SAAO,CAAC,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,MAAM,EAAc,CAAC,uBANpe,IAAsC"}