react-native-tvos 0.86.2-0 → 0.86.3-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (264) hide show
  1. package/Libraries/Components/TV/TVFocusGuideView.js +31 -0
  2. package/Libraries/Components/TV/useFocusEnterLeave.js +112 -0
  3. package/Libraries/Core/ReactNativeVersion.js +1 -1
  4. package/README.md +2 -0
  5. package/React/Base/RCTVersion.m +1 -1
  6. package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +30 -0
  7. package/ReactAndroid/gradle.properties +1 -1
  8. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.kt +10 -1
  9. package/ReactAndroid/src/main/java/com/facebook/react/modules/intent/IntentModule.kt +7 -3
  10. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
  11. package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
  12. package/ReactCommon/react/nativemodule/dom/NativeDOM.cpp +10 -4
  13. package/ReactCommon/react/renderer/core/EventEmitter.cpp +20 -4
  14. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm +1 -1
  15. package/ReactCommon/yoga/Yoga.podspec +1 -1
  16. package/package.json +10 -10
  17. package/sdks/.hermesv1version +1 -1
  18. package/sdks/hermes-engine/hermes-engine.podspec +6 -1
  19. package/sdks/hermes-engine/version.properties +1 -1
  20. package/types/public/ReactNativeTVTypes.d.ts +12 -1
  21. package/types_generated/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts +101 -0
  22. package/types_generated/Libraries/Alert/Alert.d.ts +55 -0
  23. package/types_generated/Libraries/Animated/Animated.d.ts +14 -0
  24. package/types_generated/Libraries/Animated/AnimatedEvent.d.ts +30 -0
  25. package/types_generated/Libraries/Animated/AnimatedExports.d.ts +191 -0
  26. package/types_generated/Libraries/Animated/AnimatedImplementation.d.ts +128 -0
  27. package/types_generated/Libraries/Animated/AnimatedPlatformConfig.d.ts +13 -0
  28. package/types_generated/Libraries/Animated/Easing.d.ts +171 -0
  29. package/types_generated/Libraries/Animated/animations/Animation.d.ts +35 -0
  30. package/types_generated/Libraries/Animated/animations/DecayAnimation.d.ts +42 -0
  31. package/types_generated/Libraries/Animated/animations/SpringAnimation.d.ts +130 -0
  32. package/types_generated/Libraries/Animated/animations/TimingAnimation.d.ts +54 -0
  33. package/types_generated/Libraries/Animated/components/AnimatedFlatList.d.ts +22 -0
  34. package/types_generated/Libraries/Animated/components/AnimatedImage.d.ts +18 -0
  35. package/types_generated/Libraries/Animated/components/AnimatedScrollView.d.ts +23 -0
  36. package/types_generated/Libraries/Animated/components/AnimatedSectionList.d.ts +22 -0
  37. package/types_generated/Libraries/Animated/components/AnimatedText.d.ts +18 -0
  38. package/types_generated/Libraries/Animated/components/AnimatedView.d.ts +19 -0
  39. package/types_generated/Libraries/Animated/createAnimatedComponent.d.ts +44 -0
  40. package/types_generated/Libraries/Animated/nodes/AnimatedAddition.d.ts +22 -0
  41. package/types_generated/Libraries/Animated/nodes/AnimatedColor.d.ts +80 -0
  42. package/types_generated/Libraries/Animated/nodes/AnimatedDiffClamp.d.ts +22 -0
  43. package/types_generated/Libraries/Animated/nodes/AnimatedDivision.d.ts +22 -0
  44. package/types_generated/Libraries/Animated/nodes/AnimatedInterpolation.d.ts +38 -0
  45. package/types_generated/Libraries/Animated/nodes/AnimatedModulo.d.ts +22 -0
  46. package/types_generated/Libraries/Animated/nodes/AnimatedMultiplication.d.ts +22 -0
  47. package/types_generated/Libraries/Animated/nodes/AnimatedNode.d.ts +47 -0
  48. package/types_generated/Libraries/Animated/nodes/AnimatedProps.d.ts +30 -0
  49. package/types_generated/Libraries/Animated/nodes/AnimatedStyle.d.ts +32 -0
  50. package/types_generated/Libraries/Animated/nodes/AnimatedSubtraction.d.ts +22 -0
  51. package/types_generated/Libraries/Animated/nodes/AnimatedTracking.d.ts +21 -0
  52. package/types_generated/Libraries/Animated/nodes/AnimatedValue.d.ts +126 -0
  53. package/types_generated/Libraries/Animated/nodes/AnimatedValueXY.d.ts +135 -0
  54. package/types_generated/Libraries/Animated/nodes/AnimatedWithChildren.d.ts +15 -0
  55. package/types_generated/Libraries/Animated/useAnimatedColor.d.ts +16 -0
  56. package/types_generated/Libraries/Animated/useAnimatedValue.d.ts +15 -0
  57. package/types_generated/Libraries/Animated/useAnimatedValueXY.d.ts +18 -0
  58. package/types_generated/Libraries/AppState/AppState.d.ts +63 -0
  59. package/types_generated/Libraries/BatchedBridge/BatchedBridge.d.ts +17 -0
  60. package/types_generated/Libraries/BatchedBridge/MessageQueue.d.ts +39 -0
  61. package/types_generated/Libraries/BatchedBridge/NativeModules.d.ts +20 -0
  62. package/types_generated/Libraries/Blob/Blob.d.ts +80 -0
  63. package/types_generated/Libraries/Blob/BlobTypes.d.ts +27 -0
  64. package/types_generated/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +232 -0
  65. package/types_generated/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.d.ts +20 -0
  66. package/types_generated/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts +84 -0
  67. package/types_generated/Libraries/Components/Button.d.ts +247 -0
  68. package/types_generated/Libraries/Components/Clipboard/Clipboard.d.ts +38 -0
  69. package/types_generated/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +17 -0
  70. package/types_generated/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidFallback.d.ts +27 -0
  71. package/types_generated/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidTypes.d.ts +176 -0
  72. package/types_generated/Libraries/Components/Keyboard/Keyboard.d.ts +146 -0
  73. package/types_generated/Libraries/Components/Keyboard/KeyboardAvoidingView.d.ts +73 -0
  74. package/types_generated/Libraries/Components/LayoutConformance/LayoutConformance.d.ts +23 -0
  75. package/types_generated/Libraries/Components/Pressable/Pressable.d.ts +146 -0
  76. package/types_generated/Libraries/Components/Pressable/useAndroidRippleForView.d.ts +48 -0
  77. package/types_generated/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.d.ts +32 -0
  78. package/types_generated/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidNativeComponent.d.ts +14 -0
  79. package/types_generated/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.d.ts +50 -0
  80. package/types_generated/Libraries/Components/RefreshControl/RefreshControl.d.ts +113 -0
  81. package/types_generated/Libraries/Components/SafeAreaView/SafeAreaView.d.ts +33 -0
  82. package/types_generated/Libraries/Components/ScrollView/ScrollView.d.ts +581 -0
  83. package/types_generated/Libraries/Components/ScrollView/ScrollViewContext.d.ts +24 -0
  84. package/types_generated/Libraries/Components/ScrollView/ScrollViewNativeComponent.d.ts +21 -0
  85. package/types_generated/Libraries/Components/ScrollView/ScrollViewNativeComponentType.d.ts +140 -0
  86. package/types_generated/Libraries/Components/ScrollView/ScrollViewStickyHeader.d.ts +36 -0
  87. package/types_generated/Libraries/Components/StatusBar/StatusBar.d.ts +222 -0
  88. package/types_generated/Libraries/Components/Switch/AndroidSwitchNativeComponent.d.ts +14 -0
  89. package/types_generated/Libraries/Components/Switch/Switch.d.ts +138 -0
  90. package/types_generated/Libraries/Components/Switch/SwitchNativeComponent.d.ts +14 -0
  91. package/types_generated/Libraries/Components/TV/TVEventControl.d.ts +23 -0
  92. package/types_generated/Libraries/Components/TV/TVEventHandler.d.ts +21 -0
  93. package/types_generated/Libraries/Components/TV/TVFocusGuideView.d.ts +96 -0
  94. package/types_generated/Libraries/Components/TV/TVTextScrollView.d.ts +97 -0
  95. package/types_generated/Libraries/Components/TV/TVViewPropTypes.d.ts +123 -0
  96. package/types_generated/Libraries/Components/TV/tagForComponentOrHandle.d.ts +24 -0
  97. package/types_generated/Libraries/Components/TV/useTVEventHandler.d.ts +20 -0
  98. package/types_generated/Libraries/Components/TextInput/InputAccessoryView.d.ts +86 -0
  99. package/types_generated/Libraries/Components/TextInput/TextInput.d.ts +47 -0
  100. package/types_generated/Libraries/Components/TextInput/TextInput.flow.d.ts +1005 -0
  101. package/types_generated/Libraries/Components/TextInput/TextInputState.d.ts +54 -0
  102. package/types_generated/Libraries/Components/ToastAndroid/ToastAndroid.d.ts +99 -0
  103. package/types_generated/Libraries/Components/Touchable/Touchable.d.ts +257 -0
  104. package/types_generated/Libraries/Components/Touchable/TouchableHighlight.d.ts +51 -0
  105. package/types_generated/Libraries/Components/Touchable/TouchableNativeFeedback.d.ts +192 -0
  106. package/types_generated/Libraries/Components/Touchable/TouchableOpacity.d.ts +35 -0
  107. package/types_generated/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +121 -0
  108. package/types_generated/Libraries/Components/View/View.d.ts +30 -0
  109. package/types_generated/Libraries/Components/View/ViewAccessibility.d.ts +415 -0
  110. package/types_generated/Libraries/Components/View/ViewNativeComponent.d.ts +39 -0
  111. package/types_generated/Libraries/Components/View/ViewPropTypes.d.ts +367 -0
  112. package/types_generated/Libraries/Core/Devtools/symbolicateStackTrace.d.ts +27 -0
  113. package/types_generated/Libraries/Core/ExceptionsManager.d.ts +43 -0
  114. package/types_generated/Libraries/Core/ExtendedError.d.ts +26 -0
  115. package/types_generated/Libraries/Core/NativeExceptionsManager.d.ts +17 -0
  116. package/types_generated/Libraries/Core/RawEventEmitter.d.ts +26 -0
  117. package/types_generated/Libraries/Core/ReactFiberErrorDialog.d.ts +27 -0
  118. package/types_generated/Libraries/Core/ReactNativeVersion.d.ts +48 -0
  119. package/types_generated/Libraries/Core/registerCallableModule.d.ts +18 -0
  120. package/types_generated/Libraries/EventEmitter/NativeEventEmitter.d.ts +42 -0
  121. package/types_generated/Libraries/EventEmitter/RCTDeviceEventEmitter.d.ts +19 -0
  122. package/types_generated/Libraries/EventEmitter/RCTEventEmitter.d.ts +18 -0
  123. package/types_generated/Libraries/EventEmitter/RCTNativeAppEventEmitter.d.ts +21 -0
  124. package/types_generated/Libraries/Image/AssetSourceResolver.d.ts +71 -0
  125. package/types_generated/Libraries/Image/Image.d.ts +18 -0
  126. package/types_generated/Libraries/Image/ImageBackground.d.ts +44 -0
  127. package/types_generated/Libraries/Image/ImageProps.d.ts +512 -0
  128. package/types_generated/Libraries/Image/ImageResizeMode.d.ts +17 -0
  129. package/types_generated/Libraries/Image/ImageSource.d.ts +94 -0
  130. package/types_generated/Libraries/Image/ImageTypes.flow.d.ts +61 -0
  131. package/types_generated/Libraries/Interaction/InteractionManager.d.ts +117 -0
  132. package/types_generated/Libraries/Interaction/PanResponder.d.ts +228 -0
  133. package/types_generated/Libraries/LayoutAnimation/LayoutAnimation.d.ts +76 -0
  134. package/types_generated/Libraries/Linking/Linking.d.ts +68 -0
  135. package/types_generated/Libraries/Lists/FlatList.d.ts +317 -0
  136. package/types_generated/Libraries/Lists/SectionList.d.ts +172 -0
  137. package/types_generated/Libraries/Lists/VirtualizedList.d.ts +19 -0
  138. package/types_generated/Libraries/Lists/VirtualizedSectionList.d.ts +19 -0
  139. package/types_generated/Libraries/LogBox/Data/LogBoxData.d.ts +78 -0
  140. package/types_generated/Libraries/LogBox/Data/LogBoxLog.d.ts +71 -0
  141. package/types_generated/Libraries/LogBox/Data/LogBoxSymbolication.d.ts +17 -0
  142. package/types_generated/Libraries/LogBox/Data/parseLogBoxLog.d.ts +49 -0
  143. package/types_generated/Libraries/LogBox/LogBox.d.ts +29 -0
  144. package/types_generated/Libraries/Modal/Modal.d.ts +110 -0
  145. package/types_generated/Libraries/NativeComponent/NativeComponentRegistry.d.ts +50 -0
  146. package/types_generated/Libraries/NativeModules/specs/NativeDialogManagerAndroid.d.ts +17 -0
  147. package/types_generated/Libraries/Network/FormData.d.ts +56 -0
  148. package/types_generated/Libraries/Network/RCTNetworking.d.ts +25 -0
  149. package/types_generated/Libraries/Network/RCTNetworkingEventDefinitions.flow.d.ts +22 -0
  150. package/types_generated/Libraries/Network/XMLHttpRequest.d.ts +114 -0
  151. package/types_generated/Libraries/Network/convertRequestBody.d.ts +21 -0
  152. package/types_generated/Libraries/Performance/Systrace.d.ts +61 -0
  153. package/types_generated/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +129 -0
  154. package/types_generated/Libraries/Pressability/Pressability.d.ts +241 -0
  155. package/types_generated/Libraries/Pressability/usePressability.d.ts +27 -0
  156. package/types_generated/Libraries/PushNotificationIOS/PushNotificationIOS.d.ts +323 -0
  157. package/types_generated/Libraries/ReactNative/AppRegistry.d.ts +14 -0
  158. package/types_generated/Libraries/ReactNative/AppRegistry.flow.d.ts +43 -0
  159. package/types_generated/Libraries/ReactNative/AppRegistryImpl.d.ts +73 -0
  160. package/types_generated/Libraries/ReactNative/DisplayMode.d.ts +24 -0
  161. package/types_generated/Libraries/ReactNative/I18nManager.d.ts +23 -0
  162. package/types_generated/Libraries/ReactNative/IPerformanceLogger.flow.d.ts +57 -0
  163. package/types_generated/Libraries/ReactNative/NativeI18nManager.d.ts +17 -0
  164. package/types_generated/Libraries/ReactNative/NativeUIManager.d.ts +17 -0
  165. package/types_generated/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.d.ts +31 -0
  166. package/types_generated/Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.d.ts +15 -0
  167. package/types_generated/Libraries/ReactNative/RendererImplementation.d.ts +36 -0
  168. package/types_generated/Libraries/ReactNative/RendererProxy.d.ts +13 -0
  169. package/types_generated/Libraries/ReactNative/RootTag.d.ts +22 -0
  170. package/types_generated/Libraries/ReactNative/UIManager.d.ts +17 -0
  171. package/types_generated/Libraries/ReactNative/requireNativeComponent.d.ts +25 -0
  172. package/types_generated/Libraries/ReactPrivate/ReactNativePrivateInterface.d.ts +33 -0
  173. package/types_generated/Libraries/Renderer/shims/ReactFabric.d.ts +17 -0
  174. package/types_generated/Libraries/Renderer/shims/ReactNativeTypes.d.ts +155 -0
  175. package/types_generated/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.d.ts +41 -0
  176. package/types_generated/Libraries/Settings/Settings.d.ts +21 -0
  177. package/types_generated/Libraries/Share/Share.d.ts +85 -0
  178. package/types_generated/Libraries/StyleSheet/EdgeInsetsPropType.d.ts +15 -0
  179. package/types_generated/Libraries/StyleSheet/PlatformColorValueTypes.d.ts +17 -0
  180. package/types_generated/Libraries/StyleSheet/PlatformColorValueTypesIOS.d.ts +27 -0
  181. package/types_generated/Libraries/StyleSheet/PointPropType.d.ts +16 -0
  182. package/types_generated/Libraries/StyleSheet/Rect.d.ts +22 -0
  183. package/types_generated/Libraries/StyleSheet/StyleSheet.d.ts +153 -0
  184. package/types_generated/Libraries/StyleSheet/StyleSheetExports.d.ts +94 -0
  185. package/types_generated/Libraries/StyleSheet/StyleSheetTypes.d.ts +851 -0
  186. package/types_generated/Libraries/StyleSheet/flattenStyle.d.ts +19 -0
  187. package/types_generated/Libraries/StyleSheet/private/_StyleSheetTypesOverrides.d.ts +17 -0
  188. package/types_generated/Libraries/StyleSheet/private/_TransformStyle.d.ts +76 -0
  189. package/types_generated/Libraries/StyleSheet/processColor.d.ts +18 -0
  190. package/types_generated/Libraries/Text/Text.d.ts +30 -0
  191. package/types_generated/Libraries/Text/TextAncestorContext.d.ts +20 -0
  192. package/types_generated/Libraries/Text/TextNativeComponent.d.ts +41 -0
  193. package/types_generated/Libraries/Text/TextProps.d.ts +220 -0
  194. package/types_generated/Libraries/TurboModule/RCTExport.d.ts +35 -0
  195. package/types_generated/Libraries/TurboModule/TurboModuleRegistry.d.ts +15 -0
  196. package/types_generated/Libraries/Types/CodegenTypes.d.ts +24 -0
  197. package/types_generated/Libraries/Types/CodegenTypesNamespace.d.ts +14 -0
  198. package/types_generated/Libraries/Types/CoreEventTypes.d.ts +355 -0
  199. package/types_generated/Libraries/Types/RootTagTypes.d.ts +13 -0
  200. package/types_generated/Libraries/Types/UIManagerJSInterface.d.ts +17 -0
  201. package/types_generated/Libraries/UTFSequence.d.ts +39 -0
  202. package/types_generated/Libraries/Utilities/Appearance.d.ts +31 -0
  203. package/types_generated/Libraries/Utilities/BackHandler.d.ts +27 -0
  204. package/types_generated/Libraries/Utilities/DevSettings.d.ts +34 -0
  205. package/types_generated/Libraries/Utilities/DeviceInfo.d.ts +17 -0
  206. package/types_generated/Libraries/Utilities/Dimensions.d.ts +54 -0
  207. package/types_generated/Libraries/Utilities/NativeAppearance.d.ts +17 -0
  208. package/types_generated/Libraries/Utilities/NativeDeviceInfo.d.ts +14 -0
  209. package/types_generated/Libraries/Utilities/PixelRatio.d.ts +110 -0
  210. package/types_generated/Libraries/Utilities/Platform.d.ts +16 -0
  211. package/types_generated/Libraries/Utilities/PlatformTypes.d.ts +134 -0
  212. package/types_generated/Libraries/Utilities/codegenNativeCommands.d.ts +19 -0
  213. package/types_generated/Libraries/Utilities/codegenNativeComponent.d.ts +24 -0
  214. package/types_generated/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.d.ts +33 -0
  215. package/types_generated/Libraries/Utilities/differ/deepDiffer.d.ts +19 -0
  216. package/types_generated/Libraries/Utilities/useColorScheme.d.ts +15 -0
  217. package/types_generated/Libraries/Utilities/useWindowDimensions.d.ts +15 -0
  218. package/types_generated/Libraries/Vibration/Vibration.d.ts +29 -0
  219. package/types_generated/Libraries/vendor/core/ErrorUtils.d.ts +39 -0
  220. package/types_generated/Libraries/vendor/emitter/EventEmitter.d.ts +67 -0
  221. package/types_generated/index.d.ts +184 -0
  222. package/types_generated/src/private/components/virtualcollection/FlingConstants.d.ts +20 -0
  223. package/types_generated/src/private/components/virtualcollection/Virtual.d.ts +46 -0
  224. package/types_generated/src/private/components/virtualcollection/VirtualCollectionView.d.ts +81 -0
  225. package/types_generated/src/private/components/virtualcollection/column/VirtualColumn.d.ts +23 -0
  226. package/types_generated/src/private/components/virtualcollection/column/VirtualColumnGenerator.d.ts +17 -0
  227. package/types_generated/src/private/components/virtualcollection/dom/getScrollParent.d.ts +21 -0
  228. package/types_generated/src/private/components/virtualcollection/row/VirtualRow.d.ts +23 -0
  229. package/types_generated/src/private/components/virtualview/VirtualView.d.ts +75 -0
  230. package/types_generated/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.d.ts +107 -0
  231. package/types_generated/src/private/components/virtualview/VirtualViewNativeComponent.d.ts +107 -0
  232. package/types_generated/src/private/devsupport/devmenu/DevMenu.d.ts +28 -0
  233. package/types_generated/src/private/specs_DEPRECATED/components/AndroidSwitchNativeComponent.d.ts +53 -0
  234. package/types_generated/src/private/specs_DEPRECATED/components/ProgressBarAndroidNativeComponent.d.ts +36 -0
  235. package/types_generated/src/private/specs_DEPRECATED/components/SwitchNativeComponent.d.ts +51 -0
  236. package/types_generated/src/private/specs_DEPRECATED/modules/NativeAppearance.d.ts +26 -0
  237. package/types_generated/src/private/specs_DEPRECATED/modules/NativeDeviceInfo.d.ts +46 -0
  238. package/types_generated/src/private/specs_DEPRECATED/modules/NativeDialogManagerAndroid.d.ts +37 -0
  239. package/types_generated/src/private/specs_DEPRECATED/modules/NativeExceptionsManager.d.ts +45 -0
  240. package/types_generated/src/private/specs_DEPRECATED/modules/NativeI18nManager.d.ts +27 -0
  241. package/types_generated/src/private/specs_DEPRECATED/modules/NativeUIManager.d.ts +109 -0
  242. package/types_generated/src/private/styles/composeStyles.d.ts +19 -0
  243. package/types_generated/src/private/types/HostComponent.d.ts +19 -0
  244. package/types_generated/src/private/types/HostInstance.d.ts +92 -0
  245. package/types_generated/src/private/webapis/dom/events/CustomEvent.d.ts +27 -0
  246. package/types_generated/src/private/webapis/dom/events/Event.d.ts +50 -0
  247. package/types_generated/src/private/webapis/dom/events/EventTarget.d.ts +36 -0
  248. package/types_generated/src/private/webapis/dom/nodes/ReactNativeDocument.d.ts +33 -0
  249. package/types_generated/src/private/webapis/dom/nodes/ReactNativeElement.d.ts +36 -0
  250. package/types_generated/src/private/webapis/dom/nodes/ReadOnlyCharacterData.d.ts +30 -0
  251. package/types_generated/src/private/webapis/dom/nodes/ReadOnlyElement.d.ts +54 -0
  252. package/types_generated/src/private/webapis/dom/nodes/ReadOnlyNode.d.ts +129 -0
  253. package/types_generated/src/private/webapis/dom/nodes/ReadOnlyText.d.ts +24 -0
  254. package/types_generated/src/private/webapis/dom/nodes/internals/NodeInternals.d.ts +36 -0
  255. package/types_generated/src/private/webapis/dom/nodes/internals/ReactNativeDocumentElementInstanceHandle.d.ts +23 -0
  256. package/types_generated/src/private/webapis/dom/nodes/internals/ReactNativeDocumentInstanceHandle.d.ts +22 -0
  257. package/types_generated/src/private/webapis/dom/nodes/specs/NativeDOM.d.ts +229 -0
  258. package/types_generated/src/private/webapis/dom/oldstylecollections/HTMLCollection.d.ts +22 -0
  259. package/types_generated/src/private/webapis/dom/oldstylecollections/NodeList.d.ts +25 -0
  260. package/types_generated/src/private/webapis/geometry/DOMRect.d.ts +46 -0
  261. package/types_generated/src/private/webapis/geometry/DOMRectReadOnly.d.ts +73 -0
  262. package/types_generated/src/private/webapis/utils/ArrayLikeUtils.d.ts +27 -0
  263. package/types_generated/tsconfig.json +3 -0
  264. package/types_generated/tsconfig.test.json +16 -0
@@ -0,0 +1,1005 @@
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
+ * @generated SignedSource<<df8a2c002acae02076a766429f2d71ce>>
8
+ *
9
+ * This file was translated from Flow by scripts/js-api/build-types/index.js.
10
+ * Original file: packages/react-native/Libraries/Components/TextInput/TextInput.flow.js
11
+ */
12
+
13
+ import type { HostInstance } from "../../../src/private/types/HostInstance";
14
+ import type { BlurEvent, FocusEvent, GestureResponderEvent, NativeSyntheticEvent, ScrollEvent } from "../../Types/CoreEventTypes";
15
+ import type { ViewProps } from "../View/ViewPropTypes";
16
+ import ReactNativeElement from "../../../src/private/webapis/dom/nodes/ReactNativeElement";
17
+ import { type ColorValue, type TextStyleProp } from "../../StyleSheet/StyleSheet";
18
+ import * as React from "react";
19
+ /**
20
+ * @see TextInputProps.onChange
21
+ */
22
+ /**
23
+ * @see TextInputProps.onChange
24
+ */
25
+ type TextInputChangeEventData = Readonly<{
26
+ eventCount: number;
27
+ target: number;
28
+ text: string;
29
+ selection?: Selection;
30
+ }>;
31
+ export type TextInputChangeEvent = NativeSyntheticEvent<TextInputChangeEventData>;
32
+ export type TextInputEvent = NativeSyntheticEvent<Readonly<{
33
+ eventCount: number;
34
+ previousText: string;
35
+ range: Readonly<{
36
+ start: number;
37
+ end: number;
38
+ }>;
39
+ target: number;
40
+ text: string;
41
+ }>>;
42
+ type TextInputContentSizeChangeEventData = Readonly<{
43
+ target: number;
44
+ contentSize: Readonly<{
45
+ width: number;
46
+ height: number;
47
+ }>;
48
+ }>;
49
+ /**
50
+ * @see TextInputProps.onContentSizeChange
51
+ */
52
+ export type TextInputContentSizeChangeEvent = NativeSyntheticEvent<TextInputContentSizeChangeEventData>;
53
+ /**
54
+ * @see TextInputProps.onBlur
55
+ * @deprecated Use `BlurEvent` instead.
56
+ */
57
+ export type TextInputBlurEvent = BlurEvent;
58
+ /**
59
+ * @see TextInputProps.onFocus
60
+ * @deprecated Use `FocusEvent` instead.
61
+ */
62
+ export type TextInputFocusEvent = FocusEvent;
63
+ type TargetEvent = Readonly<{
64
+ target: number;
65
+ }>;
66
+ export type Selection = Readonly<{
67
+ start: number;
68
+ end: number;
69
+ }>;
70
+ type TextInputSelectionChangeEventData = Readonly<Omit<TargetEvent, keyof {
71
+ selection: Selection;
72
+ }> & {
73
+ selection: Selection;
74
+ }>;
75
+ /**
76
+ * @see TextInputProps.onSelectionChange
77
+ */
78
+ export type TextInputSelectionChangeEvent = NativeSyntheticEvent<TextInputSelectionChangeEventData>;
79
+ type TextInputKeyPressEventData = Readonly<Omit<TargetEvent, keyof {
80
+ key: string;
81
+ target?: number | undefined;
82
+ eventCount: number;
83
+ }> & {
84
+ key: string;
85
+ target?: number | undefined;
86
+ eventCount: number;
87
+ }>;
88
+ /**
89
+ * @see TextInputProps.onKeyPress
90
+ */
91
+ export type TextInputKeyPressEvent = NativeSyntheticEvent<TextInputKeyPressEventData>;
92
+ type TextInputEndEditingEventData = Readonly<Omit<TargetEvent, keyof {
93
+ eventCount: number;
94
+ text: string;
95
+ }> & {
96
+ eventCount: number;
97
+ text: string;
98
+ }>;
99
+ /**
100
+ * @see TextInputProps.onEndEditing
101
+ */
102
+ export type TextInputEndEditingEvent = NativeSyntheticEvent<TextInputEndEditingEventData>;
103
+ type TextInputSubmitEditingEventData = Readonly<Omit<TargetEvent, keyof {
104
+ eventCount: number;
105
+ text: string;
106
+ action?: "submit" | "next" | "previous";
107
+ }> & {
108
+ eventCount: number;
109
+ text: string;
110
+ action?: "submit" | "next" | "previous";
111
+ }>;
112
+ /**
113
+ * @see TextInputProps.onSubmitEditing
114
+ */
115
+ export type TextInputSubmitEditingEvent = NativeSyntheticEvent<TextInputSubmitEditingEventData>;
116
+ export type TextInputEditingEvent = NativeSyntheticEvent<TextInputEndEditingEventData>;
117
+ type DataDetectorTypesType = "phoneNumber" | "link" | "address" | "calendarEvent" | "trackingNumber" | "flightNumber" | "lookupSuggestion" | "none" | "all";
118
+ export type KeyboardType = "default" | "email-address" | "numeric" | "phone-pad" | "number-pad" | "decimal-pad" | "url";
119
+ export type KeyboardTypeIOS = "ascii-capable" | "numbers-and-punctuation" | "name-phone-pad" | "twitter" | "web-search" | "ascii-capable-number-pad";
120
+ export type KeyboardTypeAndroid = "visible-password";
121
+ export type KeyboardTypeOptions = KeyboardType | KeyboardTypeIOS | KeyboardTypeAndroid;
122
+ export type InputModeOptions = "none" | "text" | "decimal" | "numeric" | "tel" | "search" | "email" | "url";
123
+ export type ReturnKeyType = "done" | "go" | "next" | "search" | "send";
124
+ export type ReturnKeyTypeIOS = "default" | "emergency-call" | "google" | "join" | "route" | "yahoo";
125
+ export type ReturnKeyTypeAndroid = "none" | "previous";
126
+ export type ReturnKeyTypeOptions = ReturnKeyType | ReturnKeyTypeIOS | ReturnKeyTypeAndroid;
127
+ export type SubmitBehavior = "submit" | "blurAndSubmit" | "newline";
128
+ export type AutoCapitalize = "none" | "sentences" | "words" | "characters";
129
+ export type TextContentType = "none" | "URL" | "addressCity" | "addressCityAndState" | "addressState" | "countryName" | "creditCardNumber" | "creditCardExpiration" | "creditCardExpirationMonth" | "creditCardExpirationYear" | "creditCardSecurityCode" | "creditCardType" | "creditCardName" | "creditCardGivenName" | "creditCardMiddleName" | "creditCardFamilyName" | "emailAddress" | "familyName" | "fullStreetAddress" | "givenName" | "jobTitle" | "location" | "middleName" | "name" | "namePrefix" | "nameSuffix" | "nickname" | "organizationName" | "postalCode" | "streetAddressLine1" | "streetAddressLine2" | "sublocality" | "telephoneNumber" | "username" | "password" | "newPassword" | "oneTimeCode" | "birthdate" | "birthdateDay" | "birthdateMonth" | "birthdateYear" | "cellularEID" | "cellularIMEI" | "dateTime" | "flightNumber" | "shipmentTrackingNumber";
130
+ export type EnterKeyHintTypeAndroid = "previous";
131
+ export type EnterKeyHintTypeIOS = "enter";
132
+ export type EnterKeyHintType = "done" | "go" | "next" | "search" | "send";
133
+ export type EnterKeyHintTypeOptions = EnterKeyHintType | EnterKeyHintTypeAndroid | EnterKeyHintTypeIOS;
134
+ type PasswordRules = string;
135
+ export type TextInputIOSProps = Readonly<{
136
+ /**
137
+ * If true, the keyboard shortcuts (undo/redo and copy buttons) are disabled. The default value is false.
138
+ * @platform ios
139
+ */
140
+ disableKeyboardShortcuts?: boolean | undefined;
141
+ /**
142
+ * When the clear button should appear on the right side of the text view.
143
+ * This property is supported only for single-line TextInput component.
144
+ * @platform ios
145
+ */
146
+ clearButtonMode?: ("never" | "while-editing" | "unless-editing" | "always") | undefined;
147
+ /**
148
+ * If `true`, clears the text field automatically when editing begins.
149
+ * @platform ios
150
+ */
151
+ clearTextOnFocus?: boolean | undefined;
152
+ /**
153
+ * Determines the types of data converted to clickable URLs in the text input.
154
+ * Only valid if `multiline={true}` and `editable={false}`.
155
+ * By default no data types are detected.
156
+ *
157
+ * You can provide one type or an array of many types.
158
+ *
159
+ * Possible values for `dataDetectorTypes` are:
160
+ *
161
+ * - `'phoneNumber'`
162
+ * - `'link'`
163
+ * - `'address'`
164
+ * - `'calendarEvent'`
165
+ * - `'none'`
166
+ * - `'all'`
167
+ *
168
+ * @platform ios
169
+ */
170
+ dataDetectorTypes?: (DataDetectorTypesType | undefined) | ReadonlyArray<DataDetectorTypesType>;
171
+ /**
172
+ * If `true`, the keyboard disables the return key when there is no text and
173
+ * automatically enables it when there is text. The default value is `false`.
174
+ * @platform ios
175
+ */
176
+ enablesReturnKeyAutomatically?: boolean | undefined;
177
+ /**
178
+ * An optional identifier which links a custom InputAccessoryView to
179
+ * this text input. The InputAccessoryView is rendered above the
180
+ * keyboard when this text input is focused.
181
+ * @platform ios
182
+ */
183
+ inputAccessoryViewID?: string | undefined;
184
+ /**
185
+ * An optional label that overrides the default input accessory view button label.
186
+ * @platform ios
187
+ */
188
+ inputAccessoryViewButtonLabel?: string | undefined;
189
+ /**
190
+ * Determines the color of the keyboard.
191
+ * @platform ios
192
+ */
193
+ keyboardAppearance?: ("default" | "light" | "dark") | undefined;
194
+ /**
195
+ * Provide rules for your password.
196
+ * 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.
197
+ * "required: upper; required: lower; required: digit; max-consecutive: 2; minlength: 8;"
198
+ * @platform ios
199
+ */
200
+ passwordRules?: PasswordRules | undefined;
201
+ rejectResponderTermination?: boolean | undefined;
202
+ /**
203
+ * If `false`, scrolling of the text view will be disabled.
204
+ * The default value is `true`. Does only work with 'multiline={true}'.
205
+ * @platform ios
206
+ */
207
+ scrollEnabled?: boolean | undefined;
208
+ /**
209
+ * If `false`, disables spell-check style (i.e. red underlines).
210
+ * The default value is inherited from `autoCorrect`.
211
+ * @platform ios
212
+ */
213
+ spellCheck?: boolean | undefined;
214
+ /**
215
+ * Give the keyboard and the system information about the
216
+ * expected semantic meaning for the content that users enter.
217
+ * @platform ios
218
+ */
219
+ textContentType?: TextContentType | undefined;
220
+ /**
221
+ * Set line break strategy on iOS.
222
+ * @platform ios
223
+ */
224
+ lineBreakStrategyIOS?: ("none" | "standard" | "hangul-word" | "push-out") | undefined;
225
+ /**
226
+ * Set line break mode on iOS.
227
+ * @platform ios
228
+ */
229
+ lineBreakModeIOS?: ("wordWrapping" | "char" | "clip" | "head" | "middle" | "tail") | undefined;
230
+ /**
231
+ * If `false`, the iOS system will not insert an extra space after a paste operation
232
+ * neither delete one or two spaces after a cut or delete operation.
233
+ *
234
+ * The default value is `true`.
235
+ *
236
+ * @platform ios
237
+ */
238
+ smartInsertDelete?: boolean | undefined;
239
+ }>;
240
+ export type TextInputAndroidProps = Readonly<{
241
+ /**
242
+ * When provided it will set the color of the cursor (or "caret") in the component.
243
+ * Unlike the behavior of `selectionColor` the cursor color will be set independently
244
+ * from the color of the text selection box.
245
+ * @platform android
246
+ */
247
+ cursorColor?: ColorValue | undefined;
248
+ /**
249
+ * When provided it will set the color of the selection handles when highlighting text.
250
+ * Unlike the behavior of `selectionColor` the handle color will be set independently
251
+ * from the color of the text selection box.
252
+ * @platform android
253
+ */
254
+ selectionHandleColor?: ColorValue | undefined;
255
+ /**
256
+ * When `false`, if there is a small amount of space available around a text input
257
+ * (e.g. landscape orientation on a phone), the OS may choose to have the user edit
258
+ * the text inside of a full screen text input mode. When `true`, this feature is
259
+ * disabled and users will always edit the text directly inside of the text input.
260
+ * Defaults to `false`.
261
+ * @platform android
262
+ */
263
+ disableFullscreenUI?: boolean | undefined;
264
+ /**
265
+ * Determines whether the individual fields in your app should be included in a
266
+ * view structure for autofill purposes on Android API Level 26+. Defaults to auto.
267
+ * To disable auto complete, use `off`.
268
+ *
269
+ * *Android Only*
270
+ *
271
+ * The following values work on Android only:
272
+ *
273
+ * - `auto` - let Android decide
274
+ * - `no` - not important for autofill
275
+ * - `noExcludeDescendants` - this view and its children aren't important for autofill
276
+ * - `yes` - is important for autofill
277
+ * - `yesExcludeDescendants` - this view is important for autofill but its children aren't
278
+ */
279
+ importantForAutofill?: ("auto" | "no" | "noExcludeDescendants" | "yes" | "yesExcludeDescendants") | undefined;
280
+ /**
281
+ * If defined, the provided image resource will be rendered on the left.
282
+ * The image resource must be inside `/android/app/src/main/res/drawable` and referenced
283
+ * like
284
+ * ```
285
+ * <TextInput
286
+ * inlineImageLeft='search_icon'
287
+ * />
288
+ * ```
289
+ * @platform android
290
+ */
291
+ inlineImageLeft?: string | undefined;
292
+ /**
293
+ * Padding between the inline image, if any, and the text input itself.
294
+ * @platform android
295
+ */
296
+ inlineImagePadding?: number | undefined;
297
+ /**
298
+ * Sets the number of lines for a `TextInput`. Use it with multiline set to
299
+ * `true` to be able to fill the lines.
300
+ * @platform android
301
+ */
302
+ numberOfLines?: number | undefined;
303
+ /**
304
+ * Sets the return key to the label. Use it instead of `returnKeyType`.
305
+ * @platform android
306
+ */
307
+ returnKeyLabel?: string | undefined;
308
+ /**
309
+ * Sets the number of rows for a `TextInput`. Use it with multiline set to
310
+ * `true` to be able to fill the lines.
311
+ * @platform android
312
+ */
313
+ rows?: number | undefined;
314
+ /**
315
+ * When `false`, it will prevent the soft keyboard from showing when the field is focused.
316
+ * Defaults to `true`.
317
+ */
318
+ showSoftInputOnFocus?: boolean | undefined;
319
+ /**
320
+ * Set text break strategy on Android API Level 23+, possible values are `simple`, `highQuality`, `balanced`
321
+ * The default value is `simple`.
322
+ * @platform android
323
+ */
324
+ textBreakStrategy?: ("simple" | "highQuality" | "balanced") | undefined;
325
+ /**
326
+ * The color of the `TextInput` underline.
327
+ * @platform android
328
+ */
329
+ underlineColorAndroid?: ColorValue | undefined;
330
+ }>;
331
+ type TextInputBaseProps = Readonly<{
332
+ /**
333
+ * When provided, the text input will only accept drag and drop events for the specified
334
+ * types. If null or not provided, the text input will accept all types of drag and drop events.
335
+ * An empty array will accept no drag and drop events.
336
+ * Defaults to null.
337
+ *
338
+ * On Android, types must correspond to MIME types from ClipData:
339
+ * https://developer.android.com/reference/android/content/ClipData
340
+ * (e.g. "text/plain" or "image/*")
341
+ *
342
+ * On iOS, types must correspond to UTIs:
343
+ * https://developer.apple.com/documentation/uniformtypeidentifiers
344
+ * (e.g. "public.plain-text" or "public.image")
345
+ *
346
+ * *NOTE*: This prop is experimental and its API may change in the future. Use at your own risk.
347
+ *
348
+ * @see https://developer.android.com/reference/android/content/ClipData for more information on MIME types
349
+ */
350
+ experimental_acceptDragAndDropTypes?: ReadonlyArray<string> | undefined;
351
+ /**
352
+ * Can tell `TextInput` to automatically capitalize certain characters.
353
+ *
354
+ * - `characters`: all characters.
355
+ * - `words`: first letter of each word.
356
+ * - `sentences`: first letter of each sentence (*default*).
357
+ * - `none`: don't auto capitalize anything.
358
+ */
359
+ autoCapitalize?: AutoCapitalize | undefined;
360
+ /**
361
+ * Specifies autocomplete hints for the system, so it can provide autofill.
362
+ * On Android, the system will always attempt to offer autofill by using heuristics to identify the type of content.
363
+ * To disable autocomplete, set autoComplete to off.
364
+ *
365
+ * The following values work across platforms:
366
+ *
367
+ * - `additional-name`
368
+ * - `address-line1`
369
+ * - `address-line2`
370
+ * - `birthdate-day` (iOS 17+)
371
+ * - `birthdate-full` (iOS 17+)
372
+ * - `birthdate-month` (iOS 17+)
373
+ * - `birthdate-year` (iOS 17+)
374
+ * - `cc-number`
375
+ * - `cc-csc` (iOS 17+)
376
+ * - `cc-exp` (iOS 17+)
377
+ * - `cc-exp-day` (iOS 17+)
378
+ * - `cc-exp-month` (iOS 17+)
379
+ * - `cc-exp-year` (iOS 17+)
380
+ * - `country`
381
+ * - `current-password`
382
+ * - `email`
383
+ * - `family-name`
384
+ * - `given-name`
385
+ * - `honorific-prefix`
386
+ * - `honorific-suffix`
387
+ * - `name`
388
+ * - `new-password`
389
+ * - `off`
390
+ * - `one-time-code`
391
+ * - `postal-code`
392
+ * - `street-address`
393
+ * - `tel`
394
+ * - `username`
395
+ *
396
+ * The following values work on iOS only:
397
+ *
398
+ * - `cc-name` (iOS 17+)
399
+ * - `cc-given-name` (iOS 17+)
400
+ * - `cc-middle-name` (iOS 17+)
401
+ * - `cc-family-name` (iOS 17+)
402
+ * - `cc-type` (iOS 17+)
403
+ * - `nickname`
404
+ * - `organization`
405
+ * - `organization-title`
406
+ * - `url`
407
+ *
408
+ * The following values work on Android only:
409
+ *
410
+ * - `2fa-app-otp`
411
+ * - `email-otp`
412
+ * - `flight-confirmation-code`
413
+ * - `flight-number`
414
+ * - `gender`
415
+ * - `gift-card-number`
416
+ * - `gift-card-pin`
417
+ * - `loyalty-account-number`
418
+ * - `name-family`
419
+ * - `name-given`
420
+ * - `name-middle`
421
+ * - `name-middle-initial`
422
+ * - `name-prefix`
423
+ * - `name-suffix`
424
+ * - `password`
425
+ * - `password-new`
426
+ * - `postal-address`
427
+ * - `postal-address-country`
428
+ * - `postal-address-dependent-locality`
429
+ * - `postal-address-extended`
430
+ * - `postal-address-extended-postal-code`
431
+ * - `postal-address-locality`
432
+ * - `postal-address-region`
433
+ * - `postal-address-unit`
434
+ * - `promo-code`
435
+ * - `sms-otp`
436
+ * - `tel-country-code`
437
+ * - `tel-national`
438
+ * - `tel-device`
439
+ * - `upi-vpa`
440
+ * - `wifi-password`
441
+ * - `username-new`
442
+ */
443
+ autoComplete?: ("2fa-app-otp" | "additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | "cc-exp-day" | "cc-exp-month" | "cc-exp-year" | "cc-number" | "cc-name" | "cc-given-name" | "cc-middle-name" | "cc-family-name" | "cc-type" | "country" | "current-password" | "email" | "email-otp" | "flight-confirmation-code" | "flight-number" | "family-name" | "gender" | "gift-card-number" | "gift-card-pin" | "given-name" | "honorific-prefix" | "honorific-suffix" | "loyalty-account-number" | "name" | "name-family" | "name-given" | "name-middle" | "name-middle-initial" | "name-prefix" | "name-suffix" | "new-password" | "nickname" | "one-time-code" | "organization" | "organization-title" | "password" | "password-new" | "postal-address" | "postal-address-country" | "postal-address-dependent-locality" | "postal-address-extended" | "postal-address-extended-postal-code" | "postal-address-locality" | "postal-address-region" | "postal-address-unit" | "postal-code" | "promo-code" | "street-address" | "sms-otp" | "tel" | "tel-country-code" | "tel-national" | "tel-device" | "upi-vpa" | "url" | "wifi-password" | "username" | "username-new" | "off") | undefined;
444
+ /**
445
+ * If `false`, disables auto-correct. The default value is `true`.
446
+ */
447
+ autoCorrect?: boolean | undefined;
448
+ /**
449
+ * If `true`, focuses the input on `componentDidMount`.
450
+ * The default value is `false`.
451
+ */
452
+ autoFocus?: boolean | undefined;
453
+ /**
454
+ * Specifies whether fonts should scale to respect Text Size accessibility settings. The
455
+ * default is `true`.
456
+ */
457
+ allowFontScaling?: boolean | undefined;
458
+ /**
459
+ * If `true`, caret is hidden. The default value is `false`.
460
+ *
461
+ * On Android devices manufactured by Xiaomi with Android Q,
462
+ * when keyboardType equals 'email-address'this will be set
463
+ * in native to 'true' to prevent a system related crash. This
464
+ * will cause cursor to be disabled as a side-effect.
465
+ *
466
+ */
467
+ caretHidden?: boolean | undefined;
468
+ contextMenuHidden?: boolean | undefined;
469
+ /**
470
+ * Provides an initial value that will change when the user starts typing.
471
+ * Useful for simple use-cases where you do not want to deal with listening
472
+ * to events and updating the value prop to keep the controlled state in sync.
473
+ */
474
+ defaultValue?: string | undefined;
475
+ /**
476
+ * If `false`, text is not editable. The default value is `true`.
477
+ */
478
+ editable?: boolean | undefined;
479
+ forwardedRef?: React.Ref<TextInputInstance> | undefined;
480
+ /**
481
+ * `enterKeyHint` defines what action label (or icon) to present for the enter key on virtual keyboards.
482
+ *
483
+ * The following values is supported:
484
+ *
485
+ * - `enter`
486
+ * - `done`
487
+ * - `go`
488
+ * - `next`
489
+ * - `previous`
490
+ * - `search`
491
+ * - `send`
492
+ */
493
+ enterKeyHint?: EnterKeyHintTypeOptions | undefined;
494
+ /**
495
+ * `inputMode` works like the `inputmode` attribute in HTML, it determines which
496
+ * keyboard to open, e.g.`numeric` and has precedence over keyboardType
497
+ *
498
+ * Support the following values:
499
+ *
500
+ * - `none`
501
+ * - `text`
502
+ * - `decimal`
503
+ * - `numeric`
504
+ * - `tel`
505
+ * - `search`
506
+ * - `email`
507
+ * - `url`
508
+ */
509
+ inputMode?: InputModeOptions | undefined;
510
+ /**
511
+ * Determines which keyboard to open, e.g.`numeric`.
512
+ *
513
+ * The following values work across platforms:
514
+ *
515
+ * - `default`
516
+ * - `numeric`
517
+ * - `number-pad`
518
+ * - `decimal-pad`
519
+ * - `email-address`
520
+ * - `phone-pad`
521
+ * - `url`
522
+ *
523
+ * *iOS Only*
524
+ *
525
+ * The following values work on iOS only:
526
+ *
527
+ * - `ascii-capable`
528
+ * - `numbers-and-punctuation`
529
+ * - `name-phone-pad`
530
+ * - `twitter`
531
+ * - `web-search`
532
+ *
533
+ * *Android Only*
534
+ *
535
+ * The following values work on Android only:
536
+ *
537
+ * - `visible-password`
538
+ *
539
+ */
540
+ keyboardType?: KeyboardTypeOptions | undefined;
541
+ /**
542
+ * Specifies largest possible scale a font can reach when `allowFontScaling` is enabled.
543
+ * Possible values:
544
+ * `null/undefined` (default): inherit from the parent node or the global default (0)
545
+ * `0`: no max, ignore parent/global default
546
+ * `>= 1`: sets the maxFontSizeMultiplier of this node to this value
547
+ */
548
+ maxFontSizeMultiplier?: number | undefined;
549
+ /**
550
+ * Limits the maximum number of characters that can be entered. Use this
551
+ * instead of implementing the logic in JS to avoid flicker.
552
+ */
553
+ maxLength?: number | undefined;
554
+ /**
555
+ * If `true`, the text input can be multiple lines.
556
+ * The default value is `false`.
557
+ */
558
+ multiline?: boolean | undefined;
559
+ /**
560
+ * Callback that is called when the text input is blurred.
561
+ */
562
+ onBlur?: ((e: TextInputBlurEvent) => unknown) | undefined;
563
+ /**
564
+ * Callback that is called when the text input's text changes.
565
+ */
566
+ onChange?: ((e: TextInputChangeEvent) => unknown) | undefined;
567
+ /**
568
+ * Callback that is called when the text input's text changes.
569
+ * Changed text is passed as an argument to the callback handler.
570
+ */
571
+ onChangeText?: ((text: string) => unknown) | undefined;
572
+ /**
573
+ * Callback that is called when the text input's content size changes.
574
+ * This will be called with
575
+ * `{ nativeEvent: { contentSize: { width, height } } }`.
576
+ *
577
+ * Only called for multiline text inputs.
578
+ */
579
+ onContentSizeChange?: ((e: TextInputContentSizeChangeEvent) => unknown) | undefined;
580
+ /**
581
+ * Callback that is called when text input ends.
582
+ */
583
+ onEndEditing?: ((e: TextInputEndEditingEvent) => unknown) | undefined;
584
+ /**
585
+ * Callback that is called when the text input is focused.
586
+ */
587
+ onFocus?: ((e: TextInputFocusEvent) => unknown) | undefined;
588
+ /**
589
+ * Callback that is called when a key is pressed.
590
+ * This will be called with `{ nativeEvent: { key: keyValue } }`
591
+ * where `keyValue` is `'Enter'` or `'Backspace'` for respective keys and
592
+ * the typed-in character otherwise including `' '` for space.
593
+ * Fires before `onChange` callbacks.
594
+ */
595
+ onKeyPress?: ((e: TextInputKeyPressEvent) => unknown) | undefined;
596
+ /**
597
+ * Called when a single tap gesture is detected.
598
+ */
599
+ onPress?: ((event: GestureResponderEvent) => unknown) | undefined;
600
+ /**
601
+ * Called when a touch is engaged.
602
+ */
603
+ onPressIn?: ((event: GestureResponderEvent) => unknown) | undefined;
604
+ /**
605
+ * Called when a touch is released.
606
+ */
607
+ onPressOut?: ((event: GestureResponderEvent) => unknown) | undefined;
608
+ /**
609
+ * Callback that is called when the text input selection is changed.
610
+ * This will be called with
611
+ * `{ nativeEvent: { selection: { start, end } } }`.
612
+ */
613
+ onSelectionChange?: ((e: TextInputSelectionChangeEvent) => unknown) | undefined;
614
+ /**
615
+ * Callback that is called when the text input's submit button is pressed.
616
+ * Invalid if `multiline={true}` is specified.
617
+ */
618
+ onSubmitEditing?: ((e: TextInputSubmitEditingEvent) => unknown) | undefined;
619
+ /**
620
+ * Invoked on content scroll with `{ nativeEvent: { contentOffset: { x, y } } }`.
621
+ * May also contain other properties from ScrollEvent but on Android contentSize
622
+ * is not provided for performance reasons.
623
+ */
624
+ onScroll?: ((e: ScrollEvent) => unknown) | undefined;
625
+ /**
626
+ * The string that will be rendered before text input has been entered.
627
+ */
628
+ placeholder?: string | undefined;
629
+ /**
630
+ * The text color of the placeholder string.
631
+ */
632
+ placeholderTextColor?: ColorValue | undefined;
633
+ /** `readOnly` works like the `readonly` attribute in HTML.
634
+ * If `true`, text is not editable. The default value is `false`.
635
+ * See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly
636
+ * for more details.
637
+ */
638
+ readOnly?: boolean | undefined;
639
+ /**
640
+ * Determines how the return key should look. On Android you can also use
641
+ * `returnKeyLabel`.
642
+ *
643
+ * *Cross platform*
644
+ *
645
+ * The following values work across platforms:
646
+ *
647
+ * - `done`
648
+ * - `go`
649
+ * - `next`
650
+ * - `search`
651
+ * - `send`
652
+ *
653
+ * *Android Only*
654
+ *
655
+ * The following values work on Android only:
656
+ *
657
+ * - `none`
658
+ * - `previous`
659
+ *
660
+ * *iOS Only*
661
+ *
662
+ * The following values work on iOS only:
663
+ *
664
+ * - `default`
665
+ * - `emergency-call`
666
+ * - `google`
667
+ * - `join`
668
+ * - `route`
669
+ * - `yahoo`
670
+ */
671
+ returnKeyType?: ReturnKeyTypeOptions | undefined;
672
+ /**
673
+ * If `true`, the text input obscures the text entered so that sensitive text
674
+ * like passwords stay secure. The default value is `false`. Does not work with 'multiline={true}'.
675
+ */
676
+ secureTextEntry?: boolean | undefined;
677
+ /**
678
+ * The start and end of the text input's selection. Set start and end to
679
+ * the same value to position the cursor.
680
+ */
681
+ selection?: Readonly<{
682
+ start: number;
683
+ end?: number | undefined;
684
+ }> | undefined;
685
+ /**
686
+ * The highlight and cursor color of the text input.
687
+ */
688
+ selectionColor?: ColorValue | undefined;
689
+ /**
690
+ * If `true`, all text will automatically be selected on focus.
691
+ */
692
+ selectTextOnFocus?: boolean | undefined;
693
+ /**
694
+ * If `true`, the text field will blur when submitted.
695
+ * The default value is true for single-line fields and false for
696
+ * multiline fields. Note that for multiline fields, setting `blurOnSubmit`
697
+ * to `true` means that pressing return will blur the field and trigger the
698
+ * `onSubmitEditing` event instead of inserting a newline into the field.
699
+ *
700
+ * @deprecated
701
+ * Note that `submitBehavior` now takes the place of `blurOnSubmit` and will
702
+ * override any behavior defined by `blurOnSubmit`.
703
+ * @see submitBehavior
704
+ */
705
+ blurOnSubmit?: boolean | undefined;
706
+ /**
707
+ * When the return key is pressed,
708
+ *
709
+ * For single line inputs:
710
+ *
711
+ * - `'newline`' defaults to `'blurAndSubmit'`
712
+ * - `undefined` defaults to `'blurAndSubmit'`
713
+ *
714
+ * For multiline inputs:
715
+ *
716
+ * - `'newline'` adds a newline
717
+ * - `undefined` defaults to `'newline'`
718
+ *
719
+ * For both single line and multiline inputs:
720
+ *
721
+ * - `'submit'` will only send a submit event and not blur the input
722
+ * - `'blurAndSubmit`' will both blur the input and send a submit event
723
+ */
724
+ submitBehavior?: SubmitBehavior | undefined;
725
+ /**
726
+ * Note that not all Text styles are supported, an incomplete list of what is not supported includes:
727
+ *
728
+ * - `borderLeftWidth`
729
+ * - `borderTopWidth`
730
+ * - `borderRightWidth`
731
+ * - `borderBottomWidth`
732
+ * - `borderTopLeftRadius`
733
+ * - `borderTopRightRadius`
734
+ * - `borderBottomRightRadius`
735
+ * - `borderBottomLeftRadius`
736
+ *
737
+ * see [Issue#7070](https://github.com/react/react-native/issues/7070)
738
+ * for more detail.
739
+ *
740
+ * [Styles](docs/style.html)
741
+ */
742
+ style?: TextStyleProp | undefined;
743
+ /**
744
+ * The value to show for the text input. `TextInput` is a controlled
745
+ * component, which means the native value will be forced to match this
746
+ * value prop if provided. For most uses, this works great, but in some
747
+ * cases this may cause flickering - one common cause is preventing edits
748
+ * by keeping value the same. In addition to simply setting the same value,
749
+ * either set `editable={false}`, or set/update `maxLength` to prevent
750
+ * unwanted edits without flicker.
751
+ */
752
+ value?: string | undefined;
753
+ /**
754
+ * Align the input text to the left, center, or right sides of the input field.
755
+ */
756
+ textAlign?: ("left" | "center" | "right") | undefined;
757
+ }>;
758
+ export type TextInputProps = Readonly<Omit<Omit<ViewProps, "style" | "experimental_accessibilityOrder">, keyof TextInputIOSProps | keyof TextInputAndroidProps | keyof TextInputBaseProps | keyof {}> & Omit<TextInputIOSProps, keyof TextInputAndroidProps | keyof TextInputBaseProps | keyof {}> & Omit<TextInputAndroidProps, keyof TextInputBaseProps | keyof {}> & Omit<TextInputBaseProps, keyof {}> & {}>;
759
+ /**
760
+ * TextInput monkey-patches the native element instance with these methods.
761
+ * It isn't technically a class but this is the most elegant way to type it.
762
+ */
763
+ declare class _TextInputInstance extends ReactNativeElement {
764
+ clear(): void;
765
+ isFocused(): boolean;
766
+ getNativeRef(): ReactNativeElement | undefined;
767
+ setSelection(start: number, end: number): void;
768
+ }
769
+ export type TextInputInstance = _TextInputInstance;
770
+ /**
771
+ * A foundational component for inputting text into the app via a
772
+ * keyboard. Props provide configurability for several features, such as
773
+ * auto-correction, auto-capitalization, placeholder text, and different keyboard
774
+ * types, such as a numeric keypad.
775
+ *
776
+ * The simplest use case is to plop down a `TextInput` and subscribe to the
777
+ * `onChangeText` events to read the user input. There are also other events,
778
+ * such as `onSubmitEditing` and `onFocus` that can be subscribed to. A simple
779
+ * example:
780
+ *
781
+ * ```ReactNativeWebPlayer
782
+ * import React, { Component } from 'react';
783
+ * import { AppRegistry, TextInput } from 'react-native';
784
+ *
785
+ * export default class UselessTextInput extends Component {
786
+ * constructor(props) {
787
+ * super(props);
788
+ * this.state = { text: 'Useless Placeholder' };
789
+ * }
790
+ *
791
+ * render() {
792
+ * return (
793
+ * <TextInput
794
+ * style={{height: 40, borderColor: 'gray', borderWidth: 1}}
795
+ * onChangeText={(text) => this.setState({text})}
796
+ * value={this.state.text}
797
+ * />
798
+ * );
799
+ * }
800
+ * }
801
+ *
802
+ * // skip this line if using Create React Native App
803
+ * AppRegistry.registerComponent('AwesomeProject', () => UselessTextInput);
804
+ * ```
805
+ *
806
+ * Two methods exposed via the native element are .focus() and .blur() that
807
+ * will focus or blur the TextInput programmatically.
808
+ *
809
+ * Note that some props are only available with `multiline={true/false}`.
810
+ * Additionally, border styles that apply to only one side of the element
811
+ * (e.g., `borderBottomColor`, `borderLeftWidth`, etc.) will not be applied if
812
+ * `multiline=false`. To achieve the same effect, you can wrap your `TextInput`
813
+ * in a `View`:
814
+ *
815
+ * ```ReactNativeWebPlayer
816
+ * import React, { Component } from 'react';
817
+ * import { AppRegistry, View, TextInput } from 'react-native';
818
+ *
819
+ * class UselessTextInput extends Component {
820
+ * render() {
821
+ * return (
822
+ * <TextInput
823
+ * {...this.props} // Inherit any props passed to it; e.g., multiline, numberOfLines below
824
+ * editable = {true}
825
+ * maxLength = {40}
826
+ * />
827
+ * );
828
+ * }
829
+ * }
830
+ *
831
+ * export default class UselessTextInputMultiline extends Component {
832
+ * constructor(props) {
833
+ * super(props);
834
+ * this.state = {
835
+ * text: 'Useless Multiline Placeholder',
836
+ * };
837
+ * }
838
+ *
839
+ * // If you type something in the text box that is a color, the background will change to that
840
+ * // color.
841
+ * render() {
842
+ * return (
843
+ * <View style={{
844
+ * backgroundColor: this.state.text,
845
+ * borderBottomColor: '#000000',
846
+ * borderBottomWidth: 1 }}
847
+ * >
848
+ * <UselessTextInput
849
+ * multiline = {true}
850
+ * numberOfLines = {4}
851
+ * onChangeText={(text) => this.setState({text})}
852
+ * value={this.state.text}
853
+ * />
854
+ * </View>
855
+ * );
856
+ * }
857
+ * }
858
+ *
859
+ * // skip these lines if using Create React Native App
860
+ * AppRegistry.registerComponent(
861
+ * 'AwesomeProject',
862
+ * () => UselessTextInputMultiline
863
+ * );
864
+ * ```
865
+ *
866
+ * `TextInput` has by default a border at the bottom of its view. This border
867
+ * has its padding set by the background image provided by the system, and it
868
+ * cannot be changed. Solutions to avoid this is to either not set height
869
+ * explicitly, case in which the system will take care of displaying the border
870
+ * in the correct position, or to not display the border by setting
871
+ * `underlineColorAndroid` to transparent.
872
+ *
873
+ * Note that on Android performing text selection in input can change
874
+ * app's activity `windowSoftInputMode` param to `adjustResize`.
875
+ * This may cause issues with components that have position: 'absolute'
876
+ * while keyboard is active. To avoid this behavior either specify `windowSoftInputMode`
877
+ * in AndroidManifest.xml ( https://developer.android.com/guide/topics/manifest/activity-element.html )
878
+ * or control this param programmatically with native code.
879
+ *
880
+ */
881
+ /**
882
+ * A foundational component for inputting text into the app via a
883
+ * keyboard. Props provide configurability for several features, such as
884
+ * auto-correction, auto-capitalization, placeholder text, and different keyboard
885
+ * types, such as a numeric keypad.
886
+ *
887
+ * The simplest use case is to plop down a `TextInput` and subscribe to the
888
+ * `onChangeText` events to read the user input. There are also other events,
889
+ * such as `onSubmitEditing` and `onFocus` that can be subscribed to. A simple
890
+ * example:
891
+ *
892
+ * ```ReactNativeWebPlayer
893
+ * import React, { Component } from 'react';
894
+ * import { AppRegistry, TextInput } from 'react-native';
895
+ *
896
+ * export default class UselessTextInput extends Component {
897
+ * constructor(props) {
898
+ * super(props);
899
+ * this.state = { text: 'Useless Placeholder' };
900
+ * }
901
+ *
902
+ * render() {
903
+ * return (
904
+ * <TextInput
905
+ * style={{height: 40, borderColor: 'gray', borderWidth: 1}}
906
+ * onChangeText={(text) => this.setState({text})}
907
+ * value={this.state.text}
908
+ * />
909
+ * );
910
+ * }
911
+ * }
912
+ *
913
+ * // skip this line if using Create React Native App
914
+ * AppRegistry.registerComponent('AwesomeProject', () => UselessTextInput);
915
+ * ```
916
+ *
917
+ * Two methods exposed via the native element are .focus() and .blur() that
918
+ * will focus or blur the TextInput programmatically.
919
+ *
920
+ * Note that some props are only available with `multiline={true/false}`.
921
+ * Additionally, border styles that apply to only one side of the element
922
+ * (e.g., `borderBottomColor`, `borderLeftWidth`, etc.) will not be applied if
923
+ * `multiline=false`. To achieve the same effect, you can wrap your `TextInput`
924
+ * in a `View`:
925
+ *
926
+ * ```ReactNativeWebPlayer
927
+ * import React, { Component } from 'react';
928
+ * import { AppRegistry, View, TextInput } from 'react-native';
929
+ *
930
+ * class UselessTextInput extends Component {
931
+ * render() {
932
+ * return (
933
+ * <TextInput
934
+ * {...this.props} // Inherit any props passed to it; e.g., multiline, numberOfLines below
935
+ * editable = {true}
936
+ * maxLength = {40}
937
+ * />
938
+ * );
939
+ * }
940
+ * }
941
+ *
942
+ * export default class UselessTextInputMultiline extends Component {
943
+ * constructor(props) {
944
+ * super(props);
945
+ * this.state = {
946
+ * text: 'Useless Multiline Placeholder',
947
+ * };
948
+ * }
949
+ *
950
+ * // If you type something in the text box that is a color, the background will change to that
951
+ * // color.
952
+ * render() {
953
+ * return (
954
+ * <View style={{
955
+ * backgroundColor: this.state.text,
956
+ * borderBottomColor: '#000000',
957
+ * borderBottomWidth: 1 }}
958
+ * >
959
+ * <UselessTextInput
960
+ * multiline = {true}
961
+ * numberOfLines = {4}
962
+ * onChangeText={(text) => this.setState({text})}
963
+ * value={this.state.text}
964
+ * />
965
+ * </View>
966
+ * );
967
+ * }
968
+ * }
969
+ *
970
+ * // skip these lines if using Create React Native App
971
+ * AppRegistry.registerComponent(
972
+ * 'AwesomeProject',
973
+ * () => UselessTextInputMultiline
974
+ * );
975
+ * ```
976
+ *
977
+ * `TextInput` has by default a border at the bottom of its view. This border
978
+ * has its padding set by the background image provided by the system, and it
979
+ * cannot be changed. Solutions to avoid this is to either not set height
980
+ * explicitly, case in which the system will take care of displaying the border
981
+ * in the correct position, or to not display the border by setting
982
+ * `underlineColorAndroid` to transparent.
983
+ *
984
+ * Note that on Android performing text selection in input can change
985
+ * app's activity `windowSoftInputMode` param to `adjustResize`.
986
+ * This may cause issues with components that have position: 'absolute'
987
+ * while keyboard is active. To avoid this behavior either specify `windowSoftInputMode`
988
+ * in AndroidManifest.xml ( https://developer.android.com/guide/topics/manifest/activity-element.html )
989
+ * or control this param programmatically with native code.
990
+ *
991
+ */
992
+ type InternalTextInput = (props: Omit<TextInputProps, keyof {
993
+ ref?: React.Ref<TextInputInstance>;
994
+ }> & {
995
+ ref?: React.Ref<TextInputInstance>;
996
+ }) => React.ReactNode;
997
+ export type TextInputComponentStatics = Readonly<{
998
+ State: Readonly<{
999
+ currentlyFocusedInput: () => HostInstance | undefined;
1000
+ currentlyFocusedField: () => number | undefined;
1001
+ focusTextInput: (textField: HostInstance | undefined) => void;
1002
+ blurTextInput: (textField: HostInstance | undefined) => void;
1003
+ }>;
1004
+ }>;
1005
+ export type TextInputType = InternalTextInput & TextInputComponentStatics;