react-native-windows 0.79.2 → 0.80.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 (348) hide show
  1. package/.flowconfig +12 -3
  2. package/Directory.Build.props +5 -2
  3. package/Libraries/Alert/Alert.d.ts +4 -1
  4. package/Libraries/Alert/Alert.js +3 -0
  5. package/Libraries/Alert/Alert.windows.js +3 -0
  6. package/Libraries/Alert/RCTAlertManager.js +17 -0
  7. package/Libraries/Animated/Animated.js.flow +1 -3
  8. package/Libraries/Animated/AnimatedEvent.js +4 -3
  9. package/Libraries/Animated/AnimatedExports.js +2 -2
  10. package/Libraries/Animated/AnimatedExports.js.flow +140 -0
  11. package/Libraries/Animated/AnimatedImplementation.js +2 -123
  12. package/Libraries/Animated/Easing.js +13 -15
  13. package/Libraries/Animated/animations/Animation.js +8 -4
  14. package/Libraries/Animated/components/AnimatedFlatList.js +7 -6
  15. package/Libraries/Animated/components/AnimatedScrollView.js +48 -42
  16. package/Libraries/Animated/components/AnimatedSectionList.js +11 -7
  17. package/Libraries/Animated/createAnimatedComponent.js +105 -57
  18. package/Libraries/Animated/nodes/AnimatedNode.js +4 -3
  19. package/Libraries/Animated/nodes/AnimatedProps.js +46 -26
  20. package/Libraries/Animated/nodes/AnimatedValue.js +16 -7
  21. package/Libraries/Animated/nodes/AnimatedValueXY.js +3 -1
  22. package/Libraries/AppState/AppState.js +7 -2
  23. package/Libraries/BatchedBridge/MessageQueue.js +2 -2
  24. package/Libraries/BatchedBridge/NativeModules.js +2 -0
  25. package/Libraries/Blob/BlobManager.js +1 -0
  26. package/Libraries/Blob/FileReader.js +219 -8
  27. package/Libraries/Blob/URL.js +37 -12
  28. package/Libraries/Blob/URLSearchParams.js +106 -31
  29. package/Libraries/Blob/URLSearchParams.js.flow +12 -7
  30. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +1 -1
  31. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +1 -1
  32. package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.js +17 -0
  33. package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +1 -0
  34. package/Libraries/Components/Button.d.ts +3 -0
  35. package/Libraries/Components/Button.js +1 -1
  36. package/Libraries/Components/Button.windows.js +27 -1
  37. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -3
  38. package/Libraries/{NewAppScreen/components/Colors.js → Components/DrawerAndroid/DrawerLayoutAndroid.ios.js} +6 -10
  39. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +6 -66
  40. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js.flow +18 -0
  41. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidFallback.js +71 -0
  42. package/Libraries/Components/Flyout/Flyout.js +11 -0
  43. package/Libraries/Components/Keyboard/Keyboard.js +5 -3
  44. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +6 -3
  45. package/Libraries/Components/Keyboard/KeyboardExt.js.map +1 -1
  46. package/Libraries/Components/Popup/Popup.js +11 -0
  47. package/Libraries/Components/Pressable/Pressable.js +20 -4
  48. package/Libraries/Components/Pressable/Pressable.windows.js +20 -4
  49. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +25 -3
  50. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.js +29 -20
  51. package/Libraries/Components/RefreshControl/RefreshControl.js +1 -1
  52. package/Libraries/Components/RefreshControl/RefreshControl.windows.js +1 -1
  53. package/Libraries/Components/ScrollView/ScrollView.d.ts +3 -3
  54. package/Libraries/Components/ScrollView/ScrollView.js +132 -122
  55. package/Libraries/Components/ScrollView/ScrollView.windows.js +131 -122
  56. package/Libraries/Components/StaticRenderer.js +1 -1
  57. package/Libraries/Components/Switch/Switch.d.ts +3 -0
  58. package/Libraries/Components/Switch/Switch.js +8 -4
  59. package/Libraries/Components/Switch/Switch.windows.js +17 -4
  60. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +2 -1
  61. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +2 -4
  62. package/Libraries/Components/TextInput/TextInput.d.ts +70 -33
  63. package/Libraries/Components/TextInput/TextInput.flow.js +100 -51
  64. package/Libraries/Components/TextInput/TextInput.flow.windows.js +1246 -0
  65. package/Libraries/Components/TextInput/TextInput.js +88 -1027
  66. package/Libraries/Components/TextInput/TextInput.windows.js +104 -1092
  67. package/Libraries/Components/TextInput/TextInputState.js +1 -1
  68. package/Libraries/Components/TextInput/TextInputState.windows.js +1 -1
  69. package/Libraries/Components/TextInput/WindowsTextInputNativeComponent.js +2 -1
  70. package/Libraries/{Modal/ModalInjection.js → Components/ToastAndroid/ToastAndroid.ios.js} +3 -5
  71. package/Libraries/Components/ToastAndroid/ToastAndroid.js +4 -32
  72. package/Libraries/Components/ToastAndroid/ToastAndroid.js.flow +109 -0
  73. package/Libraries/Components/ToastAndroid/ToastAndroidFallback.js +45 -0
  74. package/Libraries/Components/Touchable/Touchable.js +5 -5
  75. package/Libraries/Components/Touchable/Touchable.windows.js +5 -5
  76. package/Libraries/Components/Touchable/TouchableBounce.js +14 -7
  77. package/Libraries/Components/Touchable/TouchableBounce.windows.js +14 -7
  78. package/Libraries/Components/Touchable/TouchableHighlight.js +10 -7
  79. package/Libraries/Components/Touchable/TouchableHighlight.windows.js +10 -7
  80. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +6 -6
  81. package/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js +6 -6
  82. package/Libraries/Components/Touchable/TouchableOpacity.js +13 -6
  83. package/Libraries/Components/Touchable/TouchableOpacity.windows.js +13 -6
  84. package/Libraries/Components/View/View.js +18 -21
  85. package/Libraries/Components/View/View.windows.js +39 -41
  86. package/Libraries/Components/View/ViewAccessibility.d.ts +8 -0
  87. package/Libraries/Components/View/ViewAccessibility.js +25 -1
  88. package/Libraries/Components/View/ViewAccessibility.windows.js +9 -1
  89. package/Libraries/Components/View/ViewPropTypes.js +49 -3
  90. package/Libraries/Components/View/ViewPropTypes.windows.js +50 -2
  91. package/Libraries/Core/ReactNativeVersion.js +1 -1
  92. package/Libraries/Core/setUpReactDevTools.js +5 -5
  93. package/Libraries/Debugging/DebuggingOverlayRegistry.js +3 -3
  94. package/Libraries/EventEmitter/NativeEventEmitter.js +9 -4
  95. package/Libraries/Image/AssetSourceResolver.js +17 -4
  96. package/Libraries/Image/AssetSourceResolver.windows.js +17 -4
  97. package/Libraries/Image/Image.d.ts +26 -10
  98. package/Libraries/Image/Image.js +17 -0
  99. package/Libraries/Image/Image.js.flow +5 -5
  100. package/Libraries/Image/Image.windows.js +13 -1
  101. package/Libraries/Image/ImageBackground.js +2 -0
  102. package/Libraries/Image/ImageInjection.js +1 -1
  103. package/Libraries/Image/ImageProps.js +22 -17
  104. package/Libraries/Image/ImageSource.js +3 -1
  105. package/Libraries/Image/ImageSourceUtils.js +4 -2
  106. package/Libraries/Image/ImageTypes.flow.js +1 -1
  107. package/Libraries/Interaction/InteractionManager.d.ts +13 -0
  108. package/Libraries/Interaction/InteractionManager.js +1 -1
  109. package/Libraries/Interaction/PanResponder.js +3 -3
  110. package/Libraries/Interaction/TaskQueue.js +1 -0
  111. package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -2
  112. package/Libraries/Linking/Linking.js +1 -1
  113. package/Libraries/Lists/FlatList.d.ts +2 -2
  114. package/Libraries/Lists/FlatList.js +8 -11
  115. package/Libraries/Lists/SectionList.js +39 -42
  116. package/Libraries/Lists/SectionListModern.js +25 -34
  117. package/Libraries/Lists/VirtualizedList.js +1 -0
  118. package/Libraries/Lists/VirtualizedSectionList.js +1 -0
  119. package/Libraries/LogBox/Data/LogBoxData.js +1 -1
  120. package/Libraries/LogBox/LogBoxNotificationContainer.js +1 -1
  121. package/Libraries/Modal/Modal.js +33 -7
  122. package/Libraries/Modal/Modal.windows.js +33 -10
  123. package/Libraries/NativeComponent/BaseViewConfig.android.js +2 -0
  124. package/Libraries/NativeComponent/BaseViewConfig.ios.js +2 -0
  125. package/Libraries/NativeComponent/BaseViewConfig.js +17 -0
  126. package/Libraries/NativeComponent/BaseViewConfig.windows.js +3 -0
  127. package/Libraries/NativeComponent/PlatformBaseViewConfig.js +2 -2
  128. package/Libraries/NativeModules/specs/NativeDevMenu.js +2 -2
  129. package/Libraries/Network/RCTNetworking.android.js +1 -1
  130. package/Libraries/Network/RCTNetworking.ios.js +1 -1
  131. package/Libraries/Network/RCTNetworking.js +17 -0
  132. package/Libraries/Network/RCTNetworking.js.flow +1 -1
  133. package/Libraries/Network/RCTNetworking.windows.js +1 -1
  134. package/Libraries/Network/XMLHttpRequest.js +781 -10
  135. package/Libraries/Performance/Systrace.js +7 -7
  136. package/Libraries/Pressability/Pressability.js +1 -1
  137. package/Libraries/Pressability/Pressability.windows.js +1 -1
  138. package/Libraries/ReactNative/AppContainer-dev.js +5 -4
  139. package/Libraries/ReactNative/AppRegistry.flow.js +49 -0
  140. package/Libraries/ReactNative/AppRegistry.js +2 -322
  141. package/Libraries/ReactNative/AppRegistry.js.flow +23 -0
  142. package/Libraries/ReactNative/AppRegistryImpl.js +316 -0
  143. package/Libraries/ReactNative/FabricUIManager.js +10 -0
  144. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +2 -4
  145. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +1 -4
  146. package/Libraries/ReactNative/RendererImplementation.js +10 -5
  147. package/Libraries/ReactNative/getNativeComponentAttributes.js +1 -0
  148. package/Libraries/ReactNative/renderApplication.js +9 -0
  149. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +3 -3
  150. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js.flow +51 -0
  151. package/Libraries/Renderer/implementations/ReactFabric-dev.js +4840 -4748
  152. package/Libraries/Renderer/implementations/ReactFabric-prod.js +4947 -4829
  153. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3998 -3888
  154. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +5005 -4948
  155. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +2744 -2652
  156. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +5020 -4933
  157. package/Libraries/Renderer/shims/ReactNativeTypes.js +3 -3
  158. package/Libraries/Settings/Settings.ios.js +1 -0
  159. package/Libraries/Settings/Settings.js +13 -19
  160. package/Libraries/Settings/SettingsFallback.js +33 -0
  161. package/Libraries/StyleSheet/PlatformColorValueTypes.js +15 -0
  162. package/Libraries/StyleSheet/PlatformColorValueTypesIOS.js +6 -0
  163. package/Libraries/StyleSheet/Rect.js +1 -0
  164. package/Libraries/StyleSheet/StyleSheet.js +31 -200
  165. package/Libraries/StyleSheet/StyleSheet.js.flow +188 -0
  166. package/Libraries/StyleSheet/StyleSheetExports.js +210 -0
  167. package/Libraries/StyleSheet/StyleSheetExports.js.flow +112 -0
  168. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
  169. package/Libraries/StyleSheet/StyleSheetTypes.js +130 -52
  170. package/Libraries/StyleSheet/flattenStyle.js +14 -4
  171. package/Libraries/StyleSheet/private/_TransformStyle.js +49 -21
  172. package/Libraries/StyleSheet/processBackgroundImage.js +670 -214
  173. package/Libraries/Text/Text.d.ts +2 -5
  174. package/Libraries/Text/Text.js +3 -3
  175. package/Libraries/Text/Text.windows.js +3 -3
  176. package/Libraries/Text/TextNativeComponent.js +0 -4
  177. package/Libraries/Text/TextProps.js +5 -33
  178. package/Libraries/Text/TextProps.windows.js +5 -32
  179. package/Libraries/Types/CodegenTypesNamespace.d.ts +45 -0
  180. package/Libraries/{Blob/__mocks__/BlobModule.js → Types/CodegenTypesNamespace.js} +4 -6
  181. package/Libraries/Types/CoreEventTypes.d.ts +6 -1
  182. package/Libraries/Types/CoreEventTypes.js +1 -1
  183. package/Libraries/Types/CoreEventTypes.windows.js +1 -1
  184. package/Libraries/Utilities/Appearance.js +2 -0
  185. package/Libraries/Utilities/BackHandler.js +17 -0
  186. package/Libraries/Utilities/DeviceInfo.js +2 -0
  187. package/Libraries/Utilities/Dimensions.js +1 -1
  188. package/Libraries/Utilities/Platform.js +17 -0
  189. package/Libraries/Utilities/PlatformTypes.js +11 -3
  190. package/Libraries/Utilities/ReactNativeTestTools.js +2 -2
  191. package/Libraries/Utilities/codegenNativeCommands.d.ts +18 -0
  192. package/Libraries/Utilities/codegenNativeComponent.d.ts +26 -0
  193. package/Libraries/WebSocket/WebSocket.js +313 -8
  194. package/Libraries/vendor/core/ErrorUtils.js +28 -2
  195. package/Libraries/vendor/emitter/EventEmitter.js +6 -2
  196. package/Microsoft.ReactNative/CompositionSwitcher.idl +8 -0
  197. package/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.cpp +0 -6
  198. package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +197 -1
  199. package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +34 -4
  200. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +12 -0
  201. package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +36 -33
  202. package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +81 -0
  203. package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +5 -0
  204. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +148 -14
  205. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +4 -0
  206. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputEventEmitter.cpp +29 -0
  207. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputEventEmitter.h +2 -0
  208. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +17 -34
  209. package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +4 -0
  210. package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.h +2 -0
  211. package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewEventEmitter.cpp +16 -0
  212. package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewEventEmitter.h +1 -0
  213. package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewProps.cpp +9 -0
  214. package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewProps.h +1 -0
  215. package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewTraitsInitializer.h +4 -0
  216. package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/WindowsTextLayoutManager.cpp +34 -94
  217. package/Microsoft.ReactNative/Modules/SampleTurboModule.cpp +4 -0
  218. package/Microsoft.ReactNative/Modules/SampleTurboModule.h +3 -0
  219. package/Microsoft.ReactNative/TurboModulesProvider.h +1 -1
  220. package/Microsoft.ReactNative.Cxx/JSI/JsiApiContext.h +1 -1
  221. package/Microsoft.ReactNative.Cxx/JSI/LongLivedJsiValue.h +1 -1
  222. package/PropertySheets/Generated/PackageVersion.g.props +4 -4
  223. package/PropertySheets/React.Cpp.props +4 -0
  224. package/README.md +2 -2
  225. package/ReactCommon/ReactCommon.vcxproj +9 -4
  226. package/ReactCommon/ReactCommon.vcxproj.filters +6 -0
  227. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/CxxNativeModule.cpp +253 -0
  228. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.cpp +5 -2
  229. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp +4 -8
  230. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/TraceSection.h +184 -0
  231. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp +22 -0
  232. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.h +2 -4
  233. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModuleWithJSIBindings.cpp +27 -0
  234. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp +2 -1
  235. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityPrimitives.h +1 -1
  236. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityProps.cpp +308 -0
  237. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/DynamicEventPayload.cpp +42 -0
  238. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/css/CSSTokenizer.h +7 -51
  239. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +10 -5
  240. package/Scripts/creaternwapp.cmd +9 -3
  241. package/Shared/Shared.vcxitems +3 -2
  242. package/Shared/Shared.vcxitems.filters +2 -1
  243. package/codegen/NativeAnimatedModuleSpec.g.h +2 -0
  244. package/codegen/NativeAnimatedTurboModuleSpec.g.h +2 -0
  245. package/codegen/NativePerformanceSpec.g.h +14 -0
  246. package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +151 -127
  247. package/codegen/NativeSampleTurboModuleSpec.g.h +14 -8
  248. package/codegen/react/components/rnwcore/EventEmitters.cpp +48 -48
  249. package/codegen/rnwcoreJSI-generated.cpp +159 -129
  250. package/codegen/rnwcoreJSI.h +534 -408
  251. package/index.js +51 -331
  252. package/index.windows.js +70 -352
  253. package/interface.js +0 -4
  254. package/jest/resolver.js +31 -0
  255. package/jest/setup.js +6 -2
  256. package/package.json +29 -28
  257. package/src/private/animated/NativeAnimatedHelper.js +21 -8
  258. package/src/private/animated/createAnimatedPropsHook.js +11 -16
  259. package/src/private/animated/createAnimatedPropsMemoHook.js +1 -2
  260. package/src/private/components/{SafeAreaView_INTERNAL_DO_NOT_USE.js → safeareaview/SafeAreaView_INTERNAL_DO_NOT_USE.js} +6 -6
  261. package/src/private/components/{HScrollViewNativeComponents.js → scrollview/HScrollViewNativeComponents.js} +8 -8
  262. package/src/private/components/scrollview/VScrollViewNativeComponents.js +25 -0
  263. package/src/private/{devmenu → devsupport/devmenu}/DevMenu.js +1 -1
  264. package/src/private/{inspector → devsupport/devmenu/elementinspector}/BorderBox.js +3 -3
  265. package/src/private/{inspector → devsupport/devmenu/elementinspector}/BoxInspector.js +6 -5
  266. package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementBox.js +8 -6
  267. package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementProperties.js +11 -10
  268. package/src/private/{inspector → devsupport/devmenu/elementinspector}/Inspector.js +14 -12
  269. package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorOverlay.js +5 -4
  270. package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorPanel.js +9 -8
  271. package/src/private/{inspector → devsupport/devmenu/elementinspector}/NetworkOverlay.js +10 -9
  272. package/src/private/{inspector → devsupport/devmenu/elementinspector}/ReactDevToolsOverlay.js +7 -7
  273. package/src/private/{inspector → devsupport/devmenu/elementinspector}/StyleInspector.js +7 -6
  274. package/src/private/{inspector → devsupport/devmenu/elementinspector}/XHRInterceptor.js +2 -2
  275. package/src/private/{inspector → devsupport/devmenu/elementinspector}/getInspectorDataForViewAtPoint.js +4 -4
  276. package/src/private/{inspector → devsupport/devmenu/elementinspector}/resolveBoxStyle.js +1 -1
  277. package/src/private/{inspector → devsupport/devmenu/perfmonitor}/PerformanceOverlay.js +6 -5
  278. package/src/private/{specs_DEPRECATED/modules → devsupport/devmenu/specs}/NativeDevMenu.js +2 -2
  279. package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.android.js +1 -1
  280. package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.ios.js +1 -1
  281. package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.windows.js +1 -1
  282. package/src/private/{debugging → devsupport/rndevtools}/setUpFuseboxReactDevToolsDispatcher.js +1 -1
  283. package/src/private/{fusebox → devsupport/rndevtools}/specs/NativeReactDevToolsRuntimeSettingsModule.js +2 -2
  284. package/src/private/{specs_DEPRECATED/modules → devsupport/rndevtools/specs}/NativeReactDevToolsSettingsManager.js +2 -2
  285. package/src/private/featureflags/ReactNativeFeatureFlags.js +82 -80
  286. package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +12 -1
  287. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +17 -13
  288. package/src/private/renderer/errorhandling/ErrorHandlers.js +2 -2
  289. package/src/private/specs_DEPRECATED/modules/NativeAnimatedModule.js +1 -1
  290. package/src/private/specs_DEPRECATED/modules/NativeAnimatedTurboModule.js +1 -1
  291. package/src/private/specs_DEPRECATED/modules/NativeSampleTurboModule.js +3 -0
  292. package/src/private/styles/composeStyles.js +12 -5
  293. package/src/private/types/HostComponent.js +1 -1
  294. package/src/private/types/HostInstance.js +67 -1
  295. package/src/private/webapis/dom/nodes/ReactNativeElement.js +2 -5
  296. package/src/private/webapis/dom/nodes/ReadOnlyNode.js +5 -18
  297. package/src/private/webapis/dom/nodes/internals/NodeInternals.js +6 -0
  298. package/src/private/webapis/performance/Performance.js +1 -3
  299. package/src/private/webapis/performance/PerformanceEntry.js +6 -1
  300. package/src/private/webapis/performance/internals/RawPerformanceEntry.js +3 -0
  301. package/src/private/webapis/performance/specs/NativePerformance.js +10 -1
  302. package/src/types/globals.d.ts +42 -0
  303. package/stubs/double-conversion/double-conversion.h +3 -1
  304. package/templates/cpp-app/windows/MyApp/MyApp.vcxproj +4 -0
  305. package/templates/cpp-lib/windows/MyLib/MyLib.vcxproj +4 -0
  306. package/types/index.d.ts +6 -3
  307. package/types/public/ReactNativeTypes.d.ts +2 -2
  308. package/Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js +0 -38
  309. package/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js +0 -22
  310. package/Libraries/Blob/FileReader_new.js +0 -231
  311. package/Libraries/Blob/FileReader_old.js +0 -186
  312. package/Libraries/Blob/__mocks__/FileReaderModule.js +0 -20
  313. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +0 -32
  314. package/Libraries/Core/__mocks__/ErrorUtils.js +0 -33
  315. package/Libraries/Core/__mocks__/NativeExceptionsManager.js +0 -19
  316. package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +0 -49
  317. package/Libraries/Events/CustomEvent.js +0 -32
  318. package/Libraries/Events/EventPolyfill.js +0 -239
  319. package/Libraries/Lists/__flowtests__/FlatList-flowtest.js +0 -118
  320. package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +0 -134
  321. package/Libraries/Network/XMLHttpRequest_new.js +0 -794
  322. package/Libraries/Network/XMLHttpRequest_old.js +0 -701
  323. package/Libraries/NewAppScreen/components/DebugInstructions.js +0 -41
  324. package/Libraries/NewAppScreen/components/DebugInstructions.windows.js +0 -30
  325. package/Libraries/NewAppScreen/components/Header.js +0 -77
  326. package/Libraries/NewAppScreen/components/HermesBadge.js +0 -53
  327. package/Libraries/NewAppScreen/components/LearnMoreLinks.js +0 -148
  328. package/Libraries/NewAppScreen/components/ReloadInstructions.js +0 -39
  329. package/Libraries/NewAppScreen/components/ReloadInstructions.windows.js +0 -31
  330. package/Libraries/NewAppScreen/components/logo.png +0 -0
  331. package/Libraries/NewAppScreen/index.js +0 -25
  332. package/Libraries/StyleSheet/__flowtests__/StyleSheet-flowtest.js +0 -58
  333. package/Libraries/Utilities/__mocks__/BackHandler.js +0 -45
  334. package/Libraries/Utilities/__mocks__/GlobalPerformanceLogger.js +0 -16
  335. package/Libraries/Utilities/__mocks__/PixelRatio.js +0 -25
  336. package/Libraries/WebSocket/WebSocketEvent.js +0 -30
  337. package/Libraries/WebSocket/WebSocket_new.js +0 -325
  338. package/Libraries/WebSocket/WebSocket_old.js +0 -297
  339. package/Libraries/WebSocket/__mocks__/event-target-shim.js +0 -27
  340. package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +0 -30
  341. package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +0 -81
  342. package/jest/__tests__/setup-test.js +0 -18
  343. package/src/private/components/VScrollViewNativeComponents.js +0 -25
  344. package/src/private/utilities/ensureInstance.js +0 -21
  345. package/src/private/webapis/performance/specs/__mocks__/NativePerformanceMock.js +0 -267
  346. package/types/modules/LaunchScreen.d.ts +0 -18
  347. /package/src/private/{devmenu → devsupport/devmenu}/DevMenu.d.ts +0 -0
  348. /package/src/private/{debugging → devsupport/rndevtools}/FuseboxSessionObserver.js +0 -0
@@ -0,0 +1,1246 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @flow strict-local
8
+ * @format
9
+ */
10
+
11
+ import type {HostInstance} from '../../../src/private/types/HostInstance';
12
+ import type {
13
+ GestureResponderEvent,
14
+ NativeSyntheticEvent,
15
+ ScrollEvent,
16
+ KeyEvent, // Windows
17
+ MouseEvent, // Windows
18
+ } from '../../Types/CoreEventTypes';
19
+ import type {ViewProps} from '../View/ViewPropTypes';
20
+
21
+ import type {HandledKeyboardEvent} from '../View/ViewPropTypes'; // Windows
22
+
23
+ import {
24
+ type ColorValue,
25
+ type TextStyleProp,
26
+ type ViewStyleProp,
27
+ } from '../../StyleSheet/StyleSheet';
28
+
29
+ import * as React from 'react';
30
+
31
+ /**
32
+ * @see TextInputProps.onChange
33
+ */
34
+ type TextInputChangeEventData = $ReadOnly<{
35
+ eventCount: number,
36
+ target: number,
37
+ text: string,
38
+ }>;
39
+
40
+ export type TextInputChangeEvent =
41
+ NativeSyntheticEvent<TextInputChangeEventData>;
42
+
43
+ export type TextInputEvent = NativeSyntheticEvent<
44
+ $ReadOnly<{
45
+ eventCount: number,
46
+ previousText: string,
47
+ range: $ReadOnly<{
48
+ start: number,
49
+ end: number,
50
+ }>,
51
+ target: number,
52
+ text: string,
53
+ }>,
54
+ >;
55
+
56
+ type TextInputContentSizeChangeEventData = $ReadOnly<{
57
+ target: number,
58
+ contentSize: $ReadOnly<{
59
+ width: number,
60
+ height: number,
61
+ }>,
62
+ }>;
63
+
64
+ /**
65
+ * @see TextInputProps.onContentSizeChange
66
+ */
67
+ export type TextInputContentSizeChangeEvent =
68
+ NativeSyntheticEvent<TextInputContentSizeChangeEventData>;
69
+
70
+ type TargetEvent = $ReadOnly<{
71
+ target: number,
72
+ ...
73
+ }>;
74
+
75
+ type TextInputFocusEventData = TargetEvent;
76
+
77
+ /**
78
+ * @see TextInputProps.onBlur
79
+ */
80
+ export type TextInputBlurEvent = NativeSyntheticEvent<TextInputFocusEventData>;
81
+
82
+ /**
83
+ * @see TextInputProps.onFocus
84
+ */
85
+ export type TextInputFocusEvent = NativeSyntheticEvent<TextInputFocusEventData>;
86
+
87
+ export type Selection = $ReadOnly<{
88
+ start: number,
89
+ end: number,
90
+ }>;
91
+
92
+ type TextInputSelectionChangeEventData = $ReadOnly<{
93
+ ...TargetEvent,
94
+ selection: Selection,
95
+ ...
96
+ }>;
97
+
98
+ /**
99
+ * @see TextInputProps.onSelectionChange
100
+ */
101
+ export type TextInputSelectionChangeEvent =
102
+ NativeSyntheticEvent<TextInputSelectionChangeEventData>;
103
+
104
+ type TextInputKeyPressEventData = $ReadOnly<{
105
+ ...TargetEvent,
106
+ key: string,
107
+ target?: ?number,
108
+ eventCount: number,
109
+ ...
110
+ }>;
111
+
112
+ /**
113
+ * @see TextInputProps.onKeyPress
114
+ */
115
+ export type TextInputKeyPressEvent =
116
+ NativeSyntheticEvent<TextInputKeyPressEventData>;
117
+
118
+ type TextInputEndEditingEventData = $ReadOnly<{
119
+ ...TargetEvent,
120
+ eventCount: number,
121
+ text: string,
122
+ ...
123
+ }>;
124
+
125
+ /**
126
+ * @see TextInputProps.onEndEditing
127
+ */
128
+ export type TextInputEndEditingEvent =
129
+ NativeSyntheticEvent<TextInputEndEditingEventData>;
130
+
131
+ type TextInputSubmitEditingEventData = $ReadOnly<{
132
+ ...TargetEvent,
133
+ eventCount: number,
134
+ text: string,
135
+ ...
136
+ }>;
137
+
138
+ /**
139
+ * @see TextInputProps.onSubmitEditing
140
+ */
141
+ export type TextInputSubmitEditingEvent =
142
+ NativeSyntheticEvent<TextInputSubmitEditingEventData>;
143
+
144
+ export type TextInputEditingEvent =
145
+ NativeSyntheticEvent<TextInputEndEditingEventData>;
146
+
147
+ type DataDetectorTypesType =
148
+ | 'phoneNumber'
149
+ | 'link'
150
+ | 'address'
151
+ | 'calendarEvent'
152
+ | 'trackingNumber'
153
+ | 'flightNumber'
154
+ | 'lookupSuggestion'
155
+ | 'none'
156
+ | 'all';
157
+
158
+ export type KeyboardType =
159
+ | 'default'
160
+ | 'email-address'
161
+ | 'numeric'
162
+ | 'phone-pad'
163
+ | 'number-pad'
164
+ | 'decimal-pad'
165
+ | 'url';
166
+
167
+ export type KeyboardTypeIOS =
168
+ | 'ascii-capable'
169
+ | 'numbers-and-punctuation'
170
+ | 'name-phone-pad'
171
+ | 'twitter'
172
+ | 'web-search'
173
+ // iOS 10+ only
174
+ | 'ascii-capable-number-pad';
175
+
176
+ export type KeyboardTypeAndroid = 'visible-password';
177
+
178
+ export type KeyboardTypeOptions =
179
+ | KeyboardType
180
+ | KeyboardTypeIOS
181
+ | KeyboardTypeAndroid;
182
+
183
+ export type InputModeOptions =
184
+ | 'none'
185
+ | 'text'
186
+ | 'decimal'
187
+ | 'numeric'
188
+ | 'tel'
189
+ | 'search'
190
+ | 'email'
191
+ | 'url';
192
+
193
+ export type ReturnKeyType = 'done' | 'go' | 'next' | 'search' | 'send';
194
+
195
+ export type ReturnKeyTypeIOS =
196
+ | 'default'
197
+ | 'emergency-call'
198
+ | 'google'
199
+ | 'join'
200
+ | 'route'
201
+ | 'yahoo';
202
+
203
+ export type ReturnKeyTypeAndroid = 'none' | 'previous';
204
+
205
+ export type ReturnKeyTypeOptions =
206
+ | ReturnKeyType
207
+ | ReturnKeyTypeIOS
208
+ | ReturnKeyTypeAndroid;
209
+
210
+ export type SubmitBehavior = 'submit' | 'blurAndSubmit' | 'newline';
211
+
212
+ export type AutoCapitalize = 'none' | 'sentences' | 'words' | 'characters';
213
+
214
+ export type TextContentType =
215
+ | 'none'
216
+ | 'URL'
217
+ | 'addressCity'
218
+ | 'addressCityAndState'
219
+ | 'addressState'
220
+ | 'countryName'
221
+ | 'creditCardNumber'
222
+ | 'creditCardExpiration'
223
+ | 'creditCardExpirationMonth'
224
+ | 'creditCardExpirationYear'
225
+ | 'creditCardSecurityCode'
226
+ | 'creditCardType'
227
+ | 'creditCardName'
228
+ | 'creditCardGivenName'
229
+ | 'creditCardMiddleName'
230
+ | 'creditCardFamilyName'
231
+ | 'emailAddress'
232
+ | 'familyName'
233
+ | 'fullStreetAddress'
234
+ | 'givenName'
235
+ | 'jobTitle'
236
+ | 'location'
237
+ | 'middleName'
238
+ | 'name'
239
+ | 'namePrefix'
240
+ | 'nameSuffix'
241
+ | 'nickname'
242
+ | 'organizationName'
243
+ | 'postalCode'
244
+ | 'streetAddressLine1'
245
+ | 'streetAddressLine2'
246
+ | 'sublocality'
247
+ | 'telephoneNumber'
248
+ | 'username'
249
+ | 'password'
250
+ | 'newPassword'
251
+ | 'oneTimeCode'
252
+ | 'birthdate'
253
+ | 'birthdateDay'
254
+ | 'birthdateMonth'
255
+ | 'birthdateYear'
256
+ | 'cellularEID'
257
+ | 'cellularIMEI'
258
+ | 'dateTime'
259
+ | 'flightNumber'
260
+ | 'shipmentTrackingNumber';
261
+
262
+ export type EnterKeyHintTypeAndroid = 'previous';
263
+
264
+ export type EnterKeyHintTypeIOS = 'enter';
265
+
266
+ export type EnterKeyHintType = 'done' | 'go' | 'next' | 'search' | 'send';
267
+
268
+ export type EnterKeyHintTypeOptions =
269
+ | EnterKeyHintType
270
+ | EnterKeyHintTypeAndroid
271
+ | EnterKeyHintTypeIOS;
272
+
273
+ type PasswordRules = string;
274
+
275
+ export type TextInputIOSProps = $ReadOnly<{
276
+ /**
277
+ * If true, the keyboard shortcuts (undo/redo and copy buttons) are disabled. The default value is false.
278
+ * @platform ios
279
+ */
280
+ disableKeyboardShortcuts?: ?boolean,
281
+
282
+ /**
283
+ * When the clear button should appear on the right side of the text view.
284
+ * This property is supported only for single-line TextInput component.
285
+ * @platform ios
286
+ */
287
+ clearButtonMode?: ?('never' | 'while-editing' | 'unless-editing' | 'always'),
288
+
289
+ /**
290
+ * If `true`, clears the text field automatically when editing begins.
291
+ * @platform ios
292
+ */
293
+ clearTextOnFocus?: ?boolean,
294
+
295
+ /**
296
+ * Determines the types of data converted to clickable URLs in the text input.
297
+ * Only valid if `multiline={true}` and `editable={false}`.
298
+ * By default no data types are detected.
299
+ *
300
+ * You can provide one type or an array of many types.
301
+ *
302
+ * Possible values for `dataDetectorTypes` are:
303
+ *
304
+ * - `'phoneNumber'`
305
+ * - `'link'`
306
+ * - `'address'`
307
+ * - `'calendarEvent'`
308
+ * - `'none'`
309
+ * - `'all'`
310
+ *
311
+ * @platform ios
312
+ */
313
+ dataDetectorTypes?:
314
+ | ?DataDetectorTypesType
315
+ | $ReadOnlyArray<DataDetectorTypesType>,
316
+
317
+ /**
318
+ * If `true`, the keyboard disables the return key when there is no text and
319
+ * automatically enables it when there is text. The default value is `false`.
320
+ * @platform ios
321
+ */
322
+ enablesReturnKeyAutomatically?: ?boolean,
323
+
324
+ /**
325
+ * An optional identifier which links a custom InputAccessoryView to
326
+ * this text input. The InputAccessoryView is rendered above the
327
+ * keyboard when this text input is focused.
328
+ * @platform ios
329
+ */
330
+ inputAccessoryViewID?: ?string,
331
+
332
+ /**
333
+ * An optional label that overrides the default input accessory view button label.
334
+ * @platform ios
335
+ */
336
+ inputAccessoryViewButtonLabel?: ?string,
337
+
338
+ /**
339
+ * Determines the color of the keyboard.
340
+ * @platform ios
341
+ */
342
+ keyboardAppearance?: ?('default' | 'light' | 'dark'),
343
+
344
+ /**
345
+ * Provide rules for your password.
346
+ * For example, say you want to require a password with at least eight characters consisting of a mix of uppercase and lowercase letters, at least one number, and at most two consecutive characters.
347
+ * "required: upper; required: lower; required: digit; max-consecutive: 2; minlength: 8;"
348
+ * @platform ios
349
+ */
350
+ passwordRules?: ?PasswordRules,
351
+
352
+ /*
353
+ * If `true`, allows TextInput to pass touch events to the parent component.
354
+ * This allows components to be swipeable from the TextInput on iOS,
355
+ * as is the case on Android by default.
356
+ * If `false`, TextInput always asks to handle the input (except when disabled).
357
+ * @platform ios
358
+ */
359
+ rejectResponderTermination?: ?boolean,
360
+
361
+ /**
362
+ * If `false`, scrolling of the text view will be disabled.
363
+ * The default value is `true`. Does only work with 'multiline={true}'.
364
+ * @platform ios
365
+ */
366
+ scrollEnabled?: ?boolean,
367
+
368
+ /**
369
+ * If `false`, disables spell-check style (i.e. red underlines).
370
+ * The default value is inherited from `autoCorrect`.
371
+ * @platform ios
372
+ */
373
+ spellCheck?: ?boolean,
374
+
375
+ /**
376
+ * Give the keyboard and the system information about the
377
+ * expected semantic meaning for the content that users enter.
378
+ * @platform ios
379
+ */
380
+ textContentType?: ?TextContentType,
381
+
382
+ /**
383
+ * Set line break strategy on iOS.
384
+ * @platform ios
385
+ */
386
+ lineBreakStrategyIOS?: ?('none' | 'standard' | 'hangul-word' | 'push-out'),
387
+
388
+ /**
389
+ * Set line break mode on iOS.
390
+ * @platform ios
391
+ */
392
+ lineBreakModeIOS?: ?(
393
+ | 'wordWrapping'
394
+ | 'char'
395
+ | 'clip'
396
+ | 'head'
397
+ | 'middle'
398
+ | 'tail'
399
+ ),
400
+
401
+ /**
402
+ * If `false`, the iOS system will not insert an extra space after a paste operation
403
+ * neither delete one or two spaces after a cut or delete operation.
404
+ *
405
+ * The default value is `true`.
406
+ *
407
+ * @platform ios
408
+ */
409
+ smartInsertDelete?: ?boolean,
410
+ }>;
411
+
412
+ export type TextInputAndroidProps = $ReadOnly<{
413
+ /**
414
+ * When provided it will set the color of the cursor (or "caret") in the component.
415
+ * Unlike the behavior of `selectionColor` the cursor color will be set independently
416
+ * from the color of the text selection box.
417
+ * @platform android
418
+ */
419
+ cursorColor?: ?ColorValue,
420
+
421
+ /**
422
+ * When provided it will set the color of the selection handles when highlighting text.
423
+ * Unlike the behavior of `selectionColor` the handle color will be set independently
424
+ * from the color of the text selection box.
425
+ * @platform android
426
+ */
427
+ selectionHandleColor?: ?ColorValue,
428
+
429
+ /**
430
+ * When `false`, if there is a small amount of space available around a text input
431
+ * (e.g. landscape orientation on a phone), the OS may choose to have the user edit
432
+ * the text inside of a full screen text input mode. When `true`, this feature is
433
+ * disabled and users will always edit the text directly inside of the text input.
434
+ * Defaults to `false`.
435
+ * @platform android
436
+ */
437
+ disableFullscreenUI?: ?boolean,
438
+
439
+ /**
440
+ * Determines whether the individual fields in your app should be included in a
441
+ * view structure for autofill purposes on Android API Level 26+. Defaults to auto.
442
+ * To disable auto complete, use `off`.
443
+ *
444
+ * *Android Only*
445
+ *
446
+ * The following values work on Android only:
447
+ *
448
+ * - `auto` - let Android decide
449
+ * - `no` - not important for autofill
450
+ * - `noExcludeDescendants` - this view and its children aren't important for autofill
451
+ * - `yes` - is important for autofill
452
+ * - `yesExcludeDescendants` - this view is important for autofill but its children aren't
453
+ */
454
+ importantForAutofill?: ?(
455
+ | 'auto'
456
+ | 'no'
457
+ | 'noExcludeDescendants'
458
+ | 'yes'
459
+ | 'yesExcludeDescendants'
460
+ ),
461
+
462
+ /**
463
+ * If defined, the provided image resource will be rendered on the left.
464
+ * The image resource must be inside `/android/app/src/main/res/drawable` and referenced
465
+ * like
466
+ * ```
467
+ * <TextInput
468
+ * inlineImageLeft='search_icon'
469
+ * />
470
+ * ```
471
+ * @platform android
472
+ */
473
+ inlineImageLeft?: ?string,
474
+
475
+ /**
476
+ * Padding between the inline image, if any, and the text input itself.
477
+ * @platform android
478
+ */
479
+ inlineImagePadding?: ?number,
480
+
481
+ /**
482
+ * Sets the number of lines for a `TextInput`. Use it with multiline set to
483
+ * `true` to be able to fill the lines.
484
+ * @platform android
485
+ */
486
+ numberOfLines?: ?number,
487
+
488
+ /**
489
+ * Sets the return key to the label. Use it instead of `returnKeyType`.
490
+ * @platform android
491
+ */
492
+ returnKeyLabel?: ?string,
493
+
494
+ /**
495
+ * Sets the number of rows for a `TextInput`. Use it with multiline set to
496
+ * `true` to be able to fill the lines.
497
+ * @platform android
498
+ */
499
+ rows?: ?number,
500
+
501
+ /**
502
+ * When `false`, it will prevent the soft keyboard from showing when the field is focused.
503
+ * Defaults to `true`.
504
+ */
505
+ showSoftInputOnFocus?: ?boolean,
506
+
507
+ /**
508
+ * Set text break strategy on Android API Level 23+, possible values are `simple`, `highQuality`, `balanced`
509
+ * The default value is `simple`.
510
+ * @platform android
511
+ */
512
+ textBreakStrategy?: ?('simple' | 'highQuality' | 'balanced'),
513
+
514
+ /**
515
+ * The color of the `TextInput` underline.
516
+ * @platform android
517
+ */
518
+ underlineColorAndroid?: ?ColorValue,
519
+ }>;
520
+
521
+ // [Windows
522
+
523
+ type SubmitKeyEvent = $ReadOnly<{|
524
+ altKey?: ?boolean,
525
+ ctrlKey?: ?boolean,
526
+ metaKey?: ?boolean,
527
+ shiftKey?: ?boolean,
528
+ code: string,
529
+ |}>;
530
+
531
+ export type TextInputWindowsProps = $ReadOnly<{|
532
+ /**
533
+ * If `true`, clears the text field synchronously before `onSubmitEditing` is emitted.
534
+ * @platform windows
535
+ */
536
+ clearTextOnSubmit?: ?boolean,
537
+
538
+ /**
539
+ * Configures keys that can be used to submit editing for the TextInput.
540
+ * @platform windows
541
+ */
542
+ submitKeyEvents?: ?$ReadOnlyArray<SubmitKeyEvent>,
543
+
544
+ /**
545
+ * Specifies the Tooltip for the view
546
+ */
547
+ tooltip?: string,
548
+
549
+ /**
550
+ * Indicates the TabIndex to use for this view
551
+ */
552
+ tabIndex?: number,
553
+
554
+ /**
555
+ * Specifies if the control should show System focus visuals
556
+ */
557
+ enableFocusRing?: boolean,
558
+
559
+ /**
560
+ * Event fired when the mouse leaves the view
561
+ */
562
+ onMouseLeave?: (args: MouseEvent) => void,
563
+
564
+ /**
565
+ * Event fired when the mouse enters the view
566
+ */
567
+ onMouseEnter?: (args: MouseEvent) => void,
568
+
569
+ onKeyDown?: (args: KeyEvent) => void,
570
+ onKeyDownCapture?: (args: KeyEvent) => void,
571
+ onKeyUp?: (args: KeyEvent) => void,
572
+ onKeyUpCapture?: (args: KeyEvent) => void,
573
+
574
+ keyDownEvents?: ?$ReadOnlyArray<HandledKeyboardEvent>,
575
+ keyUpEvents?: ?$ReadOnlyArray<HandledKeyboardEvent>,
576
+ |}>;
577
+
578
+ // Windows]
579
+
580
+ type TextInputBaseProps = $ReadOnly<{
581
+ /**
582
+ * When provided, the text input will only accept drag and drop events for the specified
583
+ * types. If null or not provided, the text input will accept all types of drag and drop events.
584
+ * An empty array will accept no drag and drop events.
585
+ * Defaults to null.
586
+ *
587
+ * On Android, types must correspond to MIME types from ClipData:
588
+ * https://developer.android.com/reference/android/content/ClipData
589
+ * (e.g. "text/plain" or "image/*")
590
+ *
591
+ * On iOS, types must correspond to UTIs:
592
+ * https://developer.apple.com/documentation/uniformtypeidentifiers
593
+ * (e.g. "public.plain-text" or "public.image")
594
+ *
595
+ * *NOTE*: This prop is experimental and its API may change in the future. Use at your own risk.
596
+ *
597
+ * @see https://developer.android.com/reference/android/content/ClipData for more information on MIME types
598
+ */
599
+ experimental_acceptDragAndDropTypes?: ?$ReadOnlyArray<string>,
600
+ /**
601
+ * String to be read by screenreaders to indicate an error state. The acceptable parameters
602
+ * of accessibilityErrorMessage is a string. Setting accessibilityInvalid to true activates
603
+ * the error message. Setting accessibilityInvalid to false removes the error message.
604
+ */
605
+ accessibilityErrorMessage?: ?Stringish,
606
+ accessibilityInvalid?: ?boolean,
607
+
608
+ /**
609
+ * Can tell `TextInput` to automatically capitalize certain characters.
610
+ *
611
+ * - `characters`: all characters.
612
+ * - `words`: first letter of each word.
613
+ * - `sentences`: first letter of each sentence (*default*).
614
+ * - `none`: don't auto capitalize anything.
615
+ */
616
+ autoCapitalize?: ?AutoCapitalize,
617
+
618
+ /**
619
+ * Specifies autocomplete hints for the system, so it can provide autofill.
620
+ * On Android, the system will always attempt to offer autofill by using heuristics to identify the type of content.
621
+ * To disable autocomplete, set autoComplete to off.
622
+ *
623
+ * The following values work across platforms:
624
+ *
625
+ * - `additional-name`
626
+ * - `address-line1`
627
+ * - `address-line2`
628
+ * - `birthdate-day` (iOS 17+)
629
+ * - `birthdate-full` (iOS 17+)
630
+ * - `birthdate-month` (iOS 17+)
631
+ * - `birthdate-year` (iOS 17+)
632
+ * - `cc-number`
633
+ * - `cc-csc` (iOS 17+)
634
+ * - `cc-exp` (iOS 17+)
635
+ * - `cc-exp-day` (iOS 17+)
636
+ * - `cc-exp-month` (iOS 17+)
637
+ * - `cc-exp-year` (iOS 17+)
638
+ * - `country`
639
+ * - `current-password`
640
+ * - `email`
641
+ * - `family-name`
642
+ * - `given-name`
643
+ * - `honorific-prefix`
644
+ * - `honorific-suffix`
645
+ * - `name`
646
+ * - `new-password`
647
+ * - `off`
648
+ * - `one-time-code`
649
+ * - `postal-code`
650
+ * - `street-address`
651
+ * - `tel`
652
+ * - `username`
653
+ *
654
+ * The following values work on iOS only:
655
+ *
656
+ * - `cc-name` (iOS 17+)
657
+ * - `cc-given-name` (iOS 17+)
658
+ * - `cc-middle-name` (iOS 17+)
659
+ * - `cc-family-name` (iOS 17+)
660
+ * - `cc-type` (iOS 17+)
661
+ * - `nickname`
662
+ * - `organization`
663
+ * - `organization-title`
664
+ * - `url`
665
+ *
666
+ * The following values work on Android only:
667
+ *
668
+ * - `gender`
669
+ * - `name-family`
670
+ * - `name-given`
671
+ * - `name-middle`
672
+ * - `name-middle-initial`
673
+ * - `name-prefix`
674
+ * - `name-suffix`
675
+ * - `password`
676
+ * - `password-new`
677
+ * - `postal-address`
678
+ * - `postal-address-country`
679
+ * - `postal-address-extended`
680
+ * - `postal-address-extended-postal-code`
681
+ * - `postal-address-locality`
682
+ * - `postal-address-region`
683
+ * - `sms-otp`
684
+ * - `tel-country-code`
685
+ * - `tel-national`
686
+ * - `tel-device`
687
+ * - `username-new`
688
+ */
689
+ autoComplete?: ?(
690
+ | 'additional-name'
691
+ | 'address-line1'
692
+ | 'address-line2'
693
+ | 'birthdate-day'
694
+ | 'birthdate-full'
695
+ | 'birthdate-month'
696
+ | 'birthdate-year'
697
+ | 'cc-csc'
698
+ | 'cc-exp'
699
+ | 'cc-exp-day'
700
+ | 'cc-exp-month'
701
+ | 'cc-exp-year'
702
+ | 'cc-number'
703
+ | 'cc-name'
704
+ | 'cc-given-name'
705
+ | 'cc-middle-name'
706
+ | 'cc-family-name'
707
+ | 'cc-type'
708
+ | 'country'
709
+ | 'current-password'
710
+ | 'email'
711
+ | 'family-name'
712
+ | 'gender'
713
+ | 'given-name'
714
+ | 'honorific-prefix'
715
+ | 'honorific-suffix'
716
+ | 'name'
717
+ | 'name-family'
718
+ | 'name-given'
719
+ | 'name-middle'
720
+ | 'name-middle-initial'
721
+ | 'name-prefix'
722
+ | 'name-suffix'
723
+ | 'new-password'
724
+ | 'nickname'
725
+ | 'one-time-code'
726
+ | 'organization'
727
+ | 'organization-title'
728
+ | 'password'
729
+ | 'password-new'
730
+ | 'postal-address'
731
+ | 'postal-address-country'
732
+ | 'postal-address-extended'
733
+ | 'postal-address-extended-postal-code'
734
+ | 'postal-address-locality'
735
+ | 'postal-address-region'
736
+ | 'postal-code'
737
+ | 'street-address'
738
+ | 'sms-otp'
739
+ | 'tel'
740
+ | 'tel-country-code'
741
+ | 'tel-national'
742
+ | 'tel-device'
743
+ | 'url'
744
+ | 'username'
745
+ | 'username-new'
746
+ | 'off'
747
+ ),
748
+
749
+ /**
750
+ * If `false`, disables auto-correct. The default value is `true`.
751
+ */
752
+ autoCorrect?: ?boolean,
753
+
754
+ /**
755
+ * If `true`, focuses the input on `componentDidMount`.
756
+ * The default value is `false`.
757
+ */
758
+ autoFocus?: ?boolean,
759
+
760
+ /**
761
+ * Specifies whether fonts should scale to respect Text Size accessibility settings. The
762
+ * default is `true`.
763
+ */
764
+ allowFontScaling?: ?boolean,
765
+
766
+ /**
767
+ * If `true`, caret is hidden. The default value is `false`.
768
+ *
769
+ * On Android devices manufactured by Xiaomi with Android Q,
770
+ * when keyboardType equals 'email-address'this will be set
771
+ * in native to 'true' to prevent a system related crash. This
772
+ * will cause cursor to be disabled as a side-effect.
773
+ *
774
+ */
775
+ caretHidden?: ?boolean,
776
+
777
+ /*
778
+ * If `true`, contextMenuHidden is hidden. The default value is `false`.
779
+ */
780
+ contextMenuHidden?: ?boolean,
781
+
782
+ /**
783
+ * Provides an initial value that will change when the user starts typing.
784
+ * Useful for simple use-cases where you do not want to deal with listening
785
+ * to events and updating the value prop to keep the controlled state in sync.
786
+ */
787
+ defaultValue?: ?Stringish,
788
+
789
+ /**
790
+ * If `false`, text is not editable. The default value is `true`.
791
+ */
792
+ editable?: ?boolean,
793
+
794
+ forwardedRef?: ?React.RefSetter<TextInputInstance>,
795
+
796
+ /**
797
+ * `enterKeyHint` defines what action label (or icon) to present for the enter key on virtual keyboards.
798
+ *
799
+ * The following values is supported:
800
+ *
801
+ * - `enter`
802
+ * - `done`
803
+ * - `go`
804
+ * - `next`
805
+ * - `previous`
806
+ * - `search`
807
+ * - `send`
808
+ */
809
+ enterKeyHint?: ?EnterKeyHintTypeOptions,
810
+
811
+ /**
812
+ * `inputMode` works like the `inputmode` attribute in HTML, it determines which
813
+ * keyboard to open, e.g.`numeric` and has precedence over keyboardType
814
+ *
815
+ * Support the following values:
816
+ *
817
+ * - `none`
818
+ * - `text`
819
+ * - `decimal`
820
+ * - `numeric`
821
+ * - `tel`
822
+ * - `search`
823
+ * - `email`
824
+ * - `url`
825
+ */
826
+ inputMode?: ?InputModeOptions,
827
+
828
+ /**
829
+ * Determines which keyboard to open, e.g.`numeric`.
830
+ *
831
+ * The following values work across platforms:
832
+ *
833
+ * - `default`
834
+ * - `numeric`
835
+ * - `number-pad`
836
+ * - `decimal-pad`
837
+ * - `email-address`
838
+ * - `phone-pad`
839
+ * - `url`
840
+ *
841
+ * *iOS Only*
842
+ *
843
+ * The following values work on iOS only:
844
+ *
845
+ * - `ascii-capable`
846
+ * - `numbers-and-punctuation`
847
+ * - `name-phone-pad`
848
+ * - `twitter`
849
+ * - `web-search`
850
+ *
851
+ * *Android Only*
852
+ *
853
+ * The following values work on Android only:
854
+ *
855
+ * - `visible-password`
856
+ *
857
+ */
858
+ keyboardType?: ?KeyboardTypeOptions,
859
+
860
+ /**
861
+ * Specifies largest possible scale a font can reach when `allowFontScaling` is enabled.
862
+ * Possible values:
863
+ * `null/undefined` (default): inherit from the parent node or the global default (0)
864
+ * `0`: no max, ignore parent/global default
865
+ * `>= 1`: sets the maxFontSizeMultiplier of this node to this value
866
+ */
867
+ maxFontSizeMultiplier?: ?number,
868
+
869
+ /**
870
+ * Limits the maximum number of characters that can be entered. Use this
871
+ * instead of implementing the logic in JS to avoid flicker.
872
+ */
873
+ maxLength?: ?number,
874
+
875
+ /**
876
+ * If `true`, the text input can be multiple lines.
877
+ * The default value is `false`.
878
+ */
879
+ multiline?: ?boolean,
880
+
881
+ /**
882
+ * Callback that is called when the text input is blurred.
883
+ */
884
+ onBlur?: ?(e: TextInputBlurEvent) => mixed,
885
+
886
+ /**
887
+ * Callback that is called when the text input's text changes.
888
+ */
889
+ onChange?: ?(e: TextInputChangeEvent) => mixed,
890
+
891
+ /**
892
+ * Callback that is called when the text input's text changes.
893
+ * Changed text is passed as an argument to the callback handler.
894
+ */
895
+ onChangeText?: ?(text: string) => mixed,
896
+
897
+ /**
898
+ * Callback that is called when the text input's content size changes.
899
+ * This will be called with
900
+ * `{ nativeEvent: { contentSize: { width, height } } }`.
901
+ *
902
+ * Only called for multiline text inputs.
903
+ */
904
+ onContentSizeChange?: ?(e: TextInputContentSizeChangeEvent) => mixed,
905
+
906
+ /**
907
+ * Callback that is called when text input ends.
908
+ */
909
+ onEndEditing?: ?(e: TextInputEndEditingEvent) => mixed,
910
+
911
+ /**
912
+ * Callback that is called when the text input is focused.
913
+ */
914
+ onFocus?: ?(e: TextInputFocusEvent) => mixed,
915
+
916
+ /**
917
+ * Callback that is called when a key is pressed.
918
+ * This will be called with `{ nativeEvent: { key: keyValue } }`
919
+ * where `keyValue` is `'Enter'` or `'Backspace'` for respective keys and
920
+ * the typed-in character otherwise including `' '` for space.
921
+ * Fires before `onChange` callbacks.
922
+ */
923
+ onKeyPress?: ?(e: TextInputKeyPressEvent) => mixed,
924
+
925
+ /**
926
+ * Called when a single tap gesture is detected.
927
+ */
928
+ onPress?: ?(event: GestureResponderEvent) => mixed,
929
+
930
+ /**
931
+ * Called when a touch is engaged.
932
+ */
933
+ onPressIn?: ?(event: GestureResponderEvent) => mixed,
934
+
935
+ /**
936
+ * Called when a touch is released.
937
+ */
938
+ onPressOut?: ?(event: GestureResponderEvent) => mixed,
939
+
940
+ /**
941
+ * Callback that is called when the text input selection is changed.
942
+ * This will be called with
943
+ * `{ nativeEvent: { selection: { start, end } } }`.
944
+ */
945
+ onSelectionChange?: ?(e: TextInputSelectionChangeEvent) => mixed,
946
+
947
+ /**
948
+ * Callback that is called when the text input's submit button is pressed.
949
+ * Invalid if `multiline={true}` is specified.
950
+ */
951
+ onSubmitEditing?: ?(e: TextInputSubmitEditingEvent) => mixed,
952
+
953
+ /**
954
+ * Invoked on content scroll with `{ nativeEvent: { contentOffset: { x, y } } }`.
955
+ * May also contain other properties from ScrollEvent but on Android contentSize
956
+ * is not provided for performance reasons.
957
+ */
958
+ onScroll?: ?(e: ScrollEvent) => mixed,
959
+
960
+ /**
961
+ * The string that will be rendered before text input has been entered.
962
+ */
963
+ placeholder?: ?Stringish,
964
+
965
+ /**
966
+ * The text color of the placeholder string.
967
+ */
968
+ placeholderTextColor?: ?ColorValue,
969
+
970
+ /** `readOnly` works like the `readonly` attribute in HTML.
971
+ * If `true`, text is not editable. The default value is `false`.
972
+ * See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly
973
+ * for more details.
974
+ */
975
+ readOnly?: ?boolean,
976
+
977
+ /**
978
+ * Determines how the return key should look. On Android you can also use
979
+ * `returnKeyLabel`.
980
+ *
981
+ * *Cross platform*
982
+ *
983
+ * The following values work across platforms:
984
+ *
985
+ * - `done`
986
+ * - `go`
987
+ * - `next`
988
+ * - `search`
989
+ * - `send`
990
+ *
991
+ * *Android Only*
992
+ *
993
+ * The following values work on Android only:
994
+ *
995
+ * - `none`
996
+ * - `previous`
997
+ *
998
+ * *iOS Only*
999
+ *
1000
+ * The following values work on iOS only:
1001
+ *
1002
+ * - `default`
1003
+ * - `emergency-call`
1004
+ * - `google`
1005
+ * - `join`
1006
+ * - `route`
1007
+ * - `yahoo`
1008
+ */
1009
+ returnKeyType?: ?ReturnKeyTypeOptions,
1010
+
1011
+ /**
1012
+ * If `true`, the text input obscures the text entered so that sensitive text
1013
+ * like passwords stay secure. The default value is `false`. Does not work with 'multiline={true}'.
1014
+ */
1015
+ secureTextEntry?: ?boolean,
1016
+
1017
+ /**
1018
+ * The start and end of the text input's selection. Set start and end to
1019
+ * the same value to position the cursor.
1020
+ */
1021
+ selection?: ?$ReadOnly<{
1022
+ start: number,
1023
+ end?: ?number,
1024
+ }>,
1025
+
1026
+ /**
1027
+ * The highlight and cursor color of the text input.
1028
+ */
1029
+ selectionColor?: ?ColorValue,
1030
+
1031
+ /**
1032
+ * If `true`, all text will automatically be selected on focus.
1033
+ */
1034
+ selectTextOnFocus?: ?boolean,
1035
+
1036
+ /**
1037
+ * If `true`, the text field will blur when submitted.
1038
+ * The default value is true for single-line fields and false for
1039
+ * multiline fields. Note that for multiline fields, setting `blurOnSubmit`
1040
+ * to `true` means that pressing return will blur the field and trigger the
1041
+ * `onSubmitEditing` event instead of inserting a newline into the field.
1042
+ *
1043
+ * @deprecated
1044
+ * Note that `submitBehavior` now takes the place of `blurOnSubmit` and will
1045
+ * override any behavior defined by `blurOnSubmit`.
1046
+ * @see submitBehavior
1047
+ */
1048
+ blurOnSubmit?: ?boolean,
1049
+
1050
+ /**
1051
+ * When the return key is pressed,
1052
+ *
1053
+ * For single line inputs:
1054
+ *
1055
+ * - `'newline`' defaults to `'blurAndSubmit'`
1056
+ * - `undefined` defaults to `'blurAndSubmit'`
1057
+ *
1058
+ * For multiline inputs:
1059
+ *
1060
+ * - `'newline'` adds a newline
1061
+ * - `undefined` defaults to `'newline'`
1062
+ *
1063
+ * For both single line and multiline inputs:
1064
+ *
1065
+ * - `'submit'` will only send a submit event and not blur the input
1066
+ * - `'blurAndSubmit`' will both blur the input and send a submit event
1067
+ */
1068
+ submitBehavior?: ?SubmitBehavior,
1069
+
1070
+ /**
1071
+ * Note that not all Text styles are supported, an incomplete list of what is not supported includes:
1072
+ *
1073
+ * - `borderLeftWidth`
1074
+ * - `borderTopWidth`
1075
+ * - `borderRightWidth`
1076
+ * - `borderBottomWidth`
1077
+ * - `borderTopLeftRadius`
1078
+ * - `borderTopRightRadius`
1079
+ * - `borderBottomRightRadius`
1080
+ * - `borderBottomLeftRadius`
1081
+ *
1082
+ * see [Issue#7070](https://github.com/facebook/react-native/issues/7070)
1083
+ * for more detail.
1084
+ *
1085
+ * [Styles](docs/style.html)
1086
+ */
1087
+ style?: ?TextStyleProp,
1088
+
1089
+ /**
1090
+ * The value to show for the text input. `TextInput` is a controlled
1091
+ * component, which means the native value will be forced to match this
1092
+ * value prop if provided. For most uses, this works great, but in some
1093
+ * cases this may cause flickering - one common cause is preventing edits
1094
+ * by keeping value the same. In addition to simply setting the same value,
1095
+ * either set `editable={false}`, or set/update `maxLength` to prevent
1096
+ * unwanted edits without flicker.
1097
+ */
1098
+ value?: ?Stringish,
1099
+
1100
+ /**
1101
+ * Align the input text to the left, center, or right sides of the input field.
1102
+ */
1103
+ textAlign?: ?('left' | 'center' | 'right'),
1104
+ }>;
1105
+
1106
+ export type TextInputProps = $ReadOnly<{
1107
+ ...Omit<ViewProps, 'style'>,
1108
+ ...TextInputIOSProps,
1109
+ ...TextInputAndroidProps,
1110
+ ...TextInputBaseProps,
1111
+ ...TextInputWindowsProps, // [Windows]
1112
+ }>;
1113
+
1114
+ export interface TextInputInstance extends HostInstance {
1115
+ +clear: () => void;
1116
+ +isFocused: () => boolean;
1117
+ +getNativeRef: () => ?HostInstance;
1118
+ +setSelection: (start: number, end: number) => void;
1119
+ }
1120
+
1121
+ /**
1122
+ * A foundational component for inputting text into the app via a
1123
+ * keyboard. Props provide configurability for several features, such as
1124
+ * auto-correction, auto-capitalization, placeholder text, and different keyboard
1125
+ * types, such as a numeric keypad.
1126
+ *
1127
+ * The simplest use case is to plop down a `TextInput` and subscribe to the
1128
+ * `onChangeText` events to read the user input. There are also other events,
1129
+ * such as `onSubmitEditing` and `onFocus` that can be subscribed to. A simple
1130
+ * example:
1131
+ *
1132
+ * ```ReactNativeWebPlayer
1133
+ * import React, { Component } from 'react';
1134
+ * import { AppRegistry, TextInput } from 'react-native';
1135
+ *
1136
+ * export default class UselessTextInput extends Component {
1137
+ * constructor(props) {
1138
+ * super(props);
1139
+ * this.state = { text: 'Useless Placeholder' };
1140
+ * }
1141
+ *
1142
+ * render() {
1143
+ * return (
1144
+ * <TextInput
1145
+ * style={{height: 40, borderColor: 'gray', borderWidth: 1}}
1146
+ * onChangeText={(text) => this.setState({text})}
1147
+ * value={this.state.text}
1148
+ * />
1149
+ * );
1150
+ * }
1151
+ * }
1152
+ *
1153
+ * // skip this line if using Create React Native App
1154
+ * AppRegistry.registerComponent('AwesomeProject', () => UselessTextInput);
1155
+ * ```
1156
+ *
1157
+ * Two methods exposed via the native element are .focus() and .blur() that
1158
+ * will focus or blur the TextInput programmatically.
1159
+ *
1160
+ * Note that some props are only available with `multiline={true/false}`.
1161
+ * Additionally, border styles that apply to only one side of the element
1162
+ * (e.g., `borderBottomColor`, `borderLeftWidth`, etc.) will not be applied if
1163
+ * `multiline=false`. To achieve the same effect, you can wrap your `TextInput`
1164
+ * in a `View`:
1165
+ *
1166
+ * ```ReactNativeWebPlayer
1167
+ * import React, { Component } from 'react';
1168
+ * import { AppRegistry, View, TextInput } from 'react-native';
1169
+ *
1170
+ * class UselessTextInput extends Component {
1171
+ * render() {
1172
+ * return (
1173
+ * <TextInput
1174
+ * {...this.props} // Inherit any props passed to it; e.g., multiline, numberOfLines below
1175
+ * editable = {true}
1176
+ * maxLength = {40}
1177
+ * />
1178
+ * );
1179
+ * }
1180
+ * }
1181
+ *
1182
+ * export default class UselessTextInputMultiline extends Component {
1183
+ * constructor(props) {
1184
+ * super(props);
1185
+ * this.state = {
1186
+ * text: 'Useless Multiline Placeholder',
1187
+ * };
1188
+ * }
1189
+ *
1190
+ * // If you type something in the text box that is a color, the background will change to that
1191
+ * // color.
1192
+ * render() {
1193
+ * return (
1194
+ * <View style={{
1195
+ * backgroundColor: this.state.text,
1196
+ * borderBottomColor: '#000000',
1197
+ * borderBottomWidth: 1 }}
1198
+ * >
1199
+ * <UselessTextInput
1200
+ * multiline = {true}
1201
+ * numberOfLines = {4}
1202
+ * onChangeText={(text) => this.setState({text})}
1203
+ * value={this.state.text}
1204
+ * />
1205
+ * </View>
1206
+ * );
1207
+ * }
1208
+ * }
1209
+ *
1210
+ * // skip these lines if using Create React Native App
1211
+ * AppRegistry.registerComponent(
1212
+ * 'AwesomeProject',
1213
+ * () => UselessTextInputMultiline
1214
+ * );
1215
+ * ```
1216
+ *
1217
+ * `TextInput` has by default a border at the bottom of its view. This border
1218
+ * has its padding set by the background image provided by the system, and it
1219
+ * cannot be changed. Solutions to avoid this is to either not set height
1220
+ * explicitly, case in which the system will take care of displaying the border
1221
+ * in the correct position, or to not display the border by setting
1222
+ * `underlineColorAndroid` to transparent.
1223
+ *
1224
+ * Note that on Android performing text selection in input can change
1225
+ * app's activity `windowSoftInputMode` param to `adjustResize`.
1226
+ * This may cause issues with components that have position: 'absolute'
1227
+ * while keyboard is active. To avoid this behavior either specify `windowSoftInputMode`
1228
+ * in AndroidManifest.xml ( https://developer.android.com/guide/topics/manifest/activity-element.html )
1229
+ * or control this param programmatically with native code.
1230
+ *
1231
+ */
1232
+ type InternalTextInput = component(
1233
+ ref?: React.RefSetter<TextInputInstance>,
1234
+ ...TextInputProps
1235
+ );
1236
+
1237
+ export type TextInputComponentStatics = $ReadOnly<{
1238
+ State: $ReadOnly<{
1239
+ currentlyFocusedInput: () => ?HostInstance,
1240
+ currentlyFocusedField: () => ?number,
1241
+ focusTextInput: (textField: ?HostInstance) => void,
1242
+ blurTextInput: (textField: ?HostInstance) => void,
1243
+ }>,
1244
+ }>;
1245
+
1246
+ export type TextInputType = InternalTextInput & TextInputComponentStatics;