expo-navigation-bar 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
CHANGED
|
@@ -10,6 +10,21 @@
|
|
|
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
|
+
|
|
23
|
+
### 💡 Others
|
|
24
|
+
|
|
25
|
+
- [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))
|
|
26
|
+
- 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))
|
|
27
|
+
|
|
13
28
|
## 1.3.0 — 2022-07-07
|
|
14
29
|
|
|
15
30
|
_This version does not introduce any user-facing changes._
|
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-navigation-bar",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Interact with the system navigation bar",
|
|
5
5
|
"main": "build/NavigationBar.js",
|
|
6
6
|
"types": "build/NavigationBar.d.ts",
|
|
@@ -33,16 +33,15 @@
|
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"homepage": "https://docs.expo.dev/versions/latest/sdk/navigation-bar",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@expo/config-plugins": "~5.0.0",
|
|
37
36
|
"@react-native/normalize-color": "^2.0.0",
|
|
38
37
|
"debug": "^4.3.2"
|
|
39
38
|
},
|
|
40
39
|
"devDependencies": {
|
|
41
40
|
"@types/debug": "^4.1.7",
|
|
42
|
-
"expo-module-scripts": "^
|
|
41
|
+
"expo-module-scripts": "^3.0.0"
|
|
43
42
|
},
|
|
44
43
|
"peerDependencies": {
|
|
45
44
|
"expo": "*"
|
|
46
45
|
},
|
|
47
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "59081bb17e727b10f2a00cd07bb45cd283a6f6a5"
|
|
48
47
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ConfigPlugin, AndroidConfig } from '@expo/config-plugins';
|
|
2
|
-
import { ExpoConfig } from '@expo/config-types';
|
|
3
1
|
import { NavigationBarVisibility, NavigationBarBehavior, NavigationBarPosition, NavigationBarButtonStyle } from 'expo-navigation-bar';
|
|
2
|
+
import { ExpoConfig } from 'expo/config';
|
|
3
|
+
import { ConfigPlugin, AndroidConfig } from 'expo/config-plugins';
|
|
4
4
|
export declare type Props = {
|
|
5
5
|
borderColor?: string;
|
|
6
6
|
backgroundColor?: string | null;
|
|
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.setNavigationBarStyles = exports.setNavigationBarColors = exports.setStrings = exports.withAndroidNavigationBarExpoGoManifest = exports.resolveProps = 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"));
|
|
10
9
|
// @ts-ignore
|
|
11
10
|
const debug_1 = __importDefault(require("debug"));
|
|
11
|
+
const config_plugins_1 = require("expo/config-plugins");
|
|
12
12
|
const debug = (0, debug_1.default)('expo:system-navigation-bar:plugin');
|
|
13
13
|
const pkg = require('expo-navigation-bar/package.json');
|
|
14
14
|
// strings.xml keys, this should not change.
|
|
@@ -37,19 +37,18 @@ function convertColorAndroid(input) {
|
|
|
37
37
|
return color | 0x0;
|
|
38
38
|
}
|
|
39
39
|
function resolveProps(config, _props) {
|
|
40
|
-
var _a, _b, _c, _d;
|
|
41
40
|
let props;
|
|
42
41
|
if (!_props) {
|
|
43
42
|
props = {
|
|
44
|
-
backgroundColor:
|
|
45
|
-
barStyle:
|
|
46
|
-
? LEGACY_BAR_STYLE_MAP[
|
|
43
|
+
backgroundColor: config.androidNavigationBar?.backgroundColor,
|
|
44
|
+
barStyle: config.androidNavigationBar?.barStyle
|
|
45
|
+
? LEGACY_BAR_STYLE_MAP[config.androidNavigationBar?.barStyle]
|
|
47
46
|
: undefined,
|
|
48
47
|
// Resources for:
|
|
49
48
|
// - sticky-immersive: https://youtu.be/cBi8fjv90E4?t=416 -- https://developer.android.com/training/system-ui/immersive#sticky-immersive
|
|
50
49
|
// - immersive: https://youtu.be/cBi8fjv90E4?t=168 -- https://developer.android.com/training/system-ui/immersive#immersive
|
|
51
50
|
// - leanback: https://developer.android.com/training/system-ui/immersive#leanback
|
|
52
|
-
legacyVisible:
|
|
51
|
+
legacyVisible: config.androidNavigationBar?.visible,
|
|
53
52
|
};
|
|
54
53
|
if (props.legacyVisible) {
|
|
55
54
|
// Using legacyVisible can break the setPositionAsync method:
|
|
@@ -68,12 +67,11 @@ exports.resolveProps = resolveProps;
|
|
|
68
67
|
* of the static values that Expo Go reads from (`androidNavigationBar`).
|
|
69
68
|
*/
|
|
70
69
|
const withAndroidNavigationBarExpoGoManifest = (config, props) => {
|
|
71
|
-
var _a, _b;
|
|
72
70
|
if (!config.androidNavigationBar) {
|
|
73
71
|
// Remap the config plugin props so Expo Go knows how to apply them.
|
|
74
72
|
config.androidNavigationBar = {
|
|
75
|
-
backgroundColor:
|
|
76
|
-
barStyle:
|
|
73
|
+
backgroundColor: props.backgroundColor ?? undefined,
|
|
74
|
+
barStyle: Object.entries(LEGACY_BAR_STYLE_MAP).find(([, v]) => v === props.barStyle)?.[0],
|
|
77
75
|
visible: props.legacyVisible,
|
|
78
76
|
};
|
|
79
77
|
}
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ConfigPlugin,
|
|
3
|
-
createRunOncePlugin,
|
|
4
|
-
AndroidConfig,
|
|
5
|
-
withStringsXml,
|
|
6
|
-
WarningAggregator,
|
|
7
|
-
withAndroidColors,
|
|
8
|
-
withAndroidStyles,
|
|
9
|
-
} from '@expo/config-plugins';
|
|
10
|
-
import { ExpoConfig } from '@expo/config-types';
|
|
11
1
|
// @ts-ignore: uses flow
|
|
12
2
|
import normalizeColor from '@react-native/normalize-color';
|
|
13
3
|
// @ts-ignore
|
|
@@ -18,6 +8,16 @@ import {
|
|
|
18
8
|
NavigationBarPosition,
|
|
19
9
|
NavigationBarButtonStyle,
|
|
20
10
|
} from 'expo-navigation-bar';
|
|
11
|
+
import { ExpoConfig } from 'expo/config';
|
|
12
|
+
import {
|
|
13
|
+
ConfigPlugin,
|
|
14
|
+
createRunOncePlugin,
|
|
15
|
+
AndroidConfig,
|
|
16
|
+
withStringsXml,
|
|
17
|
+
WarningAggregator,
|
|
18
|
+
withAndroidColors,
|
|
19
|
+
withAndroidStyles,
|
|
20
|
+
} from 'expo/config-plugins';
|
|
21
21
|
|
|
22
22
|
const debug = Debug('expo:system-navigation-bar:plugin');
|
|
23
23
|
|