react-native-windows 0.83.0-preview.2 → 0.84.0-preview.2

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 (221) hide show
  1. package/.flowconfig +2 -2
  2. package/Folly/Folly.vcxproj +2 -0
  3. package/Libraries/Animated/AnimatedEvent.js +2 -2
  4. package/Libraries/Animated/animations/Animation.js +1 -3
  5. package/Libraries/Animated/createAnimatedComponent.js +8 -5
  6. package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
  7. package/Libraries/Animated/nodes/AnimatedInterpolation.js +40 -4
  8. package/Libraries/Animated/nodes/AnimatedNode.js +3 -3
  9. package/Libraries/Animated/nodes/AnimatedObject.js +16 -11
  10. package/Libraries/Animated/nodes/AnimatedProps.js +43 -12
  11. package/Libraries/Animated/nodes/AnimatedStyle.js +12 -12
  12. package/Libraries/Animated/nodes/AnimatedValue.js +6 -3
  13. package/Libraries/Animated/nodes/AnimatedValueXY.js +1 -1
  14. package/Libraries/BatchedBridge/MessageQueue.js +24 -22
  15. package/Libraries/Blob/URL.js +34 -3
  16. package/Libraries/Blob/URLSearchParams.js +1 -0
  17. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +9 -1
  18. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +6 -1
  19. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +6 -1
  20. package/Libraries/Components/Button.js +2 -5
  21. package/Libraries/Components/Button.windows.js +2 -5
  22. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -1
  23. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidTypes.js +4 -4
  24. package/Libraries/Components/Keyboard/Keyboard.js +2 -2
  25. package/Libraries/Components/Pressable/Pressable.js +8 -8
  26. package/Libraries/Components/Pressable/Pressable.windows.js +14 -13
  27. package/Libraries/Components/TextInput/TextInput.flow.js +13 -13
  28. package/Libraries/Components/TextInput/TextInput.flow.windows.js +19 -18
  29. package/Libraries/Components/TextInput/TextInput.js +33 -34
  30. package/Libraries/Components/TextInput/TextInput.windows.js +40 -39
  31. package/Libraries/Components/Touchable/PooledClass.js +2 -2
  32. package/Libraries/Components/Touchable/TouchableBounce.js +3 -3
  33. package/Libraries/Components/Touchable/TouchableBounce.windows.js +3 -3
  34. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +1 -1
  35. package/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js +1 -1
  36. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +9 -9
  37. package/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +9 -9
  38. package/Libraries/Components/View/ViewPropTypes.js +16 -6
  39. package/Libraries/Components/View/ViewPropTypes.windows.js +21 -11
  40. package/Libraries/Core/Devtools/loadBundleFromServer.js +6 -3
  41. package/Libraries/Core/Devtools/loadBundleFromServer.windows.js +6 -3
  42. package/Libraries/Core/Devtools/symbolicateStackTrace.js +1 -1
  43. package/Libraries/Core/ExceptionsManager.js +3 -3
  44. package/Libraries/Core/RawEventEmitter.js +1 -1
  45. package/Libraries/Core/ReactFiberErrorDialog.js +1 -1
  46. package/Libraries/Core/ReactNativeVersion.js +3 -3
  47. package/Libraries/Core/setUpDeveloperTools.js +1 -1
  48. package/Libraries/Core/setUpErrorHandling.js +1 -1
  49. package/Libraries/EventEmitter/NativeEventEmitter.js +2 -2
  50. package/Libraries/Image/Image.android.js +2 -2
  51. package/Libraries/Image/Image.ios.js +2 -2
  52. package/Libraries/Image/Image.windows.js +2 -2
  53. package/Libraries/Image/ImageProps.js +1 -1
  54. package/Libraries/Image/ImageTypes.flow.js +2 -2
  55. package/Libraries/Interaction/InteractionManager.js +3 -3
  56. package/Libraries/Interaction/PanResponder.js +1 -1
  57. package/Libraries/LayoutAnimation/LayoutAnimation.js +1 -1
  58. package/Libraries/Linking/Linking.js +1 -1
  59. package/Libraries/Lists/FlatList.js +2 -2
  60. package/Libraries/LogBox/Data/LogBoxData.js +31 -4
  61. package/Libraries/LogBox/Data/LogBoxLog.js +2 -2
  62. package/Libraries/LogBox/Data/LogBoxSymbolication.js +1 -1
  63. package/Libraries/LogBox/Data/parseLogBoxLog.js +5 -5
  64. package/Libraries/LogBox/LogBox.js +7 -7
  65. package/Libraries/NativeComponent/BaseViewConfig.android.js +12 -0
  66. package/Libraries/NativeComponent/StaticViewConfigValidator.js +4 -4
  67. package/Libraries/NativeComponent/ViewConfigIgnore.js +1 -1
  68. package/Libraries/NativeComponent/ViewConfigIgnore.windows.js +1 -1
  69. package/Libraries/Network/RCTNetworking.android.js +3 -3
  70. package/Libraries/Network/RCTNetworking.ios.js +2 -2
  71. package/Libraries/Network/RCTNetworking.js.flow +2 -2
  72. package/Libraries/Network/RCTNetworking.windows.js +2 -2
  73. package/Libraries/Pressability/Pressability.js +9 -9
  74. package/Libraries/Pressability/Pressability.windows.js +17 -16
  75. package/Libraries/ReactNative/AppRegistry.flow.js +1 -1
  76. package/Libraries/ReactNative/BridgelessUIManager.js +1 -1
  77. package/Libraries/ReactNative/FabricUIManager.js +1 -1
  78. package/Libraries/ReactNative/PaperUIManager.js +1 -1
  79. package/Libraries/ReactNative/PaperUIManager.windows.js +1 -1
  80. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +1 -1
  81. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstanceUtils.js +2 -2
  82. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.js +1 -1
  83. package/Libraries/ReactNative/RendererImplementation.js +1 -1
  84. package/Libraries/ReactNative/getNativeComponentAttributes.js +1 -1
  85. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +1 -2
  86. package/Libraries/Renderer/implementations/ReactFabric-dev.js +3 -3
  87. package/Libraries/Renderer/implementations/ReactFabric-prod.js +3 -3
  88. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3 -3
  89. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +11 -4
  90. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +11 -4
  91. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +11 -4
  92. package/Libraries/Renderer/shims/ReactFabric.js +3 -1
  93. package/Libraries/Renderer/shims/ReactFeatureFlags.js +3 -1
  94. package/Libraries/Renderer/shims/ReactNative.js +2 -2
  95. package/Libraries/Renderer/shims/ReactNativeTypes.js +3 -1
  96. package/Libraries/Renderer/shims/ReactNativeTypes.windows.js +3 -1
  97. package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +3 -1
  98. package/Libraries/Renderer/shims/createReactNativeComponentClass.js +3 -1
  99. package/Libraries/Settings/Settings.ios.js +1 -1
  100. package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +2 -2
  101. package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +1 -1
  102. package/Libraries/StyleSheet/PlatformColorValueTypes.js.flow +4 -2
  103. package/Libraries/StyleSheet/StyleSheetExports.js +1 -1
  104. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +99 -4
  105. package/Libraries/StyleSheet/StyleSheetTypes.js +6 -8
  106. package/Libraries/StyleSheet/processFilter.js +1 -1
  107. package/Libraries/Text/Text.js +46 -6
  108. package/Libraries/Text/Text.windows.js +46 -6
  109. package/Libraries/Text/TextNativeComponent.js +1 -1
  110. package/Libraries/Text/TextProps.js +7 -7
  111. package/Libraries/Text/TextProps.windows.js +7 -7
  112. package/Libraries/Types/CodegenTypes.js +1 -1
  113. package/Libraries/Types/CoreEventTypes.js +31 -0
  114. package/Libraries/Types/CoreEventTypes.windows.js +31 -13
  115. package/Libraries/Types/ReactDevToolsTypes.js +2 -2
  116. package/Libraries/Utilities/Appearance.js +2 -2
  117. package/Libraries/Utilities/DevLoadingView.js +8 -1
  118. package/Libraries/Utilities/DevSettings.js +3 -3
  119. package/Libraries/Utilities/HMRClient.js +4 -3
  120. package/Libraries/Utilities/RCTLog.js +3 -3
  121. package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
  122. package/Libraries/Utilities/SceneTracker.js +1 -1
  123. package/Libraries/Utilities/codegenNativeCommands.js +1 -1
  124. package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +3 -3
  125. package/Libraries/Utilities/logError.js +1 -1
  126. package/Libraries/Utilities/stringifySafe.js +7 -7
  127. package/Libraries/Utilities/useRefEffect.js +1 -1
  128. package/Libraries/WebSocket/WebSocketInterceptor.js +3 -3
  129. package/Libraries/promiseRejectionTrackingOptions.js +8 -8
  130. package/Libraries/vendor/core/ErrorUtils.js +10 -10
  131. package/Libraries/vendor/emitter/EventEmitter.js +6 -6
  132. package/Microsoft.ReactNative/Fabric/AbiViewProps.cpp +5 -0
  133. package/Microsoft.ReactNative/Fabric/AbiViewProps.h +1 -0
  134. package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +25 -5
  135. package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +2 -1
  136. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +9 -3
  137. package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +2 -3
  138. package/Microsoft.ReactNative/Fabric/ReactTaggedView.h +2 -2
  139. package/Microsoft.ReactNative/IReactCompositionViewComponentBuilder.idl +2 -0
  140. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +6 -0
  141. package/Microsoft.ReactNative/ViewProps.idl +9 -0
  142. package/Microsoft.ReactNative.Cxx/ReactCommon/TurboModule.h +12 -2
  143. package/PropertySheets/Generated/PackageVersion.g.props +3 -3
  144. package/ReactCommon/ReactCommon.vcxproj +7 -1
  145. package/ReactCommon/ReactCommon.vcxproj.filters +0 -3
  146. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSIndexedRAMBundle.cpp +5 -5
  147. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/ReactMarker.cpp +0 -1
  148. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsiexecutor/jsireact/JSIExecutor.cpp +2 -43
  149. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h +12 -2
  150. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/attributedstring/TextAttributes.cpp +291 -0
  151. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/EventDispatcher.cpp +0 -1
  152. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/EventQueueProcessor.cpp +1 -3
  153. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/propsConversions.h +199 -0
  154. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/uimanager/UIManager.cpp +6 -0
  155. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +17 -10
  156. package/Scripts/creaternwapp.cmd +8 -1
  157. package/Scripts/creaternwlib.cmd +21 -2
  158. package/Shared/DevSettings.h +0 -3
  159. package/Shared/Modules/WebSocketModule.cpp +0 -1
  160. package/Shared/Modules/WebSocketModule.h +62 -3
  161. package/Shared/OInstance.cpp +5 -0
  162. package/Shared/Shared.vcxitems +4 -6
  163. package/Shared/Shared.vcxitems.filters +218 -709
  164. package/codegen/NativeAccessibilityManagerSpec.g.h +2 -0
  165. package/codegen/NativeAnimatedModuleSpec.g.h +21 -15
  166. package/codegen/NativeDevLoadingViewSpec.g.h +3 -3
  167. package/codegen/NativeIntentAndroidSpec.g.h +16 -3
  168. package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +209 -191
  169. package/codegen/react/components/rnwcore/EventEmitters.h +1 -0
  170. package/codegen/react/components/rnwcore/Props.h +14 -0
  171. package/codegen/rnwcoreJSI.h +246 -211
  172. package/index.js +3 -0
  173. package/index.windows.js +3 -0
  174. package/jest/mock.js +2 -2
  175. package/jest/mockComponent.js +1 -1
  176. package/jest/setup.js +1 -1
  177. package/package.json +22 -21
  178. package/src/private/animated/NativeAnimatedHelper.js +130 -125
  179. package/src/private/animated/NativeAnimatedValidation.js +7 -4
  180. package/src/private/animated/createAnimatedPropsHook.js +13 -5
  181. package/src/private/animated/createAnimatedPropsMemoHook.js +10 -10
  182. package/src/private/components/virtualview/VirtualView.js +16 -9
  183. package/src/private/components/virtualview/logger/VirtualViewLogger.js +21 -0
  184. package/src/private/components/virtualview/logger/VirtualViewLoggerTypes.js +24 -0
  185. package/src/private/devsupport/devmenu/elementinspector/ElementProperties.js +1 -1
  186. package/src/private/devsupport/devmenu/elementinspector/Inspector.js +6 -25
  187. package/src/private/devsupport/devmenu/elementinspector/InspectorPanel.js +1 -27
  188. package/src/private/devsupport/devmenu/elementinspector/XHRInterceptor.js +3 -2
  189. package/src/private/featureflags/ReactNativeFeatureFlags.js +63 -42
  190. package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +3 -3
  191. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +12 -9
  192. package/src/private/renderer/errorhandling/ErrorHandlers.js +7 -4
  193. package/src/private/specs_DEPRECATED/modules/NativeAccessibilityManager.js +1 -1
  194. package/src/private/specs_DEPRECATED/modules/NativeAnimatedModule.js +4 -0
  195. package/src/private/specs_DEPRECATED/modules/NativeDevLoadingView.js +1 -0
  196. package/src/private/webapis/dom/events/CustomEvent.js +3 -3
  197. package/src/private/webapis/dom/nodes/internals/ReactNativeDocumentElementInstanceHandle.js +1 -1
  198. package/src/private/webapis/dom/nodes/internals/ReactNativeDocumentInstanceHandle.js +1 -1
  199. package/src/private/webapis/dom/nodes/specs/NativeDOM.js +29 -29
  200. package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +1 -1
  201. package/src/private/webapis/dom/oldstylecollections/NodeList.js +2 -2
  202. package/src/private/webapis/geometry/DOMRectReadOnly.js +1 -1
  203. package/src/private/webapis/html/events/MessageEvent.js +3 -3
  204. package/src/private/webapis/idlecallbacks/specs/NativeIdleCallbacks.js +3 -3
  205. package/src/private/webapis/intersectionobserver/IntersectionObserver.js +53 -5
  206. package/src/private/webapis/intersectionobserver/internals/IntersectionObserverManager.js +2 -2
  207. package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +4 -4
  208. package/src/private/webapis/microtasks/specs/NativeMicrotasks.js +1 -1
  209. package/src/private/webapis/mutationobserver/MutationObserver.js +1 -1
  210. package/src/private/webapis/mutationobserver/MutationRecord.js +1 -1
  211. package/src/private/webapis/mutationobserver/specs/NativeMutationObserver.js +4 -4
  212. package/src/private/webapis/performance/Performance.js +1 -1
  213. package/src/private/webapis/performance/UserTiming.js +1 -1
  214. package/src/private/webapis/performance/specs/NativePerformance.js +3 -3
  215. package/src/private/webapis/structuredClone/structuredClone.js +3 -3
  216. package/src/types/globals.d.ts +30 -1
  217. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/image/conversions.h +0 -178
  218. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/imagemanager/primitives.h +0 -183
  219. package/Shared/Modules/WebSocketTurboModule.h +0 -71
  220. package/src/private/devsupport/devmenu/elementinspector/NetworkOverlay.js +0 -628
  221. package/src/private/devsupport/devmenu/perfmonitor/PerformanceOverlay.js +0 -66
@@ -15,7 +15,8 @@ import type {
15
15
  GestureResponderEvent,
16
16
  NativeSyntheticEvent,
17
17
  ScrollEvent,
18
- KeyEvent, // Windows
18
+ KeyUpEvent, // Windows
19
+ KeyDownEvent, // Windows
19
20
  MouseEvent, // Windows
20
21
  } from '../../Types/CoreEventTypes';
21
22
  import type {ViewProps} from '../View/ViewPropTypes';
@@ -564,10 +565,10 @@ export type TextInputWindowsProps = $ReadOnly<{|
564
565
  */
565
566
  onMouseEnter?: (args: MouseEvent) => void,
566
567
 
567
- onKeyDown?: (args: KeyEvent) => void,
568
- onKeyDownCapture?: (args: KeyEvent) => void,
569
- onKeyUp?: (args: KeyEvent) => void,
570
- onKeyUpCapture?: (args: KeyEvent) => void,
568
+ onKeyDown?: (args: KeyDownEvent) => void,
569
+ onKeyDownCapture?: (args: KeyDownEvent) => void,
570
+ onKeyUp?: (args: KeyUpEvent) => void,
571
+ onKeyUpCapture?: (args: KeyDownEvent) => void,
571
572
 
572
573
  keyDownEvents?: ?$ReadOnlyArray<HandledKeyboardEvent>,
573
574
  keyUpEvents?: ?$ReadOnlyArray<HandledKeyboardEvent>,
@@ -879,18 +880,18 @@ type TextInputBaseProps = $ReadOnly<{
879
880
  /**
880
881
  * Callback that is called when the text input is blurred.
881
882
  */
882
- onBlur?: ?(e: TextInputBlurEvent) => mixed,
883
+ onBlur?: ?(e: TextInputBlurEvent) => unknown,
883
884
 
884
885
  /**
885
886
  * Callback that is called when the text input's text changes.
886
887
  */
887
- onChange?: ?(e: TextInputChangeEvent) => mixed,
888
+ onChange?: ?(e: TextInputChangeEvent) => unknown,
888
889
 
889
890
  /**
890
891
  * Callback that is called when the text input's text changes.
891
892
  * Changed text is passed as an argument to the callback handler.
892
893
  */
893
- onChangeText?: ?(text: string) => mixed,
894
+ onChangeText?: ?(text: string) => unknown,
894
895
 
895
896
  /**
896
897
  * Callback that is called when the text input's content size changes.
@@ -899,17 +900,17 @@ type TextInputBaseProps = $ReadOnly<{
899
900
  *
900
901
  * Only called for multiline text inputs.
901
902
  */
902
- onContentSizeChange?: ?(e: TextInputContentSizeChangeEvent) => mixed,
903
+ onContentSizeChange?: ?(e: TextInputContentSizeChangeEvent) => unknown,
903
904
 
904
905
  /**
905
906
  * Callback that is called when text input ends.
906
907
  */
907
- onEndEditing?: ?(e: TextInputEndEditingEvent) => mixed,
908
+ onEndEditing?: ?(e: TextInputEndEditingEvent) => unknown,
908
909
 
909
910
  /**
910
911
  * Callback that is called when the text input is focused.
911
912
  */
912
- onFocus?: ?(e: TextInputFocusEvent) => mixed,
913
+ onFocus?: ?(e: TextInputFocusEvent) => unknown,
913
914
 
914
915
  /**
915
916
  * Callback that is called when a key is pressed.
@@ -918,42 +919,42 @@ type TextInputBaseProps = $ReadOnly<{
918
919
  * the typed-in character otherwise including `' '` for space.
919
920
  * Fires before `onChange` callbacks.
920
921
  */
921
- onKeyPress?: ?(e: TextInputKeyPressEvent) => mixed,
922
+ onKeyPress?: ?(e: TextInputKeyPressEvent) => unknown,
922
923
 
923
924
  /**
924
925
  * Called when a single tap gesture is detected.
925
926
  */
926
- onPress?: ?(event: GestureResponderEvent) => mixed,
927
+ onPress?: ?(event: GestureResponderEvent) => unknown,
927
928
 
928
929
  /**
929
930
  * Called when a touch is engaged.
930
931
  */
931
- onPressIn?: ?(event: GestureResponderEvent) => mixed,
932
+ onPressIn?: ?(event: GestureResponderEvent) => unknown,
932
933
 
933
934
  /**
934
935
  * Called when a touch is released.
935
936
  */
936
- onPressOut?: ?(event: GestureResponderEvent) => mixed,
937
+ onPressOut?: ?(event: GestureResponderEvent) => unknown,
937
938
 
938
939
  /**
939
940
  * Callback that is called when the text input selection is changed.
940
941
  * This will be called with
941
942
  * `{ nativeEvent: { selection: { start, end } } }`.
942
943
  */
943
- onSelectionChange?: ?(e: TextInputSelectionChangeEvent) => mixed,
944
+ onSelectionChange?: ?(e: TextInputSelectionChangeEvent) => unknown,
944
945
 
945
946
  /**
946
947
  * Callback that is called when the text input's submit button is pressed.
947
948
  * Invalid if `multiline={true}` is specified.
948
949
  */
949
- onSubmitEditing?: ?(e: TextInputSubmitEditingEvent) => mixed,
950
+ onSubmitEditing?: ?(e: TextInputSubmitEditingEvent) => unknown,
950
951
 
951
952
  /**
952
953
  * Invoked on content scroll with `{ nativeEvent: { contentOffset: { x, y } } }`.
953
954
  * May also contain other properties from ScrollEvent but on Android contentSize
954
955
  * is not provided for performance reasons.
955
956
  */
956
- onScroll?: ?(e: ScrollEvent) => mixed,
957
+ onScroll?: ?(e: ScrollEvent) => unknown,
957
958
 
958
959
  /**
959
960
  * The string that will be rendered before text input has been entered.
@@ -149,7 +149,7 @@ type TextInputStateType = $ReadOnly<{
149
149
  blurTextInput: (textField: ?HostInstance) => void,
150
150
  }>;
151
151
 
152
- type ViewCommands = $NonMaybeType<
152
+ type ViewCommands = NonNullable<
153
153
  | typeof AndroidTextInputCommands
154
154
  | typeof RCTMultilineTextInputNativeCommands
155
155
  | typeof RCTSinglelineTextInputNativeCommands,
@@ -188,8 +188,8 @@ function useTextInputStateSynchronization({
188
188
  const [lastNativeText, setLastNativeText] = useState<?Stringish>(props.value);
189
189
  const [lastNativeSelectionState, setLastNativeSelection] =
190
190
  useState<LastNativeSelection>({
191
- selection: {start: -1, end: -1},
192
- mostRecentEventCount: mostRecentEventCount,
191
+ mostRecentEventCount,
192
+ selection: {end: -1, start: -1},
193
193
  });
194
194
 
195
195
  const lastNativeSelection = lastNativeSelectionState.selection;
@@ -212,7 +212,7 @@ function useTextInputStateSynchronization({
212
212
  lastNativeSelection.end !== selection.end)
213
213
  ) {
214
214
  nativeUpdate.selection = selection;
215
- setLastNativeSelection({selection, mostRecentEventCount});
215
+ setLastNativeSelection({mostRecentEventCount, selection});
216
216
  }
217
217
 
218
218
  if (Object.keys(nativeUpdate).length === 0) {
@@ -240,7 +240,7 @@ function useTextInputStateSynchronization({
240
240
  viewCommands,
241
241
  ]);
242
242
 
243
- return {setLastNativeText, setLastNativeSelection};
243
+ return {setLastNativeSelection, setLastNativeText};
244
244
  }
245
245
 
246
246
  /**
@@ -377,8 +377,8 @@ function InternalTextInput(props: TextInputProps): React.Node {
377
377
  propsSelection == null
378
378
  ? null
379
379
  : {
380
- start: propsSelection.start,
381
380
  end: propsSelection.end ?? propsSelection.start,
381
+ start: propsSelection.start,
382
382
  };
383
383
 
384
384
  const text =
@@ -397,9 +397,9 @@ function InternalTextInput(props: TextInputProps): React.Node {
397
397
  const [mostRecentEventCount, setMostRecentEventCount] = useState<number>(0);
398
398
  const {setLastNativeText, setLastNativeSelection} =
399
399
  useTextInputStateSynchronization({
400
- props,
401
400
  inputRef,
402
401
  mostRecentEventCount,
402
+ props,
403
403
  selection,
404
404
  text,
405
405
  viewCommands,
@@ -469,13 +469,13 @@ function InternalTextInput(props: TextInputProps): React.Node {
469
469
  );
470
470
  }
471
471
  },
472
+ getNativeRef(): ?TextInputInstance {
473
+ return inputRef.current;
474
+ },
472
475
  // TODO: Fix this returning true on null === null, when no input is focused
473
476
  isFocused(): boolean {
474
477
  return TextInputState.currentlyFocusedInput() === inputRef.current;
475
478
  },
476
- getNativeRef(): ?TextInputInstance {
477
- return inputRef.current;
478
- },
479
479
  setSelection(start: number, end: number): void {
480
480
  if (inputRef.current != null) {
481
481
  viewCommands.setTextAndSelection(
@@ -525,8 +525,8 @@ function InternalTextInput(props: TextInputProps): React.Node {
525
525
  }
526
526
 
527
527
  setLastNativeSelection({
528
- selection: event.nativeEvent.selection,
529
528
  mostRecentEventCount,
529
+ selection: event.nativeEvent.selection,
530
530
  });
531
531
  };
532
532
 
@@ -590,6 +590,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
590
590
 
591
591
  const config = useMemo(
592
592
  () => ({
593
+ cancelable: Platform.OS === 'ios' ? !rejectResponderTermination : null,
593
594
  hitSlop,
594
595
  onPress: (event: GestureResponderEvent) => {
595
596
  onPress?.(event);
@@ -599,9 +600,8 @@ function InternalTextInput(props: TextInputProps): React.Node {
599
600
  }
600
601
  }
601
602
  },
602
- onPressIn: onPressIn,
603
- onPressOut: onPressOut,
604
- cancelable: Platform.OS === 'ios' ? !rejectResponderTermination : null,
603
+ onPressIn,
604
+ onPressOut,
605
605
  }),
606
606
  [
607
607
  editable,
@@ -740,12 +740,12 @@ function InternalTextInput(props: TextInputProps): React.Node {
740
740
  }
741
741
  // For consistency with iOS set cursor/selectionHandle color as selectionColor
742
742
  const colorProps = {
743
+ cursorColor: cursorColor === undefined ? selectionColor : cursorColor,
743
744
  selectionColor,
744
745
  selectionHandleColor:
745
746
  selectionHandleColor === undefined
746
747
  ? selectionColor
747
748
  : selectionHandleColor,
748
- cursorColor: cursorColor === undefined ? selectionColor : cursorColor,
749
749
  };
750
750
  textInput = (
751
751
  /* $FlowFixMe[prop-missing] the types for AndroidTextInput don't match up
@@ -799,8 +799,8 @@ function InternalTextInput(props: TextInputProps): React.Node {
799
799
  }
800
800
 
801
801
  const enterKeyHintToReturnTypeMap = {
802
- enter: 'default',
803
802
  done: 'done',
803
+ enter: 'default',
804
804
  go: 'go',
805
805
  next: 'next',
806
806
  previous: 'previous',
@@ -809,19 +809,20 @@ const enterKeyHintToReturnTypeMap = {
809
809
  } as const;
810
810
 
811
811
  const inputModeToKeyboardTypeMap = {
812
- none: 'default',
813
- text: 'default',
814
812
  decimal: 'decimal-pad',
813
+ email: 'email-address',
814
+ none: 'default',
815
815
  numeric: 'number-pad',
816
- tel: 'phone-pad',
817
816
  search:
818
817
  Platform.OS === 'ios' ? ('web-search' as const) : ('default' as const),
819
- email: 'email-address',
818
+ tel: 'phone-pad',
819
+ text: 'default',
820
820
  url: 'url',
821
821
  } as const;
822
822
 
823
823
  // Map HTML autocomplete values to Android autoComplete values
824
824
  const autoCompleteWebToAutoCompleteAndroidMap = {
825
+ 'additional-name': 'name-middle',
825
826
  'address-line1': 'postal-address-region',
826
827
  'address-line2': 'postal-address-locality',
827
828
  bday: 'birthdate-full',
@@ -836,12 +837,11 @@ const autoCompleteWebToAutoCompleteAndroidMap = {
836
837
  country: 'postal-address-country',
837
838
  'current-password': 'password',
838
839
  email: 'email',
840
+ 'family-name': 'name-family',
841
+ 'given-name': 'name-given',
839
842
  'honorific-prefix': 'name-prefix',
840
843
  'honorific-suffix': 'name-suffix',
841
844
  name: 'name',
842
- 'additional-name': 'name-middle',
843
- 'family-name': 'name-family',
844
- 'given-name': 'name-given',
845
845
  'new-password': 'password-new',
846
846
  off: 'off',
847
847
  'one-time-code': 'sms-otp',
@@ -856,33 +856,33 @@ const autoCompleteWebToAutoCompleteAndroidMap = {
856
856
 
857
857
  // Map HTML autocomplete values to iOS textContentType values
858
858
  const autoCompleteWebToTextContentTypeMap = {
859
+ 'additional-name': 'middleName',
859
860
  'address-line1': 'streetAddressLine1',
860
861
  'address-line2': 'streetAddressLine2',
861
862
  bday: 'birthdate',
862
863
  'bday-day': 'birthdateDay',
863
864
  'bday-month': 'birthdateMonth',
864
865
  'bday-year': 'birthdateYear',
866
+ 'cc-additional-name': 'creditCardMiddleName',
865
867
  'cc-csc': 'creditCardSecurityCode',
868
+ 'cc-exp': 'creditCardExpiration',
866
869
  'cc-exp-month': 'creditCardExpirationMonth',
867
870
  'cc-exp-year': 'creditCardExpirationYear',
868
- 'cc-exp': 'creditCardExpiration',
869
- 'cc-given-name': 'creditCardGivenName',
870
- 'cc-additional-name': 'creditCardMiddleName',
871
871
  'cc-family-name': 'creditCardFamilyName',
872
+ 'cc-given-name': 'creditCardGivenName',
872
873
  'cc-name': 'creditCardName',
873
874
  'cc-number': 'creditCardNumber',
874
875
  'cc-type': 'creditCardType',
875
- 'current-password': 'password',
876
876
  country: 'countryName',
877
+ 'current-password': 'password',
877
878
  email: 'emailAddress',
878
- name: 'name',
879
- 'additional-name': 'middleName',
880
879
  'family-name': 'familyName',
881
880
  'given-name': 'givenName',
882
- nickname: 'nickname',
883
881
  'honorific-prefix': 'namePrefix',
884
882
  'honorific-suffix': 'nameSuffix',
883
+ name: 'name',
885
884
  'new-password': 'newPassword',
885
+ nickname: 'nickname',
886
886
  off: 'none',
887
887
  'one-time-code': 'oneTimeCode',
888
888
  organization: 'organizationName',
@@ -959,11 +959,10 @@ TextInput.displayName = 'TextInput';
959
959
 
960
960
  // $FlowFixMe[prop-missing]
961
961
  TextInput.State = {
962
- currentlyFocusedInput: TextInputState.currentlyFocusedInput,
963
-
962
+ blurTextInput: TextInputState.blurTextInput,
964
963
  currentlyFocusedField: TextInputState.currentlyFocusedField,
964
+ currentlyFocusedInput: TextInputState.currentlyFocusedInput,
965
965
  focusTextInput: TextInputState.focusTextInput,
966
- blurTextInput: TextInputState.blurTextInput,
967
966
  };
968
967
 
969
968
  export type TextInputComponentStatics = $ReadOnly<{
@@ -981,9 +980,9 @@ const styles = StyleSheet.create({
981
980
 
982
981
  const verticalAlignToTextAlignVerticalMap = {
983
982
  auto: 'auto',
984
- top: 'top',
985
983
  bottom: 'bottom',
986
984
  middle: 'center',
985
+ top: 'top',
987
986
  } as const;
988
987
 
989
988
  // $FlowFixMe[unclear-type] Unclear type. Using `any` type is not safe.
@@ -13,7 +13,8 @@ import type {____TextStyle_Internal as TextStyleInternal} from '../../StyleSheet
13
13
  import type {
14
14
  BlurEvent,
15
15
  FocusEvent,
16
- KeyEvent, // Windows
16
+ KeyUpEvent, // Windows
17
+ KeyDownEvent, // Windows
17
18
  MouseEvent, // Windows
18
19
  GestureResponderEvent,
19
20
  ScrollEvent,
@@ -164,7 +165,7 @@ type TextInputStateType = $ReadOnly<{
164
165
  blurTextInput: (textField: ?HostInstance) => void,
165
166
  }>;
166
167
 
167
- type ViewCommands = $NonMaybeType<
168
+ type ViewCommands = NonNullable<
168
169
  | typeof AndroidTextInputCommands
169
170
  | typeof RCTMultilineTextInputNativeCommands
170
171
  | typeof RCTSinglelineTextInputNativeCommands,
@@ -203,8 +204,8 @@ function useTextInputStateSynchronization({
203
204
  const [lastNativeText, setLastNativeText] = useState<?Stringish>(props.value);
204
205
  const [lastNativeSelectionState, setLastNativeSelection] =
205
206
  useState<LastNativeSelection>({
206
- selection: {start: -1, end: -1},
207
- mostRecentEventCount: mostRecentEventCount,
207
+ mostRecentEventCount,
208
+ selection: {end: -1, start: -1},
208
209
  });
209
210
 
210
211
  const lastNativeSelection = lastNativeSelectionState.selection;
@@ -227,7 +228,7 @@ function useTextInputStateSynchronization({
227
228
  lastNativeSelection.end !== selection.end)
228
229
  ) {
229
230
  nativeUpdate.selection = selection;
230
- setLastNativeSelection({selection, mostRecentEventCount});
231
+ setLastNativeSelection({mostRecentEventCount, selection});
231
232
  }
232
233
 
233
234
  if (Object.keys(nativeUpdate).length === 0) {
@@ -255,7 +256,7 @@ function useTextInputStateSynchronization({
255
256
  viewCommands,
256
257
  ]);
257
258
 
258
- return {setLastNativeText, setLastNativeSelection};
259
+ return {setLastNativeSelection, setLastNativeText};
259
260
  }
260
261
 
261
262
  /**
@@ -401,8 +402,8 @@ function InternalTextInput(props: TextInputProps): React.Node {
401
402
  propsSelection == null
402
403
  ? null
403
404
  : {
404
- start: propsSelection.start,
405
405
  end: propsSelection.end ?? propsSelection.start,
406
+ start: propsSelection.start,
406
407
  };
407
408
 
408
409
  const text =
@@ -422,9 +423,9 @@ function InternalTextInput(props: TextInputProps): React.Node {
422
423
  const [mostRecentEventCount, setMostRecentEventCount] = useState<number>(0);
423
424
  const {setLastNativeText, setLastNativeSelection} =
424
425
  useTextInputStateSynchronization({
425
- props,
426
426
  inputRef,
427
427
  mostRecentEventCount,
428
+ props,
428
429
  selection,
429
430
  text,
430
431
  // $FlowFixMe[incompatible-call]
@@ -496,6 +497,10 @@ function InternalTextInput(props: TextInputProps): React.Node {
496
497
  );
497
498
  }
498
499
  },
500
+ getNativeRef(): ?TextInputInstance {
501
+ return inputRef.current;
502
+ },
503
+ // TODO: Fix this returning true on null === null, when no input is focused
499
504
  isFocused(): boolean {
500
505
  const currentlyFocusedInput =
501
506
  TextInputState.currentlyFocusedInput();
@@ -504,9 +509,6 @@ function InternalTextInput(props: TextInputProps): React.Node {
504
509
  currentlyFocusedInput === inputRef.current
505
510
  );
506
511
  },
507
- getNativeRef(): ?TextInputInstance {
508
- return inputRef.current;
509
- },
510
512
  setSelection(start: number, end: number): void {
511
513
  if (inputRef.current != null) {
512
514
  viewCommands.setTextAndSelection(
@@ -556,8 +558,8 @@ function InternalTextInput(props: TextInputProps): React.Node {
556
558
  }
557
559
 
558
560
  setLastNativeSelection({
559
- selection: event.nativeEvent.selection,
560
561
  mostRecentEventCount,
562
+ selection: event.nativeEvent.selection,
561
563
  });
562
564
  };
563
565
 
@@ -627,6 +629,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
627
629
 
628
630
  const config = useMemo(
629
631
  () => ({
632
+ cancelable: Platform.OS === 'ios' ? !rejectResponderTermination : null,
630
633
  hitSlop,
631
634
  onPress: (event: GestureResponderEvent) => {
632
635
  onPress?.(event);
@@ -636,9 +639,8 @@ function InternalTextInput(props: TextInputProps): React.Node {
636
639
  }
637
640
  }
638
641
  },
639
- onPressIn: onPressIn,
640
- onPressOut: onPressOut,
641
- cancelable: Platform.OS === 'ios' ? !rejectResponderTermination : null,
642
+ onPressIn,
643
+ onPressOut,
642
644
  }),
643
645
  [
644
646
  editable,
@@ -661,7 +663,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
661
663
  // so omitting onBlur and onFocus pressability handlers here.
662
664
  const {onBlur, onFocus, ...eventHandlers} = usePressability(config);
663
665
  const eventPhase = Object.freeze({Capturing: 1, Bubbling: 3});
664
- const _keyDown = (event: KeyEvent) => {
666
+ const _keyDown = (event: KeyDownEvent) => {
665
667
  if (props.keyDownEvents && event.isPropagationStopped() !== true) {
666
668
  // $FlowFixMe[incompatible-type] - keyDownEvents was already checked to not be undefined
667
669
  for (const el of props.keyDownEvents) {
@@ -680,7 +682,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
680
682
  props.onKeyDown && props.onKeyDown(event);
681
683
  };
682
684
 
683
- const _keyUp = (event: KeyEvent) => {
685
+ const _keyUp = (event: KeyUpEvent) => {
684
686
  if (props.keyUpEvents && event.isPropagationStopped() !== true) {
685
687
  // $FlowFixMe[incompatible-type] - keyUpEvents was already checked to not be undefined
686
688
  for (const el of props.keyUpEvents) {
@@ -699,7 +701,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
699
701
  props.onKeyUp && props.onKeyUp(event);
700
702
  };
701
703
 
702
- const _keyDownCapture = (event: KeyEvent) => {
704
+ const _keyDownCapture = (event: KeyDownEvent) => {
703
705
  if (props.keyDownEvents && event.isPropagationStopped() !== true) {
704
706
  // $FlowFixMe[incompatible-type] - keyDownEvents was already checked to not be undefined
705
707
  for (const el of props.keyDownEvents) {
@@ -718,7 +720,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
718
720
  props.onKeyDownCapture && props.onKeyDownCapture(event);
719
721
  };
720
722
 
721
- const _keyUpCapture = (event: KeyEvent) => {
723
+ const _keyUpCapture = (event: KeyUpEvent) => {
722
724
  if (props.keyUpEvents && event.isPropagationStopped() !== true) {
723
725
  // $FlowFixMe[incompatible-type] - keyUpEvents was already checked to not be undefined
724
726
  for (const el of props.keyUpEvents) {
@@ -864,12 +866,12 @@ function InternalTextInput(props: TextInputProps): React.Node {
864
866
  }
865
867
  // For consistency with iOS set cursor/selectionHandle color as selectionColor
866
868
  const colorProps = {
869
+ cursorColor: cursorColor === undefined ? selectionColor : cursorColor,
867
870
  selectionColor,
868
871
  selectionHandleColor:
869
872
  selectionHandleColor === undefined
870
873
  ? selectionColor
871
874
  : selectionHandleColor,
872
- cursorColor: cursorColor === undefined ? selectionColor : cursorColor,
873
875
  };
874
876
  textInput = (
875
877
  /* $FlowFixMe[prop-missing] the types for AndroidTextInput don't match up
@@ -974,8 +976,8 @@ function InternalTextInput(props: TextInputProps): React.Node {
974
976
  }
975
977
 
976
978
  const enterKeyHintToReturnTypeMap = {
977
- enter: 'default',
978
979
  done: 'done',
980
+ enter: 'default',
979
981
  go: 'go',
980
982
  next: 'next',
981
983
  previous: 'previous',
@@ -984,19 +986,20 @@ const enterKeyHintToReturnTypeMap = {
984
986
  } as const;
985
987
 
986
988
  const inputModeToKeyboardTypeMap = {
987
- none: 'default',
988
- text: 'default',
989
989
  decimal: 'decimal-pad',
990
+ email: 'email-address',
991
+ none: 'default',
990
992
  numeric: 'number-pad',
991
- tel: 'phone-pad',
992
993
  search:
993
994
  Platform.OS === 'ios' ? ('web-search' as const) : ('default' as const),
994
- email: 'email-address',
995
+ tel: 'phone-pad',
996
+ text: 'default',
995
997
  url: 'url',
996
998
  } as const;
997
999
 
998
1000
  // Map HTML autocomplete values to Android autoComplete values
999
1001
  const autoCompleteWebToAutoCompleteAndroidMap = {
1002
+ 'additional-name': 'name-middle',
1000
1003
  'address-line1': 'postal-address-region',
1001
1004
  'address-line2': 'postal-address-locality',
1002
1005
  bday: 'birthdate-full',
@@ -1011,12 +1014,11 @@ const autoCompleteWebToAutoCompleteAndroidMap = {
1011
1014
  country: 'postal-address-country',
1012
1015
  'current-password': 'password',
1013
1016
  email: 'email',
1017
+ 'family-name': 'name-family',
1018
+ 'given-name': 'name-given',
1014
1019
  'honorific-prefix': 'name-prefix',
1015
1020
  'honorific-suffix': 'name-suffix',
1016
1021
  name: 'name',
1017
- 'additional-name': 'name-middle',
1018
- 'family-name': 'name-family',
1019
- 'given-name': 'name-given',
1020
1022
  'new-password': 'password-new',
1021
1023
  off: 'off',
1022
1024
  'one-time-code': 'sms-otp',
@@ -1031,33 +1033,33 @@ const autoCompleteWebToAutoCompleteAndroidMap = {
1031
1033
 
1032
1034
  // Map HTML autocomplete values to iOS textContentType values
1033
1035
  const autoCompleteWebToTextContentTypeMap = {
1036
+ 'additional-name': 'middleName',
1034
1037
  'address-line1': 'streetAddressLine1',
1035
1038
  'address-line2': 'streetAddressLine2',
1036
1039
  bday: 'birthdate',
1037
1040
  'bday-day': 'birthdateDay',
1038
1041
  'bday-month': 'birthdateMonth',
1039
1042
  'bday-year': 'birthdateYear',
1043
+ 'cc-additional-name': 'creditCardMiddleName',
1040
1044
  'cc-csc': 'creditCardSecurityCode',
1045
+ 'cc-exp': 'creditCardExpiration',
1041
1046
  'cc-exp-month': 'creditCardExpirationMonth',
1042
1047
  'cc-exp-year': 'creditCardExpirationYear',
1043
- 'cc-exp': 'creditCardExpiration',
1044
- 'cc-given-name': 'creditCardGivenName',
1045
- 'cc-additional-name': 'creditCardMiddleName',
1046
1048
  'cc-family-name': 'creditCardFamilyName',
1049
+ 'cc-given-name': 'creditCardGivenName',
1047
1050
  'cc-name': 'creditCardName',
1048
1051
  'cc-number': 'creditCardNumber',
1049
1052
  'cc-type': 'creditCardType',
1050
- 'current-password': 'password',
1051
1053
  country: 'countryName',
1054
+ 'current-password': 'password',
1052
1055
  email: 'emailAddress',
1053
- name: 'name',
1054
- 'additional-name': 'middleName',
1055
1056
  'family-name': 'familyName',
1056
1057
  'given-name': 'givenName',
1057
- nickname: 'nickname',
1058
1058
  'honorific-prefix': 'namePrefix',
1059
1059
  'honorific-suffix': 'nameSuffix',
1060
+ name: 'name',
1060
1061
  'new-password': 'newPassword',
1062
+ nickname: 'nickname',
1061
1063
  off: 'none',
1062
1064
  'one-time-code': 'oneTimeCode',
1063
1065
  organization: 'organizationName',
@@ -1134,11 +1136,10 @@ TextInput.displayName = 'TextInput';
1134
1136
 
1135
1137
  // $FlowFixMe[prop-missing]
1136
1138
  TextInput.State = {
1137
- currentlyFocusedInput: TextInputState.currentlyFocusedInput,
1138
-
1139
+ blurTextInput: TextInputState.blurTextInput,
1139
1140
  currentlyFocusedField: TextInputState.currentlyFocusedField,
1141
+ currentlyFocusedInput: TextInputState.currentlyFocusedInput,
1140
1142
  focusTextInput: TextInputState.focusTextInput,
1141
- blurTextInput: TextInputState.blurTextInput,
1142
1143
  };
1143
1144
 
1144
1145
  export type TextInputComponentStatics = $ReadOnly<{
@@ -1156,9 +1157,9 @@ const styles = StyleSheet.create({
1156
1157
 
1157
1158
  const verticalAlignToTextAlignVerticalMap = {
1158
1159
  auto: 'auto',
1159
- top: 'top',
1160
1160
  bottom: 'bottom',
1161
1161
  middle: 'center',
1162
+ top: 'top',
1162
1163
  } as const;
1163
1164
 
1164
1165
  // $FlowFixMe[unclear-type] Unclear type. Using `any` type is not safe.
@@ -105,9 +105,9 @@ const addPoolingTo = function <T>(
105
105
  pooler: Pooler,
106
106
  ): Class<T> & {
107
107
  getPooled(
108
- ...args: $ReadOnlyArray<mixed>
108
+ ...args: $ReadOnlyArray<unknown>
109
109
  ): /* arguments of the constructor */ T,
110
- release(instance: mixed): void,
110
+ release(instance: unknown): void,
111
111
  ...
112
112
  } {
113
113
  // Casting as any so that flow ignores the actual implementation and trusts
@@ -211,7 +211,7 @@ class TouchableBounce extends React.Component<
211
211
  this.state.pressability.configure(this._createPressabilityConfig());
212
212
  }
213
213
 
214
- componentDidMount(): mixed {
214
+ componentDidMount(): unknown {
215
215
  this.state.pressability.configure(this._createPressabilityConfig());
216
216
  }
217
217
 
@@ -225,11 +225,11 @@ export default (function TouchableBounceWrapper({
225
225
  ref: hostRef,
226
226
  ...props
227
227
  }: {
228
- ref: React.RefSetter<mixed>,
228
+ ref: React.RefSetter<unknown>,
229
229
  ...$ReadOnly<Omit<TouchableBounceProps, 'hostRef'>>,
230
230
  }) {
231
231
  return <TouchableBounce {...props} hostRef={hostRef} />;
232
232
  } as component(
233
- ref?: React.RefSetter<mixed>,
233
+ ref?: React.RefSetter<unknown>,
234
234
  ...props: $ReadOnly<Omit<TouchableBounceProps, 'hostRef'>>
235
235
  ));
@@ -218,7 +218,7 @@ class TouchableBounce extends React.Component<
218
218
  this.state.pressability.configure(this._createPressabilityConfig());
219
219
  }
220
220
 
221
- componentDidMount(): mixed {
221
+ componentDidMount(): unknown {
222
222
  this.state.pressability.configure(this._createPressabilityConfig());
223
223
  }
224
224
 
@@ -232,11 +232,11 @@ export default (function TouchableBounceWrapper({
232
232
  ref: hostRef,
233
233
  ...props
234
234
  }: {
235
- ref: React.RefSetter<mixed>,
235
+ ref: React.RefSetter<unknown>,
236
236
  ...$ReadOnly<Omit<TouchableBounceProps, 'hostRef'>>,
237
237
  }) {
238
238
  return <TouchableBounce {...props} hostRef={hostRef} />;
239
239
  } as component(
240
- ref?: React.RefSetter<mixed>,
240
+ ref?: React.RefSetter<unknown>,
241
241
  ...props: $ReadOnly<Omit<TouchableBounceProps, 'hostRef'>>
242
242
  ));