{"version":3,"file":"ScaleVectorToWrapper.Bvm-Lpv4.mjs","names":["useId","useMemo"],"sources":["https:/framerusercontent.com/modules/UsLyXbK1RTsj7EjvneWf/tAmcn9rtwEhF8bpClhFF/ScaleVectorToWrapper.js"],"sourcesContent":["// Request: Create a code override export named ScaleVectorToWrapper for an existing canvas Frame layer that keeps the original BooleanShape/SVG unchanged and makes the immediate vector/SVG child fill the wrapper bounds with preserved aspect ratio, scoped to only the wrapped frame, with no UI/controls.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect,useId,useMemo}from\"react\";export function ScaleVectorToWrapper(Component){return /*#__PURE__*/forwardRef(function ScaleVectorToWrapperOverride(props,ref){const rawId=useId();const scopedClass=useMemo(()=>{const safeId=rawId.replace(/[^a-zA-Z0-9_-]/g,\"\");return`scale-vector-to-wrapper-${safeId}`;},[rawId]);useEffect(()=>{const styleId=`style-${scopedClass}`;if(typeof document!==\"undefined\"){if(!document.getElementById(styleId)){const styleEl=document.createElement(\"style\");styleEl.id=styleId;styleEl.textContent=`\n.${scopedClass} > * {\n    width: 100% !important;\n    height: 100% !important;\n    max-width: none !important;\n    max-height: none !important;\n}\n\n.${scopedClass} > svg,\n.${scopedClass} > * > svg {\n    width: 100% !important;\n    height: 100% !important;\n    display: block !important;\n}\n`;document.head.appendChild(styleEl);}}return()=>{if(typeof document!==\"undefined\"){const existing=document.getElementById(styleId);if(existing)existing.remove();}};},[scopedClass]);const mergedClassName=useMemo(()=>[props.className,scopedClass].filter(Boolean).join(\" \"),[props.className,scopedClass]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,className:mergedClassName,style:{...props.style,position:\"relative\",overflow:\"hidden\"}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"ScaleVectorToWrapper\":{\"type\":\"reactHoc\",\"name\":\"ScaleVectorToWrapper\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScaleVectorToWrapper.map"],"mappings":"uIACiG,SAAgB,EAAqB,EAAU,CAAC,OAAoB,EAAW,SAAsC,EAAM,EAAI,CAAC,IAAM,EAAMA,EAAM,EAAQ,EAAYC,MAAoE,2BAA1C,EAAM,QAAQ,kBAAkB,EAA0C,IAAM,CAAC,CAAK,CAAC,EAAE,MAAc,CAAC,IAAM,EAAQ,SAAS,IAAc,GAAG,OAAO,SAAW,KAAgB,CAAC,SAAS,eAAe,CAAO,EAAE,CAAC,IAAM,EAAQ,SAAS,cAAc,OAAO,EAAE,EAAQ,GAAG,EAAQ,EAAQ,YAAY;GACxkB,EAAY;;;;;;;GAOZ,EAAY;GACZ,EAAY;;;;;EAKb,SAAS,KAAK,YAAY,CAAO,CAAE,CAAE,UAAU,CAAC,GAAG,OAAO,SAAW,IAAY,CAAC,IAAM,EAAS,SAAS,eAAe,CAAO,EAAK,GAAS,EAAS,OAAO,CAAE,CAAC,CAAE,EAAE,CAAC,CAAW,CAAC,EAAE,IAAM,EAAgBA,MAAY,CAAC,EAAM,UAAU,CAAW,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC,EAAM,UAAU,CAAW,CAAC,EAAE,OAAoB,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,UAAU,EAAgB,MAAM,CAAC,GAAG,EAAM,MAAM,SAAS,WAAW,SAAS,QAAQ,CAAC,CAAC,CAAE,CAAC,CAAE,iBAdtZ,IAAsD"}