@vxrn/safe-area 1.1.319 → 1.1.321
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/InitialWindow.js +22 -0
- package/dist/cjs/NativeSafeAreaProvider.js +98 -0
- package/dist/cjs/SafeArea-types.js +14 -0
- package/dist/cjs/SafeAreaContext.js +99 -0
- package/dist/cjs/SafeAreaView.js +74 -0
- package/dist/cjs/index.js +17 -0
- package/package.json +2 -2
- /package/dist/cjs/{InitialWindow.cjs.map → InitialWindow.js.map} +0 -0
- /package/dist/cjs/{NativeSafeAreaProvider.cjs.map → NativeSafeAreaProvider.js.map} +0 -0
- /package/dist/cjs/{SafeArea-types.cjs.map → SafeArea-types.js.map} +0 -0
- /package/dist/cjs/{SafeAreaContext.cjs.map → SafeAreaContext.js.map} +0 -0
- /package/dist/cjs/{SafeAreaView.cjs.map → SafeAreaView.js.map} +0 -0
- /package/dist/cjs/{index.cjs.map → index.js.map} +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var InitialWindow_exports = {};
|
|
16
|
+
__export(InitialWindow_exports, {
|
|
17
|
+
initialWindowMetrics: () => initialWindowMetrics,
|
|
18
|
+
initialWindowSafeAreaInsets: () => initialWindowSafeAreaInsets
|
|
19
|
+
});
|
|
20
|
+
module.exports = __toCommonJS(InitialWindow_exports);
|
|
21
|
+
const initialWindowMetrics = null, initialWindowSafeAreaInsets = null;
|
|
22
|
+
//# sourceMappingURL=InitialWindow.js.map
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
+
mod
|
|
22
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
|
+
var NativeSafeAreaProvider_exports = {};
|
|
24
|
+
__export(NativeSafeAreaProvider_exports, {
|
|
25
|
+
NativeSafeAreaProvider: () => NativeSafeAreaProvider
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(NativeSafeAreaProvider_exports);
|
|
28
|
+
var React = __toESM(require("react"), 1), import_react_native = require("react-native-web"), import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
+
const CSSTransitions = {
|
|
30
|
+
WebkitTransition: "webkitTransitionEnd",
|
|
31
|
+
Transition: "transitionEnd",
|
|
32
|
+
MozTransition: "transitionend",
|
|
33
|
+
MSTransition: "msTransitionEnd",
|
|
34
|
+
OTransition: "oTransitionEnd"
|
|
35
|
+
};
|
|
36
|
+
function NativeSafeAreaProvider({
|
|
37
|
+
children,
|
|
38
|
+
style,
|
|
39
|
+
onInsetsChange
|
|
40
|
+
}) {
|
|
41
|
+
return React.useEffect(() => {
|
|
42
|
+
if (typeof document > "u")
|
|
43
|
+
return;
|
|
44
|
+
const element = createContextElement();
|
|
45
|
+
document.body.appendChild(element);
|
|
46
|
+
const onEnd = () => {
|
|
47
|
+
const { paddingTop, paddingBottom, paddingLeft, paddingRight } = window.getComputedStyle(element), insets = {
|
|
48
|
+
top: paddingTop ? Number.parseInt(paddingTop, 10) : 0,
|
|
49
|
+
bottom: paddingBottom ? Number.parseInt(paddingBottom, 10) : 0,
|
|
50
|
+
left: paddingLeft ? Number.parseInt(paddingLeft, 10) : 0,
|
|
51
|
+
right: paddingRight ? Number.parseInt(paddingRight, 10) : 0
|
|
52
|
+
}, frame = {
|
|
53
|
+
x: 0,
|
|
54
|
+
y: 0,
|
|
55
|
+
width: document.documentElement.offsetWidth,
|
|
56
|
+
height: document.documentElement.offsetHeight
|
|
57
|
+
};
|
|
58
|
+
onInsetsChange({ nativeEvent: { insets, frame } });
|
|
59
|
+
};
|
|
60
|
+
return element.addEventListener(getSupportedTransitionEvent(), onEnd), onEnd(), () => {
|
|
61
|
+
document.body.removeChild(element), element.removeEventListener(getSupportedTransitionEvent(), onEnd);
|
|
62
|
+
};
|
|
63
|
+
}, [onInsetsChange]), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.View, { style: style || {
|
|
64
|
+
flex: 1,
|
|
65
|
+
width: "100%",
|
|
66
|
+
height: "100%",
|
|
67
|
+
maxHeight: "100%",
|
|
68
|
+
maxWidth: "100%"
|
|
69
|
+
}, children });
|
|
70
|
+
}
|
|
71
|
+
let _supportedTransitionEvent = null;
|
|
72
|
+
function getSupportedTransitionEvent() {
|
|
73
|
+
if (_supportedTransitionEvent != null)
|
|
74
|
+
return _supportedTransitionEvent;
|
|
75
|
+
const element = document.createElement("invalidtype");
|
|
76
|
+
_supportedTransitionEvent = CSSTransitions.Transition;
|
|
77
|
+
for (const key in CSSTransitions)
|
|
78
|
+
if (element.style[key] !== void 0) {
|
|
79
|
+
_supportedTransitionEvent = CSSTransitions[key];
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
return _supportedTransitionEvent;
|
|
83
|
+
}
|
|
84
|
+
let _supportedEnv = null;
|
|
85
|
+
function getSupportedEnv() {
|
|
86
|
+
if (_supportedEnv !== null)
|
|
87
|
+
return _supportedEnv;
|
|
88
|
+
const { CSS } = window;
|
|
89
|
+
return CSS && CSS.supports && CSS.supports("top: constant(safe-area-inset-top)") ? _supportedEnv = "constant" : _supportedEnv = "env", _supportedEnv;
|
|
90
|
+
}
|
|
91
|
+
function getInset(side) {
|
|
92
|
+
return `${getSupportedEnv()}(safe-area-inset-${side})`;
|
|
93
|
+
}
|
|
94
|
+
function createContextElement() {
|
|
95
|
+
const element = document.createElement("div"), { style } = element;
|
|
96
|
+
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;
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=NativeSafeAreaProvider.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
9
|
+
return to;
|
|
10
|
+
};
|
|
11
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
12
|
+
var SafeArea_types_exports = {};
|
|
13
|
+
module.exports = __toCommonJS(SafeArea_types_exports);
|
|
14
|
+
//# sourceMappingURL=SafeArea-types.js.map
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
+
mod
|
|
22
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
|
+
var SafeAreaContext_exports = {};
|
|
24
|
+
__export(SafeAreaContext_exports, {
|
|
25
|
+
SafeAreaConsumer: () => SafeAreaConsumer,
|
|
26
|
+
SafeAreaContext: () => SafeAreaContext,
|
|
27
|
+
SafeAreaFrameContext: () => SafeAreaFrameContext,
|
|
28
|
+
SafeAreaInsetsContext: () => SafeAreaInsetsContext,
|
|
29
|
+
SafeAreaProvider: () => SafeAreaProvider,
|
|
30
|
+
useSafeArea: () => useSafeArea,
|
|
31
|
+
useSafeAreaFrame: () => useSafeAreaFrame,
|
|
32
|
+
useSafeAreaInsets: () => useSafeAreaInsets,
|
|
33
|
+
withSafeAreaInsets: () => withSafeAreaInsets
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(SafeAreaContext_exports);
|
|
36
|
+
var React = __toESM(require("react"), 1), import_react_native = require("react-native-web"), import_NativeSafeAreaProvider = require("./NativeSafeAreaProvider"), import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
+
const isDev = process.env.NODE_ENV !== "production", SafeAreaInsetsContext = React.createContext(null);
|
|
38
|
+
isDev && (SafeAreaInsetsContext.displayName = "SafeAreaInsetsContext");
|
|
39
|
+
const SafeAreaFrameContext = React.createContext(null);
|
|
40
|
+
isDev && (SafeAreaFrameContext.displayName = "SafeAreaFrameContext");
|
|
41
|
+
function SafeAreaProvider({
|
|
42
|
+
children,
|
|
43
|
+
initialMetrics,
|
|
44
|
+
initialSafeAreaInsets,
|
|
45
|
+
...others
|
|
46
|
+
}) {
|
|
47
|
+
const parentInsets = useParentSafeAreaInsets(), parentFrame = useParentSafeAreaFrame(), [insets, setInsets] = React.useState(
|
|
48
|
+
initialMetrics?.insets ?? initialSafeAreaInsets ?? parentInsets ?? null
|
|
49
|
+
), [frame, setFrame] = React.useState(
|
|
50
|
+
initialMetrics?.frame ?? parentFrame ?? {
|
|
51
|
+
// Backwards compat so we render anyway if we don't have frame.
|
|
52
|
+
x: 0,
|
|
53
|
+
y: 0,
|
|
54
|
+
width: import_react_native.Dimensions.get("window").width,
|
|
55
|
+
height: import_react_native.Dimensions.get("window").height
|
|
56
|
+
}
|
|
57
|
+
), onInsetsChange = React.useCallback((event) => {
|
|
58
|
+
const {
|
|
59
|
+
nativeEvent: { frame: nextFrame, insets: nextInsets }
|
|
60
|
+
} = event;
|
|
61
|
+
React.startTransition(() => {
|
|
62
|
+
setFrame((curFrame) => (
|
|
63
|
+
// Backwards compat with old native code that won't send frame.
|
|
64
|
+
nextFrame && (nextFrame.height !== curFrame.height || nextFrame.width !== curFrame.width || nextFrame.x !== curFrame.x || nextFrame.y !== curFrame.y) ? nextFrame : curFrame
|
|
65
|
+
)), setInsets((curInsets) => !curInsets || nextInsets.bottom !== curInsets.bottom || nextInsets.left !== curInsets.left || nextInsets.right !== curInsets.right || nextInsets.top !== curInsets.top ? nextInsets : curInsets);
|
|
66
|
+
});
|
|
67
|
+
}, []);
|
|
68
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_NativeSafeAreaProvider.NativeSafeAreaProvider, { onInsetsChange, ...others, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SafeAreaFrameContext.Provider, { value: frame, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SafeAreaInsetsContext.Provider, { value: insets, children }) }) });
|
|
69
|
+
}
|
|
70
|
+
function useParentSafeAreaInsets() {
|
|
71
|
+
return React.useContext(SafeAreaInsetsContext);
|
|
72
|
+
}
|
|
73
|
+
function useParentSafeAreaFrame() {
|
|
74
|
+
return React.useContext(SafeAreaFrameContext);
|
|
75
|
+
}
|
|
76
|
+
const NO_INSETS_ERROR = "No safe area value available. Make sure you are rendering `<SafeAreaProvider>` at the top of your app.";
|
|
77
|
+
function useSafeAreaInsets() {
|
|
78
|
+
const insets = React.useContext(SafeAreaInsetsContext);
|
|
79
|
+
if (insets == null)
|
|
80
|
+
throw new Error(NO_INSETS_ERROR);
|
|
81
|
+
return insets;
|
|
82
|
+
}
|
|
83
|
+
function useSafeAreaFrame() {
|
|
84
|
+
const frame = React.useContext(SafeAreaFrameContext);
|
|
85
|
+
if (frame == null)
|
|
86
|
+
throw new Error(NO_INSETS_ERROR);
|
|
87
|
+
return frame;
|
|
88
|
+
}
|
|
89
|
+
function withSafeAreaInsets(WrappedComponent) {
|
|
90
|
+
return React.forwardRef((props, ref) => {
|
|
91
|
+
const insets = useSafeAreaInsets();
|
|
92
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(WrappedComponent, { ...props, insets, ref });
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
function useSafeArea() {
|
|
96
|
+
return useSafeAreaInsets();
|
|
97
|
+
}
|
|
98
|
+
const SafeAreaConsumer = SafeAreaInsetsContext.Consumer, SafeAreaContext = SafeAreaInsetsContext;
|
|
99
|
+
//# sourceMappingURL=SafeAreaContext.js.map
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
+
mod
|
|
22
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
|
+
var SafeAreaView_exports = {};
|
|
24
|
+
__export(SafeAreaView_exports, {
|
|
25
|
+
SafeAreaView: () => SafeAreaView
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(SafeAreaView_exports);
|
|
28
|
+
var React = __toESM(require("react"), 1), import_react_native = require("react-native-web"), import_SafeAreaContext = require("./SafeAreaContext"), import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
+
const TOP = 8, RIGHT = 4, BOTTOM = 2, LEFT = 1, ALL = 15, edgeBitmaskMap = {
|
|
30
|
+
top: TOP,
|
|
31
|
+
right: RIGHT,
|
|
32
|
+
bottom: BOTTOM,
|
|
33
|
+
left: LEFT
|
|
34
|
+
}, SafeAreaView = React.forwardRef(
|
|
35
|
+
({ style = {}, mode, edges, ...rest }, ref) => {
|
|
36
|
+
const insets = (0, import_SafeAreaContext.useSafeAreaInsets)(), edgeBitmask = edges != null ? Array.isArray(edges) ? edges.reduce((acc, edge) => acc | edgeBitmaskMap[edge], 0) : Object.keys(edges).reduce((acc, edge) => acc | edgeBitmaskMap[edge], 0) : ALL, appliedStyle = React.useMemo(() => {
|
|
37
|
+
const insetTop = edgeBitmask & TOP ? insets.top : 0, insetRight = edgeBitmask & RIGHT ? insets.right : 0, insetBottom = edgeBitmask & BOTTOM ? insets.bottom : 0, insetLeft = edgeBitmask & LEFT ? insets.left : 0, flatStyle = import_react_native.StyleSheet.flatten(style);
|
|
38
|
+
if (mode === "margin") {
|
|
39
|
+
const {
|
|
40
|
+
margin = 0,
|
|
41
|
+
marginVertical = margin,
|
|
42
|
+
marginHorizontal = margin,
|
|
43
|
+
marginTop = marginVertical,
|
|
44
|
+
marginRight = marginHorizontal,
|
|
45
|
+
marginBottom = marginVertical,
|
|
46
|
+
marginLeft = marginHorizontal
|
|
47
|
+
} = flatStyle, marginStyle = {
|
|
48
|
+
marginTop: marginTop + insetTop,
|
|
49
|
+
marginRight: marginRight + insetRight,
|
|
50
|
+
marginBottom: marginBottom + insetBottom,
|
|
51
|
+
marginLeft: marginLeft + insetLeft
|
|
52
|
+
};
|
|
53
|
+
return [style, marginStyle];
|
|
54
|
+
}
|
|
55
|
+
const {
|
|
56
|
+
padding = 0,
|
|
57
|
+
paddingVertical = padding,
|
|
58
|
+
paddingHorizontal = padding,
|
|
59
|
+
paddingTop = paddingVertical,
|
|
60
|
+
paddingRight = paddingHorizontal,
|
|
61
|
+
paddingBottom = paddingVertical,
|
|
62
|
+
paddingLeft = paddingHorizontal
|
|
63
|
+
} = flatStyle, paddingStyle = {
|
|
64
|
+
paddingTop: paddingTop + insetTop,
|
|
65
|
+
paddingRight: paddingRight + insetRight,
|
|
66
|
+
paddingBottom: paddingBottom + insetBottom,
|
|
67
|
+
paddingLeft: paddingLeft + insetLeft
|
|
68
|
+
};
|
|
69
|
+
return [style, paddingStyle];
|
|
70
|
+
}, [style, insets, mode, edgeBitmask]);
|
|
71
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.View, { style: appliedStyle, ...rest, ref });
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
//# sourceMappingURL=SafeAreaView.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
9
|
+
return to;
|
|
10
|
+
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
11
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
12
|
+
var src_exports = {};
|
|
13
|
+
module.exports = __toCommonJS(src_exports);
|
|
14
|
+
__reExport(src_exports, require("./SafeAreaContext"), module.exports);
|
|
15
|
+
__reExport(src_exports, require("./SafeAreaView"), module.exports);
|
|
16
|
+
__reExport(src_exports, require("./InitialWindow"), module.exports);
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vxrn/safe-area",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.321",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"types": "./types/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -28,6 +28,6 @@
|
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@biomejs/biome": "^1.8.3",
|
|
31
|
-
"@tamagui/build": "^1.
|
|
31
|
+
"@tamagui/build": "^1.116.4"
|
|
32
32
|
}
|
|
33
33
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|