react-native-windows 0.75.3 → 0.76.0-preview.1
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 +6 -4
- package/Directory.Build.props +4 -0
- package/Directory.Build.targets +5 -0
- package/Libraries/Alert/Alert.js +3 -0
- package/Libraries/Alert/Alert.windows.js +3 -0
- package/Libraries/Animated/AnimatedEvent.js +1 -1
- package/Libraries/Animated/AnimatedImplementation.js +7 -7
- package/Libraries/Animated/NativeAnimatedAllowlist.js +111 -0
- package/Libraries/Animated/animations/Animation.js +11 -1
- package/Libraries/Animated/animations/DecayAnimation.js +1 -1
- package/Libraries/Animated/animations/SpringAnimation.js +1 -1
- package/Libraries/Animated/animations/TimingAnimation.js +2 -1
- package/Libraries/Animated/components/AnimatedScrollView.js +3 -2
- package/Libraries/Animated/createAnimatedComponent.js +10 -9
- package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +3 -2
- package/Libraries/Animated/nodes/AnimatedNode.js +42 -33
- package/Libraries/Animated/nodes/AnimatedObject.js +56 -50
- package/Libraries/Animated/nodes/AnimatedProps.js +77 -40
- package/Libraries/Animated/nodes/AnimatedStyle.js +103 -59
- package/Libraries/Animated/nodes/AnimatedTracking.js +1 -1
- package/Libraries/Animated/nodes/AnimatedTransform.js +102 -67
- package/Libraries/Animated/nodes/AnimatedValue.js +2 -1
- package/Libraries/Animated/nodes/AnimatedWithChildren.js +21 -22
- package/Libraries/Animated/useAnimatedProps.js +142 -7
- package/Libraries/BatchedBridge/NativeModules.js +2 -0
- package/Libraries/Blob/FileReader.js +1 -1
- package/Libraries/Blob/URL.js +2 -62
- package/Libraries/Blob/URLSearchParams.js +71 -0
- package/Libraries/Components/Button.windows.js +0 -1
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -1
- package/Libraries/Components/Keyboard/KeyboardExt.js.map +1 -1
- package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +1 -1
- package/Libraries/Components/ScrollView/ScrollView.js +131 -169
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
- package/Libraries/Components/StatusBar/StatusBar.js +3 -1
- package/Libraries/Components/TextInput/TextInput.d.ts +32 -2
- package/Libraries/Components/TextInput/TextInput.js +230 -94
- package/Libraries/Components/TextInput/TextInput.windows.js +230 -105
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +22 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.js +2 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.windows.js +2 -0
- package/Libraries/Components/View/View.windows.js +32 -30
- package/Libraries/Components/View/ViewAccessibility.d.ts +15 -0
- package/Libraries/Components/View/ViewNativeComponent.js +0 -1
- package/Libraries/Components/View/ViewPropTypes.js +14 -0
- package/Libraries/Components/View/ViewPropTypes.windows.js +14 -0
- package/Libraries/Core/ExceptionsManager.js +2 -0
- package/Libraries/Core/InitializeCore.js +3 -1
- package/Libraries/Core/ReactFiberErrorDialog.js +3 -0
- package/Libraries/Core/ReactNativeVersion.js +4 -4
- package/Libraries/Core/setUpErrorHandling.js +7 -1
- package/Libraries/Core/setUpGlobals.js +1 -0
- package/Libraries/Core/setUpReactRefresh.js +0 -4
- package/Libraries/Image/AssetSourceResolver.js +28 -1
- package/Libraries/Image/AssetSourceResolver.windows.js +28 -1
- package/Libraries/Image/Image.android.js +9 -14
- package/Libraries/Image/Image.ios.js +11 -22
- package/Libraries/Image/Image.windows.js +11 -22
- package/Libraries/Image/ImageBackground.js +1 -8
- package/Libraries/Image/ImageUtils.js +9 -9
- package/Libraries/Image/ImageViewNativeComponent.js +1 -0
- package/Libraries/Inspector/Inspector.js +3 -2
- package/Libraries/Inspector/InspectorPanel.js +16 -10
- package/Libraries/Inspector/NetworkOverlay.js +1 -1
- package/Libraries/Interaction/TaskQueue.js +1 -0
- package/Libraries/Lists/FlatList.js +1 -1
- package/Libraries/Lists/SectionList.js +2 -2
- package/Libraries/Lists/SectionListModern.js +3 -3
- package/Libraries/LogBox/Data/LogBoxData.js +24 -3
- package/Libraries/LogBox/LogBoxNotificationContainer.js +3 -2
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +9 -8
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.windows.js +9 -8
- package/Libraries/Modal/Modal.js +0 -1
- package/Libraries/NativeComponent/BaseViewConfig.android.js +8 -0
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +7 -0
- package/Libraries/NativeComponent/BaseViewConfig.windows.js +7 -0
- package/Libraries/NativeComponent/NativeComponentRegistry.js +22 -22
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +0 -21
- package/Libraries/Network/XMLHttpRequest.js +4 -2
- package/Libraries/ReactNative/AppContainer-dev.js +1 -5
- package/Libraries/ReactNative/AppContainer-prod.js +1 -5
- package/Libraries/ReactNative/AppContainer.js +1 -2
- package/Libraries/ReactNative/AppRegistry.d.ts +0 -4
- package/Libraries/ReactNative/AppRegistry.js +1 -7
- package/Libraries/ReactNative/BridgelessUIManager.js +1 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +1 -1
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +5 -5
- package/Libraries/ReactNative/RendererImplementation.js +26 -4
- package/Libraries/ReactNative/getNativeComponentAttributes.js +8 -0
- package/Libraries/ReactNative/renderApplication.js +1 -3
- package/Libraries/Renderer/shims/ReactNativeTypes.js +11 -4
- package/Libraries/StyleSheet/StyleSheet.js +1 -1
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +74 -15
- package/Libraries/StyleSheet/StyleSheetTypes.js +60 -5
- package/Libraries/StyleSheet/processBackgroundImage.js +384 -0
- package/Libraries/StyleSheet/processBoxShadow.js +211 -0
- package/Libraries/StyleSheet/processFilter.js +231 -42
- package/Libraries/Text/Text.js +394 -196
- package/Libraries/Text/Text.windows.js +476 -300
- package/Libraries/Text/TextNativeComponent.js +2 -1
- package/Libraries/TurboModule/TurboModuleRegistry.js +13 -50
- package/Libraries/Types/CodegenTypes.js +3 -1
- package/Libraries/Utilities/Appearance.js +108 -84
- package/Libraries/Utilities/DevLoadingView.js +2 -4
- package/Libraries/Utilities/HMRClient.js +2 -1
- package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
- package/Libraries/Utilities/createPerformanceLogger.js +0 -9
- package/Libraries/Utilities/stringifyViewConfig.js +22 -0
- package/Libraries/Utilities/useColorScheme.js +3 -3
- package/Libraries/WebSocket/WebSocket.js +1 -1
- package/Libraries/promiseRejectionTrackingOptions.js +1 -1
- package/Libraries/vendor/emitter/EventEmitter.js +6 -5
- package/Microsoft.ReactNative/ComponentView.idl +11 -0
- package/Microsoft.ReactNative/Composition.Input.idl +1 -0
- package/Microsoft.ReactNative/CompositionSwitcher.idl +3 -0
- package/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.cpp +9 -9
- package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.cpp +9 -9
- package/Microsoft.ReactNative/Fabric/ComponentView.cpp +7 -9
- package/Microsoft.ReactNative/Fabric/ComponentView.h +5 -6
- package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.cpp +4 -0
- package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.h +1 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +44 -13
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +42 -5
- package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.cpp +1 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +81 -63
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +2 -3
- package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.cpp +8 -6
- package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.h +1 -2
- package/Microsoft.ReactNative/Fabric/Composition/FocusManager.cpp +20 -6
- package/Microsoft.ReactNative/Fabric/Composition/FocusManager.h +13 -6
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +2 -3
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +1 -2
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +72 -54
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +14 -4
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +26 -8
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +5 -2
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +18 -7
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +1 -2
- package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.cpp +6 -6
- package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.h +1 -2
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +97 -140
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +8 -4
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +18 -11
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h +5 -4
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp +0 -13
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h +0 -3
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +29 -4
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +2 -0
- package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.cpp +1 -2
- package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.h +1 -2
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +28 -12
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/HostPlatformColor.h +33 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.cpp +26 -9
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.h +10 -4
- package/Microsoft.ReactNative/IReactModuleBuilder.cpp +5 -0
- package/Microsoft.ReactNative/IReactModuleBuilder.h +1 -0
- package/Microsoft.ReactNative/IReactModuleBuilder.idl +9 -0
- package/Microsoft.ReactNative/IReactViewComponentBuilder.idl +8 -1
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +2 -0
- package/Microsoft.ReactNative/Modules/AlertModule.cpp +3 -1
- package/Microsoft.ReactNative/Modules/AppearanceModule.cpp +1 -1
- package/Microsoft.ReactNative/Modules/AppearanceModule.h +7 -1
- package/Microsoft.ReactNative/Modules/DevSettingsModule.cpp +3 -3
- package/Microsoft.ReactNative/Modules/DevSettingsModule.h +1 -1
- package/Microsoft.ReactNative/Modules/LinkingManagerModule.cpp +2 -2
- package/Microsoft.ReactNative/Modules/LinkingManagerModule.h +1 -1
- package/Microsoft.ReactNative/Modules/LogBoxModule.cpp +9 -0
- package/Microsoft.ReactNative/Modules/LogBoxModule.h +2 -0
- package/Microsoft.ReactNative/Modules/SampleTurboModule.cpp +121 -0
- package/Microsoft.ReactNative/Modules/SampleTurboModule.h +90 -0
- package/Microsoft.ReactNative/ReactHost/MsoReactContext.cpp +0 -7
- package/Microsoft.ReactNative/ReactHost/MsoReactContext.h +0 -5
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +5 -1
- package/Microsoft.ReactNative/ReactInstanceSettingsBuilder.cpp +59 -0
- package/Microsoft.ReactNative/ReactInstanceSettingsBuilder.h +23 -0
- package/Microsoft.ReactNative/ReactNativeAppBuilder.cpp +179 -0
- package/Microsoft.ReactNative/ReactNativeAppBuilder.h +35 -0
- package/Microsoft.ReactNative/ReactNativeAppBuilder.idl +69 -0
- package/Microsoft.ReactNative/ReactNativeIsland.idl +2 -0
- package/Microsoft.ReactNative/ReactNativeWin32App.cpp +82 -0
- package/Microsoft.ReactNative/ReactNativeWin32App.h +38 -0
- package/Microsoft.ReactNative/TurboModulesProvider.cpp +45 -0
- package/Microsoft.ReactNative/Views/DynamicAutomationPeer.cpp +2 -1
- package/Microsoft.ReactNative/Views/FlyoutViewManager.cpp +25 -16
- package/Microsoft.ReactNative/packages.fabric.lock.json +159 -0
- package/Microsoft.ReactNative/packages.lock.json +11 -12
- package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems +3 -4
- package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters +3 -0
- package/Microsoft.ReactNative.Cxx/ModuleRegistration.cpp +2 -2
- package/Microsoft.ReactNative.Cxx/ModuleRegistration.h +62 -4
- package/Microsoft.ReactNative.Cxx/NativeModules.h +131 -14
- package/Microsoft.ReactNative.Managed/packages.lock.json +9 -9
- package/Microsoft.ReactNative.Managed.CodeGen/ReactNativeNames.cs +10 -2
- package/PropertySheets/Autolink.props +1 -1
- package/PropertySheets/Bundle.props +1 -1
- package/PropertySheets/Codegen.props +1 -1
- package/PropertySheets/Generated/PackageVersion.g.props +4 -4
- package/PropertySheets/NuGet.LockFile.props +18 -0
- package/README.md +29 -29
- package/ReactCommon/ReactCommon.vcxproj +5 -1
- package/ReactCommon/ReactCommon.vcxproj.filters +11 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.cpp +2 -7
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp +441 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.h +266 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/Utf8.h +56 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Base.h +3 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Bridging.h +2 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/CallbackWrapper.h +1 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Convert.h +172 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/EventEmitter.h +4 -5
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Function.h +2 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h +1 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModuleUtils.h +3 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/scrollview/ScrollViewProps.cpp +9 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/LayoutableShadowNode.cpp +363 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/JSRuntimeFactory.h +22 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +118 -51
- package/ReactCommon/packages.lock.json +2 -2
- package/Scripts/NuGetRestoreForceEvaluateAllSolutions.ps1 +8 -1
- package/Scripts/Tfs/Layout-MSRN-Headers.ps1 +2 -2
- package/Shared/Modules/WebSocketModule.cpp +1 -2
- package/Shared/Networking/WinRTWebSocketResource.cpp +4 -1
- package/Shared/Shared.vcxitems +38 -2
- package/Shared/Shared.vcxitems.filters +6 -1
- package/Shared/TurboModuleManager.cpp +0 -3
- package/codegen/NativeLinkingManagerSpec.g.h +3 -3
- package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +198 -54
- package/codegen/NativeSampleTurboModuleSpec.g.h +35 -0
- package/codegen/rnwcoreJSI-generated.cpp +245 -101
- package/codegen/rnwcoreJSI.h +847 -548
- package/index.js +3 -1
- package/index.windows.js +3 -1
- package/jest/mockComponent.js +4 -1
- package/jest/mockModal.js +1 -3
- package/jest/mockScrollView.js +1 -1
- package/jest/renderer.js +2 -2
- package/jest/setup.js +16 -13
- package/package.json +26 -25
- package/src/private/animated/NativeAnimatedHelper.js +438 -0
- package/src/private/animated/NativeAnimatedValidation.js +64 -0
- package/src/private/components/HScrollViewNativeComponents.js +56 -0
- package/src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE.js +27 -0
- package/src/private/components/VScrollViewNativeComponents.js +48 -0
- package/src/private/components/useSyncOnScroll.js +48 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +166 -16
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +29 -5
- package/src/private/fusebox/FuseboxSessionObserver.js +42 -0
- package/{Libraries/Core → src/private/renderer/errorhandling}/ErrorHandlers.js +14 -4
- package/src/private/setup/setUpDOM.js +28 -0
- package/src/private/setup/setUpIntersectionObserver.js +27 -0
- package/src/private/setup/setUpMutationObserver.js +26 -0
- package/src/private/setup/setUpPerformanceObserver.js +64 -0
- package/src/private/specs/modules/NativeAppearance.js +3 -3
- package/src/private/specs/modules/NativeLinkingManager.js +1 -1
- package/src/private/specs/modules/NativePlatformConstantsWindows.js +7 -0
- package/src/private/specs/modules/NativeSampleTurboModule.js +14 -1
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +6 -4
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserver.js +5 -3
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverEntry.js +3 -3
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverManager.js +14 -17
- package/src/private/{specs/modules → webapis/intersectionobserver/specs}/NativeIntersectionObserver.js +2 -2
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver/specs}/__mocks__/NativeIntersectionObserver.js +4 -4
- package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserver.js +5 -3
- package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserverManager.js +24 -15
- package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationRecord.js +4 -6
- package/src/private/{specs/modules → webapis/mutationobserver/specs}/NativeMutationObserver.js +2 -2
- package/{Libraries/MutationObserver → src/private/webapis/mutationobserver/specs}/__mocks__/NativeMutationObserver.js +5 -5
- package/src/private/webapis/performance/{EventCounts.js → EventTiming.js} +65 -3
- package/src/private/webapis/performance/LongTasks.js +39 -0
- package/src/private/webapis/performance/Performance.js +22 -9
- package/src/private/webapis/performance/PerformanceEntry.js +36 -18
- package/src/private/webapis/performance/PerformanceObserver.js +29 -43
- package/src/private/webapis/performance/RawPerformanceEntry.js +24 -1
- package/src/private/webapis/performance/UserTiming.js +17 -12
- package/src/private/webapis/performance/specs/NativePerformanceObserver.js +1 -1
- package/template/cpp-app/src/AutolinkedNativeModules.g.cpp +1 -1
- package/template/cpp-app/src/AutolinkedNativeModules.g.h +1 -1
- package/template/cs-app/src/AutolinkedNativeModules.g.cs +1 -1
- package/template/index.windows.bundle +1 -1
- package/template/metro.config.js +2 -2
- package/template/shared-app/src/AutolinkedNativeModules.g.props +1 -1
- package/template/shared-app/src/AutolinkedNativeModules.g.targets +1 -1
- package/templates/cpp-app/metro.config.js +2 -2
- package/templates/cpp-app/template.config.js +5 -5
- package/templates/cpp-app/windows/MyApp/AutolinkedNativeModules.g.cpp +1 -1
- package/templates/cpp-app/windows/MyApp/AutolinkedNativeModules.g.h +1 -1
- package/templates/cpp-app/windows/MyApp/MyApp.cpp +2 -0
- package/templates/cpp-app/windows/MyApp/MyApp.vcxproj +1 -1
- package/templates/cpp-lib/example/metro.config.js +2 -2
- package/templates/cpp-lib/template.config.js +3 -3
- package/templates/cpp-lib/windows/MyLib/MyLib.h +3 -3
- package/templates/cpp-lib/windows/MyLib/MyLib.vcxproj +1 -1
- package/types/experimental.d.ts +20 -1
- package/Libraries/Animated/NativeAnimatedHelper.js +0 -615
- package/Libraries/Core/setUpIntersectionObserver.js +0 -16
- package/Libraries/Core/setUpMutationObserver.js +0 -16
- package/Libraries/Core/setUpPerformanceObserver.js +0 -18
- package/Libraries/IntersectionObserver/NativeIntersectionObserver.js +0 -13
- package/Libraries/MutationObserver/NativeMutationObserver.js +0 -13
- package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +0 -135
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/algorithm/CalculateLayout.cpp +0 -2396
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/config/Config.cpp +0 -136
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/config/Config.h +0 -92
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/LayoutResults.cpp +0 -48
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/LayoutResults.h +0 -122
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/Node.cpp +0 -388
- package/src/private/core/setUpDOM.js +0 -18
- package/src/private/webapis/performance/PerformanceEventTiming.js +0 -55
- /package/src/private/{core → styles}/composeStyles.js +0 -0
package/codegen/rnwcoreJSI.h
CHANGED
|
@@ -21,29 +21,53 @@ protected:
|
|
|
21
21
|
|
|
22
22
|
public:
|
|
23
23
|
virtual bool commonTestFlag(jsi::Runtime &rt) = 0;
|
|
24
|
-
virtual bool allowCollapsableChildren(jsi::Runtime &rt) = 0;
|
|
25
24
|
virtual bool allowRecursiveCommitsWithSynchronousMountOnAndroid(jsi::Runtime &rt) = 0;
|
|
26
25
|
virtual bool batchRenderingUpdatesInEventLoop(jsi::Runtime &rt) = 0;
|
|
26
|
+
virtual bool completeReactInstanceCreationOnBgThreadOnAndroid(jsi::Runtime &rt) = 0;
|
|
27
27
|
virtual bool destroyFabricSurfacesInReactInstanceManager(jsi::Runtime &rt) = 0;
|
|
28
|
-
virtual bool
|
|
28
|
+
virtual bool enableAlignItemsBaselineOnFabricIOS(jsi::Runtime &rt) = 0;
|
|
29
|
+
virtual bool enableAndroidMixBlendModeProp(jsi::Runtime &rt) = 0;
|
|
30
|
+
virtual bool enableBackgroundStyleApplicator(jsi::Runtime &rt) = 0;
|
|
29
31
|
virtual bool enableCleanTextInputYogaNode(jsi::Runtime &rt) = 0;
|
|
32
|
+
virtual bool enableEagerRootViewAttachment(jsi::Runtime &rt) = 0;
|
|
33
|
+
virtual bool enableEventEmitterRetentionDuringGesturesOnAndroid(jsi::Runtime &rt) = 0;
|
|
34
|
+
virtual bool enableFabricLogs(jsi::Runtime &rt) = 0;
|
|
35
|
+
virtual bool enableFabricRendererExclusively(jsi::Runtime &rt) = 0;
|
|
30
36
|
virtual bool enableGranularShadowTreeStateReconciliation(jsi::Runtime &rt) = 0;
|
|
37
|
+
virtual bool enableIOSViewClipToPaddingBox(jsi::Runtime &rt) = 0;
|
|
38
|
+
virtual bool enableLayoutAnimationsOnIOS(jsi::Runtime &rt) = 0;
|
|
39
|
+
virtual bool enableLongTaskAPI(jsi::Runtime &rt) = 0;
|
|
31
40
|
virtual bool enableMicrotasks(jsi::Runtime &rt) = 0;
|
|
41
|
+
virtual bool enablePropsUpdateReconciliationAndroid(jsi::Runtime &rt) = 0;
|
|
42
|
+
virtual bool enableReportEventPaintTime(jsi::Runtime &rt) = 0;
|
|
32
43
|
virtual bool enableSynchronousStateUpdates(jsi::Runtime &rt) = 0;
|
|
33
44
|
virtual bool enableUIConsistency(jsi::Runtime &rt) = 0;
|
|
34
|
-
virtual bool
|
|
45
|
+
virtual bool enableViewRecycling(jsi::Runtime &rt) = 0;
|
|
46
|
+
virtual bool excludeYogaFromRawProps(jsi::Runtime &rt) = 0;
|
|
47
|
+
virtual bool fetchImagesInViewPreallocation(jsi::Runtime &rt) = 0;
|
|
48
|
+
virtual bool fixIncorrectScrollViewStateUpdateOnAndroid(jsi::Runtime &rt) = 0;
|
|
49
|
+
virtual bool fixMappingOfEventPrioritiesBetweenFabricAndReact(jsi::Runtime &rt) = 0;
|
|
50
|
+
virtual bool fixMissedFabricStateUpdatesOnAndroid(jsi::Runtime &rt) = 0;
|
|
51
|
+
virtual bool fixMountingCoordinatorReportedPendingTransactionsOnAndroid(jsi::Runtime &rt) = 0;
|
|
35
52
|
virtual bool forceBatchingMountItemsOnAndroid(jsi::Runtime &rt) = 0;
|
|
36
53
|
virtual bool fuseboxEnabledDebug(jsi::Runtime &rt) = 0;
|
|
37
54
|
virtual bool fuseboxEnabledRelease(jsi::Runtime &rt) = 0;
|
|
55
|
+
virtual bool initEagerTurboModulesOnNativeModulesQueueAndroid(jsi::Runtime &rt) = 0;
|
|
38
56
|
virtual bool lazyAnimationCallbacks(jsi::Runtime &rt) = 0;
|
|
39
|
-
virtual bool
|
|
57
|
+
virtual bool loadVectorDrawablesOnImages(jsi::Runtime &rt) = 0;
|
|
40
58
|
virtual bool setAndroidLayoutDirection(jsi::Runtime &rt) = 0;
|
|
59
|
+
virtual bool traceTurboModulePromiseRejectionsOnAndroid(jsi::Runtime &rt) = 0;
|
|
60
|
+
virtual bool useFabricInterop(jsi::Runtime &rt) = 0;
|
|
41
61
|
virtual bool useImmediateExecutorInAndroidBridgeless(jsi::Runtime &rt) = 0;
|
|
42
62
|
virtual bool useModernRuntimeScheduler(jsi::Runtime &rt) = 0;
|
|
43
63
|
virtual bool useNativeViewConfigsInBridgelessMode(jsi::Runtime &rt) = 0;
|
|
64
|
+
virtual bool useNewReactImageViewBackgroundDrawing(jsi::Runtime &rt) = 0;
|
|
65
|
+
virtual bool useOptimisedViewPreallocationOnAndroid(jsi::Runtime &rt) = 0;
|
|
66
|
+
virtual bool useOptimizedEventBatchingOnAndroid(jsi::Runtime &rt) = 0;
|
|
44
67
|
virtual bool useRuntimeShadowNodeReferenceUpdate(jsi::Runtime &rt) = 0;
|
|
45
68
|
virtual bool useRuntimeShadowNodeReferenceUpdateOnLayout(jsi::Runtime &rt) = 0;
|
|
46
69
|
virtual bool useStateAlignmentMechanism(jsi::Runtime &rt) = 0;
|
|
70
|
+
virtual bool useTurboModuleInterop(jsi::Runtime &rt) = 0;
|
|
47
71
|
|
|
48
72
|
};
|
|
49
73
|
|
|
@@ -78,14 +102,6 @@ private:
|
|
|
78
102
|
return bridging::callFromJs<bool>(
|
|
79
103
|
rt, &T::commonTestFlag, jsInvoker_, instance_);
|
|
80
104
|
}
|
|
81
|
-
bool allowCollapsableChildren(jsi::Runtime &rt) override {
|
|
82
|
-
static_assert(
|
|
83
|
-
bridging::getParameterCount(&T::allowCollapsableChildren) == 1,
|
|
84
|
-
"Expected allowCollapsableChildren(...) to have 1 parameters");
|
|
85
|
-
|
|
86
|
-
return bridging::callFromJs<bool>(
|
|
87
|
-
rt, &T::allowCollapsableChildren, jsInvoker_, instance_);
|
|
88
|
-
}
|
|
89
105
|
bool allowRecursiveCommitsWithSynchronousMountOnAndroid(jsi::Runtime &rt) override {
|
|
90
106
|
static_assert(
|
|
91
107
|
bridging::getParameterCount(&T::allowRecursiveCommitsWithSynchronousMountOnAndroid) == 1,
|
|
@@ -102,6 +118,14 @@ private:
|
|
|
102
118
|
return bridging::callFromJs<bool>(
|
|
103
119
|
rt, &T::batchRenderingUpdatesInEventLoop, jsInvoker_, instance_);
|
|
104
120
|
}
|
|
121
|
+
bool completeReactInstanceCreationOnBgThreadOnAndroid(jsi::Runtime &rt) override {
|
|
122
|
+
static_assert(
|
|
123
|
+
bridging::getParameterCount(&T::completeReactInstanceCreationOnBgThreadOnAndroid) == 1,
|
|
124
|
+
"Expected completeReactInstanceCreationOnBgThreadOnAndroid(...) to have 1 parameters");
|
|
125
|
+
|
|
126
|
+
return bridging::callFromJs<bool>(
|
|
127
|
+
rt, &T::completeReactInstanceCreationOnBgThreadOnAndroid, jsInvoker_, instance_);
|
|
128
|
+
}
|
|
105
129
|
bool destroyFabricSurfacesInReactInstanceManager(jsi::Runtime &rt) override {
|
|
106
130
|
static_assert(
|
|
107
131
|
bridging::getParameterCount(&T::destroyFabricSurfacesInReactInstanceManager) == 1,
|
|
@@ -110,13 +134,29 @@ private:
|
|
|
110
134
|
return bridging::callFromJs<bool>(
|
|
111
135
|
rt, &T::destroyFabricSurfacesInReactInstanceManager, jsInvoker_, instance_);
|
|
112
136
|
}
|
|
113
|
-
bool
|
|
137
|
+
bool enableAlignItemsBaselineOnFabricIOS(jsi::Runtime &rt) override {
|
|
138
|
+
static_assert(
|
|
139
|
+
bridging::getParameterCount(&T::enableAlignItemsBaselineOnFabricIOS) == 1,
|
|
140
|
+
"Expected enableAlignItemsBaselineOnFabricIOS(...) to have 1 parameters");
|
|
141
|
+
|
|
142
|
+
return bridging::callFromJs<bool>(
|
|
143
|
+
rt, &T::enableAlignItemsBaselineOnFabricIOS, jsInvoker_, instance_);
|
|
144
|
+
}
|
|
145
|
+
bool enableAndroidMixBlendModeProp(jsi::Runtime &rt) override {
|
|
146
|
+
static_assert(
|
|
147
|
+
bridging::getParameterCount(&T::enableAndroidMixBlendModeProp) == 1,
|
|
148
|
+
"Expected enableAndroidMixBlendModeProp(...) to have 1 parameters");
|
|
149
|
+
|
|
150
|
+
return bridging::callFromJs<bool>(
|
|
151
|
+
rt, &T::enableAndroidMixBlendModeProp, jsInvoker_, instance_);
|
|
152
|
+
}
|
|
153
|
+
bool enableBackgroundStyleApplicator(jsi::Runtime &rt) override {
|
|
114
154
|
static_assert(
|
|
115
|
-
bridging::getParameterCount(&T::
|
|
116
|
-
"Expected
|
|
155
|
+
bridging::getParameterCount(&T::enableBackgroundStyleApplicator) == 1,
|
|
156
|
+
"Expected enableBackgroundStyleApplicator(...) to have 1 parameters");
|
|
117
157
|
|
|
118
158
|
return bridging::callFromJs<bool>(
|
|
119
|
-
rt, &T::
|
|
159
|
+
rt, &T::enableBackgroundStyleApplicator, jsInvoker_, instance_);
|
|
120
160
|
}
|
|
121
161
|
bool enableCleanTextInputYogaNode(jsi::Runtime &rt) override {
|
|
122
162
|
static_assert(
|
|
@@ -126,6 +166,38 @@ private:
|
|
|
126
166
|
return bridging::callFromJs<bool>(
|
|
127
167
|
rt, &T::enableCleanTextInputYogaNode, jsInvoker_, instance_);
|
|
128
168
|
}
|
|
169
|
+
bool enableEagerRootViewAttachment(jsi::Runtime &rt) override {
|
|
170
|
+
static_assert(
|
|
171
|
+
bridging::getParameterCount(&T::enableEagerRootViewAttachment) == 1,
|
|
172
|
+
"Expected enableEagerRootViewAttachment(...) to have 1 parameters");
|
|
173
|
+
|
|
174
|
+
return bridging::callFromJs<bool>(
|
|
175
|
+
rt, &T::enableEagerRootViewAttachment, jsInvoker_, instance_);
|
|
176
|
+
}
|
|
177
|
+
bool enableEventEmitterRetentionDuringGesturesOnAndroid(jsi::Runtime &rt) override {
|
|
178
|
+
static_assert(
|
|
179
|
+
bridging::getParameterCount(&T::enableEventEmitterRetentionDuringGesturesOnAndroid) == 1,
|
|
180
|
+
"Expected enableEventEmitterRetentionDuringGesturesOnAndroid(...) to have 1 parameters");
|
|
181
|
+
|
|
182
|
+
return bridging::callFromJs<bool>(
|
|
183
|
+
rt, &T::enableEventEmitterRetentionDuringGesturesOnAndroid, jsInvoker_, instance_);
|
|
184
|
+
}
|
|
185
|
+
bool enableFabricLogs(jsi::Runtime &rt) override {
|
|
186
|
+
static_assert(
|
|
187
|
+
bridging::getParameterCount(&T::enableFabricLogs) == 1,
|
|
188
|
+
"Expected enableFabricLogs(...) to have 1 parameters");
|
|
189
|
+
|
|
190
|
+
return bridging::callFromJs<bool>(
|
|
191
|
+
rt, &T::enableFabricLogs, jsInvoker_, instance_);
|
|
192
|
+
}
|
|
193
|
+
bool enableFabricRendererExclusively(jsi::Runtime &rt) override {
|
|
194
|
+
static_assert(
|
|
195
|
+
bridging::getParameterCount(&T::enableFabricRendererExclusively) == 1,
|
|
196
|
+
"Expected enableFabricRendererExclusively(...) to have 1 parameters");
|
|
197
|
+
|
|
198
|
+
return bridging::callFromJs<bool>(
|
|
199
|
+
rt, &T::enableFabricRendererExclusively, jsInvoker_, instance_);
|
|
200
|
+
}
|
|
129
201
|
bool enableGranularShadowTreeStateReconciliation(jsi::Runtime &rt) override {
|
|
130
202
|
static_assert(
|
|
131
203
|
bridging::getParameterCount(&T::enableGranularShadowTreeStateReconciliation) == 1,
|
|
@@ -134,6 +206,30 @@ private:
|
|
|
134
206
|
return bridging::callFromJs<bool>(
|
|
135
207
|
rt, &T::enableGranularShadowTreeStateReconciliation, jsInvoker_, instance_);
|
|
136
208
|
}
|
|
209
|
+
bool enableIOSViewClipToPaddingBox(jsi::Runtime &rt) override {
|
|
210
|
+
static_assert(
|
|
211
|
+
bridging::getParameterCount(&T::enableIOSViewClipToPaddingBox) == 1,
|
|
212
|
+
"Expected enableIOSViewClipToPaddingBox(...) to have 1 parameters");
|
|
213
|
+
|
|
214
|
+
return bridging::callFromJs<bool>(
|
|
215
|
+
rt, &T::enableIOSViewClipToPaddingBox, jsInvoker_, instance_);
|
|
216
|
+
}
|
|
217
|
+
bool enableLayoutAnimationsOnIOS(jsi::Runtime &rt) override {
|
|
218
|
+
static_assert(
|
|
219
|
+
bridging::getParameterCount(&T::enableLayoutAnimationsOnIOS) == 1,
|
|
220
|
+
"Expected enableLayoutAnimationsOnIOS(...) to have 1 parameters");
|
|
221
|
+
|
|
222
|
+
return bridging::callFromJs<bool>(
|
|
223
|
+
rt, &T::enableLayoutAnimationsOnIOS, jsInvoker_, instance_);
|
|
224
|
+
}
|
|
225
|
+
bool enableLongTaskAPI(jsi::Runtime &rt) override {
|
|
226
|
+
static_assert(
|
|
227
|
+
bridging::getParameterCount(&T::enableLongTaskAPI) == 1,
|
|
228
|
+
"Expected enableLongTaskAPI(...) to have 1 parameters");
|
|
229
|
+
|
|
230
|
+
return bridging::callFromJs<bool>(
|
|
231
|
+
rt, &T::enableLongTaskAPI, jsInvoker_, instance_);
|
|
232
|
+
}
|
|
137
233
|
bool enableMicrotasks(jsi::Runtime &rt) override {
|
|
138
234
|
static_assert(
|
|
139
235
|
bridging::getParameterCount(&T::enableMicrotasks) == 1,
|
|
@@ -142,6 +238,22 @@ private:
|
|
|
142
238
|
return bridging::callFromJs<bool>(
|
|
143
239
|
rt, &T::enableMicrotasks, jsInvoker_, instance_);
|
|
144
240
|
}
|
|
241
|
+
bool enablePropsUpdateReconciliationAndroid(jsi::Runtime &rt) override {
|
|
242
|
+
static_assert(
|
|
243
|
+
bridging::getParameterCount(&T::enablePropsUpdateReconciliationAndroid) == 1,
|
|
244
|
+
"Expected enablePropsUpdateReconciliationAndroid(...) to have 1 parameters");
|
|
245
|
+
|
|
246
|
+
return bridging::callFromJs<bool>(
|
|
247
|
+
rt, &T::enablePropsUpdateReconciliationAndroid, jsInvoker_, instance_);
|
|
248
|
+
}
|
|
249
|
+
bool enableReportEventPaintTime(jsi::Runtime &rt) override {
|
|
250
|
+
static_assert(
|
|
251
|
+
bridging::getParameterCount(&T::enableReportEventPaintTime) == 1,
|
|
252
|
+
"Expected enableReportEventPaintTime(...) to have 1 parameters");
|
|
253
|
+
|
|
254
|
+
return bridging::callFromJs<bool>(
|
|
255
|
+
rt, &T::enableReportEventPaintTime, jsInvoker_, instance_);
|
|
256
|
+
}
|
|
145
257
|
bool enableSynchronousStateUpdates(jsi::Runtime &rt) override {
|
|
146
258
|
static_assert(
|
|
147
259
|
bridging::getParameterCount(&T::enableSynchronousStateUpdates) == 1,
|
|
@@ -158,13 +270,61 @@ private:
|
|
|
158
270
|
return bridging::callFromJs<bool>(
|
|
159
271
|
rt, &T::enableUIConsistency, jsInvoker_, instance_);
|
|
160
272
|
}
|
|
161
|
-
bool
|
|
273
|
+
bool enableViewRecycling(jsi::Runtime &rt) override {
|
|
274
|
+
static_assert(
|
|
275
|
+
bridging::getParameterCount(&T::enableViewRecycling) == 1,
|
|
276
|
+
"Expected enableViewRecycling(...) to have 1 parameters");
|
|
277
|
+
|
|
278
|
+
return bridging::callFromJs<bool>(
|
|
279
|
+
rt, &T::enableViewRecycling, jsInvoker_, instance_);
|
|
280
|
+
}
|
|
281
|
+
bool excludeYogaFromRawProps(jsi::Runtime &rt) override {
|
|
282
|
+
static_assert(
|
|
283
|
+
bridging::getParameterCount(&T::excludeYogaFromRawProps) == 1,
|
|
284
|
+
"Expected excludeYogaFromRawProps(...) to have 1 parameters");
|
|
285
|
+
|
|
286
|
+
return bridging::callFromJs<bool>(
|
|
287
|
+
rt, &T::excludeYogaFromRawProps, jsInvoker_, instance_);
|
|
288
|
+
}
|
|
289
|
+
bool fetchImagesInViewPreallocation(jsi::Runtime &rt) override {
|
|
290
|
+
static_assert(
|
|
291
|
+
bridging::getParameterCount(&T::fetchImagesInViewPreallocation) == 1,
|
|
292
|
+
"Expected fetchImagesInViewPreallocation(...) to have 1 parameters");
|
|
293
|
+
|
|
294
|
+
return bridging::callFromJs<bool>(
|
|
295
|
+
rt, &T::fetchImagesInViewPreallocation, jsInvoker_, instance_);
|
|
296
|
+
}
|
|
297
|
+
bool fixIncorrectScrollViewStateUpdateOnAndroid(jsi::Runtime &rt) override {
|
|
162
298
|
static_assert(
|
|
163
|
-
bridging::getParameterCount(&T::
|
|
164
|
-
"Expected
|
|
299
|
+
bridging::getParameterCount(&T::fixIncorrectScrollViewStateUpdateOnAndroid) == 1,
|
|
300
|
+
"Expected fixIncorrectScrollViewStateUpdateOnAndroid(...) to have 1 parameters");
|
|
165
301
|
|
|
166
302
|
return bridging::callFromJs<bool>(
|
|
167
|
-
rt, &T::
|
|
303
|
+
rt, &T::fixIncorrectScrollViewStateUpdateOnAndroid, jsInvoker_, instance_);
|
|
304
|
+
}
|
|
305
|
+
bool fixMappingOfEventPrioritiesBetweenFabricAndReact(jsi::Runtime &rt) override {
|
|
306
|
+
static_assert(
|
|
307
|
+
bridging::getParameterCount(&T::fixMappingOfEventPrioritiesBetweenFabricAndReact) == 1,
|
|
308
|
+
"Expected fixMappingOfEventPrioritiesBetweenFabricAndReact(...) to have 1 parameters");
|
|
309
|
+
|
|
310
|
+
return bridging::callFromJs<bool>(
|
|
311
|
+
rt, &T::fixMappingOfEventPrioritiesBetweenFabricAndReact, jsInvoker_, instance_);
|
|
312
|
+
}
|
|
313
|
+
bool fixMissedFabricStateUpdatesOnAndroid(jsi::Runtime &rt) override {
|
|
314
|
+
static_assert(
|
|
315
|
+
bridging::getParameterCount(&T::fixMissedFabricStateUpdatesOnAndroid) == 1,
|
|
316
|
+
"Expected fixMissedFabricStateUpdatesOnAndroid(...) to have 1 parameters");
|
|
317
|
+
|
|
318
|
+
return bridging::callFromJs<bool>(
|
|
319
|
+
rt, &T::fixMissedFabricStateUpdatesOnAndroid, jsInvoker_, instance_);
|
|
320
|
+
}
|
|
321
|
+
bool fixMountingCoordinatorReportedPendingTransactionsOnAndroid(jsi::Runtime &rt) override {
|
|
322
|
+
static_assert(
|
|
323
|
+
bridging::getParameterCount(&T::fixMountingCoordinatorReportedPendingTransactionsOnAndroid) == 1,
|
|
324
|
+
"Expected fixMountingCoordinatorReportedPendingTransactionsOnAndroid(...) to have 1 parameters");
|
|
325
|
+
|
|
326
|
+
return bridging::callFromJs<bool>(
|
|
327
|
+
rt, &T::fixMountingCoordinatorReportedPendingTransactionsOnAndroid, jsInvoker_, instance_);
|
|
168
328
|
}
|
|
169
329
|
bool forceBatchingMountItemsOnAndroid(jsi::Runtime &rt) override {
|
|
170
330
|
static_assert(
|
|
@@ -190,6 +350,14 @@ private:
|
|
|
190
350
|
return bridging::callFromJs<bool>(
|
|
191
351
|
rt, &T::fuseboxEnabledRelease, jsInvoker_, instance_);
|
|
192
352
|
}
|
|
353
|
+
bool initEagerTurboModulesOnNativeModulesQueueAndroid(jsi::Runtime &rt) override {
|
|
354
|
+
static_assert(
|
|
355
|
+
bridging::getParameterCount(&T::initEagerTurboModulesOnNativeModulesQueueAndroid) == 1,
|
|
356
|
+
"Expected initEagerTurboModulesOnNativeModulesQueueAndroid(...) to have 1 parameters");
|
|
357
|
+
|
|
358
|
+
return bridging::callFromJs<bool>(
|
|
359
|
+
rt, &T::initEagerTurboModulesOnNativeModulesQueueAndroid, jsInvoker_, instance_);
|
|
360
|
+
}
|
|
193
361
|
bool lazyAnimationCallbacks(jsi::Runtime &rt) override {
|
|
194
362
|
static_assert(
|
|
195
363
|
bridging::getParameterCount(&T::lazyAnimationCallbacks) == 1,
|
|
@@ -198,13 +366,13 @@ private:
|
|
|
198
366
|
return bridging::callFromJs<bool>(
|
|
199
367
|
rt, &T::lazyAnimationCallbacks, jsInvoker_, instance_);
|
|
200
368
|
}
|
|
201
|
-
bool
|
|
369
|
+
bool loadVectorDrawablesOnImages(jsi::Runtime &rt) override {
|
|
202
370
|
static_assert(
|
|
203
|
-
bridging::getParameterCount(&T::
|
|
204
|
-
"Expected
|
|
371
|
+
bridging::getParameterCount(&T::loadVectorDrawablesOnImages) == 1,
|
|
372
|
+
"Expected loadVectorDrawablesOnImages(...) to have 1 parameters");
|
|
205
373
|
|
|
206
374
|
return bridging::callFromJs<bool>(
|
|
207
|
-
rt, &T::
|
|
375
|
+
rt, &T::loadVectorDrawablesOnImages, jsInvoker_, instance_);
|
|
208
376
|
}
|
|
209
377
|
bool setAndroidLayoutDirection(jsi::Runtime &rt) override {
|
|
210
378
|
static_assert(
|
|
@@ -214,6 +382,22 @@ private:
|
|
|
214
382
|
return bridging::callFromJs<bool>(
|
|
215
383
|
rt, &T::setAndroidLayoutDirection, jsInvoker_, instance_);
|
|
216
384
|
}
|
|
385
|
+
bool traceTurboModulePromiseRejectionsOnAndroid(jsi::Runtime &rt) override {
|
|
386
|
+
static_assert(
|
|
387
|
+
bridging::getParameterCount(&T::traceTurboModulePromiseRejectionsOnAndroid) == 1,
|
|
388
|
+
"Expected traceTurboModulePromiseRejectionsOnAndroid(...) to have 1 parameters");
|
|
389
|
+
|
|
390
|
+
return bridging::callFromJs<bool>(
|
|
391
|
+
rt, &T::traceTurboModulePromiseRejectionsOnAndroid, jsInvoker_, instance_);
|
|
392
|
+
}
|
|
393
|
+
bool useFabricInterop(jsi::Runtime &rt) override {
|
|
394
|
+
static_assert(
|
|
395
|
+
bridging::getParameterCount(&T::useFabricInterop) == 1,
|
|
396
|
+
"Expected useFabricInterop(...) to have 1 parameters");
|
|
397
|
+
|
|
398
|
+
return bridging::callFromJs<bool>(
|
|
399
|
+
rt, &T::useFabricInterop, jsInvoker_, instance_);
|
|
400
|
+
}
|
|
217
401
|
bool useImmediateExecutorInAndroidBridgeless(jsi::Runtime &rt) override {
|
|
218
402
|
static_assert(
|
|
219
403
|
bridging::getParameterCount(&T::useImmediateExecutorInAndroidBridgeless) == 1,
|
|
@@ -238,6 +422,30 @@ private:
|
|
|
238
422
|
return bridging::callFromJs<bool>(
|
|
239
423
|
rt, &T::useNativeViewConfigsInBridgelessMode, jsInvoker_, instance_);
|
|
240
424
|
}
|
|
425
|
+
bool useNewReactImageViewBackgroundDrawing(jsi::Runtime &rt) override {
|
|
426
|
+
static_assert(
|
|
427
|
+
bridging::getParameterCount(&T::useNewReactImageViewBackgroundDrawing) == 1,
|
|
428
|
+
"Expected useNewReactImageViewBackgroundDrawing(...) to have 1 parameters");
|
|
429
|
+
|
|
430
|
+
return bridging::callFromJs<bool>(
|
|
431
|
+
rt, &T::useNewReactImageViewBackgroundDrawing, jsInvoker_, instance_);
|
|
432
|
+
}
|
|
433
|
+
bool useOptimisedViewPreallocationOnAndroid(jsi::Runtime &rt) override {
|
|
434
|
+
static_assert(
|
|
435
|
+
bridging::getParameterCount(&T::useOptimisedViewPreallocationOnAndroid) == 1,
|
|
436
|
+
"Expected useOptimisedViewPreallocationOnAndroid(...) to have 1 parameters");
|
|
437
|
+
|
|
438
|
+
return bridging::callFromJs<bool>(
|
|
439
|
+
rt, &T::useOptimisedViewPreallocationOnAndroid, jsInvoker_, instance_);
|
|
440
|
+
}
|
|
441
|
+
bool useOptimizedEventBatchingOnAndroid(jsi::Runtime &rt) override {
|
|
442
|
+
static_assert(
|
|
443
|
+
bridging::getParameterCount(&T::useOptimizedEventBatchingOnAndroid) == 1,
|
|
444
|
+
"Expected useOptimizedEventBatchingOnAndroid(...) to have 1 parameters");
|
|
445
|
+
|
|
446
|
+
return bridging::callFromJs<bool>(
|
|
447
|
+
rt, &T::useOptimizedEventBatchingOnAndroid, jsInvoker_, instance_);
|
|
448
|
+
}
|
|
241
449
|
bool useRuntimeShadowNodeReferenceUpdate(jsi::Runtime &rt) override {
|
|
242
450
|
static_assert(
|
|
243
451
|
bridging::getParameterCount(&T::useRuntimeShadowNodeReferenceUpdate) == 1,
|
|
@@ -262,6 +470,14 @@ private:
|
|
|
262
470
|
return bridging::callFromJs<bool>(
|
|
263
471
|
rt, &T::useStateAlignmentMechanism, jsInvoker_, instance_);
|
|
264
472
|
}
|
|
473
|
+
bool useTurboModuleInterop(jsi::Runtime &rt) override {
|
|
474
|
+
static_assert(
|
|
475
|
+
bridging::getParameterCount(&T::useTurboModuleInterop) == 1,
|
|
476
|
+
"Expected useTurboModuleInterop(...) to have 1 parameters");
|
|
477
|
+
|
|
478
|
+
return bridging::callFromJs<bool>(
|
|
479
|
+
rt, &T::useTurboModuleInterop, jsInvoker_, instance_);
|
|
480
|
+
}
|
|
265
481
|
|
|
266
482
|
private:
|
|
267
483
|
friend class NativeReactNativeFeatureFlagsCxxSpec;
|
|
@@ -4391,301 +4607,78 @@ private:
|
|
|
4391
4607
|
};
|
|
4392
4608
|
|
|
4393
4609
|
|
|
4394
|
-
|
|
4395
|
-
|
|
4610
|
+
class JSI_EXPORT NativeJSCHeapCaptureCxxSpecJSI : public TurboModule {
|
|
4611
|
+
protected:
|
|
4612
|
+
NativeJSCHeapCaptureCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
4613
|
+
|
|
4614
|
+
public:
|
|
4615
|
+
virtual void captureComplete(jsi::Runtime &rt, jsi::String path, std::optional<jsi::String> error) = 0;
|
|
4396
4616
|
|
|
4397
|
-
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
|
|
4398
|
-
struct NativeIntersectionObserverNativeIntersectionObserverEntry {
|
|
4399
|
-
P0 intersectionObserverId;
|
|
4400
|
-
P1 targetInstanceHandle;
|
|
4401
|
-
P2 targetRect;
|
|
4402
|
-
P3 rootRect;
|
|
4403
|
-
P4 intersectionRect;
|
|
4404
|
-
P5 isIntersectingAboveThresholds;
|
|
4405
|
-
P6 time;
|
|
4406
|
-
bool operator==(const NativeIntersectionObserverNativeIntersectionObserverEntry &other) const {
|
|
4407
|
-
return intersectionObserverId == other.intersectionObserverId && targetInstanceHandle == other.targetInstanceHandle && targetRect == other.targetRect && rootRect == other.rootRect && intersectionRect == other.intersectionRect && isIntersectingAboveThresholds == other.isIntersectingAboveThresholds && time == other.time;
|
|
4408
|
-
}
|
|
4409
4617
|
};
|
|
4410
4618
|
|
|
4411
4619
|
template <typename T>
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
jsi::Runtime &rt,
|
|
4417
|
-
const jsi::Object &value,
|
|
4418
|
-
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
4419
|
-
T result{
|
|
4420
|
-
bridging::fromJs<decltype(types.intersectionObserverId)>(rt, value.getProperty(rt, "intersectionObserverId"), jsInvoker),
|
|
4421
|
-
bridging::fromJs<decltype(types.targetInstanceHandle)>(rt, value.getProperty(rt, "targetInstanceHandle"), jsInvoker),
|
|
4422
|
-
bridging::fromJs<decltype(types.targetRect)>(rt, value.getProperty(rt, "targetRect"), jsInvoker),
|
|
4423
|
-
bridging::fromJs<decltype(types.rootRect)>(rt, value.getProperty(rt, "rootRect"), jsInvoker),
|
|
4424
|
-
bridging::fromJs<decltype(types.intersectionRect)>(rt, value.getProperty(rt, "intersectionRect"), jsInvoker),
|
|
4425
|
-
bridging::fromJs<decltype(types.isIntersectingAboveThresholds)>(rt, value.getProperty(rt, "isIntersectingAboveThresholds"), jsInvoker),
|
|
4426
|
-
bridging::fromJs<decltype(types.time)>(rt, value.getProperty(rt, "time"), jsInvoker)};
|
|
4427
|
-
return result;
|
|
4620
|
+
class JSI_EXPORT NativeJSCHeapCaptureCxxSpec : public TurboModule {
|
|
4621
|
+
public:
|
|
4622
|
+
jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
4623
|
+
return delegate_.get(rt, propName);
|
|
4428
4624
|
}
|
|
4429
4625
|
|
|
4430
|
-
|
|
4431
|
-
static double intersectionObserverIdToJs(jsi::Runtime &rt, decltype(types.intersectionObserverId) value) {
|
|
4432
|
-
return bridging::toJs(rt, value);
|
|
4433
|
-
}
|
|
4626
|
+
static constexpr std::string_view kModuleName = "JSCHeapCapture";
|
|
4434
4627
|
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4628
|
+
protected:
|
|
4629
|
+
NativeJSCHeapCaptureCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
4630
|
+
: TurboModule(std::string{NativeJSCHeapCaptureCxxSpec::kModuleName}, jsInvoker),
|
|
4631
|
+
delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
|
|
4438
4632
|
|
|
4439
|
-
static jsi::Array targetRectToJs(jsi::Runtime &rt, decltype(types.targetRect) value) {
|
|
4440
|
-
return bridging::toJs(rt, value);
|
|
4441
|
-
}
|
|
4442
4633
|
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4634
|
+
private:
|
|
4635
|
+
class Delegate : public NativeJSCHeapCaptureCxxSpecJSI {
|
|
4636
|
+
public:
|
|
4637
|
+
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
4638
|
+
NativeJSCHeapCaptureCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
|
|
4446
4639
|
|
|
4447
|
-
|
|
4448
|
-
return bridging::toJs(rt, value);
|
|
4449
|
-
}
|
|
4640
|
+
}
|
|
4450
4641
|
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4642
|
+
void captureComplete(jsi::Runtime &rt, jsi::String path, std::optional<jsi::String> error) override {
|
|
4643
|
+
static_assert(
|
|
4644
|
+
bridging::getParameterCount(&T::captureComplete) == 3,
|
|
4645
|
+
"Expected captureComplete(...) to have 3 parameters");
|
|
4454
4646
|
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
#endif
|
|
4647
|
+
return bridging::callFromJs<void>(
|
|
4648
|
+
rt, &T::captureComplete, jsInvoker_, instance_, std::move(path), std::move(error));
|
|
4649
|
+
}
|
|
4459
4650
|
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
result.setProperty(rt, "targetInstanceHandle", bridging::toJs(rt, value.targetInstanceHandle, jsInvoker));
|
|
4467
|
-
result.setProperty(rt, "targetRect", bridging::toJs(rt, value.targetRect, jsInvoker));
|
|
4468
|
-
result.setProperty(rt, "rootRect", bridging::toJs(rt, value.rootRect, jsInvoker));
|
|
4469
|
-
result.setProperty(rt, "intersectionRect", bridging::toJs(rt, value.intersectionRect, jsInvoker));
|
|
4470
|
-
result.setProperty(rt, "isIntersectingAboveThresholds", bridging::toJs(rt, value.isIntersectingAboveThresholds, jsInvoker));
|
|
4471
|
-
result.setProperty(rt, "time", bridging::toJs(rt, value.time, jsInvoker));
|
|
4472
|
-
return result;
|
|
4473
|
-
}
|
|
4651
|
+
private:
|
|
4652
|
+
friend class NativeJSCHeapCaptureCxxSpec;
|
|
4653
|
+
T *instance_;
|
|
4654
|
+
};
|
|
4655
|
+
|
|
4656
|
+
Delegate delegate_;
|
|
4474
4657
|
};
|
|
4475
4658
|
|
|
4476
4659
|
|
|
4660
|
+
class JSI_EXPORT NativeJSCSamplingProfilerCxxSpecJSI : public TurboModule {
|
|
4661
|
+
protected:
|
|
4662
|
+
NativeJSCSamplingProfilerCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
4477
4663
|
|
|
4478
|
-
|
|
4664
|
+
public:
|
|
4665
|
+
virtual void operationComplete(jsi::Runtime &rt, double token, std::optional<jsi::String> result, std::optional<jsi::String> error) = 0;
|
|
4479
4666
|
|
|
4480
|
-
template <typename P0, typename P1, typename P2>
|
|
4481
|
-
struct NativeIntersectionObserverNativeIntersectionObserverObserveOptions {
|
|
4482
|
-
P0 intersectionObserverId;
|
|
4483
|
-
P1 targetShadowNode;
|
|
4484
|
-
P2 thresholds;
|
|
4485
|
-
bool operator==(const NativeIntersectionObserverNativeIntersectionObserverObserveOptions &other) const {
|
|
4486
|
-
return intersectionObserverId == other.intersectionObserverId && targetShadowNode == other.targetShadowNode && thresholds == other.thresholds;
|
|
4487
|
-
}
|
|
4488
4667
|
};
|
|
4489
4668
|
|
|
4490
4669
|
template <typename T>
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
jsi::Runtime &rt,
|
|
4496
|
-
const jsi::Object &value,
|
|
4497
|
-
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
4498
|
-
T result{
|
|
4499
|
-
bridging::fromJs<decltype(types.intersectionObserverId)>(rt, value.getProperty(rt, "intersectionObserverId"), jsInvoker),
|
|
4500
|
-
bridging::fromJs<decltype(types.targetShadowNode)>(rt, value.getProperty(rt, "targetShadowNode"), jsInvoker),
|
|
4501
|
-
bridging::fromJs<decltype(types.thresholds)>(rt, value.getProperty(rt, "thresholds"), jsInvoker)};
|
|
4502
|
-
return result;
|
|
4670
|
+
class JSI_EXPORT NativeJSCSamplingProfilerCxxSpec : public TurboModule {
|
|
4671
|
+
public:
|
|
4672
|
+
jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
4673
|
+
return delegate_.get(rt, propName);
|
|
4503
4674
|
}
|
|
4504
4675
|
|
|
4505
|
-
|
|
4506
|
-
static double intersectionObserverIdToJs(jsi::Runtime &rt, decltype(types.intersectionObserverId) value) {
|
|
4507
|
-
return bridging::toJs(rt, value);
|
|
4508
|
-
}
|
|
4676
|
+
static constexpr std::string_view kModuleName = "JSCSamplingProfiler";
|
|
4509
4677
|
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
static jsi::Array thresholdsToJs(jsi::Runtime &rt, decltype(types.thresholds) value) {
|
|
4515
|
-
return bridging::toJs(rt, value);
|
|
4516
|
-
}
|
|
4517
|
-
#endif
|
|
4518
|
-
|
|
4519
|
-
static jsi::Object toJs(
|
|
4520
|
-
jsi::Runtime &rt,
|
|
4521
|
-
const T &value,
|
|
4522
|
-
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
4523
|
-
auto result = facebook::jsi::Object(rt);
|
|
4524
|
-
result.setProperty(rt, "intersectionObserverId", bridging::toJs(rt, value.intersectionObserverId, jsInvoker));
|
|
4525
|
-
result.setProperty(rt, "targetShadowNode", bridging::toJs(rt, value.targetShadowNode, jsInvoker));
|
|
4526
|
-
result.setProperty(rt, "thresholds", bridging::toJs(rt, value.thresholds, jsInvoker));
|
|
4527
|
-
return result;
|
|
4528
|
-
}
|
|
4529
|
-
};
|
|
4530
|
-
|
|
4531
|
-
class JSI_EXPORT NativeIntersectionObserverCxxSpecJSI : public TurboModule {
|
|
4532
|
-
protected:
|
|
4533
|
-
NativeIntersectionObserverCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
4534
|
-
|
|
4535
|
-
public:
|
|
4536
|
-
virtual void observe(jsi::Runtime &rt, jsi::Object options) = 0;
|
|
4537
|
-
virtual void unobserve(jsi::Runtime &rt, double intersectionObserverId, jsi::Value targetShadowNode) = 0;
|
|
4538
|
-
virtual void connect(jsi::Runtime &rt, jsi::Function notifyIntersectionObserversCallback) = 0;
|
|
4539
|
-
virtual void disconnect(jsi::Runtime &rt) = 0;
|
|
4540
|
-
virtual jsi::Array takeRecords(jsi::Runtime &rt) = 0;
|
|
4541
|
-
|
|
4542
|
-
};
|
|
4543
|
-
|
|
4544
|
-
template <typename T>
|
|
4545
|
-
class JSI_EXPORT NativeIntersectionObserverCxxSpec : public TurboModule {
|
|
4546
|
-
public:
|
|
4547
|
-
jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
4548
|
-
return delegate_.get(rt, propName);
|
|
4549
|
-
}
|
|
4550
|
-
|
|
4551
|
-
static constexpr std::string_view kModuleName = "NativeIntersectionObserverCxx";
|
|
4552
|
-
|
|
4553
|
-
protected:
|
|
4554
|
-
NativeIntersectionObserverCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
4555
|
-
: TurboModule(std::string{NativeIntersectionObserverCxxSpec::kModuleName}, jsInvoker),
|
|
4556
|
-
delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
private:
|
|
4560
|
-
class Delegate : public NativeIntersectionObserverCxxSpecJSI {
|
|
4561
|
-
public:
|
|
4562
|
-
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
4563
|
-
NativeIntersectionObserverCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
|
|
4564
|
-
|
|
4565
|
-
}
|
|
4566
|
-
|
|
4567
|
-
void observe(jsi::Runtime &rt, jsi::Object options) override {
|
|
4568
|
-
static_assert(
|
|
4569
|
-
bridging::getParameterCount(&T::observe) == 2,
|
|
4570
|
-
"Expected observe(...) to have 2 parameters");
|
|
4571
|
-
|
|
4572
|
-
return bridging::callFromJs<void>(
|
|
4573
|
-
rt, &T::observe, jsInvoker_, instance_, std::move(options));
|
|
4574
|
-
}
|
|
4575
|
-
void unobserve(jsi::Runtime &rt, double intersectionObserverId, jsi::Value targetShadowNode) override {
|
|
4576
|
-
static_assert(
|
|
4577
|
-
bridging::getParameterCount(&T::unobserve) == 3,
|
|
4578
|
-
"Expected unobserve(...) to have 3 parameters");
|
|
4579
|
-
|
|
4580
|
-
return bridging::callFromJs<void>(
|
|
4581
|
-
rt, &T::unobserve, jsInvoker_, instance_, std::move(intersectionObserverId), std::move(targetShadowNode));
|
|
4582
|
-
}
|
|
4583
|
-
void connect(jsi::Runtime &rt, jsi::Function notifyIntersectionObserversCallback) override {
|
|
4584
|
-
static_assert(
|
|
4585
|
-
bridging::getParameterCount(&T::connect) == 2,
|
|
4586
|
-
"Expected connect(...) to have 2 parameters");
|
|
4587
|
-
|
|
4588
|
-
return bridging::callFromJs<void>(
|
|
4589
|
-
rt, &T::connect, jsInvoker_, instance_, std::move(notifyIntersectionObserversCallback));
|
|
4590
|
-
}
|
|
4591
|
-
void disconnect(jsi::Runtime &rt) override {
|
|
4592
|
-
static_assert(
|
|
4593
|
-
bridging::getParameterCount(&T::disconnect) == 1,
|
|
4594
|
-
"Expected disconnect(...) to have 1 parameters");
|
|
4595
|
-
|
|
4596
|
-
return bridging::callFromJs<void>(
|
|
4597
|
-
rt, &T::disconnect, jsInvoker_, instance_);
|
|
4598
|
-
}
|
|
4599
|
-
jsi::Array takeRecords(jsi::Runtime &rt) override {
|
|
4600
|
-
static_assert(
|
|
4601
|
-
bridging::getParameterCount(&T::takeRecords) == 1,
|
|
4602
|
-
"Expected takeRecords(...) to have 1 parameters");
|
|
4603
|
-
|
|
4604
|
-
return bridging::callFromJs<jsi::Array>(
|
|
4605
|
-
rt, &T::takeRecords, jsInvoker_, instance_);
|
|
4606
|
-
}
|
|
4607
|
-
|
|
4608
|
-
private:
|
|
4609
|
-
friend class NativeIntersectionObserverCxxSpec;
|
|
4610
|
-
T *instance_;
|
|
4611
|
-
};
|
|
4612
|
-
|
|
4613
|
-
Delegate delegate_;
|
|
4614
|
-
};
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
class JSI_EXPORT NativeJSCHeapCaptureCxxSpecJSI : public TurboModule {
|
|
4618
|
-
protected:
|
|
4619
|
-
NativeJSCHeapCaptureCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
4620
|
-
|
|
4621
|
-
public:
|
|
4622
|
-
virtual void captureComplete(jsi::Runtime &rt, jsi::String path, std::optional<jsi::String> error) = 0;
|
|
4623
|
-
|
|
4624
|
-
};
|
|
4625
|
-
|
|
4626
|
-
template <typename T>
|
|
4627
|
-
class JSI_EXPORT NativeJSCHeapCaptureCxxSpec : public TurboModule {
|
|
4628
|
-
public:
|
|
4629
|
-
jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
4630
|
-
return delegate_.get(rt, propName);
|
|
4631
|
-
}
|
|
4632
|
-
|
|
4633
|
-
static constexpr std::string_view kModuleName = "JSCHeapCapture";
|
|
4634
|
-
|
|
4635
|
-
protected:
|
|
4636
|
-
NativeJSCHeapCaptureCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
4637
|
-
: TurboModule(std::string{NativeJSCHeapCaptureCxxSpec::kModuleName}, jsInvoker),
|
|
4638
|
-
delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
private:
|
|
4642
|
-
class Delegate : public NativeJSCHeapCaptureCxxSpecJSI {
|
|
4643
|
-
public:
|
|
4644
|
-
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
4645
|
-
NativeJSCHeapCaptureCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
|
|
4646
|
-
|
|
4647
|
-
}
|
|
4648
|
-
|
|
4649
|
-
void captureComplete(jsi::Runtime &rt, jsi::String path, std::optional<jsi::String> error) override {
|
|
4650
|
-
static_assert(
|
|
4651
|
-
bridging::getParameterCount(&T::captureComplete) == 3,
|
|
4652
|
-
"Expected captureComplete(...) to have 3 parameters");
|
|
4653
|
-
|
|
4654
|
-
return bridging::callFromJs<void>(
|
|
4655
|
-
rt, &T::captureComplete, jsInvoker_, instance_, std::move(path), std::move(error));
|
|
4656
|
-
}
|
|
4657
|
-
|
|
4658
|
-
private:
|
|
4659
|
-
friend class NativeJSCHeapCaptureCxxSpec;
|
|
4660
|
-
T *instance_;
|
|
4661
|
-
};
|
|
4662
|
-
|
|
4663
|
-
Delegate delegate_;
|
|
4664
|
-
};
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
class JSI_EXPORT NativeJSCSamplingProfilerCxxSpecJSI : public TurboModule {
|
|
4668
|
-
protected:
|
|
4669
|
-
NativeJSCSamplingProfilerCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
4670
|
-
|
|
4671
|
-
public:
|
|
4672
|
-
virtual void operationComplete(jsi::Runtime &rt, double token, std::optional<jsi::String> result, std::optional<jsi::String> error) = 0;
|
|
4673
|
-
|
|
4674
|
-
};
|
|
4675
|
-
|
|
4676
|
-
template <typename T>
|
|
4677
|
-
class JSI_EXPORT NativeJSCSamplingProfilerCxxSpec : public TurboModule {
|
|
4678
|
-
public:
|
|
4679
|
-
jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
4680
|
-
return delegate_.get(rt, propName);
|
|
4681
|
-
}
|
|
4682
|
-
|
|
4683
|
-
static constexpr std::string_view kModuleName = "JSCSamplingProfiler";
|
|
4684
|
-
|
|
4685
|
-
protected:
|
|
4686
|
-
NativeJSCSamplingProfilerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
4687
|
-
: TurboModule(std::string{NativeJSCSamplingProfilerCxxSpec::kModuleName}, jsInvoker),
|
|
4688
|
-
delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
|
|
4678
|
+
protected:
|
|
4679
|
+
NativeJSCSamplingProfilerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
4680
|
+
: TurboModule(std::string{NativeJSCSamplingProfilerCxxSpec::kModuleName}, jsInvoker),
|
|
4681
|
+
delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
|
|
4689
4682
|
|
|
4690
4683
|
|
|
4691
4684
|
private:
|
|
@@ -4986,256 +4979,54 @@ private:
|
|
|
4986
4979
|
};
|
|
4987
4980
|
|
|
4988
4981
|
|
|
4989
|
-
|
|
4990
|
-
|
|
4982
|
+
class JSI_EXPORT NativeNetworkingAndroidCxxSpecJSI : public TurboModule {
|
|
4983
|
+
protected:
|
|
4984
|
+
NativeNetworkingAndroidCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
4985
|
+
|
|
4986
|
+
public:
|
|
4987
|
+
virtual void sendRequest(jsi::Runtime &rt, jsi::String method, jsi::String url, double requestId, jsi::Array headers, jsi::Object data, jsi::String responseType, bool useIncrementalUpdates, double timeout, bool withCredentials) = 0;
|
|
4988
|
+
virtual void abortRequest(jsi::Runtime &rt, double requestId) = 0;
|
|
4989
|
+
virtual void clearCookies(jsi::Runtime &rt, jsi::Function callback) = 0;
|
|
4990
|
+
virtual void addListener(jsi::Runtime &rt, jsi::String eventName) = 0;
|
|
4991
|
+
virtual void removeListeners(jsi::Runtime &rt, double count) = 0;
|
|
4991
4992
|
|
|
4992
|
-
template <typename P0, typename P1, typename P2>
|
|
4993
|
-
struct NativeMutationObserverNativeMutationObserverObserveOptions {
|
|
4994
|
-
P0 mutationObserverId;
|
|
4995
|
-
P1 targetShadowNode;
|
|
4996
|
-
P2 subtree;
|
|
4997
|
-
bool operator==(const NativeMutationObserverNativeMutationObserverObserveOptions &other) const {
|
|
4998
|
-
return mutationObserverId == other.mutationObserverId && targetShadowNode == other.targetShadowNode && subtree == other.subtree;
|
|
4999
|
-
}
|
|
5000
4993
|
};
|
|
5001
4994
|
|
|
5002
4995
|
template <typename T>
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
jsi::Runtime &rt,
|
|
5008
|
-
const jsi::Object &value,
|
|
5009
|
-
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
5010
|
-
T result{
|
|
5011
|
-
bridging::fromJs<decltype(types.mutationObserverId)>(rt, value.getProperty(rt, "mutationObserverId"), jsInvoker),
|
|
5012
|
-
bridging::fromJs<decltype(types.targetShadowNode)>(rt, value.getProperty(rt, "targetShadowNode"), jsInvoker),
|
|
5013
|
-
bridging::fromJs<decltype(types.subtree)>(rt, value.getProperty(rt, "subtree"), jsInvoker)};
|
|
5014
|
-
return result;
|
|
4996
|
+
class JSI_EXPORT NativeNetworkingAndroidCxxSpec : public TurboModule {
|
|
4997
|
+
public:
|
|
4998
|
+
jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
4999
|
+
return delegate_.get(rt, propName);
|
|
5015
5000
|
}
|
|
5016
5001
|
|
|
5017
|
-
|
|
5018
|
-
static double mutationObserverIdToJs(jsi::Runtime &rt, decltype(types.mutationObserverId) value) {
|
|
5019
|
-
return bridging::toJs(rt, value);
|
|
5020
|
-
}
|
|
5002
|
+
static constexpr std::string_view kModuleName = "Networking";
|
|
5021
5003
|
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5004
|
+
protected:
|
|
5005
|
+
NativeNetworkingAndroidCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
5006
|
+
: TurboModule(std::string{NativeNetworkingAndroidCxxSpec::kModuleName}, jsInvoker),
|
|
5007
|
+
delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
|
|
5025
5008
|
|
|
5026
|
-
static bool subtreeToJs(jsi::Runtime &rt, decltype(types.subtree) value) {
|
|
5027
|
-
return bridging::toJs(rt, value);
|
|
5028
|
-
}
|
|
5029
|
-
#endif
|
|
5030
5009
|
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
result.setProperty(rt, "mutationObserverId", bridging::toJs(rt, value.mutationObserverId, jsInvoker));
|
|
5037
|
-
result.setProperty(rt, "targetShadowNode", bridging::toJs(rt, value.targetShadowNode, jsInvoker));
|
|
5038
|
-
result.setProperty(rt, "subtree", bridging::toJs(rt, value.subtree, jsInvoker));
|
|
5039
|
-
return result;
|
|
5040
|
-
}
|
|
5041
|
-
};
|
|
5010
|
+
private:
|
|
5011
|
+
class Delegate : public NativeNetworkingAndroidCxxSpecJSI {
|
|
5012
|
+
public:
|
|
5013
|
+
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
5014
|
+
NativeNetworkingAndroidCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
|
|
5042
5015
|
|
|
5016
|
+
}
|
|
5043
5017
|
|
|
5018
|
+
void sendRequest(jsi::Runtime &rt, jsi::String method, jsi::String url, double requestId, jsi::Array headers, jsi::Object data, jsi::String responseType, bool useIncrementalUpdates, double timeout, bool withCredentials) override {
|
|
5019
|
+
static_assert(
|
|
5020
|
+
bridging::getParameterCount(&T::sendRequest) == 10,
|
|
5021
|
+
"Expected sendRequest(...) to have 10 parameters");
|
|
5044
5022
|
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
P3 removedNodes;
|
|
5053
|
-
bool operator==(const NativeMutationObserverNativeMutationRecord &other) const {
|
|
5054
|
-
return mutationObserverId == other.mutationObserverId && target == other.target && addedNodes == other.addedNodes && removedNodes == other.removedNodes;
|
|
5055
|
-
}
|
|
5056
|
-
};
|
|
5057
|
-
|
|
5058
|
-
template <typename T>
|
|
5059
|
-
struct NativeMutationObserverNativeMutationRecordBridging {
|
|
5060
|
-
static T types;
|
|
5061
|
-
|
|
5062
|
-
static T fromJs(
|
|
5063
|
-
jsi::Runtime &rt,
|
|
5064
|
-
const jsi::Object &value,
|
|
5065
|
-
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
5066
|
-
T result{
|
|
5067
|
-
bridging::fromJs<decltype(types.mutationObserverId)>(rt, value.getProperty(rt, "mutationObserverId"), jsInvoker),
|
|
5068
|
-
bridging::fromJs<decltype(types.target)>(rt, value.getProperty(rt, "target"), jsInvoker),
|
|
5069
|
-
bridging::fromJs<decltype(types.addedNodes)>(rt, value.getProperty(rt, "addedNodes"), jsInvoker),
|
|
5070
|
-
bridging::fromJs<decltype(types.removedNodes)>(rt, value.getProperty(rt, "removedNodes"), jsInvoker)};
|
|
5071
|
-
return result;
|
|
5072
|
-
}
|
|
5073
|
-
|
|
5074
|
-
#ifdef DEBUG
|
|
5075
|
-
static double mutationObserverIdToJs(jsi::Runtime &rt, decltype(types.mutationObserverId) value) {
|
|
5076
|
-
return bridging::toJs(rt, value);
|
|
5077
|
-
}
|
|
5078
|
-
|
|
5079
|
-
static jsi::Value targetToJs(jsi::Runtime &rt, decltype(types.target) value) {
|
|
5080
|
-
return bridging::toJs(rt, value);
|
|
5081
|
-
}
|
|
5082
|
-
|
|
5083
|
-
static jsi::Array addedNodesToJs(jsi::Runtime &rt, decltype(types.addedNodes) value) {
|
|
5084
|
-
return bridging::toJs(rt, value);
|
|
5085
|
-
}
|
|
5086
|
-
|
|
5087
|
-
static jsi::Array removedNodesToJs(jsi::Runtime &rt, decltype(types.removedNodes) value) {
|
|
5088
|
-
return bridging::toJs(rt, value);
|
|
5089
|
-
}
|
|
5090
|
-
#endif
|
|
5091
|
-
|
|
5092
|
-
static jsi::Object toJs(
|
|
5093
|
-
jsi::Runtime &rt,
|
|
5094
|
-
const T &value,
|
|
5095
|
-
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
5096
|
-
auto result = facebook::jsi::Object(rt);
|
|
5097
|
-
result.setProperty(rt, "mutationObserverId", bridging::toJs(rt, value.mutationObserverId, jsInvoker));
|
|
5098
|
-
result.setProperty(rt, "target", bridging::toJs(rt, value.target, jsInvoker));
|
|
5099
|
-
result.setProperty(rt, "addedNodes", bridging::toJs(rt, value.addedNodes, jsInvoker));
|
|
5100
|
-
result.setProperty(rt, "removedNodes", bridging::toJs(rt, value.removedNodes, jsInvoker));
|
|
5101
|
-
return result;
|
|
5102
|
-
}
|
|
5103
|
-
};
|
|
5104
|
-
|
|
5105
|
-
class JSI_EXPORT NativeMutationObserverCxxSpecJSI : public TurboModule {
|
|
5106
|
-
protected:
|
|
5107
|
-
NativeMutationObserverCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
5108
|
-
|
|
5109
|
-
public:
|
|
5110
|
-
virtual void observe(jsi::Runtime &rt, jsi::Object options) = 0;
|
|
5111
|
-
virtual void unobserve(jsi::Runtime &rt, double mutationObserverId, jsi::Value targetShadowNode) = 0;
|
|
5112
|
-
virtual void connect(jsi::Runtime &rt, jsi::Function notifyMutationObservers, jsi::Function getPublicInstanceFromInstanceHandle) = 0;
|
|
5113
|
-
virtual void disconnect(jsi::Runtime &rt) = 0;
|
|
5114
|
-
virtual jsi::Array takeRecords(jsi::Runtime &rt) = 0;
|
|
5115
|
-
|
|
5116
|
-
};
|
|
5117
|
-
|
|
5118
|
-
template <typename T>
|
|
5119
|
-
class JSI_EXPORT NativeMutationObserverCxxSpec : public TurboModule {
|
|
5120
|
-
public:
|
|
5121
|
-
jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
5122
|
-
return delegate_.get(rt, propName);
|
|
5123
|
-
}
|
|
5124
|
-
|
|
5125
|
-
static constexpr std::string_view kModuleName = "NativeMutationObserverCxx";
|
|
5126
|
-
|
|
5127
|
-
protected:
|
|
5128
|
-
NativeMutationObserverCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
5129
|
-
: TurboModule(std::string{NativeMutationObserverCxxSpec::kModuleName}, jsInvoker),
|
|
5130
|
-
delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
private:
|
|
5134
|
-
class Delegate : public NativeMutationObserverCxxSpecJSI {
|
|
5135
|
-
public:
|
|
5136
|
-
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
5137
|
-
NativeMutationObserverCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
|
|
5138
|
-
|
|
5139
|
-
}
|
|
5140
|
-
|
|
5141
|
-
void observe(jsi::Runtime &rt, jsi::Object options) override {
|
|
5142
|
-
static_assert(
|
|
5143
|
-
bridging::getParameterCount(&T::observe) == 2,
|
|
5144
|
-
"Expected observe(...) to have 2 parameters");
|
|
5145
|
-
|
|
5146
|
-
return bridging::callFromJs<void>(
|
|
5147
|
-
rt, &T::observe, jsInvoker_, instance_, std::move(options));
|
|
5148
|
-
}
|
|
5149
|
-
void unobserve(jsi::Runtime &rt, double mutationObserverId, jsi::Value targetShadowNode) override {
|
|
5150
|
-
static_assert(
|
|
5151
|
-
bridging::getParameterCount(&T::unobserve) == 3,
|
|
5152
|
-
"Expected unobserve(...) to have 3 parameters");
|
|
5153
|
-
|
|
5154
|
-
return bridging::callFromJs<void>(
|
|
5155
|
-
rt, &T::unobserve, jsInvoker_, instance_, std::move(mutationObserverId), std::move(targetShadowNode));
|
|
5156
|
-
}
|
|
5157
|
-
void connect(jsi::Runtime &rt, jsi::Function notifyMutationObservers, jsi::Function getPublicInstanceFromInstanceHandle) override {
|
|
5158
|
-
static_assert(
|
|
5159
|
-
bridging::getParameterCount(&T::connect) == 3,
|
|
5160
|
-
"Expected connect(...) to have 3 parameters");
|
|
5161
|
-
|
|
5162
|
-
return bridging::callFromJs<void>(
|
|
5163
|
-
rt, &T::connect, jsInvoker_, instance_, std::move(notifyMutationObservers), std::move(getPublicInstanceFromInstanceHandle));
|
|
5164
|
-
}
|
|
5165
|
-
void disconnect(jsi::Runtime &rt) override {
|
|
5166
|
-
static_assert(
|
|
5167
|
-
bridging::getParameterCount(&T::disconnect) == 1,
|
|
5168
|
-
"Expected disconnect(...) to have 1 parameters");
|
|
5169
|
-
|
|
5170
|
-
return bridging::callFromJs<void>(
|
|
5171
|
-
rt, &T::disconnect, jsInvoker_, instance_);
|
|
5172
|
-
}
|
|
5173
|
-
jsi::Array takeRecords(jsi::Runtime &rt) override {
|
|
5174
|
-
static_assert(
|
|
5175
|
-
bridging::getParameterCount(&T::takeRecords) == 1,
|
|
5176
|
-
"Expected takeRecords(...) to have 1 parameters");
|
|
5177
|
-
|
|
5178
|
-
return bridging::callFromJs<jsi::Array>(
|
|
5179
|
-
rt, &T::takeRecords, jsInvoker_, instance_);
|
|
5180
|
-
}
|
|
5181
|
-
|
|
5182
|
-
private:
|
|
5183
|
-
friend class NativeMutationObserverCxxSpec;
|
|
5184
|
-
T *instance_;
|
|
5185
|
-
};
|
|
5186
|
-
|
|
5187
|
-
Delegate delegate_;
|
|
5188
|
-
};
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
class JSI_EXPORT NativeNetworkingAndroidCxxSpecJSI : public TurboModule {
|
|
5192
|
-
protected:
|
|
5193
|
-
NativeNetworkingAndroidCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
5194
|
-
|
|
5195
|
-
public:
|
|
5196
|
-
virtual void sendRequest(jsi::Runtime &rt, jsi::String method, jsi::String url, double requestId, jsi::Array headers, jsi::Object data, jsi::String responseType, bool useIncrementalUpdates, double timeout, bool withCredentials) = 0;
|
|
5197
|
-
virtual void abortRequest(jsi::Runtime &rt, double requestId) = 0;
|
|
5198
|
-
virtual void clearCookies(jsi::Runtime &rt, jsi::Function callback) = 0;
|
|
5199
|
-
virtual void addListener(jsi::Runtime &rt, jsi::String eventName) = 0;
|
|
5200
|
-
virtual void removeListeners(jsi::Runtime &rt, double count) = 0;
|
|
5201
|
-
|
|
5202
|
-
};
|
|
5203
|
-
|
|
5204
|
-
template <typename T>
|
|
5205
|
-
class JSI_EXPORT NativeNetworkingAndroidCxxSpec : public TurboModule {
|
|
5206
|
-
public:
|
|
5207
|
-
jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
5208
|
-
return delegate_.get(rt, propName);
|
|
5209
|
-
}
|
|
5210
|
-
|
|
5211
|
-
static constexpr std::string_view kModuleName = "Networking";
|
|
5212
|
-
|
|
5213
|
-
protected:
|
|
5214
|
-
NativeNetworkingAndroidCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
5215
|
-
: TurboModule(std::string{NativeNetworkingAndroidCxxSpec::kModuleName}, jsInvoker),
|
|
5216
|
-
delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
private:
|
|
5220
|
-
class Delegate : public NativeNetworkingAndroidCxxSpecJSI {
|
|
5221
|
-
public:
|
|
5222
|
-
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
5223
|
-
NativeNetworkingAndroidCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
|
|
5224
|
-
|
|
5225
|
-
}
|
|
5226
|
-
|
|
5227
|
-
void sendRequest(jsi::Runtime &rt, jsi::String method, jsi::String url, double requestId, jsi::Array headers, jsi::Object data, jsi::String responseType, bool useIncrementalUpdates, double timeout, bool withCredentials) override {
|
|
5228
|
-
static_assert(
|
|
5229
|
-
bridging::getParameterCount(&T::sendRequest) == 10,
|
|
5230
|
-
"Expected sendRequest(...) to have 10 parameters");
|
|
5231
|
-
|
|
5232
|
-
return bridging::callFromJs<void>(
|
|
5233
|
-
rt, &T::sendRequest, jsInvoker_, instance_, std::move(method), std::move(url), std::move(requestId), std::move(headers), std::move(data), std::move(responseType), std::move(useIncrementalUpdates), std::move(timeout), std::move(withCredentials));
|
|
5234
|
-
}
|
|
5235
|
-
void abortRequest(jsi::Runtime &rt, double requestId) override {
|
|
5236
|
-
static_assert(
|
|
5237
|
-
bridging::getParameterCount(&T::abortRequest) == 2,
|
|
5238
|
-
"Expected abortRequest(...) to have 2 parameters");
|
|
5023
|
+
return bridging::callFromJs<void>(
|
|
5024
|
+
rt, &T::sendRequest, jsInvoker_, instance_, std::move(method), std::move(url), std::move(requestId), std::move(headers), std::move(data), std::move(responseType), std::move(useIncrementalUpdates), std::move(timeout), std::move(withCredentials));
|
|
5025
|
+
}
|
|
5026
|
+
void abortRequest(jsi::Runtime &rt, double requestId) override {
|
|
5027
|
+
static_assert(
|
|
5028
|
+
bridging::getParameterCount(&T::abortRequest) == 2,
|
|
5029
|
+
"Expected abortRequest(...) to have 2 parameters");
|
|
5239
5030
|
|
|
5240
5031
|
return bridging::callFromJs<void>(
|
|
5241
5032
|
rt, &T::abortRequest, jsInvoker_, instance_, std::move(requestId));
|
|
@@ -6409,7 +6200,63 @@ struct Bridging<NativeSampleTurboModuleEnumInt> {
|
|
|
6409
6200
|
}
|
|
6410
6201
|
}
|
|
6411
6202
|
};
|
|
6412
|
-
|
|
6203
|
+
|
|
6204
|
+
#pragma mark - NativeSampleTurboModuleObjectStruct
|
|
6205
|
+
|
|
6206
|
+
template <typename P0, typename P1, typename P2>
|
|
6207
|
+
struct NativeSampleTurboModuleObjectStruct {
|
|
6208
|
+
P0 a;
|
|
6209
|
+
P1 b;
|
|
6210
|
+
P2 c;
|
|
6211
|
+
bool operator==(const NativeSampleTurboModuleObjectStruct &other) const {
|
|
6212
|
+
return a == other.a && b == other.b && c == other.c;
|
|
6213
|
+
}
|
|
6214
|
+
};
|
|
6215
|
+
|
|
6216
|
+
template <typename T>
|
|
6217
|
+
struct NativeSampleTurboModuleObjectStructBridging {
|
|
6218
|
+
static T types;
|
|
6219
|
+
|
|
6220
|
+
static T fromJs(
|
|
6221
|
+
jsi::Runtime &rt,
|
|
6222
|
+
const jsi::Object &value,
|
|
6223
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
6224
|
+
T result{
|
|
6225
|
+
bridging::fromJs<decltype(types.a)>(rt, value.getProperty(rt, "a"), jsInvoker),
|
|
6226
|
+
bridging::fromJs<decltype(types.b)>(rt, value.getProperty(rt, "b"), jsInvoker),
|
|
6227
|
+
bridging::fromJs<decltype(types.c)>(rt, value.getProperty(rt, "c"), jsInvoker)};
|
|
6228
|
+
return result;
|
|
6229
|
+
}
|
|
6230
|
+
|
|
6231
|
+
#ifdef DEBUG
|
|
6232
|
+
static double aToJs(jsi::Runtime &rt, decltype(types.a) value) {
|
|
6233
|
+
return bridging::toJs(rt, value);
|
|
6234
|
+
}
|
|
6235
|
+
|
|
6236
|
+
static jsi::String bToJs(jsi::Runtime &rt, decltype(types.b) value) {
|
|
6237
|
+
return bridging::toJs(rt, value);
|
|
6238
|
+
}
|
|
6239
|
+
|
|
6240
|
+
static std::optional<jsi::String> cToJs(jsi::Runtime &rt, decltype(types.c) value) {
|
|
6241
|
+
return bridging::toJs(rt, value);
|
|
6242
|
+
}
|
|
6243
|
+
#endif
|
|
6244
|
+
|
|
6245
|
+
static jsi::Object toJs(
|
|
6246
|
+
jsi::Runtime &rt,
|
|
6247
|
+
const T &value,
|
|
6248
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
6249
|
+
auto result = facebook::jsi::Object(rt);
|
|
6250
|
+
result.setProperty(rt, "a", bridging::toJs(rt, value.a, jsInvoker));
|
|
6251
|
+
result.setProperty(rt, "b", bridging::toJs(rt, value.b, jsInvoker));
|
|
6252
|
+
if (value.c) {
|
|
6253
|
+
result.setProperty(rt, "c", bridging::toJs(rt, value.c.value(), jsInvoker));
|
|
6254
|
+
}
|
|
6255
|
+
return result;
|
|
6256
|
+
}
|
|
6257
|
+
};
|
|
6258
|
+
|
|
6259
|
+
class JSI_EXPORT NativeSampleTurboModuleCxxSpecJSI : public TurboModule {
|
|
6413
6260
|
protected:
|
|
6414
6261
|
NativeSampleTurboModuleCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
6415
6262
|
|
|
@@ -6450,13 +6297,40 @@ protected:
|
|
|
6450
6297
|
: TurboModule(std::string{NativeSampleTurboModuleCxxSpec::kModuleName}, jsInvoker),
|
|
6451
6298
|
delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
|
|
6452
6299
|
|
|
6300
|
+
void emitOnPress() {
|
|
6301
|
+
static_cast<AsyncEventEmitter<>&>(*delegate_.eventEmitterMap_["onPress"]).emit();
|
|
6302
|
+
}
|
|
6303
|
+
|
|
6304
|
+
template <typename OnClickType> void emitOnClick(OnClickType value) {
|
|
6305
|
+
static_assert(bridging::supportsFromJs<OnClickType, jsi::String>, "value cannnot be converted to jsi::String");
|
|
6306
|
+
static_cast<AsyncEventEmitter<jsi::Value>&>(*delegate_.eventEmitterMap_["onClick"]).emit([jsInvoker = jsInvoker_, eventValue = value](jsi::Runtime& rt) -> jsi::Value {
|
|
6307
|
+
return bridging::toJs(rt, eventValue, jsInvoker);
|
|
6308
|
+
});
|
|
6309
|
+
}
|
|
6310
|
+
|
|
6311
|
+
template <typename OnChangeType> void emitOnChange(OnChangeType value) {
|
|
6312
|
+
static_assert(bridging::supportsFromJs<OnChangeType, jsi::Object>, "value cannnot be converted to jsi::Object");
|
|
6313
|
+
static_cast<AsyncEventEmitter<jsi::Value>&>(*delegate_.eventEmitterMap_["onChange"]).emit([jsInvoker = jsInvoker_, eventValue = value](jsi::Runtime& rt) -> jsi::Value {
|
|
6314
|
+
return bridging::toJs(rt, eventValue, jsInvoker);
|
|
6315
|
+
});
|
|
6316
|
+
}
|
|
6317
|
+
|
|
6318
|
+
template <typename OnSubmitType> void emitOnSubmit(std::vector<OnSubmitType> value) {
|
|
6319
|
+
static_assert(bridging::supportsFromJs<std::vector<OnSubmitType>, jsi::Array>, "value cannnot be converted to jsi::Array");
|
|
6320
|
+
static_cast<AsyncEventEmitter<jsi::Value>&>(*delegate_.eventEmitterMap_["onSubmit"]).emit([jsInvoker = jsInvoker_, eventValue = value](jsi::Runtime& rt) -> jsi::Value {
|
|
6321
|
+
return bridging::toJs(rt, eventValue, jsInvoker);
|
|
6322
|
+
});
|
|
6323
|
+
}
|
|
6453
6324
|
|
|
6454
6325
|
private:
|
|
6455
6326
|
class Delegate : public NativeSampleTurboModuleCxxSpecJSI {
|
|
6456
6327
|
public:
|
|
6457
6328
|
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
6458
6329
|
NativeSampleTurboModuleCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
|
|
6459
|
-
|
|
6330
|
+
eventEmitterMap_["onPress"] = std::make_shared<AsyncEventEmitter<>>();
|
|
6331
|
+
eventEmitterMap_["onClick"] = std::make_shared<AsyncEventEmitter<jsi::Value>>();
|
|
6332
|
+
eventEmitterMap_["onChange"] = std::make_shared<AsyncEventEmitter<jsi::Value>>();
|
|
6333
|
+
eventEmitterMap_["onSubmit"] = std::make_shared<AsyncEventEmitter<jsi::Value>>();
|
|
6460
6334
|
}
|
|
6461
6335
|
|
|
6462
6336
|
jsi::Object getConstants(jsi::Runtime &rt) override {
|
|
@@ -7851,21 +7725,244 @@ private:
|
|
|
7851
7725
|
};
|
|
7852
7726
|
|
|
7853
7727
|
|
|
7854
|
-
|
|
7855
|
-
|
|
7856
|
-
NativeMicrotasksCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
7857
|
-
|
|
7858
|
-
public:
|
|
7859
|
-
virtual void queueMicrotask(jsi::Runtime &rt, jsi::Function callback) = 0;
|
|
7728
|
+
|
|
7729
|
+
#pragma mark - NativeIntersectionObserverNativeIntersectionObserverEntry
|
|
7860
7730
|
|
|
7731
|
+
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
|
|
7732
|
+
struct NativeIntersectionObserverNativeIntersectionObserverEntry {
|
|
7733
|
+
P0 intersectionObserverId;
|
|
7734
|
+
P1 targetInstanceHandle;
|
|
7735
|
+
P2 targetRect;
|
|
7736
|
+
P3 rootRect;
|
|
7737
|
+
P4 intersectionRect;
|
|
7738
|
+
P5 isIntersectingAboveThresholds;
|
|
7739
|
+
P6 time;
|
|
7740
|
+
bool operator==(const NativeIntersectionObserverNativeIntersectionObserverEntry &other) const {
|
|
7741
|
+
return intersectionObserverId == other.intersectionObserverId && targetInstanceHandle == other.targetInstanceHandle && targetRect == other.targetRect && rootRect == other.rootRect && intersectionRect == other.intersectionRect && isIntersectingAboveThresholds == other.isIntersectingAboveThresholds && time == other.time;
|
|
7742
|
+
}
|
|
7861
7743
|
};
|
|
7862
7744
|
|
|
7863
7745
|
template <typename T>
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
|
|
7746
|
+
struct NativeIntersectionObserverNativeIntersectionObserverEntryBridging {
|
|
7747
|
+
static T types;
|
|
7748
|
+
|
|
7749
|
+
static T fromJs(
|
|
7750
|
+
jsi::Runtime &rt,
|
|
7751
|
+
const jsi::Object &value,
|
|
7752
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
7753
|
+
T result{
|
|
7754
|
+
bridging::fromJs<decltype(types.intersectionObserverId)>(rt, value.getProperty(rt, "intersectionObserverId"), jsInvoker),
|
|
7755
|
+
bridging::fromJs<decltype(types.targetInstanceHandle)>(rt, value.getProperty(rt, "targetInstanceHandle"), jsInvoker),
|
|
7756
|
+
bridging::fromJs<decltype(types.targetRect)>(rt, value.getProperty(rt, "targetRect"), jsInvoker),
|
|
7757
|
+
bridging::fromJs<decltype(types.rootRect)>(rt, value.getProperty(rt, "rootRect"), jsInvoker),
|
|
7758
|
+
bridging::fromJs<decltype(types.intersectionRect)>(rt, value.getProperty(rt, "intersectionRect"), jsInvoker),
|
|
7759
|
+
bridging::fromJs<decltype(types.isIntersectingAboveThresholds)>(rt, value.getProperty(rt, "isIntersectingAboveThresholds"), jsInvoker),
|
|
7760
|
+
bridging::fromJs<decltype(types.time)>(rt, value.getProperty(rt, "time"), jsInvoker)};
|
|
7761
|
+
return result;
|
|
7762
|
+
}
|
|
7763
|
+
|
|
7764
|
+
#ifdef DEBUG
|
|
7765
|
+
static double intersectionObserverIdToJs(jsi::Runtime &rt, decltype(types.intersectionObserverId) value) {
|
|
7766
|
+
return bridging::toJs(rt, value);
|
|
7767
|
+
}
|
|
7768
|
+
|
|
7769
|
+
static jsi::Value targetInstanceHandleToJs(jsi::Runtime &rt, decltype(types.targetInstanceHandle) value) {
|
|
7770
|
+
return bridging::toJs(rt, value);
|
|
7771
|
+
}
|
|
7772
|
+
|
|
7773
|
+
static jsi::Array targetRectToJs(jsi::Runtime &rt, decltype(types.targetRect) value) {
|
|
7774
|
+
return bridging::toJs(rt, value);
|
|
7775
|
+
}
|
|
7776
|
+
|
|
7777
|
+
static jsi::Array rootRectToJs(jsi::Runtime &rt, decltype(types.rootRect) value) {
|
|
7778
|
+
return bridging::toJs(rt, value);
|
|
7779
|
+
}
|
|
7780
|
+
|
|
7781
|
+
static std::optional<jsi::Array> intersectionRectToJs(jsi::Runtime &rt, decltype(types.intersectionRect) value) {
|
|
7782
|
+
return bridging::toJs(rt, value);
|
|
7783
|
+
}
|
|
7784
|
+
|
|
7785
|
+
static bool isIntersectingAboveThresholdsToJs(jsi::Runtime &rt, decltype(types.isIntersectingAboveThresholds) value) {
|
|
7786
|
+
return bridging::toJs(rt, value);
|
|
7787
|
+
}
|
|
7788
|
+
|
|
7789
|
+
static double timeToJs(jsi::Runtime &rt, decltype(types.time) value) {
|
|
7790
|
+
return bridging::toJs(rt, value);
|
|
7791
|
+
}
|
|
7792
|
+
#endif
|
|
7793
|
+
|
|
7794
|
+
static jsi::Object toJs(
|
|
7795
|
+
jsi::Runtime &rt,
|
|
7796
|
+
const T &value,
|
|
7797
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
7798
|
+
auto result = facebook::jsi::Object(rt);
|
|
7799
|
+
result.setProperty(rt, "intersectionObserverId", bridging::toJs(rt, value.intersectionObserverId, jsInvoker));
|
|
7800
|
+
result.setProperty(rt, "targetInstanceHandle", bridging::toJs(rt, value.targetInstanceHandle, jsInvoker));
|
|
7801
|
+
result.setProperty(rt, "targetRect", bridging::toJs(rt, value.targetRect, jsInvoker));
|
|
7802
|
+
result.setProperty(rt, "rootRect", bridging::toJs(rt, value.rootRect, jsInvoker));
|
|
7803
|
+
result.setProperty(rt, "intersectionRect", bridging::toJs(rt, value.intersectionRect, jsInvoker));
|
|
7804
|
+
result.setProperty(rt, "isIntersectingAboveThresholds", bridging::toJs(rt, value.isIntersectingAboveThresholds, jsInvoker));
|
|
7805
|
+
result.setProperty(rt, "time", bridging::toJs(rt, value.time, jsInvoker));
|
|
7806
|
+
return result;
|
|
7807
|
+
}
|
|
7808
|
+
};
|
|
7809
|
+
|
|
7810
|
+
|
|
7811
|
+
|
|
7812
|
+
#pragma mark - NativeIntersectionObserverNativeIntersectionObserverObserveOptions
|
|
7813
|
+
|
|
7814
|
+
template <typename P0, typename P1, typename P2>
|
|
7815
|
+
struct NativeIntersectionObserverNativeIntersectionObserverObserveOptions {
|
|
7816
|
+
P0 intersectionObserverId;
|
|
7817
|
+
P1 targetShadowNode;
|
|
7818
|
+
P2 thresholds;
|
|
7819
|
+
bool operator==(const NativeIntersectionObserverNativeIntersectionObserverObserveOptions &other) const {
|
|
7820
|
+
return intersectionObserverId == other.intersectionObserverId && targetShadowNode == other.targetShadowNode && thresholds == other.thresholds;
|
|
7821
|
+
}
|
|
7822
|
+
};
|
|
7823
|
+
|
|
7824
|
+
template <typename T>
|
|
7825
|
+
struct NativeIntersectionObserverNativeIntersectionObserverObserveOptionsBridging {
|
|
7826
|
+
static T types;
|
|
7827
|
+
|
|
7828
|
+
static T fromJs(
|
|
7829
|
+
jsi::Runtime &rt,
|
|
7830
|
+
const jsi::Object &value,
|
|
7831
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
7832
|
+
T result{
|
|
7833
|
+
bridging::fromJs<decltype(types.intersectionObserverId)>(rt, value.getProperty(rt, "intersectionObserverId"), jsInvoker),
|
|
7834
|
+
bridging::fromJs<decltype(types.targetShadowNode)>(rt, value.getProperty(rt, "targetShadowNode"), jsInvoker),
|
|
7835
|
+
bridging::fromJs<decltype(types.thresholds)>(rt, value.getProperty(rt, "thresholds"), jsInvoker)};
|
|
7836
|
+
return result;
|
|
7837
|
+
}
|
|
7838
|
+
|
|
7839
|
+
#ifdef DEBUG
|
|
7840
|
+
static double intersectionObserverIdToJs(jsi::Runtime &rt, decltype(types.intersectionObserverId) value) {
|
|
7841
|
+
return bridging::toJs(rt, value);
|
|
7842
|
+
}
|
|
7843
|
+
|
|
7844
|
+
static jsi::Value targetShadowNodeToJs(jsi::Runtime &rt, decltype(types.targetShadowNode) value) {
|
|
7845
|
+
return bridging::toJs(rt, value);
|
|
7846
|
+
}
|
|
7847
|
+
|
|
7848
|
+
static jsi::Array thresholdsToJs(jsi::Runtime &rt, decltype(types.thresholds) value) {
|
|
7849
|
+
return bridging::toJs(rt, value);
|
|
7850
|
+
}
|
|
7851
|
+
#endif
|
|
7852
|
+
|
|
7853
|
+
static jsi::Object toJs(
|
|
7854
|
+
jsi::Runtime &rt,
|
|
7855
|
+
const T &value,
|
|
7856
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
7857
|
+
auto result = facebook::jsi::Object(rt);
|
|
7858
|
+
result.setProperty(rt, "intersectionObserverId", bridging::toJs(rt, value.intersectionObserverId, jsInvoker));
|
|
7859
|
+
result.setProperty(rt, "targetShadowNode", bridging::toJs(rt, value.targetShadowNode, jsInvoker));
|
|
7860
|
+
result.setProperty(rt, "thresholds", bridging::toJs(rt, value.thresholds, jsInvoker));
|
|
7861
|
+
return result;
|
|
7862
|
+
}
|
|
7863
|
+
};
|
|
7864
|
+
|
|
7865
|
+
class JSI_EXPORT NativeIntersectionObserverCxxSpecJSI : public TurboModule {
|
|
7866
|
+
protected:
|
|
7867
|
+
NativeIntersectionObserverCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
7868
|
+
|
|
7869
|
+
public:
|
|
7870
|
+
virtual void observe(jsi::Runtime &rt, jsi::Object options) = 0;
|
|
7871
|
+
virtual void unobserve(jsi::Runtime &rt, double intersectionObserverId, jsi::Value targetShadowNode) = 0;
|
|
7872
|
+
virtual void connect(jsi::Runtime &rt, jsi::Function notifyIntersectionObserversCallback) = 0;
|
|
7873
|
+
virtual void disconnect(jsi::Runtime &rt) = 0;
|
|
7874
|
+
virtual jsi::Array takeRecords(jsi::Runtime &rt) = 0;
|
|
7875
|
+
|
|
7876
|
+
};
|
|
7877
|
+
|
|
7878
|
+
template <typename T>
|
|
7879
|
+
class JSI_EXPORT NativeIntersectionObserverCxxSpec : public TurboModule {
|
|
7880
|
+
public:
|
|
7881
|
+
jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
7882
|
+
return delegate_.get(rt, propName);
|
|
7883
|
+
}
|
|
7884
|
+
|
|
7885
|
+
static constexpr std::string_view kModuleName = "NativeIntersectionObserverCxx";
|
|
7886
|
+
|
|
7887
|
+
protected:
|
|
7888
|
+
NativeIntersectionObserverCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
7889
|
+
: TurboModule(std::string{NativeIntersectionObserverCxxSpec::kModuleName}, jsInvoker),
|
|
7890
|
+
delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
|
|
7891
|
+
|
|
7892
|
+
|
|
7893
|
+
private:
|
|
7894
|
+
class Delegate : public NativeIntersectionObserverCxxSpecJSI {
|
|
7895
|
+
public:
|
|
7896
|
+
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
7897
|
+
NativeIntersectionObserverCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
|
|
7898
|
+
|
|
7899
|
+
}
|
|
7900
|
+
|
|
7901
|
+
void observe(jsi::Runtime &rt, jsi::Object options) override {
|
|
7902
|
+
static_assert(
|
|
7903
|
+
bridging::getParameterCount(&T::observe) == 2,
|
|
7904
|
+
"Expected observe(...) to have 2 parameters");
|
|
7905
|
+
|
|
7906
|
+
return bridging::callFromJs<void>(
|
|
7907
|
+
rt, &T::observe, jsInvoker_, instance_, std::move(options));
|
|
7908
|
+
}
|
|
7909
|
+
void unobserve(jsi::Runtime &rt, double intersectionObserverId, jsi::Value targetShadowNode) override {
|
|
7910
|
+
static_assert(
|
|
7911
|
+
bridging::getParameterCount(&T::unobserve) == 3,
|
|
7912
|
+
"Expected unobserve(...) to have 3 parameters");
|
|
7913
|
+
|
|
7914
|
+
return bridging::callFromJs<void>(
|
|
7915
|
+
rt, &T::unobserve, jsInvoker_, instance_, std::move(intersectionObserverId), std::move(targetShadowNode));
|
|
7916
|
+
}
|
|
7917
|
+
void connect(jsi::Runtime &rt, jsi::Function notifyIntersectionObserversCallback) override {
|
|
7918
|
+
static_assert(
|
|
7919
|
+
bridging::getParameterCount(&T::connect) == 2,
|
|
7920
|
+
"Expected connect(...) to have 2 parameters");
|
|
7921
|
+
|
|
7922
|
+
return bridging::callFromJs<void>(
|
|
7923
|
+
rt, &T::connect, jsInvoker_, instance_, std::move(notifyIntersectionObserversCallback));
|
|
7924
|
+
}
|
|
7925
|
+
void disconnect(jsi::Runtime &rt) override {
|
|
7926
|
+
static_assert(
|
|
7927
|
+
bridging::getParameterCount(&T::disconnect) == 1,
|
|
7928
|
+
"Expected disconnect(...) to have 1 parameters");
|
|
7929
|
+
|
|
7930
|
+
return bridging::callFromJs<void>(
|
|
7931
|
+
rt, &T::disconnect, jsInvoker_, instance_);
|
|
7932
|
+
}
|
|
7933
|
+
jsi::Array takeRecords(jsi::Runtime &rt) override {
|
|
7934
|
+
static_assert(
|
|
7935
|
+
bridging::getParameterCount(&T::takeRecords) == 1,
|
|
7936
|
+
"Expected takeRecords(...) to have 1 parameters");
|
|
7937
|
+
|
|
7938
|
+
return bridging::callFromJs<jsi::Array>(
|
|
7939
|
+
rt, &T::takeRecords, jsInvoker_, instance_);
|
|
7940
|
+
}
|
|
7941
|
+
|
|
7942
|
+
private:
|
|
7943
|
+
friend class NativeIntersectionObserverCxxSpec;
|
|
7944
|
+
T *instance_;
|
|
7945
|
+
};
|
|
7946
|
+
|
|
7947
|
+
Delegate delegate_;
|
|
7948
|
+
};
|
|
7949
|
+
|
|
7950
|
+
|
|
7951
|
+
class JSI_EXPORT NativeMicrotasksCxxSpecJSI : public TurboModule {
|
|
7952
|
+
protected:
|
|
7953
|
+
NativeMicrotasksCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
7954
|
+
|
|
7955
|
+
public:
|
|
7956
|
+
virtual void queueMicrotask(jsi::Runtime &rt, jsi::Function callback) = 0;
|
|
7957
|
+
|
|
7958
|
+
};
|
|
7959
|
+
|
|
7960
|
+
template <typename T>
|
|
7961
|
+
class JSI_EXPORT NativeMicrotasksCxxSpec : public TurboModule {
|
|
7962
|
+
public:
|
|
7963
|
+
jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
7964
|
+
return delegate_.get(rt, propName);
|
|
7965
|
+
}
|
|
7869
7966
|
|
|
7870
7967
|
static constexpr std::string_view kModuleName = "NativeMicrotasksCxx";
|
|
7871
7968
|
|
|
@@ -7902,6 +7999,208 @@ private:
|
|
|
7902
7999
|
|
|
7903
8000
|
|
|
7904
8001
|
|
|
8002
|
+
#pragma mark - NativeMutationObserverNativeMutationObserverObserveOptions
|
|
8003
|
+
|
|
8004
|
+
template <typename P0, typename P1, typename P2>
|
|
8005
|
+
struct NativeMutationObserverNativeMutationObserverObserveOptions {
|
|
8006
|
+
P0 mutationObserverId;
|
|
8007
|
+
P1 targetShadowNode;
|
|
8008
|
+
P2 subtree;
|
|
8009
|
+
bool operator==(const NativeMutationObserverNativeMutationObserverObserveOptions &other) const {
|
|
8010
|
+
return mutationObserverId == other.mutationObserverId && targetShadowNode == other.targetShadowNode && subtree == other.subtree;
|
|
8011
|
+
}
|
|
8012
|
+
};
|
|
8013
|
+
|
|
8014
|
+
template <typename T>
|
|
8015
|
+
struct NativeMutationObserverNativeMutationObserverObserveOptionsBridging {
|
|
8016
|
+
static T types;
|
|
8017
|
+
|
|
8018
|
+
static T fromJs(
|
|
8019
|
+
jsi::Runtime &rt,
|
|
8020
|
+
const jsi::Object &value,
|
|
8021
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
8022
|
+
T result{
|
|
8023
|
+
bridging::fromJs<decltype(types.mutationObserverId)>(rt, value.getProperty(rt, "mutationObserverId"), jsInvoker),
|
|
8024
|
+
bridging::fromJs<decltype(types.targetShadowNode)>(rt, value.getProperty(rt, "targetShadowNode"), jsInvoker),
|
|
8025
|
+
bridging::fromJs<decltype(types.subtree)>(rt, value.getProperty(rt, "subtree"), jsInvoker)};
|
|
8026
|
+
return result;
|
|
8027
|
+
}
|
|
8028
|
+
|
|
8029
|
+
#ifdef DEBUG
|
|
8030
|
+
static double mutationObserverIdToJs(jsi::Runtime &rt, decltype(types.mutationObserverId) value) {
|
|
8031
|
+
return bridging::toJs(rt, value);
|
|
8032
|
+
}
|
|
8033
|
+
|
|
8034
|
+
static jsi::Value targetShadowNodeToJs(jsi::Runtime &rt, decltype(types.targetShadowNode) value) {
|
|
8035
|
+
return bridging::toJs(rt, value);
|
|
8036
|
+
}
|
|
8037
|
+
|
|
8038
|
+
static bool subtreeToJs(jsi::Runtime &rt, decltype(types.subtree) value) {
|
|
8039
|
+
return bridging::toJs(rt, value);
|
|
8040
|
+
}
|
|
8041
|
+
#endif
|
|
8042
|
+
|
|
8043
|
+
static jsi::Object toJs(
|
|
8044
|
+
jsi::Runtime &rt,
|
|
8045
|
+
const T &value,
|
|
8046
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
8047
|
+
auto result = facebook::jsi::Object(rt);
|
|
8048
|
+
result.setProperty(rt, "mutationObserverId", bridging::toJs(rt, value.mutationObserverId, jsInvoker));
|
|
8049
|
+
result.setProperty(rt, "targetShadowNode", bridging::toJs(rt, value.targetShadowNode, jsInvoker));
|
|
8050
|
+
result.setProperty(rt, "subtree", bridging::toJs(rt, value.subtree, jsInvoker));
|
|
8051
|
+
return result;
|
|
8052
|
+
}
|
|
8053
|
+
};
|
|
8054
|
+
|
|
8055
|
+
|
|
8056
|
+
|
|
8057
|
+
#pragma mark - NativeMutationObserverNativeMutationRecord
|
|
8058
|
+
|
|
8059
|
+
template <typename P0, typename P1, typename P2, typename P3>
|
|
8060
|
+
struct NativeMutationObserverNativeMutationRecord {
|
|
8061
|
+
P0 mutationObserverId;
|
|
8062
|
+
P1 target;
|
|
8063
|
+
P2 addedNodes;
|
|
8064
|
+
P3 removedNodes;
|
|
8065
|
+
bool operator==(const NativeMutationObserverNativeMutationRecord &other) const {
|
|
8066
|
+
return mutationObserverId == other.mutationObserverId && target == other.target && addedNodes == other.addedNodes && removedNodes == other.removedNodes;
|
|
8067
|
+
}
|
|
8068
|
+
};
|
|
8069
|
+
|
|
8070
|
+
template <typename T>
|
|
8071
|
+
struct NativeMutationObserverNativeMutationRecordBridging {
|
|
8072
|
+
static T types;
|
|
8073
|
+
|
|
8074
|
+
static T fromJs(
|
|
8075
|
+
jsi::Runtime &rt,
|
|
8076
|
+
const jsi::Object &value,
|
|
8077
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
8078
|
+
T result{
|
|
8079
|
+
bridging::fromJs<decltype(types.mutationObserverId)>(rt, value.getProperty(rt, "mutationObserverId"), jsInvoker),
|
|
8080
|
+
bridging::fromJs<decltype(types.target)>(rt, value.getProperty(rt, "target"), jsInvoker),
|
|
8081
|
+
bridging::fromJs<decltype(types.addedNodes)>(rt, value.getProperty(rt, "addedNodes"), jsInvoker),
|
|
8082
|
+
bridging::fromJs<decltype(types.removedNodes)>(rt, value.getProperty(rt, "removedNodes"), jsInvoker)};
|
|
8083
|
+
return result;
|
|
8084
|
+
}
|
|
8085
|
+
|
|
8086
|
+
#ifdef DEBUG
|
|
8087
|
+
static double mutationObserverIdToJs(jsi::Runtime &rt, decltype(types.mutationObserverId) value) {
|
|
8088
|
+
return bridging::toJs(rt, value);
|
|
8089
|
+
}
|
|
8090
|
+
|
|
8091
|
+
static jsi::Value targetToJs(jsi::Runtime &rt, decltype(types.target) value) {
|
|
8092
|
+
return bridging::toJs(rt, value);
|
|
8093
|
+
}
|
|
8094
|
+
|
|
8095
|
+
static jsi::Array addedNodesToJs(jsi::Runtime &rt, decltype(types.addedNodes) value) {
|
|
8096
|
+
return bridging::toJs(rt, value);
|
|
8097
|
+
}
|
|
8098
|
+
|
|
8099
|
+
static jsi::Array removedNodesToJs(jsi::Runtime &rt, decltype(types.removedNodes) value) {
|
|
8100
|
+
return bridging::toJs(rt, value);
|
|
8101
|
+
}
|
|
8102
|
+
#endif
|
|
8103
|
+
|
|
8104
|
+
static jsi::Object toJs(
|
|
8105
|
+
jsi::Runtime &rt,
|
|
8106
|
+
const T &value,
|
|
8107
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
|
8108
|
+
auto result = facebook::jsi::Object(rt);
|
|
8109
|
+
result.setProperty(rt, "mutationObserverId", bridging::toJs(rt, value.mutationObserverId, jsInvoker));
|
|
8110
|
+
result.setProperty(rt, "target", bridging::toJs(rt, value.target, jsInvoker));
|
|
8111
|
+
result.setProperty(rt, "addedNodes", bridging::toJs(rt, value.addedNodes, jsInvoker));
|
|
8112
|
+
result.setProperty(rt, "removedNodes", bridging::toJs(rt, value.removedNodes, jsInvoker));
|
|
8113
|
+
return result;
|
|
8114
|
+
}
|
|
8115
|
+
};
|
|
8116
|
+
|
|
8117
|
+
class JSI_EXPORT NativeMutationObserverCxxSpecJSI : public TurboModule {
|
|
8118
|
+
protected:
|
|
8119
|
+
NativeMutationObserverCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
8120
|
+
|
|
8121
|
+
public:
|
|
8122
|
+
virtual void observe(jsi::Runtime &rt, jsi::Object options) = 0;
|
|
8123
|
+
virtual void unobserve(jsi::Runtime &rt, double mutationObserverId, jsi::Value targetShadowNode) = 0;
|
|
8124
|
+
virtual void connect(jsi::Runtime &rt, jsi::Function notifyMutationObservers, jsi::Function getPublicInstanceFromInstanceHandle) = 0;
|
|
8125
|
+
virtual void disconnect(jsi::Runtime &rt) = 0;
|
|
8126
|
+
virtual jsi::Array takeRecords(jsi::Runtime &rt) = 0;
|
|
8127
|
+
|
|
8128
|
+
};
|
|
8129
|
+
|
|
8130
|
+
template <typename T>
|
|
8131
|
+
class JSI_EXPORT NativeMutationObserverCxxSpec : public TurboModule {
|
|
8132
|
+
public:
|
|
8133
|
+
jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
8134
|
+
return delegate_.get(rt, propName);
|
|
8135
|
+
}
|
|
8136
|
+
|
|
8137
|
+
static constexpr std::string_view kModuleName = "NativeMutationObserverCxx";
|
|
8138
|
+
|
|
8139
|
+
protected:
|
|
8140
|
+
NativeMutationObserverCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
8141
|
+
: TurboModule(std::string{NativeMutationObserverCxxSpec::kModuleName}, jsInvoker),
|
|
8142
|
+
delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
|
|
8143
|
+
|
|
8144
|
+
|
|
8145
|
+
private:
|
|
8146
|
+
class Delegate : public NativeMutationObserverCxxSpecJSI {
|
|
8147
|
+
public:
|
|
8148
|
+
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
8149
|
+
NativeMutationObserverCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
|
|
8150
|
+
|
|
8151
|
+
}
|
|
8152
|
+
|
|
8153
|
+
void observe(jsi::Runtime &rt, jsi::Object options) override {
|
|
8154
|
+
static_assert(
|
|
8155
|
+
bridging::getParameterCount(&T::observe) == 2,
|
|
8156
|
+
"Expected observe(...) to have 2 parameters");
|
|
8157
|
+
|
|
8158
|
+
return bridging::callFromJs<void>(
|
|
8159
|
+
rt, &T::observe, jsInvoker_, instance_, std::move(options));
|
|
8160
|
+
}
|
|
8161
|
+
void unobserve(jsi::Runtime &rt, double mutationObserverId, jsi::Value targetShadowNode) override {
|
|
8162
|
+
static_assert(
|
|
8163
|
+
bridging::getParameterCount(&T::unobserve) == 3,
|
|
8164
|
+
"Expected unobserve(...) to have 3 parameters");
|
|
8165
|
+
|
|
8166
|
+
return bridging::callFromJs<void>(
|
|
8167
|
+
rt, &T::unobserve, jsInvoker_, instance_, std::move(mutationObserverId), std::move(targetShadowNode));
|
|
8168
|
+
}
|
|
8169
|
+
void connect(jsi::Runtime &rt, jsi::Function notifyMutationObservers, jsi::Function getPublicInstanceFromInstanceHandle) override {
|
|
8170
|
+
static_assert(
|
|
8171
|
+
bridging::getParameterCount(&T::connect) == 3,
|
|
8172
|
+
"Expected connect(...) to have 3 parameters");
|
|
8173
|
+
|
|
8174
|
+
return bridging::callFromJs<void>(
|
|
8175
|
+
rt, &T::connect, jsInvoker_, instance_, std::move(notifyMutationObservers), std::move(getPublicInstanceFromInstanceHandle));
|
|
8176
|
+
}
|
|
8177
|
+
void disconnect(jsi::Runtime &rt) override {
|
|
8178
|
+
static_assert(
|
|
8179
|
+
bridging::getParameterCount(&T::disconnect) == 1,
|
|
8180
|
+
"Expected disconnect(...) to have 1 parameters");
|
|
8181
|
+
|
|
8182
|
+
return bridging::callFromJs<void>(
|
|
8183
|
+
rt, &T::disconnect, jsInvoker_, instance_);
|
|
8184
|
+
}
|
|
8185
|
+
jsi::Array takeRecords(jsi::Runtime &rt) override {
|
|
8186
|
+
static_assert(
|
|
8187
|
+
bridging::getParameterCount(&T::takeRecords) == 1,
|
|
8188
|
+
"Expected takeRecords(...) to have 1 parameters");
|
|
8189
|
+
|
|
8190
|
+
return bridging::callFromJs<jsi::Array>(
|
|
8191
|
+
rt, &T::takeRecords, jsInvoker_, instance_);
|
|
8192
|
+
}
|
|
8193
|
+
|
|
8194
|
+
private:
|
|
8195
|
+
friend class NativeMutationObserverCxxSpec;
|
|
8196
|
+
T *instance_;
|
|
8197
|
+
};
|
|
8198
|
+
|
|
8199
|
+
Delegate delegate_;
|
|
8200
|
+
};
|
|
8201
|
+
|
|
8202
|
+
|
|
8203
|
+
|
|
7905
8204
|
class JSI_EXPORT NativePerformanceCxxSpecJSI : public TurboModule {
|
|
7906
8205
|
protected:
|
|
7907
8206
|
NativePerformanceCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
@@ -8137,7 +8436,7 @@ public:
|
|
|
8137
8436
|
virtual void logRawEntry(jsi::Runtime &rt, jsi::Object entry) = 0;
|
|
8138
8437
|
virtual jsi::Array getEventCounts(jsi::Runtime &rt) = 0;
|
|
8139
8438
|
virtual void setDurationThreshold(jsi::Runtime &rt, double entryType, double durationThreshold) = 0;
|
|
8140
|
-
virtual void clearEntries(jsi::Runtime &rt, double entryType, std::optional<jsi::String> entryName) = 0;
|
|
8439
|
+
virtual void clearEntries(jsi::Runtime &rt, std::optional<double> entryType, std::optional<jsi::String> entryName) = 0;
|
|
8141
8440
|
virtual jsi::Array getEntries(jsi::Runtime &rt, std::optional<double> entryType, std::optional<jsi::String> entryName) = 0;
|
|
8142
8441
|
virtual jsi::Array getSupportedPerformanceEntryTypes(jsi::Runtime &rt) = 0;
|
|
8143
8442
|
|
|
@@ -8230,7 +8529,7 @@ private:
|
|
|
8230
8529
|
return bridging::callFromJs<void>(
|
|
8231
8530
|
rt, &T::setDurationThreshold, jsInvoker_, instance_, std::move(entryType), std::move(durationThreshold));
|
|
8232
8531
|
}
|
|
8233
|
-
void clearEntries(jsi::Runtime &rt, double entryType, std::optional<jsi::String> entryName) override {
|
|
8532
|
+
void clearEntries(jsi::Runtime &rt, std::optional<double> entryType, std::optional<jsi::String> entryName) override {
|
|
8234
8533
|
static_assert(
|
|
8235
8534
|
bridging::getParameterCount(&T::clearEntries) == 3,
|
|
8236
8535
|
"Expected clearEntries(...) to have 3 parameters");
|