{"version":3,"file":"ComponentsPage.DemDlp_M.mjs","names":[],"sources":["https:/framerusercontent.com/modules/W9FZisIMzjUlKtAnyXDw/z4rYDdV1HubzQmLWwebs/ComponentsPage.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef}from\"react\";import{toast}from\"https://framerusercontent.com/modules/CWNR5e8o9zq1QczPGXJz/L5exaBMffyly5YmUrm2G/Toast.js\";//操作预览iframe刷新\nexport function withRefreshPreviewIframe(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const handleClick=event=>{props.onClick?.(event);const preview=document.getElementById(\"preview\");const iframe=preview?.querySelector(\"iframe\");if(iframe){const url=new URL(iframe.src);url.searchParams.set(\"_reload\",Date.now().toString());iframe.src=url.toString();toast.success(\"组件预览刷新成功\");}};return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onClick:handleClick});});}//新窗口打开预览链接\nexport function withOpenPreviewIframeInNewTab(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const handleClick=event=>{props.onClick?.(event);const preview=document.getElementById(\"preview\");const iframe=preview?.querySelector(\"iframe\");if(iframe?.src){window.open(iframe.src,\"_blank\",\"noopener,noreferrer\");}};return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onClick:handleClick});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withRefreshPreviewIframe\":{\"type\":\"reactHoc\",\"name\":\"withRefreshPreviewIframe\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withOpenPreviewIframeInNewTab\":{\"type\":\"reactHoc\",\"name\":\"withOpenPreviewIframeInNewTab\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"gLACA,SAAgB,EAAyB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,IAAM,EAAY,GAAO,CAAC,EAAM,UAAU,EAAM,CAAkD,IAAM,EAAzC,SAAS,eAAe,UAAU,EAAuB,cAAc,SAAS,CAAC,GAAG,EAAO,CAAC,IAAM,EAAI,IAAI,IAAI,EAAO,IAAI,CAAC,EAAI,aAAa,IAAI,UAAU,KAAK,KAAK,CAAC,UAAU,CAAC,CAAC,EAAO,IAAI,EAAI,UAAU,CAAC,EAAM,QAAQ,WAAW,GAAI,OAAoB,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,QAAQ,EAAY,CAAC,EAAG,CACpd,SAAgB,EAA8B,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,IAAM,EAAY,GAAO,CAAC,EAAM,UAAU,EAAM,CAAkD,IAAM,EAAzC,SAAS,eAAe,UAAU,EAAuB,cAAc,SAAS,CAAI,GAAQ,KAAK,EAAO,KAAK,EAAO,IAAI,SAAS,sBAAsB,EAAI,OAAoB,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,QAAQ,EAAY,CAAC,EAAG,sBAFlW,IAA8B,IAA4G"}