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
@@ -1,136 +0,0 @@
1
- /*
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- #include <yoga/config/Config.h>
9
- #include <yoga/debug/Log.h>
10
- #include <yoga/node/Node.h>
11
-
12
- namespace facebook::yoga {
13
-
14
- bool configUpdateInvalidatesLayout(
15
- const Config& oldConfig,
16
- const Config& newConfig) {
17
- return oldConfig.getErrata() != newConfig.getErrata() ||
18
- oldConfig.getEnabledExperiments() != newConfig.getEnabledExperiments() ||
19
- oldConfig.getPointScaleFactor() != newConfig.getPointScaleFactor() ||
20
- oldConfig.useWebDefaults() != newConfig.useWebDefaults();
21
- }
22
-
23
- void Config::setUseWebDefaults(bool useWebDefaults) {
24
- useWebDefaults_ = useWebDefaults;
25
- }
26
-
27
- bool Config::useWebDefaults() const {
28
- return useWebDefaults_;
29
- }
30
-
31
- void Config::setExperimentalFeatureEnabled(
32
- ExperimentalFeature feature,
33
- bool enabled) {
34
- if (isExperimentalFeatureEnabled(feature) != enabled) {
35
- experimentalFeatures_.set(static_cast<size_t>(feature), enabled);
36
- version_++;
37
- }
38
- }
39
-
40
- bool Config::isExperimentalFeatureEnabled(ExperimentalFeature feature) const {
41
- return experimentalFeatures_.test(static_cast<size_t>(feature));
42
- }
43
-
44
- ExperimentalFeatureSet Config::getEnabledExperiments() const {
45
- return experimentalFeatures_;
46
- }
47
-
48
- void Config::setErrata(Errata errata) {
49
- if (errata_ != errata) {
50
- errata_ = errata;
51
- version_++;
52
- }
53
- }
54
-
55
- void Config::addErrata(Errata errata) {
56
- if (!hasErrata(errata)) {
57
- errata_ |= errata;
58
- version_++;
59
- }
60
- }
61
-
62
- void Config::removeErrata(Errata errata) {
63
- if (hasErrata(errata)) {
64
- errata_ &= (~errata);
65
- version_++;
66
- }
67
- }
68
-
69
- Errata Config::getErrata() const {
70
- return errata_;
71
- }
72
-
73
- bool Config::hasErrata(Errata errata) const {
74
- return (errata_ & errata) != Errata::None;
75
- }
76
-
77
- void Config::setPointScaleFactor(float pointScaleFactor) {
78
- if (pointScaleFactor_ != pointScaleFactor) {
79
- pointScaleFactor_ = pointScaleFactor;
80
- version_++;
81
- }
82
- }
83
-
84
- float Config::getPointScaleFactor() const {
85
- return pointScaleFactor_;
86
- }
87
-
88
- void Config::setContext(void* context) {
89
- context_ = context;
90
- }
91
-
92
- void* Config::getContext() const {
93
- return context_;
94
- }
95
-
96
- // [Windows #13409]
97
- uint32_t Config::getVersion() const noexcept {
98
- return version_;
99
- }
100
-
101
- void Config::setLogger(YGLogger logger) {
102
- logger_ = logger;
103
- }
104
-
105
- void Config::log(
106
- const yoga::Node* node,
107
- LogLevel logLevel,
108
- const char* format,
109
- va_list args) const {
110
- logger_(this, node, unscopedEnum(logLevel), format, args);
111
- }
112
-
113
- void Config::setCloneNodeCallback(YGCloneNodeFunc cloneNode) {
114
- cloneNodeCallback_ = cloneNode;
115
- }
116
-
117
- YGNodeRef Config::cloneNode(
118
- YGNodeConstRef node,
119
- YGNodeConstRef owner,
120
- size_t childIndex) const {
121
- YGNodeRef clone = nullptr;
122
- if (cloneNodeCallback_ != nullptr) {
123
- clone = cloneNodeCallback_(node, owner, childIndex);
124
- }
125
- if (clone == nullptr) {
126
- clone = YGNodeClone(node);
127
- }
128
- return clone;
129
- }
130
-
131
- /*static*/ const Config& Config::getDefault() {
132
- static Config config{getDefaultLogger()};
133
- return config;
134
- }
135
-
136
- } // namespace facebook::yoga
@@ -1,92 +0,0 @@
1
- /*
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- #pragma once
9
-
10
- #include <bitset>
11
-
12
- #include <yoga/Yoga.h>
13
- #include <yoga/enums/Errata.h>
14
- #include <yoga/enums/ExperimentalFeature.h>
15
- #include <yoga/enums/LogLevel.h>
16
-
17
- // Tag struct used to form the opaque YGConfigRef for the public C API
18
- struct YGConfig {};
19
-
20
- namespace facebook::yoga {
21
-
22
- class Config;
23
- class Node;
24
-
25
- using ExperimentalFeatureSet = std::bitset<ordinalCount<ExperimentalFeature>()>;
26
-
27
- // Whether moving a node from an old to new config should dirty previously
28
- // calculated layout results.
29
- bool configUpdateInvalidatesLayout(
30
- const Config& oldConfig,
31
- const Config& newConfig);
32
-
33
- class YG_EXPORT Config : public ::YGConfig {
34
- public:
35
- explicit Config(YGLogger logger) : logger_{logger} {}
36
-
37
- void setUseWebDefaults(bool useWebDefaults);
38
- bool useWebDefaults() const;
39
-
40
- void setExperimentalFeatureEnabled(ExperimentalFeature feature, bool enabled);
41
- bool isExperimentalFeatureEnabled(ExperimentalFeature feature) const;
42
- ExperimentalFeatureSet getEnabledExperiments() const;
43
-
44
- void setErrata(Errata errata);
45
- void addErrata(Errata errata);
46
- void removeErrata(Errata errata);
47
- Errata getErrata() const;
48
- bool hasErrata(Errata errata) const;
49
-
50
- void setPointScaleFactor(float pointScaleFactor);
51
- float getPointScaleFactor() const;
52
-
53
- void setContext(void* context);
54
- void* getContext() const;
55
-
56
- uint32_t getVersion() const noexcept; // [Windows #13409]
57
-
58
- void setLogger(YGLogger logger);
59
- void log(
60
- const yoga::Node* node,
61
- LogLevel logLevel,
62
- const char* format,
63
- va_list args) const;
64
-
65
- void setCloneNodeCallback(YGCloneNodeFunc cloneNode);
66
- YGNodeRef
67
- cloneNode(YGNodeConstRef node, YGNodeConstRef owner, size_t childIndex) const;
68
-
69
- static const Config& getDefault();
70
-
71
- private:
72
- YGCloneNodeFunc cloneNodeCallback_{nullptr};
73
- YGLogger logger_{};
74
-
75
- bool useWebDefaults_ : 1 = false;
76
-
77
- uint32_t version_ = 0; // [Windows #13409]
78
- ExperimentalFeatureSet experimentalFeatures_{};
79
- Errata errata_ = Errata::None;
80
- float pointScaleFactor_ = 1.0f;
81
- void* context_ = nullptr;
82
- };
83
-
84
- inline Config* resolveRef(const YGConfigRef ref) {
85
- return static_cast<Config*>(ref);
86
- }
87
-
88
- inline const Config* resolveRef(const YGConfigConstRef ref) {
89
- return static_cast<const Config*>(ref);
90
- }
91
-
92
- } // namespace facebook::yoga
@@ -1,48 +0,0 @@
1
- /*
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- #include <cmath>
9
-
10
- #include <yoga/node/LayoutResults.h>
11
- #include <yoga/numeric/Comparison.h>
12
-
13
- namespace facebook::yoga {
14
-
15
- bool LayoutResults::operator==(LayoutResults layout) const {
16
- bool isEqual = yoga::inexactEquals(position_, layout.position_) &&
17
- yoga::inexactEquals(dimensions_, layout.dimensions_) &&
18
- yoga::inexactEquals(margin_, layout.margin_) &&
19
- yoga::inexactEquals(border_, layout.border_) &&
20
- yoga::inexactEquals(padding_, layout.padding_) &&
21
- direction() == layout.direction() &&
22
- hadOverflow() == layout.hadOverflow() &&
23
- lastOwnerDirection == layout.lastOwnerDirection &&
24
- configVersion == layout.configVersion && // [Windows #13409]
25
- nextCachedMeasurementsIndex == layout.nextCachedMeasurementsIndex &&
26
- cachedLayout == layout.cachedLayout &&
27
- computedFlexBasis == layout.computedFlexBasis;
28
-
29
- for (uint32_t i = 0; i < LayoutResults::MaxCachedMeasurements && isEqual;
30
- ++i) {
31
- isEqual = isEqual && cachedMeasurements[i] == layout.cachedMeasurements[i];
32
- }
33
-
34
- if (!yoga::isUndefined(measuredDimensions_[0]) ||
35
- !yoga::isUndefined(layout.measuredDimensions_[0])) {
36
- isEqual =
37
- isEqual && (measuredDimensions_[0] == layout.measuredDimensions_[0]);
38
- }
39
- if (!yoga::isUndefined(measuredDimensions_[1]) ||
40
- !yoga::isUndefined(layout.measuredDimensions_[1])) {
41
- isEqual =
42
- isEqual && (measuredDimensions_[1] == layout.measuredDimensions_[1]);
43
- }
44
-
45
- return isEqual;
46
- }
47
-
48
- } // namespace facebook::yoga
@@ -1,122 +0,0 @@
1
- /*
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- #pragma once
9
-
10
- #include <array>
11
-
12
- #include <yoga/debug/AssertFatal.h>
13
- #include <yoga/enums/Dimension.h>
14
- #include <yoga/enums/Direction.h>
15
- #include <yoga/enums/Edge.h>
16
- #include <yoga/enums/PhysicalEdge.h>
17
- #include <yoga/node/CachedMeasurement.h>
18
- #include <yoga/numeric/FloatOptional.h>
19
-
20
- namespace facebook::yoga {
21
-
22
- struct LayoutResults {
23
- // This value was chosen based on empirical data:
24
- // 98% of analyzed layouts require less than 8 entries.
25
- static constexpr int32_t MaxCachedMeasurements = 8;
26
-
27
- uint32_t computedFlexBasisGeneration = 0;
28
- FloatOptional computedFlexBasis = {};
29
-
30
- // Instead of recomputing the entire layout every single time, we cache some
31
- // information to break early when nothing changed
32
- uint32_t generationCount = 0;
33
- uint32_t configVersion = 0; // [Windows #13409]
34
- Direction lastOwnerDirection = Direction::Inherit;
35
-
36
- uint32_t nextCachedMeasurementsIndex = 0;
37
- std::array<CachedMeasurement, MaxCachedMeasurements> cachedMeasurements = {};
38
-
39
- CachedMeasurement cachedLayout{};
40
-
41
- Direction direction() const {
42
- return direction_;
43
- }
44
-
45
- void setDirection(Direction direction) {
46
- direction_ = direction;
47
- }
48
-
49
- bool hadOverflow() const {
50
- return hadOverflow_;
51
- }
52
-
53
- void setHadOverflow(bool hadOverflow) {
54
- hadOverflow_ = hadOverflow;
55
- }
56
-
57
- float dimension(Dimension axis) const {
58
- return dimensions_[yoga::to_underlying(axis)];
59
- }
60
-
61
- void setDimension(Dimension axis, float dimension) {
62
- dimensions_[yoga::to_underlying(axis)] = dimension;
63
- }
64
-
65
- float measuredDimension(Dimension axis) const {
66
- return measuredDimensions_[yoga::to_underlying(axis)];
67
- }
68
-
69
- void setMeasuredDimension(Dimension axis, float dimension) {
70
- measuredDimensions_[yoga::to_underlying(axis)] = dimension;
71
- }
72
-
73
- float position(PhysicalEdge physicalEdge) const {
74
- return position_[yoga::to_underlying(physicalEdge)];
75
- }
76
-
77
- void setPosition(PhysicalEdge physicalEdge, float dimension) {
78
- position_[yoga::to_underlying(physicalEdge)] = dimension;
79
- }
80
-
81
- float margin(PhysicalEdge physicalEdge) const {
82
- return margin_[yoga::to_underlying(physicalEdge)];
83
- }
84
-
85
- void setMargin(PhysicalEdge physicalEdge, float dimension) {
86
- margin_[yoga::to_underlying(physicalEdge)] = dimension;
87
- }
88
-
89
- float border(PhysicalEdge physicalEdge) const {
90
- return border_[yoga::to_underlying(physicalEdge)];
91
- }
92
-
93
- void setBorder(PhysicalEdge physicalEdge, float dimension) {
94
- border_[yoga::to_underlying(physicalEdge)] = dimension;
95
- }
96
-
97
- float padding(PhysicalEdge physicalEdge) const {
98
- return padding_[yoga::to_underlying(physicalEdge)];
99
- }
100
-
101
- void setPadding(PhysicalEdge physicalEdge, float dimension) {
102
- padding_[yoga::to_underlying(physicalEdge)] = dimension;
103
- }
104
-
105
- bool operator==(LayoutResults layout) const;
106
- bool operator!=(LayoutResults layout) const {
107
- return !(*this == layout);
108
- }
109
-
110
- private:
111
- Direction direction_ : bitCount<Direction>() = Direction::Inherit;
112
- bool hadOverflow_ : 1 = false;
113
-
114
- std::array<float, 2> dimensions_ = {{YGUndefined, YGUndefined}};
115
- std::array<float, 2> measuredDimensions_ = {{YGUndefined, YGUndefined}};
116
- std::array<float, 4> position_ = {};
117
- std::array<float, 4> margin_ = {};
118
- std::array<float, 4> border_ = {};
119
- std::array<float, 4> padding_ = {};
120
- };
121
-
122
- } // namespace facebook::yoga