react-native-bootsplash 6.3.11 → 7.0.0-beta.0
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 +13 -41
- package/android/build.gradle +10 -17
- package/android/src/main/AndroidManifest.xml +1 -1
- package/android/src/main/java/com/zoontek/rnbootsplash/RNBootSplashModuleImpl.kt +2 -2
- package/android/src/main/java/com/zoontek/rnbootsplash/RNBootSplashPackage.kt +0 -1
- package/android/src/main/java/com/zoontek/rnbootsplash/RNBootSplashQueue.kt +1 -1
- package/android/src/main/res/drawable/compat_splash_screen.xml +11 -6
- package/android/src/main/res/drawable/compat_splash_screen_oneui_4.xml +13 -6
- package/android/src/main/res/values/colors.xml +1 -3
- package/android/src/main/res/values/public.xml +0 -2
- package/android/src/main/res/values/styles.xml +13 -19
- package/android/src/main/res/values-night/styles.xml +1 -1
- package/android/src/main/res/values-v27/colors.xml +4 -0
- package/android/src/main/res/values-v27/styles.xml +1 -6
- package/android/src/main/res/values-v29/styles.xml +1 -11
- package/android/src/main/res/values-v30/styles.xml +1 -9
- package/android/src/main/res/values-v31/styles.xml +1 -1
- package/android/src/newarch/com/zoontek/rnbootsplash/RNBootSplashModule.kt +2 -2
- package/android/src/oldarch/com/zoontek/rnbootsplash/RNBootSplashModule.kt +3 -3
- package/app.plugin.js +1 -1
- package/cli.js +2 -11
- package/dist/commonjs/addon/index.js +49 -49
- package/dist/commonjs/addon/index.js.map +1 -1
- package/dist/commonjs/generate.js +811 -541
- package/dist/commonjs/generate.js.map +1 -1
- package/dist/commonjs/index.js +1 -1
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/specs/NativeRNBootSplash.js.map +1 -0
- package/dist/commonjs/{NativeRNBootSplash.web.js → specs/NativeRNBootSplash.web.js} +1 -1
- package/dist/commonjs/specs/NativeRNBootSplash.web.js.map +1 -0
- package/dist/module/addon/index.js +49 -49
- package/dist/module/addon/index.js.map +1 -1
- package/dist/module/generate.js +807 -539
- package/dist/module/generate.js.map +1 -1
- package/dist/module/index.js +1 -1
- package/dist/module/index.js.map +1 -1
- package/dist/module/specs/NativeRNBootSplash.js.map +1 -0
- package/dist/module/{NativeRNBootSplash.web.js → specs/NativeRNBootSplash.web.js} +1 -1
- package/dist/module/specs/NativeRNBootSplash.web.js.map +1 -0
- package/dist/typescript/addon/index.d.ts +8 -2
- package/dist/typescript/addon/index.d.ts.map +1 -1
- package/dist/typescript/generate.d.ts +90 -35
- package/dist/typescript/generate.d.ts.map +1 -1
- package/dist/typescript/index.d.ts +2 -2
- package/dist/typescript/index.d.ts.map +1 -1
- package/dist/typescript/{NativeRNBootSplash.d.ts → specs/NativeRNBootSplash.d.ts} +1 -1
- package/dist/typescript/specs/NativeRNBootSplash.d.ts.map +1 -0
- package/dist/typescript/{NativeRNBootSplash.web.d.ts → specs/NativeRNBootSplash.web.d.ts} +1 -1
- package/dist/typescript/specs/NativeRNBootSplash.web.d.ts.map +1 -0
- package/ios/RNBootSplash.mm +4 -10
- package/package.json +24 -29
- package/src/generate.ts +1048 -782
- package/src/index.ts +7 -7
- package/src/{NativeRNBootSplash.ts → specs/NativeRNBootSplash.ts} +1 -1
- package/src/{NativeRNBootSplash.web.ts → specs/NativeRNBootSplash.web.ts} +1 -1
- package/android/src/main/AndroidManifestNew.xml +0 -3
- package/android/src/main/res/drawable-v23/compat_splash_screen.xml +0 -19
- package/android/src/main/res/drawable-v23/compat_splash_screen_oneui_4.xml +0 -21
- package/android/src/main/res/values-v23/styles.xml +0 -13
- package/dist/commonjs/NativeRNBootSplash.js.map +0 -1
- package/dist/commonjs/NativeRNBootSplash.web.js.map +0 -1
- package/dist/commonjs/expo.js +0 -348
- package/dist/commonjs/expo.js.map +0 -1
- package/dist/module/NativeRNBootSplash.js.map +0 -1
- package/dist/module/NativeRNBootSplash.web.js.map +0 -1
- package/dist/module/expo.js +0 -341
- package/dist/module/expo.js.map +0 -1
- package/dist/typescript/NativeRNBootSplash.d.ts.map +0 -1
- package/dist/typescript/NativeRNBootSplash.web.d.ts.map +0 -1
- package/dist/typescript/expo.d.ts +0 -11
- package/dist/typescript/expo.d.ts.map +0 -1
- package/react-native.config.js +0 -101
- package/src/expo.ts +0 -439
- /package/dist/commonjs/{NativeRNBootSplash.js → specs/NativeRNBootSplash.js} +0 -0
- /package/dist/module/{NativeRNBootSplash.js → specs/NativeRNBootSplash.js} +0 -0
package/README.md
CHANGED
|
@@ -53,13 +53,13 @@ Arguments:
|
|
|
53
53
|
logo Logo file path (PNG or SVG)
|
|
54
54
|
|
|
55
55
|
Options:
|
|
56
|
-
--project-type <string> Project type ("detect", "bare" or "expo") (default: "detect")
|
|
57
56
|
--platforms <list> Platforms to generate for, separated by a comma (default: "android,ios,web")
|
|
58
57
|
--background <string> Background color (in hexadecimal format) (default: "#fff")
|
|
59
58
|
--logo-width <number> Logo width at @1x (in dp - we recommend approximately ~100) (default: 100)
|
|
60
59
|
--assets-output <string> Assets output directory path (default: "assets/bootsplash")
|
|
61
60
|
--flavor <string> Android flavor build variant (where your resource directory is) (default: "main")
|
|
62
61
|
--html <string> HTML template file path (your web app entry point) (default: "public/index.html")
|
|
62
|
+
--plist <string> Custom Info.plist file path
|
|
63
63
|
--license-key <string> License key to enable brand and dark mode assets generation
|
|
64
64
|
--brand <string> Brand file path (PNG or SVG)
|
|
65
65
|
--brand-width <number> Brand width at @1x (in dp - we recommend approximately ~80) (default: 80)
|
|
@@ -170,7 +170,7 @@ $ yarn remove expo-splash-screen
|
|
|
170
170
|
- "backgroundColor": "#ffffff"
|
|
171
171
|
- }
|
|
172
172
|
- ],
|
|
173
|
-
+ ["react-native-bootsplash", { "
|
|
173
|
+
+ ["react-native-bootsplash", { "assetsOutput": "assets/bootsplash" }]
|
|
174
174
|
]
|
|
175
175
|
}
|
|
176
176
|
}
|
|
@@ -180,9 +180,8 @@ _📌 The available plugins options are:_
|
|
|
180
180
|
|
|
181
181
|
```ts
|
|
182
182
|
type PluginOptions = {
|
|
183
|
-
|
|
183
|
+
assetsOutput?: string; // optional, default is "assets/bootsplash"
|
|
184
184
|
android?: {
|
|
185
|
-
parentTheme?: "TransparentStatus" | "EdgeToEdge"; // optional, default is `undefined` (`Theme.BootSplash`)
|
|
186
185
|
darkContentBarsStyle?: boolean; // optional, default is `undefined`
|
|
187
186
|
};
|
|
188
187
|
};
|
|
@@ -190,7 +189,7 @@ type PluginOptions = {
|
|
|
190
189
|
|
|
191
190
|
### With bare React Native
|
|
192
191
|
|
|
193
|
-
#### iOS
|
|
192
|
+
#### iOS
|
|
194
193
|
|
|
195
194
|
Edit your `ios/YourApp/AppDelegate.swift` file:
|
|
196
195
|
|
|
@@ -212,29 +211,6 @@ class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
|
|
|
212
211
|
}
|
|
213
212
|
```
|
|
214
213
|
|
|
215
|
-
#### iOS (react-native 0.77+)
|
|
216
|
-
|
|
217
|
-
Edit your `ios/YourApp/AppDelegate.swift` file:
|
|
218
|
-
|
|
219
|
-
```swift
|
|
220
|
-
import ReactAppDependencyProvider
|
|
221
|
-
import RNBootSplash // ⬅️ add this import
|
|
222
|
-
|
|
223
|
-
// …
|
|
224
|
-
|
|
225
|
-
@main
|
|
226
|
-
class AppDelegate: RCTAppDelegate {
|
|
227
|
-
|
|
228
|
-
// …
|
|
229
|
-
|
|
230
|
-
// ⬇️ override this method
|
|
231
|
-
override func customize(_ rootView: RCTRootView!) {
|
|
232
|
-
super.customize(rootView)
|
|
233
|
-
RNBootSplash.initWithStoryboard("BootSplash", rootView: rootView) // ⬅️ initialize the splash screen
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
```
|
|
237
|
-
|
|
238
214
|
#### Android
|
|
239
215
|
|
|
240
216
|
Edit your `android/app/src/main/java/com/yourapp/MainActivity.kt` file:
|
|
@@ -257,7 +233,7 @@ class MainActivity : ReactActivity() {
|
|
|
257
233
|
}
|
|
258
234
|
```
|
|
259
235
|
|
|
260
|
-
_ℹ️ Refer to [previous package documentation](https://github.com/zoontek/react-native-bootsplash/tree/6.3.
|
|
236
|
+
_ℹ️ Refer to [previous package documentation](https://github.com/zoontek/react-native-bootsplash/tree/6.3.11?tab=readme-ov-file#with-bare-react-native) for setup steps with React Native < 0.79._
|
|
261
237
|
|
|
262
238
|
## API
|
|
263
239
|
|
|
@@ -301,7 +277,7 @@ Return the current visibility status of the native splash screen.
|
|
|
301
277
|
#### Method type
|
|
302
278
|
|
|
303
279
|
```ts
|
|
304
|
-
type isVisible = () =>
|
|
280
|
+
type isVisible = () => boolean;
|
|
305
281
|
```
|
|
306
282
|
|
|
307
283
|
#### Usage
|
|
@@ -309,7 +285,9 @@ type isVisible = () => Promise<boolean>;
|
|
|
309
285
|
```ts
|
|
310
286
|
import BootSplash from "react-native-bootsplash";
|
|
311
287
|
|
|
312
|
-
BootSplash.isVisible()
|
|
288
|
+
if (BootSplash.isVisible()) {
|
|
289
|
+
// Do something
|
|
290
|
+
}
|
|
313
291
|
```
|
|
314
292
|
|
|
315
293
|
### useHideAnimation()
|
|
@@ -411,24 +389,18 @@ const App = () => {
|
|
|
411
389
|
|
|
412
390
|
## FAQ
|
|
413
391
|
|
|
414
|
-
### How can I
|
|
392
|
+
### How can I enforce the splash screen system bar colors?
|
|
415
393
|
|
|
416
|
-
|
|
394
|
+
By default, the system bars `dark-content` in light mode and `light-content` in dark mode. To enforce a specific value, edit your `values/styles.xml` file:
|
|
417
395
|
|
|
418
396
|
```xml
|
|
419
397
|
<resources>
|
|
420
|
-
|
|
421
398
|
<!-- … -->
|
|
422
399
|
|
|
423
|
-
|
|
424
|
-
<style name="BootTheme" parent="Theme.BootSplash.EdgeToEdge">
|
|
425
|
-
<!-- … -->
|
|
426
|
-
|
|
427
|
-
<!-- optional, used to enforce the initial bars styles -->
|
|
428
|
-
<!-- default is true in light mode, false in dark mode -->
|
|
400
|
+
<style name="BootTheme" parent="Theme.BootSplash">
|
|
429
401
|
<item name="darkContentBarsStyle">true</item>
|
|
402
|
+
<!-- … -->
|
|
430
403
|
</style>
|
|
431
|
-
|
|
432
404
|
</resources>
|
|
433
405
|
```
|
|
434
406
|
|
package/android/build.gradle
CHANGED
|
@@ -7,8 +7,8 @@ buildscript {
|
|
|
7
7
|
gradlePluginPortal()
|
|
8
8
|
}
|
|
9
9
|
dependencies {
|
|
10
|
-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet("kotlinVersion", "1.
|
|
11
|
-
classpath("com.android.tools.build:gradle:
|
|
10
|
+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet("kotlinVersion", "2.1.20")}")
|
|
11
|
+
classpath("com.android.tools.build:gradle:8.13.0")
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -24,25 +24,18 @@ if (isNewArchitectureEnabled()) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
android {
|
|
27
|
-
|
|
28
|
-
compileSdkVersion safeExtGet("compileSdkVersion", 34)
|
|
27
|
+
namespace "com.zoontek.rnbootsplash"
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
buildToolsVersion safeExtGet("buildToolsVersion", "35.0.0")
|
|
30
|
+
compileSdkVersion safeExtGet("compileSdkVersion", 35)
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
sourceSets {
|
|
37
|
-
main {
|
|
38
|
-
manifest.srcFile "src/main/AndroidManifestNew.xml"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
32
|
+
buildFeatures {
|
|
33
|
+
buildConfig true
|
|
41
34
|
}
|
|
42
35
|
defaultConfig {
|
|
43
36
|
buildConfigField("boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString())
|
|
44
|
-
minSdkVersion safeExtGet("minSdkVersion",
|
|
45
|
-
targetSdkVersion safeExtGet("targetSdkVersion",
|
|
37
|
+
minSdkVersion safeExtGet("minSdkVersion", 24)
|
|
38
|
+
targetSdkVersion safeExtGet("targetSdkVersion", 35)
|
|
46
39
|
}
|
|
47
40
|
lintOptions {
|
|
48
41
|
abortOnError false
|
|
@@ -63,8 +56,8 @@ repositories {
|
|
|
63
56
|
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
|
64
57
|
url("$rootDir/../node_modules/react-native/android")
|
|
65
58
|
}
|
|
66
|
-
mavenCentral()
|
|
67
59
|
google()
|
|
60
|
+
mavenCentral()
|
|
68
61
|
}
|
|
69
62
|
|
|
70
63
|
dependencies {
|
|
@@ -236,7 +236,7 @@ object RNBootSplashModuleImpl {
|
|
|
236
236
|
hideAndClearPromiseQueue(reactContext, fade)
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
-
fun isVisible(
|
|
240
|
-
|
|
239
|
+
fun isVisible(): Boolean {
|
|
240
|
+
return mStatus != Status.HIDDEN
|
|
241
241
|
}
|
|
242
242
|
}
|
|
@@ -4,11 +4,16 @@
|
|
|
4
4
|
<color android:color="?attr/bootSplashBackground" />
|
|
5
5
|
</item>
|
|
6
6
|
|
|
7
|
-
<item
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
<item
|
|
8
|
+
android:drawable="?bootSplashLogo"
|
|
9
|
+
android:gravity="center"
|
|
10
|
+
android:width="288dp"
|
|
11
|
+
android:height="288dp" />
|
|
10
12
|
|
|
11
|
-
<item
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
<item
|
|
14
|
+
android:drawable="?bootSplashBrand"
|
|
15
|
+
android:gravity="bottom|center_horizontal"
|
|
16
|
+
android:width="200dp"
|
|
17
|
+
android:height="80dp"
|
|
18
|
+
android:bottom="60dp" />
|
|
14
19
|
</layer-list>
|
|
@@ -4,11 +4,18 @@
|
|
|
4
4
|
<color android:color="?attr/bootSplashBackground" />
|
|
5
5
|
</item>
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
<!-- There's an issue with logo size on Samsung OneUI v4
|
|
8
|
+
We need to render it 2 times smaller (288 / 2 = 144) -->
|
|
9
|
+
<item
|
|
10
|
+
android:drawable="?bootSplashLogo"
|
|
11
|
+
android:gravity="center"
|
|
12
|
+
android:width="144dp"
|
|
13
|
+
android:height="144dp" />
|
|
10
14
|
|
|
11
|
-
<item
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
<item
|
|
16
|
+
android:drawable="?bootSplashBrand"
|
|
17
|
+
android:gravity="bottom|center_horizontal"
|
|
18
|
+
android:width="200dp"
|
|
19
|
+
android:height="80dp"
|
|
20
|
+
android:bottom="60dp" />
|
|
14
21
|
</layer-list>
|
|
@@ -2,7 +2,5 @@
|
|
|
2
2
|
<resources>
|
|
3
3
|
<!-- https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/res/remote_color_resources_res/values/colors.xml;l=67 -->
|
|
4
4
|
<!-- https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/res/res/color/system_bar_background_semi_transparent.xml -->
|
|
5
|
-
<color name="
|
|
6
|
-
<!-- https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/java/com/android/internal/policy/DecorView.java;l=142 -->
|
|
7
|
-
<color name="systemBarLightScrim">#e6ffffff</color>
|
|
5
|
+
<color name="navigationBarColor">#801b1b1b</color>
|
|
8
6
|
</resources>
|
|
@@ -10,35 +10,29 @@
|
|
|
10
10
|
<item name="android:windowExitAnimation">@anim/bootsplash_fade_out</item>
|
|
11
11
|
</style>
|
|
12
12
|
|
|
13
|
-
<style name="Theme.BootSplash.
|
|
14
|
-
</style>
|
|
15
|
-
|
|
16
|
-
<style name="Theme.BootSplash.Base" parent="Theme.BootSplash.DayNight">
|
|
13
|
+
<style name="Theme.BootSplash.Attr" parent="Theme.AppCompat.DayNight.NoActionBar">
|
|
17
14
|
<item name="darkContentBarsStyle">true</item>
|
|
18
15
|
</style>
|
|
19
16
|
|
|
20
|
-
<style name="Theme.BootSplash.
|
|
17
|
+
<style name="Theme.BootSplash.Base" parent="Theme.BootSplash.Attr">
|
|
21
18
|
<item name="android:opacity">opaque</item>
|
|
22
19
|
<item name="android:windowBackground">@drawable/compat_splash_screen</item>
|
|
23
20
|
<item name="bootSplashBrand">@drawable/transparent_pixel</item>
|
|
21
|
+
|
|
22
|
+
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
|
23
|
+
<item name="android:fitsSystemWindows">false</item>
|
|
24
|
+
<item name="android:navigationBarColor">@color/navigationBarColor</item>
|
|
25
|
+
<item name="android:statusBarColor">@android:color/transparent</item>
|
|
26
|
+
<item name="android:windowLightStatusBar">?darkContentBarsStyle</item>
|
|
24
27
|
</style>
|
|
25
28
|
|
|
26
|
-
<style name="Theme.BootSplash" parent="Theme.BootSplash.
|
|
29
|
+
<style name="Theme.BootSplash.v27" parent="Theme.BootSplash.Base" />
|
|
30
|
+
<style name="Theme.BootSplash.v29" parent="Theme.BootSplash.v27" />
|
|
31
|
+
<style name="Theme.BootSplash.v30" parent="Theme.BootSplash.v29" />
|
|
32
|
+
|
|
33
|
+
<style name="Theme.BootSplash" parent="Theme.BootSplash.v30">
|
|
27
34
|
<item name="bootSplashBackground">?android:colorBackground</item>
|
|
28
35
|
<item name="bootSplashLogo">@android:drawable/sym_def_app_icon</item>
|
|
29
36
|
<item name="postBootSplashTheme">?android:attr/theme</item>
|
|
30
37
|
</style>
|
|
31
|
-
|
|
32
|
-
<style name="Theme.BootSplash.TransparentStatus" parent="Theme.BootSplash">
|
|
33
|
-
</style>
|
|
34
|
-
|
|
35
|
-
<style name="Theme.BootSplash.EdgeToEdge.Common" parent="Theme.BootSplash">
|
|
36
|
-
<item name="android:fitsSystemWindows">false</item>
|
|
37
|
-
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
|
38
|
-
</style>
|
|
39
|
-
|
|
40
|
-
<style name="Theme.BootSplash.EdgeToEdge" parent="Theme.BootSplash.EdgeToEdge.Common">
|
|
41
|
-
<item name="android:statusBarColor">@color/systemBarDarkScrim</item>
|
|
42
|
-
<item name="android:navigationBarColor">@color/systemBarDarkScrim</item>
|
|
43
|
-
</style>
|
|
44
38
|
</resources>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<resources>
|
|
3
|
-
<style name="Theme.BootSplash.
|
|
3
|
+
<style name="Theme.BootSplash.Attr" parent="Theme.AppCompat.DayNight.NoActionBar">
|
|
4
4
|
<item name="darkContentBarsStyle">false</item>
|
|
5
5
|
</style>
|
|
6
6
|
</resources>
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<resources>
|
|
3
|
-
<style name="Theme.BootSplash.
|
|
3
|
+
<style name="Theme.BootSplash.v27" parent="Theme.BootSplash.Base">
|
|
4
4
|
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
|
|
5
|
-
|
|
6
|
-
<item name="android:statusBarColor">@android:color/transparent</item>
|
|
7
|
-
<item name="android:windowLightStatusBar">?darkContentBarsStyle</item>
|
|
8
|
-
|
|
9
|
-
<item name="android:navigationBarColor">@android:color/transparent</item>
|
|
10
5
|
<item name="android:windowLightNavigationBar">?darkContentBarsStyle</item>
|
|
11
6
|
</style>
|
|
12
7
|
</resources>
|
|
@@ -1,18 +1,8 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<resources>
|
|
3
|
-
<style name="Theme.BootSplash.
|
|
3
|
+
<style name="Theme.BootSplash.v29" parent="Theme.BootSplash.v27">
|
|
4
4
|
<item name="android:forceDarkAllowed">false</item>
|
|
5
|
-
</style>
|
|
6
|
-
|
|
7
|
-
<style name="Theme.BootSplash.EdgeToEdge" parent="Theme.BootSplash.EdgeToEdge.Common">
|
|
8
|
-
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
|
|
9
|
-
|
|
10
5
|
<item name="android:enforceStatusBarContrast">false</item>
|
|
11
|
-
<item name="android:statusBarColor">@android:color/transparent</item>
|
|
12
|
-
<item name="android:windowLightStatusBar">?darkContentBarsStyle</item>
|
|
13
|
-
|
|
14
6
|
<item name="android:enforceNavigationBarContrast">false</item>
|
|
15
|
-
<item name="android:navigationBarColor">@android:color/transparent</item>
|
|
16
|
-
<item name="android:windowLightNavigationBar">?darkContentBarsStyle</item>
|
|
17
7
|
</style>
|
|
18
8
|
</resources>
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<resources>
|
|
3
|
-
<style name="Theme.BootSplash.
|
|
3
|
+
<style name="Theme.BootSplash.v30" parent="Theme.BootSplash.v29">
|
|
4
4
|
<item name="android:windowLayoutInDisplayCutoutMode">always</item>
|
|
5
|
-
|
|
6
|
-
<item name="android:enforceStatusBarContrast">false</item>
|
|
7
|
-
<item name="android:statusBarColor">@android:color/transparent</item>
|
|
8
|
-
<item name="android:windowLightStatusBar">?darkContentBarsStyle</item>
|
|
9
|
-
|
|
10
|
-
<item name="android:enforceNavigationBarContrast">false</item>
|
|
11
|
-
<item name="android:navigationBarColor">@android:color/transparent</item>
|
|
12
|
-
<item name="android:windowLightNavigationBar">?darkContentBarsStyle</item>
|
|
13
5
|
</style>
|
|
14
6
|
</resources>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<resources>
|
|
3
|
-
<style name="Theme.BootSplash" parent="Theme.BootSplash.
|
|
3
|
+
<style name="Theme.BootSplash" parent="Theme.BootSplash.v30">
|
|
4
4
|
<item name="android:windowSplashScreenBackground">?bootSplashBackground</item>
|
|
5
5
|
<item name="android:windowSplashScreenAnimatedIcon">?bootSplashLogo</item>
|
|
6
6
|
<item name="android:windowSplashScreenBrandingImage">?bootSplashBrand</item>
|
|
@@ -33,7 +33,7 @@ class RNBootSplashModule(reactContext: ReactApplicationContext) :
|
|
|
33
33
|
RNBootSplashModuleImpl.hide(reactApplicationContext, fade, promise)
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
override fun isVisible(
|
|
37
|
-
RNBootSplashModuleImpl.isVisible(
|
|
36
|
+
override fun isVisible(): Boolean {
|
|
37
|
+
return RNBootSplashModuleImpl.isVisible()
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -36,8 +36,8 @@ class RNBootSplashModule(reactContext: ReactApplicationContext) :
|
|
|
36
36
|
RNBootSplashModuleImpl.hide(reactApplicationContext, fade, promise)
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
@ReactMethod
|
|
40
|
-
fun isVisible(
|
|
41
|
-
RNBootSplashModuleImpl.isVisible(
|
|
39
|
+
@ReactMethod(isBlockingSynchronousMethod = true)
|
|
40
|
+
fun isVisible(): Boolean {
|
|
41
|
+
return RNBootSplashModuleImpl.isVisible()
|
|
42
42
|
}
|
|
43
43
|
}
|
package/app.plugin.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const { withBootSplash } = require("./dist/commonjs/
|
|
1
|
+
const { withBootSplash } = require("./dist/commonjs/generate");
|
|
2
2
|
module.exports = withBootSplash;
|
package/cli.js
CHANGED
|
@@ -5,7 +5,6 @@ const { Command } = require("commander");
|
|
|
5
5
|
const program = new Command();
|
|
6
6
|
const pkg = require("./package.json");
|
|
7
7
|
|
|
8
|
-
const validProjectTypes = ["detect", "bare", "expo"];
|
|
9
8
|
const validPlatforms = ["android", "ios", "web"];
|
|
10
9
|
|
|
11
10
|
program
|
|
@@ -15,11 +14,6 @@ program
|
|
|
15
14
|
.command("generate", { isDefault: true })
|
|
16
15
|
.description("Generate a launch screen using a logo file path (PNG or SVG)")
|
|
17
16
|
.argument("<logo>", "Logo file path (PNG or SVG)")
|
|
18
|
-
.option(
|
|
19
|
-
"--project-type <string>",
|
|
20
|
-
'Project type ("detect", "bare" or "expo")',
|
|
21
|
-
"detect",
|
|
22
|
-
)
|
|
23
17
|
.option(
|
|
24
18
|
"--platforms <list>",
|
|
25
19
|
"Platforms to generate for, separated by a comma",
|
|
@@ -50,6 +44,7 @@ program
|
|
|
50
44
|
"HTML template file path (your web app entry point)",
|
|
51
45
|
"public/index.html",
|
|
52
46
|
)
|
|
47
|
+
.option("--plist <string>", "Custom Info.plist file path")
|
|
53
48
|
.option(
|
|
54
49
|
"--license-key <string>",
|
|
55
50
|
"License key to enable brand and dark mode assets generation",
|
|
@@ -67,15 +62,11 @@ program
|
|
|
67
62
|
.option("--dark-logo <string>", "[dark mode] Logo file path (PNG or SVG)")
|
|
68
63
|
.option("--dark-brand <string>", "[dark mode] Brand file path (PNG or SVG)")
|
|
69
64
|
.action((logo, options) => {
|
|
70
|
-
const {
|
|
65
|
+
const { platforms, logoWidth, brandWidth, ...rest } = options;
|
|
71
66
|
|
|
72
67
|
const args = {
|
|
73
68
|
...rest,
|
|
74
69
|
|
|
75
|
-
projectType: validProjectTypes.includes(projectType.toLowerCase())
|
|
76
|
-
? projectType.toLowerCase()
|
|
77
|
-
: "detect",
|
|
78
|
-
|
|
79
70
|
platforms: [
|
|
80
71
|
...new Set(
|
|
81
72
|
platforms
|