react-native-windows 0.75.4 → 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 +57 -0
  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 +29 -29
  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
@@ -8,14 +8,16 @@
8
8
  * @flow strict
9
9
  */
10
10
 
11
- export type HighResTimeStamp = number;
12
- export type PerformanceEntryType = 'mark' | 'measure' | 'event';
11
+ // flowlint unsafe-getters-setters:off
12
+
13
+ export type DOMHighResTimeStamp = number;
14
+ export type PerformanceEntryType = 'mark' | 'measure' | 'event' | 'longtask';
13
15
 
14
16
  export type PerformanceEntryJSON = {
15
17
  name: string,
16
18
  entryType: PerformanceEntryType,
17
- startTime: HighResTimeStamp,
18
- duration: HighResTimeStamp,
19
+ startTime: DOMHighResTimeStamp,
20
+ duration: DOMHighResTimeStamp,
19
21
  ...
20
22
  };
21
23
 
@@ -25,29 +27,45 @@ export const ALWAYS_LOGGED_ENTRY_TYPES: $ReadOnlyArray<PerformanceEntryType> = [
25
27
  ];
26
28
 
27
29
  export class PerformanceEntry {
28
- name: string;
29
- entryType: PerformanceEntryType;
30
- startTime: HighResTimeStamp;
31
- duration: HighResTimeStamp;
30
+ #name: string;
31
+ #entryType: PerformanceEntryType;
32
+ #startTime: DOMHighResTimeStamp;
33
+ #duration: DOMHighResTimeStamp;
32
34
 
33
35
  constructor(init: {
34
36
  name: string,
35
37
  entryType: PerformanceEntryType,
36
- startTime: HighResTimeStamp,
37
- duration: HighResTimeStamp,
38
+ startTime: DOMHighResTimeStamp,
39
+ duration: DOMHighResTimeStamp,
38
40
  }) {
39
- this.name = init.name;
40
- this.entryType = init.entryType;
41
- this.startTime = init.startTime;
42
- this.duration = init.duration;
41
+ this.#name = init.name;
42
+ this.#entryType = init.entryType;
43
+ this.#startTime = init.startTime;
44
+ this.#duration = init.duration;
45
+ }
46
+
47
+ get name(): string {
48
+ return this.#name;
49
+ }
50
+
51
+ get entryType(): PerformanceEntryType {
52
+ return this.#entryType;
53
+ }
54
+
55
+ get startTime(): DOMHighResTimeStamp {
56
+ return this.#startTime;
57
+ }
58
+
59
+ get duration(): DOMHighResTimeStamp {
60
+ return this.#duration;
43
61
  }
44
62
 
45
63
  toJSON(): PerformanceEntryJSON {
46
64
  return {
47
- name: this.name,
48
- entryType: this.entryType,
49
- startTime: this.startTime,
50
- duration: this.duration,
65
+ name: this.#name,
66
+ entryType: this.#entryType,
67
+ startTime: this.#startTime,
68
+ duration: this.#duration,
51
69
  };
52
70
  }
53
71
  }
@@ -8,11 +8,14 @@
8
8
  * @flow strict
9
9
  */
10
10
 
11
- import type {HighResTimeStamp, PerformanceEntryType} from './PerformanceEntry';
11
+ import type {
12
+ DOMHighResTimeStamp,
13
+ PerformanceEntryType,
14
+ } from './PerformanceEntry';
12
15
 
13
16
  import warnOnce from '../../../../Libraries/Utilities/warnOnce';
17
+ import {PerformanceEventTiming} from './EventTiming';
14
18
  import {PerformanceEntry} from './PerformanceEntry';
15
- import PerformanceEventTiming from './PerformanceEventTiming';
16
19
  import {
17
20
  performanceEntryTypeToRaw,
18
21
  rawToPerformanceEntry,
@@ -66,13 +69,13 @@ export type PerformanceObserverInit =
66
69
  }
67
70
  | {
68
71
  type: PerformanceEntryType,
69
- durationThreshold?: HighResTimeStamp,
72
+ durationThreshold?: DOMHighResTimeStamp,
70
73
  };
71
74
 
72
75
  type PerformanceObserverConfig = {|
73
76
  callback: PerformanceObserverCallback,
74
- // Map of {entryType: durationThreshold}
75
- entryTypes: $ReadOnlyMap<PerformanceEntryType, ?number>,
77
+ entryTypes: $ReadOnlySet<PerformanceEntryType>,
78
+ durationThreshold: ?number,
76
79
  |};
77
80
 
78
81
  const observerCountPerEntryType: Map<PerformanceEntryType, number> = new Map();
@@ -97,8 +100,15 @@ const onPerformanceEntry = () => {
97
100
  if (!observerConfig.entryTypes.has(entry.entryType)) {
98
101
  return false;
99
102
  }
100
- const durationThreshold = observerConfig.entryTypes.get(entry.entryType);
101
- return entry.duration >= (durationThreshold ?? 0);
103
+
104
+ if (
105
+ entry.entryType === 'event' &&
106
+ observerConfig.durationThreshold != null
107
+ ) {
108
+ return entry.duration >= observerConfig.durationThreshold;
109
+ }
110
+
111
+ return true;
102
112
  });
103
113
  if (entriesForObserver.length !== 0) {
104
114
  try {
@@ -122,21 +132,11 @@ export function warnNoNativePerformanceObserver() {
122
132
  }
123
133
 
124
134
  function applyDurationThresholds() {
125
- const durationThresholds: Map<PerformanceEntryType, ?number> = Array.from(
126
- registeredObservers.values(),
127
- )
128
- .map(config => config.entryTypes)
129
- .reduce(
130
- (accumulator, currentValue) => union(accumulator, currentValue),
131
- new Map(),
132
- );
133
-
134
- for (const [entryType, durationThreshold] of durationThresholds) {
135
- NativePerformanceObserver?.setDurationThreshold(
136
- performanceEntryTypeToRaw(entryType),
137
- durationThreshold ?? 0,
138
- );
139
- }
135
+ const durationThresholds = Array.from(registeredObservers.values())
136
+ .map(observerConfig => observerConfig.durationThreshold)
137
+ .filter(Boolean);
138
+
139
+ return Math.min(...durationThresholds);
140
140
  }
141
141
 
142
142
  function getSupportedPerformanceEntryTypes(): $ReadOnlyArray<PerformanceEntryType> {
@@ -174,7 +174,7 @@ function getSupportedPerformanceEntryTypes(): $ReadOnlyArray<PerformanceEntryTyp
174
174
  * });
175
175
  * observer.observe({ type: "event" });
176
176
  */
177
- export default class PerformanceObserver {
177
+ export class PerformanceObserver {
178
178
  #callback: PerformanceObserverCallback;
179
179
  #type: 'single' | 'multiple' | void;
180
180
 
@@ -194,14 +194,10 @@ export default class PerformanceObserver {
194
194
 
195
195
  if (options.entryTypes) {
196
196
  this.#type = 'multiple';
197
- requestedEntryTypes = new Map(
198
- options.entryTypes.map(t => [t, undefined]),
199
- );
197
+ requestedEntryTypes = new Set(options.entryTypes);
200
198
  } else {
201
199
  this.#type = 'single';
202
- requestedEntryTypes = new Map([
203
- [options.type, options.durationThreshold],
204
- ]);
200
+ requestedEntryTypes = new Set([options.type]);
205
201
  }
206
202
 
207
203
  // The same observer may receive multiple calls to "observe", so we need
@@ -218,6 +214,8 @@ export default class PerformanceObserver {
218
214
 
219
215
  registeredObservers.set(this, {
220
216
  callback: this.#callback,
217
+ durationThreshold:
218
+ options.type === 'event' ? options.durationThreshold : undefined,
221
219
  entryTypes: nextEntryTypes,
222
220
  });
223
221
 
@@ -322,20 +320,8 @@ export default class PerformanceObserver {
322
320
  getSupportedPerformanceEntryTypes();
323
321
  }
324
322
 
325
- // As a Set union, except if value exists in both, we take minimum
326
- function union<T>(
327
- a: $ReadOnlyMap<T, ?number>,
328
- b: $ReadOnlyMap<T, ?number>,
329
- ): Map<T, ?number> {
330
- const res = new Map<T, ?number>();
331
- for (const [k, v] of a) {
332
- if (!b.has(k)) {
333
- res.set(k, v);
334
- } else {
335
- res.set(k, Math.min(v ?? 0, b.get(k) ?? 0));
336
- }
337
- }
338
- return res;
323
+ function union<T>(a: $ReadOnlySet<T>, b: $ReadOnlySet<T>): Set<T> {
324
+ return new Set([...a, ...b]);
339
325
  }
340
326
 
341
327
  function difference<T>(a: $ReadOnlySet<T>, b: $ReadOnlySet<T>): Set<T> {
@@ -14,13 +14,16 @@ import type {
14
14
  RawPerformanceEntryType,
15
15
  } from './specs/NativePerformanceObserver';
16
16
 
17
+ import {PerformanceEventTiming} from './EventTiming';
18
+ import {PerformanceLongTaskTiming} from './LongTasks';
17
19
  import {PerformanceEntry} from './PerformanceEntry';
18
- import PerformanceEventTiming from './PerformanceEventTiming';
20
+ import {PerformanceMark, PerformanceMeasure} from './UserTiming';
19
21
 
20
22
  export const RawPerformanceEntryTypeValues = {
21
23
  MARK: 1,
22
24
  MEASURE: 2,
23
25
  EVENT: 3,
26
+ LONGTASK: 4,
24
27
  };
25
28
 
26
29
  export function rawToPerformanceEntry(
@@ -35,6 +38,22 @@ export function rawToPerformanceEntry(
35
38
  processingEnd: entry.processingEnd,
36
39
  interactionId: entry.interactionId,
37
40
  });
41
+ } else if (entry.entryType === RawPerformanceEntryTypeValues.LONGTASK) {
42
+ return new PerformanceLongTaskTiming({
43
+ name: entry.name,
44
+ entryType: rawToPerformanceEntryType(entry.entryType),
45
+ startTime: entry.startTime,
46
+ duration: entry.duration,
47
+ });
48
+ } else if (entry.entryType === RawPerformanceEntryTypeValues.MARK) {
49
+ return new PerformanceMark(entry.name, {
50
+ startTime: entry.startTime,
51
+ });
52
+ } else if (entry.entryType === RawPerformanceEntryTypeValues.MEASURE) {
53
+ return new PerformanceMeasure(entry.name, {
54
+ startTime: entry.startTime,
55
+ duration: entry.duration,
56
+ });
38
57
  } else {
39
58
  return new PerformanceEntry({
40
59
  name: entry.name,
@@ -55,6 +74,8 @@ export function rawToPerformanceEntryType(
55
74
  return 'measure';
56
75
  case RawPerformanceEntryTypeValues.EVENT:
57
76
  return 'event';
77
+ case RawPerformanceEntryTypeValues.LONGTASK:
78
+ return 'longtask';
58
79
  default:
59
80
  throw new TypeError(
60
81
  `rawToPerformanceEntryType: unexpected performance entry type received: ${type}`,
@@ -72,6 +93,8 @@ export function performanceEntryTypeToRaw(
72
93
  return RawPerformanceEntryTypeValues.MEASURE;
73
94
  case 'event':
74
95
  return RawPerformanceEntryTypeValues.EVENT;
96
+ case 'longtask':
97
+ return RawPerformanceEntryTypeValues.LONGTASK;
75
98
  default:
76
99
  // Verify exhaustive check with Flow
77
100
  (type: empty);
@@ -8,24 +8,25 @@
8
8
  * @flow strict
9
9
  */
10
10
 
11
- import type {HighResTimeStamp} from './PerformanceEntry';
11
+ // flowlint unsafe-getters-setters:off
12
+
13
+ import type {DOMHighResTimeStamp} from './PerformanceEntry';
12
14
 
13
15
  import {PerformanceEntry} from './PerformanceEntry';
14
16
 
15
- type DetailType = mixed;
17
+ export type DetailType = mixed;
16
18
 
17
19
  export type PerformanceMarkOptions = {
18
20
  detail?: DetailType,
19
- startTime?: HighResTimeStamp,
21
+ startTime?: DOMHighResTimeStamp,
20
22
  };
21
23
 
22
- export type TimeStampOrName = HighResTimeStamp | string;
24
+ export type TimeStampOrName = DOMHighResTimeStamp | string;
23
25
 
24
- export type PerformanceMeasureOptions = {
26
+ export type PerformanceMeasureInit = {
25
27
  detail?: DetailType,
26
- start?: TimeStampOrName,
27
- end?: TimeStampOrName,
28
- duration?: HighResTimeStamp,
28
+ startTime?: DOMHighResTimeStamp,
29
+ duration?: DOMHighResTimeStamp,
29
30
  };
30
31
 
31
32
  export class PerformanceMark extends PerformanceEntry {
@@ -46,18 +47,22 @@ export class PerformanceMark extends PerformanceEntry {
46
47
  }
47
48
 
48
49
  export class PerformanceMeasure extends PerformanceEntry {
49
- detail: DetailType;
50
+ #detail: DetailType;
50
51
 
51
- constructor(measureName: string, measureOptions?: PerformanceMeasureOptions) {
52
+ constructor(measureName: string, measureOptions?: PerformanceMeasureInit) {
52
53
  super({
53
54
  name: measureName,
54
55
  entryType: 'measure',
55
- startTime: 0,
56
+ startTime: measureOptions?.startTime ?? 0,
56
57
  duration: measureOptions?.duration ?? 0,
57
58
  });
58
59
 
59
60
  if (measureOptions) {
60
- this.detail = measureOptions.detail;
61
+ this.#detail = measureOptions.detail;
61
62
  }
62
63
  }
64
+
65
+ get detail(): DetailType {
66
+ return this.#detail;
67
+ }
63
68
  }
@@ -46,7 +46,7 @@ export interface Spec extends TurboModule {
46
46
  durationThreshold: number,
47
47
  ) => void;
48
48
  +clearEntries: (
49
- entryType: RawPerformanceEntryType,
49
+ entryType?: RawPerformanceEntryType,
50
50
  entryName?: string,
51
51
  ) => void;
52
52
  +getEntries: (
@@ -1,4 +1,4 @@
1
- // AutolinkedNativeModules.g.cpp contents generated by "react-native autolink-windows"
1
+ // AutolinkedNativeModules.g.cpp contents generated by "npx @react-native-community/cli autolink-windows"
2
2
  // clang-format off
3
3
  #include "pch.h"
4
4
  #include "AutolinkedNativeModules.g.h"{{ &autolinkCppIncludes }}
@@ -1,4 +1,4 @@
1
- // AutolinkedNativeModules.g.h contents generated by "react-native autolink-windows"
1
+ // AutolinkedNativeModules.g.h contents generated by "npx @react-native-community/cli autolink-windows"
2
2
  // clang-format off
3
3
  #pragma once
4
4
 
@@ -1,4 +1,4 @@
1
- // AutolinkedNativeModules.g.cs contents generated by "react-native autolink-windows"
1
+ // AutolinkedNativeModules.g.cs contents generated by "npx @react-native-community/cli autolink-windows"
2
2
 
3
3
  using System.Collections.Generic;{{ &autolinkCsUsingNamespaces }}
4
4
 
@@ -2,7 +2,7 @@
2
2
  *
3
3
  * Be sure to generate this file using the CLI:
4
4
  *
5
- * npx react-native bundle --platform windows --entry-file index.js
5
+ * npx @react-native-community/cli bundle --platform windows --entry-file index.js
6
6
  * --bundle-output windows\{{ name }}\Bundle\index.windows.bundle
7
7
  * --assets-dest windows\{{ name }}\Bundle
8
8
  *
@@ -26,11 +26,11 @@ const config = {
26
26
  // devMode]{{/devMode}}
27
27
  resolver: {
28
28
  blockList: exclusionList([
29
- // This stops "react-native run-windows" from causing the metro server to crash if its already running
29
+ // This stops "npx @react-native-community/cli run-windows" from causing the metro server to crash if its already running
30
30
  new RegExp(
31
31
  `${path.resolve(__dirname, 'windows').replace(/[/\\]/g, '/')}.*`,
32
32
  ),
33
- // This prevents "react-native run-windows" from hitting: EBUSY: resource busy or locked, open msbuild.ProjectImports.zip or other files produced by msbuild
33
+ // This prevents "npx @react-native-community/cli run-windows" from hitting: EBUSY: resource busy or locked, open msbuild.ProjectImports.zip or other files produced by msbuild
34
34
  new RegExp(`${rnwPath}/build/.*`),
35
35
  new RegExp(`${rnwPath}/target/.*`),
36
36
  /.*\.ProjectImports\.zip/,
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
- <!-- AutolinkedNativeModules.g.props contents generated by "react-native autolink-windows" -->
3
+ <!-- AutolinkedNativeModules.g.props contents generated by "npx @react-native-community/cli autolink-windows" -->
4
4
  <PropertyGroup>{{ &autolinkPropertiesForProps }}
5
5
  </PropertyGroup>
6
6
  </Project>
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
- <!-- AutolinkedNativeModules.g.targets contents generated by "react-native autolink-windows" -->
3
+ <!-- AutolinkedNativeModules.g.targets contents generated by "npx @react-native-community/cli autolink-windows" -->
4
4
  <ItemGroup>{{ &autolinkProjectReferencesForTargets }}
5
5
  </ItemGroup>
6
6
  </Project>
@@ -26,11 +26,11 @@ const config = {
26
26
  // devMode]{{/devMode}}
27
27
  resolver: {
28
28
  blockList: exclusionList([
29
- // This stops "react-native run-windows" from causing the metro server to crash if its already running
29
+ // This stops "npx @react-native-community/cli run-windows" from causing the metro server to crash if its already running
30
30
  new RegExp(
31
31
  `${path.resolve(__dirname, 'windows').replace(/[/\\]/g, '/')}.*`,
32
32
  ),
33
- // This prevents "react-native run-windows" from hitting: EBUSY: resource busy or locked, open msbuild.ProjectImports.zip or other files produced by msbuild
33
+ // This prevents "npx @react-native-community/cli run-windows" from hitting: EBUSY: resource busy or locked, open msbuild.ProjectImports.zip or other files produced by msbuild
34
34
  new RegExp(`${rnwPath}/build/.*`),
35
35
  new RegExp(`${rnwPath}/target/.*`),
36
36
  /.*\.ProjectImports\.zip/,
@@ -7,10 +7,10 @@
7
7
  */
8
8
 
9
9
  const chalk = require('chalk');
10
+ const crypto = require('crypto');
10
11
  const existsSync = require('fs').existsSync;
11
12
  const path = require('path');
12
13
  const username = require('username');
13
- const uuid = require('uuid');
14
14
  const util = require('util');
15
15
 
16
16
  const glob = util.promisify(require('glob'));
@@ -30,8 +30,8 @@ async function getFileMappings(config = {}, options = {}) {
30
30
  const projectGuid =
31
31
  config?.project?.windows?.project?.projectGuid
32
32
  ?.replace('{', '')
33
- .replace('}', '') ?? uuid.v4();
34
- const packageGuid = uuid.v4();
33
+ .replace('}', '') ?? crypto.randomUUID();
34
+ const packageGuid = crypto.randomUUID();
35
35
  const currentUser = username.sync(); // Gets the current username depending on the platform.
36
36
 
37
37
  const appJsonPath = path.join(config?.root ?? process.cwd(), 'app.json');
@@ -114,7 +114,7 @@ async function postInstall(config = {}, options = {}) {
114
114
  // Update package.json with new scripts and dependencies
115
115
  await templateUtils.updateProjectPackageJson(config, options, {
116
116
  scripts: {
117
- windows: 'react-native run-windows',
117
+ windows: 'npx @react-native-community/cli run-windows',
118
118
  'test:windows': 'jest --config jest.config.windows.js',
119
119
  },
120
120
  devDependencies: {
@@ -126,7 +126,7 @@ async function postInstall(config = {}, options = {}) {
126
126
  await templateUtils.runNpmInstall(config, options);
127
127
 
128
128
  console.log(chalk.white.bold('To run your new windows app:'));
129
- console.log(chalk.white(' npx react-native run-windows'));
129
+ console.log(chalk.white(' npx @react-native-community/cli run-windows'));
130
130
  }
131
131
 
132
132
  module.exports = {
@@ -1,4 +1,4 @@
1
- // AutolinkedNativeModules.g.cpp contents generated by "react-native autolink-windows"
1
+ // AutolinkedNativeModules.g.cpp contents generated by "npx @react-native-community/cli autolink-windows"
2
2
  // clang-format off
3
3
  #include "pch.h"
4
4
  #include "AutolinkedNativeModules.g.h"{{ &autolinkCppIncludes }}
@@ -1,4 +1,4 @@
1
- // AutolinkedNativeModules.g.h contents generated by "react-native autolink-windows"
1
+ // AutolinkedNativeModules.g.h contents generated by "npx @react-native-community/cli autolink-windows"
2
2
  // clang-format off
3
3
  #pragma once
4
4
 
@@ -35,6 +35,7 @@ void UpdateRootViewSizeToAppWindow(
35
35
  if (window.Presenter().as<winrt::Microsoft::UI::Windowing::OverlappedPresenter>().State() !=
36
36
  winrt::Microsoft::UI::Windowing::OverlappedPresenterState::Minimized) {
37
37
  winrt::Microsoft::ReactNative::LayoutConstraints constraints;
38
+ constraints.LayoutDirection = winrt::Microsoft::ReactNative::LayoutDirection::Undefined;
38
39
  constraints.MaximumSize = constraints.MinimumSize = size;
39
40
  rootView.Arrange(constraints, {0,0});
40
41
  }
@@ -132,6 +133,7 @@ _Use_decl_annotations_ int CALLBACK WinMain(HINSTANCE instance, HINSTANCE, PSTR
132
133
  // state
133
134
  auto async = host.UnloadInstance();
134
135
  async.Completed([host](auto asyncInfo, winrt::Windows::Foundation::AsyncStatus asyncStatus) {
136
+ asyncStatus;
135
137
  assert(asyncStatus == winrt::Windows::Foundation::AsyncStatus::Completed);
136
138
  host.InstanceSettings().UIDispatcher().Post([]() { PostQuitMessage(0); });
137
139
  });
@@ -71,7 +71,7 @@
71
71
  <PrecompiledHeader>Use</PrecompiledHeader>
72
72
  <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
73
73
  <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
74
- <WarningLevel>Level3</WarningLevel>
74
+ <WarningLevel>Level4</WarningLevel>
75
75
  <SDLCheck>true</SDLCheck>
76
76
  <AdditionalOptions>%(AdditionalOptions) /bigobj</AdditionalOptions>
77
77
  <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
@@ -38,11 +38,11 @@ const config = {
38
38
  (m) =>
39
39
  new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`)
40
40
  ).concat([
41
- // This stops "react-native run-windows" from causing the metro server to crash if its already running
41
+ // This stops "npx @react-native-community/cli run-windows" from causing the metro server to crash if its already running
42
42
  new RegExp(
43
43
  `${path.resolve(__dirname, 'windows').replace(/[/\\]/g, '/')}.*`,
44
44
  ),
45
- // This prevents "react-native run-windows" from hitting: EBUSY: resource busy or locked, open msbuild.ProjectImports.zip or other files produced by msbuild
45
+ // This prevents "npx @react-native-community/cli run-windows" from hitting: EBUSY: resource busy or locked, open msbuild.ProjectImports.zip or other files produced by msbuild
46
46
  new RegExp(`${rnwPath}/build/.*`),
47
47
  new RegExp(`${rnwPath}/target/.*`),
48
48
  /.*\.ProjectImports\.zip/,
@@ -6,10 +6,10 @@
6
6
  * @format
7
7
  */
8
8
 
9
+ const crypto = require('crypto');
9
10
  const existsSync = require('fs').existsSync;
10
11
  const path = require('path');
11
12
  const username = require('username');
12
- const uuid = require('uuid');
13
13
  const util = require('util');
14
14
 
15
15
  const glob = util.promisify(require('glob'));
@@ -87,7 +87,7 @@ async function getFileMappings(config = {}, options = {}) {
87
87
  const projectGuid =
88
88
  libConfig?.project?.windows?.projects[0]?.projectGuid
89
89
  ?.replace('{', '')
90
- .replace('}', '') ?? uuid.v4();
90
+ .replace('}', '') ?? crypto.randomUUID();
91
91
  const currentUser = username.sync(); // Gets the current username depending on the platform.
92
92
 
93
93
  const cppNugetPackages = [];
@@ -210,7 +210,7 @@ async function postInstall(config = {}, options = {}) {
210
210
  // Update example package.json with new scripts and dependencies
211
211
  await templateUtils.updateProjectPackageJson(exConfig, exOptions, {
212
212
  scripts: {
213
- windows: 'react-native run-windows',
213
+ windows: 'npx @react-native-community/cli run-windows',
214
214
  'test:windows': 'jest --config jest.config.windows.js',
215
215
  },
216
216
  dependencies: {
@@ -3,10 +3,10 @@
3
3
  #include "pch.h"
4
4
  #include "resource.h"
5
5
 
6
- #if __has_include("codegen\Native{{ pascalName }}DataTypes.g.h")
7
- #include "codegen\Native{{ pascalName }}DataTypes.g.h"
6
+ #if __has_include("codegen/Native{{ pascalName }}DataTypes.g.h")
7
+ #include "codegen/Native{{ pascalName }}DataTypes.g.h"
8
8
  #endif
9
- #include "codegen\Native{{ pascalName }}Spec.g.h"
9
+ #include "codegen/Native{{ pascalName }}Spec.g.h"
10
10
 
11
11
  #include "NativeModules.h"
12
12
 
@@ -73,7 +73,7 @@
73
73
  <PrecompiledHeader>Use</PrecompiledHeader>
74
74
  <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
75
75
  <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
76
- <WarningLevel>Level3</WarningLevel>
76
+ <WarningLevel>Level4</WarningLevel>
77
77
  <SDLCheck>true</SDLCheck>
78
78
  <AdditionalOptions>%(AdditionalOptions) /bigobj</AdditionalOptions>
79
79
  <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
@@ -32,7 +32,13 @@
32
32
  * Either the import or the reference only needs to appear once, anywhere in the project.
33
33
  */
34
34
 
35
- import {DimensionValue} from 'react-native/Libraries/StyleSheet/StyleSheetTypes';
35
+ import {
36
+ GradientValue,
37
+ BlendMode,
38
+ BoxShadowPrimitive,
39
+ DimensionValue,
40
+ FilterFunction,
41
+ } from 'react-native/Libraries/StyleSheet/StyleSheetTypes';
36
42
 
37
43
  export {};
38
44
 
@@ -142,4 +148,17 @@ declare module '.' {
142
148
  */
143
149
  experimental_layoutConformance?: 'strict' | 'classic' | undefined;
144
150
  }
151
+
152
+ export interface ViewStyle {
153
+ experimental_boxShadow?:
154
+ | ReadonlyArray<BoxShadowPrimitive>
155
+ | string
156
+ | undefined;
157
+ experimental_filter?: ReadonlyArray<FilterFunction> | string | undefined;
158
+ experimental_mixBlendMode?: BlendMode | undefined;
159
+ experimental_backgroundImage?:
160
+ | ReadonlyArray<GradientValue>
161
+ | string
162
+ | undefined;
163
+ }
145
164
  }