expo-system-ui 1.3.0 → 2.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 +16 -0
- package/android/build.gradle +2 -2
- package/ios/ExpoSystemUI.podspec +1 -1
- package/package.json +3 -4
- package/plugin/build/withAndroidRootViewBackgroundColor.d.ts +2 -2
- package/plugin/build/withAndroidRootViewBackgroundColor.js +2 -3
- package/plugin/build/withAndroidUserInterfaceStyle.d.ts +2 -2
- package/plugin/build/withAndroidUserInterfaceStyle.js +2 -3
- package/plugin/build/withIosRootViewBackgroundColor.d.ts +2 -2
- package/plugin/build/withIosRootViewBackgroundColor.js +2 -3
- package/plugin/build/withIosUserInterfaceStyle.d.ts +2 -2
- package/plugin/build/withIosUserInterfaceStyle.js +2 -3
- package/plugin/build/withSystemUI.d.ts +1 -1
- package/plugin/build/withSystemUI.js +1 -1
- package/plugin/src/withAndroidRootViewBackgroundColor.ts +2 -2
- package/plugin/src/withAndroidUserInterfaceStyle.ts +2 -2
- package/plugin/src/withIosRootViewBackgroundColor.ts +2 -2
- package/plugin/src/withIosUserInterfaceStyle.ts +2 -2
- package/plugin/src/withSystemUI.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,22 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 2.0.1 — 2022-10-28
|
|
14
|
+
|
|
15
|
+
_This version does not introduce any user-facing changes._
|
|
16
|
+
|
|
17
|
+
## 2.0.0 — 2022-10-25
|
|
18
|
+
|
|
19
|
+
### 🛠 Breaking changes
|
|
20
|
+
|
|
21
|
+
- [plugin] Upgrade minimum runtime requirement to Node 14 (LTS). ([#18204](https://github.com/expo/expo/pull/18204) by [@EvanBacon](https://github.com/EvanBacon))
|
|
22
|
+
- Bumped iOS deployment target to 13.0 and deprecated support for iOS 12. ([#18873](https://github.com/expo/expo/pull/18873) by [@tsapeta](https://github.com/tsapeta))
|
|
23
|
+
|
|
24
|
+
### 💡 Others
|
|
25
|
+
|
|
26
|
+
- [plugin] Migrate import from @expo/config-plugins to expo/config-plugins and @expo/config-types to expo/config. ([#18855](https://github.com/expo/expo/pull/18855) by [@brentvatne](https://github.com/brentvatne))
|
|
27
|
+
- Drop `@expo/config-plugins` dependency in favor of peer dependency on `expo`. ([#18595](https://github.com/expo/expo/pull/18595) by [@EvanBacon](https://github.com/EvanBacon))
|
|
28
|
+
|
|
13
29
|
## 1.3.0 — 2022-07-07
|
|
14
30
|
|
|
15
31
|
### 🐛 Bug fixes
|
package/android/build.gradle
CHANGED
|
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
|
|
|
3
3
|
apply plugin: 'maven-publish'
|
|
4
4
|
|
|
5
5
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '
|
|
6
|
+
version = '2.0.1'
|
|
7
7
|
|
|
8
8
|
buildscript {
|
|
9
9
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
@@ -74,7 +74,7 @@ android {
|
|
|
74
74
|
minSdkVersion safeExtGet("minSdkVersion", 21)
|
|
75
75
|
targetSdkVersion safeExtGet("targetSdkVersion", 31)
|
|
76
76
|
versionCode 1
|
|
77
|
-
versionName '
|
|
77
|
+
versionName '2.0.1'
|
|
78
78
|
}
|
|
79
79
|
lintOptions {
|
|
80
80
|
abortOnError false
|
package/ios/ExpoSystemUI.podspec
CHANGED
|
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
|
|
|
10
10
|
s.license = package['license']
|
|
11
11
|
s.author = package['author']
|
|
12
12
|
s.homepage = package['homepage']
|
|
13
|
-
s.platform = :ios, '
|
|
13
|
+
s.platform = :ios, '13.0'
|
|
14
14
|
s.swift_version = '5.4'
|
|
15
15
|
s.source = { git: 'https://github.com/expo/expo.git' }
|
|
16
16
|
s.static_framework = true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-system-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.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,6 @@
|
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"homepage": "https://docs.expo.dev/versions/latest/sdk/system-ui",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@expo/config-plugins": "~5.0.0",
|
|
36
35
|
"@react-native/normalize-color": "^2.0.0",
|
|
37
36
|
"debug": "^4.3.2"
|
|
38
37
|
},
|
|
@@ -40,10 +39,10 @@
|
|
|
40
39
|
"preset": "expo-module-scripts"
|
|
41
40
|
},
|
|
42
41
|
"devDependencies": {
|
|
43
|
-
"expo-module-scripts": "^
|
|
42
|
+
"expo-module-scripts": "^3.0.0"
|
|
44
43
|
},
|
|
45
44
|
"peerDependencies": {
|
|
46
45
|
"expo": "*"
|
|
47
46
|
},
|
|
48
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "59081bb17e727b10f2a00cd07bb45cd283a6f6a5"
|
|
49
48
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ExpoConfig } from 'expo/config';
|
|
2
|
+
import { ConfigPlugin } from 'expo/config-plugins';
|
|
3
3
|
export declare const withAndroidRootViewBackgroundColor: ConfigPlugin;
|
|
4
4
|
export declare const withRootViewBackgroundColorColors: ConfigPlugin;
|
|
5
5
|
export declare const withRootViewBackgroundColorStyles: ConfigPlugin;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRootViewBackgroundColor = exports.withRootViewBackgroundColorStyles = exports.withRootViewBackgroundColorColors = exports.withAndroidRootViewBackgroundColor = void 0;
|
|
4
|
-
const config_plugins_1 = require("
|
|
4
|
+
const config_plugins_1 = require("expo/config-plugins");
|
|
5
5
|
const { assignColorValue } = config_plugins_1.AndroidConfig.Colors;
|
|
6
6
|
const { assignStylesValue, getAppThemeLightNoActionBarGroup } = config_plugins_1.AndroidConfig.Styles;
|
|
7
7
|
const ANDROID_WINDOW_BACKGROUND = 'android:windowBackground';
|
|
@@ -35,7 +35,6 @@ const withRootViewBackgroundColorStyles = (config) => {
|
|
|
35
35
|
};
|
|
36
36
|
exports.withRootViewBackgroundColorStyles = withRootViewBackgroundColorStyles;
|
|
37
37
|
function getRootViewBackgroundColor(config) {
|
|
38
|
-
|
|
39
|
-
return ((_a = config.android) === null || _a === void 0 ? void 0 : _a.backgroundColor) || config.backgroundColor || null;
|
|
38
|
+
return config.android?.backgroundColor || config.backgroundColor || null;
|
|
40
39
|
}
|
|
41
40
|
exports.getRootViewBackgroundColor = getRootViewBackgroundColor;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ExpoConfig } from 'expo/config';
|
|
2
|
+
import { AndroidConfig, ConfigPlugin } from 'expo/config-plugins';
|
|
3
3
|
export declare type Props = {
|
|
4
4
|
userInterfaceStyle?: ExpoConfig['userInterfaceStyle'];
|
|
5
5
|
};
|
|
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.setStrings = exports.resolveProps = exports.withAndroidUserInterfaceStyle = void 0;
|
|
7
|
-
const config_plugins_1 = require("@expo/config-plugins");
|
|
8
7
|
const assert_1 = __importDefault(require("assert"));
|
|
8
|
+
const config_plugins_1 = require("expo/config-plugins");
|
|
9
9
|
// strings.xml keys, this should not change.
|
|
10
10
|
const USER_INTERFACE_STYLE_KEY = 'expo_system_ui_user_interface_style';
|
|
11
11
|
const withAndroidUserInterfaceStyle = (config) => {
|
|
@@ -16,8 +16,7 @@ const withAndroidUserInterfaceStyle = (config) => {
|
|
|
16
16
|
};
|
|
17
17
|
exports.withAndroidUserInterfaceStyle = withAndroidUserInterfaceStyle;
|
|
18
18
|
function resolveProps(config) {
|
|
19
|
-
|
|
20
|
-
const userInterfaceStyle = (_b = (_a = config.android) === null || _a === void 0 ? void 0 : _a.userInterfaceStyle) !== null && _b !== void 0 ? _b : config.userInterfaceStyle;
|
|
19
|
+
const userInterfaceStyle = config.android?.userInterfaceStyle ?? config.userInterfaceStyle;
|
|
21
20
|
(0, assert_1.default)(!userInterfaceStyle || ['automatic', 'light', 'dark'].includes(userInterfaceStyle), `expo-system-ui: Invalid userInterfaceStyle: "${userInterfaceStyle}"`);
|
|
22
21
|
return { userInterfaceStyle };
|
|
23
22
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ExpoConfig } from 'expo/config';
|
|
2
|
+
import { ConfigPlugin, InfoPlist } from 'expo/config-plugins';
|
|
3
3
|
export declare const withIosRootViewBackgroundColor: ConfigPlugin;
|
|
4
4
|
export declare function setRootViewBackgroundColor(config: Pick<ExpoConfig, 'backgroundColor' | 'ios'>, infoPlist: InfoPlist): InfoPlist;
|
|
5
5
|
export declare function getRootViewBackgroundColor(config: Pick<ExpoConfig, 'ios' | 'backgroundColor'>): string | null;
|
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getRootViewBackgroundColor = exports.setRootViewBackgroundColor = exports.withIosRootViewBackgroundColor = void 0;
|
|
7
|
-
const config_plugins_1 = require("@expo/config-plugins");
|
|
8
7
|
// @ts-ignore: uses flow
|
|
9
8
|
const normalize_color_1 = __importDefault(require("@react-native/normalize-color"));
|
|
9
|
+
const config_plugins_1 = require("expo/config-plugins");
|
|
10
10
|
// Maps to the template AppDelegate.m
|
|
11
11
|
const BACKGROUND_COLOR_KEY = 'RCTRootViewBackgroundColor';
|
|
12
12
|
const debug = require('debug')('expo:system-ui:plugin:ios');
|
|
@@ -36,7 +36,6 @@ function setRootViewBackgroundColor(config, infoPlist) {
|
|
|
36
36
|
}
|
|
37
37
|
exports.setRootViewBackgroundColor = setRootViewBackgroundColor;
|
|
38
38
|
function getRootViewBackgroundColor(config) {
|
|
39
|
-
|
|
40
|
-
return ((_a = config.ios) === null || _a === void 0 ? void 0 : _a.backgroundColor) || config.backgroundColor || null;
|
|
39
|
+
return config.ios?.backgroundColor || config.backgroundColor || null;
|
|
41
40
|
}
|
|
42
41
|
exports.getRootViewBackgroundColor = getRootViewBackgroundColor;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ExpoConfig } from 'expo/config';
|
|
2
|
+
import { InfoPlist, ConfigPlugin } from 'expo/config-plugins';
|
|
3
3
|
export declare const withIosUserInterfaceStyle: ConfigPlugin;
|
|
4
4
|
export declare function getUserInterfaceStyle(config: Pick<ExpoConfig, 'ios' | 'userInterfaceStyle'>): string;
|
|
5
5
|
export declare function setUserInterfaceStyle(config: Pick<ExpoConfig, 'ios' | 'userInterfaceStyle'>, { UIUserInterfaceStyle, ...infoPlist }: InfoPlist): InfoPlist;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.setUserInterfaceStyle = exports.getUserInterfaceStyle = exports.withIosUserInterfaceStyle = void 0;
|
|
4
|
-
const config_plugins_1 = require("
|
|
4
|
+
const config_plugins_1 = require("expo/config-plugins");
|
|
5
5
|
const withIosUserInterfaceStyle = (config) => {
|
|
6
6
|
return (0, config_plugins_1.withInfoPlist)(config, (config) => {
|
|
7
7
|
config.modResults = setUserInterfaceStyle(config, config.modResults);
|
|
@@ -10,8 +10,7 @@ const withIosUserInterfaceStyle = (config) => {
|
|
|
10
10
|
};
|
|
11
11
|
exports.withIosUserInterfaceStyle = withIosUserInterfaceStyle;
|
|
12
12
|
function getUserInterfaceStyle(config) {
|
|
13
|
-
|
|
14
|
-
return (_c = (_b = (_a = config.ios) === null || _a === void 0 ? void 0 : _a.userInterfaceStyle) !== null && _b !== void 0 ? _b : config.userInterfaceStyle) !== null && _c !== void 0 ? _c : 'light';
|
|
13
|
+
return config.ios?.userInterfaceStyle ?? config.userInterfaceStyle ?? 'light';
|
|
15
14
|
}
|
|
16
15
|
exports.getUserInterfaceStyle = getUserInterfaceStyle;
|
|
17
16
|
function setUserInterfaceStyle(config, { UIUserInterfaceStyle, ...infoPlist }) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const config_plugins_1 = require("
|
|
3
|
+
const config_plugins_1 = require("expo/config-plugins");
|
|
4
4
|
const withAndroidRootViewBackgroundColor_1 = require("./withAndroidRootViewBackgroundColor");
|
|
5
5
|
const withAndroidUserInterfaceStyle_1 = require("./withAndroidUserInterfaceStyle");
|
|
6
6
|
const withIosRootViewBackgroundColor_1 = require("./withIosRootViewBackgroundColor");
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { ExpoConfig } from 'expo/config';
|
|
1
2
|
import {
|
|
2
3
|
AndroidConfig,
|
|
3
4
|
ConfigPlugin,
|
|
4
5
|
withAndroidColors,
|
|
5
6
|
withAndroidStyles,
|
|
6
|
-
} from '
|
|
7
|
-
import { ExpoConfig } from '@expo/config-types';
|
|
7
|
+
} from 'expo/config-plugins';
|
|
8
8
|
|
|
9
9
|
const { assignColorValue } = AndroidConfig.Colors;
|
|
10
10
|
const { assignStylesValue, getAppThemeLightNoActionBarGroup } = AndroidConfig.Styles;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AndroidConfig, ConfigPlugin, withStringsXml } from '@expo/config-plugins';
|
|
2
|
-
import { ExpoConfig } from '@expo/config-types';
|
|
3
1
|
import assert from 'assert';
|
|
2
|
+
import { ExpoConfig } from 'expo/config';
|
|
3
|
+
import { AndroidConfig, ConfigPlugin, withStringsXml } from 'expo/config-plugins';
|
|
4
4
|
|
|
5
5
|
export type Props = {
|
|
6
6
|
userInterfaceStyle?: ExpoConfig['userInterfaceStyle'];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ConfigPlugin, InfoPlist, withInfoPlist } from '@expo/config-plugins';
|
|
2
|
-
import { ExpoConfig } from '@expo/config-types';
|
|
3
1
|
// @ts-ignore: uses flow
|
|
4
2
|
import normalizeColor from '@react-native/normalize-color';
|
|
3
|
+
import { ExpoConfig } from 'expo/config';
|
|
4
|
+
import { ConfigPlugin, InfoPlist, withInfoPlist } from 'expo/config-plugins';
|
|
5
5
|
|
|
6
6
|
// Maps to the template AppDelegate.m
|
|
7
7
|
const BACKGROUND_COLOR_KEY = 'RCTRootViewBackgroundColor';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ExpoConfig } from 'expo/config';
|
|
2
|
+
import { InfoPlist, ConfigPlugin, withInfoPlist } from 'expo/config-plugins';
|
|
3
3
|
|
|
4
4
|
export const withIosUserInterfaceStyle: ConfigPlugin = (config) => {
|
|
5
5
|
return withInfoPlist(config, (config) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConfigPlugin, createRunOncePlugin, withPlugins } from '
|
|
1
|
+
import { ConfigPlugin, createRunOncePlugin, withPlugins } from 'expo/config-plugins';
|
|
2
2
|
|
|
3
3
|
import { withAndroidRootViewBackgroundColor } from './withAndroidRootViewBackgroundColor';
|
|
4
4
|
import { withAndroidUserInterfaceStyle } from './withAndroidUserInterfaceStyle';
|