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