expo-navigation-bar 1.1.2 → 1.2.0
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 +15 -1
- package/README.md +7 -7
- package/android/build.gradle +24 -9
- package/android/src/main/java/expo/modules/navigationbar/NavigationBarModule.kt +6 -6
- package/build/ExpoNavigationBar.d.ts +1 -0
- package/build/ExpoNavigationBar.d.ts.map +1 -0
- package/build/ExpoNavigationBar.web.d.ts +1 -0
- package/build/ExpoNavigationBar.web.d.ts.map +1 -0
- package/build/NavigationBar.d.ts +1 -0
- package/build/NavigationBar.d.ts.map +1 -0
- package/build/NavigationBar.types.d.ts +1 -0
- package/build/NavigationBar.types.d.ts.map +1 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -10,7 +10,21 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
-
## 1.
|
|
13
|
+
## 1.2.0 — 2022-04-18
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- Fix `getVisiblilityAsync` crashing on Android 10 and older. ([#16445](https://github.com/expo/expo/pull/16445) by [@barthap](https://github.com/barthap))
|
|
18
|
+
|
|
19
|
+
### 💡 Others
|
|
20
|
+
|
|
21
|
+
- Updated `@expo/config-plugins` from `4.0.2` to `4.0.14` ([#15621](https://github.com/expo/expo/pull/15621) by [@EvanBacon](https://github.com/EvanBacon))
|
|
22
|
+
|
|
23
|
+
### ⚠️ Notices
|
|
24
|
+
|
|
25
|
+
- On Android bump `compileSdkVersion` to `31`, `targetSdkVersion` to `31` and `Java` version to `11`. ([#16941](https://github.com/expo/expo/pull/16941) by [@bbarthec](https://github.com/bbarthec))
|
|
26
|
+
|
|
27
|
+
## 1.1.2 - 2022-02-01
|
|
14
28
|
|
|
15
29
|
### 🐛 Bug fixes
|
|
16
30
|
|
package/README.md
CHANGED
|
@@ -6,12 +6,12 @@ Properties are named after style properties; visibility, position, backgroundCol
|
|
|
6
6
|
|
|
7
7
|
## API documentation
|
|
8
8
|
|
|
9
|
-
- [Documentation for the
|
|
9
|
+
- [Documentation for the main branch][docs-main]
|
|
10
10
|
- [Documentation for the latest stable release][docs-stable]
|
|
11
11
|
|
|
12
12
|
## Installation in managed Expo projects
|
|
13
13
|
|
|
14
|
-
For
|
|
14
|
+
For [managed][docs-workflows] Expo projects, please follow the installation instructions in the [API documentation for the latest stable release][docs-stable].
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
## Installation in bare React Native projects
|
|
@@ -29,9 +29,9 @@ expo install expo-navigation-bar
|
|
|
29
29
|
Contributions are very welcome! Please refer to guidelines described in the [contributing guide][contributing].
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
[docs-main]: https://github.com/expo/expo/blob/
|
|
33
|
-
[docs-stable]: https://docs.expo.
|
|
34
|
-
[docs-workflows]: https://docs.expo.
|
|
32
|
+
[docs-main]: https://github.com/expo/expo/blob/main/docs/pages/versions/unversioned/sdk/navigation-bar.md
|
|
33
|
+
[docs-stable]: https://docs.expo.dev/versions/latest/sdk/navigation-bar/
|
|
34
|
+
[docs-workflows]: https://docs.expo.dev/versions/latest/introduction/managed-vs-bare/
|
|
35
35
|
[contributing]: https://github.com/expo/expo#contributing
|
|
36
|
-
[unimodules]: https://github.com/expo/expo/tree/
|
|
37
|
-
[status-bar]: https://github.com/expo/expo/tree/
|
|
36
|
+
[unimodules]: https://github.com/expo/expo/tree/main/packages/react-native-unimodules
|
|
37
|
+
[status-bar]: https://github.com/expo/expo/tree/main/packages/expo-status-bar
|
package/android/build.gradle
CHANGED
|
@@ -3,20 +3,35 @@ apply plugin: 'kotlin-android'
|
|
|
3
3
|
apply plugin: 'maven-publish'
|
|
4
4
|
|
|
5
5
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '1.
|
|
6
|
+
version = '1.2.0'
|
|
7
7
|
|
|
8
8
|
buildscript {
|
|
9
|
+
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
10
|
+
if (expoModulesCorePlugin.exists()) {
|
|
11
|
+
apply from: expoModulesCorePlugin
|
|
12
|
+
applyKotlinExpoModulesCorePlugin()
|
|
13
|
+
}
|
|
14
|
+
|
|
9
15
|
// Simple helper that allows the root project to override versions declared by this library.
|
|
10
16
|
ext.safeExtGet = { prop, fallback ->
|
|
11
17
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
12
18
|
}
|
|
13
19
|
|
|
20
|
+
// Ensures backward compatibility
|
|
21
|
+
ext.getKotlinVersion = {
|
|
22
|
+
if (ext.has("kotlinVersion")) {
|
|
23
|
+
ext.kotlinVersion()
|
|
24
|
+
} else {
|
|
25
|
+
ext.safeExtGet("kotlinVersion", "1.6.10")
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
14
29
|
repositories {
|
|
15
30
|
mavenCentral()
|
|
16
31
|
}
|
|
17
32
|
|
|
18
33
|
dependencies {
|
|
19
|
-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${
|
|
34
|
+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}")
|
|
20
35
|
}
|
|
21
36
|
}
|
|
22
37
|
|
|
@@ -44,22 +59,22 @@ afterEvaluate {
|
|
|
44
59
|
}
|
|
45
60
|
|
|
46
61
|
android {
|
|
47
|
-
compileSdkVersion safeExtGet("compileSdkVersion",
|
|
62
|
+
compileSdkVersion safeExtGet("compileSdkVersion", 31)
|
|
48
63
|
|
|
49
64
|
compileOptions {
|
|
50
|
-
sourceCompatibility JavaVersion.
|
|
51
|
-
targetCompatibility JavaVersion.
|
|
65
|
+
sourceCompatibility JavaVersion.VERSION_11
|
|
66
|
+
targetCompatibility JavaVersion.VERSION_11
|
|
52
67
|
}
|
|
53
68
|
|
|
54
69
|
kotlinOptions {
|
|
55
|
-
jvmTarget = JavaVersion.
|
|
70
|
+
jvmTarget = JavaVersion.VERSION_11.majorVersion
|
|
56
71
|
}
|
|
57
72
|
|
|
58
73
|
defaultConfig {
|
|
59
74
|
minSdkVersion safeExtGet("minSdkVersion", 21)
|
|
60
|
-
targetSdkVersion safeExtGet("targetSdkVersion",
|
|
75
|
+
targetSdkVersion safeExtGet("targetSdkVersion", 31)
|
|
61
76
|
versionCode 1
|
|
62
|
-
versionName '1.
|
|
77
|
+
versionName '1.2.0'
|
|
63
78
|
}
|
|
64
79
|
lintOptions {
|
|
65
80
|
abortOnError false
|
|
@@ -69,7 +84,7 @@ android {
|
|
|
69
84
|
dependencies {
|
|
70
85
|
implementation project(':expo-modules-core')
|
|
71
86
|
|
|
72
|
-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${
|
|
87
|
+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
|
|
73
88
|
implementation 'androidx.core:core:1.6.0'
|
|
74
89
|
implementation 'androidx.appcompat:appcompat:1.2.0'
|
|
75
90
|
}
|
|
@@ -111,14 +111,14 @@ class NavigationBarModule(context: Context) : ExportedModule(context) {
|
|
|
111
111
|
@ExpoMethod
|
|
112
112
|
fun getVisibilityAsync(promise: Promise) {
|
|
113
113
|
safeRunOnUiThread(promise) {
|
|
114
|
-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.
|
|
115
|
-
|
|
116
|
-
promise.resolve(visibility)
|
|
114
|
+
val isVisible = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
|
115
|
+
it.window.decorView.rootWindowInsets.isVisible(WindowInsets.Type.navigationBars())
|
|
117
116
|
} else {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
promise.resolve(visibility)
|
|
117
|
+
@Suppress("DEPRECATION")
|
|
118
|
+
(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION and it.window.decorView.systemUiVisibility) == 0
|
|
121
119
|
}
|
|
120
|
+
val visibility = if (isVisible) "visible" else "hidden"
|
|
121
|
+
promise.resolve(visibility)
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpoNavigationBar.d.ts","sourceRoot":"","sources":["../src/ExpoNavigationBar.ts"],"names":[],"mappings":";AAEA,wBAA0D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpoNavigationBar.web.d.ts","sourceRoot":"","sources":["../src/ExpoNavigationBar.web.ts"],"names":[],"mappings":";;;AAAA,wBAIE"}
|
package/build/NavigationBar.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationBar.d.ts","sourceRoot":"","sources":["../src/NavigationBar.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,YAAY,EAAuB,MAAM,mBAAmB,CAAC;AAE9F,OAAO,EAAE,UAAU,EAAgB,MAAM,cAAc,CAAC;AAGxD,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,4BAA4B,EAC7B,MAAM,uBAAuB,CAAC;AAa/B;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,CAAC,KAAK,EAAE,4BAA4B,KAAK,IAAI,GACtD,YAAY,CAMd;AAED;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAO9E;AAED;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,UAAU,CAAC,CAMnE;AAED;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAO1E;AAED;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,UAAU,CAAC,CAO/D;AAED;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CAAC,UAAU,EAAE,uBAAuB,GAAG,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OAEG;IACH,UAAU,EAAE,uBAAuB,CAAC;IACpC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-navigation-bar",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Interact with the system navigation bar",
|
|
5
5
|
"main": "build/NavigationBar.js",
|
|
6
6
|
"types": "build/NavigationBar.d.ts",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
},
|
|
32
32
|
"author": "650 Industries, Inc.",
|
|
33
33
|
"license": "MIT",
|
|
34
|
-
"homepage": "https://docs.expo.
|
|
34
|
+
"homepage": "https://docs.expo.dev/versions/latest/sdk/navigation-bar",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@expo/config-plugins": "^4.0.
|
|
36
|
+
"@expo/config-plugins": "^4.0.14",
|
|
37
37
|
"@react-native/normalize-color": "^2.0.0",
|
|
38
38
|
"debug": "^4.3.2"
|
|
39
39
|
},
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"expo": "*"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "22dce752354bb429c84851bc4389abe47a766b1f"
|
|
48
48
|
}
|