@tamagui/remove-scroll 3.0.0-beta.669.1 → 3.0.0-beta.719.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,3 @@
1
-
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1 +1 @@
1
- {"version":3,"file":"RemoveScroll.native.js","names":[],"sources":["cjs/RemoveScroll.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar RemoveScroll_native_exports = {};\n__export(RemoveScroll_native_exports, {\n RemoveScroll: () => RemoveScroll,\n getAllowedScrollableNode: () => getAllowedScrollableNode\n});\nmodule.exports = __toCommonJS(RemoveScroll_native_exports);\nvar RemoveScroll = function(props) {\n return props.children;\n};\nvar getAllowedScrollableNode = function() {\n};\n//# sourceMappingURL=RemoveScroll.native.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,8BAA8B,CAAC;AACnC,SAAS,6BAA6B;CACpC,oBAAoB;CACpB,gCAAgC;AAClC,CAAC;AACD,OAAO,UAAU,aAAa,2BAA2B;AACzD,IAAI,eAAe,SAAS,OAAO;CACjC,OAAO,MAAM;AACf;AACA,IAAI,2BAA2B,WAAW,CAC1C"}
1
+ {"version":3,"file":"RemoveScroll.native.js","names":[],"sources":["cjs/RemoveScroll.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar RemoveScroll_native_exports = {};\n__export(RemoveScroll_native_exports, {\n RemoveScroll: () => RemoveScroll,\n getAllowedScrollableNode: () => getAllowedScrollableNode\n});\nmodule.exports = __toCommonJS(RemoveScroll_native_exports);\nvar RemoveScroll = function(props) {\n return props.children;\n};\nvar getAllowedScrollableNode = function() {\n};\n//# sourceMappingURL=RemoveScroll.native.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,8BAA8B,CAAC;AACnC,SAAS,6BAA6B;CACpC,oBAAoB;CACpB,gCAAgC;AAClC,CAAC;AACD,OAAO,UAAU,aAAa,2BAA2B;AACzD,IAAI,eAAe,SAAS,OAAO;CACjC,OAAO,MAAM;AACf;AACA,IAAI,2BAA2B,WAAW,CAC1C"}
@@ -1,4 +1,3 @@
1
-
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./RemoveScroll\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,0BAAgB,GAAG,OAAO,OAAO"}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./RemoveScroll\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,0BAAgB,GAAG,OAAO,OAAO"}
@@ -1,4 +1,3 @@
1
-
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1 +1 @@
1
- {"version":3,"file":"useDisableScroll.native.js","names":[],"sources":["cjs/useDisableScroll.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar useDisableScroll_exports = {};\n__export(useDisableScroll_exports, {\n useDisableBodyScroll: () => useDisableBodyScroll\n});\nmodule.exports = __toCommonJS(useDisableScroll_exports);\nvar import_react = require(\"react\");\nvar canUseDOM = function() {\n return typeof window !== \"undefined\" && !!window.document && !!window.document.createElement;\n};\nvar refCount = 0;\nvar savedScrollY = 0;\nvar previousStyles = null;\nfunction isIOSSafari() {\n if (typeof navigator === \"undefined\") return false;\n var ua = navigator.userAgent;\n var isIOS = /iPad|iPhone|iPod/.test(ua) || navigator.platform === \"MacIntel\" && navigator.maxTouchPoints > 1;\n var isSafari = /^((?!chrome|android).)*safari/i.test(ua);\n return isIOS && isSafari;\n}\nvar useDisableBodyScroll = function(enabled) {\n var wasEnabled = (0, import_react.useRef)(false);\n (0, import_react.useEffect)(function() {\n if (!canUseDOM()) {\n return;\n }\n if (enabled && !wasEnabled.current) {\n wasEnabled.current = true;\n if (++refCount === 1) {\n var html = document.documentElement;\n var body = document.body;\n savedScrollY = window.scrollY;\n previousStyles = {\n htmlOverflow: html.style.overflow,\n htmlScrollbarGutter: html.style.scrollbarGutter,\n bodyPosition: body.style.position,\n bodyTop: body.style.top,\n bodyWidth: body.style.width,\n bodyOverflow: body.style.overflow,\n bodyOverscrollBehavior: body.style.overscrollBehavior\n };\n html.style.scrollbarGutter = \"stable\";\n html.style.overflow = \"hidden\";\n body.style.overscrollBehavior = \"none\";\n if (isIOSSafari()) {\n body.style.position = \"fixed\";\n body.style.top = `-${savedScrollY}px`;\n body.style.width = \"100%\";\n body.style.overflow = \"hidden\";\n }\n }\n } else if (!enabled && wasEnabled.current) {\n wasEnabled.current = false;\n if (--refCount === 0 && previousStyles) {\n var html1 = document.documentElement;\n var body1 = document.body;\n html1.style.overflow = previousStyles.htmlOverflow;\n html1.style.scrollbarGutter = previousStyles.htmlScrollbarGutter;\n body1.style.position = previousStyles.bodyPosition;\n body1.style.top = previousStyles.bodyTop;\n body1.style.width = previousStyles.bodyWidth;\n body1.style.overflow = previousStyles.bodyOverflow;\n body1.style.overscrollBehavior = previousStyles.bodyOverscrollBehavior;\n if (savedScrollY > 0) {\n window.scrollTo(0, savedScrollY);\n }\n previousStyles = null;\n savedScrollY = 0;\n }\n }\n }, [\n enabled\n ]);\n (0, import_react.useEffect)(function() {\n return function() {\n if (wasEnabled.current) {\n wasEnabled.current = false;\n if (--refCount === 0 && previousStyles) {\n var html = document.documentElement;\n var body = document.body;\n html.style.overflow = previousStyles.htmlOverflow;\n html.style.scrollbarGutter = previousStyles.htmlScrollbarGutter;\n body.style.position = previousStyles.bodyPosition;\n body.style.top = previousStyles.bodyTop;\n body.style.width = previousStyles.bodyWidth;\n body.style.overflow = previousStyles.bodyOverflow;\n body.style.overscrollBehavior = previousStyles.bodyOverscrollBehavior;\n if (savedScrollY > 0) {\n window.scrollTo(0, savedScrollY);\n }\n previousStyles = null;\n savedScrollY = 0;\n }\n }\n };\n }, []);\n};\n//# sourceMappingURL=useDisableScroll.js.map\n"],"mappings":";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;IACtB,WAAW,UAAU;IACrB,IAAI,EAAE,aAAa,KAAK,gBAAgB;KACtC,IAAI,OAAO,SAAS;KACpB,IAAI,OAAO,SAAS;KACpB,KAAK,MAAM,WAAW,eAAe;KACrC,KAAK,MAAM,kBAAkB,eAAe;KAC5C,KAAK,MAAM,WAAW,eAAe;KACrC,KAAK,MAAM,MAAM,eAAe;KAChC,KAAK,MAAM,QAAQ,eAAe;KAClC,KAAK,MAAM,WAAW,eAAe;KACrC,KAAK,MAAM,qBAAqB,eAAe;KAC/C,IAAI,eAAe,GAAG;MACpB,OAAO,SAAS,GAAG,YAAY;KACjC;KACA,iBAAiB;KACjB,eAAe;IACjB;GACF;EACF;CACF,GAAG,CAAC,CAAC;AACP"}
1
+ {"version":3,"file":"useDisableScroll.native.js","names":[],"sources":["cjs/useDisableScroll.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar useDisableScroll_exports = {};\n__export(useDisableScroll_exports, {\n useDisableBodyScroll: () => useDisableBodyScroll\n});\nmodule.exports = __toCommonJS(useDisableScroll_exports);\nvar import_react = require(\"react\");\nvar canUseDOM = function() {\n return typeof window !== \"undefined\" && !!window.document && !!window.document.createElement;\n};\nvar refCount = 0;\nvar savedScrollY = 0;\nvar previousStyles = null;\nfunction isIOSSafari() {\n if (typeof navigator === \"undefined\") return false;\n var ua = navigator.userAgent;\n var isIOS = /iPad|iPhone|iPod/.test(ua) || navigator.platform === \"MacIntel\" && navigator.maxTouchPoints > 1;\n var isSafari = /^((?!chrome|android).)*safari/i.test(ua);\n return isIOS && isSafari;\n}\nvar useDisableBodyScroll = function(enabled) {\n var wasEnabled = (0, import_react.useRef)(false);\n (0, import_react.useEffect)(function() {\n if (!canUseDOM()) {\n return;\n }\n if (enabled && !wasEnabled.current) {\n wasEnabled.current = true;\n if (++refCount === 1) {\n var html = document.documentElement;\n var body = document.body;\n savedScrollY = window.scrollY;\n previousStyles = {\n htmlOverflow: html.style.overflow,\n htmlScrollbarGutter: html.style.scrollbarGutter,\n bodyPosition: body.style.position,\n bodyTop: body.style.top,\n bodyWidth: body.style.width,\n bodyOverflow: body.style.overflow,\n bodyOverscrollBehavior: body.style.overscrollBehavior\n };\n html.style.scrollbarGutter = \"stable\";\n html.style.overflow = \"hidden\";\n body.style.overscrollBehavior = \"none\";\n if (isIOSSafari()) {\n body.style.position = \"fixed\";\n body.style.top = `-${savedScrollY}px`;\n body.style.width = \"100%\";\n body.style.overflow = \"hidden\";\n }\n }\n } else if (!enabled && wasEnabled.current) {\n wasEnabled.current = false;\n if (--refCount === 0 && previousStyles) {\n var html1 = document.documentElement;\n var body1 = document.body;\n html1.style.overflow = previousStyles.htmlOverflow;\n html1.style.scrollbarGutter = previousStyles.htmlScrollbarGutter;\n body1.style.position = previousStyles.bodyPosition;\n body1.style.top = previousStyles.bodyTop;\n body1.style.width = previousStyles.bodyWidth;\n body1.style.overflow = previousStyles.bodyOverflow;\n body1.style.overscrollBehavior = previousStyles.bodyOverscrollBehavior;\n if (savedScrollY > 0) {\n window.scrollTo(0, savedScrollY);\n }\n previousStyles = null;\n savedScrollY = 0;\n }\n }\n }, [\n enabled\n ]);\n (0, import_react.useEffect)(function() {\n return function() {\n if (wasEnabled.current) {\n wasEnabled.current = false;\n if (--refCount === 0 && previousStyles) {\n var html = document.documentElement;\n var body = document.body;\n html.style.overflow = previousStyles.htmlOverflow;\n html.style.scrollbarGutter = previousStyles.htmlScrollbarGutter;\n body.style.position = previousStyles.bodyPosition;\n body.style.top = previousStyles.bodyTop;\n body.style.width = previousStyles.bodyWidth;\n body.style.overflow = previousStyles.bodyOverflow;\n body.style.overscrollBehavior = previousStyles.bodyOverscrollBehavior;\n if (savedScrollY > 0) {\n window.scrollTo(0, savedScrollY);\n }\n previousStyles = null;\n savedScrollY = 0;\n }\n }\n };\n }, []);\n};\n//# sourceMappingURL=useDisableScroll.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,2BAA2B,CAAC;AAChC,SAAS,0BAA0B,EACjC,4BAA4B,qBAC9B,CAAC;AACD,OAAO,UAAU,aAAa,wBAAwB;AACtD,IAAI,eAAe,QAAQ,OAAO;AAClC,IAAI,YAAY,WAAW;CACzB,OAAO,OAAO,WAAW,eAAe,CAAC,CAAC,OAAO,YAAY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BAAkB,eAAe;IAC7C,MAAM,MAAM,WAAW,eAAe;IACtC,MAAM,MAAM,MAAM,eAAe;IACjC,MAAM,MAAM,QAAQ,eAAe;IACnC,MAAM,MAAM,WAAW,eAAe;IACtC,MAAM,MAAM,qBAAqB,eAAe;IAChD,IAAI,eAAe,GAAG;KACpB,OAAO,SAAS,GAAG,YAAY;IACjC;IACA,iBAAiB;IACjB,eAAe;GACjB;EACF;CACF,GAAG,CACD,OACF,CAAC;CACD,CAAC,GAAG,aAAa,UAAS,CAAE,WAAW;EACrC,OAAO,WAAW;GAChB,IAAI,WAAW,SAAS;IACtB,WAAW,UAAU;IACrB,IAAI,EAAE,aAAa,KAAK,gBAAgB;KACtC,IAAI,OAAO,SAAS;KACpB,IAAI,OAAO,SAAS;KACpB,KAAK,MAAM,WAAW,eAAe;KACrC,KAAK,MAAM,kBAAkB,eAAe;KAC5C,KAAK,MAAM,WAAW,eAAe;KACrC,KAAK,MAAM,MAAM,eAAe;KAChC,KAAK,MAAM,QAAQ,eAAe;KAClC,KAAK,MAAM,WAAW,eAAe;KACrC,KAAK,MAAM,qBAAqB,eAAe;KAC/C,IAAI,eAAe,GAAG;MACpB,OAAO,SAAS,GAAG,YAAY;KACjC;KACA,iBAAiB;KACjB,eAAe;IACjB;GACF;EACF;CACF,GAAG,CAAC,CAAC;AACP"}
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1 +1 @@
1
- {"version":3,"file":"RemoveScroll.native.js","names":[],"sources":["jsx/RemoveScroll.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar RemoveScroll_native_exports = {};\n__export(RemoveScroll_native_exports, {\n RemoveScroll: () => RemoveScroll,\n getAllowedScrollableNode: () => getAllowedScrollableNode\n});\nmodule.exports = __toCommonJS(RemoveScroll_native_exports);\nvar RemoveScroll = function(props) {\n return props.children;\n};\nvar getAllowedScrollableNode = function() {\n};\n//# sourceMappingURL=RemoveScroll.native.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,8BAA8B,CAAC;AACnC,SAAS,6BAA6B;CACpC,oBAAoB;CACpB,gCAAgC;AAClC,CAAC;AACD,OAAO,UAAU,aAAa,2BAA2B;AACzD,IAAI,eAAe,SAAS,OAAO;CACjC,OAAO,MAAM;AACf;AACA,IAAI,2BAA2B,WAAW,CAC1C"}
1
+ {"version":3,"file":"RemoveScroll.native.js","names":[],"sources":["jsx/RemoveScroll.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar RemoveScroll_native_exports = {};\n__export(RemoveScroll_native_exports, {\n RemoveScroll: () => RemoveScroll,\n getAllowedScrollableNode: () => getAllowedScrollableNode\n});\nmodule.exports = __toCommonJS(RemoveScroll_native_exports);\nvar RemoveScroll = function(props) {\n return props.children;\n};\nvar getAllowedScrollableNode = function() {\n};\n//# sourceMappingURL=RemoveScroll.native.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,8BAA8B,CAAC;AACnC,SAAS,6BAA6B;CACpC,oBAAoB;CACpB,gCAAgC;AAClC,CAAC;AACD,OAAO,UAAU,aAAa,2BAA2B;AACzD,IAAI,eAAe,SAAS,OAAO;CACjC,OAAO,MAAM;AACf;AACA,IAAI,2BAA2B,WAAW,CAC1C"}
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":[],"sources":["jsx/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./RemoveScroll\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,0BAAgB,GAAG,OAAO,OAAO"}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["jsx/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./RemoveScroll\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,0BAAgB,GAAG,OAAO,OAAO"}
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1 +1 @@
1
- {"version":3,"file":"useDisableScroll.native.js","names":[],"sources":["jsx/useDisableScroll.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar useDisableScroll_exports = {};\n__export(useDisableScroll_exports, {\n useDisableBodyScroll: () => useDisableBodyScroll\n});\nmodule.exports = __toCommonJS(useDisableScroll_exports);\nvar import_react = require(\"react\");\nvar canUseDOM = function() {\n return typeof window !== \"undefined\" && !!window.document && !!window.document.createElement;\n};\nvar refCount = 0;\nvar savedScrollY = 0;\nvar previousStyles = null;\nfunction isIOSSafari() {\n if (typeof navigator === \"undefined\") return false;\n var ua = navigator.userAgent;\n var isIOS = /iPad|iPhone|iPod/.test(ua) || navigator.platform === \"MacIntel\" && navigator.maxTouchPoints > 1;\n var isSafari = /^((?!chrome|android).)*safari/i.test(ua);\n return isIOS && isSafari;\n}\nvar useDisableBodyScroll = function(enabled) {\n var wasEnabled = (0, import_react.useRef)(false);\n (0, import_react.useEffect)(function() {\n if (!canUseDOM()) {\n return;\n }\n if (enabled && !wasEnabled.current) {\n wasEnabled.current = true;\n if (++refCount === 1) {\n var html = document.documentElement;\n var body = document.body;\n savedScrollY = window.scrollY;\n previousStyles = {\n htmlOverflow: html.style.overflow,\n htmlScrollbarGutter: html.style.scrollbarGutter,\n bodyPosition: body.style.position,\n bodyTop: body.style.top,\n bodyWidth: body.style.width,\n bodyOverflow: body.style.overflow,\n bodyOverscrollBehavior: body.style.overscrollBehavior\n };\n html.style.scrollbarGutter = \"stable\";\n html.style.overflow = \"hidden\";\n body.style.overscrollBehavior = \"none\";\n if (isIOSSafari()) {\n body.style.position = \"fixed\";\n body.style.top = `-${savedScrollY}px`;\n body.style.width = \"100%\";\n body.style.overflow = \"hidden\";\n }\n }\n } else if (!enabled && wasEnabled.current) {\n wasEnabled.current = false;\n if (--refCount === 0 && previousStyles) {\n var html1 = document.documentElement;\n var body1 = document.body;\n html1.style.overflow = previousStyles.htmlOverflow;\n html1.style.scrollbarGutter = previousStyles.htmlScrollbarGutter;\n body1.style.position = previousStyles.bodyPosition;\n body1.style.top = previousStyles.bodyTop;\n body1.style.width = previousStyles.bodyWidth;\n body1.style.overflow = previousStyles.bodyOverflow;\n body1.style.overscrollBehavior = previousStyles.bodyOverscrollBehavior;\n if (savedScrollY > 0) {\n window.scrollTo(0, savedScrollY);\n }\n previousStyles = null;\n savedScrollY = 0;\n }\n }\n }, [\n enabled\n ]);\n (0, import_react.useEffect)(function() {\n return function() {\n if (wasEnabled.current) {\n wasEnabled.current = false;\n if (--refCount === 0 && previousStyles) {\n var html = document.documentElement;\n var body = document.body;\n html.style.overflow = previousStyles.htmlOverflow;\n html.style.scrollbarGutter = previousStyles.htmlScrollbarGutter;\n body.style.position = previousStyles.bodyPosition;\n body.style.top = previousStyles.bodyTop;\n body.style.width = previousStyles.bodyWidth;\n body.style.overflow = previousStyles.bodyOverflow;\n body.style.overscrollBehavior = previousStyles.bodyOverscrollBehavior;\n if (savedScrollY > 0) {\n window.scrollTo(0, savedScrollY);\n }\n previousStyles = null;\n savedScrollY = 0;\n }\n }\n };\n }, []);\n};\n//# sourceMappingURL=useDisableScroll.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,2BAA2B,CAAC;AAChC,SAAS,0BAA0B,EACjC,4BAA4B,qBAC9B,CAAC;AACD,OAAO,UAAU,aAAa,wBAAwB;AACtD,IAAI,eAAe,QAAQ,OAAO;AAClC,IAAI,YAAY,WAAW;CACzB,OAAO,OAAO,WAAW,eAAe,CAAC,CAAC,OAAO,YAAY,CAAC,CAAC,OAAO,SAAS;AACjF;AACA,IAAI,WAA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MAAM,MAAM,eAAe;IACjC,MAAM,MAAM,QAAQ,eAAe;IACnC,MAAM,MAAM,WAAW,eAAe;IACtC,MAAM,MAAM,qBAAqB,eAAe;IAChD,IAAI,eAAe,GAAG;KACpB,OAAO,SAAS,GAAG,YAAY;IACjC;IACA,iBAAiB;IACjB,eAAe;GACjB;EACF;CACF,GAAG,CACD,OACF,CAAC;CACD,CAAC,GAAG,aAAa,WAAW,WAAW;EACrC,OAAO,WAAW;GAChB,IAAI,WAAW,SAAS;IACtB,WAAW,UAAU;IACrB,IAAI,EAAE,aAAa,KAAK,gBAAgB;KACtC,IAAI,OAAO,SAAS;KACpB,IAAI,OAAO,SAAS;KACpB,KAAK,MAAM,WAAW,eAAe;KACrC,KAAK,MAAM,kBAAkB,eAAe;KAC5C,KAAK,MAAM,WAAW,eAAe;KACrC,KAAK,MAAM,MAAM,eAAe;KAChC,KAAK,MAAM,QAAQ,eAAe;KAClC,KAAK,MAAM,WAAW,eAAe;KACrC,KAAK,MAAM,qBAAqB,eAAe;KAC/C,IAAI,eAAe,GAAG;MACpB,OAAO,SAAS,GAAG,YAAY;KACjC;KACA,iBAAiB;KACjB,eAAe;IACjB;GACF;EACF;CACF,GAAG,CAAC,CAAC;AACP"}
1
+ {"version":3,"file":"useDisableScroll.native.js","names":[],"sources":["jsx/useDisableScroll.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar useDisableScroll_exports = {};\n__export(useDisableScroll_exports, {\n useDisableBodyScroll: () => useDisableBodyScroll\n});\nmodule.exports = __toCommonJS(useDisableScroll_exports);\nvar import_react = require(\"react\");\nvar canUseDOM = function() {\n return typeof window !== \"undefined\" && !!window.document && !!window.document.createElement;\n};\nvar refCount = 0;\nvar savedScrollY = 0;\nvar previousStyles = null;\nfunction isIOSSafari() {\n if (typeof navigator === \"undefined\") return false;\n var ua = navigator.userAgent;\n var isIOS = /iPad|iPhone|iPod/.test(ua) || navigator.platform === \"MacIntel\" && navigator.maxTouchPoints > 1;\n var isSafari = /^((?!chrome|android).)*safari/i.test(ua);\n return isIOS && isSafari;\n}\nvar useDisableBodyScroll = function(enabled) {\n var wasEnabled = (0, import_react.useRef)(false);\n (0, import_react.useEffect)(function() {\n if (!canUseDOM()) {\n return;\n }\n if (enabled && !wasEnabled.current) {\n wasEnabled.current = true;\n if (++refCount === 1) {\n var html = document.documentElement;\n var body = document.body;\n savedScrollY = window.scrollY;\n previousStyles = {\n htmlOverflow: html.style.overflow,\n htmlScrollbarGutter: html.style.scrollbarGutter,\n bodyPosition: body.style.position,\n bodyTop: body.style.top,\n bodyWidth: body.style.width,\n bodyOverflow: body.style.overflow,\n bodyOverscrollBehavior: body.style.overscrollBehavior\n };\n html.style.scrollbarGutter = \"stable\";\n html.style.overflow = \"hidden\";\n body.style.overscrollBehavior = \"none\";\n if (isIOSSafari()) {\n body.style.position = \"fixed\";\n body.style.top = `-${savedScrollY}px`;\n body.style.width = \"100%\";\n body.style.overflow = \"hidden\";\n }\n }\n } else if (!enabled && wasEnabled.current) {\n wasEnabled.current = false;\n if (--refCount === 0 && previousStyles) {\n var html1 = document.documentElement;\n var body1 = document.body;\n html1.style.overflow = previousStyles.htmlOverflow;\n html1.style.scrollbarGutter = previousStyles.htmlScrollbarGutter;\n body1.style.position = previousStyles.bodyPosition;\n body1.style.top = previousStyles.bodyTop;\n body1.style.width = previousStyles.bodyWidth;\n body1.style.overflow = previousStyles.bodyOverflow;\n body1.style.overscrollBehavior = previousStyles.bodyOverscrollBehavior;\n if (savedScrollY > 0) {\n window.scrollTo(0, savedScrollY);\n }\n previousStyles = null;\n savedScrollY = 0;\n }\n }\n }, [\n enabled\n ]);\n (0, import_react.useEffect)(function() {\n return function() {\n if (wasEnabled.current) {\n wasEnabled.current = false;\n if (--refCount === 0 && previousStyles) {\n var html = document.documentElement;\n var body = document.body;\n html.style.overflow = previousStyles.htmlOverflow;\n html.style.scrollbarGutter = previousStyles.htmlScrollbarGutter;\n body.style.position = previousStyles.bodyPosition;\n body.style.top = previousStyles.bodyTop;\n body.style.width = previousStyles.bodyWidth;\n body.style.overflow = previousStyles.bodyOverflow;\n body.style.overscrollBehavior = previousStyles.bodyOverscrollBehavior;\n if (savedScrollY > 0) {\n window.scrollTo(0, savedScrollY);\n }\n previousStyles = null;\n savedScrollY = 0;\n }\n }\n };\n }, []);\n};\n//# sourceMappingURL=useDisableScroll.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AAC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
3
+ "version": "3.0.0-beta.719.1",
4
4
  "files": [
5
5
  "src",
6
6
  "types",
@@ -33,8 +33,8 @@
33
33
  "clean:build": "tamagui-build clean:build"
34
34
  },
35
35
  "devDependencies": {
36
- "@tamagui/build": "3.0.0-beta.669.1",
37
- "react": ">=19"
36
+ "@tamagui/build": "3.0.0-beta.719.1",
37
+ "react": "19.2.3"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "react": ">=19"