expo-system-ui 2.9.4 → 3.0.1
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 +11 -3
- package/android/build.gradle +7 -93
- package/android/src/main/java/expo/modules/systemui/SystemUIModule.kt +1 -1
- package/android/src/main/java/expo/modules/systemui/SystemUIReactActivityLifecycleListener.kt +0 -2
- package/build/ExpoSystemUI.web.d.ts +0 -1
- package/build/ExpoSystemUI.web.d.ts.map +1 -1
- package/build/ExpoSystemUI.web.js +4 -11
- package/build/ExpoSystemUI.web.js.map +1 -1
- package/ios/ExpoSystemUI.podspec +1 -0
- package/package.json +3 -3
- package/plugin/build/withIosRootViewBackgroundColor.js +2 -2
- package/plugin/src/withIosRootViewBackgroundColor.ts +1 -1
- package/src/ExpoSystemUI.web.ts +4 -11
package/CHANGELOG.md
CHANGED
|
@@ -10,19 +10,27 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## 3.0.1 — 2024-04-22
|
|
14
|
+
|
|
15
|
+
_This version does not introduce any user-facing changes._
|
|
16
|
+
|
|
17
|
+
## 3.0.0 — 2024-04-18
|
|
14
18
|
|
|
15
19
|
### 💡 Others
|
|
16
20
|
|
|
17
21
|
- [iOS] Add privacy manifest describing required reason API usage. ([#27770](https://github.com/expo/expo/pull/27770) by [@aleqsio](https://github.com/aleqsio))
|
|
22
|
+
- Use `typeof window` checks for removing server code. ([#27514](https://github.com/expo/expo/pull/27514) by [@EvanBacon](https://github.com/EvanBacon))
|
|
23
|
+
- drop unused web `name` property. ([#27437](https://github.com/expo/expo/pull/27437) by [@EvanBacon](https://github.com/EvanBacon))
|
|
24
|
+
- Migrated dependency from `@react-native/normalize-color` to `@react-native/normalize-colors`. ([#27736](https://github.com/expo/expo/pull/27736) by [@kudo](https://github.com/kudo))
|
|
25
|
+
- Removed deprecated backward compatible Gradle settings. ([#28083](https://github.com/expo/expo/pull/28083) by [@kudo](https://github.com/kudo))
|
|
18
26
|
|
|
19
|
-
## 2.9.3
|
|
27
|
+
## 2.9.3 - 2024-01-10
|
|
20
28
|
|
|
21
29
|
### 💡 Others
|
|
22
30
|
|
|
23
31
|
- Replace deprecated `com.facebook.react:react-native:+` Android dependency with `com.facebook.react:react-android`. ([#26237](https://github.com/expo/expo/pull/26237) by [@kudo](https://github.com/kudo))
|
|
24
32
|
|
|
25
|
-
## 2.9.2
|
|
33
|
+
## 2.9.2 - 2023-12-19
|
|
26
34
|
|
|
27
35
|
_This version does not introduce any user-facing changes._
|
|
28
36
|
|
package/android/build.gradle
CHANGED
|
@@ -1,110 +1,24 @@
|
|
|
1
1
|
apply plugin: 'com.android.library'
|
|
2
|
-
apply plugin: 'kotlin-android'
|
|
3
|
-
apply plugin: 'maven-publish'
|
|
4
2
|
|
|
5
3
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '
|
|
4
|
+
version = '3.0.1'
|
|
7
5
|
|
|
8
6
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
useExpoPublishing()
|
|
15
|
-
useCoreDependencies()
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
buildscript {
|
|
20
|
-
// Simple helper that allows the root project to override versions declared by this library.
|
|
21
|
-
ext.safeExtGet = { prop, fallback ->
|
|
22
|
-
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// Ensures backward compatibility
|
|
26
|
-
ext.getKotlinVersion = {
|
|
27
|
-
if (ext.has("kotlinVersion")) {
|
|
28
|
-
ext.kotlinVersion()
|
|
29
|
-
} else {
|
|
30
|
-
ext.safeExtGet("kotlinVersion", "1.8.10")
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
repositories {
|
|
35
|
-
mavenCentral()
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
dependencies {
|
|
39
|
-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}")
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// Remove this if and it's contents, when support for SDK49 is dropped
|
|
44
|
-
if (!safeExtGet("expoProvidesDefaultConfig", false)) {
|
|
45
|
-
afterEvaluate {
|
|
46
|
-
publishing {
|
|
47
|
-
publications {
|
|
48
|
-
release(MavenPublication) {
|
|
49
|
-
from components.release
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
repositories {
|
|
53
|
-
maven {
|
|
54
|
-
url = mavenLocal().url
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
7
|
+
apply from: expoModulesCorePlugin
|
|
8
|
+
applyKotlinExpoModulesCorePlugin()
|
|
9
|
+
useCoreDependencies()
|
|
10
|
+
useDefaultAndroidSdkVersions()
|
|
11
|
+
useExpoPublishing()
|
|
60
12
|
|
|
61
13
|
android {
|
|
62
|
-
// Remove this if and it's contents, when support for SDK49 is dropped
|
|
63
|
-
if (!safeExtGet("expoProvidesDefaultConfig", false)) {
|
|
64
|
-
compileSdkVersion safeExtGet("compileSdkVersion", 34)
|
|
65
|
-
|
|
66
|
-
defaultConfig {
|
|
67
|
-
minSdkVersion safeExtGet("minSdkVersion", 23)
|
|
68
|
-
targetSdkVersion safeExtGet("targetSdkVersion", 34)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
publishing {
|
|
72
|
-
singleVariant("release") {
|
|
73
|
-
withSourcesJar()
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
lintOptions {
|
|
78
|
-
abortOnError false
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
|
|
83
|
-
if (agpVersion.tokenize('.')[0].toInteger() < 8) {
|
|
84
|
-
compileOptions {
|
|
85
|
-
sourceCompatibility JavaVersion.VERSION_11
|
|
86
|
-
targetCompatibility JavaVersion.VERSION_11
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
kotlinOptions {
|
|
90
|
-
jvmTarget = JavaVersion.VERSION_11.majorVersion
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
14
|
namespace "expo.modules.systemui"
|
|
95
15
|
defaultConfig {
|
|
96
16
|
versionCode 1
|
|
97
|
-
versionName '
|
|
17
|
+
versionName '3.0.1'
|
|
98
18
|
}
|
|
99
19
|
}
|
|
100
20
|
|
|
101
21
|
dependencies {
|
|
102
|
-
// Remove this if and it's contents, when support for SDK49 is dropped
|
|
103
|
-
if (!safeExtGet("expoProvidesDefaultConfig", false)) {
|
|
104
|
-
implementation project(':expo-modules-core')
|
|
105
|
-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
|
|
106
|
-
}
|
|
107
|
-
|
|
108
22
|
implementation 'com.facebook.react:react-android'
|
|
109
23
|
implementation 'androidx.core:core:1.6.0'
|
|
110
24
|
implementation 'androidx.appcompat:appcompat:1.2.0'
|
|
@@ -50,7 +50,7 @@ class SystemUIModule : Module() {
|
|
|
50
50
|
setBackgroundColor(color ?: systemBackgroundColor)
|
|
51
51
|
}.runOnQueue(Queues.MAIN)
|
|
52
52
|
|
|
53
|
-
AsyncFunction("getBackgroundColorAsync") {
|
|
53
|
+
AsyncFunction<String?>("getBackgroundColorAsync") {
|
|
54
54
|
val background = currentActivity.window.decorView.background
|
|
55
55
|
return@AsyncFunction if (background is ColorDrawable) {
|
|
56
56
|
colorToHex((background.mutate() as ColorDrawable).color)
|
package/android/src/main/java/expo/modules/systemui/SystemUIReactActivityLifecycleListener.kt
CHANGED
|
@@ -6,8 +6,6 @@ import android.os.Bundle
|
|
|
6
6
|
import expo.modules.core.interfaces.ReactActivityLifecycleListener
|
|
7
7
|
import expo.modules.systemui.singletons.SystemUI
|
|
8
8
|
|
|
9
|
-
// EXPO_VERSIONING_NEEDS_PACKAGE_R
|
|
10
|
-
|
|
11
9
|
class SystemUIReactActivityLifecycleListener(activityContext: Context) : ReactActivityLifecycleListener {
|
|
12
10
|
override fun onCreate(activity: Activity, savedInstanceState: Bundle?) {
|
|
13
11
|
SystemUI.setUserInterfaceStyle(getUserInterfaceStyle(activity))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoSystemUI.web.d.ts","sourceRoot":"","sources":["../src/ExpoSystemUI.web.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExpoSystemUI.web.d.ts","sourceRoot":"","sources":["../src/ExpoSystemUI.web.ts"],"names":[],"mappings":";;mCAQiC,MAAM,GAAG,IAAI;;AAR9C,wBAaE"}
|
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
import { Platform } from 'expo-modules-core';
|
|
2
|
-
// @ts-ignore: untyped
|
|
3
|
-
import normalizeColor from 'react-native-web/dist/cjs/modules/normalizeColor';
|
|
4
1
|
export default {
|
|
5
|
-
get name() {
|
|
6
|
-
return 'ExpoSystemUI';
|
|
7
|
-
},
|
|
8
2
|
getBackgroundColorAsync() {
|
|
9
|
-
if (
|
|
10
|
-
return normalizeColor(document.body.style.backgroundColor);
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
3
|
+
if (typeof window === 'undefined') {
|
|
13
4
|
return null;
|
|
14
5
|
}
|
|
6
|
+
const normalizeColor = require('react-native-web/dist/cjs/modules/normalizeColor');
|
|
7
|
+
return normalizeColor(document.body.style.backgroundColor);
|
|
15
8
|
},
|
|
16
9
|
setBackgroundColorAsync(color) {
|
|
17
|
-
if (
|
|
10
|
+
if (typeof window !== 'undefined') {
|
|
18
11
|
document.body.style.backgroundColor = color ?? 'white';
|
|
19
12
|
}
|
|
20
13
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoSystemUI.web.js","sourceRoot":"","sources":["../src/ExpoSystemUI.web.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"ExpoSystemUI.web.js","sourceRoot":"","sources":["../src/ExpoSystemUI.web.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,uBAAuB;QACrB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;YACjC,OAAO,IAAI,CAAC;SACb;QACD,MAAM,cAAc,GAAG,OAAO,CAAC,kDAAkD,CAAC,CAAC;QACnF,OAAO,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAC7D,CAAC;IACD,uBAAuB,CAAC,KAAoB;QAC1C,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;YACjC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,GAAG,KAAK,IAAI,OAAO,CAAC;SACxD;IACH,CAAC;CACF,CAAC","sourcesContent":["export default {\n getBackgroundColorAsync() {\n if (typeof window === 'undefined') {\n return null;\n }\n const normalizeColor = require('react-native-web/dist/cjs/modules/normalizeColor');\n return normalizeColor(document.body.style.backgroundColor);\n },\n setBackgroundColorAsync(color: string | null) {\n if (typeof window !== 'undefined') {\n document.body.style.backgroundColor = color ?? 'white';\n }\n },\n};\n"]}
|
package/ios/ExpoSystemUI.podspec
CHANGED
|
@@ -24,6 +24,7 @@ Pod::Spec.new do |s|
|
|
|
24
24
|
|
|
25
25
|
s.resource_bundles = {'ExpoSystemUI_privacy' => ['PrivacyInfo.xcprivacy']}
|
|
26
26
|
|
|
27
|
+
|
|
27
28
|
if !$ExpoUseSources&.include?(package['name']) && ENV['EXPO_USE_SOURCE'].to_i == 0 && File.exist?("#{s.name}.xcframework") && Gem::Version.new(Pod::VERSION) >= Gem::Version.new('1.10.0')
|
|
28
29
|
s.source_files = "#{s.name}/**/*.h"
|
|
29
30
|
s.vendored_frameworks = "#{s.name}.xcframework"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-system-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "Interact with system UI elements",
|
|
5
5
|
"main": "build/SystemUI.js",
|
|
6
6
|
"types": "build/SystemUI.d.ts",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"homepage": "https://docs.expo.dev/versions/latest/sdk/system-ui",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@react-native/normalize-
|
|
35
|
+
"@react-native/normalize-colors": "~0.74.81",
|
|
36
36
|
"debug": "^4.3.2"
|
|
37
37
|
},
|
|
38
38
|
"jest": {
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"expo": "*"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "0897aeadb926491a457bcd67d83360956994ee82"
|
|
48
48
|
}
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getRootViewBackgroundColor = exports.setRootViewBackgroundColor = exports.withIosRootViewBackgroundColor = void 0;
|
|
7
7
|
// @ts-ignore: uses flow
|
|
8
|
-
const
|
|
8
|
+
const normalize_colors_1 = __importDefault(require("@react-native/normalize-colors"));
|
|
9
9
|
const config_plugins_1 = require("expo/config-plugins");
|
|
10
10
|
// Maps to the template AppDelegate.m
|
|
11
11
|
const BACKGROUND_COLOR_KEY = 'RCTRootViewBackgroundColor';
|
|
@@ -24,7 +24,7 @@ function setRootViewBackgroundColor(config, infoPlist) {
|
|
|
24
24
|
delete infoPlist[BACKGROUND_COLOR_KEY];
|
|
25
25
|
}
|
|
26
26
|
else {
|
|
27
|
-
let color = (0,
|
|
27
|
+
let color = (0, normalize_colors_1.default)(backgroundColor);
|
|
28
28
|
if (!color) {
|
|
29
29
|
throw new Error('Invalid background color on iOS');
|
|
30
30
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @ts-ignore: uses flow
|
|
2
|
-
import normalizeColor from '@react-native/normalize-
|
|
2
|
+
import normalizeColor from '@react-native/normalize-colors';
|
|
3
3
|
import { ExpoConfig } from 'expo/config';
|
|
4
4
|
import { ConfigPlugin, InfoPlist, withInfoPlist } from 'expo/config-plugins';
|
|
5
5
|
|
package/src/ExpoSystemUI.web.ts
CHANGED
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
import { Platform } from 'expo-modules-core';
|
|
2
|
-
// @ts-ignore: untyped
|
|
3
|
-
import normalizeColor from 'react-native-web/dist/cjs/modules/normalizeColor';
|
|
4
|
-
|
|
5
1
|
export default {
|
|
6
|
-
get name(): string {
|
|
7
|
-
return 'ExpoSystemUI';
|
|
8
|
-
},
|
|
9
2
|
getBackgroundColorAsync() {
|
|
10
|
-
if (
|
|
11
|
-
return normalizeColor(document.body.style.backgroundColor);
|
|
12
|
-
} else {
|
|
3
|
+
if (typeof window === 'undefined') {
|
|
13
4
|
return null;
|
|
14
5
|
}
|
|
6
|
+
const normalizeColor = require('react-native-web/dist/cjs/modules/normalizeColor');
|
|
7
|
+
return normalizeColor(document.body.style.backgroundColor);
|
|
15
8
|
},
|
|
16
9
|
setBackgroundColorAsync(color: string | null) {
|
|
17
|
-
if (
|
|
10
|
+
if (typeof window !== 'undefined') {
|
|
18
11
|
document.body.style.backgroundColor = color ?? 'white';
|
|
19
12
|
}
|
|
20
13
|
},
|