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 CHANGED
@@ -10,7 +10,21 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
- ## 1.1.2 — 2022-02-01
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 master branch][docs-main]
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 managed [managed][docs-workflows] Expo projects, please follow the installation instructions in the [API documentation for the latest stable release][docs-stable].
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/master/docs/pages/versions/unversioned/sdk/navigation-bar.md
33
- [docs-stable]: https://docs.expo.io/versions/latest/sdk/navigation-bar/
34
- [docs-workflows]: https://docs.expo.io/versions/latest/introduction/managed-vs-bare/
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/master/packages/react-native-unimodules
37
- [status-bar]: https://github.com/expo/expo/tree/master/packages/expo-status-bar
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
@@ -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.1.2'
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:${safeExtGet('kotlinVersion', '1.4.21')}")
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", 30)
62
+ compileSdkVersion safeExtGet("compileSdkVersion", 31)
48
63
 
49
64
  compileOptions {
50
- sourceCompatibility JavaVersion.VERSION_1_8
51
- targetCompatibility JavaVersion.VERSION_1_8
65
+ sourceCompatibility JavaVersion.VERSION_11
66
+ targetCompatibility JavaVersion.VERSION_11
52
67
  }
53
68
 
54
69
  kotlinOptions {
55
- jvmTarget = JavaVersion.VERSION_1_8
70
+ jvmTarget = JavaVersion.VERSION_11.majorVersion
56
71
  }
57
72
 
58
73
  defaultConfig {
59
74
  minSdkVersion safeExtGet("minSdkVersion", 21)
60
- targetSdkVersion safeExtGet("targetSdkVersion", 30)
75
+ targetSdkVersion safeExtGet("targetSdkVersion", 31)
61
76
  versionCode 1
62
- versionName '1.1.2'
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:${safeExtGet('kotlinVersion', '1.4.21')}"
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.M) {
115
- val visibility = if (it.window.decorView.rootWindowInsets.isVisible(WindowInsets.Type.navigationBars())) "visible" else "hidden"
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
- // TODO: Verify this works
119
- @Suppress("DEPRECATION") val visibility = if ((View.SYSTEM_UI_FLAG_HIDE_NAVIGATION and it.window.decorView.systemUiVisibility) == 0) "visible" else "hidden"
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
 
@@ -1,2 +1,3 @@
1
1
  declare const _default: import("expo-modules-core").ProxyNativeModule;
2
2
  export default _default;
3
+ //# sourceMappingURL=ExpoNavigationBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoNavigationBar.d.ts","sourceRoot":"","sources":["../src/ExpoNavigationBar.ts"],"names":[],"mappings":";AAEA,wBAA0D"}
@@ -2,3 +2,4 @@ declare const _default: {
2
2
  readonly name: string;
3
3
  };
4
4
  export default _default;
5
+ //# sourceMappingURL=ExpoNavigationBar.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoNavigationBar.web.d.ts","sourceRoot":"","sources":["../src/ExpoNavigationBar.web.ts"],"names":[],"mappings":";;;AAAA,wBAIE"}
@@ -165,3 +165,4 @@ export declare function getBehaviorAsync(): Promise<NavigationBarBehavior>;
165
165
  */
166
166
  export declare function useVisibility(): NavigationBarVisibility | null;
167
167
  export * from './NavigationBar.types';
168
+ //# sourceMappingURL=NavigationBar.d.ts.map
@@ -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,EAC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OAAO,CAAC,IAAI,CAAC,CAMrF;AAED;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAMvE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,IAAI,uBAAuB,GAAG,IAAI,CA4B9D;AAED,cAAc,uBAAuB,CAAC"}
@@ -30,3 +30,4 @@ export declare type NavigationBarVisibilityEvent = {
30
30
  */
31
31
  rawVisibility: number;
32
32
  };
33
+ //# sourceMappingURL=NavigationBar.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavigationBar.types.d.ts","sourceRoot":"","sources":["../src/NavigationBar.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,oBAAY,wBAAwB,GAAG,OAAO,GAAG,MAAM,CAAC;AAExD;;GAEG;AACH,oBAAY,uBAAuB,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE3D;;GAEG;AACH,oBAAY,qBAAqB,GAAG,eAAe,GAAG,aAAa,GAAG,aAAa,CAAC;AAEpF;;GAEG;AACH,oBAAY,qBAAqB,GAAG,UAAU,GAAG,UAAU,CAAC;AAE5D;;GAEG;AACH,oBAAY,4BAA4B,GAAG;IACzC;;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.1.2",
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.io/versions/latest/sdk/navigation-bar",
34
+ "homepage": "https://docs.expo.dev/versions/latest/sdk/navigation-bar",
35
35
  "dependencies": {
36
- "@expo/config-plugins": "^4.0.2",
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": "ba24eba18bf4f4d4b0d54828992d81a2bb18246a"
47
+ "gitHead": "22dce752354bb429c84851bc4389abe47a766b1f"
48
48
  }