react-native-windows 0.82.3 → 0.83.0-preview.0

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 (224) hide show
  1. package/.flowconfig +2 -7
  2. package/Libraries/Animated/components/AnimatedFlatList.js +5 -3
  3. package/Libraries/Animated/components/AnimatedImage.js +4 -3
  4. package/Libraries/Animated/components/AnimatedSectionList.js +2 -2
  5. package/Libraries/Animated/components/AnimatedText.js +7 -3
  6. package/Libraries/Animated/components/AnimatedView.js +3 -2
  7. package/Libraries/Animated/createAnimatedComponent.js +24 -12
  8. package/Libraries/Animated/nodes/AnimatedColor.js +26 -10
  9. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +43 -15
  10. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +43 -15
  11. package/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts +2 -2
  12. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +2 -2
  13. package/Libraries/Components/Glyph/Glyph.js +4 -1
  14. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.d.ts +2 -2
  15. package/Libraries/Components/RefreshControl/RefreshControl.d.ts +3 -3
  16. package/Libraries/Components/SafeAreaView/SafeAreaView.d.ts +2 -2
  17. package/Libraries/Components/ScrollView/ScrollView.js +1 -0
  18. package/Libraries/Components/ScrollView/ScrollView.windows.js +1 -0
  19. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +6 -6
  20. package/Libraries/Components/Switch/Switch.d.ts +2 -2
  21. package/Libraries/Components/Switch/Switch.windows.js +1 -1
  22. package/Libraries/Components/TextInput/TextInput.d.ts +2 -5
  23. package/Libraries/Components/TextInput/TextInput.js +6 -0
  24. package/Libraries/Components/TextInput/TextInput.windows.js +6 -0
  25. package/Libraries/Components/Touchable/TouchableBounce.js +7 -7
  26. package/Libraries/Components/Touchable/TouchableBounce.windows.js +7 -7
  27. package/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +1 -1
  28. package/Libraries/Components/View/ReactNativeStyleAttributes.js +19 -1
  29. package/Libraries/Components/View/View.d.ts +2 -2
  30. package/Libraries/Components/View/View.windows.js +0 -1
  31. package/Libraries/Components/View/ViewNativeComponent.js +13 -1
  32. package/Libraries/Core/ReactNativeVersion.js +3 -3
  33. package/Libraries/Core/setUpPerformance.js +2 -0
  34. package/Libraries/Debugging/DebuggingOverlay.js +14 -14
  35. package/Libraries/Debugging/DebuggingOverlayRegistry.js +8 -2
  36. package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +5 -2
  37. package/Libraries/Image/Image.d.ts +3 -3
  38. package/Libraries/Image/ImageInjection.js +3 -6
  39. package/Libraries/Image/ImageTypes.flow.js +3 -7
  40. package/Libraries/Lists/FlatList.js +8 -8
  41. package/Libraries/Lists/SectionList.d.ts +5 -1
  42. package/Libraries/Lists/ViewabilityHelper.js +1 -1
  43. package/Libraries/Lists/VirtualizedList.js +1 -0
  44. package/Libraries/LogBox/UI/AnsiHighlight.js +4 -1
  45. package/Libraries/NativeComponent/BaseViewConfig.android.js +11 -2
  46. package/Libraries/NativeComponent/NativeComponentRegistry.d.ts +98 -0
  47. package/Libraries/NativeComponent/NativeComponentRegistry.js +2 -0
  48. package/Libraries/NativeComponent/NativeComponentRegistryUnstable.js +3 -1
  49. package/Libraries/NativeComponent/ViewConfigIgnore.windows.js +45 -0
  50. package/Libraries/Network/RCTNetworking.android.js +3 -1
  51. package/Libraries/Network/RCTNetworking.ios.js +3 -0
  52. package/Libraries/Network/RCTNetworking.windows.js +3 -0
  53. package/Libraries/Network/XMLHttpRequest.js +1 -41
  54. package/Libraries/Pressability/usePressability.js +14 -3
  55. package/Libraries/ReactNative/PaperUIManager.windows.js +3 -3
  56. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +20 -82
  57. package/Libraries/ReactNative/getNativeComponentAttributes.js +12 -0
  58. package/Libraries/Renderer/implementations/ReactFabric-dev.js +6759 -4478
  59. package/Libraries/Renderer/implementations/ReactFabric-prod.js +3169 -3119
  60. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +4732 -3535
  61. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +6646 -4070
  62. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3136 -2825
  63. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +4761 -3312
  64. package/Libraries/Renderer/shims/ReactNative.js +3 -1
  65. package/Libraries/Renderer/shims/ReactNativeTypes.js +2 -1
  66. package/Libraries/Renderer/shims/ReactNativeTypes.windows.js +2 -1
  67. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
  68. package/Libraries/StyleSheet/StyleSheetTypes.js +44 -0
  69. package/Libraries/StyleSheet/processBackgroundPosition.js +284 -0
  70. package/Libraries/StyleSheet/processBackgroundRepeat.js +105 -0
  71. package/Libraries/StyleSheet/processBackgroundSize.js +104 -0
  72. package/Libraries/Text/Text.d.ts +2 -2
  73. package/Libraries/Text/TextNativeComponent.js +10 -0
  74. package/Libraries/TurboModule/TurboModuleRegistry.js +3 -9
  75. package/Libraries/Utilities/DevLoadingView.js +14 -6
  76. package/Libraries/Utilities/HMRClient.js +13 -5
  77. package/Microsoft.ReactNative/CompositionComponentView.idl +2 -0
  78. package/Microsoft.ReactNative/CompositionHwndHost.idl +1 -0
  79. package/Microsoft.ReactNative/Fabric/ComponentView.cpp +1 -1
  80. package/Microsoft.ReactNative/Fabric/ComponentView.h +1 -1
  81. package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +2 -52
  82. package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.cpp +10 -40
  83. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +3 -80
  84. package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp +45 -12
  85. package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h +8 -0
  86. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +61 -74
  87. package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.h +4 -0
  88. package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.h +1 -0
  89. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +4 -3
  90. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +2 -1
  91. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeWindow.cpp +245 -0
  92. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeWindow.h +80 -0
  93. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentDescriptor.h +20 -36
  94. package/Microsoft.ReactNative/Fabric/Composition/UriImageManager.cpp +5 -0
  95. package/Microsoft.ReactNative/IReactCompositionViewComponentBuilder.idl +1 -0
  96. package/Microsoft.ReactNative/Modules/ImageViewManagerModule.cpp +1 -1
  97. package/Microsoft.ReactNative/Modules/LogBoxModule.cpp +20 -94
  98. package/Microsoft.ReactNative/Modules/LogBoxModule.h +1 -3
  99. package/Microsoft.ReactNative/ReactNativeAppBuilder.cpp +0 -41
  100. package/Microsoft.ReactNative/ReactNativeAppBuilder.idl +0 -11
  101. package/Microsoft.ReactNative/ReactNativeIsland.idl +2 -3
  102. package/Microsoft.ReactNative/ReactNativeWin32App.cpp +31 -101
  103. package/Microsoft.ReactNative/ReactNativeWin32App.h +2 -13
  104. package/Microsoft.ReactNative/ReactNativeWindow.idl +44 -0
  105. package/Microsoft.ReactNative.Cxx/AutoDraw.h +9 -1
  106. package/Microsoft.ReactNative.Cxx/ReactCommon/CallInvoker.h +13 -16
  107. package/Microsoft.ReactNative.Cxx/ReactCommon/TurboModule.h +24 -36
  108. package/Microsoft.ReactNative.Cxx/ReactCommon/TurboModuleUtils.h +5 -8
  109. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/AString.h +8 -6
  110. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Array.h +32 -49
  111. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Base.h +27 -76
  112. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Bool.h +4 -2
  113. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/CallbackWrapper.h +19 -18
  114. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Class.h +25 -48
  115. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Convert.h +38 -31
  116. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Error.h +11 -6
  117. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/EventEmitter.h +47 -45
  118. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Function.h +69 -89
  119. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/HighResTimeStamp.h +8 -8
  120. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/LongLivedObject.h +6 -6
  121. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Number.h +16 -8
  122. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Object.h +17 -24
  123. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Promise.h +17 -17
  124. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Value.h +20 -29
  125. package/Microsoft.ReactNative.Cxx/ReactCommon/react/debug/react_native_assert.h +2 -7
  126. package/Microsoft.ReactNative.Cxx/ReactCommon/react/timing/primitives.h +127 -115
  127. package/PropertySheets/Generated/PackageVersion.g.props +5 -5
  128. package/PropertySheets/Warnings.props +2 -1
  129. package/ReactCommon/ReactCommon.vcxproj +11 -2
  130. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/CxxNativeModule.cpp +2 -2
  131. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/Instance.cpp +4 -2
  132. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.cpp +4 -2
  133. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSIndexedRAMBundle.cpp +4 -2
  134. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/MethodCall.cpp +4 -2
  135. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/ModuleRegistry.cpp +5 -3
  136. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp +4 -4
  137. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/RAMBundleRegistry.cpp +6 -4
  138. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/ReactMarker.cpp +2 -0
  139. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/TraceSection.h +25 -35
  140. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp +86 -67
  141. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsiexecutor/jsireact/JSIExecutor.cpp +15 -8
  142. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsiexecutor/jsireact/JSINativeModules.cpp +4 -2
  143. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp +84 -68
  144. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.h +31 -35
  145. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/Utf8.h +4 -5
  146. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/network/HttpUtils.cpp +2 -1
  147. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h +24 -36
  148. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.h +28 -66
  149. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/webperformance/NativePerformance.cpp +5 -0
  150. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp +3 -3
  151. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/image/conversions.h +8 -4
  152. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/text/ParagraphShadowNode.cpp +19 -16
  153. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/text/platform/android/react/renderer/components/text/ParagraphState.h +8 -9
  154. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityPrimitives.h +25 -95
  155. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/accessibilityPropsConversions.h +85 -42
  156. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/EventDispatcher.cpp +2 -0
  157. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/EventQueueProcessor.cpp +2 -0
  158. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/imagemanager/primitives.h +25 -31
  159. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/uimanager/UIManager.cpp +19 -5
  160. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +16 -1
  161. package/Scripts/Tfs/Layout-Desktop-Headers.ps1 +1 -15
  162. package/Scripts/creaternwapp.cmd +1 -1
  163. package/Scripts/perf/compare-results.js +357 -0
  164. package/Scripts/perf/create-perf-test.js +343 -0
  165. package/Scripts/perf/post-pr-comment.js +210 -0
  166. package/Shared/Hermes/HermesRuntimeTargetDelegate.cpp +8 -0
  167. package/Shared/Hermes/HermesRuntimeTargetDelegate.h +3 -0
  168. package/Shared/Shared.vcxitems +15 -3
  169. package/Shared/Shared.vcxitems.filters +11 -3
  170. package/codegen/NativeIntersectionObserverSpec.g.h +2 -0
  171. package/codegen/NativeNetworkingIOSSpec.g.h +2 -0
  172. package/codegen/NativePerformanceSpec.g.h +6 -0
  173. package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +229 -139
  174. package/codegen/react/components/rnwcore/ActivityIndicatorView.g.h +2 -1
  175. package/codegen/react/components/rnwcore/AndroidDrawerLayout.g.h +42 -25
  176. package/codegen/react/components/rnwcore/AndroidHorizontalScrollContentView.g.h +2 -1
  177. package/codegen/react/components/rnwcore/AndroidProgressBar.g.h +2 -1
  178. package/codegen/react/components/rnwcore/AndroidSwipeRefreshLayout.g.h +11 -6
  179. package/codegen/react/components/rnwcore/AndroidSwitch.g.h +11 -6
  180. package/codegen/react/components/rnwcore/DebuggingOverlay.g.h +1 -0
  181. package/codegen/react/components/rnwcore/InputAccessory.g.h +2 -1
  182. package/codegen/react/components/rnwcore/ModalHostView.g.h +40 -23
  183. package/codegen/react/components/rnwcore/Props.cpp +6 -1
  184. package/codegen/react/components/rnwcore/Props.h +1 -0
  185. package/codegen/react/components/rnwcore/PullToRefreshView.g.h +11 -6
  186. package/codegen/react/components/rnwcore/SafeAreaView.g.h +1 -0
  187. package/codegen/react/components/rnwcore/Switch.g.h +11 -6
  188. package/codegen/react/components/rnwcore/UnimplementedNativeView.g.h +2 -1
  189. package/codegen/react/components/rnwcore/VirtualView.g.h +41 -8
  190. package/codegen/react/components/rnwcore/VirtualViewExperimental.g.h +45 -8
  191. package/codegen/rnwcoreJSI.h +3973 -6059
  192. package/index.js +6 -0
  193. package/index.windows.js +6 -0
  194. package/jest/mockComponent.js +6 -6
  195. package/jest/setup.js +15 -10
  196. package/package.json +27 -27
  197. package/src/private/components/virtualview/VirtualView.js +22 -27
  198. package/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.js +6 -0
  199. package/src/private/featureflags/ReactNativeFeatureFlags.js +100 -19
  200. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +18 -3
  201. package/src/private/setup/setUpDefaultReactNativeEnvironment.js +6 -0
  202. package/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js +1 -1
  203. package/src/private/specs_DEPRECATED/modules/NativeNetworkingIOS.js +1 -0
  204. package/src/private/webapis/dom/nodes/ReactNativeElement.js +12 -2
  205. package/src/private/webapis/intersectionobserver/IntersectionObserver.js +76 -15
  206. package/src/private/webapis/intersectionobserver/internals/IntersectionObserverManager.js +1 -0
  207. package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +1 -0
  208. package/src/private/webapis/performance/ResourceTiming.js +31 -4
  209. package/src/private/webapis/performance/internals/RawPerformanceEntry.js +4 -1
  210. package/src/private/webapis/performance/specs/NativePerformance.js +3 -0
  211. package/stubs/double-conversion/double-conversion.h +5 -0
  212. package/templates/cpp-app/template.config.js +1 -1
  213. package/templates/cpp-app/windows/MyApp/MyApp.vcxproj +1 -1
  214. package/templates/cpp-lib/template.config.js +1 -1
  215. package/templates/cpp-lib/windows/MyLib/MyLib.vcxproj +1 -1
  216. package/types/index.d.ts +1 -0
  217. package/types/public/ReactNativeTypes.d.ts +115 -2
  218. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +0 -152
  219. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/BaseViewProps.cpp +0 -628
  220. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/conversions.h +0 -1574
  221. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/ShadowNode.cpp +0 -528
  222. package/Scripts/OpenSSL.nuspec +0 -39
  223. package/Scripts/OpenSSL.targets +0 -36
  224. package/codegen/rnwcoreJSI-generated.cpp +0 -3470
@@ -14,12 +14,14 @@
14
14
  #include <react/renderer/components/view/AccessibilityPrimitives.h>
15
15
  #include <react/renderer/core/PropsParserContext.h>
16
16
  #include <react/renderer/core/propsConversions.h>
17
+ #include <react/renderer/debug/DebugStringConvertible.h>
17
18
 
18
19
  #include <unordered_map>
19
20
 
20
21
  namespace facebook::react {
21
22
 
22
- inline void fromString(const std::string& string, AccessibilityTraits& result) {
23
+ inline void fromString(const std::string &string, AccessibilityTraits &result)
24
+ {
23
25
  if (string == "none") {
24
26
  result = AccessibilityTraits::None;
25
27
  return;
@@ -107,10 +109,8 @@ inline void fromString(const std::string& string, AccessibilityTraits& result) {
107
109
  result = AccessibilityTraits::None;
108
110
  }
109
111
 
110
- inline void fromRawValue(
111
- const PropsParserContext& context,
112
- const RawValue& value,
113
- AccessibilityTraits& result) {
112
+ inline void fromRawValue(const PropsParserContext &context, const RawValue &value, AccessibilityTraits &result)
113
+ {
114
114
  if (value.hasType<std::string>()) {
115
115
  fromString((std::string)value, result);
116
116
  return;
@@ -121,7 +121,7 @@ inline void fromRawValue(
121
121
  react_native_expect(value.hasType<std::vector<std::string>>());
122
122
  if (value.hasType<std::vector<std::string>>()) {
123
123
  auto items = (std::vector<std::string>)value;
124
- for (auto& item : items) {
124
+ for (auto &item : items) {
125
125
  AccessibilityTraits itemAccessibilityTraits;
126
126
  fromString(item, itemAccessibilityTraits);
127
127
  result = result | itemAccessibilityTraits;
@@ -131,10 +131,8 @@ inline void fromRawValue(
131
131
  }
132
132
  }
133
133
 
134
- inline void fromRawValue(
135
- const PropsParserContext& context,
136
- const RawValue& value,
137
- AccessibilityState& result) {
134
+ inline void fromRawValue(const PropsParserContext &context, const RawValue &value, AccessibilityState &result)
135
+ {
138
136
  auto map = (std::unordered_map<std::string, RawValue>)value;
139
137
  auto selected = map.find("selected");
140
138
  if (selected != map.end()) {
@@ -186,8 +184,8 @@ inline void fromRawValue(
186
184
  // [Windows] - DO NOT REMOVE
187
185
  }
188
186
 
189
- inline std::string toString(
190
- const ImportantForAccessibility& importantForAccessibility) {
187
+ inline std::string toString(const ImportantForAccessibility &importantForAccessibility)
188
+ {
191
189
  switch (importantForAccessibility) {
192
190
  case ImportantForAccessibility::Auto:
193
191
  return "auto";
@@ -200,10 +198,8 @@ inline std::string toString(
200
198
  }
201
199
  }
202
200
 
203
- inline void fromRawValue(
204
- const PropsParserContext& context,
205
- const RawValue& value,
206
- ImportantForAccessibility& result) {
201
+ inline void fromRawValue(const PropsParserContext &context, const RawValue &value, ImportantForAccessibility &result)
202
+ {
207
203
  result = ImportantForAccessibility::Auto;
208
204
  react_native_expect(value.hasType<std::string>());
209
205
  if (value.hasType<std::string>()) {
@@ -225,10 +221,8 @@ inline void fromRawValue(
225
221
  }
226
222
  }
227
223
 
228
- inline void fromRawValue(
229
- const PropsParserContext& context,
230
- const RawValue& value,
231
- AccessibilityAction& result) {
224
+ inline void fromRawValue(const PropsParserContext &context, const RawValue &value, AccessibilityAction &result)
225
+ {
232
226
  auto map = (std::unordered_map<std::string, RawValue>)value;
233
227
 
234
228
  auto name = map.find("name");
@@ -245,10 +239,8 @@ inline void fromRawValue(
245
239
  }
246
240
  }
247
241
 
248
- inline void fromRawValue(
249
- const PropsParserContext&,
250
- const RawValue& value,
251
- AccessibilityValue& result) {
242
+ inline void fromRawValue(const PropsParserContext & /*unused*/, const RawValue &value, AccessibilityValue &result)
243
+ {
252
244
  auto map = (std::unordered_map<std::string, RawValue>)value;
253
245
 
254
246
  auto min = map.find("min");
@@ -280,10 +272,8 @@ inline void fromRawValue(
280
272
  }
281
273
  }
282
274
 
283
- inline void fromRawValue(
284
- const PropsParserContext& context,
285
- const RawValue& value,
286
- AccessibilityLabelledBy& result) {
275
+ inline void fromRawValue(const PropsParserContext &context, const RawValue &value, AccessibilityLabelledBy &result)
276
+ {
287
277
  if (value.hasType<std::string>()) {
288
278
  result.value.push_back((std::string)value);
289
279
  } else if (value.hasType<std::vector<std::string>>()) {
@@ -291,10 +281,8 @@ inline void fromRawValue(
291
281
  }
292
282
  }
293
283
 
294
- inline void fromRawValue(
295
- const PropsParserContext& context,
296
- const RawValue& value,
297
- AccessibilityLiveRegion& result) {
284
+ inline void fromRawValue(const PropsParserContext &context, const RawValue &value, AccessibilityLiveRegion &result)
285
+ {
298
286
  result = AccessibilityLiveRegion::None;
299
287
  react_native_expect(value.hasType<std::string>());
300
288
  if (value.hasType<std::string>()) {
@@ -314,7 +302,8 @@ inline void fromRawValue(
314
302
  }
315
303
  }
316
304
 
317
- inline std::string toString(const AccessibilityRole& accessibilityRole) {
305
+ inline std::string toString(const AccessibilityRole &accessibilityRole)
306
+ {
318
307
  switch (accessibilityRole) {
319
308
  case AccessibilityRole::None:
320
309
  return "none";
@@ -404,10 +393,8 @@ inline std::string toString(const AccessibilityRole& accessibilityRole) {
404
393
  return "none";
405
394
  }
406
395
 
407
- inline void fromRawValue(
408
- const PropsParserContext& context,
409
- const RawValue& value,
410
- AccessibilityRole& result) {
396
+ inline void fromRawValue(const PropsParserContext &context, const RawValue &value, AccessibilityRole &result)
397
+ {
411
398
  react_native_expect(value.hasType<std::string>());
412
399
  if (value.hasType<std::string>()) {
413
400
  auto string = (std::string)value;
@@ -504,7 +491,8 @@ inline void fromRawValue(
504
491
  result = AccessibilityRole::None;
505
492
  }
506
493
 
507
- inline std::string toString(const Role& role) {
494
+ inline std::string toString(const Role &role)
495
+ {
508
496
  switch (role) {
509
497
  case Role::Alert:
510
498
  return "alert";
@@ -644,10 +632,8 @@ inline std::string toString(const Role& role) {
644
632
  return "none";
645
633
  }
646
634
 
647
- inline void fromRawValue(
648
- const PropsParserContext& context,
649
- const RawValue& value,
650
- Role& result) {
635
+ inline void fromRawValue(const PropsParserContext &context, const RawValue &value, Role &result)
636
+ {
651
637
  react_native_expect(value.hasType<std::string>());
652
638
  if (value.hasType<std::string>()) {
653
639
  auto string = (std::string)value;
@@ -796,4 +782,61 @@ inline void fromRawValue(
796
782
  result = Role::None;
797
783
  }
798
784
 
785
+ inline std::string toString(AccessibilityLiveRegion accessibilityLiveRegion)
786
+ {
787
+ switch (accessibilityLiveRegion) {
788
+ case AccessibilityLiveRegion::None:
789
+ return "none";
790
+ case AccessibilityLiveRegion::Polite:
791
+ return "polite";
792
+ case AccessibilityLiveRegion::Assertive:
793
+ return "assertive";
794
+ }
795
+ }
796
+
797
+ #if RN_DEBUG_STRING_CONVERTIBLE
798
+ inline std::string toString(AccessibilityState::CheckedState state)
799
+ {
800
+ switch (state) {
801
+ case AccessibilityState::Unchecked:
802
+ return "Unchecked";
803
+ case AccessibilityState::Checked:
804
+ return "Checked";
805
+ case AccessibilityState::Mixed:
806
+ return "Mixed";
807
+ case AccessibilityState::None:
808
+ return "None";
809
+ }
810
+ }
811
+
812
+ inline std::string toString(const AccessibilityAction &accessibilityAction)
813
+ {
814
+ std::string result = accessibilityAction.name;
815
+ if (accessibilityAction.label.has_value()) {
816
+ result += ": '" + accessibilityAction.label.value() + "'";
817
+ }
818
+ return result;
819
+ }
820
+
821
+ inline std::string toString(std::vector<AccessibilityAction> accessibilityActions)
822
+ {
823
+ std::string result = "[";
824
+ for (size_t i = 0; i < accessibilityActions.size(); i++) {
825
+ result += toString(accessibilityActions[i]);
826
+ if (i < accessibilityActions.size() - 1) {
827
+ result += ", ";
828
+ }
829
+ }
830
+ result += "]";
831
+ return result;
832
+ }
833
+
834
+ inline std::string toString(const AccessibilityState &accessibilityState)
835
+ {
836
+ return "{disabled:" + toString(accessibilityState.disabled) + ",selected:" + toString(accessibilityState.selected) +
837
+ ",checked:" + toString(accessibilityState.checked) + ",busy:" + toString(accessibilityState.busy) +
838
+ ",expanded:" + toString(accessibilityState.expanded) + "}";
839
+ }
840
+ #endif
841
+
799
842
  } // namespace facebook::react
@@ -5,6 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
+
8
9
  #if _MSC_VER
9
10
  #pragma warning(push)
10
11
  #pragma warning(disable : 4996) // deprecated APIs
@@ -74,6 +75,7 @@ void EventDispatcher::removeListener(
74
75
  }
75
76
 
76
77
  } // namespace facebook::react
78
+
77
79
  #if _MSC_VER
78
80
  #pragma warning(pop)
79
81
  #endif
@@ -5,6 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
+
8
9
  #if _MSC_VER
9
10
  #pragma warning(push)
10
11
  #pragma warning(disable : 4996) // deprecated APIs
@@ -133,6 +134,7 @@ void EventQueueProcessor::flushStateUpdates(
133
134
  }
134
135
 
135
136
  } // namespace facebook::react
137
+
136
138
  #if _MSC_VER
137
139
  #pragma warning(pop)
138
140
  #endif
@@ -27,22 +27,25 @@ class ImageSource {
27
27
  std::string uri{};
28
28
  std::string bundle{};
29
29
  Float scale{3};
30
- Size size{0};
30
+ Size size{.width = 0};
31
31
  std::string body{};
32
32
  std::string method{};
33
33
  CacheStategy cache = CacheStategy::Default;
34
34
  std::vector<std::pair<std::string, std::string>> headers{};
35
35
 
36
- bool operator==(const ImageSource& rhs) const {
36
+ bool operator==(const ImageSource &rhs) const
37
+ {
37
38
  return std::tie(this->type, this->uri) == std::tie(rhs.type, rhs.uri);
38
39
  }
39
40
 
40
- bool operator!=(const ImageSource& rhs) const {
41
+ bool operator!=(const ImageSource &rhs) const
42
+ {
41
43
  return !(*this == rhs);
42
44
  }
43
45
 
44
46
  #ifdef RN_SERIALIZABLE_STATE
45
- folly::dynamic toDynamic() const {
47
+ folly::dynamic toDynamic() const
48
+ {
46
49
  folly::dynamic imageSourceResult = folly::dynamic::object();
47
50
  switch (type) {
48
51
  case ImageSource::Type::Invalid:
@@ -84,7 +87,7 @@ class ImageSource {
84
87
  }
85
88
 
86
89
  folly::dynamic headersObject = folly::dynamic::object();
87
- for (const auto& header : headers) {
90
+ for (const auto &header : headers) {
88
91
  headersObject[header.first] = header.second;
89
92
  }
90
93
  imageSourceResult["headers"] = headersObject;
@@ -94,41 +97,30 @@ class ImageSource {
94
97
  #endif
95
98
 
96
99
  #if RN_DEBUG_STRING_CONVERTIBLE
97
- SharedDebugStringConvertibleList getDebugProps(
98
- const std::string& prefix) const {
100
+ SharedDebugStringConvertibleList getDebugProps(const std::string &prefix) const
101
+ {
99
102
  ImageSource imageSource{};
100
103
 
101
104
  SharedDebugStringConvertibleList headersList;
102
- for (const auto& header : headers) {
103
- headersList.push_back(debugStringConvertibleItem(
104
- prefix + "-header-" + header.first, header.second));
105
+ for (const auto &header : headers) {
106
+ headersList.push_back(debugStringConvertibleItem(prefix + "-header-" + header.first, header.second));
105
107
  }
106
108
 
107
109
  return headersList +
108
110
  SharedDebugStringConvertibleList{
109
- debugStringConvertibleItem(
110
- prefix + "-type", toString(type), toString(imageSource.type)),
111
+ debugStringConvertibleItem(prefix + "-type", toString(type), toString(imageSource.type)),
111
112
  debugStringConvertibleItem(prefix + "-uri", uri, imageSource.uri),
112
- debugStringConvertibleItem(
113
- prefix + "-bundle", bundle, imageSource.bundle),
114
- debugStringConvertibleItem(
115
- prefix + "-scale", scale, imageSource.scale),
116
- debugStringConvertibleItem(
117
- prefix + "-size",
118
- react::toString(size),
119
- react::toString(imageSource.size)),
120
- debugStringConvertibleItem(
121
- prefix + "-body", body, imageSource.body),
122
- debugStringConvertibleItem(
123
- prefix + "-method", method, imageSource.method),
124
- debugStringConvertibleItem(
125
- prefix + "-cache",
126
- toString(cache),
127
- toString(imageSource.cache)),
113
+ debugStringConvertibleItem(prefix + "-bundle", bundle, imageSource.bundle),
114
+ debugStringConvertibleItem(prefix + "-scale", scale, imageSource.scale),
115
+ debugStringConvertibleItem(prefix + "-size", react::toString(size), react::toString(imageSource.size)),
116
+ debugStringConvertibleItem(prefix + "-body", body, imageSource.body),
117
+ debugStringConvertibleItem(prefix + "-method", method, imageSource.method),
118
+ debugStringConvertibleItem(prefix + "-cache", toString(cache), toString(imageSource.cache)),
128
119
  };
129
120
  }
130
121
 
131
- std::string toString(const Type& typeValue) const {
122
+ std::string toString(const Type &typeValue) const
123
+ {
132
124
  switch (typeValue) {
133
125
  case ImageSource::Type::Invalid:
134
126
  return "invalid";
@@ -143,7 +135,8 @@ class ImageSource {
143
135
  }
144
136
  }
145
137
 
146
- std::string toString(const CacheStategy& cacheValue) const {
138
+ std::string toString(const CacheStategy &cacheValue) const
139
+ {
147
140
  switch (cacheValue) {
148
141
  case ImageSource::CacheStategy::Default:
149
142
  return "default";
@@ -163,7 +156,8 @@ class ImageSource {
163
156
  };
164
157
 
165
158
  #ifdef RN_SERIALIZABLE_STATE
166
- inline folly::dynamic toDynamic(const ImageSource& imageSource) {
159
+ inline folly::dynamic toDynamic(const ImageSource &imageSource)
160
+ {
167
161
  return imageSource.toDynamic();
168
162
  }
169
163
  #endif
@@ -5,6 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
+
8
9
  #if _MSC_VER
9
10
  #pragma warning(push)
10
11
  #pragma warning(disable : 4996) // deprecated APIs
@@ -74,10 +75,12 @@ std::shared_ptr<ShadowNode> UIManager::createNode(
74
75
  auto fallbackDescriptor =
75
76
  componentDescriptorRegistry_->getFallbackComponentDescriptor();
76
77
 
77
- PropsParserContext propsParserContext{surfaceId, *contextContainer_.get()};
78
+ PropsParserContext propsParserContext{surfaceId, *contextContainer_};
78
79
 
79
80
  auto family = componentDescriptor.createFamily(
80
- {tag, surfaceId, std::move(instanceHandle)});
81
+ {.tag = tag,
82
+ .surfaceId = surfaceId,
83
+ .instanceHandle = std::move(instanceHandle)});
81
84
  const auto props = componentDescriptor.cloneProps(
82
85
  propsParserContext, nullptr, std::move(rawProps));
83
86
  const auto state = componentDescriptor.createInitialState(props, family);
@@ -115,7 +118,7 @@ std::shared_ptr<ShadowNode> UIManager::cloneNode(
115
118
  "UIManager::cloneNode", "componentName", shadowNode.getComponentName());
116
119
 
117
120
  PropsParserContext propsParserContext{
118
- shadowNode.getFamily().getSurfaceId(), *contextContainer_.get()};
121
+ shadowNode.getFamily().getSurfaceId(), *contextContainer_};
119
122
 
120
123
  auto& componentDescriptor = shadowNode.getComponentDescriptor();
121
124
  auto& family = shadowNode.getFamily();
@@ -459,14 +462,14 @@ void UIManager::setNativeProps_DEPRECATED(
459
462
  componentDescriptorRegistry_->at(
460
463
  shadowNode->getComponentHandle());
461
464
  PropsParserContext propsParserContext{
462
- family.getSurfaceId(), *contextContainer_.get()};
465
+ family.getSurfaceId(), *contextContainer_};
463
466
  auto props = componentDescriptor.cloneProps(
464
467
  propsParserContext,
465
468
  getShadowNodeInSubtree(*shadowNode, ancestorShadowNode)
466
469
  ->getProps(),
467
470
  RawProps(rawProps));
468
471
 
469
- return oldShadowNode.clone({/* .props = */ props});
472
+ return oldShadowNode.clone({/* .props = */ .props = props});
470
473
  });
471
474
 
472
475
  return std::static_pointer_cast<RootShadowNode>(rootNode);
@@ -682,6 +685,16 @@ void UIManager::setNativeAnimatedDelegate(
682
685
  nativeAnimatedDelegate_ = delegate;
683
686
  }
684
687
 
688
+ void UIManager::unstable_setAnimationBackend(
689
+ std::weak_ptr<UIManagerAnimationBackend> animationBackend) {
690
+ animationBackend_ = animationBackend;
691
+ }
692
+
693
+ std::weak_ptr<UIManagerAnimationBackend>
694
+ UIManager::unstable_getAnimationBackend() {
695
+ return animationBackend_;
696
+ }
697
+
685
698
  void UIManager::animationTick() const {
686
699
  if (animationDelegate_ != nullptr &&
687
700
  animationDelegate_->shouldAnimateFrame()) {
@@ -727,6 +740,7 @@ void UIManager::setOnSurfaceStartCallback(
727
740
  }
728
741
 
729
742
  } // namespace facebook::react
743
+
730
744
  #if _MSC_VER
731
745
  #pragma warning(pop)
732
746
  #endif
@@ -5,6 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
+
8
9
  #if _MSC_VER
9
10
  #pragma warning(push)
10
11
  #pragma warning(disable : 4996) // deprecated APIs
@@ -19,6 +20,7 @@
19
20
  #include <cxxreact/TraceSection.h>
20
21
  #include <glog/logging.h>
21
22
  #include <jsi/JSIDynamic.h>
23
+ #include <jsi/hermes.h>
22
24
  #include <jsi/instrumentation.h>
23
25
  #include <jsinspector-modern/HostTarget.h>
24
26
  #include <jsireact/JSIExecutor.h>
@@ -244,9 +246,21 @@ void ReactInstance::loadScript(
244
246
  if (hasLogger) {
245
247
  ReactMarker::logTaggedMarkerBridgeless(
246
248
  ReactMarker::RUN_JS_BUNDLE_START, scriptName.c_str());
249
+ ReactMarker::logMarkerBridgeless(ReactMarker::INIT_REACT_RUNTIME_START);
250
+ ReactMarker::logMarkerBridgeless(ReactMarker::APP_STARTUP_START);
247
251
  }
248
252
 
249
- runtime.evaluateJavaScript(buffer, sourceURL);
253
+ // Check if the shermes unit is avaliable.
254
+ auto* shUnitAPI = jsi::castInterface<hermes::IHermesSHUnit>(&runtime);
255
+ auto* shUnitCreator = shUnitAPI ? shUnitAPI->getSHUnitCreator() : nullptr;
256
+ if (shUnitCreator) {
257
+ LOG(WARNING) << "ReactInstance: evaluateSHUnit";
258
+ auto* hermesAPI = jsi::castInterface<hermes::IHermes>(&runtime);
259
+ hermesAPI->evaluateSHUnit(shUnitCreator);
260
+ } else {
261
+ LOG(WARNING) << "ReactInstance: evaluateJavaScript() with JS bundle";
262
+ runtime.evaluateJavaScript(buffer, sourceURL);
263
+ }
250
264
 
251
265
  /**
252
266
  * TODO(T183610671): We need a safe/reliable way to enable the js
@@ -682,6 +696,7 @@ void* ReactInstance::getJavaScriptContext() {
682
696
  }
683
697
 
684
698
  } // namespace facebook::react
699
+
685
700
  #if _MSC_VER
686
701
  #pragma warning(pop)
687
702
  #endif
@@ -5,7 +5,7 @@ param(
5
5
  [string] $SourceRoot = ($PSScriptRoot | Split-Path | Split-Path | Split-Path),
6
6
  [string] $TargetRoot = "$SourceRoot\vnext\target",
7
7
  [System.IO.DirectoryInfo] $ReactWindowsRoot = "$SourceRoot\vnext",
8
- [System.IO.DirectoryInfo] $ReactNativeRoot = "$SourceRoot\node_modules\react-native",
8
+ [System.IO.DirectoryInfo] $ReactNativeRoot = "$SourceRoot\node_modules\react-native",
9
9
  [string[]] $Extensions = ('h', 'hpp', 'def')
10
10
  )
11
11
 
@@ -111,20 +111,6 @@ Get-ChildItem -Path $ReactWindowsRoot\Desktop.DLL -Recurse -Include '*.def' | Fo
111
111
  -Force
112
112
  }
113
113
 
114
- # React.Windows.Test headers
115
- Get-ChildItem -Path $ReactWindowsRoot\Test -Name -Recurse -Include $patterns | ForEach-Object { Copy-Item `
116
- -Path $ReactWindowsRoot\Test\$_ `
117
- -Destination (New-Item -ItemType Directory $TargetRoot\inc\Test\$(Split-Path $_) -Force) `
118
- -Force
119
- }
120
-
121
- # React.Windows.Test DLL DEF files
122
- Get-ChildItem -Path $ReactWindowsRoot\Desktop.Test.DLL -Name -Recurse -Include $patterns | ForEach-Object { Copy-Item `
123
- -Path $ReactWindowsRoot\Desktop.Test.DLL\$_ `
124
- -Destination (New-Item -ItemType Directory $TargetRoot\inc\$(Split-Path $_) -Force) `
125
- -Force
126
- }
127
-
128
114
  # include headers
129
115
  Copy-Item -Force -Recurse -Path $ReactWindowsRoot\include -Destination $TargetRoot\inc
130
116
 
@@ -117,7 +117,7 @@ if not "x%RN_VERSION:nightly=%"=="x%RN_VERSION%" (
117
117
  REM Do not change, this makes sure we always get a nightly template when still consuming a nightly RN and NOT a later "stable" template that may have been released
118
118
  REM set RNCLI_TEMPLATE=--template "@react-native-community/template@^%RN_VERSION:~0,4%.0-"
119
119
  REM Windows we need to manually update this with every integration #15124
120
- set RNCLI_TEMPLATE=--template "@react-native-community/template@0.82.0-nightly-202591-d2a0bee"
120
+ set RNCLI_TEMPLATE=--template "@react-native-community/template@0.83.2"
121
121
  )
122
122
 
123
123
  @echo creaternwapp.cmd: Creating base RN app project with: npx --yes @react-native-community/cli@%RNCLI_VERSION% init %APP_NAME% --version %RN_VERSION% %RNCLI_TEMPLATE% --verbose --skip-install --install-pods false --skip-git-init true