react-native-edge-to-edge 0.2.1 → 1.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/README.md +0 -3
- package/dist/commonjs/expo.js +12 -1
- package/dist/commonjs/expo.js.map +1 -1
- package/dist/module/expo.js +12 -1
- package/dist/module/expo.js.map +1 -1
- package/dist/typescript/expo.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/expo.ts +8 -2
package/README.md
CHANGED
|
@@ -106,9 +106,6 @@ Status bar management has never worked effectively with the built-in [`Modal`](h
|
|
|
106
106
|
|
|
107
107
|
## API
|
|
108
108
|
|
|
109
|
-
> [!WARNING]
|
|
110
|
-
> The API is subject to change before reaching version **1.0.0**.
|
|
111
|
-
|
|
112
109
|
### `<SystemBars />`
|
|
113
110
|
|
|
114
111
|
A component for managing your app's system bars. This replace [`StatusBar`](https://reactnative.dev/docs/statusbar), [`expo-status-bar`](https://docs.expo.dev/versions/latest/sdk/status-bar) and [`expo-navigation-bar`](https://docs.expo.dev/versions/latest/sdk/navigation-bar/) (that uses a lot of now [deprecated APIs](https://developer.android.com/about/versions/15/behavior-changes-15#deprecated-apis)).
|
package/dist/commonjs/expo.js
CHANGED
|
@@ -9,15 +9,26 @@ const withAndroidEdgeToEdgeTheme = config => {
|
|
|
9
9
|
const ignoreList = new Set(["android:enforceNavigationBarContrast", "android:enforceStatusBarContrast", "android:fitsSystemWindows", "android:navigationBarColor", "android:statusBarColor", "android:windowDrawsSystemBarBackgrounds", "android:windowLayoutInDisplayCutoutMode", "android:windowLightNavigationBar", "android:windowLightStatusBar", "android:windowTranslucentNavigation", "android:windowTranslucentStatus"]);
|
|
10
10
|
return (0, _configPlugins.withAndroidStyles)(config, config => {
|
|
11
11
|
const {
|
|
12
|
+
androidStatusBar = {},
|
|
12
13
|
userInterfaceStyle = "light"
|
|
13
14
|
} = config;
|
|
15
|
+
const {
|
|
16
|
+
barStyle
|
|
17
|
+
} = androidStatusBar;
|
|
14
18
|
config.modResults.resources.style = config.modResults.resources.style?.map(style => {
|
|
15
19
|
if (style.$.name === "AppTheme") {
|
|
16
20
|
style.$.parent = "Theme.EdgeToEdge";
|
|
17
21
|
if (style.item != null) {
|
|
18
22
|
style.item = style.item.filter(item => !ignoreList.has(item.$.name));
|
|
19
23
|
}
|
|
20
|
-
if (
|
|
24
|
+
if (barStyle != null) {
|
|
25
|
+
style.item.push({
|
|
26
|
+
$: {
|
|
27
|
+
name: "android:windowLightStatusBar"
|
|
28
|
+
},
|
|
29
|
+
_: String(barStyle === "dark-content")
|
|
30
|
+
});
|
|
31
|
+
} else if (userInterfaceStyle !== "automatic") {
|
|
21
32
|
style.item.push({
|
|
22
33
|
$: {
|
|
23
34
|
name: "android:windowLightStatusBar"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_configPlugins","require","withAndroidEdgeToEdgeTheme","config","ignoreList","Set","withAndroidStyles","userInterfaceStyle","modResults","resources","style","map","$","name","parent","item","filter","has","push","_","String","_default","exports","default","createRunOncePlugin"],"sourceRoot":"../../src","sources":["expo.ts"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAMA,MAAMC,0BAAwC,GAAIC,MAAM,IAAK;EAC3D,MAAMC,UAAU,GAAG,IAAIC,GAAG,CAAC,CACzB,sCAAsC,EACtC,kCAAkC,EAClC,2BAA2B,EAC3B,4BAA4B,EAC5B,wBAAwB,EACxB,yCAAyC,EACzC,yCAAyC,EACzC,kCAAkC,EAClC,8BAA8B,EAC9B,qCAAqC,EACrC,iCAAiC,CAClC,CAAC;EAEF,OAAO,IAAAC,gCAAiB,EAACH,MAAM,EAAGA,MAAM,IAAK;IAC3C,MAAM;MAAEI,kBAAkB,GAAG;IAAQ,CAAC,
|
|
1
|
+
{"version":3,"names":["_configPlugins","require","withAndroidEdgeToEdgeTheme","config","ignoreList","Set","withAndroidStyles","androidStatusBar","userInterfaceStyle","barStyle","modResults","resources","style","map","$","name","parent","item","filter","has","push","_","String","_default","exports","default","createRunOncePlugin"],"sourceRoot":"../../src","sources":["expo.ts"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAMA,MAAMC,0BAAwC,GAAIC,MAAM,IAAK;EAC3D,MAAMC,UAAU,GAAG,IAAIC,GAAG,CAAC,CACzB,sCAAsC,EACtC,kCAAkC,EAClC,2BAA2B,EAC3B,4BAA4B,EAC5B,wBAAwB,EACxB,yCAAyC,EACzC,yCAAyC,EACzC,kCAAkC,EAClC,8BAA8B,EAC9B,qCAAqC,EACrC,iCAAiC,CAClC,CAAC;EAEF,OAAO,IAAAC,gCAAiB,EAACH,MAAM,EAAGA,MAAM,IAAK;IAC3C,MAAM;MAAEI,gBAAgB,GAAG,CAAC,CAAC;MAAEC,kBAAkB,GAAG;IAAQ,CAAC,GAAGL,MAAM;IACtE,MAAM;MAAEM;IAAS,CAAC,GAAGF,gBAAgB;IAErCJ,MAAM,CAACO,UAAU,CAACC,SAAS,CAACC,KAAK,GAAGT,MAAM,CAACO,UAAU,CAACC,SAAS,CAACC,KAAK,EAAEC,GAAG,CACvED,KAAK,IAAmB;MACvB,IAAIA,KAAK,CAACE,CAAC,CAACC,IAAI,KAAK,UAAU,EAAE;QAC/BH,KAAK,CAACE,CAAC,CAACE,MAAM,GAAG,kBAAkB;QAEnC,IAAIJ,KAAK,CAACK,IAAI,IAAI,IAAI,EAAE;UACtBL,KAAK,CAACK,IAAI,GAAGL,KAAK,CAACK,IAAI,CAACC,MAAM,CAC3BD,IAAI,IAAK,CAACb,UAAU,CAACe,GAAG,CAACF,IAAI,CAACH,CAAC,CAACC,IAAI,CACvC,CAAC;QACH;QAEA,IAAIN,QAAQ,IAAI,IAAI,EAAE;UACpBG,KAAK,CAACK,IAAI,CAACG,IAAI,CAAC;YACdN,CAAC,EAAE;cAAEC,IAAI,EAAE;YAA+B,CAAC;YAC3CM,CAAC,EAAEC,MAAM,CAACb,QAAQ,KAAK,cAAc;UACvC,CAAC,CAAC;QACJ,CAAC,MAAM,IAAID,kBAAkB,KAAK,WAAW,EAAE;UAC7CI,KAAK,CAACK,IAAI,CAACG,IAAI,CAAC;YACdN,CAAC,EAAE;cAAEC,IAAI,EAAE;YAA+B,CAAC;YAC3CM,CAAC,EAAEC,MAAM,CAACd,kBAAkB,KAAK,OAAO;UAC1C,CAAC,CAAC;QACJ;MACF;MAEA,OAAOI,KAAK;IACd,CACF,CAAC;IAED,OAAOT,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAAC,IAAAoB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEa,IAAAC,kCAAmB,EAChCxB,0BAA0B,EAC1B,2BACF,CAAC","ignoreList":[]}
|
package/dist/module/expo.js
CHANGED
|
@@ -5,15 +5,26 @@ const withAndroidEdgeToEdgeTheme = config => {
|
|
|
5
5
|
const ignoreList = new Set(["android:enforceNavigationBarContrast", "android:enforceStatusBarContrast", "android:fitsSystemWindows", "android:navigationBarColor", "android:statusBarColor", "android:windowDrawsSystemBarBackgrounds", "android:windowLayoutInDisplayCutoutMode", "android:windowLightNavigationBar", "android:windowLightStatusBar", "android:windowTranslucentNavigation", "android:windowTranslucentStatus"]);
|
|
6
6
|
return withAndroidStyles(config, config => {
|
|
7
7
|
const {
|
|
8
|
+
androidStatusBar = {},
|
|
8
9
|
userInterfaceStyle = "light"
|
|
9
10
|
} = config;
|
|
11
|
+
const {
|
|
12
|
+
barStyle
|
|
13
|
+
} = androidStatusBar;
|
|
10
14
|
config.modResults.resources.style = config.modResults.resources.style?.map(style => {
|
|
11
15
|
if (style.$.name === "AppTheme") {
|
|
12
16
|
style.$.parent = "Theme.EdgeToEdge";
|
|
13
17
|
if (style.item != null) {
|
|
14
18
|
style.item = style.item.filter(item => !ignoreList.has(item.$.name));
|
|
15
19
|
}
|
|
16
|
-
if (
|
|
20
|
+
if (barStyle != null) {
|
|
21
|
+
style.item.push({
|
|
22
|
+
$: {
|
|
23
|
+
name: "android:windowLightStatusBar"
|
|
24
|
+
},
|
|
25
|
+
_: String(barStyle === "dark-content")
|
|
26
|
+
});
|
|
27
|
+
} else if (userInterfaceStyle !== "automatic") {
|
|
17
28
|
style.item.push({
|
|
18
29
|
$: {
|
|
19
30
|
name: "android:windowLightStatusBar"
|
package/dist/module/expo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createRunOncePlugin","withAndroidStyles","withAndroidEdgeToEdgeTheme","config","ignoreList","Set","userInterfaceStyle","modResults","resources","style","map","$","name","parent","item","filter","has","push","_","String"],"sourceRoot":"../../src","sources":["expo.ts"],"mappings":";;AAAA,SAEEA,mBAAmB,EACnBC,iBAAiB,QACZ,sBAAsB;AAE7B,MAAMC,0BAAwC,GAAIC,MAAM,IAAK;EAC3D,MAAMC,UAAU,GAAG,IAAIC,GAAG,CAAC,CACzB,sCAAsC,EACtC,kCAAkC,EAClC,2BAA2B,EAC3B,4BAA4B,EAC5B,wBAAwB,EACxB,yCAAyC,EACzC,yCAAyC,EACzC,kCAAkC,EAClC,8BAA8B,EAC9B,qCAAqC,EACrC,iCAAiC,CAClC,CAAC;EAEF,OAAOJ,iBAAiB,CAACE,MAAM,EAAGA,MAAM,IAAK;IAC3C,MAAM;MAAEG,kBAAkB,GAAG;IAAQ,CAAC,
|
|
1
|
+
{"version":3,"names":["createRunOncePlugin","withAndroidStyles","withAndroidEdgeToEdgeTheme","config","ignoreList","Set","androidStatusBar","userInterfaceStyle","barStyle","modResults","resources","style","map","$","name","parent","item","filter","has","push","_","String"],"sourceRoot":"../../src","sources":["expo.ts"],"mappings":";;AAAA,SAEEA,mBAAmB,EACnBC,iBAAiB,QACZ,sBAAsB;AAE7B,MAAMC,0BAAwC,GAAIC,MAAM,IAAK;EAC3D,MAAMC,UAAU,GAAG,IAAIC,GAAG,CAAC,CACzB,sCAAsC,EACtC,kCAAkC,EAClC,2BAA2B,EAC3B,4BAA4B,EAC5B,wBAAwB,EACxB,yCAAyC,EACzC,yCAAyC,EACzC,kCAAkC,EA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AeH,mBAAmB,CAChCE,0BAA0B,EAC1B,2BACF,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expo.d.ts","sourceRoot":"","sources":["../../src/expo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAGb,MAAM,sBAAsB,CAAC;;
|
|
1
|
+
{"version":3,"file":"expo.d.ts","sourceRoot":"","sources":["../../src/expo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAGb,MAAM,sBAAsB,CAAC;;AAqD9B,wBAGE"}
|
package/package.json
CHANGED
package/src/expo.ts
CHANGED
|
@@ -20,7 +20,8 @@ const withAndroidEdgeToEdgeTheme: ConfigPlugin = (config) => {
|
|
|
20
20
|
]);
|
|
21
21
|
|
|
22
22
|
return withAndroidStyles(config, (config) => {
|
|
23
|
-
const { userInterfaceStyle = "light" } = config;
|
|
23
|
+
const { androidStatusBar = {}, userInterfaceStyle = "light" } = config;
|
|
24
|
+
const { barStyle } = androidStatusBar;
|
|
24
25
|
|
|
25
26
|
config.modResults.resources.style = config.modResults.resources.style?.map(
|
|
26
27
|
(style): typeof style => {
|
|
@@ -33,7 +34,12 @@ const withAndroidEdgeToEdgeTheme: ConfigPlugin = (config) => {
|
|
|
33
34
|
);
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
if (
|
|
37
|
+
if (barStyle != null) {
|
|
38
|
+
style.item.push({
|
|
39
|
+
$: { name: "android:windowLightStatusBar" },
|
|
40
|
+
_: String(barStyle === "dark-content"),
|
|
41
|
+
});
|
|
42
|
+
} else if (userInterfaceStyle !== "automatic") {
|
|
37
43
|
style.item.push({
|
|
38
44
|
$: { name: "android:windowLightStatusBar" },
|
|
39
45
|
_: String(userInterfaceStyle === "light"),
|