react-native-bootsplash 6.3.5 → 6.3.7
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 +11 -7
- package/dist/commonjs/addon/index.js +31 -31
- package/dist/commonjs/expo.js +68 -30
- package/dist/commonjs/expo.js.map +1 -1
- package/dist/module/addon/index.js +31 -31
- package/dist/module/expo.js +68 -30
- package/dist/module/expo.js.map +1 -1
- package/dist/typescript/expo.d.ts.map +1 -1
- package/ios/RNBootSplash.xcodeproj/project.xcworkspace/xcuserdata/zoontek.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/RNBootSplash.xcodeproj/xcuserdata/zoontek.xcuserdatad/xcschemes/xcschememanagement.plist +5 -0
- package/package.json +1 -1
- package/src/expo.ts +72 -35
- package/android/app/build/generated/source/codegen/java/com/facebook/fbreact/specs/NativeRNBootSplashSpec.java +0 -78
- package/android/app/build/generated/source/codegen/jni/CMakeLists.txt +0 -36
- package/android/app/build/generated/source/codegen/jni/RNBootSplashSpec-generated.cpp +0 -44
- package/android/app/build/generated/source/codegen/jni/RNBootSplashSpec.h +0 -31
- package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBootSplashSpec/RNBootSplashSpecJSI-generated.cpp +0 -39
- package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBootSplashSpec/RNBootSplashSpecJSI.h +0 -85
package/src/expo.ts
CHANGED
|
@@ -286,44 +286,81 @@ const withAppDelegate: Expo.ConfigPlugin<Props> = (config) =>
|
|
|
286
286
|
);
|
|
287
287
|
}
|
|
288
288
|
|
|
289
|
-
const
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
289
|
+
const withRootView = ((): ReturnType<typeof mergeContents> => {
|
|
290
|
+
// SDK 53 deprecates support for Obj-C AppDelegate
|
|
291
|
+
if (semver.major(sdkVersion) >= 53) {
|
|
292
|
+
const withHeader = mergeContents({
|
|
293
|
+
src: modResults.contents,
|
|
294
|
+
comment: "//",
|
|
295
|
+
tag: "bootsplash-header",
|
|
296
|
+
offset: 1,
|
|
297
|
+
anchor: /import Expo/,
|
|
298
|
+
newSrc: "import RNBootSplash",
|
|
299
|
+
});
|
|
299
300
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
super.customize(rootView)
|
|
311
|
-
RNBootSplash.initWithStoryboard("BootSplash", rootView: rootView)
|
|
312
|
-
}
|
|
313
|
-
`
|
|
314
|
-
: dedent`
|
|
315
|
-
override func customize(_ rootView: RCTRootView!) {
|
|
316
|
-
super.customize(rootView)
|
|
317
|
-
RNBootSplash.initWithStoryboard("BootSplash", rootView: rootView)
|
|
318
|
-
}
|
|
319
|
-
`
|
|
320
|
-
: dedent`
|
|
321
|
-
- (void)customizeRootView:(RCTRootView *)rootView {
|
|
322
|
-
[super customizeRootView:rootView];
|
|
323
|
-
[RNBootSplash initWithStoryboard:@"BootSplash" rootView:rootView];
|
|
301
|
+
return mergeContents({
|
|
302
|
+
src: withHeader.contents,
|
|
303
|
+
comment: "//",
|
|
304
|
+
tag: "bootsplash-init",
|
|
305
|
+
offset: 1,
|
|
306
|
+
anchor: /class ReactNativeDelegate: ExpoReactNativeFactoryDelegate {/,
|
|
307
|
+
newSrc: dedent`
|
|
308
|
+
public override func customize(_ rootView: UIView) {
|
|
309
|
+
super.customize(rootView)
|
|
310
|
+
RNBootSplash.initWithStoryboard("BootSplash", rootView: rootView)
|
|
324
311
|
}
|
|
325
312
|
`,
|
|
326
|
-
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
if (language === "swift") {
|
|
317
|
+
const withHeader = mergeContents({
|
|
318
|
+
src: modResults.contents,
|
|
319
|
+
comment: "//",
|
|
320
|
+
tag: "bootsplash-header",
|
|
321
|
+
offset: 1,
|
|
322
|
+
anchor: /import Expo/,
|
|
323
|
+
newSrc: "import RNBootSplash",
|
|
324
|
+
});
|
|
325
|
+
|
|
326
|
+
return mergeContents({
|
|
327
|
+
src: withHeader.contents,
|
|
328
|
+
comment: "//",
|
|
329
|
+
tag: "bootsplash-init",
|
|
330
|
+
offset: 1,
|
|
331
|
+
anchor: /public class AppDelegate: ExpoAppDelegate {/,
|
|
332
|
+
newSrc: dedent`
|
|
333
|
+
override func customize(_ rootView: RCTRootView!) {
|
|
334
|
+
super.customize(rootView)
|
|
335
|
+
RNBootSplash.initWithStoryboard("BootSplash", rootView: rootView)
|
|
336
|
+
}
|
|
337
|
+
`,
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
const withHeader = mergeContents({
|
|
342
|
+
src: modResults.contents,
|
|
343
|
+
comment: "//",
|
|
344
|
+
tag: "bootsplash-header",
|
|
345
|
+
offset: 1,
|
|
346
|
+
anchor: /#import "AppDelegate\.h"/,
|
|
347
|
+
newSrc: '#import "RNBootSplash.h"',
|
|
348
|
+
});
|
|
349
|
+
|
|
350
|
+
return mergeContents({
|
|
351
|
+
src: withHeader.contents,
|
|
352
|
+
comment: "//",
|
|
353
|
+
tag: "bootsplash-init",
|
|
354
|
+
offset: 0,
|
|
355
|
+
anchor: /@end/,
|
|
356
|
+
newSrc: dedent`
|
|
357
|
+
- (void)customizeRootView:(RCTRootView *)rootView {
|
|
358
|
+
[super customizeRootView:rootView];
|
|
359
|
+
[RNBootSplash initWithStoryboard:@"BootSplash" rootView:rootView];
|
|
360
|
+
}
|
|
361
|
+
`,
|
|
362
|
+
});
|
|
363
|
+
})();
|
|
327
364
|
|
|
328
365
|
return {
|
|
329
366
|
...config,
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateModuleJavaSpec.js
|
|
9
|
-
*
|
|
10
|
-
* @nolint
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
package com.facebook.fbreact.specs;
|
|
14
|
-
|
|
15
|
-
import com.facebook.proguard.annotations.DoNotStrip;
|
|
16
|
-
import com.facebook.react.bridge.Promise;
|
|
17
|
-
import com.facebook.react.bridge.ReactApplicationContext;
|
|
18
|
-
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
19
|
-
import com.facebook.react.bridge.ReactMethod;
|
|
20
|
-
import com.facebook.react.common.build.ReactBuildConfig;
|
|
21
|
-
import com.facebook.react.turbomodule.core.interfaces.TurboModule;
|
|
22
|
-
import java.util.Arrays;
|
|
23
|
-
import java.util.HashSet;
|
|
24
|
-
import java.util.Map;
|
|
25
|
-
import java.util.Set;
|
|
26
|
-
import javax.annotation.Nonnull;
|
|
27
|
-
import javax.annotation.Nullable;
|
|
28
|
-
|
|
29
|
-
public abstract class NativeRNBootSplashSpec extends ReactContextBaseJavaModule implements TurboModule {
|
|
30
|
-
public static final String NAME = "RNBootSplash";
|
|
31
|
-
|
|
32
|
-
public NativeRNBootSplashSpec(ReactApplicationContext reactContext) {
|
|
33
|
-
super(reactContext);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
@Override
|
|
37
|
-
public @Nonnull String getName() {
|
|
38
|
-
return NAME;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
protected abstract Map<String, Object> getTypedExportedConstants();
|
|
42
|
-
|
|
43
|
-
@Override
|
|
44
|
-
@DoNotStrip
|
|
45
|
-
public final @Nullable Map<String, Object> getConstants() {
|
|
46
|
-
Map<String, Object> constants = getTypedExportedConstants();
|
|
47
|
-
if (ReactBuildConfig.DEBUG || ReactBuildConfig.IS_INTERNAL_BUILD) {
|
|
48
|
-
Set<String> obligatoryFlowConstants = new HashSet<>(Arrays.asList(
|
|
49
|
-
"darkModeEnabled"
|
|
50
|
-
));
|
|
51
|
-
Set<String> optionalFlowConstants = new HashSet<>(Arrays.asList(
|
|
52
|
-
"logoSizeRatio",
|
|
53
|
-
"navigationBarHeight",
|
|
54
|
-
"statusBarHeight"
|
|
55
|
-
));
|
|
56
|
-
Set<String> undeclaredConstants = new HashSet<>(constants.keySet());
|
|
57
|
-
undeclaredConstants.removeAll(obligatoryFlowConstants);
|
|
58
|
-
undeclaredConstants.removeAll(optionalFlowConstants);
|
|
59
|
-
if (!undeclaredConstants.isEmpty()) {
|
|
60
|
-
throw new IllegalStateException(String.format("Native Module Flow doesn't declare constants: %s", undeclaredConstants));
|
|
61
|
-
}
|
|
62
|
-
undeclaredConstants = obligatoryFlowConstants;
|
|
63
|
-
undeclaredConstants.removeAll(constants.keySet());
|
|
64
|
-
if (!undeclaredConstants.isEmpty()) {
|
|
65
|
-
throw new IllegalStateException(String.format("Native Module doesn't fill in constants: %s", undeclaredConstants));
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
return constants;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
@ReactMethod
|
|
72
|
-
@DoNotStrip
|
|
73
|
-
public abstract void hide(boolean fade, Promise promise);
|
|
74
|
-
|
|
75
|
-
@ReactMethod
|
|
76
|
-
@DoNotStrip
|
|
77
|
-
public abstract void isVisible(Promise promise);
|
|
78
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
#
|
|
3
|
-
# This source code is licensed under the MIT license found in the
|
|
4
|
-
# LICENSE file in the root directory of this source tree.
|
|
5
|
-
|
|
6
|
-
cmake_minimum_required(VERSION 3.13)
|
|
7
|
-
set(CMAKE_VERBOSE_MAKEFILE on)
|
|
8
|
-
|
|
9
|
-
file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/RNBootSplashSpec/*.cpp)
|
|
10
|
-
|
|
11
|
-
add_library(
|
|
12
|
-
react_codegen_RNBootSplashSpec
|
|
13
|
-
OBJECT
|
|
14
|
-
${react_codegen_SRCS}
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
target_include_directories(react_codegen_RNBootSplashSpec PUBLIC . react/renderer/components/RNBootSplashSpec)
|
|
18
|
-
|
|
19
|
-
target_link_libraries(
|
|
20
|
-
react_codegen_RNBootSplashSpec
|
|
21
|
-
fbjni
|
|
22
|
-
jsi
|
|
23
|
-
# We need to link different libraries based on whether we are building rncore or not, that's necessary
|
|
24
|
-
# because we want to break a circular dependency between react_codegen_rncore and reactnative
|
|
25
|
-
reactnative
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
target_compile_options(
|
|
29
|
-
react_codegen_RNBootSplashSpec
|
|
30
|
-
PRIVATE
|
|
31
|
-
-DLOG_TAG=\"ReactNative\"
|
|
32
|
-
-fexceptions
|
|
33
|
-
-frtti
|
|
34
|
-
-std=c++20
|
|
35
|
-
-Wall
|
|
36
|
-
)
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateModuleJniCpp.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include "RNBootSplashSpec.h"
|
|
12
|
-
|
|
13
|
-
namespace facebook::react {
|
|
14
|
-
|
|
15
|
-
static facebook::jsi::Value __hostFunction_NativeRNBootSplashSpecJSI_getConstants(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
16
|
-
static jmethodID cachedMethodId = nullptr;
|
|
17
|
-
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, ObjectKind, "getConstants", "()Ljava/util/Map;", args, count, cachedMethodId);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
static facebook::jsi::Value __hostFunction_NativeRNBootSplashSpecJSI_hide(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
21
|
-
static jmethodID cachedMethodId = nullptr;
|
|
22
|
-
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "hide", "(ZLcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
static facebook::jsi::Value __hostFunction_NativeRNBootSplashSpecJSI_isVisible(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
26
|
-
static jmethodID cachedMethodId = nullptr;
|
|
27
|
-
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "isVisible", "(Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
NativeRNBootSplashSpecJSI::NativeRNBootSplashSpecJSI(const JavaTurboModule::InitParams ¶ms)
|
|
31
|
-
: JavaTurboModule(params) {
|
|
32
|
-
methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeRNBootSplashSpecJSI_getConstants};
|
|
33
|
-
methodMap_["hide"] = MethodMetadata {1, __hostFunction_NativeRNBootSplashSpecJSI_hide};
|
|
34
|
-
methodMap_["isVisible"] = MethodMetadata {0, __hostFunction_NativeRNBootSplashSpecJSI_isVisible};
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
std::shared_ptr<TurboModule> RNBootSplashSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms) {
|
|
38
|
-
if (moduleName == "RNBootSplash") {
|
|
39
|
-
return std::make_shared<NativeRNBootSplashSpecJSI>(params);
|
|
40
|
-
}
|
|
41
|
-
return nullptr;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
} // namespace facebook::react
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateModuleJniH.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#pragma once
|
|
12
|
-
|
|
13
|
-
#include <ReactCommon/JavaTurboModule.h>
|
|
14
|
-
#include <ReactCommon/TurboModule.h>
|
|
15
|
-
#include <jsi/jsi.h>
|
|
16
|
-
|
|
17
|
-
namespace facebook::react {
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* JNI C++ class for module 'NativeRNBootSplash'
|
|
21
|
-
*/
|
|
22
|
-
class JSI_EXPORT NativeRNBootSplashSpecJSI : public JavaTurboModule {
|
|
23
|
-
public:
|
|
24
|
-
NativeRNBootSplashSpecJSI(const JavaTurboModule::InitParams ¶ms);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
JSI_EXPORT
|
|
29
|
-
std::shared_ptr<TurboModule> RNBootSplashSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms);
|
|
30
|
-
|
|
31
|
-
} // namespace facebook::react
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateModuleCpp.js
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
#include "RNBootSplashSpecJSI.h"
|
|
11
|
-
|
|
12
|
-
namespace facebook::react {
|
|
13
|
-
|
|
14
|
-
static jsi::Value __hostFunction_NativeRNBootSplashCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
15
|
-
return static_cast<NativeRNBootSplashCxxSpecJSI *>(&turboModule)->getConstants(
|
|
16
|
-
rt
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
static jsi::Value __hostFunction_NativeRNBootSplashCxxSpecJSI_hide(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
20
|
-
return static_cast<NativeRNBootSplashCxxSpecJSI *>(&turboModule)->hide(
|
|
21
|
-
rt,
|
|
22
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool()
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
static jsi::Value __hostFunction_NativeRNBootSplashCxxSpecJSI_isVisible(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
26
|
-
return static_cast<NativeRNBootSplashCxxSpecJSI *>(&turboModule)->isVisible(
|
|
27
|
-
rt
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
NativeRNBootSplashCxxSpecJSI::NativeRNBootSplashCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
|
|
32
|
-
: TurboModule("RNBootSplash", jsInvoker) {
|
|
33
|
-
methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeRNBootSplashCxxSpecJSI_getConstants};
|
|
34
|
-
methodMap_["hide"] = MethodMetadata {1, __hostFunction_NativeRNBootSplashCxxSpecJSI_hide};
|
|
35
|
-
methodMap_["isVisible"] = MethodMetadata {0, __hostFunction_NativeRNBootSplashCxxSpecJSI_isVisible};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
} // namespace facebook::react
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateModuleH.js
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
#pragma once
|
|
11
|
-
|
|
12
|
-
#include <ReactCommon/TurboModule.h>
|
|
13
|
-
#include <react/bridging/Bridging.h>
|
|
14
|
-
|
|
15
|
-
namespace facebook::react {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class JSI_EXPORT NativeRNBootSplashCxxSpecJSI : public TurboModule {
|
|
19
|
-
protected:
|
|
20
|
-
NativeRNBootSplashCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
21
|
-
|
|
22
|
-
public:
|
|
23
|
-
virtual jsi::Object getConstants(jsi::Runtime &rt) = 0;
|
|
24
|
-
virtual jsi::Value hide(jsi::Runtime &rt, bool fade) = 0;
|
|
25
|
-
virtual jsi::Value isVisible(jsi::Runtime &rt) = 0;
|
|
26
|
-
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
template <typename T>
|
|
30
|
-
class JSI_EXPORT NativeRNBootSplashCxxSpec : public TurboModule {
|
|
31
|
-
public:
|
|
32
|
-
jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
33
|
-
return delegate_.get(rt, propName);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
static constexpr std::string_view kModuleName = "RNBootSplash";
|
|
37
|
-
|
|
38
|
-
protected:
|
|
39
|
-
NativeRNBootSplashCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
40
|
-
: TurboModule(std::string{NativeRNBootSplashCxxSpec::kModuleName}, jsInvoker),
|
|
41
|
-
delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
private:
|
|
45
|
-
class Delegate : public NativeRNBootSplashCxxSpecJSI {
|
|
46
|
-
public:
|
|
47
|
-
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
48
|
-
NativeRNBootSplashCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
jsi::Object getConstants(jsi::Runtime &rt) override {
|
|
53
|
-
static_assert(
|
|
54
|
-
bridging::getParameterCount(&T::getConstants) == 1,
|
|
55
|
-
"Expected getConstants(...) to have 1 parameters");
|
|
56
|
-
|
|
57
|
-
return bridging::callFromJs<jsi::Object>(
|
|
58
|
-
rt, &T::getConstants, jsInvoker_, instance_);
|
|
59
|
-
}
|
|
60
|
-
jsi::Value hide(jsi::Runtime &rt, bool fade) override {
|
|
61
|
-
static_assert(
|
|
62
|
-
bridging::getParameterCount(&T::hide) == 2,
|
|
63
|
-
"Expected hide(...) to have 2 parameters");
|
|
64
|
-
|
|
65
|
-
return bridging::callFromJs<jsi::Value>(
|
|
66
|
-
rt, &T::hide, jsInvoker_, instance_, std::move(fade));
|
|
67
|
-
}
|
|
68
|
-
jsi::Value isVisible(jsi::Runtime &rt) override {
|
|
69
|
-
static_assert(
|
|
70
|
-
bridging::getParameterCount(&T::isVisible) == 1,
|
|
71
|
-
"Expected isVisible(...) to have 1 parameters");
|
|
72
|
-
|
|
73
|
-
return bridging::callFromJs<jsi::Value>(
|
|
74
|
-
rt, &T::isVisible, jsInvoker_, instance_);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
private:
|
|
78
|
-
friend class NativeRNBootSplashCxxSpec;
|
|
79
|
-
T *instance_;
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
Delegate delegate_;
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
} // namespace facebook::react
|