|
| 1 | +diff --git a/node_modules/react-remove-scroll/dist/es2015/SideEffect.js b/node_modules/react-remove-scroll/dist/es2015/SideEffect.js |
| 2 | +index 08eda83..e48ccd6 100644 |
| 3 | +--- a/node_modules/react-remove-scroll/dist/es2015/SideEffect.js |
| 4 | ++++ b/node_modules/react-remove-scroll/dist/es2015/SideEffect.js |
| 5 | +@@ -1,7 +1,4 @@ |
| 6 | +-import { __spreadArray } from "tslib"; |
| 7 | + import * as React from 'react'; |
| 8 | +-import { RemoveScrollBar } from 'react-remove-scroll-bar'; |
| 9 | +-import { styleSingleton } from 'react-style-singleton'; |
| 10 | + import { nonPassive } from './aggresiveCapture'; |
| 11 | + import { handleScroll, locationCouldBeScrolled } from './handleScroll'; |
| 12 | + export var getTouchXY = function (event) { |
| 13 | +@@ -19,24 +16,11 @@ export function RemoveScrollSideCar(props) { |
| 14 | + var shouldPreventQueue = React.useRef([]); |
| 15 | + var touchStartRef = React.useRef([0, 0]); |
| 16 | + var activeAxis = React.useRef(); |
| 17 | +- var id = React.useState(idCounter++)[0]; |
| 18 | +- var Style = React.useState(function () { return styleSingleton(); })[0]; |
| 19 | ++ var Style = React.useState({})[0]; |
| 20 | + var lastProps = React.useRef(props); |
| 21 | + React.useEffect(function () { |
| 22 | + lastProps.current = props; |
| 23 | + }, [props]); |
| 24 | +- React.useEffect(function () { |
| 25 | +- if (props.inert) { |
| 26 | +- document.body.classList.add("block-interactivity-".concat(id)); |
| 27 | +- var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean); |
| 28 | +- allow_1.forEach(function (el) { return el.classList.add("allow-interactivity-".concat(id)); }); |
| 29 | +- return function () { |
| 30 | +- document.body.classList.remove("block-interactivity-".concat(id)); |
| 31 | +- allow_1.forEach(function (el) { return el.classList.remove("allow-interactivity-".concat(id)); }); |
| 32 | +- }; |
| 33 | +- } |
| 34 | +- return; |
| 35 | +- }, [props.inert, props.lockRef.current, props.shards]); |
| 36 | + var shouldCancelEvent = React.useCallback(function (event, parent) { |
| 37 | + if ('touches' in event && event.touches.length === 2) { |
| 38 | + return !lastProps.current.allowPinchZoom; |
| 39 | +@@ -139,8 +123,5 @@ export function RemoveScrollSideCar(props) { |
| 40 | + document.removeEventListener('touchstart', scrollTouchStart, nonPassive); |
| 41 | + }; |
| 42 | + }, []); |
| 43 | +- var removeScrollBar = props.removeScrollBar, inert = props.inert; |
| 44 | +- return (React.createElement(React.Fragment, null, |
| 45 | +- inert ? React.createElement(Style, { styles: generateStyle(id) }) : null, |
| 46 | +- removeScrollBar ? React.createElement(RemoveScrollBar, { gapMode: "margin" }) : null)); |
| 47 | ++ return (React.createElement(React.Fragment, null)); |
| 48 | + } |
| 49 | +diff --git a/node_modules/react-remove-scroll/dist/es2015/UI.js b/node_modules/react-remove-scroll/dist/es2015/UI.js |
| 50 | +index 26c94a8..75d91ae 100644 |
| 51 | +--- a/node_modules/react-remove-scroll/dist/es2015/UI.js |
| 52 | ++++ b/node_modules/react-remove-scroll/dist/es2015/UI.js |
| 53 | +@@ -1,6 +1,5 @@ |
| 54 | + import { __assign, __rest } from "tslib"; |
| 55 | + import * as React from 'react'; |
| 56 | +-import { fullWidthClassName, zeroRightClassName } from 'react-remove-scroll-bar/constants'; |
| 57 | + import { useMergeRefs } from 'use-callback-ref'; |
| 58 | + import { effectCar } from './medium'; |
| 59 | + var nothing = function () { |
| 60 | +@@ -29,8 +28,4 @@ RemoveScroll.defaultProps = { |
| 61 | + removeScrollBar: true, |
| 62 | + inert: false, |
| 63 | + }; |
| 64 | +-RemoveScroll.classNames = { |
| 65 | +- fullWidth: fullWidthClassName, |
| 66 | +- zeroRight: zeroRightClassName, |
| 67 | +-}; |
| 68 | + export { RemoveScroll }; |
0 commit comments