react-native-windows 0.72.16 → 0.73.0-preview.2
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/.flowconfig +16 -5
- package/Chakra/ChakraHelpers.cpp +1 -1
- package/Chakra/ChakraUtils.cpp +1 -1
- package/Chakra/ChakraValue.h +1 -1
- package/Common/packages.lock.json +13 -0
- package/Directory.Build.props +6 -2
- package/Folly/TEMP_UntilFollyUpdate/dynamic-inl.h +1 -10
- package/Folly/TEMP_UntilFollyUpdate/hash/Hash.h +1016 -0
- package/Folly/TEMP_UntilFollyUpdate/lang/ToAscii.h +1 -1
- package/Folly/cgmanifest.json +1 -1
- package/Folly/packages.lock.json +23 -0
- package/Libraries/Animated/Animated.js +1 -1
- package/Libraries/Animated/AnimatedImplementation.js +1 -1
- package/Libraries/Animated/NativeAnimatedHelper.js +14 -10
- package/Libraries/Animated/NativeAnimatedModule.js +6 -2
- package/Libraries/Animated/NativeAnimatedTurboModule.js +7 -4
- package/Libraries/Animated/animations/Animation.js +57 -3
- package/Libraries/Animated/animations/DecayAnimation.js +9 -0
- package/Libraries/Animated/animations/SpringAnimation.js +8 -0
- package/Libraries/Animated/animations/TimingAnimation.js +8 -0
- package/Libraries/Animated/components/AnimatedFlatList.js +2 -1
- package/Libraries/Animated/components/AnimatedScrollView.js +2 -0
- package/Libraries/Animated/components/AnimatedSectionList.js +2 -1
- package/Libraries/Animated/createAnimatedComponent.js +1 -0
- package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
- package/Libraries/Animated/nodes/AnimatedObject.js +146 -0
- package/Libraries/Animated/nodes/AnimatedProps.js +19 -7
- package/Libraries/Animated/nodes/AnimatedStyle.js +29 -55
- package/Libraries/Animated/nodes/AnimatedValueXY.js +3 -17
- package/Libraries/Animated/shouldUseTurboAnimatedModule.js +17 -0
- package/Libraries/Animated/useAnimatedProps.js +9 -10
- package/Libraries/AppState/AppState.d.ts +1 -1
- package/Libraries/AppState/NativeAppState.js +8 -4
- package/Libraries/AppTheme/AppTheme.js +5 -5
- package/Libraries/BatchedBridge/MessageQueue.js +45 -36
- package/Libraries/Blob/Blob.js +6 -2
- package/Libraries/Blob/BlobManager.js +9 -10
- package/Libraries/Blob/BlobRegistry.js +14 -9
- package/Libraries/Blob/File.js +1 -1
- package/Libraries/Blob/FileReader.js +1 -2
- package/Libraries/Components/Clipboard/Clipboard.d.ts +4 -4
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +3 -1
- package/Libraries/Components/Glyph/Glyph.js +1 -1
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +26 -6
- package/Libraries/Components/Keyboard/KeyboardExt.d.ts +4 -1
- package/Libraries/Components/Keyboard/KeyboardExt.js +3 -0
- package/Libraries/Components/Keyboard/KeyboardExt.js.map +1 -1
- package/Libraries/Components/Keyboard/KeyboardExtProps.d.ts +4 -29
- package/Libraries/Components/Keyboard/KeyboardExtProps.js +0 -17
- package/Libraries/Components/Keyboard/KeyboardExtProps.js.map +1 -1
- package/Libraries/Components/Pressable/Pressable.js +3 -2
- package/Libraries/Components/Pressable/Pressable.windows.js +4 -3
- package/Libraries/Components/Pressable/useAndroidRippleForView.js +1 -1
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +20 -0
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.windows.js +7 -1
- package/Libraries/Components/SafeAreaView/SafeAreaView.js +7 -7
- package/Libraries/Components/SafeAreaView/SafeAreaView.windows.js +7 -10
- package/Libraries/Components/ScrollView/ScrollView.js +3 -1
- package/Libraries/Components/ScrollView/ScrollView.windows.js +3 -1
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +39 -46
- package/Libraries/Components/Switch/Switch.js +1 -0
- package/Libraries/Components/Switch/Switch.windows.js +259 -0
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
- package/Libraries/Components/TextInput/TextInput.d.ts +49 -7
- package/Libraries/Components/TextInput/TextInput.flow.js +43 -10
- package/Libraries/Components/TextInput/TextInput.js +62 -10
- package/Libraries/Components/TextInput/TextInput.windows.js +100 -14
- package/Libraries/Components/ToastAndroid/{ToastAndroid.ios.js → ToastAndroid.js} +9 -1
- package/Libraries/Components/ToastAndroid/ToastAndroid.windows.js +9 -1
- package/Libraries/Components/Touchable/TouchableBounce.js +1 -1
- package/Libraries/Components/Touchable/TouchableHighlight.js +1 -1
- package/Libraries/Components/Touchable/TouchableHighlight.windows.js +1 -1
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +1 -1
- package/Libraries/Components/Touchable/TouchableOpacity.js +4 -1
- package/Libraries/Components/Touchable/TouchableOpacity.windows.js +4 -1
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +1 -0
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +1 -0
- package/Libraries/Components/TraceUpdateOverlay/TraceUpdateOverlay.js +16 -6
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +9 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.js +1 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.windows.js +1 -0
- package/Libraries/Components/View/View.js +46 -32
- package/Libraries/Components/View/View.windows.js +23 -7
- package/Libraries/Components/View/ViewAccessibility.d.ts +27 -1
- package/Libraries/Components/View/ViewAccessibility.windows.js +3 -0
- package/Libraries/Components/View/ViewNativeComponent.js +1 -0
- package/Libraries/Components/View/ViewPropTypes.d.ts +104 -1
- package/Libraries/Components/View/ViewPropTypes.js +18 -3
- package/Libraries/Components/View/ViewPropTypes.windows.js +33 -3
- package/Libraries/Core/Devtools/loadBundleFromServer.js +152 -0
- package/Libraries/Core/Devtools/symbolicateStackTrace.js +2 -1
- package/Libraries/Core/ExceptionsManager.js +16 -7
- package/Libraries/Core/ExtendedError.js +12 -0
- package/Libraries/Core/ReactNativeVersion.js +3 -3
- package/Libraries/Core/ReactNativeVersionCheck.js +0 -2
- package/Libraries/Core/__mocks__/NativeExceptionsManager.js +20 -0
- package/Libraries/Core/setUpDeveloperTools.js +5 -1
- package/Libraries/Core/setUpIntersectionObserver.js +16 -0
- package/Libraries/Core/setUpMutationObserver.js +16 -0
- package/Libraries/Core/setUpPerformance.js +6 -13
- package/Libraries/Core/setUpPerformanceObserver.js +16 -0
- package/Libraries/Core/setUpRegeneratorRuntime.js +4 -2
- package/Libraries/DOM/Nodes/ReactNativeElement.js +135 -18
- package/Libraries/DOM/Nodes/ReadOnlyCharacterData.js +72 -0
- package/Libraries/DOM/Nodes/ReadOnlyElement.js +209 -21
- package/Libraries/DOM/Nodes/ReadOnlyNode.js +206 -17
- package/Libraries/DOM/Nodes/ReadOnlyText.js +30 -0
- package/Libraries/DOM/Nodes/Utilities/Traversal.js +54 -0
- package/Libraries/EventEmitter/NativeEventEmitter.d.ts +0 -6
- package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +15 -4
- package/Libraries/Image/Image.android.js +8 -2
- package/Libraries/Image/Image.d.ts +1 -1
- package/Libraries/Image/Image.ios.js +4 -1
- package/Libraries/Image/Image.windows.js +6 -3
- package/Libraries/Image/ImageBackground.js +3 -0
- package/Libraries/Inspector/DevtoolsOverlay.js +6 -3
- package/Libraries/Inspector/NetworkOverlay.js +2 -2
- package/Libraries/Interaction/JSEventLoopWatchdog.js +1 -5
- package/Libraries/Interaction/PanResponder.js +1 -4
- package/Libraries/IntersectionObserver/IntersectionObserver.js +252 -0
- package/Libraries/IntersectionObserver/IntersectionObserverEntry.js +140 -0
- package/Libraries/IntersectionObserver/IntersectionObserverManager.js +221 -0
- package/Libraries/IntersectionObserver/NativeIntersectionObserver.js +41 -0
- package/Libraries/IntersectionObserver/__mocks__/NativeIntersectionObserver.js +162 -0
- package/Libraries/LayoutAnimation/LayoutAnimation.js +1 -1
- package/Libraries/Lists/FlatList.d.ts +2 -1
- package/Libraries/Lists/FlatList.js +15 -5
- package/Libraries/Lists/SectionList.js +4 -0
- package/Libraries/LogBox/Data/LogBoxLog.js +4 -1
- package/Libraries/LogBox/Data/LogBoxSymbolication.js +5 -2
- package/Libraries/LogBox/Data/parseLogBoxLog.js +57 -20
- package/Libraries/LogBox/UI/AnsiHighlight.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +24 -31
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +1 -1
- package/Libraries/LogBox/UI/LogBoxMessage.js +4 -7
- package/Libraries/MutationObserver/MutationObserver.js +184 -0
- package/Libraries/MutationObserver/MutationObserverManager.js +218 -0
- package/Libraries/MutationObserver/MutationRecord.js +82 -0
- package/Libraries/MutationObserver/NativeMutationObserver.js +58 -0
- package/Libraries/MutationObserver/__mocks__/NativeMutationObserver.js +327 -0
- package/Libraries/NativeComponent/BaseViewConfig.android.js +18 -3
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +33 -0
- package/Libraries/NativeComponent/BaseViewConfig.windows.js +34 -4
- package/Libraries/NativeComponent/NativeComponentRegistry.js +3 -5
- package/Libraries/NativeModules/specs/NativeSourceCode.js +6 -6
- package/Libraries/Network/RCTNetworking.android.js +2 -1
- package/Libraries/Network/XMLHttpRequest.js +1 -1
- package/Libraries/NewAppScreen/components/DebugInstructions.js +4 -4
- package/Libraries/NewAppScreen/components/DebugInstructions.windows.js +2 -2
- package/Libraries/NewAppScreen/components/LearnMoreLinks.js +9 -2
- package/Libraries/Performance/QuickPerformanceLogger.js +1 -1
- package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +1 -0
- package/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +1 -0
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +3 -1
- package/Libraries/Pressability/Pressability.js +28 -3
- package/Libraries/Pressability/Pressability.windows.js +30 -5
- package/Libraries/ReactNative/AppContainer.js +2 -3
- package/Libraries/ReactNative/AppRegistry.d.ts +0 -5
- package/Libraries/ReactNative/AppRegistry.js +66 -53
- package/Libraries/ReactNative/BridgelessUIManager.js +38 -9
- package/Libraries/ReactNative/FabricUIManager.js +143 -34
- package/Libraries/ReactNative/I18nManager.js +5 -11
- package/Libraries/ReactNative/NativeI18nManager.js +7 -5
- package/Libraries/ReactNative/PaperUIManager.windows.js +2 -2
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +151 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +81 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.js +492 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/warnForStyleProps.js +32 -0
- package/Libraries/ReactNative/ReactNativeFeatureFlags.js +19 -3
- package/Libraries/ReactNative/UIManager.js +8 -0
- package/Libraries/ReactNative/__mocks__/FabricUIManager.js +648 -0
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +38 -2
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +27 -27
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +3 -3
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3 -3
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +27 -27
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3 -3
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +3 -3
- package/Libraries/Renderer/shims/ReactFabric.js +5 -6
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +2 -3
- package/Libraries/Renderer/shims/ReactNative.js +2 -3
- package/Libraries/Renderer/shims/ReactNativeTypes.js +35 -17
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +3 -3
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +2 -3
- package/Libraries/Settings/{Settings.android.js → Settings.js} +4 -4
- package/Libraries/Share/Share.d.ts +3 -9
- package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +9 -4
- package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +28 -13
- package/Libraries/StyleSheet/PlatformColorValueTypes.windows.js +10 -6
- package/Libraries/StyleSheet/PlatformColorValueTypesIOS.ios.js +1 -1
- package/Libraries/StyleSheet/StyleSheet.d.ts +10 -1
- package/Libraries/StyleSheet/StyleSheet.js +3 -0
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +31 -17
- package/Libraries/StyleSheet/StyleSheetTypes.js +90 -6
- package/Libraries/StyleSheet/flattenStyle.js +4 -0
- package/Libraries/StyleSheet/private/_TransformStyle.js +16 -2
- package/Libraries/StyleSheet/processColor.js +1 -2
- package/Libraries/StyleSheet/processTransformOrigin.js +136 -0
- package/Libraries/StyleSheet/splitLayoutProps.js +1 -0
- package/Libraries/Text/Text.d.ts +5 -5
- package/Libraries/Text/Text.js +17 -10
- package/Libraries/Text/Text.windows.js +53 -20
- package/Libraries/Text/TextProps.windows.js +275 -0
- package/Libraries/TurboModule/TurboModuleRegistry.js +47 -7
- package/Libraries/TurboModule/samples/NativeSampleTurboModule.js +6 -0
- package/Libraries/Types/CoreEventTypes.d.ts +5 -2
- package/Libraries/Utilities/GlobalPerformanceLogger.js +2 -12
- package/Libraries/Utilities/NativeDeviceInfo.js +8 -9
- package/Libraries/Utilities/NativePlatformConstantsAndroid.js +23 -18
- package/Libraries/Utilities/NativePlatformConstantsIOS.js +16 -13
- package/Libraries/Utilities/NativePlatformConstantsWin.js +13 -10
- package/Libraries/Utilities/PerformanceLoggerContext.js +1 -1
- package/Libraries/Utilities/Platform.android.js +12 -8
- package/Libraries/Utilities/Platform.d.ts +1 -0
- package/Libraries/Utilities/Platform.flow.js +84 -0
- package/Libraries/Utilities/Platform.flow.windows.js +111 -0
- package/Libraries/Utilities/Platform.ios.js +12 -8
- package/Libraries/Utilities/Platform.windows.js +12 -8
- package/Libraries/Utilities/PolyfillFunctions.js +1 -1
- package/Libraries/Utilities/ReactNativeTestTools.js +1 -2
- package/Libraries/Utilities/SceneTracker.js +1 -1
- package/Libraries/Utilities/createPerformanceLogger.js +63 -32
- package/Libraries/Utilities/useColorScheme.js +7 -8
- package/Libraries/WebPerformance/MemoryInfo.js +1 -1
- package/Libraries/WebPerformance/NativePerformance.js +3 -8
- package/Libraries/WebPerformance/NativePerformanceObserver.js +4 -0
- package/Libraries/WebPerformance/Performance.js +42 -15
- package/Libraries/WebPerformance/PerformanceEntry.js +14 -6
- package/Libraries/WebPerformance/PerformanceEventTiming.js +18 -1
- package/Libraries/WebPerformance/ReactNativeStartupTiming.js +40 -14
- package/Libraries/WebPerformance/__mocks__/NativePerformance.js +4 -2
- package/Libraries/WebPerformance/__mocks__/NativePerformanceObserver.js +21 -3
- package/Libraries/__tests__/ViewWindows-test.js +3 -3
- package/Libraries/platform-types.d.ts +6 -2
- package/Libraries/promiseRejectionTrackingOptions.js +1 -3
- package/Libraries/vendor/emitter/EventEmitter.js +17 -17
- package/Microsoft.ReactNative/Composition.Input.idl +103 -0
- package/Microsoft.ReactNative/CompositionContext.idl +31 -8
- package/Microsoft.ReactNative/CompositionRootView.idl +8 -4
- package/Microsoft.ReactNative/CompositionSwitcher.idl +28 -17
- package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.cpp +15 -28
- package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.h +7 -10
- package/Microsoft.ReactNative/Fabric/ComponentView.h +42 -4
- package/Microsoft.ReactNative/Fabric/Composition/AbiCompositionViewComponentView.cpp +57 -4
- package/Microsoft.ReactNative/Fabric/Composition/AbiCompositionViewComponentView.h +22 -1
- package/Microsoft.ReactNative/Fabric/Composition/ActivityIndicatorComponentView.cpp +137 -0
- package/Microsoft.ReactNative/Fabric/Composition/ActivityIndicatorComponentView.h +59 -0
- package/Microsoft.ReactNative/Fabric/Composition/ComponentViewRegistry.cpp +8 -2
- package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.cpp +575 -0
- package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.h +170 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +890 -226
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.h +38 -6
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper_emptyimpl.cpp +79 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +130 -27
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h +6 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +382 -228
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +35 -8
- package/Microsoft.ReactNative/Fabric/Composition/CompositionHelpers.h +46 -8
- package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.cpp +5 -21
- package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.h +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp +232 -4
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h +36 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView.cpp +51 -14
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView.h +15 -6
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView_emptyimpl.cpp +123 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionUIService_emptyimpl.cpp +18 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +333 -137
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +52 -8
- package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.cpp +32 -26
- package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.h +5 -3
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +183 -175
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.h +7 -4
- package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.cpp +101 -2
- package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.h +46 -2
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +36 -9
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +8 -2
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +247 -42
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +25 -8
- package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.cpp +78 -50
- package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.h +12 -4
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentDescriptor.h +26 -28
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +429 -89
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +24 -3
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputProps.cpp +1 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputProps.h +3 -2
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +5 -7
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h +4 -6
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp +1 -7
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h +1 -17
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +74 -3
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +12 -0
- package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.cpp +53 -59
- package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.h +3 -2
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +5 -4
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.h +2 -1
- package/Microsoft.ReactNative/Fabric/ImageRequest.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/ReactTaggedView.h +1 -1
- package/Microsoft.ReactNative/Fabric/WindowsComponentDescriptorRegistry.cpp +3 -4
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformTouch.h +10 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewEventEmitter.cpp +59 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewEventEmitter.h +31 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewProps.cpp +69 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewProps.h +25 -2
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewTraitsInitializer.h +23 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/KeyEvent.h +113 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/WindowsViewEvents.h +75 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/core/graphicsConversions.h +18 -21
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/Color.cpp +158 -7
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/Color.h +15 -17
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.cpp +1 -1
- package/Microsoft.ReactNative/GlyphViewManager.cpp +1 -1
- package/Microsoft.ReactNative/IJSValueReader.idl +2 -2
- package/Microsoft.ReactNative/IJSValueWriter.idl +2 -2
- package/Microsoft.ReactNative/IReactCompositionViewComponentBuilder.idl +23 -1
- package/Microsoft.ReactNative/IReactContext.cpp +1 -1
- package/Microsoft.ReactNative/IReactNotificationService.cpp +4 -3
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +1 -4
- package/Microsoft.ReactNative/Modules/AlertModule.cpp +2 -2
- package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedNodeManager.cpp +1 -2
- package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedNodeManager.h +1 -1
- package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.cpp +3 -4
- package/Microsoft.ReactNative/Modules/AppStateModule.cpp +1 -1
- package/Microsoft.ReactNative/Modules/AppStateModule.h +2 -2
- package/Microsoft.ReactNative/Modules/AppearanceModule.h +1 -1
- package/Microsoft.ReactNative/Modules/DeviceInfoModule.cpp +4 -2
- package/Microsoft.ReactNative/Modules/DeviceInfoModule.h +1 -1
- package/Microsoft.ReactNative/Modules/I18nManagerModule.cpp +2 -2
- package/Microsoft.ReactNative/Modules/I18nManagerModule.h +1 -1
- package/Microsoft.ReactNative/Modules/NativeUIManager.cpp +21 -15
- package/Microsoft.ReactNative/Modules/PaperUIManagerModule.cpp +10 -6
- package/Microsoft.ReactNative/Modules/PaperUIManagerModule.h +4 -1
- package/Microsoft.ReactNative/QuirkSettings.idl +1 -1
- package/Microsoft.ReactNative/ReactApplication.cpp +13 -11
- package/Microsoft.ReactNative/ReactApplication.h +4 -4
- package/Microsoft.ReactNative/ReactCoreInjection.h +6 -5
- package/Microsoft.ReactNative/ReactHost/JSCallInvokerScheduler.cpp +2 -2
- package/Microsoft.ReactNative/ReactHost/MsoUtils.cpp +1 -1
- package/Microsoft.ReactNative/ReactHost/React.h +3 -6
- package/Microsoft.ReactNative/ReactHost/ReactHost.cpp +0 -16
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +5 -16
- package/Microsoft.ReactNative/ReactInstanceSettings.cpp +6 -5
- package/Microsoft.ReactNative/ReactInstanceSettings.h +7 -7
- package/Microsoft.ReactNative/ReactNativeHost.h +4 -4
- package/Microsoft.ReactNative/ReactRootView.cpp +5 -4
- package/Microsoft.ReactNative/ReactRootView.h +2 -2
- package/Microsoft.ReactNative/ReactSupport.h +1 -1
- package/Microsoft.ReactNative/RedBox.cpp +1 -1
- package/Microsoft.ReactNative/RedBoxHandler.idl +1 -1
- package/Microsoft.ReactNative/Utils/UwpPreparedScriptStore.h +1 -1
- package/Microsoft.ReactNative/Utils/ValueUtils.cpp +49 -21
- package/Microsoft.ReactNative/Utils/ValueUtils.h +2 -1
- package/Microsoft.ReactNative/Views/DynamicAutomationPeer.cpp +31 -59
- package/Microsoft.ReactNative/Views/DynamicAutomationPeer.h +3 -4
- package/Microsoft.ReactNative/Views/DynamicAutomationProperties.cpp +15 -46
- package/Microsoft.ReactNative/Views/DynamicAutomationProperties.h +5 -13
- package/Microsoft.ReactNative/Views/FlyoutViewManager.cpp +4 -4
- package/Microsoft.ReactNative/Views/FrameworkElementTransferProperties.cpp +2 -8
- package/Microsoft.ReactNative/Views/FrameworkElementViewManager.cpp +127 -86
- package/Microsoft.ReactNative/Views/ICompositionRootView.h +1 -1
- package/Microsoft.ReactNative/Views/Image/ImageViewManager.cpp +1 -1
- package/Microsoft.ReactNative/Views/Image/Microsoft.UI.Composition.Effects_Impl.h +2 -2
- package/Microsoft.ReactNative/Views/Image/ReactImage.cpp +1 -1
- package/Microsoft.ReactNative/Views/SIPEventHandler.cpp +5 -5
- package/Microsoft.ReactNative/Views/SIPEventHandler.h +1 -1
- package/Microsoft.ReactNative/Views/ShadowNodeBase.h +8 -5
- package/Microsoft.ReactNative/Views/SwitchViewManager.cpp +2 -2
- package/Microsoft.ReactNative/Views/Text/TextTransformVisitor.cpp +1 -1
- package/Microsoft.ReactNative/Views/TextInputViewManager.cpp +32 -14
- package/Microsoft.ReactNative/Views/TouchEventHandler.cpp +1 -1
- package/Microsoft.ReactNative/Views/ViewManagerBase.cpp +14 -2
- package/Microsoft.ReactNative/Views/ViewManagerBase.h +1 -1
- package/Microsoft.ReactNative/Views/ViewPanel.cpp +20 -219
- package/Microsoft.ReactNative/Views/ViewPanel.h +0 -30
- package/Microsoft.ReactNative/Views/ViewViewManager.cpp +17 -158
- package/Microsoft.ReactNative/Views/cppwinrt/DynamicAutomationPeer.idl +9 -12
- package/Microsoft.ReactNative/Views/cppwinrt/ViewPanel.idl +1 -9
- package/Microsoft.ReactNative/XamlHelper.cpp +1 -1
- package/Microsoft.ReactNative/XamlHelper.h +1 -1
- package/Microsoft.ReactNative/packages.lock.json +128 -0
- package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.cpp +1 -1
- package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.h +1 -1
- package/Microsoft.ReactNative.Cxx/JSI/JsiApiContext.cpp +2 -2
- package/Microsoft.ReactNative.Cxx/JSValue.h +2 -2
- package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems +0 -1
- package/Microsoft.ReactNative.Cxx/NativeModules.h +4 -4
- package/Microsoft.ReactNative.Cxx/ReactHandleHelper.h +1 -1
- package/Microsoft.ReactNative.Cxx/ReactNonAbiValue.h +2 -2
- package/Microsoft.ReactNative.Cxx/ReactNotificationService.h +10 -9
- package/Microsoft.ReactNative.Cxx/ReactPropertyBag.h +13 -12
- package/Microsoft.ReactNative.Managed/JSValueReaderGenerator.cs +5 -5
- package/Microsoft.ReactNative.Managed/JSValueWriterGenerator.cs +5 -5
- package/Microsoft.ReactNative.Managed/Microsoft.ReactNative.Managed.csproj +8 -2
- package/Microsoft.ReactNative.Managed/ReactPackageBuilderExtensions.cs +1 -1
- package/Microsoft.ReactNative.Managed/ReflectionReactPackageProvider.cs +1 -1
- package/Microsoft.ReactNative.Managed/packages.lock.json +9 -9
- package/Microsoft.ReactNative.Managed.CodeGen/CodeAnalyzer.cs +2 -0
- package/Microsoft.ReactNative.Managed.CodeGen/CodeGenerator.Module.cs +4 -2
- package/Microsoft.ReactNative.Managed.CodeGen/CodeGenerator.ViewManager.cs +1 -1
- package/Microsoft.ReactNative.Managed.CodeGen/DiagnosticDescriptors.cs +1 -1
- package/Microsoft.ReactNative.Managed.CodeGen/packages.lock.json +3197 -0
- package/Mso/compilerAdapters/compilerFeatures.h +1 -1
- package/Mso/compilerAdapters/functionDecorations.h +6 -6
- package/Mso/debugAssertApi/debugAssertDetails.h +1 -1
- package/Mso/dispatchQueue/dispatchQueue.h +3 -3
- package/Mso/motifCpp/motifCppTest.h +1 -1
- package/Mso/motifCpp/testCheck.h +1 -1
- package/Mso/oacr/oacr.h +1 -1
- package/Mso/smartPtr/smartPointerBase.h +1 -1
- package/Mso/src/dispatchQueue/looperScheduler.cpp +2 -2
- package/Mso/src/dispatchQueue/queueService.cpp +1 -1
- package/Mso/src/dispatchQueue/taskQueue.h +1 -1
- package/Mso/src/dispatchQueue/threadPoolScheduler_win.cpp +2 -2
- package/Mso/src/dispatchQueue/uiScheduler_winrt.cpp +122 -45
- package/Mso/src/eventWaitHandle/eventWaitHandleImpl_win.cpp +2 -2
- package/Mso/src/future/futureImpl.cpp +5 -5
- package/Mso/src/future/futureImpl.h +1 -1
- package/PropertySheets/External/Microsoft.ReactNative.Common.props +3 -0
- package/PropertySheets/External/{Microsoft.ReactNative.WinAppSDK.Common.props → Microsoft.ReactNative.Composition.Common.props} +2 -2
- package/PropertySheets/External/{Microsoft.ReactNative.WinAppSDK.CSharpApp.props → Microsoft.ReactNative.Composition.CppApp.props} +7 -10
- package/PropertySheets/External/Microsoft.ReactNative.Composition.CppApp.targets +19 -0
- package/PropertySheets/External/Microsoft.ReactNative.Composition.Package.props +14 -0
- package/PropertySheets/External/Microsoft.ReactNative.Composition.Package.targets +18 -0
- package/PropertySheets/External/Microsoft.ReactNative.WindowsSdk.Default.props +1 -1
- package/PropertySheets/Generated/PackageVersion.g.props +4 -4
- package/PropertySheets/HybridCRT.props +34 -0
- package/PropertySheets/JSEngine.props +1 -2
- package/PropertySheets/React.Cpp.props +0 -1
- package/PropertySheets/Warnings.props +1 -1
- package/PropertySheets/WinUI.props +1 -1
- package/ReactCommon/ReactCommon.vcxproj +15 -9
- package/ReactCommon/ReactCommon.vcxproj.filters +0 -3
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp +32 -5
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Bridging.h +20 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/YogaLayoutableShadowNode.cpp +1038 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/YogaStylableProps.cpp +228 -38
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/conversions.h +895 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/mounting/ShadowTree.cpp +543 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/uimanager/UIManagerBinding.cpp +1509 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/bits/NumericBitfield.h +67 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/config/Config.h +93 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/LayoutResults.h +88 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/Node.cpp +606 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/Node.h +344 -0
- package/ReactCommon/Yoga.cpp +497 -3895
- package/ReactCommon/packages.lock.json +30 -0
- package/Scripts/NuGetRestoreForceEvaluateAllSolutions.ps1 +22 -0
- package/Scripts/OfficeReact.Win32.nuspec +1 -0
- package/Scripts/rnw-dependencies.ps1 +79 -26
- package/Shared/BaseScriptStoreImpl.cpp +42 -13
- package/Shared/BaseScriptStoreImpl.h +1 -1
- package/Shared/Composition/AutoDraw.h +36 -0
- package/Shared/CxxMessageQueue.cpp +1 -1
- package/Shared/DevSupportManager.h +1 -1
- package/Shared/Hasher.cpp +64 -0
- package/Shared/Hasher.h +24 -0
- package/Shared/HermesRuntimeHolder.cpp +6 -6
- package/Shared/IDevSupportManager.h +1 -1
- package/Shared/JSI/ChakraApi.cpp +1 -1
- package/Shared/JSI/ChakraRuntime.cpp +10 -10
- package/Shared/JSI/ChakraRuntime.h +6 -6
- package/Shared/JSI/V8RuntimeHolder.cpp +1 -1
- package/Shared/Modules/IRequestBodyHandler.h +1 -1
- package/Shared/Modules/IUriHandler.h +1 -1
- package/Shared/Modules/PlatformConstantsModule.cpp +1 -1
- package/Shared/Modules/WebSocketModule.cpp +1 -1
- package/Shared/Networking/DefaultBlobResource.cpp +2 -2
- package/Shared/Networking/OriginPolicyHttpFilter.cpp +22 -16
- package/Shared/Networking/OriginPolicyHttpFilter.h +12 -11
- package/Shared/OInstance.cpp +3 -21
- package/Shared/OInstance.h +1 -1
- package/Shared/PackagerConnection.h +1 -1
- package/Shared/SafeLoadLibrary.cpp +8 -44
- package/Shared/SafeLoadLibrary.h +1 -5
- package/Shared/Shared.vcxitems +49 -19
- package/Shared/Shared.vcxitems.filters +24 -17
- package/Shared/Threading/BatchingQueueThread.cpp +5 -5
- package/Shared/Threading/BatchingQueueThread.h +4 -4
- package/Shared/TurboModuleManager.cpp +1 -1
- package/Shared/Utils.cpp +1 -1
- package/Shared/tracing/fbsystrace.h +1 -1
- package/codegen/NativeAnimatedModuleSpec.g.h +2 -0
- package/codegen/NativeAnimatedTurboModuleSpec.g.h +2 -0
- package/codegen/NativeAppStateSpec.g.h +11 -21
- package/codegen/NativeDeviceInfoSpec.g.h +4 -14
- package/codegen/NativeI18nManagerSpec.g.h +6 -16
- package/codegen/NativeIntersectionObserverSpec.g.h +96 -0
- package/codegen/NativeMutationObserverSpec.g.h +90 -0
- package/codegen/NativePerformanceObserverSpec.g.h +19 -13
- package/codegen/NativePerformanceSpec.g.h +6 -23
- package/codegen/NativePlatformConstantsAndroidSpec.g.h +22 -30
- package/codegen/NativePlatformConstantsIOSSpec.g.h +17 -25
- package/codegen/NativePlatformConstantsWinSpec.g.h +14 -22
- package/codegen/NativeSampleTurboModuleSpec.g.h +36 -0
- package/codegen/NativeSourceCodeSpec.g.h +3 -13
- package/codegen/react/components/rnwcore/EventEmitters.cpp +85 -58
- package/codegen/react/components/rnwcore/EventEmitters.h +17 -35
- package/codegen/react/components/rnwcore/Props.h +16 -17
- package/codegen/rnwcoreJSI-generated.cpp +1462 -319
- package/codegen/rnwcoreJSI.h +1609 -462
- package/fmt/packages.lock.json +13 -0
- package/index.windows.js +3 -3
- package/{Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.ios.js → jest/ReactNativeInternalFeatureFlagsMock.js} +2 -1
- package/jest/__tests__/setup-test.js +18 -0
- package/jest/mockModal.js +6 -4
- package/jest/setup.js +61 -30
- package/just-task.js +1 -0
- package/package.json +37 -42
- package/template/cs-app/proj/MyApp.csproj +0 -1
- package/template/cs-lib/proj/MyLib.csproj +0 -1
- package/templates/.clang-format +4 -0
- package/templates/cpp-app/metro.config.js +51 -0
- package/templates/cpp-app/template.config.js +119 -0
- package/templates/cpp-app/windows/ExperimentalFeatures.props +12 -0
- package/templates/cpp-app/windows/MyApp/MyApp.cpp +284 -0
- package/templates/cpp-app/windows/MyApp/MyApp.h +3 -0
- package/templates/cpp-app/windows/MyApp/MyApp.ico +0 -0
- package/templates/cpp-app/windows/MyApp/MyApp.rc +0 -0
- package/templates/cpp-app/windows/MyApp/MyApp.vcxproj +142 -0
- package/templates/cpp-app/windows/MyApp/MyApp.vcxproj.filters +55 -0
- package/templates/cpp-app/windows/MyApp/_gitignore +1 -0
- package/templates/cpp-app/windows/MyApp/pch.cpp +1 -0
- package/templates/cpp-app/windows/MyApp/pch.h +35 -0
- package/templates/cpp-app/windows/MyApp/resource.h +18 -0
- package/templates/cpp-app/windows/MyApp/small.ico +0 -0
- package/templates/cpp-app/windows/MyApp/targetver.h +8 -0
- package/templates/cpp-app/windows/MyApp.Package/Images/LockScreenLogo.scale-200.png +0 -0
- package/templates/cpp-app/windows/MyApp.Package/Images/SplashScreen.scale-200.png +0 -0
- package/templates/cpp-app/windows/MyApp.Package/Images/Square150x150Logo.scale-200.png +0 -0
- package/templates/cpp-app/windows/MyApp.Package/Images/Square44x44Logo.scale-200.png +0 -0
- package/templates/cpp-app/windows/MyApp.Package/Images/Square44x44Logo.targetsize-24_altform-unplated.png +0 -0
- package/templates/cpp-app/windows/MyApp.Package/Images/StoreLogo.png +0 -0
- package/templates/cpp-app/windows/MyApp.Package/Images/Wide310x150Logo.scale-200.png +0 -0
- package/templates/cpp-app/windows/MyApp.Package/MyApp.Package.wapproj +78 -0
- package/{template/cs-app-WinAppSDK/MyApp → templates/cpp-app/windows/MyApp.Package}/Package.appxmanifest +9 -8
- package/templates/cpp-app/windows/MyApp.sln +176 -0
- package/templates/cpp-app/windows/_gitignore +41 -0
- package/templates/old/generateWrapper.js +67 -0
- package/templates/old/uwp-cpp-app/template.config.js +15 -0
- package/templates/old/uwp-cpp-lib/template.config.js +15 -0
- package/templates/old/uwp-cs-app/template.config.js +15 -0
- package/templates/old/uwp-cs-lib/template.config.js +15 -0
- package/types/experimental.d.ts +44 -0
- package/types/index.d.ts +2 -1
- package/types/modules/Devtools.d.ts +1 -0
- package/types/modules/globals.d.ts +16 -1
- package/Libraries/Components/View/ViewWindows.d.ts +0 -19
- package/Libraries/Components/View/ViewWindows.js +0 -22
- package/Libraries/Components/View/ViewWindows.js.map +0 -1
- package/Libraries/Components/View/ViewWindowsProps.d.ts +0 -69
- package/Libraries/Components/View/ViewWindowsProps.js +0 -8
- package/Libraries/Components/View/ViewWindowsProps.js.map +0 -1
- package/Libraries/Utilities/AcessibilityMapping.js +0 -154
- package/Libraries/Utilities/NativeDevSplitBundleLoader.js +0 -19
- package/Libraries/Utilities/useColorScheme.windows.js +0 -26
- package/Microsoft.ReactNative/Fabric/platform/react/components/view/windows/WindowsViewProps.cpp +0 -61
- package/Microsoft.ReactNative/Fabric/platform/react/components/view/windows/WindowsViewProps.h +0 -34
- package/Microsoft.ReactNative/Fabric/platform/react/components/view/windows/primitives.h +0 -42
- package/PropertySheets/External/Microsoft.ReactNative.WinAppSDK.CSharp.PackageReferences.props +0 -11
- package/PropertySheets/External/Microsoft.ReactNative.WinAppSDK.CSharpApp.targets +0 -51
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/TouchEventEmitter.cpp +0 -237
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/TouchEventEmitter.h +0 -59
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/ViewEventEmitter.cpp +0 -159
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/ViewEventEmitter.h +0 -94
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/ViewProps.cpp +0 -465
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/ViewProps.h +0 -116
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/ViewShadowNode.cpp +0 -98
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/primitives.h +0 -326
- package/Scripts/Microsoft.ReactNative.WindowsAppSDK.nuspec +0 -30
- package/Shared/V8JSIRuntimeHolder.cpp +0 -71
- package/Shared/V8JSIRuntimeHolder.h +0 -56
- package/codegen/NativeDevSplitBundleLoaderSpec.g.h +0 -34
- package/template/cs-app-WinAppSDK/MyApp/App.xaml +0 -16
- package/template/cs-app-WinAppSDK/MyApp/App.xaml.cs +0 -70
- package/template/cs-app-WinAppSDK/MyApp/MainWindow.xaml +0 -14
- package/template/cs-app-WinAppSDK/MyApp/MainWindow.xaml.cs +0 -38
- package/template/cs-app-WinAppSDK/MyApp/Properties/PublishProfiles/win10-arm64.pubxml +0 -19
- package/template/cs-app-WinAppSDK/MyApp/Properties/PublishProfiles/win10-x64.pubxml +0 -19
- package/template/cs-app-WinAppSDK/MyApp/Properties/PublishProfiles/win10-x86.pubxml +0 -19
- package/template/cs-app-WinAppSDK/MyApp/Properties/launchSettings.json +0 -10
- package/template/cs-app-WinAppSDK/MyApp/app.manifest +0 -15
- package/template/cs-app-WinAppSDK/proj/ExperimentalFeatures.props +0 -24
- package/template/cs-app-WinAppSDK/proj/MyApp.csproj +0 -53
- package/template/cs-app-WinAppSDK/proj/MyApp.sln +0 -43
- package/template/cs-app-WinAppSDK/proj/NuGet_Config +0 -19
- /package/Libraries/Components/DrawerAndroid/{DrawerLayoutAndroid.ios.js → DrawerLayoutAndroid.js} +0 -0
- /package/Libraries/{Renderer/public → ReactNative/ReactFabricPublicInstance}/ReactFabricPublicInstanceUtils.js +0 -0
package/codegen/rnwcoreJSI.h
CHANGED
|
@@ -35,9 +35,11 @@ public:
|
|
|
35
35
|
return delegate_.get(rt, propName);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
static constexpr std::string_view kModuleName = "ActionSheetManager";
|
|
39
|
+
|
|
38
40
|
protected:
|
|
39
41
|
NativeActionSheetManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
40
|
-
: TurboModule(
|
|
42
|
+
: TurboModule(std::string{NativeActionSheetManagerCxxSpec::kModuleName}, jsInvoker),
|
|
41
43
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
42
44
|
|
|
43
45
|
private:
|
|
@@ -87,7 +89,8 @@ private:
|
|
|
87
89
|
};
|
|
88
90
|
|
|
89
91
|
|
|
90
|
-
|
|
92
|
+
|
|
93
|
+
#pragma mark - AlertManagerBaseArgs
|
|
91
94
|
|
|
92
95
|
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9>
|
|
93
96
|
struct AlertManagerBaseArgs {
|
|
@@ -130,73 +133,82 @@ struct AlertManagerBaseArgsBridging {
|
|
|
130
133
|
static jsi::String titleToJs(jsi::Runtime &rt, P0 value) {
|
|
131
134
|
return bridging::toJs(rt, value);
|
|
132
135
|
}
|
|
136
|
+
|
|
133
137
|
static jsi::String messageToJs(jsi::Runtime &rt, P1 value) {
|
|
134
138
|
return bridging::toJs(rt, value);
|
|
135
139
|
}
|
|
140
|
+
|
|
136
141
|
static jsi::Array buttonsToJs(jsi::Runtime &rt, P2 value) {
|
|
137
142
|
return bridging::toJs(rt, value);
|
|
138
143
|
}
|
|
144
|
+
|
|
139
145
|
static jsi::String typeToJs(jsi::Runtime &rt, P3 value) {
|
|
140
146
|
return bridging::toJs(rt, value);
|
|
141
147
|
}
|
|
148
|
+
|
|
142
149
|
static jsi::String defaultValueToJs(jsi::Runtime &rt, P4 value) {
|
|
143
150
|
return bridging::toJs(rt, value);
|
|
144
151
|
}
|
|
152
|
+
|
|
145
153
|
static jsi::String cancelButtonKeyToJs(jsi::Runtime &rt, P5 value) {
|
|
146
154
|
return bridging::toJs(rt, value);
|
|
147
155
|
}
|
|
156
|
+
|
|
148
157
|
static jsi::String destructiveButtonKeyToJs(jsi::Runtime &rt, P6 value) {
|
|
149
158
|
return bridging::toJs(rt, value);
|
|
150
159
|
}
|
|
160
|
+
|
|
151
161
|
static jsi::String preferredButtonKeyToJs(jsi::Runtime &rt, P7 value) {
|
|
152
162
|
return bridging::toJs(rt, value);
|
|
153
163
|
}
|
|
164
|
+
|
|
154
165
|
static jsi::String keyboardTypeToJs(jsi::Runtime &rt, P8 value) {
|
|
155
166
|
return bridging::toJs(rt, value);
|
|
156
167
|
}
|
|
168
|
+
|
|
157
169
|
static jsi::String userInterfaceStyleToJs(jsi::Runtime &rt, P9 value) {
|
|
158
170
|
return bridging::toJs(rt, value);
|
|
159
171
|
}
|
|
160
172
|
#endif
|
|
161
173
|
|
|
162
174
|
static jsi::Object toJs(
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
175
|
+
jsi::Runtime &rt,
|
|
176
|
+
const AlertManagerBaseArgs<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> &value,
|
|
177
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
178
|
+
auto result = facebook::jsi::Object(rt);
|
|
179
|
+
if (value.title) {
|
|
180
|
+
result.setProperty(rt, "title", bridging::toJs(rt, value.title.value(), jsInvoker));
|
|
181
|
+
}
|
|
170
182
|
if (value.message) {
|
|
171
|
-
|
|
172
|
-
|
|
183
|
+
result.setProperty(rt, "message", bridging::toJs(rt, value.message.value(), jsInvoker));
|
|
184
|
+
}
|
|
173
185
|
if (value.buttons) {
|
|
174
|
-
|
|
175
|
-
|
|
186
|
+
result.setProperty(rt, "buttons", bridging::toJs(rt, value.buttons.value(), jsInvoker));
|
|
187
|
+
}
|
|
176
188
|
if (value.type) {
|
|
177
|
-
|
|
178
|
-
|
|
189
|
+
result.setProperty(rt, "type", bridging::toJs(rt, value.type.value(), jsInvoker));
|
|
190
|
+
}
|
|
179
191
|
if (value.defaultValue) {
|
|
180
|
-
|
|
181
|
-
|
|
192
|
+
result.setProperty(rt, "defaultValue", bridging::toJs(rt, value.defaultValue.value(), jsInvoker));
|
|
193
|
+
}
|
|
182
194
|
if (value.cancelButtonKey) {
|
|
183
|
-
|
|
184
|
-
|
|
195
|
+
result.setProperty(rt, "cancelButtonKey", bridging::toJs(rt, value.cancelButtonKey.value(), jsInvoker));
|
|
196
|
+
}
|
|
185
197
|
if (value.destructiveButtonKey) {
|
|
186
|
-
|
|
187
|
-
|
|
198
|
+
result.setProperty(rt, "destructiveButtonKey", bridging::toJs(rt, value.destructiveButtonKey.value(), jsInvoker));
|
|
199
|
+
}
|
|
188
200
|
if (value.preferredButtonKey) {
|
|
189
|
-
|
|
190
|
-
|
|
201
|
+
result.setProperty(rt, "preferredButtonKey", bridging::toJs(rt, value.preferredButtonKey.value(), jsInvoker));
|
|
202
|
+
}
|
|
191
203
|
if (value.keyboardType) {
|
|
192
|
-
|
|
193
|
-
|
|
204
|
+
result.setProperty(rt, "keyboardType", bridging::toJs(rt, value.keyboardType.value(), jsInvoker));
|
|
205
|
+
}
|
|
194
206
|
if (value.userInterfaceStyle) {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
207
|
+
result.setProperty(rt, "userInterfaceStyle", bridging::toJs(rt, value.userInterfaceStyle.value(), jsInvoker));
|
|
208
|
+
}
|
|
209
|
+
return result;
|
|
210
|
+
}
|
|
211
|
+
};
|
|
200
212
|
|
|
201
213
|
class JSI_EXPORT NativeAlertManagerCxxSpecJSI : public TurboModule {
|
|
202
214
|
protected:
|
|
@@ -214,9 +226,11 @@ public:
|
|
|
214
226
|
return delegate_.get(rt, propName);
|
|
215
227
|
}
|
|
216
228
|
|
|
229
|
+
static constexpr std::string_view kModuleName = "AlertManager";
|
|
230
|
+
|
|
217
231
|
protected:
|
|
218
232
|
NativeAlertManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
219
|
-
: TurboModule(
|
|
233
|
+
: TurboModule(std::string{NativeAlertManagerCxxSpec::kModuleName}, jsInvoker),
|
|
220
234
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
221
235
|
|
|
222
236
|
private:
|
|
@@ -242,7 +256,8 @@ private:
|
|
|
242
256
|
};
|
|
243
257
|
|
|
244
258
|
|
|
245
|
-
|
|
259
|
+
|
|
260
|
+
#pragma mark - AlertBaseDialogOptions
|
|
246
261
|
|
|
247
262
|
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8>
|
|
248
263
|
struct AlertBaseDialogOptions {
|
|
@@ -283,67 +298,75 @@ struct AlertBaseDialogOptionsBridging {
|
|
|
283
298
|
static jsi::String titleToJs(jsi::Runtime &rt, P0 value) {
|
|
284
299
|
return bridging::toJs(rt, value);
|
|
285
300
|
}
|
|
301
|
+
|
|
286
302
|
static jsi::String messageToJs(jsi::Runtime &rt, P1 value) {
|
|
287
303
|
return bridging::toJs(rt, value);
|
|
288
304
|
}
|
|
305
|
+
|
|
289
306
|
static jsi::String buttonPositiveToJs(jsi::Runtime &rt, P2 value) {
|
|
290
307
|
return bridging::toJs(rt, value);
|
|
291
308
|
}
|
|
309
|
+
|
|
292
310
|
static jsi::String buttonNegativeToJs(jsi::Runtime &rt, P3 value) {
|
|
293
311
|
return bridging::toJs(rt, value);
|
|
294
312
|
}
|
|
313
|
+
|
|
295
314
|
static jsi::String buttonNeutralToJs(jsi::Runtime &rt, P4 value) {
|
|
296
315
|
return bridging::toJs(rt, value);
|
|
297
316
|
}
|
|
317
|
+
|
|
298
318
|
static jsi::Array itemsToJs(jsi::Runtime &rt, P5 value) {
|
|
299
319
|
return bridging::toJs(rt, value);
|
|
300
320
|
}
|
|
321
|
+
|
|
301
322
|
static bool cancelableToJs(jsi::Runtime &rt, P6 value) {
|
|
302
323
|
return bridging::toJs(rt, value);
|
|
303
324
|
}
|
|
325
|
+
|
|
304
326
|
static int defaultButtonToJs(jsi::Runtime &rt, P7 value) {
|
|
305
327
|
return bridging::toJs(rt, value);
|
|
306
328
|
}
|
|
329
|
+
|
|
307
330
|
static int rootTagToJs(jsi::Runtime &rt, P8 value) {
|
|
308
331
|
return bridging::toJs(rt, value);
|
|
309
332
|
}
|
|
310
333
|
#endif
|
|
311
334
|
|
|
312
335
|
static jsi::Object toJs(
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
336
|
+
jsi::Runtime &rt,
|
|
337
|
+
const AlertBaseDialogOptions<P0, P1, P2, P3, P4, P5, P6, P7, P8> &value,
|
|
338
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
339
|
+
auto result = facebook::jsi::Object(rt);
|
|
340
|
+
if (value.title) {
|
|
341
|
+
result.setProperty(rt, "title", bridging::toJs(rt, value.title.value(), jsInvoker));
|
|
342
|
+
}
|
|
320
343
|
if (value.message) {
|
|
321
|
-
|
|
322
|
-
|
|
344
|
+
result.setProperty(rt, "message", bridging::toJs(rt, value.message.value(), jsInvoker));
|
|
345
|
+
}
|
|
323
346
|
if (value.buttonPositive) {
|
|
324
|
-
|
|
325
|
-
|
|
347
|
+
result.setProperty(rt, "buttonPositive", bridging::toJs(rt, value.buttonPositive.value(), jsInvoker));
|
|
348
|
+
}
|
|
326
349
|
if (value.buttonNegative) {
|
|
327
|
-
|
|
328
|
-
|
|
350
|
+
result.setProperty(rt, "buttonNegative", bridging::toJs(rt, value.buttonNegative.value(), jsInvoker));
|
|
351
|
+
}
|
|
329
352
|
if (value.buttonNeutral) {
|
|
330
|
-
|
|
331
|
-
|
|
353
|
+
result.setProperty(rt, "buttonNeutral", bridging::toJs(rt, value.buttonNeutral.value(), jsInvoker));
|
|
354
|
+
}
|
|
332
355
|
if (value.items) {
|
|
333
|
-
|
|
334
|
-
|
|
356
|
+
result.setProperty(rt, "items", bridging::toJs(rt, value.items.value(), jsInvoker));
|
|
357
|
+
}
|
|
335
358
|
if (value.cancelable) {
|
|
336
|
-
|
|
337
|
-
|
|
359
|
+
result.setProperty(rt, "cancelable", bridging::toJs(rt, value.cancelable.value(), jsInvoker));
|
|
360
|
+
}
|
|
338
361
|
if (value.defaultButton) {
|
|
339
|
-
|
|
340
|
-
|
|
362
|
+
result.setProperty(rt, "defaultButton", bridging::toJs(rt, value.defaultButton.value(), jsInvoker));
|
|
363
|
+
}
|
|
341
364
|
if (value.rootTag) {
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
365
|
+
result.setProperty(rt, "rootTag", bridging::toJs(rt, value.rootTag.value(), jsInvoker));
|
|
366
|
+
}
|
|
367
|
+
return result;
|
|
368
|
+
}
|
|
369
|
+
};
|
|
347
370
|
|
|
348
371
|
class JSI_EXPORT NativeDialogManagerWindowsCxxSpecJSI : public TurboModule {
|
|
349
372
|
protected:
|
|
@@ -362,9 +385,11 @@ public:
|
|
|
362
385
|
return delegate_.get(rt, propName);
|
|
363
386
|
}
|
|
364
387
|
|
|
388
|
+
static constexpr std::string_view kModuleName = "Alert";
|
|
389
|
+
|
|
365
390
|
protected:
|
|
366
391
|
NativeDialogManagerWindowsCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
367
|
-
: TurboModule(
|
|
392
|
+
: TurboModule(std::string{NativeDialogManagerWindowsCxxSpec::kModuleName}, jsInvoker),
|
|
368
393
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
369
394
|
|
|
370
395
|
private:
|
|
@@ -398,24 +423,27 @@ private:
|
|
|
398
423
|
};
|
|
399
424
|
|
|
400
425
|
|
|
401
|
-
|
|
426
|
+
|
|
427
|
+
#pragma mark - NativeAnimatedModuleBaseEndResult
|
|
402
428
|
|
|
403
|
-
template <typename P0>
|
|
429
|
+
template <typename P0, typename P1>
|
|
404
430
|
struct NativeAnimatedModuleBaseEndResult {
|
|
405
431
|
P0 finished;
|
|
432
|
+
P1 value;
|
|
406
433
|
bool operator==(const NativeAnimatedModuleBaseEndResult &other) const {
|
|
407
|
-
return finished == other.finished;
|
|
434
|
+
return finished == other.finished && value == other.value;
|
|
408
435
|
}
|
|
409
436
|
};
|
|
410
437
|
|
|
411
|
-
template <typename P0>
|
|
438
|
+
template <typename P0, typename P1>
|
|
412
439
|
struct NativeAnimatedModuleBaseEndResultBridging {
|
|
413
|
-
static NativeAnimatedModuleBaseEndResult<P0> fromJs(
|
|
440
|
+
static NativeAnimatedModuleBaseEndResult<P0, P1> fromJs(
|
|
414
441
|
jsi::Runtime &rt,
|
|
415
442
|
const jsi::Object &value,
|
|
416
443
|
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
417
|
-
NativeAnimatedModuleBaseEndResult<P0> result{
|
|
418
|
-
bridging::fromJs<P0>(rt, value.getProperty(rt, "finished"), jsInvoker)
|
|
444
|
+
NativeAnimatedModuleBaseEndResult<P0, P1> result{
|
|
445
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "finished"), jsInvoker),
|
|
446
|
+
bridging::fromJs<P1>(rt, value.getProperty(rt, "value"), jsInvoker)};
|
|
419
447
|
return result;
|
|
420
448
|
}
|
|
421
449
|
|
|
@@ -423,17 +451,25 @@ struct NativeAnimatedModuleBaseEndResultBridging {
|
|
|
423
451
|
static bool finishedToJs(jsi::Runtime &rt, P0 value) {
|
|
424
452
|
return bridging::toJs(rt, value);
|
|
425
453
|
}
|
|
454
|
+
|
|
455
|
+
static double valueToJs(jsi::Runtime &rt, P1 value) {
|
|
456
|
+
return bridging::toJs(rt, value);
|
|
457
|
+
}
|
|
426
458
|
#endif
|
|
427
459
|
|
|
428
460
|
static jsi::Object toJs(
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
461
|
+
jsi::Runtime &rt,
|
|
462
|
+
const NativeAnimatedModuleBaseEndResult<P0, P1> &value,
|
|
463
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
464
|
+
auto result = facebook::jsi::Object(rt);
|
|
465
|
+
result.setProperty(rt, "finished", bridging::toJs(rt, value.finished, jsInvoker));
|
|
466
|
+
if (value.value) {
|
|
467
|
+
result.setProperty(rt, "value", bridging::toJs(rt, value.value.value(), jsInvoker));
|
|
468
|
+
}
|
|
469
|
+
return result;
|
|
470
|
+
}
|
|
471
|
+
};
|
|
472
|
+
|
|
437
473
|
|
|
438
474
|
|
|
439
475
|
#pragma mark - NativeAnimatedModuleBaseEventMapping
|
|
@@ -463,21 +499,22 @@ struct NativeAnimatedModuleBaseEventMappingBridging {
|
|
|
463
499
|
static jsi::Array nativeEventPathToJs(jsi::Runtime &rt, P0 value) {
|
|
464
500
|
return bridging::toJs(rt, value);
|
|
465
501
|
}
|
|
502
|
+
|
|
466
503
|
static std::optional<double> animatedValueTagToJs(jsi::Runtime &rt, P1 value) {
|
|
467
504
|
return bridging::toJs(rt, value);
|
|
468
505
|
}
|
|
469
506
|
#endif
|
|
470
507
|
|
|
471
508
|
static jsi::Object toJs(
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
509
|
+
jsi::Runtime &rt,
|
|
510
|
+
const NativeAnimatedModuleBaseEventMapping<P0, P1> &value,
|
|
511
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
512
|
+
auto result = facebook::jsi::Object(rt);
|
|
513
|
+
result.setProperty(rt, "nativeEventPath", bridging::toJs(rt, value.nativeEventPath, jsInvoker));
|
|
477
514
|
result.setProperty(rt, "animatedValueTag", bridging::toJs(rt, value.animatedValueTag, jsInvoker));
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
515
|
+
return result;
|
|
516
|
+
}
|
|
517
|
+
};
|
|
481
518
|
|
|
482
519
|
class JSI_EXPORT NativeAnimatedModuleCxxSpecJSI : public TurboModule {
|
|
483
520
|
protected:
|
|
@@ -518,9 +555,11 @@ public:
|
|
|
518
555
|
return delegate_.get(rt, propName);
|
|
519
556
|
}
|
|
520
557
|
|
|
558
|
+
static constexpr std::string_view kModuleName = "NativeAnimatedModule";
|
|
559
|
+
|
|
521
560
|
protected:
|
|
522
561
|
NativeAnimatedModuleCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
523
|
-
: TurboModule(
|
|
562
|
+
: TurboModule(std::string{NativeAnimatedModuleCxxSpec::kModuleName}, jsInvoker),
|
|
524
563
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
525
564
|
|
|
526
565
|
private:
|
|
@@ -730,24 +769,27 @@ private:
|
|
|
730
769
|
};
|
|
731
770
|
|
|
732
771
|
|
|
733
|
-
|
|
772
|
+
|
|
773
|
+
#pragma mark - NativeAnimatedTurboModuleBaseEndResult
|
|
734
774
|
|
|
735
|
-
template <typename P0>
|
|
775
|
+
template <typename P0, typename P1>
|
|
736
776
|
struct NativeAnimatedTurboModuleBaseEndResult {
|
|
737
777
|
P0 finished;
|
|
778
|
+
P1 value;
|
|
738
779
|
bool operator==(const NativeAnimatedTurboModuleBaseEndResult &other) const {
|
|
739
|
-
return finished == other.finished;
|
|
780
|
+
return finished == other.finished && value == other.value;
|
|
740
781
|
}
|
|
741
782
|
};
|
|
742
783
|
|
|
743
|
-
template <typename P0>
|
|
784
|
+
template <typename P0, typename P1>
|
|
744
785
|
struct NativeAnimatedTurboModuleBaseEndResultBridging {
|
|
745
|
-
static NativeAnimatedTurboModuleBaseEndResult<P0> fromJs(
|
|
786
|
+
static NativeAnimatedTurboModuleBaseEndResult<P0, P1> fromJs(
|
|
746
787
|
jsi::Runtime &rt,
|
|
747
788
|
const jsi::Object &value,
|
|
748
789
|
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
749
|
-
NativeAnimatedTurboModuleBaseEndResult<P0> result{
|
|
750
|
-
bridging::fromJs<P0>(rt, value.getProperty(rt, "finished"), jsInvoker)
|
|
790
|
+
NativeAnimatedTurboModuleBaseEndResult<P0, P1> result{
|
|
791
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "finished"), jsInvoker),
|
|
792
|
+
bridging::fromJs<P1>(rt, value.getProperty(rt, "value"), jsInvoker)};
|
|
751
793
|
return result;
|
|
752
794
|
}
|
|
753
795
|
|
|
@@ -755,17 +797,25 @@ struct NativeAnimatedTurboModuleBaseEndResultBridging {
|
|
|
755
797
|
static bool finishedToJs(jsi::Runtime &rt, P0 value) {
|
|
756
798
|
return bridging::toJs(rt, value);
|
|
757
799
|
}
|
|
800
|
+
|
|
801
|
+
static double valueToJs(jsi::Runtime &rt, P1 value) {
|
|
802
|
+
return bridging::toJs(rt, value);
|
|
803
|
+
}
|
|
758
804
|
#endif
|
|
759
805
|
|
|
760
806
|
static jsi::Object toJs(
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
807
|
+
jsi::Runtime &rt,
|
|
808
|
+
const NativeAnimatedTurboModuleBaseEndResult<P0, P1> &value,
|
|
809
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
810
|
+
auto result = facebook::jsi::Object(rt);
|
|
811
|
+
result.setProperty(rt, "finished", bridging::toJs(rt, value.finished, jsInvoker));
|
|
812
|
+
if (value.value) {
|
|
813
|
+
result.setProperty(rt, "value", bridging::toJs(rt, value.value.value(), jsInvoker));
|
|
814
|
+
}
|
|
815
|
+
return result;
|
|
816
|
+
}
|
|
817
|
+
};
|
|
818
|
+
|
|
769
819
|
|
|
770
820
|
|
|
771
821
|
#pragma mark - NativeAnimatedTurboModuleBaseEventMapping
|
|
@@ -795,21 +845,22 @@ struct NativeAnimatedTurboModuleBaseEventMappingBridging {
|
|
|
795
845
|
static jsi::Array nativeEventPathToJs(jsi::Runtime &rt, P0 value) {
|
|
796
846
|
return bridging::toJs(rt, value);
|
|
797
847
|
}
|
|
848
|
+
|
|
798
849
|
static std::optional<double> animatedValueTagToJs(jsi::Runtime &rt, P1 value) {
|
|
799
850
|
return bridging::toJs(rt, value);
|
|
800
851
|
}
|
|
801
852
|
#endif
|
|
802
853
|
|
|
803
854
|
static jsi::Object toJs(
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
855
|
+
jsi::Runtime &rt,
|
|
856
|
+
const NativeAnimatedTurboModuleBaseEventMapping<P0, P1> &value,
|
|
857
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
858
|
+
auto result = facebook::jsi::Object(rt);
|
|
859
|
+
result.setProperty(rt, "nativeEventPath", bridging::toJs(rt, value.nativeEventPath, jsInvoker));
|
|
809
860
|
result.setProperty(rt, "animatedValueTag", bridging::toJs(rt, value.animatedValueTag, jsInvoker));
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
861
|
+
return result;
|
|
862
|
+
}
|
|
863
|
+
};
|
|
813
864
|
|
|
814
865
|
class JSI_EXPORT NativeAnimatedTurboModuleCxxSpecJSI : public TurboModule {
|
|
815
866
|
protected:
|
|
@@ -850,9 +901,11 @@ public:
|
|
|
850
901
|
return delegate_.get(rt, propName);
|
|
851
902
|
}
|
|
852
903
|
|
|
904
|
+
static constexpr std::string_view kModuleName = "NativeAnimatedTurboModule";
|
|
905
|
+
|
|
853
906
|
protected:
|
|
854
907
|
NativeAnimatedTurboModuleCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
855
|
-
: TurboModule(
|
|
908
|
+
: TurboModule(std::string{NativeAnimatedTurboModuleCxxSpec::kModuleName}, jsInvoker),
|
|
856
909
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
857
910
|
|
|
858
911
|
private:
|
|
@@ -1062,7 +1115,84 @@ private:
|
|
|
1062
1115
|
};
|
|
1063
1116
|
|
|
1064
1117
|
|
|
1065
|
-
|
|
1118
|
+
|
|
1119
|
+
#pragma mark - AppStateBaseAppStateConstants
|
|
1120
|
+
|
|
1121
|
+
template <typename P0>
|
|
1122
|
+
struct AppStateBaseAppStateConstants {
|
|
1123
|
+
P0 initialAppState;
|
|
1124
|
+
bool operator==(const AppStateBaseAppStateConstants &other) const {
|
|
1125
|
+
return initialAppState == other.initialAppState;
|
|
1126
|
+
}
|
|
1127
|
+
};
|
|
1128
|
+
|
|
1129
|
+
template <typename P0>
|
|
1130
|
+
struct AppStateBaseAppStateConstantsBridging {
|
|
1131
|
+
static AppStateBaseAppStateConstants<P0> fromJs(
|
|
1132
|
+
jsi::Runtime &rt,
|
|
1133
|
+
const jsi::Object &value,
|
|
1134
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
1135
|
+
AppStateBaseAppStateConstants<P0> result{
|
|
1136
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "initialAppState"), jsInvoker)};
|
|
1137
|
+
return result;
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
#ifdef DEBUG
|
|
1141
|
+
static jsi::String initialAppStateToJs(jsi::Runtime &rt, P0 value) {
|
|
1142
|
+
return bridging::toJs(rt, value);
|
|
1143
|
+
}
|
|
1144
|
+
#endif
|
|
1145
|
+
|
|
1146
|
+
static jsi::Object toJs(
|
|
1147
|
+
jsi::Runtime &rt,
|
|
1148
|
+
const AppStateBaseAppStateConstants<P0> &value,
|
|
1149
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
1150
|
+
auto result = facebook::jsi::Object(rt);
|
|
1151
|
+
result.setProperty(rt, "initialAppState", bridging::toJs(rt, value.initialAppState, jsInvoker));
|
|
1152
|
+
return result;
|
|
1153
|
+
}
|
|
1154
|
+
};
|
|
1155
|
+
|
|
1156
|
+
|
|
1157
|
+
|
|
1158
|
+
#pragma mark - AppStateBaseAppState
|
|
1159
|
+
|
|
1160
|
+
template <typename P0>
|
|
1161
|
+
struct AppStateBaseAppState {
|
|
1162
|
+
P0 app_state;
|
|
1163
|
+
bool operator==(const AppStateBaseAppState &other) const {
|
|
1164
|
+
return app_state == other.app_state;
|
|
1165
|
+
}
|
|
1166
|
+
};
|
|
1167
|
+
|
|
1168
|
+
template <typename P0>
|
|
1169
|
+
struct AppStateBaseAppStateBridging {
|
|
1170
|
+
static AppStateBaseAppState<P0> fromJs(
|
|
1171
|
+
jsi::Runtime &rt,
|
|
1172
|
+
const jsi::Object &value,
|
|
1173
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
1174
|
+
AppStateBaseAppState<P0> result{
|
|
1175
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "app_state"), jsInvoker)};
|
|
1176
|
+
return result;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
#ifdef DEBUG
|
|
1180
|
+
static jsi::String app_stateToJs(jsi::Runtime &rt, P0 value) {
|
|
1181
|
+
return bridging::toJs(rt, value);
|
|
1182
|
+
}
|
|
1183
|
+
#endif
|
|
1184
|
+
|
|
1185
|
+
static jsi::Object toJs(
|
|
1186
|
+
jsi::Runtime &rt,
|
|
1187
|
+
const AppStateBaseAppState<P0> &value,
|
|
1188
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
1189
|
+
auto result = facebook::jsi::Object(rt);
|
|
1190
|
+
result.setProperty(rt, "app_state", bridging::toJs(rt, value.app_state, jsInvoker));
|
|
1191
|
+
return result;
|
|
1192
|
+
}
|
|
1193
|
+
};
|
|
1194
|
+
|
|
1195
|
+
class JSI_EXPORT NativeAppStateCxxSpecJSI : public TurboModule {
|
|
1066
1196
|
protected:
|
|
1067
1197
|
NativeAppStateCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
1068
1198
|
|
|
@@ -1081,9 +1211,11 @@ public:
|
|
|
1081
1211
|
return delegate_.get(rt, propName);
|
|
1082
1212
|
}
|
|
1083
1213
|
|
|
1214
|
+
static constexpr std::string_view kModuleName = "AppState";
|
|
1215
|
+
|
|
1084
1216
|
protected:
|
|
1085
1217
|
NativeAppStateCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
1086
|
-
: TurboModule(
|
|
1218
|
+
: TurboModule(std::string{NativeAppStateCxxSpec::kModuleName}, jsInvoker),
|
|
1087
1219
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
1088
1220
|
|
|
1089
1221
|
private:
|
|
@@ -1133,7 +1265,8 @@ private:
|
|
|
1133
1265
|
};
|
|
1134
1266
|
|
|
1135
1267
|
|
|
1136
|
-
|
|
1268
|
+
|
|
1269
|
+
#pragma mark - AppThemeBaseHighContrastColors
|
|
1137
1270
|
|
|
1138
1271
|
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
|
|
1139
1272
|
struct AppThemeBaseHighContrastColors {
|
|
@@ -1172,35 +1305,42 @@ struct AppThemeBaseHighContrastColorsBridging {
|
|
|
1172
1305
|
static jsi::String ButtonFaceColorToJs(jsi::Runtime &rt, P0 value) {
|
|
1173
1306
|
return bridging::toJs(rt, value);
|
|
1174
1307
|
}
|
|
1308
|
+
|
|
1175
1309
|
static jsi::String ButtonTextColorToJs(jsi::Runtime &rt, P1 value) {
|
|
1176
1310
|
return bridging::toJs(rt, value);
|
|
1177
1311
|
}
|
|
1312
|
+
|
|
1178
1313
|
static jsi::String GrayTextColorToJs(jsi::Runtime &rt, P2 value) {
|
|
1179
1314
|
return bridging::toJs(rt, value);
|
|
1180
1315
|
}
|
|
1316
|
+
|
|
1181
1317
|
static jsi::String HighlightColorToJs(jsi::Runtime &rt, P3 value) {
|
|
1182
1318
|
return bridging::toJs(rt, value);
|
|
1183
1319
|
}
|
|
1320
|
+
|
|
1184
1321
|
static jsi::String HighlightTextColorToJs(jsi::Runtime &rt, P4 value) {
|
|
1185
1322
|
return bridging::toJs(rt, value);
|
|
1186
1323
|
}
|
|
1324
|
+
|
|
1187
1325
|
static jsi::String HotlightColorToJs(jsi::Runtime &rt, P5 value) {
|
|
1188
1326
|
return bridging::toJs(rt, value);
|
|
1189
1327
|
}
|
|
1328
|
+
|
|
1190
1329
|
static jsi::String WindowColorToJs(jsi::Runtime &rt, P6 value) {
|
|
1191
1330
|
return bridging::toJs(rt, value);
|
|
1192
1331
|
}
|
|
1332
|
+
|
|
1193
1333
|
static jsi::String WindowTextColorToJs(jsi::Runtime &rt, P7 value) {
|
|
1194
1334
|
return bridging::toJs(rt, value);
|
|
1195
1335
|
}
|
|
1196
1336
|
#endif
|
|
1197
1337
|
|
|
1198
1338
|
static jsi::Object toJs(
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1339
|
+
jsi::Runtime &rt,
|
|
1340
|
+
const AppThemeBaseHighContrastColors<P0, P1, P2, P3, P4, P5, P6, P7> &value,
|
|
1341
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
1342
|
+
auto result = facebook::jsi::Object(rt);
|
|
1343
|
+
result.setProperty(rt, "ButtonFaceColor", bridging::toJs(rt, value.ButtonFaceColor, jsInvoker));
|
|
1204
1344
|
result.setProperty(rt, "ButtonTextColor", bridging::toJs(rt, value.ButtonTextColor, jsInvoker));
|
|
1205
1345
|
result.setProperty(rt, "GrayTextColor", bridging::toJs(rt, value.GrayTextColor, jsInvoker));
|
|
1206
1346
|
result.setProperty(rt, "HighlightColor", bridging::toJs(rt, value.HighlightColor, jsInvoker));
|
|
@@ -1208,9 +1348,10 @@ struct AppThemeBaseHighContrastColorsBridging {
|
|
|
1208
1348
|
result.setProperty(rt, "HotlightColor", bridging::toJs(rt, value.HotlightColor, jsInvoker));
|
|
1209
1349
|
result.setProperty(rt, "WindowColor", bridging::toJs(rt, value.WindowColor, jsInvoker));
|
|
1210
1350
|
result.setProperty(rt, "WindowTextColor", bridging::toJs(rt, value.WindowTextColor, jsInvoker));
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1351
|
+
return result;
|
|
1352
|
+
}
|
|
1353
|
+
};
|
|
1354
|
+
|
|
1214
1355
|
|
|
1215
1356
|
|
|
1216
1357
|
#pragma mark - AppThemeBaseAppThemeData
|
|
@@ -1240,21 +1381,22 @@ struct AppThemeBaseAppThemeDataBridging {
|
|
|
1240
1381
|
static bool isHighContrastToJs(jsi::Runtime &rt, P0 value) {
|
|
1241
1382
|
return bridging::toJs(rt, value);
|
|
1242
1383
|
}
|
|
1384
|
+
|
|
1243
1385
|
static jsi::Object highContrastColorsToJs(jsi::Runtime &rt, P1 value) {
|
|
1244
1386
|
return bridging::toJs(rt, value);
|
|
1245
1387
|
}
|
|
1246
1388
|
#endif
|
|
1247
1389
|
|
|
1248
1390
|
static jsi::Object toJs(
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1391
|
+
jsi::Runtime &rt,
|
|
1392
|
+
const AppThemeBaseAppThemeData<P0, P1> &value,
|
|
1393
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
1394
|
+
auto result = facebook::jsi::Object(rt);
|
|
1395
|
+
result.setProperty(rt, "isHighContrast", bridging::toJs(rt, value.isHighContrast, jsInvoker));
|
|
1254
1396
|
result.setProperty(rt, "highContrastColors", bridging::toJs(rt, value.highContrastColors, jsInvoker));
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1397
|
+
return result;
|
|
1398
|
+
}
|
|
1399
|
+
};
|
|
1258
1400
|
|
|
1259
1401
|
class JSI_EXPORT NativeAppThemeCxxSpecJSI : public TurboModule {
|
|
1260
1402
|
protected:
|
|
@@ -1272,9 +1414,11 @@ public:
|
|
|
1272
1414
|
return delegate_.get(rt, propName);
|
|
1273
1415
|
}
|
|
1274
1416
|
|
|
1417
|
+
static constexpr std::string_view kModuleName = "AppTheme";
|
|
1418
|
+
|
|
1275
1419
|
protected:
|
|
1276
1420
|
NativeAppThemeCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
1277
|
-
: TurboModule(
|
|
1421
|
+
: TurboModule(std::string{NativeAppThemeCxxSpec::kModuleName}, jsInvoker),
|
|
1278
1422
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
1279
1423
|
|
|
1280
1424
|
private:
|
|
@@ -1322,9 +1466,11 @@ public:
|
|
|
1322
1466
|
return delegate_.get(rt, propName);
|
|
1323
1467
|
}
|
|
1324
1468
|
|
|
1469
|
+
static constexpr std::string_view kModuleName = "BlobModule";
|
|
1470
|
+
|
|
1325
1471
|
protected:
|
|
1326
1472
|
NativeBlobModuleCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
1327
|
-
: TurboModule(
|
|
1473
|
+
: TurboModule(std::string{NativeBlobModuleCxxSpec::kModuleName}, jsInvoker),
|
|
1328
1474
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
1329
1475
|
|
|
1330
1476
|
private:
|
|
@@ -1415,9 +1561,11 @@ public:
|
|
|
1415
1561
|
return delegate_.get(rt, propName);
|
|
1416
1562
|
}
|
|
1417
1563
|
|
|
1564
|
+
static constexpr std::string_view kModuleName = "FileReaderModule";
|
|
1565
|
+
|
|
1418
1566
|
protected:
|
|
1419
1567
|
NativeFileReaderModuleCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
1420
|
-
: TurboModule(
|
|
1568
|
+
: TurboModule(std::string{NativeFileReaderModuleCxxSpec::kModuleName}, jsInvoker),
|
|
1421
1569
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
1422
1570
|
|
|
1423
1571
|
private:
|
|
@@ -1469,9 +1617,11 @@ public:
|
|
|
1469
1617
|
return delegate_.get(rt, propName);
|
|
1470
1618
|
}
|
|
1471
1619
|
|
|
1620
|
+
static constexpr std::string_view kModuleName = "BugReporting";
|
|
1621
|
+
|
|
1472
1622
|
protected:
|
|
1473
1623
|
NativeBugReportingCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
1474
|
-
: TurboModule(
|
|
1624
|
+
: TurboModule(std::string{NativeBugReportingCxxSpec::kModuleName}, jsInvoker),
|
|
1475
1625
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
1476
1626
|
|
|
1477
1627
|
private:
|
|
@@ -1513,7 +1663,8 @@ private:
|
|
|
1513
1663
|
};
|
|
1514
1664
|
|
|
1515
1665
|
|
|
1516
|
-
|
|
1666
|
+
|
|
1667
|
+
#pragma mark - ExceptionsManagerBaseStackFrame
|
|
1517
1668
|
|
|
1518
1669
|
template <typename P0, typename P1, typename P2, typename P3, typename P4>
|
|
1519
1670
|
struct ExceptionsManagerBaseStackFrame {
|
|
@@ -1546,35 +1697,40 @@ struct ExceptionsManagerBaseStackFrameBridging {
|
|
|
1546
1697
|
static std::optional<double> columnToJs(jsi::Runtime &rt, P0 value) {
|
|
1547
1698
|
return bridging::toJs(rt, value);
|
|
1548
1699
|
}
|
|
1700
|
+
|
|
1549
1701
|
static std::optional<jsi::String> fileToJs(jsi::Runtime &rt, P1 value) {
|
|
1550
1702
|
return bridging::toJs(rt, value);
|
|
1551
1703
|
}
|
|
1704
|
+
|
|
1552
1705
|
static std::optional<double> lineNumberToJs(jsi::Runtime &rt, P2 value) {
|
|
1553
1706
|
return bridging::toJs(rt, value);
|
|
1554
1707
|
}
|
|
1708
|
+
|
|
1555
1709
|
static jsi::String methodNameToJs(jsi::Runtime &rt, P3 value) {
|
|
1556
1710
|
return bridging::toJs(rt, value);
|
|
1557
1711
|
}
|
|
1712
|
+
|
|
1558
1713
|
static bool collapseToJs(jsi::Runtime &rt, P4 value) {
|
|
1559
1714
|
return bridging::toJs(rt, value);
|
|
1560
1715
|
}
|
|
1561
1716
|
#endif
|
|
1562
1717
|
|
|
1563
1718
|
static jsi::Object toJs(
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1719
|
+
jsi::Runtime &rt,
|
|
1720
|
+
const ExceptionsManagerBaseStackFrame<P0, P1, P2, P3, P4> &value,
|
|
1721
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
1722
|
+
auto result = facebook::jsi::Object(rt);
|
|
1723
|
+
result.setProperty(rt, "column", bridging::toJs(rt, value.column, jsInvoker));
|
|
1569
1724
|
result.setProperty(rt, "file", bridging::toJs(rt, value.file, jsInvoker));
|
|
1570
1725
|
result.setProperty(rt, "lineNumber", bridging::toJs(rt, value.lineNumber, jsInvoker));
|
|
1571
1726
|
result.setProperty(rt, "methodName", bridging::toJs(rt, value.methodName, jsInvoker));
|
|
1572
1727
|
if (value.collapse) {
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1728
|
+
result.setProperty(rt, "collapse", bridging::toJs(rt, value.collapse.value(), jsInvoker));
|
|
1729
|
+
}
|
|
1730
|
+
return result;
|
|
1731
|
+
}
|
|
1732
|
+
};
|
|
1733
|
+
|
|
1578
1734
|
|
|
1579
1735
|
|
|
1580
1736
|
#pragma mark - ExceptionsManagerBaseExceptionData
|
|
@@ -1616,35 +1772,42 @@ struct ExceptionsManagerBaseExceptionDataBridging {
|
|
|
1616
1772
|
static jsi::String messageToJs(jsi::Runtime &rt, P0 value) {
|
|
1617
1773
|
return bridging::toJs(rt, value);
|
|
1618
1774
|
}
|
|
1775
|
+
|
|
1619
1776
|
static std::optional<jsi::String> originalMessageToJs(jsi::Runtime &rt, P1 value) {
|
|
1620
1777
|
return bridging::toJs(rt, value);
|
|
1621
1778
|
}
|
|
1779
|
+
|
|
1622
1780
|
static std::optional<jsi::String> nameToJs(jsi::Runtime &rt, P2 value) {
|
|
1623
1781
|
return bridging::toJs(rt, value);
|
|
1624
1782
|
}
|
|
1783
|
+
|
|
1625
1784
|
static std::optional<jsi::String> componentStackToJs(jsi::Runtime &rt, P3 value) {
|
|
1626
1785
|
return bridging::toJs(rt, value);
|
|
1627
1786
|
}
|
|
1787
|
+
|
|
1628
1788
|
static jsi::Array stackToJs(jsi::Runtime &rt, P4 value) {
|
|
1629
1789
|
return bridging::toJs(rt, value);
|
|
1630
1790
|
}
|
|
1791
|
+
|
|
1631
1792
|
static double idToJs(jsi::Runtime &rt, P5 value) {
|
|
1632
1793
|
return bridging::toJs(rt, value);
|
|
1633
1794
|
}
|
|
1795
|
+
|
|
1634
1796
|
static bool isFatalToJs(jsi::Runtime &rt, P6 value) {
|
|
1635
1797
|
return bridging::toJs(rt, value);
|
|
1636
1798
|
}
|
|
1799
|
+
|
|
1637
1800
|
static jsi::Object extraDataToJs(jsi::Runtime &rt, P7 value) {
|
|
1638
1801
|
return bridging::toJs(rt, value);
|
|
1639
1802
|
}
|
|
1640
1803
|
#endif
|
|
1641
1804
|
|
|
1642
1805
|
static jsi::Object toJs(
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1806
|
+
jsi::Runtime &rt,
|
|
1807
|
+
const ExceptionsManagerBaseExceptionData<P0, P1, P2, P3, P4, P5, P6, P7> &value,
|
|
1808
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
1809
|
+
auto result = facebook::jsi::Object(rt);
|
|
1810
|
+
result.setProperty(rt, "message", bridging::toJs(rt, value.message, jsInvoker));
|
|
1648
1811
|
result.setProperty(rt, "originalMessage", bridging::toJs(rt, value.originalMessage, jsInvoker));
|
|
1649
1812
|
result.setProperty(rt, "name", bridging::toJs(rt, value.name, jsInvoker));
|
|
1650
1813
|
result.setProperty(rt, "componentStack", bridging::toJs(rt, value.componentStack, jsInvoker));
|
|
@@ -1652,11 +1815,11 @@ struct ExceptionsManagerBaseExceptionDataBridging {
|
|
|
1652
1815
|
result.setProperty(rt, "id", bridging::toJs(rt, value.id, jsInvoker));
|
|
1653
1816
|
result.setProperty(rt, "isFatal", bridging::toJs(rt, value.isFatal, jsInvoker));
|
|
1654
1817
|
if (value.extraData) {
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1818
|
+
result.setProperty(rt, "extraData", bridging::toJs(rt, value.extraData.value(), jsInvoker));
|
|
1819
|
+
}
|
|
1820
|
+
return result;
|
|
1821
|
+
}
|
|
1822
|
+
};
|
|
1660
1823
|
|
|
1661
1824
|
class JSI_EXPORT NativeExceptionsManagerCxxSpecJSI : public TurboModule {
|
|
1662
1825
|
protected:
|
|
@@ -1678,9 +1841,11 @@ public:
|
|
|
1678
1841
|
return delegate_.get(rt, propName);
|
|
1679
1842
|
}
|
|
1680
1843
|
|
|
1844
|
+
static constexpr std::string_view kModuleName = "ExceptionsManager";
|
|
1845
|
+
|
|
1681
1846
|
protected:
|
|
1682
1847
|
NativeExceptionsManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
1683
|
-
: TurboModule(
|
|
1848
|
+
: TurboModule(std::string{NativeExceptionsManagerCxxSpec::kModuleName}, jsInvoker),
|
|
1684
1849
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
1685
1850
|
|
|
1686
1851
|
private:
|
|
@@ -1757,9 +1922,11 @@ public:
|
|
|
1757
1922
|
return delegate_.get(rt, propName);
|
|
1758
1923
|
}
|
|
1759
1924
|
|
|
1925
|
+
static constexpr std::string_view kModuleName = "DevToolsSettingsManager";
|
|
1926
|
+
|
|
1760
1927
|
protected:
|
|
1761
1928
|
NativeDevToolsSettingsManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
1762
|
-
: TurboModule(
|
|
1929
|
+
: TurboModule(std::string{NativeDevToolsSettingsManagerCxxSpec::kModuleName}, jsInvoker),
|
|
1763
1930
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
1764
1931
|
|
|
1765
1932
|
private:
|
|
@@ -1825,9 +1992,11 @@ public:
|
|
|
1825
1992
|
return delegate_.get(rt, propName);
|
|
1826
1993
|
}
|
|
1827
1994
|
|
|
1995
|
+
static constexpr std::string_view kModuleName = "JSCHeapCapture";
|
|
1996
|
+
|
|
1828
1997
|
protected:
|
|
1829
1998
|
NativeJSCHeapCaptureCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
1830
|
-
: TurboModule(
|
|
1999
|
+
: TurboModule(std::string{NativeJSCHeapCaptureCxxSpec::kModuleName}, jsInvoker),
|
|
1831
2000
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
1832
2001
|
|
|
1833
2002
|
private:
|
|
@@ -1853,7 +2022,8 @@ private:
|
|
|
1853
2022
|
};
|
|
1854
2023
|
|
|
1855
2024
|
|
|
1856
|
-
|
|
2025
|
+
|
|
2026
|
+
#pragma mark - ImageEditingManagerBaseOptions
|
|
1857
2027
|
|
|
1858
2028
|
template <typename P0, typename P1, typename P2, typename P3, typename P4>
|
|
1859
2029
|
struct ImageEditingManagerBaseOptions {
|
|
@@ -1886,39 +2056,43 @@ struct ImageEditingManagerBaseOptionsBridging {
|
|
|
1886
2056
|
static jsi::Object offsetToJs(jsi::Runtime &rt, P0 value) {
|
|
1887
2057
|
return bridging::toJs(rt, value);
|
|
1888
2058
|
}
|
|
2059
|
+
|
|
1889
2060
|
static jsi::Object sizeToJs(jsi::Runtime &rt, P1 value) {
|
|
1890
2061
|
return bridging::toJs(rt, value);
|
|
1891
2062
|
}
|
|
2063
|
+
|
|
1892
2064
|
static std::optional<jsi::Object> displaySizeToJs(jsi::Runtime &rt, P2 value) {
|
|
1893
2065
|
return bridging::toJs(rt, value);
|
|
1894
2066
|
}
|
|
2067
|
+
|
|
1895
2068
|
static std::optional<jsi::String> resizeModeToJs(jsi::Runtime &rt, P3 value) {
|
|
1896
2069
|
return bridging::toJs(rt, value);
|
|
1897
2070
|
}
|
|
2071
|
+
|
|
1898
2072
|
static bool allowExternalStorageToJs(jsi::Runtime &rt, P4 value) {
|
|
1899
2073
|
return bridging::toJs(rt, value);
|
|
1900
2074
|
}
|
|
1901
2075
|
#endif
|
|
1902
2076
|
|
|
1903
2077
|
static jsi::Object toJs(
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
2078
|
+
jsi::Runtime &rt,
|
|
2079
|
+
const ImageEditingManagerBaseOptions<P0, P1, P2, P3, P4> &value,
|
|
2080
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
2081
|
+
auto result = facebook::jsi::Object(rt);
|
|
2082
|
+
result.setProperty(rt, "offset", bridging::toJs(rt, value.offset, jsInvoker));
|
|
1909
2083
|
result.setProperty(rt, "size", bridging::toJs(rt, value.size, jsInvoker));
|
|
1910
2084
|
if (value.displaySize) {
|
|
1911
|
-
|
|
1912
|
-
|
|
2085
|
+
result.setProperty(rt, "displaySize", bridging::toJs(rt, value.displaySize.value(), jsInvoker));
|
|
2086
|
+
}
|
|
1913
2087
|
if (value.resizeMode) {
|
|
1914
|
-
|
|
1915
|
-
|
|
2088
|
+
result.setProperty(rt, "resizeMode", bridging::toJs(rt, value.resizeMode.value(), jsInvoker));
|
|
2089
|
+
}
|
|
1916
2090
|
if (value.allowExternalStorage) {
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
2091
|
+
result.setProperty(rt, "allowExternalStorage", bridging::toJs(rt, value.allowExternalStorage.value(), jsInvoker));
|
|
2092
|
+
}
|
|
2093
|
+
return result;
|
|
2094
|
+
}
|
|
2095
|
+
};
|
|
1922
2096
|
|
|
1923
2097
|
class JSI_EXPORT NativeImageEditorCxxSpecJSI : public TurboModule {
|
|
1924
2098
|
protected:
|
|
@@ -1937,9 +2111,11 @@ public:
|
|
|
1937
2111
|
return delegate_.get(rt, propName);
|
|
1938
2112
|
}
|
|
1939
2113
|
|
|
2114
|
+
static constexpr std::string_view kModuleName = "ImageEditingManager";
|
|
2115
|
+
|
|
1940
2116
|
protected:
|
|
1941
2117
|
NativeImageEditorCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
1942
|
-
: TurboModule(
|
|
2118
|
+
: TurboModule(std::string{NativeImageEditorCxxSpec::kModuleName}, jsInvoker),
|
|
1943
2119
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
1944
2120
|
|
|
1945
2121
|
private:
|
|
@@ -1994,9 +2170,11 @@ public:
|
|
|
1994
2170
|
return delegate_.get(rt, propName);
|
|
1995
2171
|
}
|
|
1996
2172
|
|
|
2173
|
+
static constexpr std::string_view kModuleName = "ImageLoader";
|
|
2174
|
+
|
|
1997
2175
|
protected:
|
|
1998
2176
|
NativeImageLoaderAndroidCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
1999
|
-
: TurboModule(
|
|
2177
|
+
: TurboModule(std::string{NativeImageLoaderAndroidCxxSpec::kModuleName}, jsInvoker),
|
|
2000
2178
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
2001
2179
|
|
|
2002
2180
|
private:
|
|
@@ -2083,9 +2261,11 @@ public:
|
|
|
2083
2261
|
return delegate_.get(rt, propName);
|
|
2084
2262
|
}
|
|
2085
2263
|
|
|
2264
|
+
static constexpr std::string_view kModuleName = "ImageLoader";
|
|
2265
|
+
|
|
2086
2266
|
protected:
|
|
2087
2267
|
NativeImageLoaderIOSCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
2088
|
-
: TurboModule(
|
|
2268
|
+
: TurboModule(std::string{NativeImageLoaderIOSCxxSpec::kModuleName}, jsInvoker),
|
|
2089
2269
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
2090
2270
|
|
|
2091
2271
|
private:
|
|
@@ -2168,9 +2348,11 @@ public:
|
|
|
2168
2348
|
return delegate_.get(rt, propName);
|
|
2169
2349
|
}
|
|
2170
2350
|
|
|
2351
|
+
static constexpr std::string_view kModuleName = "ImageStoreManager";
|
|
2352
|
+
|
|
2171
2353
|
protected:
|
|
2172
2354
|
NativeImageStoreAndroidCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
2173
|
-
: TurboModule(
|
|
2355
|
+
: TurboModule(std::string{NativeImageStoreAndroidCxxSpec::kModuleName}, jsInvoker),
|
|
2174
2356
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
2175
2357
|
|
|
2176
2358
|
private:
|
|
@@ -2224,9 +2406,11 @@ public:
|
|
|
2224
2406
|
return delegate_.get(rt, propName);
|
|
2225
2407
|
}
|
|
2226
2408
|
|
|
2409
|
+
static constexpr std::string_view kModuleName = "ImageStoreManager";
|
|
2410
|
+
|
|
2227
2411
|
protected:
|
|
2228
2412
|
NativeImageStoreIOSCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
2229
|
-
: TurboModule(
|
|
2413
|
+
: TurboModule(std::string{NativeImageStoreIOSCxxSpec::kModuleName}, jsInvoker),
|
|
2230
2414
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
2231
2415
|
|
|
2232
2416
|
private:
|
|
@@ -2303,9 +2487,11 @@ public:
|
|
|
2303
2487
|
return delegate_.get(rt, propName);
|
|
2304
2488
|
}
|
|
2305
2489
|
|
|
2490
|
+
static constexpr std::string_view kModuleName = "FrameRateLogger";
|
|
2491
|
+
|
|
2306
2492
|
protected:
|
|
2307
2493
|
NativeFrameRateLoggerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
2308
|
-
: TurboModule(
|
|
2494
|
+
: TurboModule(std::string{NativeFrameRateLoggerCxxSpec::kModuleName}, jsInvoker),
|
|
2309
2495
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
2310
2496
|
|
|
2311
2497
|
private:
|
|
@@ -2355,46 +2541,263 @@ private:
|
|
|
2355
2541
|
};
|
|
2356
2542
|
|
|
2357
2543
|
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
NativeIntentAndroidCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
2361
|
-
|
|
2362
|
-
public:
|
|
2363
|
-
virtual jsi::Value getInitialURL(jsi::Runtime &rt) = 0;
|
|
2364
|
-
virtual jsi::Value canOpenURL(jsi::Runtime &rt, jsi::String url) = 0;
|
|
2365
|
-
virtual jsi::Value openURL(jsi::Runtime &rt, jsi::String url) = 0;
|
|
2366
|
-
virtual jsi::Value openSettings(jsi::Runtime &rt) = 0;
|
|
2367
|
-
virtual jsi::Value sendIntent(jsi::Runtime &rt, jsi::String action, std::optional<jsi::Array> extras) = 0;
|
|
2544
|
+
|
|
2545
|
+
#pragma mark - NativeIntersectionObserverCxxBaseNativeIntersectionObserverObserveOptions
|
|
2368
2546
|
|
|
2547
|
+
template <typename P0, typename P1, typename P2>
|
|
2548
|
+
struct NativeIntersectionObserverCxxBaseNativeIntersectionObserverObserveOptions {
|
|
2549
|
+
P0 intersectionObserverId;
|
|
2550
|
+
P1 targetShadowNode;
|
|
2551
|
+
P2 thresholds;
|
|
2552
|
+
bool operator==(const NativeIntersectionObserverCxxBaseNativeIntersectionObserverObserveOptions &other) const {
|
|
2553
|
+
return intersectionObserverId == other.intersectionObserverId && targetShadowNode == other.targetShadowNode && thresholds == other.thresholds;
|
|
2554
|
+
}
|
|
2369
2555
|
};
|
|
2370
2556
|
|
|
2371
|
-
template <typename
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2557
|
+
template <typename P0, typename P1, typename P2>
|
|
2558
|
+
struct NativeIntersectionObserverCxxBaseNativeIntersectionObserverObserveOptionsBridging {
|
|
2559
|
+
static NativeIntersectionObserverCxxBaseNativeIntersectionObserverObserveOptions<P0, P1, P2> fromJs(
|
|
2560
|
+
jsi::Runtime &rt,
|
|
2561
|
+
const jsi::Object &value,
|
|
2562
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
2563
|
+
NativeIntersectionObserverCxxBaseNativeIntersectionObserverObserveOptions<P0, P1, P2> result{
|
|
2564
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "intersectionObserverId"), jsInvoker),
|
|
2565
|
+
bridging::fromJs<P1>(rt, value.getProperty(rt, "targetShadowNode"), jsInvoker),
|
|
2566
|
+
bridging::fromJs<P2>(rt, value.getProperty(rt, "thresholds"), jsInvoker)};
|
|
2567
|
+
return result;
|
|
2376
2568
|
}
|
|
2377
2569
|
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2570
|
+
#ifdef DEBUG
|
|
2571
|
+
static double intersectionObserverIdToJs(jsi::Runtime &rt, P0 value) {
|
|
2572
|
+
return bridging::toJs(rt, value);
|
|
2573
|
+
}
|
|
2382
2574
|
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
2387
|
-
NativeIntentAndroidCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {}
|
|
2575
|
+
static jsi::Value targetShadowNodeToJs(jsi::Runtime &rt, P1 value) {
|
|
2576
|
+
return bridging::toJs(rt, value);
|
|
2577
|
+
}
|
|
2388
2578
|
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2579
|
+
static jsi::Array thresholdsToJs(jsi::Runtime &rt, P2 value) {
|
|
2580
|
+
return bridging::toJs(rt, value);
|
|
2581
|
+
}
|
|
2582
|
+
#endif
|
|
2393
2583
|
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2584
|
+
static jsi::Object toJs(
|
|
2585
|
+
jsi::Runtime &rt,
|
|
2586
|
+
const NativeIntersectionObserverCxxBaseNativeIntersectionObserverObserveOptions<P0, P1, P2> &value,
|
|
2587
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
2588
|
+
auto result = facebook::jsi::Object(rt);
|
|
2589
|
+
result.setProperty(rt, "intersectionObserverId", bridging::toJs(rt, value.intersectionObserverId, jsInvoker));
|
|
2590
|
+
result.setProperty(rt, "targetShadowNode", bridging::toJs(rt, value.targetShadowNode, jsInvoker));
|
|
2591
|
+
result.setProperty(rt, "thresholds", bridging::toJs(rt, value.thresholds, jsInvoker));
|
|
2592
|
+
return result;
|
|
2593
|
+
}
|
|
2594
|
+
};
|
|
2595
|
+
|
|
2596
|
+
|
|
2597
|
+
|
|
2598
|
+
#pragma mark - NativeIntersectionObserverCxxBaseNativeIntersectionObserverEntry
|
|
2599
|
+
|
|
2600
|
+
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
|
|
2601
|
+
struct NativeIntersectionObserverCxxBaseNativeIntersectionObserverEntry {
|
|
2602
|
+
P0 intersectionObserverId;
|
|
2603
|
+
P1 targetInstanceHandle;
|
|
2604
|
+
P2 targetRect;
|
|
2605
|
+
P3 rootRect;
|
|
2606
|
+
P4 intersectionRect;
|
|
2607
|
+
P5 isIntersectingAboveThresholds;
|
|
2608
|
+
P6 time;
|
|
2609
|
+
bool operator==(const NativeIntersectionObserverCxxBaseNativeIntersectionObserverEntry &other) const {
|
|
2610
|
+
return intersectionObserverId == other.intersectionObserverId && targetInstanceHandle == other.targetInstanceHandle && targetRect == other.targetRect && rootRect == other.rootRect && intersectionRect == other.intersectionRect && isIntersectingAboveThresholds == other.isIntersectingAboveThresholds && time == other.time;
|
|
2611
|
+
}
|
|
2612
|
+
};
|
|
2613
|
+
|
|
2614
|
+
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
|
|
2615
|
+
struct NativeIntersectionObserverCxxBaseNativeIntersectionObserverEntryBridging {
|
|
2616
|
+
static NativeIntersectionObserverCxxBaseNativeIntersectionObserverEntry<P0, P1, P2, P3, P4, P5, P6> fromJs(
|
|
2617
|
+
jsi::Runtime &rt,
|
|
2618
|
+
const jsi::Object &value,
|
|
2619
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
2620
|
+
NativeIntersectionObserverCxxBaseNativeIntersectionObserverEntry<P0, P1, P2, P3, P4, P5, P6> result{
|
|
2621
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "intersectionObserverId"), jsInvoker),
|
|
2622
|
+
bridging::fromJs<P1>(rt, value.getProperty(rt, "targetInstanceHandle"), jsInvoker),
|
|
2623
|
+
bridging::fromJs<P2>(rt, value.getProperty(rt, "targetRect"), jsInvoker),
|
|
2624
|
+
bridging::fromJs<P3>(rt, value.getProperty(rt, "rootRect"), jsInvoker),
|
|
2625
|
+
bridging::fromJs<P4>(rt, value.getProperty(rt, "intersectionRect"), jsInvoker),
|
|
2626
|
+
bridging::fromJs<P5>(rt, value.getProperty(rt, "isIntersectingAboveThresholds"), jsInvoker),
|
|
2627
|
+
bridging::fromJs<P6>(rt, value.getProperty(rt, "time"), jsInvoker)};
|
|
2628
|
+
return result;
|
|
2629
|
+
}
|
|
2630
|
+
|
|
2631
|
+
#ifdef DEBUG
|
|
2632
|
+
static double intersectionObserverIdToJs(jsi::Runtime &rt, P0 value) {
|
|
2633
|
+
return bridging::toJs(rt, value);
|
|
2634
|
+
}
|
|
2635
|
+
|
|
2636
|
+
static jsi::Value targetInstanceHandleToJs(jsi::Runtime &rt, P1 value) {
|
|
2637
|
+
return bridging::toJs(rt, value);
|
|
2638
|
+
}
|
|
2639
|
+
|
|
2640
|
+
static jsi::Array targetRectToJs(jsi::Runtime &rt, P2 value) {
|
|
2641
|
+
return bridging::toJs(rt, value);
|
|
2642
|
+
}
|
|
2643
|
+
|
|
2644
|
+
static jsi::Array rootRectToJs(jsi::Runtime &rt, P3 value) {
|
|
2645
|
+
return bridging::toJs(rt, value);
|
|
2646
|
+
}
|
|
2647
|
+
|
|
2648
|
+
static std::optional<jsi::Array> intersectionRectToJs(jsi::Runtime &rt, P4 value) {
|
|
2649
|
+
return bridging::toJs(rt, value);
|
|
2650
|
+
}
|
|
2651
|
+
|
|
2652
|
+
static bool isIntersectingAboveThresholdsToJs(jsi::Runtime &rt, P5 value) {
|
|
2653
|
+
return bridging::toJs(rt, value);
|
|
2654
|
+
}
|
|
2655
|
+
|
|
2656
|
+
static double timeToJs(jsi::Runtime &rt, P6 value) {
|
|
2657
|
+
return bridging::toJs(rt, value);
|
|
2658
|
+
}
|
|
2659
|
+
#endif
|
|
2660
|
+
|
|
2661
|
+
static jsi::Object toJs(
|
|
2662
|
+
jsi::Runtime &rt,
|
|
2663
|
+
const NativeIntersectionObserverCxxBaseNativeIntersectionObserverEntry<P0, P1, P2, P3, P4, P5, P6> &value,
|
|
2664
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
2665
|
+
auto result = facebook::jsi::Object(rt);
|
|
2666
|
+
result.setProperty(rt, "intersectionObserverId", bridging::toJs(rt, value.intersectionObserverId, jsInvoker));
|
|
2667
|
+
result.setProperty(rt, "targetInstanceHandle", bridging::toJs(rt, value.targetInstanceHandle, jsInvoker));
|
|
2668
|
+
result.setProperty(rt, "targetRect", bridging::toJs(rt, value.targetRect, jsInvoker));
|
|
2669
|
+
result.setProperty(rt, "rootRect", bridging::toJs(rt, value.rootRect, jsInvoker));
|
|
2670
|
+
result.setProperty(rt, "intersectionRect", bridging::toJs(rt, value.intersectionRect, jsInvoker));
|
|
2671
|
+
result.setProperty(rt, "isIntersectingAboveThresholds", bridging::toJs(rt, value.isIntersectingAboveThresholds, jsInvoker));
|
|
2672
|
+
result.setProperty(rt, "time", bridging::toJs(rt, value.time, jsInvoker));
|
|
2673
|
+
return result;
|
|
2674
|
+
}
|
|
2675
|
+
};
|
|
2676
|
+
|
|
2677
|
+
class JSI_EXPORT NativeIntersectionObserverCxxSpecJSI : public TurboModule {
|
|
2678
|
+
protected:
|
|
2679
|
+
NativeIntersectionObserverCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
2680
|
+
|
|
2681
|
+
public:
|
|
2682
|
+
virtual void observe(jsi::Runtime &rt, jsi::Object options) = 0;
|
|
2683
|
+
virtual void unobserve(jsi::Runtime &rt, double intersectionObserverId, jsi::Value targetShadowNode) = 0;
|
|
2684
|
+
virtual void connect(jsi::Runtime &rt, jsi::Function notifyIntersectionObserversCallback) = 0;
|
|
2685
|
+
virtual void disconnect(jsi::Runtime &rt) = 0;
|
|
2686
|
+
virtual jsi::Array takeRecords(jsi::Runtime &rt) = 0;
|
|
2687
|
+
|
|
2688
|
+
};
|
|
2689
|
+
|
|
2690
|
+
template <typename T>
|
|
2691
|
+
class JSI_EXPORT NativeIntersectionObserverCxxSpec : public TurboModule {
|
|
2692
|
+
public:
|
|
2693
|
+
jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
2694
|
+
return delegate_.get(rt, propName);
|
|
2695
|
+
}
|
|
2696
|
+
|
|
2697
|
+
static constexpr std::string_view kModuleName = "NativeIntersectionObserverCxx";
|
|
2698
|
+
|
|
2699
|
+
protected:
|
|
2700
|
+
NativeIntersectionObserverCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
2701
|
+
: TurboModule(std::string{NativeIntersectionObserverCxxSpec::kModuleName}, jsInvoker),
|
|
2702
|
+
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
2703
|
+
|
|
2704
|
+
private:
|
|
2705
|
+
class Delegate : public NativeIntersectionObserverCxxSpecJSI {
|
|
2706
|
+
public:
|
|
2707
|
+
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
2708
|
+
NativeIntersectionObserverCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {}
|
|
2709
|
+
|
|
2710
|
+
void observe(jsi::Runtime &rt, jsi::Object options) override {
|
|
2711
|
+
static_assert(
|
|
2712
|
+
bridging::getParameterCount(&T::observe) == 2,
|
|
2713
|
+
"Expected observe(...) to have 2 parameters");
|
|
2714
|
+
|
|
2715
|
+
return bridging::callFromJs<void>(
|
|
2716
|
+
rt, &T::observe, jsInvoker_, instance_, std::move(options));
|
|
2717
|
+
}
|
|
2718
|
+
void unobserve(jsi::Runtime &rt, double intersectionObserverId, jsi::Value targetShadowNode) override {
|
|
2719
|
+
static_assert(
|
|
2720
|
+
bridging::getParameterCount(&T::unobserve) == 3,
|
|
2721
|
+
"Expected unobserve(...) to have 3 parameters");
|
|
2722
|
+
|
|
2723
|
+
return bridging::callFromJs<void>(
|
|
2724
|
+
rt, &T::unobserve, jsInvoker_, instance_, std::move(intersectionObserverId), std::move(targetShadowNode));
|
|
2725
|
+
}
|
|
2726
|
+
void connect(jsi::Runtime &rt, jsi::Function notifyIntersectionObserversCallback) override {
|
|
2727
|
+
static_assert(
|
|
2728
|
+
bridging::getParameterCount(&T::connect) == 2,
|
|
2729
|
+
"Expected connect(...) to have 2 parameters");
|
|
2730
|
+
|
|
2731
|
+
return bridging::callFromJs<void>(
|
|
2732
|
+
rt, &T::connect, jsInvoker_, instance_, std::move(notifyIntersectionObserversCallback));
|
|
2733
|
+
}
|
|
2734
|
+
void disconnect(jsi::Runtime &rt) override {
|
|
2735
|
+
static_assert(
|
|
2736
|
+
bridging::getParameterCount(&T::disconnect) == 1,
|
|
2737
|
+
"Expected disconnect(...) to have 1 parameters");
|
|
2738
|
+
|
|
2739
|
+
return bridging::callFromJs<void>(
|
|
2740
|
+
rt, &T::disconnect, jsInvoker_, instance_);
|
|
2741
|
+
}
|
|
2742
|
+
jsi::Array takeRecords(jsi::Runtime &rt) override {
|
|
2743
|
+
static_assert(
|
|
2744
|
+
bridging::getParameterCount(&T::takeRecords) == 1,
|
|
2745
|
+
"Expected takeRecords(...) to have 1 parameters");
|
|
2746
|
+
|
|
2747
|
+
return bridging::callFromJs<jsi::Array>(
|
|
2748
|
+
rt, &T::takeRecords, jsInvoker_, instance_);
|
|
2749
|
+
}
|
|
2750
|
+
|
|
2751
|
+
private:
|
|
2752
|
+
T *instance_;
|
|
2753
|
+
};
|
|
2754
|
+
|
|
2755
|
+
Delegate delegate_;
|
|
2756
|
+
};
|
|
2757
|
+
|
|
2758
|
+
|
|
2759
|
+
class JSI_EXPORT NativeIntentAndroidCxxSpecJSI : public TurboModule {
|
|
2760
|
+
protected:
|
|
2761
|
+
NativeIntentAndroidCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
2762
|
+
|
|
2763
|
+
public:
|
|
2764
|
+
virtual jsi::Value getInitialURL(jsi::Runtime &rt) = 0;
|
|
2765
|
+
virtual jsi::Value canOpenURL(jsi::Runtime &rt, jsi::String url) = 0;
|
|
2766
|
+
virtual jsi::Value openURL(jsi::Runtime &rt, jsi::String url) = 0;
|
|
2767
|
+
virtual jsi::Value openSettings(jsi::Runtime &rt) = 0;
|
|
2768
|
+
virtual jsi::Value sendIntent(jsi::Runtime &rt, jsi::String action, std::optional<jsi::Array> extras) = 0;
|
|
2769
|
+
|
|
2770
|
+
};
|
|
2771
|
+
|
|
2772
|
+
template <typename T>
|
|
2773
|
+
class JSI_EXPORT NativeIntentAndroidCxxSpec : public TurboModule {
|
|
2774
|
+
public:
|
|
2775
|
+
jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
2776
|
+
return delegate_.get(rt, propName);
|
|
2777
|
+
}
|
|
2778
|
+
|
|
2779
|
+
static constexpr std::string_view kModuleName = "IntentAndroid";
|
|
2780
|
+
|
|
2781
|
+
protected:
|
|
2782
|
+
NativeIntentAndroidCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
2783
|
+
: TurboModule(std::string{NativeIntentAndroidCxxSpec::kModuleName}, jsInvoker),
|
|
2784
|
+
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
2785
|
+
|
|
2786
|
+
private:
|
|
2787
|
+
class Delegate : public NativeIntentAndroidCxxSpecJSI {
|
|
2788
|
+
public:
|
|
2789
|
+
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
2790
|
+
NativeIntentAndroidCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {}
|
|
2791
|
+
|
|
2792
|
+
jsi::Value getInitialURL(jsi::Runtime &rt) override {
|
|
2793
|
+
static_assert(
|
|
2794
|
+
bridging::getParameterCount(&T::getInitialURL) == 1,
|
|
2795
|
+
"Expected getInitialURL(...) to have 1 parameters");
|
|
2796
|
+
|
|
2797
|
+
return bridging::callFromJs<jsi::Value>(
|
|
2798
|
+
rt, &T::getInitialURL, jsInvoker_, instance_);
|
|
2799
|
+
}
|
|
2800
|
+
jsi::Value canOpenURL(jsi::Runtime &rt, jsi::String url) override {
|
|
2398
2801
|
static_assert(
|
|
2399
2802
|
bridging::getParameterCount(&T::canOpenURL) == 2,
|
|
2400
2803
|
"Expected canOpenURL(...) to have 2 parameters");
|
|
@@ -2456,9 +2859,11 @@ public:
|
|
|
2456
2859
|
return delegate_.get(rt, propName);
|
|
2457
2860
|
}
|
|
2458
2861
|
|
|
2862
|
+
static constexpr std::string_view kModuleName = "LinkingManager";
|
|
2863
|
+
|
|
2459
2864
|
protected:
|
|
2460
2865
|
NativeLinkingManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
2461
|
-
: TurboModule(
|
|
2866
|
+
: TurboModule(std::string{NativeLinkingManagerCxxSpec::kModuleName}, jsInvoker),
|
|
2462
2867
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
2463
2868
|
|
|
2464
2869
|
private:
|
|
@@ -2541,9 +2946,11 @@ public:
|
|
|
2541
2946
|
return delegate_.get(rt, propName);
|
|
2542
2947
|
}
|
|
2543
2948
|
|
|
2949
|
+
static constexpr std::string_view kModuleName = "ModalManager";
|
|
2950
|
+
|
|
2544
2951
|
protected:
|
|
2545
2952
|
NativeModalManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
2546
|
-
: TurboModule(
|
|
2953
|
+
: TurboModule(std::string{NativeModalManagerCxxSpec::kModuleName}, jsInvoker),
|
|
2547
2954
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
2548
2955
|
|
|
2549
2956
|
private:
|
|
@@ -2577,6 +2984,200 @@ private:
|
|
|
2577
2984
|
};
|
|
2578
2985
|
|
|
2579
2986
|
|
|
2987
|
+
|
|
2988
|
+
#pragma mark - NativeMutationObserverCxxBaseNativeMutationObserverObserveOptions
|
|
2989
|
+
|
|
2990
|
+
template <typename P0, typename P1, typename P2>
|
|
2991
|
+
struct NativeMutationObserverCxxBaseNativeMutationObserverObserveOptions {
|
|
2992
|
+
P0 mutationObserverId;
|
|
2993
|
+
P1 targetShadowNode;
|
|
2994
|
+
P2 subtree;
|
|
2995
|
+
bool operator==(const NativeMutationObserverCxxBaseNativeMutationObserverObserveOptions &other) const {
|
|
2996
|
+
return mutationObserverId == other.mutationObserverId && targetShadowNode == other.targetShadowNode && subtree == other.subtree;
|
|
2997
|
+
}
|
|
2998
|
+
};
|
|
2999
|
+
|
|
3000
|
+
template <typename P0, typename P1, typename P2>
|
|
3001
|
+
struct NativeMutationObserverCxxBaseNativeMutationObserverObserveOptionsBridging {
|
|
3002
|
+
static NativeMutationObserverCxxBaseNativeMutationObserverObserveOptions<P0, P1, P2> fromJs(
|
|
3003
|
+
jsi::Runtime &rt,
|
|
3004
|
+
const jsi::Object &value,
|
|
3005
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
3006
|
+
NativeMutationObserverCxxBaseNativeMutationObserverObserveOptions<P0, P1, P2> result{
|
|
3007
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "mutationObserverId"), jsInvoker),
|
|
3008
|
+
bridging::fromJs<P1>(rt, value.getProperty(rt, "targetShadowNode"), jsInvoker),
|
|
3009
|
+
bridging::fromJs<P2>(rt, value.getProperty(rt, "subtree"), jsInvoker)};
|
|
3010
|
+
return result;
|
|
3011
|
+
}
|
|
3012
|
+
|
|
3013
|
+
#ifdef DEBUG
|
|
3014
|
+
static double mutationObserverIdToJs(jsi::Runtime &rt, P0 value) {
|
|
3015
|
+
return bridging::toJs(rt, value);
|
|
3016
|
+
}
|
|
3017
|
+
|
|
3018
|
+
static jsi::Value targetShadowNodeToJs(jsi::Runtime &rt, P1 value) {
|
|
3019
|
+
return bridging::toJs(rt, value);
|
|
3020
|
+
}
|
|
3021
|
+
|
|
3022
|
+
static bool subtreeToJs(jsi::Runtime &rt, P2 value) {
|
|
3023
|
+
return bridging::toJs(rt, value);
|
|
3024
|
+
}
|
|
3025
|
+
#endif
|
|
3026
|
+
|
|
3027
|
+
static jsi::Object toJs(
|
|
3028
|
+
jsi::Runtime &rt,
|
|
3029
|
+
const NativeMutationObserverCxxBaseNativeMutationObserverObserveOptions<P0, P1, P2> &value,
|
|
3030
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
3031
|
+
auto result = facebook::jsi::Object(rt);
|
|
3032
|
+
result.setProperty(rt, "mutationObserverId", bridging::toJs(rt, value.mutationObserverId, jsInvoker));
|
|
3033
|
+
result.setProperty(rt, "targetShadowNode", bridging::toJs(rt, value.targetShadowNode, jsInvoker));
|
|
3034
|
+
result.setProperty(rt, "subtree", bridging::toJs(rt, value.subtree, jsInvoker));
|
|
3035
|
+
return result;
|
|
3036
|
+
}
|
|
3037
|
+
};
|
|
3038
|
+
|
|
3039
|
+
|
|
3040
|
+
|
|
3041
|
+
#pragma mark - NativeMutationObserverCxxBaseNativeMutationRecord
|
|
3042
|
+
|
|
3043
|
+
template <typename P0, typename P1, typename P2, typename P3>
|
|
3044
|
+
struct NativeMutationObserverCxxBaseNativeMutationRecord {
|
|
3045
|
+
P0 mutationObserverId;
|
|
3046
|
+
P1 target;
|
|
3047
|
+
P2 addedNodes;
|
|
3048
|
+
P3 removedNodes;
|
|
3049
|
+
bool operator==(const NativeMutationObserverCxxBaseNativeMutationRecord &other) const {
|
|
3050
|
+
return mutationObserverId == other.mutationObserverId && target == other.target && addedNodes == other.addedNodes && removedNodes == other.removedNodes;
|
|
3051
|
+
}
|
|
3052
|
+
};
|
|
3053
|
+
|
|
3054
|
+
template <typename P0, typename P1, typename P2, typename P3>
|
|
3055
|
+
struct NativeMutationObserverCxxBaseNativeMutationRecordBridging {
|
|
3056
|
+
static NativeMutationObserverCxxBaseNativeMutationRecord<P0, P1, P2, P3> fromJs(
|
|
3057
|
+
jsi::Runtime &rt,
|
|
3058
|
+
const jsi::Object &value,
|
|
3059
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
3060
|
+
NativeMutationObserverCxxBaseNativeMutationRecord<P0, P1, P2, P3> result{
|
|
3061
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "mutationObserverId"), jsInvoker),
|
|
3062
|
+
bridging::fromJs<P1>(rt, value.getProperty(rt, "target"), jsInvoker),
|
|
3063
|
+
bridging::fromJs<P2>(rt, value.getProperty(rt, "addedNodes"), jsInvoker),
|
|
3064
|
+
bridging::fromJs<P3>(rt, value.getProperty(rt, "removedNodes"), jsInvoker)};
|
|
3065
|
+
return result;
|
|
3066
|
+
}
|
|
3067
|
+
|
|
3068
|
+
#ifdef DEBUG
|
|
3069
|
+
static double mutationObserverIdToJs(jsi::Runtime &rt, P0 value) {
|
|
3070
|
+
return bridging::toJs(rt, value);
|
|
3071
|
+
}
|
|
3072
|
+
|
|
3073
|
+
static jsi::Value targetToJs(jsi::Runtime &rt, P1 value) {
|
|
3074
|
+
return bridging::toJs(rt, value);
|
|
3075
|
+
}
|
|
3076
|
+
|
|
3077
|
+
static jsi::Array addedNodesToJs(jsi::Runtime &rt, P2 value) {
|
|
3078
|
+
return bridging::toJs(rt, value);
|
|
3079
|
+
}
|
|
3080
|
+
|
|
3081
|
+
static jsi::Array removedNodesToJs(jsi::Runtime &rt, P3 value) {
|
|
3082
|
+
return bridging::toJs(rt, value);
|
|
3083
|
+
}
|
|
3084
|
+
#endif
|
|
3085
|
+
|
|
3086
|
+
static jsi::Object toJs(
|
|
3087
|
+
jsi::Runtime &rt,
|
|
3088
|
+
const NativeMutationObserverCxxBaseNativeMutationRecord<P0, P1, P2, P3> &value,
|
|
3089
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
3090
|
+
auto result = facebook::jsi::Object(rt);
|
|
3091
|
+
result.setProperty(rt, "mutationObserverId", bridging::toJs(rt, value.mutationObserverId, jsInvoker));
|
|
3092
|
+
result.setProperty(rt, "target", bridging::toJs(rt, value.target, jsInvoker));
|
|
3093
|
+
result.setProperty(rt, "addedNodes", bridging::toJs(rt, value.addedNodes, jsInvoker));
|
|
3094
|
+
result.setProperty(rt, "removedNodes", bridging::toJs(rt, value.removedNodes, jsInvoker));
|
|
3095
|
+
return result;
|
|
3096
|
+
}
|
|
3097
|
+
};
|
|
3098
|
+
|
|
3099
|
+
class JSI_EXPORT NativeMutationObserverCxxSpecJSI : public TurboModule {
|
|
3100
|
+
protected:
|
|
3101
|
+
NativeMutationObserverCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
3102
|
+
|
|
3103
|
+
public:
|
|
3104
|
+
virtual void observe(jsi::Runtime &rt, jsi::Object options) = 0;
|
|
3105
|
+
virtual void unobserve(jsi::Runtime &rt, double mutationObserverId, jsi::Value targetShadowNode) = 0;
|
|
3106
|
+
virtual void connect(jsi::Runtime &rt, jsi::Function notifyMutationObservers, jsi::Function getPublicInstanceFromInstanceHandle) = 0;
|
|
3107
|
+
virtual void disconnect(jsi::Runtime &rt) = 0;
|
|
3108
|
+
virtual jsi::Array takeRecords(jsi::Runtime &rt) = 0;
|
|
3109
|
+
|
|
3110
|
+
};
|
|
3111
|
+
|
|
3112
|
+
template <typename T>
|
|
3113
|
+
class JSI_EXPORT NativeMutationObserverCxxSpec : public TurboModule {
|
|
3114
|
+
public:
|
|
3115
|
+
jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
3116
|
+
return delegate_.get(rt, propName);
|
|
3117
|
+
}
|
|
3118
|
+
|
|
3119
|
+
static constexpr std::string_view kModuleName = "NativeMutationObserverCxx";
|
|
3120
|
+
|
|
3121
|
+
protected:
|
|
3122
|
+
NativeMutationObserverCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
3123
|
+
: TurboModule(std::string{NativeMutationObserverCxxSpec::kModuleName}, jsInvoker),
|
|
3124
|
+
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
3125
|
+
|
|
3126
|
+
private:
|
|
3127
|
+
class Delegate : public NativeMutationObserverCxxSpecJSI {
|
|
3128
|
+
public:
|
|
3129
|
+
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
3130
|
+
NativeMutationObserverCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {}
|
|
3131
|
+
|
|
3132
|
+
void observe(jsi::Runtime &rt, jsi::Object options) override {
|
|
3133
|
+
static_assert(
|
|
3134
|
+
bridging::getParameterCount(&T::observe) == 2,
|
|
3135
|
+
"Expected observe(...) to have 2 parameters");
|
|
3136
|
+
|
|
3137
|
+
return bridging::callFromJs<void>(
|
|
3138
|
+
rt, &T::observe, jsInvoker_, instance_, std::move(options));
|
|
3139
|
+
}
|
|
3140
|
+
void unobserve(jsi::Runtime &rt, double mutationObserverId, jsi::Value targetShadowNode) override {
|
|
3141
|
+
static_assert(
|
|
3142
|
+
bridging::getParameterCount(&T::unobserve) == 3,
|
|
3143
|
+
"Expected unobserve(...) to have 3 parameters");
|
|
3144
|
+
|
|
3145
|
+
return bridging::callFromJs<void>(
|
|
3146
|
+
rt, &T::unobserve, jsInvoker_, instance_, std::move(mutationObserverId), std::move(targetShadowNode));
|
|
3147
|
+
}
|
|
3148
|
+
void connect(jsi::Runtime &rt, jsi::Function notifyMutationObservers, jsi::Function getPublicInstanceFromInstanceHandle) override {
|
|
3149
|
+
static_assert(
|
|
3150
|
+
bridging::getParameterCount(&T::connect) == 3,
|
|
3151
|
+
"Expected connect(...) to have 3 parameters");
|
|
3152
|
+
|
|
3153
|
+
return bridging::callFromJs<void>(
|
|
3154
|
+
rt, &T::connect, jsInvoker_, instance_, std::move(notifyMutationObservers), std::move(getPublicInstanceFromInstanceHandle));
|
|
3155
|
+
}
|
|
3156
|
+
void disconnect(jsi::Runtime &rt) override {
|
|
3157
|
+
static_assert(
|
|
3158
|
+
bridging::getParameterCount(&T::disconnect) == 1,
|
|
3159
|
+
"Expected disconnect(...) to have 1 parameters");
|
|
3160
|
+
|
|
3161
|
+
return bridging::callFromJs<void>(
|
|
3162
|
+
rt, &T::disconnect, jsInvoker_, instance_);
|
|
3163
|
+
}
|
|
3164
|
+
jsi::Array takeRecords(jsi::Runtime &rt) override {
|
|
3165
|
+
static_assert(
|
|
3166
|
+
bridging::getParameterCount(&T::takeRecords) == 1,
|
|
3167
|
+
"Expected takeRecords(...) to have 1 parameters");
|
|
3168
|
+
|
|
3169
|
+
return bridging::callFromJs<jsi::Array>(
|
|
3170
|
+
rt, &T::takeRecords, jsInvoker_, instance_);
|
|
3171
|
+
}
|
|
3172
|
+
|
|
3173
|
+
private:
|
|
3174
|
+
T *instance_;
|
|
3175
|
+
};
|
|
3176
|
+
|
|
3177
|
+
Delegate delegate_;
|
|
3178
|
+
};
|
|
3179
|
+
|
|
3180
|
+
|
|
2580
3181
|
class JSI_EXPORT NativeNetworkingAndroidCxxSpecJSI : public TurboModule {
|
|
2581
3182
|
protected:
|
|
2582
3183
|
NativeNetworkingAndroidCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
@@ -2597,9 +3198,11 @@ public:
|
|
|
2597
3198
|
return delegate_.get(rt, propName);
|
|
2598
3199
|
}
|
|
2599
3200
|
|
|
3201
|
+
static constexpr std::string_view kModuleName = "Networking";
|
|
3202
|
+
|
|
2600
3203
|
protected:
|
|
2601
3204
|
NativeNetworkingAndroidCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
2602
|
-
: TurboModule(
|
|
3205
|
+
: TurboModule(std::string{NativeNetworkingAndroidCxxSpec::kModuleName}, jsInvoker),
|
|
2603
3206
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
2604
3207
|
|
|
2605
3208
|
private:
|
|
@@ -2677,9 +3280,11 @@ public:
|
|
|
2677
3280
|
return delegate_.get(rt, propName);
|
|
2678
3281
|
}
|
|
2679
3282
|
|
|
3283
|
+
static constexpr std::string_view kModuleName = "Networking";
|
|
3284
|
+
|
|
2680
3285
|
protected:
|
|
2681
3286
|
NativeNetworkingIOSCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
2682
|
-
: TurboModule(
|
|
3287
|
+
: TurboModule(std::string{NativeNetworkingIOSCxxSpec::kModuleName}, jsInvoker),
|
|
2683
3288
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
2684
3289
|
|
|
2685
3290
|
private:
|
|
@@ -2753,9 +3358,11 @@ public:
|
|
|
2753
3358
|
return delegate_.get(rt, propName);
|
|
2754
3359
|
}
|
|
2755
3360
|
|
|
3361
|
+
static constexpr std::string_view kModuleName = "JSCSamplingProfiler";
|
|
3362
|
+
|
|
2756
3363
|
protected:
|
|
2757
3364
|
NativeJSCSamplingProfilerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
2758
|
-
: TurboModule(
|
|
3365
|
+
: TurboModule(std::string{NativeJSCSamplingProfilerCxxSpec::kModuleName}, jsInvoker),
|
|
2759
3366
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
2760
3367
|
|
|
2761
3368
|
private:
|
|
@@ -2800,9 +3407,11 @@ public:
|
|
|
2800
3407
|
return delegate_.get(rt, propName);
|
|
2801
3408
|
}
|
|
2802
3409
|
|
|
3410
|
+
static constexpr std::string_view kModuleName = "PermissionsAndroid";
|
|
3411
|
+
|
|
2803
3412
|
protected:
|
|
2804
3413
|
NativePermissionsAndroidCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
2805
|
-
: TurboModule(
|
|
3414
|
+
: TurboModule(std::string{NativePermissionsAndroidCxxSpec::kModuleName}, jsInvoker),
|
|
2806
3415
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
2807
3416
|
|
|
2808
3417
|
private:
|
|
@@ -2852,7 +3461,8 @@ private:
|
|
|
2852
3461
|
};
|
|
2853
3462
|
|
|
2854
3463
|
|
|
2855
|
-
|
|
3464
|
+
|
|
3465
|
+
#pragma mark - PushNotificationManagerBasePermissions
|
|
2856
3466
|
|
|
2857
3467
|
template <typename P0, typename P1, typename P2>
|
|
2858
3468
|
struct PushNotificationManagerBasePermissions {
|
|
@@ -2881,25 +3491,28 @@ struct PushNotificationManagerBasePermissionsBridging {
|
|
|
2881
3491
|
static bool alertToJs(jsi::Runtime &rt, P0 value) {
|
|
2882
3492
|
return bridging::toJs(rt, value);
|
|
2883
3493
|
}
|
|
3494
|
+
|
|
2884
3495
|
static bool badgeToJs(jsi::Runtime &rt, P1 value) {
|
|
2885
3496
|
return bridging::toJs(rt, value);
|
|
2886
3497
|
}
|
|
3498
|
+
|
|
2887
3499
|
static bool soundToJs(jsi::Runtime &rt, P2 value) {
|
|
2888
3500
|
return bridging::toJs(rt, value);
|
|
2889
3501
|
}
|
|
2890
3502
|
#endif
|
|
2891
3503
|
|
|
2892
3504
|
static jsi::Object toJs(
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
3505
|
+
jsi::Runtime &rt,
|
|
3506
|
+
const PushNotificationManagerBasePermissions<P0, P1, P2> &value,
|
|
3507
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
3508
|
+
auto result = facebook::jsi::Object(rt);
|
|
3509
|
+
result.setProperty(rt, "alert", bridging::toJs(rt, value.alert, jsInvoker));
|
|
2898
3510
|
result.setProperty(rt, "badge", bridging::toJs(rt, value.badge, jsInvoker));
|
|
2899
3511
|
result.setProperty(rt, "sound", bridging::toJs(rt, value.sound, jsInvoker));
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
3512
|
+
return result;
|
|
3513
|
+
}
|
|
3514
|
+
};
|
|
3515
|
+
|
|
2903
3516
|
|
|
2904
3517
|
|
|
2905
3518
|
#pragma mark - PushNotificationManagerBaseNotification
|
|
@@ -2945,73 +3558,82 @@ struct PushNotificationManagerBaseNotificationBridging {
|
|
|
2945
3558
|
static std::optional<jsi::String> alertTitleToJs(jsi::Runtime &rt, P0 value) {
|
|
2946
3559
|
return bridging::toJs(rt, value);
|
|
2947
3560
|
}
|
|
3561
|
+
|
|
2948
3562
|
static std::optional<double> fireDateToJs(jsi::Runtime &rt, P1 value) {
|
|
2949
3563
|
return bridging::toJs(rt, value);
|
|
2950
3564
|
}
|
|
3565
|
+
|
|
2951
3566
|
static std::optional<jsi::String> alertBodyToJs(jsi::Runtime &rt, P2 value) {
|
|
2952
3567
|
return bridging::toJs(rt, value);
|
|
2953
3568
|
}
|
|
3569
|
+
|
|
2954
3570
|
static std::optional<jsi::String> alertActionToJs(jsi::Runtime &rt, P3 value) {
|
|
2955
3571
|
return bridging::toJs(rt, value);
|
|
2956
3572
|
}
|
|
3573
|
+
|
|
2957
3574
|
static std::optional<jsi::Object> userInfoToJs(jsi::Runtime &rt, P4 value) {
|
|
2958
3575
|
return bridging::toJs(rt, value);
|
|
2959
3576
|
}
|
|
3577
|
+
|
|
2960
3578
|
static std::optional<jsi::String> categoryToJs(jsi::Runtime &rt, P5 value) {
|
|
2961
3579
|
return bridging::toJs(rt, value);
|
|
2962
3580
|
}
|
|
3581
|
+
|
|
2963
3582
|
static std::optional<jsi::String> repeatIntervalToJs(jsi::Runtime &rt, P6 value) {
|
|
2964
3583
|
return bridging::toJs(rt, value);
|
|
2965
3584
|
}
|
|
3585
|
+
|
|
2966
3586
|
static std::optional<double> applicationIconBadgeNumberToJs(jsi::Runtime &rt, P7 value) {
|
|
2967
3587
|
return bridging::toJs(rt, value);
|
|
2968
3588
|
}
|
|
3589
|
+
|
|
2969
3590
|
static std::optional<bool> isSilentToJs(jsi::Runtime &rt, P8 value) {
|
|
2970
3591
|
return bridging::toJs(rt, value);
|
|
2971
3592
|
}
|
|
3593
|
+
|
|
2972
3594
|
static std::optional<jsi::String> soundNameToJs(jsi::Runtime &rt, P9 value) {
|
|
2973
3595
|
return bridging::toJs(rt, value);
|
|
2974
3596
|
}
|
|
2975
3597
|
#endif
|
|
2976
3598
|
|
|
2977
3599
|
static jsi::Object toJs(
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
3600
|
+
jsi::Runtime &rt,
|
|
3601
|
+
const PushNotificationManagerBaseNotification<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> &value,
|
|
3602
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
3603
|
+
auto result = facebook::jsi::Object(rt);
|
|
3604
|
+
if (value.alertTitle) {
|
|
3605
|
+
result.setProperty(rt, "alertTitle", bridging::toJs(rt, value.alertTitle.value(), jsInvoker));
|
|
3606
|
+
}
|
|
2985
3607
|
if (value.fireDate) {
|
|
2986
|
-
|
|
2987
|
-
|
|
3608
|
+
result.setProperty(rt, "fireDate", bridging::toJs(rt, value.fireDate.value(), jsInvoker));
|
|
3609
|
+
}
|
|
2988
3610
|
if (value.alertBody) {
|
|
2989
|
-
|
|
2990
|
-
|
|
3611
|
+
result.setProperty(rt, "alertBody", bridging::toJs(rt, value.alertBody.value(), jsInvoker));
|
|
3612
|
+
}
|
|
2991
3613
|
if (value.alertAction) {
|
|
2992
|
-
|
|
2993
|
-
|
|
3614
|
+
result.setProperty(rt, "alertAction", bridging::toJs(rt, value.alertAction.value(), jsInvoker));
|
|
3615
|
+
}
|
|
2994
3616
|
if (value.userInfo) {
|
|
2995
|
-
|
|
2996
|
-
|
|
3617
|
+
result.setProperty(rt, "userInfo", bridging::toJs(rt, value.userInfo.value(), jsInvoker));
|
|
3618
|
+
}
|
|
2997
3619
|
if (value.category) {
|
|
2998
|
-
|
|
2999
|
-
|
|
3620
|
+
result.setProperty(rt, "category", bridging::toJs(rt, value.category.value(), jsInvoker));
|
|
3621
|
+
}
|
|
3000
3622
|
if (value.repeatInterval) {
|
|
3001
|
-
|
|
3002
|
-
|
|
3623
|
+
result.setProperty(rt, "repeatInterval", bridging::toJs(rt, value.repeatInterval.value(), jsInvoker));
|
|
3624
|
+
}
|
|
3003
3625
|
if (value.applicationIconBadgeNumber) {
|
|
3004
|
-
|
|
3005
|
-
|
|
3626
|
+
result.setProperty(rt, "applicationIconBadgeNumber", bridging::toJs(rt, value.applicationIconBadgeNumber.value(), jsInvoker));
|
|
3627
|
+
}
|
|
3006
3628
|
if (value.isSilent) {
|
|
3007
|
-
|
|
3008
|
-
|
|
3629
|
+
result.setProperty(rt, "isSilent", bridging::toJs(rt, value.isSilent.value(), jsInvoker));
|
|
3630
|
+
}
|
|
3009
3631
|
if (value.soundName) {
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3632
|
+
result.setProperty(rt, "soundName", bridging::toJs(rt, value.soundName.value(), jsInvoker));
|
|
3633
|
+
}
|
|
3634
|
+
return result;
|
|
3635
|
+
}
|
|
3636
|
+
};
|
|
3015
3637
|
|
|
3016
3638
|
class JSI_EXPORT NativePushNotificationManagerIOSCxxSpecJSI : public TurboModule {
|
|
3017
3639
|
protected:
|
|
@@ -3047,9 +3669,11 @@ public:
|
|
|
3047
3669
|
return delegate_.get(rt, propName);
|
|
3048
3670
|
}
|
|
3049
3671
|
|
|
3672
|
+
static constexpr std::string_view kModuleName = "PushNotificationManager";
|
|
3673
|
+
|
|
3050
3674
|
protected:
|
|
3051
3675
|
NativePushNotificationManagerIOSCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
3052
|
-
: TurboModule(
|
|
3676
|
+
: TurboModule(std::string{NativePushNotificationManagerIOSCxxSpec::kModuleName}, jsInvoker),
|
|
3053
3677
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
3054
3678
|
|
|
3055
3679
|
private:
|
|
@@ -3236,9 +3860,11 @@ public:
|
|
|
3236
3860
|
return delegate_.get(rt, propName);
|
|
3237
3861
|
}
|
|
3238
3862
|
|
|
3863
|
+
static constexpr std::string_view kModuleName = "HeadlessJsTaskSupport";
|
|
3864
|
+
|
|
3239
3865
|
protected:
|
|
3240
3866
|
NativeHeadlessJsTaskSupportCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
3241
|
-
: TurboModule(
|
|
3867
|
+
: TurboModule(std::string{NativeHeadlessJsTaskSupportCxxSpec::kModuleName}, jsInvoker),
|
|
3242
3868
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
3243
3869
|
|
|
3244
3870
|
private:
|
|
@@ -3272,7 +3898,61 @@ private:
|
|
|
3272
3898
|
};
|
|
3273
3899
|
|
|
3274
3900
|
|
|
3275
|
-
|
|
3901
|
+
|
|
3902
|
+
#pragma mark - I18nManagerBaseI18nManagerConstants
|
|
3903
|
+
|
|
3904
|
+
template <typename P0, typename P1, typename P2>
|
|
3905
|
+
struct I18nManagerBaseI18nManagerConstants {
|
|
3906
|
+
P0 doLeftAndRightSwapInRTL;
|
|
3907
|
+
P1 isRTL;
|
|
3908
|
+
P2 localeIdentifier;
|
|
3909
|
+
bool operator==(const I18nManagerBaseI18nManagerConstants &other) const {
|
|
3910
|
+
return doLeftAndRightSwapInRTL == other.doLeftAndRightSwapInRTL && isRTL == other.isRTL && localeIdentifier == other.localeIdentifier;
|
|
3911
|
+
}
|
|
3912
|
+
};
|
|
3913
|
+
|
|
3914
|
+
template <typename P0, typename P1, typename P2>
|
|
3915
|
+
struct I18nManagerBaseI18nManagerConstantsBridging {
|
|
3916
|
+
static I18nManagerBaseI18nManagerConstants<P0, P1, P2> fromJs(
|
|
3917
|
+
jsi::Runtime &rt,
|
|
3918
|
+
const jsi::Object &value,
|
|
3919
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
3920
|
+
I18nManagerBaseI18nManagerConstants<P0, P1, P2> result{
|
|
3921
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "doLeftAndRightSwapInRTL"), jsInvoker),
|
|
3922
|
+
bridging::fromJs<P1>(rt, value.getProperty(rt, "isRTL"), jsInvoker),
|
|
3923
|
+
bridging::fromJs<P2>(rt, value.getProperty(rt, "localeIdentifier"), jsInvoker)};
|
|
3924
|
+
return result;
|
|
3925
|
+
}
|
|
3926
|
+
|
|
3927
|
+
#ifdef DEBUG
|
|
3928
|
+
static bool doLeftAndRightSwapInRTLToJs(jsi::Runtime &rt, P0 value) {
|
|
3929
|
+
return bridging::toJs(rt, value);
|
|
3930
|
+
}
|
|
3931
|
+
|
|
3932
|
+
static bool isRTLToJs(jsi::Runtime &rt, P1 value) {
|
|
3933
|
+
return bridging::toJs(rt, value);
|
|
3934
|
+
}
|
|
3935
|
+
|
|
3936
|
+
static std::optional<jsi::String> localeIdentifierToJs(jsi::Runtime &rt, P2 value) {
|
|
3937
|
+
return bridging::toJs(rt, value);
|
|
3938
|
+
}
|
|
3939
|
+
#endif
|
|
3940
|
+
|
|
3941
|
+
static jsi::Object toJs(
|
|
3942
|
+
jsi::Runtime &rt,
|
|
3943
|
+
const I18nManagerBaseI18nManagerConstants<P0, P1, P2> &value,
|
|
3944
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
3945
|
+
auto result = facebook::jsi::Object(rt);
|
|
3946
|
+
result.setProperty(rt, "doLeftAndRightSwapInRTL", bridging::toJs(rt, value.doLeftAndRightSwapInRTL, jsInvoker));
|
|
3947
|
+
result.setProperty(rt, "isRTL", bridging::toJs(rt, value.isRTL, jsInvoker));
|
|
3948
|
+
if (value.localeIdentifier) {
|
|
3949
|
+
result.setProperty(rt, "localeIdentifier", bridging::toJs(rt, value.localeIdentifier.value(), jsInvoker));
|
|
3950
|
+
}
|
|
3951
|
+
return result;
|
|
3952
|
+
}
|
|
3953
|
+
};
|
|
3954
|
+
|
|
3955
|
+
class JSI_EXPORT NativeI18nManagerCxxSpecJSI : public TurboModule {
|
|
3276
3956
|
protected:
|
|
3277
3957
|
NativeI18nManagerCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
3278
3958
|
|
|
@@ -3291,9 +3971,11 @@ public:
|
|
|
3291
3971
|
return delegate_.get(rt, propName);
|
|
3292
3972
|
}
|
|
3293
3973
|
|
|
3974
|
+
static constexpr std::string_view kModuleName = "I18nManager";
|
|
3975
|
+
|
|
3294
3976
|
protected:
|
|
3295
3977
|
NativeI18nManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
3296
|
-
: TurboModule(
|
|
3978
|
+
: TurboModule(std::string{NativeI18nManagerCxxSpec::kModuleName}, jsInvoker),
|
|
3297
3979
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
3298
3980
|
|
|
3299
3981
|
private:
|
|
@@ -3384,9 +4066,11 @@ public:
|
|
|
3384
4066
|
return delegate_.get(rt, propName);
|
|
3385
4067
|
}
|
|
3386
4068
|
|
|
4069
|
+
static constexpr std::string_view kModuleName = "UIManager";
|
|
4070
|
+
|
|
3387
4071
|
protected:
|
|
3388
4072
|
NativeUIManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
3389
|
-
: TurboModule(
|
|
4073
|
+
: TurboModule(std::string{NativeUIManagerCxxSpec::kModuleName}, jsInvoker),
|
|
3390
4074
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
3391
4075
|
|
|
3392
4076
|
private:
|
|
@@ -3630,9 +4314,11 @@ public:
|
|
|
3630
4314
|
return delegate_.get(rt, propName);
|
|
3631
4315
|
}
|
|
3632
4316
|
|
|
4317
|
+
static constexpr std::string_view kModuleName = "SettingsManager";
|
|
4318
|
+
|
|
3633
4319
|
protected:
|
|
3634
4320
|
NativeSettingsManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
3635
|
-
: TurboModule(
|
|
4321
|
+
: TurboModule(std::string{NativeSettingsManagerCxxSpec::kModuleName}, jsInvoker),
|
|
3636
4322
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
3637
4323
|
|
|
3638
4324
|
private:
|
|
@@ -3691,9 +4377,11 @@ public:
|
|
|
3691
4377
|
return delegate_.get(rt, propName);
|
|
3692
4378
|
}
|
|
3693
4379
|
|
|
4380
|
+
static constexpr std::string_view kModuleName = "ShareModule";
|
|
4381
|
+
|
|
3694
4382
|
protected:
|
|
3695
4383
|
NativeShareModuleCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
3696
|
-
: TurboModule(
|
|
4384
|
+
: TurboModule(std::string{NativeShareModuleCxxSpec::kModuleName}, jsInvoker),
|
|
3697
4385
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
3698
4386
|
|
|
3699
4387
|
private:
|
|
@@ -3746,9 +4434,11 @@ public:
|
|
|
3746
4434
|
return delegate_.get(rt, propName);
|
|
3747
4435
|
}
|
|
3748
4436
|
|
|
4437
|
+
static constexpr std::string_view kModuleName = "Appearance";
|
|
4438
|
+
|
|
3749
4439
|
protected:
|
|
3750
4440
|
NativeAppearanceCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
3751
|
-
: TurboModule(
|
|
4441
|
+
: TurboModule(std::string{NativeAppearanceCxxSpec::kModuleName}, jsInvoker),
|
|
3752
4442
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
3753
4443
|
|
|
3754
4444
|
private:
|
|
@@ -3798,7 +4488,8 @@ private:
|
|
|
3798
4488
|
};
|
|
3799
4489
|
|
|
3800
4490
|
|
|
3801
|
-
|
|
4491
|
+
|
|
4492
|
+
#pragma mark - DeviceInfoBaseDisplayMetrics
|
|
3802
4493
|
|
|
3803
4494
|
template <typename P0, typename P1, typename P2, typename P3>
|
|
3804
4495
|
struct DeviceInfoBaseDisplayMetrics {
|
|
@@ -3829,29 +4520,33 @@ struct DeviceInfoBaseDisplayMetricsBridging {
|
|
|
3829
4520
|
static double widthToJs(jsi::Runtime &rt, P0 value) {
|
|
3830
4521
|
return bridging::toJs(rt, value);
|
|
3831
4522
|
}
|
|
4523
|
+
|
|
3832
4524
|
static double heightToJs(jsi::Runtime &rt, P1 value) {
|
|
3833
4525
|
return bridging::toJs(rt, value);
|
|
3834
4526
|
}
|
|
4527
|
+
|
|
3835
4528
|
static double scaleToJs(jsi::Runtime &rt, P2 value) {
|
|
3836
4529
|
return bridging::toJs(rt, value);
|
|
3837
4530
|
}
|
|
4531
|
+
|
|
3838
4532
|
static double fontScaleToJs(jsi::Runtime &rt, P3 value) {
|
|
3839
4533
|
return bridging::toJs(rt, value);
|
|
3840
4534
|
}
|
|
3841
4535
|
#endif
|
|
3842
4536
|
|
|
3843
4537
|
static jsi::Object toJs(
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
4538
|
+
jsi::Runtime &rt,
|
|
4539
|
+
const DeviceInfoBaseDisplayMetrics<P0, P1, P2, P3> &value,
|
|
4540
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
4541
|
+
auto result = facebook::jsi::Object(rt);
|
|
4542
|
+
result.setProperty(rt, "width", bridging::toJs(rt, value.width, jsInvoker));
|
|
3849
4543
|
result.setProperty(rt, "height", bridging::toJs(rt, value.height, jsInvoker));
|
|
3850
4544
|
result.setProperty(rt, "scale", bridging::toJs(rt, value.scale, jsInvoker));
|
|
3851
4545
|
result.setProperty(rt, "fontScale", bridging::toJs(rt, value.fontScale, jsInvoker));
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
4546
|
+
return result;
|
|
4547
|
+
}
|
|
4548
|
+
};
|
|
4549
|
+
|
|
3855
4550
|
|
|
3856
4551
|
|
|
3857
4552
|
#pragma mark - DeviceInfoBaseDisplayMetricsAndroid
|
|
@@ -3887,33 +4582,38 @@ struct DeviceInfoBaseDisplayMetricsAndroidBridging {
|
|
|
3887
4582
|
static double widthToJs(jsi::Runtime &rt, P0 value) {
|
|
3888
4583
|
return bridging::toJs(rt, value);
|
|
3889
4584
|
}
|
|
4585
|
+
|
|
3890
4586
|
static double heightToJs(jsi::Runtime &rt, P1 value) {
|
|
3891
4587
|
return bridging::toJs(rt, value);
|
|
3892
4588
|
}
|
|
4589
|
+
|
|
3893
4590
|
static double scaleToJs(jsi::Runtime &rt, P2 value) {
|
|
3894
4591
|
return bridging::toJs(rt, value);
|
|
3895
4592
|
}
|
|
4593
|
+
|
|
3896
4594
|
static double fontScaleToJs(jsi::Runtime &rt, P3 value) {
|
|
3897
4595
|
return bridging::toJs(rt, value);
|
|
3898
4596
|
}
|
|
4597
|
+
|
|
3899
4598
|
static double densityDpiToJs(jsi::Runtime &rt, P4 value) {
|
|
3900
4599
|
return bridging::toJs(rt, value);
|
|
3901
4600
|
}
|
|
3902
4601
|
#endif
|
|
3903
4602
|
|
|
3904
4603
|
static jsi::Object toJs(
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
4604
|
+
jsi::Runtime &rt,
|
|
4605
|
+
const DeviceInfoBaseDisplayMetricsAndroid<P0, P1, P2, P3, P4> &value,
|
|
4606
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
4607
|
+
auto result = facebook::jsi::Object(rt);
|
|
4608
|
+
result.setProperty(rt, "width", bridging::toJs(rt, value.width, jsInvoker));
|
|
3910
4609
|
result.setProperty(rt, "height", bridging::toJs(rt, value.height, jsInvoker));
|
|
3911
4610
|
result.setProperty(rt, "scale", bridging::toJs(rt, value.scale, jsInvoker));
|
|
3912
4611
|
result.setProperty(rt, "fontScale", bridging::toJs(rt, value.fontScale, jsInvoker));
|
|
3913
4612
|
result.setProperty(rt, "densityDpi", bridging::toJs(rt, value.densityDpi, jsInvoker));
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
4613
|
+
return result;
|
|
4614
|
+
}
|
|
4615
|
+
};
|
|
4616
|
+
|
|
3917
4617
|
|
|
3918
4618
|
|
|
3919
4619
|
#pragma mark - DeviceInfoBaseDimensionsPayload
|
|
@@ -3947,37 +4647,88 @@ struct DeviceInfoBaseDimensionsPayloadBridging {
|
|
|
3947
4647
|
static jsi::Object windowToJs(jsi::Runtime &rt, P0 value) {
|
|
3948
4648
|
return bridging::toJs(rt, value);
|
|
3949
4649
|
}
|
|
4650
|
+
|
|
3950
4651
|
static jsi::Object screenToJs(jsi::Runtime &rt, P1 value) {
|
|
3951
4652
|
return bridging::toJs(rt, value);
|
|
3952
4653
|
}
|
|
4654
|
+
|
|
3953
4655
|
static jsi::Object windowPhysicalPixelsToJs(jsi::Runtime &rt, P2 value) {
|
|
3954
4656
|
return bridging::toJs(rt, value);
|
|
3955
4657
|
}
|
|
4658
|
+
|
|
3956
4659
|
static jsi::Object screenPhysicalPixelsToJs(jsi::Runtime &rt, P3 value) {
|
|
3957
4660
|
return bridging::toJs(rt, value);
|
|
3958
4661
|
}
|
|
3959
4662
|
#endif
|
|
3960
4663
|
|
|
3961
4664
|
static jsi::Object toJs(
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
4665
|
+
jsi::Runtime &rt,
|
|
4666
|
+
const DeviceInfoBaseDimensionsPayload<P0, P1, P2, P3> &value,
|
|
4667
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
4668
|
+
auto result = facebook::jsi::Object(rt);
|
|
4669
|
+
if (value.window) {
|
|
4670
|
+
result.setProperty(rt, "window", bridging::toJs(rt, value.window.value(), jsInvoker));
|
|
4671
|
+
}
|
|
3969
4672
|
if (value.screen) {
|
|
3970
|
-
|
|
3971
|
-
|
|
4673
|
+
result.setProperty(rt, "screen", bridging::toJs(rt, value.screen.value(), jsInvoker));
|
|
4674
|
+
}
|
|
3972
4675
|
if (value.windowPhysicalPixels) {
|
|
3973
|
-
|
|
3974
|
-
|
|
4676
|
+
result.setProperty(rt, "windowPhysicalPixels", bridging::toJs(rt, value.windowPhysicalPixels.value(), jsInvoker));
|
|
4677
|
+
}
|
|
3975
4678
|
if (value.screenPhysicalPixels) {
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
4679
|
+
result.setProperty(rt, "screenPhysicalPixels", bridging::toJs(rt, value.screenPhysicalPixels.value(), jsInvoker));
|
|
4680
|
+
}
|
|
4681
|
+
return result;
|
|
4682
|
+
}
|
|
4683
|
+
};
|
|
4684
|
+
|
|
4685
|
+
|
|
4686
|
+
|
|
4687
|
+
#pragma mark - DeviceInfoBaseDeviceInfoConstants
|
|
4688
|
+
|
|
4689
|
+
template <typename P0, typename P1>
|
|
4690
|
+
struct DeviceInfoBaseDeviceInfoConstants {
|
|
4691
|
+
P0 Dimensions;
|
|
4692
|
+
P1 isIPhoneX_deprecated;
|
|
4693
|
+
bool operator==(const DeviceInfoBaseDeviceInfoConstants &other) const {
|
|
4694
|
+
return Dimensions == other.Dimensions && isIPhoneX_deprecated == other.isIPhoneX_deprecated;
|
|
4695
|
+
}
|
|
4696
|
+
};
|
|
4697
|
+
|
|
4698
|
+
template <typename P0, typename P1>
|
|
4699
|
+
struct DeviceInfoBaseDeviceInfoConstantsBridging {
|
|
4700
|
+
static DeviceInfoBaseDeviceInfoConstants<P0, P1> fromJs(
|
|
4701
|
+
jsi::Runtime &rt,
|
|
4702
|
+
const jsi::Object &value,
|
|
4703
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
4704
|
+
DeviceInfoBaseDeviceInfoConstants<P0, P1> result{
|
|
4705
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "Dimensions"), jsInvoker),
|
|
4706
|
+
bridging::fromJs<P1>(rt, value.getProperty(rt, "isIPhoneX_deprecated"), jsInvoker)};
|
|
4707
|
+
return result;
|
|
4708
|
+
}
|
|
4709
|
+
|
|
4710
|
+
#ifdef DEBUG
|
|
4711
|
+
static jsi::Object DimensionsToJs(jsi::Runtime &rt, P0 value) {
|
|
4712
|
+
return bridging::toJs(rt, value);
|
|
4713
|
+
}
|
|
4714
|
+
|
|
4715
|
+
static bool isIPhoneX_deprecatedToJs(jsi::Runtime &rt, P1 value) {
|
|
4716
|
+
return bridging::toJs(rt, value);
|
|
4717
|
+
}
|
|
4718
|
+
#endif
|
|
4719
|
+
|
|
4720
|
+
static jsi::Object toJs(
|
|
4721
|
+
jsi::Runtime &rt,
|
|
4722
|
+
const DeviceInfoBaseDeviceInfoConstants<P0, P1> &value,
|
|
4723
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
4724
|
+
auto result = facebook::jsi::Object(rt);
|
|
4725
|
+
result.setProperty(rt, "Dimensions", bridging::toJs(rt, value.Dimensions, jsInvoker));
|
|
4726
|
+
if (value.isIPhoneX_deprecated) {
|
|
4727
|
+
result.setProperty(rt, "isIPhoneX_deprecated", bridging::toJs(rt, value.isIPhoneX_deprecated.value(), jsInvoker));
|
|
4728
|
+
}
|
|
4729
|
+
return result;
|
|
4730
|
+
}
|
|
4731
|
+
};
|
|
3981
4732
|
|
|
3982
4733
|
class JSI_EXPORT NativeDeviceInfoCxxSpecJSI : public TurboModule {
|
|
3983
4734
|
protected:
|
|
@@ -3995,9 +4746,11 @@ public:
|
|
|
3995
4746
|
return delegate_.get(rt, propName);
|
|
3996
4747
|
}
|
|
3997
4748
|
|
|
4749
|
+
static constexpr std::string_view kModuleName = "DeviceInfo";
|
|
4750
|
+
|
|
3998
4751
|
protected:
|
|
3999
4752
|
NativeDeviceInfoCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
4000
|
-
: TurboModule(
|
|
4753
|
+
: TurboModule(std::string{NativeDeviceInfoCxxSpec::kModuleName}, jsInvoker),
|
|
4001
4754
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
4002
4755
|
|
|
4003
4756
|
private:
|
|
@@ -4040,9 +4793,11 @@ public:
|
|
|
4040
4793
|
return delegate_.get(rt, propName);
|
|
4041
4794
|
}
|
|
4042
4795
|
|
|
4796
|
+
static constexpr std::string_view kModuleName = "DevLoadingView";
|
|
4797
|
+
|
|
4043
4798
|
protected:
|
|
4044
4799
|
NativeDevLoadingViewCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
4045
|
-
: TurboModule(
|
|
4800
|
+
: TurboModule(std::string{NativeDevLoadingViewCxxSpec::kModuleName}, jsInvoker),
|
|
4046
4801
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
4047
4802
|
|
|
4048
4803
|
private:
|
|
@@ -4076,51 +4831,186 @@ private:
|
|
|
4076
4831
|
};
|
|
4077
4832
|
|
|
4078
4833
|
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
NativeDevSplitBundleLoaderCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
4834
|
+
|
|
4835
|
+
#pragma mark - PlatformConstantsBaseReactNativeVersionAndroid
|
|
4082
4836
|
|
|
4083
|
-
|
|
4084
|
-
|
|
4837
|
+
template <typename P0, typename P1, typename P2, typename P3>
|
|
4838
|
+
struct PlatformConstantsBaseReactNativeVersionAndroid {
|
|
4839
|
+
P0 major;
|
|
4840
|
+
P1 minor;
|
|
4841
|
+
P2 patch;
|
|
4842
|
+
P3 prerelease;
|
|
4843
|
+
bool operator==(const PlatformConstantsBaseReactNativeVersionAndroid &other) const {
|
|
4844
|
+
return major == other.major && minor == other.minor && patch == other.patch && prerelease == other.prerelease;
|
|
4845
|
+
}
|
|
4846
|
+
};
|
|
4847
|
+
|
|
4848
|
+
template <typename P0, typename P1, typename P2, typename P3>
|
|
4849
|
+
struct PlatformConstantsBaseReactNativeVersionAndroidBridging {
|
|
4850
|
+
static PlatformConstantsBaseReactNativeVersionAndroid<P0, P1, P2, P3> fromJs(
|
|
4851
|
+
jsi::Runtime &rt,
|
|
4852
|
+
const jsi::Object &value,
|
|
4853
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
4854
|
+
PlatformConstantsBaseReactNativeVersionAndroid<P0, P1, P2, P3> result{
|
|
4855
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "major"), jsInvoker),
|
|
4856
|
+
bridging::fromJs<P1>(rt, value.getProperty(rt, "minor"), jsInvoker),
|
|
4857
|
+
bridging::fromJs<P2>(rt, value.getProperty(rt, "patch"), jsInvoker),
|
|
4858
|
+
bridging::fromJs<P3>(rt, value.getProperty(rt, "prerelease"), jsInvoker)};
|
|
4859
|
+
return result;
|
|
4860
|
+
}
|
|
4861
|
+
|
|
4862
|
+
#ifdef DEBUG
|
|
4863
|
+
static double majorToJs(jsi::Runtime &rt, P0 value) {
|
|
4864
|
+
return bridging::toJs(rt, value);
|
|
4865
|
+
}
|
|
4866
|
+
|
|
4867
|
+
static double minorToJs(jsi::Runtime &rt, P1 value) {
|
|
4868
|
+
return bridging::toJs(rt, value);
|
|
4869
|
+
}
|
|
4870
|
+
|
|
4871
|
+
static double patchToJs(jsi::Runtime &rt, P2 value) {
|
|
4872
|
+
return bridging::toJs(rt, value);
|
|
4873
|
+
}
|
|
4874
|
+
|
|
4875
|
+
static std::optional<double> prereleaseToJs(jsi::Runtime &rt, P3 value) {
|
|
4876
|
+
return bridging::toJs(rt, value);
|
|
4877
|
+
}
|
|
4878
|
+
#endif
|
|
4879
|
+
|
|
4880
|
+
static jsi::Object toJs(
|
|
4881
|
+
jsi::Runtime &rt,
|
|
4882
|
+
const PlatformConstantsBaseReactNativeVersionAndroid<P0, P1, P2, P3> &value,
|
|
4883
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
4884
|
+
auto result = facebook::jsi::Object(rt);
|
|
4885
|
+
result.setProperty(rt, "major", bridging::toJs(rt, value.major, jsInvoker));
|
|
4886
|
+
result.setProperty(rt, "minor", bridging::toJs(rt, value.minor, jsInvoker));
|
|
4887
|
+
result.setProperty(rt, "patch", bridging::toJs(rt, value.patch, jsInvoker));
|
|
4888
|
+
result.setProperty(rt, "prerelease", bridging::toJs(rt, value.prerelease, jsInvoker));
|
|
4889
|
+
return result;
|
|
4890
|
+
}
|
|
4891
|
+
};
|
|
4892
|
+
|
|
4893
|
+
|
|
4894
|
+
|
|
4895
|
+
#pragma mark - PlatformConstantsBasePlatformConstantsAndroid
|
|
4896
|
+
|
|
4897
|
+
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>
|
|
4898
|
+
struct PlatformConstantsBasePlatformConstantsAndroid {
|
|
4899
|
+
P0 isTesting;
|
|
4900
|
+
P1 isDisableAnimations;
|
|
4901
|
+
P2 reactNativeVersion;
|
|
4902
|
+
P3 Version;
|
|
4903
|
+
P4 Release;
|
|
4904
|
+
P5 Serial;
|
|
4905
|
+
P6 Fingerprint;
|
|
4906
|
+
P7 Model;
|
|
4907
|
+
P8 ServerHost;
|
|
4908
|
+
P9 uiMode;
|
|
4909
|
+
P10 Brand;
|
|
4910
|
+
P11 Manufacturer;
|
|
4911
|
+
bool operator==(const PlatformConstantsBasePlatformConstantsAndroid &other) const {
|
|
4912
|
+
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;
|
|
4913
|
+
}
|
|
4914
|
+
};
|
|
4915
|
+
|
|
4916
|
+
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>
|
|
4917
|
+
struct PlatformConstantsBasePlatformConstantsAndroidBridging {
|
|
4918
|
+
static PlatformConstantsBasePlatformConstantsAndroid<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11> fromJs(
|
|
4919
|
+
jsi::Runtime &rt,
|
|
4920
|
+
const jsi::Object &value,
|
|
4921
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
4922
|
+
PlatformConstantsBasePlatformConstantsAndroid<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11> result{
|
|
4923
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "isTesting"), jsInvoker),
|
|
4924
|
+
bridging::fromJs<P1>(rt, value.getProperty(rt, "isDisableAnimations"), jsInvoker),
|
|
4925
|
+
bridging::fromJs<P2>(rt, value.getProperty(rt, "reactNativeVersion"), jsInvoker),
|
|
4926
|
+
bridging::fromJs<P3>(rt, value.getProperty(rt, "Version"), jsInvoker),
|
|
4927
|
+
bridging::fromJs<P4>(rt, value.getProperty(rt, "Release"), jsInvoker),
|
|
4928
|
+
bridging::fromJs<P5>(rt, value.getProperty(rt, "Serial"), jsInvoker),
|
|
4929
|
+
bridging::fromJs<P6>(rt, value.getProperty(rt, "Fingerprint"), jsInvoker),
|
|
4930
|
+
bridging::fromJs<P7>(rt, value.getProperty(rt, "Model"), jsInvoker),
|
|
4931
|
+
bridging::fromJs<P8>(rt, value.getProperty(rt, "ServerHost"), jsInvoker),
|
|
4932
|
+
bridging::fromJs<P9>(rt, value.getProperty(rt, "uiMode"), jsInvoker),
|
|
4933
|
+
bridging::fromJs<P10>(rt, value.getProperty(rt, "Brand"), jsInvoker),
|
|
4934
|
+
bridging::fromJs<P11>(rt, value.getProperty(rt, "Manufacturer"), jsInvoker)};
|
|
4935
|
+
return result;
|
|
4936
|
+
}
|
|
4937
|
+
|
|
4938
|
+
#ifdef DEBUG
|
|
4939
|
+
static bool isTestingToJs(jsi::Runtime &rt, P0 value) {
|
|
4940
|
+
return bridging::toJs(rt, value);
|
|
4941
|
+
}
|
|
4942
|
+
|
|
4943
|
+
static bool isDisableAnimationsToJs(jsi::Runtime &rt, P1 value) {
|
|
4944
|
+
return bridging::toJs(rt, value);
|
|
4945
|
+
}
|
|
4946
|
+
|
|
4947
|
+
static jsi::Object reactNativeVersionToJs(jsi::Runtime &rt, P2 value) {
|
|
4948
|
+
return bridging::toJs(rt, value);
|
|
4949
|
+
}
|
|
4950
|
+
|
|
4951
|
+
static double VersionToJs(jsi::Runtime &rt, P3 value) {
|
|
4952
|
+
return bridging::toJs(rt, value);
|
|
4953
|
+
}
|
|
4954
|
+
|
|
4955
|
+
static jsi::String ReleaseToJs(jsi::Runtime &rt, P4 value) {
|
|
4956
|
+
return bridging::toJs(rt, value);
|
|
4957
|
+
}
|
|
4085
4958
|
|
|
4086
|
-
|
|
4959
|
+
static jsi::String SerialToJs(jsi::Runtime &rt, P5 value) {
|
|
4960
|
+
return bridging::toJs(rt, value);
|
|
4961
|
+
}
|
|
4087
4962
|
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
public:
|
|
4091
|
-
jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
4092
|
-
return delegate_.get(rt, propName);
|
|
4963
|
+
static jsi::String FingerprintToJs(jsi::Runtime &rt, P6 value) {
|
|
4964
|
+
return bridging::toJs(rt, value);
|
|
4093
4965
|
}
|
|
4094
4966
|
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
4967
|
+
static jsi::String ModelToJs(jsi::Runtime &rt, P7 value) {
|
|
4968
|
+
return bridging::toJs(rt, value);
|
|
4969
|
+
}
|
|
4099
4970
|
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
4104
|
-
NativeDevSplitBundleLoaderCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {}
|
|
4971
|
+
static jsi::String ServerHostToJs(jsi::Runtime &rt, P8 value) {
|
|
4972
|
+
return bridging::toJs(rt, value);
|
|
4973
|
+
}
|
|
4105
4974
|
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
"Expected loadBundle(...) to have 2 parameters");
|
|
4975
|
+
static jsi::String uiModeToJs(jsi::Runtime &rt, P9 value) {
|
|
4976
|
+
return bridging::toJs(rt, value);
|
|
4977
|
+
}
|
|
4110
4978
|
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4979
|
+
static jsi::String BrandToJs(jsi::Runtime &rt, P10 value) {
|
|
4980
|
+
return bridging::toJs(rt, value);
|
|
4981
|
+
}
|
|
4114
4982
|
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
}
|
|
4983
|
+
static jsi::String ManufacturerToJs(jsi::Runtime &rt, P11 value) {
|
|
4984
|
+
return bridging::toJs(rt, value);
|
|
4985
|
+
}
|
|
4986
|
+
#endif
|
|
4118
4987
|
|
|
4119
|
-
|
|
4988
|
+
static jsi::Object toJs(
|
|
4989
|
+
jsi::Runtime &rt,
|
|
4990
|
+
const PlatformConstantsBasePlatformConstantsAndroid<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11> &value,
|
|
4991
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
4992
|
+
auto result = facebook::jsi::Object(rt);
|
|
4993
|
+
result.setProperty(rt, "isTesting", bridging::toJs(rt, value.isTesting, jsInvoker));
|
|
4994
|
+
if (value.isDisableAnimations) {
|
|
4995
|
+
result.setProperty(rt, "isDisableAnimations", bridging::toJs(rt, value.isDisableAnimations.value(), jsInvoker));
|
|
4996
|
+
}
|
|
4997
|
+
result.setProperty(rt, "reactNativeVersion", bridging::toJs(rt, value.reactNativeVersion, jsInvoker));
|
|
4998
|
+
result.setProperty(rt, "Version", bridging::toJs(rt, value.Version, jsInvoker));
|
|
4999
|
+
result.setProperty(rt, "Release", bridging::toJs(rt, value.Release, jsInvoker));
|
|
5000
|
+
result.setProperty(rt, "Serial", bridging::toJs(rt, value.Serial, jsInvoker));
|
|
5001
|
+
result.setProperty(rt, "Fingerprint", bridging::toJs(rt, value.Fingerprint, jsInvoker));
|
|
5002
|
+
result.setProperty(rt, "Model", bridging::toJs(rt, value.Model, jsInvoker));
|
|
5003
|
+
if (value.ServerHost) {
|
|
5004
|
+
result.setProperty(rt, "ServerHost", bridging::toJs(rt, value.ServerHost.value(), jsInvoker));
|
|
5005
|
+
}
|
|
5006
|
+
result.setProperty(rt, "uiMode", bridging::toJs(rt, value.uiMode, jsInvoker));
|
|
5007
|
+
result.setProperty(rt, "Brand", bridging::toJs(rt, value.Brand, jsInvoker));
|
|
5008
|
+
result.setProperty(rt, "Manufacturer", bridging::toJs(rt, value.Manufacturer, jsInvoker));
|
|
5009
|
+
return result;
|
|
5010
|
+
}
|
|
4120
5011
|
};
|
|
4121
5012
|
|
|
4122
|
-
|
|
4123
|
-
class JSI_EXPORT NativePlatformConstantsAndroidCxxSpecJSI : public TurboModule {
|
|
5013
|
+
class JSI_EXPORT NativePlatformConstantsAndroidCxxSpecJSI : public TurboModule {
|
|
4124
5014
|
protected:
|
|
4125
5015
|
NativePlatformConstantsAndroidCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
4126
5016
|
|
|
@@ -4137,9 +5027,11 @@ public:
|
|
|
4137
5027
|
return delegate_.get(rt, propName);
|
|
4138
5028
|
}
|
|
4139
5029
|
|
|
5030
|
+
static constexpr std::string_view kModuleName = "PlatformConstants";
|
|
5031
|
+
|
|
4140
5032
|
protected:
|
|
4141
5033
|
NativePlatformConstantsAndroidCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
4142
|
-
: TurboModule(
|
|
5034
|
+
: TurboModule(std::string{NativePlatformConstantsAndroidCxxSpec::kModuleName}, jsInvoker),
|
|
4143
5035
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
4144
5036
|
|
|
4145
5037
|
private:
|
|
@@ -4173,7 +5065,89 @@ private:
|
|
|
4173
5065
|
};
|
|
4174
5066
|
|
|
4175
5067
|
|
|
4176
|
-
|
|
5068
|
+
|
|
5069
|
+
#pragma mark - PlatformConstantsBasePlatformConstantsIOS
|
|
5070
|
+
|
|
5071
|
+
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
|
|
5072
|
+
struct PlatformConstantsBasePlatformConstantsIOS {
|
|
5073
|
+
P0 isTesting;
|
|
5074
|
+
P1 isDisableAnimations;
|
|
5075
|
+
P2 reactNativeVersion;
|
|
5076
|
+
P3 forceTouchAvailable;
|
|
5077
|
+
P4 osVersion;
|
|
5078
|
+
P5 systemName;
|
|
5079
|
+
P6 interfaceIdiom;
|
|
5080
|
+
bool operator==(const PlatformConstantsBasePlatformConstantsIOS &other) const {
|
|
5081
|
+
return isTesting == other.isTesting && isDisableAnimations == other.isDisableAnimations && reactNativeVersion == other.reactNativeVersion && forceTouchAvailable == other.forceTouchAvailable && osVersion == other.osVersion && systemName == other.systemName && interfaceIdiom == other.interfaceIdiom;
|
|
5082
|
+
}
|
|
5083
|
+
};
|
|
5084
|
+
|
|
5085
|
+
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
|
|
5086
|
+
struct PlatformConstantsBasePlatformConstantsIOSBridging {
|
|
5087
|
+
static PlatformConstantsBasePlatformConstantsIOS<P0, P1, P2, P3, P4, P5, P6> fromJs(
|
|
5088
|
+
jsi::Runtime &rt,
|
|
5089
|
+
const jsi::Object &value,
|
|
5090
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
5091
|
+
PlatformConstantsBasePlatformConstantsIOS<P0, P1, P2, P3, P4, P5, P6> result{
|
|
5092
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "isTesting"), jsInvoker),
|
|
5093
|
+
bridging::fromJs<P1>(rt, value.getProperty(rt, "isDisableAnimations"), jsInvoker),
|
|
5094
|
+
bridging::fromJs<P2>(rt, value.getProperty(rt, "reactNativeVersion"), jsInvoker),
|
|
5095
|
+
bridging::fromJs<P3>(rt, value.getProperty(rt, "forceTouchAvailable"), jsInvoker),
|
|
5096
|
+
bridging::fromJs<P4>(rt, value.getProperty(rt, "osVersion"), jsInvoker),
|
|
5097
|
+
bridging::fromJs<P5>(rt, value.getProperty(rt, "systemName"), jsInvoker),
|
|
5098
|
+
bridging::fromJs<P6>(rt, value.getProperty(rt, "interfaceIdiom"), jsInvoker)};
|
|
5099
|
+
return result;
|
|
5100
|
+
}
|
|
5101
|
+
|
|
5102
|
+
#ifdef DEBUG
|
|
5103
|
+
static bool isTestingToJs(jsi::Runtime &rt, P0 value) {
|
|
5104
|
+
return bridging::toJs(rt, value);
|
|
5105
|
+
}
|
|
5106
|
+
|
|
5107
|
+
static bool isDisableAnimationsToJs(jsi::Runtime &rt, P1 value) {
|
|
5108
|
+
return bridging::toJs(rt, value);
|
|
5109
|
+
}
|
|
5110
|
+
|
|
5111
|
+
static jsi::Object reactNativeVersionToJs(jsi::Runtime &rt, P2 value) {
|
|
5112
|
+
return bridging::toJs(rt, value);
|
|
5113
|
+
}
|
|
5114
|
+
|
|
5115
|
+
static bool forceTouchAvailableToJs(jsi::Runtime &rt, P3 value) {
|
|
5116
|
+
return bridging::toJs(rt, value);
|
|
5117
|
+
}
|
|
5118
|
+
|
|
5119
|
+
static jsi::String osVersionToJs(jsi::Runtime &rt, P4 value) {
|
|
5120
|
+
return bridging::toJs(rt, value);
|
|
5121
|
+
}
|
|
5122
|
+
|
|
5123
|
+
static jsi::String systemNameToJs(jsi::Runtime &rt, P5 value) {
|
|
5124
|
+
return bridging::toJs(rt, value);
|
|
5125
|
+
}
|
|
5126
|
+
|
|
5127
|
+
static jsi::String interfaceIdiomToJs(jsi::Runtime &rt, P6 value) {
|
|
5128
|
+
return bridging::toJs(rt, value);
|
|
5129
|
+
}
|
|
5130
|
+
#endif
|
|
5131
|
+
|
|
5132
|
+
static jsi::Object toJs(
|
|
5133
|
+
jsi::Runtime &rt,
|
|
5134
|
+
const PlatformConstantsBasePlatformConstantsIOS<P0, P1, P2, P3, P4, P5, P6> &value,
|
|
5135
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
5136
|
+
auto result = facebook::jsi::Object(rt);
|
|
5137
|
+
result.setProperty(rt, "isTesting", bridging::toJs(rt, value.isTesting, jsInvoker));
|
|
5138
|
+
if (value.isDisableAnimations) {
|
|
5139
|
+
result.setProperty(rt, "isDisableAnimations", bridging::toJs(rt, value.isDisableAnimations.value(), jsInvoker));
|
|
5140
|
+
}
|
|
5141
|
+
result.setProperty(rt, "reactNativeVersion", bridging::toJs(rt, value.reactNativeVersion, jsInvoker));
|
|
5142
|
+
result.setProperty(rt, "forceTouchAvailable", bridging::toJs(rt, value.forceTouchAvailable, jsInvoker));
|
|
5143
|
+
result.setProperty(rt, "osVersion", bridging::toJs(rt, value.osVersion, jsInvoker));
|
|
5144
|
+
result.setProperty(rt, "systemName", bridging::toJs(rt, value.systemName, jsInvoker));
|
|
5145
|
+
result.setProperty(rt, "interfaceIdiom", bridging::toJs(rt, value.interfaceIdiom, jsInvoker));
|
|
5146
|
+
return result;
|
|
5147
|
+
}
|
|
5148
|
+
};
|
|
5149
|
+
|
|
5150
|
+
class JSI_EXPORT NativePlatformConstantsIOSCxxSpecJSI : public TurboModule {
|
|
4177
5151
|
protected:
|
|
4178
5152
|
NativePlatformConstantsIOSCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
4179
5153
|
|
|
@@ -4189,9 +5163,11 @@ public:
|
|
|
4189
5163
|
return delegate_.get(rt, propName);
|
|
4190
5164
|
}
|
|
4191
5165
|
|
|
5166
|
+
static constexpr std::string_view kModuleName = "PlatformConstants";
|
|
5167
|
+
|
|
4192
5168
|
protected:
|
|
4193
5169
|
NativePlatformConstantsIOSCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
4194
|
-
: TurboModule(
|
|
5170
|
+
: TurboModule(std::string{NativePlatformConstantsIOSCxxSpec::kModuleName}, jsInvoker),
|
|
4195
5171
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
4196
5172
|
|
|
4197
5173
|
private:
|
|
@@ -4217,7 +5193,68 @@ private:
|
|
|
4217
5193
|
};
|
|
4218
5194
|
|
|
4219
5195
|
|
|
4220
|
-
|
|
5196
|
+
|
|
5197
|
+
#pragma mark - PlatformConstantsBasePlatformConstantsWindows
|
|
5198
|
+
|
|
5199
|
+
template <typename P0, typename P1, typename P2, typename P3>
|
|
5200
|
+
struct PlatformConstantsBasePlatformConstantsWindows {
|
|
5201
|
+
P0 isTesting;
|
|
5202
|
+
P1 isDisableAnimations;
|
|
5203
|
+
P2 reactNativeVersion;
|
|
5204
|
+
P3 osVersion;
|
|
5205
|
+
bool operator==(const PlatformConstantsBasePlatformConstantsWindows &other) const {
|
|
5206
|
+
return isTesting == other.isTesting && isDisableAnimations == other.isDisableAnimations && reactNativeVersion == other.reactNativeVersion && osVersion == other.osVersion;
|
|
5207
|
+
}
|
|
5208
|
+
};
|
|
5209
|
+
|
|
5210
|
+
template <typename P0, typename P1, typename P2, typename P3>
|
|
5211
|
+
struct PlatformConstantsBasePlatformConstantsWindowsBridging {
|
|
5212
|
+
static PlatformConstantsBasePlatformConstantsWindows<P0, P1, P2, P3> fromJs(
|
|
5213
|
+
jsi::Runtime &rt,
|
|
5214
|
+
const jsi::Object &value,
|
|
5215
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
5216
|
+
PlatformConstantsBasePlatformConstantsWindows<P0, P1, P2, P3> result{
|
|
5217
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "isTesting"), jsInvoker),
|
|
5218
|
+
bridging::fromJs<P1>(rt, value.getProperty(rt, "isDisableAnimations"), jsInvoker),
|
|
5219
|
+
bridging::fromJs<P2>(rt, value.getProperty(rt, "reactNativeVersion"), jsInvoker),
|
|
5220
|
+
bridging::fromJs<P3>(rt, value.getProperty(rt, "osVersion"), jsInvoker)};
|
|
5221
|
+
return result;
|
|
5222
|
+
}
|
|
5223
|
+
|
|
5224
|
+
#ifdef DEBUG
|
|
5225
|
+
static bool isTestingToJs(jsi::Runtime &rt, P0 value) {
|
|
5226
|
+
return bridging::toJs(rt, value);
|
|
5227
|
+
}
|
|
5228
|
+
|
|
5229
|
+
static bool isDisableAnimationsToJs(jsi::Runtime &rt, P1 value) {
|
|
5230
|
+
return bridging::toJs(rt, value);
|
|
5231
|
+
}
|
|
5232
|
+
|
|
5233
|
+
static jsi::Object reactNativeVersionToJs(jsi::Runtime &rt, P2 value) {
|
|
5234
|
+
return bridging::toJs(rt, value);
|
|
5235
|
+
}
|
|
5236
|
+
|
|
5237
|
+
static double osVersionToJs(jsi::Runtime &rt, P3 value) {
|
|
5238
|
+
return bridging::toJs(rt, value);
|
|
5239
|
+
}
|
|
5240
|
+
#endif
|
|
5241
|
+
|
|
5242
|
+
static jsi::Object toJs(
|
|
5243
|
+
jsi::Runtime &rt,
|
|
5244
|
+
const PlatformConstantsBasePlatformConstantsWindows<P0, P1, P2, P3> &value,
|
|
5245
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
5246
|
+
auto result = facebook::jsi::Object(rt);
|
|
5247
|
+
result.setProperty(rt, "isTesting", bridging::toJs(rt, value.isTesting, jsInvoker));
|
|
5248
|
+
if (value.isDisableAnimations) {
|
|
5249
|
+
result.setProperty(rt, "isDisableAnimations", bridging::toJs(rt, value.isDisableAnimations.value(), jsInvoker));
|
|
5250
|
+
}
|
|
5251
|
+
result.setProperty(rt, "reactNativeVersion", bridging::toJs(rt, value.reactNativeVersion, jsInvoker));
|
|
5252
|
+
result.setProperty(rt, "osVersion", bridging::toJs(rt, value.osVersion, jsInvoker));
|
|
5253
|
+
return result;
|
|
5254
|
+
}
|
|
5255
|
+
};
|
|
5256
|
+
|
|
5257
|
+
class JSI_EXPORT NativePlatformConstantsWinCxxSpecJSI : public TurboModule {
|
|
4221
5258
|
protected:
|
|
4222
5259
|
NativePlatformConstantsWinCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
4223
5260
|
|
|
@@ -4233,9 +5270,11 @@ public:
|
|
|
4233
5270
|
return delegate_.get(rt, propName);
|
|
4234
5271
|
}
|
|
4235
5272
|
|
|
5273
|
+
static constexpr std::string_view kModuleName = "PlatformConstants";
|
|
5274
|
+
|
|
4236
5275
|
protected:
|
|
4237
5276
|
NativePlatformConstantsWinCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
4238
|
-
: TurboModule(
|
|
5277
|
+
: TurboModule(std::string{NativePlatformConstantsWinCxxSpec::kModuleName}, jsInvoker),
|
|
4239
5278
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
4240
5279
|
|
|
4241
5280
|
private:
|
|
@@ -4280,9 +5319,11 @@ public:
|
|
|
4280
5319
|
return delegate_.get(rt, propName);
|
|
4281
5320
|
}
|
|
4282
5321
|
|
|
5322
|
+
static constexpr std::string_view kModuleName = "Vibration";
|
|
5323
|
+
|
|
4283
5324
|
protected:
|
|
4284
5325
|
NativeVibrationCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
4285
|
-
: TurboModule(
|
|
5326
|
+
: TurboModule(std::string{NativeVibrationCxxSpec::kModuleName}, jsInvoker),
|
|
4286
5327
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
4287
5328
|
|
|
4288
5329
|
private:
|
|
@@ -4332,67 +5373,12 @@ private:
|
|
|
4332
5373
|
};
|
|
4333
5374
|
|
|
4334
5375
|
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
template <typename P0, typename P1, typename P2, typename P3>
|
|
4338
|
-
struct NativePerformanceCxxBaseReactNativeStartupTiming {
|
|
4339
|
-
P0 startTime;
|
|
4340
|
-
P1 endTime;
|
|
4341
|
-
P2 executeJavaScriptBundleEntryPointStart;
|
|
4342
|
-
P3 executeJavaScriptBundleEntryPointEnd;
|
|
4343
|
-
bool operator==(const NativePerformanceCxxBaseReactNativeStartupTiming &other) const {
|
|
4344
|
-
return startTime == other.startTime && endTime == other.endTime && executeJavaScriptBundleEntryPointStart == other.executeJavaScriptBundleEntryPointStart && executeJavaScriptBundleEntryPointEnd == other.executeJavaScriptBundleEntryPointEnd;
|
|
4345
|
-
}
|
|
4346
|
-
};
|
|
4347
|
-
|
|
4348
|
-
template <typename P0, typename P1, typename P2, typename P3>
|
|
4349
|
-
struct NativePerformanceCxxBaseReactNativeStartupTimingBridging {
|
|
4350
|
-
static NativePerformanceCxxBaseReactNativeStartupTiming<P0, P1, P2, P3> fromJs(
|
|
4351
|
-
jsi::Runtime &rt,
|
|
4352
|
-
const jsi::Object &value,
|
|
4353
|
-
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
4354
|
-
NativePerformanceCxxBaseReactNativeStartupTiming<P0, P1, P2, P3> result{
|
|
4355
|
-
bridging::fromJs<P0>(rt, value.getProperty(rt, "startTime"), jsInvoker),
|
|
4356
|
-
bridging::fromJs<P1>(rt, value.getProperty(rt, "endTime"), jsInvoker),
|
|
4357
|
-
bridging::fromJs<P2>(rt, value.getProperty(rt, "executeJavaScriptBundleEntryPointStart"), jsInvoker),
|
|
4358
|
-
bridging::fromJs<P3>(rt, value.getProperty(rt, "executeJavaScriptBundleEntryPointEnd"), jsInvoker)};
|
|
4359
|
-
return result;
|
|
4360
|
-
}
|
|
4361
|
-
|
|
4362
|
-
#ifdef DEBUG
|
|
4363
|
-
static double startTimeToJs(jsi::Runtime &rt, P0 value) {
|
|
4364
|
-
return bridging::toJs(rt, value);
|
|
4365
|
-
}
|
|
4366
|
-
static double endTimeToJs(jsi::Runtime &rt, P1 value) {
|
|
4367
|
-
return bridging::toJs(rt, value);
|
|
4368
|
-
}
|
|
4369
|
-
static double executeJavaScriptBundleEntryPointStartToJs(jsi::Runtime &rt, P2 value) {
|
|
4370
|
-
return bridging::toJs(rt, value);
|
|
4371
|
-
}
|
|
4372
|
-
static double executeJavaScriptBundleEntryPointEndToJs(jsi::Runtime &rt, P3 value) {
|
|
4373
|
-
return bridging::toJs(rt, value);
|
|
4374
|
-
}
|
|
4375
|
-
#endif
|
|
4376
|
-
|
|
4377
|
-
static jsi::Object toJs(
|
|
4378
|
-
jsi::Runtime &rt,
|
|
4379
|
-
const NativePerformanceCxxBaseReactNativeStartupTiming<P0, P1, P2, P3> &value,
|
|
4380
|
-
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
4381
|
-
auto result = facebook::jsi::Object(rt);
|
|
4382
|
-
result.setProperty(rt, "startTime", bridging::toJs(rt, value.startTime, jsInvoker));
|
|
4383
|
-
result.setProperty(rt, "endTime", bridging::toJs(rt, value.endTime, jsInvoker));
|
|
4384
|
-
result.setProperty(rt, "executeJavaScriptBundleEntryPointStart", bridging::toJs(rt, value.executeJavaScriptBundleEntryPointStart, jsInvoker));
|
|
4385
|
-
result.setProperty(rt, "executeJavaScriptBundleEntryPointEnd", bridging::toJs(rt, value.executeJavaScriptBundleEntryPointEnd, jsInvoker));
|
|
4386
|
-
return result;
|
|
4387
|
-
}
|
|
4388
|
-
};
|
|
4389
|
-
|
|
4390
|
-
class JSI_EXPORT NativePerformanceCxxSpecJSI : public TurboModule {
|
|
5376
|
+
class JSI_EXPORT NativePerformanceCxxSpecJSI : public TurboModule {
|
|
4391
5377
|
protected:
|
|
4392
5378
|
NativePerformanceCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
4393
5379
|
|
|
4394
5380
|
public:
|
|
4395
|
-
virtual void mark(jsi::Runtime &rt, jsi::String name, double startTime
|
|
5381
|
+
virtual void mark(jsi::Runtime &rt, jsi::String name, double startTime) = 0;
|
|
4396
5382
|
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;
|
|
4397
5383
|
virtual jsi::Object getSimpleMemoryInfo(jsi::Runtime &rt) = 0;
|
|
4398
5384
|
virtual jsi::Object getReactNativeStartupTiming(jsi::Runtime &rt) = 0;
|
|
@@ -4406,9 +5392,11 @@ public:
|
|
|
4406
5392
|
return delegate_.get(rt, propName);
|
|
4407
5393
|
}
|
|
4408
5394
|
|
|
5395
|
+
static constexpr std::string_view kModuleName = "NativePerformanceCxx";
|
|
5396
|
+
|
|
4409
5397
|
protected:
|
|
4410
5398
|
NativePerformanceCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
4411
|
-
: TurboModule(
|
|
5399
|
+
: TurboModule(std::string{NativePerformanceCxxSpec::kModuleName}, jsInvoker),
|
|
4412
5400
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
4413
5401
|
|
|
4414
5402
|
private:
|
|
@@ -4417,13 +5405,13 @@ private:
|
|
|
4417
5405
|
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
4418
5406
|
NativePerformanceCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {}
|
|
4419
5407
|
|
|
4420
|
-
void mark(jsi::Runtime &rt, jsi::String name, double startTime
|
|
5408
|
+
void mark(jsi::Runtime &rt, jsi::String name, double startTime) override {
|
|
4421
5409
|
static_assert(
|
|
4422
|
-
bridging::getParameterCount(&T::mark) ==
|
|
4423
|
-
"Expected mark(...) to have
|
|
5410
|
+
bridging::getParameterCount(&T::mark) == 3,
|
|
5411
|
+
"Expected mark(...) to have 3 parameters");
|
|
4424
5412
|
|
|
4425
5413
|
return bridging::callFromJs<void>(
|
|
4426
|
-
rt, &T::mark, jsInvoker_, instance_, std::move(name), std::move(startTime)
|
|
5414
|
+
rt, &T::mark, jsInvoker_, instance_, std::move(name), std::move(startTime));
|
|
4427
5415
|
}
|
|
4428
5416
|
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 {
|
|
4429
5417
|
static_assert(
|
|
@@ -4458,7 +5446,8 @@ private:
|
|
|
4458
5446
|
};
|
|
4459
5447
|
|
|
4460
5448
|
|
|
4461
|
-
|
|
5449
|
+
|
|
5450
|
+
#pragma mark - NativePerformanceObserverCxxBaseRawPerformanceEntry
|
|
4462
5451
|
|
|
4463
5452
|
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
|
|
4464
5453
|
struct NativePerformanceObserverCxxBaseRawPerformanceEntry {
|
|
@@ -4495,47 +5484,54 @@ struct NativePerformanceObserverCxxBaseRawPerformanceEntryBridging {
|
|
|
4495
5484
|
static jsi::String nameToJs(jsi::Runtime &rt, P0 value) {
|
|
4496
5485
|
return bridging::toJs(rt, value);
|
|
4497
5486
|
}
|
|
5487
|
+
|
|
4498
5488
|
static double entryTypeToJs(jsi::Runtime &rt, P1 value) {
|
|
4499
5489
|
return bridging::toJs(rt, value);
|
|
4500
5490
|
}
|
|
5491
|
+
|
|
4501
5492
|
static double startTimeToJs(jsi::Runtime &rt, P2 value) {
|
|
4502
5493
|
return bridging::toJs(rt, value);
|
|
4503
5494
|
}
|
|
5495
|
+
|
|
4504
5496
|
static double durationToJs(jsi::Runtime &rt, P3 value) {
|
|
4505
5497
|
return bridging::toJs(rt, value);
|
|
4506
5498
|
}
|
|
5499
|
+
|
|
4507
5500
|
static double processingStartToJs(jsi::Runtime &rt, P4 value) {
|
|
4508
5501
|
return bridging::toJs(rt, value);
|
|
4509
5502
|
}
|
|
5503
|
+
|
|
4510
5504
|
static double processingEndToJs(jsi::Runtime &rt, P5 value) {
|
|
4511
5505
|
return bridging::toJs(rt, value);
|
|
4512
5506
|
}
|
|
5507
|
+
|
|
4513
5508
|
static double interactionIdToJs(jsi::Runtime &rt, P6 value) {
|
|
4514
5509
|
return bridging::toJs(rt, value);
|
|
4515
5510
|
}
|
|
4516
5511
|
#endif
|
|
4517
5512
|
|
|
4518
5513
|
static jsi::Object toJs(
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
5514
|
+
jsi::Runtime &rt,
|
|
5515
|
+
const NativePerformanceObserverCxxBaseRawPerformanceEntry<P0, P1, P2, P3, P4, P5, P6> &value,
|
|
5516
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
5517
|
+
auto result = facebook::jsi::Object(rt);
|
|
5518
|
+
result.setProperty(rt, "name", bridging::toJs(rt, value.name, jsInvoker));
|
|
4524
5519
|
result.setProperty(rt, "entryType", bridging::toJs(rt, value.entryType, jsInvoker));
|
|
4525
5520
|
result.setProperty(rt, "startTime", bridging::toJs(rt, value.startTime, jsInvoker));
|
|
4526
5521
|
result.setProperty(rt, "duration", bridging::toJs(rt, value.duration, jsInvoker));
|
|
4527
5522
|
if (value.processingStart) {
|
|
4528
|
-
|
|
4529
|
-
|
|
5523
|
+
result.setProperty(rt, "processingStart", bridging::toJs(rt, value.processingStart.value(), jsInvoker));
|
|
5524
|
+
}
|
|
4530
5525
|
if (value.processingEnd) {
|
|
4531
|
-
|
|
4532
|
-
|
|
5526
|
+
result.setProperty(rt, "processingEnd", bridging::toJs(rt, value.processingEnd.value(), jsInvoker));
|
|
5527
|
+
}
|
|
4533
5528
|
if (value.interactionId) {
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
|
|
5529
|
+
result.setProperty(rt, "interactionId", bridging::toJs(rt, value.interactionId.value(), jsInvoker));
|
|
5530
|
+
}
|
|
5531
|
+
return result;
|
|
5532
|
+
}
|
|
5533
|
+
};
|
|
5534
|
+
|
|
4539
5535
|
|
|
4540
5536
|
|
|
4541
5537
|
#pragma mark - NativePerformanceObserverCxxBaseGetPendingEntriesResult
|
|
@@ -4565,21 +5561,22 @@ struct NativePerformanceObserverCxxBaseGetPendingEntriesResultBridging {
|
|
|
4565
5561
|
static jsi::Array entriesToJs(jsi::Runtime &rt, P0 value) {
|
|
4566
5562
|
return bridging::toJs(rt, value);
|
|
4567
5563
|
}
|
|
5564
|
+
|
|
4568
5565
|
static double droppedEntriesCountToJs(jsi::Runtime &rt, P1 value) {
|
|
4569
5566
|
return bridging::toJs(rt, value);
|
|
4570
5567
|
}
|
|
4571
5568
|
#endif
|
|
4572
5569
|
|
|
4573
5570
|
static jsi::Object toJs(
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
5571
|
+
jsi::Runtime &rt,
|
|
5572
|
+
const NativePerformanceObserverCxxBaseGetPendingEntriesResult<P0, P1> &value,
|
|
5573
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
5574
|
+
auto result = facebook::jsi::Object(rt);
|
|
5575
|
+
result.setProperty(rt, "entries", bridging::toJs(rt, value.entries, jsInvoker));
|
|
4579
5576
|
result.setProperty(rt, "droppedEntriesCount", bridging::toJs(rt, value.droppedEntriesCount, jsInvoker));
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
5577
|
+
return result;
|
|
5578
|
+
}
|
|
5579
|
+
};
|
|
4583
5580
|
|
|
4584
5581
|
class JSI_EXPORT NativePerformanceObserverCxxSpecJSI : public TurboModule {
|
|
4585
5582
|
protected:
|
|
@@ -4588,6 +5585,7 @@ protected:
|
|
|
4588
5585
|
public:
|
|
4589
5586
|
virtual void startReporting(jsi::Runtime &rt, double entryType) = 0;
|
|
4590
5587
|
virtual void stopReporting(jsi::Runtime &rt, double entryType) = 0;
|
|
5588
|
+
virtual void setIsBuffered(jsi::Runtime &rt, jsi::Array entryTypes, bool isBuffered) = 0;
|
|
4591
5589
|
virtual jsi::Object popPendingEntries(jsi::Runtime &rt) = 0;
|
|
4592
5590
|
virtual void setOnPerformanceEntryCallback(jsi::Runtime &rt, std::optional<jsi::Function> callback) = 0;
|
|
4593
5591
|
virtual void logRawEntry(jsi::Runtime &rt, jsi::Object entry) = 0;
|
|
@@ -4605,9 +5603,11 @@ public:
|
|
|
4605
5603
|
return delegate_.get(rt, propName);
|
|
4606
5604
|
}
|
|
4607
5605
|
|
|
5606
|
+
static constexpr std::string_view kModuleName = "NativePerformanceObserverCxx";
|
|
5607
|
+
|
|
4608
5608
|
protected:
|
|
4609
5609
|
NativePerformanceObserverCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
4610
|
-
: TurboModule(
|
|
5610
|
+
: TurboModule(std::string{NativePerformanceObserverCxxSpec::kModuleName}, jsInvoker),
|
|
4611
5611
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
4612
5612
|
|
|
4613
5613
|
private:
|
|
@@ -4632,6 +5632,14 @@ private:
|
|
|
4632
5632
|
return bridging::callFromJs<void>(
|
|
4633
5633
|
rt, &T::stopReporting, jsInvoker_, instance_, std::move(entryType));
|
|
4634
5634
|
}
|
|
5635
|
+
void setIsBuffered(jsi::Runtime &rt, jsi::Array entryTypes, bool isBuffered) override {
|
|
5636
|
+
static_assert(
|
|
5637
|
+
bridging::getParameterCount(&T::setIsBuffered) == 3,
|
|
5638
|
+
"Expected setIsBuffered(...) to have 3 parameters");
|
|
5639
|
+
|
|
5640
|
+
return bridging::callFromJs<void>(
|
|
5641
|
+
rt, &T::setIsBuffered, jsInvoker_, instance_, std::move(entryTypes), std::move(isBuffered));
|
|
5642
|
+
}
|
|
4635
5643
|
jsi::Object popPendingEntries(jsi::Runtime &rt) override {
|
|
4636
5644
|
static_assert(
|
|
4637
5645
|
bridging::getParameterCount(&T::popPendingEntries) == 1,
|
|
@@ -4719,9 +5727,11 @@ public:
|
|
|
4719
5727
|
return delegate_.get(rt, propName);
|
|
4720
5728
|
}
|
|
4721
5729
|
|
|
5730
|
+
static constexpr std::string_view kModuleName = "WebSocketModule";
|
|
5731
|
+
|
|
4722
5732
|
protected:
|
|
4723
5733
|
NativeWebSocketModuleCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
4724
|
-
: TurboModule(
|
|
5734
|
+
: TurboModule(std::string{NativeWebSocketModuleCxxSpec::kModuleName}, jsInvoker),
|
|
4725
5735
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
4726
5736
|
|
|
4727
5737
|
private:
|
|
@@ -4816,9 +5826,11 @@ public:
|
|
|
4816
5826
|
return delegate_.get(rt, propName);
|
|
4817
5827
|
}
|
|
4818
5828
|
|
|
5829
|
+
static constexpr std::string_view kModuleName = "AccessibilityInfo";
|
|
5830
|
+
|
|
4819
5831
|
protected:
|
|
4820
5832
|
NativeAccessibilityInfoCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
4821
|
-
: TurboModule(
|
|
5833
|
+
: TurboModule(std::string{NativeAccessibilityInfoCxxSpec::kModuleName}, jsInvoker),
|
|
4822
5834
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
4823
5835
|
|
|
4824
5836
|
private:
|
|
@@ -4910,9 +5922,11 @@ public:
|
|
|
4910
5922
|
return delegate_.get(rt, propName);
|
|
4911
5923
|
}
|
|
4912
5924
|
|
|
5925
|
+
static constexpr std::string_view kModuleName = "AccessibilityManager";
|
|
5926
|
+
|
|
4913
5927
|
protected:
|
|
4914
5928
|
NativeAccessibilityManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
4915
|
-
: TurboModule(
|
|
5929
|
+
: TurboModule(std::string{NativeAccessibilityManagerCxxSpec::kModuleName}, jsInvoker),
|
|
4916
5930
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
4917
5931
|
|
|
4918
5932
|
private:
|
|
@@ -5036,9 +6050,11 @@ public:
|
|
|
5036
6050
|
return delegate_.get(rt, propName);
|
|
5037
6051
|
}
|
|
5038
6052
|
|
|
6053
|
+
static constexpr std::string_view kModuleName = "Clipboard";
|
|
6054
|
+
|
|
5039
6055
|
protected:
|
|
5040
6056
|
NativeClipboardCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
5041
|
-
: TurboModule(
|
|
6057
|
+
: TurboModule(std::string{NativeClipboardCxxSpec::kModuleName}, jsInvoker),
|
|
5042
6058
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
5043
6059
|
|
|
5044
6060
|
private:
|
|
@@ -5097,9 +6113,11 @@ public:
|
|
|
5097
6113
|
return delegate_.get(rt, propName);
|
|
5098
6114
|
}
|
|
5099
6115
|
|
|
6116
|
+
static constexpr std::string_view kModuleName = "KeyboardObserver";
|
|
6117
|
+
|
|
5100
6118
|
protected:
|
|
5101
6119
|
NativeKeyboardObserverCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
5102
|
-
: TurboModule(
|
|
6120
|
+
: TurboModule(std::string{NativeKeyboardObserverCxxSpec::kModuleName}, jsInvoker),
|
|
5103
6121
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
5104
6122
|
|
|
5105
6123
|
private:
|
|
@@ -5149,9 +6167,11 @@ public:
|
|
|
5149
6167
|
return delegate_.get(rt, propName);
|
|
5150
6168
|
}
|
|
5151
6169
|
|
|
6170
|
+
static constexpr std::string_view kModuleName = "SoundManager";
|
|
6171
|
+
|
|
5152
6172
|
protected:
|
|
5153
6173
|
NativeSoundManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
5154
|
-
: TurboModule(
|
|
6174
|
+
: TurboModule(std::string{NativeSoundManagerCxxSpec::kModuleName}, jsInvoker),
|
|
5155
6175
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
5156
6176
|
|
|
5157
6177
|
private:
|
|
@@ -5197,9 +6217,11 @@ public:
|
|
|
5197
6217
|
return delegate_.get(rt, propName);
|
|
5198
6218
|
}
|
|
5199
6219
|
|
|
6220
|
+
static constexpr std::string_view kModuleName = "StatusBarManager";
|
|
6221
|
+
|
|
5200
6222
|
protected:
|
|
5201
6223
|
NativeStatusBarManagerAndroidCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
5202
|
-
: TurboModule(
|
|
6224
|
+
: TurboModule(std::string{NativeStatusBarManagerAndroidCxxSpec::kModuleName}, jsInvoker),
|
|
5203
6225
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
5204
6226
|
|
|
5205
6227
|
private:
|
|
@@ -5279,9 +6301,11 @@ public:
|
|
|
5279
6301
|
return delegate_.get(rt, propName);
|
|
5280
6302
|
}
|
|
5281
6303
|
|
|
6304
|
+
static constexpr std::string_view kModuleName = "StatusBarManager";
|
|
6305
|
+
|
|
5282
6306
|
protected:
|
|
5283
6307
|
NativeStatusBarManagerIOSCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
5284
|
-
: TurboModule(
|
|
6308
|
+
: TurboModule(std::string{NativeStatusBarManagerIOSCxxSpec::kModuleName}, jsInvoker),
|
|
5285
6309
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
5286
6310
|
|
|
5287
6311
|
private:
|
|
@@ -5374,9 +6398,11 @@ public:
|
|
|
5374
6398
|
return delegate_.get(rt, propName);
|
|
5375
6399
|
}
|
|
5376
6400
|
|
|
6401
|
+
static constexpr std::string_view kModuleName = "ToastAndroid";
|
|
6402
|
+
|
|
5377
6403
|
protected:
|
|
5378
6404
|
NativeToastAndroidCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
5379
|
-
: TurboModule(
|
|
6405
|
+
: TurboModule(std::string{NativeToastAndroidCxxSpec::kModuleName}, jsInvoker),
|
|
5380
6406
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
5381
6407
|
|
|
5382
6408
|
private:
|
|
@@ -5443,9 +6469,11 @@ public:
|
|
|
5443
6469
|
return delegate_.get(rt, propName);
|
|
5444
6470
|
}
|
|
5445
6471
|
|
|
6472
|
+
static constexpr std::string_view kModuleName = "SegmentFetcher";
|
|
6473
|
+
|
|
5446
6474
|
protected:
|
|
5447
6475
|
NativeSegmentFetcherCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
5448
|
-
: TurboModule(
|
|
6476
|
+
: TurboModule(std::string{NativeSegmentFetcherCxxSpec::kModuleName}, jsInvoker),
|
|
5449
6477
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
5450
6478
|
|
|
5451
6479
|
private:
|
|
@@ -5497,9 +6525,11 @@ public:
|
|
|
5497
6525
|
return delegate_.get(rt, propName);
|
|
5498
6526
|
}
|
|
5499
6527
|
|
|
6528
|
+
static constexpr std::string_view kModuleName = "Timing";
|
|
6529
|
+
|
|
5500
6530
|
protected:
|
|
5501
6531
|
NativeTimingCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
5502
|
-
: TurboModule(
|
|
6532
|
+
: TurboModule(std::string{NativeTimingCxxSpec::kModuleName}, jsInvoker),
|
|
5503
6533
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
5504
6534
|
|
|
5505
6535
|
private:
|
|
@@ -5558,9 +6588,11 @@ public:
|
|
|
5558
6588
|
return delegate_.get(rt, propName);
|
|
5559
6589
|
}
|
|
5560
6590
|
|
|
6591
|
+
static constexpr std::string_view kModuleName = "AnimationsDebugModule";
|
|
6592
|
+
|
|
5561
6593
|
protected:
|
|
5562
6594
|
NativeAnimationsDebugModuleCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
5563
|
-
: TurboModule(
|
|
6595
|
+
: TurboModule(std::string{NativeAnimationsDebugModuleCxxSpec::kModuleName}, jsInvoker),
|
|
5564
6596
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
5565
6597
|
|
|
5566
6598
|
private:
|
|
@@ -5610,9 +6642,11 @@ public:
|
|
|
5610
6642
|
return delegate_.get(rt, propName);
|
|
5611
6643
|
}
|
|
5612
6644
|
|
|
6645
|
+
static constexpr std::string_view kModuleName = "DeviceEventManager";
|
|
6646
|
+
|
|
5613
6647
|
protected:
|
|
5614
6648
|
NativeDeviceEventManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
5615
|
-
: TurboModule(
|
|
6649
|
+
: TurboModule(std::string{NativeDeviceEventManagerCxxSpec::kModuleName}, jsInvoker),
|
|
5616
6650
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
5617
6651
|
|
|
5618
6652
|
private:
|
|
@@ -5658,9 +6692,11 @@ public:
|
|
|
5658
6692
|
return delegate_.get(rt, propName);
|
|
5659
6693
|
}
|
|
5660
6694
|
|
|
6695
|
+
static constexpr std::string_view kModuleName = "DevMenu";
|
|
6696
|
+
|
|
5661
6697
|
protected:
|
|
5662
6698
|
NativeDevMenuCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
5663
|
-
: TurboModule(
|
|
6699
|
+
: TurboModule(std::string{NativeDevMenuCxxSpec::kModuleName}, jsInvoker),
|
|
5664
6700
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
5665
6701
|
|
|
5666
6702
|
private:
|
|
@@ -5744,9 +6780,11 @@ public:
|
|
|
5744
6780
|
return delegate_.get(rt, propName);
|
|
5745
6781
|
}
|
|
5746
6782
|
|
|
6783
|
+
static constexpr std::string_view kModuleName = "DevSettings";
|
|
6784
|
+
|
|
5747
6785
|
protected:
|
|
5748
6786
|
NativeDevSettingsCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
5749
|
-
: TurboModule(
|
|
6787
|
+
: TurboModule(std::string{NativeDevSettingsCxxSpec::kModuleName}, jsInvoker),
|
|
5750
6788
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
5751
6789
|
|
|
5752
6790
|
private:
|
|
@@ -5852,7 +6890,8 @@ private:
|
|
|
5852
6890
|
};
|
|
5853
6891
|
|
|
5854
6892
|
|
|
5855
|
-
|
|
6893
|
+
|
|
6894
|
+
#pragma mark - DialogManagerAndroidBaseDialogOptions
|
|
5856
6895
|
|
|
5857
6896
|
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
|
|
5858
6897
|
struct DialogManagerAndroidBaseDialogOptions {
|
|
@@ -5889,55 +6928,61 @@ struct DialogManagerAndroidBaseDialogOptionsBridging {
|
|
|
5889
6928
|
static jsi::String titleToJs(jsi::Runtime &rt, P0 value) {
|
|
5890
6929
|
return bridging::toJs(rt, value);
|
|
5891
6930
|
}
|
|
6931
|
+
|
|
5892
6932
|
static jsi::String messageToJs(jsi::Runtime &rt, P1 value) {
|
|
5893
6933
|
return bridging::toJs(rt, value);
|
|
5894
6934
|
}
|
|
6935
|
+
|
|
5895
6936
|
static jsi::String buttonPositiveToJs(jsi::Runtime &rt, P2 value) {
|
|
5896
6937
|
return bridging::toJs(rt, value);
|
|
5897
6938
|
}
|
|
6939
|
+
|
|
5898
6940
|
static jsi::String buttonNegativeToJs(jsi::Runtime &rt, P3 value) {
|
|
5899
6941
|
return bridging::toJs(rt, value);
|
|
5900
6942
|
}
|
|
6943
|
+
|
|
5901
6944
|
static jsi::String buttonNeutralToJs(jsi::Runtime &rt, P4 value) {
|
|
5902
6945
|
return bridging::toJs(rt, value);
|
|
5903
6946
|
}
|
|
6947
|
+
|
|
5904
6948
|
static jsi::Array itemsToJs(jsi::Runtime &rt, P5 value) {
|
|
5905
6949
|
return bridging::toJs(rt, value);
|
|
5906
6950
|
}
|
|
6951
|
+
|
|
5907
6952
|
static bool cancelableToJs(jsi::Runtime &rt, P6 value) {
|
|
5908
6953
|
return bridging::toJs(rt, value);
|
|
5909
6954
|
}
|
|
5910
6955
|
#endif
|
|
5911
6956
|
|
|
5912
6957
|
static jsi::Object toJs(
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
6958
|
+
jsi::Runtime &rt,
|
|
6959
|
+
const DialogManagerAndroidBaseDialogOptions<P0, P1, P2, P3, P4, P5, P6> &value,
|
|
6960
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
6961
|
+
auto result = facebook::jsi::Object(rt);
|
|
6962
|
+
if (value.title) {
|
|
6963
|
+
result.setProperty(rt, "title", bridging::toJs(rt, value.title.value(), jsInvoker));
|
|
6964
|
+
}
|
|
5920
6965
|
if (value.message) {
|
|
5921
|
-
|
|
5922
|
-
|
|
6966
|
+
result.setProperty(rt, "message", bridging::toJs(rt, value.message.value(), jsInvoker));
|
|
6967
|
+
}
|
|
5923
6968
|
if (value.buttonPositive) {
|
|
5924
|
-
|
|
5925
|
-
|
|
6969
|
+
result.setProperty(rt, "buttonPositive", bridging::toJs(rt, value.buttonPositive.value(), jsInvoker));
|
|
6970
|
+
}
|
|
5926
6971
|
if (value.buttonNegative) {
|
|
5927
|
-
|
|
5928
|
-
|
|
6972
|
+
result.setProperty(rt, "buttonNegative", bridging::toJs(rt, value.buttonNegative.value(), jsInvoker));
|
|
6973
|
+
}
|
|
5929
6974
|
if (value.buttonNeutral) {
|
|
5930
|
-
|
|
5931
|
-
|
|
6975
|
+
result.setProperty(rt, "buttonNeutral", bridging::toJs(rt, value.buttonNeutral.value(), jsInvoker));
|
|
6976
|
+
}
|
|
5932
6977
|
if (value.items) {
|
|
5933
|
-
|
|
5934
|
-
|
|
6978
|
+
result.setProperty(rt, "items", bridging::toJs(rt, value.items.value(), jsInvoker));
|
|
6979
|
+
}
|
|
5935
6980
|
if (value.cancelable) {
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
6981
|
+
result.setProperty(rt, "cancelable", bridging::toJs(rt, value.cancelable.value(), jsInvoker));
|
|
6982
|
+
}
|
|
6983
|
+
return result;
|
|
6984
|
+
}
|
|
6985
|
+
};
|
|
5941
6986
|
|
|
5942
6987
|
class JSI_EXPORT NativeDialogManagerAndroidCxxSpecJSI : public TurboModule {
|
|
5943
6988
|
protected:
|
|
@@ -5956,9 +7001,11 @@ public:
|
|
|
5956
7001
|
return delegate_.get(rt, propName);
|
|
5957
7002
|
}
|
|
5958
7003
|
|
|
7004
|
+
static constexpr std::string_view kModuleName = "DialogManagerAndroid";
|
|
7005
|
+
|
|
5959
7006
|
protected:
|
|
5960
7007
|
NativeDialogManagerAndroidCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
5961
|
-
: TurboModule(
|
|
7008
|
+
: TurboModule(std::string{NativeDialogManagerAndroidCxxSpec::kModuleName}, jsInvoker),
|
|
5962
7009
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
5963
7010
|
|
|
5964
7011
|
private:
|
|
@@ -6009,9 +7056,11 @@ public:
|
|
|
6009
7056
|
return delegate_.get(rt, propName);
|
|
6010
7057
|
}
|
|
6011
7058
|
|
|
7059
|
+
static constexpr std::string_view kModuleName = "LogBox";
|
|
7060
|
+
|
|
6012
7061
|
protected:
|
|
6013
7062
|
NativeLogBoxCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
6014
|
-
: TurboModule(
|
|
7063
|
+
: TurboModule(std::string{NativeLogBoxCxxSpec::kModuleName}, jsInvoker),
|
|
6015
7064
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
6016
7065
|
|
|
6017
7066
|
private:
|
|
@@ -6062,9 +7111,11 @@ public:
|
|
|
6062
7111
|
return delegate_.get(rt, propName);
|
|
6063
7112
|
}
|
|
6064
7113
|
|
|
7114
|
+
static constexpr std::string_view kModuleName = "RedBox";
|
|
7115
|
+
|
|
6065
7116
|
protected:
|
|
6066
7117
|
NativeRedBoxCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
6067
|
-
: TurboModule(
|
|
7118
|
+
: TurboModule(std::string{NativeRedBoxCxxSpec::kModuleName}, jsInvoker),
|
|
6068
7119
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
6069
7120
|
|
|
6070
7121
|
private:
|
|
@@ -6098,7 +7149,45 @@ private:
|
|
|
6098
7149
|
};
|
|
6099
7150
|
|
|
6100
7151
|
|
|
6101
|
-
|
|
7152
|
+
|
|
7153
|
+
#pragma mark - SourceCodeBaseSourceCodeConstants
|
|
7154
|
+
|
|
7155
|
+
template <typename P0>
|
|
7156
|
+
struct SourceCodeBaseSourceCodeConstants {
|
|
7157
|
+
P0 scriptURL;
|
|
7158
|
+
bool operator==(const SourceCodeBaseSourceCodeConstants &other) const {
|
|
7159
|
+
return scriptURL == other.scriptURL;
|
|
7160
|
+
}
|
|
7161
|
+
};
|
|
7162
|
+
|
|
7163
|
+
template <typename P0>
|
|
7164
|
+
struct SourceCodeBaseSourceCodeConstantsBridging {
|
|
7165
|
+
static SourceCodeBaseSourceCodeConstants<P0> fromJs(
|
|
7166
|
+
jsi::Runtime &rt,
|
|
7167
|
+
const jsi::Object &value,
|
|
7168
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
7169
|
+
SourceCodeBaseSourceCodeConstants<P0> result{
|
|
7170
|
+
bridging::fromJs<P0>(rt, value.getProperty(rt, "scriptURL"), jsInvoker)};
|
|
7171
|
+
return result;
|
|
7172
|
+
}
|
|
7173
|
+
|
|
7174
|
+
#ifdef DEBUG
|
|
7175
|
+
static jsi::String scriptURLToJs(jsi::Runtime &rt, P0 value) {
|
|
7176
|
+
return bridging::toJs(rt, value);
|
|
7177
|
+
}
|
|
7178
|
+
#endif
|
|
7179
|
+
|
|
7180
|
+
static jsi::Object toJs(
|
|
7181
|
+
jsi::Runtime &rt,
|
|
7182
|
+
const SourceCodeBaseSourceCodeConstants<P0> &value,
|
|
7183
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
7184
|
+
auto result = facebook::jsi::Object(rt);
|
|
7185
|
+
result.setProperty(rt, "scriptURL", bridging::toJs(rt, value.scriptURL, jsInvoker));
|
|
7186
|
+
return result;
|
|
7187
|
+
}
|
|
7188
|
+
};
|
|
7189
|
+
|
|
7190
|
+
class JSI_EXPORT NativeSourceCodeCxxSpecJSI : public TurboModule {
|
|
6102
7191
|
protected:
|
|
6103
7192
|
NativeSourceCodeCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
6104
7193
|
|
|
@@ -6114,9 +7203,11 @@ public:
|
|
|
6114
7203
|
return delegate_.get(rt, propName);
|
|
6115
7204
|
}
|
|
6116
7205
|
|
|
7206
|
+
static constexpr std::string_view kModuleName = "SourceCode";
|
|
7207
|
+
|
|
6117
7208
|
protected:
|
|
6118
7209
|
NativeSourceCodeCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
6119
|
-
: TurboModule(
|
|
7210
|
+
: TurboModule(std::string{NativeSourceCodeCxxSpec::kModuleName}, jsInvoker),
|
|
6120
7211
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
6121
7212
|
|
|
6122
7213
|
private:
|
|
@@ -6187,6 +7278,12 @@ public:
|
|
|
6187
7278
|
virtual jsi::Object getValue(jsi::Runtime &rt, double x, jsi::String y, jsi::Object z) = 0;
|
|
6188
7279
|
virtual void getValueWithCallback(jsi::Runtime &rt, jsi::Function callback) = 0;
|
|
6189
7280
|
virtual jsi::Value getValueWithPromise(jsi::Runtime &rt, bool error) = 0;
|
|
7281
|
+
virtual void voidFuncThrows(jsi::Runtime &rt) = 0;
|
|
7282
|
+
virtual jsi::Object getObjectThrows(jsi::Runtime &rt, jsi::Object arg) = 0;
|
|
7283
|
+
virtual jsi::Value promiseThrows(jsi::Runtime &rt) = 0;
|
|
7284
|
+
virtual void voidFuncAssert(jsi::Runtime &rt) = 0;
|
|
7285
|
+
virtual jsi::Object getObjectAssert(jsi::Runtime &rt, jsi::Object arg) = 0;
|
|
7286
|
+
virtual jsi::Value promiseAssert(jsi::Runtime &rt) = 0;
|
|
6190
7287
|
|
|
6191
7288
|
};
|
|
6192
7289
|
|
|
@@ -6197,9 +7294,11 @@ public:
|
|
|
6197
7294
|
return delegate_.get(rt, propName);
|
|
6198
7295
|
}
|
|
6199
7296
|
|
|
7297
|
+
static constexpr std::string_view kModuleName = "SampleTurboModule";
|
|
7298
|
+
|
|
6200
7299
|
protected:
|
|
6201
7300
|
NativeSampleTurboModuleCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
6202
|
-
: TurboModule(
|
|
7301
|
+
: TurboModule(std::string{NativeSampleTurboModuleCxxSpec::kModuleName}, jsInvoker),
|
|
6203
7302
|
delegate_(static_cast<T*>(this), jsInvoker) {}
|
|
6204
7303
|
|
|
6205
7304
|
private:
|
|
@@ -6312,6 +7411,54 @@ private:
|
|
|
6312
7411
|
return bridging::callFromJs<jsi::Value>(
|
|
6313
7412
|
rt, &T::getValueWithPromise, jsInvoker_, instance_, std::move(error));
|
|
6314
7413
|
}
|
|
7414
|
+
void voidFuncThrows(jsi::Runtime &rt) override {
|
|
7415
|
+
static_assert(
|
|
7416
|
+
bridging::getParameterCount(&T::voidFuncThrows) == 1,
|
|
7417
|
+
"Expected voidFuncThrows(...) to have 1 parameters");
|
|
7418
|
+
|
|
7419
|
+
return bridging::callFromJs<void>(
|
|
7420
|
+
rt, &T::voidFuncThrows, jsInvoker_, instance_);
|
|
7421
|
+
}
|
|
7422
|
+
jsi::Object getObjectThrows(jsi::Runtime &rt, jsi::Object arg) override {
|
|
7423
|
+
static_assert(
|
|
7424
|
+
bridging::getParameterCount(&T::getObjectThrows) == 2,
|
|
7425
|
+
"Expected getObjectThrows(...) to have 2 parameters");
|
|
7426
|
+
|
|
7427
|
+
return bridging::callFromJs<jsi::Object>(
|
|
7428
|
+
rt, &T::getObjectThrows, jsInvoker_, instance_, std::move(arg));
|
|
7429
|
+
}
|
|
7430
|
+
jsi::Value promiseThrows(jsi::Runtime &rt) override {
|
|
7431
|
+
static_assert(
|
|
7432
|
+
bridging::getParameterCount(&T::promiseThrows) == 1,
|
|
7433
|
+
"Expected promiseThrows(...) to have 1 parameters");
|
|
7434
|
+
|
|
7435
|
+
return bridging::callFromJs<jsi::Value>(
|
|
7436
|
+
rt, &T::promiseThrows, jsInvoker_, instance_);
|
|
7437
|
+
}
|
|
7438
|
+
void voidFuncAssert(jsi::Runtime &rt) override {
|
|
7439
|
+
static_assert(
|
|
7440
|
+
bridging::getParameterCount(&T::voidFuncAssert) == 1,
|
|
7441
|
+
"Expected voidFuncAssert(...) to have 1 parameters");
|
|
7442
|
+
|
|
7443
|
+
return bridging::callFromJs<void>(
|
|
7444
|
+
rt, &T::voidFuncAssert, jsInvoker_, instance_);
|
|
7445
|
+
}
|
|
7446
|
+
jsi::Object getObjectAssert(jsi::Runtime &rt, jsi::Object arg) override {
|
|
7447
|
+
static_assert(
|
|
7448
|
+
bridging::getParameterCount(&T::getObjectAssert) == 2,
|
|
7449
|
+
"Expected getObjectAssert(...) to have 2 parameters");
|
|
7450
|
+
|
|
7451
|
+
return bridging::callFromJs<jsi::Object>(
|
|
7452
|
+
rt, &T::getObjectAssert, jsInvoker_, instance_, std::move(arg));
|
|
7453
|
+
}
|
|
7454
|
+
jsi::Value promiseAssert(jsi::Runtime &rt) override {
|
|
7455
|
+
static_assert(
|
|
7456
|
+
bridging::getParameterCount(&T::promiseAssert) == 1,
|
|
7457
|
+
"Expected promiseAssert(...) to have 1 parameters");
|
|
7458
|
+
|
|
7459
|
+
return bridging::callFromJs<jsi::Value>(
|
|
7460
|
+
rt, &T::promiseAssert, jsInvoker_, instance_);
|
|
7461
|
+
}
|
|
6315
7462
|
|
|
6316
7463
|
private:
|
|
6317
7464
|
T *instance_;
|