diff --git a/app/tailwind.css b/app/tailwind.css index ba2eca1..14b94d2 100644 --- a/app/tailwind.css +++ b/app/tailwind.css @@ -6,9 +6,4 @@ html { scrollbar-gutter: stable } - - html body { - margin-right: 0!important; - --removed-body-scroll-bar-size: 0 !important - } } diff --git a/package.json b/package.json index 695f8cc..c978e08 100644 --- a/package.json +++ b/package.json @@ -55,5 +55,10 @@ }, "engines": { "node": ">=18.0.0" + }, + "pnpm": { + "patchedDependencies": { + "@react-aria/overlays@3.22.0": "patches/@react-aria__overlays@3.22.0.patch" + } } } diff --git a/patches/@react-aria__overlays@3.22.0.patch b/patches/@react-aria__overlays@3.22.0.patch new file mode 100644 index 0000000..721923b --- /dev/null +++ b/patches/@react-aria__overlays@3.22.0.patch @@ -0,0 +1,22 @@ +diff --git a/dist/usePreventScroll.mjs b/dist/usePreventScroll.mjs +index 532a72f9e9ba985d036b7eba0f950ff6552898d9..7c9263667c2463c8e84fd07064076132fe53284c 100644 +--- a/dist/usePreventScroll.mjs ++++ b/dist/usePreventScroll.mjs +@@ -48,7 +48,7 @@ function $49c51c25361d4cd2$export$ee0f7cc6afcd1c18(options = {}) { + // For most browsers, all we need to do is set `overflow: hidden` on the root element, and + // add some padding to prevent the page from shifting when the scrollbar is hidden. + function $49c51c25361d4cd2$var$preventScrollStandard() { +- return (0, $7mMvr$chain)($49c51c25361d4cd2$var$setStyle(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), $49c51c25361d4cd2$var$setStyle(document.documentElement, "overflow", "hidden")); ++ return (0, $7mMvr$chain)($49c51c25361d4cd2$var$setStyle(document.documentElement, "overflow", "hidden")); + } + // Mobile Safari is a whole different beast. Even with overflow: hidden, + // it still scrolls the page in many situations: +@@ -161,7 +161,7 @@ function $49c51c25361d4cd2$var$preventScrollMobileSafari() { + // enable us to scroll the window to the top, which is required for the rest of this to work. + let scrollX = window.pageXOffset; + let scrollY = window.pageYOffset; +- restoreStyles = (0, $7mMvr$chain)($49c51c25361d4cd2$var$addEvent(window, "scroll", onWindowScroll), $49c51c25361d4cd2$var$setStyle(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), $49c51c25361d4cd2$var$setStyle(document.documentElement, "overflow", "hidden"), $49c51c25361d4cd2$var$setStyle(document.body, "marginTop", `-${scrollY}px`), ()=>{ ++ restoreStyles = (0, $7mMvr$chain)($49c51c25361d4cd2$var$addEvent(window, "scroll", onWindowScroll), $49c51c25361d4cd2$var$setStyle(document.documentElement, "overflow", "hidden"), $49c51c25361d4cd2$var$setStyle(document.body, "marginTop", `-${scrollY}px`), ()=>{ + window.scrollTo(scrollX, scrollY); + }); + // Scroll to the top. The negative margin on the body will make this appear the same. diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 765d971..5f0a18e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,11 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +patchedDependencies: + '@react-aria/overlays@3.22.0': + hash: mwvr7ecwabovde3onruwb2ke4i + path: patches/@react-aria__overlays@3.22.0.patch + dependencies: '@codemirror/lang-json': specifier: ^6.0.1 @@ -1442,7 +1447,7 @@ packages: '@react-aria/listbox': 3.12.0(react-dom@18.3.1)(react@18.3.1) '@react-aria/live-announcer': 3.3.3 '@react-aria/menu': 3.14.0(react-dom@18.3.1)(react@18.3.1) - '@react-aria/overlays': 3.22.0(react-dom@18.3.1)(react@18.3.1) + '@react-aria/overlays': 3.22.0(patch_hash=mwvr7ecwabovde3onruwb2ke4i)(react-dom@18.3.1)(react@18.3.1) '@react-aria/selection': 3.18.0(react-dom@18.3.1)(react@18.3.1) '@react-aria/textfield': 3.14.4(react@18.3.1) '@react-aria/utils': 3.24.0(react@18.3.1) @@ -1492,7 +1497,7 @@ packages: react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 dependencies: '@react-aria/focus': 3.17.0(react@18.3.1) - '@react-aria/overlays': 3.22.0(react-dom@18.3.1)(react@18.3.1) + '@react-aria/overlays': 3.22.0(patch_hash=mwvr7ecwabovde3onruwb2ke4i)(react-dom@18.3.1)(react@18.3.1) '@react-aria/utils': 3.24.0(react@18.3.1) '@react-types/dialog': 3.5.9(react@18.3.1) '@react-types/shared': 3.23.0(react@18.3.1) @@ -1511,7 +1516,7 @@ packages: '@react-aria/i18n': 3.11.0(react@18.3.1) '@react-aria/interactions': 3.21.2(react@18.3.1) '@react-aria/live-announcer': 3.3.3 - '@react-aria/overlays': 3.22.0(react-dom@18.3.1)(react@18.3.1) + '@react-aria/overlays': 3.22.0(patch_hash=mwvr7ecwabovde3onruwb2ke4i)(react-dom@18.3.1)(react@18.3.1) '@react-aria/utils': 3.24.0(react@18.3.1) '@react-stately/dnd': 3.3.0(react@18.3.1) '@react-types/button': 3.9.3(react@18.3.1) @@ -1691,7 +1696,7 @@ packages: '@react-aria/focus': 3.17.0(react@18.3.1) '@react-aria/i18n': 3.11.0(react@18.3.1) '@react-aria/interactions': 3.21.2(react@18.3.1) - '@react-aria/overlays': 3.22.0(react-dom@18.3.1)(react@18.3.1) + '@react-aria/overlays': 3.22.0(patch_hash=mwvr7ecwabovde3onruwb2ke4i)(react-dom@18.3.1)(react@18.3.1) '@react-aria/selection': 3.18.0(react-dom@18.3.1)(react@18.3.1) '@react-aria/utils': 3.24.0(react@18.3.1) '@react-stately/collections': 3.10.6(react@18.3.1) @@ -1738,7 +1743,7 @@ packages: react-dom: 18.3.1(react@18.3.1) dev: false - /@react-aria/overlays@3.22.0(react-dom@18.3.1)(react@18.3.1): + /@react-aria/overlays@3.22.0(patch_hash=mwvr7ecwabovde3onruwb2ke4i)(react-dom@18.3.1)(react@18.3.1): resolution: {integrity: sha512-M3Iayc2Hf9vJ4JJ8K/zh+Ct6aymDLmBbo686ChV3AtGOc254RyyzqnVSNuMs3j5QVBsDUKihHZQfl4E9RCwd+w==} peerDependencies: react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 @@ -1758,6 +1763,7 @@ packages: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) dev: false + patched: true /@react-aria/progress@3.4.12(react@18.3.1): resolution: {integrity: sha512-Wlz7VNFEzcLSawhZwWTKgJPM/IUKFiKJJG7KGcsT2biIlu6Yp60xj08hDZkCrLq3XsLLCRmweHlVfLFjG3AK9w==} @@ -7012,7 +7018,7 @@ packages: '@react-aria/menu': 3.14.0(react-dom@18.3.1)(react@18.3.1) '@react-aria/meter': 3.4.12(react@18.3.1) '@react-aria/numberfield': 3.11.2(react-dom@18.3.1)(react@18.3.1) - '@react-aria/overlays': 3.22.0(react-dom@18.3.1)(react@18.3.1) + '@react-aria/overlays': 3.22.0(patch_hash=mwvr7ecwabovde3onruwb2ke4i)(react-dom@18.3.1)(react@18.3.1) '@react-aria/progress': 3.4.12(react@18.3.1) '@react-aria/radio': 3.10.3(react@18.3.1) '@react-aria/searchfield': 3.7.4(react@18.3.1)