@office-iss/react-native-win32 0.0.0-canary.291 → 0.0.0-canary.292

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 (127) hide show
  1. package/.flowconfig +1 -1
  2. package/CHANGELOG.json +16 -1
  3. package/CHANGELOG.md +12 -4
  4. package/Libraries/Alert/RCTAlertManager.js +17 -0
  5. package/Libraries/Animated/AnimatedEvent.js +4 -3
  6. package/Libraries/Animated/AnimatedExports.js.flow +2 -0
  7. package/Libraries/Animated/AnimatedImplementation.js +2 -2
  8. package/Libraries/Animated/components/AnimatedScrollView.js +48 -43
  9. package/Libraries/Animated/nodes/AnimatedValue.js +2 -1
  10. package/Libraries/BatchedBridge/MessageQueue.js +2 -2
  11. package/Libraries/Blob/FileReader.js +219 -8
  12. package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.js +17 -0
  13. package/Libraries/Components/Button.js +1 -1
  14. package/Libraries/Components/Button.win32.js +1 -1
  15. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -3
  16. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.ios.js +15 -0
  17. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +6 -66
  18. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js.flow +18 -0
  19. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidFallback.js +71 -0
  20. package/Libraries/Components/Keyboard/Keyboard.js +4 -2
  21. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +6 -3
  22. package/Libraries/Components/Pressable/Pressable.js +2 -0
  23. package/Libraries/Components/Pressable/Pressable.win32.js +2 -0
  24. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +12 -2
  25. package/Libraries/Components/RefreshControl/RefreshControl.js +1 -1
  26. package/Libraries/Components/ScrollView/ScrollView.js +128 -116
  27. package/Libraries/Components/StaticRenderer.js +1 -1
  28. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +1 -1
  29. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -4
  30. package/Libraries/Components/TextInput/TextInput.flow.js +35 -43
  31. package/Libraries/Components/TextInput/TextInput.flow.win32.js +1184 -0
  32. package/Libraries/Components/TextInput/TextInput.js +65 -1005
  33. package/Libraries/Components/TextInput/TextInput.win32.js +67 -1037
  34. package/Libraries/Components/ToastAndroid/ToastAndroid.ios.js +13 -0
  35. package/Libraries/Components/ToastAndroid/ToastAndroid.js +4 -32
  36. package/Libraries/Components/ToastAndroid/ToastAndroid.js.flow +109 -0
  37. package/Libraries/Components/ToastAndroid/ToastAndroid.win32.js +4 -32
  38. package/Libraries/Components/ToastAndroid/ToastAndroidFallback.js +45 -0
  39. package/Libraries/Components/Touchable/Touchable.js +5 -5
  40. package/Libraries/Components/Touchable/Touchable.win32.js +5 -5
  41. package/Libraries/Components/Touchable/TouchableBounce.js +12 -6
  42. package/Libraries/Components/Touchable/TouchableHighlight.js +9 -6
  43. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +4 -4
  44. package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +4 -4
  45. package/Libraries/Components/Touchable/TouchableOpacity.js +11 -5
  46. package/Libraries/Components/View/ViewAccessibility.js +7 -0
  47. package/Libraries/Components/View/ViewAccessibility.win32.js +7 -0
  48. package/Libraries/Components/View/ViewPropTypes.js +1 -1
  49. package/Libraries/Components/View/ViewPropTypes.win32.js +1 -1
  50. package/Libraries/Core/ReactNativeVersion.js +1 -1
  51. package/Libraries/EventEmitter/NativeEventEmitter.js +4 -1
  52. package/Libraries/Image/Image.js +17 -0
  53. package/Libraries/Image/Image.js.flow +2 -2
  54. package/Libraries/Image/ImageInjection.js +1 -1
  55. package/Libraries/Image/ImageProps.js +5 -4
  56. package/Libraries/Image/ImageTypes.flow.js +1 -1
  57. package/Libraries/Lists/FlatList.js +1 -1
  58. package/Libraries/Lists/SectionList.js +1 -1
  59. package/Libraries/Lists/SectionListModern.js +2 -1
  60. package/Libraries/LogBox/LogBoxNotificationContainer.js +1 -1
  61. package/Libraries/Modal/Modal.js +3 -3
  62. package/Libraries/NativeComponent/BaseViewConfig.js +17 -0
  63. package/Libraries/NativeComponent/PlatformBaseViewConfig.js +2 -2
  64. package/Libraries/Network/RCTNetworking.js +17 -0
  65. package/Libraries/Network/XMLHttpRequest.js +781 -10
  66. package/Libraries/NewAppScreen/components/DebugInstructions.js +1 -1
  67. package/Libraries/NewAppScreen/components/Header.js +1 -1
  68. package/Libraries/NewAppScreen/components/HermesBadge.js +1 -1
  69. package/Libraries/NewAppScreen/components/LearnMoreLinks.js +3 -3
  70. package/Libraries/NewAppScreen/components/ReloadInstructions.js +1 -1
  71. package/Libraries/Performance/Systrace.js +7 -7
  72. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +2 -2
  73. package/Libraries/Settings/Settings.js +13 -19
  74. package/Libraries/Settings/Settings.win32.js +19 -20
  75. package/Libraries/Settings/SettingsFallback.js +33 -0
  76. package/Libraries/StyleSheet/PlatformColorValueTypes.js +15 -0
  77. package/Libraries/StyleSheet/Rect.js +1 -0
  78. package/Libraries/StyleSheet/StyleSheet.js.flow +3 -3
  79. package/Libraries/StyleSheet/StyleSheetTypes.js +28 -30
  80. package/Libraries/StyleSheet/flattenStyle.js +7 -1
  81. package/Libraries/Text/Text.js +3 -3
  82. package/Libraries/Text/Text.win32.js +3 -3
  83. package/Libraries/Text/TextProps.js +1 -1
  84. package/Libraries/Text/TextProps.win32.js +1 -1
  85. package/Libraries/Utilities/Appearance.js +2 -0
  86. package/Libraries/Utilities/BackHandler.js +17 -0
  87. package/Libraries/Utilities/Platform.js +17 -0
  88. package/Libraries/Utilities/PlatformTypes.js +2 -0
  89. package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
  90. package/Libraries/WebSocket/WebSocket.js +313 -8
  91. package/flow/global.js +0 -2
  92. package/index.win32.js +5 -5
  93. package/overrides.json +23 -17
  94. package/package.json +12 -12
  95. package/src/private/animated/NativeAnimatedHelper.js +1 -1
  96. package/src/private/animated/NativeAnimatedHelper.win32.js +1 -1
  97. package/src/private/animated/createAnimatedPropsHook.js +2 -27
  98. package/src/private/components/{SafeAreaView_INTERNAL_DO_NOT_USE.js → safeareaview/SafeAreaView_INTERNAL_DO_NOT_USE.js} +6 -6
  99. package/src/private/components/{HScrollViewNativeComponents.js → scrollview/HScrollViewNativeComponents.js} +8 -8
  100. package/src/private/components/scrollview/VScrollViewNativeComponents.js +25 -0
  101. package/src/private/featureflags/ReactNativeFeatureFlags.js +21 -32
  102. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +5 -6
  103. package/src/private/inspector/BorderBox.js +1 -1
  104. package/src/private/inspector/BoxInspector.js +1 -1
  105. package/src/private/inspector/ElementBox.js +1 -1
  106. package/src/private/inspector/ElementProperties.js +1 -1
  107. package/src/private/inspector/Inspector.js +2 -2
  108. package/src/private/inspector/InspectorOverlay.js +1 -1
  109. package/src/private/inspector/InspectorPanel.js +1 -1
  110. package/src/private/inspector/NetworkOverlay.js +1 -1
  111. package/src/private/inspector/PerformanceOverlay.js +1 -1
  112. package/src/private/inspector/StyleInspector.js +1 -1
  113. package/src/private/types/HostComponent.js +1 -1
  114. package/src/private/types/HostInstance.js +10 -2
  115. package/src/private/webapis/performance/Performance.js +1 -3
  116. package/Libraries/Blob/FileReader_new.js +0 -231
  117. package/Libraries/Blob/FileReader_old.js +0 -186
  118. package/Libraries/Events/CustomEvent.js +0 -32
  119. package/Libraries/Events/EventPolyfill.js +0 -239
  120. package/Libraries/Network/XMLHttpRequest_new.js +0 -794
  121. package/Libraries/Network/XMLHttpRequest_old.js +0 -701
  122. package/Libraries/WebSocket/WebSocketEvent.js +0 -30
  123. package/Libraries/WebSocket/WebSocket_new.js +0 -325
  124. package/Libraries/WebSocket/WebSocket_old.js +0 -297
  125. package/Libraries/WebSocket/__mocks__/event-target-shim.js +0 -27
  126. package/src/private/components/VScrollViewNativeComponents.js +0 -25
  127. package/src/types/third_party/event-target-shim.d.ts +0 -392
@@ -23,13 +23,17 @@ import {
23
23
  } from '../../StyleSheet/StyleSheet';
24
24
  import * as React from 'react';
25
25
 
26
+ /**
27
+ * @see TextInputProps.onChange
28
+ */
26
29
  type TextInputChangeEventData = $ReadOnly<{
27
30
  eventCount: number,
28
31
  target: number,
29
32
  text: string,
30
33
  }>;
31
34
 
32
- type TextInputChangeEvent = NativeSyntheticEvent<TextInputChangeEventData>;
35
+ export type TextInputChangeEvent =
36
+ NativeSyntheticEvent<TextInputChangeEventData>;
33
37
 
34
38
  export type TextInputEvent = NativeSyntheticEvent<
35
39
  $ReadOnly<{
@@ -52,19 +56,30 @@ type TextInputContentSizeChangeEventData = $ReadOnly<{
52
56
  }>,
53
57
  }>;
54
58
 
59
+ /**
60
+ * @see TextInputProps.onContentSizeChange
61
+ */
55
62
  export type TextInputContentSizeChangeEvent =
56
63
  NativeSyntheticEvent<TextInputContentSizeChangeEventData>;
57
64
 
58
65
  type TargetEvent = $ReadOnly<{
59
66
  target: number,
67
+ ...
60
68
  }>;
61
69
 
62
70
  type TextInputFocusEventData = TargetEvent;
63
71
 
72
+ /**
73
+ * @see TextInputProps.onBlur
74
+ */
64
75
  export type TextInputBlurEvent = NativeSyntheticEvent<TextInputFocusEventData>;
76
+
77
+ /**
78
+ * @see TextInputProps.onFocus
79
+ */
65
80
  export type TextInputFocusEvent = NativeSyntheticEvent<TextInputFocusEventData>;
66
81
 
67
- type Selection = $ReadOnly<{
82
+ export type Selection = $ReadOnly<{
68
83
  start: number,
69
84
  end: number,
70
85
  }>;
@@ -72,8 +87,12 @@ type Selection = $ReadOnly<{
72
87
  type TextInputSelectionChangeEventData = $ReadOnly<{
73
88
  ...TargetEvent,
74
89
  selection: Selection,
90
+ ...
75
91
  }>;
76
92
 
93
+ /**
94
+ * @see TextInputProps.onSelectionChange
95
+ */
77
96
  export type TextInputSelectionChangeEvent =
78
97
  NativeSyntheticEvent<TextInputSelectionChangeEventData>;
79
98
 
@@ -82,8 +101,12 @@ type TextInputKeyPressEventData = $ReadOnly<{
82
101
  key: string,
83
102
  target?: ?number,
84
103
  eventCount: number,
104
+ ...
85
105
  }>;
86
106
 
107
+ /**
108
+ * @see TextInputProps.onKeyPress
109
+ */
87
110
  export type TextInputKeyPressEvent =
88
111
  NativeSyntheticEvent<TextInputKeyPressEventData>;
89
112
 
@@ -91,6 +114,7 @@ type TextInputEndEditingEventData = $ReadOnly<{
91
114
  ...TargetEvent,
92
115
  eventCount: number,
93
116
  text: string,
117
+ ...
94
118
  }>;
95
119
 
96
120
  /**
@@ -103,6 +127,7 @@ type TextInputSubmitEditingEventData = $ReadOnly<{
103
127
  ...TargetEvent,
104
128
  eventCount: number,
105
129
  text: string,
130
+ ...
106
131
  }>;
107
132
 
108
133
  /**
@@ -488,11 +513,7 @@ export type TextInputAndroidProps = $ReadOnly<{
488
513
  underlineColorAndroid?: ?ColorValue,
489
514
  }>;
490
515
 
491
- export type TextInputProps = $ReadOnly<{
492
- ...$Diff<ViewProps, $ReadOnly<{style: ?ViewStyleProp}>>,
493
- ...TextInputIOSProps,
494
- ...TextInputAndroidProps,
495
-
516
+ type TextInputBaseProps = $ReadOnly<{
496
517
  /**
497
518
  * Can tell `TextInput` to automatically capitalize certain characters.
498
519
  *
@@ -776,33 +797,12 @@ export type TextInputProps = $ReadOnly<{
776
797
  */
777
798
  onChange?: ?(e: TextInputChangeEvent) => mixed,
778
799
 
779
- /**
780
- * DANGER: this API is not stable and will change in the future.
781
- *
782
- * Callback will be called on the main thread and may result in dropped frames.
783
- * Callback that is called when the text input's text changes.
784
- *
785
- * @platform ios
786
- */
787
- unstable_onChangeSync?: ?(e: TextInputChangeEvent) => mixed,
788
-
789
800
  /**
790
801
  * Callback that is called when the text input's text changes.
791
802
  * Changed text is passed as an argument to the callback handler.
792
803
  */
793
804
  onChangeText?: ?(text: string) => mixed,
794
805
 
795
- /**
796
- * DANGER: this API is not stable and will change in the future.
797
- *
798
- * Callback will be called on the main thread and may result in dropped frames.
799
- * Callback that is called when the text input's text changes.
800
- * Changed text is passed as an argument to the callback handler.
801
- *
802
- * @platform ios
803
- */
804
- unstable_onChangeTextSync?: ?(text: string) => mixed,
805
-
806
806
  /**
807
807
  * Callback that is called when the text input's content size changes.
808
808
  * This will be called with
@@ -831,21 +831,6 @@ export type TextInputProps = $ReadOnly<{
831
831
  */
832
832
  onKeyPress?: ?(e: TextInputKeyPressEvent) => mixed,
833
833
 
834
- /**
835
- * DANGER: this API is not stable and will change in the future.
836
- *
837
- * Callback will be called on the main thread and may result in dropped frames.
838
- *
839
- * Callback that is called when a key is pressed.
840
- * This will be called with `{ nativeEvent: { key: keyValue } }`
841
- * where `keyValue` is `'Enter'` or `'Backspace'` for respective keys and
842
- * the typed-in character otherwise including `' '` for space.
843
- * Fires before `onChange` callbacks.
844
- *
845
- * @platform ios
846
- */
847
- unstable_onKeyPressSync?: ?(e: TextInputKeyPressEvent) => mixed,
848
-
849
834
  /**
850
835
  * Called when a single tap gesture is detected.
851
836
  */
@@ -1022,6 +1007,13 @@ export type TextInputProps = $ReadOnly<{
1022
1007
  value?: ?Stringish,
1023
1008
  }>;
1024
1009
 
1010
+ export type TextInputProps = $ReadOnly<{
1011
+ ...Omit<ViewProps, 'style'>,
1012
+ ...TextInputIOSProps,
1013
+ ...TextInputAndroidProps,
1014
+ ...TextInputBaseProps,
1015
+ }>;
1016
+
1025
1017
  export interface TextInputInstance extends HostInstance {
1026
1018
  +clear: () => void;
1027
1019
  +isFocused: () => boolean;