{"version":3,"file":"DisableRightClick.CPkm5GRK.mjs","names":[],"sources":["https:/framerusercontent.com/modules/DJj5hm6NXvux8MaBSW5G/vYQ1vrMnNaOHgRRDT0fn/DisableRightClick.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{RenderTarget}from\"framer\";/**\n * @framerDisableUnlink\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function DisableRightClick(){const isCanvas=RenderTarget.current()===RenderTarget.canvas;useEffect(()=>{if(!isCanvas){// Inject script into head to load before anything else\nconst script=document.createElement(\"script\");script.textContent=`\n                (function() {\n                    document.addEventListener('contextmenu', function(e) {\n                        e.preventDefault();\n                        return false;\n                    }, true);\n                })();\n            `;document.head.insertBefore(script,document.head.firstChild);// Also add inline handler as backup\nconst handleContextMenu=e=>{e.preventDefault();return false;};document.addEventListener(\"contextmenu\",handleContextMenu,true);return()=>{document.removeEventListener(\"contextmenu\",handleContextMenu,true);};}},[isCanvas]);if(isCanvas){return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",alignItems:\"center\",textAlign:\"center\",justifyContent:\"center\",height:\"100%\",backgroundColor:\"rgba(153, 102, 255, 0.1)\",padding:\"40px\",gap:\"12px\",borderRadius:\"8px\"},children:[/*#__PURE__*/_jsx(\"span\",{role:\"img\",\"aria-label\":\"icon\",style:{fontSize:\"32px\"},children:\"🚫\"}),/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"h3\",{style:{margin:0,fontSize:\"14px\",color:\"#96F\",fontWeight:600},children:\"Disable Right Click\"}),/*#__PURE__*/_jsx(\"p\",{style:{margin:\"4px 0 0 0\",fontSize:\"12px\",color:\"rgba(153, 102, 255, 0.7)\"},children:\"This component will be hidden on preview/publish\"}),/*#__PURE__*/_jsx(\"p\",{style:{margin:\"8px 0 0 0\",fontSize:\"11px\",color:\"rgba(153, 102, 255, 0.7)\",fontStyle:\"italic\"},children:\"Right-click will be disabled when published\"})]})]});}return /*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",visibility:\"hidden\",pointerEvents:\"none\",userSelect:\"none\",width:0,height:0,opacity:0}});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"DisableRightClick\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\",\"framerDisableUnlink\":\"*\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DisableRightClick.map"],"mappings":"0KAKG,SAAwB,GAAmB,CAAC,IAAM,EAAS,EAAa,QAAQ,IAAI,EAAa,OASs9B,OAT/8B,MAAc,CAAC,GAAG,CAAC,EAAS,CACvI,IAAM,EAAO,SAAS,cAAc,QAAQ,EAAE,EAAO,YAAY;;;;;;;cAOnD,SAAS,KAAK,aAAa,EAAO,SAAS,KAAK,UAAU,EACxE,IAAM,EAAkB,IAAI,EAAE,eAAe,EAAS,IAAwE,OAAhE,SAAS,iBAAiB,cAAc,EAAkB,EAAI,MAAY,CAAC,SAAS,oBAAoB,cAAc,EAAkB,EAAI,CAAE,CAAE,CAAC,EAAE,CAAC,CAAQ,CAAC,EAAK,EAA8B,EAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,OAAO,cAAc,SAAS,WAAW,SAAS,UAAU,SAAS,eAAe,SAAS,OAAO,OAAO,gBAAgB,2BAA2B,QAAQ,OAAO,IAAI,OAAO,aAAa,KAAK,EAAE,SAAS,CAAc,EAAK,OAAO,CAAC,KAAK,MAAM,aAAa,OAAO,MAAM,CAAC,SAAS,MAAM,EAAE,SAAS,IAAI,CAAC,EAAe,EAAM,MAAM,CAAC,SAAS,CAAc,EAAK,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,OAAO,MAAM,OAAO,WAAW,GAAG,EAAE,SAAS,qBAAqB,CAAC,EAAe,EAAK,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