@tamagui/remove-scroll 1.135.4 → 1.135.5
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.
- package/dist/cjs/RemoveScroll.native.js +20 -18
- package/dist/cjs/RemoveScroll.native.js.map +1 -6
- package/dist/cjs/index.native.js +13 -12
- package/dist/cjs/index.native.js.map +1 -6
- package/dist/cjs/useDisableScroll.native.js +36 -31
- package/dist/cjs/useDisableScroll.native.js.map +1 -6
- package/dist/jsx/RemoveScroll.native.js +32 -8
- package/dist/jsx/RemoveScroll.native.js.map +1 -6
- package/dist/jsx/index.native.js +21 -2
- package/dist/jsx/index.native.js.map +1 -6
- package/dist/jsx/useDisableScroll.native.js +47 -22
- package/dist/jsx/useDisableScroll.native.js.map +1 -6
- package/package.json +3 -2
- package/types/RemoveScroll.d.ts.map +2 -4
- package/types/RemoveScroll.native.d.ts.map +2 -4
- package/types/useDisableScroll.d.ts.map +2 -4
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
7
|
var __export = (target, all) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: !0
|
|
22
|
+
}), mod);
|
|
16
23
|
var RemoveScroll_native_exports = {};
|
|
17
24
|
__export(RemoveScroll_native_exports, {
|
|
18
25
|
RemoveScroll: () => RemoveScroll,
|
|
19
26
|
getAllowedScrollableNode: () => getAllowedScrollableNode
|
|
20
27
|
});
|
|
21
28
|
module.exports = __toCommonJS(RemoveScroll_native_exports);
|
|
22
|
-
var RemoveScroll = function(props) {
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
27
|
-
0 && (module.exports = {
|
|
28
|
-
RemoveScroll,
|
|
29
|
-
getAllowedScrollableNode
|
|
30
|
-
});
|
|
29
|
+
var RemoveScroll = function (props) {
|
|
30
|
+
return props.children;
|
|
31
|
+
},
|
|
32
|
+
getAllowedScrollableNode = function () {};
|
|
31
33
|
//# sourceMappingURL=RemoveScroll.native.js.map
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/RemoveScroll.native.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAI,eAAe,SAAS,OAAO;AACtC,SAAO,MAAM;AACjB,GACW,2BAA2B,WAAW;AAAC;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
1
|
+
{"version":3,"names":["RemoveScroll_native_exports","__export","RemoveScroll","getAllowedScrollableNode","module","exports","__toCommonJS","props","children"],"sources":["../../src/RemoveScroll.native.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,2BAAA;AAAAC,QAAA,CAAAD,2BAAA;EAAAE,YAAA,EAAAA,CAAA,KAAAA,YAAA;EAAAC,wBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAN,2BAAA;AAAO,IAAIE,YAAA,GAAe,SAAAA,CAASK,KAAA,EAAO;IACtC,OAAOA,KAAA,CAAMC,QAAA;EACjB;EACWL,wBAAA,GAA2B,SAAAA,CAAA,EAAW,CAAC","ignoreList":[]}
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
7
|
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
9
|
+
get: () => from[key],
|
|
10
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
|
+
});
|
|
12
|
+
return to;
|
|
13
|
+
},
|
|
14
|
+
__reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
+
value: !0
|
|
17
|
+
}), mod);
|
|
13
18
|
var index_exports = {};
|
|
14
19
|
module.exports = __toCommonJS(index_exports);
|
|
15
|
-
__reExport(index_exports, require("./RemoveScroll"), module.exports);
|
|
16
|
-
|
|
17
|
-
0 && (module.exports = {
|
|
18
|
-
...require("./RemoveScroll")
|
|
19
|
-
});
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
20
|
+
__reExport(index_exports, require("./RemoveScroll.native.js"), module.exports);
|
|
21
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/index.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,2BAAd;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA","ignoreList":[]}
|
|
@@ -1,42 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
7
|
var __export = (target, all) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: !0
|
|
22
|
+
}), mod);
|
|
16
23
|
var useDisableScroll_exports = {};
|
|
17
24
|
__export(useDisableScroll_exports, {
|
|
18
25
|
useDisableBodyScroll: () => useDisableBodyScroll
|
|
19
26
|
});
|
|
20
27
|
module.exports = __toCommonJS(useDisableScroll_exports);
|
|
21
|
-
var import_react = require("react"),
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
});
|
|
42
|
-
//# sourceMappingURL=useDisableScroll.js.map
|
|
28
|
+
var import_react = require("react"),
|
|
29
|
+
canUseDOM = function () {
|
|
30
|
+
return typeof window < "u" && !!window.document && !!window.document.createElement;
|
|
31
|
+
},
|
|
32
|
+
refCount = 0,
|
|
33
|
+
previousBodyStyle = null,
|
|
34
|
+
useDisableBodyScroll = function (enabled) {
|
|
35
|
+
(0, import_react.useEffect)(function () {
|
|
36
|
+
if (!(!enabled || !canUseDOM())) {
|
|
37
|
+
var bodyEl = document.documentElement;
|
|
38
|
+
return ++refCount === 1 && (previousBodyStyle = {
|
|
39
|
+
scrollbarGutter: bodyEl.style.scrollbarGutter,
|
|
40
|
+
overflow: bodyEl.style.overflow
|
|
41
|
+
}, bodyEl.style.scrollbarGutter = "stable", bodyEl.style.overflow = "hidden"), function () {
|
|
42
|
+
--refCount === 0 && previousBodyStyle && (Object.assign(bodyEl.style, previousBodyStyle), previousBodyStyle = null);
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
}, [enabled]);
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=useDisableScroll.native.js.map
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/useDisableScroll.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0B,kBACtB,YAAY,WAAW;AACvB,SAAO,OAAO,SAAW,OAAe,CAAC,CAAC,OAAO,YAAY,CAAC,CAAC,OAAO,SAAS;AACnF,GACI,WAAW,GACX,oBAAoB,MACb,uBAAuB,SAAS,SAAS;AAChD,8BAAU,WAAW;AACjB,QAAI,GAAC,WAAW,CAAC,UAAU,IAI3B;AAAA,UAAI,SAAS,SAAS;AACtB,aAAI,EAAE,aAAa,MACf,oBAAoB;AAAA,QAChB,iBAAiB,OAAO,MAAM;AAAA,QAC9B,UAAU,OAAO,MAAM;AAAA,MAC3B,GACA,OAAO,MAAM,kBAAkB,UAC/B,OAAO,MAAM,WAAW,WAErB,WAAW;AACd,QAAI,EAAE,aAAa,KAAK,sBACpB,OAAO,OAAO,OAAO,OAAO,iBAAiB,GAC7C,oBAAoB;AAAA,MAE5B;AAAA;AAAA,EACJ,GAAG;AAAA,IACC;AAAA,EACJ,CAAC;AACL;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","useDisableScroll_exports","__export","useDisableBodyScroll","module","exports","import_react","require","canUseDOM","window","document","createElement","refCount","previousBodyStyle","enabled","useEffect","bodyEl","documentElement","scrollbarGutter","style","overflow","Object","assign"],"sources":["../../src/useDisableScroll.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,wBAAA;AAAAC,QAAA,CAAAD,wBAAA;EAAAE,oBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAA0B,CAAAK,wBAAA;AAE1B,IAAAK,YAAM,GAAYC,OAChB,QAAO;EAAAC,SAAW,GAAiB,SAAAA,CAAA,EAAO;IAE5C,OAAI,OAAWC,MACX,YAAAA,MAA0E,CAAAC,QAAA,MAAAD,MAAA,CAAAC,QAAA,CAAAC,aAAA;EAEvE;EAAAC,QAAM;EAAAC,iBAAwB;EAA2BV,oBAAA,YAAAA,CAAAW,OAAA;IAC9D,IAAAR,YAAA,CAAAS,SAAA,EAAU,YAAM;MACd,IAAI,EAAC,CAAAD,OAAA,IAAY,CAAAN,SAAU;QACzB,IAAAQ,MAAA,GAAAN,QAAA,CAAAO,eAAA;QAIF,OAAM,EAAAL,QAAS,KAAS,MAAAC,iBAAA;UAExBK,eAAM,EAAAF,MAAa,CACjBG,KAAA,CAAAD,eAAoB;UAClBE,QAAA,EAAAJ,MAAiB,CAAAG,KAAO,CAAAC;QACxB,GAAAJ,MAAA,CAAUG,KAAA,CAAAD,eAAa,aAAAF,MAAA,CAAAG,KAAA,CAAAC,QAAA;UAEzB,EAAAR,QAAO,KAAM,KAAAC,iBAAkB,KAC/BQ,MAAO,CAAAC,MAAM,CAAAN,MAAA,CAAAG,KAAW,EAAAN,iBAGb,GAAAA,iBAAA;QACP;MAIN;IACF,GAAG,CACLC,OAAA,C","ignoreList":[]}
|
|
@@ -1,9 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: !0
|
|
22
|
+
}), mod);
|
|
23
|
+
var RemoveScroll_native_exports = {};
|
|
24
|
+
__export(RemoveScroll_native_exports, {
|
|
25
|
+
RemoveScroll: () => RemoveScroll,
|
|
26
|
+
getAllowedScrollableNode: () => getAllowedScrollableNode
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(RemoveScroll_native_exports);
|
|
29
|
+
var RemoveScroll = function (props) {
|
|
30
|
+
return props.children;
|
|
31
|
+
},
|
|
32
|
+
getAllowedScrollableNode = function () {};
|
|
9
33
|
//# sourceMappingURL=RemoveScroll.native.js.map
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/RemoveScroll.native.tsx"],
|
|
4
|
-
"mappings": "AAAO,IAAI,eAAe,SAAS,OAAO;AACtC,SAAO,MAAM;AACjB,GACW,2BAA2B,WAAW;AAAC;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
1
|
+
{"version":3,"names":["RemoveScroll_native_exports","__export","RemoveScroll","getAllowedScrollableNode","module","exports","__toCommonJS","props","children"],"sources":["../../src/RemoveScroll.native.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,2BAAA;AAAAC,QAAA,CAAAD,2BAAA;EAAAE,YAAA,EAAAA,CAAA,KAAAA,YAAA;EAAAC,wBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAN,2BAAA;AAAO,IAAIE,YAAA,GAAe,SAAAA,CAASK,KAAA,EAAO;IACtC,OAAOA,KAAA,CAAMC,QAAA;EACjB;EACWL,wBAAA,GAA2B,SAAAA,CAAA,EAAW,CAAC","ignoreList":[]}
|
package/dist/jsx/index.native.js
CHANGED
|
@@ -1,2 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __copyProps = (to, from, except, desc) => {
|
|
8
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
9
|
+
get: () => from[key],
|
|
10
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
|
+
});
|
|
12
|
+
return to;
|
|
13
|
+
},
|
|
14
|
+
__reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
+
value: !0
|
|
17
|
+
}), mod);
|
|
18
|
+
var index_exports = {};
|
|
19
|
+
module.exports = __toCommonJS(index_exports);
|
|
20
|
+
__reExport(index_exports, require("./RemoveScroll.native.js"), module.exports);
|
|
21
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -1,22 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: !0
|
|
22
|
+
}), mod);
|
|
23
|
+
var useDisableScroll_exports = {};
|
|
24
|
+
__export(useDisableScroll_exports, {
|
|
25
|
+
useDisableBodyScroll: () => useDisableBodyScroll
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(useDisableScroll_exports);
|
|
28
|
+
var import_react = require("react"),
|
|
29
|
+
canUseDOM = function () {
|
|
30
|
+
return typeof window < "u" && !!window.document && !!window.document.createElement;
|
|
31
|
+
},
|
|
32
|
+
refCount = 0,
|
|
33
|
+
previousBodyStyle = null,
|
|
34
|
+
useDisableBodyScroll = function (enabled) {
|
|
35
|
+
(0, import_react.useEffect)(function () {
|
|
36
|
+
if (!(!enabled || !canUseDOM())) {
|
|
37
|
+
var bodyEl = document.documentElement;
|
|
38
|
+
return ++refCount === 1 && (previousBodyStyle = {
|
|
39
|
+
scrollbarGutter: bodyEl.style.scrollbarGutter,
|
|
40
|
+
overflow: bodyEl.style.overflow
|
|
41
|
+
}, bodyEl.style.scrollbarGutter = "stable", bodyEl.style.overflow = "hidden"), function () {
|
|
42
|
+
--refCount === 0 && previousBodyStyle && (Object.assign(bodyEl.style, previousBodyStyle), previousBodyStyle = null);
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
}, [enabled]);
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=useDisableScroll.native.js.map
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/useDisableScroll.ts"],
|
|
4
|
-
"mappings": "AAAA,SAAS,iBAAiB;AAC1B,IAAI,YAAY,WAAW;AACvB,SAAO,OAAO,SAAW,OAAe,CAAC,CAAC,OAAO,YAAY,CAAC,CAAC,OAAO,SAAS;AACnF,GACI,WAAW,GACX,oBAAoB,MACb,uBAAuB,SAAS,SAAS;AAChD,YAAU,WAAW;AACjB,QAAI,GAAC,WAAW,CAAC,UAAU,IAI3B;AAAA,UAAI,SAAS,SAAS;AACtB,aAAI,EAAE,aAAa,MACf,oBAAoB;AAAA,QAChB,iBAAiB,OAAO,MAAM;AAAA,QAC9B,UAAU,OAAO,MAAM;AAAA,MAC3B,GACA,OAAO,MAAM,kBAAkB,UAC/B,OAAO,MAAM,WAAW,WAErB,WAAW;AACd,QAAI,EAAE,aAAa,KAAK,sBACpB,OAAO,OAAO,OAAO,OAAO,iBAAiB,GAC7C,oBAAoB;AAAA,MAE5B;AAAA;AAAA,EACJ,GAAG;AAAA,IACC;AAAA,EACJ,CAAC;AACL;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","useDisableScroll_exports"],"sources":["../../src/useDisableScroll.ts"],"sourcesContent":[null],"mappings":"AAAA,YAAS;;AAET,IAAAA,SAAM,GAAAC,MAAY,CAAAC,cACT;AAET,IAAIC,gBACA,GAAAF,MAAA,CAAAG,wBAA0E;AAEvE,IAAAC,iBAAM,GAAAJ,MAAwB,CAAAK,mBAA2B;AAC9D,IAAAC,YAAU,GAAMN,MAAA,CAAAO,SAAA,CAAAC,cAAA;AACd,IAAAC,QAAK,GAAAA,CAAAC,MAAY,EAAAC,GAAA,KAAU;IACzB,SAAAC,IAAA,IAAAD,GAAA,EAIFZ,SAAM,CAAAW,MAAS,EAAAE,IAAA,EAAS;MAAAC,GAAA,EAAAF,GAAA,CAAAC,IAAA;MAAAE,UAAA;IAAA;EAExB;EAAAC,WAAM,GAAAA,CAAAC,EAAA,EAAAC,IAAa,EAAAC,MACjB,EAAAC,IAAA;IAAoB,IAClBF,IAAA,WAAAA,IAAiB,YAAa,WAAAA,IAAA,qBAC9B,IAAAG,GAAU,IAAAhB,iBAAa,CAAAa,IAAA,GACzB,CACAX,YAAO,CAAMe,IAAA,CAAAL,EAAA,EAAAI,GAAA,KAAAA,GAAkB,KAAAF,MAC/B,IAAOnB,SAAM,CAAAiB,EAAA,EAAAI,GAAW;MAAAP,GAAA,EAAAA,CAAA,KAGnBI,IAAM,CAAAG,GAAA;MAAAN,UAAA,IAAAK,IAAA,GAAAjB,gBAAA,CAAAe,IAAA,EAAAG,GAAA,MAAAD,IAAA,CAAAL;IAAA;IACX,OAAME,EAAA;EAEgB;AAExB,IACFM,YAAY,GAAAC,GAAA,IAAAR,WAAA,CAAAhB,SAAA;EAAAyB,KAAA;AAAA,IAAAD,GAAA;AACd,IAAAE,wBAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/remove-scroll",
|
|
3
|
-
"version": "1.135.
|
|
3
|
+
"version": "1.135.5",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"types": "./types/index.d.ts",
|
|
5
6
|
"main": "dist/cjs",
|
|
6
7
|
"module": "dist/esm",
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
}
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|
|
35
|
-
"@tamagui/build": "1.135.
|
|
36
|
+
"@tamagui/build": "1.135.5",
|
|
36
37
|
"react": "*"
|
|
37
38
|
},
|
|
38
39
|
"publishConfig": {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"mappings": "AAAA,cAAc,iBAAiB
|
|
3
|
-
"names": [
|
|
4
|
-
"props: RemoveScrollProps"
|
|
5
|
-
],
|
|
2
|
+
"mappings": "AAAA,cAAc,iBAAiB;AAG/B,YAAY,oBAAoB;CAC9B;CACA,WAAW,MAAM;;AAGnB,OAAO,cAAM,eAAgB,OAAO,sBAAoB",
|
|
3
|
+
"names": [],
|
|
6
4
|
"sources": [
|
|
7
5
|
"src/RemoveScroll.tsx"
|
|
8
6
|
],
|