expo-navigation-bar 57.0.0 → 57.0.2
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/android/src/main/java/expo/modules/navigationbar/NavigationBarModule.kt +16 -14
- package/android/src/main/java/expo/modules/navigationbar/NavigationBarReactActivityLifecycleListener.kt +38 -13
- package/android/src/main/res/values/attrs.xml +1 -0
- package/expo-module.config.json +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.2/expo.modules.navigationbar-57.0.2-sources.jar +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.2/expo.modules.navigationbar-57.0.2-sources.jar.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.2/expo.modules.navigationbar-57.0.2-sources.jar.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.2/expo.modules.navigationbar-57.0.2-sources.jar.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.2/expo.modules.navigationbar-57.0.2-sources.jar.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.2/expo.modules.navigationbar-57.0.2.aar +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.2/expo.modules.navigationbar-57.0.2.aar.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.2/expo.modules.navigationbar-57.0.2.aar.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.2/expo.modules.navigationbar-57.0.2.aar.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.2/expo.modules.navigationbar-57.0.2.aar.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{57.0.0/expo.modules.navigationbar-57.0.0.module → 57.0.2/expo.modules.navigationbar-57.0.2.module} +22 -22
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.2/expo.modules.navigationbar-57.0.2.module.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.2/expo.modules.navigationbar-57.0.2.module.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.2/expo.modules.navigationbar-57.0.2.module.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.2/expo.modules.navigationbar-57.0.2.module.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/{57.0.0/expo.modules.navigationbar-57.0.0.pom → 57.0.2/expo.modules.navigationbar-57.0.2.pom} +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.2/expo.modules.navigationbar-57.0.2.pom.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.2/expo.modules.navigationbar-57.0.2.pom.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.2/expo.modules.navigationbar-57.0.2.pom.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.2/expo.modules.navigationbar-57.0.2.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 +4 -4
- package/plugin/build/withNavigationBar.js +10 -26
- package/plugin/src/withNavigationBar.ts +18 -30
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.0/expo.modules.navigationbar-57.0.0-sources.jar +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.0/expo.modules.navigationbar-57.0.0-sources.jar.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.0/expo.modules.navigationbar-57.0.0-sources.jar.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.0/expo.modules.navigationbar-57.0.0-sources.jar.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.0/expo.modules.navigationbar-57.0.0-sources.jar.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.0/expo.modules.navigationbar-57.0.0.aar +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.0/expo.modules.navigationbar-57.0.0.aar.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.0/expo.modules.navigationbar-57.0.0.aar.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.0/expo.modules.navigationbar-57.0.0.aar.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.0/expo.modules.navigationbar-57.0.0.aar.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.0/expo.modules.navigationbar-57.0.0.module.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.0/expo.modules.navigationbar-57.0.0.module.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.0/expo.modules.navigationbar-57.0.0.module.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.0/expo.modules.navigationbar-57.0.0.module.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.0/expo.modules.navigationbar-57.0.0.pom.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.0/expo.modules.navigationbar-57.0.0.pom.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.0/expo.modules.navigationbar-57.0.0.pom.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/57.0.0/expo.modules.navigationbar-57.0.0.pom.sha512 +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,16 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 57.0.2 — 2026-07-15
|
|
14
|
+
|
|
15
|
+
_This version does not introduce any user-facing changes._
|
|
16
|
+
|
|
17
|
+
## 57.0.1 — 2026-06-30
|
|
18
|
+
|
|
19
|
+
### 🐛 Bug fixes
|
|
20
|
+
|
|
21
|
+
- Polyfill `enforceContrast` on Android 8 and 9. ([#47382](https://github.com/expo/expo/pull/47382) by [@zoontek](https://github.com/zoontek))
|
|
22
|
+
|
|
13
23
|
## 57.0.0 — 2026-06-25
|
|
14
24
|
|
|
15
25
|
### 🎉 New features
|
package/android/build.gradle
CHANGED
|
@@ -37,11 +37,12 @@ internal fun Window.setNavigationBarStyle(
|
|
|
37
37
|
return // isAppearanceLightNavigationBars is not available below Android O.
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
// android:enforceNavigationBarContrast is not available below Android Q.
|
|
41
|
-
// This means the button style is not automatically adjusted for contrast,
|
|
42
|
-
// so we set an explicit navigation bar color to avoid invisible buttons.
|
|
43
40
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
|
|
44
|
-
navigationBarColor =
|
|
41
|
+
navigationBarColor = when {
|
|
42
|
+
!isContrastEnforced -> Color.TRANSPARENT
|
|
43
|
+
hasLightBackground -> LightNavigationBarColor
|
|
44
|
+
else -> DarkNavigationBarColor
|
|
45
|
+
}
|
|
45
46
|
} else {
|
|
46
47
|
isNavigationBarContrastEnforced = isContrastEnforced
|
|
47
48
|
}
|
|
@@ -67,18 +68,19 @@ class NavigationBarModule : Module(), ExtraWindowEventListener {
|
|
|
67
68
|
private val reactContext get() = appContext.reactContext as? ReactApplicationContext
|
|
68
69
|
|
|
69
70
|
private val isContrastEnforced: Boolean by lazy {
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
val theme = currentActivity.theme
|
|
72
|
+
val value = TypedValue()
|
|
73
|
+
|
|
74
|
+
val resId = if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
|
|
75
|
+
R.attr.expoEnforceNavigationBarContrast
|
|
72
76
|
} else {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
val value = TypedValue()
|
|
77
|
+
android.R.attr.enforceNavigationBarContrast
|
|
78
|
+
}
|
|
76
79
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
80
|
+
if (theme.resolveAttribute(resId, value, true)) {
|
|
81
|
+
value.data != 0
|
|
82
|
+
} else {
|
|
83
|
+
true
|
|
82
84
|
}
|
|
83
85
|
}
|
|
84
86
|
|
|
@@ -2,29 +2,54 @@ package expo.modules.navigationbar
|
|
|
2
2
|
|
|
3
3
|
import android.app.Activity
|
|
4
4
|
import android.content.res.Resources
|
|
5
|
+
import android.graphics.Color
|
|
6
|
+
import android.os.Build
|
|
5
7
|
import android.os.Bundle
|
|
8
|
+
import android.view.Window
|
|
6
9
|
import androidx.core.view.WindowInsetsCompat
|
|
7
10
|
import androidx.core.view.WindowInsetsControllerCompat
|
|
8
11
|
import expo.modules.core.interfaces.ReactActivityLifecycleListener
|
|
9
12
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
internal fun Resources.Theme.getBooleanAttribute(attr: Int, defValue: Boolean): Boolean {
|
|
14
|
+
val typedArray = obtainStyledAttributes(intArrayOf(attr))
|
|
15
|
+
|
|
16
|
+
return try {
|
|
17
|
+
typedArray.getBoolean(0, defValue)
|
|
18
|
+
} finally {
|
|
19
|
+
typedArray.recycle()
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@Suppress("DEPRECATION")
|
|
24
|
+
internal fun Window.disableNavigationBarContrast() {
|
|
25
|
+
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
|
|
26
|
+
return // isAppearanceLightNavigationBars is not available below Android O.
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
|
|
30
|
+
navigationBarColor = Color.TRANSPARENT
|
|
31
|
+
} else {
|
|
32
|
+
isNavigationBarContrastEnforced = false
|
|
21
33
|
}
|
|
34
|
+
}
|
|
22
35
|
|
|
36
|
+
class NavigationBarReactActivityLifecycleListener : ReactActivityLifecycleListener {
|
|
23
37
|
override fun onCreate(activity: Activity, savedInstanceState: Bundle?) {
|
|
24
38
|
// Execute static tasks before the JS engine starts
|
|
25
|
-
|
|
26
|
-
|
|
39
|
+
val theme = activity.theme
|
|
40
|
+
val window = activity.window
|
|
41
|
+
|
|
42
|
+
val resId = if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
|
|
43
|
+
R.attr.expoEnforceNavigationBarContrast
|
|
44
|
+
} else {
|
|
45
|
+
android.R.attr.enforceNavigationBarContrast
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (!theme.getBooleanAttribute(resId, true)) {
|
|
49
|
+
window.disableNavigationBarContrast()
|
|
50
|
+
}
|
|
27
51
|
|
|
52
|
+
if (theme.getBooleanAttribute(R.attr.expoNavigationBarHidden, false)) {
|
|
28
53
|
WindowInsetsControllerCompat(window, window.decorView)
|
|
29
54
|
.hide(WindowInsetsCompat.Type.navigationBars())
|
|
30
55
|
}
|
package/expo-module.config.json
CHANGED
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b8a1e040298fd2c2690fba13467fe760
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
07bd124a9e8b1716f35d9ec6ad0c46a670743bd8
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
e331bc96efa42246b8e8b8a50566e3bda5786ae8c47e14c22ac6257cdca3bf3b
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
702b75b968418cab6eebd6be37091904be77379ffc15633540bcfabb408425fbd0c259adf451ddcd5307393c3dc041516a6e702b5958bbc4afad52df5f9de796
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
fe32c3197b6d9c7e60d99934e69e70a4
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
59746d37a4b06e1dc18739a262d6f03d97b45e01
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b172665a6d15a5edce65305345a2b5b1a1e7ce25dba6ab767c582c9ec30405ab
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
56ee5374e70542856900211b14a3823a8a8ea3f83476bdb802bf4d541b8a299fcd9df89b32fe13d9241fdc1ac74d7c895550dd600bda7962697529d678ef4593
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "host.exp.exponent",
|
|
5
5
|
"module": "expo.modules.navigationbar",
|
|
6
|
-
"version": "57.0.
|
|
6
|
+
"version": "57.0.2",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
{
|
|
27
|
-
"name": "expo.modules.navigationbar-57.0.
|
|
28
|
-
"url": "expo.modules.navigationbar-57.0.
|
|
29
|
-
"size":
|
|
30
|
-
"sha512": "
|
|
31
|
-
"sha256": "
|
|
32
|
-
"sha1": "
|
|
33
|
-
"md5": "
|
|
27
|
+
"name": "expo.modules.navigationbar-57.0.2.aar",
|
|
28
|
+
"url": "expo.modules.navigationbar-57.0.2.aar",
|
|
29
|
+
"size": 31724,
|
|
30
|
+
"sha512": "56ee5374e70542856900211b14a3823a8a8ea3f83476bdb802bf4d541b8a299fcd9df89b32fe13d9241fdc1ac74d7c895550dd600bda7962697529d678ef4593",
|
|
31
|
+
"sha256": "b172665a6d15a5edce65305345a2b5b1a1e7ce25dba6ab767c582c9ec30405ab",
|
|
32
|
+
"sha1": "59746d37a4b06e1dc18739a262d6f03d97b45e01",
|
|
33
|
+
"md5": "fe32c3197b6d9c7e60d99934e69e70a4"
|
|
34
34
|
}
|
|
35
35
|
]
|
|
36
36
|
},
|
|
@@ -85,13 +85,13 @@
|
|
|
85
85
|
],
|
|
86
86
|
"files": [
|
|
87
87
|
{
|
|
88
|
-
"name": "expo.modules.navigationbar-57.0.
|
|
89
|
-
"url": "expo.modules.navigationbar-57.0.
|
|
90
|
-
"size":
|
|
91
|
-
"sha512": "
|
|
92
|
-
"sha256": "
|
|
93
|
-
"sha1": "
|
|
94
|
-
"md5": "
|
|
88
|
+
"name": "expo.modules.navigationbar-57.0.2.aar",
|
|
89
|
+
"url": "expo.modules.navigationbar-57.0.2.aar",
|
|
90
|
+
"size": 31724,
|
|
91
|
+
"sha512": "56ee5374e70542856900211b14a3823a8a8ea3f83476bdb802bf4d541b8a299fcd9df89b32fe13d9241fdc1ac74d7c895550dd600bda7962697529d678ef4593",
|
|
92
|
+
"sha256": "b172665a6d15a5edce65305345a2b5b1a1e7ce25dba6ab767c582c9ec30405ab",
|
|
93
|
+
"sha1": "59746d37a4b06e1dc18739a262d6f03d97b45e01",
|
|
94
|
+
"md5": "fe32c3197b6d9c7e60d99934e69e70a4"
|
|
95
95
|
}
|
|
96
96
|
]
|
|
97
97
|
},
|
|
@@ -105,13 +105,13 @@
|
|
|
105
105
|
},
|
|
106
106
|
"files": [
|
|
107
107
|
{
|
|
108
|
-
"name": "expo.modules.navigationbar-57.0.
|
|
109
|
-
"url": "expo.modules.navigationbar-57.0.
|
|
110
|
-
"size":
|
|
111
|
-
"sha512": "
|
|
112
|
-
"sha256": "
|
|
113
|
-
"sha1": "
|
|
114
|
-
"md5": "
|
|
108
|
+
"name": "expo.modules.navigationbar-57.0.2-sources.jar",
|
|
109
|
+
"url": "expo.modules.navigationbar-57.0.2-sources.jar",
|
|
110
|
+
"size": 4234,
|
|
111
|
+
"sha512": "702b75b968418cab6eebd6be37091904be77379ffc15633540bcfabb408425fbd0c259adf451ddcd5307393c3dc041516a6e702b5958bbc4afad52df5f9de796",
|
|
112
|
+
"sha256": "e331bc96efa42246b8e8b8a50566e3bda5786ae8c47e14c22ac6257cdca3bf3b",
|
|
113
|
+
"sha1": "07bd124a9e8b1716f35d9ec6ad0c46a670743bd8",
|
|
114
|
+
"md5": "b8a1e040298fd2c2690fba13467fe760"
|
|
115
115
|
}
|
|
116
116
|
]
|
|
117
117
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
70a2e558ce7318045e37b3f695a23f6f
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0fdc0e93385af4c5c623a40ee62331f0956f3094
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
48865074d63a0b124469bbbcdb4444b97a7e929ae78999e6b3c733f8cb6fe47c
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
6f00d5c8c351485637c8ff4a947ba586eaaa7317cc51a9057627f4346af657ab45aff2b5a5c983383269c3c7f2fe859222b7efb321065d9abd4a2d3c0d5276bb
|
|
@@ -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>57.0.
|
|
12
|
+
<version>57.0.2</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
|
+
78211fb109c0e5d2bd6d3805366961c2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b929db306d369caa3cb81200133622dc115c4349
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
128c70bd56bf05e2eae2b9d740efb2962783f137ca9771c2a132cece4a947ad7
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
e97af078c71a2545e86fb6db2fd5049833d8dc5d1e4e407a0fca340b3c3733f548a065e6a750d98a946d6e98ee8d6126b8db1b037309b8fe1c36d56bbf4a4ad0
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>host.exp.exponent</groupId>
|
|
4
4
|
<artifactId>expo.modules.navigationbar</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>57.0.
|
|
7
|
-
<release>57.0.
|
|
6
|
+
<latest>57.0.2</latest>
|
|
7
|
+
<release>57.0.2</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>57.0.
|
|
9
|
+
<version>57.0.2</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20260715094904</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
|
+
b2a8d3cd9fb327ac6b43982454a7bfd1
|
package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/maven-metadata.xml.sha1
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
c5d6fbc98ee400ee7d0e4756d517060e9c437803
|
package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/maven-metadata.xml.sha256
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
886361ba48e270f8955cbba517fa02330ffcf7bc53884b2c95b4bee5e7fff6a2
|
package/local-maven-repo/host/exp/exponent/expo.modules.navigationbar/maven-metadata.xml.sha512
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
0608e64b808fc12516247b1320c10fee0cd23ddbc5b82a02a8bd3b872d9c129ecdfcd7308057d2bea1e235fa56537bb278036a5a91b37a9f3113d46caa6d22a5
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-navigation-bar",
|
|
3
|
-
"version": "57.0.
|
|
3
|
+
"version": "57.0.2",
|
|
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",
|
|
@@ -40,15 +40,15 @@
|
|
|
40
40
|
"@types/debug": "^4.1.7",
|
|
41
41
|
"@types/node": "^22.14.0",
|
|
42
42
|
"@types/react": "~19.2.0",
|
|
43
|
-
"expo": "
|
|
44
|
-
"expo
|
|
43
|
+
"expo-module-scripts": "56.0.3",
|
|
44
|
+
"expo": "57.0.6"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"expo": "*",
|
|
48
48
|
"react": "*",
|
|
49
49
|
"react-native": "*"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "b9503d06b8e130abfca1bc16f671dbefb41ad709",
|
|
52
52
|
"scripts": {
|
|
53
53
|
"build": "expo-module build",
|
|
54
54
|
"clean": "expo-module clean",
|
|
@@ -64,33 +64,17 @@ const setNavigationBarStyles = ({ hidden, style }, styles) => {
|
|
|
64
64
|
};
|
|
65
65
|
exports.setNavigationBarStyles = setNavigationBarStyles;
|
|
66
66
|
function applyEnforceNavigationBarContrast(config, enforceNavigationBarContrast) {
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
const mainThemeIndex = style.findIndex(({ $ }) => $.name === 'AppTheme');
|
|
76
|
-
if (mainThemeIndex === -1) {
|
|
77
|
-
return config;
|
|
78
|
-
}
|
|
79
|
-
const mainTheme = style[mainThemeIndex];
|
|
80
|
-
if (mainTheme != null) {
|
|
81
|
-
const enforceIndex = mainTheme.item.findIndex(({ $ }) => $.name === 'android:enforceNavigationBarContrast');
|
|
82
|
-
if (enforceIndex !== -1) {
|
|
83
|
-
mainTheme.item[enforceIndex] = enforceNavigationBarContrastItem;
|
|
84
|
-
return config;
|
|
67
|
+
const androidAttr = 'android:enforceNavigationBarContrast';
|
|
68
|
+
const expoAttr = 'expoEnforceNavigationBarContrast';
|
|
69
|
+
const attrs = new Set([androidAttr, expoAttr]);
|
|
70
|
+
const value = String(enforceNavigationBarContrast);
|
|
71
|
+
config.modResults.resources.style = config.modResults.resources.style?.map((style) => {
|
|
72
|
+
if (style.$.name === 'AppTheme') {
|
|
73
|
+
style.item = style.item.filter((item) => !attrs.has(item.$.name));
|
|
74
|
+
style.item.push({ $: { name: androidAttr, 'tools:targetApi': '29' }, _: value }, { $: { name: expoAttr }, _: value });
|
|
85
75
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
$: mainTheme.$,
|
|
89
|
-
item: [enforceNavigationBarContrastItem, ...mainTheme.item],
|
|
90
|
-
},
|
|
91
|
-
...style.filter(({ $ }) => $.name !== 'AppTheme'),
|
|
92
|
-
];
|
|
93
|
-
}
|
|
76
|
+
return style;
|
|
77
|
+
});
|
|
94
78
|
return config;
|
|
95
79
|
}
|
|
96
80
|
exports.default = (0, config_plugins_1.createRunOncePlugin)(withNavigationBar, pkg.name, pkg.version);
|
|
@@ -125,37 +125,25 @@ export function applyEnforceNavigationBarContrast(
|
|
|
125
125
|
config: ResourceXMLConfig,
|
|
126
126
|
enforceNavigationBarContrast: boolean
|
|
127
127
|
): ResourceXMLConfig {
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
);
|
|
146
|
-
if (enforceIndex !== -1) {
|
|
147
|
-
mainTheme.item[enforceIndex] = enforceNavigationBarContrastItem;
|
|
148
|
-
return config;
|
|
128
|
+
const androidAttr = 'android:enforceNavigationBarContrast';
|
|
129
|
+
const expoAttr = 'expoEnforceNavigationBarContrast';
|
|
130
|
+
const attrs = new Set([androidAttr, expoAttr]);
|
|
131
|
+
const value = String(enforceNavigationBarContrast);
|
|
132
|
+
|
|
133
|
+
config.modResults.resources.style = config.modResults.resources.style?.map(
|
|
134
|
+
(style): typeof style => {
|
|
135
|
+
if (style.$.name === 'AppTheme') {
|
|
136
|
+
style.item = style.item.filter((item) => !attrs.has(item.$.name));
|
|
137
|
+
|
|
138
|
+
style.item.push(
|
|
139
|
+
{ $: { name: androidAttr, 'tools:targetApi': '29' }, _: value },
|
|
140
|
+
{ $: { name: expoAttr }, _: value }
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return style;
|
|
149
145
|
}
|
|
150
|
-
|
|
151
|
-
config.modResults.resources.style = [
|
|
152
|
-
{
|
|
153
|
-
$: mainTheme.$,
|
|
154
|
-
item: [enforceNavigationBarContrastItem, ...mainTheme.item],
|
|
155
|
-
},
|
|
156
|
-
...style.filter(({ $ }) => $.name !== 'AppTheme'),
|
|
157
|
-
];
|
|
158
|
-
}
|
|
146
|
+
);
|
|
159
147
|
|
|
160
148
|
return config;
|
|
161
149
|
}
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
d3eb7667f93951e1178a65d1392d7f4c
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
71417fbcc4a9d91518e44c57dcc382a78a3f707b
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
b695b0f50b2fff14177d6be50cf0852596dc6a1532adaac4ab4fab10bf5dedaa
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
d2e9578615bd59c310dafe9a0893f14a0f97f995c6d9103708adf9a88c626fffd87f8c33837ba81315ab7d24d3c668191b10ef863b0a5227db0e761d5fb2203b
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
f2f4c0ceec0465aec68f5ba99d236ad9
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
d82af5813afe81b9e898a516f86f1d8684b75f82
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2e2bfcbb7b8c11264caa8f1a97f2d4c35b96c4b688bac67d58e1987ae7c27a06
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3f6f98e6392922062851244849536187e298c8b4e64acd2705f070d0b64ff7d29fa4e5b1520a4abcf80f8a8d81dfc94aa468e0e61be6593ed3606312350629ad
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
8abe7148186cb328f501a1589ccf1b7a
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ebedf4af286601935721f7f47a231cfc0761df94
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
29e2b758930e31f4f0e910d67ac149d6cd7ffec861e23bcc3f637fb6101811bc
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
d057770e228f1d97d25aefc814a8530f7b91c8635a583d5ded61662233522b41896aa2bd719cb4c3d8e2eb76aaabf6a16882dbda005497987a708dcae35792b9
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
148dbf4cc95b235b72cc0a844a8a3439
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
45d8f95c2e979b29cf7b8fc91f7a03b1dfac914a
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
eaf405e4a6e5d070f98cb276fc3aa6a6930172abc5550eaa75f3e07992b838cf
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
581077f825004f4de5cfe7e15f316464f9e5e30521341dc55c66c31701ab83c5b96b5d7dbfcdba467351b54870940b13ce10aa23b769a66d1ee12f021cb7ffd7
|