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.
Files changed (310) hide show
  1. package/.flowconfig +6 -4
  2. package/Directory.Build.props +4 -0
  3. package/Directory.Build.targets +5 -0
  4. package/Libraries/Alert/Alert.js +3 -0
  5. package/Libraries/Alert/Alert.windows.js +3 -0
  6. package/Libraries/Animated/AnimatedEvent.js +1 -1
  7. package/Libraries/Animated/AnimatedImplementation.js +7 -7
  8. package/Libraries/Animated/NativeAnimatedAllowlist.js +111 -0
  9. package/Libraries/Animated/animations/Animation.js +11 -1
  10. package/Libraries/Animated/animations/DecayAnimation.js +1 -1
  11. package/Libraries/Animated/animations/SpringAnimation.js +1 -1
  12. package/Libraries/Animated/animations/TimingAnimation.js +2 -1
  13. package/Libraries/Animated/components/AnimatedScrollView.js +3 -2
  14. package/Libraries/Animated/createAnimatedComponent.js +10 -9
  15. package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
  16. package/Libraries/Animated/nodes/AnimatedInterpolation.js +3 -2
  17. package/Libraries/Animated/nodes/AnimatedNode.js +42 -33
  18. package/Libraries/Animated/nodes/AnimatedObject.js +56 -50
  19. package/Libraries/Animated/nodes/AnimatedProps.js +77 -40
  20. package/Libraries/Animated/nodes/AnimatedStyle.js +103 -59
  21. package/Libraries/Animated/nodes/AnimatedTracking.js +1 -1
  22. package/Libraries/Animated/nodes/AnimatedTransform.js +102 -67
  23. package/Libraries/Animated/nodes/AnimatedValue.js +2 -1
  24. package/Libraries/Animated/nodes/AnimatedWithChildren.js +21 -22
  25. package/Libraries/Animated/useAnimatedProps.js +142 -7
  26. package/Libraries/BatchedBridge/NativeModules.js +2 -0
  27. package/Libraries/Blob/FileReader.js +1 -1
  28. package/Libraries/Blob/URL.js +2 -62
  29. package/Libraries/Blob/URLSearchParams.js +71 -0
  30. package/Libraries/Components/Button.windows.js +0 -1
  31. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -1
  32. package/Libraries/Components/Keyboard/KeyboardExt.js.map +1 -1
  33. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +1 -1
  34. package/Libraries/Components/ScrollView/ScrollView.js +131 -169
  35. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
  36. package/Libraries/Components/StatusBar/StatusBar.js +3 -1
  37. package/Libraries/Components/TextInput/TextInput.d.ts +32 -2
  38. package/Libraries/Components/TextInput/TextInput.js +230 -94
  39. package/Libraries/Components/TextInput/TextInput.windows.js +230 -105
  40. package/Libraries/Components/View/ReactNativeStyleAttributes.js +22 -0
  41. package/Libraries/Components/View/ReactNativeViewAttributes.js +2 -0
  42. package/Libraries/Components/View/ReactNativeViewAttributes.windows.js +2 -0
  43. package/Libraries/Components/View/View.windows.js +32 -30
  44. package/Libraries/Components/View/ViewAccessibility.d.ts +15 -0
  45. package/Libraries/Components/View/ViewNativeComponent.js +0 -1
  46. package/Libraries/Components/View/ViewPropTypes.js +14 -0
  47. package/Libraries/Components/View/ViewPropTypes.windows.js +14 -0
  48. package/Libraries/Core/ExceptionsManager.js +2 -0
  49. package/Libraries/Core/InitializeCore.js +3 -1
  50. package/Libraries/Core/ReactFiberErrorDialog.js +3 -0
  51. package/Libraries/Core/ReactNativeVersion.js +4 -4
  52. package/Libraries/Core/setUpErrorHandling.js +7 -1
  53. package/Libraries/Core/setUpGlobals.js +1 -0
  54. package/Libraries/Core/setUpReactRefresh.js +0 -4
  55. package/Libraries/Image/AssetSourceResolver.js +28 -1
  56. package/Libraries/Image/AssetSourceResolver.windows.js +28 -1
  57. package/Libraries/Image/Image.android.js +9 -14
  58. package/Libraries/Image/Image.ios.js +11 -22
  59. package/Libraries/Image/Image.windows.js +11 -22
  60. package/Libraries/Image/ImageBackground.js +1 -8
  61. package/Libraries/Image/ImageUtils.js +9 -9
  62. package/Libraries/Image/ImageViewNativeComponent.js +1 -0
  63. package/Libraries/Inspector/Inspector.js +3 -2
  64. package/Libraries/Inspector/InspectorPanel.js +16 -10
  65. package/Libraries/Inspector/NetworkOverlay.js +1 -1
  66. package/Libraries/Interaction/TaskQueue.js +1 -0
  67. package/Libraries/Lists/FlatList.js +1 -1
  68. package/Libraries/Lists/SectionList.js +2 -2
  69. package/Libraries/Lists/SectionListModern.js +3 -3
  70. package/Libraries/LogBox/Data/LogBoxData.js +24 -3
  71. package/Libraries/LogBox/LogBoxNotificationContainer.js +3 -2
  72. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +9 -8
  73. package/Libraries/LogBox/UI/LogBoxInspectorHeader.windows.js +9 -8
  74. package/Libraries/Modal/Modal.js +0 -1
  75. package/Libraries/NativeComponent/BaseViewConfig.android.js +8 -0
  76. package/Libraries/NativeComponent/BaseViewConfig.ios.js +7 -0
  77. package/Libraries/NativeComponent/BaseViewConfig.windows.js +7 -0
  78. package/Libraries/NativeComponent/NativeComponentRegistry.js +22 -22
  79. package/Libraries/NativeComponent/StaticViewConfigValidator.js +0 -21
  80. package/Libraries/Network/XMLHttpRequest.js +4 -2
  81. package/Libraries/ReactNative/AppContainer-dev.js +1 -5
  82. package/Libraries/ReactNative/AppContainer-prod.js +1 -5
  83. package/Libraries/ReactNative/AppContainer.js +1 -2
  84. package/Libraries/ReactNative/AppRegistry.d.ts +0 -4
  85. package/Libraries/ReactNative/AppRegistry.js +1 -7
  86. package/Libraries/ReactNative/BridgelessUIManager.js +1 -0
  87. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +1 -1
  88. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +5 -5
  89. package/Libraries/ReactNative/RendererImplementation.js +26 -4
  90. package/Libraries/ReactNative/getNativeComponentAttributes.js +8 -0
  91. package/Libraries/ReactNative/renderApplication.js +1 -3
  92. package/Libraries/Renderer/shims/ReactNativeTypes.js +11 -4
  93. package/Libraries/StyleSheet/StyleSheet.js +1 -1
  94. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +74 -15
  95. package/Libraries/StyleSheet/StyleSheetTypes.js +60 -5
  96. package/Libraries/StyleSheet/processBackgroundImage.js +384 -0
  97. package/Libraries/StyleSheet/processBoxShadow.js +211 -0
  98. package/Libraries/StyleSheet/processFilter.js +231 -42
  99. package/Libraries/Text/Text.js +394 -196
  100. package/Libraries/Text/Text.windows.js +476 -300
  101. package/Libraries/Text/TextNativeComponent.js +2 -1
  102. package/Libraries/TurboModule/TurboModuleRegistry.js +13 -50
  103. package/Libraries/Types/CodegenTypes.js +3 -1
  104. package/Libraries/Utilities/Appearance.js +108 -84
  105. package/Libraries/Utilities/DevLoadingView.js +2 -4
  106. package/Libraries/Utilities/HMRClient.js +2 -1
  107. package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
  108. package/Libraries/Utilities/createPerformanceLogger.js +0 -9
  109. package/Libraries/Utilities/stringifyViewConfig.js +22 -0
  110. package/Libraries/Utilities/useColorScheme.js +3 -3
  111. package/Libraries/WebSocket/WebSocket.js +1 -1
  112. package/Libraries/promiseRejectionTrackingOptions.js +1 -1
  113. package/Libraries/vendor/emitter/EventEmitter.js +6 -5
  114. package/Microsoft.ReactNative/ComponentView.idl +11 -0
  115. package/Microsoft.ReactNative/Composition.Input.idl +1 -0
  116. package/Microsoft.ReactNative/CompositionSwitcher.idl +3 -0
  117. package/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.cpp +9 -9
  118. package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.cpp +9 -9
  119. package/Microsoft.ReactNative/Fabric/ComponentView.cpp +7 -9
  120. package/Microsoft.ReactNative/Fabric/ComponentView.h +5 -6
  121. package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.cpp +4 -0
  122. package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.h +1 -0
  123. package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +44 -13
  124. package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +42 -5
  125. package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.cpp +1 -0
  126. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +81 -63
  127. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +2 -3
  128. package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.cpp +8 -6
  129. package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.h +1 -2
  130. package/Microsoft.ReactNative/Fabric/Composition/FocusManager.cpp +20 -6
  131. package/Microsoft.ReactNative/Fabric/Composition/FocusManager.h +13 -6
  132. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +2 -3
  133. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +1 -2
  134. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +72 -54
  135. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +14 -4
  136. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +26 -8
  137. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +5 -2
  138. package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +18 -7
  139. package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +1 -2
  140. package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.cpp +6 -6
  141. package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.h +1 -2
  142. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +97 -140
  143. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +8 -4
  144. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +18 -11
  145. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h +5 -4
  146. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp +0 -13
  147. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h +0 -3
  148. package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +29 -4
  149. package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +2 -0
  150. package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.cpp +1 -2
  151. package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.h +1 -2
  152. package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +28 -12
  153. package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/HostPlatformColor.h +33 -0
  154. package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.cpp +26 -9
  155. package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.h +10 -4
  156. package/Microsoft.ReactNative/IReactModuleBuilder.cpp +5 -0
  157. package/Microsoft.ReactNative/IReactModuleBuilder.h +1 -0
  158. package/Microsoft.ReactNative/IReactModuleBuilder.idl +9 -0
  159. package/Microsoft.ReactNative/IReactViewComponentBuilder.idl +8 -1
  160. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +2 -0
  161. package/Microsoft.ReactNative/Modules/AlertModule.cpp +3 -1
  162. package/Microsoft.ReactNative/Modules/AppearanceModule.cpp +1 -1
  163. package/Microsoft.ReactNative/Modules/AppearanceModule.h +7 -1
  164. package/Microsoft.ReactNative/Modules/DevSettingsModule.cpp +3 -3
  165. package/Microsoft.ReactNative/Modules/DevSettingsModule.h +1 -1
  166. package/Microsoft.ReactNative/Modules/LinkingManagerModule.cpp +2 -2
  167. package/Microsoft.ReactNative/Modules/LinkingManagerModule.h +1 -1
  168. package/Microsoft.ReactNative/Modules/LogBoxModule.cpp +9 -0
  169. package/Microsoft.ReactNative/Modules/LogBoxModule.h +2 -0
  170. package/Microsoft.ReactNative/Modules/SampleTurboModule.cpp +121 -0
  171. package/Microsoft.ReactNative/Modules/SampleTurboModule.h +90 -0
  172. package/Microsoft.ReactNative/ReactHost/MsoReactContext.cpp +0 -7
  173. package/Microsoft.ReactNative/ReactHost/MsoReactContext.h +0 -5
  174. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +5 -1
  175. package/Microsoft.ReactNative/ReactInstanceSettingsBuilder.cpp +59 -0
  176. package/Microsoft.ReactNative/ReactInstanceSettingsBuilder.h +23 -0
  177. package/Microsoft.ReactNative/ReactNativeAppBuilder.cpp +179 -0
  178. package/Microsoft.ReactNative/ReactNativeAppBuilder.h +35 -0
  179. package/Microsoft.ReactNative/ReactNativeAppBuilder.idl +69 -0
  180. package/Microsoft.ReactNative/ReactNativeIsland.idl +2 -0
  181. package/Microsoft.ReactNative/ReactNativeWin32App.cpp +82 -0
  182. package/Microsoft.ReactNative/ReactNativeWin32App.h +38 -0
  183. package/Microsoft.ReactNative/TurboModulesProvider.cpp +45 -0
  184. package/Microsoft.ReactNative/Views/DynamicAutomationPeer.cpp +2 -1
  185. package/Microsoft.ReactNative/Views/FlyoutViewManager.cpp +25 -16
  186. package/Microsoft.ReactNative/packages.fabric.lock.json +159 -0
  187. package/Microsoft.ReactNative/packages.lock.json +11 -12
  188. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems +3 -4
  189. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters +3 -0
  190. package/Microsoft.ReactNative.Cxx/ModuleRegistration.cpp +2 -2
  191. package/Microsoft.ReactNative.Cxx/ModuleRegistration.h +62 -4
  192. package/Microsoft.ReactNative.Cxx/NativeModules.h +131 -14
  193. package/Microsoft.ReactNative.Managed/packages.lock.json +9 -9
  194. package/Microsoft.ReactNative.Managed.CodeGen/ReactNativeNames.cs +10 -2
  195. package/PropertySheets/Autolink.props +1 -1
  196. package/PropertySheets/Bundle.props +1 -1
  197. package/PropertySheets/Codegen.props +1 -1
  198. package/PropertySheets/Generated/PackageVersion.g.props +4 -4
  199. package/PropertySheets/NuGet.LockFile.props +18 -0
  200. package/README.md +29 -29
  201. package/ReactCommon/ReactCommon.vcxproj +5 -1
  202. package/ReactCommon/ReactCommon.vcxproj.filters +11 -2
  203. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.cpp +2 -7
  204. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp +441 -0
  205. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.h +266 -0
  206. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/Utf8.h +56 -0
  207. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Base.h +3 -1
  208. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Bridging.h +2 -2
  209. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/CallbackWrapper.h +1 -1
  210. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Convert.h +172 -0
  211. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/EventEmitter.h +4 -5
  212. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Function.h +2 -2
  213. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h +1 -1
  214. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModuleUtils.h +3 -2
  215. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/scrollview/ScrollViewProps.cpp +9 -0
  216. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/LayoutableShadowNode.cpp +363 -0
  217. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/JSRuntimeFactory.h +22 -2
  218. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +118 -51
  219. package/ReactCommon/packages.lock.json +2 -2
  220. package/Scripts/NuGetRestoreForceEvaluateAllSolutions.ps1 +8 -1
  221. package/Scripts/Tfs/Layout-MSRN-Headers.ps1 +2 -2
  222. package/Shared/Modules/WebSocketModule.cpp +1 -2
  223. package/Shared/Networking/WinRTWebSocketResource.cpp +4 -1
  224. package/Shared/Shared.vcxitems +38 -2
  225. package/Shared/Shared.vcxitems.filters +6 -1
  226. package/Shared/TurboModuleManager.cpp +0 -3
  227. package/codegen/NativeLinkingManagerSpec.g.h +3 -3
  228. package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +198 -54
  229. package/codegen/NativeSampleTurboModuleSpec.g.h +35 -0
  230. package/codegen/rnwcoreJSI-generated.cpp +245 -101
  231. package/codegen/rnwcoreJSI.h +847 -548
  232. package/index.js +3 -1
  233. package/index.windows.js +3 -1
  234. package/jest/mockComponent.js +4 -1
  235. package/jest/mockModal.js +1 -3
  236. package/jest/mockScrollView.js +1 -1
  237. package/jest/renderer.js +2 -2
  238. package/jest/setup.js +16 -13
  239. package/package.json +26 -25
  240. package/src/private/animated/NativeAnimatedHelper.js +438 -0
  241. package/src/private/animated/NativeAnimatedValidation.js +64 -0
  242. package/src/private/components/HScrollViewNativeComponents.js +56 -0
  243. package/src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE.js +27 -0
  244. package/src/private/components/VScrollViewNativeComponents.js +48 -0
  245. package/src/private/components/useSyncOnScroll.js +48 -0
  246. package/src/private/featureflags/ReactNativeFeatureFlags.js +166 -16
  247. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +29 -5
  248. package/src/private/fusebox/FuseboxSessionObserver.js +42 -0
  249. package/{Libraries/Core → src/private/renderer/errorhandling}/ErrorHandlers.js +14 -4
  250. package/src/private/setup/setUpDOM.js +28 -0
  251. package/src/private/setup/setUpIntersectionObserver.js +27 -0
  252. package/src/private/setup/setUpMutationObserver.js +26 -0
  253. package/src/private/setup/setUpPerformanceObserver.js +64 -0
  254. package/src/private/specs/modules/NativeAppearance.js +3 -3
  255. package/src/private/specs/modules/NativeLinkingManager.js +1 -1
  256. package/src/private/specs/modules/NativePlatformConstantsWindows.js +7 -0
  257. package/src/private/specs/modules/NativeSampleTurboModule.js +14 -1
  258. package/src/private/webapis/dom/nodes/ReadOnlyNode.js +6 -4
  259. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserver.js +5 -3
  260. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverEntry.js +3 -3
  261. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverManager.js +14 -17
  262. package/src/private/{specs/modules → webapis/intersectionobserver/specs}/NativeIntersectionObserver.js +2 -2
  263. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver/specs}/__mocks__/NativeIntersectionObserver.js +4 -4
  264. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserver.js +5 -3
  265. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserverManager.js +24 -15
  266. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationRecord.js +4 -6
  267. package/src/private/{specs/modules → webapis/mutationobserver/specs}/NativeMutationObserver.js +2 -2
  268. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver/specs}/__mocks__/NativeMutationObserver.js +5 -5
  269. package/src/private/webapis/performance/{EventCounts.js → EventTiming.js} +65 -3
  270. package/src/private/webapis/performance/LongTasks.js +39 -0
  271. package/src/private/webapis/performance/Performance.js +22 -9
  272. package/src/private/webapis/performance/PerformanceEntry.js +36 -18
  273. package/src/private/webapis/performance/PerformanceObserver.js +29 -43
  274. package/src/private/webapis/performance/RawPerformanceEntry.js +24 -1
  275. package/src/private/webapis/performance/UserTiming.js +17 -12
  276. package/src/private/webapis/performance/specs/NativePerformanceObserver.js +1 -1
  277. package/template/cpp-app/src/AutolinkedNativeModules.g.cpp +1 -1
  278. package/template/cpp-app/src/AutolinkedNativeModules.g.h +1 -1
  279. package/template/cs-app/src/AutolinkedNativeModules.g.cs +1 -1
  280. package/template/index.windows.bundle +1 -1
  281. package/template/metro.config.js +2 -2
  282. package/template/shared-app/src/AutolinkedNativeModules.g.props +1 -1
  283. package/template/shared-app/src/AutolinkedNativeModules.g.targets +1 -1
  284. package/templates/cpp-app/metro.config.js +2 -2
  285. package/templates/cpp-app/template.config.js +5 -5
  286. package/templates/cpp-app/windows/MyApp/AutolinkedNativeModules.g.cpp +1 -1
  287. package/templates/cpp-app/windows/MyApp/AutolinkedNativeModules.g.h +1 -1
  288. package/templates/cpp-app/windows/MyApp/MyApp.cpp +2 -0
  289. package/templates/cpp-app/windows/MyApp/MyApp.vcxproj +1 -1
  290. package/templates/cpp-lib/example/metro.config.js +2 -2
  291. package/templates/cpp-lib/template.config.js +3 -3
  292. package/templates/cpp-lib/windows/MyLib/MyLib.h +3 -3
  293. package/templates/cpp-lib/windows/MyLib/MyLib.vcxproj +1 -1
  294. package/types/experimental.d.ts +20 -1
  295. package/Libraries/Animated/NativeAnimatedHelper.js +0 -615
  296. package/Libraries/Core/setUpIntersectionObserver.js +0 -16
  297. package/Libraries/Core/setUpMutationObserver.js +0 -16
  298. package/Libraries/Core/setUpPerformanceObserver.js +0 -18
  299. package/Libraries/IntersectionObserver/NativeIntersectionObserver.js +0 -13
  300. package/Libraries/MutationObserver/NativeMutationObserver.js +0 -13
  301. package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +0 -135
  302. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/algorithm/CalculateLayout.cpp +0 -2396
  303. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/config/Config.cpp +0 -136
  304. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/config/Config.h +0 -92
  305. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/LayoutResults.cpp +0 -48
  306. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/LayoutResults.h +0 -122
  307. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/Node.cpp +0 -388
  308. package/src/private/core/setUpDOM.js +0 -18
  309. package/src/private/webapis/performance/PerformanceEventTiming.js +0 -55
  310. /package/src/private/{core → styles}/composeStyles.js +0 -0
@@ -17,10 +17,20 @@
17
17
  // The macros below are internal implementation details for macro defined in nativeModules.h
18
18
  //
19
19
 
20
- // Register struct as a ReactNative module.
21
- #define INTERNAL_REACT_MODULE_3_ARGS(moduleStruct, moduleName, eventEmitterName) \
20
+ template <typename T>
21
+ struct IsReactTurboModule;
22
+
23
+ // Default to false if no specific override
24
+ template <typename T>
25
+ struct IsReactTurboModule : std::false_type {};
26
+
27
+ #define INTERNAL_REACT_MODULE_REGISTRATION_AND_PROVIDER( \
28
+ moduleStruct, moduleName, eventEmitterName, isReactTurboModule) \
22
29
  struct moduleStruct; \
23
30
  \
31
+ template <> \
32
+ struct IsReactTurboModule<moduleStruct> : std::isReactTurboModule##_type {}; \
33
+ \
24
34
  template <class TDummy> \
25
35
  struct moduleStruct##_ModuleRegistration final : winrt::Microsoft::ReactNative::ModuleRegistration { \
26
36
  moduleStruct##_ModuleRegistration() noexcept : winrt::Microsoft::ReactNative::ModuleRegistration{moduleName} {} \
@@ -29,6 +39,8 @@
29
39
  return winrt::Microsoft::ReactNative::MakeModuleProvider<moduleStruct>(); \
30
40
  } \
31
41
  \
42
+ bool ShouldRegisterAsTurboModule() const noexcept override { return isReactTurboModule; } \
43
+ \
32
44
  static const moduleStruct##_ModuleRegistration Registration; \
33
45
  }; \
34
46
  \
@@ -42,6 +54,9 @@
42
54
  moduleName, eventEmitterName, winrt::Microsoft::ReactNative::ReactAttributeId<__COUNTER__>{}); \
43
55
  }
44
56
 
57
+ #define INTERNAL_REACT_MODULE_3_ARGS(moduleStruct, moduleName, eventEmitterName) \
58
+ INTERNAL_REACT_MODULE_REGISTRATION_AND_PROVIDER(moduleStruct, moduleName, eventEmitterName, false)
59
+
45
60
  #define INTERNAL_REACT_MODULE_2_ARGS(moduleStruct, moduleName) \
46
61
  INTERNAL_REACT_MODULE_3_ARGS(moduleStruct, moduleName, L"")
47
62
 
@@ -51,15 +66,23 @@
51
66
  INTERNAL_REACT_RECOMPOSER_4( \
52
67
  (__VA_ARGS__, INTERNAL_REACT_MODULE_3_ARGS, INTERNAL_REACT_MODULE_2_ARGS, INTERNAL_REACT_MODULE_1_ARG, ))
53
68
 
54
- // Another version of REACT_MODULE but does not do auto registration
55
- #define INTERNAL_REACT_MODULE_NOREG_3_ARGS(moduleStruct, moduleName, eventEmitterName) \
69
+ #define INTERNAL_REACT_MODULE_NO_REGISTRATION_AND_PROVIDER( \
70
+ moduleStruct, moduleName, eventEmitterName, isReactTurboModule) \
56
71
  struct moduleStruct; \
72
+ \
73
+ template <> \
74
+ struct IsReactTurboModule<moduleStruct> : std::isReactTurboModule##_type {}; \
75
+ \
57
76
  template <class TRegistry> \
58
77
  constexpr void GetReactModuleInfo(moduleStruct *, TRegistry &registry) noexcept { \
59
78
  registry.RegisterModule( \
60
79
  moduleName, eventEmitterName, winrt::Microsoft::ReactNative::ReactAttributeId<__COUNTER__>{}); \
61
80
  }
62
81
 
82
+ // Another version of REACT_MODULE but does not do auto registration
83
+ #define INTERNAL_REACT_MODULE_NOREG_3_ARGS(moduleStruct, moduleName, eventEmitterName) \
84
+ INTERNAL_REACT_MODULE_NO_REGISTRATION_AND_PROVIDER(moduleStruct, moduleName, eventEmitterName, false)
85
+
63
86
  #define INTERNAL_REACT_MODULE_NOREG_2_ARGS(moduleStruct, moduleName) \
64
87
  INTERNAL_REACT_MODULE_NOREG_3_ARGS(moduleStruct, moduleName, L"")
65
88
 
@@ -73,6 +96,30 @@
73
96
  INTERNAL_REACT_MODULE_NOREG_2_ARGS, \
74
97
  INTERNAL_REACT_MODULE_NOREG_1_ARG, ))
75
98
 
99
+ #define INTERNAL_REACT_GET_ARG_3(arg1, arg2, arg3, ...) arg3
100
+ #define INTERNAL_REACT_RECOMPOSER_3(argsWithParentheses) INTERNAL_REACT_GET_ARG_3 argsWithParentheses
101
+
102
+ // Register struct as a ReactNative module.
103
+ #define INTERNAL_REACT_TURBO_MODULE_2_ARGS(moduleStruct, moduleName) \
104
+ INTERNAL_REACT_MODULE_REGISTRATION_AND_PROVIDER(moduleStruct, moduleName, L"", true)
105
+
106
+ #define INTERNAL_REACT_TURBO_MODULE_1_ARG(moduleStruct) \
107
+ INTERNAL_REACT_TURBO_MODULE_2_ARGS(moduleStruct, L## #moduleStruct)
108
+
109
+ #define INTERNAL_REACT_TURBO_MODULE(...) \
110
+ INTERNAL_REACT_RECOMPOSER_3((__VA_ARGS__, INTERNAL_REACT_TURBO_MODULE_2_ARGS, INTERNAL_REACT_TURBO_MODULE_1_ARG, ))
111
+
112
+ // Another version of REACT_MODULE but does not do auto registration
113
+ #define INTERNAL_REACT_TURBO_MODULE_NOREG_2_ARGS(moduleStruct, moduleName) \
114
+ INTERNAL_REACT_MODULE_NO_REGISTRATION_AND_PROVIDER(moduleStruct, moduleName, L"", true)
115
+
116
+ #define INTERNAL_REACT_TURBO_MODULE_NOREG_1_ARG(moduleStruct) \
117
+ INTERNAL_REACT_TURBO_MODULE_NOREG_2_ARGS(moduleStruct, L## #moduleStruct)
118
+
119
+ #define INTERNAL_REACT_TURBO_MODULE_NOREG(...) \
120
+ INTERNAL_REACT_RECOMPOSER_3( \
121
+ (__VA_ARGS__, INTERNAL_REACT_TURBO_MODULE_NOREG_2_ARGS, INTERNAL_REACT_TURBO_MODULE_NOREG_1_ARG, ))
122
+
76
123
  // Provide meta data information about struct member.
77
124
  // For each member with a 'custom attribute' macro we create a static method to provide meta data.
78
125
  // The member Id is generated as a ReactMemberId<__COUNTER__> type.
@@ -102,6 +149,7 @@ struct ModuleRegistration {
102
149
  ModuleRegistration(wchar_t const *moduleName) noexcept;
103
150
 
104
151
  virtual ReactModuleProvider MakeModuleProvider() const noexcept = 0;
152
+ virtual bool ShouldRegisterAsTurboModule() const noexcept = 0;
105
153
 
106
154
  static ModuleRegistration const *Head() noexcept {
107
155
  return s_head;
@@ -122,6 +170,16 @@ struct ModuleRegistration {
122
170
  static const ModuleRegistration *s_head;
123
171
  };
124
172
 
173
+ // AddAttributedModules(IReactPackageBuilder const &packageBuilder, bool useTurboModules = false)
174
+ // Arguments:
175
+ // - packageBuilder (required).
176
+ // - useTurboModules (optional) - If set to true, all modules will be registered as TurboModules.
177
+ // Consider moving modules to use REACT_TURBO_MODULE instead.
178
+ //
179
+ // AddAttributedModules will add all modules attributed with REACT_MODULE or REACT_TURBO_MODULE into packageBuilder.
180
+ // if useTurboModules is specified, then all modules will be registered using packageBuilder.AddTurboModules
181
+ // Otherwise modules attributed with REACT_MODULE will use packageBuilder.AddModule, and modules attributed with
182
+ // REACT_TURBO_MODULE will use packageBuilder.AddTurboModule.
125
183
  void AddAttributedModules(IReactPackageBuilder const &packageBuilder, bool useTurboModules = false) noexcept;
126
184
 
127
185
  bool TryAddAttributedModule(
@@ -27,14 +27,35 @@
27
27
  // REACT_MODULE annotates a C++ struct as a ReactNative module.
28
28
  // It can be any struct which can be instantiated using a default constructor.
29
29
  // Note that it must be a 'struct', not 'class' because macro does a forward declaration using the 'struct' keyword.
30
+ //
31
+ // REACT_EVENTs within a REACT_MODULE will trigger an event on a global event emitter, such as RCTDeviceEventEmitter.
32
+ // To use the newer EventEmitters exposed directly on this module, use REACT_TURBO_MODULE instead.
30
33
  #define REACT_MODULE(/* moduleStruct, [opt] moduleName, [opt] eventEmitterName */...) \
31
34
  INTERNAL_REACT_MODULE(__VA_ARGS__)(__VA_ARGS__)
32
35
 
36
+ // REACT_TURBO_MODULE(moduleStruct, [opt] moduleName)
37
+ // Arguments:
38
+ // - moduleStruct (required) - the struct name the macro is attached to.
39
+ // - moduleName (optional) - the module name visible to JavaScript. Default is the moduleStruct name.
40
+ //
41
+ // REACT_TURBO_MODULE annotates a C++ struct as a ReactNative module.
42
+ // It can be any struct which can be instantiated using a default constructor.
43
+ // Note that it must be a 'struct', not 'class' because macro does a forward declaration using the 'struct' keyword.
44
+ //
45
+ // REACT_EVENTs within a REACT_TURBO_MODULE will return a JS EventEmitter directly from the module.
46
+ #define REACT_TURBO_MODULE(/* moduleStruct, [opt] moduleName */...) \
47
+ INTERNAL_REACT_TURBO_MODULE(__VA_ARGS__)(__VA_ARGS__)
48
+
33
49
  // REACT_MODULE_NOREG is REACT_MODULE without auto registration
34
50
  // they have the same arguments
35
51
  #define REACT_MODULE_NOREG(/* moduleStruct, [opt] moduleName, [opt] eventEmitterName */...) \
36
52
  INTERNAL_REACT_MODULE_NOREG(__VA_ARGS__)(__VA_ARGS__)
37
53
 
54
+ // REACT_TURBO_MODULE_NOREG is REACT_TURBO_MODULE without auto registration
55
+ // they have the same arguments
56
+ #define REACT_TURBO_MODULE_NOREG(/* moduleStruct, [opt] moduleName */...) \
57
+ INTERNAL_REACT_TURBO_MODULE_NOREG(__VA_ARGS__)(__VA_ARGS__)
58
+
38
59
  // REACT_INIT(method)
39
60
  // Arguments:
40
61
  // - method (required) - the method name the macro is attached to.
@@ -145,6 +166,13 @@
145
166
  "\" to the attribute:\n" \
146
167
  " REACT_SYNC_METHOD(method, L\"" methodName "\")\n...\n"
147
168
 
169
+ #define REACT_SHOW_EVENT_SIGNATURES(eventName, signatures) \
170
+ " (see details below in output).\n" \
171
+ " It must be one of the following:\n" signatures \
172
+ " The C++ member name could be different. In that case add the L\"" eventName \
173
+ "\" to the attribute:\n" \
174
+ " REACT_EVENT(member, L\"" eventName "\")\n...\n"
175
+
148
176
  #define REACT_SHOW_CONSTANT_SPEC_ERRORS(index, typeName, signatures) \
149
177
  static_assert( \
150
178
  constantCheckResults[index].IsMethodFound, \
@@ -169,6 +197,18 @@
169
197
  methodCheckResults[index].IsSignatureMatching, \
170
198
  "Method '" methodName "' does not match signature" REACT_SHOW_SYNC_METHOD_SIGNATURES(methodName, signatures));
171
199
 
200
+ #define REACT_SHOW_EVENTEMITTER_SPEC_ERRORS(index, methodName, signatures) \
201
+ static_assert( \
202
+ methodCheckResults[index].IsTurboModule, \
203
+ "EventEmitter '" methodName \
204
+ "' requires that the module be a TurboModule. Use REACT_TURBO_MODULE rather than REACT_MODULE"); \
205
+ static_assert( \
206
+ methodCheckResults[index].IsMethodFound, \
207
+ "EventEmitter '" methodName "' is not defined" REACT_SHOW_EVENT_SIGNATURES(methodName, signatures)); \
208
+ static_assert( \
209
+ methodCheckResults[index].IsSignatureMatching, \
210
+ "EventEmitter '" methodName "' does not match signature" REACT_SHOW_EVENT_SIGNATURES(methodName, signatures));
211
+
172
212
  //
173
213
  // Code below helps to register React Native modules and verify method signatures
174
214
  // against specification.
@@ -711,6 +751,21 @@ struct ModuleSyncMethodInfo<TResult (*)(TArgs...) noexcept> : ModuleSyncMethodIn
711
751
  }
712
752
  };
713
753
 
754
+ template <class TFunc>
755
+ struct ModuleEventEmitterInfo;
756
+
757
+ // Instance EventEmitter function
758
+ template <class TModule, typename TFuncType>
759
+ struct ModuleEventEmitterInfo<TFuncType TModule::*> {
760
+ using ModuleType = TModule;
761
+
762
+ template <class TMethodSpec>
763
+ static constexpr bool Match() noexcept {
764
+ // TODO add validation of function type.
765
+ return true;
766
+ }
767
+ };
768
+
714
769
  template <class TField>
715
770
  struct ModuleConstFieldInfo;
716
771
 
@@ -813,20 +868,40 @@ struct ModuleEventFieldInfo<TFunc<void(TArgs...)> TModule::*> {
813
868
  using ModuleType = TModule;
814
869
  using EventType = TFunc<void(TArgs...)>;
815
870
  using FieldType = EventType TModule::*;
871
+ using IsTurboModule = IsReactTurboModule<ModuleType>;
816
872
 
817
873
  static InitializerDelegate GetEventHandlerInitializer(
818
874
  void *module,
819
875
  FieldType field,
820
876
  std::wstring_view eventName,
821
877
  std::wstring_view eventEmitterName) noexcept {
822
- return [module = static_cast<ModuleType *>(module), field, eventName, eventEmitterName](
823
- IReactContext const &reactContext) noexcept {
824
- module->*field = [reactContext, eventEmitterName, eventName](TArgs... args) noexcept {
825
- reactContext.EmitJSEvent(
826
- eventEmitterName, eventName, [&args...]([[maybe_unused]] IJSValueWriter const &argWriter) noexcept {
827
- (void)argWriter; // [[maybe_unused]] above does not work
828
- (WriteValue(argWriter, args), ...);
829
- });
878
+ if constexpr (IsTurboModule::value) {
879
+ return [module = static_cast<ModuleType *>(module), field](IReactContext const &) noexcept {
880
+ // Default emitter will do nothing
881
+ // This will be replaced with a method that will call the jsi EventEmitter when JS requests the emitter
882
+ module->*field = [](TArgs... args) noexcept {};
883
+ };
884
+ } else {
885
+ return [module = static_cast<ModuleType *>(module), field, eventName, eventEmitterName](
886
+ IReactContext const &reactContext) noexcept {
887
+ module->*field = [reactContext, eventEmitterName, eventName](TArgs... args) noexcept {
888
+ reactContext.EmitJSEvent(
889
+ eventEmitterName, eventName, [&args...]([[maybe_unused]] IJSValueWriter const &argWriter) noexcept {
890
+ (void)argWriter; // [[maybe_unused]] above does not work
891
+ (WriteValue(argWriter, args), ...);
892
+ });
893
+ };
894
+ };
895
+ }
896
+ }
897
+
898
+ static EventEmitterInitializerDelegate GetEventEmitterInitializer(void *module, FieldType field) noexcept {
899
+ return [module = static_cast<ModuleType *>(module), field](EmitEventSetterDelegate const &emitEventDelegate) {
900
+ module->*field = [emitEventDelegate](TArgs... args) noexcept {
901
+ emitEventDelegate([&args...]([[maybe_unused]] IJSValueWriter const &argWriter) noexcept {
902
+ (void)argWriter; // [[maybe_unused]] above does not work
903
+ (WriteValue(argWriter, args), ...);
904
+ });
830
905
  };
831
906
  };
832
907
  }
@@ -1015,6 +1090,10 @@ struct ReactModuleBuilder {
1015
1090
  auto eventHandlerInitializer = ModuleEventFieldInfo<TField>::GetEventHandlerInitializer(
1016
1091
  m_module, field, eventName, !eventEmitterName.empty() ? eventEmitterName : m_eventEmitterName);
1017
1092
  m_moduleBuilder.AddInitializer(eventHandlerInitializer);
1093
+ if constexpr (ModuleEventFieldInfo<TField>::IsTurboModule::value) {
1094
+ auto eventEmitterInitializer = ModuleEventFieldInfo<TField>::GetEventEmitterInitializer(m_module, field);
1095
+ m_moduleBuilder.AddEventEmitter(eventName, eventEmitterInitializer);
1096
+ }
1018
1097
  }
1019
1098
 
1020
1099
  template <class TField>
@@ -1143,6 +1222,28 @@ struct ReactSyncMethodVerifier {
1143
1222
  bool m_result{false};
1144
1223
  };
1145
1224
 
1225
+ template <class TModule, int I, class TMethodSpec>
1226
+ struct ReactEventEmitterVerifier {
1227
+ static constexpr bool IsTurboModule() noexcept {
1228
+ return IsReactTurboModule<TModule>::value;
1229
+ }
1230
+
1231
+ static constexpr bool Verify() noexcept {
1232
+ ReactEventEmitterVerifier verifier{};
1233
+ ReactMemberInfoIterator<TModule>{}.template GetMemberInfo<I>(verifier);
1234
+ return verifier.m_result;
1235
+ }
1236
+
1237
+ template <class TMember, class TAttribute, int I2>
1238
+ constexpr void
1239
+ Visit([[maybe_unused]] TMember member, ReactAttributeId<I2> /*attributeId*/, TAttribute /*attributeInfo*/) noexcept {
1240
+ m_result = ModuleEventEmitterInfo<TMember>::template Match<TMethodSpec>();
1241
+ }
1242
+
1243
+ private:
1244
+ bool m_result{false};
1245
+ };
1246
+
1146
1247
  struct TurboModuleSpec {
1147
1248
  template <class TSignature>
1148
1249
  struct TypedConstant {
@@ -1189,14 +1290,21 @@ struct TurboModuleSpec {
1189
1290
  struct Method : BaseMethodSpec {
1190
1291
  using BaseMethodSpec::BaseMethodSpec;
1191
1292
  using Signature = typename ModuleMethodInfoBase<TSignature>::Signature;
1192
- static constexpr bool IsSynchronous = false;
1293
+ static constexpr ReactMemberKind MemberKind = ReactMemberKind::AsyncMethod;
1193
1294
  };
1194
1295
 
1195
1296
  template <class TSignature>
1196
1297
  struct SyncMethod : BaseMethodSpec {
1197
1298
  using BaseMethodSpec::BaseMethodSpec;
1198
1299
  using Signature = typename ModuleSyncMethodInfoBase<TSignature>::Signature;
1199
- static constexpr bool IsSynchronous = true;
1300
+ static constexpr ReactMemberKind MemberKind = ReactMemberKind::SyncMethod;
1301
+ };
1302
+
1303
+ template <class TSignature>
1304
+ struct EventEmitter : BaseMethodSpec {
1305
+ using BaseMethodSpec::BaseMethodSpec;
1306
+ // using Signature = typename ModuleEventEmitterInfo<TSignature>::Signature;
1307
+ static constexpr ReactMemberKind MemberKind = ReactMemberKind::EventField;
1200
1308
  };
1201
1309
 
1202
1310
  template <class... TArgs>
@@ -1209,27 +1317,36 @@ struct TurboModuleSpec {
1209
1317
  bool IsUniqueName{false};
1210
1318
  bool IsMethodFound{false};
1211
1319
  bool IsSignatureMatching{true};
1320
+ bool IsTurboModule{false};
1212
1321
  };
1213
1322
 
1214
1323
  template <class TModule, class TModuleSpec, size_t I>
1215
1324
  static constexpr MethodCheckResult CheckMethod() noexcept {
1216
1325
  constexpr VerificationResult verificationResult = ReactModuleVerifier<TModule>::VerifyMember(
1217
- std::get<I>(TModuleSpec::methods).Name,
1218
- std::get<I>(TModuleSpec::methods).IsSynchronous ? ReactMemberKind::SyncMethod : ReactMemberKind::AsyncMethod);
1326
+ std::get<I>(TModuleSpec::methods).Name, std::get<I>(TModuleSpec::methods).MemberKind);
1219
1327
  MethodCheckResult result{};
1220
1328
  result.IsUniqueName = verificationResult.MethodNameCount <= 1;
1221
1329
  result.IsMethodFound = verificationResult.MatchCount == 1;
1222
1330
  if constexpr (verificationResult.MatchCount == 1) {
1223
- if constexpr (std::get<I>(TModuleSpec::methods).IsSynchronous) {
1331
+ if constexpr (std::get<I>(TModuleSpec::methods).MemberKind == ReactMemberKind::SyncMethod) {
1224
1332
  result.IsSignatureMatching = ReactSyncMethodVerifier<
1225
1333
  TModule,
1226
1334
  verificationResult.MatchedMemberId,
1227
1335
  RemoveConstRef<decltype(std::get<I>(TModuleSpec::methods))>>::Verify();
1228
- } else {
1336
+ } else if constexpr (std::get<I>(TModuleSpec::methods).MemberKind == ReactMemberKind::AsyncMethod) {
1229
1337
  result.IsSignatureMatching = ReactMethodVerifier<
1230
1338
  TModule,
1231
1339
  verificationResult.MatchedMemberId,
1232
1340
  RemoveConstRef<decltype(std::get<I>(TModuleSpec::methods))>>::Verify();
1341
+ } else if constexpr (std::get<I>(TModuleSpec::methods).MemberKind == ReactMemberKind::EventField) {
1342
+ result.IsTurboModule = ReactEventEmitterVerifier<
1343
+ TModule,
1344
+ verificationResult.MatchedMemberId,
1345
+ RemoveConstRef<decltype(std::get<I>(TModuleSpec::methods))>>::IsTurboModule();
1346
+ result.IsSignatureMatching = ReactEventEmitterVerifier<
1347
+ TModule,
1348
+ verificationResult.MatchedMemberId,
1349
+ RemoveConstRef<decltype(std::get<I>(TModuleSpec::methods))>>::Verify();
1233
1350
  }
1234
1351
  }
1235
1352
 
@@ -26,8 +26,8 @@
26
26
  },
27
27
  "boost": {
28
28
  "type": "Transitive",
29
- "resolved": "1.76.0",
30
- "contentHash": "p+w3YvNdXL8Cu9Fzrmexssu0tZbWxuf6ywsQqHjDlKFE5ojXHof1HIyMC3zDLfLnh80dIeFcEUAuR2Asg/XHRA=="
29
+ "resolved": "1.83.0",
30
+ "contentHash": "cy53VNMzysEMvhBixDe8ujPk67Fcj3v6FPHQnH91NYJNLHpc6jxa2xq9ruCaaJjE4M3YrGSHDi4uUSTGBWw6EQ=="
31
31
  },
32
32
  "Microsoft.Build.Tasks.Git": {
33
33
  "type": "Transitive",
@@ -36,8 +36,8 @@
36
36
  },
37
37
  "Microsoft.JavaScript.Hermes": {
38
38
  "type": "Transitive",
39
- "resolved": "0.1.21",
40
- "contentHash": "5njCh+3eXTLOv7+8nOnp6nJ5C0r6it5ze54c0nuWleeDptuK8t3dEDB79XTU4D5DKNvAPlqJpgXRDOak5nYIug=="
39
+ "resolved": "0.1.23",
40
+ "contentHash": "cA9t1GjY4Yo0JD1AfA//e1lOwk48hLANfuX6GXrikmEBNZVr2TIX5ONJt5tqCnpZyLz6xGiPDgTfFNKbSfb21g=="
41
41
  },
42
42
  "Microsoft.Net.Native.Compiler": {
43
43
  "type": "Transitive",
@@ -161,7 +161,7 @@
161
161
  "common": {
162
162
  "type": "Project",
163
163
  "dependencies": {
164
- "boost": "[1.76.0, )"
164
+ "boost": "[1.83.0, )"
165
165
  }
166
166
  },
167
167
  "fmt": {
@@ -170,7 +170,7 @@
170
170
  "folly": {
171
171
  "type": "Project",
172
172
  "dependencies": {
173
- "boost": "[1.76.0, )",
173
+ "boost": "[1.83.0, )",
174
174
  "fmt": "[1.0.0, )"
175
175
  }
176
176
  },
@@ -179,18 +179,18 @@
179
179
  "dependencies": {
180
180
  "Common": "[1.0.0, )",
181
181
  "Folly": "[1.0.0, )",
182
- "Microsoft.JavaScript.Hermes": "[0.1.21, )",
182
+ "Microsoft.JavaScript.Hermes": "[0.1.23, )",
183
183
  "Microsoft.SourceLink.GitHub": "[1.1.1, )",
184
184
  "Microsoft.UI.Xaml": "[2.8.0, )",
185
185
  "ReactCommon": "[1.0.0, )",
186
- "boost": "[1.76.0, )"
186
+ "boost": "[1.83.0, )"
187
187
  }
188
188
  },
189
189
  "reactcommon": {
190
190
  "type": "Project",
191
191
  "dependencies": {
192
192
  "Folly": "[1.0.0, )",
193
- "boost": "[1.76.0, )"
193
+ "boost": "[1.83.0, )"
194
194
  }
195
195
  }
196
196
  },
@@ -86,10 +86,14 @@ namespace Microsoft.ReactNative.Managed.CodeGen
86
86
  public static readonly SyntaxToken Arg4LocalName = Identifier("arg4");
87
87
  public static readonly SyntaxToken Arg5LocalName = Identifier("arg5");
88
88
  public static readonly SyntaxToken Arg6LocalName = Identifier("arg6");
89
+ public static readonly SyntaxToken Arg7LocalName = Identifier("arg7");
90
+ public static readonly SyntaxToken Arg8LocalName = Identifier("arg8");
91
+ public static readonly SyntaxToken Arg9LocalName = Identifier("arg9");
89
92
 
90
93
  public static readonly SyntaxToken[] ArgLocalNames = new SyntaxToken[] {
91
94
  Arg0LocalName, Arg1LocalName, Arg2LocalName, Arg3LocalName,
92
- Arg4LocalName, Arg5LocalName, Arg6LocalName,
95
+ Arg4LocalName, Arg5LocalName, Arg6LocalName, Arg7LocalName,
96
+ Arg8LocalName, Arg9LocalName
93
97
  };
94
98
 
95
99
  public static readonly SyntaxToken Value0LocalName = Identifier("value0");
@@ -99,10 +103,14 @@ namespace Microsoft.ReactNative.Managed.CodeGen
99
103
  public static readonly SyntaxToken Value4LocalName = Identifier("value4");
100
104
  public static readonly SyntaxToken Value5LocalName = Identifier("value5");
101
105
  public static readonly SyntaxToken Value6LocalName = Identifier("value6");
106
+ public static readonly SyntaxToken Value7LocalName = Identifier("value7");
107
+ public static readonly SyntaxToken Value8LocalName = Identifier("value8");
108
+ public static readonly SyntaxToken Value9LocalName = Identifier("value9");
102
109
 
103
110
  public static readonly SyntaxToken[] ValueLocalNames = new SyntaxToken[] {
104
111
  Value0LocalName, Value1LocalName, Value2LocalName, Value3LocalName,
105
- Value4LocalName, Value5LocalName, Value6LocalName,
112
+ Value4LocalName, Value5LocalName, Value6LocalName, Value7LocalName,
113
+ Value8LocalName, Value9LocalName
106
114
  };
107
115
  }
108
116
  }
@@ -7,7 +7,7 @@
7
7
 
8
8
  <PropertyGroup>
9
9
  <RunAutolinkCheck Condition="'$(RunAutolinkCheck)' == ''">true</RunAutolinkCheck>
10
- <AutolinkCommand Condition="'$(AutolinkCommand)' == ''">npx react-native autolink-windows</AutolinkCommand>
10
+ <AutolinkCommand Condition="'$(AutolinkCommand)' == ''">npx @react-native-community/cli autolink-windows</AutolinkCommand>
11
11
  <AutolinkCommandWorkingDir Condition="'$(AutolinkCommandWorkingDir)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(ProjectDir), 'package.json'))</AutolinkCommandWorkingDir>
12
12
  <AutolinkCommandArgs Condition="'$(AutolinkCommandArgs)' == '' And '$(SolutionPath)' != '' And '$(SolutionPath)' != '*Undefined*' And '$(ProjectPath)' != ''">--check --sln "$([MSBuild]::MakeRelative($(AutolinkCommandWorkingDir), $(SolutionPath)))" --proj "$([MSBuild]::MakeRelative($(AutolinkCommandWorkingDir), $(ProjectPath)))"</AutolinkCommandArgs>
13
13
  <AutolinkCommandArgs Condition="'$(AutolinkCommandArgs)' == ''">--check</AutolinkCommandArgs>
@@ -39,7 +39,7 @@
39
39
  <BundlerExtraArgs Condition="'$(BundlerExtraArgs)' == '' AND '$(UseHermes)' == 'true'">--minify false</BundlerExtraArgs>
40
40
 
41
41
  <!-- Command to use to create a bundle -->
42
- <BundleCliCommand Condition="'$(BundleCliCommand)' == ''">npx react-native bundle</BundleCliCommand>
42
+ <BundleCliCommand Condition="'$(BundleCliCommand)' == ''">npx @react-native-community/cli bundle</BundleCliCommand>
43
43
 
44
44
  <!-- This should be the app package root, this is where the bundle command will be run from -->
45
45
  <BundleCommandWorkingDir Condition="'$(BundleCommandWorkingDir)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(ProjectDir), 'package.json'))</BundleCommandWorkingDir>
@@ -7,7 +7,7 @@
7
7
 
8
8
  <PropertyGroup>
9
9
  <RunCodegenWindows Condition="'$(RunCodegenWindows)' == ''">true</RunCodegenWindows>
10
- <CodegenCommand Condition="'$(CodegenCommand)' == ''">npx react-native codegen-windows</CodegenCommand>
10
+ <CodegenCommand Condition="'$(CodegenCommand)' == ''">npx @react-native-community/cli codegen-windows</CodegenCommand>
11
11
  <CodegenCommandWorkingDir Condition="'$(CodegenCommandWorkingDir)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(ProjectDir), 'package.json'))</CodegenCommandWorkingDir>
12
12
  <CodegenCommandArgs Condition="'$(CodegenCommandArgs)' == ''">--logging</CodegenCommandArgs>
13
13
  </PropertyGroup>
@@ -10,11 +10,11 @@
10
10
  -->
11
11
  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
12
12
  <PropertyGroup>
13
- <ReactNativeWindowsVersion>0.75.3</ReactNativeWindowsVersion>
13
+ <ReactNativeWindowsVersion>0.76.0-preview.1</ReactNativeWindowsVersion>
14
14
  <ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
15
- <ReactNativeWindowsMinor>75</ReactNativeWindowsMinor>
16
- <ReactNativeWindowsPatch>3</ReactNativeWindowsPatch>
15
+ <ReactNativeWindowsMinor>76</ReactNativeWindowsMinor>
16
+ <ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
17
17
  <ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
18
- <ReactNativeWindowsCommitId>934e59cd622aa07dd9b01d0b8366e6b86cdf4896</ReactNativeWindowsCommitId>
18
+ <ReactNativeWindowsCommitId>9466fbbd47256b118422eceb46214f3a3283392a</ReactNativeWindowsCommitId>
19
19
  </PropertyGroup>
20
20
  </Project>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+
4
+ <!-- This props file is intended to make sure in-repo projects restore with a NuGet
5
+ lock file for compliance reasons, and furthermore to help differentiate the
6
+ lock file (i.e. packages.lock.json) for projects that we build in in different
7
+ variants, such as Paper vs. Fabric, Hermes vs. Chakra, etc.
8
+ -->
9
+
10
+ <PropertyGroup>
11
+ <RestoreLockedMode Condition="'$(RestoreLockedMode)'=='' OR '$(BuildingInRnwRepo)'=='true'">true</RestoreLockedMode>
12
+ <NuGetLockFileName>packages</NuGetLockFileName>
13
+ <NuGetLockFileName Condition="'$(UseFabric)'=='true'">$(NuGetLockFileName).fabric</NuGetLockFileName>
14
+ <NuGetLockFileName Condition="'$(UseExperimentalWinUI3)'=='true'">$(NuGetLockFileName).experimentalwinui3</NuGetLockFileName>
15
+ <NuGetLockFilePath>.\$(NuGetLockFileName).lock.json</NuGetLockFilePath>
16
+ </PropertyGroup>
17
+
18
+ </Project>
package/README.md CHANGED
@@ -1,22 +1,20 @@
1
- <h1 align="center"> React Native for Windows </h1>
1
+ ![Hero Image with Logo](https://github.com/microsoft/react-native-windows/raw/main/.github/hero2.png)
2
2
 
3
- <p align="center">
4
- Build native Windows apps with React.
5
- </p>
3
+ <h1 align="center"> React Native for Windows </h1>
6
4
 
7
5
  <p align="center">
8
- <a href="https://github.com/microsoft/react-native-windows/blob/main/LICENSE">
9
- <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="React Native for Windows is released under the MIT license." />
10
- </a>
11
- <a href="https://www.npmjs.org/package/react-native-windows">
12
- <img src="https://img.shields.io/npm/v/react-native-windows?color=e80441&label=react-native-windows" alt="Current npm package version." />
13
- </a>
14
- <a href="https://github.com/microsoft/react-native-windows#contributing">
15
- <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs welcome!" />
6
+ <a href="https://twitter.com/intent/follow?&screen_name=ReactNativeMSFT">
7
+ <img src="https://img.shields.io/twitter/follow/windowsui.svg?label=Follow ReactNativeMSFT on X" alt="Follow @windowsui" />
16
8
  </a>
17
9
  </p>
18
10
 
19
- ![Hero Image with Logo](https://github.com/microsoft/react-native-windows/raw/main/.github/hero2.png)
11
+ <h3 align="center">
12
+ <a href="https://microsoft.github.io/react-native-windows">Website</a>
13
+ <span> · </span>
14
+ <a href="https://microsoft.github.io/react-native-windows/docs/getting-started">Documentation</a>
15
+ <span> · </span>
16
+ <a href="https://github.com/microsoft/react-native-windows/releases">Release notes</a>
17
+ </h3>
20
18
 
21
19
  > See the official [React Native website](https://reactnative.dev/) for an introduction to React Native.
22
20
 
@@ -26,22 +24,27 @@ This repository adds support for the [Windows 10 SDK](https://developer.microsof
26
24
 
27
25
  Visit the official [React Native for Windows + macOS website](https://microsoft.github.io/react-native-windows) to learn more.
28
26
 
29
- ## Contents
30
-
31
- - [Roadmap](#status-and-roadmap)
32
- - [Getting Started](#getting-started)
33
- - [Documentation](#documentation)
34
- - [Contributing](#contributing)
35
- - [License](#license)
36
- - [Code of Conduct](#code-of-conduct)
37
-
38
- ## Status and roadmap
27
+ ## 🛣️ Roadmap
39
28
  [Check out our blog](https://microsoft.github.io/react-native-windows/blog/) if you'd like to stay up to date on the status of React Native for Windows and check out current and past roadmaps.
40
29
 
41
30
  ### New Architecture
42
- [Fabric](https://reactnative.dev/architecture/fabric-renderer) is the new rendering system for React Native, designed to share more rendering logic cross-platform. RNW's existing Paper renderer is built on UWP XAML, dropping down into native Composition as need be; the new RNW Fabric renderer targets Composition from the start but has the ability to host islands of XAML for advanced native controls. Apps on the new architecture will be [WinAppSDK](https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/) Win32 by default. For detailed on our roadmap to Fabric, check out [this pinned issue](https://github.com/microsoft/react-native-windows/issues/12042).
31
+ [Fabric](https://reactnative.dev/architecture/fabric-renderer) is the new rendering system for React Native, designed to share more rendering logic cross-platform. RNW's existing Paper renderer is built on UWP XAML, dropping down into native Composition as need be; the new RNW Fabric renderer targets Composition from the start but has the ability to host islands of XAML for advanced native controls. Apps on the new architecture will be [WinAppSDK](https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/) Win32 by default. For more details on our roadmap to Fabric, check out [this pinned issue](https://github.com/microsoft/react-native-windows/issues/12042).
32
+
33
+ ## 🖼️ React Native Gallery
34
+ Make sure to also check out the [React Native Gallery](https://github.com/microsoft/react-native-gallery), our interactive sample experience showing everything you can do with React Native for Windows.
35
+
36
+ <p align="center">
37
+ <img src="docs/img/rn-gallery.png" alt="WinUI 3 Gallery" width="400"/>
38
+ </p>
39
+ <p align="center">
40
+ <a href="https://www.microsoft.com/en-us/p/react-native-gallery/9npg0b292h4r?launch=true
41
+ &mode=mini">
42
+ <img src="docs/img/storeBadge.png" width="200"/>
43
+ </a>
44
+ </p>
45
+ </br>
43
46
 
44
- ## Getting Started
47
+ ## 📋 Getting Started
45
48
  See the [Getting Started Guide](https://microsoft.github.io/react-native-windows/docs/getting-started) on our React Native for Windows + macOS website to build your first React Native for Windows app.
46
49
 
47
50
  ### Requirements
@@ -62,13 +65,10 @@ React Native has [great documentation](https://reactnative.dev/docs/getting-star
62
65
  - Check out the [React Native Developer Blog](https://devblogs.microsoft.com/react-native/) to see examples from past conference talks, blog posts, and more.
63
66
  - For more sample code browse the [RNTester folder](https://github.com/microsoft/react-native-windows/tree/main/packages/e2e-test-app/windows/RNTesterApp) in the GitHub web UI.
64
67
 
65
- ## Contributing
68
+ ## 📢 Contributing
66
69
  See [Contributing guidelines](https://github.com/microsoft/react-native-windows/blob/main/CONTRIBUTING.md) for how to setup your fork of the repo and start a PR to contribute to React Native for Windows.
67
70
 
68
71
  Not sure where to start? The [good first issue](https://github.com/microsoft/react-native-windows/labels/good%20first%20issue) and [help wanted](https://github.com/microsoft/react-native-windows/labels/help%20wanted) labels are the best starting points.
69
72
 
70
- ## License
71
- The React Native Windows extension, including modifications to the original Meta source code, and all newly contributed code is provided under the [MIT License](LICENSE). Portions of the React Native Windows extension derived from React Native are copyright Meta.
72
-
73
73
  ## Code of Conduct
74
74
  This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.