expo-navigation-bar 5.0.2 → 5.0.4

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.
Files changed (41) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/android/build.gradle +2 -2
  3. package/build/NavigationBar.android.d.ts.map +1 -1
  4. package/build/NavigationBar.android.js +26 -31
  5. package/build/NavigationBar.android.js.map +1 -1
  6. package/expo-module.config.json +1 -1
  7. package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{5.0.2/expo.modules.navigationbar-5.0.2.module → 5.0.4/expo.modules.navigationbar-5.0.4.module} +7 -7
  8. package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/5.0.4/expo.modules.navigationbar-5.0.4.module.md5 +1 -0
  9. package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/5.0.4/expo.modules.navigationbar-5.0.4.module.sha1 +1 -0
  10. package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/5.0.4/expo.modules.navigationbar-5.0.4.module.sha256 +1 -0
  11. package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/5.0.4/expo.modules.navigationbar-5.0.4.module.sha512 +1 -0
  12. package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{5.0.2/expo.modules.navigationbar-5.0.2.pom → 5.0.4/expo.modules.navigationbar-5.0.4.pom} +1 -1
  13. package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/5.0.4/expo.modules.navigationbar-5.0.4.pom.md5 +1 -0
  14. package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/5.0.4/expo.modules.navigationbar-5.0.4.pom.sha1 +1 -0
  15. package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/5.0.4/expo.modules.navigationbar-5.0.4.pom.sha256 +1 -0
  16. package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/5.0.4/expo.modules.navigationbar-5.0.4.pom.sha512 +1 -0
  17. package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/maven-metadata.xml +4 -4
  18. package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/maven-metadata.xml.md5 +1 -1
  19. package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/maven-metadata.xml.sha1 +1 -1
  20. package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/maven-metadata.xml.sha256 +1 -1
  21. package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/maven-metadata.xml.sha512 +1 -1
  22. package/package.json +4 -5
  23. package/src/NavigationBar.android.ts +29 -37
  24. package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/5.0.2/expo.modules.navigationbar-5.0.2.module.md5 +0 -1
  25. package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/5.0.2/expo.modules.navigationbar-5.0.2.module.sha1 +0 -1
  26. package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/5.0.2/expo.modules.navigationbar-5.0.2.module.sha256 +0 -1
  27. package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/5.0.2/expo.modules.navigationbar-5.0.2.module.sha512 +0 -1
  28. package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/5.0.2/expo.modules.navigationbar-5.0.2.pom.md5 +0 -1
  29. package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/5.0.2/expo.modules.navigationbar-5.0.2.pom.sha1 +0 -1
  30. package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/5.0.2/expo.modules.navigationbar-5.0.2.pom.sha256 +0 -1
  31. package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/5.0.2/expo.modules.navigationbar-5.0.2.pom.sha512 +0 -1
  32. /package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{5.0.2/expo.modules.navigationbar-5.0.2-sources.jar → 5.0.4/expo.modules.navigationbar-5.0.4-sources.jar} +0 -0
  33. /package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{5.0.2/expo.modules.navigationbar-5.0.2-sources.jar.md5 → 5.0.4/expo.modules.navigationbar-5.0.4-sources.jar.md5} +0 -0
  34. /package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{5.0.2/expo.modules.navigationbar-5.0.2-sources.jar.sha1 → 5.0.4/expo.modules.navigationbar-5.0.4-sources.jar.sha1} +0 -0
  35. /package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{5.0.2/expo.modules.navigationbar-5.0.2-sources.jar.sha256 → 5.0.4/expo.modules.navigationbar-5.0.4-sources.jar.sha256} +0 -0
  36. /package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{5.0.2/expo.modules.navigationbar-5.0.2-sources.jar.sha512 → 5.0.4/expo.modules.navigationbar-5.0.4-sources.jar.sha512} +0 -0
  37. /package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{5.0.2/expo.modules.navigationbar-5.0.2.aar → 5.0.4/expo.modules.navigationbar-5.0.4.aar} +0 -0
  38. /package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{5.0.2/expo.modules.navigationbar-5.0.2.aar.md5 → 5.0.4/expo.modules.navigationbar-5.0.4.aar.md5} +0 -0
  39. /package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{5.0.2/expo.modules.navigationbar-5.0.2.aar.sha1 → 5.0.4/expo.modules.navigationbar-5.0.4.aar.sha1} +0 -0
  40. /package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{5.0.2/expo.modules.navigationbar-5.0.2.aar.sha256 → 5.0.4/expo.modules.navigationbar-5.0.4.aar.sha256} +0 -0
  41. /package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{5.0.2/expo.modules.navigationbar-5.0.2.aar.sha512 → 5.0.4/expo.modules.navigationbar-5.0.4.aar.sha512} +0 -0
package/CHANGELOG.md CHANGED
@@ -10,6 +10,16 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 5.0.4 — 2025-08-25
14
+
15
+ _This version does not introduce any user-facing changes._
16
+
17
+ ## 5.0.3 — 2025-08-18
18
+
19
+ ### 💡 Others
20
+
21
+ - Remove `react-native-edge-to-edge` dependency. ([#38769](https://github.com/expo/expo/pull/38769) by [@behenate](https://github.com/behenate))
22
+
13
23
  ## 5.0.2 — 2025-08-16
14
24
 
15
25
  _This version does not introduce any user-facing changes._
@@ -4,13 +4,13 @@ plugins {
4
4
  }
5
5
 
6
6
  group = 'host.exp.exponent'
7
- version = '5.0.2'
7
+ version = '5.0.4'
8
8
 
9
9
  android {
10
10
  namespace "expo.modules.navigationbar"
11
11
  defaultConfig {
12
12
  versionCode 1
13
- versionName '5.0.2'
13
+ versionName '5.0.4'
14
14
  }
15
15
  }
16
16
 
@@ -1 +1 @@
1
- {"version":3,"file":"NavigationBar.android.d.ts","sourceRoot":"","sources":["../src/NavigationBar.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAM3D,OAAO,KAAK,EACV,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,EACrB,kBAAkB,EAClB,uBAAuB,EACvB,4BAA4B,EAC7B,MAAM,uBAAuB,CAAC;AAa/B,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,CAAC,KAAK,EAAE,4BAA4B,KAAK,IAAI,GACtD,iBAAiB,CAEnB;AAED,wBAAsB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ1E;AAED,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,MAAM,CAAC,CAO/D;AAED,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAQtE;AAED,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC,CAO3D;AAED,wBAAsB,kBAAkB,CAAC,UAAU,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAO3F;AAED,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,uBAAuB,CAAC,CAE3E;AAED,wBAAsB,mBAAmB,CAAC,KAAK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AAG,OAAO,CAAC,IAAI,CAAC,CAE3F;AAED,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,uBAAuB,CAAC,CAE3E;AAED,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAExF;AAED,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,wBAAwB,CAAC,CAO7E;AAED,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAOrF;AAED,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAOhF;AAED,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAOrF;AAED,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAOvE;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,kBAAkB,QAEjD;AAED,wBAAgB,aAAa,IAAI,uBAAuB,GAAG,IAAI,CAyB9D"}
@@ -1,21 +1,28 @@
1
1
  import { useEffect, useState } from 'react';
2
- import { processColor } from 'react-native';
2
+ import { Appearance, processColor } from 'react-native';
3
3
  import { isEdgeToEdge } from 'react-native-is-edge-to-edge';
4
4
  import ExpoNavigationBar from './ExpoNavigationBar';
5
- // This line only imports the type information for TypeScript type checking. It
6
- // doesn't import the actual module in the compiled JavaScript code. The actual
7
- // module is imported conditionally with require() below, in order to avoid
8
- // importing the module if edge-to-edge is not enabled (which could throw if
9
- // it's not linked).
10
- let SystemBars = null;
11
- if (isEdgeToEdge()) {
12
- SystemBars = require('react-native-edge-to-edge').SystemBars;
5
+ function isLightColorScheme() {
6
+ const colorScheme = Appearance?.getColorScheme() ?? 'light';
7
+ return colorScheme === 'light';
8
+ }
9
+ function navigationBarStyleToButtonStyle(navigationBarStyle) {
10
+ switch (navigationBarStyle) {
11
+ case 'auto':
12
+ return isLightColorScheme() ? 'dark' : 'light';
13
+ case 'light':
14
+ return 'dark';
15
+ case 'dark':
16
+ return 'light';
17
+ case 'inverted':
18
+ return isLightColorScheme() ? 'light' : 'dark';
19
+ }
13
20
  }
14
21
  export function addVisibilityListener(listener) {
15
22
  return ExpoNavigationBar.addListener('ExpoNavigationBar.didChange', listener);
16
23
  }
17
24
  export async function setBackgroundColorAsync(color) {
18
- if (SystemBars != null) {
25
+ if (isEdgeToEdge()) {
19
26
  console.warn('`setBackgroundColorAsync` is not supported with edge-to-edge enabled.');
20
27
  return;
21
28
  }
@@ -23,14 +30,14 @@ export async function setBackgroundColorAsync(color) {
23
30
  await ExpoNavigationBar.setBackgroundColorAsync(colorNumber);
24
31
  }
25
32
  export async function getBackgroundColorAsync() {
26
- if (SystemBars != null) {
33
+ if (isEdgeToEdge()) {
27
34
  console.warn('`getBackgroundColorAsync` is not supported with edge-to-edge enabled.');
28
35
  return `#00000000`;
29
36
  }
30
37
  return await ExpoNavigationBar.getBackgroundColorAsync();
31
38
  }
32
39
  export async function setBorderColorAsync(color) {
33
- if (SystemBars != null) {
40
+ if (isEdgeToEdge()) {
34
41
  console.warn('`setBorderColorAsync` is not supported with edge-to-edge enabled.');
35
42
  return;
36
43
  }
@@ -38,70 +45,58 @@ export async function setBorderColorAsync(color) {
38
45
  await ExpoNavigationBar.setBorderColorAsync(colorNumber);
39
46
  }
40
47
  export async function getBorderColorAsync() {
41
- if (SystemBars != null) {
48
+ if (isEdgeToEdge()) {
42
49
  console.warn('`getBorderColorAsync` is not supported with edge-to-edge enabled.');
43
50
  return `#00000000`;
44
51
  }
45
52
  return await ExpoNavigationBar.getBorderColorAsync();
46
53
  }
47
54
  export async function setVisibilityAsync(visibility) {
48
- if (SystemBars != null) {
49
- SystemBars.setHidden({ navigationBar: visibility === 'hidden' });
50
- return;
51
- }
52
55
  await ExpoNavigationBar.setVisibilityAsync(visibility);
53
56
  }
54
57
  export async function getVisibilityAsync() {
55
58
  return ExpoNavigationBar.getVisibilityAsync();
56
59
  }
57
60
  export async function setButtonStyleAsync(style) {
58
- if (SystemBars != null) {
59
- SystemBars.setStyle({ navigationBar: style });
60
- return;
61
- }
62
61
  await ExpoNavigationBar.setButtonStyleAsync(style);
63
62
  }
64
63
  export async function getButtonStyleAsync() {
65
- if (SystemBars != null) {
64
+ if (isEdgeToEdge()) {
66
65
  console.warn('`getButtonStyleAsync` is not supported with edge-to-edge enabled.');
67
66
  return 'light';
68
67
  }
69
68
  return await ExpoNavigationBar.getButtonStyleAsync();
70
69
  }
71
70
  export async function setPositionAsync(position) {
72
- if (SystemBars != null) {
71
+ if (isEdgeToEdge()) {
73
72
  console.warn('`setPositionAsync` is not supported with edge-to-edge enabled.');
74
73
  return;
75
74
  }
76
75
  await ExpoNavigationBar.setPositionAsync(position);
77
76
  }
78
77
  export async function unstable_getPositionAsync() {
79
- if (SystemBars != null) {
78
+ if (isEdgeToEdge()) {
80
79
  console.warn('`unstable_getPositionAsync` is not supported with edge-to-edge enabled.');
81
80
  return 'relative';
82
81
  }
83
82
  return await ExpoNavigationBar.unstable_getPositionAsync();
84
83
  }
85
84
  export async function setBehaviorAsync(behavior) {
86
- if (SystemBars != null) {
85
+ if (isEdgeToEdge()) {
87
86
  console.warn('`setBehaviorAsync` is not supported with edge-to-edge enabled.');
88
87
  return;
89
88
  }
90
89
  await ExpoNavigationBar.setBehaviorAsync(behavior);
91
90
  }
92
91
  export async function getBehaviorAsync() {
93
- if (SystemBars != null) {
92
+ if (isEdgeToEdge()) {
94
93
  console.warn('`getBehaviorAsync` is not supported with edge-to-edge enabled.');
95
94
  return 'inset-touch';
96
95
  }
97
96
  return await ExpoNavigationBar.getBehaviorAsync();
98
97
  }
99
98
  export function setStyle(style) {
100
- if (SystemBars != null) {
101
- SystemBars.setStyle({ navigationBar: style });
102
- return;
103
- }
104
- throw new Error('`setStyle` is only supported on Android when edge-to-edge is enabled. Enable edge-to-edge or use the `setButtonStyle` function instead.');
99
+ ExpoNavigationBar.setButtonStyleAsync(navigationBarStyleToButtonStyle(style));
105
100
  }
106
101
  export function useVisibility() {
107
102
  const [visibility, setVisible] = useState(null);
@@ -1 +1 @@
1
- {"version":3,"file":"NavigationBar.android.js","sourceRoot":"","sources":["../src/NavigationBar.android.ts"],"names":[],"mappings":"AACA,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;AAUpD,gFAAgF;AAChF,gFAAgF;AAChF,2EAA2E;AAC3E,4EAA4E;AAC5E,oBAAoB;AACpB,IAAI,UAAU,GAAiE,IAAI,CAAC;AAEpF,IAAI,YAAY,EAAE,EAAE,CAAC;IACnB,UAAU,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC,UAAU,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,QAAuD;IAEvD,OAAO,iBAAiB,CAAC,WAAW,CAAC,6BAA6B,EAAE,QAAQ,CAAC,CAAC;AAChF,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,KAAa;IACzD,IAAI,UAAU,IAAI,IAAI,EAAE,CAAC;QACvB,OAAO,CAAC,IAAI,CAAC,uEAAuE,CAAC,CAAC;QACtF,OAAO;IACT,CAAC;IAED,MAAM,WAAW,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IACxC,MAAM,iBAAiB,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,uBAAuB;IAC3C,IAAI,UAAU,IAAI,IAAI,EAAE,CAAC;QACvB,OAAO,CAAC,IAAI,CAAC,uEAAuE,CAAC,CAAC;QACtF,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,OAAO,MAAM,iBAAiB,CAAC,uBAAuB,EAAE,CAAC;AAC3D,CAAC;AAED,MAAM,CA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OAAO;IACT,CAAC;IAED,MAAM,IAAI,KAAK,CACb,yIAAyI,CAC1I,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,aAAa;IAC3B,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAiC,IAAI,CAAC,CAAC;IAEhF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,SAAS,GAAG,IAAI,CAAC;QAErB,kBAAkB,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE;YACvC,IAAI,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","sourcesContent":["import { type EventSubscription } 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 type {\n NavigationBarBehavior,\n NavigationBarButtonStyle,\n NavigationBarPosition,\n NavigationBarStyle,\n NavigationBarVisibility,\n NavigationBarVisibilityEvent,\n} from './NavigationBar.types';\n\n// This line only imports the type information for TypeScript type checking. It\n// doesn't import the actual module in the compiled JavaScript code. The actual\n// module is imported conditionally with require() below, in order to avoid\n// importing the module if edge-to-edge is not enabled (which could throw if\n// it's not linked).\nlet SystemBars: typeof import('react-native-edge-to-edge').SystemBars | null = null;\n\nif (isEdgeToEdge()) {\n SystemBars = require('react-native-edge-to-edge').SystemBars;\n}\n\nexport function addVisibilityListener(\n listener: (event: NavigationBarVisibilityEvent) => void\n): EventSubscription {\n return ExpoNavigationBar.addListener('ExpoNavigationBar.didChange', listener);\n}\n\nexport async function setBackgroundColorAsync(color: string): Promise<void> {\n if (SystemBars != null) {\n console.warn('`setBackgroundColorAsync` is not supported with edge-to-edge enabled.');\n return;\n }\n\n const colorNumber = processColor(color);\n await ExpoNavigationBar.setBackgroundColorAsync(colorNumber);\n}\n\nexport async function getBackgroundColorAsync(): Promise<string> {\n if (SystemBars != null) {\n console.warn('`getBackgroundColorAsync` is not supported with edge-to-edge enabled.');\n return `#00000000`;\n }\n\n return await ExpoNavigationBar.getBackgroundColorAsync();\n}\n\nexport async function setBorderColorAsync(color: string): Promise<void> {\n if (SystemBars != null) {\n console.warn('`setBorderColorAsync` is not supported with edge-to-edge enabled.');\n return;\n }\n\n const colorNumber = processColor(color);\n await ExpoNavigationBar.setBorderColorAsync(colorNumber);\n}\n\nexport async function getBorderColorAsync(): Promise<string> {\n if (SystemBars != null) {\n console.warn('`getBorderColorAsync` is not supported with edge-to-edge enabled.');\n return `#00000000`;\n }\n\n return await ExpoNavigationBar.getBorderColorAsync();\n}\n\nexport async function setVisibilityAsync(visibility: NavigationBarVisibility): Promise<void> {\n if (SystemBars != null) {\n SystemBars.setHidden({ navigationBar: visibility === 'hidden' });\n return;\n }\n\n await ExpoNavigationBar.setVisibilityAsync(visibility);\n}\n\nexport async function getVisibilityAsync(): Promise<NavigationBarVisibility> {\n return ExpoNavigationBar.getVisibilityAsync();\n}\n\nexport async function setButtonStyleAsync(style: NavigationBarButtonStyle): Promise<void> {\n if (SystemBars != null) {\n SystemBars.setStyle({ navigationBar: style });\n return;\n }\n\n await ExpoNavigationBar.setButtonStyleAsync(style);\n}\n\nexport async function getButtonStyleAsync(): Promise<NavigationBarButtonStyle> {\n if (SystemBars != null) {\n console.warn('`getButtonStyleAsync` is not supported with edge-to-edge enabled.');\n return 'light';\n }\n\n return await ExpoNavigationBar.getButtonStyleAsync();\n}\n\nexport async function setPositionAsync(position: NavigationBarPosition): Promise<void> {\n if (SystemBars != null) {\n console.warn('`setPositionAsync` is not supported with edge-to-edge enabled.');\n return;\n }\n\n await ExpoNavigationBar.setPositionAsync(position);\n}\n\nexport async function unstable_getPositionAsync(): Promise<NavigationBarPosition> {\n if (SystemBars != null) {\n console.warn('`unstable_getPositionAsync` is not supported with edge-to-edge enabled.');\n return 'relative';\n }\n\n return await ExpoNavigationBar.unstable_getPositionAsync();\n}\n\nexport async function setBehaviorAsync(behavior: NavigationBarBehavior): Promise<void> {\n if (SystemBars != null) {\n console.warn('`setBehaviorAsync` is not supported with edge-to-edge enabled.');\n return;\n }\n\n await ExpoNavigationBar.setBehaviorAsync(behavior);\n}\n\nexport async function getBehaviorAsync(): Promise<NavigationBarBehavior> {\n if (SystemBars != null) {\n console.warn('`getBehaviorAsync` is not supported with edge-to-edge enabled.');\n return 'inset-touch';\n }\n\n return await ExpoNavigationBar.getBehaviorAsync();\n}\n\nexport function setStyle(style: NavigationBarStyle) {\n if (SystemBars != null) {\n SystemBars.setStyle({ navigationBar: style });\n return;\n }\n\n throw new Error(\n '`setStyle` is only supported on Android when edge-to-edge is enabled. Enable edge-to-edge or use the `setButtonStyle` function instead.'\n );\n}\n\nexport function useVisibility(): NavigationBarVisibility | null {\n const [visibility, setVisible] = useState<NavigationBarVisibility | null>(null);\n\n useEffect(() => {\n let isMounted = true;\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"]}
1
+ {"version":3,"file":"NavigationBar.android.js","sourceRoot":"","sources":["../src/NavigationBar.android.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAA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AAC,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","sourcesContent":["import { type EventSubscription } from 'expo-modules-core';\nimport { useEffect, useState } from 'react';\nimport { Appearance, processColor } from 'react-native';\nimport { isEdgeToEdge } from 'react-native-is-edge-to-edge';\n\nimport ExpoNavigationBar from './ExpoNavigationBar';\nimport type {\n NavigationBarBehavior,\n NavigationBarButtonStyle,\n NavigationBarPosition,\n NavigationBarStyle,\n NavigationBarVisibility,\n NavigationBarVisibilityEvent,\n} from './NavigationBar.types';\n\nfunction isLightColorScheme() {\n const colorScheme = Appearance?.getColorScheme() ?? 'light';\n return colorScheme === 'light';\n}\n\nfunction navigationBarStyleToButtonStyle(\n navigationBarStyle: NavigationBarStyle\n): NavigationBarButtonStyle {\n switch (navigationBarStyle) {\n case 'auto':\n return isLightColorScheme() ? 'dark' : 'light';\n case 'light':\n return 'dark';\n case 'dark':\n return 'light';\n case 'inverted':\n return isLightColorScheme() ? 'light' : 'dark';\n }\n}\n\nexport function addVisibilityListener(\n listener: (event: NavigationBarVisibilityEvent) => void\n): EventSubscription {\n return ExpoNavigationBar.addListener('ExpoNavigationBar.didChange', listener);\n}\n\nexport async function setBackgroundColorAsync(color: string): Promise<void> {\n if (isEdgeToEdge()) {\n console.warn('`setBackgroundColorAsync` is not supported with edge-to-edge enabled.');\n return;\n }\n\n const colorNumber = processColor(color);\n await ExpoNavigationBar.setBackgroundColorAsync(colorNumber);\n}\n\nexport async function getBackgroundColorAsync(): Promise<string> {\n if (isEdgeToEdge()) {\n console.warn('`getBackgroundColorAsync` is not supported with edge-to-edge enabled.');\n return `#00000000`;\n }\n\n return await ExpoNavigationBar.getBackgroundColorAsync();\n}\n\nexport async function setBorderColorAsync(color: string): Promise<void> {\n if (isEdgeToEdge()) {\n console.warn('`setBorderColorAsync` is not supported with edge-to-edge enabled.');\n return;\n }\n\n const colorNumber = processColor(color);\n await ExpoNavigationBar.setBorderColorAsync(colorNumber);\n}\n\nexport async function getBorderColorAsync(): Promise<string> {\n if (isEdgeToEdge()) {\n console.warn('`getBorderColorAsync` is not supported with edge-to-edge enabled.');\n return `#00000000`;\n }\n\n return await ExpoNavigationBar.getBorderColorAsync();\n}\n\nexport async function setVisibilityAsync(visibility: NavigationBarVisibility): Promise<void> {\n await ExpoNavigationBar.setVisibilityAsync(visibility);\n}\n\nexport async function getVisibilityAsync(): Promise<NavigationBarVisibility> {\n return ExpoNavigationBar.getVisibilityAsync();\n}\n\nexport async function setButtonStyleAsync(style: NavigationBarButtonStyle): Promise<void> {\n await ExpoNavigationBar.setButtonStyleAsync(style);\n}\n\nexport async function getButtonStyleAsync(): Promise<NavigationBarButtonStyle> {\n if (isEdgeToEdge()) {\n console.warn('`getButtonStyleAsync` is not supported with edge-to-edge enabled.');\n return 'light';\n }\n\n return await ExpoNavigationBar.getButtonStyleAsync();\n}\n\nexport async function setPositionAsync(position: NavigationBarPosition): Promise<void> {\n if (isEdgeToEdge()) {\n console.warn('`setPositionAsync` is not supported with edge-to-edge enabled.');\n return;\n }\n\n await ExpoNavigationBar.setPositionAsync(position);\n}\n\nexport async function unstable_getPositionAsync(): Promise<NavigationBarPosition> {\n if (isEdgeToEdge()) {\n console.warn('`unstable_getPositionAsync` is not supported with edge-to-edge enabled.');\n return 'relative';\n }\n\n return await ExpoNavigationBar.unstable_getPositionAsync();\n}\n\nexport async function setBehaviorAsync(behavior: NavigationBarBehavior): Promise<void> {\n if (isEdgeToEdge()) {\n console.warn('`setBehaviorAsync` is not supported with edge-to-edge enabled.');\n return;\n }\n\n await ExpoNavigationBar.setBehaviorAsync(behavior);\n}\n\nexport async function getBehaviorAsync(): Promise<NavigationBarBehavior> {\n if (isEdgeToEdge()) {\n console.warn('`getBehaviorAsync` is not supported with edge-to-edge enabled.');\n return 'inset-touch';\n }\n\n return await ExpoNavigationBar.getBehaviorAsync();\n}\n\nexport function setStyle(style: NavigationBarStyle) {\n ExpoNavigationBar.setButtonStyleAsync(navigationBarStyleToButtonStyle(style));\n}\n\nexport function useVisibility(): NavigationBarVisibility | null {\n const [visibility, setVisible] = useState<NavigationBarVisibility | null>(null);\n\n useEffect(() => {\n let isMounted = true;\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"]}
@@ -5,7 +5,7 @@
5
5
  "publication": {
6
6
  "groupId": "host.exp.exponent",
7
7
  "artifactId": "expo.modules.navigationbar",
8
- "version": "5.0.2",
8
+ "version": "5.0.4",
9
9
  "repository": "local-maven-repo"
10
10
  }
11
11
  }
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "host.exp.exponent",
5
5
  "module": "expo.modules.navigationbar",
6
- "version": "5.0.2",
6
+ "version": "5.0.4",
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-5.0.2.aar",
28
- "url": "expo.modules.navigationbar-5.0.2.aar",
27
+ "name": "expo.modules.navigationbar-5.0.4.aar",
28
+ "url": "expo.modules.navigationbar-5.0.4.aar",
29
29
  "size": 50041,
30
30
  "sha512": "51494b5685b15eb1a5311201f28483c79652a640953d039344e864831d3aee12f46c738c315fcd54c3522c0e7b5d6d5107e8055fd824a1defe77fa75b34b7ea5",
31
31
  "sha256": "a0a887acc77b369e119aa4280c4f0df863d1e94a4da83f95dcf7dafa6904fe7c",
@@ -67,8 +67,8 @@
67
67
  ],
68
68
  "files": [
69
69
  {
70
- "name": "expo.modules.navigationbar-5.0.2.aar",
71
- "url": "expo.modules.navigationbar-5.0.2.aar",
70
+ "name": "expo.modules.navigationbar-5.0.4.aar",
71
+ "url": "expo.modules.navigationbar-5.0.4.aar",
72
72
  "size": 50041,
73
73
  "sha512": "51494b5685b15eb1a5311201f28483c79652a640953d039344e864831d3aee12f46c738c315fcd54c3522c0e7b5d6d5107e8055fd824a1defe77fa75b34b7ea5",
74
74
  "sha256": "a0a887acc77b369e119aa4280c4f0df863d1e94a4da83f95dcf7dafa6904fe7c",
@@ -87,8 +87,8 @@
87
87
  },
88
88
  "files": [
89
89
  {
90
- "name": "expo.modules.navigationbar-5.0.2-sources.jar",
91
- "url": "expo.modules.navigationbar-5.0.2-sources.jar",
90
+ "name": "expo.modules.navigationbar-5.0.4-sources.jar",
91
+ "url": "expo.modules.navigationbar-5.0.4-sources.jar",
92
92
  "size": 5746,
93
93
  "sha512": "b062a1e85ccee489c49a264c5809226a0215ba7b7232895127f45002b605e6d5beb5739a3fee2c3b88420721949d17adfbd9dc15aaadebecd940958c871a8e28",
94
94
  "sha256": "c396cf58026bd79f443df5992bd12db17586c7e3702f1ace4c3e3e65a066cf14",
@@ -0,0 +1 @@
1
+ 533319bf3f3d9275936f1b0b1f02203bc21c2389024fcbc217921b5e8983dd80
@@ -0,0 +1 @@
1
+ 9d688853a196548860bdab9e28d98bf1057c2789a50173db4f4ff75037d81f3fdbc3971dabec34bb890902908d9468aa0530ac159330e201db6636dcbaa0ba17
@@ -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>5.0.2</version>
12
+ <version>5.0.4</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
+ a6a924a168468d61df4911bf0db05777b128c3ebada8438c32dd13db566a5be2
@@ -0,0 +1 @@
1
+ 5785590928deb0ffd0f4547dbe5dfbc9a8f27a6a5754e2a0f410999e5aece5dfe899c7dfdfcebcd6b50056614cdbfaeb7afc88b592becdb883637585ff95fc66
@@ -3,11 +3,11 @@
3
3
  <groupId>host.exp.exponent</groupId>
4
4
  <artifactId>expo.modules.navigationbar</artifactId>
5
5
  <versioning>
6
- <latest>5.0.2</latest>
7
- <release>5.0.2</release>
6
+ <latest>5.0.4</latest>
7
+ <release>5.0.4</release>
8
8
  <versions>
9
- <version>5.0.2</version>
9
+ <version>5.0.4</version>
10
10
  </versions>
11
- <lastUpdated>20250817001227</lastUpdated>
11
+ <lastUpdated>20250825161901</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- 45437b51ca1f2cc371780937534d5cc7
1
+ 69d3242725e5938768b0d169b18b4c66
@@ -1 +1 @@
1
- b7f2987ded545adc2eebec071f5dcb947ad72132
1
+ 6f9b2338a7d1cd6bc868a049d73dea7f573a533f
@@ -1 +1 @@
1
- f4019919c8992a18359328c0594fc1b49b959664f51052db3e76f4e7f3cab5e6
1
+ 8189d8507a872129a2509d96f676f9844fdaefdb695d9eb52943b3d1b05b3fe8
@@ -1 +1 @@
1
- 7e8b76aac95031ab3015f7fff6185fed244ad10c272130e704690cf8e588682e4e99dc23ffd084bd094e28abd9bdbdce7fb3f87ae19bdb47f15dfa74970a6542
1
+ 55a2f22e725302d169d3b470084160b70d9642af4d3c54f7122ae63dab5a79327abc9d014c0611b499b49a54c592cfc850c3c1490c4fcc47ec98470b1956614c
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-navigation-bar",
3
- "version": "5.0.2",
3
+ "version": "5.0.4",
4
4
  "description": "Modify and observe the native navigation bar on Android devices.",
5
5
  "main": "src/index.ts",
6
6
  "types": "build/index.d.ts",
@@ -36,17 +36,16 @@
36
36
  "dependencies": {
37
37
  "@react-native/normalize-colors": "0.81.0",
38
38
  "debug": "^4.3.2",
39
- "react-native-is-edge-to-edge": "^1.1.6",
40
- "react-native-edge-to-edge": "1.6.0"
39
+ "react-native-is-edge-to-edge": "^1.2.1"
41
40
  },
42
41
  "devDependencies": {
43
42
  "@types/debug": "^4.1.7",
44
- "expo-module-scripts": "^5.0.2"
43
+ "expo-module-scripts": "^5.0.3"
45
44
  },
46
45
  "peerDependencies": {
47
46
  "expo": "*",
48
47
  "react": "*",
49
48
  "react-native": "*"
50
49
  },
51
- "gitHead": "eaa9b645058cf2233fbb27bb21a19bc605c90a88"
50
+ "gitHead": "ef0b9ecf9645d3e93587d5ee5030dbfcbf735bbd"
52
51
  }
@@ -1,6 +1,6 @@
1
1
  import { type EventSubscription } from 'expo-modules-core';
2
2
  import { useEffect, useState } from 'react';
3
- import { processColor } from 'react-native';
3
+ import { Appearance, processColor } from 'react-native';
4
4
  import { isEdgeToEdge } from 'react-native-is-edge-to-edge';
5
5
 
6
6
  import ExpoNavigationBar from './ExpoNavigationBar';
@@ -13,15 +13,24 @@ import type {
13
13
  NavigationBarVisibilityEvent,
14
14
  } from './NavigationBar.types';
15
15
 
16
- // This line only imports the type information for TypeScript type checking. It
17
- // doesn't import the actual module in the compiled JavaScript code. The actual
18
- // module is imported conditionally with require() below, in order to avoid
19
- // importing the module if edge-to-edge is not enabled (which could throw if
20
- // it's not linked).
21
- let SystemBars: typeof import('react-native-edge-to-edge').SystemBars | null = null;
22
-
23
- if (isEdgeToEdge()) {
24
- SystemBars = require('react-native-edge-to-edge').SystemBars;
16
+ function isLightColorScheme() {
17
+ const colorScheme = Appearance?.getColorScheme() ?? 'light';
18
+ return colorScheme === 'light';
19
+ }
20
+
21
+ function navigationBarStyleToButtonStyle(
22
+ navigationBarStyle: NavigationBarStyle
23
+ ): NavigationBarButtonStyle {
24
+ switch (navigationBarStyle) {
25
+ case 'auto':
26
+ return isLightColorScheme() ? 'dark' : 'light';
27
+ case 'light':
28
+ return 'dark';
29
+ case 'dark':
30
+ return 'light';
31
+ case 'inverted':
32
+ return isLightColorScheme() ? 'light' : 'dark';
33
+ }
25
34
  }
26
35
 
27
36
  export function addVisibilityListener(
@@ -31,7 +40,7 @@ export function addVisibilityListener(
31
40
  }
32
41
 
33
42
  export async function setBackgroundColorAsync(color: string): Promise<void> {
34
- if (SystemBars != null) {
43
+ if (isEdgeToEdge()) {
35
44
  console.warn('`setBackgroundColorAsync` is not supported with edge-to-edge enabled.');
36
45
  return;
37
46
  }
@@ -41,7 +50,7 @@ export async function setBackgroundColorAsync(color: string): Promise<void> {
41
50
  }
42
51
 
43
52
  export async function getBackgroundColorAsync(): Promise<string> {
44
- if (SystemBars != null) {
53
+ if (isEdgeToEdge()) {
45
54
  console.warn('`getBackgroundColorAsync` is not supported with edge-to-edge enabled.');
46
55
  return `#00000000`;
47
56
  }
@@ -50,7 +59,7 @@ export async function getBackgroundColorAsync(): Promise<string> {
50
59
  }
51
60
 
52
61
  export async function setBorderColorAsync(color: string): Promise<void> {
53
- if (SystemBars != null) {
62
+ if (isEdgeToEdge()) {
54
63
  console.warn('`setBorderColorAsync` is not supported with edge-to-edge enabled.');
55
64
  return;
56
65
  }
@@ -60,7 +69,7 @@ export async function setBorderColorAsync(color: string): Promise<void> {
60
69
  }
61
70
 
62
71
  export async function getBorderColorAsync(): Promise<string> {
63
- if (SystemBars != null) {
72
+ if (isEdgeToEdge()) {
64
73
  console.warn('`getBorderColorAsync` is not supported with edge-to-edge enabled.');
65
74
  return `#00000000`;
66
75
  }
@@ -69,11 +78,6 @@ export async function getBorderColorAsync(): Promise<string> {
69
78
  }
70
79
 
71
80
  export async function setVisibilityAsync(visibility: NavigationBarVisibility): Promise<void> {
72
- if (SystemBars != null) {
73
- SystemBars.setHidden({ navigationBar: visibility === 'hidden' });
74
- return;
75
- }
76
-
77
81
  await ExpoNavigationBar.setVisibilityAsync(visibility);
78
82
  }
79
83
 
@@ -82,16 +86,11 @@ export async function getVisibilityAsync(): Promise<NavigationBarVisibility> {
82
86
  }
83
87
 
84
88
  export async function setButtonStyleAsync(style: NavigationBarButtonStyle): Promise<void> {
85
- if (SystemBars != null) {
86
- SystemBars.setStyle({ navigationBar: style });
87
- return;
88
- }
89
-
90
89
  await ExpoNavigationBar.setButtonStyleAsync(style);
91
90
  }
92
91
 
93
92
  export async function getButtonStyleAsync(): Promise<NavigationBarButtonStyle> {
94
- if (SystemBars != null) {
93
+ if (isEdgeToEdge()) {
95
94
  console.warn('`getButtonStyleAsync` is not supported with edge-to-edge enabled.');
96
95
  return 'light';
97
96
  }
@@ -100,7 +99,7 @@ export async function getButtonStyleAsync(): Promise<NavigationBarButtonStyle> {
100
99
  }
101
100
 
102
101
  export async function setPositionAsync(position: NavigationBarPosition): Promise<void> {
103
- if (SystemBars != null) {
102
+ if (isEdgeToEdge()) {
104
103
  console.warn('`setPositionAsync` is not supported with edge-to-edge enabled.');
105
104
  return;
106
105
  }
@@ -109,7 +108,7 @@ export async function setPositionAsync(position: NavigationBarPosition): Promise
109
108
  }
110
109
 
111
110
  export async function unstable_getPositionAsync(): Promise<NavigationBarPosition> {
112
- if (SystemBars != null) {
111
+ if (isEdgeToEdge()) {
113
112
  console.warn('`unstable_getPositionAsync` is not supported with edge-to-edge enabled.');
114
113
  return 'relative';
115
114
  }
@@ -118,7 +117,7 @@ export async function unstable_getPositionAsync(): Promise<NavigationBarPosition
118
117
  }
119
118
 
120
119
  export async function setBehaviorAsync(behavior: NavigationBarBehavior): Promise<void> {
121
- if (SystemBars != null) {
120
+ if (isEdgeToEdge()) {
122
121
  console.warn('`setBehaviorAsync` is not supported with edge-to-edge enabled.');
123
122
  return;
124
123
  }
@@ -127,7 +126,7 @@ export async function setBehaviorAsync(behavior: NavigationBarBehavior): Promise
127
126
  }
128
127
 
129
128
  export async function getBehaviorAsync(): Promise<NavigationBarBehavior> {
130
- if (SystemBars != null) {
129
+ if (isEdgeToEdge()) {
131
130
  console.warn('`getBehaviorAsync` is not supported with edge-to-edge enabled.');
132
131
  return 'inset-touch';
133
132
  }
@@ -136,14 +135,7 @@ export async function getBehaviorAsync(): Promise<NavigationBarBehavior> {
136
135
  }
137
136
 
138
137
  export function setStyle(style: NavigationBarStyle) {
139
- if (SystemBars != null) {
140
- SystemBars.setStyle({ navigationBar: style });
141
- return;
142
- }
143
-
144
- throw new Error(
145
- '`setStyle` is only supported on Android when edge-to-edge is enabled. Enable edge-to-edge or use the `setButtonStyle` function instead.'
146
- );
138
+ ExpoNavigationBar.setButtonStyleAsync(navigationBarStyleToButtonStyle(style));
147
139
  }
148
140
 
149
141
  export function useVisibility(): NavigationBarVisibility | null {
@@ -1 +0,0 @@
1
- e94e62f6e2db0f571707be78d36e951ed12e5d5eb40b5a911034a29e45d732cd
@@ -1 +0,0 @@
1
- a29b9a0ceb76b579ddbacce6408f20fa5cab412a52af5ff273e32d8b9767cc0061257c31a6bbba9ae931c3c85c51c63dd7a96721cf05bb06f401da661a2cc23e
@@ -1 +0,0 @@
1
- c3927ecdf8b1cabcc98b74b343dfd24de52467dce72be372304f8dd1e9328119
@@ -1 +0,0 @@
1
- 2e7208afc4441ecebe4b4f5bb5c3c740b162294f6193e1f89f2e3c7d840ce38437243c8f6ca5036e1f137b3cc552457b7c17cd817222da9324361aca1657e800