react-native-bootsplash 5.0.3 → 5.1.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.
Files changed (44) hide show
  1. package/README.md +5 -5
  2. package/android/src/main/java/com/zoontek/rnbootsplash/RNBootSplashModuleImpl.java +147 -120
  3. package/android/src/main/res/layout/splash_screen_view.xml +23 -0
  4. package/android/src/main/res/layout/splash_screen_view_samsung_oneui_4.xml +25 -0
  5. package/android/src/main/res/values/styles.xml +4 -16
  6. package/android/src/main/res/values-v23/styles.xml +1 -1
  7. package/android/src/main/res/values-v29/styles.xml +4 -0
  8. package/android/src/newarch/com/zoontek/rnbootsplash/RNBootSplashModule.java +1 -1
  9. package/android/src/oldarch/com/zoontek/rnbootsplash/RNBootSplashModule.java +1 -1
  10. package/dist/commonjs/NativeRNBootSplash.js +1 -2
  11. package/dist/commonjs/NativeRNBootSplash.js.map +1 -1
  12. package/dist/commonjs/NativeRNBootSplash.web.js +3 -3
  13. package/dist/commonjs/NativeRNBootSplash.web.js.map +1 -1
  14. package/dist/commonjs/addon/index.js +29 -29
  15. package/dist/commonjs/addon/index.js.map +1 -1
  16. package/dist/commonjs/generate.js +17 -19
  17. package/dist/commonjs/generate.js.map +1 -1
  18. package/dist/commonjs/index.js +27 -17
  19. package/dist/commonjs/index.js.map +1 -1
  20. package/dist/module/NativeRNBootSplash.js.map +1 -1
  21. package/dist/module/NativeRNBootSplash.web.js +2 -1
  22. package/dist/module/NativeRNBootSplash.web.js.map +1 -1
  23. package/dist/module/addon/index.js +29 -29
  24. package/dist/module/addon/index.js.map +1 -1
  25. package/dist/module/generate.js +13 -16
  26. package/dist/module/generate.js.map +1 -1
  27. package/dist/module/index.js +26 -15
  28. package/dist/module/index.js.map +1 -1
  29. package/dist/typescript/NativeRNBootSplash.d.ts +1 -0
  30. package/dist/typescript/NativeRNBootSplash.d.ts.map +1 -1
  31. package/dist/typescript/NativeRNBootSplash.web.d.ts +1 -0
  32. package/dist/typescript/NativeRNBootSplash.web.d.ts.map +1 -1
  33. package/dist/typescript/addon/index.d.ts.map +1 -1
  34. package/dist/typescript/generate.d.ts +1 -1
  35. package/dist/typescript/generate.d.ts.map +1 -1
  36. package/dist/typescript/index.d.ts +2 -2
  37. package/dist/typescript/index.d.ts.map +1 -1
  38. package/ios/RNBootSplash.mm +3 -2
  39. package/package.json +20 -18
  40. package/src/NativeRNBootSplash.ts +5 -1
  41. package/src/NativeRNBootSplash.web.ts +5 -1
  42. package/src/generate.ts +6 -6
  43. package/src/index.ts +46 -32
  44. package/android/src/main/java/com/zoontek/rnbootsplash/RNBootSplashDialog.java +0 -52
package/README.md CHANGED
@@ -356,7 +356,7 @@ type isVisible = () => Promise<boolean>;
356
356
  ```ts
357
357
  import BootSplash from "react-native-bootsplash";
358
358
 
359
- RNBootSplash.isVisible().then((value) => console.log(value));
359
+ BootSplash.isVisible().then((value) => console.log(value));
360
360
  ```
361
361
 
362
362
  ### useHideAnimation()
@@ -371,7 +371,7 @@ type useHideAnimation = (config: {
371
371
  manifest: Manifest; // the manifest file is generated when --assets-output is specified
372
372
 
373
373
  // the required generated assets
374
- logo: ImageRequireSource;
374
+ logo?: ImageRequireSource;
375
375
  darkLogo?: ImageRequireSource;
376
376
  brand?: ImageRequireSource;
377
377
  darkBrand?: ImageRequireSource;
@@ -385,7 +385,7 @@ type useHideAnimation = (config: {
385
385
  }) => {
386
386
  container: ViewProps;
387
387
  logo: ImageProps;
388
- brand?: ImageProps;
388
+ brand: ImageProps;
389
389
  };
390
390
  ```
391
391
 
@@ -428,8 +428,8 @@ const AnimatedBootSplash = ({ onAnimationEnd }: Props) => {
428
428
 
429
429
  return (
430
430
  <Animated.View {...container} style={[container.style, { opacity }]}>
431
- <Image {...logo} style={logo.style} />
432
- {/* {brand && <Image {...brand} style={brand.style} />} */}
431
+ <Image {...logo} />
432
+ {/* <Image {...brand} /> */}
433
433
  </Animated.View>
434
434
  );
435
435
  };
@@ -1,17 +1,24 @@
1
1
  package com.zoontek.rnbootsplash;
2
2
 
3
+ import android.animation.Animator;
4
+ import android.animation.AnimatorListenerAdapter;
3
5
  import android.annotation.SuppressLint;
4
6
  import android.app.Activity;
5
- import android.content.DialogInterface;
6
7
  import android.content.res.Resources;
8
+ import android.graphics.drawable.Drawable;
7
9
  import android.os.Build;
8
10
  import android.util.TypedValue;
9
11
  import android.view.View;
10
12
  import android.view.ViewConfiguration;
13
+ import android.view.ViewGroup;
11
14
  import android.view.ViewTreeObserver;
15
+ import android.view.animation.AccelerateInterpolator;
16
+ import android.widget.FrameLayout;
17
+ import android.widget.ImageView;
12
18
  import android.window.SplashScreen;
13
19
  import android.window.SplashScreenView;
14
20
 
21
+ import androidx.annotation.LayoutRes;
15
22
  import androidx.annotation.NonNull;
16
23
  import androidx.annotation.Nullable;
17
24
  import androidx.annotation.StyleRes;
@@ -23,6 +30,7 @@ import com.facebook.react.bridge.UiThreadUtil;
23
30
  import com.facebook.react.common.ReactConstants;
24
31
  import com.facebook.react.uimanager.PixelUtil;
25
32
 
33
+ import java.lang.reflect.Field;
26
34
  import java.util.HashMap;
27
35
  import java.util.Map;
28
36
  import java.util.Timer;
@@ -38,54 +46,54 @@ public class RNBootSplashModuleImpl {
38
46
  @StyleRes
39
47
  private static int mThemeResId = -1;
40
48
 
49
+ @NonNull
50
+ private static View getContentView(@NonNull Activity activity) {
51
+ return activity.findViewById(android.R.id.content);
52
+ }
53
+
41
54
  @Nullable
42
- private static RNBootSplashDialog mInitialDialog = null;
55
+ private static ViewGroup getRootView(@NonNull Activity activity) {
56
+ return (ViewGroup) getContentView(activity).getRootView();
57
+ }
58
+
43
59
  @Nullable
44
- private static RNBootSplashDialog mFadeOutDialog = null;
60
+ private static View getSplashScreenView(@NonNull Activity activity) {
61
+ final ViewGroup rootView = getRootView(activity);
45
62
 
46
- private static void showDialog(
47
- @NonNull final RNBootSplashDialog dialog,
48
- @NonNull final Runnable callback
49
- ) {
50
- if (dialog.isShowing()) {
51
- callback.run();
52
- return;
53
- }
63
+ return rootView != null
64
+ ? rootView.findViewById(R.id.bootsplash_layout)
65
+ : null;
66
+ }
54
67
 
55
- dialog.setOnShowListener(new DialogInterface.OnShowListener() {
56
- @Override
57
- public void onShow(DialogInterface dialog) {
58
- callback.run();
59
- }
60
- });
68
+ private static void removeSplashScreenView(@NonNull Activity activity) {
69
+ final ViewGroup rootView = getRootView(activity);
70
+ final View splashScreenView = getSplashScreenView(activity);
61
71
 
62
- try {
63
- dialog.show();
64
- } catch (Exception exception) {
65
- callback.run();
72
+ if (rootView != null && splashScreenView != null) {
73
+ rootView.removeView(splashScreenView);
66
74
  }
67
75
  }
68
76
 
69
- private static void dismissDialog(
70
- @Nullable final RNBootSplashDialog dialog,
71
- @NonNull final Runnable callback
72
- ) {
73
- if (dialog == null || !dialog.isShowing()) {
74
- callback.run();
75
- return;
76
- }
77
+ private static void clearPromiseQueue() {
78
+ while (!mPromiseQueue.isEmpty()) {
79
+ Promise promise = mPromiseQueue.shift();
77
80
 
78
- dialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
79
- @Override
80
- public void onDismiss(DialogInterface dialog) {
81
- callback.run();
81
+ if (promise != null) {
82
+ promise.resolve(true);
82
83
  }
83
- });
84
+ }
85
+ }
86
+
87
+ // From https://stackoverflow.com/a/61062773
88
+ public static boolean isSamsungOneUI4() {
89
+ String name = "SEM_PLATFORM_INT";
84
90
 
85
91
  try {
86
- dialog.dismiss();
87
- } catch (Exception exception) {
88
- callback.run();
92
+ Field field = Build.VERSION.class.getDeclaredField(name);
93
+ int version = (field.getInt(null) - 90000) / 10000;
94
+ return version == 4;
95
+ } catch (Exception ignored) {
96
+ return false;
89
97
  }
90
98
  }
91
99
 
@@ -105,6 +113,13 @@ public class RNBootSplashModuleImpl {
105
113
  return;
106
114
  }
107
115
 
116
+ ViewGroup rootView = getRootView(activity);
117
+
118
+ if (rootView == null) {
119
+ FLog.w(ReactConstants.TAG, NAME + ": Ignored initialization, current activity rootView is null.");
120
+ return;
121
+ }
122
+
108
123
  // Apply postBootSplashTheme
109
124
  TypedValue typedValue = new TypedValue();
110
125
  Resources.Theme currentTheme = activity.getTheme();
@@ -118,69 +133,90 @@ public class RNBootSplashModuleImpl {
118
133
  }
119
134
  }
120
135
 
121
- // Keep the splash screen on-screen until Dialog is shown
122
- final View contentView = activity.findViewById(android.R.id.content);
136
+ @Nullable Integer backgroundResId = null;
137
+ @Nullable Integer backgroundColor = null;
138
+ @Nullable Drawable logo = null;
139
+ @Nullable Drawable brand = null;
140
+
141
+ if (currentTheme.resolveAttribute(R.attr.bootSplashBackground, typedValue, true)) {
142
+ backgroundResId = typedValue.resourceId;
143
+ backgroundColor = typedValue.data;
144
+ }
145
+
146
+ if (currentTheme.resolveAttribute(R.attr.bootSplashLogo, typedValue, true)
147
+ && typedValue.resourceId != Resources.ID_NULL) {
148
+ logo = currentTheme.getDrawable(typedValue.resourceId);
149
+ }
150
+
151
+ if (currentTheme.resolveAttribute(R.attr.bootSplashBrand, typedValue, true)
152
+ && typedValue.resourceId != Resources.ID_NULL) {
153
+ brand = currentTheme.getDrawable(typedValue.resourceId);
154
+ }
155
+
156
+ // Keep the splash screen on-screen until View is added
157
+ final View contentView = getContentView(activity);
123
158
  mShouldKeepOnScreen = true;
124
159
 
125
160
  contentView
126
161
  .getViewTreeObserver()
127
162
  .addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
128
- @Override
129
- public boolean onPreDraw() {
130
- if (mShouldKeepOnScreen) {
131
- return false;
132
- }
163
+ @Override
164
+ public boolean onPreDraw() {
165
+ if (mShouldKeepOnScreen) {
166
+ return false;
167
+ }
133
168
 
134
- contentView
135
- .getViewTreeObserver()
136
- .removeOnPreDrawListener(this);
169
+ contentView
170
+ .getViewTreeObserver()
171
+ .removeOnPreDrawListener(this);
137
172
 
138
- return true;
139
- }
140
- });
173
+ return true;
174
+ }
175
+ });
141
176
 
142
177
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
143
178
  // This is not called on Android 12 when activity is started using intent
144
179
  // (Android studio / CLI / notification / widget…)
145
- SplashScreen.OnExitAnimationListener listener = new SplashScreen.OnExitAnimationListener() {
146
- @Override
147
- public void onSplashScreenExit(@NonNull SplashScreenView view) {
148
- view.remove(); // Remove it immediately, without animation
149
-
150
- activity
151
- .getSplashScreen()
152
- .clearOnExitAnimationListener();
153
- }
154
- };
155
-
156
180
  activity
157
181
  .getSplashScreen()
158
- .setOnExitAnimationListener(listener);
159
- }
160
-
161
- mInitialDialog = new RNBootSplashDialog(activity, mThemeResId, false);
162
-
163
- UiThreadUtil.runOnUiThread(new Runnable() {
164
- @Override
165
- public void run() {
166
- showDialog(mInitialDialog, new Runnable() {
182
+ .setOnExitAnimationListener(new SplashScreen.OnExitAnimationListener() {
167
183
  @Override
168
- public void run() {
169
- mShouldKeepOnScreen = false;
184
+ public void onSplashScreenExit(@NonNull SplashScreenView splashScreenView) {
185
+ splashScreenView.remove(); // Remove it immediately, without animation
186
+
187
+ activity
188
+ .getSplashScreen()
189
+ .clearOnExitAnimationListener();
170
190
  }
171
191
  });
172
- }
173
- });
174
- }
192
+ }
175
193
 
176
- private static void clearPromiseQueue() {
177
- while (!mPromiseQueue.isEmpty()) {
178
- Promise promise = mPromiseQueue.shift();
194
+ @LayoutRes int layout = isSamsungOneUI4()
195
+ ? R.layout.splash_screen_view_samsung_oneui_4
196
+ : R.layout.splash_screen_view;
179
197
 
180
- if (promise != null) {
181
- promise.resolve(true);
182
- }
198
+ View splashScreenView = FrameLayout.inflate(activity, layout, null);
199
+
200
+ if (backgroundResId != null && backgroundResId != Resources.ID_NULL) {
201
+ splashScreenView.setBackgroundResource(backgroundResId);
202
+ } else if (backgroundColor != null) {
203
+ splashScreenView.setBackgroundColor(backgroundColor);
204
+ } else {
205
+ splashScreenView.setBackground(activity.getWindow().getDecorView().getBackground());
183
206
  }
207
+
208
+ if (logo != null) {
209
+ ImageView logoView = splashScreenView.findViewById(R.id.bootsplash_logo);
210
+ logoView.setImageDrawable(logo);
211
+ }
212
+
213
+ if (brand != null) {
214
+ ImageView brandView = splashScreenView.findViewById(R.id.bootsplash_brand);
215
+ brandView.setImageDrawable(brand);
216
+ }
217
+
218
+ rootView.addView(splashScreenView);
219
+ mShouldKeepOnScreen = false; // unfreeze the system thread UI
184
220
  }
185
221
 
186
222
  private static void hideAndClearPromiseQueue(
@@ -210,51 +246,33 @@ public class RNBootSplashModuleImpl {
210
246
  return;
211
247
  }
212
248
 
213
- if (mFadeOutDialog != null) {
214
- return; // wait until fade out end for clearPromiseQueue
215
- }
249
+ View splashScreenView = getSplashScreenView(activity);
216
250
 
217
- if (mInitialDialog == null) {
251
+ if (splashScreenView == null) {
218
252
  clearPromiseQueue();
219
- return; // both initial and fade out dialog are hidden
253
+ return;
220
254
  }
221
255
 
222
256
  if (!fade) {
223
- dismissDialog(mInitialDialog, new Runnable() {
224
- @Override
225
- public void run() {
226
- mInitialDialog = null;
227
- clearPromiseQueue();
228
- }
229
- });
230
-
257
+ removeSplashScreenView(activity);
258
+ clearPromiseQueue();
231
259
  return;
232
260
  }
233
261
 
234
- // Create a new Dialog instance with fade out animation
235
- mFadeOutDialog = new RNBootSplashDialog(activity, mThemeResId, true);
236
-
237
- showDialog(mFadeOutDialog, new Runnable() {
262
+ splashScreenView
263
+ .animate()
264
+ .setDuration(250)
265
+ .alpha(0)
266
+ .setInterpolator(new AccelerateInterpolator())
267
+ .setListener(new AnimatorListenerAdapter() {
268
+ @Override
269
+ public void onAnimationEnd(Animator animation) {
270
+ super.onAnimationEnd(animation);
238
271
 
239
- @Override
240
- public void run() {
241
- dismissDialog(mInitialDialog, new Runnable() {
242
-
243
- @Override
244
- public void run() {
245
- mInitialDialog = null;
246
-
247
- dismissDialog(mFadeOutDialog, new Runnable() {
248
- @Override
249
- public void run() {
250
- mFadeOutDialog = null;
251
- clearPromiseQueue();
252
- }
253
- });
254
- }
255
- });
256
- }
257
- });
272
+ removeSplashScreenView(activity);
273
+ clearPromiseQueue();
274
+ }
275
+ });
258
276
  }
259
277
  });
260
278
  }
@@ -277,8 +295,9 @@ public class RNBootSplashModuleImpl {
277
295
  ? PixelUtil.toDIPFromPixel(resources.getDimensionPixelSize(navigationBarHeightResId))
278
296
  : 0;
279
297
 
280
- constants.put("statusBarHeight", statusBarHeight);
298
+ constants.put("logoSizeRatio", isSamsungOneUI4() ? 0.5 : 1);
281
299
  constants.put("navigationBarHeight", navigationBarHeight);
300
+ constants.put("statusBarHeight", statusBarHeight);
282
301
 
283
302
  return constants;
284
303
  }
@@ -292,7 +311,15 @@ public class RNBootSplashModuleImpl {
292
311
  hideAndClearPromiseQueue(reactContext, fade);
293
312
  }
294
313
 
295
- public static void isVisible(final Promise promise) {
296
- promise.resolve(mShouldKeepOnScreen || mInitialDialog != null || mFadeOutDialog != null);
314
+ public static void isVisible(
315
+ final ReactApplicationContext reactContext,
316
+ final Promise promise
317
+ ) {
318
+ if (mShouldKeepOnScreen) {
319
+ promise.resolve(true);
320
+ } else {
321
+ final Activity activity = reactContext.getCurrentActivity();
322
+ promise.resolve(activity != null && getSplashScreenView(activity) != null);
323
+ }
297
324
  }
298
325
  }
@@ -0,0 +1,23 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+
3
+ <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
4
+ android:id="@+id/bootsplash_layout"
5
+ android:animateLayoutChanges="false"
6
+ android:fitsSystemWindows="false"
7
+ android:layout_width="match_parent"
8
+ android:layout_height="match_parent">
9
+
10
+ <ImageView
11
+ android:id="@+id/bootsplash_logo"
12
+ android:layout_gravity="center"
13
+ android:layout_width="288dp"
14
+ android:layout_height="288dp" />
15
+
16
+ <ImageView
17
+ android:id="@+id/bootsplash_brand"
18
+ android:layout_marginBottom="60dp"
19
+ android:layout_gravity="center_horizontal|bottom"
20
+ android:layout_width="200dp"
21
+ android:layout_height="80dp" />
22
+
23
+ </FrameLayout>
@@ -0,0 +1,25 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+
3
+ <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
4
+ android:id="@+id/bootsplash_layout"
5
+ android:animateLayoutChanges="false"
6
+ android:fitsSystemWindows="false"
7
+ android:layout_width="match_parent"
8
+ android:layout_height="match_parent">
9
+
10
+ <!-- There's an issue with logo size on Samsung OneUI v4
11
+ We need to render it 2 times smaller (288 / 2 = 144) -->
12
+ <ImageView
13
+ android:id="@+id/bootsplash_logo"
14
+ android:layout_gravity="center"
15
+ android:layout_width="144dp"
16
+ android:layout_height="144dp" />
17
+
18
+ <ImageView
19
+ android:id="@+id/bootsplash_brand"
20
+ android:layout_marginBottom="60dp"
21
+ android:layout_gravity="center_horizontal|bottom"
22
+ android:layout_width="200dp"
23
+ android:layout_height="80dp" />
24
+
25
+ </FrameLayout>
@@ -1,27 +1,15 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
 
3
3
  <resources>
4
- <style name="BootSplashNoAnimation">
5
- <item name="android:windowEnterAnimation">@null</item>
6
- <item name="android:windowExitAnimation">@null</item>
7
- </style>
8
-
9
- <style name="BootSplashFadeInAnimation">
10
- <item name="android:windowEnterAnimation">@anim/bootsplash_fade_in</item>
11
- <item name="android:windowExitAnimation">@null</item>
12
- </style>
13
-
14
- <style name="BootSplashFadeOutAnimation">
15
- <item name="android:windowEnterAnimation">@null</item>
16
- <item name="android:windowExitAnimation">@anim/bootsplash_fade_out</item>
17
- </style>
18
-
19
4
  <style name="Theme.BootSplash.Common" parent="Theme.AppCompat.DayNight.NoActionBar">
20
5
  <item name="android:opacity">opaque</item>
21
6
  <item name="android:windowBackground">@drawable/compat_splash_screen</item>
22
7
  </style>
23
8
 
24
- <style name="Theme.BootSplash.Branded" parent="Theme.BootSplash.Common">
9
+ <style name="Theme.BootSplash.DayNight" parent="Theme.BootSplash.Common">
10
+ </style>
11
+
12
+ <style name="Theme.BootSplash.Branded" parent="Theme.BootSplash.DayNight">
25
13
  <item name="bootSplashBrand">@drawable/transparent_pixel</item>
26
14
  </style>
27
15
 
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
 
3
3
  <resources>
4
- <style name="Theme.BootSplash.Branded" parent="Theme.BootSplash.Common">
4
+ <style name="Theme.BootSplash.Branded" parent="Theme.BootSplash.DayNight">
5
5
  <item name="bootSplashBrand">@null</item>
6
6
  </style>
7
7
 
@@ -1,6 +1,10 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
 
3
3
  <resources>
4
+ <style name="Theme.BootSplash.DayNight" parent="Theme.BootSplash.Common">
5
+ <item name="android:forceDarkAllowed">false</item>
6
+ </style>
7
+
4
8
  <style name="Theme.BootSplash.EdgeToEdge" parent="Theme.BootSplash.EdgeToEdge.Common">
5
9
  <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
6
10
  <item name="android:statusBarColor">@android:color/transparent</item>
@@ -33,6 +33,6 @@ public class RNBootSplashModule extends NativeRNBootSplashSpec {
33
33
 
34
34
  @Override
35
35
  public void isVisible(Promise promise) {
36
- RNBootSplashModuleImpl.isVisible(promise);
36
+ RNBootSplashModuleImpl.isVisible(getReactApplicationContext(), promise);
37
37
  }
38
38
  }
@@ -37,6 +37,6 @@ public class RNBootSplashModule extends ReactContextBaseJavaModule {
37
37
 
38
38
  @ReactMethod
39
39
  public void isVisible(Promise promise) {
40
- RNBootSplashModuleImpl.isVisible(promise);
40
+ RNBootSplashModuleImpl.isVisible(getReactApplicationContext(), promise);
41
41
  }
42
42
  }
@@ -5,6 +5,5 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _reactNative = require("react-native");
8
- var _default = _reactNative.TurboModuleRegistry.getEnforcing("RNBootSplash");
9
- exports.default = _default;
8
+ var _default = exports.default = _reactNative.TurboModuleRegistry.getEnforcing("RNBootSplash");
10
9
  //# sourceMappingURL=NativeRNBootSplash.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_default","TurboModuleRegistry","getEnforcing","exports","default"],"sourceRoot":"../../src","sources":["NativeRNBootSplash.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAQpCC,gCAAmB,CAACC,YAAY,CAAO,cAAc,CAAC;AAAAC,OAAA,CAAAC,OAAA,GAAAJ,QAAA"}
1
+ {"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeRNBootSplash.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAYpCC,gCAAmB,CAACC,YAAY,CAAO,cAAc,CAAC"}
@@ -8,13 +8,14 @@ function resolveAfter(delay) {
8
8
  return new Promise(resolve => setTimeout(resolve, delay));
9
9
  }
10
10
  function removeNode(node) {
11
- const parent = node === null || node === void 0 ? void 0 : node.parentNode;
11
+ const parent = node?.parentNode;
12
12
  if (node != null && parent != null) {
13
13
  parent.removeChild(node);
14
14
  }
15
15
  }
16
- var _default = {
16
+ var _default = exports.default = {
17
17
  getConstants: () => ({
18
+ logoSizeRatio: 1,
18
19
  navigationBarHeight: 0,
19
20
  statusBarHeight: 0
20
21
  }),
@@ -39,5 +40,4 @@ var _default = {
39
40
  return Promise.resolve(container != null);
40
41
  }
41
42
  };
42
- exports.default = _default;
43
43
  //# sourceMappingURL=NativeRNBootSplash.web.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["resolveAfter","delay","Promise","resolve","setTimeout","removeNode","node","parent","parentNode","removeChild","_default","getConstants","navigationBarHeight","statusBarHeight","hide","fade","document","fonts","ready","then","container","getElementById","style","transitionProperty","transitionDuration","opacity","isVisible","exports","default"],"sourceRoot":"../../src","sources":["NativeRNBootSplash.web.ts"],"mappings":";;;;;;AAEA,SAASA,YAAYA,CAACC,KAAa,EAAE;EACnC,OAAO,IAAIC,OAAO,CAAEC,OAAO,IAAKC,UAAU,CAACD,OAAO,EAAEF,KAAK,CAAC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AAO,OAAA,CAAAC,OAAA,GAAAlB,QAAA"}
1
+ {"version":3,"names":["resolveAfter","delay","Promise","resolve","setTimeout","removeNode","node","parent","parentNode","removeChild","_default","exports","default","getConstants","logoSizeRatio","navigationBarHeight","statusBarHeight","hide","fade","document","fonts","ready","then","container","getElementById","style","transitionProperty","transitionDuration","opacity","isVisible"],"sourceRoot":"../../src","sources":["NativeRNBootSplash.web.ts"],"mappings":";;;;;;AAEA,SAASA,YAAYA,CAACC,KAAa,EAAE;EACnC,OAAO,IAAIC,OAAO,CAAEC,OAAO,IAAKC,UAAU,CAACD,OAAO,EAAEF,KAAK,CAAC,CAAC;AAC7D;AAEA,SAASI,UAAUA,CAACC,IAAiB,EAAE;EACrC,MAAMC,MAAM,GAAGD,IAAI,EAAEE,UAAU;EAE/B,IAAIF,IAAI,IAAI,IAAI,IAAIC,MAAM,IAAI,IAAI,EAAE;IAClCA,MAAM,CAACE,WAAW,CAACH,IAAI,CAAC;EAC1B;AACF;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc;EACbC,YAAY,EAAEA,CAAA,MAAO;IACnBC,aAAa,EAAE,CAAC;IAChBC,mBAAmB,EAAE,CAAC;IACtBC,eAAe,EAAE;EACnB,CAAC,CAAC;EAEFC,IAAI,EAAGC,IAAI,IACTC,QAAQ,CAACC,KAAK,CAACC,KAAK,CAACC,IAAI,CAAC,MAAM;IAC9B,MAAMC,SAAS,GAAGJ,QAAQ,CAACK,cAAc,CAAC,YAAY,CAAC;IACvD,MAAMC,KAAK,GAAGN,QAAQ,CAACK,cAAc,CAAC,kBAAkB,CAAC;IAEzD,IAAID,SAAS,IAAI,IAAI,IAAI,CAACL,IAAI,EAAE;MAC9Bb,UAAU,CAACkB,SAAS,CAAC;MACrBlB,UAAU,CAACoB,KAAK,CAAC;IACnB,CAAC,MAAM;MACLF,SAAS,CAACE,KAAK,CAACC,kBAAkB,GAAG,SAAS;MAC9CH,SAAS,CAACE,KAAK,CAACE,kBAA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