expo-navigation-bar 4.1.3 → 4.2.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.
- package/CHANGELOG.md +10 -0
- package/android/build.gradle +2 -2
- package/build/ExpoNavigationBar.d.ts +18 -1
- package/build/ExpoNavigationBar.d.ts.map +1 -1
- package/build/ExpoNavigationBar.js.map +1 -1
- package/build/NavigationBar.android.d.ts +19 -0
- package/build/NavigationBar.android.d.ts.map +1 -0
- package/build/NavigationBar.android.js +140 -0
- package/build/NavigationBar.android.js.map +1 -0
- package/build/NavigationBar.d.ts +36 -1
- package/build/NavigationBar.d.ts.map +1 -1
- package/build/NavigationBar.js +58 -139
- package/build/NavigationBar.js.map +1 -1
- package/build/NavigationBar.types.d.ts +9 -0
- package/build/NavigationBar.types.d.ts.map +1 -1
- package/build/NavigationBar.types.js.map +1 -1
- package/expo-module.config.json +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{4.1.3/expo.modules.navigationbar-4.1.3.module → 4.2.1/expo.modules.navigationbar-4.2.1.module} +7 -7
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/4.2.1/expo.modules.navigationbar-4.2.1.module.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/4.2.1/expo.modules.navigationbar-4.2.1.module.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/4.2.1/expo.modules.navigationbar-4.2.1.module.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/4.2.1/expo.modules.navigationbar-4.2.1.module.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{4.1.3/expo.modules.navigationbar-4.1.3.pom → 4.2.1/expo.modules.navigationbar-4.2.1.pom} +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/4.2.1/expo.modules.navigationbar-4.2.1.pom.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/4.2.1/expo.modules.navigationbar-4.2.1.pom.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/4.2.1/expo.modules.navigationbar-4.2.1.pom.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/4.2.1/expo.modules.navigationbar-4.2.1.pom.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/maven-metadata.xml +4 -4
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/maven-metadata.xml.sha512 +1 -1
- package/package.json +6 -5
- package/src/ExpoNavigationBar.ts +35 -1
- package/src/NavigationBar.android.ts +191 -0
- package/src/NavigationBar.ts +62 -149
- package/src/NavigationBar.types.ts +10 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/4.1.3/expo.modules.navigationbar-4.1.3.module.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/4.1.3/expo.modules.navigationbar-4.1.3.module.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/4.1.3/expo.modules.navigationbar-4.1.3.module.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/4.1.3/expo.modules.navigationbar-4.1.3.module.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/4.1.3/expo.modules.navigationbar-4.1.3.pom.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/4.1.3/expo.modules.navigationbar-4.1.3.pom.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/4.1.3/expo.modules.navigationbar-4.1.3.pom.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/4.1.3/expo.modules.navigationbar-4.1.3.pom.sha512 +0 -1
- /package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{4.1.3/expo.modules.navigationbar-4.1.3-sources.jar → 4.2.1/expo.modules.navigationbar-4.2.1-sources.jar} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{4.1.3/expo.modules.navigationbar-4.1.3-sources.jar.md5 → 4.2.1/expo.modules.navigationbar-4.2.1-sources.jar.md5} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{4.1.3/expo.modules.navigationbar-4.1.3-sources.jar.sha1 → 4.2.1/expo.modules.navigationbar-4.2.1-sources.jar.sha1} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{4.1.3/expo.modules.navigationbar-4.1.3-sources.jar.sha256 → 4.2.1/expo.modules.navigationbar-4.2.1-sources.jar.sha256} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{4.1.3/expo.modules.navigationbar-4.1.3-sources.jar.sha512 → 4.2.1/expo.modules.navigationbar-4.2.1-sources.jar.sha512} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{4.1.3/expo.modules.navigationbar-4.1.3.aar → 4.2.1/expo.modules.navigationbar-4.2.1.aar} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{4.1.3/expo.modules.navigationbar-4.1.3.aar.md5 → 4.2.1/expo.modules.navigationbar-4.2.1.aar.md5} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{4.1.3/expo.modules.navigationbar-4.1.3.aar.sha1 → 4.2.1/expo.modules.navigationbar-4.2.1.aar.sha1} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{4.1.3/expo.modules.navigationbar-4.1.3.aar.sha256 → 4.2.1/expo.modules.navigationbar-4.2.1.aar.sha256} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{4.1.3/expo.modules.navigationbar-4.1.3.aar.sha512 → 4.2.1/expo.modules.navigationbar-4.2.1.aar.sha512} +0 -0
package/build/NavigationBar.js
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UnavailabilityError } from 'expo-modules-core';
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
|
-
import { processColor } from 'react-native';
|
|
4
|
-
import { isEdgeToEdge } from 'react-native-is-edge-to-edge';
|
|
5
|
-
import ExpoNavigationBar from './ExpoNavigationBar';
|
|
6
|
-
let shouldWarnAboutEdgeToEdge = Platform.OS === 'android' && isEdgeToEdge();
|
|
7
|
-
function potentiallyWarnAboutEdgeToEdge() {
|
|
8
|
-
if (shouldWarnAboutEdgeToEdge) {
|
|
9
|
-
shouldWarnAboutEdgeToEdge = false; // warn once
|
|
10
|
-
console.warn('Using expo-navigation-bar in apps with edge-to-edge layout enabled may cause unexpected behavior. Instead, use the SystemBars component from react-native-edge-to-edge. Learn more: https://expo.fyi/edge-to-edge-system-bars');
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
3
|
/**
|
|
14
4
|
* Observe changes to the system navigation bar.
|
|
15
5
|
* Due to platform constraints, this callback will also be triggered when the status bar visibility changes.
|
|
@@ -22,18 +12,13 @@ function potentiallyWarnAboutEdgeToEdge() {
|
|
|
22
12
|
* ```
|
|
23
13
|
*/
|
|
24
14
|
export function addVisibilityListener(listener) {
|
|
25
|
-
|
|
26
|
-
potentiallyWarnAboutEdgeToEdge();
|
|
27
|
-
}
|
|
28
|
-
// Assert so the type is non-nullable.
|
|
29
|
-
if (!ExpoNavigationBar.addListener) {
|
|
30
|
-
throw new UnavailabilityError('NavigationBar', 'addVisibilityListener');
|
|
31
|
-
}
|
|
32
|
-
return ExpoNavigationBar.addListener('ExpoNavigationBar.didChange', listener);
|
|
15
|
+
throw new UnavailabilityError('NavigationBar', 'addVisibilityListener');
|
|
33
16
|
}
|
|
34
17
|
/**
|
|
35
18
|
* Changes the navigation bar's background color.
|
|
36
19
|
*
|
|
20
|
+
* > This method is supported only when edge-to-edge is disabled. Using it in edge-to-edge app may lead to unexpected behavior.
|
|
21
|
+
*
|
|
37
22
|
* @example
|
|
38
23
|
* ```ts
|
|
39
24
|
* NavigationBar.setBackgroundColorAsync("white");
|
|
@@ -41,38 +26,29 @@ export function addVisibilityListener(listener) {
|
|
|
41
26
|
* @param color Any valid [CSS 3 (SVG) color](http://www.w3.org/TR/css3-color/#svg-color).
|
|
42
27
|
*/
|
|
43
28
|
export async function setBackgroundColorAsync(color) {
|
|
44
|
-
|
|
45
|
-
potentiallyWarnAboutEdgeToEdge();
|
|
46
|
-
}
|
|
47
|
-
if (Platform.OS !== 'android') {
|
|
48
|
-
console.warn('`setBackgroundColorAsync` is only available on Android');
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
const colorNumber = processColor(color);
|
|
52
|
-
return await ExpoNavigationBar.setBackgroundColorAsync(colorNumber);
|
|
29
|
+
console.warn('`setBackgroundColorAsync` is only available on Android');
|
|
53
30
|
}
|
|
54
31
|
/**
|
|
55
32
|
* Gets the navigation bar's background color.
|
|
56
33
|
*
|
|
34
|
+
* > This method is supported only when edge-to-edge is disabled. Using it in edge-to-edge app may lead to unexpected behavior.
|
|
35
|
+
*
|
|
57
36
|
* @example
|
|
58
37
|
* ```ts
|
|
59
38
|
* const color = await NavigationBar.getBackgroundColorAsync();
|
|
60
39
|
* ```
|
|
61
40
|
* @returns Current navigation bar color in hex format. Returns `#00000000` (transparent) on unsupported platforms (iOS, web).
|
|
41
|
+
*
|
|
62
42
|
*/
|
|
63
43
|
export async function getBackgroundColorAsync() {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
if (Platform.OS !== 'android') {
|
|
68
|
-
console.warn('`getBackgroundColorAsync` is only available on Android');
|
|
69
|
-
return `#00000000`;
|
|
70
|
-
}
|
|
71
|
-
return await ExpoNavigationBar.getBackgroundColorAsync();
|
|
44
|
+
console.warn('`getBackgroundColorAsync` is only available on Android');
|
|
45
|
+
return `#00000000`;
|
|
72
46
|
}
|
|
73
47
|
/**
|
|
74
48
|
* Changes the navigation bar's border color.
|
|
75
49
|
*
|
|
50
|
+
* > This method is supported only when edge-to-edge is disabled. Using it in edge-to-edge app may lead to unexpected behavior.
|
|
51
|
+
*
|
|
76
52
|
* @example
|
|
77
53
|
* ```ts
|
|
78
54
|
* NavigationBar.setBorderColorAsync("red");
|
|
@@ -80,19 +56,13 @@ export async function getBackgroundColorAsync() {
|
|
|
80
56
|
* @param color Any valid [CSS 3 (SVG) color](http://www.w3.org/TR/css3-color/#svg-color).
|
|
81
57
|
*/
|
|
82
58
|
export async function setBorderColorAsync(color) {
|
|
83
|
-
|
|
84
|
-
potentiallyWarnAboutEdgeToEdge();
|
|
85
|
-
}
|
|
86
|
-
if (Platform.OS !== 'android') {
|
|
87
|
-
console.warn('`setBorderColorAsync` is only available on Android');
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
const colorNumber = processColor(color);
|
|
91
|
-
await ExpoNavigationBar.setBorderColorAsync(colorNumber);
|
|
59
|
+
console.warn('`setBorderColorAsync` is only available on Android');
|
|
92
60
|
}
|
|
93
61
|
/**
|
|
94
62
|
* Gets the navigation bar's top border color, also known as the "divider color".
|
|
95
63
|
*
|
|
64
|
+
* > This method is supported only when edge-to-edge is disabled. Using it in edge-to-edge app may lead to unexpected behavior.
|
|
65
|
+
*
|
|
96
66
|
* @example
|
|
97
67
|
* ```ts
|
|
98
68
|
* const color = await NavigationBar.getBorderColorAsync();
|
|
@@ -100,14 +70,8 @@ export async function setBorderColorAsync(color) {
|
|
|
100
70
|
* @returns Navigation bar top border color in hex format. Returns `#00000000` (transparent) on unsupported platforms (iOS, web).
|
|
101
71
|
*/
|
|
102
72
|
export async function getBorderColorAsync() {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
if (Platform.OS !== 'android') {
|
|
107
|
-
console.warn('`getBorderColorAsync` is only available on Android');
|
|
108
|
-
return `#00000000`;
|
|
109
|
-
}
|
|
110
|
-
return await ExpoNavigationBar.getBorderColorAsync();
|
|
73
|
+
console.warn('`getBorderColorAsync` is only available on Android');
|
|
74
|
+
return `#00000000`;
|
|
111
75
|
}
|
|
112
76
|
/**
|
|
113
77
|
* Set the navigation bar's visibility.
|
|
@@ -117,20 +81,15 @@ export async function getBorderColorAsync() {
|
|
|
117
81
|
* NavigationBar.setVisibilityAsync("hidden");
|
|
118
82
|
* ```
|
|
119
83
|
* @param visibility Based on CSS visibility property.
|
|
84
|
+
* @platform android
|
|
120
85
|
*/
|
|
121
86
|
export async function setVisibilityAsync(visibility) {
|
|
122
|
-
|
|
123
|
-
potentiallyWarnAboutEdgeToEdge();
|
|
124
|
-
}
|
|
125
|
-
if (Platform.OS !== 'android') {
|
|
126
|
-
console.warn('`setVisibilityAsync` is only available on Android');
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
await ExpoNavigationBar.setVisibilityAsync(visibility);
|
|
87
|
+
console.warn('`setVisibilityAsync` is only available on Android');
|
|
130
88
|
}
|
|
131
89
|
/**
|
|
132
90
|
* Get the navigation bar's visibility.
|
|
133
91
|
*
|
|
92
|
+
*
|
|
134
93
|
* @example
|
|
135
94
|
* ```ts
|
|
136
95
|
* const visibility = await NavigationBar.getVisibilityAsync("hidden");
|
|
@@ -138,18 +97,14 @@ export async function setVisibilityAsync(visibility) {
|
|
|
138
97
|
* @returns Navigation bar's current visibility status. Returns `hidden` on unsupported platforms (iOS, web).
|
|
139
98
|
*/
|
|
140
99
|
export async function getVisibilityAsync() {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
144
|
-
if (Platform.OS !== 'android') {
|
|
145
|
-
console.warn('`getVisibilityAsync` is only available on Android');
|
|
146
|
-
return 'hidden';
|
|
147
|
-
}
|
|
148
|
-
return ExpoNavigationBar.getVisibilityAsync();
|
|
100
|
+
console.warn('`getVisibilityAsync` is only available on Android');
|
|
101
|
+
return 'hidden';
|
|
149
102
|
}
|
|
150
103
|
/**
|
|
151
104
|
* Changes the navigation bar's button colors between white (`light`) and a dark gray color (`dark`).
|
|
152
105
|
*
|
|
106
|
+
* > This method is supported only when edge-to-edge is disabled. Using it in edge-to-edge app may lead to unexpected behavior.
|
|
107
|
+
*
|
|
153
108
|
* @example
|
|
154
109
|
* ```ts
|
|
155
110
|
* NavigationBar.setButtonStyleAsync("light");
|
|
@@ -157,18 +112,13 @@ export async function getVisibilityAsync() {
|
|
|
157
112
|
* @param style Dictates the color of the foreground element color.
|
|
158
113
|
*/
|
|
159
114
|
export async function setButtonStyleAsync(style) {
|
|
160
|
-
|
|
161
|
-
potentiallyWarnAboutEdgeToEdge();
|
|
162
|
-
}
|
|
163
|
-
if (Platform.OS !== 'android') {
|
|
164
|
-
console.warn('`setButtonStyleAsync` is only available on Android');
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
167
|
-
await ExpoNavigationBar.setButtonStyleAsync(style);
|
|
115
|
+
console.warn('`setButtonStyleAsync` is only available on Android');
|
|
168
116
|
}
|
|
169
117
|
/**
|
|
170
118
|
* Gets the navigation bar's button color styles.
|
|
171
119
|
*
|
|
120
|
+
* > This method is supported only when edge-to-edge is disabled. Using it in edge-to-edge app may lead to unexpected behavior.
|
|
121
|
+
*
|
|
172
122
|
* @example
|
|
173
123
|
* ```ts
|
|
174
124
|
* const style = await NavigationBar.getButtonStyleAsync();
|
|
@@ -176,14 +126,8 @@ export async function setButtonStyleAsync(style) {
|
|
|
176
126
|
* @returns Navigation bar foreground element color settings. Returns `light` on unsupported platforms (iOS, web).
|
|
177
127
|
*/
|
|
178
128
|
export async function getButtonStyleAsync() {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
if (Platform.OS !== 'android') {
|
|
183
|
-
console.warn('`getButtonStyleAsync` is only available on Android');
|
|
184
|
-
return 'light';
|
|
185
|
-
}
|
|
186
|
-
return await ExpoNavigationBar.getButtonStyleAsync();
|
|
129
|
+
console.warn('`getButtonStyleAsync` is only available on Android');
|
|
130
|
+
return 'light';
|
|
187
131
|
}
|
|
188
132
|
/**
|
|
189
133
|
* Sets positioning method used for the navigation bar (and status bar).
|
|
@@ -192,6 +136,8 @@ export async function getButtonStyleAsync() {
|
|
|
192
136
|
*
|
|
193
137
|
* When drawing behind the status and navigation bars, ensure the safe area insets are adjusted accordingly.
|
|
194
138
|
*
|
|
139
|
+
* > This method is supported only when edge-to-edge is disabled. Using it in edge-to-edge app may lead to unexpected behavior.
|
|
140
|
+
*
|
|
195
141
|
* @example
|
|
196
142
|
* ```ts
|
|
197
143
|
* // enables edge-to-edge mode
|
|
@@ -202,14 +148,7 @@ export async function getButtonStyleAsync() {
|
|
|
202
148
|
* @param position Based on CSS position property.
|
|
203
149
|
*/
|
|
204
150
|
export async function setPositionAsync(position) {
|
|
205
|
-
|
|
206
|
-
potentiallyWarnAboutEdgeToEdge();
|
|
207
|
-
}
|
|
208
|
-
if (Platform.OS !== 'android') {
|
|
209
|
-
console.warn('`setPositionAsync` is only available on Android');
|
|
210
|
-
return;
|
|
211
|
-
}
|
|
212
|
-
await ExpoNavigationBar.setPositionAsync(position);
|
|
151
|
+
console.warn('`setPositionAsync` is only available on Android');
|
|
213
152
|
}
|
|
214
153
|
/**
|
|
215
154
|
* Whether the navigation and status bars float above the app (absolute) or sit inline with it (relative).
|
|
@@ -218,6 +157,8 @@ export async function setPositionAsync(position) {
|
|
|
218
157
|
* This method is unstable because the position can be set via another native module and get out of sync.
|
|
219
158
|
* Alternatively, you can get the position by measuring the insets returned by `react-native-safe-area-context`.
|
|
220
159
|
*
|
|
160
|
+
* > This method is supported only when edge-to-edge is disabled. Using it in edge-to-edge app may lead to unexpected behavior.
|
|
161
|
+
*
|
|
221
162
|
* @example
|
|
222
163
|
* ```ts
|
|
223
164
|
* await NavigationBar.unstable_getPositionAsync()
|
|
@@ -225,14 +166,8 @@ export async function setPositionAsync(position) {
|
|
|
225
166
|
* @returns Navigation bar positional rendering mode. Returns `relative` on unsupported platforms (iOS, web).
|
|
226
167
|
*/
|
|
227
168
|
export async function unstable_getPositionAsync() {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}
|
|
231
|
-
if (Platform.OS !== 'android') {
|
|
232
|
-
console.warn('`unstable_getPositionAsync` is only available on Android');
|
|
233
|
-
return 'relative';
|
|
234
|
-
}
|
|
235
|
-
return await ExpoNavigationBar.unstable_getPositionAsync();
|
|
169
|
+
console.warn('`unstable_getPositionAsync` is only available on Android');
|
|
170
|
+
return 'relative';
|
|
236
171
|
}
|
|
237
172
|
/**
|
|
238
173
|
* Sets the behavior of the status bar and navigation bar when they are hidden and the user wants to reveal them.
|
|
@@ -244,6 +179,8 @@ export async function unstable_getPositionAsync() {
|
|
|
244
179
|
* - `'inset-swipe'`: Reveals the System UI after a swipe gesture (bottom or top) and insets your App's content (Safe Area). The System UI is visible until you explicitly hide it again.
|
|
245
180
|
* - `'inset-touch'`: Reveals the System UI after a touch anywhere on the screen and insets your App's content (Safe Area). The System UI is visible until you explicitly hide it again.
|
|
246
181
|
*
|
|
182
|
+
* > This method is supported only when edge-to-edge is disabled. Using it in edge-to-edge app may lead to unexpected behavior.
|
|
183
|
+
*
|
|
247
184
|
* @example
|
|
248
185
|
* ```ts
|
|
249
186
|
* await NavigationBar.setBehaviorAsync('overlay-swipe')
|
|
@@ -251,18 +188,13 @@ export async function unstable_getPositionAsync() {
|
|
|
251
188
|
* @param behavior Dictates the interaction behavior of the navigation bar.
|
|
252
189
|
*/
|
|
253
190
|
export async function setBehaviorAsync(behavior) {
|
|
254
|
-
|
|
255
|
-
potentiallyWarnAboutEdgeToEdge();
|
|
256
|
-
}
|
|
257
|
-
if (Platform.OS !== 'android') {
|
|
258
|
-
console.warn('`setBehaviorAsync` is only available on Android');
|
|
259
|
-
return;
|
|
260
|
-
}
|
|
261
|
-
return await ExpoNavigationBar.setBehaviorAsync(behavior);
|
|
191
|
+
console.warn('`setBehaviorAsync` is only available on Android');
|
|
262
192
|
}
|
|
263
193
|
/**
|
|
264
194
|
* Gets the behavior of the status and navigation bars when the user swipes or touches the screen.
|
|
265
195
|
*
|
|
196
|
+
* > This method is supported only when edge-to-edge is disabled. Using it in edge-to-edge app may lead to unexpected behavior.
|
|
197
|
+
*
|
|
266
198
|
* @example
|
|
267
199
|
* ```ts
|
|
268
200
|
* await NavigationBar.getBehaviorAsync()
|
|
@@ -270,14 +202,22 @@ export async function setBehaviorAsync(behavior) {
|
|
|
270
202
|
* @returns Navigation bar interaction behavior. Returns `inset-touch` on unsupported platforms (iOS, web).
|
|
271
203
|
*/
|
|
272
204
|
export async function getBehaviorAsync() {
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
205
|
+
console.warn('`getBehaviorAsync` is only available on Android');
|
|
206
|
+
return 'inset-touch';
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Sets the style of the navigation bar.
|
|
210
|
+
* > This will have an effect when the following conditions are met:
|
|
211
|
+
* > - Edge-to-edge is enabled
|
|
212
|
+
* > - The `enforceNavigationBarContrast` option of the `react-native-edge-to-edge` plugin is set to `false`.
|
|
213
|
+
* > - The device is using the three-button navigation bar.
|
|
214
|
+
*
|
|
215
|
+
* > Due to a bug in the Android 15 emulator this function may have no effect. Try a physical device or an emulator with a different version of Android.
|
|
216
|
+
*
|
|
217
|
+
* @platform android
|
|
218
|
+
*/
|
|
219
|
+
export function setStyle(style) {
|
|
220
|
+
console.warn('`setStyle` method is only available on Android');
|
|
281
221
|
}
|
|
282
222
|
/**
|
|
283
223
|
* React hook that statefully updates with the visibility of the system navigation bar.
|
|
@@ -292,30 +232,9 @@ export async function getBehaviorAsync() {
|
|
|
292
232
|
* @returns Visibility of the navigation bar, `null` during async initialization.
|
|
293
233
|
*/
|
|
294
234
|
export function useVisibility() {
|
|
295
|
-
if (__DEV__) {
|
|
296
|
-
potentiallyWarnAboutEdgeToEdge();
|
|
297
|
-
}
|
|
298
235
|
const [visibility, setVisible] = useState(null);
|
|
299
236
|
useEffect(() => {
|
|
300
|
-
|
|
301
|
-
if (Platform.OS !== 'android') {
|
|
302
|
-
setVisible('hidden');
|
|
303
|
-
return;
|
|
304
|
-
}
|
|
305
|
-
getVisibilityAsync().then((visibility) => {
|
|
306
|
-
if (isMounted) {
|
|
307
|
-
setVisible(visibility);
|
|
308
|
-
}
|
|
309
|
-
});
|
|
310
|
-
const listener = addVisibilityListener(({ visibility }) => {
|
|
311
|
-
if (isMounted) {
|
|
312
|
-
setVisible(visibility);
|
|
313
|
-
}
|
|
314
|
-
});
|
|
315
|
-
return () => {
|
|
316
|
-
listener.remove();
|
|
317
|
-
isMounted = false;
|
|
318
|
-
};
|
|
237
|
+
setVisible('hidden');
|
|
319
238
|
}, []);
|
|
320
239
|
return visibility;
|
|
321
240
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationBar.js","sourceRoot":"","sources":["../src/NavigationBar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAA0B,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC1F,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AASpD,IAAI,yBAAyB,GAAG,QAAQ,CAAC,EAAE,KAAK,SAAS,IAAI,YAAY,EAAE,CAAC;AAE5E,SAAS,8BAA8B;IACrC,IAAI,yBAAyB,EAAE,CAAC;QAC9B,yBAAyB,GAAG,KAAK,CAAC,CAAC,YAAY;QAC/C,OAAO,CAAC,IAAI,CACV,+NAA+N,CAChO,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;;;;;;;GAUG;AACH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AAI,SAAS,EAAE,CAAC;gBACd,UAAU,CAAC,UAAU,CAAC,CAAC;YACzB,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,MAAM,QAAQ,GAAG,qBAAqB,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE;YACxD,IAAI,SAAS,EAAE,CAAC;gBACd,UAAU,CAAC,UAAU,CAAC,CAAC;YACzB,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,GAAG,EAAE;YACV,QAAQ,CAAC,MAAM,EAAE,CAAC;YAClB,SAAS,GAAG,KAAK,CAAC;QACpB,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,cAAc,uBAAuB,CAAC","sourcesContent":["import { Platform, type EventSubscription, UnavailabilityError } from 'expo-modules-core';\nimport { useEffect, useState } from 'react';\nimport { processColor } from 'react-native';\nimport { isEdgeToEdge } from 'react-native-is-edge-to-edge';\n\nimport ExpoNavigationBar from './ExpoNavigationBar';\nimport {\n NavigationBarButtonStyle,\n NavigationBarBehavior,\n NavigationBarPosition,\n NavigationBarVisibility,\n NavigationBarVisibilityEvent,\n} from './NavigationBar.types';\n\nlet shouldWarnAboutEdgeToEdge = Platform.OS === 'android' && isEdgeToEdge();\n\nfunction potentiallyWarnAboutEdgeToEdge() {\n if (shouldWarnAboutEdgeToEdge) {\n shouldWarnAboutEdgeToEdge = false; // warn once\n console.warn(\n 'Using expo-navigation-bar in apps with edge-to-edge layout enabled may cause unexpected behavior. Instead, use the SystemBars component from react-native-edge-to-edge. Learn more: https://expo.fyi/edge-to-edge-system-bars'\n );\n }\n}\n\n/**\n * Observe changes to the system navigation bar.\n * Due to platform constraints, this callback will also be triggered when the status bar visibility changes.\n *\n * @example\n * ```ts\n * NavigationBar.addVisibilityListener(({ visibility }) => {\n * // ...\n * });\n * ```\n */\nexport function addVisibilityListener(\n listener: (event: NavigationBarVisibilityEvent) => void\n): EventSubscription {\n if (__DEV__) {\n potentiallyWarnAboutEdgeToEdge();\n }\n // Assert so the type is non-nullable.\n if (!ExpoNavigationBar.addListener) {\n throw new UnavailabilityError('NavigationBar', 'addVisibilityListener');\n }\n return ExpoNavigationBar.addListener('ExpoNavigationBar.didChange', listener);\n}\n\n/**\n * Changes the navigation bar's background color.\n *\n * @example\n * ```ts\n * NavigationBar.setBackgroundColorAsync(\"white\");\n * ```\n * @param color Any valid [CSS 3 (SVG) color](http://www.w3.org/TR/css3-color/#svg-color).\n */\nexport async function setBackgroundColorAsync(color: string): Promise<void> {\n if (__DEV__) {\n potentiallyWarnAboutEdgeToEdge();\n }\n if (Platform.OS !== 'android') {\n console.warn('`setBackgroundColorAsync` is only available on Android');\n return;\n }\n const colorNumber = processColor(color);\n return await ExpoNavigationBar.setBackgroundColorAsync(colorNumber);\n}\n\n/**\n * Gets the navigation bar's background color.\n *\n * @example\n * ```ts\n * const color = await NavigationBar.getBackgroundColorAsync();\n * ```\n * @returns Current navigation bar color in hex format. Returns `#00000000` (transparent) on unsupported platforms (iOS, web).\n */\nexport async function getBackgroundColorAsync(): Promise<string> {\n if (__DEV__) {\n potentiallyWarnAboutEdgeToEdge();\n }\n if (Platform.OS !== 'android') {\n console.warn('`getBackgroundColorAsync` is only available on Android');\n return `#00000000`;\n }\n return await ExpoNavigationBar.getBackgroundColorAsync();\n}\n\n/**\n * Changes the navigation bar's border color.\n *\n * @example\n * ```ts\n * NavigationBar.setBorderColorAsync(\"red\");\n * ```\n * @param color Any valid [CSS 3 (SVG) color](http://www.w3.org/TR/css3-color/#svg-color).\n */\nexport async function setBorderColorAsync(color: string): Promise<void> {\n if (__DEV__) {\n potentiallyWarnAboutEdgeToEdge();\n }\n if (Platform.OS !== 'android') {\n console.warn('`setBorderColorAsync` is only available on Android');\n return;\n }\n const colorNumber = processColor(color);\n await ExpoNavigationBar.setBorderColorAsync(colorNumber);\n}\n\n/**\n * Gets the navigation bar's top border color, also known as the \"divider color\".\n *\n * @example\n * ```ts\n * const color = await NavigationBar.getBorderColorAsync();\n * ```\n * @returns Navigation bar top border color in hex format. Returns `#00000000` (transparent) on unsupported platforms (iOS, web).\n */\nexport async function getBorderColorAsync(): Promise<string> {\n if (__DEV__) {\n potentiallyWarnAboutEdgeToEdge();\n }\n if (Platform.OS !== 'android') {\n console.warn('`getBorderColorAsync` is only available on Android');\n return `#00000000`;\n }\n\n return await ExpoNavigationBar.getBorderColorAsync();\n}\n\n/**\n * Set the navigation bar's visibility.\n *\n * @example\n * ```ts\n * NavigationBar.setVisibilityAsync(\"hidden\");\n * ```\n * @param visibility Based on CSS visibility property.\n */\nexport async function setVisibilityAsync(visibility: NavigationBarVisibility): Promise<void> {\n if (__DEV__) {\n potentiallyWarnAboutEdgeToEdge();\n }\n if (Platform.OS !== 'android') {\n console.warn('`setVisibilityAsync` is only available on Android');\n return;\n }\n await ExpoNavigationBar.setVisibilityAsync(visibility);\n}\n\n/**\n * Get the navigation bar's visibility.\n *\n * @example\n * ```ts\n * const visibility = await NavigationBar.getVisibilityAsync(\"hidden\");\n * ```\n * @returns Navigation bar's current visibility status. Returns `hidden` on unsupported platforms (iOS, web).\n */\nexport async function getVisibilityAsync(): Promise<NavigationBarVisibility> {\n if (__DEV__) {\n potentiallyWarnAboutEdgeToEdge();\n }\n if (Platform.OS !== 'android') {\n console.warn('`getVisibilityAsync` is only available on Android');\n return 'hidden';\n }\n return ExpoNavigationBar.getVisibilityAsync();\n}\n\n/**\n * Changes the navigation bar's button colors between white (`light`) and a dark gray color (`dark`).\n *\n * @example\n * ```ts\n * NavigationBar.setButtonStyleAsync(\"light\");\n * ```\n * @param style Dictates the color of the foreground element color.\n */\nexport async function setButtonStyleAsync(style: NavigationBarButtonStyle): Promise<void> {\n if (__DEV__) {\n potentiallyWarnAboutEdgeToEdge();\n }\n if (Platform.OS !== 'android') {\n console.warn('`setButtonStyleAsync` is only available on Android');\n return;\n }\n await ExpoNavigationBar.setButtonStyleAsync(style);\n}\n\n/**\n * Gets the navigation bar's button color styles.\n *\n * @example\n * ```ts\n * const style = await NavigationBar.getButtonStyleAsync();\n * ```\n * @returns Navigation bar foreground element color settings. Returns `light` on unsupported platforms (iOS, web).\n */\nexport async function getButtonStyleAsync(): Promise<NavigationBarButtonStyle> {\n if (__DEV__) {\n potentiallyWarnAboutEdgeToEdge();\n }\n if (Platform.OS !== 'android') {\n console.warn('`getButtonStyleAsync` is only available on Android');\n return 'light';\n }\n return await ExpoNavigationBar.getButtonStyleAsync();\n}\n\n/**\n * Sets positioning method used for the navigation bar (and status bar).\n * Setting position `absolute` will float the navigation bar above the content,\n * whereas position `relative` will shrink the screen to inline the navigation bar.\n *\n * When drawing behind the status and navigation bars, ensure the safe area insets are adjusted accordingly.\n *\n * @example\n * ```ts\n * // enables edge-to-edge mode\n * await NavigationBar.setPositionAsync('absolute')\n * // transparent backgrounds to see through\n * await NavigationBar.setBackgroundColorAsync('#ffffff00')\n * ```\n * @param position Based on CSS position property.\n */\nexport async function setPositionAsync(position: NavigationBarPosition): Promise<void> {\n if (__DEV__) {\n potentiallyWarnAboutEdgeToEdge();\n }\n if (Platform.OS !== 'android') {\n console.warn('`setPositionAsync` is only available on Android');\n return;\n }\n await ExpoNavigationBar.setPositionAsync(position);\n}\n\n/**\n * Whether the navigation and status bars float above the app (absolute) or sit inline with it (relative).\n * This value can be incorrect if `androidNavigationBar.visible` is used instead of the config plugin `position` property.\n *\n * This method is unstable because the position can be set via another native module and get out of sync.\n * Alternatively, you can get the position by measuring the insets returned by `react-native-safe-area-context`.\n *\n * @example\n * ```ts\n * await NavigationBar.unstable_getPositionAsync()\n * ```\n * @returns Navigation bar positional rendering mode. Returns `relative` on unsupported platforms (iOS, web).\n */\nexport async function unstable_getPositionAsync(): Promise<NavigationBarPosition> {\n if (__DEV__) {\n potentiallyWarnAboutEdgeToEdge();\n }\n if (Platform.OS !== 'android') {\n console.warn('`unstable_getPositionAsync` is only available on Android');\n return 'relative';\n }\n return await ExpoNavigationBar.unstable_getPositionAsync();\n}\n\n/**\n * Sets the behavior of the status bar and navigation bar when they are hidden and the user wants to reveal them.\n *\n * For example, if the navigation bar is hidden (`setVisibilityAsync(false)`) and the behavior\n * is `'overlay-swipe'`, the user can swipe from the bottom of the screen to temporarily reveal the navigation bar.\n *\n * - `'overlay-swipe'`: Temporarily reveals the System UI after a swipe gesture (bottom or top) without insetting your App's content.\n * - `'inset-swipe'`: Reveals the System UI after a swipe gesture (bottom or top) and insets your App's content (Safe Area). The System UI is visible until you explicitly hide it again.\n * - `'inset-touch'`: Reveals the System UI after a touch anywhere on the screen and insets your App's content (Safe Area). The System UI is visible until you explicitly hide it again.\n *\n * @example\n * ```ts\n * await NavigationBar.setBehaviorAsync('overlay-swipe')\n * ```\n * @param behavior Dictates the interaction behavior of the navigation bar.\n */\nexport async function setBehaviorAsync(behavior: NavigationBarBehavior): Promise<void> {\n if (__DEV__) {\n potentiallyWarnAboutEdgeToEdge();\n }\n if (Platform.OS !== 'android') {\n console.warn('`setBehaviorAsync` is only available on Android');\n return;\n }\n return await ExpoNavigationBar.setBehaviorAsync(behavior);\n}\n\n/**\n * Gets the behavior of the status and navigation bars when the user swipes or touches the screen.\n *\n * @example\n * ```ts\n * await NavigationBar.getBehaviorAsync()\n * ```\n * @returns Navigation bar interaction behavior. Returns `inset-touch` on unsupported platforms (iOS, web).\n */\nexport async function getBehaviorAsync(): Promise<NavigationBarBehavior> {\n if (__DEV__) {\n potentiallyWarnAboutEdgeToEdge();\n }\n if (Platform.OS !== 'android') {\n console.warn('`getBehaviorAsync` is only available on Android');\n return 'inset-touch';\n }\n return await ExpoNavigationBar.getBehaviorAsync();\n}\n\n/**\n * React hook that statefully updates with the visibility of the system navigation bar.\n *\n * @example\n * ```ts\n * function App() {\n * const visibility = NavigationBar.useVisibility()\n * // React Component...\n * }\n * ```\n * @returns Visibility of the navigation bar, `null` during async initialization.\n */\nexport function useVisibility(): NavigationBarVisibility | null {\n if (__DEV__) {\n potentiallyWarnAboutEdgeToEdge();\n }\n\n const [visibility, setVisible] = useState<NavigationBarVisibility | null>(null);\n\n useEffect(() => {\n let isMounted = true;\n if (Platform.OS !== 'android') {\n setVisible('hidden');\n return;\n }\n getVisibilityAsync().then((visibility) => {\n if (isMounted) {\n setVisible(visibility);\n }\n });\n\n const listener = addVisibilityListener(({ visibility }) => {\n if (isMounted) {\n setVisible(visibility);\n }\n });\n\n return () => {\n listener.remove();\n isMounted = false;\n };\n }, []);\n\n return visibility;\n}\n\nexport * from './NavigationBar.types';\n"]}
|
|
1
|
+
{"version":3,"file":"NavigationBar.js","sourceRoot":"","sources":["../src/NavigationBar.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAW5C;;;;;;;;;;GAUG;AACH,MAAM,UAAU,qBAAqB,CACnC,QAAuD;IAEvD,MAAM,IAAI,mBAAmB,CAAC,eAAe,EAAE,uBAAuB,CAAC,CAAC;AAC1E,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,KAAa;IACzD,OAAO,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC;AACzE,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB;IAC3C,OAAO,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC;IACvE,OAAO,WAAW,CAAC;AACrB,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,KAAa;IACrD,OAAO,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC;AACrE,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB;IACvC,OAAO,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC;IACnE,OAAO,WAAW,CAAC;AACrB,CAAC;AAED;;;;;;;;;GASG;AACH,M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E,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,aAAa;IAC3B,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAiC,IAAI,CAAC,CAAC;IAEhF,SAAS,CAAC,GAAG,EAAE;QACb,UAAU,CAAC,QAAQ,CAAC,CAAC;IACvB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,cAAc,uBAAuB,CAAC","sourcesContent":["import { type EventSubscription, UnavailabilityError } from 'expo-modules-core';\nimport { useEffect, useState } from 'react';\n\nimport type {\n NavigationBarBehavior,\n NavigationBarButtonStyle,\n NavigationBarPosition,\n NavigationBarStyle,\n NavigationBarVisibility,\n NavigationBarVisibilityEvent,\n} from './NavigationBar.types';\n\n/**\n * Observe changes to the system navigation bar.\n * Due to platform constraints, this callback will also be triggered when the status bar visibility changes.\n *\n * @example\n * ```ts\n * NavigationBar.addVisibilityListener(({ visibility }) => {\n * // ...\n * });\n * ```\n */\nexport function addVisibilityListener(\n listener: (event: NavigationBarVisibilityEvent) => void\n): EventSubscription {\n throw new UnavailabilityError('NavigationBar', 'addVisibilityListener');\n}\n\n/**\n * Changes the navigation bar's background color.\n *\n * > This method is supported only when edge-to-edge is disabled. Using it in edge-to-edge app may lead to unexpected behavior.\n *\n * @example\n * ```ts\n * NavigationBar.setBackgroundColorAsync(\"white\");\n * ```\n * @param color Any valid [CSS 3 (SVG) color](http://www.w3.org/TR/css3-color/#svg-color).\n */\nexport async function setBackgroundColorAsync(color: string): Promise<void> {\n console.warn('`setBackgroundColorAsync` is only available on Android');\n}\n\n/**\n * Gets the navigation bar's background color.\n *\n * > This method is supported only when edge-to-edge is disabled. Using it in edge-to-edge app may lead to unexpected behavior.\n *\n * @example\n * ```ts\n * const color = await NavigationBar.getBackgroundColorAsync();\n * ```\n * @returns Current navigation bar color in hex format. Returns `#00000000` (transparent) on unsupported platforms (iOS, web).\n *\n */\nexport async function getBackgroundColorAsync(): Promise<string> {\n console.warn('`getBackgroundColorAsync` is only available on Android');\n return `#00000000`;\n}\n\n/**\n * Changes the navigation bar's border color.\n *\n * > This method is supported only when edge-to-edge is disabled. Using it in edge-to-edge app may lead to unexpected behavior.\n *\n * @example\n * ```ts\n * NavigationBar.setBorderColorAsync(\"red\");\n * ```\n * @param color Any valid [CSS 3 (SVG) color](http://www.w3.org/TR/css3-color/#svg-color).\n */\nexport async function setBorderColorAsync(color: string): Promise<void> {\n console.warn('`setBorderColorAsync` is only available on Android');\n}\n\n/**\n * Gets the navigation bar's top border color, also known as the \"divider color\".\n *\n * > This method is supported only when edge-to-edge is disabled. Using it in edge-to-edge app may lead to unexpected behavior.\n *\n * @example\n * ```ts\n * const color = await NavigationBar.getBorderColorAsync();\n * ```\n * @returns Navigation bar top border color in hex format. Returns `#00000000` (transparent) on unsupported platforms (iOS, web).\n */\nexport async function getBorderColorAsync(): Promise<string> {\n console.warn('`getBorderColorAsync` is only available on Android');\n return `#00000000`;\n}\n\n/**\n * Set the navigation bar's visibility.\n *\n * @example\n * ```ts\n * NavigationBar.setVisibilityAsync(\"hidden\");\n * ```\n * @param visibility Based on CSS visibility property.\n * @platform android\n */\nexport async function setVisibilityAsync(visibility: NavigationBarVisibility): Promise<void> {\n console.warn('`setVisibilityAsync` is only available on Android');\n}\n\n/**\n * Get the navigation bar's visibility.\n *\n *\n * @example\n * ```ts\n * const visibility = await NavigationBar.getVisibilityAsync(\"hidden\");\n * ```\n * @returns Navigation bar's current visibility status. Returns `hidden` on unsupported platforms (iOS, web).\n */\nexport async function getVisibilityAsync(): Promise<NavigationBarVisibility> {\n console.warn('`getVisibilityAsync` is only available on Android');\n return 'hidden';\n}\n\n/**\n * Changes the navigation bar's button colors between white (`light`) and a dark gray color (`dark`).\n *\n * > This method is supported only when edge-to-edge is disabled. Using it in edge-to-edge app may lead to unexpected behavior.\n *\n * @example\n * ```ts\n * NavigationBar.setButtonStyleAsync(\"light\");\n * ```\n * @param style Dictates the color of the foreground element color.\n */\nexport async function setButtonStyleAsync(style: NavigationBarButtonStyle): Promise<void> {\n console.warn('`setButtonStyleAsync` is only available on Android');\n}\n\n/**\n * Gets the navigation bar's button color styles.\n *\n * > This method is supported only when edge-to-edge is disabled. Using it in edge-to-edge app may lead to unexpected behavior.\n *\n * @example\n * ```ts\n * const style = await NavigationBar.getButtonStyleAsync();\n * ```\n * @returns Navigation bar foreground element color settings. Returns `light` on unsupported platforms (iOS, web).\n */\nexport async function getButtonStyleAsync(): Promise<NavigationBarButtonStyle> {\n console.warn('`getButtonStyleAsync` is only available on Android');\n return 'light';\n}\n\n/**\n * Sets positioning method used for the navigation bar (and status bar).\n * Setting position `absolute` will float the navigation bar above the content,\n * whereas position `relative` will shrink the screen to inline the navigation bar.\n *\n * When drawing behind the status and navigation bars, ensure the safe area insets are adjusted accordingly.\n *\n * > This method is supported only when edge-to-edge is disabled. Using it in edge-to-edge app may lead to unexpected behavior.\n *\n * @example\n * ```ts\n * // enables edge-to-edge mode\n * await NavigationBar.setPositionAsync('absolute')\n * // transparent backgrounds to see through\n * await NavigationBar.setBackgroundColorAsync('#ffffff00')\n * ```\n * @param position Based on CSS position property.\n */\nexport async function setPositionAsync(position: NavigationBarPosition): Promise<void> {\n console.warn('`setPositionAsync` is only available on Android');\n}\n\n/**\n * Whether the navigation and status bars float above the app (absolute) or sit inline with it (relative).\n * This value can be incorrect if `androidNavigationBar.visible` is used instead of the config plugin `position` property.\n *\n * This method is unstable because the position can be set via another native module and get out of sync.\n * Alternatively, you can get the position by measuring the insets returned by `react-native-safe-area-context`.\n *\n * > This method is supported only when edge-to-edge is disabled. Using it in edge-to-edge app may lead to unexpected behavior.\n *\n * @example\n * ```ts\n * await NavigationBar.unstable_getPositionAsync()\n * ```\n * @returns Navigation bar positional rendering mode. Returns `relative` on unsupported platforms (iOS, web).\n */\nexport async function unstable_getPositionAsync(): Promise<NavigationBarPosition> {\n console.warn('`unstable_getPositionAsync` is only available on Android');\n return 'relative';\n}\n\n/**\n * Sets the behavior of the status bar and navigation bar when they are hidden and the user wants to reveal them.\n *\n * For example, if the navigation bar is hidden (`setVisibilityAsync(false)`) and the behavior\n * is `'overlay-swipe'`, the user can swipe from the bottom of the screen to temporarily reveal the navigation bar.\n *\n * - `'overlay-swipe'`: Temporarily reveals the System UI after a swipe gesture (bottom or top) without insetting your App's content.\n * - `'inset-swipe'`: Reveals the System UI after a swipe gesture (bottom or top) and insets your App's content (Safe Area). The System UI is visible until you explicitly hide it again.\n * - `'inset-touch'`: Reveals the System UI after a touch anywhere on the screen and insets your App's content (Safe Area). The System UI is visible until you explicitly hide it again.\n *\n * > This method is supported only when edge-to-edge is disabled. Using it in edge-to-edge app may lead to unexpected behavior.\n *\n * @example\n * ```ts\n * await NavigationBar.setBehaviorAsync('overlay-swipe')\n * ```\n * @param behavior Dictates the interaction behavior of the navigation bar.\n */\nexport async function setBehaviorAsync(behavior: NavigationBarBehavior): Promise<void> {\n console.warn('`setBehaviorAsync` is only available on Android');\n}\n\n/**\n * Gets the behavior of the status and navigation bars when the user swipes or touches the screen.\n *\n * > This method is supported only when edge-to-edge is disabled. Using it in edge-to-edge app may lead to unexpected behavior.\n *\n * @example\n * ```ts\n * await NavigationBar.getBehaviorAsync()\n * ```\n * @returns Navigation bar interaction behavior. Returns `inset-touch` on unsupported platforms (iOS, web).\n */\nexport async function getBehaviorAsync(): Promise<NavigationBarBehavior> {\n console.warn('`getBehaviorAsync` is only available on Android');\n return 'inset-touch';\n}\n\n/**\n * Sets the style of the navigation bar.\n * > This will have an effect when the following conditions are met:\n * > - Edge-to-edge is enabled\n * > - The `enforceNavigationBarContrast` option of the `react-native-edge-to-edge` plugin is set to `false`.\n * > - The device is using the three-button navigation bar.\n *\n * > Due to a bug in the Android 15 emulator this function may have no effect. Try a physical device or an emulator with a different version of Android.\n *\n * @platform android\n */\nexport function setStyle(style: NavigationBarStyle) {\n console.warn('`setStyle` method is only available on Android');\n}\n\n/**\n * React hook that statefully updates with the visibility of the system navigation bar.\n *\n * @example\n * ```ts\n * function App() {\n * const visibility = NavigationBar.useVisibility()\n * // React Component...\n * }\n * ```\n * @returns Visibility of the navigation bar, `null` during async initialization.\n */\nexport function useVisibility(): NavigationBarVisibility | null {\n const [visibility, setVisible] = useState<NavigationBarVisibility | null>(null);\n\n useEffect(() => {\n setVisible('hidden');\n }, []);\n\n return visibility;\n}\n\nexport * from './NavigationBar.types';\n"]}
|
|
@@ -30,4 +30,13 @@ export type NavigationBarVisibilityEvent = {
|
|
|
30
30
|
*/
|
|
31
31
|
rawVisibility: number;
|
|
32
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* Navigation bar style.
|
|
35
|
+
*
|
|
36
|
+
* - `auto` will automatically adjust based on the current theme.
|
|
37
|
+
* - `light` a light navigation bar with dark content.
|
|
38
|
+
* - `dark` a dark navigation bar with light content.
|
|
39
|
+
* - `inverted` the bar colors are inverted in relation to the current theme.
|
|
40
|
+
*/
|
|
41
|
+
export type NavigationBarStyle = 'auto' | 'inverted' | 'light' | 'dark';
|
|
33
42
|
//# sourceMappingURL=NavigationBar.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationBar.types.d.ts","sourceRoot":"","sources":["../src/NavigationBar.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,wBAAwB,GAAG,OAAO,GAAG,MAAM,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,eAAe,GAAG,aAAa,GAAG,aAAa,CAAC;AAEpF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,UAAU,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACzC;;OAEG;IACH,UAAU,EAAE,uBAAuB,CAAC;IACpC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC"}
|
|
1
|
+
{"version":3,"file":"NavigationBar.types.d.ts","sourceRoot":"","sources":["../src/NavigationBar.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,wBAAwB,GAAG,OAAO,GAAG,MAAM,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,eAAe,GAAG,aAAa,GAAG,aAAa,CAAC;AAEpF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,UAAU,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACzC;;OAEG;IACH,UAAU,EAAE,uBAAuB,CAAC;IACpC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationBar.types.js","sourceRoot":"","sources":["../src/NavigationBar.types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Appearance of the foreground elements in the navigation bar, i.e. the color of the menu, back, home button icons.\n *\n * - `dark` makes buttons **darker** to adjust for a mostly light nav bar.\n * - `light` makes buttons **lighter** to adjust for a mostly dark nav bar.\n */\nexport type NavigationBarButtonStyle = 'light' | 'dark';\n\n/**\n * Visibility of the navigation bar.\n */\nexport type NavigationBarVisibility = 'visible' | 'hidden';\n\n/**\n * Interaction behavior for the system navigation bar.\n */\nexport type NavigationBarBehavior = 'overlay-swipe' | 'inset-swipe' | 'inset-touch';\n\n/**\n * Navigation bar positional mode.\n */\nexport type NavigationBarPosition = 'relative' | 'absolute';\n\n/**\n * Current system UI visibility state. Due to platform constraints, this will return when the status bar visibility changes as well as the navigation bar.\n */\nexport type NavigationBarVisibilityEvent = {\n /**\n * Current navigation bar visibility.\n */\n visibility: NavigationBarVisibility;\n /**\n * Native Android system UI visibility state, returned from the native Android `setOnSystemUiVisibilityChangeListener` API.\n */\n rawVisibility: number;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"NavigationBar.types.js","sourceRoot":"","sources":["../src/NavigationBar.types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Appearance of the foreground elements in the navigation bar, i.e. the color of the menu, back, home button icons.\n *\n * - `dark` makes buttons **darker** to adjust for a mostly light nav bar.\n * - `light` makes buttons **lighter** to adjust for a mostly dark nav bar.\n */\nexport type NavigationBarButtonStyle = 'light' | 'dark';\n\n/**\n * Visibility of the navigation bar.\n */\nexport type NavigationBarVisibility = 'visible' | 'hidden';\n\n/**\n * Interaction behavior for the system navigation bar.\n */\nexport type NavigationBarBehavior = 'overlay-swipe' | 'inset-swipe' | 'inset-touch';\n\n/**\n * Navigation bar positional mode.\n */\nexport type NavigationBarPosition = 'relative' | 'absolute';\n\n/**\n * Current system UI visibility state. Due to platform constraints, this will return when the status bar visibility changes as well as the navigation bar.\n */\nexport type NavigationBarVisibilityEvent = {\n /**\n * Current navigation bar visibility.\n */\n visibility: NavigationBarVisibility;\n /**\n * Native Android system UI visibility state, returned from the native Android `setOnSystemUiVisibilityChangeListener` API.\n */\n rawVisibility: number;\n};\n\n/**\n * Navigation bar style.\n *\n * - `auto` will automatically adjust based on the current theme.\n * - `light` a light navigation bar with dark content.\n * - `dark` a dark navigation bar with light content.\n * - `inverted` the bar colors are inverted in relation to the current theme.\n */\nexport type NavigationBarStyle = 'auto' | 'inverted' | 'light' | 'dark';\n"]}
|
package/expo-module.config.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "host.exp.exponent",
|
|
5
5
|
"module": "expo.modules.navigationbar",
|
|
6
|
-
"version": "4.1
|
|
6
|
+
"version": "4.2.1",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
{
|
|
27
|
-
"name": "expo.modules.navigationbar-4.1.
|
|
28
|
-
"url": "expo.modules.navigationbar-4.1.
|
|
27
|
+
"name": "expo.modules.navigationbar-4.2.1.aar",
|
|
28
|
+
"url": "expo.modules.navigationbar-4.2.1.aar",
|
|
29
29
|
"size": 50116,
|
|
30
30
|
"sha512": "9002413b7a09b940dda0ec41995b6fb09841f18ac5c64a81a149aa123d438487f1f5aaa072a0de7d54ad1e77712968d76502d4e745ea759defa83bce5edaecad",
|
|
31
31
|
"sha256": "efc2da7015bb42d104de63aaafe098e547b290c00892881177100cff34bb1654",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
],
|
|
68
68
|
"files": [
|
|
69
69
|
{
|
|
70
|
-
"name": "expo.modules.navigationbar-4.1.
|
|
71
|
-
"url": "expo.modules.navigationbar-4.1.
|
|
70
|
+
"name": "expo.modules.navigationbar-4.2.1.aar",
|
|
71
|
+
"url": "expo.modules.navigationbar-4.2.1.aar",
|
|
72
72
|
"size": 50116,
|
|
73
73
|
"sha512": "9002413b7a09b940dda0ec41995b6fb09841f18ac5c64a81a149aa123d438487f1f5aaa072a0de7d54ad1e77712968d76502d4e745ea759defa83bce5edaecad",
|
|
74
74
|
"sha256": "efc2da7015bb42d104de63aaafe098e547b290c00892881177100cff34bb1654",
|
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
},
|
|
88
88
|
"files": [
|
|
89
89
|
{
|
|
90
|
-
"name": "expo.modules.navigationbar-4.1
|
|
91
|
-
"url": "expo.modules.navigationbar-4.1
|
|
90
|
+
"name": "expo.modules.navigationbar-4.2.1-sources.jar",
|
|
91
|
+
"url": "expo.modules.navigationbar-4.2.1-sources.jar",
|
|
92
92
|
"size": 5746,
|
|
93
93
|
"sha512": "b062a1e85ccee489c49a264c5809226a0215ba7b7232895127f45002b605e6d5beb5739a3fee2c3b88420721949d17adfbd9dc15aaadebecd940958c871a8e28",
|
|
94
94
|
"sha256": "c396cf58026bd79f443df5992bd12db17586c7e3702f1ace4c3e3e65a066cf14",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
eed6a5bfd357277ece058cb3ce576447
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
c06798b841a6ceac6728b0a9441f8fc7636dd3ef
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
bf1f763ef624de00a3c875f650a2497a1ef9b56970e3d470537291f732dbc546
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
51a901f47174f6dee6959261a8d393cfde601f7346f41cca12507d876eb294325c5be68496037154920ca3c3660357f50b32007c6c9c9803614e1b20307f4d67
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<modelVersion>4.0.0</modelVersion>
|
|
10
10
|
<groupId>host.exp.exponent</groupId>
|
|
11
11
|
<artifactId>expo.modules.navigationbar</artifactId>
|
|
12
|
-
<version>4.1
|
|
12
|
+
<version>4.2.1</version>
|
|
13
13
|
<packaging>aar</packaging>
|
|
14
14
|
<name>expo.modules.navigationbar</name>
|
|
15
15
|
<url>https://github.com/expo/expo</url>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7f0dac9356606d974b4b0b7d6f28c1d0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
aaf5245a9e30ae8165a1214a213f83bc6211ed80
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ca4384ee86f9155bed4877ce573a59e0e017c189ff4b01cff00b44609acb03a8
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
04d996912145852212dd89fb5ee887319f5eeb11b225802b1453a2bcf6cc3dc6d2f15f9b26e7ec9a877fc642aa8eca1073613f83d16442848d9f9585a968a89e
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>host.exp.exponent</groupId>
|
|
4
4
|
<artifactId>expo.modules.navigationbar</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>4.1
|
|
7
|
-
<release>4.1
|
|
6
|
+
<latest>4.2.1</latest>
|
|
7
|
+
<release>4.2.1</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>4.1
|
|
9
|
+
<version>4.2.1</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20250423205254</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/maven-metadata.xml.md5
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
12360f2d457f6ef79fcd102876cac4ec
|
package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/maven-metadata.xml.sha1
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
070056f57fd70a70b5261cd957a2f852452f72ef
|
package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/maven-metadata.xml.sha256
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
20f0857ad758ee4a148f016a424bd8fac6ca5bcbe5d67d2d8d1b3d193bd49f47
|
package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/maven-metadata.xml.sha512
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
c2fee668e593c3e5bff744c8e865efe7478b203c671012df837c3d8b37314fdd5f83419cd18c0340670e3f2878f6e55cdfe3afb855fbfa56e48f0df68f9cdc9e
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-navigation-bar",
|
|
3
|
-
"version": "4.1
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"description": "Modify and observe the native navigation bar on Android devices.",
|
|
5
5
|
"main": "build/NavigationBar.js",
|
|
6
6
|
"types": "build/NavigationBar.d.ts",
|
|
@@ -34,18 +34,19 @@
|
|
|
34
34
|
"license": "MIT",
|
|
35
35
|
"homepage": "https://docs.expo.dev/versions/latest/sdk/navigation-bar",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@react-native/normalize-colors": "0.79.
|
|
37
|
+
"@react-native/normalize-colors": "0.79.1",
|
|
38
38
|
"debug": "^4.3.2",
|
|
39
|
-
"react-native-is-edge-to-edge": "^1.1.6"
|
|
39
|
+
"react-native-is-edge-to-edge": "^1.1.6",
|
|
40
|
+
"react-native-edge-to-edge": "1.6.0"
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
43
|
"@types/debug": "^4.1.7",
|
|
43
|
-
"expo-module-scripts": "^4.1.
|
|
44
|
+
"expo-module-scripts": "^4.1.4"
|
|
44
45
|
},
|
|
45
46
|
"peerDependencies": {
|
|
46
47
|
"expo": "*",
|
|
47
48
|
"react": "*",
|
|
48
49
|
"react-native": "*"
|
|
49
50
|
},
|
|
50
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "dd4ea2ac865a2b0c1f4ea3fc5879d90679099862"
|
|
51
52
|
}
|