@vxrn/safe-area 0.1.46 → 0.1.48
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/{SafeArea.types.js → SafeArea-types.js} +1 -1
- package/dist/cjs/{SafeArea.types.js.map → SafeArea-types.js.map} +1 -1
- package/dist/cjs/{SafeArea.types.native.js → SafeArea-types.native.js} +1 -1
- package/dist/cjs/{SafeArea.types.native.js.map → SafeArea-types.native.js.map} +1 -1
- package/dist/cjs/index.js +0 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.native.js +1 -3
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/SafeArea-types.js +1 -0
- package/dist/esm/SafeArea-types.native.js +1 -0
- package/dist/esm/index.js +0 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +1 -2
- package/dist/esm/index.native.js +0 -1
- package/dist/esm/index.native.js.map +1 -1
- package/package.json +1 -1
- package/src/InitialWindow.ts +1 -1
- package/src/NativeSafeAreaProvider.tsx +1 -1
- package/src/SafeAreaContext.tsx +1 -1
- package/src/SafeAreaView.tsx +1 -1
- package/src/index.ts +1 -1
- package/types/InitialWindow.d.ts +1 -1
- package/types/NativeSafeAreaProvider.d.ts +1 -1
- package/types/SafeArea-types.d.ts +35 -0
- package/types/SafeAreaContext.d.ts +1 -1
- package/types/SafeAreaView.d.ts +1 -1
- package/types/index.d.ts +1 -1
- package/dist/esm/SafeArea.types.js +0 -1
- package/dist/esm/SafeArea.types.native.js +0 -1
- /package/dist/esm/{SafeArea.types.js.map → SafeArea-types.js.map} +0 -0
- /package/dist/esm/{SafeArea.types.mjs → SafeArea-types.mjs} +0 -0
- /package/dist/esm/{SafeArea.types.native.js.map → SafeArea-types.native.js.map} +0 -0
- /package/src/{SafeArea.types.tsx → SafeArea-types.tsx} +0 -0
|
@@ -11,4 +11,4 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
11
11
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
12
12
|
var SafeArea_types_exports = {};
|
|
13
13
|
module.exports = __toCommonJS(SafeArea_types_exports);
|
|
14
|
-
//# sourceMappingURL=SafeArea
|
|
14
|
+
//# sourceMappingURL=SafeArea-types.js.map
|
|
@@ -12,4 +12,4 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
12
12
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
13
13
|
var SafeArea_types_exports = {};
|
|
14
14
|
module.exports = __toCommonJS(SafeArea_types_exports);
|
|
15
|
-
//# sourceMappingURL=SafeArea
|
|
15
|
+
//# sourceMappingURL=SafeArea-types.js.map
|
package/dist/cjs/index.js
CHANGED
|
@@ -14,5 +14,4 @@ module.exports = __toCommonJS(src_exports);
|
|
|
14
14
|
__reExport(src_exports, require("./SafeAreaContext"), module.exports);
|
|
15
15
|
__reExport(src_exports, require("./SafeAreaView"), module.exports);
|
|
16
16
|
__reExport(src_exports, require("./InitialWindow"), module.exports);
|
|
17
|
-
__reExport(src_exports, require("./SafeArea.types"), module.exports);
|
|
18
17
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,8BAAd;AACA,wBAAc,2BADd;AAEA,wBAAc,4BAFd;
|
|
4
|
+
"mappings": ";;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,8BAAd;AACA,wBAAc,2BADd;AAEA,wBAAc,4BAFd;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -15,12 +15,10 @@ module.exports = __toCommonJS(src_exports);
|
|
|
15
15
|
__reExport(src_exports, require("./SafeAreaContext"), module.exports);
|
|
16
16
|
__reExport(src_exports, require("./SafeAreaView"), module.exports);
|
|
17
17
|
__reExport(src_exports, require("./InitialWindow"), module.exports);
|
|
18
|
-
__reExport(src_exports, require("./SafeArea.types"), module.exports);
|
|
19
18
|
// Annotate the CommonJS export names for ESM import in node:
|
|
20
19
|
0 && (module.exports = {
|
|
21
20
|
...require("./SafeAreaContext"),
|
|
22
21
|
...require("./SafeAreaView"),
|
|
23
|
-
...require("./InitialWindow")
|
|
24
|
-
...require("./SafeArea.types")
|
|
22
|
+
...require("./InitialWindow")
|
|
25
23
|
});
|
|
26
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/vxrn/packages/safe-area/src/index.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;AAAA;;wBAAc,8BAAd;AACA,wBAAc,2BADd;AAEA,wBAAc,4BAFd;
|
|
4
|
+
"mappings": ";;;;;;;;;;;;AAAA;;wBAAc,8BAAd;AACA,wBAAc,2BADd;AAEA,wBAAc,4BAFd;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=SafeArea-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=SafeArea-types.js.map
|
package/dist/esm/index.js
CHANGED
package/dist/esm/index.js.map
CHANGED
package/dist/esm/index.mjs
CHANGED
package/dist/esm/index.native.js
CHANGED
package/package.json
CHANGED
package/src/InitialWindow.ts
CHANGED
package/src/SafeAreaContext.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
import { Dimensions, StyleSheet, type ViewProps } from 'react-native'
|
|
3
3
|
import { NativeSafeAreaProvider } from './NativeSafeAreaProvider'
|
|
4
|
-
import type { EdgeInsets, InsetChangedEvent, Metrics, Rect } from './SafeArea
|
|
4
|
+
import type { EdgeInsets, InsetChangedEvent, Metrics, Rect } from './SafeArea-types'
|
|
5
5
|
|
|
6
6
|
const isDev = process.env.NODE_ENV !== 'production'
|
|
7
7
|
|
package/src/SafeAreaView.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
import { View, StyleSheet } from 'react-native'
|
|
3
3
|
import { useSafeAreaInsets } from './SafeAreaContext'
|
|
4
|
-
import type { Edge, NativeSafeAreaViewInstance, NativeSafeAreaViewProps } from './SafeArea
|
|
4
|
+
import type { Edge, NativeSafeAreaViewInstance, NativeSafeAreaViewProps } from './SafeArea-types'
|
|
5
5
|
|
|
6
6
|
// prettier-ignore
|
|
7
7
|
const TOP = 0b1000
|
package/src/index.ts
CHANGED
package/types/InitialWindow.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { NativeSafeAreaProviderProps } from './SafeArea
|
|
1
|
+
import type { NativeSafeAreaProviderProps } from './SafeArea-types';
|
|
2
2
|
export declare function NativeSafeAreaProvider({ children, style, onInsetsChange, }: NativeSafeAreaProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=NativeSafeAreaProvider.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { NativeSyntheticEvent, ViewProps } from 'react-native';
|
|
3
|
+
export type Edge = 'top' | 'right' | 'bottom' | 'left';
|
|
4
|
+
export type EdgeMode = 'off' | 'additive' | 'maximum';
|
|
5
|
+
export type EdgeRecord = Partial<Record<Edge, EdgeMode>>;
|
|
6
|
+
export type Edges = readonly Edge[] | Readonly<EdgeRecord>;
|
|
7
|
+
export interface EdgeInsets {
|
|
8
|
+
top: number;
|
|
9
|
+
right: number;
|
|
10
|
+
bottom: number;
|
|
11
|
+
left: number;
|
|
12
|
+
}
|
|
13
|
+
export interface Rect {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
}
|
|
19
|
+
export interface Metrics {
|
|
20
|
+
insets: EdgeInsets;
|
|
21
|
+
frame: Rect;
|
|
22
|
+
}
|
|
23
|
+
export type InsetChangedEvent = NativeSyntheticEvent<Metrics>;
|
|
24
|
+
export type InsetChangeNativeCallback = (event: InsetChangedEvent) => void;
|
|
25
|
+
export interface NativeSafeAreaProviderProps extends ViewProps {
|
|
26
|
+
children?: React.ReactNode;
|
|
27
|
+
onInsetsChange: InsetChangeNativeCallback;
|
|
28
|
+
}
|
|
29
|
+
export interface NativeSafeAreaViewProps extends ViewProps {
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
mode?: 'padding' | 'margin';
|
|
32
|
+
edges?: Edges;
|
|
33
|
+
}
|
|
34
|
+
export type NativeSafeAreaViewInstance = any;
|
|
35
|
+
//# sourceMappingURL=SafeArea-types.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type ViewProps } from 'react-native';
|
|
3
|
-
import type { EdgeInsets, Metrics, Rect } from './SafeArea
|
|
3
|
+
import type { EdgeInsets, Metrics, Rect } from './SafeArea-types';
|
|
4
4
|
export declare const SafeAreaInsetsContext: React.Context<EdgeInsets | null>;
|
|
5
5
|
export declare const SafeAreaFrameContext: React.Context<Rect | null>;
|
|
6
6
|
export interface SafeAreaProviderProps extends ViewProps {
|
package/types/SafeAreaView.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { NativeSafeAreaViewProps } from './SafeArea
|
|
2
|
+
import type { NativeSafeAreaViewProps } from './SafeArea-types';
|
|
3
3
|
export declare const SafeAreaView: React.ForwardRefExoticComponent<NativeSafeAreaViewProps & React.RefAttributes<any>>;
|
|
4
4
|
//# sourceMappingURL=SafeAreaView.d.ts.map
|
package/types/index.d.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=SafeArea.types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=SafeArea.types.js.map
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|