@vxrn/safe-area 1.1.537 → 1.1.539
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/.turbo/turbo-build.log +1 -1
- package/dist/cjs/InitialWindow.native.js +19 -16
- package/dist/cjs/InitialWindow.native.js.map +1 -6
- package/dist/cjs/NativeSafeAreaProvider.native.js +74 -54
- package/dist/cjs/NativeSafeAreaProvider.native.js.map +1 -6
- package/dist/cjs/SafeArea-types.native.js +9 -5
- package/dist/cjs/SafeArea-types.native.js.map +1 -6
- package/dist/cjs/SafeAreaContext.native.js +77 -55
- package/dist/cjs/SafeAreaContext.native.js.map +1 -6
- package/dist/cjs/SafeAreaView.native.js +97 -62
- package/dist/cjs/SafeAreaView.native.js.map +1 -6
- package/dist/cjs/index.native.js +15 -16
- package/dist/cjs/index.native.js.map +1 -6
- package/package.json +2 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
built @vxrn/safe-area in
|
|
1
|
+
built @vxrn/safe-area in 905 ms
|
|
@@ -1,28 +1,31 @@
|
|
|
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 InitialWindow_exports = {};
|
|
17
24
|
__export(InitialWindow_exports, {
|
|
18
25
|
initialWindowMetrics: () => initialWindowMetrics,
|
|
19
26
|
initialWindowSafeAreaInsets: () => initialWindowSafeAreaInsets
|
|
20
27
|
});
|
|
21
28
|
module.exports = __toCommonJS(InitialWindow_exports);
|
|
22
|
-
var initialWindowMetrics = null,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
initialWindowMetrics,
|
|
26
|
-
initialWindowSafeAreaInsets
|
|
27
|
-
});
|
|
28
|
-
//# sourceMappingURL=InitialWindow.js.map
|
|
29
|
+
var initialWindowMetrics = null,
|
|
30
|
+
initialWindowSafeAreaInsets = null;
|
|
31
|
+
//# sourceMappingURL=InitialWindow.native.js.map
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/InitialWindow.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAEA;;;;;;AAAO,IAAMA,uBAAuC,MAKvCC,8BAAiD;",
|
|
5
|
-
"names": ["initialWindowMetrics", "initialWindowSafeAreaInsets"]
|
|
6
|
-
}
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","InitialWindow_exports","__export","initialWindowMetrics","initialWindowSafeAreaInsets","module","exports"],"sources":["../../src/InitialWindow.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,qBAAA;AAAAC,QAAA,CAAAD,qBAAA;EAAAE,oBAAA,EAAAA,CAAA,KAAAA,oBAAA;EAAAC,2BAAA,EAAAA,CAAA,KAAAA;AAAA;AAEOC,MAAM,CAAAC,OAAA,GAAAV,YAAuC,CAAAK,qBAKvC","ignoreList":[]}
|
|
@@ -1,56 +1,80 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf,
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf,
|
|
8
|
+
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
9
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: !0
|
|
13
|
+
});
|
|
14
|
+
},
|
|
15
|
+
__copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
16
22
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
23
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
24
|
// file that has been converted to a CommonJS file using a Babel-
|
|
19
25
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
26
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
22
|
-
|
|
23
|
-
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
+
value: mod,
|
|
29
|
+
enumerable: !0
|
|
30
|
+
}) : target, mod)),
|
|
31
|
+
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
+
value: !0
|
|
33
|
+
}), mod);
|
|
24
34
|
var NativeSafeAreaProvider_exports = {};
|
|
25
35
|
__export(NativeSafeAreaProvider_exports, {
|
|
26
36
|
NativeSafeAreaProvider: () => NativeSafeAreaProvider
|
|
27
37
|
});
|
|
28
38
|
module.exports = __toCommonJS(NativeSafeAreaProvider_exports);
|
|
29
|
-
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
40
|
+
React = __toESM(require("react"), 1),
|
|
41
|
+
import_react_native = require("react-native"),
|
|
42
|
+
CSSTransitions = {
|
|
43
|
+
WebkitTransition: "webkitTransitionEnd",
|
|
44
|
+
Transition: "transitionEnd",
|
|
45
|
+
MozTransition: "transitionend",
|
|
46
|
+
MSTransition: "msTransitionEnd",
|
|
47
|
+
OTransition: "oTransitionEnd"
|
|
48
|
+
};
|
|
36
49
|
function NativeSafeAreaProvider(param) {
|
|
37
|
-
var {
|
|
38
|
-
|
|
50
|
+
var {
|
|
51
|
+
children,
|
|
52
|
+
style,
|
|
53
|
+
onInsetsChange
|
|
54
|
+
} = param;
|
|
55
|
+
React.useEffect(function () {
|
|
39
56
|
if (!(typeof document > "u")) {
|
|
40
57
|
var element = createContextElement();
|
|
41
58
|
document.body.appendChild(element);
|
|
42
|
-
var onEnd = function() {
|
|
43
|
-
var {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
59
|
+
var onEnd = function () {
|
|
60
|
+
var {
|
|
61
|
+
paddingTop,
|
|
62
|
+
paddingBottom,
|
|
63
|
+
paddingLeft,
|
|
64
|
+
paddingRight
|
|
65
|
+
} = window.getComputedStyle(element),
|
|
66
|
+
insets = {
|
|
67
|
+
top: paddingTop ? Number.parseInt(paddingTop, 10) : 0,
|
|
68
|
+
bottom: paddingBottom ? Number.parseInt(paddingBottom, 10) : 0,
|
|
69
|
+
left: paddingLeft ? Number.parseInt(paddingLeft, 10) : 0,
|
|
70
|
+
right: paddingRight ? Number.parseInt(paddingRight, 10) : 0
|
|
71
|
+
},
|
|
72
|
+
frame = {
|
|
73
|
+
x: 0,
|
|
74
|
+
y: 0,
|
|
75
|
+
width: document.documentElement.offsetWidth,
|
|
76
|
+
height: document.documentElement.offsetHeight
|
|
77
|
+
};
|
|
54
78
|
onInsetsChange({
|
|
55
79
|
nativeEvent: {
|
|
56
80
|
insets,
|
|
@@ -58,13 +82,11 @@ function NativeSafeAreaProvider(param) {
|
|
|
58
82
|
}
|
|
59
83
|
});
|
|
60
84
|
};
|
|
61
|
-
return element.addEventListener(getSupportedTransitionEvent(), onEnd), onEnd(), function() {
|
|
85
|
+
return element.addEventListener(getSupportedTransitionEvent(), onEnd), onEnd(), function () {
|
|
62
86
|
document.body.removeChild(element), element.removeEventListener(getSupportedTransitionEvent(), onEnd);
|
|
63
87
|
};
|
|
64
88
|
}
|
|
65
|
-
}, [
|
|
66
|
-
onInsetsChange
|
|
67
|
-
]);
|
|
89
|
+
}, [onInsetsChange]);
|
|
68
90
|
var finalStyle = style || {
|
|
69
91
|
flex: 1,
|
|
70
92
|
width: "100%",
|
|
@@ -72,40 +94,38 @@ function NativeSafeAreaProvider(param) {
|
|
|
72
94
|
maxHeight: "100%",
|
|
73
95
|
maxWidth: "100%"
|
|
74
96
|
};
|
|
75
|
-
return /* @__PURE__ */
|
|
97
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.View, {
|
|
76
98
|
style: finalStyle,
|
|
77
99
|
children
|
|
78
100
|
});
|
|
79
101
|
}
|
|
80
102
|
var _supportedTransitionEvent = null;
|
|
81
103
|
function getSupportedTransitionEvent() {
|
|
82
|
-
if (_supportedTransitionEvent != null)
|
|
83
|
-
return _supportedTransitionEvent;
|
|
104
|
+
if (_supportedTransitionEvent != null) return _supportedTransitionEvent;
|
|
84
105
|
var element = document.createElement("invalidtype");
|
|
85
106
|
_supportedTransitionEvent = CSSTransitions.Transition;
|
|
86
|
-
for (var key in CSSTransitions)
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
107
|
+
for (var key in CSSTransitions) if (element.style[key] !== void 0) {
|
|
108
|
+
_supportedTransitionEvent = CSSTransitions[key];
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
91
111
|
return _supportedTransitionEvent;
|
|
92
112
|
}
|
|
93
113
|
var _supportedEnv = null;
|
|
94
114
|
function getSupportedEnv() {
|
|
95
|
-
if (_supportedEnv !== null)
|
|
96
|
-
|
|
97
|
-
|
|
115
|
+
if (_supportedEnv !== null) return _supportedEnv;
|
|
116
|
+
var {
|
|
117
|
+
CSS
|
|
118
|
+
} = window;
|
|
98
119
|
return CSS && CSS.supports && CSS.supports("top: constant(safe-area-inset-top)") ? _supportedEnv = "constant" : _supportedEnv = "env", _supportedEnv;
|
|
99
120
|
}
|
|
100
121
|
function getInset(side) {
|
|
101
122
|
return `${getSupportedEnv()}(safe-area-inset-${side})`;
|
|
102
123
|
}
|
|
103
124
|
function createContextElement() {
|
|
104
|
-
var element = document.createElement("div"),
|
|
125
|
+
var element = document.createElement("div"),
|
|
126
|
+
{
|
|
127
|
+
style
|
|
128
|
+
} = element;
|
|
105
129
|
return style.position = "fixed", style.left = "0", style.top = "0", style.width = "0", style.height = "0", style.zIndex = "-1", style.overflow = "hidden", style.visibility = "hidden", style.transitionDuration = "0.05s", style.transitionProperty = "padding", style.transitionDelay = "0s", style.paddingTop = getInset("top"), style.paddingBottom = getInset("bottom"), style.paddingLeft = getInset("left"), style.paddingRight = getInset("right"), element;
|
|
106
130
|
}
|
|
107
|
-
|
|
108
|
-
0 && (module.exports = {
|
|
109
|
-
NativeSafeAreaProvider
|
|
110
|
-
});
|
|
111
|
-
//# sourceMappingURL=NativeSafeAreaProvider.js.map
|
|
131
|
+
//# sourceMappingURL=NativeSafeAreaProvider.native.js.map
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/NativeSafeAreaProvider.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;AAAsB,yBAAA,8BAEtB,QAAuB,8BAEvB,sBAAqB,yBAUfA,iBAAyC;EAC7CC,kBAAkB;EAClBC,YAAY;EACZC,eAAe;EACfC,cAAc;EACdC,aAAa;AACf;AAEO,SAASC,uBAAuB,OAIT;MAJS,EACrCC,UACAC,OACAC,eAAc,IAHuB;AAKrCC,QAAMC,UAAU,WAAA;AAEd,QAAI,SAAOC,WAAa,MAIxB;UAAMC,UAAUC,qBAAAA;AAChBF,eAASG,KAAKC,YAAYH,OAAAA;AAC1B,UAAMI,QAAQ,WAAA;AACZ,YAAM,EAAEC,YAAYC,eAAeC,aAAaC,aAAY,IAC1DC,OAAOC,iBAAiBV,OAAAA,GAEpBW,SAAS;UACbC,KAAKP,aAAaQ,OAAOC,SAAST,YAAY,EAAA,IAAM;UACpDU,QAAQT,gBAAgBO,OAAOC,SAASR,eAAe,EAAA,IAAM;UAC7DU,MAAMT,cAAcM,OAAOC,SAASP,aAAa,EAAA,IAAM;UACvDU,OAAOT,eAAeK,OAAOC,SAASN,cAAc,EAAA,IAAM;QAC5D,GACMU,QAAQ;UACZC,GAAG;UACHC,GAAG;UACHC,OAAOtB,SAASuB,gBAAgBC;UAChCC,QAAQzB,SAASuB,gBAA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S,MACfrD,MAAMsD,WAAW,UACjBtD,MAAMuD,aAAa,UAEnBvD,MAAMwD,qBAAqB,SAC3BxD,MAAMyD,qBAAqB,WAC3BzD,MAAM0D,kBAAkB,MACxB1D,MAAMU,aAAawC,SAAS,KAAA,GAC5BlD,MAAMW,gBAAgBuC,SAAS,QAAA,GAC/BlD,MAAMY,cAAcsC,SAAS,MAAA,GAC7BlD,MAAMa,eAAeqC,SAAS,OAAA,GACvB7C;AACT;",
|
|
5
|
-
"names": ["CSSTransitions", "WebkitTransition", "Transition", "MozTransition", "MSTransition", "OTransition", "NativeSafeAreaProvider", "children", "style", "onInsetsChange", "React", "useEffect", "document", "element", "createContextElement", "body", "appendChild", "onEnd", "paddingTop", "paddingBottom", "paddingLeft", "paddingRight", "window", "getComputedStyle", "insets", "top", "Number", "parseInt", "bottom", "left", "right", "frame", "x", "y", "width", "documentElement", "offsetWidth", "height", "offsetHeight", "nativeEvent", "addEventListener", "getSupportedTransitionEvent", "removeChild", "removeEventListener", "finalStyle", "flex", "maxHeight", "maxWidth", "_jsx", "View", "_supportedTransitionEvent", "createElement", "key", "undefined", "_supportedEnv", "getSupportedEnv", "CSS", "supports", "getInset", "side", "position", "zIndex", "overflow", "visibility", "transitionDuration", "transitionProperty", "transitionDelay"]
|
|
6
|
-
}
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","NativeSafeAreaProvider_exports","__export","NativeSafeAreaProvider","module","exports","import_jsx_runtime","require","React","__toESM","import_react_native","CSSTransitions","WebkitTransition","Transition","MozTransition","MSTransition","OTransition","param","children","style","onInsetsChange","useEffect","document","element","createContextElement","body","appendChild","onEnd","paddingTop","paddingBottom","paddingLeft","paddingRight","window","getComputedStyle","insets","top","Number","parseInt","bottom","left","right","frame","x","y","width","documentElement","offsetWidth","height","offsetHeight","nativeEvent","addEventListener","getSupportedTransitionEvent","removeChild","removeEventListener","finalStyle","flex","maxHeight","maxWidth","jsx","View","_supportedTransitionEvent","createElement","key","_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;
|
|
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
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
8
|
-
|
|
9
|
-
|
|
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
|
+
});
|
|
10
12
|
return to;
|
|
11
13
|
};
|
|
12
|
-
var __toCommonJS =
|
|
14
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
15
|
+
value: !0
|
|
16
|
+
}), mod);
|
|
13
17
|
var SafeArea_types_exports = {};
|
|
14
18
|
module.exports = __toCommonJS(SafeArea_types_exports);
|
|
15
|
-
//# sourceMappingURL=SafeArea-types.js.map
|
|
19
|
+
//# sourceMappingURL=SafeArea-types.native.js.map
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/SafeArea-types.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;AA2CA;;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","SafeArea_types_exports"],"sources":["../../src/SafeArea-types.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,sBAAA","ignoreList":[]}
|
|
@@ -1,26 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf,
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf,
|
|
8
|
+
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
9
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: !0
|
|
13
|
+
});
|
|
14
|
+
},
|
|
15
|
+
__copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
16
22
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
23
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
24
|
// file that has been converted to a CommonJS file using a Babel-
|
|
19
25
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
26
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
22
|
-
|
|
23
|
-
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
+
value: mod,
|
|
29
|
+
enumerable: !0
|
|
30
|
+
}) : target, mod)),
|
|
31
|
+
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
+
value: !0
|
|
33
|
+
}), mod);
|
|
24
34
|
var SafeAreaContext_exports = {};
|
|
25
35
|
__export(SafeAreaContext_exports, {
|
|
26
36
|
SafeAreaConsumer: () => SafeAreaConsumer,
|
|
@@ -34,36 +44,61 @@ __export(SafeAreaContext_exports, {
|
|
|
34
44
|
withSafeAreaInsets: () => withSafeAreaInsets
|
|
35
45
|
});
|
|
36
46
|
module.exports = __toCommonJS(SafeAreaContext_exports);
|
|
37
|
-
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
47
|
+
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
48
|
+
React = __toESM(require("react"), 1),
|
|
49
|
+
import_react_native = require("react-native"),
|
|
50
|
+
import_NativeSafeAreaProvider = require("./NativeSafeAreaProvider.native.js"),
|
|
51
|
+
isDev = process.env.NODE_ENV !== "production",
|
|
52
|
+
SafeAreaInsetsContext = /* @__PURE__ */React.createContext(null);
|
|
38
53
|
isDev && (SafeAreaInsetsContext.displayName = "SafeAreaInsetsContext");
|
|
39
|
-
var SafeAreaFrameContext = /* @__PURE__ */
|
|
54
|
+
var SafeAreaFrameContext = /* @__PURE__ */React.createContext(null);
|
|
40
55
|
isDev && (SafeAreaFrameContext.displayName = "SafeAreaFrameContext");
|
|
41
56
|
function SafeAreaProvider(param) {
|
|
42
|
-
var {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
var {
|
|
58
|
+
children,
|
|
59
|
+
initialMetrics,
|
|
60
|
+
initialSafeAreaInsets,
|
|
61
|
+
...others
|
|
62
|
+
} = param,
|
|
63
|
+
parentInsets = useParentSafeAreaInsets(),
|
|
64
|
+
parentFrame = useParentSafeAreaFrame(),
|
|
65
|
+
_initialMetrics_insets,
|
|
66
|
+
_ref,
|
|
67
|
+
_ref1,
|
|
68
|
+
[insets, setInsets] = React.useState((_ref1 = (_ref = (_initialMetrics_insets = initialMetrics?.insets) !== null && _initialMetrics_insets !== void 0 ? _initialMetrics_insets : initialSafeAreaInsets) !== null && _ref !== void 0 ? _ref : parentInsets) !== null && _ref1 !== void 0 ? _ref1 : null),
|
|
69
|
+
_initialMetrics_frame,
|
|
70
|
+
_ref2,
|
|
71
|
+
[frame, setFrame] = React.useState((_ref2 = (_initialMetrics_frame = initialMetrics?.frame) !== null && _initialMetrics_frame !== void 0 ? _initialMetrics_frame : parentFrame) !== null && _ref2 !== void 0 ? _ref2 : {
|
|
72
|
+
// Backwards compat so we render anyway if we don't have frame.
|
|
73
|
+
x: 0,
|
|
74
|
+
y: 0,
|
|
75
|
+
width: import_react_native.Dimensions.get("window").width,
|
|
76
|
+
height: import_react_native.Dimensions.get("window").height
|
|
77
|
+
}),
|
|
78
|
+
onInsetsChange = React.useCallback(function (event) {
|
|
79
|
+
var {
|
|
80
|
+
nativeEvent: {
|
|
81
|
+
frame: nextFrame,
|
|
82
|
+
insets: nextInsets
|
|
83
|
+
}
|
|
84
|
+
} = event;
|
|
85
|
+
React.startTransition(function () {
|
|
86
|
+
setFrame(function (curFrame) {
|
|
87
|
+
return (
|
|
88
|
+
// Backwards compat with old native code that won't send frame.
|
|
89
|
+
nextFrame && (nextFrame.height !== curFrame.height || nextFrame.width !== curFrame.width || nextFrame.x !== curFrame.x || nextFrame.y !== curFrame.y) ? nextFrame : curFrame
|
|
90
|
+
);
|
|
91
|
+
}), setInsets(function (curInsets) {
|
|
92
|
+
return !curInsets || nextInsets.bottom !== curInsets.bottom || nextInsets.left !== curInsets.left || nextInsets.right !== curInsets.right || nextInsets.top !== curInsets.top ? nextInsets : curInsets;
|
|
93
|
+
});
|
|
58
94
|
});
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_NativeSafeAreaProvider.NativeSafeAreaProvider, {
|
|
95
|
+
}, []);
|
|
96
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_NativeSafeAreaProvider.NativeSafeAreaProvider, {
|
|
62
97
|
onInsetsChange,
|
|
63
98
|
...others,
|
|
64
|
-
children: /* @__PURE__ */
|
|
99
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(SafeAreaFrameContext.Provider, {
|
|
65
100
|
value: frame,
|
|
66
|
-
children: /* @__PURE__ */
|
|
101
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(SafeAreaInsetsContext.Provider, {
|
|
67
102
|
value: insets,
|
|
68
103
|
children
|
|
69
104
|
})
|
|
@@ -79,20 +114,18 @@ function useParentSafeAreaFrame() {
|
|
|
79
114
|
var NO_INSETS_ERROR = "No safe area value available. Make sure you are rendering `<SafeAreaProvider>` at the top of your app.";
|
|
80
115
|
function useSafeAreaInsets() {
|
|
81
116
|
var insets = React.useContext(SafeAreaInsetsContext);
|
|
82
|
-
if (insets == null)
|
|
83
|
-
throw new Error(NO_INSETS_ERROR);
|
|
117
|
+
if (insets == null) throw new Error(NO_INSETS_ERROR);
|
|
84
118
|
return insets;
|
|
85
119
|
}
|
|
86
120
|
function useSafeAreaFrame() {
|
|
87
121
|
var frame = React.useContext(SafeAreaFrameContext);
|
|
88
|
-
if (frame == null)
|
|
89
|
-
throw new Error(NO_INSETS_ERROR);
|
|
122
|
+
if (frame == null) throw new Error(NO_INSETS_ERROR);
|
|
90
123
|
return frame;
|
|
91
124
|
}
|
|
92
125
|
function withSafeAreaInsets(WrappedComponent) {
|
|
93
|
-
return /* @__PURE__ */
|
|
126
|
+
return /* @__PURE__ */React.forwardRef(function (props, ref) {
|
|
94
127
|
var insets = useSafeAreaInsets();
|
|
95
|
-
return /* @__PURE__ */
|
|
128
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(WrappedComponent, {
|
|
96
129
|
...props,
|
|
97
130
|
insets,
|
|
98
131
|
ref
|
|
@@ -102,17 +135,6 @@ function withSafeAreaInsets(WrappedComponent) {
|
|
|
102
135
|
function useSafeArea() {
|
|
103
136
|
return useSafeAreaInsets();
|
|
104
137
|
}
|
|
105
|
-
var SafeAreaConsumer = SafeAreaInsetsContext.Consumer,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
SafeAreaConsumer,
|
|
109
|
-
SafeAreaContext,
|
|
110
|
-
SafeAreaFrameContext,
|
|
111
|
-
SafeAreaInsetsContext,
|
|
112
|
-
SafeAreaProvider,
|
|
113
|
-
useSafeArea,
|
|
114
|
-
useSafeAreaFrame,
|
|
115
|
-
useSafeAreaInsets,
|
|
116
|
-
withSafeAreaInsets
|
|
117
|
-
});
|
|
118
|
-
//# sourceMappingURL=SafeAreaContext.js.map
|
|
138
|
+
var SafeAreaConsumer = SafeAreaInsetsContext.Consumer,
|
|
139
|
+
SafeAreaContext = SafeAreaInsetsContext;
|
|
140
|
+
//# sourceMappingURL=SafeAreaContext.native.js.map
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/SafeAreaContext.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAAA,QAAuB,8BACvB,sBAA2B,yBAC3B,gCAAuC,qCAGjCA,QAAQC,QAAQC,IAAIC,aAAa,cAE1BC,wBAAwBC,sBAAMC,cAAiC,IAAA;AACxEN,UACFI,sBAAsBG,cAAc;AAG/B,IAAMC,uBAAuBH,sBAAMC,cAA2B,IAAA;AACjEN,UACFQ,qBAAqBD,cAAc;AAY9B,SAASE,iBAAiB,OAKT;MALS,EAC/BC,UACAC,gBACAC,uBACA,GAAGC,OAAAA,IAJ4B,OAMzBC,eAAeC,wBAAAA,GACfC,cAAcC,uBAAAA,GAElBN,wBAAAA,MAAAA,OADI,CAACO,QAAQC,SAAAA,IAAad,MAAMe,UAChCT,SAAAA,QAAAA,yBAAAA,kBAAAA,OAAAA,SAAAA,eAAgBO,YAA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AEA,SAASa,yBAAAA;AACP,SAAOZ,MAAMyC,WAAWtC,oBAAAA;AAC1B;AAEA,IAAMuC,kBACJ;AAEK,SAASC,oBAAAA;AACd,MAAM9B,SAASb,MAAMyC,WAAW1C,qBAAAA;AAChC,MAAIc,UAAU;AACZ,UAAM,IAAI+B,MAAMF,eAAAA;AAElB,SAAO7B;AACT;AAEO,SAASgC,mBAAAA;AACd,MAAM7B,QAAQhB,MAAMyC,WAAWtC,oBAAAA;AAC/B,MAAIa,SAAS;AACX,UAAM,IAAI4B,MAAMF,eAAAA;AAElB,SAAO1B;AACT;AAMO,SAAS8B,mBACdC,kBAAkE;AAElE,SAAO/C,sBAAMgD,WAAW,SAACC,OAAOC,KAAAA;AAC9B,QAAMrC,SAAS8B,kBAAAA;AAEf,WAAO,uCAAAN,KAACU,kBAAAA;MAAkB,GAAGE;MAAOpC;MAAgBqC;;EACtD,CAAA;AACF;AAKO,SAASC,cAAAA;AACd,SAAOR,kBAAAA;AACT;AAKO,IAAMS,mBAAmBrD,sBAAsBsD,UAKzCC,kBAAkBvD;",
|
|
5
|
-
"names": ["isDev", "process", "env", "NODE_ENV", "SafeAreaInsetsContext", "React", "createContext", "displayName", "SafeAreaFrameContext", "SafeAreaProvider", "children", "initialMetrics", "initialSafeAreaInsets", "others", "parentInsets", "useParentSafeAreaInsets", "parentFrame", "useParentSafeAreaFrame", "insets", "setInsets", "useState", "frame", "setFrame", "x", "y", "width", "Dimensions", "get", "height", "onInsetsChange", "useCallback", "event", "nativeEvent", "nextFrame", "nextInsets", "startTransition", "curFrame", "curInsets", "bottom", "left", "right", "top", "_jsx", "NativeSafeAreaProvider", "Provider", "value", "useContext", "NO_INSETS_ERROR", "useSafeAreaInsets", "Error", "useSafeAreaFrame", "withSafeAreaInsets", "WrappedComponent", "forwardRef", "props", "ref", "useSafeArea", "SafeAreaConsumer", "Consumer", "SafeAreaContext"]
|
|
6
|
-
}
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","SafeAreaContext_exports","__export","SafeAreaConsumer","SafeAreaContext","SafeAreaFrameContext","SafeAreaInsetsContext","SafeAreaProvider","useSafeArea","useSafeAreaFrame","useSafeAreaInsets","withSafeAreaInsets","module","exports","import_jsx_runtime","require","React","__toESM","import_react_native","import_NativeSafeAreaProvider","isDev","process","env","NODE_ENV","createContext","displayName","param","children","initialMetrics","initialSafeAreaInsets","others","parentInsets","useParentSafeAreaInsets","parentFrame","useParentSafeAreaFrame","_initialMetrics_insets","_ref","_ref1","insets","setInsets","useState","_initialMetrics_frame","_ref2","frame","setFrame","x","y","width","Dimensions","get","height","onInsetsChange","useCallback","event","nativeEvent","nextFrame","nextInsets","startTransition","curFrame","curInsets","bottom","left","right","top","jsx","NativeSafeAreaProvider","Provider","useContext","NO_INSETS_ERROR","Error","WrappedComponent","forwardRef","props","ref"],"sources":["../../src/SafeAreaContext.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,IAAAH,GAAA;AAAA,IAAAI,uBAAA;AAAAC,QAAA,CAAAD,uBAAA;EAAAE,gBAAA,EAAAA,CAAA,KAAAA,gBAAA;EAAAC,eAAA,EAAAA,CAAA,KAAAA,eAAA;EAAAC,oBAAA,EAAAA,CAAA,KAAAA,oBAAA;EAAAC,qBAAA,EAAAA,CAAA,KAAAA,qBAAA;EAAAC,gBAAA,EAAAA,CAAA,KAAAA,gBAAA;EAAAC,WAAA,EAAAA,CAAA,KAAAA,WAAA;EAAAC,gBAAA,EAAAA,CAAA,KAAAA,gBAAA;EAAAC,iBAAA,EAAAA,CAAA,KAAAA,iBAAA;EAAAC,kBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAuB,GAAAjB,YAAA,CAAAK,uBACvB;AAIA,IAAAa,kBAAsB,GAAAC,OAAI,oBAAa,CAE1B;EA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9C;AAEA,SAAM4B,sBACJA,CAAA;EAEK,OAASlB,KAAA,CAAAmD,UAAA,CAAA9D,oBAAgC;AAC9C;AACA,IAAA+D,eAAc;AACZ,SAAA1D,iBAAgBA,CAAA;EAElB,IAAA4B,MAAO,GAAAtB,KAAA,CAAAmD,UAAA,CAAA7D,qBAAA;EACT,IAAAgC,MAAA,UAEO,MAAS,IAAA+B,KAAA,CAAAD,eAAyB;EACvC,OAAM9B,MAAA;AACN;AACE,SAAA7B,gBAAgBA,CAAA;EAElB,IAAAkC,KAAO,GAAA3B,KAAA,CAAAmD,UAAA,CAAA9D,oBAAA;EACT,IAAAsC,KAAA,UAMO,MAAS,IAAA0B,KAAA,CAAAD,eACd;EAEA,OAAOzB,KAAA;AACL;AAEA,SAAAhC,kBAAOA,CAAA2D,gBAAA;EACT,OAAC,eAAAtD,KAAA,CAAAuD,UAAA,WAAAC,KAAA,EAAAC,GAAA;IACH,IAAAnC,MAAA,GAAA5B,iBAAA;IAKO,OAAS,eAA0B,IAAAI,kBAAA,CAAAkD,GAAA,EAAAM,gBAAA;MACxC,GAAOE,KAAA;MACTlC,MAAA;MAKamC","ignoreList":[]}
|
|
@@ -1,79 +1,114 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf,
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf,
|
|
8
|
+
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
9
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: !0
|
|
13
|
+
});
|
|
14
|
+
},
|
|
15
|
+
__copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
16
22
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
23
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
24
|
// file that has been converted to a CommonJS file using a Babel-
|
|
19
25
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
26
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
22
|
-
|
|
23
|
-
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
+
value: mod,
|
|
29
|
+
enumerable: !0
|
|
30
|
+
}) : target, mod)),
|
|
31
|
+
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
+
value: !0
|
|
33
|
+
}), mod);
|
|
24
34
|
var SafeAreaView_exports = {};
|
|
25
35
|
__export(SafeAreaView_exports, {
|
|
26
36
|
SafeAreaView: () => SafeAreaView
|
|
27
37
|
});
|
|
28
38
|
module.exports = __toCommonJS(SafeAreaView_exports);
|
|
29
|
-
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
39
|
+
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
40
|
+
React = __toESM(require("react"), 1),
|
|
41
|
+
import_react_native = require("react-native"),
|
|
42
|
+
import_SafeAreaContext = require("./SafeAreaContext.native.js"),
|
|
43
|
+
TOP = 8,
|
|
44
|
+
RIGHT = 4,
|
|
45
|
+
BOTTOM = 2,
|
|
46
|
+
LEFT = 1,
|
|
47
|
+
ALL = 15,
|
|
48
|
+
edgeBitmaskMap = {
|
|
49
|
+
top: TOP,
|
|
50
|
+
right: RIGHT,
|
|
51
|
+
bottom: BOTTOM,
|
|
52
|
+
left: LEFT
|
|
53
|
+
},
|
|
54
|
+
SafeAreaView = /* @__PURE__ */React.forwardRef(function (param, ref) {
|
|
55
|
+
var {
|
|
56
|
+
style = {},
|
|
57
|
+
mode,
|
|
58
|
+
edges,
|
|
59
|
+
...rest
|
|
60
|
+
} = param,
|
|
61
|
+
insets = (0, import_SafeAreaContext.useSafeAreaInsets)(),
|
|
62
|
+
edgeBitmask = edges != null ? Array.isArray(edges) ? edges.reduce(function (acc, edge) {
|
|
63
|
+
return acc | edgeBitmaskMap[edge];
|
|
64
|
+
}, 0) : Object.keys(edges).reduce(function (acc, edge) {
|
|
65
|
+
return acc | edgeBitmaskMap[edge];
|
|
66
|
+
}, 0) : ALL,
|
|
67
|
+
appliedStyle = React.useMemo(function () {
|
|
68
|
+
var insetTop = edgeBitmask & TOP ? insets.top : 0,
|
|
69
|
+
insetRight = edgeBitmask & RIGHT ? insets.right : 0,
|
|
70
|
+
insetBottom = edgeBitmask & BOTTOM ? insets.bottom : 0,
|
|
71
|
+
insetLeft = edgeBitmask & LEFT ? insets.left : 0,
|
|
72
|
+
flatStyle = import_react_native.StyleSheet.flatten(style);
|
|
73
|
+
if (mode === "margin") {
|
|
74
|
+
var {
|
|
75
|
+
margin = 0,
|
|
76
|
+
marginVertical = margin,
|
|
77
|
+
marginHorizontal = margin,
|
|
78
|
+
marginTop = marginVertical,
|
|
79
|
+
marginRight = marginHorizontal,
|
|
80
|
+
marginBottom = marginVertical,
|
|
81
|
+
marginLeft = marginHorizontal
|
|
82
|
+
} = flatStyle,
|
|
83
|
+
marginStyle = {
|
|
84
|
+
marginTop: marginTop + insetTop,
|
|
85
|
+
marginRight: marginRight + insetRight,
|
|
86
|
+
marginBottom: marginBottom + insetBottom,
|
|
87
|
+
marginLeft: marginLeft + insetLeft
|
|
88
|
+
};
|
|
89
|
+
return [style, marginStyle];
|
|
90
|
+
}
|
|
91
|
+
var {
|
|
92
|
+
padding = 0,
|
|
93
|
+
paddingVertical = padding,
|
|
94
|
+
paddingHorizontal = padding,
|
|
95
|
+
paddingTop = paddingVertical,
|
|
96
|
+
paddingRight = paddingHorizontal,
|
|
97
|
+
paddingBottom = paddingVertical,
|
|
98
|
+
paddingLeft = paddingHorizontal
|
|
99
|
+
} = flatStyle,
|
|
100
|
+
paddingStyle = {
|
|
101
|
+
paddingTop: paddingTop + insetTop,
|
|
102
|
+
paddingRight: paddingRight + insetRight,
|
|
103
|
+
paddingBottom: paddingBottom + insetBottom,
|
|
104
|
+
paddingLeft: paddingLeft + insetLeft
|
|
105
|
+
};
|
|
106
|
+
return [style, paddingStyle];
|
|
107
|
+
}, [style, insets, mode, edgeBitmask]);
|
|
108
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.View, {
|
|
109
|
+
style: appliedStyle,
|
|
110
|
+
...rest,
|
|
111
|
+
ref
|
|
112
|
+
});
|
|
73
113
|
});
|
|
74
|
-
|
|
75
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
76
|
-
0 && (module.exports = {
|
|
77
|
-
SafeAreaView
|
|
78
|
-
});
|
|
79
|
-
//# sourceMappingURL=SafeAreaView.js.map
|
|
114
|
+
//# sourceMappingURL=SafeAreaView.native.js.map
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/SafeAreaView.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAAA,QAAuB,8BACvB,sBAAiC,yBACjC,yBAAkC,8BAI5BA,MAAM,GACNC,QAAQ,GACRC,SAAS,GACTC,OAAO,GACPC,MAAM,IAINC,iBAAuC;EAC3CC,KAAKN;EACLO,OAAON;EACPO,QAAQN;EACRO,MAAMN;AACR,GAEaO,eAAeC,sBAAMC,WAChC,SAAA,OAAuCC,KAAAA;MAAtC,EAAEC,QAAQ,CAAC,GAAGC,MAAMC,OAAO,GAAGC,KAAAA,IAAM,OAC7BC,aAASC,0CAAAA,GAETC,cACJJ,SAAS,OACLK,MAAMC,QAAQN,KAAAA,IACZA,MAAMO,OAAO,SAACC,KAAaC,MAAAA;WAAeD,MAAMnB,eAAeoB,IAAAA;KAAO,CAAA,IACtEC,OAAOC,KAAKX,KAAAA,EAAOO,OAAO,SAACC,KAAKC,MAAAA;WAASD,MAAMnB,eAAeoB,IAAAA;KAAe,CAAA,IAC/ErB,KAEAwB,eAAejB,MAAMkB,QAAQ,WAAA;AACjC,QAAMC,WAAWV,cAAcpB,MAAMkB,OAAOZ,MAAM,GAC5CyB,aAAaX,cAAcnB,QAAQiB,OAAOX,QAAQ,GAClDyB,cAAcZ,cAAclB,SAASgB,OAAOV,SAAS,GACrDyB,YAAYb,cAAcjB,OAAOe,OAAOT,OAAO,GAE/CyB,YAAYC,+BAAWC,QAAQtB,KAAAA;AAErC,QAAIC,SAAS,UAAU;AACrB,UAAM,EACJsB,SAAS,GACTC,iBAAiBD,QACjBE,mBAAmBF,QACnBG,YAAYF,gBACZG,cAAcF,kBACdG,eAAeJ,gBACfK,aAAaJ,iBAAgB,IAC3BL,WAEEU,cAAc;QAClBJ,WAAWA,YAAYV;QACvBW,aAAaA,cAAcV;QAC3BW,cAAcA,eAAeV;QAC7BW,YAAYA,aAAaV;MAC3B;AAEA,aAAO;QAACnB;QAAO8B;;IACjB;AAEA,QAAM,EACJC,UAAU,GACVC,kBAAkBD,SAClBE,oBAAoBF,SACpBG,aAAaF,iBACbG,eAAeF,mBACfG,gBAAgBJ,iBAChBK,cAAcJ,kBAAiB,IAC7Bb,WAEEkB,eAAe;MACnBJ,YAAYA,aAAalB;MACzBmB,cAAcA,eAAelB;MAC7BmB,eAAeA,gBAAgBlB;MAC/BmB,aAAaA,cAAclB;IAC7B;AAEA,WAAO;MAACnB;MAAOsC;;EACjB,GAAG;IAACtC;IAAOI;IAAQH;IAAMK;GAAY;AAErC,SAAO,uCAAAiC,KAACC,0BAAAA;IAAKxC,OAAOc;IAAe,GAAGX;IAAMJ;;AAC9C,CAAA;",
|
|
5
|
-
"names": ["TOP", "RIGHT", "BOTTOM", "LEFT", "ALL", "edgeBitmaskMap", "top", "right", "bottom", "left", "SafeAreaView", "React", "forwardRef", "ref", "style", "mode", "edges", "rest", "insets", "useSafeAreaInsets", "edgeBitmask", "Array", "isArray", "reduce", "acc", "edge", "Object", "keys", "appliedStyle", "useMemo", "insetTop", "insetRight", "insetBottom", "insetLeft", "flatStyle", "StyleSheet", "flatten", "margin", "marginVertical", "marginHorizontal", "marginTop", "marginRight", "marginBottom", "marginLeft", "marginStyle", "padding", "paddingVertical", "paddingHorizontal", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "paddingStyle", "_jsx", "View"]
|
|
6
|
-
}
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","SafeAreaView_exports","__export","SafeAreaView","module","exports","import_jsx_runtime","require","React","__toESM","import_react_native","import_SafeAreaContext","TOP","RIGHT","BOTTOM","LEFT","ALL","edgeBitmaskMap","top","right","bottom","left","forwardRef","param","ref","style","mode","edges","rest","insets","useSafeAreaInsets","edgeBitmask","Array","isArray","reduce","acc","edge","Object","keys","appliedStyle","useMemo","insetTop","insetRight","insetBottom","insetLeft","flatStyle","StyleSheet","flatten","margin","marginVertical","marginHorizontal","marginTop","marginRight","marginBottom","marginLeft","marginStyle","padding","paddingVertical","paddingHorizontal","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingStyle","jsx","View"],"sources":["../../src/SafeAreaView.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,IAAAH,GAAA;AAAA,IAAAI,oBAAA;AAAAC,QAAA,CAAAD,oBAAA;EAAAE,YAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAuB,GAAAT,YAAA,CAAAK,oBACvB;AAKA,IAAAK,kBACM,GAAQC,OACR,oBAEA;EAAMC,KAIN,GAAAC,OAAA,CAAAF,OAAuC;EAAAG,mBAAA,GAAAH,OAAA;EAAAI,sBAAA,GAAAJ,OAAA;EAAAK,GAAA;EAAAC,KAAA;EAAAC,MAAA;EAAAC,IAAA;EAAAC,GAAA;EAAAC,cAAA;IAC3CC,GAAA,EAAKN,GAAA;IACLO,KAAA,EAAON,KAAA;IACPO,MAAA,EAAQN,MAAA;IACRO,IAAA,EAAMN;EACR;EAEaZ,YAAA,GAAe,eAAMK,KAAA,CAAAc,UAAA,WAAAC,KAAA,EAAAC,GAAA;IAChC,IAAG;QAAAC,KAAQ,GAAC,CAAG;QAAAC,IAAM;QAAAC,KAAO;QAAG,GAAAC;MAAQ,IAAAL,KAAQ;MAAAM,MAAA,OAAAlB,sBAAA,CAAAmB,iBAAA;MAAAC,WAAA,GAAAJ,KAAA,WAAAK,KAAA,CAAAC,OAAA,CAAAN,KA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YAAA,GAAAF,iBAAA;YAAAG,aAAA,GAAAJ,eAAA;YAAAK,WAAA,GAAAJ;UAAA,IAAAb,SAAA;UAAAkB,YAAA;YAC5BJ,UAAA,EAAAA,UAAA,GAAAlB,QAAA;YAEAmB,YAAM,EAAAA,YAAA,GAAAlB,UAAA;YAAAmB,aACM,EAAAA,aAAA,GAAAlB,WAAA;YAAAmB,WACV,EAAAA,WAAkB,GAAAlB;UAAA;QACE,OACpB,CAAanB,KACb,EAAesC,YACf,CAAgB;MACF,IAGKtC,KACnB,EAAyBI,MACzB,EAA6BH,IAC7B,EAA+BK,WAC/B,CAA2B;IAG7B,sBAAe,IAAAzB,kBAAY,CAAA0D,GAAA,EAAAtD,mBAAA,CAAAuD,IAAA;MAC7BxC,KAAI,EAAAc,YAAe;MAEnB,GAAAX,IAAO;MACTJ;IACF","ignoreList":[]}
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
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("./SafeAreaContext"), module.exports);
|
|
16
|
-
__reExport(index_exports, require("./SafeAreaView"), module.exports);
|
|
17
|
-
__reExport(index_exports, require("./InitialWindow"), module.exports);
|
|
18
|
-
|
|
19
|
-
0 && (module.exports = {
|
|
20
|
-
...require("./SafeAreaContext"),
|
|
21
|
-
...require("./SafeAreaView"),
|
|
22
|
-
...require("./InitialWindow")
|
|
23
|
-
});
|
|
24
|
-
//# sourceMappingURL=index.js.map
|
|
20
|
+
__reExport(index_exports, require("./SafeAreaContext.native.js"), module.exports);
|
|
21
|
+
__reExport(index_exports, require("./SafeAreaView.native.js"), module.exports);
|
|
22
|
+
__reExport(index_exports, require("./InitialWindow.native.js"), module.exports);
|
|
23
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/index.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;AAAA;;0BAAc,8BAAd;AACA,0BAAc,2BADd;AAEA,0BAAc,4BAFd;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports","__reExport","require"],"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;AACdG,UAAA,CAAAH,aAAA,EAAcI,OAAA,8BADd,GAAAH,MAAA,CAAAC,OAAA;AAEAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,8BAAAH,MAFd,CAAAC,OAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vxrn/safe-area",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.539",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"types": "./types/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -30,6 +30,6 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@biomejs/biome": "1.9.4",
|
|
33
|
-
"@tamagui/build": "^1.
|
|
33
|
+
"@tamagui/build": "^1.135.6"
|
|
34
34
|
}
|
|
35
35
|
}
|