@office-iss/react-native-win32 0.72.7 → 0.73.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 (272) hide show
  1. package/.flowconfig +15 -4
  2. package/CHANGELOG.json +523 -94
  3. package/CHANGELOG.md +209 -52
  4. package/IntegrationTests/PromiseTest.js +1 -0
  5. package/IntegrationTests/websocket_integration_test_server.js +1 -1
  6. package/Libraries/Animated/Animated.js +1 -1
  7. package/Libraries/Animated/AnimatedImplementation.js +1 -1
  8. package/Libraries/Animated/NativeAnimatedHelper.js +14 -10
  9. package/Libraries/Animated/NativeAnimatedHelper.win32.js +16 -12
  10. package/Libraries/Animated/NativeAnimatedModule.js +6 -2
  11. package/Libraries/Animated/NativeAnimatedTurboModule.js +7 -4
  12. package/Libraries/Animated/animations/Animation.js +57 -3
  13. package/Libraries/Animated/animations/DecayAnimation.js +9 -0
  14. package/Libraries/Animated/animations/SpringAnimation.js +8 -0
  15. package/Libraries/Animated/animations/TimingAnimation.js +8 -0
  16. package/Libraries/Animated/components/AnimatedFlatList.js +2 -1
  17. package/Libraries/Animated/components/AnimatedScrollView.js +2 -0
  18. package/Libraries/Animated/components/AnimatedSectionList.js +2 -1
  19. package/Libraries/Animated/createAnimatedComponent.js +1 -0
  20. package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
  21. package/Libraries/Animated/nodes/AnimatedObject.js +146 -0
  22. package/Libraries/Animated/nodes/AnimatedProps.js +19 -7
  23. package/Libraries/Animated/nodes/AnimatedStyle.js +29 -55
  24. package/Libraries/Animated/nodes/AnimatedValueXY.js +3 -17
  25. package/Libraries/Animated/shouldUseTurboAnimatedModule.js +17 -0
  26. package/Libraries/Animated/useAnimatedProps.js +9 -10
  27. package/Libraries/AppState/AppState.d.ts +1 -1
  28. package/Libraries/AppState/NativeAppState.js +8 -4
  29. package/Libraries/BatchedBridge/MessageQueue.js +45 -36
  30. package/Libraries/Blob/Blob.js +6 -2
  31. package/Libraries/Blob/BlobManager.js +9 -10
  32. package/Libraries/Blob/BlobRegistry.js +14 -9
  33. package/Libraries/Blob/File.js +1 -1
  34. package/Libraries/Blob/FileReader.js +1 -2
  35. package/Libraries/Components/Button/ButtonWin32.Props.d.ts +1 -1
  36. package/Libraries/Components/Button/ButtonWin32.Props.js.map +1 -1
  37. package/Libraries/Components/Button/ButtonWin32.d.ts +1 -1
  38. package/Libraries/Components/Button/ButtonWin32.js +1 -4
  39. package/Libraries/Components/Button/ButtonWin32.js.map +1 -1
  40. package/Libraries/Components/Clipboard/Clipboard.d.ts +4 -4
  41. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +3 -1
  42. package/Libraries/Components/EnterString.win32.d.ts +1 -1
  43. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +26 -6
  44. package/Libraries/Components/Pressable/Pressable.js +3 -2
  45. package/Libraries/Components/Pressable/Pressable.win32.js +4 -3
  46. package/Libraries/Components/Pressable/useAndroidRippleForView.js +1 -1
  47. package/Libraries/Components/SafeAreaView/SafeAreaView.js +7 -7
  48. package/Libraries/Components/SafeAreaView/SafeAreaView.win32.js +7 -8
  49. package/Libraries/Components/ScrollView/ScrollView.js +3 -1
  50. package/Libraries/Components/ScrollView/ScrollView.win32.js +3 -1
  51. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +39 -46
  52. package/Libraries/Components/Switch/Switch.js +1 -0
  53. package/Libraries/Components/Text/TextWin32.d.ts +1 -1
  54. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
  55. package/Libraries/Components/TextInput/TextInput.d.ts +49 -7
  56. package/Libraries/Components/TextInput/TextInput.flow.js +43 -10
  57. package/Libraries/Components/TextInput/TextInput.js +62 -10
  58. package/Libraries/Components/TextInput/TextInput.win32.js +953 -206
  59. package/Libraries/Components/TextInput/Win32TextInputNativeComponent.js +23 -0
  60. package/Libraries/Components/ToastAndroid/{ToastAndroid.ios.js → ToastAndroid.js} +9 -1
  61. package/Libraries/Components/ToastAndroid/ToastAndroid.win32.js +9 -1
  62. package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js +2 -2
  63. package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js.map +1 -1
  64. package/Libraries/Components/Touchable/TouchableBounce.js +1 -1
  65. package/Libraries/Components/Touchable/TouchableHighlight.js +1 -1
  66. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +1 -1
  67. package/Libraries/Components/Touchable/TouchableOpacity.js +4 -1
  68. package/Libraries/Components/Touchable/TouchableWin32.d.ts +1 -1
  69. package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
  70. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +1 -0
  71. package/Libraries/Components/TraceUpdateOverlay/TraceUpdateOverlay.js +16 -6
  72. package/Libraries/Components/View/ReactNativeStyleAttributes.js +9 -0
  73. package/Libraries/Components/View/ReactNativeViewAttributes.js +1 -0
  74. package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +1 -0
  75. package/Libraries/Components/View/View.js +46 -32
  76. package/Libraries/Components/View/View.win32.js +37 -6
  77. package/Libraries/Components/View/ViewAccessibility.d.ts +8 -2
  78. package/Libraries/Components/View/ViewNativeComponent.js +1 -0
  79. package/Libraries/Components/View/ViewPropTypes.js +18 -3
  80. package/Libraries/Components/View/ViewPropTypes.win32.js +30 -4
  81. package/Libraries/Components/View/ViewWin32.js +3 -2
  82. package/Libraries/Core/Devtools/loadBundleFromServer.js +152 -0
  83. package/Libraries/Core/Devtools/symbolicateStackTrace.js +2 -1
  84. package/Libraries/Core/ExceptionsManager.js +16 -7
  85. package/Libraries/Core/ExtendedError.js +12 -0
  86. package/Libraries/Core/ReactNativeVersion.js +3 -3
  87. package/Libraries/Core/ReactNativeVersionCheck.js +0 -2
  88. package/Libraries/Core/ReactNativeVersionCheck.win32.js +0 -2
  89. package/Libraries/Core/__mocks__/NativeExceptionsManager.js +20 -0
  90. package/Libraries/Core/setUpDeveloperTools.js +5 -1
  91. package/Libraries/Core/setUpIntersectionObserver.js +16 -0
  92. package/Libraries/{Components/ProgressBarAndroid/ProgressBarAndroid.ios.js → Core/setUpMutationObserver.js} +6 -2
  93. package/Libraries/Core/setUpPerformance.js +6 -13
  94. package/Libraries/Core/setUpPerformanceObserver.js +16 -0
  95. package/Libraries/Core/setUpRegeneratorRuntime.js +4 -2
  96. package/Libraries/DOM/Nodes/ReactNativeElement.js +135 -18
  97. package/Libraries/DOM/Nodes/ReadOnlyCharacterData.js +72 -0
  98. package/Libraries/DOM/Nodes/ReadOnlyElement.js +209 -21
  99. package/Libraries/DOM/Nodes/ReadOnlyNode.js +206 -17
  100. package/Libraries/DOM/Nodes/ReadOnlyText.js +30 -0
  101. package/Libraries/DOM/Nodes/Utilities/Traversal.js +54 -0
  102. package/Libraries/EventEmitter/NativeEventEmitter.d.ts +0 -6
  103. package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +15 -4
  104. package/Libraries/Image/Image.android.js +8 -2
  105. package/Libraries/Image/Image.d.ts +1 -1
  106. package/Libraries/Image/Image.ios.js +4 -1
  107. package/Libraries/Image/Image.win32.js +6 -3
  108. package/Libraries/Image/ImageBackground.js +3 -0
  109. package/Libraries/Image/resolveAssetSource.win32.js +1 -1
  110. package/Libraries/Inspector/DevtoolsOverlay.js +6 -3
  111. package/Libraries/Inspector/NetworkOverlay.js +2 -2
  112. package/Libraries/Interaction/JSEventLoopWatchdog.js +1 -5
  113. package/Libraries/Interaction/PanResponder.js +1 -4
  114. package/Libraries/IntersectionObserver/IntersectionObserver.js +252 -0
  115. package/Libraries/IntersectionObserver/IntersectionObserverEntry.js +140 -0
  116. package/Libraries/IntersectionObserver/IntersectionObserverManager.js +221 -0
  117. package/Libraries/IntersectionObserver/NativeIntersectionObserver.js +41 -0
  118. package/Libraries/IntersectionObserver/__mocks__/NativeIntersectionObserver.js +162 -0
  119. package/Libraries/LayoutAnimation/LayoutAnimation.js +1 -1
  120. package/Libraries/Lists/FlatList.d.ts +2 -1
  121. package/Libraries/Lists/FlatList.js +15 -5
  122. package/Libraries/Lists/SectionList.js +4 -0
  123. package/Libraries/LogBox/Data/LogBoxLog.js +4 -1
  124. package/Libraries/LogBox/Data/LogBoxSymbolication.js +5 -2
  125. package/Libraries/LogBox/Data/parseLogBoxLog.js +57 -20
  126. package/Libraries/LogBox/UI/AnsiHighlight.js +1 -1
  127. package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +24 -31
  128. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +1 -1
  129. package/Libraries/LogBox/UI/LogBoxMessage.js +4 -7
  130. package/Libraries/MutationObserver/MutationObserver.js +184 -0
  131. package/Libraries/MutationObserver/MutationObserverManager.js +218 -0
  132. package/Libraries/MutationObserver/MutationRecord.js +82 -0
  133. package/Libraries/MutationObserver/NativeMutationObserver.js +58 -0
  134. package/Libraries/MutationObserver/__mocks__/NativeMutationObserver.js +327 -0
  135. package/Libraries/NativeComponent/BaseViewConfig.android.js +18 -3
  136. package/Libraries/NativeComponent/BaseViewConfig.ios.js +33 -0
  137. package/Libraries/NativeComponent/BaseViewConfig.win32.js +33 -0
  138. package/Libraries/NativeComponent/NativeComponentRegistry.js +3 -5
  139. package/Libraries/NativeModules/specs/NativeSourceCode.js +6 -6
  140. package/Libraries/Network/RCTNetworking.android.js +2 -1
  141. package/Libraries/Network/XMLHttpRequest.js +1 -1
  142. package/Libraries/NewAppScreen/components/DebugInstructions.js +4 -4
  143. package/Libraries/NewAppScreen/components/LearnMoreLinks.js +9 -2
  144. package/Libraries/Performance/QuickPerformanceLogger.js +1 -1
  145. package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +1 -0
  146. package/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +1 -0
  147. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +3 -1
  148. package/Libraries/Pressability/Pressability.js +28 -3
  149. package/Libraries/Pressability/Pressability.win32.js +30 -5
  150. package/Libraries/ReactNative/AppContainer.js +2 -3
  151. package/Libraries/ReactNative/AppRegistry.d.ts +0 -5
  152. package/Libraries/ReactNative/AppRegistry.js +66 -53
  153. package/Libraries/ReactNative/BridgelessUIManager.js +38 -9
  154. package/Libraries/ReactNative/FabricUIManager.js +143 -34
  155. package/Libraries/ReactNative/I18nManager.js +5 -11
  156. package/Libraries/ReactNative/NativeI18nManager.js +7 -5
  157. package/Libraries/ReactNative/PaperUIManager.win32.js +2 -2
  158. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +151 -0
  159. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +81 -0
  160. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.js +492 -0
  161. package/Libraries/ReactNative/ReactFabricPublicInstance/warnForStyleProps.js +32 -0
  162. package/Libraries/ReactNative/ReactNativeFeatureFlags.js +19 -3
  163. package/Libraries/ReactNative/UIManager.js +8 -0
  164. package/Libraries/ReactNative/__mocks__/FabricUIManager.js +648 -0
  165. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +38 -2
  166. package/Libraries/Renderer/implementations/ReactFabric-dev.js +27 -27
  167. package/Libraries/Renderer/implementations/ReactFabric-prod.js +3 -3
  168. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3 -3
  169. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +27 -27
  170. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3 -3
  171. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +3 -3
  172. package/Libraries/Renderer/shims/ReactFabric.js +5 -6
  173. package/Libraries/Renderer/shims/ReactFeatureFlags.js +2 -3
  174. package/Libraries/Renderer/shims/ReactNative.js +2 -3
  175. package/Libraries/Renderer/shims/ReactNativeTypes.js +35 -17
  176. package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +3 -3
  177. package/Libraries/Renderer/shims/createReactNativeComponentClass.js +2 -3
  178. package/Libraries/Settings/{Settings.android.js → Settings.js} +4 -4
  179. package/Libraries/Share/Share.d.ts +3 -9
  180. package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +9 -4
  181. package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +28 -13
  182. package/Libraries/StyleSheet/PlatformColorValueTypes.win32.js +14 -4
  183. package/Libraries/StyleSheet/PlatformColorValueTypesIOS.ios.js +1 -1
  184. package/Libraries/StyleSheet/PlatformColorValueTypesWin32.d.ts +1 -1
  185. package/Libraries/StyleSheet/StyleSheet.d.ts +10 -1
  186. package/Libraries/StyleSheet/StyleSheet.js +3 -0
  187. package/Libraries/StyleSheet/StyleSheet.win32.js +3 -0
  188. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +31 -17
  189. package/Libraries/StyleSheet/StyleSheetTypes.js +90 -6
  190. package/Libraries/StyleSheet/flattenStyle.js +4 -0
  191. package/Libraries/StyleSheet/private/_TransformStyle.js +16 -2
  192. package/Libraries/StyleSheet/processColor.js +1 -2
  193. package/Libraries/StyleSheet/processTransformOrigin.js +136 -0
  194. package/Libraries/StyleSheet/splitLayoutProps.js +1 -0
  195. package/Libraries/Text/Text.d.ts +5 -5
  196. package/Libraries/Text/Text.js +17 -10
  197. package/Libraries/Text/Text.win32.js +354 -0
  198. package/Libraries/Text/TextProps.win32.js +281 -0
  199. package/Libraries/TurboModule/TurboModuleRegistry.js +47 -7
  200. package/Libraries/TurboModule/samples/NativeSampleTurboModule.js +6 -0
  201. package/Libraries/Types/CoreEventTypes.d.ts +5 -2
  202. package/Libraries/Utilities/GlobalPerformanceLogger.js +2 -12
  203. package/Libraries/Utilities/NativeDeviceInfo.js +8 -9
  204. package/Libraries/Utilities/NativePlatformConstantsAndroid.js +23 -18
  205. package/Libraries/Utilities/NativePlatformConstantsIOS.js +16 -13
  206. package/Libraries/Utilities/NativePlatformConstantsWin.js +13 -10
  207. package/Libraries/Utilities/PerformanceLoggerContext.js +1 -1
  208. package/Libraries/Utilities/Platform.android.js +12 -8
  209. package/Libraries/Utilities/Platform.d.ts +1 -0
  210. package/Libraries/Utilities/Platform.flow.js +84 -0
  211. package/Libraries/Utilities/Platform.flow.win32.js +111 -0
  212. package/Libraries/Utilities/Platform.ios.js +12 -8
  213. package/Libraries/Utilities/Platform.win32.js +12 -8
  214. package/Libraries/Utilities/PolyfillFunctions.js +1 -1
  215. package/Libraries/Utilities/ReactNativeTestTools.js +1 -2
  216. package/Libraries/Utilities/SceneTracker.js +1 -1
  217. package/Libraries/Utilities/createPerformanceLogger.js +63 -32
  218. package/Libraries/Utilities/useColorScheme.js +7 -8
  219. package/Libraries/WebPerformance/MemoryInfo.js +1 -1
  220. package/Libraries/WebPerformance/NativePerformance.js +3 -8
  221. package/Libraries/WebPerformance/NativePerformanceObserver.js +4 -0
  222. package/Libraries/WebPerformance/Performance.js +42 -15
  223. package/Libraries/WebPerformance/PerformanceEntry.js +14 -6
  224. package/Libraries/WebPerformance/PerformanceEventTiming.js +18 -1
  225. package/Libraries/WebPerformance/ReactNativeStartupTiming.js +40 -14
  226. package/Libraries/WebPerformance/__mocks__/NativePerformance.js +4 -2
  227. package/Libraries/WebPerformance/__mocks__/NativePerformanceObserver.js +21 -3
  228. package/Libraries/promiseRejectionTrackingOptions.js +1 -3
  229. package/Libraries/vendor/emitter/EventEmitter.js +17 -17
  230. package/flow/global.js +1 -3
  231. package/flow/jest.js +5 -1
  232. package/{Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.ios.js → jest/ReactNativeInternalFeatureFlagsMock.js} +2 -1
  233. package/jest/__tests__/setup-test.js +18 -0
  234. package/jest/mockModal.js +6 -4
  235. package/jest/setup.js +61 -30
  236. package/jest.config.js +1 -1
  237. package/just-task.js +1 -0
  238. package/overrides.json +51 -46
  239. package/package.json +35 -33
  240. package/src/Libraries/Components/Button/ButtonWin32.Props.ts +1 -1
  241. package/src/Libraries/Components/Button/ButtonWin32.tsx +0 -2
  242. package/src/Libraries/Components/Touchable/Tests/TouchableWin32Test.tsx +2 -2
  243. package/src/Libraries/Components/Touchable/TouchableWin32.tsx +1 -1
  244. package/src/Libraries/Components/View/ViewAccessibility.d.ts +8 -2
  245. package/src/Libraries/StyleSheet/PlatformColorValueTypesWin32.d.ts +1 -1
  246. package/types/experimental.d.ts +44 -0
  247. package/types/index.d.ts +2 -1
  248. package/types/modules/Devtools.d.ts +1 -0
  249. package/types/modules/globals.d.ts +16 -1
  250. package/IntegrationTests/BUCK +0 -32
  251. package/IntegrationTests/PropertiesUpdateTest.js +0 -29
  252. package/IntegrationTests/RCTRootViewIntegrationTestApp.js +0 -86
  253. package/IntegrationTests/ReactContentSizeUpdateTest.js +0 -89
  254. package/IntegrationTests/SizeFlexibilityUpdateTest.js +0 -106
  255. package/Libraries/Components/TextInput/TextInput.Types.win32.d.ts +0 -51
  256. package/Libraries/Components/TextInput/TextInput.Types.win32.js +0 -3
  257. package/Libraries/Components/TextInput/TextInput.Types.win32.js.map +0 -1
  258. package/Libraries/Utilities/AcessibilityMapping.js +0 -154
  259. package/Libraries/Utilities/AcessibilityMapping.win32.js +0 -156
  260. package/Libraries/Utilities/NativeDevSplitBundleLoader.js +0 -19
  261. package/Libraries/Utilities/useColorScheme.win32.js +0 -26
  262. package/flow/use-sync-external-store.js +0 -20
  263. package/flow-typed/npm/base64-js_v1.x.x.js +0 -12
  264. package/flow-typed/npm/glob_v7.x.x.js +0 -79
  265. package/flow-typed/npm/pretty-format_v26.x.x.js +0 -49
  266. package/flow-typed/npm/promise_v8.x.x.js +0 -30
  267. package/flow-typed/npm/react-dom_v17.x.x.js +0 -139
  268. package/flow-typed/npm/react-test-renderer_v16.x.x.js +0 -79
  269. package/flow-typed/npm/stacktrace-parser_v0.1.x.js +0 -17
  270. package/flow-typed/npm/yargs_v17.x.x.js +0 -341
  271. package/src/Libraries/Components/TextInput/TextInput.Types.win32.ts +0 -68
  272. /package/Libraries/{Renderer/public → ReactNative/ReactFabricPublicInstance}/ReactFabricPublicInstanceUtils.js +0 -0
@@ -11,7 +11,7 @@
11
11
  import type {LayoutEvent} from '../../Types/CoreEventTypes';
12
12
 
13
13
  import Animated from '../../Animated/Animated';
14
- import {isPublicInstance as isFabricPublicInstance} from '../../Renderer/public/ReactFabricPublicInstanceUtils';
14
+ import {isPublicInstance as isFabricPublicInstance} from '../../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstanceUtils';
15
15
  import StyleSheet from '../../StyleSheet/StyleSheet';
16
16
  import Platform from '../../Utilities/Platform';
17
17
  import useMergeRefs from '../../Utilities/useMergeRefs';
@@ -58,17 +58,16 @@ const ScrollViewStickyHeaderWithForwardedRef: React.AbstractComponent<
58
58
  useState<?number>(_nextHeaderLayoutY);
59
59
  const [isFabric, setIsFabric] = useState<boolean>(false);
60
60
 
61
- const callbackRef = (ref: Instance | null): void => {
61
+ const callbackRef = useCallback((ref: Instance | null): void => {
62
62
  if (ref == null) {
63
63
  return;
64
64
  }
65
- ref.setNextHeaderY = value => {
66
- setNextHeaderLayoutY(value);
67
- };
65
+ ref.setNextHeaderY = setNextHeaderLayoutY;
68
66
  setIsFabric(isFabricPublicInstance(ref));
69
- };
67
+ }, []);
70
68
  const ref: (React.ElementRef<typeof Animated.View> | null) => void =
71
69
  // $FlowFixMe[incompatible-type] - Ref is mutated by `callbackRef`.
70
+ // $FlowFixMe[incompatible-call]
72
71
  useMergeRefs<Instance | null>(callbackRef, forwardedRef);
73
72
 
74
73
  const offset = useMemo(
@@ -108,12 +107,12 @@ const ScrollViewStickyHeaderWithForwardedRef: React.AbstractComponent<
108
107
  },
109
108
  );
110
109
 
111
- const _haveReceivedInitialZeroTranslateY = useRef<boolean>(true);
112
- const _timer = useRef<?TimeoutID>(null);
110
+ const haveReceivedInitialZeroTranslateY = useRef<boolean>(true);
111
+ const translateYDebounceTimer = useRef<?TimeoutID>(null);
113
112
 
114
113
  useEffect(() => {
115
114
  if (translateY !== 0 && translateY != null) {
116
- _haveReceivedInitialZeroTranslateY.current = false;
115
+ haveReceivedInitialZeroTranslateY.current = false;
117
116
  }
118
117
  }, [translateY]);
119
118
 
@@ -131,26 +130,22 @@ const ScrollViewStickyHeaderWithForwardedRef: React.AbstractComponent<
131
130
  // your finger, the hit-detection moves from the Android
132
131
  // platform to JS, so we need the ShadowTree to have knowledge
133
132
  // of the current position.
134
- const animatedValueListener = useCallback(
135
- ({value}: $FlowFixMe) => {
136
- const _debounceTimeout: number = Platform.OS === 'android' ? 15 : 64;
137
- // When the AnimatedInterpolation is recreated, it always initializes
138
- // to a value of zero and emits a value change of 0 to its listeners.
139
- if (value === 0 && !_haveReceivedInitialZeroTranslateY.current) {
140
- _haveReceivedInitialZeroTranslateY.current = true;
141
- return;
142
- }
143
- if (_timer.current != null) {
144
- clearTimeout(_timer.current);
145
- }
146
- _timer.current = setTimeout(() => {
147
- if (value !== translateY) {
148
- setTranslateY(value);
149
- }
150
- }, _debounceTimeout);
151
- },
152
- [translateY],
153
- );
133
+ const animatedValueListener = useCallback(({value}: $FlowFixMe) => {
134
+ const debounceTimeout: number = Platform.OS === 'android' ? 15 : 64;
135
+ // When the AnimatedInterpolation is recreated, it always initializes
136
+ // to a value of zero and emits a value change of 0 to its listeners.
137
+ if (value === 0 && !haveReceivedInitialZeroTranslateY.current) {
138
+ haveReceivedInitialZeroTranslateY.current = true;
139
+ return;
140
+ }
141
+ if (translateYDebounceTimer.current != null) {
142
+ clearTimeout(translateYDebounceTimer.current);
143
+ }
144
+ translateYDebounceTimer.current = setTimeout(
145
+ () => setTranslateY(value),
146
+ debounceTimeout,
147
+ );
148
+ }, []);
154
149
 
155
150
  useEffect(() => {
156
151
  const inputRange: Array<number> = [-1, 0];
@@ -242,11 +237,22 @@ const ScrollViewStickyHeaderWithForwardedRef: React.AbstractComponent<
242
237
  if (animatedListenerId) {
243
238
  newAnimatedTranslateY.removeListener(animatedListenerId);
244
239
  }
245
- if (_timer.current != null) {
246
- clearTimeout(_timer.current);
240
+ if (translateYDebounceTimer.current != null) {
241
+ clearTimeout(translateYDebounceTimer.current);
247
242
  }
248
243
  };
249
- }, [nextHeaderLayoutY, measured, layoutHeight, layoutY, scrollViewHeight, scrollAnimatedValue, inverted, offset, animatedValueListener, isFabric]);
244
+ }, [
245
+ nextHeaderLayoutY,
246
+ measured,
247
+ layoutHeight,
248
+ layoutY,
249
+ scrollViewHeight,
250
+ scrollAnimatedValue,
251
+ inverted,
252
+ offset,
253
+ animatedValueListener,
254
+ isFabric,
255
+ ]);
250
256
 
251
257
  const _onLayout = (event: LayoutEvent) => {
252
258
  setLayoutY(event.nativeEvent.layout.y);
@@ -262,17 +268,7 @@ const ScrollViewStickyHeaderWithForwardedRef: React.AbstractComponent<
262
268
 
263
269
  const child = React.Children.only<$FlowFixMe>(props.children);
264
270
 
265
- // TODO T68319535: remove this if NativeAnimated is rewritten for Fabric
266
- const passthroughAnimatedPropExplicitValues =
267
- isFabric && translateY != null
268
- ? {
269
- style: {transform: [{translateY: translateY}]},
270
- }
271
- : null;
272
-
273
271
  return (
274
- /* $FlowFixMe[prop-missing] passthroughAnimatedPropExplicitValues isn't properly
275
- included in the Animated.View flow type. */
276
272
  <Animated.View
277
273
  collapsable={false}
278
274
  nativeID={props.nativeID}
@@ -282,10 +278,7 @@ const ScrollViewStickyHeaderWithForwardedRef: React.AbstractComponent<
282
278
  child.props.style,
283
279
  styles.header,
284
280
  {transform: [{translateY: animatedTranslateY}]},
285
- ]}
286
- passthroughAnimatedPropExplicitValues={
287
- passthroughAnimatedPropExplicitValues
288
- }>
281
+ ]}>
289
282
  {React.cloneElement(child, {
290
283
  style: styles.fill, // We transfer the child style to the wrapper.
291
284
  onLayout: undefined, // we call this manually through our this._onLayout
@@ -155,6 +155,7 @@ const SwitchWithForwardedRef: React.AbstractComponent<
155
155
  typeof SwitchNativeComponent | typeof AndroidSwitchNativeComponent,
156
156
  > | null>(null);
157
157
 
158
+ // $FlowFixMe[incompatible-call]
158
159
  const ref = useMergeRefs(nativeSwitchRef, forwardedRef);
159
160
 
160
161
  const [native, setNative] = React.useState({value: (null: ?boolean)});
@@ -2,5 +2,5 @@ import React from 'react';
2
2
  import type { ITextWin32Props } from './TextWin32.Props';
3
3
  export declare class TextWin32 extends React.Component<ITextWin32Props, {}> {
4
4
  constructor(props: ITextWin32Props);
5
- render(): JSX.Element;
5
+ render(): React.JSX.Element;
6
6
  }
@@ -156,6 +156,7 @@ const RCTTextInputViewConfig = {
156
156
  showSoftInputOnFocus: true,
157
157
  autoFocus: true,
158
158
  lineBreakStrategyIOS: true,
159
+ smartInsertDelete: true,
159
160
  ...ConditionallyIgnoredEventHandlers({
160
161
  onChange: true,
161
162
  onSelectionChange: true,
@@ -205,13 +205,6 @@ export interface TextInputIOSProps {
205
205
  * Give the keyboard and the system information about the expected
206
206
  * semantic meaning for the content that users enter.
207
207
  *
208
- * For iOS 11+ you can set `textContentType` to `username` or `password` to
209
- * enable autofill of login details from the device keychain.
210
- *
211
- * For iOS 12+ `newPassword` can be used to indicate a new password input the
212
- * user may want to save in the keychain, and `oneTimeCode` can be used to indicate
213
- * that a field can be autofilled by a code arriving in an SMS.
214
- *
215
208
  * To disable autofill, set textContentType to `none`.
216
209
  *
217
210
  * Possible values for `textContentType` are:
@@ -223,6 +216,15 @@ export interface TextInputIOSProps {
223
216
  * - `'addressState'`
224
217
  * - `'countryName'`
225
218
  * - `'creditCardNumber'`
219
+ * - `'creditCardExpiration'` (iOS 17+)
220
+ * - `'creditCardExpirationMonth'` (iOS 17+)
221
+ * - `'creditCardExpirationYear'` (iOS 17+)
222
+ * - `'creditCardSecurityCode'` (iOS 17+)
223
+ * - `'creditCardType'` (iOS 17+)
224
+ * - `'creditCardName'` (iOS 17+)
225
+ * - `'creditCardGivenName'` (iOS 17+)
226
+ * - `'creditCardMiddleName'` (iOS 17+)
227
+ * - `'creditCardFamilyName'` (iOS 17+)
226
228
  * - `'emailAddress'`
227
229
  * - `'familyName'`
228
230
  * - `'fullStreetAddress'`
@@ -244,6 +246,10 @@ export interface TextInputIOSProps {
244
246
  * - `'password'`
245
247
  * - `'newPassword'`
246
248
  * - `'oneTimeCode'`
249
+ * - `'birthdate'` (iOS 17+)
250
+ * - `'birthdateDay'` (iOS 17+)
251
+ * - `'birthdateMonth'` (iOS 17+)
252
+ * - `'birthdateYear'` (iOS 17+)
247
253
  *
248
254
  */
249
255
  textContentType?:
@@ -254,6 +260,15 @@ export interface TextInputIOSProps {
254
260
  | 'addressState'
255
261
  | 'countryName'
256
262
  | 'creditCardNumber'
263
+ | 'creditCardExpiration'
264
+ | 'creditCardExpirationMonth'
265
+ | 'creditCardExpirationYear'
266
+ | 'creditCardSecurityCode'
267
+ | 'creditCardType'
268
+ | 'creditCardName'
269
+ | 'creditCardGivenName'
270
+ | 'creditCardMiddleName'
271
+ | 'creditCardFamilyName'
257
272
  | 'emailAddress'
258
273
  | 'familyName'
259
274
  | 'fullStreetAddress'
@@ -275,6 +290,10 @@ export interface TextInputIOSProps {
275
290
  | 'password'
276
291
  | 'newPassword'
277
292
  | 'oneTimeCode'
293
+ | 'birthdate'
294
+ | 'birthdateDay'
295
+ | 'birthdateMonth'
296
+ | 'birthdateYear'
278
297
  | undefined;
279
298
 
280
299
  /**
@@ -291,6 +310,14 @@ export interface TextInputIOSProps {
291
310
  | 'hangul-word'
292
311
  | 'push-out'
293
312
  | undefined;
313
+
314
+ /**
315
+ * If `false`, the iOS system will not insert an extra space after a paste operation
316
+ * neither delete one or two spaces after a cut or delete operation.
317
+ *
318
+ * The default value is `true`.
319
+ */
320
+ smartInsertDelete?: boolean | undefined;
294
321
  }
295
322
 
296
323
  /**
@@ -561,6 +588,11 @@ export interface TextInputProps
561
588
  | 'cc-exp-month'
562
589
  | 'cc-exp-year'
563
590
  | 'cc-number'
591
+ | 'cc-name'
592
+ | 'cc-given-name'
593
+ | 'cc-middle-name'
594
+ | 'cc-family-name'
595
+ | 'cc-type'
564
596
  | 'country'
565
597
  | 'current-password'
566
598
  | 'email'
@@ -782,6 +814,11 @@ export interface TextInputProps
782
814
  */
783
815
  placeholderTextColor?: ColorValue | undefined;
784
816
 
817
+ /**
818
+ * If `true`, text is not editable. The default value is `false`.
819
+ */
820
+ readOnly?: boolean | undefined;
821
+
785
822
  /**
786
823
  * enum('default', 'go', 'google', 'join', 'next', 'route', 'search', 'send', 'yahoo', 'done', 'emergency-call')
787
824
  * Determines how the return key should look.
@@ -912,4 +949,9 @@ export class TextInput extends TextInputBase {
912
949
  * Removes all text from the input.
913
950
  */
914
951
  clear: () => void;
952
+
953
+ /**
954
+ * Sets the start and end positions of text selection.
955
+ */
956
+ setSelection: (start: number, end: number) => void;
915
957
  }
@@ -162,6 +162,15 @@ export type TextContentType =
162
162
  | 'addressState'
163
163
  | 'countryName'
164
164
  | 'creditCardNumber'
165
+ | 'creditCardExpiration'
166
+ | 'creditCardExpirationMonth'
167
+ | 'creditCardExpirationYear'
168
+ | 'creditCardSecurityCode'
169
+ | 'creditCardType'
170
+ | 'creditCardName'
171
+ | 'creditCardGivenName'
172
+ | 'creditCardMiddleName'
173
+ | 'creditCardFamilyName'
165
174
  | 'emailAddress'
166
175
  | 'familyName'
167
176
  | 'fullStreetAddress'
@@ -182,7 +191,11 @@ export type TextContentType =
182
191
  | 'username'
183
192
  | 'password'
184
193
  | 'newPassword'
185
- | 'oneTimeCode';
194
+ | 'oneTimeCode'
195
+ | 'birthdate'
196
+ | 'birthdateDay'
197
+ | 'birthdateMonth'
198
+ | 'birthdateYear';
186
199
 
187
200
  export type enterKeyHintType =
188
201
  | 'enter'
@@ -295,6 +308,16 @@ type IOSProps = $ReadOnly<{|
295
308
  * @platform ios
296
309
  */
297
310
  lineBreakStrategyIOS?: ?('none' | 'standard' | 'hangul-word' | 'push-out'),
311
+
312
+ /**
313
+ * If `false`, the iOS system will not insert an extra space after a paste operation
314
+ * neither delete one or two spaces after a cut or delete operation.
315
+ *
316
+ * The default value is `true`.
317
+ *
318
+ * @platform ios
319
+ */
320
+ smartInsertDelete?: ?boolean,
298
321
  |}>;
299
322
 
300
323
  type AndroidProps = $ReadOnly<{|
@@ -408,7 +431,16 @@ export type Props = $ReadOnly<{|
408
431
  * - `additional-name`
409
432
  * - `address-line1`
410
433
  * - `address-line2`
434
+ * - `birthdate-day` (iOS 17+)
435
+ * - `birthdate-full` (iOS 17+)
436
+ * - `birthdate-month` (iOS 17+)
437
+ * - `birthdate-year` (iOS 17+)
411
438
  * - `cc-number`
439
+ * - `cc-csc` (iOS 17+)
440
+ * - `cc-exp` (iOS 17+)
441
+ * - `cc-exp-day` (iOS 17+)
442
+ * - `cc-exp-month` (iOS 17+)
443
+ * - `cc-exp-year` (iOS 17+)
412
444
  * - `country`
413
445
  * - `current-password`
414
446
  * - `email`
@@ -427,6 +459,11 @@ export type Props = $ReadOnly<{|
427
459
  *
428
460
  * The following values work on iOS only:
429
461
  *
462
+ * - `cc-name` (iOS 17+)
463
+ * - `cc-given-name` (iOS 17+)
464
+ * - `cc-middle-name` (iOS 17+)
465
+ * - `cc-family-name` (iOS 17+)
466
+ * - `cc-type` (iOS 17+)
430
467
  * - `nickname`
431
468
  * - `organization`
432
469
  * - `organization-title`
@@ -434,15 +471,6 @@ export type Props = $ReadOnly<{|
434
471
  *
435
472
  * The following values work on Android only:
436
473
  *
437
- * - `birthdate-day`
438
- * - `birthdate-full`
439
- * - `birthdate-month`
440
- * - `birthdate-year`
441
- * - `cc-csc`
442
- * - `cc-exp`
443
- * - `cc-exp-day`
444
- * - `cc-exp-month`
445
- * - `cc-exp-year`
446
474
  * - `gender`
447
475
  * - `name-family`
448
476
  * - `name-given`
@@ -478,6 +506,11 @@ export type Props = $ReadOnly<{|
478
506
  | 'cc-exp-month'
479
507
  | 'cc-exp-year'
480
508
  | 'cc-number'
509
+ | 'cc-name'
510
+ | 'cc-given-name'
511
+ | 'cc-middle-name'
512
+ | 'cc-family-name'
513
+ | 'cc-type'
481
514
  | 'country'
482
515
  | 'current-password'
483
516
  | 'email'
@@ -200,6 +200,15 @@ export type TextContentType =
200
200
  | 'addressState'
201
201
  | 'countryName'
202
202
  | 'creditCardNumber'
203
+ | 'creditCardExpiration'
204
+ | 'creditCardExpirationMonth'
205
+ | 'creditCardExpirationYear'
206
+ | 'creditCardSecurityCode'
207
+ | 'creditCardType'
208
+ | 'creditCardName'
209
+ | 'creditCardGivenName'
210
+ | 'creditCardMiddleName'
211
+ | 'creditCardFamilyName'
203
212
  | 'emailAddress'
204
213
  | 'familyName'
205
214
  | 'fullStreetAddress'
@@ -220,7 +229,11 @@ export type TextContentType =
220
229
  | 'username'
221
230
  | 'password'
222
231
  | 'newPassword'
223
- | 'oneTimeCode';
232
+ | 'oneTimeCode'
233
+ | 'birthdate'
234
+ | 'birthdateDay'
235
+ | 'birthdateMonth'
236
+ | 'birthdateYear';
224
237
 
225
238
  export type enterKeyHintType =
226
239
  // Cross Platform
@@ -339,6 +352,16 @@ type IOSProps = $ReadOnly<{|
339
352
  * @platform ios
340
353
  */
341
354
  lineBreakStrategyIOS?: ?('none' | 'standard' | 'hangul-word' | 'push-out'),
355
+
356
+ /**
357
+ * If `false`, the iOS system will not insert an extra space after a paste operation
358
+ * neither delete one or two spaces after a cut or delete operation.
359
+ *
360
+ * The default value is `true`.
361
+ *
362
+ * @platform ios
363
+ */
364
+ smartInsertDelete?: ?boolean,
342
365
  |}>;
343
366
 
344
367
  type AndroidProps = $ReadOnly<{|
@@ -452,7 +475,16 @@ export type Props = $ReadOnly<{|
452
475
  * - `additional-name`
453
476
  * - `address-line1`
454
477
  * - `address-line2`
478
+ * - `birthdate-day` (iOS 17+)
479
+ * - `birthdate-full` (iOS 17+)
480
+ * - `birthdate-month` (iOS 17+)
481
+ * - `birthdate-year` (iOS 17+)
455
482
  * - `cc-number`
483
+ * - `cc-csc` (iOS 17+)
484
+ * - `cc-exp` (iOS 17+)
485
+ * - `cc-exp-day` (iOS 17+)
486
+ * - `cc-exp-month` (iOS 17+)
487
+ * - `cc-exp-year` (iOS 17+)
456
488
  * - `country`
457
489
  * - `current-password`
458
490
  * - `email`
@@ -471,6 +503,11 @@ export type Props = $ReadOnly<{|
471
503
  *
472
504
  * The following values work on iOS only:
473
505
  *
506
+ * - `cc-name` (iOS 17+)
507
+ * - `cc-given-name` (iOS 17+)
508
+ * - `cc-middle-name` (iOS 17+)
509
+ * - `cc-family-name` (iOS 17+)
510
+ * - `cc-type` (iOS 17+)
474
511
  * - `nickname`
475
512
  * - `organization`
476
513
  * - `organization-title`
@@ -478,15 +515,6 @@ export type Props = $ReadOnly<{|
478
515
  *
479
516
  * The following values work on Android only:
480
517
  *
481
- * - `birthdate-day`
482
- * - `birthdate-full`
483
- * - `birthdate-month`
484
- * - `birthdate-year`
485
- * - `cc-csc`
486
- * - `cc-exp`
487
- * - `cc-exp-day`
488
- * - `cc-exp-month`
489
- * - `cc-exp-year`
490
518
  * - `gender`
491
519
  * - `name-family`
492
520
  * - `name-given`
@@ -522,6 +550,11 @@ export type Props = $ReadOnly<{|
522
550
  | 'cc-exp-month'
523
551
  | 'cc-exp-year'
524
552
  | 'cc-number'
553
+ | 'cc-name'
554
+ | 'cc-given-name'
555
+ | 'cc-middle-name'
556
+ | 'cc-family-name'
557
+ | 'cc-type'
525
558
  | 'country'
526
559
  | 'current-password'
527
560
  | 'email'
@@ -1564,7 +1597,20 @@ const autoCompleteWebToAutoCompleteAndroidMap = {
1564
1597
  const autoCompleteWebToTextContentTypeMap = {
1565
1598
  'address-line1': 'streetAddressLine1',
1566
1599
  'address-line2': 'streetAddressLine2',
1600
+ bday: 'birthdate',
1601
+ 'bday-day': 'birthdateDay',
1602
+ 'bday-month': 'birthdateMonth',
1603
+ 'bday-year': 'birthdateYear',
1604
+ 'cc-csc': 'creditCardSecurityCode',
1605
+ 'cc-exp-month': 'creditCardExpirationMonth',
1606
+ 'cc-exp-year': 'creditCardExpirationYear',
1607
+ 'cc-exp': 'creditCardExpiration',
1608
+ 'cc-given-name': 'creditCardGivenName',
1609
+ 'cc-additional-name': 'creditCardMiddleName',
1610
+ 'cc-family-name': 'creditCardFamilyName',
1611
+ 'cc-name': 'creditCardName',
1567
1612
  'cc-number': 'creditCardNumber',
1613
+ 'cc-type': 'creditCardType',
1568
1614
  'current-password': 'password',
1569
1615
  country: 'countryName',
1570
1616
  email: 'emailAddress',
@@ -1590,6 +1636,7 @@ const autoCompleteWebToTextContentTypeMap = {
1590
1636
  const ExportedForwardRef: React.AbstractComponent<
1591
1637
  React.ElementConfig<typeof InternalTextInput>,
1592
1638
  TextInputInstance,
1639
+ // $FlowFixMe[incompatible-call]
1593
1640
  > = React.forwardRef(function TextInput(
1594
1641
  {
1595
1642
  allowFontScaling = true,
@@ -1612,8 +1659,13 @@ const ExportedForwardRef: React.AbstractComponent<
1612
1659
  let style = flattenStyle(restProps.style);
1613
1660
 
1614
1661
  if (style?.verticalAlign != null) {
1662
+ // $FlowFixMe[prop-missing]
1663
+ // $FlowFixMe[cannot-write]
1615
1664
  style.textAlignVertical =
1665
+ // $FlowFixMe[invalid-computed-prop]
1616
1666
  verticalAlignToTextAlignVerticalMap[style.verticalAlign];
1667
+ // $FlowFixMe[prop-missing]
1668
+ // $FlowFixMe[cannot-write]
1617
1669
  delete style.verticalAlign;
1618
1670
  }
1619
1671