react-native-windows 0.69.6 → 0.70.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 (305) hide show
  1. package/.flowconfig +5 -1
  2. package/Chakra/ChakraHelpers.cpp +1 -1
  3. package/Chakra/ChakraPlatform.cpp +1 -1
  4. package/Chakra/ChakraValue.cpp +6 -3
  5. package/Chakra/ChakraValue.h +1 -1
  6. package/Directory.Build.props +7 -7
  7. package/Folly/Folly.vcxproj +20 -13
  8. package/Folly/cgmanifest.json +14 -0
  9. package/Libraries/Alert/Alert.js +18 -4
  10. package/Libraries/Alert/Alert.windows.js +4 -0
  11. package/Libraries/Alert/NativeAlertManager.js +1 -0
  12. package/Libraries/Animated/Animated.js +2 -2
  13. package/Libraries/Animated/AnimatedEvent.js +7 -4
  14. package/Libraries/Animated/AnimatedImplementation.js +17 -3
  15. package/Libraries/Animated/AnimatedMock.js +7 -2
  16. package/Libraries/Animated/NativeAnimatedHelper.js +220 -95
  17. package/Libraries/Animated/NativeAnimatedModule.js +3 -0
  18. package/Libraries/Animated/NativeAnimatedTurboModule.js +3 -0
  19. package/Libraries/Animated/animations/SpringAnimation.js +3 -3
  20. package/Libraries/Animated/animations/TimingAnimation.js +3 -3
  21. package/Libraries/Animated/createAnimatedComponent.js +8 -1
  22. package/Libraries/Animated/nodes/AnimatedAddition.js +3 -1
  23. package/Libraries/Animated/nodes/AnimatedColor.js +50 -29
  24. package/Libraries/Animated/nodes/AnimatedDiffClamp.js +3 -1
  25. package/Libraries/Animated/nodes/AnimatedDivision.js +3 -1
  26. package/Libraries/Animated/nodes/AnimatedInterpolation.js +22 -21
  27. package/Libraries/Animated/nodes/AnimatedModulo.js +3 -1
  28. package/Libraries/Animated/nodes/AnimatedMultiplication.js +3 -2
  29. package/Libraries/Animated/nodes/AnimatedProps.js +20 -12
  30. package/Libraries/Animated/nodes/AnimatedStyle.js +19 -16
  31. package/Libraries/Animated/nodes/AnimatedSubtraction.js +3 -1
  32. package/Libraries/Animated/nodes/AnimatedTransform.js +5 -5
  33. package/Libraries/Animated/nodes/AnimatedValue.js +14 -5
  34. package/Libraries/Animated/nodes/AnimatedValueXY.js +28 -1
  35. package/Libraries/Animated/useAnimatedProps.js +1 -0
  36. package/Libraries/AppState/AppState.js +0 -32
  37. package/Libraries/AppTheme/AppTheme.js +14 -8
  38. package/Libraries/AppTheme/AppThemeTypes.d.ts +0 -3
  39. package/Libraries/BatchedBridge/MessageQueue.js +21 -15
  40. package/Libraries/BatchedBridge/NativeModules.js +3 -4
  41. package/Libraries/Blob/FileReader.js +0 -6
  42. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +0 -20
  43. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +0 -20
  44. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +4 -0
  45. package/Libraries/Components/Keyboard/Keyboard.js +0 -11
  46. package/Libraries/Components/Pressable/Pressable.js +2 -0
  47. package/Libraries/Components/Pressable/Pressable.windows.js +2 -0
  48. package/Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js +1 -3
  49. package/Libraries/Components/SafeAreaView/SafeAreaView.js +3 -30
  50. package/Libraries/Components/SafeAreaView/SafeAreaView.windows.js +4 -30
  51. package/Libraries/Components/ScrollView/ScrollView.js +13 -11
  52. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +5 -3
  53. package/Libraries/Components/StatusBar/StatusBar.js +10 -7
  54. package/Libraries/Components/TextInput/InputAccessoryView.js +14 -13
  55. package/Libraries/Components/TextInput/TextInput.js +12 -2
  56. package/Libraries/Components/TextInput/TextInput.windows.js +12 -2
  57. package/Libraries/Components/Touchable/PooledClass.js +16 -4
  58. package/Libraries/Components/Touchable/Touchable.js +50 -1
  59. package/Libraries/Components/Touchable/Touchable.windows.js +972 -0
  60. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +6 -2
  61. package/Libraries/Components/View/ReactNativeStyleAttributes.js +0 -7
  62. package/Libraries/Components/View/ViewPropTypes.js +3 -8
  63. package/Libraries/Components/View/ViewPropTypes.windows.js +3 -8
  64. package/Libraries/Core/ExceptionsManager.js +2 -0
  65. package/Libraries/Core/ReactNativeVersion.js +1 -1
  66. package/Libraries/Core/Timers/JSTimers.js +2 -2
  67. package/Libraries/Core/polyfillPromise.js +0 -32
  68. package/Libraries/Core/setUpBatchedBridge.js +5 -1
  69. package/Libraries/Core/setUpPerformance.js +1 -1
  70. package/Libraries/EventEmitter/NativeEventEmitter.js +0 -13
  71. package/Libraries/Image/AssetSourceResolver.js +2 -2
  72. package/Libraries/Image/Image.android.js +5 -3
  73. package/Libraries/Image/Image.ios.js +6 -3
  74. package/Libraries/Image/Image.windows.js +6 -3
  75. package/Libraries/Image/ImageSource.js +7 -5
  76. package/Libraries/Inspector/ElementBox.js +2 -2
  77. package/Libraries/Inspector/NetworkOverlay.js +13 -8
  78. package/Libraries/Interaction/PanResponder.js +16 -14
  79. package/Libraries/Linking/Linking.js +0 -11
  80. package/Libraries/Lists/FlatList.js +3 -2
  81. package/Libraries/Lists/SectionList.js +2 -0
  82. package/Libraries/Lists/ViewabilityHelper.js +7 -3
  83. package/Libraries/Lists/VirtualizeUtils.js +33 -20
  84. package/Libraries/Lists/VirtualizedList.js +93 -47
  85. package/Libraries/Lists/VirtualizedListContext.js +1 -0
  86. package/Libraries/Lists/VirtualizedSectionList.js +14 -9
  87. package/Libraries/Lists/__tests__/VirtualizeUtils-test.js +19 -18
  88. package/Libraries/Lists/__tests__/VirtualizedList-test.js +10 -6
  89. package/Libraries/LogBox/Data/LogBoxData.js +1 -1
  90. package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
  91. package/Libraries/LogBox/LogBox.js +3 -1
  92. package/Libraries/LogBox/UI/AnsiHighlight.js +2 -0
  93. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +3 -0
  94. package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +0 -3
  95. package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +8 -3
  96. package/Libraries/NativeComponent/BaseViewConfig.android.js +9 -18
  97. package/Libraries/NativeComponent/BaseViewConfig.ios.js +26 -12
  98. package/Libraries/NativeComponent/BaseViewConfig.windows.js +26 -12
  99. package/Libraries/Network/XMLHttpRequest.js +9 -11
  100. package/Libraries/Performance/PureComponentDebug.js +1 -0
  101. package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +9 -1
  102. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +16 -0
  103. package/Libraries/Pressability/Pressability.js +26 -16
  104. package/Libraries/Pressability/Pressability.windows.js +30 -17
  105. package/Libraries/Promise.js +0 -1
  106. package/Libraries/ReactNative/AppRegistry.js +16 -13
  107. package/Libraries/ReactNative/BridgelessUIManager.js +2 -0
  108. package/Libraries/ReactNative/PaperUIManager.js +9 -9
  109. package/Libraries/ReactNative/PaperUIManager.windows.js +7 -8
  110. package/Libraries/ReactNative/ReactNativeFeatureFlags.js +12 -0
  111. package/Libraries/ReactNative/ReactNativeRuntimeDiagnostics.js +68 -0
  112. package/Libraries/ReactNative/getNativeComponentAttributes.js +6 -7
  113. package/Libraries/ReactNative/renderApplication.js +1 -1
  114. package/Libraries/Renderer/implementations/ReactFabric-dev.js +4443 -3615
  115. package/Libraries/Renderer/implementations/ReactFabric-prod.js +1496 -1170
  116. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +1694 -1356
  117. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +4439 -3588
  118. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +1583 -1249
  119. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +1719 -1372
  120. package/Libraries/Storage/AsyncStorage.js +7 -1
  121. package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +8 -0
  122. package/Libraries/StyleSheet/flattenStyle.js +1 -1
  123. package/Libraries/StyleSheet/processTransform.js +2 -0
  124. package/Libraries/StyleSheet/processTransform.windows.js +2 -0
  125. package/Libraries/StyleSheet/splitLayoutProps.js +2 -0
  126. package/Libraries/Text/Text.js +15 -7
  127. package/Libraries/Text/Text.windows.js +14 -7
  128. package/Libraries/Types/CoreEventTypes.js +137 -11
  129. package/Libraries/Types/CoreEventTypes.windows.js +147 -22
  130. package/Libraries/Utilities/Dimensions.js +0 -13
  131. package/Libraries/Utilities/HMRClient.js +3 -3
  132. package/Libraries/Utilities/Platform.ios.js +0 -7
  133. package/Libraries/Utilities/ReactNativeTestTools.js +3 -1
  134. package/Libraries/Utilities/codegenNativeCommands.js +11 -2
  135. package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +2 -0
  136. package/Libraries/Utilities/stringifySafe.js +3 -1
  137. package/Libraries/Utilities/truncate.js +1 -1
  138. package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +2 -2
  139. package/Libraries/Vibration/Vibration.js +1 -1
  140. package/Libraries/WebSocket/WebSocket.js +1 -0
  141. package/Libraries/vendor/emitter/EventEmitter.js +105 -12
  142. package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +73 -117
  143. package/Microsoft.ReactNative/Base/CoreNativeModules.cpp +24 -12
  144. package/Microsoft.ReactNative/CoreApp.cpp +303 -0
  145. package/Microsoft.ReactNative/CoreAppPage.cpp +21 -0
  146. package/Microsoft.ReactNative/CoreAppPage.h +15 -0
  147. package/Microsoft.ReactNative/CoreAppPage.idl +12 -0
  148. package/Microsoft.ReactNative/CoreAppPage.xaml +14 -0
  149. package/Microsoft.ReactNative/Fabric/ActivityIndicatorComponentView.cpp +1 -2
  150. package/Microsoft.ReactNative/Fabric/ActivityIndicatorComponentView.h +1 -1
  151. package/Microsoft.ReactNative/Fabric/ComponentView.h +1 -1
  152. package/Microsoft.ReactNative/Fabric/ImageComponentView.cpp +1 -1
  153. package/Microsoft.ReactNative/Fabric/ImageComponentView.h +1 -1
  154. package/Microsoft.ReactNative/Fabric/ParagraphComponentView.cpp +1 -1
  155. package/Microsoft.ReactNative/Fabric/ParagraphComponentView.h +1 -1
  156. package/Microsoft.ReactNative/Fabric/ScrollViewComponentView.cpp +1 -1
  157. package/Microsoft.ReactNative/Fabric/ScrollViewComponentView.h +1 -1
  158. package/Microsoft.ReactNative/Fabric/SliderComponentView.cpp +1 -1
  159. package/Microsoft.ReactNative/Fabric/SliderComponentView.h +1 -1
  160. package/Microsoft.ReactNative/Fabric/SwitchComponentView.cpp +1 -1
  161. package/Microsoft.ReactNative/Fabric/SwitchComponentView.h +1 -1
  162. package/Microsoft.ReactNative/Fabric/TextComponentView.cpp +1 -1
  163. package/Microsoft.ReactNative/Fabric/TextComponentView.h +1 -1
  164. package/Microsoft.ReactNative/Fabric/TextInput/WindowsTextInputComponentView.cpp +1 -1
  165. package/Microsoft.ReactNative/Fabric/TextInput/WindowsTextInputComponentView.h +1 -1
  166. package/Microsoft.ReactNative/Fabric/ViewComponentView.cpp +1 -1
  167. package/Microsoft.ReactNative/Fabric/ViewComponentView.h +1 -1
  168. package/Microsoft.ReactNative/GlyphViewManager.cpp +1 -0
  169. package/Microsoft.ReactNative/IReactDispatcher.cpp +18 -0
  170. package/Microsoft.ReactNative/IReactDispatcher.h +18 -3
  171. package/Microsoft.ReactNative/IReactDispatcher.idl +15 -0
  172. package/Microsoft.ReactNative/IReactPropertyBag.cpp +9 -0
  173. package/Microsoft.ReactNative/IReactPropertyBag.h +3 -0
  174. package/Microsoft.ReactNative/IReactPropertyBag.idl +3 -0
  175. package/Microsoft.ReactNative/JSDispatcherWriter.cpp +60 -22
  176. package/Microsoft.ReactNative/JSDispatcherWriter.h +5 -3
  177. package/Microsoft.ReactNative/JsiApi.cpp +41 -1
  178. package/Microsoft.ReactNative/JsiApi.h +3 -0
  179. package/Microsoft.ReactNative/JsiApi.idl +19 -1
  180. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +18 -2
  181. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters +7 -7
  182. package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.h +1 -1
  183. package/Microsoft.ReactNative/Modules/AlertModule.cpp +15 -12
  184. package/Microsoft.ReactNative/Modules/AlertModule.h +1 -1
  185. package/Microsoft.ReactNative/Modules/AppStateModule.cpp +45 -9
  186. package/Microsoft.ReactNative/Modules/AppStateModule.h +9 -3
  187. package/Microsoft.ReactNative/Modules/AppThemeModuleUwp.h +1 -1
  188. package/Microsoft.ReactNative/Modules/ClipboardModule.h +1 -1
  189. package/Microsoft.ReactNative/Modules/DevSettingsModule.h +1 -1
  190. package/Microsoft.ReactNative/Modules/DeviceInfoModule.h +1 -1
  191. package/Microsoft.ReactNative/Modules/I18nManagerModule.h +1 -1
  192. package/Microsoft.ReactNative/Modules/ImageViewManagerModule.cpp +1 -1
  193. package/Microsoft.ReactNative/Modules/ImageViewManagerModule.h +1 -1
  194. package/Microsoft.ReactNative/Modules/LinkingManagerModule.h +1 -1
  195. package/Microsoft.ReactNative/Modules/LogBoxModule.h +1 -1
  196. package/Microsoft.ReactNative/Modules/NativeUIManager.cpp +66 -39
  197. package/Microsoft.ReactNative/Modules/PaperUIManagerModule.cpp +41 -11
  198. package/Microsoft.ReactNative/Modules/PaperUIManagerModule.h +1 -1
  199. package/Microsoft.ReactNative/QuirkSettings.cpp +22 -0
  200. package/Microsoft.ReactNative/QuirkSettings.h +10 -0
  201. package/Microsoft.ReactNative/QuirkSettings.idl +7 -0
  202. package/Microsoft.ReactNative/ReactApplication.cpp +44 -0
  203. package/Microsoft.ReactNative/ReactApplication.h +40 -5
  204. package/Microsoft.ReactNative/ReactHost/JSCallInvokerScheduler.cpp +5 -2
  205. package/Microsoft.ReactNative/ReactHost/JSCallInvokerScheduler.h +1 -0
  206. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +24 -4
  207. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h +1 -1
  208. package/Microsoft.ReactNative/ReactPointerEventArgs.cpp +12 -2
  209. package/Microsoft.ReactNative/TurboModulesProvider.cpp +146 -84
  210. package/Microsoft.ReactNative/TurboModulesProvider.h +5 -0
  211. package/Microsoft.ReactNative/Utils/BatchingEventEmitter.cpp +1 -0
  212. package/Microsoft.ReactNative/Utils/Helpers.cpp +1 -1
  213. package/Microsoft.ReactNative/Utils/Helpers.h +1 -1
  214. package/Microsoft.ReactNative/Utils/PropertyUtils.h +1 -1
  215. package/Microsoft.ReactNative/Utils/TransformableText.h +1 -1
  216. package/Microsoft.ReactNative/Utils/ValueUtils.cpp +0 -1
  217. package/Microsoft.ReactNative/Views/DynamicAutomationPeer.cpp +9 -7
  218. package/Microsoft.ReactNative/Views/DynamicAutomationProperties.cpp +3 -3
  219. package/Microsoft.ReactNative/Views/FlyoutViewManager.cpp +13 -1
  220. package/Microsoft.ReactNative/Views/FrameworkElementTransferProperties.cpp +1 -1
  221. package/Microsoft.ReactNative/Views/FrameworkElementViewManager.cpp +63 -13
  222. package/Microsoft.ReactNative/Views/Image/ImageViewManager.cpp +1 -1
  223. package/Microsoft.ReactNative/Views/Image/ReactImage.cpp +5 -6
  224. package/Microsoft.ReactNative/Views/Image/ReactImage.h +4 -4
  225. package/Microsoft.ReactNative/Views/Text/TextTransformParentVisitor.h +1 -1
  226. package/Microsoft.ReactNative/Views/TextInputViewManager.cpp +21 -2
  227. package/Microsoft.ReactNative/Views/TextViewManager.cpp +6 -3
  228. package/Microsoft.ReactNative/Views/TouchEventHandler.cpp +1 -1
  229. package/Microsoft.ReactNative/Views/ViewManagerBase.cpp +7 -1
  230. package/Microsoft.ReactNative/Views/ViewPanel.cpp +4 -0
  231. package/Microsoft.ReactNative/Views/ViewViewManager.cpp +8 -3
  232. package/Microsoft.ReactNative/Views/cppwinrt/DynamicAutomationPeer.idl +2 -0
  233. package/Microsoft.ReactNative/microsoft.reactnative.def +4 -1
  234. package/Microsoft.ReactNative.Cxx/AppModelHelpers.h +17 -0
  235. package/Microsoft.ReactNative.Cxx/CoreApp.h +60 -0
  236. package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.cpp +65 -0
  237. package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.h +13 -0
  238. package/Microsoft.ReactNative.Cxx/JSI/JsiValueHelpers.cpp +53 -0
  239. package/Microsoft.ReactNative.Cxx/JSI/JsiValueHelpers.h +32 -0
  240. package/Microsoft.ReactNative.Cxx/JSI/LongLivedJsiValue.h +84 -0
  241. package/Microsoft.ReactNative.Cxx/JSI/NodeApiJsiRuntime.cpp +14 -2
  242. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems +4 -0
  243. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters +10 -0
  244. package/Microsoft.ReactNative.Managed/packages.lock.json +1 -24
  245. package/Mso/dispatchQueue/dispatchQueue.h +12 -4
  246. package/Mso/src/dispatchQueue/looperScheduler.cpp +36 -9
  247. package/Mso/src/dispatchQueue/queueService.cpp +2 -2
  248. package/Mso/src/dispatchQueue/queueService.h +2 -2
  249. package/Mso/src/dispatchQueue/uiScheduler_winrt.cpp +6 -1
  250. package/Mso/src/memoryApi/memoryApi.cpp +3 -0
  251. package/PropertySheets/Generated/PackageVersion.g.props +3 -3
  252. package/PropertySheets/JSEngine.props +1 -1
  253. package/PropertySheets/Release.props +6 -0
  254. package/ReactCommon/ReactCommon.vcxproj +11 -21
  255. package/ReactCommon/ReactCommon.vcxproj.filters +64 -46
  256. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.h +145 -0
  257. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp +344 -0
  258. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/text/BaseTextProps.cpp +313 -0
  259. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/ViewProps.cpp +455 -0
  260. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/ConcreteComponentDescriptor.h +216 -0
  261. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/PropsMacros.h +91 -0
  262. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/graphics/RectangleEdges.h +100 -0
  263. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/CompactValue.h +3 -1
  264. package/Scripts/Microsoft.ReactNative.nuspec +6 -0
  265. package/Scripts/Microsoft.ReactNative.targets +7 -0
  266. package/Shared/DevSettings.h +4 -0
  267. package/Shared/InstanceManager.cpp +29 -0
  268. package/Shared/InstanceManager.h +14 -0
  269. package/Shared/JSI/ChakraRuntime.cpp +11 -2
  270. package/Shared/JSI/ChakraRuntime.h +2 -0
  271. package/Shared/Modules/BlobModule.cpp +4 -4
  272. package/Shared/Modules/BlobModule.h +1 -1
  273. package/Shared/Modules/FileReaderModule.cpp +3 -2
  274. package/Shared/Modules/IBlobPersistor.h +1 -1
  275. package/Shared/Networking/IHttpResource.h +1 -0
  276. package/Shared/Networking/OriginPolicyHttpFilter.cpp +16 -10
  277. package/Shared/Networking/WinRTHttpResource.cpp +34 -2
  278. package/Shared/OInstance.cpp +29 -6
  279. package/Shared/OInstance.h +4 -13
  280. package/Shared/Threading/BatchingQueueThread.cpp +23 -12
  281. package/Shared/Utils.cpp +2 -5
  282. package/codegen/NativeAlertManagerSpec.g.h +2 -0
  283. package/codegen/NativeAnimatedModuleSpec.g.h +6 -0
  284. package/codegen/NativeAnimatedTurboModuleSpec.g.h +6 -0
  285. package/codegen/react/components/rnwcore/Props.cpp +2 -2
  286. package/codegen/react/components/rnwcore/Props.h +1 -1
  287. package/fmt/cgmanifest.json +14 -0
  288. package/fmt/fmt.vcxproj +25 -11
  289. package/jest/assetFileTransformer.js +3 -2
  290. package/jest/setup.js +4 -0
  291. package/package.json +25 -26
  292. package/rntypes/index.d.ts +0 -1
  293. package/template/cs-app-WinAppSDK/proj/{NuGet.Config → NuGet_Config} +0 -0
  294. package/template/metro.devMode.config.js +49 -2
  295. package/template/shared-app/proj/{NuGet.Config → NuGet_Config} +0 -0
  296. package/template/shared-lib/proj/{NuGet.Config → NuGet_Config} +0 -0
  297. package/Libraries/vendor/emitter/EventSubscription.js +0 -19
  298. package/Libraries/vendor/emitter/_EmitterSubscription.js +0 -62
  299. package/Libraries/vendor/emitter/_EventEmitter.js +0 -184
  300. package/Libraries/vendor/emitter/_EventSubscription.js +0 -45
  301. package/Libraries/vendor/emitter/_EventSubscriptionVendor.js +0 -108
  302. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h +0 -87
  303. package/Scripts/copyRNLibraries.js +0 -99
  304. package/jest/preprocessor.js +0 -40
  305. package/jest/preprocessor_DO_NOT_USE.js +0 -122
@@ -93,8 +93,8 @@ static void GetAccessibilityStateProps(const winrt::Microsoft::ReactNative::IJSV
93
93
 
94
94
  static void GetAccessibilityValueProps(const winrt::Microsoft::ReactNative::IJSValueWriter &writer) {
95
95
  writer.WriteObjectBegin();
96
- winrt::Microsoft::ReactNative::WriteProperty(writer, L"min", L"boolean");
97
- winrt::Microsoft::ReactNative::WriteProperty(writer, L"max", L"boolean");
96
+ winrt::Microsoft::ReactNative::WriteProperty(writer, L"min", L"number");
97
+ winrt::Microsoft::ReactNative::WriteProperty(writer, L"max", L"number");
98
98
  winrt::Microsoft::ReactNative::WriteProperty(writer, L"now", L"number");
99
99
  winrt::Microsoft::ReactNative::WriteProperty(writer, L"text", L"string");
100
100
  writer.WriteObjectEnd();
@@ -235,12 +235,12 @@ bool FrameworkElementViewManager::UpdateProperty(
235
235
  MultiplyInto(
236
236
  transformMatrix,
237
237
  winrt::Windows::Foundation::Numerics::float4x4(
238
- winrt::Windows::Foundation::Numerics::make_float3x2_skew(innerValue.AsSingle(), 0.f)));
238
+ winrt::Windows::Foundation::Numerics::make_float3x2_skew(ToRadians(innerValue), 0.f)));
239
239
  } else if (transformType == "skewY") {
240
240
  MultiplyInto(
241
241
  transformMatrix,
242
242
  winrt::Windows::Foundation::Numerics::float4x4(
243
- winrt::Windows::Foundation::Numerics::make_float3x2_skew(0.f, innerValue.AsSingle())));
243
+ winrt::Windows::Foundation::Numerics::make_float3x2_skew(0.f, ToRadians(innerValue))));
244
244
  }
245
245
  }
246
246
  }
@@ -526,29 +526,79 @@ bool FrameworkElementViewManager::UpdateProperty(
526
526
  DynamicAutomationProperties::SetAccessibilityStateCollapsed(
527
527
  element, states[static_cast<int32_t>(winrt::Microsoft::ReactNative::AccessibilityStates::Collapsed)]);
528
528
  } else if (propertyName == "accessibilityValue") {
529
+ winrt::hstring textValue;
530
+ const int numericValuesCount = 3;
531
+ double numericValues[numericValuesCount] = {};
532
+
529
533
  if (propertyValue.Type() == winrt::Microsoft::ReactNative::JSValueType::Object) {
530
534
  for (const auto &pair : propertyValue.AsObject()) {
531
535
  const std::string &innerName = pair.first;
532
536
  const auto &innerValue = pair.second;
533
537
 
538
+ auto peer = xaml::Automation::Peers::FrameworkElementAutomationPeer::FromElement(element);
539
+
534
540
  if (innerName == "min" &&
535
541
  (innerValue.Type() == winrt::Microsoft::ReactNative::JSValueType::Double ||
536
542
  innerValue.Type() == winrt::Microsoft::ReactNative::JSValueType::Int64)) {
537
- DynamicAutomationProperties::SetAccessibilityValueMin(element, innerValue.AsDouble());
543
+ numericValues[static_cast<int32_t>(winrt::Microsoft::ReactNative::AccessibilityValue::Min)] =
544
+ innerValue.AsDouble();
545
+
546
+ const auto prevMinValue = DynamicAutomationProperties::GetAccessibilityValueMin(element);
547
+ if (peer != nullptr && prevMinValue != innerValue.AsDouble()) {
548
+ peer.RaisePropertyChangedEvent(
549
+ winrt::RangeValuePatternIdentifiers::MinimumProperty(),
550
+ winrt::box_value(prevMinValue),
551
+ winrt::box_value(innerValue.AsDouble()));
552
+ }
538
553
  } else if (
539
- innerName == "max" && innerValue.Type() == winrt::Microsoft::ReactNative::JSValueType::Double ||
540
- innerValue.Type() == winrt::Microsoft::ReactNative::JSValueType::Int64) {
541
- DynamicAutomationProperties::SetAccessibilityValueMax(element, innerValue.AsDouble());
554
+ innerName == "max" &&
555
+ (innerValue.Type() == winrt::Microsoft::ReactNative::JSValueType::Double ||
556
+ innerValue.Type() == winrt::Microsoft::ReactNative::JSValueType::Int64)) {
557
+ numericValues[static_cast<int32_t>(winrt::Microsoft::ReactNative::AccessibilityValue::Max)] =
558
+ innerValue.AsDouble();
559
+
560
+ const auto prevMaxValue = DynamicAutomationProperties::GetAccessibilityValueMax(element);
561
+ if (peer != nullptr && prevMaxValue != innerValue.AsDouble()) {
562
+ peer.RaisePropertyChangedEvent(
563
+ winrt::RangeValuePatternIdentifiers::MaximumProperty(),
564
+ winrt::box_value(prevMaxValue),
565
+ winrt::box_value(innerValue.AsDouble()));
566
+ }
542
567
  } else if (
543
- innerName == "now" && innerValue.Type() == winrt::Microsoft::ReactNative::JSValueType::Double ||
544
- innerValue.Type() == winrt::Microsoft::ReactNative::JSValueType::Int64) {
545
- DynamicAutomationProperties::SetAccessibilityValueNow(element, innerValue.AsDouble());
568
+ innerName == "now" &&
569
+ (innerValue.Type() == winrt::Microsoft::ReactNative::JSValueType::Double ||
570
+ innerValue.Type() == winrt::Microsoft::ReactNative::JSValueType::Int64)) {
571
+ numericValues[static_cast<int32_t>(winrt::Microsoft::ReactNative::AccessibilityValue::Now)] =
572
+ innerValue.AsDouble();
573
+
574
+ const auto prevNowValue = DynamicAutomationProperties::GetAccessibilityValueNow(element);
575
+ if (peer != nullptr && prevNowValue != innerValue.AsDouble()) {
576
+ peer.RaisePropertyChangedEvent(
577
+ winrt::RangeValuePatternIdentifiers::ValueProperty(),
578
+ winrt::box_value(prevNowValue),
579
+ winrt::box_value(innerValue.AsDouble()));
580
+ }
546
581
  } else if (innerName == "text" && innerValue.Type() == winrt::Microsoft::ReactNative::JSValueType::String) {
547
- auto value = asHstring(innerValue);
548
- DynamicAutomationProperties::SetAccessibilityValueText(element, value);
582
+ textValue = asHstring(innerValue);
583
+
584
+ const auto prevTextValue = DynamicAutomationProperties::GetAccessibilityValueText(element);
585
+ if (peer != nullptr && prevTextValue != textValue) {
586
+ peer.RaisePropertyChangedEvent(
587
+ winrt::ValuePatternIdentifiers::ValueProperty(),
588
+ winrt::box_value(prevTextValue),
589
+ winrt::box_value(textValue));
590
+ }
549
591
  }
550
592
  }
551
593
  }
594
+
595
+ DynamicAutomationProperties::SetAccessibilityValueMin(
596
+ element, numericValues[static_cast<int32_t>(winrt::Microsoft::ReactNative::AccessibilityValue::Min)]);
597
+ DynamicAutomationProperties::SetAccessibilityValueMax(
598
+ element, numericValues[static_cast<int32_t>(winrt::Microsoft::ReactNative::AccessibilityValue::Max)]);
599
+ DynamicAutomationProperties::SetAccessibilityValueNow(
600
+ element, numericValues[static_cast<int32_t>(winrt::Microsoft::ReactNative::AccessibilityValue::Now)]);
601
+ DynamicAutomationProperties::SetAccessibilityValueText(element, textValue);
552
602
  } else if (propertyName == "testID") {
553
603
  if (propertyValue.Type() == winrt::Microsoft::ReactNative::JSValueType::String) {
554
604
  auto value = asHstring(propertyValue);
@@ -14,8 +14,8 @@
14
14
  #include <IReactInstance.h>
15
15
  #include <Utils/PropertyHandlerUtils.h>
16
16
  #include <Utils/PropertyUtils.h>
17
+ #include <Views/DynamicAutomationProperties.h>
17
18
  #include <Views/ShadowNodeBase.h>
18
- #include "DynamicAutomationProperties.h"
19
19
  #include "ReactImage.h"
20
20
 
21
21
  namespace winrt {
@@ -13,7 +13,7 @@
13
13
  #include <winrt/Windows.Web.Http.h>
14
14
 
15
15
  #include <Utils/ValueUtils.h>
16
- #include "DynamicAutomationPeer.h"
16
+ #include <Views/DynamicAutomationPeer.h>
17
17
  #include "Unicode.h"
18
18
  #include "XamlView.h"
19
19
  #include "cdebug.h"
@@ -171,8 +171,7 @@ void ReactImage::Source(ReactImageSource source) {
171
171
  }
172
172
  }
173
173
 
174
- winrt::IAsyncOperation<winrt::InMemoryRandomAccessStream> ReactImage::GetImageMemoryStreamAsync(
175
- ReactImageSource source) {
174
+ winrt::IAsyncOperation<winrt::IRandomAccessStream> ReactImage::GetImageMemoryStreamAsync(ReactImageSource source) {
176
175
  switch (source.sourceType) {
177
176
  case ImageSourceType::Download:
178
177
  co_return co_await GetImageStreamAsync(source);
@@ -223,7 +222,7 @@ winrt::fire_and_forget ReactImage::SetBackground(bool fireLoadEndEvent) {
223
222
  const bool fromStream{
224
223
  source.sourceType == ImageSourceType::Download || source.sourceType == ImageSourceType::InlineData};
225
224
 
226
- winrt::InMemoryRandomAccessStream memoryStream{nullptr};
225
+ winrt::IRandomAccessStream memoryStream{nullptr};
227
226
 
228
227
  // get weak reference before any co_await calls
229
228
  auto weak_this{get_weak()};
@@ -443,7 +442,7 @@ winrt::fire_and_forget ReactImage::SetBackground(bool fireLoadEndEvent) {
443
442
  }
444
443
  }
445
444
 
446
- winrt::IAsyncOperation<winrt::InMemoryRandomAccessStream> GetImageStreamAsync(ReactImageSource source) {
445
+ winrt::IAsyncOperation<winrt::IRandomAccessStream> GetImageStreamAsync(ReactImageSource source) {
447
446
  try {
448
447
  co_await winrt::resume_background();
449
448
 
@@ -480,7 +479,7 @@ winrt::IAsyncOperation<winrt::InMemoryRandomAccessStream> GetImageStreamAsync(Re
480
479
  co_return nullptr;
481
480
  }
482
481
 
483
- winrt::IAsyncOperation<winrt::InMemoryRandomAccessStream> GetImageInlineDataAsync(ReactImageSource source) {
482
+ winrt::IAsyncOperation<winrt::IRandomAccessStream> GetImageInlineDataAsync(ReactImageSource source) {
484
483
  size_t start = source.uri.find(',');
485
484
  if (start == std::string::npos || start + 1 > source.uri.length())
486
485
  co_return nullptr;
@@ -69,7 +69,7 @@ struct ReactImage : xaml::Controls::GridT<ReactImage> {
69
69
  private:
70
70
  xaml::Media::Stretch ResizeModeToStretch();
71
71
  xaml::Media::Stretch ResizeModeToStretch(winrt::Windows::Foundation::Size size);
72
- winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Storage::Streams::InMemoryRandomAccessStream>
72
+ winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Storage::Streams::IRandomAccessStream>
73
73
  GetImageMemoryStreamAsync(ReactImageSource source);
74
74
  winrt::fire_and_forget SetBackground(bool fireLoadEndEvent);
75
75
 
@@ -91,8 +91,8 @@ struct ReactImage : xaml::Controls::GridT<ReactImage> {
91
91
  };
92
92
 
93
93
  // Helper functions
94
- winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Storage::Streams::InMemoryRandomAccessStream>
95
- GetImageStreamAsync(ReactImageSource source);
96
- winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Storage::Streams::InMemoryRandomAccessStream>
94
+ winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Storage::Streams::IRandomAccessStream> GetImageStreamAsync(
95
+ ReactImageSource source);
96
+ winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Storage::Streams::IRandomAccessStream>
97
97
  GetImageInlineDataAsync(ReactImageSource source);
98
98
  } // namespace Microsoft::ReactNative
@@ -12,7 +12,7 @@ class TextTransformParentVisitor : public TextParentVisitor {
12
12
  using Super = TextParentVisitor;
13
13
 
14
14
  public:
15
- TextTransform textTransform;
15
+ TextTransform textTransform{TextTransform::Undefined};
16
16
 
17
17
  protected:
18
18
  void VisitText(ShadowNodeBase *node) override;
@@ -513,6 +513,13 @@ void TextInputShadowNode::updateProperties(winrt::Microsoft::ReactNative::JSValu
513
513
  m_hideCaret = propertyValue.AsBoolean();
514
514
  HideCaretIfNeeded();
515
515
  }
516
+ } else if (propertyName == "focusable") {
517
+ // parent class also sets isTabStop
518
+ if (propertyValue.Type() == winrt::Microsoft::ReactNative::JSValueType::Boolean) {
519
+ control.IsEnabled(propertyValue.AsBoolean());
520
+ } else if (propertyValue.IsNull()) {
521
+ control.ClearValue(xaml::Controls::Control::IsEnabledProperty());
522
+ }
516
523
  } else if (propertyName == "secureTextEntry") {
517
524
  markDirty = true;
518
525
  if (propertyValue.Type() == winrt::Microsoft::ReactNative::JSValueType::Boolean) {
@@ -887,7 +894,13 @@ void TextInputViewManager::TransferProperties(const XamlView &oldView, const Xam
887
894
  xaml::Controls::TextBox::SelectionHighlightColorProperty(),
888
895
  xaml::Controls::PasswordBox::SelectionHighlightColorProperty());
889
896
  newView.as<xaml::Controls::PasswordBox>().Password(oldView.as<xaml::Controls::TextBox>().Text());
890
- newView.as<xaml::Controls::PasswordBox>().IsEnabled(!oldView.as<xaml::Controls::TextBox>().IsReadOnly());
897
+ // Since both focasable/editable affect isEnabled for PasswordBox, if the oldView is enabled we still need to
898
+ // check isReadOnly
899
+ if (oldView.as<xaml::Controls::TextBox>().IsEnabled()) {
900
+ newView.as<xaml::Controls::PasswordBox>().IsEnabled(!oldView.as<xaml::Controls::TextBox>().IsReadOnly());
901
+ } else {
902
+ newView.as<xaml::Controls::PasswordBox>().IsEnabled(oldView.as<xaml::Controls::TextBox>().IsEnabled());
903
+ }
891
904
  } else {
892
905
  TransferProperty(
893
906
  oldView,
@@ -905,7 +918,13 @@ void TextInputViewManager::TransferProperties(const XamlView &oldView, const Xam
905
918
  xaml::Controls::PasswordBox::SelectionHighlightColorProperty(),
906
919
  xaml::Controls::TextBox::SelectionHighlightColorProperty());
907
920
  newView.as<xaml::Controls::TextBox>().Text(oldView.as<xaml::Controls::PasswordBox>().Password());
908
- newView.as<xaml::Controls::TextBox>().IsReadOnly(!oldView.as<xaml::Controls::PasswordBox>().IsEnabled());
921
+ // Since both focasable/editable affect isEnabled for PasswordBox, if the oldView is enabled we still need to
922
+ // check isReadOnly
923
+ if (oldView.as<xaml::Controls::PasswordBox>().IsEnabled()) {
924
+ newView.as<xaml::Controls::TextBox>().IsReadOnly(!oldView.as<xaml::Controls::PasswordBox>().IsEnabled());
925
+ } else {
926
+ newView.as<xaml::Controls::TextBox>().IsEnabled(oldView.as<xaml::Controls::PasswordBox>().IsEnabled());
927
+ }
909
928
  }
910
929
 
911
930
  TransferInputScope(oldView, newView, copyToPasswordBox);
@@ -67,7 +67,8 @@ class TextShadowNode final : public ShadowNodeBase {
67
67
  }
68
68
 
69
69
  auto addInline = true;
70
- if (index == 0) {
70
+ // Only convert to fast text when exactly one child is attached to the root Text node
71
+ if (index == 0 && m_children.size() == 1) {
71
72
  auto run = childNode.GetView().try_as<winrt::Run>();
72
73
  if (run != nullptr) {
73
74
  m_firstChildNode = &child;
@@ -75,7 +76,8 @@ class TextShadowNode final : public ShadowNodeBase {
75
76
  textBlock.Text(run.Text());
76
77
  addInline = false;
77
78
  }
78
- } else if (index == 1 && m_firstChildNode != nullptr) {
79
+ } else if (m_firstChildNode != nullptr) {
80
+ assert(m_children.size() == 2);
79
81
  auto textBlock = this->GetView().as<xaml::Controls::TextBlock>();
80
82
  textBlock.ClearValue(xaml::Controls::TextBlock::TextProperty());
81
83
  Super::AddView(*m_firstChildNode, 0);
@@ -101,7 +103,8 @@ class TextShadowNode final : public ShadowNodeBase {
101
103
  }
102
104
 
103
105
  void RemoveChildAt(int64_t indexToRemove) override {
104
- if (indexToRemove == 0 && m_firstChildNode) {
106
+ if (m_firstChildNode) {
107
+ assert(indexToRemove == 0);
105
108
  auto textBlock = this->GetView().as<xaml::Controls::TextBlock>();
106
109
  textBlock.ClearValue(xaml::Controls::TextBlock::TextProperty());
107
110
  m_firstChildNode = nullptr;
@@ -240,7 +240,7 @@ TouchEventHandler::ReactPointer TouchEventHandler::CreateReactPointer(
240
240
  auto point = args.GetCurrentPoint(sourceElement);
241
241
  auto props = point.Properties();
242
242
 
243
- ReactPointer pointer;
243
+ ReactPointer pointer{};
244
244
  pointer.target = tag;
245
245
  pointer.identifier = m_touchId++;
246
246
  pointer.pointerId = point.PointerId();
@@ -19,11 +19,14 @@
19
19
  #include <Utils/PropertyUtils.h>
20
20
  #include <Views/ExpressionAnimationStore.h>
21
21
  #include <Views/ShadowNodeBase.h>
22
+ #include <cxxreact/SystraceSection.h>
22
23
 
23
24
  namespace winrt {
24
25
  using namespace xaml;
25
26
  }
26
27
 
28
+ using namespace facebook::react;
29
+
27
30
  namespace Microsoft::ReactNative {
28
31
 
29
32
  static const std::unordered_map<std::string, PointerEventsKind> pointerEventsMap = {
@@ -248,7 +251,10 @@ void ViewManagerBase::UpdateProperties(
248
251
  }
249
252
  }
250
253
 
251
- OnPropertiesUpdated(nodeToUpdate);
254
+ {
255
+ SystraceSection s("ViewManagerBase::OnPropertiesUpdated");
256
+ OnPropertiesUpdated(nodeToUpdate);
257
+ }
252
258
  }
253
259
 
254
260
  bool ViewManagerBase::UpdateProperty(
@@ -9,6 +9,7 @@
9
9
  #include <UI.Xaml.Media.h>
10
10
  #include <Utils/PropertyUtils.h>
11
11
  #include <Utils/ResourceBrushUtils.h>
12
+ #include <cxxreact/SystraceSection.h>
12
13
  #include <winrt/Windows.Foundation.h>
13
14
  #include <winrt/Windows.UI.Xaml.Interop.h>
14
15
 
@@ -28,6 +29,8 @@ using namespace xaml::Media;
28
29
  using namespace Windows::Foundation;
29
30
  } // namespace winrt
30
31
 
32
+ using namespace facebook::react;
33
+
31
34
  namespace winrt::Microsoft::ReactNative::implementation {
32
35
 
33
36
  const winrt::TypeName viewPanelTypeName{winrt::hstring{L"ViewPanel"}, winrt::TypeKind::Metadata};
@@ -227,6 +230,7 @@ void ViewPanel::ClipChildren(bool value) {
227
230
  }
228
231
 
229
232
  void ViewPanel::FinalizeProperties() {
233
+ SystraceSection s("ViewPanel::FinalizeProperties");
230
234
  if (!m_propertiesChanged)
231
235
  return;
232
236
 
@@ -19,6 +19,7 @@
19
19
  #include <INativeUIManager.h>
20
20
  #include <IReactInstance.h>
21
21
 
22
+ #include <cxxreact/SystraceSection.h>
22
23
  #include <inspectable.h>
23
24
  #include <unicode.h>
24
25
  #include <winrt/Windows.System.h>
@@ -30,6 +31,8 @@
30
31
  #include <winrt/Windows.Foundation.h>
31
32
  #endif
32
33
 
34
+ using namespace facebook::react;
35
+
33
36
  namespace Microsoft::ReactNative {
34
37
 
35
38
  // ViewShadowNode
@@ -528,9 +531,11 @@ void ViewViewManager::TryUpdateView(
528
531
  //
529
532
  // 2. Transfer needed properties from old to new view
530
533
  //
531
-
532
- // Transfer properties from old XamlView to the new one
533
- TransferProperties(oldXamlView, newXamlView);
534
+ {
535
+ SystraceSection s("ViewViewManager::TransferProperties");
536
+ // Transfer properties from old XamlView to the new one
537
+ TransferProperties(oldXamlView, newXamlView);
538
+ }
534
539
 
535
540
  // Since we transferred properties to the new view we need to make the call to
536
541
  // finalize
@@ -56,6 +56,8 @@ namespace Microsoft.ReactNative
56
56
  CountStates
57
57
  };
58
58
 
59
+ // When adding a new numeric value, make sure to increment 'numericValuesCount' in FrameworkElementViewManager
60
+ // updateProperties depends on Min, Max, Now values being 0-2 for indexing. Be careful not to break that logic when adding new values.
59
61
  enum AccessibilityValue
60
62
  {
61
63
  Min = 0,
@@ -1,3 +1,6 @@
1
- EXPORTS
1
+ EXPORTS
2
2
  DllCanUnloadNow = WINRT_CanUnloadNow PRIVATE
3
3
  DllGetActivationFactory = WINRT_GetActivationFactory PRIVATE
4
+
5
+ RNCoreAppStart
6
+ RNCoreAppStartFromConfigJson
@@ -0,0 +1,17 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ #pragma once
4
+
5
+ // AppModel helpers
6
+
7
+ #include <appmodel.h>
8
+
9
+ namespace Microsoft::ReactNative {
10
+
11
+ inline bool HasPackageIdentity() noexcept {
12
+ uint32_t length{0};
13
+ const bool isPackagedApp = GetCurrentPackageFullName(&length, nullptr) != APPMODEL_ERROR_NO_PACKAGE;
14
+ return isPackagedApp;
15
+ }
16
+
17
+ } // namespace Microsoft::ReactNative
@@ -0,0 +1,60 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ #pragma once
4
+
5
+ struct RNCoreApp {
6
+ /// default value: L"index.windows"
7
+ wchar_t const *jsBundleFile;
8
+ /// default value: L"ms-appx:///Bundle/"
9
+ wchar_t const *bundleRootPath;
10
+ /// Provide the name of your React component here
11
+ wchar_t const *componentName;
12
+
13
+ /// default value: true
14
+ bool useWebDebugger;
15
+ /// default value: true
16
+ bool useFastRefresh;
17
+ /// default value: true
18
+ bool useDeveloperSupport;
19
+ /// default value: false
20
+ bool useDirectDebugger;
21
+ /// default value: true
22
+ bool requestInlineSourceMap;
23
+
24
+ /// default value: false
25
+ bool enableDefaultCrashHandler;
26
+ /// default value: 9229
27
+ unsigned short debuggerPort;
28
+ /// default value: 8081
29
+ unsigned short sourceBundlePort;
30
+ /// default value: L"localhost"
31
+ wchar_t const *sourceBundleHost;
32
+
33
+ /// default value: "chakra", possible values: "chakra", "hermes"
34
+ wchar_t const *jsEngine;
35
+
36
+ /// default value: nullptr
37
+ wchar_t const *viewName;
38
+
39
+ void *resourcesAbi;
40
+ /// Provides the launch arguments back to the CoreApp callback
41
+ wchar_t const *args;
42
+ /// Allocate with CoTaskMemAlloc, will be freed by the framework
43
+ void **packageProvidersAbi;
44
+ unsigned char packageProvidersAbiCount;
45
+ void *propertiesAbi;
46
+ };
47
+
48
+ #ifdef __cplusplus
49
+ #define NORETURN [[noreturn]]
50
+ #else
51
+ #define NORETURN _Noreturn
52
+ #endif
53
+
54
+ typedef void(__cdecl *RNCoreAppCallback)(RNCoreApp *, void *);
55
+
56
+ extern "C" NORETURN void __cdecl RNCoreAppStart(RNCoreAppCallback launched, void *data);
57
+ extern "C" NORETURN void __cdecl RNCoreAppStartFromConfigJson(
58
+ wchar_t const *configJson,
59
+ RNCoreAppCallback launched,
60
+ void *data);
@@ -263,6 +263,13 @@ Runtime::PointerValue *JsiAbiRuntime::cloneSymbol(const Runtime::PointerValue *p
263
263
  throw;
264
264
  }
265
265
 
266
+ Runtime::PointerValue *JsiAbiRuntime::cloneBigInt(const Runtime::PointerValue *pv) try {
267
+ return new BigIntPointerValue{make_weak(m_runtime), m_runtime.CloneBigInt(AsJsiBigIntRef(pv))};
268
+ } catch (hresult_error const &) {
269
+ RethrowJsiError();
270
+ throw;
271
+ }
272
+
266
273
  Runtime::PointerValue *JsiAbiRuntime::cloneString(const Runtime::PointerValue *pv) try {
267
274
  return new StringPointerValue{make_weak(m_runtime), m_runtime.CloneString(AsJsiStringRef(pv))};
268
275
  } catch (hresult_error const &) {
@@ -623,6 +630,13 @@ bool JsiAbiRuntime::strictEquals(const Symbol &a, const Symbol &b) const try {
623
630
  throw;
624
631
  }
625
632
 
633
+ bool JsiAbiRuntime::strictEquals(const BigInt &a, const BigInt &b) const try {
634
+ return m_runtime.BigIntStrictEquals(AsJsiBigIntRef(a), AsJsiBigIntRef(b));
635
+ } catch (hresult_error const &) {
636
+ RethrowJsiError();
637
+ throw;
638
+ }
639
+
626
640
  bool JsiAbiRuntime::strictEquals(const String &a, const String &b) const try {
627
641
  return m_runtime.StringStrictEquals(AsJsiStringRef(a), AsJsiStringRef(b));
628
642
  } catch (hresult_error const &) {
@@ -686,6 +700,10 @@ void JsiAbiRuntime::SetJsiError(std::exception const &nativeException) noexcept
686
700
  return SymbolPointerValue::GetData(pv);
687
701
  }
688
702
 
703
+ /*static*/ JsiBigIntRef const &JsiAbiRuntime::AsJsiBigIntRef(PointerValue const *pv) noexcept {
704
+ return BigIntPointerValue::GetData(pv);
705
+ }
706
+
689
707
  /*static*/ JsiStringRef const &JsiAbiRuntime::AsJsiStringRef(PointerValue const *pv) noexcept {
690
708
  return StringPointerValue::GetData(pv);
691
709
  }
@@ -702,6 +720,10 @@ void JsiAbiRuntime::SetJsiError(std::exception const &nativeException) noexcept
702
720
  return SymbolPointerValue::GetData(getPointerValue(symbol));
703
721
  }
704
722
 
723
+ /*static*/ JsiBigIntRef const &JsiAbiRuntime::AsJsiBigIntRef(BigInt const &bigInt) noexcept {
724
+ return BigIntPointerValue::GetData(getPointerValue(bigInt));
725
+ }
726
+
705
727
  /*static*/ JsiStringRef const &JsiAbiRuntime::AsJsiStringRef(String const &str) noexcept {
706
728
  return StringPointerValue::GetData(getPointerValue(str));
707
729
  }
@@ -722,9 +744,12 @@ void JsiAbiRuntime::SetJsiError(std::exception const &nativeException) noexcept
722
744
  // We assume that the JsiValueRef and Value have the same layout.
723
745
  auto valuePtr = reinterpret_cast<JsiValueRef const *>(&value);
724
746
  // Fix up the data part
747
+ // TODO: JSIVALUECONVERSION - Need to fix JSI kind mapping
725
748
  switch (valuePtr->Kind) {
726
749
  case JsiValueKind::Symbol:
727
750
  return {valuePtr->Kind, SymbolPointerValue::GetData(getPointerValue(value)).Data};
751
+ case JsiValueKind::BigInt:
752
+ return {valuePtr->Kind, BigIntPointerValue::GetData(getPointerValue(value)).Data};
728
753
  case JsiValueKind::String:
729
754
  return {valuePtr->Kind, StringPointerValue::GetData(getPointerValue(value)).Data};
730
755
  case JsiValueKind::Object:
@@ -747,9 +772,12 @@ void JsiAbiRuntime::SetJsiError(std::exception const &nativeException) noexcept
747
772
  // data alive. Thus, we must detach the value.
748
773
  // We assume that the JsiValueRef and Value have the same layout.
749
774
  auto valuePtr = reinterpret_cast<JsiValueRef *>(&value);
775
+ // TODO: JSIVALUECONVERSION - Need to fix JSI kind mapping
750
776
  switch (valuePtr->Kind) {
751
777
  case JsiValueKind::Symbol:
752
778
  return {valuePtr->Kind, SymbolPointerValue::Detach(getPointerValue(value)).Data};
779
+ case JsiValueKind::BigInt:
780
+ return {valuePtr->Kind, BigIntPointerValue::Detach(getPointerValue(value)).Data};
753
781
  case JsiValueKind::String:
754
782
  return {valuePtr->Kind, StringPointerValue::Detach(getPointerValue(value)).Data};
755
783
  case JsiValueKind::Object:
@@ -763,6 +791,10 @@ Runtime::PointerValue *JsiAbiRuntime::MakeSymbolValue(JsiSymbolRef &&symbol) con
763
791
  return new SymbolPointerValue{make_weak(m_runtime), std::move(symbol)};
764
792
  }
765
793
 
794
+ Runtime::PointerValue *JsiAbiRuntime::MakeBigIntValue(JsiBigIntRef &&bigInt) const noexcept {
795
+ return new BigIntPointerValue{make_weak(m_runtime), std::move(bigInt)};
796
+ }
797
+
766
798
  Runtime::PointerValue *JsiAbiRuntime::MakeStringValue(JsiStringRef &&str) const noexcept {
767
799
  return new StringPointerValue{make_weak(m_runtime), std::move(str)};
768
800
  }
@@ -779,6 +811,10 @@ Symbol JsiAbiRuntime::MakeSymbol(JsiSymbolRef &&symbol) const noexcept {
779
811
  return make<Symbol>(MakeSymbolValue(std::move(symbol)));
780
812
  }
781
813
 
814
+ BigInt JsiAbiRuntime::MakeBigInt(JsiBigIntRef &&bigInt) const noexcept {
815
+ return make<BigInt>(MakeBigIntValue(std::move(bigInt)));
816
+ }
817
+
782
818
  String JsiAbiRuntime::MakeString(JsiStringRef &&str) const noexcept {
783
819
  return make<String>(MakeStringValue(std::move(str)));
784
820
  }
@@ -815,6 +851,8 @@ Value JsiAbiRuntime::MakeValue(JsiValueRef &&value) const noexcept {
815
851
  return Value(*reinterpret_cast<double *>(&value.Data));
816
852
  case JsiValueKind::Symbol:
817
853
  return Value(MakeSymbol(JsiSymbolRef{value.Data}));
854
+ case JsiValueKind::BigInt:
855
+ return Value(MakeBigInt(JsiBigIntRef{value.Data}));
818
856
  case JsiValueKind::String:
819
857
  return Value(MakeString(JsiStringRef{value.Data}));
820
858
  case JsiValueKind::Object:
@@ -861,6 +899,32 @@ void JsiAbiRuntime::SymbolPointerValue::invalidate() {
861
899
  return {std::exchange(static_cast<DataPointerValue *>(const_cast<PointerValue *>(pv))->m_data, 0)};
862
900
  }
863
901
 
902
+ //===========================================================================
903
+ // JsiAbiRuntime::BigIntPointerValue implementation
904
+ //===========================================================================
905
+
906
+ JsiAbiRuntime::BigIntPointerValue::BigIntPointerValue(
907
+ winrt::weak_ref<JsiRuntime> &&weakRuntime,
908
+ JsiBigIntRef &&bigInt) noexcept
909
+ : DataPointerValue{std::move(weakRuntime), std::exchange(bigInt.Data, 0)} {}
910
+
911
+ void JsiAbiRuntime::BigIntPointerValue::invalidate() {
912
+ if (m_data) {
913
+ if (auto runtime = m_weakRuntime.get()) {
914
+ m_weakRuntime = nullptr;
915
+ runtime.ReleaseBigInt({m_data});
916
+ }
917
+ }
918
+ }
919
+
920
+ /*static*/ JsiBigIntRef const &JsiAbiRuntime::BigIntPointerValue::GetData(PointerValue const *pv) noexcept {
921
+ return *reinterpret_cast<JsiBigIntRef const *>(&static_cast<DataPointerValue const *>(pv)->m_data);
922
+ }
923
+
924
+ /*static*/ JsiBigIntRef JsiAbiRuntime::BigIntPointerValue::Detach(PointerValue const *pv) noexcept {
925
+ return {std::exchange(static_cast<DataPointerValue *>(const_cast<PointerValue *>(pv))->m_data, 0)};
926
+ }
927
+
864
928
  //===========================================================================
865
929
  // JsiAbiRuntime::StringPointerValue implementation
866
930
  //===========================================================================
@@ -964,6 +1028,7 @@ JsiAbiRuntime::ValueRef::InitValueRef(JsiValueRef const &data, Value *value, Sto
964
1028
  // We assume that the JsiValueRef and Value have the same layout.
965
1029
  auto valueAsDataPtr = reinterpret_cast<JsiValueRef *>(value);
966
1030
  valueAsDataPtr->Kind = data.Kind;
1031
+ // TODO: JSIVALUECONVERSION - Need to fix JSI kind mapping
967
1032
  switch (valueAsDataPtr->Kind) {
968
1033
  case JsiValueKind::Symbol:
969
1034
  case JsiValueKind::String: