expo-navigation-bar 1.1.1 → 1.3.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,6 +10,30 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 1.3.0 — 2022-07-07
14
+
15
+ _This version does not introduce any user-facing changes._
16
+
17
+ ## 1.2.0 — 2022-04-18
18
+
19
+ ### 🐛 Bug fixes
20
+
21
+ - Fix `getVisiblilityAsync` crashing on Android 10 and older. ([#16445](https://github.com/expo/expo/pull/16445) by [@barthap](https://github.com/barthap))
22
+
23
+ ### 💡 Others
24
+
25
+ - 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))
26
+
27
+ ### ⚠️ Notices
28
+
29
+ - 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))
30
+
31
+ ## 1.1.2 - 2022-02-01
32
+
33
+ ### 🐛 Bug fixes
34
+
35
+ - Fix `Plugin with id 'maven' not found` build error from Android Gradle 7. ([#16080](https://github.com/expo/expo/pull/16080) by [@kudo](https://github.com/kudo))
36
+
13
37
  ## 1.1.1 — 2021-12-08
14
38
 
15
39
  ### 🐛 Bug fixes
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
@@ -1,67 +1,80 @@
1
1
  apply plugin: 'com.android.library'
2
2
  apply plugin: 'kotlin-android'
3
- apply plugin: 'maven'
3
+ apply plugin: 'maven-publish'
4
4
 
5
5
  group = 'host.exp.exponent'
6
- version = '1.1.1'
6
+ version = '1.3.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
 
23
- // Upload android library to maven with javadoc and android sources
24
- configurations {
25
- deployerJars
26
- }
27
-
28
38
  // Creating sources with comments
29
39
  task androidSourcesJar(type: Jar) {
30
40
  classifier = 'sources'
31
41
  from android.sourceSets.main.java.srcDirs
32
42
  }
33
43
 
34
- // Put the androidSources and javadoc to the artifacts
35
- artifacts {
36
- archives androidSourcesJar
37
- }
38
-
39
- uploadArchives {
40
- repositories {
41
- mavenDeployer {
42
- configuration = configurations.deployerJars
43
- repository(url: mavenLocal().url)
44
+ afterEvaluate {
45
+ publishing {
46
+ publications {
47
+ release(MavenPublication) {
48
+ from components.release
49
+ // Add additional sourcesJar to artifacts
50
+ artifact(androidSourcesJar)
51
+ }
52
+ }
53
+ repositories {
54
+ maven {
55
+ url = mavenLocal().url
56
+ }
44
57
  }
45
58
  }
46
59
  }
47
60
 
48
61
  android {
49
- compileSdkVersion safeExtGet("compileSdkVersion", 30)
62
+ compileSdkVersion safeExtGet("compileSdkVersion", 31)
50
63
 
51
64
  compileOptions {
52
- sourceCompatibility JavaVersion.VERSION_1_8
53
- targetCompatibility JavaVersion.VERSION_1_8
65
+ sourceCompatibility JavaVersion.VERSION_11
66
+ targetCompatibility JavaVersion.VERSION_11
54
67
  }
55
68
 
56
69
  kotlinOptions {
57
- jvmTarget = JavaVersion.VERSION_1_8
70
+ jvmTarget = JavaVersion.VERSION_11.majorVersion
58
71
  }
59
72
 
60
73
  defaultConfig {
61
74
  minSdkVersion safeExtGet("minSdkVersion", 21)
62
- targetSdkVersion safeExtGet("targetSdkVersion", 30)
75
+ targetSdkVersion safeExtGet("targetSdkVersion", 31)
63
76
  versionCode 1
64
- versionName '1.1.1'
77
+ versionName '1.3.0'
65
78
  }
66
79
  lintOptions {
67
80
  abortOnError false
@@ -71,7 +84,7 @@ android {
71
84
  dependencies {
72
85
  implementation project(':expo-modules-core')
73
86
 
74
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${safeExtGet('kotlinVersion', '1.4.21')}"
87
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
75
88
  implementation 'androidx.core:core:1.6.0'
76
89
  implementation 'androidx.appcompat:appcompat:1.2.0'
77
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,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,OAAO,CAAC,IAAI,CAAC,CAM3F;AAED;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,uBAAuB,CAAC,CAM3E;AAED;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAMxF;AAED;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,wBAAwB,CAAC,CAM7E;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAMrF;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAMhF;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,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.1",
3
+ "version": "1.3.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": "~5.0.0",
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": "cf8e7fde1b19e10dd9b74a8af0e9362ae8e14001"
47
+ "gitHead": "6e131f2da851a47c3a24eb3d6fc971a1a7822086"
48
48
  }
package/tsconfig.json CHANGED
@@ -5,5 +5,5 @@
5
5
  "outDir": "./build"
6
6
  },
7
7
  "include": ["./src"],
8
- "exclude": ["**/__mocks__/*", "**/__tests__/*"]
8
+ "exclude": ["**/__mocks__/*", "**/__tests__/*", "**/__stories__/*"]
9
9
  }