Skip to content

Commit 8daaebb

Browse files
committed
Bump react-native-is-edge-to-edge
1 parent 4317aff commit 8daaebb

File tree

5 files changed

+24
-29
lines changed

5 files changed

+24
-29
lines changed

example/ios/Podfile.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,7 @@ PODS:
14971497
- React-logger (= 0.75.4)
14981498
- React-perflogger (= 0.75.4)
14991499
- React-utils (= 0.75.4)
1500-
- RNBootSplash (6.2.3):
1500+
- RNBootSplash (6.2.4):
15011501
- React-Core
15021502
- SocketRocket (0.7.0)
15031503
- Yoga (0.0.0)
@@ -1764,7 +1764,7 @@ SPEC CHECKSUMS:
17641764
React-utils: cbe8b8b3d7b2ac282e018e46f0e7b25cdc87c5a0
17651765
ReactCodegen: 4bcb34e6b5ebf6eef5cee34f55aa39991ea1c1f1
17661766
ReactCommon: 6a952e50c2a4b694731d7682aaa6c79bc156e4ad
1767-
RNBootSplash: 90be86b162cea85ec32b7a4a816ed71321521a1c
1767+
RNBootSplash: eef2be4400827b144ba993bcb8a4c68b4f5db14d
17681768
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
17691769
Yoga: 055f92ad73f8c8600a93f0e25ac0b2344c3b07e6
17701770

example/yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -5279,10 +5279,10 @@ react-native-edge-to-edge@^0.1.2:
52795279
resolved "https://registry.yarnpkg.com/react-native-edge-to-edge/-/react-native-edge-to-edge-0.1.2.tgz#c23f9cbf2d78c5c020fff7beb169557fa87122b7"
52805280
integrity sha512-j5f+ipP7FEqHDE8JHW11tv3iska0c7izs1V4/YidDsRWTv5VcA+GUBMSyduhpeUe39joQOd5hLf9/wwZVNiX2A==
52815281

5282-
react-native-is-edge-to-edge@^1.0.0:
5283-
version "1.0.0"
5284-
resolved "https://registry.yarnpkg.com/react-native-is-edge-to-edge/-/react-native-is-edge-to-edge-1.0.0.tgz#2187d7fa237354e12fddd0f9e84410a850988dbb"
5285-
integrity sha512-O+6OnYqey8lMyNvWZhWZF6NPBCvZNyeGX6qPvt7EJy310sVa4r05M0enxtmiVZl2xgj5vBJkYhROd5mSmZ/4mA==
5282+
react-native-is-edge-to-edge@^1.1.3:
5283+
version "1.1.3"
5284+
resolved "https://registry.yarnpkg.com/react-native-is-edge-to-edge/-/react-native-is-edge-to-edge-1.1.3.tgz#ae290192b7053d0e09e1870c7a17a765f673863a"
5285+
integrity sha512-wcY560MvZ1yS54TFAfv8L+Df4lzwv44kOVYXpIDNyC2s8FNymkBeOwCEnR7eDCEzBOKZIwCAidcwM5tNFIJ/eQ==
52865286

52875287
react-native-web-image-loader@^0.1.1:
52885288
version "0.1.1"

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-bootsplash",
3-
"version": "6.2.3",
3+
"version": "6.2.4",
44
"license": "MIT",
55
"description": "Display a bootsplash on your app starts. Hide it when you want.",
66
"author": "Mathieu Acthernoene <[email protected]>",
@@ -71,7 +71,7 @@
7171
"node-html-parser": "^6.1.13",
7272
"picocolors": "^1.1.0",
7373
"prettier": "^3.3.3",
74-
"react-native-is-edge-to-edge": "^1.0.0",
74+
"react-native-is-edge-to-edge": "^1.1.3",
7575
"sharp": "^0.32.6",
7676
"ts-dedent": "^2.2.0",
7777
"xml-formatter": "^3.6.3"

src/index.ts

+12-17
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,14 @@ import {
88
StyleSheet,
99
ViewStyle,
1010
} from "react-native";
11-
import { isEdgeToEdge } from "react-native-is-edge-to-edge";
11+
import {
12+
controlEdgeToEdgeValues,
13+
isEdgeToEdge,
14+
} from "react-native-is-edge-to-edge";
1215
import NativeModule from "./NativeRNBootSplash";
1316

17+
const EDGE_TO_EDGE = isEdgeToEdge();
18+
1419
export type Config = {
1520
fade?: boolean;
1621
};
@@ -96,6 +101,10 @@ export function useHideAnimation(config: UseHideAnimationConfig) {
96101
navigationBarTranslucent,
97102
} = config;
98103

104+
if (__DEV__) {
105+
controlEdgeToEdgeValues({ statusBarTranslucent, navigationBarTranslucent });
106+
}
107+
99108
const skipLogo = logoSrc == null;
100109
const skipBrand = manifest.brand == null || brandSrc == null;
101110

@@ -220,31 +229,17 @@ export function useHideAnimation(config: UseHideAnimationConfig) {
220229
return { container, logo, brand };
221230
}
222231

223-
if (__DEV__) {
224-
const hasNavigationBarOption = navigationBarTranslucent != null;
225-
const hasStatusBarOption = statusBarTranslucent != null;
226-
const hasBothOptions = hasStatusBarOption && hasNavigationBarOption;
227-
228-
if (isEdgeToEdge() && (hasStatusBarOption || hasNavigationBarOption)) {
229-
console.warn(
230-
hasBothOptions
231-
? "statusBarTranslucent and navigationBarTranslucent options are ignored when using react-native-edge-to-edge"
232-
: `${hasStatusBarOption ? "status" : "navigation"}BarTranslucent option is ignored when using react-native-edge-to-edge`,
233-
);
234-
}
235-
}
236-
237232
return {
238233
container: {
239234
...container,
240235
style: {
241236
...containerStyle,
242237
marginTop:
243-
isEdgeToEdge() || (statusBarTranslucent ?? false)
238+
EDGE_TO_EDGE || (statusBarTranslucent ?? false)
244239
? undefined
245240
: -statusBarHeight,
246241
marginBottom:
247-
isEdgeToEdge() || (navigationBarTranslucent ?? false)
242+
EDGE_TO_EDGE || (navigationBarTranslucent ?? false)
248243
? undefined
249244
: -navigationBarHeight,
250245
},

yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -4576,10 +4576,10 @@ react-native-builder-bob@^0.30.2:
45764576
which "^2.0.2"
45774577
yargs "^17.5.1"
45784578

4579-
react-native-is-edge-to-edge@^1.0.0:
4580-
version "1.0.0"
4581-
resolved "https://registry.yarnpkg.com/react-native-is-edge-to-edge/-/react-native-is-edge-to-edge-1.0.0.tgz#2187d7fa237354e12fddd0f9e84410a850988dbb"
4582-
integrity sha512-O+6OnYqey8lMyNvWZhWZF6NPBCvZNyeGX6qPvt7EJy310sVa4r05M0enxtmiVZl2xgj5vBJkYhROd5mSmZ/4mA==
4579+
react-native-is-edge-to-edge@^1.1.3:
4580+
version "1.1.3"
4581+
resolved "https://registry.yarnpkg.com/react-native-is-edge-to-edge/-/react-native-is-edge-to-edge-1.1.3.tgz#ae290192b7053d0e09e1870c7a17a765f673863a"
4582+
integrity sha512-wcY560MvZ1yS54TFAfv8L+Df4lzwv44kOVYXpIDNyC2s8FNymkBeOwCEnR7eDCEzBOKZIwCAidcwM5tNFIJ/eQ==
45834583

45844584
45854585
version "0.75.4"

0 commit comments

Comments
 (0)