react-native-windows 0.75.4 → 0.76.0-preview.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (318) 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/KeyboardAvoidingView.js +17 -0
  33. package/Libraries/Components/Keyboard/KeyboardExt.js.map +1 -1
  34. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +1 -1
  35. package/Libraries/Components/ScrollView/ScrollView.js +131 -169
  36. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +3 -0
  37. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.windows.js +3 -0
  38. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
  39. package/Libraries/Components/StatusBar/StatusBar.js +3 -1
  40. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +10 -0
  41. package/Libraries/Components/TextInput/TextInput.d.ts +32 -2
  42. package/Libraries/Components/TextInput/TextInput.js +230 -94
  43. package/Libraries/Components/TextInput/TextInput.windows.js +230 -105
  44. package/Libraries/Components/View/ReactNativeStyleAttributes.js +23 -1
  45. package/Libraries/Components/View/ReactNativeViewAttributes.js +2 -0
  46. package/Libraries/Components/View/ReactNativeViewAttributes.windows.js +2 -0
  47. package/Libraries/Components/View/View.windows.js +32 -30
  48. package/Libraries/Components/View/ViewAccessibility.d.ts +15 -0
  49. package/Libraries/Components/View/ViewNativeComponent.js +0 -1
  50. package/Libraries/Components/View/ViewPropTypes.js +14 -0
  51. package/Libraries/Components/View/ViewPropTypes.windows.js +14 -0
  52. package/Libraries/Core/ExceptionsManager.js +2 -0
  53. package/Libraries/Core/InitializeCore.js +3 -1
  54. package/Libraries/Core/ReactFiberErrorDialog.js +3 -0
  55. package/Libraries/Core/ReactNativeVersion.js +4 -4
  56. package/Libraries/Core/setUpDeveloperTools.js +5 -1
  57. package/Libraries/Core/setUpErrorHandling.js +7 -1
  58. package/Libraries/Core/setUpGlobals.js +1 -0
  59. package/Libraries/Core/setUpReactRefresh.js +0 -4
  60. package/Libraries/Image/AssetSourceResolver.js +28 -1
  61. package/Libraries/Image/AssetSourceResolver.windows.js +28 -1
  62. package/Libraries/Image/Image.android.js +9 -14
  63. package/Libraries/Image/Image.ios.js +11 -22
  64. package/Libraries/Image/Image.windows.js +11 -22
  65. package/Libraries/Image/ImageBackground.js +1 -8
  66. package/Libraries/Image/ImageUtils.js +9 -9
  67. package/Libraries/Image/ImageViewNativeComponent.js +1 -0
  68. package/Libraries/Inspector/Inspector.js +3 -2
  69. package/Libraries/Inspector/InspectorPanel.js +16 -10
  70. package/Libraries/Inspector/NetworkOverlay.js +1 -1
  71. package/Libraries/Interaction/TaskQueue.js +1 -0
  72. package/Libraries/Lists/FlatList.js +1 -1
  73. package/Libraries/Lists/SectionList.js +2 -2
  74. package/Libraries/Lists/SectionListModern.js +3 -3
  75. package/Libraries/LogBox/Data/LogBoxData.js +24 -3
  76. package/Libraries/LogBox/LogBoxNotificationContainer.js +3 -2
  77. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +9 -8
  78. package/Libraries/LogBox/UI/LogBoxInspectorHeader.windows.js +9 -8
  79. package/Libraries/Modal/Modal.js +0 -1
  80. package/Libraries/NativeComponent/BaseViewConfig.android.js +9 -1
  81. package/Libraries/NativeComponent/BaseViewConfig.ios.js +17 -1
  82. package/Libraries/NativeComponent/BaseViewConfig.windows.js +17 -1
  83. package/Libraries/NativeComponent/NativeComponentRegistry.js +22 -22
  84. package/Libraries/NativeComponent/StaticViewConfigValidator.js +0 -21
  85. package/Libraries/Network/XMLHttpRequest.js +4 -2
  86. package/Libraries/ReactNative/AppContainer-dev.js +1 -5
  87. package/Libraries/ReactNative/AppContainer-prod.js +1 -5
  88. package/Libraries/ReactNative/AppContainer.js +1 -2
  89. package/Libraries/ReactNative/AppRegistry.d.ts +0 -4
  90. package/Libraries/ReactNative/AppRegistry.js +1 -7
  91. package/Libraries/ReactNative/BridgelessUIManager.js +1 -0
  92. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +1 -1
  93. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +5 -5
  94. package/Libraries/ReactNative/RendererImplementation.js +26 -4
  95. package/Libraries/ReactNative/getNativeComponentAttributes.js +12 -0
  96. package/Libraries/ReactNative/renderApplication.js +1 -3
  97. package/Libraries/Renderer/shims/ReactNativeTypes.js +11 -4
  98. package/Libraries/StyleSheet/StyleSheet.js +1 -1
  99. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +152 -2
  100. package/Libraries/StyleSheet/StyleSheetTypes.js +60 -5
  101. package/Libraries/StyleSheet/processBackgroundImage.js +384 -0
  102. package/Libraries/StyleSheet/processBoxShadow.js +209 -0
  103. package/Libraries/StyleSheet/processFilter.js +231 -42
  104. package/Libraries/Text/Text.js +394 -196
  105. package/Libraries/Text/Text.windows.js +476 -300
  106. package/Libraries/Text/TextNativeComponent.js +2 -1
  107. package/Libraries/TurboModule/TurboModuleRegistry.js +13 -50
  108. package/Libraries/Types/CodegenTypes.js +3 -1
  109. package/Libraries/Utilities/Appearance.js +108 -84
  110. package/Libraries/Utilities/DevLoadingView.js +2 -4
  111. package/Libraries/Utilities/HMRClient.js +8 -6
  112. package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
  113. package/Libraries/Utilities/createPerformanceLogger.js +0 -9
  114. package/Libraries/Utilities/stringifyViewConfig.js +22 -0
  115. package/Libraries/Utilities/useColorScheme.js +3 -3
  116. package/Libraries/WebSocket/WebSocket.js +1 -1
  117. package/Libraries/promiseRejectionTrackingOptions.js +1 -1
  118. package/Libraries/vendor/emitter/EventEmitter.js +6 -5
  119. package/Microsoft.ReactNative/ComponentView.idl +11 -0
  120. package/Microsoft.ReactNative/Composition.Input.idl +1 -0
  121. package/Microsoft.ReactNative/CompositionSwitcher.idl +3 -0
  122. package/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.cpp +9 -9
  123. package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.cpp +9 -9
  124. package/Microsoft.ReactNative/Fabric/ComponentView.cpp +7 -9
  125. package/Microsoft.ReactNative/Fabric/ComponentView.h +5 -6
  126. package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.cpp +4 -0
  127. package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.h +1 -0
  128. package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +44 -13
  129. package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +42 -5
  130. package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.cpp +1 -0
  131. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +81 -63
  132. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +2 -3
  133. package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.cpp +8 -6
  134. package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.h +1 -2
  135. package/Microsoft.ReactNative/Fabric/Composition/FocusManager.cpp +20 -6
  136. package/Microsoft.ReactNative/Fabric/Composition/FocusManager.h +13 -6
  137. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +2 -3
  138. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +1 -2
  139. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +72 -54
  140. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +14 -4
  141. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +26 -8
  142. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +5 -2
  143. package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +18 -7
  144. package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +1 -2
  145. package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.cpp +6 -6
  146. package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.h +1 -2
  147. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +97 -140
  148. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +8 -4
  149. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +18 -11
  150. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h +5 -4
  151. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp +0 -13
  152. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h +0 -3
  153. package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +29 -4
  154. package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +2 -0
  155. package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.cpp +1 -2
  156. package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.h +1 -2
  157. package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +28 -12
  158. package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/HostPlatformColor.h +33 -0
  159. package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.cpp +26 -9
  160. package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.h +10 -4
  161. package/Microsoft.ReactNative/IReactModuleBuilder.cpp +5 -0
  162. package/Microsoft.ReactNative/IReactModuleBuilder.h +1 -0
  163. package/Microsoft.ReactNative/IReactModuleBuilder.idl +9 -0
  164. package/Microsoft.ReactNative/IReactViewComponentBuilder.idl +8 -1
  165. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +2 -0
  166. package/Microsoft.ReactNative/Modules/AlertModule.cpp +3 -1
  167. package/Microsoft.ReactNative/Modules/AppearanceModule.cpp +1 -1
  168. package/Microsoft.ReactNative/Modules/AppearanceModule.h +7 -1
  169. package/Microsoft.ReactNative/Modules/DevSettingsModule.cpp +3 -3
  170. package/Microsoft.ReactNative/Modules/DevSettingsModule.h +1 -1
  171. package/Microsoft.ReactNative/Modules/LinkingManagerModule.cpp +2 -2
  172. package/Microsoft.ReactNative/Modules/LinkingManagerModule.h +1 -1
  173. package/Microsoft.ReactNative/Modules/LogBoxModule.cpp +9 -0
  174. package/Microsoft.ReactNative/Modules/LogBoxModule.h +2 -0
  175. package/Microsoft.ReactNative/Modules/SampleTurboModule.cpp +121 -0
  176. package/Microsoft.ReactNative/Modules/SampleTurboModule.h +90 -0
  177. package/Microsoft.ReactNative/ReactHost/MsoReactContext.cpp +0 -7
  178. package/Microsoft.ReactNative/ReactHost/MsoReactContext.h +0 -5
  179. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +5 -1
  180. package/Microsoft.ReactNative/ReactInstanceSettingsBuilder.cpp +59 -0
  181. package/Microsoft.ReactNative/ReactInstanceSettingsBuilder.h +23 -0
  182. package/Microsoft.ReactNative/ReactNativeAppBuilder.cpp +179 -0
  183. package/Microsoft.ReactNative/ReactNativeAppBuilder.h +35 -0
  184. package/Microsoft.ReactNative/ReactNativeAppBuilder.idl +69 -0
  185. package/Microsoft.ReactNative/ReactNativeIsland.idl +2 -0
  186. package/Microsoft.ReactNative/ReactNativeWin32App.cpp +82 -0
  187. package/Microsoft.ReactNative/ReactNativeWin32App.h +38 -0
  188. package/Microsoft.ReactNative/TurboModulesProvider.cpp +45 -0
  189. package/Microsoft.ReactNative/Views/DynamicAutomationPeer.cpp +2 -1
  190. package/Microsoft.ReactNative/Views/FlyoutViewManager.cpp +25 -16
  191. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems +3 -4
  192. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters +3 -0
  193. package/Microsoft.ReactNative.Cxx/ModuleRegistration.cpp +2 -2
  194. package/Microsoft.ReactNative.Cxx/ModuleRegistration.h +62 -4
  195. package/Microsoft.ReactNative.Cxx/NativeModules.h +131 -14
  196. package/Microsoft.ReactNative.Managed.CodeGen/ReactNativeNames.cs +10 -2
  197. package/PropertySheets/Autolink.props +1 -1
  198. package/PropertySheets/Bundle.props +1 -1
  199. package/PropertySheets/Codegen.props +1 -1
  200. package/PropertySheets/Generated/PackageVersion.g.props +4 -4
  201. package/PropertySheets/NuGet.LockFile.props +18 -0
  202. package/README.md +29 -29
  203. package/ReactCommon/ReactCommon.vcxproj +5 -1
  204. package/ReactCommon/ReactCommon.vcxproj.filters +11 -2
  205. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.cpp +2 -7
  206. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp +441 -0
  207. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.h +266 -0
  208. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/Utf8.h +56 -0
  209. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Base.h +3 -1
  210. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Bridging.h +2 -2
  211. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/CallbackWrapper.h +1 -1
  212. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Convert.h +172 -0
  213. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/EventEmitter.h +4 -5
  214. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Function.h +2 -2
  215. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h +1 -1
  216. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModuleUtils.h +3 -2
  217. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/scrollview/ScrollViewProps.cpp +9 -0
  218. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/LayoutableShadowNode.cpp +363 -0
  219. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/JSRuntimeFactory.h +22 -2
  220. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +118 -51
  221. package/Scripts/NuGetRestoreForceEvaluateAllSolutions.ps1 +8 -1
  222. package/Scripts/Tfs/Layout-MSRN-Headers.ps1 +2 -2
  223. package/Shared/Modules/WebSocketModule.cpp +1 -2
  224. package/Shared/Networking/WinRTWebSocketResource.cpp +4 -1
  225. package/Shared/Shared.vcxitems +38 -2
  226. package/Shared/Shared.vcxitems.filters +6 -1
  227. package/Shared/TurboModuleManager.cpp +0 -3
  228. package/codegen/NativeLinkingManagerSpec.g.h +3 -3
  229. package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +198 -54
  230. package/codegen/NativeSampleTurboModuleSpec.g.h +35 -0
  231. package/codegen/rnwcoreJSI-generated.cpp +245 -101
  232. package/codegen/rnwcoreJSI.h +847 -548
  233. package/index.js +3 -1
  234. package/index.windows.js +3 -1
  235. package/jest/mockComponent.js +4 -1
  236. package/jest/mockModal.js +1 -3
  237. package/jest/mockScrollView.js +1 -1
  238. package/jest/renderer.js +2 -2
  239. package/jest/setup.js +16 -13
  240. package/package.json +34 -30
  241. package/src/private/animated/NativeAnimatedHelper.js +438 -0
  242. package/src/private/animated/NativeAnimatedValidation.js +64 -0
  243. package/src/private/components/HScrollViewNativeComponents.js +56 -0
  244. package/src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE.js +29 -0
  245. package/src/private/components/VScrollViewNativeComponents.js +48 -0
  246. package/src/private/components/useSyncOnScroll.js +48 -0
  247. package/src/private/featureflags/ReactNativeFeatureFlags.js +166 -16
  248. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +29 -5
  249. package/src/private/fusebox/FuseboxSessionObserver.js +42 -0
  250. package/{Libraries/Core → src/private/renderer/errorhandling}/ErrorHandlers.js +14 -4
  251. package/src/private/setup/setUpDOM.js +28 -0
  252. package/src/private/setup/setUpIntersectionObserver.js +27 -0
  253. package/src/private/setup/setUpMutationObserver.js +26 -0
  254. package/src/private/setup/setUpPerformanceObserver.js +64 -0
  255. package/src/private/specs/modules/NativeAppearance.js +3 -3
  256. package/src/private/specs/modules/NativeLinkingManager.js +1 -1
  257. package/src/private/specs/modules/NativePlatformConstantsWindows.js +7 -0
  258. package/src/private/specs/modules/NativeSampleTurboModule.js +14 -1
  259. package/src/private/webapis/dom/nodes/ReadOnlyNode.js +6 -4
  260. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserver.js +5 -3
  261. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverEntry.js +3 -3
  262. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverManager.js +14 -17
  263. package/src/private/{specs/modules → webapis/intersectionobserver/specs}/NativeIntersectionObserver.js +2 -2
  264. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver/specs}/__mocks__/NativeIntersectionObserver.js +4 -4
  265. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserver.js +5 -3
  266. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserverManager.js +24 -15
  267. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationRecord.js +4 -6
  268. package/src/private/{specs/modules → webapis/mutationobserver/specs}/NativeMutationObserver.js +2 -2
  269. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver/specs}/__mocks__/NativeMutationObserver.js +5 -5
  270. package/src/private/webapis/performance/{EventCounts.js → EventTiming.js} +65 -3
  271. package/src/private/webapis/performance/LongTasks.js +39 -0
  272. package/src/private/webapis/performance/Performance.js +22 -9
  273. package/src/private/webapis/performance/PerformanceEntry.js +36 -18
  274. package/src/private/webapis/performance/PerformanceObserver.js +29 -43
  275. package/src/private/webapis/performance/RawPerformanceEntry.js +24 -1
  276. package/src/private/webapis/performance/UserTiming.js +17 -12
  277. package/src/private/webapis/performance/specs/NativePerformanceObserver.js +1 -1
  278. package/template/cpp-app/src/AutolinkedNativeModules.g.cpp +1 -1
  279. package/template/cpp-app/src/AutolinkedNativeModules.g.h +1 -1
  280. package/template/cs-app/src/AutolinkedNativeModules.g.cs +1 -1
  281. package/template/index.windows.bundle +1 -1
  282. package/template/metro.config.js +2 -2
  283. package/template/shared-app/src/AutolinkedNativeModules.g.props +1 -1
  284. package/template/shared-app/src/AutolinkedNativeModules.g.targets +1 -1
  285. package/templates/cpp-app/metro.config.js +2 -2
  286. package/templates/cpp-app/template.config.js +5 -5
  287. package/templates/cpp-app/windows/MyApp/AutolinkedNativeModules.g.cpp +1 -1
  288. package/templates/cpp-app/windows/MyApp/AutolinkedNativeModules.g.h +1 -1
  289. package/templates/cpp-app/windows/MyApp/MyApp.cpp +2 -0
  290. package/templates/cpp-app/windows/MyApp/MyApp.vcxproj +1 -1
  291. package/templates/cpp-lib/example/metro.config.js +2 -2
  292. package/templates/cpp-lib/template.config.js +3 -3
  293. package/templates/cpp-lib/windows/MyLib/MyLib.h +3 -3
  294. package/templates/cpp-lib/windows/MyLib/MyLib.vcxproj +1 -1
  295. package/types/experimental.d.ts +12 -98
  296. package/Common/packages.lock.json +0 -26
  297. package/Folly/packages.lock.json +0 -23
  298. package/Libraries/Animated/NativeAnimatedHelper.js +0 -615
  299. package/Libraries/Core/setUpIntersectionObserver.js +0 -16
  300. package/Libraries/Core/setUpMutationObserver.js +0 -16
  301. package/Libraries/Core/setUpPerformanceObserver.js +0 -18
  302. package/Libraries/IntersectionObserver/NativeIntersectionObserver.js +0 -13
  303. package/Libraries/MutationObserver/NativeMutationObserver.js +0 -13
  304. package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +0 -135
  305. package/Microsoft.ReactNative/packages.lock.json +0 -132
  306. package/Microsoft.ReactNative.Managed/packages.lock.json +0 -373
  307. package/Microsoft.ReactNative.Managed.CodeGen/packages.lock.json +0 -3197
  308. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/algorithm/CalculateLayout.cpp +0 -2396
  309. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/config/Config.cpp +0 -136
  310. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/config/Config.h +0 -92
  311. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/LayoutResults.cpp +0 -48
  312. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/LayoutResults.h +0 -122
  313. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/Node.cpp +0 -388
  314. package/ReactCommon/packages.lock.json +0 -30
  315. package/fmt/packages.lock.json +0 -13
  316. package/src/private/core/setUpDOM.js +0 -18
  317. package/src/private/webapis/performance/PerformanceEventTiming.js +0 -55
  318. /package/src/private/{core → styles}/composeStyles.js +0 -0
@@ -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
 
@@ -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.4</ReactNativeWindowsVersion>
13
+ <ReactNativeWindowsVersion>0.76.0-preview.2</ReactNativeWindowsVersion>
14
14
  <ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
15
- <ReactNativeWindowsMinor>75</ReactNativeWindowsMinor>
16
- <ReactNativeWindowsPatch>4</ReactNativeWindowsPatch>
15
+ <ReactNativeWindowsMinor>76</ReactNativeWindowsMinor>
16
+ <ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
17
17
  <ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
18
- <ReactNativeWindowsCommitId>cad883d48893bef40110a0f15be7abac071dd15b</ReactNativeWindowsCommitId>
18
+ <ReactNativeWindowsCommitId>c1536386579b67da32092327aacbb821730dab02</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.
@@ -118,7 +118,6 @@
118
118
  <ClInclude Include="$(ReactNativeDir)\ReactCommon\jsiexecutor\jsireact\JSIExecutor.h" />
119
119
  <ClInclude Include="$(ReactNativeDir)\ReactCommon\jsiexecutor\jsireact\JSINativeModules.h" />
120
120
  <ClInclude Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\InspectorInterfaces.h" />
121
- <ClInclude Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\ConsoleMessage.h" />
122
121
  <ClInclude Include="$(ReactNativeDir)\ReactCommon\logger\react_native_log.h" />
123
122
  <ClInclude Include="$(YogaDir)\yoga\YGEnums.h" />
124
123
  <ClInclude Include="$(YogaDir)\yoga\YGMacros.h" />
@@ -142,6 +141,7 @@
142
141
  <ClCompile Include="$(ReactNativeDir)\ReactCommon\jsiexecutor\jsireact\JSINativeModules.cpp" />
143
142
  <ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\InspectorInterfaces.cpp" />
144
143
  <ClCompile Include="$(ReactNativeDir)\ReactCommon\logger\react_native_log.cpp" />
144
+ <CLCompile Include="$(ReactNativeDir)\ReactCommon\reactperflogger\fusebox\FuseboxTracer.cpp" />
145
145
  <CLCompile Include="$(ReactNativeDir)\ReactCommon\reactperflogger\reactperflogger\BridgeNativeModulePerfLogger.cpp" />
146
146
  <ClCompile Include="$(YogaDir)\yoga\YGConfig.cpp" />
147
147
  <ClCompile Include="$(YogaDir)\yoga\YGEnums.cpp" />
@@ -167,6 +167,7 @@
167
167
  <ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\mapbuffer\MapBuffer.cpp" />
168
168
  <ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\mapbuffer\MapBufferBuilder.cpp" />
169
169
  <ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\telemetry\TransactionTelemetry.cpp" />
170
+ <CLCompile Include="$(ReactNativeDir)\ReactCommon\react\performance\timeline\PerformanceEntryReporter.cpp" />
170
171
  <ClCompile Include="$(YogaDir)\yoga\event\event.cpp" />
171
172
  <ClCompile Include="pch.cpp">
172
173
  <PrecompiledHeader>Create</PrecompiledHeader>
@@ -176,6 +177,9 @@
176
177
  <ClInclude Include="$(ReactNativeDir)\ReactCommon\react\nativemodule\core\ReactCommon\LongLivedObject.h" />
177
178
  <ClInclude Include="$(ReactNativeDir)\ReactCommon\react\bridging\CallbackWrapper.h" />
178
179
  <ClInclude Include="$(ReactNativeDir)\ReactCommon\react\bridging\EventEmitter.h" />
180
+ <ClInclude Include="$(ReactNativeDir)\ReactCommon\react\bridging\Function.h" />
181
+ <ClInclude Include="$(ReactNativeDir)\ReactCommon\react\bridging\Base.h" />
182
+ <ClInclude Include="$(ReactNativeDir)\ReactCommon\react\bridging\Convert.h" />
179
183
  <ClInclude Include="$(ReactNativeDir)\ReactCommon\react\nativemodule\core\ReactCommon\TurboCxxModule.h" />
180
184
  <ClInclude Include="$(ReactNativeDir)\ReactCommon\react\nativemodule\core\ReactCommon\TurboModule.h" />
181
185
  <ClInclude Include="$(ReactNativeDir)\ReactCommon\react\nativemodule\core\ReactCommon\TurboModuleBinding.h" />
@@ -324,11 +324,20 @@
324
324
  </ClInclude>
325
325
  <ClInclude Include="$(ReactNativeDir)\ReactCommon\react\bridging\CallbackWrapper.h">
326
326
  <Filter>react\bridging</Filter>
327
- </ClInclude><ClInclude Include="$(ReactNativeDir)\ReactCommon\react\bridging\EventEmitter.h">
327
+ </ClInclude>
328
+ <ClInclude Include="$(ReactNativeDir)\ReactCommon\react\bridging\EventEmitter.h" >
329
+ <Filter>react\bridging</Filter>
330
+ </ClInclude>
331
+ <ClInclude Include="$(ReactNativeDir)\ReactCommon\react\bridging\Function.h" >
332
+ <Filter>react\bridging</Filter>
333
+ </ClInclude>
334
+ <ClInclude Include="$(ReactNativeDir)\ReactCommon\react\bridging\Base.h" >
335
+ <Filter>react\bridging</Filter>
336
+ </ClInclude>
337
+ <ClInclude Include="$(ReactNativeDir)\ReactCommon\react\bridging\Convert.h" >
328
338
  <Filter>react\bridging</Filter>
329
339
  </ClInclude>
330
340
  <ClInclude Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\InspectorInterfaces.h" />
331
- <ClInclude Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\ConsoleMessage.h" />
332
341
  <ClInclude Include="$(ReactNativeDir)\ReactCommon\react\renderer\runtimescheduler\RuntimeScheduler_Legacy.h" />
333
342
  <ClInclude Include="$(ReactNativeDir)\ReactCommon\react\renderer\runtimescheduler\RuntimeScheduler_Modern.h" />
334
343
  <ClInclude Include="$(ReactNativeDir)\ReactCommon\react\renderer\core\PropsParserContext.h" />
@@ -13,6 +13,7 @@
13
13
  #include <jsinspector-modern/ReactCdp.h>
14
14
  #include <jsinspector-modern/ConsoleMessage.h>
15
15
 
16
+ #include <react/timing/primitives.h>
16
17
  #include <chrono>
17
18
 
18
19
  namespace facebook::react {
@@ -27,13 +28,7 @@ std::string JSExecutor::getSyntheticBundlePath(
27
28
  }
28
29
 
29
30
  double JSExecutor::performanceNow() {
30
- auto time = std::chrono::steady_clock::now();
31
- auto duration = std::chrono::duration_cast<std::chrono::nanoseconds>(
32
- time.time_since_epoch())
33
- .count();
34
-
35
- constexpr double NANOSECONDS_IN_MILLISECOND = 1000000.0;
36
- return duration / NANOSECONDS_IN_MILLISECOND;
31
+ return chronoToDOMHighResTimeStamp(std::chrono::steady_clock::now());
37
32
  }
38
33
 
39
34
  void JSExecutor::addConsoleMessage(jsi::Runtime& runtime, jsinspector_modern::ConsoleMessage message){