expo-system-ui 1.1.1 → 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,17 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
- ## 1.1.1 — 2022-02-01
13
+ ## 1.2.0 — 2022-04-18
14
+
15
+ ### 💡 Others
16
+
17
+ - 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))
18
+
19
+ ### ⚠️ Notices
20
+
21
+ - 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))
22
+
23
+ ## 1.1.1 - 2022-02-01
14
24
 
15
25
  ### 🐛 Bug fixes
16
26
 
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## API documentation
6
6
 
7
- - [Documentation for the master branch][docs-main]
7
+ - [Documentation for the main branch][docs-main]
8
8
  - [Documentation for the latest stable release][docs-stable]
9
9
 
10
10
  ### Installation
@@ -21,7 +21,7 @@ For bare React Native projects, ensure that you have the [native `expo` package]
21
21
 
22
22
  Contributions are very welcome! Please refer to guidelines described in the [contributing guide][contributing].
23
23
 
24
- [docs-main]: https://github.com/expo/expo/blob/master/docs/pages/versions/unversioned/sdk/system-ui.md
24
+ [docs-main]: https://github.com/expo/expo/blob/main/docs/pages/versions/unversioned/sdk/system-ui.md
25
25
  [docs-stable]: https://docs.expo.dev/versions/latest/sdk/system-ui/
26
26
  [contributing]: https://github.com/expo/expo#contributing
27
27
  [expo-modules]: https://docs.expo.dev/bare/installing-expo-modules/
@@ -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.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:${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.1'
77
+ versionName '1.2.0'
63
78
  }
64
79
  lintOptions {
65
80
  abortOnError false
@@ -71,7 +86,7 @@ dependencies {
71
86
 
72
87
  //noinspection GradleDynamicVersion
73
88
  implementation 'com.facebook.react:react-native:+'
74
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${safeExtGet('kotlinVersion', '1.4.21')}"
89
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
75
90
  implementation 'androidx.core:core:1.6.0'
76
91
  implementation 'androidx.appcompat:appcompat:1.2.0'
77
92
  }
@@ -1,2 +1,3 @@
1
1
  declare const _default: import("expo-modules-core").ProxyNativeModule;
2
2
  export default _default;
3
+ //# sourceMappingURL=ExpoSystemUI.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoSystemUI.d.ts","sourceRoot":"","sources":["../src/ExpoSystemUI.ts"],"names":[],"mappings":";AAEA,wBAAqD"}
@@ -4,3 +4,4 @@ declare const _default: {
4
4
  setBackgroundColorAsync(color: string): void;
5
5
  };
6
6
  export default _default;
7
+ //# sourceMappingURL=ExpoSystemUI.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoSystemUI.web.d.ts","sourceRoot":"","sources":["../src/ExpoSystemUI.web.ts"],"names":[],"mappings":";;;mCAeiC,MAAM;;AAXvC,wBAgBE"}
@@ -19,3 +19,4 @@ export declare function setBackgroundColorAsync(color: ColorValue): Promise<void
19
19
  * @returns Current root view background color in hex format. Returns `null` if the background color is not set.
20
20
  */
21
21
  export declare function getBackgroundColorAsync(): Promise<ColorValue | null>;
22
+ //# sourceMappingURL=SystemUI.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SystemUI.d.ts","sourceRoot":"","sources":["../src/SystemUI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAgB,MAAM,cAAc,CAAC;AAIxD;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAG9E;AAED;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAE1E"}
@@ -3,10 +3,9 @@
3
3
  import ExpoModulesCore
4
4
 
5
5
  public class ExpoSystemUIModule: Module {
6
-
7
6
  public func definition() -> ModuleDefinition {
8
7
  name("ExpoSystemUI")
9
-
8
+
10
9
  onCreate {
11
10
  // TODO: Maybe read from the app manifest instead of from Info.plist.
12
11
  // Set / reset the initial color on reload and app start.
@@ -24,7 +23,7 @@ public class ExpoSystemUIModule: Module {
24
23
  }
25
24
 
26
25
  static func getBackgroundColor() -> String? {
27
- var color: String? = nil
26
+ var color: String?
28
27
  EXUtilities.performSynchronously {
29
28
  // Get the root view controller of the delegate window.
30
29
  if let window = UIApplication.shared.delegate?.window, let backgroundColor = window?.rootViewController?.view.backgroundColor?.cgColor {
@@ -33,10 +32,10 @@ public class ExpoSystemUIModule: Module {
33
32
  }
34
33
  return color
35
34
  }
36
-
35
+
37
36
  static func setBackgroundColorAsync(color: Int?) {
38
37
  EXUtilities.performSynchronously {
39
- if (color == nil) {
38
+ if color == nil {
40
39
  if let window = UIApplication.shared.delegate?.window {
41
40
  window?.backgroundColor = nil
42
41
  window?.rootViewController?.view.backgroundColor = UIColor.white
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-system-ui",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "Interact with system UI elements",
5
5
  "main": "build/SystemUI.js",
6
6
  "types": "build/SystemUI.d.ts",
@@ -30,9 +30,9 @@
30
30
  },
31
31
  "author": "650 Industries, Inc.",
32
32
  "license": "MIT",
33
- "homepage": "https://docs.expo.io/versions/latest/sdk/system-ui",
33
+ "homepage": "https://docs.expo.dev/versions/latest/sdk/system-ui",
34
34
  "dependencies": {
35
- "@expo/config-plugins": "^4.0.2",
35
+ "@expo/config-plugins": "^4.0.14",
36
36
  "@react-native/normalize-color": "^2.0.0",
37
37
  "debug": "^4.3.2"
38
38
  },
@@ -45,5 +45,5 @@
45
45
  "peerDependencies": {
46
46
  "expo": "*"
47
47
  },
48
- "gitHead": "ba24eba18bf4f4d4b0d54828992d81a2bb18246a"
48
+ "gitHead": "22dce752354bb429c84851bc4389abe47a766b1f"
49
49
  }