@computools/react-native-template-controller 1.0.10 → 1.0.12
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 -5
- package/package.json +1 -1
- package/template/android/app/build.gradle +3 -7
- package/template/android/app/src/debug/AndroidManifest.xml +1 -5
- package/template/android/app/src/main/java/com/reactnativetemplate/MainActivity.kt +32 -0
- package/template/android/app/src/main/java/com/reactnativetemplate/MainApplication.kt +45 -0
- package/template/android/build.gradle +8 -8
- package/template/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/template/android/gradle/wrapper/gradle-wrapper.properties +2 -1
- package/template/android/gradle.properties +0 -3
- package/template/android/gradlew +11 -6
- package/template/babel.config.js +1 -1
- package/template/ios/Podfile +0 -7
- package/template/ios/ReactNativeTemplate/AppDelegate.mm +5 -0
- package/template/ios/ReactNativeTemplate/Info.plist +4 -8
- package/template/ios/ReactNativeTemplate.xcodeproj/project.pbxproj +28 -78
- package/template/ios/ReactNativeTemplate.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/template/ios/{ReactNativeTemplate dev-Info.plist → ReactNativeTemplate_dev-Info.plist} +4 -8
- package/template/ios/{ReactNativeTemplate stg-Info.plist → ReactNativeTemplate_stg-Info.plist} +4 -8
- package/template/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm +0 -16
- package/template/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h +8 -25
- package/template/ios/build/generated/ios/FBReactNativeSpecJSI-generated.cpp +1223 -276
- package/template/ios/build/generated/ios/FBReactNativeSpecJSI.h +1427 -424
- package/template/ios/build/generated/ios/React-Codegen.podspec.json +1 -1
- package/template/package.json +14 -14
- package/template/tsconfig.json +1 -1
- package/template/android/app/src/debug/java/com/reactnativetemplate/ReactNativeFlipper.java +0 -75
- package/template/android/app/src/main/java/com/reactnativetemplate/MainActivity.java +0 -40
- package/template/android/app/src/main/java/com/reactnativetemplate/MainApplication.java +0 -62
- package/template/android/app/src/release/java/com/reactnativetemplate/ReactNativeFlipper.java +0 -20
@@ -35,9 +35,11 @@ public:
|
|
35
35
|
return delegate_.get(rt, propName);
|
36
36
|
}
|
37
37
|
|
38
|
+
static constexpr std::string_view kModuleName = "DevToolsSettingsManager";
|
39
|
+
|
38
40
|
protected:
|
39
41
|
NativeDevToolsSettingsManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
40
|
-
: TurboModule(
|
42
|
+
: TurboModule(std::string{NativeDevToolsSettingsManagerCxxSpec::kModuleName}, jsInvoker),
|
41
43
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
42
44
|
|
43
45
|
private:
|
@@ -106,9 +108,11 @@ public:
|
|
106
108
|
return delegate_.get(rt, propName);
|
107
109
|
}
|
108
110
|
|
111
|
+
static constexpr std::string_view kModuleName = "Vibration";
|
112
|
+
|
109
113
|
protected:
|
110
114
|
NativeVibrationCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
111
|
-
: TurboModule(
|
115
|
+
: TurboModule(std::string{NativeVibrationCxxSpec::kModuleName}, jsInvoker),
|
112
116
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
113
117
|
|
114
118
|
private:
|
@@ -176,9 +180,11 @@ public:
|
|
176
180
|
return delegate_.get(rt, propName);
|
177
181
|
}
|
178
182
|
|
183
|
+
static constexpr std::string_view kModuleName = "SettingsManager";
|
184
|
+
|
179
185
|
protected:
|
180
186
|
NativeSettingsManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
181
|
-
: TurboModule(
|
187
|
+
: TurboModule(std::string{NativeSettingsManagerCxxSpec::kModuleName}, jsInvoker),
|
182
188
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
183
189
|
|
184
190
|
private:
|
@@ -242,9 +248,11 @@ public:
|
|
242
248
|
return delegate_.get(rt, propName);
|
243
249
|
}
|
244
250
|
|
251
|
+
static constexpr std::string_view kModuleName = "WebSocketModule";
|
252
|
+
|
245
253
|
protected:
|
246
254
|
NativeWebSocketModuleCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
247
|
-
: TurboModule(
|
255
|
+
: TurboModule(std::string{NativeWebSocketModuleCxxSpec::kModuleName}, jsInvoker),
|
248
256
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
249
257
|
|
250
258
|
private:
|
@@ -318,7 +326,8 @@ private:
|
|
318
326
|
};
|
319
327
|
|
320
328
|
|
321
|
-
|
329
|
+
|
330
|
+
#pragma mark - ExceptionsManagerBaseStackFrame
|
322
331
|
|
323
332
|
template <typename P0, typename P1, typename P2, typename P3, typename P4>
|
324
333
|
struct ExceptionsManagerBaseStackFrame {
|
@@ -351,35 +360,40 @@ struct ExceptionsManagerBaseStackFrameBridging {
|
|
351
360
|
static std::optional<double> columnToJs(jsi::Runtime &rt, P0 value) {
|
352
361
|
return bridging::toJs(rt, value);
|
353
362
|
}
|
363
|
+
|
354
364
|
static std::optional<jsi::String> fileToJs(jsi::Runtime &rt, P1 value) {
|
355
365
|
return bridging::toJs(rt, value);
|
356
366
|
}
|
367
|
+
|
357
368
|
static std::optional<double> lineNumberToJs(jsi::Runtime &rt, P2 value) {
|
358
369
|
return bridging::toJs(rt, value);
|
359
370
|
}
|
371
|
+
|
360
372
|
static jsi::String methodNameToJs(jsi::Runtime &rt, P3 value) {
|
361
373
|
return bridging::toJs(rt, value);
|
362
374
|
}
|
375
|
+
|
363
376
|
static bool collapseToJs(jsi::Runtime &rt, P4 value) {
|
364
377
|
return bridging::toJs(rt, value);
|
365
378
|
}
|
366
379
|
#endif
|
367
380
|
|
368
381
|
static jsi::Object toJs(
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
382
|
+
jsi::Runtime &rt,
|
383
|
+
const ExceptionsManagerBaseStackFrame<P0, P1, P2, P3, P4> &value,
|
384
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
385
|
+
auto result = facebook::jsi::Object(rt);
|
386
|
+
result.setProperty(rt, "column", bridging::toJs(rt, value.column, jsInvoker));
|
374
387
|
result.setProperty(rt, "file", bridging::toJs(rt, value.file, jsInvoker));
|
375
388
|
result.setProperty(rt, "lineNumber", bridging::toJs(rt, value.lineNumber, jsInvoker));
|
376
389
|
result.setProperty(rt, "methodName", bridging::toJs(rt, value.methodName, jsInvoker));
|
377
390
|
if (value.collapse) {
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
391
|
+
result.setProperty(rt, "collapse", bridging::toJs(rt, value.collapse.value(), jsInvoker));
|
392
|
+
}
|
393
|
+
return result;
|
394
|
+
}
|
395
|
+
};
|
396
|
+
|
383
397
|
|
384
398
|
|
385
399
|
#pragma mark - ExceptionsManagerBaseExceptionData
|
@@ -421,35 +435,42 @@ struct ExceptionsManagerBaseExceptionDataBridging {
|
|
421
435
|
static jsi::String messageToJs(jsi::Runtime &rt, P0 value) {
|
422
436
|
return bridging::toJs(rt, value);
|
423
437
|
}
|
438
|
+
|
424
439
|
static std::optional<jsi::String> originalMessageToJs(jsi::Runtime &rt, P1 value) {
|
425
440
|
return bridging::toJs(rt, value);
|
426
441
|
}
|
442
|
+
|
427
443
|
static std::optional<jsi::String> nameToJs(jsi::Runtime &rt, P2 value) {
|
428
444
|
return bridging::toJs(rt, value);
|
429
445
|
}
|
446
|
+
|
430
447
|
static std::optional<jsi::String> componentStackToJs(jsi::Runtime &rt, P3 value) {
|
431
448
|
return bridging::toJs(rt, value);
|
432
449
|
}
|
450
|
+
|
433
451
|
static jsi::Array stackToJs(jsi::Runtime &rt, P4 value) {
|
434
452
|
return bridging::toJs(rt, value);
|
435
453
|
}
|
454
|
+
|
436
455
|
static double idToJs(jsi::Runtime &rt, P5 value) {
|
437
456
|
return bridging::toJs(rt, value);
|
438
457
|
}
|
458
|
+
|
439
459
|
static bool isFatalToJs(jsi::Runtime &rt, P6 value) {
|
440
460
|
return bridging::toJs(rt, value);
|
441
461
|
}
|
462
|
+
|
442
463
|
static jsi::Object extraDataToJs(jsi::Runtime &rt, P7 value) {
|
443
464
|
return bridging::toJs(rt, value);
|
444
465
|
}
|
445
466
|
#endif
|
446
467
|
|
447
468
|
static jsi::Object toJs(
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
469
|
+
jsi::Runtime &rt,
|
470
|
+
const ExceptionsManagerBaseExceptionData<P0, P1, P2, P3, P4, P5, P6, P7> &value,
|
471
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
472
|
+
auto result = facebook::jsi::Object(rt);
|
473
|
+
result.setProperty(rt, "message", bridging::toJs(rt, value.message, jsInvoker));
|
453
474
|
result.setProperty(rt, "originalMessage", bridging::toJs(rt, value.originalMessage, jsInvoker));
|
454
475
|
result.setProperty(rt, "name", bridging::toJs(rt, value.name, jsInvoker));
|
455
476
|
result.setProperty(rt, "componentStack", bridging::toJs(rt, value.componentStack, jsInvoker));
|
@@ -457,11 +478,11 @@ struct ExceptionsManagerBaseExceptionDataBridging {
|
|
457
478
|
result.setProperty(rt, "id", bridging::toJs(rt, value.id, jsInvoker));
|
458
479
|
result.setProperty(rt, "isFatal", bridging::toJs(rt, value.isFatal, jsInvoker));
|
459
480
|
if (value.extraData) {
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
481
|
+
result.setProperty(rt, "extraData", bridging::toJs(rt, value.extraData.value(), jsInvoker));
|
482
|
+
}
|
483
|
+
return result;
|
484
|
+
}
|
485
|
+
};
|
465
486
|
|
466
487
|
class JSI_EXPORT NativeExceptionsManagerCxxSpecJSI : public TurboModule {
|
467
488
|
protected:
|
@@ -483,9 +504,11 @@ public:
|
|
483
504
|
return delegate_.get(rt, propName);
|
484
505
|
}
|
485
506
|
|
507
|
+
static constexpr std::string_view kModuleName = "ExceptionsManager";
|
508
|
+
|
486
509
|
protected:
|
487
510
|
NativeExceptionsManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
488
|
-
: TurboModule(
|
511
|
+
: TurboModule(std::string{NativeExceptionsManagerCxxSpec::kModuleName}, jsInvoker),
|
489
512
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
490
513
|
|
491
514
|
private:
|
@@ -561,9 +584,11 @@ public:
|
|
561
584
|
return delegate_.get(rt, propName);
|
562
585
|
}
|
563
586
|
|
587
|
+
static constexpr std::string_view kModuleName = "Timing";
|
588
|
+
|
564
589
|
protected:
|
565
590
|
NativeTimingCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
566
|
-
: TurboModule(
|
591
|
+
: TurboModule(std::string{NativeTimingCxxSpec::kModuleName}, jsInvoker),
|
567
592
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
568
593
|
|
569
594
|
private:
|
@@ -622,9 +647,11 @@ public:
|
|
622
647
|
return delegate_.get(rt, propName);
|
623
648
|
}
|
624
649
|
|
650
|
+
static constexpr std::string_view kModuleName = "SegmentFetcher";
|
651
|
+
|
625
652
|
protected:
|
626
653
|
NativeSegmentFetcherCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
627
|
-
: TurboModule(
|
654
|
+
: TurboModule(std::string{NativeSegmentFetcherCxxSpec::kModuleName}, jsInvoker),
|
628
655
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
629
656
|
|
630
657
|
private:
|
@@ -677,9 +704,11 @@ public:
|
|
677
704
|
return delegate_.get(rt, propName);
|
678
705
|
}
|
679
706
|
|
707
|
+
static constexpr std::string_view kModuleName = "PermissionsAndroid";
|
708
|
+
|
680
709
|
protected:
|
681
710
|
NativePermissionsAndroidCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
682
|
-
: TurboModule(
|
711
|
+
: TurboModule(std::string{NativePermissionsAndroidCxxSpec::kModuleName}, jsInvoker),
|
683
712
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
684
713
|
|
685
714
|
private:
|
@@ -729,7 +758,8 @@ private:
|
|
729
758
|
};
|
730
759
|
|
731
760
|
|
732
|
-
|
761
|
+
|
762
|
+
#pragma mark - AlertManagerBaseArgs
|
733
763
|
|
734
764
|
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9>
|
735
765
|
struct AlertManagerBaseArgs {
|
@@ -772,73 +802,82 @@ struct AlertManagerBaseArgsBridging {
|
|
772
802
|
static jsi::String titleToJs(jsi::Runtime &rt, P0 value) {
|
773
803
|
return bridging::toJs(rt, value);
|
774
804
|
}
|
805
|
+
|
775
806
|
static jsi::String messageToJs(jsi::Runtime &rt, P1 value) {
|
776
807
|
return bridging::toJs(rt, value);
|
777
808
|
}
|
809
|
+
|
778
810
|
static jsi::Array buttonsToJs(jsi::Runtime &rt, P2 value) {
|
779
811
|
return bridging::toJs(rt, value);
|
780
812
|
}
|
813
|
+
|
781
814
|
static jsi::String typeToJs(jsi::Runtime &rt, P3 value) {
|
782
815
|
return bridging::toJs(rt, value);
|
783
816
|
}
|
817
|
+
|
784
818
|
static jsi::String defaultValueToJs(jsi::Runtime &rt, P4 value) {
|
785
819
|
return bridging::toJs(rt, value);
|
786
820
|
}
|
821
|
+
|
787
822
|
static jsi::String cancelButtonKeyToJs(jsi::Runtime &rt, P5 value) {
|
788
823
|
return bridging::toJs(rt, value);
|
789
824
|
}
|
825
|
+
|
790
826
|
static jsi::String destructiveButtonKeyToJs(jsi::Runtime &rt, P6 value) {
|
791
827
|
return bridging::toJs(rt, value);
|
792
828
|
}
|
829
|
+
|
793
830
|
static jsi::String preferredButtonKeyToJs(jsi::Runtime &rt, P7 value) {
|
794
831
|
return bridging::toJs(rt, value);
|
795
832
|
}
|
833
|
+
|
796
834
|
static jsi::String keyboardTypeToJs(jsi::Runtime &rt, P8 value) {
|
797
835
|
return bridging::toJs(rt, value);
|
798
836
|
}
|
837
|
+
|
799
838
|
static jsi::String userInterfaceStyleToJs(jsi::Runtime &rt, P9 value) {
|
800
839
|
return bridging::toJs(rt, value);
|
801
840
|
}
|
802
841
|
#endif
|
803
842
|
|
804
843
|
static jsi::Object toJs(
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
844
|
+
jsi::Runtime &rt,
|
845
|
+
const AlertManagerBaseArgs<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> &value,
|
846
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
847
|
+
auto result = facebook::jsi::Object(rt);
|
848
|
+
if (value.title) {
|
849
|
+
result.setProperty(rt, "title", bridging::toJs(rt, value.title.value(), jsInvoker));
|
850
|
+
}
|
812
851
|
if (value.message) {
|
813
|
-
|
814
|
-
|
852
|
+
result.setProperty(rt, "message", bridging::toJs(rt, value.message.value(), jsInvoker));
|
853
|
+
}
|
815
854
|
if (value.buttons) {
|
816
|
-
|
817
|
-
|
855
|
+
result.setProperty(rt, "buttons", bridging::toJs(rt, value.buttons.value(), jsInvoker));
|
856
|
+
}
|
818
857
|
if (value.type) {
|
819
|
-
|
820
|
-
|
858
|
+
result.setProperty(rt, "type", bridging::toJs(rt, value.type.value(), jsInvoker));
|
859
|
+
}
|
821
860
|
if (value.defaultValue) {
|
822
|
-
|
823
|
-
|
861
|
+
result.setProperty(rt, "defaultValue", bridging::toJs(rt, value.defaultValue.value(), jsInvoker));
|
862
|
+
}
|
824
863
|
if (value.cancelButtonKey) {
|
825
|
-
|
826
|
-
|
864
|
+
result.setProperty(rt, "cancelButtonKey", bridging::toJs(rt, value.cancelButtonKey.value(), jsInvoker));
|
865
|
+
}
|
827
866
|
if (value.destructiveButtonKey) {
|
828
|
-
|
829
|
-
|
867
|
+
result.setProperty(rt, "destructiveButtonKey", bridging::toJs(rt, value.destructiveButtonKey.value(), jsInvoker));
|
868
|
+
}
|
830
869
|
if (value.preferredButtonKey) {
|
831
|
-
|
832
|
-
|
870
|
+
result.setProperty(rt, "preferredButtonKey", bridging::toJs(rt, value.preferredButtonKey.value(), jsInvoker));
|
871
|
+
}
|
833
872
|
if (value.keyboardType) {
|
834
|
-
|
835
|
-
|
873
|
+
result.setProperty(rt, "keyboardType", bridging::toJs(rt, value.keyboardType.value(), jsInvoker));
|
874
|
+
}
|
836
875
|
if (value.userInterfaceStyle) {
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
876
|
+
result.setProperty(rt, "userInterfaceStyle", bridging::toJs(rt, value.userInterfaceStyle.value(), jsInvoker));
|
877
|
+
}
|
878
|
+
return result;
|
879
|
+
}
|
880
|
+
};
|
842
881
|
|
843
882
|
class JSI_EXPORT NativeAlertManagerCxxSpecJSI : public TurboModule {
|
844
883
|
protected:
|
@@ -856,9 +895,11 @@ public:
|
|
856
895
|
return delegate_.get(rt, propName);
|
857
896
|
}
|
858
897
|
|
898
|
+
static constexpr std::string_view kModuleName = "AlertManager";
|
899
|
+
|
859
900
|
protected:
|
860
901
|
NativeAlertManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
861
|
-
: TurboModule(
|
902
|
+
: TurboModule(std::string{NativeAlertManagerCxxSpec::kModuleName}, jsInvoker),
|
862
903
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
863
904
|
|
864
905
|
private:
|
@@ -903,9 +944,11 @@ public:
|
|
903
944
|
return delegate_.get(rt, propName);
|
904
945
|
}
|
905
946
|
|
947
|
+
static constexpr std::string_view kModuleName = "ActionSheetManager";
|
948
|
+
|
906
949
|
protected:
|
907
950
|
NativeActionSheetManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
908
|
-
: TurboModule(
|
951
|
+
: TurboModule(std::string{NativeActionSheetManagerCxxSpec::kModuleName}, jsInvoker),
|
909
952
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
910
953
|
|
911
954
|
private:
|
@@ -955,7 +998,8 @@ private:
|
|
955
998
|
};
|
956
999
|
|
957
1000
|
|
958
|
-
|
1001
|
+
|
1002
|
+
#pragma mark - DialogManagerAndroidBaseDialogOptions
|
959
1003
|
|
960
1004
|
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
|
961
1005
|
struct DialogManagerAndroidBaseDialogOptions {
|
@@ -992,55 +1036,61 @@ struct DialogManagerAndroidBaseDialogOptionsBridging {
|
|
992
1036
|
static jsi::String titleToJs(jsi::Runtime &rt, P0 value) {
|
993
1037
|
return bridging::toJs(rt, value);
|
994
1038
|
}
|
1039
|
+
|
995
1040
|
static jsi::String messageToJs(jsi::Runtime &rt, P1 value) {
|
996
1041
|
return bridging::toJs(rt, value);
|
997
1042
|
}
|
1043
|
+
|
998
1044
|
static jsi::String buttonPositiveToJs(jsi::Runtime &rt, P2 value) {
|
999
1045
|
return bridging::toJs(rt, value);
|
1000
1046
|
}
|
1047
|
+
|
1001
1048
|
static jsi::String buttonNegativeToJs(jsi::Runtime &rt, P3 value) {
|
1002
1049
|
return bridging::toJs(rt, value);
|
1003
1050
|
}
|
1051
|
+
|
1004
1052
|
static jsi::String buttonNeutralToJs(jsi::Runtime &rt, P4 value) {
|
1005
1053
|
return bridging::toJs(rt, value);
|
1006
1054
|
}
|
1055
|
+
|
1007
1056
|
static jsi::Array itemsToJs(jsi::Runtime &rt, P5 value) {
|
1008
1057
|
return bridging::toJs(rt, value);
|
1009
1058
|
}
|
1059
|
+
|
1010
1060
|
static bool cancelableToJs(jsi::Runtime &rt, P6 value) {
|
1011
1061
|
return bridging::toJs(rt, value);
|
1012
1062
|
}
|
1013
1063
|
#endif
|
1014
1064
|
|
1015
1065
|
static jsi::Object toJs(
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1066
|
+
jsi::Runtime &rt,
|
1067
|
+
const DialogManagerAndroidBaseDialogOptions<P0, P1, P2, P3, P4, P5, P6> &value,
|
1068
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
1069
|
+
auto result = facebook::jsi::Object(rt);
|
1070
|
+
if (value.title) {
|
1071
|
+
result.setProperty(rt, "title", bridging::toJs(rt, value.title.value(), jsInvoker));
|
1072
|
+
}
|
1023
1073
|
if (value.message) {
|
1024
|
-
|
1025
|
-
|
1074
|
+
result.setProperty(rt, "message", bridging::toJs(rt, value.message.value(), jsInvoker));
|
1075
|
+
}
|
1026
1076
|
if (value.buttonPositive) {
|
1027
|
-
|
1028
|
-
|
1077
|
+
result.setProperty(rt, "buttonPositive", bridging::toJs(rt, value.buttonPositive.value(), jsInvoker));
|
1078
|
+
}
|
1029
1079
|
if (value.buttonNegative) {
|
1030
|
-
|
1031
|
-
|
1080
|
+
result.setProperty(rt, "buttonNegative", bridging::toJs(rt, value.buttonNegative.value(), jsInvoker));
|
1081
|
+
}
|
1032
1082
|
if (value.buttonNeutral) {
|
1033
|
-
|
1034
|
-
|
1083
|
+
result.setProperty(rt, "buttonNeutral", bridging::toJs(rt, value.buttonNeutral.value(), jsInvoker));
|
1084
|
+
}
|
1035
1085
|
if (value.items) {
|
1036
|
-
|
1037
|
-
|
1086
|
+
result.setProperty(rt, "items", bridging::toJs(rt, value.items.value(), jsInvoker));
|
1087
|
+
}
|
1038
1088
|
if (value.cancelable) {
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1089
|
+
result.setProperty(rt, "cancelable", bridging::toJs(rt, value.cancelable.value(), jsInvoker));
|
1090
|
+
}
|
1091
|
+
return result;
|
1092
|
+
}
|
1093
|
+
};
|
1044
1094
|
|
1045
1095
|
class JSI_EXPORT NativeDialogManagerAndroidCxxSpecJSI : public TurboModule {
|
1046
1096
|
protected:
|
@@ -1059,9 +1109,11 @@ public:
|
|
1059
1109
|
return delegate_.get(rt, propName);
|
1060
1110
|
}
|
1061
1111
|
|
1112
|
+
static constexpr std::string_view kModuleName = "DialogManagerAndroid";
|
1113
|
+
|
1062
1114
|
protected:
|
1063
1115
|
NativeDialogManagerAndroidCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
1064
|
-
: TurboModule(
|
1116
|
+
: TurboModule(std::string{NativeDialogManagerAndroidCxxSpec::kModuleName}, jsInvoker),
|
1065
1117
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
1066
1118
|
|
1067
1119
|
private:
|
@@ -1095,7 +1147,45 @@ private:
|
|
1095
1147
|
};
|
1096
1148
|
|
1097
1149
|
|
1098
|
-
|
1150
|
+
|
1151
|
+
#pragma mark - SourceCodeBaseSourceCodeConstants
|
1152
|
+
|
1153
|
+
template <typename P0>
|
1154
|
+
struct SourceCodeBaseSourceCodeConstants {
|
1155
|
+
P0 scriptURL;
|
1156
|
+
bool operator==(const SourceCodeBaseSourceCodeConstants &other) const {
|
1157
|
+
return scriptURL == other.scriptURL;
|
1158
|
+
}
|
1159
|
+
};
|
1160
|
+
|
1161
|
+
template <typename P0>
|
1162
|
+
struct SourceCodeBaseSourceCodeConstantsBridging {
|
1163
|
+
static SourceCodeBaseSourceCodeConstants<P0> fromJs(
|
1164
|
+
jsi::Runtime &rt,
|
1165
|
+
const jsi::Object &value,
|
1166
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
1167
|
+
SourceCodeBaseSourceCodeConstants<P0> result{
|
1168
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "scriptURL"), jsInvoker)};
|
1169
|
+
return result;
|
1170
|
+
}
|
1171
|
+
|
1172
|
+
#ifdef DEBUG
|
1173
|
+
static jsi::String scriptURLToJs(jsi::Runtime &rt, P0 value) {
|
1174
|
+
return bridging::toJs(rt, value);
|
1175
|
+
}
|
1176
|
+
#endif
|
1177
|
+
|
1178
|
+
static jsi::Object toJs(
|
1179
|
+
jsi::Runtime &rt,
|
1180
|
+
const SourceCodeBaseSourceCodeConstants<P0> &value,
|
1181
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
1182
|
+
auto result = facebook::jsi::Object(rt);
|
1183
|
+
result.setProperty(rt, "scriptURL", bridging::toJs(rt, value.scriptURL, jsInvoker));
|
1184
|
+
return result;
|
1185
|
+
}
|
1186
|
+
};
|
1187
|
+
|
1188
|
+
class JSI_EXPORT NativeSourceCodeCxxSpecJSI : public TurboModule {
|
1099
1189
|
protected:
|
1100
1190
|
NativeSourceCodeCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
1101
1191
|
|
@@ -1111,9 +1201,11 @@ public:
|
|
1111
1201
|
return delegate_.get(rt, propName);
|
1112
1202
|
}
|
1113
1203
|
|
1204
|
+
static constexpr std::string_view kModuleName = "SourceCode";
|
1205
|
+
|
1114
1206
|
protected:
|
1115
1207
|
NativeSourceCodeCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
1116
|
-
: TurboModule(
|
1208
|
+
: TurboModule(std::string{NativeSourceCodeCxxSpec::kModuleName}, jsInvoker),
|
1117
1209
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
1118
1210
|
|
1119
1211
|
private:
|
@@ -1159,9 +1251,11 @@ public:
|
|
1159
1251
|
return delegate_.get(rt, propName);
|
1160
1252
|
}
|
1161
1253
|
|
1254
|
+
static constexpr std::string_view kModuleName = "DevMenu";
|
1255
|
+
|
1162
1256
|
protected:
|
1163
1257
|
NativeDevMenuCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
1164
|
-
: TurboModule(
|
1258
|
+
: TurboModule(std::string{NativeDevMenuCxxSpec::kModuleName}, jsInvoker),
|
1165
1259
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
1166
1260
|
|
1167
1261
|
private:
|
@@ -1236,9 +1330,11 @@ public:
|
|
1236
1330
|
return delegate_.get(rt, propName);
|
1237
1331
|
}
|
1238
1332
|
|
1333
|
+
static constexpr std::string_view kModuleName = "RedBox";
|
1334
|
+
|
1239
1335
|
protected:
|
1240
1336
|
NativeRedBoxCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
1241
|
-
: TurboModule(
|
1337
|
+
: TurboModule(std::string{NativeRedBoxCxxSpec::kModuleName}, jsInvoker),
|
1242
1338
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
1243
1339
|
|
1244
1340
|
private:
|
@@ -1289,9 +1385,11 @@ public:
|
|
1289
1385
|
return delegate_.get(rt, propName);
|
1290
1386
|
}
|
1291
1387
|
|
1388
|
+
static constexpr std::string_view kModuleName = "AnimationsDebugModule";
|
1389
|
+
|
1292
1390
|
protected:
|
1293
1391
|
NativeAnimationsDebugModuleCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
1294
|
-
: TurboModule(
|
1392
|
+
: TurboModule(std::string{NativeAnimationsDebugModuleCxxSpec::kModuleName}, jsInvoker),
|
1295
1393
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
1296
1394
|
|
1297
1395
|
private:
|
@@ -1342,9 +1440,11 @@ public:
|
|
1342
1440
|
return delegate_.get(rt, propName);
|
1343
1441
|
}
|
1344
1442
|
|
1443
|
+
static constexpr std::string_view kModuleName = "LogBox";
|
1444
|
+
|
1345
1445
|
protected:
|
1346
1446
|
NativeLogBoxCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
1347
|
-
: TurboModule(
|
1447
|
+
: TurboModule(std::string{NativeLogBoxCxxSpec::kModuleName}, jsInvoker),
|
1348
1448
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
1349
1449
|
|
1350
1450
|
private:
|
@@ -1394,9 +1494,11 @@ public:
|
|
1394
1494
|
return delegate_.get(rt, propName);
|
1395
1495
|
}
|
1396
1496
|
|
1497
|
+
static constexpr std::string_view kModuleName = "DeviceEventManager";
|
1498
|
+
|
1397
1499
|
protected:
|
1398
1500
|
NativeDeviceEventManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
1399
|
-
: TurboModule(
|
1501
|
+
: TurboModule(std::string{NativeDeviceEventManagerCxxSpec::kModuleName}, jsInvoker),
|
1400
1502
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
1401
1503
|
|
1402
1504
|
private:
|
@@ -1448,9 +1550,11 @@ public:
|
|
1448
1550
|
return delegate_.get(rt, propName);
|
1449
1551
|
}
|
1450
1552
|
|
1553
|
+
static constexpr std::string_view kModuleName = "DevSettings";
|
1554
|
+
|
1451
1555
|
protected:
|
1452
1556
|
NativeDevSettingsCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
1453
|
-
: TurboModule(
|
1557
|
+
: TurboModule(std::string{NativeDevSettingsCxxSpec::kModuleName}, jsInvoker),
|
1454
1558
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
1455
1559
|
|
1456
1560
|
private:
|
@@ -1576,9 +1680,11 @@ public:
|
|
1576
1680
|
return delegate_.get(rt, propName);
|
1577
1681
|
}
|
1578
1682
|
|
1683
|
+
static constexpr std::string_view kModuleName = "Networking";
|
1684
|
+
|
1579
1685
|
protected:
|
1580
1686
|
NativeNetworkingAndroidCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
1581
|
-
: TurboModule(
|
1687
|
+
: TurboModule(std::string{NativeNetworkingAndroidCxxSpec::kModuleName}, jsInvoker),
|
1582
1688
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
1583
1689
|
|
1584
1690
|
private:
|
@@ -1656,9 +1762,11 @@ public:
|
|
1656
1762
|
return delegate_.get(rt, propName);
|
1657
1763
|
}
|
1658
1764
|
|
1765
|
+
static constexpr std::string_view kModuleName = "Networking";
|
1766
|
+
|
1659
1767
|
protected:
|
1660
1768
|
NativeNetworkingIOSCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
1661
|
-
: TurboModule(
|
1769
|
+
: TurboModule(std::string{NativeNetworkingIOSCxxSpec::kModuleName}, jsInvoker),
|
1662
1770
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
1663
1771
|
|
1664
1772
|
private:
|
@@ -1737,9 +1845,11 @@ public:
|
|
1737
1845
|
return delegate_.get(rt, propName);
|
1738
1846
|
}
|
1739
1847
|
|
1848
|
+
static constexpr std::string_view kModuleName = "ImageLoader";
|
1849
|
+
|
1740
1850
|
protected:
|
1741
1851
|
NativeImageLoaderIOSCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
1742
|
-
: TurboModule(
|
1852
|
+
: TurboModule(std::string{NativeImageLoaderIOSCxxSpec::kModuleName}, jsInvoker),
|
1743
1853
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
1744
1854
|
|
1745
1855
|
private:
|
@@ -1805,7 +1915,8 @@ private:
|
|
1805
1915
|
};
|
1806
1916
|
|
1807
1917
|
|
1808
|
-
|
1918
|
+
|
1919
|
+
#pragma mark - ImageEditingManagerBaseOptions
|
1809
1920
|
|
1810
1921
|
template <typename P0, typename P1, typename P2, typename P3, typename P4>
|
1811
1922
|
struct ImageEditingManagerBaseOptions {
|
@@ -1838,39 +1949,43 @@ struct ImageEditingManagerBaseOptionsBridging {
|
|
1838
1949
|
static jsi::Object offsetToJs(jsi::Runtime &rt, P0 value) {
|
1839
1950
|
return bridging::toJs(rt, value);
|
1840
1951
|
}
|
1952
|
+
|
1841
1953
|
static jsi::Object sizeToJs(jsi::Runtime &rt, P1 value) {
|
1842
1954
|
return bridging::toJs(rt, value);
|
1843
1955
|
}
|
1956
|
+
|
1844
1957
|
static std::optional<jsi::Object> displaySizeToJs(jsi::Runtime &rt, P2 value) {
|
1845
1958
|
return bridging::toJs(rt, value);
|
1846
1959
|
}
|
1960
|
+
|
1847
1961
|
static std::optional<jsi::String> resizeModeToJs(jsi::Runtime &rt, P3 value) {
|
1848
1962
|
return bridging::toJs(rt, value);
|
1849
1963
|
}
|
1964
|
+
|
1850
1965
|
static bool allowExternalStorageToJs(jsi::Runtime &rt, P4 value) {
|
1851
1966
|
return bridging::toJs(rt, value);
|
1852
1967
|
}
|
1853
1968
|
#endif
|
1854
1969
|
|
1855
1970
|
static jsi::Object toJs(
|
1856
|
-
|
1857
|
-
|
1858
|
-
|
1859
|
-
|
1860
|
-
|
1971
|
+
jsi::Runtime &rt,
|
1972
|
+
const ImageEditingManagerBaseOptions<P0, P1, P2, P3, P4> &value,
|
1973
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
1974
|
+
auto result = facebook::jsi::Object(rt);
|
1975
|
+
result.setProperty(rt, "offset", bridging::toJs(rt, value.offset, jsInvoker));
|
1861
1976
|
result.setProperty(rt, "size", bridging::toJs(rt, value.size, jsInvoker));
|
1862
1977
|
if (value.displaySize) {
|
1863
|
-
|
1864
|
-
|
1978
|
+
result.setProperty(rt, "displaySize", bridging::toJs(rt, value.displaySize.value(), jsInvoker));
|
1979
|
+
}
|
1865
1980
|
if (value.resizeMode) {
|
1866
|
-
|
1867
|
-
|
1981
|
+
result.setProperty(rt, "resizeMode", bridging::toJs(rt, value.resizeMode.value(), jsInvoker));
|
1982
|
+
}
|
1868
1983
|
if (value.allowExternalStorage) {
|
1869
|
-
|
1870
|
-
|
1871
|
-
|
1872
|
-
|
1873
|
-
|
1984
|
+
result.setProperty(rt, "allowExternalStorage", bridging::toJs(rt, value.allowExternalStorage.value(), jsInvoker));
|
1985
|
+
}
|
1986
|
+
return result;
|
1987
|
+
}
|
1988
|
+
};
|
1874
1989
|
|
1875
1990
|
class JSI_EXPORT NativeImageEditorCxxSpecJSI : public TurboModule {
|
1876
1991
|
protected:
|
@@ -1889,9 +2004,11 @@ public:
|
|
1889
2004
|
return delegate_.get(rt, propName);
|
1890
2005
|
}
|
1891
2006
|
|
2007
|
+
static constexpr std::string_view kModuleName = "ImageEditingManager";
|
2008
|
+
|
1892
2009
|
protected:
|
1893
2010
|
NativeImageEditorCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
1894
|
-
: TurboModule(
|
2011
|
+
: TurboModule(std::string{NativeImageEditorCxxSpec::kModuleName}, jsInvoker),
|
1895
2012
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
1896
2013
|
|
1897
2014
|
private:
|
@@ -1945,9 +2062,11 @@ public:
|
|
1945
2062
|
return delegate_.get(rt, propName);
|
1946
2063
|
}
|
1947
2064
|
|
2065
|
+
static constexpr std::string_view kModuleName = "ImageStoreManager";
|
2066
|
+
|
1948
2067
|
protected:
|
1949
2068
|
NativeImageStoreIOSCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
1950
|
-
: TurboModule(
|
2069
|
+
: TurboModule(std::string{NativeImageStoreIOSCxxSpec::kModuleName}, jsInvoker),
|
1951
2070
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
1952
2071
|
|
1953
2072
|
private:
|
@@ -2026,9 +2145,11 @@ public:
|
|
2026
2145
|
return delegate_.get(rt, propName);
|
2027
2146
|
}
|
2028
2147
|
|
2148
|
+
static constexpr std::string_view kModuleName = "ImageLoader";
|
2149
|
+
|
2029
2150
|
protected:
|
2030
2151
|
NativeImageLoaderAndroidCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
2031
|
-
: TurboModule(
|
2152
|
+
: TurboModule(std::string{NativeImageLoaderAndroidCxxSpec::kModuleName}, jsInvoker),
|
2032
2153
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
2033
2154
|
|
2034
2155
|
private:
|
@@ -2111,9 +2232,11 @@ public:
|
|
2111
2232
|
return delegate_.get(rt, propName);
|
2112
2233
|
}
|
2113
2234
|
|
2235
|
+
static constexpr std::string_view kModuleName = "ImageStoreManager";
|
2236
|
+
|
2114
2237
|
protected:
|
2115
2238
|
NativeImageStoreAndroidCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
2116
|
-
: TurboModule(
|
2239
|
+
: TurboModule(std::string{NativeImageStoreAndroidCxxSpec::kModuleName}, jsInvoker),
|
2117
2240
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
2118
2241
|
|
2119
2242
|
private:
|
@@ -2147,7 +2270,8 @@ private:
|
|
2147
2270
|
};
|
2148
2271
|
|
2149
2272
|
|
2150
|
-
|
2273
|
+
|
2274
|
+
#pragma mark - DeviceInfoBaseDisplayMetrics
|
2151
2275
|
|
2152
2276
|
template <typename P0, typename P1, typename P2, typename P3>
|
2153
2277
|
struct DeviceInfoBaseDisplayMetrics {
|
@@ -2178,29 +2302,33 @@ struct DeviceInfoBaseDisplayMetricsBridging {
|
|
2178
2302
|
static double widthToJs(jsi::Runtime &rt, P0 value) {
|
2179
2303
|
return bridging::toJs(rt, value);
|
2180
2304
|
}
|
2305
|
+
|
2181
2306
|
static double heightToJs(jsi::Runtime &rt, P1 value) {
|
2182
2307
|
return bridging::toJs(rt, value);
|
2183
2308
|
}
|
2309
|
+
|
2184
2310
|
static double scaleToJs(jsi::Runtime &rt, P2 value) {
|
2185
2311
|
return bridging::toJs(rt, value);
|
2186
2312
|
}
|
2313
|
+
|
2187
2314
|
static double fontScaleToJs(jsi::Runtime &rt, P3 value) {
|
2188
2315
|
return bridging::toJs(rt, value);
|
2189
2316
|
}
|
2190
2317
|
#endif
|
2191
2318
|
|
2192
2319
|
static jsi::Object toJs(
|
2193
|
-
|
2194
|
-
|
2195
|
-
|
2196
|
-
|
2197
|
-
|
2320
|
+
jsi::Runtime &rt,
|
2321
|
+
const DeviceInfoBaseDisplayMetrics<P0, P1, P2, P3> &value,
|
2322
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
2323
|
+
auto result = facebook::jsi::Object(rt);
|
2324
|
+
result.setProperty(rt, "width", bridging::toJs(rt, value.width, jsInvoker));
|
2198
2325
|
result.setProperty(rt, "height", bridging::toJs(rt, value.height, jsInvoker));
|
2199
2326
|
result.setProperty(rt, "scale", bridging::toJs(rt, value.scale, jsInvoker));
|
2200
2327
|
result.setProperty(rt, "fontScale", bridging::toJs(rt, value.fontScale, jsInvoker));
|
2201
|
-
|
2202
|
-
|
2203
|
-
|
2328
|
+
return result;
|
2329
|
+
}
|
2330
|
+
};
|
2331
|
+
|
2204
2332
|
|
2205
2333
|
|
2206
2334
|
#pragma mark - DeviceInfoBaseDisplayMetricsAndroid
|
@@ -2236,33 +2364,38 @@ struct DeviceInfoBaseDisplayMetricsAndroidBridging {
|
|
2236
2364
|
static double widthToJs(jsi::Runtime &rt, P0 value) {
|
2237
2365
|
return bridging::toJs(rt, value);
|
2238
2366
|
}
|
2367
|
+
|
2239
2368
|
static double heightToJs(jsi::Runtime &rt, P1 value) {
|
2240
2369
|
return bridging::toJs(rt, value);
|
2241
2370
|
}
|
2371
|
+
|
2242
2372
|
static double scaleToJs(jsi::Runtime &rt, P2 value) {
|
2243
2373
|
return bridging::toJs(rt, value);
|
2244
2374
|
}
|
2375
|
+
|
2245
2376
|
static double fontScaleToJs(jsi::Runtime &rt, P3 value) {
|
2246
2377
|
return bridging::toJs(rt, value);
|
2247
2378
|
}
|
2379
|
+
|
2248
2380
|
static double densityDpiToJs(jsi::Runtime &rt, P4 value) {
|
2249
2381
|
return bridging::toJs(rt, value);
|
2250
2382
|
}
|
2251
2383
|
#endif
|
2252
2384
|
|
2253
2385
|
static jsi::Object toJs(
|
2254
|
-
|
2255
|
-
|
2256
|
-
|
2257
|
-
|
2258
|
-
|
2386
|
+
jsi::Runtime &rt,
|
2387
|
+
const DeviceInfoBaseDisplayMetricsAndroid<P0, P1, P2, P3, P4> &value,
|
2388
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
2389
|
+
auto result = facebook::jsi::Object(rt);
|
2390
|
+
result.setProperty(rt, "width", bridging::toJs(rt, value.width, jsInvoker));
|
2259
2391
|
result.setProperty(rt, "height", bridging::toJs(rt, value.height, jsInvoker));
|
2260
2392
|
result.setProperty(rt, "scale", bridging::toJs(rt, value.scale, jsInvoker));
|
2261
2393
|
result.setProperty(rt, "fontScale", bridging::toJs(rt, value.fontScale, jsInvoker));
|
2262
2394
|
result.setProperty(rt, "densityDpi", bridging::toJs(rt, value.densityDpi, jsInvoker));
|
2263
|
-
|
2264
|
-
|
2265
|
-
|
2395
|
+
return result;
|
2396
|
+
}
|
2397
|
+
};
|
2398
|
+
|
2266
2399
|
|
2267
2400
|
|
2268
2401
|
#pragma mark - DeviceInfoBaseDimensionsPayload
|
@@ -2296,37 +2429,88 @@ struct DeviceInfoBaseDimensionsPayloadBridging {
|
|
2296
2429
|
static jsi::Object windowToJs(jsi::Runtime &rt, P0 value) {
|
2297
2430
|
return bridging::toJs(rt, value);
|
2298
2431
|
}
|
2432
|
+
|
2299
2433
|
static jsi::Object screenToJs(jsi::Runtime &rt, P1 value) {
|
2300
2434
|
return bridging::toJs(rt, value);
|
2301
2435
|
}
|
2436
|
+
|
2302
2437
|
static jsi::Object windowPhysicalPixelsToJs(jsi::Runtime &rt, P2 value) {
|
2303
2438
|
return bridging::toJs(rt, value);
|
2304
2439
|
}
|
2440
|
+
|
2305
2441
|
static jsi::Object screenPhysicalPixelsToJs(jsi::Runtime &rt, P3 value) {
|
2306
2442
|
return bridging::toJs(rt, value);
|
2307
2443
|
}
|
2308
2444
|
#endif
|
2309
2445
|
|
2310
2446
|
static jsi::Object toJs(
|
2311
|
-
|
2312
|
-
|
2313
|
-
|
2314
|
-
|
2315
|
-
|
2316
|
-
|
2317
|
-
|
2447
|
+
jsi::Runtime &rt,
|
2448
|
+
const DeviceInfoBaseDimensionsPayload<P0, P1, P2, P3> &value,
|
2449
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
2450
|
+
auto result = facebook::jsi::Object(rt);
|
2451
|
+
if (value.window) {
|
2452
|
+
result.setProperty(rt, "window", bridging::toJs(rt, value.window.value(), jsInvoker));
|
2453
|
+
}
|
2318
2454
|
if (value.screen) {
|
2319
|
-
|
2320
|
-
|
2455
|
+
result.setProperty(rt, "screen", bridging::toJs(rt, value.screen.value(), jsInvoker));
|
2456
|
+
}
|
2321
2457
|
if (value.windowPhysicalPixels) {
|
2322
|
-
|
2323
|
-
|
2458
|
+
result.setProperty(rt, "windowPhysicalPixels", bridging::toJs(rt, value.windowPhysicalPixels.value(), jsInvoker));
|
2459
|
+
}
|
2324
2460
|
if (value.screenPhysicalPixels) {
|
2325
|
-
|
2326
|
-
|
2327
|
-
|
2328
|
-
|
2329
|
-
|
2461
|
+
result.setProperty(rt, "screenPhysicalPixels", bridging::toJs(rt, value.screenPhysicalPixels.value(), jsInvoker));
|
2462
|
+
}
|
2463
|
+
return result;
|
2464
|
+
}
|
2465
|
+
};
|
2466
|
+
|
2467
|
+
|
2468
|
+
|
2469
|
+
#pragma mark - DeviceInfoBaseDeviceInfoConstants
|
2470
|
+
|
2471
|
+
template <typename P0, typename P1>
|
2472
|
+
struct DeviceInfoBaseDeviceInfoConstants {
|
2473
|
+
P0 Dimensions;
|
2474
|
+
P1 isIPhoneX_deprecated;
|
2475
|
+
bool operator==(const DeviceInfoBaseDeviceInfoConstants &other) const {
|
2476
|
+
return Dimensions == other.Dimensions && isIPhoneX_deprecated == other.isIPhoneX_deprecated;
|
2477
|
+
}
|
2478
|
+
};
|
2479
|
+
|
2480
|
+
template <typename P0, typename P1>
|
2481
|
+
struct DeviceInfoBaseDeviceInfoConstantsBridging {
|
2482
|
+
static DeviceInfoBaseDeviceInfoConstants<P0, P1> fromJs(
|
2483
|
+
jsi::Runtime &rt,
|
2484
|
+
const jsi::Object &value,
|
2485
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
2486
|
+
DeviceInfoBaseDeviceInfoConstants<P0, P1> result{
|
2487
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "Dimensions"), jsInvoker),
|
2488
|
+
bridging::fromJs<P1>(rt, value.getProperty(rt, "isIPhoneX_deprecated"), jsInvoker)};
|
2489
|
+
return result;
|
2490
|
+
}
|
2491
|
+
|
2492
|
+
#ifdef DEBUG
|
2493
|
+
static jsi::Object DimensionsToJs(jsi::Runtime &rt, P0 value) {
|
2494
|
+
return bridging::toJs(rt, value);
|
2495
|
+
}
|
2496
|
+
|
2497
|
+
static bool isIPhoneX_deprecatedToJs(jsi::Runtime &rt, P1 value) {
|
2498
|
+
return bridging::toJs(rt, value);
|
2499
|
+
}
|
2500
|
+
#endif
|
2501
|
+
|
2502
|
+
static jsi::Object toJs(
|
2503
|
+
jsi::Runtime &rt,
|
2504
|
+
const DeviceInfoBaseDeviceInfoConstants<P0, P1> &value,
|
2505
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
2506
|
+
auto result = facebook::jsi::Object(rt);
|
2507
|
+
result.setProperty(rt, "Dimensions", bridging::toJs(rt, value.Dimensions, jsInvoker));
|
2508
|
+
if (value.isIPhoneX_deprecated) {
|
2509
|
+
result.setProperty(rt, "isIPhoneX_deprecated", bridging::toJs(rt, value.isIPhoneX_deprecated.value(), jsInvoker));
|
2510
|
+
}
|
2511
|
+
return result;
|
2512
|
+
}
|
2513
|
+
};
|
2330
2514
|
|
2331
2515
|
class JSI_EXPORT NativeDeviceInfoCxxSpecJSI : public TurboModule {
|
2332
2516
|
protected:
|
@@ -2344,9 +2528,11 @@ public:
|
|
2344
2528
|
return delegate_.get(rt, propName);
|
2345
2529
|
}
|
2346
2530
|
|
2531
|
+
static constexpr std::string_view kModuleName = "DeviceInfo";
|
2532
|
+
|
2347
2533
|
protected:
|
2348
2534
|
NativeDeviceInfoCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
2349
|
-
: TurboModule(
|
2535
|
+
: TurboModule(std::string{NativeDeviceInfoCxxSpec::kModuleName}, jsInvoker),
|
2350
2536
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
2351
2537
|
|
2352
2538
|
private:
|
@@ -2372,7 +2558,89 @@ private:
|
|
2372
2558
|
};
|
2373
2559
|
|
2374
2560
|
|
2375
|
-
|
2561
|
+
|
2562
|
+
#pragma mark - PlatformConstantsBasePlatformConstantsIOS
|
2563
|
+
|
2564
|
+
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
|
2565
|
+
struct PlatformConstantsBasePlatformConstantsIOS {
|
2566
|
+
P0 isTesting;
|
2567
|
+
P1 isDisableAnimations;
|
2568
|
+
P2 reactNativeVersion;
|
2569
|
+
P3 forceTouchAvailable;
|
2570
|
+
P4 osVersion;
|
2571
|
+
P5 systemName;
|
2572
|
+
P6 interfaceIdiom;
|
2573
|
+
bool operator==(const PlatformConstantsBasePlatformConstantsIOS &other) const {
|
2574
|
+
return isTesting == other.isTesting && isDisableAnimations == other.isDisableAnimations && reactNativeVersion == other.reactNativeVersion && forceTouchAvailable == other.forceTouchAvailable && osVersion == other.osVersion && systemName == other.systemName && interfaceIdiom == other.interfaceIdiom;
|
2575
|
+
}
|
2576
|
+
};
|
2577
|
+
|
2578
|
+
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
|
2579
|
+
struct PlatformConstantsBasePlatformConstantsIOSBridging {
|
2580
|
+
static PlatformConstantsBasePlatformConstantsIOS<P0, P1, P2, P3, P4, P5, P6> fromJs(
|
2581
|
+
jsi::Runtime &rt,
|
2582
|
+
const jsi::Object &value,
|
2583
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
2584
|
+
PlatformConstantsBasePlatformConstantsIOS<P0, P1, P2, P3, P4, P5, P6> result{
|
2585
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "isTesting"), jsInvoker),
|
2586
|
+
bridging::fromJs<P1>(rt, value.getProperty(rt, "isDisableAnimations"), jsInvoker),
|
2587
|
+
bridging::fromJs<P2>(rt, value.getProperty(rt, "reactNativeVersion"), jsInvoker),
|
2588
|
+
bridging::fromJs<P3>(rt, value.getProperty(rt, "forceTouchAvailable"), jsInvoker),
|
2589
|
+
bridging::fromJs<P4>(rt, value.getProperty(rt, "osVersion"), jsInvoker),
|
2590
|
+
bridging::fromJs<P5>(rt, value.getProperty(rt, "systemName"), jsInvoker),
|
2591
|
+
bridging::fromJs<P6>(rt, value.getProperty(rt, "interfaceIdiom"), jsInvoker)};
|
2592
|
+
return result;
|
2593
|
+
}
|
2594
|
+
|
2595
|
+
#ifdef DEBUG
|
2596
|
+
static bool isTestingToJs(jsi::Runtime &rt, P0 value) {
|
2597
|
+
return bridging::toJs(rt, value);
|
2598
|
+
}
|
2599
|
+
|
2600
|
+
static bool isDisableAnimationsToJs(jsi::Runtime &rt, P1 value) {
|
2601
|
+
return bridging::toJs(rt, value);
|
2602
|
+
}
|
2603
|
+
|
2604
|
+
static jsi::Object reactNativeVersionToJs(jsi::Runtime &rt, P2 value) {
|
2605
|
+
return bridging::toJs(rt, value);
|
2606
|
+
}
|
2607
|
+
|
2608
|
+
static bool forceTouchAvailableToJs(jsi::Runtime &rt, P3 value) {
|
2609
|
+
return bridging::toJs(rt, value);
|
2610
|
+
}
|
2611
|
+
|
2612
|
+
static jsi::String osVersionToJs(jsi::Runtime &rt, P4 value) {
|
2613
|
+
return bridging::toJs(rt, value);
|
2614
|
+
}
|
2615
|
+
|
2616
|
+
static jsi::String systemNameToJs(jsi::Runtime &rt, P5 value) {
|
2617
|
+
return bridging::toJs(rt, value);
|
2618
|
+
}
|
2619
|
+
|
2620
|
+
static jsi::String interfaceIdiomToJs(jsi::Runtime &rt, P6 value) {
|
2621
|
+
return bridging::toJs(rt, value);
|
2622
|
+
}
|
2623
|
+
#endif
|
2624
|
+
|
2625
|
+
static jsi::Object toJs(
|
2626
|
+
jsi::Runtime &rt,
|
2627
|
+
const PlatformConstantsBasePlatformConstantsIOS<P0, P1, P2, P3, P4, P5, P6> &value,
|
2628
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
2629
|
+
auto result = facebook::jsi::Object(rt);
|
2630
|
+
result.setProperty(rt, "isTesting", bridging::toJs(rt, value.isTesting, jsInvoker));
|
2631
|
+
if (value.isDisableAnimations) {
|
2632
|
+
result.setProperty(rt, "isDisableAnimations", bridging::toJs(rt, value.isDisableAnimations.value(), jsInvoker));
|
2633
|
+
}
|
2634
|
+
result.setProperty(rt, "reactNativeVersion", bridging::toJs(rt, value.reactNativeVersion, jsInvoker));
|
2635
|
+
result.setProperty(rt, "forceTouchAvailable", bridging::toJs(rt, value.forceTouchAvailable, jsInvoker));
|
2636
|
+
result.setProperty(rt, "osVersion", bridging::toJs(rt, value.osVersion, jsInvoker));
|
2637
|
+
result.setProperty(rt, "systemName", bridging::toJs(rt, value.systemName, jsInvoker));
|
2638
|
+
result.setProperty(rt, "interfaceIdiom", bridging::toJs(rt, value.interfaceIdiom, jsInvoker));
|
2639
|
+
return result;
|
2640
|
+
}
|
2641
|
+
};
|
2642
|
+
|
2643
|
+
class JSI_EXPORT NativePlatformConstantsIOSCxxSpecJSI : public TurboModule {
|
2376
2644
|
protected:
|
2377
2645
|
NativePlatformConstantsIOSCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
2378
2646
|
|
@@ -2388,9 +2656,11 @@ public:
|
|
2388
2656
|
return delegate_.get(rt, propName);
|
2389
2657
|
}
|
2390
2658
|
|
2659
|
+
static constexpr std::string_view kModuleName = "PlatformConstants";
|
2660
|
+
|
2391
2661
|
protected:
|
2392
2662
|
NativePlatformConstantsIOSCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
2393
|
-
: TurboModule(
|
2663
|
+
: TurboModule(std::string{NativePlatformConstantsIOSCxxSpec::kModuleName}, jsInvoker),
|
2394
2664
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
2395
2665
|
|
2396
2666
|
private:
|
@@ -2433,9 +2703,11 @@ public:
|
|
2433
2703
|
return delegate_.get(rt, propName);
|
2434
2704
|
}
|
2435
2705
|
|
2706
|
+
static constexpr std::string_view kModuleName = "DevLoadingView";
|
2707
|
+
|
2436
2708
|
protected:
|
2437
2709
|
NativeDevLoadingViewCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
2438
|
-
: TurboModule(
|
2710
|
+
: TurboModule(std::string{NativeDevLoadingViewCxxSpec::kModuleName}, jsInvoker),
|
2439
2711
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
2440
2712
|
|
2441
2713
|
private:
|
@@ -2488,9 +2760,11 @@ public:
|
|
2488
2760
|
return delegate_.get(rt, propName);
|
2489
2761
|
}
|
2490
2762
|
|
2763
|
+
static constexpr std::string_view kModuleName = "Appearance";
|
2764
|
+
|
2491
2765
|
protected:
|
2492
2766
|
NativeAppearanceCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
2493
|
-
: TurboModule(
|
2767
|
+
: TurboModule(std::string{NativeAppearanceCxxSpec::kModuleName}, jsInvoker),
|
2494
2768
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
2495
2769
|
|
2496
2770
|
private:
|
@@ -2540,93 +2814,230 @@ private:
|
|
2540
2814
|
};
|
2541
2815
|
|
2542
2816
|
|
2543
|
-
|
2544
|
-
|
2545
|
-
NativePlatformConstantsAndroidCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
2546
|
-
|
2547
|
-
public:
|
2548
|
-
virtual jsi::Object getConstants(jsi::Runtime &rt) = 0;
|
2549
|
-
virtual jsi::String getAndroidID(jsi::Runtime &rt) = 0;
|
2817
|
+
|
2818
|
+
#pragma mark - PlatformConstantsBaseReactNativeVersionAndroid
|
2550
2819
|
|
2820
|
+
template <typename P0, typename P1, typename P2, typename P3>
|
2821
|
+
struct PlatformConstantsBaseReactNativeVersionAndroid {
|
2822
|
+
P0 major;
|
2823
|
+
P1 minor;
|
2824
|
+
P2 patch;
|
2825
|
+
P3 prerelease;
|
2826
|
+
bool operator==(const PlatformConstantsBaseReactNativeVersionAndroid &other) const {
|
2827
|
+
return major == other.major && minor == other.minor && patch == other.patch && prerelease == other.prerelease;
|
2828
|
+
}
|
2551
2829
|
};
|
2552
2830
|
|
2553
|
-
template <typename
|
2554
|
-
|
2555
|
-
|
2556
|
-
|
2557
|
-
|
2831
|
+
template <typename P0, typename P1, typename P2, typename P3>
|
2832
|
+
struct PlatformConstantsBaseReactNativeVersionAndroidBridging {
|
2833
|
+
static PlatformConstantsBaseReactNativeVersionAndroid<P0, P1, P2, P3> fromJs(
|
2834
|
+
jsi::Runtime &rt,
|
2835
|
+
const jsi::Object &value,
|
2836
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
2837
|
+
PlatformConstantsBaseReactNativeVersionAndroid<P0, P1, P2, P3> result{
|
2838
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "major"), jsInvoker),
|
2839
|
+
bridging::fromJs<P1>(rt, value.getProperty(rt, "minor"), jsInvoker),
|
2840
|
+
bridging::fromJs<P2>(rt, value.getProperty(rt, "patch"), jsInvoker),
|
2841
|
+
bridging::fromJs<P3>(rt, value.getProperty(rt, "prerelease"), jsInvoker)};
|
2842
|
+
return result;
|
2558
2843
|
}
|
2559
2844
|
|
2560
|
-
|
2561
|
-
|
2562
|
-
|
2563
|
-
|
2564
|
-
|
2565
|
-
private:
|
2566
|
-
class Delegate : public NativePlatformConstantsAndroidCxxSpecJSI {
|
2567
|
-
public:
|
2568
|
-
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
2569
|
-
NativePlatformConstantsAndroidCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {}
|
2845
|
+
#ifdef DEBUG
|
2846
|
+
static double majorToJs(jsi::Runtime &rt, P0 value) {
|
2847
|
+
return bridging::toJs(rt, value);
|
2848
|
+
}
|
2570
2849
|
|
2571
|
-
|
2572
|
-
|
2573
|
-
|
2574
|
-
"Expected getConstants(...) to have 1 parameters");
|
2850
|
+
static double minorToJs(jsi::Runtime &rt, P1 value) {
|
2851
|
+
return bridging::toJs(rt, value);
|
2852
|
+
}
|
2575
2853
|
|
2576
|
-
|
2577
|
-
|
2578
|
-
|
2579
|
-
jsi::String getAndroidID(jsi::Runtime &rt) override {
|
2580
|
-
static_assert(
|
2581
|
-
bridging::getParameterCount(&T::getAndroidID) == 1,
|
2582
|
-
"Expected getAndroidID(...) to have 1 parameters");
|
2854
|
+
static double patchToJs(jsi::Runtime &rt, P2 value) {
|
2855
|
+
return bridging::toJs(rt, value);
|
2856
|
+
}
|
2583
2857
|
|
2584
|
-
|
2585
|
-
|
2586
|
-
|
2858
|
+
static std::optional<double> prereleaseToJs(jsi::Runtime &rt, P3 value) {
|
2859
|
+
return bridging::toJs(rt, value);
|
2860
|
+
}
|
2861
|
+
#endif
|
2587
2862
|
|
2588
|
-
|
2589
|
-
|
2590
|
-
|
2863
|
+
static jsi::Object toJs(
|
2864
|
+
jsi::Runtime &rt,
|
2865
|
+
const PlatformConstantsBaseReactNativeVersionAndroid<P0, P1, P2, P3> &value,
|
2866
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
2867
|
+
auto result = facebook::jsi::Object(rt);
|
2868
|
+
result.setProperty(rt, "major", bridging::toJs(rt, value.major, jsInvoker));
|
2869
|
+
result.setProperty(rt, "minor", bridging::toJs(rt, value.minor, jsInvoker));
|
2870
|
+
result.setProperty(rt, "patch", bridging::toJs(rt, value.patch, jsInvoker));
|
2871
|
+
result.setProperty(rt, "prerelease", bridging::toJs(rt, value.prerelease, jsInvoker));
|
2872
|
+
return result;
|
2873
|
+
}
|
2874
|
+
};
|
2591
2875
|
|
2592
|
-
|
2876
|
+
|
2877
|
+
|
2878
|
+
#pragma mark - PlatformConstantsBasePlatformConstantsAndroid
|
2879
|
+
|
2880
|
+
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11>
|
2881
|
+
struct PlatformConstantsBasePlatformConstantsAndroid {
|
2882
|
+
P0 isTesting;
|
2883
|
+
P1 isDisableAnimations;
|
2884
|
+
P2 reactNativeVersion;
|
2885
|
+
P3 Version;
|
2886
|
+
P4 Release;
|
2887
|
+
P5 Serial;
|
2888
|
+
P6 Fingerprint;
|
2889
|
+
P7 Model;
|
2890
|
+
P8 ServerHost;
|
2891
|
+
P9 uiMode;
|
2892
|
+
P10 Brand;
|
2893
|
+
P11 Manufacturer;
|
2894
|
+
bool operator==(const PlatformConstantsBasePlatformConstantsAndroid &other) const {
|
2895
|
+
return isTesting == other.isTesting && isDisableAnimations == other.isDisableAnimations && reactNativeVersion == other.reactNativeVersion && Version == other.Version && Release == other.Release && Serial == other.Serial && Fingerprint == other.Fingerprint && Model == other.Model && ServerHost == other.ServerHost && uiMode == other.uiMode && Brand == other.Brand && Manufacturer == other.Manufacturer;
|
2896
|
+
}
|
2593
2897
|
};
|
2594
2898
|
|
2899
|
+
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11>
|
2900
|
+
struct PlatformConstantsBasePlatformConstantsAndroidBridging {
|
2901
|
+
static PlatformConstantsBasePlatformConstantsAndroid<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11> fromJs(
|
2902
|
+
jsi::Runtime &rt,
|
2903
|
+
const jsi::Object &value,
|
2904
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
2905
|
+
PlatformConstantsBasePlatformConstantsAndroid<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11> result{
|
2906
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "isTesting"), jsInvoker),
|
2907
|
+
bridging::fromJs<P1>(rt, value.getProperty(rt, "isDisableAnimations"), jsInvoker),
|
2908
|
+
bridging::fromJs<P2>(rt, value.getProperty(rt, "reactNativeVersion"), jsInvoker),
|
2909
|
+
bridging::fromJs<P3>(rt, value.getProperty(rt, "Version"), jsInvoker),
|
2910
|
+
bridging::fromJs<P4>(rt, value.getProperty(rt, "Release"), jsInvoker),
|
2911
|
+
bridging::fromJs<P5>(rt, value.getProperty(rt, "Serial"), jsInvoker),
|
2912
|
+
bridging::fromJs<P6>(rt, value.getProperty(rt, "Fingerprint"), jsInvoker),
|
2913
|
+
bridging::fromJs<P7>(rt, value.getProperty(rt, "Model"), jsInvoker),
|
2914
|
+
bridging::fromJs<P8>(rt, value.getProperty(rt, "ServerHost"), jsInvoker),
|
2915
|
+
bridging::fromJs<P9>(rt, value.getProperty(rt, "uiMode"), jsInvoker),
|
2916
|
+
bridging::fromJs<P10>(rt, value.getProperty(rt, "Brand"), jsInvoker),
|
2917
|
+
bridging::fromJs<P11>(rt, value.getProperty(rt, "Manufacturer"), jsInvoker)};
|
2918
|
+
return result;
|
2919
|
+
}
|
2920
|
+
|
2921
|
+
#ifdef DEBUG
|
2922
|
+
static bool isTestingToJs(jsi::Runtime &rt, P0 value) {
|
2923
|
+
return bridging::toJs(rt, value);
|
2924
|
+
}
|
2925
|
+
|
2926
|
+
static bool isDisableAnimationsToJs(jsi::Runtime &rt, P1 value) {
|
2927
|
+
return bridging::toJs(rt, value);
|
2928
|
+
}
|
2929
|
+
|
2930
|
+
static jsi::Object reactNativeVersionToJs(jsi::Runtime &rt, P2 value) {
|
2931
|
+
return bridging::toJs(rt, value);
|
2932
|
+
}
|
2933
|
+
|
2934
|
+
static double VersionToJs(jsi::Runtime &rt, P3 value) {
|
2935
|
+
return bridging::toJs(rt, value);
|
2936
|
+
}
|
2937
|
+
|
2938
|
+
static jsi::String ReleaseToJs(jsi::Runtime &rt, P4 value) {
|
2939
|
+
return bridging::toJs(rt, value);
|
2940
|
+
}
|
2941
|
+
|
2942
|
+
static jsi::String SerialToJs(jsi::Runtime &rt, P5 value) {
|
2943
|
+
return bridging::toJs(rt, value);
|
2944
|
+
}
|
2945
|
+
|
2946
|
+
static jsi::String FingerprintToJs(jsi::Runtime &rt, P6 value) {
|
2947
|
+
return bridging::toJs(rt, value);
|
2948
|
+
}
|
2595
2949
|
|
2596
|
-
|
2950
|
+
static jsi::String ModelToJs(jsi::Runtime &rt, P7 value) {
|
2951
|
+
return bridging::toJs(rt, value);
|
2952
|
+
}
|
2953
|
+
|
2954
|
+
static jsi::String ServerHostToJs(jsi::Runtime &rt, P8 value) {
|
2955
|
+
return bridging::toJs(rt, value);
|
2956
|
+
}
|
2957
|
+
|
2958
|
+
static jsi::String uiModeToJs(jsi::Runtime &rt, P9 value) {
|
2959
|
+
return bridging::toJs(rt, value);
|
2960
|
+
}
|
2961
|
+
|
2962
|
+
static jsi::String BrandToJs(jsi::Runtime &rt, P10 value) {
|
2963
|
+
return bridging::toJs(rt, value);
|
2964
|
+
}
|
2965
|
+
|
2966
|
+
static jsi::String ManufacturerToJs(jsi::Runtime &rt, P11 value) {
|
2967
|
+
return bridging::toJs(rt, value);
|
2968
|
+
}
|
2969
|
+
#endif
|
2970
|
+
|
2971
|
+
static jsi::Object toJs(
|
2972
|
+
jsi::Runtime &rt,
|
2973
|
+
const PlatformConstantsBasePlatformConstantsAndroid<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11> &value,
|
2974
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
2975
|
+
auto result = facebook::jsi::Object(rt);
|
2976
|
+
result.setProperty(rt, "isTesting", bridging::toJs(rt, value.isTesting, jsInvoker));
|
2977
|
+
if (value.isDisableAnimations) {
|
2978
|
+
result.setProperty(rt, "isDisableAnimations", bridging::toJs(rt, value.isDisableAnimations.value(), jsInvoker));
|
2979
|
+
}
|
2980
|
+
result.setProperty(rt, "reactNativeVersion", bridging::toJs(rt, value.reactNativeVersion, jsInvoker));
|
2981
|
+
result.setProperty(rt, "Version", bridging::toJs(rt, value.Version, jsInvoker));
|
2982
|
+
result.setProperty(rt, "Release", bridging::toJs(rt, value.Release, jsInvoker));
|
2983
|
+
result.setProperty(rt, "Serial", bridging::toJs(rt, value.Serial, jsInvoker));
|
2984
|
+
result.setProperty(rt, "Fingerprint", bridging::toJs(rt, value.Fingerprint, jsInvoker));
|
2985
|
+
result.setProperty(rt, "Model", bridging::toJs(rt, value.Model, jsInvoker));
|
2986
|
+
if (value.ServerHost) {
|
2987
|
+
result.setProperty(rt, "ServerHost", bridging::toJs(rt, value.ServerHost.value(), jsInvoker));
|
2988
|
+
}
|
2989
|
+
result.setProperty(rt, "uiMode", bridging::toJs(rt, value.uiMode, jsInvoker));
|
2990
|
+
result.setProperty(rt, "Brand", bridging::toJs(rt, value.Brand, jsInvoker));
|
2991
|
+
result.setProperty(rt, "Manufacturer", bridging::toJs(rt, value.Manufacturer, jsInvoker));
|
2992
|
+
return result;
|
2993
|
+
}
|
2994
|
+
};
|
2995
|
+
|
2996
|
+
class JSI_EXPORT NativePlatformConstantsAndroidCxxSpecJSI : public TurboModule {
|
2597
2997
|
protected:
|
2598
|
-
|
2998
|
+
NativePlatformConstantsAndroidCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
2599
2999
|
|
2600
3000
|
public:
|
2601
|
-
virtual jsi::
|
3001
|
+
virtual jsi::Object getConstants(jsi::Runtime &rt) = 0;
|
3002
|
+
virtual jsi::String getAndroidID(jsi::Runtime &rt) = 0;
|
2602
3003
|
|
2603
3004
|
};
|
2604
3005
|
|
2605
3006
|
template <typename T>
|
2606
|
-
class JSI_EXPORT
|
3007
|
+
class JSI_EXPORT NativePlatformConstantsAndroidCxxSpec : public TurboModule {
|
2607
3008
|
public:
|
2608
3009
|
jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
2609
3010
|
return delegate_.get(rt, propName);
|
2610
3011
|
}
|
2611
3012
|
|
3013
|
+
static constexpr std::string_view kModuleName = "PlatformConstants";
|
3014
|
+
|
2612
3015
|
protected:
|
2613
|
-
|
2614
|
-
: TurboModule(
|
3016
|
+
NativePlatformConstantsAndroidCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
3017
|
+
: TurboModule(std::string{NativePlatformConstantsAndroidCxxSpec::kModuleName}, jsInvoker),
|
2615
3018
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
2616
3019
|
|
2617
3020
|
private:
|
2618
|
-
class Delegate : public
|
3021
|
+
class Delegate : public NativePlatformConstantsAndroidCxxSpecJSI {
|
2619
3022
|
public:
|
2620
3023
|
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
2621
|
-
|
3024
|
+
NativePlatformConstantsAndroidCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {}
|
2622
3025
|
|
2623
|
-
jsi::
|
3026
|
+
jsi::Object getConstants(jsi::Runtime &rt) override {
|
2624
3027
|
static_assert(
|
2625
|
-
bridging::getParameterCount(&T::
|
2626
|
-
"Expected
|
3028
|
+
bridging::getParameterCount(&T::getConstants) == 1,
|
3029
|
+
"Expected getConstants(...) to have 1 parameters");
|
2627
3030
|
|
2628
|
-
return bridging::callFromJs<jsi::
|
2629
|
-
rt, &T::
|
3031
|
+
return bridging::callFromJs<jsi::Object>(
|
3032
|
+
rt, &T::getConstants, jsInvoker_, instance_);
|
3033
|
+
}
|
3034
|
+
jsi::String getAndroidID(jsi::Runtime &rt) override {
|
3035
|
+
static_assert(
|
3036
|
+
bridging::getParameterCount(&T::getAndroidID) == 1,
|
3037
|
+
"Expected getAndroidID(...) to have 1 parameters");
|
3038
|
+
|
3039
|
+
return bridging::callFromJs<jsi::String>(
|
3040
|
+
rt, &T::getAndroidID, jsInvoker_, instance_);
|
2630
3041
|
}
|
2631
3042
|
|
2632
3043
|
private:
|
@@ -2659,9 +3070,11 @@ public:
|
|
2659
3070
|
return delegate_.get(rt, propName);
|
2660
3071
|
}
|
2661
3072
|
|
3073
|
+
static constexpr std::string_view kModuleName = "StatusBarManager";
|
3074
|
+
|
2662
3075
|
protected:
|
2663
3076
|
NativeStatusBarManagerIOSCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
2664
|
-
: TurboModule(
|
3077
|
+
: TurboModule(std::string{NativeStatusBarManagerIOSCxxSpec::kModuleName}, jsInvoker),
|
2665
3078
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
2666
3079
|
|
2667
3080
|
private:
|
@@ -2755,9 +3168,11 @@ public:
|
|
2755
3168
|
return delegate_.get(rt, propName);
|
2756
3169
|
}
|
2757
3170
|
|
3171
|
+
static constexpr std::string_view kModuleName = "StatusBarManager";
|
3172
|
+
|
2758
3173
|
protected:
|
2759
3174
|
NativeStatusBarManagerAndroidCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
2760
|
-
: TurboModule(
|
3175
|
+
: TurboModule(std::string{NativeStatusBarManagerAndroidCxxSpec::kModuleName}, jsInvoker),
|
2761
3176
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
2762
3177
|
|
2763
3178
|
private:
|
@@ -2841,9 +3256,11 @@ public:
|
|
2841
3256
|
return delegate_.get(rt, propName);
|
2842
3257
|
}
|
2843
3258
|
|
3259
|
+
static constexpr std::string_view kModuleName = "AccessibilityManager";
|
3260
|
+
|
2844
3261
|
protected:
|
2845
3262
|
NativeAccessibilityManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
2846
|
-
: TurboModule(
|
3263
|
+
: TurboModule(std::string{NativeAccessibilityManagerCxxSpec::kModuleName}, jsInvoker),
|
2847
3264
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
2848
3265
|
|
2849
3266
|
private:
|
@@ -2970,9 +3387,11 @@ public:
|
|
2970
3387
|
return delegate_.get(rt, propName);
|
2971
3388
|
}
|
2972
3389
|
|
3390
|
+
static constexpr std::string_view kModuleName = "AccessibilityInfo";
|
3391
|
+
|
2973
3392
|
protected:
|
2974
3393
|
NativeAccessibilityInfoCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
2975
|
-
: TurboModule(
|
3394
|
+
: TurboModule(std::string{NativeAccessibilityInfoCxxSpec::kModuleName}, jsInvoker),
|
2976
3395
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
2977
3396
|
|
2978
3397
|
private:
|
@@ -3057,9 +3476,11 @@ public:
|
|
3057
3476
|
return delegate_.get(rt, propName);
|
3058
3477
|
}
|
3059
3478
|
|
3479
|
+
static constexpr std::string_view kModuleName = "ToastAndroid";
|
3480
|
+
|
3060
3481
|
protected:
|
3061
3482
|
NativeToastAndroidCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
3062
|
-
: TurboModule(
|
3483
|
+
: TurboModule(std::string{NativeToastAndroidCxxSpec::kModuleName}, jsInvoker),
|
3063
3484
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
3064
3485
|
|
3065
3486
|
private:
|
@@ -3125,9 +3546,11 @@ public:
|
|
3125
3546
|
return delegate_.get(rt, propName);
|
3126
3547
|
}
|
3127
3548
|
|
3549
|
+
static constexpr std::string_view kModuleName = "SoundManager";
|
3550
|
+
|
3128
3551
|
protected:
|
3129
3552
|
NativeSoundManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
3130
|
-
: TurboModule(
|
3553
|
+
: TurboModule(std::string{NativeSoundManagerCxxSpec::kModuleName}, jsInvoker),
|
3131
3554
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
3132
3555
|
|
3133
3556
|
private:
|
@@ -3170,9 +3593,11 @@ public:
|
|
3170
3593
|
return delegate_.get(rt, propName);
|
3171
3594
|
}
|
3172
3595
|
|
3596
|
+
static constexpr std::string_view kModuleName = "KeyboardObserver";
|
3597
|
+
|
3173
3598
|
protected:
|
3174
3599
|
NativeKeyboardObserverCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
3175
|
-
: TurboModule(
|
3600
|
+
: TurboModule(std::string{NativeKeyboardObserverCxxSpec::kModuleName}, jsInvoker),
|
3176
3601
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
3177
3602
|
|
3178
3603
|
private:
|
@@ -3205,59 +3630,470 @@ private:
|
|
3205
3630
|
Delegate delegate_;
|
3206
3631
|
};
|
3207
3632
|
|
3208
|
-
|
3209
|
-
class JSI_EXPORT NativeClipboardCxxSpecJSI : public TurboModule {
|
3633
|
+
|
3634
|
+
class JSI_EXPORT NativeClipboardCxxSpecJSI : public TurboModule {
|
3635
|
+
protected:
|
3636
|
+
NativeClipboardCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
3637
|
+
|
3638
|
+
public:
|
3639
|
+
virtual jsi::Object getConstants(jsi::Runtime &rt) = 0;
|
3640
|
+
virtual jsi::Value getString(jsi::Runtime &rt) = 0;
|
3641
|
+
virtual void setString(jsi::Runtime &rt, jsi::String content) = 0;
|
3642
|
+
|
3643
|
+
};
|
3644
|
+
|
3645
|
+
template <typename T>
|
3646
|
+
class JSI_EXPORT NativeClipboardCxxSpec : public TurboModule {
|
3647
|
+
public:
|
3648
|
+
jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
3649
|
+
return delegate_.get(rt, propName);
|
3650
|
+
}
|
3651
|
+
|
3652
|
+
static constexpr std::string_view kModuleName = "Clipboard";
|
3653
|
+
|
3654
|
+
protected:
|
3655
|
+
NativeClipboardCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
3656
|
+
: TurboModule(std::string{NativeClipboardCxxSpec::kModuleName}, jsInvoker),
|
3657
|
+
delegate_(static_cast<T*>(this), jsInvoker) {}
|
3658
|
+
|
3659
|
+
private:
|
3660
|
+
class Delegate : public NativeClipboardCxxSpecJSI {
|
3661
|
+
public:
|
3662
|
+
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
3663
|
+
NativeClipboardCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {}
|
3664
|
+
|
3665
|
+
jsi::Object getConstants(jsi::Runtime &rt) override {
|
3666
|
+
static_assert(
|
3667
|
+
bridging::getParameterCount(&T::getConstants) == 1,
|
3668
|
+
"Expected getConstants(...) to have 1 parameters");
|
3669
|
+
|
3670
|
+
return bridging::callFromJs<jsi::Object>(
|
3671
|
+
rt, &T::getConstants, jsInvoker_, instance_);
|
3672
|
+
}
|
3673
|
+
jsi::Value getString(jsi::Runtime &rt) override {
|
3674
|
+
static_assert(
|
3675
|
+
bridging::getParameterCount(&T::getString) == 1,
|
3676
|
+
"Expected getString(...) to have 1 parameters");
|
3677
|
+
|
3678
|
+
return bridging::callFromJs<jsi::Value>(
|
3679
|
+
rt, &T::getString, jsInvoker_, instance_);
|
3680
|
+
}
|
3681
|
+
void setString(jsi::Runtime &rt, jsi::String content) override {
|
3682
|
+
static_assert(
|
3683
|
+
bridging::getParameterCount(&T::setString) == 2,
|
3684
|
+
"Expected setString(...) to have 2 parameters");
|
3685
|
+
|
3686
|
+
return bridging::callFromJs<void>(
|
3687
|
+
rt, &T::setString, jsInvoker_, instance_, std::move(content));
|
3688
|
+
}
|
3689
|
+
|
3690
|
+
private:
|
3691
|
+
T *instance_;
|
3692
|
+
};
|
3693
|
+
|
3694
|
+
Delegate delegate_;
|
3695
|
+
};
|
3696
|
+
|
3697
|
+
|
3698
|
+
|
3699
|
+
#pragma mark - NativeIntersectionObserverCxxBaseNativeIntersectionObserverObserveOptions
|
3700
|
+
|
3701
|
+
template <typename P0, typename P1, typename P2>
|
3702
|
+
struct NativeIntersectionObserverCxxBaseNativeIntersectionObserverObserveOptions {
|
3703
|
+
P0 intersectionObserverId;
|
3704
|
+
P1 targetShadowNode;
|
3705
|
+
P2 thresholds;
|
3706
|
+
bool operator==(const NativeIntersectionObserverCxxBaseNativeIntersectionObserverObserveOptions &other) const {
|
3707
|
+
return intersectionObserverId == other.intersectionObserverId && targetShadowNode == other.targetShadowNode && thresholds == other.thresholds;
|
3708
|
+
}
|
3709
|
+
};
|
3710
|
+
|
3711
|
+
template <typename P0, typename P1, typename P2>
|
3712
|
+
struct NativeIntersectionObserverCxxBaseNativeIntersectionObserverObserveOptionsBridging {
|
3713
|
+
static NativeIntersectionObserverCxxBaseNativeIntersectionObserverObserveOptions<P0, P1, P2> fromJs(
|
3714
|
+
jsi::Runtime &rt,
|
3715
|
+
const jsi::Object &value,
|
3716
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
3717
|
+
NativeIntersectionObserverCxxBaseNativeIntersectionObserverObserveOptions<P0, P1, P2> result{
|
3718
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "intersectionObserverId"), jsInvoker),
|
3719
|
+
bridging::fromJs<P1>(rt, value.getProperty(rt, "targetShadowNode"), jsInvoker),
|
3720
|
+
bridging::fromJs<P2>(rt, value.getProperty(rt, "thresholds"), jsInvoker)};
|
3721
|
+
return result;
|
3722
|
+
}
|
3723
|
+
|
3724
|
+
#ifdef DEBUG
|
3725
|
+
static double intersectionObserverIdToJs(jsi::Runtime &rt, P0 value) {
|
3726
|
+
return bridging::toJs(rt, value);
|
3727
|
+
}
|
3728
|
+
|
3729
|
+
static jsi::Value targetShadowNodeToJs(jsi::Runtime &rt, P1 value) {
|
3730
|
+
return bridging::toJs(rt, value);
|
3731
|
+
}
|
3732
|
+
|
3733
|
+
static jsi::Array thresholdsToJs(jsi::Runtime &rt, P2 value) {
|
3734
|
+
return bridging::toJs(rt, value);
|
3735
|
+
}
|
3736
|
+
#endif
|
3737
|
+
|
3738
|
+
static jsi::Object toJs(
|
3739
|
+
jsi::Runtime &rt,
|
3740
|
+
const NativeIntersectionObserverCxxBaseNativeIntersectionObserverObserveOptions<P0, P1, P2> &value,
|
3741
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
3742
|
+
auto result = facebook::jsi::Object(rt);
|
3743
|
+
result.setProperty(rt, "intersectionObserverId", bridging::toJs(rt, value.intersectionObserverId, jsInvoker));
|
3744
|
+
result.setProperty(rt, "targetShadowNode", bridging::toJs(rt, value.targetShadowNode, jsInvoker));
|
3745
|
+
result.setProperty(rt, "thresholds", bridging::toJs(rt, value.thresholds, jsInvoker));
|
3746
|
+
return result;
|
3747
|
+
}
|
3748
|
+
};
|
3749
|
+
|
3750
|
+
|
3751
|
+
|
3752
|
+
#pragma mark - NativeIntersectionObserverCxxBaseNativeIntersectionObserverEntry
|
3753
|
+
|
3754
|
+
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
|
3755
|
+
struct NativeIntersectionObserverCxxBaseNativeIntersectionObserverEntry {
|
3756
|
+
P0 intersectionObserverId;
|
3757
|
+
P1 targetInstanceHandle;
|
3758
|
+
P2 targetRect;
|
3759
|
+
P3 rootRect;
|
3760
|
+
P4 intersectionRect;
|
3761
|
+
P5 isIntersectingAboveThresholds;
|
3762
|
+
P6 time;
|
3763
|
+
bool operator==(const NativeIntersectionObserverCxxBaseNativeIntersectionObserverEntry &other) const {
|
3764
|
+
return intersectionObserverId == other.intersectionObserverId && targetInstanceHandle == other.targetInstanceHandle && targetRect == other.targetRect && rootRect == other.rootRect && intersectionRect == other.intersectionRect && isIntersectingAboveThresholds == other.isIntersectingAboveThresholds && time == other.time;
|
3765
|
+
}
|
3766
|
+
};
|
3767
|
+
|
3768
|
+
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
|
3769
|
+
struct NativeIntersectionObserverCxxBaseNativeIntersectionObserverEntryBridging {
|
3770
|
+
static NativeIntersectionObserverCxxBaseNativeIntersectionObserverEntry<P0, P1, P2, P3, P4, P5, P6> fromJs(
|
3771
|
+
jsi::Runtime &rt,
|
3772
|
+
const jsi::Object &value,
|
3773
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
3774
|
+
NativeIntersectionObserverCxxBaseNativeIntersectionObserverEntry<P0, P1, P2, P3, P4, P5, P6> result{
|
3775
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "intersectionObserverId"), jsInvoker),
|
3776
|
+
bridging::fromJs<P1>(rt, value.getProperty(rt, "targetInstanceHandle"), jsInvoker),
|
3777
|
+
bridging::fromJs<P2>(rt, value.getProperty(rt, "targetRect"), jsInvoker),
|
3778
|
+
bridging::fromJs<P3>(rt, value.getProperty(rt, "rootRect"), jsInvoker),
|
3779
|
+
bridging::fromJs<P4>(rt, value.getProperty(rt, "intersectionRect"), jsInvoker),
|
3780
|
+
bridging::fromJs<P5>(rt, value.getProperty(rt, "isIntersectingAboveThresholds"), jsInvoker),
|
3781
|
+
bridging::fromJs<P6>(rt, value.getProperty(rt, "time"), jsInvoker)};
|
3782
|
+
return result;
|
3783
|
+
}
|
3784
|
+
|
3785
|
+
#ifdef DEBUG
|
3786
|
+
static double intersectionObserverIdToJs(jsi::Runtime &rt, P0 value) {
|
3787
|
+
return bridging::toJs(rt, value);
|
3788
|
+
}
|
3789
|
+
|
3790
|
+
static jsi::Value targetInstanceHandleToJs(jsi::Runtime &rt, P1 value) {
|
3791
|
+
return bridging::toJs(rt, value);
|
3792
|
+
}
|
3793
|
+
|
3794
|
+
static jsi::Array targetRectToJs(jsi::Runtime &rt, P2 value) {
|
3795
|
+
return bridging::toJs(rt, value);
|
3796
|
+
}
|
3797
|
+
|
3798
|
+
static jsi::Array rootRectToJs(jsi::Runtime &rt, P3 value) {
|
3799
|
+
return bridging::toJs(rt, value);
|
3800
|
+
}
|
3801
|
+
|
3802
|
+
static std::optional<jsi::Array> intersectionRectToJs(jsi::Runtime &rt, P4 value) {
|
3803
|
+
return bridging::toJs(rt, value);
|
3804
|
+
}
|
3805
|
+
|
3806
|
+
static bool isIntersectingAboveThresholdsToJs(jsi::Runtime &rt, P5 value) {
|
3807
|
+
return bridging::toJs(rt, value);
|
3808
|
+
}
|
3809
|
+
|
3810
|
+
static double timeToJs(jsi::Runtime &rt, P6 value) {
|
3811
|
+
return bridging::toJs(rt, value);
|
3812
|
+
}
|
3813
|
+
#endif
|
3814
|
+
|
3815
|
+
static jsi::Object toJs(
|
3816
|
+
jsi::Runtime &rt,
|
3817
|
+
const NativeIntersectionObserverCxxBaseNativeIntersectionObserverEntry<P0, P1, P2, P3, P4, P5, P6> &value,
|
3818
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
3819
|
+
auto result = facebook::jsi::Object(rt);
|
3820
|
+
result.setProperty(rt, "intersectionObserverId", bridging::toJs(rt, value.intersectionObserverId, jsInvoker));
|
3821
|
+
result.setProperty(rt, "targetInstanceHandle", bridging::toJs(rt, value.targetInstanceHandle, jsInvoker));
|
3822
|
+
result.setProperty(rt, "targetRect", bridging::toJs(rt, value.targetRect, jsInvoker));
|
3823
|
+
result.setProperty(rt, "rootRect", bridging::toJs(rt, value.rootRect, jsInvoker));
|
3824
|
+
result.setProperty(rt, "intersectionRect", bridging::toJs(rt, value.intersectionRect, jsInvoker));
|
3825
|
+
result.setProperty(rt, "isIntersectingAboveThresholds", bridging::toJs(rt, value.isIntersectingAboveThresholds, jsInvoker));
|
3826
|
+
result.setProperty(rt, "time", bridging::toJs(rt, value.time, jsInvoker));
|
3827
|
+
return result;
|
3828
|
+
}
|
3829
|
+
};
|
3830
|
+
|
3831
|
+
class JSI_EXPORT NativeIntersectionObserverCxxSpecJSI : public TurboModule {
|
3832
|
+
protected:
|
3833
|
+
NativeIntersectionObserverCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
3834
|
+
|
3835
|
+
public:
|
3836
|
+
virtual void observe(jsi::Runtime &rt, jsi::Object options) = 0;
|
3837
|
+
virtual void unobserve(jsi::Runtime &rt, double intersectionObserverId, jsi::Value targetShadowNode) = 0;
|
3838
|
+
virtual void connect(jsi::Runtime &rt, jsi::Function notifyIntersectionObserversCallback) = 0;
|
3839
|
+
virtual void disconnect(jsi::Runtime &rt) = 0;
|
3840
|
+
virtual jsi::Array takeRecords(jsi::Runtime &rt) = 0;
|
3841
|
+
|
3842
|
+
};
|
3843
|
+
|
3844
|
+
template <typename T>
|
3845
|
+
class JSI_EXPORT NativeIntersectionObserverCxxSpec : public TurboModule {
|
3846
|
+
public:
|
3847
|
+
jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
3848
|
+
return delegate_.get(rt, propName);
|
3849
|
+
}
|
3850
|
+
|
3851
|
+
static constexpr std::string_view kModuleName = "NativeIntersectionObserverCxx";
|
3852
|
+
|
3853
|
+
protected:
|
3854
|
+
NativeIntersectionObserverCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
3855
|
+
: TurboModule(std::string{NativeIntersectionObserverCxxSpec::kModuleName}, jsInvoker),
|
3856
|
+
delegate_(static_cast<T*>(this), jsInvoker) {}
|
3857
|
+
|
3858
|
+
private:
|
3859
|
+
class Delegate : public NativeIntersectionObserverCxxSpecJSI {
|
3860
|
+
public:
|
3861
|
+
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
3862
|
+
NativeIntersectionObserverCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {}
|
3863
|
+
|
3864
|
+
void observe(jsi::Runtime &rt, jsi::Object options) override {
|
3865
|
+
static_assert(
|
3866
|
+
bridging::getParameterCount(&T::observe) == 2,
|
3867
|
+
"Expected observe(...) to have 2 parameters");
|
3868
|
+
|
3869
|
+
return bridging::callFromJs<void>(
|
3870
|
+
rt, &T::observe, jsInvoker_, instance_, std::move(options));
|
3871
|
+
}
|
3872
|
+
void unobserve(jsi::Runtime &rt, double intersectionObserverId, jsi::Value targetShadowNode) override {
|
3873
|
+
static_assert(
|
3874
|
+
bridging::getParameterCount(&T::unobserve) == 3,
|
3875
|
+
"Expected unobserve(...) to have 3 parameters");
|
3876
|
+
|
3877
|
+
return bridging::callFromJs<void>(
|
3878
|
+
rt, &T::unobserve, jsInvoker_, instance_, std::move(intersectionObserverId), std::move(targetShadowNode));
|
3879
|
+
}
|
3880
|
+
void connect(jsi::Runtime &rt, jsi::Function notifyIntersectionObserversCallback) override {
|
3881
|
+
static_assert(
|
3882
|
+
bridging::getParameterCount(&T::connect) == 2,
|
3883
|
+
"Expected connect(...) to have 2 parameters");
|
3884
|
+
|
3885
|
+
return bridging::callFromJs<void>(
|
3886
|
+
rt, &T::connect, jsInvoker_, instance_, std::move(notifyIntersectionObserversCallback));
|
3887
|
+
}
|
3888
|
+
void disconnect(jsi::Runtime &rt) override {
|
3889
|
+
static_assert(
|
3890
|
+
bridging::getParameterCount(&T::disconnect) == 1,
|
3891
|
+
"Expected disconnect(...) to have 1 parameters");
|
3892
|
+
|
3893
|
+
return bridging::callFromJs<void>(
|
3894
|
+
rt, &T::disconnect, jsInvoker_, instance_);
|
3895
|
+
}
|
3896
|
+
jsi::Array takeRecords(jsi::Runtime &rt) override {
|
3897
|
+
static_assert(
|
3898
|
+
bridging::getParameterCount(&T::takeRecords) == 1,
|
3899
|
+
"Expected takeRecords(...) to have 1 parameters");
|
3900
|
+
|
3901
|
+
return bridging::callFromJs<jsi::Array>(
|
3902
|
+
rt, &T::takeRecords, jsInvoker_, instance_);
|
3903
|
+
}
|
3904
|
+
|
3905
|
+
private:
|
3906
|
+
T *instance_;
|
3907
|
+
};
|
3908
|
+
|
3909
|
+
Delegate delegate_;
|
3910
|
+
};
|
3911
|
+
|
3912
|
+
|
3913
|
+
|
3914
|
+
#pragma mark - NativeMutationObserverCxxBaseNativeMutationObserverObserveOptions
|
3915
|
+
|
3916
|
+
template <typename P0, typename P1, typename P2>
|
3917
|
+
struct NativeMutationObserverCxxBaseNativeMutationObserverObserveOptions {
|
3918
|
+
P0 mutationObserverId;
|
3919
|
+
P1 targetShadowNode;
|
3920
|
+
P2 subtree;
|
3921
|
+
bool operator==(const NativeMutationObserverCxxBaseNativeMutationObserverObserveOptions &other) const {
|
3922
|
+
return mutationObserverId == other.mutationObserverId && targetShadowNode == other.targetShadowNode && subtree == other.subtree;
|
3923
|
+
}
|
3924
|
+
};
|
3925
|
+
|
3926
|
+
template <typename P0, typename P1, typename P2>
|
3927
|
+
struct NativeMutationObserverCxxBaseNativeMutationObserverObserveOptionsBridging {
|
3928
|
+
static NativeMutationObserverCxxBaseNativeMutationObserverObserveOptions<P0, P1, P2> fromJs(
|
3929
|
+
jsi::Runtime &rt,
|
3930
|
+
const jsi::Object &value,
|
3931
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
3932
|
+
NativeMutationObserverCxxBaseNativeMutationObserverObserveOptions<P0, P1, P2> result{
|
3933
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "mutationObserverId"), jsInvoker),
|
3934
|
+
bridging::fromJs<P1>(rt, value.getProperty(rt, "targetShadowNode"), jsInvoker),
|
3935
|
+
bridging::fromJs<P2>(rt, value.getProperty(rt, "subtree"), jsInvoker)};
|
3936
|
+
return result;
|
3937
|
+
}
|
3938
|
+
|
3939
|
+
#ifdef DEBUG
|
3940
|
+
static double mutationObserverIdToJs(jsi::Runtime &rt, P0 value) {
|
3941
|
+
return bridging::toJs(rt, value);
|
3942
|
+
}
|
3943
|
+
|
3944
|
+
static jsi::Value targetShadowNodeToJs(jsi::Runtime &rt, P1 value) {
|
3945
|
+
return bridging::toJs(rt, value);
|
3946
|
+
}
|
3947
|
+
|
3948
|
+
static bool subtreeToJs(jsi::Runtime &rt, P2 value) {
|
3949
|
+
return bridging::toJs(rt, value);
|
3950
|
+
}
|
3951
|
+
#endif
|
3952
|
+
|
3953
|
+
static jsi::Object toJs(
|
3954
|
+
jsi::Runtime &rt,
|
3955
|
+
const NativeMutationObserverCxxBaseNativeMutationObserverObserveOptions<P0, P1, P2> &value,
|
3956
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
3957
|
+
auto result = facebook::jsi::Object(rt);
|
3958
|
+
result.setProperty(rt, "mutationObserverId", bridging::toJs(rt, value.mutationObserverId, jsInvoker));
|
3959
|
+
result.setProperty(rt, "targetShadowNode", bridging::toJs(rt, value.targetShadowNode, jsInvoker));
|
3960
|
+
result.setProperty(rt, "subtree", bridging::toJs(rt, value.subtree, jsInvoker));
|
3961
|
+
return result;
|
3962
|
+
}
|
3963
|
+
};
|
3964
|
+
|
3965
|
+
|
3966
|
+
|
3967
|
+
#pragma mark - NativeMutationObserverCxxBaseNativeMutationRecord
|
3968
|
+
|
3969
|
+
template <typename P0, typename P1, typename P2, typename P3>
|
3970
|
+
struct NativeMutationObserverCxxBaseNativeMutationRecord {
|
3971
|
+
P0 mutationObserverId;
|
3972
|
+
P1 target;
|
3973
|
+
P2 addedNodes;
|
3974
|
+
P3 removedNodes;
|
3975
|
+
bool operator==(const NativeMutationObserverCxxBaseNativeMutationRecord &other) const {
|
3976
|
+
return mutationObserverId == other.mutationObserverId && target == other.target && addedNodes == other.addedNodes && removedNodes == other.removedNodes;
|
3977
|
+
}
|
3978
|
+
};
|
3979
|
+
|
3980
|
+
template <typename P0, typename P1, typename P2, typename P3>
|
3981
|
+
struct NativeMutationObserverCxxBaseNativeMutationRecordBridging {
|
3982
|
+
static NativeMutationObserverCxxBaseNativeMutationRecord<P0, P1, P2, P3> fromJs(
|
3983
|
+
jsi::Runtime &rt,
|
3984
|
+
const jsi::Object &value,
|
3985
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
3986
|
+
NativeMutationObserverCxxBaseNativeMutationRecord<P0, P1, P2, P3> result{
|
3987
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "mutationObserverId"), jsInvoker),
|
3988
|
+
bridging::fromJs<P1>(rt, value.getProperty(rt, "target"), jsInvoker),
|
3989
|
+
bridging::fromJs<P2>(rt, value.getProperty(rt, "addedNodes"), jsInvoker),
|
3990
|
+
bridging::fromJs<P3>(rt, value.getProperty(rt, "removedNodes"), jsInvoker)};
|
3991
|
+
return result;
|
3992
|
+
}
|
3993
|
+
|
3994
|
+
#ifdef DEBUG
|
3995
|
+
static double mutationObserverIdToJs(jsi::Runtime &rt, P0 value) {
|
3996
|
+
return bridging::toJs(rt, value);
|
3997
|
+
}
|
3998
|
+
|
3999
|
+
static jsi::Value targetToJs(jsi::Runtime &rt, P1 value) {
|
4000
|
+
return bridging::toJs(rt, value);
|
4001
|
+
}
|
4002
|
+
|
4003
|
+
static jsi::Array addedNodesToJs(jsi::Runtime &rt, P2 value) {
|
4004
|
+
return bridging::toJs(rt, value);
|
4005
|
+
}
|
4006
|
+
|
4007
|
+
static jsi::Array removedNodesToJs(jsi::Runtime &rt, P3 value) {
|
4008
|
+
return bridging::toJs(rt, value);
|
4009
|
+
}
|
4010
|
+
#endif
|
4011
|
+
|
4012
|
+
static jsi::Object toJs(
|
4013
|
+
jsi::Runtime &rt,
|
4014
|
+
const NativeMutationObserverCxxBaseNativeMutationRecord<P0, P1, P2, P3> &value,
|
4015
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
4016
|
+
auto result = facebook::jsi::Object(rt);
|
4017
|
+
result.setProperty(rt, "mutationObserverId", bridging::toJs(rt, value.mutationObserverId, jsInvoker));
|
4018
|
+
result.setProperty(rt, "target", bridging::toJs(rt, value.target, jsInvoker));
|
4019
|
+
result.setProperty(rt, "addedNodes", bridging::toJs(rt, value.addedNodes, jsInvoker));
|
4020
|
+
result.setProperty(rt, "removedNodes", bridging::toJs(rt, value.removedNodes, jsInvoker));
|
4021
|
+
return result;
|
4022
|
+
}
|
4023
|
+
};
|
4024
|
+
|
4025
|
+
class JSI_EXPORT NativeMutationObserverCxxSpecJSI : public TurboModule {
|
3210
4026
|
protected:
|
3211
|
-
|
4027
|
+
NativeMutationObserverCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
3212
4028
|
|
3213
4029
|
public:
|
3214
|
-
virtual
|
3215
|
-
virtual
|
3216
|
-
virtual void
|
4030
|
+
virtual void observe(jsi::Runtime &rt, jsi::Object options) = 0;
|
4031
|
+
virtual void unobserve(jsi::Runtime &rt, double mutationObserverId, jsi::Value targetShadowNode) = 0;
|
4032
|
+
virtual void connect(jsi::Runtime &rt, jsi::Function notifyMutationObservers, jsi::Function getPublicInstanceFromInstanceHandle) = 0;
|
4033
|
+
virtual void disconnect(jsi::Runtime &rt) = 0;
|
4034
|
+
virtual jsi::Array takeRecords(jsi::Runtime &rt) = 0;
|
3217
4035
|
|
3218
4036
|
};
|
3219
4037
|
|
3220
4038
|
template <typename T>
|
3221
|
-
class JSI_EXPORT
|
4039
|
+
class JSI_EXPORT NativeMutationObserverCxxSpec : public TurboModule {
|
3222
4040
|
public:
|
3223
4041
|
jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
3224
4042
|
return delegate_.get(rt, propName);
|
3225
4043
|
}
|
3226
4044
|
|
4045
|
+
static constexpr std::string_view kModuleName = "NativeMutationObserverCxx";
|
4046
|
+
|
3227
4047
|
protected:
|
3228
|
-
|
3229
|
-
: TurboModule(
|
4048
|
+
NativeMutationObserverCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
4049
|
+
: TurboModule(std::string{NativeMutationObserverCxxSpec::kModuleName}, jsInvoker),
|
3230
4050
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
3231
4051
|
|
3232
4052
|
private:
|
3233
|
-
class Delegate : public
|
4053
|
+
class Delegate : public NativeMutationObserverCxxSpecJSI {
|
3234
4054
|
public:
|
3235
4055
|
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
3236
|
-
|
4056
|
+
NativeMutationObserverCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {}
|
3237
4057
|
|
3238
|
-
|
4058
|
+
void observe(jsi::Runtime &rt, jsi::Object options) override {
|
3239
4059
|
static_assert(
|
3240
|
-
bridging::getParameterCount(&T::
|
3241
|
-
"Expected
|
4060
|
+
bridging::getParameterCount(&T::observe) == 2,
|
4061
|
+
"Expected observe(...) to have 2 parameters");
|
3242
4062
|
|
3243
|
-
return bridging::callFromJs<
|
3244
|
-
rt, &T::
|
4063
|
+
return bridging::callFromJs<void>(
|
4064
|
+
rt, &T::observe, jsInvoker_, instance_, std::move(options));
|
3245
4065
|
}
|
3246
|
-
|
4066
|
+
void unobserve(jsi::Runtime &rt, double mutationObserverId, jsi::Value targetShadowNode) override {
|
3247
4067
|
static_assert(
|
3248
|
-
bridging::getParameterCount(&T::
|
3249
|
-
"Expected
|
4068
|
+
bridging::getParameterCount(&T::unobserve) == 3,
|
4069
|
+
"Expected unobserve(...) to have 3 parameters");
|
3250
4070
|
|
3251
|
-
return bridging::callFromJs<
|
3252
|
-
rt, &T::
|
4071
|
+
return bridging::callFromJs<void>(
|
4072
|
+
rt, &T::unobserve, jsInvoker_, instance_, std::move(mutationObserverId), std::move(targetShadowNode));
|
3253
4073
|
}
|
3254
|
-
void
|
4074
|
+
void connect(jsi::Runtime &rt, jsi::Function notifyMutationObservers, jsi::Function getPublicInstanceFromInstanceHandle) override {
|
3255
4075
|
static_assert(
|
3256
|
-
bridging::getParameterCount(&T::
|
3257
|
-
"Expected
|
4076
|
+
bridging::getParameterCount(&T::connect) == 3,
|
4077
|
+
"Expected connect(...) to have 3 parameters");
|
3258
4078
|
|
3259
4079
|
return bridging::callFromJs<void>(
|
3260
|
-
rt, &T::
|
4080
|
+
rt, &T::connect, jsInvoker_, instance_, std::move(notifyMutationObservers), std::move(getPublicInstanceFromInstanceHandle));
|
4081
|
+
}
|
4082
|
+
void disconnect(jsi::Runtime &rt) override {
|
4083
|
+
static_assert(
|
4084
|
+
bridging::getParameterCount(&T::disconnect) == 1,
|
4085
|
+
"Expected disconnect(...) to have 1 parameters");
|
4086
|
+
|
4087
|
+
return bridging::callFromJs<void>(
|
4088
|
+
rt, &T::disconnect, jsInvoker_, instance_);
|
4089
|
+
}
|
4090
|
+
jsi::Array takeRecords(jsi::Runtime &rt) override {
|
4091
|
+
static_assert(
|
4092
|
+
bridging::getParameterCount(&T::takeRecords) == 1,
|
4093
|
+
"Expected takeRecords(...) to have 1 parameters");
|
4094
|
+
|
4095
|
+
return bridging::callFromJs<jsi::Array>(
|
4096
|
+
rt, &T::takeRecords, jsInvoker_, instance_);
|
3261
4097
|
}
|
3262
4098
|
|
3263
4099
|
private:
|
@@ -3268,7 +4104,84 @@ private:
|
|
3268
4104
|
};
|
3269
4105
|
|
3270
4106
|
|
3271
|
-
|
4107
|
+
|
4108
|
+
#pragma mark - AppStateBaseAppStateConstants
|
4109
|
+
|
4110
|
+
template <typename P0>
|
4111
|
+
struct AppStateBaseAppStateConstants {
|
4112
|
+
P0 initialAppState;
|
4113
|
+
bool operator==(const AppStateBaseAppStateConstants &other) const {
|
4114
|
+
return initialAppState == other.initialAppState;
|
4115
|
+
}
|
4116
|
+
};
|
4117
|
+
|
4118
|
+
template <typename P0>
|
4119
|
+
struct AppStateBaseAppStateConstantsBridging {
|
4120
|
+
static AppStateBaseAppStateConstants<P0> fromJs(
|
4121
|
+
jsi::Runtime &rt,
|
4122
|
+
const jsi::Object &value,
|
4123
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
4124
|
+
AppStateBaseAppStateConstants<P0> result{
|
4125
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "initialAppState"), jsInvoker)};
|
4126
|
+
return result;
|
4127
|
+
}
|
4128
|
+
|
4129
|
+
#ifdef DEBUG
|
4130
|
+
static jsi::String initialAppStateToJs(jsi::Runtime &rt, P0 value) {
|
4131
|
+
return bridging::toJs(rt, value);
|
4132
|
+
}
|
4133
|
+
#endif
|
4134
|
+
|
4135
|
+
static jsi::Object toJs(
|
4136
|
+
jsi::Runtime &rt,
|
4137
|
+
const AppStateBaseAppStateConstants<P0> &value,
|
4138
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
4139
|
+
auto result = facebook::jsi::Object(rt);
|
4140
|
+
result.setProperty(rt, "initialAppState", bridging::toJs(rt, value.initialAppState, jsInvoker));
|
4141
|
+
return result;
|
4142
|
+
}
|
4143
|
+
};
|
4144
|
+
|
4145
|
+
|
4146
|
+
|
4147
|
+
#pragma mark - AppStateBaseAppState
|
4148
|
+
|
4149
|
+
template <typename P0>
|
4150
|
+
struct AppStateBaseAppState {
|
4151
|
+
P0 app_state;
|
4152
|
+
bool operator==(const AppStateBaseAppState &other) const {
|
4153
|
+
return app_state == other.app_state;
|
4154
|
+
}
|
4155
|
+
};
|
4156
|
+
|
4157
|
+
template <typename P0>
|
4158
|
+
struct AppStateBaseAppStateBridging {
|
4159
|
+
static AppStateBaseAppState<P0> fromJs(
|
4160
|
+
jsi::Runtime &rt,
|
4161
|
+
const jsi::Object &value,
|
4162
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
4163
|
+
AppStateBaseAppState<P0> result{
|
4164
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "app_state"), jsInvoker)};
|
4165
|
+
return result;
|
4166
|
+
}
|
4167
|
+
|
4168
|
+
#ifdef DEBUG
|
4169
|
+
static jsi::String app_stateToJs(jsi::Runtime &rt, P0 value) {
|
4170
|
+
return bridging::toJs(rt, value);
|
4171
|
+
}
|
4172
|
+
#endif
|
4173
|
+
|
4174
|
+
static jsi::Object toJs(
|
4175
|
+
jsi::Runtime &rt,
|
4176
|
+
const AppStateBaseAppState<P0> &value,
|
4177
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
4178
|
+
auto result = facebook::jsi::Object(rt);
|
4179
|
+
result.setProperty(rt, "app_state", bridging::toJs(rt, value.app_state, jsInvoker));
|
4180
|
+
return result;
|
4181
|
+
}
|
4182
|
+
};
|
4183
|
+
|
4184
|
+
class JSI_EXPORT NativeAppStateCxxSpecJSI : public TurboModule {
|
3272
4185
|
protected:
|
3273
4186
|
NativeAppStateCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
3274
4187
|
|
@@ -3287,9 +4200,11 @@ public:
|
|
3287
4200
|
return delegate_.get(rt, propName);
|
3288
4201
|
}
|
3289
4202
|
|
4203
|
+
static constexpr std::string_view kModuleName = "AppState";
|
4204
|
+
|
3290
4205
|
protected:
|
3291
4206
|
NativeAppStateCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
3292
|
-
: TurboModule(
|
4207
|
+
: TurboModule(std::string{NativeAppStateCxxSpec::kModuleName}, jsInvoker),
|
3293
4208
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
3294
4209
|
|
3295
4210
|
private:
|
@@ -3339,7 +4254,8 @@ private:
|
|
3339
4254
|
};
|
3340
4255
|
|
3341
4256
|
|
3342
|
-
|
4257
|
+
|
4258
|
+
#pragma mark - NativePerformanceObserverCxxBaseRawPerformanceEntry
|
3343
4259
|
|
3344
4260
|
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
|
3345
4261
|
struct NativePerformanceObserverCxxBaseRawPerformanceEntry {
|
@@ -3376,47 +4292,54 @@ struct NativePerformanceObserverCxxBaseRawPerformanceEntryBridging {
|
|
3376
4292
|
static jsi::String nameToJs(jsi::Runtime &rt, P0 value) {
|
3377
4293
|
return bridging::toJs(rt, value);
|
3378
4294
|
}
|
4295
|
+
|
3379
4296
|
static double entryTypeToJs(jsi::Runtime &rt, P1 value) {
|
3380
4297
|
return bridging::toJs(rt, value);
|
3381
4298
|
}
|
4299
|
+
|
3382
4300
|
static double startTimeToJs(jsi::Runtime &rt, P2 value) {
|
3383
4301
|
return bridging::toJs(rt, value);
|
3384
4302
|
}
|
4303
|
+
|
3385
4304
|
static double durationToJs(jsi::Runtime &rt, P3 value) {
|
3386
4305
|
return bridging::toJs(rt, value);
|
3387
4306
|
}
|
4307
|
+
|
3388
4308
|
static double processingStartToJs(jsi::Runtime &rt, P4 value) {
|
3389
4309
|
return bridging::toJs(rt, value);
|
3390
4310
|
}
|
4311
|
+
|
3391
4312
|
static double processingEndToJs(jsi::Runtime &rt, P5 value) {
|
3392
4313
|
return bridging::toJs(rt, value);
|
3393
4314
|
}
|
4315
|
+
|
3394
4316
|
static double interactionIdToJs(jsi::Runtime &rt, P6 value) {
|
3395
4317
|
return bridging::toJs(rt, value);
|
3396
4318
|
}
|
3397
4319
|
#endif
|
3398
4320
|
|
3399
4321
|
static jsi::Object toJs(
|
3400
|
-
|
3401
|
-
|
3402
|
-
|
3403
|
-
|
3404
|
-
|
4322
|
+
jsi::Runtime &rt,
|
4323
|
+
const NativePerformanceObserverCxxBaseRawPerformanceEntry<P0, P1, P2, P3, P4, P5, P6> &value,
|
4324
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
4325
|
+
auto result = facebook::jsi::Object(rt);
|
4326
|
+
result.setProperty(rt, "name", bridging::toJs(rt, value.name, jsInvoker));
|
3405
4327
|
result.setProperty(rt, "entryType", bridging::toJs(rt, value.entryType, jsInvoker));
|
3406
4328
|
result.setProperty(rt, "startTime", bridging::toJs(rt, value.startTime, jsInvoker));
|
3407
4329
|
result.setProperty(rt, "duration", bridging::toJs(rt, value.duration, jsInvoker));
|
3408
4330
|
if (value.processingStart) {
|
3409
|
-
|
3410
|
-
|
4331
|
+
result.setProperty(rt, "processingStart", bridging::toJs(rt, value.processingStart.value(), jsInvoker));
|
4332
|
+
}
|
3411
4333
|
if (value.processingEnd) {
|
3412
|
-
|
3413
|
-
|
4334
|
+
result.setProperty(rt, "processingEnd", bridging::toJs(rt, value.processingEnd.value(), jsInvoker));
|
4335
|
+
}
|
3414
4336
|
if (value.interactionId) {
|
3415
|
-
|
3416
|
-
|
3417
|
-
|
3418
|
-
|
3419
|
-
|
4337
|
+
result.setProperty(rt, "interactionId", bridging::toJs(rt, value.interactionId.value(), jsInvoker));
|
4338
|
+
}
|
4339
|
+
return result;
|
4340
|
+
}
|
4341
|
+
};
|
4342
|
+
|
3420
4343
|
|
3421
4344
|
|
3422
4345
|
#pragma mark - NativePerformanceObserverCxxBaseGetPendingEntriesResult
|
@@ -3446,21 +4369,22 @@ struct NativePerformanceObserverCxxBaseGetPendingEntriesResultBridging {
|
|
3446
4369
|
static jsi::Array entriesToJs(jsi::Runtime &rt, P0 value) {
|
3447
4370
|
return bridging::toJs(rt, value);
|
3448
4371
|
}
|
4372
|
+
|
3449
4373
|
static double droppedEntriesCountToJs(jsi::Runtime &rt, P1 value) {
|
3450
4374
|
return bridging::toJs(rt, value);
|
3451
4375
|
}
|
3452
4376
|
#endif
|
3453
4377
|
|
3454
4378
|
static jsi::Object toJs(
|
3455
|
-
|
3456
|
-
|
3457
|
-
|
3458
|
-
|
3459
|
-
|
4379
|
+
jsi::Runtime &rt,
|
4380
|
+
const NativePerformanceObserverCxxBaseGetPendingEntriesResult<P0, P1> &value,
|
4381
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
4382
|
+
auto result = facebook::jsi::Object(rt);
|
4383
|
+
result.setProperty(rt, "entries", bridging::toJs(rt, value.entries, jsInvoker));
|
3460
4384
|
result.setProperty(rt, "droppedEntriesCount", bridging::toJs(rt, value.droppedEntriesCount, jsInvoker));
|
3461
|
-
|
3462
|
-
|
3463
|
-
|
4385
|
+
return result;
|
4386
|
+
}
|
4387
|
+
};
|
3464
4388
|
|
3465
4389
|
class JSI_EXPORT NativePerformanceObserverCxxSpecJSI : public TurboModule {
|
3466
4390
|
protected:
|
@@ -3469,6 +4393,7 @@ protected:
|
|
3469
4393
|
public:
|
3470
4394
|
virtual void startReporting(jsi::Runtime &rt, double entryType) = 0;
|
3471
4395
|
virtual void stopReporting(jsi::Runtime &rt, double entryType) = 0;
|
4396
|
+
virtual void setIsBuffered(jsi::Runtime &rt, jsi::Array entryTypes, bool isBuffered) = 0;
|
3472
4397
|
virtual jsi::Object popPendingEntries(jsi::Runtime &rt) = 0;
|
3473
4398
|
virtual void setOnPerformanceEntryCallback(jsi::Runtime &rt, std::optional<jsi::Function> callback) = 0;
|
3474
4399
|
virtual void logRawEntry(jsi::Runtime &rt, jsi::Object entry) = 0;
|
@@ -3486,9 +4411,11 @@ public:
|
|
3486
4411
|
return delegate_.get(rt, propName);
|
3487
4412
|
}
|
3488
4413
|
|
4414
|
+
static constexpr std::string_view kModuleName = "NativePerformanceObserverCxx";
|
4415
|
+
|
3489
4416
|
protected:
|
3490
4417
|
NativePerformanceObserverCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
3491
|
-
: TurboModule(
|
4418
|
+
: TurboModule(std::string{NativePerformanceObserverCxxSpec::kModuleName}, jsInvoker),
|
3492
4419
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
3493
4420
|
|
3494
4421
|
private:
|
@@ -3513,6 +4440,14 @@ private:
|
|
3513
4440
|
return bridging::callFromJs<void>(
|
3514
4441
|
rt, &T::stopReporting, jsInvoker_, instance_, std::move(entryType));
|
3515
4442
|
}
|
4443
|
+
void setIsBuffered(jsi::Runtime &rt, jsi::Array entryTypes, bool isBuffered) override {
|
4444
|
+
static_assert(
|
4445
|
+
bridging::getParameterCount(&T::setIsBuffered) == 3,
|
4446
|
+
"Expected setIsBuffered(...) to have 3 parameters");
|
4447
|
+
|
4448
|
+
return bridging::callFromJs<void>(
|
4449
|
+
rt, &T::setIsBuffered, jsInvoker_, instance_, std::move(entryTypes), std::move(isBuffered));
|
4450
|
+
}
|
3516
4451
|
jsi::Object popPendingEntries(jsi::Runtime &rt) override {
|
3517
4452
|
static_assert(
|
3518
4453
|
bridging::getParameterCount(&T::popPendingEntries) == 1,
|
@@ -3578,67 +4513,12 @@ private:
|
|
3578
4513
|
};
|
3579
4514
|
|
3580
4515
|
|
3581
|
-
|
3582
|
-
|
3583
|
-
template <typename P0, typename P1, typename P2, typename P3>
|
3584
|
-
struct NativePerformanceCxxBaseReactNativeStartupTiming {
|
3585
|
-
P0 startTime;
|
3586
|
-
P1 endTime;
|
3587
|
-
P2 executeJavaScriptBundleEntryPointStart;
|
3588
|
-
P3 executeJavaScriptBundleEntryPointEnd;
|
3589
|
-
bool operator==(const NativePerformanceCxxBaseReactNativeStartupTiming &other) const {
|
3590
|
-
return startTime == other.startTime && endTime == other.endTime && executeJavaScriptBundleEntryPointStart == other.executeJavaScriptBundleEntryPointStart && executeJavaScriptBundleEntryPointEnd == other.executeJavaScriptBundleEntryPointEnd;
|
3591
|
-
}
|
3592
|
-
};
|
3593
|
-
|
3594
|
-
template <typename P0, typename P1, typename P2, typename P3>
|
3595
|
-
struct NativePerformanceCxxBaseReactNativeStartupTimingBridging {
|
3596
|
-
static NativePerformanceCxxBaseReactNativeStartupTiming<P0, P1, P2, P3> fromJs(
|
3597
|
-
jsi::Runtime &rt,
|
3598
|
-
const jsi::Object &value,
|
3599
|
-
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
3600
|
-
NativePerformanceCxxBaseReactNativeStartupTiming<P0, P1, P2, P3> result{
|
3601
|
-
bridging::fromJs<P0>(rt, value.getProperty(rt, "startTime"), jsInvoker),
|
3602
|
-
bridging::fromJs<P1>(rt, value.getProperty(rt, "endTime"), jsInvoker),
|
3603
|
-
bridging::fromJs<P2>(rt, value.getProperty(rt, "executeJavaScriptBundleEntryPointStart"), jsInvoker),
|
3604
|
-
bridging::fromJs<P3>(rt, value.getProperty(rt, "executeJavaScriptBundleEntryPointEnd"), jsInvoker)};
|
3605
|
-
return result;
|
3606
|
-
}
|
3607
|
-
|
3608
|
-
#ifdef DEBUG
|
3609
|
-
static double startTimeToJs(jsi::Runtime &rt, P0 value) {
|
3610
|
-
return bridging::toJs(rt, value);
|
3611
|
-
}
|
3612
|
-
static double endTimeToJs(jsi::Runtime &rt, P1 value) {
|
3613
|
-
return bridging::toJs(rt, value);
|
3614
|
-
}
|
3615
|
-
static double executeJavaScriptBundleEntryPointStartToJs(jsi::Runtime &rt, P2 value) {
|
3616
|
-
return bridging::toJs(rt, value);
|
3617
|
-
}
|
3618
|
-
static double executeJavaScriptBundleEntryPointEndToJs(jsi::Runtime &rt, P3 value) {
|
3619
|
-
return bridging::toJs(rt, value);
|
3620
|
-
}
|
3621
|
-
#endif
|
3622
|
-
|
3623
|
-
static jsi::Object toJs(
|
3624
|
-
jsi::Runtime &rt,
|
3625
|
-
const NativePerformanceCxxBaseReactNativeStartupTiming<P0, P1, P2, P3> &value,
|
3626
|
-
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
3627
|
-
auto result = facebook::jsi::Object(rt);
|
3628
|
-
result.setProperty(rt, "startTime", bridging::toJs(rt, value.startTime, jsInvoker));
|
3629
|
-
result.setProperty(rt, "endTime", bridging::toJs(rt, value.endTime, jsInvoker));
|
3630
|
-
result.setProperty(rt, "executeJavaScriptBundleEntryPointStart", bridging::toJs(rt, value.executeJavaScriptBundleEntryPointStart, jsInvoker));
|
3631
|
-
result.setProperty(rt, "executeJavaScriptBundleEntryPointEnd", bridging::toJs(rt, value.executeJavaScriptBundleEntryPointEnd, jsInvoker));
|
3632
|
-
return result;
|
3633
|
-
}
|
3634
|
-
};
|
3635
|
-
|
3636
|
-
class JSI_EXPORT NativePerformanceCxxSpecJSI : public TurboModule {
|
4516
|
+
class JSI_EXPORT NativePerformanceCxxSpecJSI : public TurboModule {
|
3637
4517
|
protected:
|
3638
4518
|
NativePerformanceCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
3639
4519
|
|
3640
4520
|
public:
|
3641
|
-
virtual void mark(jsi::Runtime &rt, jsi::String name, double startTime
|
4521
|
+
virtual void mark(jsi::Runtime &rt, jsi::String name, double startTime) = 0;
|
3642
4522
|
virtual void measure(jsi::Runtime &rt, jsi::String name, double startTime, double endTime, std::optional<double> duration, std::optional<jsi::String> startMark, std::optional<jsi::String> endMark) = 0;
|
3643
4523
|
virtual jsi::Object getSimpleMemoryInfo(jsi::Runtime &rt) = 0;
|
3644
4524
|
virtual jsi::Object getReactNativeStartupTiming(jsi::Runtime &rt) = 0;
|
@@ -3652,9 +4532,11 @@ public:
|
|
3652
4532
|
return delegate_.get(rt, propName);
|
3653
4533
|
}
|
3654
4534
|
|
4535
|
+
static constexpr std::string_view kModuleName = "NativePerformanceCxx";
|
4536
|
+
|
3655
4537
|
protected:
|
3656
4538
|
NativePerformanceCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
3657
|
-
: TurboModule(
|
4539
|
+
: TurboModule(std::string{NativePerformanceCxxSpec::kModuleName}, jsInvoker),
|
3658
4540
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
3659
4541
|
|
3660
4542
|
private:
|
@@ -3663,13 +4545,13 @@ private:
|
|
3663
4545
|
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
3664
4546
|
NativePerformanceCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {}
|
3665
4547
|
|
3666
|
-
void mark(jsi::Runtime &rt, jsi::String name, double startTime
|
4548
|
+
void mark(jsi::Runtime &rt, jsi::String name, double startTime) override {
|
3667
4549
|
static_assert(
|
3668
|
-
bridging::getParameterCount(&T::mark) ==
|
3669
|
-
"Expected mark(...) to have
|
4550
|
+
bridging::getParameterCount(&T::mark) == 3,
|
4551
|
+
"Expected mark(...) to have 3 parameters");
|
3670
4552
|
|
3671
4553
|
return bridging::callFromJs<void>(
|
3672
|
-
rt, &T::mark, jsInvoker_, instance_, std::move(name), std::move(startTime)
|
4554
|
+
rt, &T::mark, jsInvoker_, instance_, std::move(name), std::move(startTime));
|
3673
4555
|
}
|
3674
4556
|
void measure(jsi::Runtime &rt, jsi::String name, double startTime, double endTime, std::optional<double> duration, std::optional<jsi::String> startMark, std::optional<jsi::String> endMark) override {
|
3675
4557
|
static_assert(
|
@@ -3722,9 +4604,11 @@ public:
|
|
3722
4604
|
return delegate_.get(rt, propName);
|
3723
4605
|
}
|
3724
4606
|
|
4607
|
+
static constexpr std::string_view kModuleName = "BugReporting";
|
4608
|
+
|
3725
4609
|
protected:
|
3726
4610
|
NativeBugReportingCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
3727
|
-
: TurboModule(
|
4611
|
+
: TurboModule(std::string{NativeBugReportingCxxSpec::kModuleName}, jsInvoker),
|
3728
4612
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
3729
4613
|
|
3730
4614
|
private:
|
@@ -3782,9 +4666,11 @@ public:
|
|
3782
4666
|
return delegate_.get(rt, propName);
|
3783
4667
|
}
|
3784
4668
|
|
4669
|
+
static constexpr std::string_view kModuleName = "JSCHeapCapture";
|
4670
|
+
|
3785
4671
|
protected:
|
3786
4672
|
NativeJSCHeapCaptureCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
3787
|
-
: TurboModule(
|
4673
|
+
: TurboModule(std::string{NativeJSCHeapCaptureCxxSpec::kModuleName}, jsInvoker),
|
3788
4674
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
3789
4675
|
|
3790
4676
|
private:
|
@@ -3826,9 +4712,11 @@ public:
|
|
3826
4712
|
return delegate_.get(rt, propName);
|
3827
4713
|
}
|
3828
4714
|
|
4715
|
+
static constexpr std::string_view kModuleName = "JSCSamplingProfiler";
|
4716
|
+
|
3829
4717
|
protected:
|
3830
4718
|
NativeJSCSamplingProfilerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
3831
|
-
: TurboModule(
|
4719
|
+
: TurboModule(std::string{NativeJSCSamplingProfilerCxxSpec::kModuleName}, jsInvoker),
|
3832
4720
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
3833
4721
|
|
3834
4722
|
private:
|
@@ -3871,9 +4759,11 @@ public:
|
|
3871
4759
|
return delegate_.get(rt, propName);
|
3872
4760
|
}
|
3873
4761
|
|
4762
|
+
static constexpr std::string_view kModuleName = "ModalManager";
|
4763
|
+
|
3874
4764
|
protected:
|
3875
4765
|
NativeModalManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
3876
|
-
: TurboModule(
|
4766
|
+
: TurboModule(std::string{NativeModalManagerCxxSpec::kModuleName}, jsInvoker),
|
3877
4767
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
3878
4768
|
|
3879
4769
|
private:
|
@@ -3924,9 +4814,11 @@ public:
|
|
3924
4814
|
return delegate_.get(rt, propName);
|
3925
4815
|
}
|
3926
4816
|
|
4817
|
+
static constexpr std::string_view kModuleName = "FileReaderModule";
|
4818
|
+
|
3927
4819
|
protected:
|
3928
4820
|
NativeFileReaderModuleCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
3929
|
-
: TurboModule(
|
4821
|
+
: TurboModule(std::string{NativeFileReaderModuleCxxSpec::kModuleName}, jsInvoker),
|
3930
4822
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
3931
4823
|
|
3932
4824
|
private:
|
@@ -3982,9 +4874,11 @@ public:
|
|
3982
4874
|
return delegate_.get(rt, propName);
|
3983
4875
|
}
|
3984
4876
|
|
4877
|
+
static constexpr std::string_view kModuleName = "BlobModule";
|
4878
|
+
|
3985
4879
|
protected:
|
3986
4880
|
NativeBlobModuleCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
3987
|
-
: TurboModule(
|
4881
|
+
: TurboModule(std::string{NativeBlobModuleCxxSpec::kModuleName}, jsInvoker),
|
3988
4882
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
3989
4883
|
|
3990
4884
|
private:
|
@@ -4077,9 +4971,11 @@ public:
|
|
4077
4971
|
return delegate_.get(rt, propName);
|
4078
4972
|
}
|
4079
4973
|
|
4974
|
+
static constexpr std::string_view kModuleName = "FrameRateLogger";
|
4975
|
+
|
4080
4976
|
protected:
|
4081
4977
|
NativeFrameRateLoggerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
4082
|
-
: TurboModule(
|
4978
|
+
: TurboModule(std::string{NativeFrameRateLoggerCxxSpec::kModuleName}, jsInvoker),
|
4083
4979
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
4084
4980
|
|
4085
4981
|
private:
|
@@ -4129,7 +5025,61 @@ private:
|
|
4129
5025
|
};
|
4130
5026
|
|
4131
5027
|
|
4132
|
-
|
5028
|
+
|
5029
|
+
#pragma mark - I18nManagerBaseI18nManagerConstants
|
5030
|
+
|
5031
|
+
template <typename P0, typename P1, typename P2>
|
5032
|
+
struct I18nManagerBaseI18nManagerConstants {
|
5033
|
+
P0 doLeftAndRightSwapInRTL;
|
5034
|
+
P1 isRTL;
|
5035
|
+
P2 localeIdentifier;
|
5036
|
+
bool operator==(const I18nManagerBaseI18nManagerConstants &other) const {
|
5037
|
+
return doLeftAndRightSwapInRTL == other.doLeftAndRightSwapInRTL && isRTL == other.isRTL && localeIdentifier == other.localeIdentifier;
|
5038
|
+
}
|
5039
|
+
};
|
5040
|
+
|
5041
|
+
template <typename P0, typename P1, typename P2>
|
5042
|
+
struct I18nManagerBaseI18nManagerConstantsBridging {
|
5043
|
+
static I18nManagerBaseI18nManagerConstants<P0, P1, P2> fromJs(
|
5044
|
+
jsi::Runtime &rt,
|
5045
|
+
const jsi::Object &value,
|
5046
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
5047
|
+
I18nManagerBaseI18nManagerConstants<P0, P1, P2> result{
|
5048
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "doLeftAndRightSwapInRTL"), jsInvoker),
|
5049
|
+
bridging::fromJs<P1>(rt, value.getProperty(rt, "isRTL"), jsInvoker),
|
5050
|
+
bridging::fromJs<P2>(rt, value.getProperty(rt, "localeIdentifier"), jsInvoker)};
|
5051
|
+
return result;
|
5052
|
+
}
|
5053
|
+
|
5054
|
+
#ifdef DEBUG
|
5055
|
+
static bool doLeftAndRightSwapInRTLToJs(jsi::Runtime &rt, P0 value) {
|
5056
|
+
return bridging::toJs(rt, value);
|
5057
|
+
}
|
5058
|
+
|
5059
|
+
static bool isRTLToJs(jsi::Runtime &rt, P1 value) {
|
5060
|
+
return bridging::toJs(rt, value);
|
5061
|
+
}
|
5062
|
+
|
5063
|
+
static std::optional<jsi::String> localeIdentifierToJs(jsi::Runtime &rt, P2 value) {
|
5064
|
+
return bridging::toJs(rt, value);
|
5065
|
+
}
|
5066
|
+
#endif
|
5067
|
+
|
5068
|
+
static jsi::Object toJs(
|
5069
|
+
jsi::Runtime &rt,
|
5070
|
+
const I18nManagerBaseI18nManagerConstants<P0, P1, P2> &value,
|
5071
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
5072
|
+
auto result = facebook::jsi::Object(rt);
|
5073
|
+
result.setProperty(rt, "doLeftAndRightSwapInRTL", bridging::toJs(rt, value.doLeftAndRightSwapInRTL, jsInvoker));
|
5074
|
+
result.setProperty(rt, "isRTL", bridging::toJs(rt, value.isRTL, jsInvoker));
|
5075
|
+
if (value.localeIdentifier) {
|
5076
|
+
result.setProperty(rt, "localeIdentifier", bridging::toJs(rt, value.localeIdentifier.value(), jsInvoker));
|
5077
|
+
}
|
5078
|
+
return result;
|
5079
|
+
}
|
5080
|
+
};
|
5081
|
+
|
5082
|
+
class JSI_EXPORT NativeI18nManagerCxxSpecJSI : public TurboModule {
|
4133
5083
|
protected:
|
4134
5084
|
NativeI18nManagerCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
4135
5085
|
|
@@ -4148,9 +5098,11 @@ public:
|
|
4148
5098
|
return delegate_.get(rt, propName);
|
4149
5099
|
}
|
4150
5100
|
|
5101
|
+
static constexpr std::string_view kModuleName = "I18nManager";
|
5102
|
+
|
4151
5103
|
protected:
|
4152
5104
|
NativeI18nManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
4153
|
-
: TurboModule(
|
5105
|
+
: TurboModule(std::string{NativeI18nManagerCxxSpec::kModuleName}, jsInvoker),
|
4154
5106
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
4155
5107
|
|
4156
5108
|
private:
|
@@ -4217,9 +5169,11 @@ public:
|
|
4217
5169
|
return delegate_.get(rt, propName);
|
4218
5170
|
}
|
4219
5171
|
|
5172
|
+
static constexpr std::string_view kModuleName = "HeadlessJsTaskSupport";
|
5173
|
+
|
4220
5174
|
protected:
|
4221
5175
|
NativeHeadlessJsTaskSupportCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
4222
|
-
: TurboModule(
|
5176
|
+
: TurboModule(std::string{NativeHeadlessJsTaskSupportCxxSpec::kModuleName}, jsInvoker),
|
4223
5177
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
4224
5178
|
|
4225
5179
|
private:
|
@@ -4253,24 +5207,27 @@ private:
|
|
4253
5207
|
};
|
4254
5208
|
|
4255
5209
|
|
4256
|
-
|
5210
|
+
|
5211
|
+
#pragma mark - NativeAnimatedTurboModuleBaseEndResult
|
4257
5212
|
|
4258
|
-
template <typename P0>
|
5213
|
+
template <typename P0, typename P1>
|
4259
5214
|
struct NativeAnimatedTurboModuleBaseEndResult {
|
4260
5215
|
P0 finished;
|
5216
|
+
P1 value;
|
4261
5217
|
bool operator==(const NativeAnimatedTurboModuleBaseEndResult &other) const {
|
4262
|
-
return finished == other.finished;
|
5218
|
+
return finished == other.finished && value == other.value;
|
4263
5219
|
}
|
4264
5220
|
};
|
4265
5221
|
|
4266
|
-
template <typename P0>
|
5222
|
+
template <typename P0, typename P1>
|
4267
5223
|
struct NativeAnimatedTurboModuleBaseEndResultBridging {
|
4268
|
-
static NativeAnimatedTurboModuleBaseEndResult<P0> fromJs(
|
5224
|
+
static NativeAnimatedTurboModuleBaseEndResult<P0, P1> fromJs(
|
4269
5225
|
jsi::Runtime &rt,
|
4270
5226
|
const jsi::Object &value,
|
4271
5227
|
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
4272
|
-
NativeAnimatedTurboModuleBaseEndResult<P0> result{
|
4273
|
-
bridging::fromJs<P0>(rt, value.getProperty(rt, "finished"), jsInvoker)
|
5228
|
+
NativeAnimatedTurboModuleBaseEndResult<P0, P1> result{
|
5229
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "finished"), jsInvoker),
|
5230
|
+
bridging::fromJs<P1>(rt, value.getProperty(rt, "value"), jsInvoker)};
|
4274
5231
|
return result;
|
4275
5232
|
}
|
4276
5233
|
|
@@ -4278,17 +5235,25 @@ struct NativeAnimatedTurboModuleBaseEndResultBridging {
|
|
4278
5235
|
static bool finishedToJs(jsi::Runtime &rt, P0 value) {
|
4279
5236
|
return bridging::toJs(rt, value);
|
4280
5237
|
}
|
5238
|
+
|
5239
|
+
static double valueToJs(jsi::Runtime &rt, P1 value) {
|
5240
|
+
return bridging::toJs(rt, value);
|
5241
|
+
}
|
4281
5242
|
#endif
|
4282
5243
|
|
4283
5244
|
static jsi::Object toJs(
|
4284
|
-
|
4285
|
-
|
4286
|
-
|
4287
|
-
|
4288
|
-
|
4289
|
-
|
4290
|
-
|
4291
|
-
|
5245
|
+
jsi::Runtime &rt,
|
5246
|
+
const NativeAnimatedTurboModuleBaseEndResult<P0, P1> &value,
|
5247
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
5248
|
+
auto result = facebook::jsi::Object(rt);
|
5249
|
+
result.setProperty(rt, "finished", bridging::toJs(rt, value.finished, jsInvoker));
|
5250
|
+
if (value.value) {
|
5251
|
+
result.setProperty(rt, "value", bridging::toJs(rt, value.value.value(), jsInvoker));
|
5252
|
+
}
|
5253
|
+
return result;
|
5254
|
+
}
|
5255
|
+
};
|
5256
|
+
|
4292
5257
|
|
4293
5258
|
|
4294
5259
|
#pragma mark - NativeAnimatedTurboModuleBaseEventMapping
|
@@ -4318,21 +5283,22 @@ struct NativeAnimatedTurboModuleBaseEventMappingBridging {
|
|
4318
5283
|
static jsi::Array nativeEventPathToJs(jsi::Runtime &rt, P0 value) {
|
4319
5284
|
return bridging::toJs(rt, value);
|
4320
5285
|
}
|
5286
|
+
|
4321
5287
|
static std::optional<double> animatedValueTagToJs(jsi::Runtime &rt, P1 value) {
|
4322
5288
|
return bridging::toJs(rt, value);
|
4323
5289
|
}
|
4324
5290
|
#endif
|
4325
5291
|
|
4326
5292
|
static jsi::Object toJs(
|
4327
|
-
|
4328
|
-
|
4329
|
-
|
4330
|
-
|
4331
|
-
|
5293
|
+
jsi::Runtime &rt,
|
5294
|
+
const NativeAnimatedTurboModuleBaseEventMapping<P0, P1> &value,
|
5295
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
5296
|
+
auto result = facebook::jsi::Object(rt);
|
5297
|
+
result.setProperty(rt, "nativeEventPath", bridging::toJs(rt, value.nativeEventPath, jsInvoker));
|
4332
5298
|
result.setProperty(rt, "animatedValueTag", bridging::toJs(rt, value.animatedValueTag, jsInvoker));
|
4333
|
-
|
4334
|
-
|
4335
|
-
|
5299
|
+
return result;
|
5300
|
+
}
|
5301
|
+
};
|
4336
5302
|
|
4337
5303
|
class JSI_EXPORT NativeAnimatedTurboModuleCxxSpecJSI : public TurboModule {
|
4338
5304
|
protected:
|
@@ -4373,9 +5339,11 @@ public:
|
|
4373
5339
|
return delegate_.get(rt, propName);
|
4374
5340
|
}
|
4375
5341
|
|
5342
|
+
static constexpr std::string_view kModuleName = "NativeAnimatedTurboModule";
|
5343
|
+
|
4376
5344
|
protected:
|
4377
5345
|
NativeAnimatedTurboModuleCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
4378
|
-
: TurboModule(
|
5346
|
+
: TurboModule(std::string{NativeAnimatedTurboModuleCxxSpec::kModuleName}, jsInvoker),
|
4379
5347
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
4380
5348
|
|
4381
5349
|
private:
|
@@ -4585,24 +5553,27 @@ private:
|
|
4585
5553
|
};
|
4586
5554
|
|
4587
5555
|
|
4588
|
-
|
5556
|
+
|
5557
|
+
#pragma mark - NativeAnimatedModuleBaseEndResult
|
4589
5558
|
|
4590
|
-
template <typename P0>
|
5559
|
+
template <typename P0, typename P1>
|
4591
5560
|
struct NativeAnimatedModuleBaseEndResult {
|
4592
5561
|
P0 finished;
|
5562
|
+
P1 value;
|
4593
5563
|
bool operator==(const NativeAnimatedModuleBaseEndResult &other) const {
|
4594
|
-
return finished == other.finished;
|
5564
|
+
return finished == other.finished && value == other.value;
|
4595
5565
|
}
|
4596
5566
|
};
|
4597
5567
|
|
4598
|
-
template <typename P0>
|
5568
|
+
template <typename P0, typename P1>
|
4599
5569
|
struct NativeAnimatedModuleBaseEndResultBridging {
|
4600
|
-
static NativeAnimatedModuleBaseEndResult<P0> fromJs(
|
5570
|
+
static NativeAnimatedModuleBaseEndResult<P0, P1> fromJs(
|
4601
5571
|
jsi::Runtime &rt,
|
4602
5572
|
const jsi::Object &value,
|
4603
5573
|
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
4604
|
-
NativeAnimatedModuleBaseEndResult<P0> result{
|
4605
|
-
bridging::fromJs<P0>(rt, value.getProperty(rt, "finished"), jsInvoker)
|
5574
|
+
NativeAnimatedModuleBaseEndResult<P0, P1> result{
|
5575
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "finished"), jsInvoker),
|
5576
|
+
bridging::fromJs<P1>(rt, value.getProperty(rt, "value"), jsInvoker)};
|
4606
5577
|
return result;
|
4607
5578
|
}
|
4608
5579
|
|
@@ -4610,17 +5581,25 @@ struct NativeAnimatedModuleBaseEndResultBridging {
|
|
4610
5581
|
static bool finishedToJs(jsi::Runtime &rt, P0 value) {
|
4611
5582
|
return bridging::toJs(rt, value);
|
4612
5583
|
}
|
5584
|
+
|
5585
|
+
static double valueToJs(jsi::Runtime &rt, P1 value) {
|
5586
|
+
return bridging::toJs(rt, value);
|
5587
|
+
}
|
4613
5588
|
#endif
|
4614
5589
|
|
4615
5590
|
static jsi::Object toJs(
|
4616
|
-
|
4617
|
-
|
4618
|
-
|
4619
|
-
|
4620
|
-
|
4621
|
-
|
4622
|
-
|
4623
|
-
|
5591
|
+
jsi::Runtime &rt,
|
5592
|
+
const NativeAnimatedModuleBaseEndResult<P0, P1> &value,
|
5593
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
5594
|
+
auto result = facebook::jsi::Object(rt);
|
5595
|
+
result.setProperty(rt, "finished", bridging::toJs(rt, value.finished, jsInvoker));
|
5596
|
+
if (value.value) {
|
5597
|
+
result.setProperty(rt, "value", bridging::toJs(rt, value.value.value(), jsInvoker));
|
5598
|
+
}
|
5599
|
+
return result;
|
5600
|
+
}
|
5601
|
+
};
|
5602
|
+
|
4624
5603
|
|
4625
5604
|
|
4626
5605
|
#pragma mark - NativeAnimatedModuleBaseEventMapping
|
@@ -4650,21 +5629,22 @@ struct NativeAnimatedModuleBaseEventMappingBridging {
|
|
4650
5629
|
static jsi::Array nativeEventPathToJs(jsi::Runtime &rt, P0 value) {
|
4651
5630
|
return bridging::toJs(rt, value);
|
4652
5631
|
}
|
5632
|
+
|
4653
5633
|
static std::optional<double> animatedValueTagToJs(jsi::Runtime &rt, P1 value) {
|
4654
5634
|
return bridging::toJs(rt, value);
|
4655
5635
|
}
|
4656
5636
|
#endif
|
4657
5637
|
|
4658
5638
|
static jsi::Object toJs(
|
4659
|
-
|
4660
|
-
|
4661
|
-
|
4662
|
-
|
4663
|
-
|
5639
|
+
jsi::Runtime &rt,
|
5640
|
+
const NativeAnimatedModuleBaseEventMapping<P0, P1> &value,
|
5641
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
5642
|
+
auto result = facebook::jsi::Object(rt);
|
5643
|
+
result.setProperty(rt, "nativeEventPath", bridging::toJs(rt, value.nativeEventPath, jsInvoker));
|
4664
5644
|
result.setProperty(rt, "animatedValueTag", bridging::toJs(rt, value.animatedValueTag, jsInvoker));
|
4665
|
-
|
4666
|
-
|
4667
|
-
|
5645
|
+
return result;
|
5646
|
+
}
|
5647
|
+
};
|
4668
5648
|
|
4669
5649
|
class JSI_EXPORT NativeAnimatedModuleCxxSpecJSI : public TurboModule {
|
4670
5650
|
protected:
|
@@ -4705,9 +5685,11 @@ public:
|
|
4705
5685
|
return delegate_.get(rt, propName);
|
4706
5686
|
}
|
4707
5687
|
|
5688
|
+
static constexpr std::string_view kModuleName = "NativeAnimatedModule";
|
5689
|
+
|
4708
5690
|
protected:
|
4709
5691
|
NativeAnimatedModuleCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
4710
|
-
: TurboModule(
|
5692
|
+
: TurboModule(std::string{NativeAnimatedModuleCxxSpec::kModuleName}, jsInvoker),
|
4711
5693
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
4712
5694
|
|
4713
5695
|
private:
|
@@ -4917,7 +5899,8 @@ private:
|
|
4917
5899
|
};
|
4918
5900
|
|
4919
5901
|
|
4920
|
-
|
5902
|
+
|
5903
|
+
#pragma mark - PushNotificationManagerBasePermissions
|
4921
5904
|
|
4922
5905
|
template <typename P0, typename P1, typename P2>
|
4923
5906
|
struct PushNotificationManagerBasePermissions {
|
@@ -4946,25 +5929,28 @@ struct PushNotificationManagerBasePermissionsBridging {
|
|
4946
5929
|
static bool alertToJs(jsi::Runtime &rt, P0 value) {
|
4947
5930
|
return bridging::toJs(rt, value);
|
4948
5931
|
}
|
5932
|
+
|
4949
5933
|
static bool badgeToJs(jsi::Runtime &rt, P1 value) {
|
4950
5934
|
return bridging::toJs(rt, value);
|
4951
5935
|
}
|
5936
|
+
|
4952
5937
|
static bool soundToJs(jsi::Runtime &rt, P2 value) {
|
4953
5938
|
return bridging::toJs(rt, value);
|
4954
5939
|
}
|
4955
5940
|
#endif
|
4956
5941
|
|
4957
5942
|
static jsi::Object toJs(
|
4958
|
-
|
4959
|
-
|
4960
|
-
|
4961
|
-
|
4962
|
-
|
5943
|
+
jsi::Runtime &rt,
|
5944
|
+
const PushNotificationManagerBasePermissions<P0, P1, P2> &value,
|
5945
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
5946
|
+
auto result = facebook::jsi::Object(rt);
|
5947
|
+
result.setProperty(rt, "alert", bridging::toJs(rt, value.alert, jsInvoker));
|
4963
5948
|
result.setProperty(rt, "badge", bridging::toJs(rt, value.badge, jsInvoker));
|
4964
5949
|
result.setProperty(rt, "sound", bridging::toJs(rt, value.sound, jsInvoker));
|
4965
|
-
|
4966
|
-
|
4967
|
-
|
5950
|
+
return result;
|
5951
|
+
}
|
5952
|
+
};
|
5953
|
+
|
4968
5954
|
|
4969
5955
|
|
4970
5956
|
#pragma mark - PushNotificationManagerBaseNotification
|
@@ -5010,73 +5996,82 @@ struct PushNotificationManagerBaseNotificationBridging {
|
|
5010
5996
|
static std::optional<jsi::String> alertTitleToJs(jsi::Runtime &rt, P0 value) {
|
5011
5997
|
return bridging::toJs(rt, value);
|
5012
5998
|
}
|
5999
|
+
|
5013
6000
|
static std::optional<double> fireDateToJs(jsi::Runtime &rt, P1 value) {
|
5014
6001
|
return bridging::toJs(rt, value);
|
5015
6002
|
}
|
6003
|
+
|
5016
6004
|
static std::optional<jsi::String> alertBodyToJs(jsi::Runtime &rt, P2 value) {
|
5017
6005
|
return bridging::toJs(rt, value);
|
5018
6006
|
}
|
6007
|
+
|
5019
6008
|
static std::optional<jsi::String> alertActionToJs(jsi::Runtime &rt, P3 value) {
|
5020
6009
|
return bridging::toJs(rt, value);
|
5021
6010
|
}
|
6011
|
+
|
5022
6012
|
static std::optional<jsi::Object> userInfoToJs(jsi::Runtime &rt, P4 value) {
|
5023
6013
|
return bridging::toJs(rt, value);
|
5024
6014
|
}
|
6015
|
+
|
5025
6016
|
static std::optional<jsi::String> categoryToJs(jsi::Runtime &rt, P5 value) {
|
5026
6017
|
return bridging::toJs(rt, value);
|
5027
6018
|
}
|
6019
|
+
|
5028
6020
|
static std::optional<jsi::String> repeatIntervalToJs(jsi::Runtime &rt, P6 value) {
|
5029
6021
|
return bridging::toJs(rt, value);
|
5030
6022
|
}
|
6023
|
+
|
5031
6024
|
static std::optional<double> applicationIconBadgeNumberToJs(jsi::Runtime &rt, P7 value) {
|
5032
6025
|
return bridging::toJs(rt, value);
|
5033
6026
|
}
|
6027
|
+
|
5034
6028
|
static std::optional<bool> isSilentToJs(jsi::Runtime &rt, P8 value) {
|
5035
6029
|
return bridging::toJs(rt, value);
|
5036
6030
|
}
|
6031
|
+
|
5037
6032
|
static std::optional<jsi::String> soundNameToJs(jsi::Runtime &rt, P9 value) {
|
5038
6033
|
return bridging::toJs(rt, value);
|
5039
6034
|
}
|
5040
6035
|
#endif
|
5041
6036
|
|
5042
6037
|
static jsi::Object toJs(
|
5043
|
-
|
5044
|
-
|
5045
|
-
|
5046
|
-
|
5047
|
-
|
5048
|
-
|
5049
|
-
|
6038
|
+
jsi::Runtime &rt,
|
6039
|
+
const PushNotificationManagerBaseNotification<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> &value,
|
6040
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
6041
|
+
auto result = facebook::jsi::Object(rt);
|
6042
|
+
if (value.alertTitle) {
|
6043
|
+
result.setProperty(rt, "alertTitle", bridging::toJs(rt, value.alertTitle.value(), jsInvoker));
|
6044
|
+
}
|
5050
6045
|
if (value.fireDate) {
|
5051
|
-
|
5052
|
-
|
6046
|
+
result.setProperty(rt, "fireDate", bridging::toJs(rt, value.fireDate.value(), jsInvoker));
|
6047
|
+
}
|
5053
6048
|
if (value.alertBody) {
|
5054
|
-
|
5055
|
-
|
6049
|
+
result.setProperty(rt, "alertBody", bridging::toJs(rt, value.alertBody.value(), jsInvoker));
|
6050
|
+
}
|
5056
6051
|
if (value.alertAction) {
|
5057
|
-
|
5058
|
-
|
6052
|
+
result.setProperty(rt, "alertAction", bridging::toJs(rt, value.alertAction.value(), jsInvoker));
|
6053
|
+
}
|
5059
6054
|
if (value.userInfo) {
|
5060
|
-
|
5061
|
-
|
6055
|
+
result.setProperty(rt, "userInfo", bridging::toJs(rt, value.userInfo.value(), jsInvoker));
|
6056
|
+
}
|
5062
6057
|
if (value.category) {
|
5063
|
-
|
5064
|
-
|
6058
|
+
result.setProperty(rt, "category", bridging::toJs(rt, value.category.value(), jsInvoker));
|
6059
|
+
}
|
5065
6060
|
if (value.repeatInterval) {
|
5066
|
-
|
5067
|
-
|
6061
|
+
result.setProperty(rt, "repeatInterval", bridging::toJs(rt, value.repeatInterval.value(), jsInvoker));
|
6062
|
+
}
|
5068
6063
|
if (value.applicationIconBadgeNumber) {
|
5069
|
-
|
5070
|
-
|
6064
|
+
result.setProperty(rt, "applicationIconBadgeNumber", bridging::toJs(rt, value.applicationIconBadgeNumber.value(), jsInvoker));
|
6065
|
+
}
|
5071
6066
|
if (value.isSilent) {
|
5072
|
-
|
5073
|
-
|
6067
|
+
result.setProperty(rt, "isSilent", bridging::toJs(rt, value.isSilent.value(), jsInvoker));
|
6068
|
+
}
|
5074
6069
|
if (value.soundName) {
|
5075
|
-
|
5076
|
-
|
5077
|
-
|
5078
|
-
|
5079
|
-
|
6070
|
+
result.setProperty(rt, "soundName", bridging::toJs(rt, value.soundName.value(), jsInvoker));
|
6071
|
+
}
|
6072
|
+
return result;
|
6073
|
+
}
|
6074
|
+
};
|
5080
6075
|
|
5081
6076
|
class JSI_EXPORT NativePushNotificationManagerIOSCxxSpecJSI : public TurboModule {
|
5082
6077
|
protected:
|
@@ -5112,9 +6107,11 @@ public:
|
|
5112
6107
|
return delegate_.get(rt, propName);
|
5113
6108
|
}
|
5114
6109
|
|
6110
|
+
static constexpr std::string_view kModuleName = "PushNotificationManager";
|
6111
|
+
|
5115
6112
|
protected:
|
5116
6113
|
NativePushNotificationManagerIOSCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
5117
|
-
: TurboModule(
|
6114
|
+
: TurboModule(std::string{NativePushNotificationManagerIOSCxxSpec::kModuleName}, jsInvoker),
|
5118
6115
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
5119
6116
|
|
5120
6117
|
private:
|
@@ -5305,9 +6302,11 @@ public:
|
|
5305
6302
|
return delegate_.get(rt, propName);
|
5306
6303
|
}
|
5307
6304
|
|
6305
|
+
static constexpr std::string_view kModuleName = "LinkingManager";
|
6306
|
+
|
5308
6307
|
protected:
|
5309
6308
|
NativeLinkingManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
5310
|
-
: TurboModule(
|
6309
|
+
: TurboModule(std::string{NativeLinkingManagerCxxSpec::kModuleName}, jsInvoker),
|
5311
6310
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
5312
6311
|
|
5313
6312
|
private:
|
@@ -5393,9 +6392,11 @@ public:
|
|
5393
6392
|
return delegate_.get(rt, propName);
|
5394
6393
|
}
|
5395
6394
|
|
6395
|
+
static constexpr std::string_view kModuleName = "IntentAndroid";
|
6396
|
+
|
5396
6397
|
protected:
|
5397
6398
|
NativeIntentAndroidCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
5398
|
-
: TurboModule(
|
6399
|
+
: TurboModule(std::string{NativeIntentAndroidCxxSpec::kModuleName}, jsInvoker),
|
5399
6400
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
5400
6401
|
|
5401
6402
|
private:
|
@@ -5470,9 +6471,11 @@ public:
|
|
5470
6471
|
return delegate_.get(rt, propName);
|
5471
6472
|
}
|
5472
6473
|
|
6474
|
+
static constexpr std::string_view kModuleName = "ShareModule";
|
6475
|
+
|
5473
6476
|
protected:
|
5474
6477
|
NativeShareModuleCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
5475
|
-
: TurboModule(
|
6478
|
+
: TurboModule(std::string{NativeShareModuleCxxSpec::kModuleName}, jsInvoker),
|
5476
6479
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
5477
6480
|
|
5478
6481
|
private:
|