{"version":3,"file":"LayoutJumpFix.DgECDFiS.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/iqSmrg2HeUlejwESP7y0/6znmv0fxrJbda89bHUAM/LayoutJumpFix.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useRef,useEffect}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";export default function LayoutJumpFix(props){/* Checks */const currentTarget=RenderTarget.current();const isCanvas=currentTarget===RenderTarget.canvas||currentTarget===RenderTarget.export;const{direction}=props;const componentRef=useRef(null);useEffect(()=>{if(isCanvas)return;const component=componentRef.current;if(!component)return;const container=component.parentElement?.parentElement;if(!container)return;const wrapper=container.parentElement;if(!wrapper)return;let rafId=0;const readAndSync=()=>{const rect=container.getBoundingClientRect();if(direction===\"vertical\"||direction===\"both\"){wrapper.style.height=`${rect.height}px`;}if(direction===\"horizontal\"||direction===\"both\"){wrapper.style.width=`${rect.width}px`;}rafId=requestAnimationFrame(readAndSync);};// start real-time mirroring (per-frame)\nrafId=requestAnimationFrame(readAndSync);return()=>{cancelAnimationFrame(rafId);};},[direction]);return /*#__PURE__*/_jsx(\"div\",{ref:componentRef,style:{position:\"absolute\",width:\"0px\",height:\"0px\",userSelect:\"none\",pointerEvents:\"none\",visibility:\"hidden\"}});}addPropertyControls(LayoutJumpFix,{direction:{type:ControlType.Enum,defaultValue:\"vertical\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\",options:[\"vertical\",\"horizontal\",\"both\"],optionTitles:[\"Vertical\",\"Horizontal\",\"Both\"]}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LayoutJumpFix\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LayoutJumpFix.map"],"mappings":"4RAAgJ,SAAwB,EAAc,EAAM,CAAa,IAAM,EAAc,EAAa,SAAS,CAAO,EAAS,IAAgB,EAAa,QAAQ,IAAgB,EAAa,OAAY,CAAC,aAAW,EAAY,EAAaA,EAAO,KAAK,CACjS,OADkS,MAAc,CAAC,GAAG,EAAS,OAAO,IAAM,EAAU,EAAa,QAAQ,GAAG,CAAC,EAAU,OAAO,IAAM,EAAU,EAAU,eAAe,cAAc,GAAG,CAAC,EAAU,OAAO,IAAM,EAAQ,EAAU,cAAc,GAAG,CAAC,EAAQ,OAAO,IAAI,EAAM,EAAQ,MAAgB,CAAC,IAAM,EAAK,EAAU,uBAAuB,EAAI,IAAY,YAAY,IAAY,UAAQ,EAAQ,MAAM,OAAO,GAAG,EAAK,OAAO,MAAQ,IAAY,cAAc,IAAY,UAAQ,EAAQ,MAAM,MAAM,GAAG,EAAK,MAAM,KAAK,EAAM,sBAAsB,EAAY,EACn2B,MAAzC,GAAM,sBAAsB,EAAY,KAAW,CAAC,qBAAqB,EAAM,GAAK,CAAC,EAAU,CAAC,CAAqB,EAAK,MAAM,CAAC,IAAI,EAAa,MAAM,CAAC,SAAS,WAAW,MAAM,MAAM,OAAO,MAAM,WAAW,OAAO,cAAc,OAAO,WAAW,SAAS,CAAC,CAAC,kBADxN,IAAoC,IAAiE,CACqH,EAAoB,EAAc,CAAC,UAAU,CAAC,KAAK,EAAY,KAAK,aAAa,WAAW,wBAAwB,GAAK,0BAA0B,WAAW,QAAQ,CAAC,WAAW,aAAa,OAAO,CAAC,aAAa,CAAC,WAAW,aAAa,OAAO,CAAC,CAAC,CAAC"}