{"version":3,"file":"ShellPanelOverride.Dh-cNxs5.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/kzhsrV8YgUfpo4yeBuFe/HWjFYWXi0s3rvjqoQaxn/ShellPanelOverride.js"],"sourcesContent":["// User request: Create a new Framer code override file called `ShellPanelOverride.tsx` with a single exported override function `withShellPanel` that (1) stops click propagation inside the shell, (2) injects a dark scrollbar style for `[data-framer-name=\"Content Panel\"]`, and (3) resets the content panel scroll to top on section switch via MutationObserver.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect,useRef}from\"react\";const SHELL_PANEL_SCROLLBAR_STYLE_ID=\"shell-panel-content-scrollbar-style\";export function withShellPanel(Component){return /*#__PURE__*/forwardRef(function WithShellPanel(props,ref){const wrapperRef=useRef(null);useEffect(()=>{if(typeof document===\"undefined\")return;if(!document.getElementById(SHELL_PANEL_SCROLLBAR_STYLE_ID)){const styleElement=document.createElement(\"style\");styleElement.id=SHELL_PANEL_SCROLLBAR_STYLE_ID;styleElement.textContent=`\n[data-framer-name=\"Content Panel\"] {\n    scrollbar-width: thin;\n    scrollbar-color: rgba(255,255,255,0.16) transparent;\n}\n[data-framer-name=\"Content Panel\"]::-webkit-scrollbar {\n    width: 5px;\n    background: transparent;\n}\n[data-framer-name=\"Content Panel\"]::-webkit-scrollbar-track {\n    background: transparent;\n}\n[data-framer-name=\"Content Panel\"]::-webkit-scrollbar-thumb {\n    background: rgba(255,255,255,0.16);\n    border-radius: 100px;\n}\n[data-framer-name=\"Content Panel\"]::-webkit-scrollbar-thumb:hover {\n    background: rgba(255,255,255,0.28);\n}\n`;document.head.appendChild(styleElement);}},[]);useEffect(()=>{if(typeof document===\"undefined\")return;const wrapper=wrapperRef.current;if(!wrapper)return;const contentPanel=wrapper.querySelector(`[data-framer-name=\"Content Panel\"]`);if(!contentPanel)return;const childStyleObserver=new MutationObserver(()=>{contentPanel.scrollTop=0;});const observeDirectChildren=()=>{childStyleObserver.disconnect();Array.from(contentPanel.children).forEach(child=>{childStyleObserver.observe(child,{attributes:true,attributeFilter:[\"style\"]});});};observeDirectChildren();const childListObserver=new MutationObserver(()=>{observeDirectChildren();});childListObserver.observe(contentPanel,{childList:true});return()=>{childStyleObserver.disconnect();childListObserver.disconnect();};},[]);const handleClick=event=>{event.stopPropagation();};return /*#__PURE__*/_jsx(\"div\",{ref:wrapperRef,style:{display:\"contents\"},onClick:handleClick,children:/*#__PURE__*/_jsx(Component,{ref:ref,...props})});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withShellPanel\":{\"type\":\"reactHoc\",\"name\":\"withShellPanel\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ShellPanelOverride.map"],"mappings":"gIACqK,SAAgB,EAAe,EAAU,CAAC,OAAoB,EAAW,SAAwB,EAAM,EAAI,CAAC,IAAM,EAAWA,EAAO,KAAK,CAmB8gB,OAnB7gB,MAAc,CAAI,YAAO,SAAW,MAAsB,CAAC,SAAS,eAAe,EAA+B,CAAC,CAAC,IAAM,EAAa,SAAS,cAAc,QAAQ,CAAC,EAAa,GAAG,EAA+B,EAAa,YAAY;;;;;;;;;;;;;;;;;;;EAmB5hB,SAAS,KAAK,YAAY,EAAa,GAAI,EAAE,CAAC,CAAC,MAAc,CAAC,GAAG,OAAO,SAAW,IAAY,OAAO,IAAM,EAAQ,EAAW,QAAQ,GAAG,CAAC,EAAQ,OAAO,IAAM,EAAa,EAAQ,cAAc,qCAAqC,CAAC,GAAG,CAAC,EAAa,OAAO,IAAM,EAAmB,IAAI,qBAAqB,CAAC,EAAa,UAAU,GAAI,CAAO,MAA0B,CAAC,EAAmB,YAAY,CAAC,MAAM,KAAK,EAAa,SAAS,CAAC,QAAQ,GAAO,CAAC,EAAmB,QAAQ,EAAM,CAAC,WAAW,GAAK,gBAAgB,CAAC,QAAQ,CAAC,CAAC,EAAG,EAAG,GAAuB,CAAC,IAAM,EAAkB,IAAI,qBAAqB,CA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