react-native-windows 0.82.3 → 0.83.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 (223) 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/CompositionHwndHost.cpp +10 -40
  82. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +3 -80
  83. package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp +45 -12
  84. package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h +8 -0
  85. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +61 -74
  86. package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.h +4 -0
  87. package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.h +1 -0
  88. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +4 -3
  89. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +2 -1
  90. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeWindow.cpp +245 -0
  91. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeWindow.h +80 -0
  92. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentDescriptor.h +20 -36
  93. package/Microsoft.ReactNative/Fabric/Composition/UriImageManager.cpp +5 -0
  94. package/Microsoft.ReactNative/IReactCompositionViewComponentBuilder.idl +1 -0
  95. package/Microsoft.ReactNative/Modules/ImageViewManagerModule.cpp +1 -1
  96. package/Microsoft.ReactNative/Modules/LogBoxModule.cpp +20 -94
  97. package/Microsoft.ReactNative/Modules/LogBoxModule.h +1 -3
  98. package/Microsoft.ReactNative/ReactNativeAppBuilder.cpp +0 -41
  99. package/Microsoft.ReactNative/ReactNativeAppBuilder.idl +0 -11
  100. package/Microsoft.ReactNative/ReactNativeIsland.idl +2 -3
  101. package/Microsoft.ReactNative/ReactNativeWin32App.cpp +31 -101
  102. package/Microsoft.ReactNative/ReactNativeWin32App.h +2 -13
  103. package/Microsoft.ReactNative/ReactNativeWindow.idl +44 -0
  104. package/Microsoft.ReactNative.Cxx/AutoDraw.h +9 -1
  105. package/Microsoft.ReactNative.Cxx/ReactCommon/CallInvoker.h +13 -16
  106. package/Microsoft.ReactNative.Cxx/ReactCommon/TurboModule.h +24 -36
  107. package/Microsoft.ReactNative.Cxx/ReactCommon/TurboModuleUtils.h +5 -8
  108. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/AString.h +8 -6
  109. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Array.h +32 -49
  110. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Base.h +27 -76
  111. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Bool.h +4 -2
  112. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/CallbackWrapper.h +19 -18
  113. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Class.h +25 -48
  114. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Convert.h +38 -31
  115. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Error.h +11 -6
  116. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/EventEmitter.h +47 -45
  117. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Function.h +69 -89
  118. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/HighResTimeStamp.h +8 -8
  119. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/LongLivedObject.h +6 -6
  120. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Number.h +16 -8
  121. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Object.h +17 -24
  122. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Promise.h +17 -17
  123. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Value.h +20 -29
  124. package/Microsoft.ReactNative.Cxx/ReactCommon/react/debug/react_native_assert.h +2 -7
  125. package/Microsoft.ReactNative.Cxx/ReactCommon/react/timing/primitives.h +127 -115
  126. package/PropertySheets/Generated/PackageVersion.g.props +4 -4
  127. package/PropertySheets/Warnings.props +2 -1
  128. package/ReactCommon/ReactCommon.vcxproj +11 -2
  129. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/CxxNativeModule.cpp +2 -2
  130. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/Instance.cpp +4 -2
  131. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.cpp +4 -2
  132. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSIndexedRAMBundle.cpp +4 -2
  133. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/MethodCall.cpp +4 -2
  134. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/ModuleRegistry.cpp +5 -3
  135. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp +4 -4
  136. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/RAMBundleRegistry.cpp +6 -4
  137. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/ReactMarker.cpp +2 -0
  138. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/TraceSection.h +25 -35
  139. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp +86 -67
  140. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsiexecutor/jsireact/JSIExecutor.cpp +15 -8
  141. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsiexecutor/jsireact/JSINativeModules.cpp +4 -2
  142. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp +84 -68
  143. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.h +31 -35
  144. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/Utf8.h +4 -5
  145. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/network/HttpUtils.cpp +2 -1
  146. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h +24 -36
  147. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.h +28 -66
  148. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/webperformance/NativePerformance.cpp +5 -0
  149. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp +3 -3
  150. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/image/conversions.h +8 -4
  151. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/text/ParagraphShadowNode.cpp +19 -16
  152. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/text/platform/android/react/renderer/components/text/ParagraphState.h +8 -9
  153. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityPrimitives.h +25 -95
  154. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/BaseViewProps.cpp +36 -0
  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/conversions.h +0 -1574
  220. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/ShadowNode.cpp +0 -528
  221. package/Scripts/OpenSSL.nuspec +0 -39
  222. package/Scripts/OpenSSL.targets +0 -36
  223. package/codegen/rnwcoreJSI-generated.cpp +0 -3470
package/index.js CHANGED
@@ -66,6 +66,12 @@ module.exports = {
66
66
  get Modal() {
67
67
  return require('./Libraries/Modal/Modal').default;
68
68
  },
69
+ get unstable_NativeText() {
70
+ return require('./Libraries/Text/TextNativeComponent').NativeText;
71
+ },
72
+ get unstable_NativeView() {
73
+ return require('./Libraries/Components/View/ViewNativeComponent').default;
74
+ },
69
75
  get Pressable() {
70
76
  return require('./Libraries/Components/Pressable/Pressable').default;
71
77
  },
package/index.windows.js CHANGED
@@ -66,6 +66,12 @@ module.exports = {
66
66
  get Modal() {
67
67
  return require('./Libraries/Modal/Modal').default;
68
68
  },
69
+ get unstable_NativeText() {
70
+ return require('./Libraries/Text/TextNativeComponent').NativeText;
71
+ },
72
+ get unstable_NativeView() {
73
+ return require('./Libraries/Components/View/ViewNativeComponent').default;
74
+ },
69
75
  get Pressable() {
70
76
  return require('./Libraries/Components/Pressable/Pressable').default;
71
77
  },
@@ -22,12 +22,14 @@ type TComponentType = React.ComponentType<{...}>;
22
22
  */
23
23
  export default function mockComponent<
24
24
  TComponentModule: Modulish<TComponentType>,
25
+ TIsESModule: boolean,
25
26
  >(
26
27
  moduleName: string,
27
28
  instanceMethods: ?interface {},
28
- isESModule: boolean,
29
- ): typeof isESModule extends true
30
- ? ModuleDefault<TComponentModule & typeof instanceMethods>
29
+ isESModule: TIsESModule,
30
+ ): TIsESModule extends true
31
+ ? // $FlowFixMe[incompatible-use]
32
+ ModuleDefault<TComponentModule & typeof instanceMethods>
31
33
  : TComponentModule & typeof instanceMethods {
32
34
  const RealComponent: TComponentType = isESModule
33
35
  ? // $FlowFixMe[prop-missing]
@@ -35,9 +37,7 @@ export default function mockComponent<
35
37
  : // $FlowFixMe[incompatible-type]
36
38
  jest.requireActual<TComponentModule>(moduleName);
37
39
 
38
- const SuperClass: typeof React.Component<
39
- React.ElementProps<typeof RealComponent>,
40
- > =
40
+ const SuperClass: typeof React.Component<{...}> =
41
41
  typeof RealComponent === 'function' &&
42
42
  RealComponent.prototype.constructor instanceof React.Component
43
43
  ? RealComponent
package/jest/setup.js CHANGED
@@ -70,16 +70,21 @@ Object.defineProperties(global, {
70
70
  },
71
71
  });
72
72
 
73
- /**
74
- * Prettier v3 uses import (cjs/mjs) file formats that jest-runtime does not
75
- * support. To work around this we need to bypass the jest module system by
76
- * using the orginal node `require` function.
77
- */
78
- jest.mock('prettier', () => {
79
- // $FlowExpectedError[underconstrained-implicit-instantiation]
80
- const module = jest.requireActual('module');
81
- return module.prototype.require(require.resolve('prettier'));
82
- });
73
+ // This setup script will be published in the react-native package.
74
+ // Other people might not have prettier installed, so it will crash the mock below.
75
+ // Therefore, we wrap this mock in a try-catch.
76
+ try {
77
+ /**
78
+ * Prettier v3 uses import (cjs/mjs) file formats that jest-runtime does not
79
+ * support. To work around this we need to bypass the jest module system by
80
+ * using the orginal node `require` function.
81
+ */
82
+ jest.mock('prettier', () => {
83
+ // $FlowExpectedError[underconstrained-implicit-instantiation]
84
+ const module = jest.requireActual('module');
85
+ return module.prototype.require(require.resolve('prettier'));
86
+ });
87
+ } catch {}
83
88
 
84
89
  // $FlowFixMe[incompatible-type] - `./mocks/AppState` is incomplete.
85
90
  mock('m#../Libraries/AppState/AppState', 'm#./mocks/AppState');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-windows",
3
- "version": "0.82.3",
3
+ "version": "0.83.0-preview.1",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,16 +26,16 @@
26
26
  "@react-native-community/cli": "20.0.0",
27
27
  "@react-native-community/cli-platform-android": "20.0.0",
28
28
  "@react-native-community/cli-platform-ios": "20.0.0",
29
- "@react-native-windows/cli": "0.82.0",
29
+ "@react-native-windows/cli": "0.83.0-preview.1",
30
30
  "@react-native/assets": "1.0.0",
31
- "@react-native/assets-registry": "0.82.1",
32
- "@react-native/codegen": "0.82.1",
33
- "@react-native/community-cli-plugin": "0.82.1",
34
- "@react-native/gradle-plugin": "0.82.1",
35
- "@react-native/js-polyfills": "0.82.1",
36
- "@react-native/new-app-screen": "0.82.0-rc.0",
37
- "@react-native/normalize-colors": "0.82.1",
38
- "@react-native/virtualized-lists": "0.82.1",
31
+ "@react-native/assets-registry": "0.83.0-rc.5",
32
+ "@react-native/codegen": "0.83.0-rc.5",
33
+ "@react-native/community-cli-plugin": "0.83.0-rc.5",
34
+ "@react-native/gradle-plugin": "0.83.0-rc.5",
35
+ "@react-native/js-polyfills": "0.83.0-rc.5",
36
+ "@react-native/new-app-screen": "0.83.0-rc.5",
37
+ "@react-native/normalize-colors": "0.83.0-rc.5",
38
+ "@react-native/virtualized-lists": "0.83.0-rc.5",
39
39
  "abort-controller": "^3.0.0",
40
40
  "anser": "^1.4.9",
41
41
  "ansi-regex": "^5.0.0",
@@ -47,12 +47,12 @@
47
47
  "event-target-shim": "^5.0.1",
48
48
  "flow-enums-runtime": "^0.0.6",
49
49
  "glob": "^7.1.1",
50
- "hermes-compiler": "0.0.0",
50
+ "hermes-compiler": "0.14.0",
51
51
  "invariant": "^2.2.4",
52
52
  "jest-environment-node": "^29.7.0",
53
53
  "memoize-one": "^5.0.0",
54
- "metro-runtime": "^0.83.1",
55
- "metro-source-map": "^0.83.1",
54
+ "metro-runtime": "^0.83.3",
55
+ "metro-source-map": "^0.83.3",
56
56
  "mkdirp": "^0.5.1",
57
57
  "nullthrows": "^1.1.1",
58
58
  "pretty-format": "^29.7.0",
@@ -60,47 +60,47 @@
60
60
  "react-devtools-core": "^6.1.5",
61
61
  "react-refresh": "^0.14.0",
62
62
  "regenerator-runtime": "^0.13.2",
63
- "scheduler": "0.26.0",
63
+ "scheduler": "0.27.0",
64
64
  "semver": "^7.1.3",
65
65
  "source-map-support": "^0.5.19",
66
66
  "stacktrace-parser": "^0.1.10",
67
67
  "whatwg-fetch": "^3.0.0",
68
- "ws": "^6.2.3",
68
+ "ws": "^7.5.10",
69
69
  "yargs": "^17.6.2"
70
70
  },
71
71
  "devDependencies": {
72
- "@react-native-windows/codegen": "0.82.0",
73
- "@react-native/metro-config": "0.82.1",
72
+ "@react-native-windows/codegen": "0.83.0-preview.1",
73
+ "@react-native/metro-config": "0.83.0-rc.5",
74
74
  "@rnw-scripts/babel-react-native-config": "0.0.0",
75
75
  "@rnw-scripts/eslint-config": "1.2.38",
76
76
  "@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.42",
77
77
  "@rnw-scripts/just-task": "2.3.58",
78
78
  "@rnw-scripts/metro-dev-config": "0.0.0",
79
- "@rnx-kit/jest-preset": "^0.1.17",
79
+ "@rnx-kit/jest-preset": "^0.3.1",
80
80
  "@types/node": "^22.14.0",
81
- "@types/react": "^19.1.0",
81
+ "@types/react": "^19.2.0",
82
82
  "eslint": "^8.19.0",
83
- "flow-bin": "^0.280.0",
83
+ "flow-bin": "^0.289.0",
84
84
  "jscodeshift": "^0.14.0",
85
85
  "just-scripts": "^1.3.3",
86
86
  "prettier": "2.8.8",
87
- "react": "19.1.1",
88
- "react-native": "0.82.1",
89
- "react-native-platform-override": "0.82.0",
87
+ "react": "19.2.0",
88
+ "react-native": "0.83.0-rc.5",
89
+ "react-native-platform-override": "0.83.0-preview.1",
90
90
  "react-refresh": "^0.14.0",
91
91
  "typescript": "5.0.4"
92
92
  },
93
93
  "peerDependencies": {
94
94
  "@types/react": "^19.1.1",
95
- "react": "^19.1.1",
96
- "react-native": "^0.82.0"
95
+ "react": "^19.2.0",
96
+ "react-native": "0.83.0-rc.5"
97
97
  },
98
98
  "beachball": {
99
- "defaultNpmTag": "latest",
99
+ "defaultNpmTag": "preview",
100
100
  "disallowedChangeTypes": [
101
101
  "major",
102
102
  "minor",
103
- "prerelease",
103
+ "patch",
104
104
  "premajor",
105
105
  "preminor",
106
106
  "prepatch"
@@ -16,7 +16,7 @@ import type {NativeModeChangeEvent} from './VirtualViewNativeComponent';
16
16
  import StyleSheet from '../../../../Libraries/StyleSheet/StyleSheet';
17
17
  import * as ReactNativeFeatureFlags from '../../featureflags/ReactNativeFeatureFlags';
18
18
  import VirtualViewExperimentalNativeComponent from './VirtualViewExperimentalNativeComponent';
19
- import VirtualViewNativeComponent from './VirtualViewNativeComponent';
19
+ import VirtualViewClassicNativeComponent from './VirtualViewNativeComponent';
20
20
  import nullthrows from 'nullthrows';
21
21
  import * as React from 'react';
22
22
  // $FlowFixMe[missing-export]
@@ -49,8 +49,14 @@ export type ModeChangeEvent = $ReadOnly<{
49
49
  target: HostInstance,
50
50
  }>;
51
51
 
52
+ const VirtualViewNativeComponent: typeof VirtualViewClassicNativeComponent =
53
+ ReactNativeFeatureFlags.enableVirtualViewExperimental()
54
+ ? VirtualViewExperimentalNativeComponent
55
+ : VirtualViewClassicNativeComponent;
56
+
52
57
  type VirtualViewComponent = component(
53
58
  children?: React.Node,
59
+ hiddenStyle?: (targetRect: Rect) => ViewStyleProp,
54
60
  nativeID?: string,
55
61
  ref?: ?React.RefSetter<React.ElementRef<typeof VirtualViewNativeComponent>>,
56
62
  style?: ?ViewStyleProp,
@@ -58,23 +64,21 @@ type VirtualViewComponent = component(
58
64
  removeClippedSubviews?: boolean,
59
65
  );
60
66
 
61
- type HiddenHeight = number;
62
67
  const NotHidden = null;
68
+ type HiddenStyle = Exclude<ViewStyleProp, typeof NotHidden>;
63
69
 
64
- type State = HiddenHeight | typeof NotHidden;
70
+ type State = HiddenStyle | typeof NotHidden;
65
71
 
66
- function createVirtualView(
67
- initialState: State,
68
- experimental: boolean,
69
- ): VirtualViewComponent {
70
- const initialHidden = initialState !== NotHidden;
72
+ function defaultHiddenStyle(targetRect: Rect): ViewStyleProp {
73
+ return {minHeight: targetRect.height, minWidth: targetRect.width};
74
+ }
71
75
 
72
- const NativeComponent = experimental
73
- ? VirtualViewExperimentalNativeComponent
74
- : VirtualViewNativeComponent;
76
+ function createVirtualView(initialState: State): VirtualViewComponent {
77
+ const initialHidden = initialState !== NotHidden;
75
78
 
76
79
  component VirtualView(
77
80
  children?: React.Node,
81
+ hiddenStyle: (targetRect: Rect) => ViewStyleProp = defaultHiddenStyle,
78
82
  nativeID?: string,
79
83
  ref?: ?React.RefSetter<React.ElementRef<typeof VirtualViewNativeComponent>>,
80
84
  style?: ?ViewStyleProp,
@@ -114,9 +118,8 @@ function createVirtualView(
114
118
  });
115
119
  }
116
120
  VirtualViewMode.Hidden => {
117
- const {height} = event.nativeEvent.targetRect;
118
121
  startTransition(() => {
119
- setState(height as HiddenHeight);
122
+ setState(hiddenStyle(event.nativeEvent.targetRect) ?? {});
120
123
  emitModeChange?.();
121
124
  });
122
125
  }
@@ -124,7 +127,7 @@ function createVirtualView(
124
127
  };
125
128
 
126
129
  return (
127
- <NativeComponent
130
+ <VirtualViewNativeComponent
128
131
  initialHidden={initialHidden}
129
132
  nativeID={nativeID}
130
133
  ref={ref}
@@ -136,9 +139,7 @@ function createVirtualView(
136
139
  }
137
140
  style={
138
141
  isHidden
139
- ? StyleSheet.compose(style, {
140
- height: Math.abs(nullthrows(state) as HiddenHeight),
141
- })
142
+ ? StyleSheet.compose(style, nullthrows(state) as HiddenStyle)
142
143
  : style
143
144
  }
144
145
  onModeChange={handleModeChange}>
@@ -153,24 +154,18 @@ function createVirtualView(
153
154
  'no-activity' | _ => isHidden ? null : children,
154
155
  }
155
156
  }
156
- </NativeComponent>
157
+ </VirtualViewNativeComponent>
157
158
  );
158
159
  }
159
160
  return VirtualView;
160
161
  }
161
162
 
162
- export default createVirtualView(NotHidden, false) as VirtualViewComponent;
163
-
164
- export const VirtualViewExperimental = createVirtualView(
165
- NotHidden,
166
- true,
167
- ) as VirtualViewComponent;
163
+ export default createVirtualView(NotHidden) as VirtualViewComponent;
168
164
 
169
165
  export function createHiddenVirtualView(
170
- height: number,
171
- experimental: boolean,
166
+ style: ViewStyleProp,
172
167
  ): VirtualViewComponent {
173
- return createVirtualView(height as HiddenHeight, experimental);
168
+ return createVirtualView((style ?? {}) as HiddenStyle);
174
169
  }
175
170
 
176
171
  export const _logs: {states?: Array<State>} = {};
@@ -79,6 +79,12 @@ type VirtualViewExperimentalNativeProps = $ReadOnly<{
79
79
  */
80
80
  renderState: Int32,
81
81
 
82
+ /**
83
+ * This was needed to get VirtualViewManagerDelegate to set this property.
84
+ * TODO: Investigate why spread ViewProps doesn't call setter
85
+ */
86
+ removeClippedSubviews?: boolean,
87
+
82
88
  /**
83
89
  * See `NativeModeChangeEvent`.
84
90
  */
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<5ba27aa5af4c69dedd733ca5ccb09fe3>>
7
+ * @generated SignedSource<<474b28e49cdb8a46a361a32df3c92eed>>
8
8
  * @flow strict
9
9
  * @noformat
10
10
  */
@@ -31,9 +31,10 @@ export type ReactNativeFeatureFlagsJsOnly = $ReadOnly<{
31
31
  jsOnlyTestFlag: Getter<boolean>,
32
32
  animatedShouldDebounceQueueFlush: Getter<boolean>,
33
33
  animatedShouldUseSingleOp: Getter<boolean>,
34
+ configurePressabilityDuringInsertion: Getter<boolean>,
34
35
  deferFlatListFocusChangeRenderUpdate: Getter<boolean>,
35
36
  disableMaintainVisibleContentPosition: Getter<boolean>,
36
- enableAccessToHostTreeInFabric: Getter<boolean>,
37
+ enableVirtualViewExperimental: Getter<boolean>,
37
38
  fixVirtualizeListCollapseWindowSize: Getter<boolean>,
38
39
  isLayoutAnimationEnabled: Getter<boolean>,
39
40
  reduceDefaultPropsInImage: Getter<boolean>,
@@ -53,12 +54,14 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
53
54
  cdpInteractionMetricsEnabled: Getter<boolean>,
54
55
  cxxNativeAnimatedEnabled: Getter<boolean>,
55
56
  cxxNativeAnimatedRemoveJsSync: Getter<boolean>,
57
+ disableEarlyViewCommandExecution: Getter<boolean>,
56
58
  disableFabricCommitInCXXAnimated: Getter<boolean>,
57
59
  disableMountItemReorderingAndroid: Getter<boolean>,
58
60
  disableOldAndroidAttachmentMetricsWorkarounds: Getter<boolean>,
59
61
  disableTextLayoutManagerCacheAndroid: Getter<boolean>,
60
62
  enableAccessibilityOrder: Getter<boolean>,
61
63
  enableAccumulatedUpdatesInRawPropsAndroid: Getter<boolean>,
64
+ enableAndroidLinearText: Getter<boolean>,
62
65
  enableAndroidTextMeasurementOptimizations: Getter<boolean>,
63
66
  enableBridgelessArchitecture: Getter<boolean>,
64
67
  enableCppPropsIteratorSetter: Getter<boolean>,
@@ -73,36 +76,46 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
73
76
  enableIOSTextBaselineOffsetPerLine: Getter<boolean>,
74
77
  enableIOSViewClipToPaddingBox: Getter<boolean>,
75
78
  enableImagePrefetchingAndroid: Getter<boolean>,
79
+ enableImagePrefetchingOnUiThreadAndroid: Getter<boolean>,
76
80
  enableImmediateUpdateModeForContentOffsetChanges: Getter<boolean>,
81
+ enableImperativeFocus: Getter<boolean>,
77
82
  enableInteropViewManagerClassLookUpOptimizationIOS: Getter<boolean>,
83
+ enableIntersectionObserverByDefault: Getter<boolean>,
84
+ enableKeyEvents: Getter<boolean>,
78
85
  enableLayoutAnimationsOnAndroid: Getter<boolean>,
79
86
  enableLayoutAnimationsOnIOS: Getter<boolean>,
80
87
  enableMainQueueCoordinatorOnIOS: Getter<boolean>,
81
88
  enableModuleArgumentNSNullConversionIOS: Getter<boolean>,
82
89
  enableNativeCSSParsing: Getter<boolean>,
83
90
  enableNetworkEventReporting: Getter<boolean>,
84
- enableNewBackgroundAndBorderDrawables: Getter<boolean>,
85
91
  enablePreparedTextLayout: Getter<boolean>,
86
92
  enablePropsUpdateReconciliationAndroid: Getter<boolean>,
87
93
  enableResourceTimingAPI: Getter<boolean>,
94
+ enableSwiftUIBasedFilters: Getter<boolean>,
88
95
  enableViewCulling: Getter<boolean>,
89
96
  enableViewRecycling: Getter<boolean>,
97
+ enableViewRecyclingForImage: Getter<boolean>,
90
98
  enableViewRecyclingForScrollView: Getter<boolean>,
91
99
  enableViewRecyclingForText: Getter<boolean>,
92
100
  enableViewRecyclingForView: Getter<boolean>,
101
+ enableVirtualViewClippingWithoutScrollViewClipping: Getter<boolean>,
102
+ enableVirtualViewContainerStateExperimental: Getter<boolean>,
93
103
  enableVirtualViewDebugFeatures: Getter<boolean>,
94
104
  enableVirtualViewRenderState: Getter<boolean>,
95
105
  enableVirtualViewWindowFocusDetection: Getter<boolean>,
96
106
  enableWebPerformanceAPIsByDefault: Getter<boolean>,
97
107
  fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean>,
108
+ fuseboxAssertSingleHostState: Getter<boolean>,
98
109
  fuseboxEnabledRelease: Getter<boolean>,
99
110
  fuseboxNetworkInspectionEnabled: Getter<boolean>,
100
111
  hideOffscreenVirtualViewsOnIOS: Getter<boolean>,
112
+ overrideBySynchronousMountPropsAtMountingAndroid: Getter<boolean>,
113
+ perfIssuesEnabled: Getter<boolean>,
101
114
  perfMonitorV2Enabled: Getter<boolean>,
102
115
  preparedTextCacheSize: Getter<number>,
103
116
  preventShadowTreeCommitExhaustion: Getter<boolean>,
104
- releaseImageDataWhenConsumed: Getter<boolean>,
105
117
  shouldPressibilityUseW3CPointerEventsForHover: Getter<boolean>,
118
+ shouldTriggerResponderTransferOnScrollAndroid: Getter<boolean>,
106
119
  skipActivityIdentityAssertionOnHostPause: Getter<boolean>,
107
120
  sweepActiveTouchOnChildNativeGesturesAndroid: Getter<boolean>,
108
121
  traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean>,
@@ -115,8 +128,11 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
115
128
  useOptimizedEventBatchingOnAndroid: Getter<boolean>,
116
129
  useRawPropsJsiValue: Getter<boolean>,
117
130
  useShadowNodeStateOnClone: Getter<boolean>,
131
+ useSharedAnimatedBackend: Getter<boolean>,
132
+ useTraitHiddenOnAndroid: Getter<boolean>,
118
133
  useTurboModuleInterop: Getter<boolean>,
119
134
  useTurboModules: Getter<boolean>,
135
+ viewCullingOutsetRatio: Getter<number>,
120
136
  virtualViewHysteresisRatio: Getter<number>,
121
137
  virtualViewPrerenderRatio: Getter<number>,
122
138
  }>;
@@ -136,6 +152,11 @@ export const animatedShouldDebounceQueueFlush: Getter<boolean> = createJavaScrip
136
152
  */
137
153
  export const animatedShouldUseSingleOp: Getter<boolean> = createJavaScriptFlagGetter('animatedShouldUseSingleOp', false);
138
154
 
155
+ /**
156
+ * Configure Pressability during insertion and no longer unmount when hidden.
157
+ */
158
+ export const configurePressabilityDuringInsertion: Getter<boolean> = createJavaScriptFlagGetter('configurePressabilityDuringInsertion', false);
159
+
139
160
  /**
140
161
  * Use the deferred cell render update mechanism for focus change in FlatList.
141
162
  */
@@ -147,9 +168,9 @@ export const deferFlatListFocusChangeRenderUpdate: Getter<boolean> = createJavaS
147
168
  export const disableMaintainVisibleContentPosition: Getter<boolean> = createJavaScriptFlagGetter('disableMaintainVisibleContentPosition', false);
148
169
 
149
170
  /**
150
- * Enables access to the host tree in Fabric using DOM-compatible APIs.
171
+ * Enables the experimental version of `VirtualView`.
151
172
  */
152
- export const enableAccessToHostTreeInFabric: Getter<boolean> = createJavaScriptFlagGetter('enableAccessToHostTreeInFabric', true);
173
+ export const enableVirtualViewExperimental: Getter<boolean> = createJavaScriptFlagGetter('enableVirtualViewExperimental', false);
153
174
 
154
175
  /**
155
176
  * Fixing an edge case where the current window size is not properly calculated with fast scrolling. Window size collapsed to 1 element even if windowSize more than the current amount of elements
@@ -211,6 +232,10 @@ export const cxxNativeAnimatedEnabled: Getter<boolean> = createNativeFlagGetter(
211
232
  * Removes JS sync at end of native animation
212
233
  */
213
234
  export const cxxNativeAnimatedRemoveJsSync: Getter<boolean> = createNativeFlagGetter('cxxNativeAnimatedRemoveJsSync', false);
235
+ /**
236
+ * Dispatch view commands in mount item order.
237
+ */
238
+ export const disableEarlyViewCommandExecution: Getter<boolean> = createNativeFlagGetter('disableEarlyViewCommandExecution', false);
214
239
  /**
215
240
  * Prevents use of Fabric commit in C++ Animated implementation
216
241
  */
@@ -235,6 +260,10 @@ export const enableAccessibilityOrder: Getter<boolean> = createNativeFlagGetter(
235
260
  * When enabled, Android will accumulate updates in rawProps to reduce the number of mounting instructions for cascading re-renders.
236
261
  */
237
262
  export const enableAccumulatedUpdatesInRawPropsAndroid: Getter<boolean> = createNativeFlagGetter('enableAccumulatedUpdatesInRawPropsAndroid', false);
263
+ /**
264
+ * Enables linear text rendering on Android wherever subpixel text rendering is enabled
265
+ */
266
+ export const enableAndroidLinearText: Getter<boolean> = createNativeFlagGetter('enableAndroidLinearText', false);
238
267
  /**
239
268
  * Enables various optimizations throughout the path of measuring text on Android.
240
269
  */
@@ -291,14 +320,30 @@ export const enableIOSViewClipToPaddingBox: Getter<boolean> = createNativeFlagGe
291
320
  * When enabled, Android will build and initiate image prefetch requests on ImageShadowNode::layout
292
321
  */
293
322
  export const enableImagePrefetchingAndroid: Getter<boolean> = createNativeFlagGetter('enableImagePrefetchingAndroid', false);
323
+ /**
324
+ * When enabled, Android will initiate image prefetch requested on ImageShadowNode::layout on the UI thread
325
+ */
326
+ export const enableImagePrefetchingOnUiThreadAndroid: Getter<boolean> = createNativeFlagGetter('enableImagePrefetchingOnUiThreadAndroid', false);
294
327
  /**
295
328
  * Dispatches state updates for content offset changes synchronously on the main thread.
296
329
  */
297
330
  export const enableImmediateUpdateModeForContentOffsetChanges: Getter<boolean> = createNativeFlagGetter('enableImmediateUpdateModeForContentOffsetChanges', false);
331
+ /**
332
+ * Enable ref.focus() and ref.blur() for all views, not just TextInput.
333
+ */
334
+ export const enableImperativeFocus: Getter<boolean> = createNativeFlagGetter('enableImperativeFocus', false);
298
335
  /**
299
336
  * This is to fix the issue with interop view manager where component descriptor lookup is causing ViewManager to preload.
300
337
  */
301
338
  export const enableInteropViewManagerClassLookUpOptimizationIOS: Getter<boolean> = createNativeFlagGetter('enableInteropViewManagerClassLookUpOptimizationIOS', false);
339
+ /**
340
+ * Enables the IntersectionObserver Web API in React Native.
341
+ */
342
+ export const enableIntersectionObserverByDefault: Getter<boolean> = createNativeFlagGetter('enableIntersectionObserverByDefault', false);
343
+ /**
344
+ * Enables key up/down/press events to be sent to JS from components
345
+ */
346
+ export const enableKeyEvents: Getter<boolean> = createNativeFlagGetter('enableKeyEvents', false);
302
347
  /**
303
348
  * When enabled, LayoutAnimations API will animate state changes on Android.
304
349
  */
@@ -322,11 +367,7 @@ export const enableNativeCSSParsing: Getter<boolean> = createNativeFlagGetter('e
322
367
  /**
323
368
  * Enable network event reporting hooks in each native platform through `NetworkReporter`. This flag should be combined with `enableResourceTimingAPI` and `fuseboxNetworkInspectionEnabled` to enable end-to-end reporting behaviour via the Web Performance API and CDP debugging respectively.
324
369
  */
325
- export const enableNetworkEventReporting: Getter<boolean> = createNativeFlagGetter('enableNetworkEventReporting', false);
326
- /**
327
- * Use BackgroundDrawable and BorderDrawable instead of CSSBackgroundDrawable
328
- */
329
- export const enableNewBackgroundAndBorderDrawables: Getter<boolean> = createNativeFlagGetter('enableNewBackgroundAndBorderDrawables', true);
370
+ export const enableNetworkEventReporting: Getter<boolean> = createNativeFlagGetter('enableNetworkEventReporting', true);
330
371
  /**
331
372
  * Enables caching text layout artifacts for later reuse
332
373
  */
@@ -338,7 +379,11 @@ export const enablePropsUpdateReconciliationAndroid: Getter<boolean> = createNat
338
379
  /**
339
380
  * Enables the reporting of network resource timings through `PerformanceObserver`.
340
381
  */
341
- export const enableResourceTimingAPI: Getter<boolean> = createNativeFlagGetter('enableResourceTimingAPI', false);
382
+ export const enableResourceTimingAPI: Getter<boolean> = createNativeFlagGetter('enableResourceTimingAPI', true);
383
+ /**
384
+ * When enabled, it will use SwiftUI for filter effects like blur on iOS.
385
+ */
386
+ export const enableSwiftUIBasedFilters: Getter<boolean> = createNativeFlagGetter('enableSwiftUIBasedFilters', false);
342
387
  /**
343
388
  * Enables View Culling: as soon as a view goes off screen, it can be reused anywhere in the UI and pieced together with other items to create new UI elements.
344
389
  */
@@ -347,6 +392,10 @@ export const enableViewCulling: Getter<boolean> = createNativeFlagGetter('enable
347
392
  * Enables View Recycling. When enabled, individual ViewManagers must still opt-in.
348
393
  */
349
394
  export const enableViewRecycling: Getter<boolean> = createNativeFlagGetter('enableViewRecycling', false);
395
+ /**
396
+ * Enables View Recycling for <Image> via ReactViewGroup/ReactViewManager.
397
+ */
398
+ export const enableViewRecyclingForImage: Getter<boolean> = createNativeFlagGetter('enableViewRecyclingForImage', true);
350
399
  /**
351
400
  * Enables View Recycling for <ScrollView> via ReactViewGroup/ReactViewManager.
352
401
  */
@@ -359,6 +408,14 @@ export const enableViewRecyclingForText: Getter<boolean> = createNativeFlagGette
359
408
  * Enables View Recycling for <View> via ReactViewGroup/ReactViewManager.
360
409
  */
361
410
  export const enableViewRecyclingForView: Getter<boolean> = createNativeFlagGetter('enableViewRecyclingForView', true);
411
+ /**
412
+ * Set clipping to drawingRect of ScrollView.
413
+ */
414
+ export const enableVirtualViewClippingWithoutScrollViewClipping: Getter<boolean> = createNativeFlagGetter('enableVirtualViewClippingWithoutScrollViewClipping', true);
415
+ /**
416
+ * Enables the experimental version of `VirtualViewContainerState`.
417
+ */
418
+ export const enableVirtualViewContainerStateExperimental: Getter<boolean> = createNativeFlagGetter('enableVirtualViewContainerStateExperimental', false);
362
419
  /**
363
420
  * Enables VirtualView debug features such as logging and overlays.
364
421
  */
@@ -374,11 +431,15 @@ export const enableVirtualViewWindowFocusDetection: Getter<boolean> = createNati
374
431
  /**
375
432
  * Enable Web Performance APIs (Performance Timeline, User Timings, etc.) by default.
376
433
  */
377
- export const enableWebPerformanceAPIsByDefault: Getter<boolean> = createNativeFlagGetter('enableWebPerformanceAPIsByDefault', false);
434
+ export const enableWebPerformanceAPIsByDefault: Getter<boolean> = createNativeFlagGetter('enableWebPerformanceAPIsByDefault', true);
378
435
  /**
379
436
  * Uses the default event priority instead of the discreet event priority by default when dispatching events from Fabric to React.
380
437
  */
381
438
  export const fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean> = createNativeFlagGetter('fixMappingOfEventPrioritiesBetweenFabricAndReact', false);
439
+ /**
440
+ * Enable system assertion validating that Fusebox is configured with a single host. When set, the CDP backend will dynamically disable features (Perf and Network) in the event that multiple hosts are registered (undefined behaviour), and broadcast this over `ReactNativeApplication.systemStateChanged`.
441
+ */
442
+ export const fuseboxAssertSingleHostState: Getter<boolean> = createNativeFlagGetter('fuseboxAssertSingleHostState', true);
382
443
  /**
383
444
  * Flag determining if the React Native DevTools (Fusebox) CDP backend should be enabled in release builds. This flag is global and should not be changed across React Host lifetimes.
384
445
  */
@@ -386,11 +447,19 @@ export const fuseboxEnabledRelease: Getter<boolean> = createNativeFlagGetter('fu
386
447
  /**
387
448
  * Enable network inspection support in the React Native DevTools CDP backend. Requires `enableBridgelessArchitecture`. This flag is global and should not be changed across React Host lifetimes.
388
449
  */
389
- export const fuseboxNetworkInspectionEnabled: Getter<boolean> = createNativeFlagGetter('fuseboxNetworkInspectionEnabled', false);
450
+ export const fuseboxNetworkInspectionEnabled: Getter<boolean> = createNativeFlagGetter('fuseboxNetworkInspectionEnabled', true);
390
451
  /**
391
452
  * Hides offscreen VirtualViews on iOS by setting hidden = YES to avoid extra cost of views
392
453
  */
393
454
  export const hideOffscreenVirtualViewsOnIOS: Getter<boolean> = createNativeFlagGetter('hideOffscreenVirtualViewsOnIOS', false);
455
+ /**
456
+ * Override props at mounting with synchronously mounted (i.e. direct manipulation) props from Native Animated.
457
+ */
458
+ export const overrideBySynchronousMountPropsAtMountingAndroid: Getter<boolean> = createNativeFlagGetter('overrideBySynchronousMountPropsAtMountingAndroid', false);
459
+ /**
460
+ * Enable reporting Performance Issues (`detail.rnPerfIssue`). Displayed in the V2 Performance Monitor and the "Performance Issues" sub-panel in DevTools.
461
+ */
462
+ export const perfIssuesEnabled: Getter<boolean> = createNativeFlagGetter('perfIssuesEnabled', false);
394
463
  /**
395
464
  * Enable the V2 in-app Performance Monitor. This flag is global and should not be changed across React Host lifetimes.
396
465
  */
@@ -403,14 +472,14 @@ export const preparedTextCacheSize: Getter<number> = createNativeFlagGetter('pre
403
472
  * Enables a new mechanism in ShadowTree to prevent problems caused by multiple threads trying to commit concurrently. If a thread tries to commit a few times unsuccessfully, it will acquire a lock and try again.
404
473
  */
405
474
  export const preventShadowTreeCommitExhaustion: Getter<boolean> = createNativeFlagGetter('preventShadowTreeCommitExhaustion', false);
406
- /**
407
- * Releases the cached image data when it is consumed by the observers.
408
- */
409
- export const releaseImageDataWhenConsumed: Getter<boolean> = createNativeFlagGetter('releaseImageDataWhenConsumed', false);
410
475
  /**
411
476
  * Function used to enable / disable Pressibility from using W3C Pointer Events for its hover callbacks
412
477
  */
413
478
  export const shouldPressibilityUseW3CPointerEventsForHover: Getter<boolean> = createNativeFlagGetter('shouldPressibilityUseW3CPointerEventsForHover', false);
479
+ /**
480
+ * Do not emit touchcancel from Android ScrollView, instead native topScroll event will trigger responder transfer and terminate in RN renderer.
481
+ */
482
+ export const shouldTriggerResponderTransferOnScrollAndroid: Getter<boolean> = createNativeFlagGetter('shouldTriggerResponderTransferOnScrollAndroid', false);
414
483
  /**
415
484
  * Skip activity identity assertion in ReactHostImpl::onHostPause()
416
485
  */
@@ -418,7 +487,7 @@ export const skipActivityIdentityAssertionOnHostPause: Getter<boolean> = createN
418
487
  /**
419
488
  * A flag to tell Fabric to sweep active touches from JSTouchDispatcher in Android when a child native gesture is started.
420
489
  */
421
- export const sweepActiveTouchOnChildNativeGesturesAndroid: Getter<boolean> = createNativeFlagGetter('sweepActiveTouchOnChildNativeGesturesAndroid', false);
490
+ export const sweepActiveTouchOnChildNativeGesturesAndroid: Getter<boolean> = createNativeFlagGetter('sweepActiveTouchOnChildNativeGesturesAndroid', true);
422
491
  /**
423
492
  * Enables storing js caller stack when creating promise in native module. This is useful in case of Promise rejection and tracing the cause.
424
493
  */
@@ -459,6 +528,14 @@ export const useRawPropsJsiValue: Getter<boolean> = createNativeFlagGetter('useR
459
528
  * Use the state stored on the source shadow node when cloning it instead of reading in the most recent state on the shadow node family.
460
529
  */
461
530
  export const useShadowNodeStateOnClone: Getter<boolean> = createNativeFlagGetter('useShadowNodeStateOnClone', false);
531
+ /**
532
+ * Use shared animation backend in C++ Animated
533
+ */
534
+ export const useSharedAnimatedBackend: Getter<boolean> = createNativeFlagGetter('useSharedAnimatedBackend', false);
535
+ /**
536
+ * Use Trait::hidden on Android
537
+ */
538
+ export const useTraitHiddenOnAndroid: Getter<boolean> = createNativeFlagGetter('useTraitHiddenOnAndroid', false);
462
539
  /**
463
540
  * In Bridgeless mode, should legacy NativeModules use the TurboModule system?
464
541
  */
@@ -467,6 +544,10 @@ export const useTurboModuleInterop: Getter<boolean> = createNativeFlagGetter('us
467
544
  * When enabled, NativeModules will be executed by using the TurboModule system
468
545
  */
469
546
  export const useTurboModules: Getter<boolean> = createNativeFlagGetter('useTurboModules', false);
547
+ /**
548
+ * Outset the culling context frame with the provided ratio. The culling context frame size will be outset by width * ratio on the left and right, and height * ratio on the top and bottom.
549
+ */
550
+ export const viewCullingOutsetRatio: Getter<number> = createNativeFlagGetter('viewCullingOutsetRatio', 0);
470
551
  /**
471
552
  * Sets a hysteresis window for transition between prerender and hidden modes.
472
553
  */