@office-iss/react-native-win32 0.0.0-canary.272 → 0.0.0-canary.274

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 (88) hide show
  1. package/.flowconfig +1 -1
  2. package/CHANGELOG.json +31 -1
  3. package/CHANGELOG.md +20 -4
  4. package/Libraries/Animated/AnimatedEvent.js +1 -1
  5. package/Libraries/Animated/animations/Animation.js +1 -1
  6. package/Libraries/Animated/createAnimatedComponent.js +7 -7
  7. package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
  8. package/Libraries/Animated/nodes/AnimatedInterpolation.js +1 -1
  9. package/Libraries/Animated/nodes/AnimatedProps.js +1 -1
  10. package/Libraries/Animated/nodes/AnimatedTransform.js +1 -1
  11. package/Libraries/Animated/nodes/AnimatedValue.js +1 -1
  12. package/Libraries/Animated/useAnimatedProps.js +3 -3
  13. package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +1 -1
  14. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +5 -0
  15. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +3 -2
  16. package/Libraries/Components/ScrollView/ScrollView.js +4 -4
  17. package/Libraries/Components/ScrollView/ScrollViewCommands.js +1 -1
  18. package/Libraries/Components/ScrollView/ScrollViewContext.js +2 -0
  19. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +4 -4
  20. package/Libraries/Components/TextInput/InputAccessoryView.js +1 -1
  21. package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +4 -4
  22. package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +6 -4
  23. package/Libraries/Components/TextInput/TextInput.d.ts +4 -0
  24. package/Libraries/Components/TextInput/TextInput.flow.js +7 -9
  25. package/Libraries/Components/TextInput/TextInput.js +2 -0
  26. package/Libraries/Components/TextInput/TextInput.win32.js +3 -0
  27. package/Libraries/Components/TextInput/Win32TextInputNativeComponent.js +3 -0
  28. package/Libraries/Components/Touchable/TouchableBounce.js +1 -0
  29. package/Libraries/Components/Touchable/TouchableOpacity.js +1 -0
  30. package/Libraries/Components/View/ViewNativeComponent.js +3 -88
  31. package/Libraries/Components/View/ViewWin32.js +1 -0
  32. package/Libraries/Core/ExceptionsManager.js +44 -27
  33. package/Libraries/Core/ReactNativeVersion.js +1 -1
  34. package/Libraries/Core/__mocks__/NativeExceptionsManager.js +0 -1
  35. package/Libraries/Core/setUpErrorHandling.js +1 -7
  36. package/Libraries/Core/setUpReactDevTools.js +74 -1
  37. package/Libraries/Core/setUpTimers.js +21 -10
  38. package/Libraries/Image/Image.android.js +1 -3
  39. package/Libraries/Image/Image.d.ts +18 -29
  40. package/Libraries/Image/Image.ios.js +0 -2
  41. package/Libraries/Image/Image.win32.js +0 -2
  42. package/Libraries/Inspector/Inspector.js +1 -0
  43. package/Libraries/Inspector/Inspector.win32.js +1 -0
  44. package/Libraries/Lists/SectionListModern.js +7 -7
  45. package/Libraries/LogBox/Data/LogBoxData.js +2 -2
  46. package/Libraries/LogBox/LogBoxInspectorContainer.js +1 -1
  47. package/Libraries/LogBox/LogBoxNotificationContainer.js +2 -2
  48. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +1 -1
  49. package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +1 -1
  50. package/Libraries/Modal/Modal.js +5 -3
  51. package/Libraries/NativeComponent/BaseViewConfig.android.js +65 -0
  52. package/Libraries/NativeComponent/NativeComponentRegistry.js +3 -3
  53. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +4 -4
  54. package/Libraries/ReactNative/AppContainer.js +1 -1
  55. package/Libraries/ReactNative/AppRegistry.js +1 -1
  56. package/Libraries/ReactNative/DisplayMode.js +1 -1
  57. package/Libraries/ReactNative/RendererImplementation.js +2 -2
  58. package/Libraries/ReactNative/getCachedComponentWithDebugName.js +1 -3
  59. package/Libraries/ReactNative/renderApplication.js +6 -4
  60. package/Libraries/ReactNative/requireNativeComponent.js +3 -1
  61. package/Libraries/Renderer/shims/ReactNativeTypes.js +9 -18
  62. package/Libraries/StyleSheet/StyleSheet.js +7 -1
  63. package/Libraries/StyleSheet/StyleSheet.win32.js +7 -1
  64. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
  65. package/Libraries/StyleSheet/StyleSheetTypes.js +1 -1
  66. package/Libraries/Utilities/FocusManager.win32.js +1 -1
  67. package/Libraries/Utilities/codegenNativeComponent.js +1 -1
  68. package/Libraries/Utilities/useMergeRefs.js +26 -7
  69. package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +1 -1
  70. package/index.js +2 -2
  71. package/index.win32.js +2 -2
  72. package/jest/setup.js +1 -0
  73. package/overrides.json +10 -10
  74. package/package.json +12 -12
  75. package/src/private/animated/NativeAnimatedHelper.js +4 -4
  76. package/src/private/animated/NativeAnimatedHelper.win32.js +4 -4
  77. package/src/private/animated/useAnimatedPropsMemo.js +0 -1
  78. package/src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE.js +6 -5
  79. package/src/private/featureflags/ReactNativeFeatureFlags.js +31 -21
  80. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +8 -6
  81. package/src/private/specs/modules/NativeExceptionsManager.js +0 -12
  82. package/src/private/webapis/intersectionobserver/IntersectionObserver.js +6 -0
  83. package/src/private/webapis/performance/EventTiming.js +1 -1
  84. package/src/private/webapis/performance/Performance.js +36 -15
  85. package/src/private/webapis/performance/PerformanceObserver.js +2 -2
  86. package/src/private/webapis/performance/UserTiming.js +5 -5
  87. package/src/private/webapis/performance/specs/NativePerformance.js +18 -2
  88. package/src/private/webapis/performance/specs/__mocks__/NativePerformanceMock.js +32 -12
package/.flowconfig CHANGED
@@ -160,4 +160,4 @@ untyped-import
160
160
  untyped-type-import
161
161
 
162
162
  [version]
163
- ^0.248.1
163
+ ^0.251.1
package/CHANGELOG.json CHANGED
@@ -2,7 +2,37 @@
2
2
  "name": "@office-iss/react-native-win32",
3
3
  "entries": [
4
4
  {
5
- "date": "Fri, 15 Nov 2024 06:21:36 GMT",
5
+ "date": "Fri, 06 Dec 2024 06:21:48 GMT",
6
+ "version": "0.0.0-canary.274",
7
+ "tag": "@office-iss/react-native-win32_v0.0.0-canary.274",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "yajurgrover24@gmail.com",
12
+ "package": "@office-iss/react-native-win32",
13
+ "commit": "40c1c59be8c9046213d5eeffae7dfe45caedcb5a",
14
+ "comment": "Integrate 10/31"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Sat, 23 Nov 2024 06:23:15 GMT",
21
+ "version": "0.0.0-canary.273",
22
+ "tag": "@office-iss/react-native-win32_v0.0.0-canary.273",
23
+ "comments": {
24
+ "prerelease": [
25
+ {
26
+ "author": "yajurgrover24@gmail.com",
27
+ "package": "@office-iss/react-native-win32",
28
+ "commit": "8be39042bf044cb756904b4750f10cb0725bb36b",
29
+ "comment": "Integrate 10/20"
30
+ }
31
+ ]
32
+ }
33
+ },
34
+ {
35
+ "date": "Fri, 15 Nov 2024 06:22:29 GMT",
6
36
  "version": "0.0.0-canary.272",
7
37
  "tag": "@office-iss/react-native-win32_v0.0.0-canary.272",
8
38
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,17 +1,33 @@
1
1
  # Change Log - @office-iss/react-native-win32
2
2
 
3
- <!-- This log was last generated on Fri, 15 Nov 2024 06:21:36 GMT and should not be manually modified. -->
3
+ <!-- This log was last generated on Fri, 06 Dec 2024 06:21:48 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## 0.0.0-canary.272
7
+ ## 0.0.0-canary.274
8
8
 
9
- Fri, 15 Nov 2024 06:21:36 GMT
9
+ Fri, 06 Dec 2024 06:21:48 GMT
10
10
 
11
11
  ### Changes
12
12
 
13
- - test integrate 10/15 (yajurgrover24@gmail.com)
13
+ - Integrate 10/31 (yajurgrover24@gmail.com)
14
14
 
15
+ ## 0.0.0-canary.273
16
+
17
+ Sat, 23 Nov 2024 06:23:15 GMT
18
+
19
+ ### Changes
20
+
21
+ - Integrate 10/20 (yajurgrover24@gmail.com)
22
+
23
+ ## 0.0.0-canary.272
24
+
25
+ Fri, 15 Nov 2024 06:22:29 GMT
26
+
27
+ ### Changes
28
+
29
+ - test integrate 10/15 (yajurgrover24@gmail.com)
30
+
15
31
  ## 0.0.0-canary.271
16
32
 
17
33
  Thu, 07 Nov 2024 06:24:18 GMT
@@ -12,8 +12,8 @@
12
12
 
13
13
  import type {PlatformConfig} from './AnimatedPlatformConfig';
14
14
 
15
- import {findNodeHandle} from '../ReactNative/RendererProxy';
16
15
  import NativeAnimatedHelper from '../../src/private/animated/NativeAnimatedHelper';
16
+ import {findNodeHandle} from '../ReactNative/RendererProxy';
17
17
  import AnimatedValue from './nodes/AnimatedValue';
18
18
  import AnimatedValueXY from './nodes/AnimatedValueXY';
19
19
  import invariant from 'invariant';
@@ -12,8 +12,8 @@ import type {PlatformConfig} from '../AnimatedPlatformConfig';
12
12
  import type AnimatedNode from '../nodes/AnimatedNode';
13
13
  import type AnimatedValue from '../nodes/AnimatedValue';
14
14
 
15
- import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags';
16
15
  import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
16
+ import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags';
17
17
  import AnimatedProps from '../nodes/AnimatedProps';
18
18
 
19
19
  export type EndResult = {finished: boolean, value?: number, ...};
@@ -35,18 +35,18 @@ export type StrictAnimatedProps<Props: {...}> = $ReadOnly<{
35
35
  passthroughAnimatedPropExplicitValues?: ?Props,
36
36
  }>;
37
37
 
38
- export type AnimatedComponentType<
39
- Props: {...},
40
- +Instance = mixed,
41
- > = React.AbstractComponent<AnimatedProps<Props>, Instance>;
38
+ export type AnimatedComponentType<Props: {...}, +Instance = mixed> = component(
39
+ ref: React.RefSetter<Instance>,
40
+ ...AnimatedProps<Props>
41
+ );
42
42
 
43
43
  export type StrictAnimatedComponentType<
44
44
  Props: {...},
45
45
  +Instance = mixed,
46
- > = React.AbstractComponent<StrictAnimatedProps<Props>, Instance>;
46
+ > = component(ref: React.RefSetter<Instance>, ...StrictAnimatedProps<Props>);
47
47
 
48
48
  export default function createAnimatedComponent<TProps: {...}, TInstance>(
49
- Component: React.AbstractComponent<TProps, TInstance>,
49
+ Component: component(ref: React.RefSetter<TInstance>, ...TProps),
50
50
  ): AnimatedComponentType<TProps, TInstance> {
51
51
  return unstable_createAnimatedComponentWithAllowlist(Component, null);
52
52
  }
@@ -55,7 +55,7 @@ export function unstable_createAnimatedComponentWithAllowlist<
55
55
  TProps: {...},
56
56
  TInstance,
57
57
  >(
58
- Component: React.AbstractComponent<TProps, TInstance>,
58
+ Component: component(ref: React.RefSetter<TInstance>, ...TProps),
59
59
  allowlist: ?AnimatedPropsAllowlist,
60
60
  ): StrictAnimatedComponentType<TProps, TInstance> {
61
61
  const AnimatedComponent = React.forwardRef<
@@ -15,9 +15,9 @@ import type {ColorValue} from '../../StyleSheet/StyleSheet';
15
15
  import type {NativeColorValue} from '../../StyleSheet/StyleSheetTypes';
16
16
  import type {PlatformConfig} from '../AnimatedPlatformConfig';
17
17
 
18
+ import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
18
19
  import normalizeColor from '../../StyleSheet/normalizeColor';
19
20
  import {processColorObject} from '../../StyleSheet/PlatformColorValueTypes';
20
- import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
21
21
  import AnimatedValue, {flushValue} from './AnimatedValue';
22
22
  import AnimatedWithChildren from './AnimatedWithChildren';
23
23
 
@@ -15,11 +15,11 @@
15
15
  import type {PlatformConfig} from '../AnimatedPlatformConfig';
16
16
  import type AnimatedNode from './AnimatedNode';
17
17
 
18
+ import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
18
19
  import {validateInterpolation} from '../../../src/private/animated/NativeAnimatedValidation';
19
20
  import normalizeColor from '../../StyleSheet/normalizeColor';
20
21
  import processColor from '../../StyleSheet/processColor';
21
22
  import Easing from '../Easing';
22
- import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
23
23
  import AnimatedWithChildren from './AnimatedWithChildren';
24
24
  import invariant from 'invariant';
25
25
 
@@ -11,9 +11,9 @@
11
11
  import type {PlatformConfig} from '../AnimatedPlatformConfig';
12
12
  import type {AnimatedStyleAllowlist} from './AnimatedStyle';
13
13
 
14
+ import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
14
15
  import {findNodeHandle} from '../../ReactNative/RendererProxy';
15
16
  import {AnimatedEvent} from '../AnimatedEvent';
16
- import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
17
17
  import AnimatedNode from './AnimatedNode';
18
18
  import AnimatedObject from './AnimatedObject';
19
19
  import AnimatedStyle from './AnimatedStyle';
@@ -12,8 +12,8 @@
12
12
 
13
13
  import type {PlatformConfig} from '../AnimatedPlatformConfig';
14
14
 
15
- import {validateTransform} from '../../../src/private/animated/NativeAnimatedValidation';
16
15
  import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
16
+ import {validateTransform} from '../../../src/private/animated/NativeAnimatedValidation';
17
17
  import AnimatedNode from './AnimatedNode';
18
18
  import AnimatedWithChildren from './AnimatedWithChildren';
19
19
 
@@ -15,8 +15,8 @@ import type {InterpolationConfigType} from './AnimatedInterpolation';
15
15
  import type AnimatedNode from './AnimatedNode';
16
16
  import type AnimatedTracking from './AnimatedTracking';
17
17
 
18
- import InteractionManager from '../../Interaction/InteractionManager';
19
18
  import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
19
+ import InteractionManager from '../../Interaction/InteractionManager';
20
20
  import AnimatedInterpolation from './AnimatedInterpolation';
21
21
  import AnimatedWithChildren from './AnimatedWithChildren';
22
22
 
@@ -8,14 +8,15 @@
8
8
  * @format
9
9
  */
10
10
 
11
- import type {AnimatedPropsAllowlist} from './nodes/AnimatedProps';
12
11
  import type {EventSubscription} from '../EventEmitter/NativeEventEmitter';
12
+ import type {AnimatedPropsAllowlist} from './nodes/AnimatedProps';
13
13
 
14
+ import NativeAnimatedHelper from '../../src/private/animated/NativeAnimatedHelper';
15
+ import {useAnimatedPropsMemo} from '../../src/private/animated/useAnimatedPropsMemo';
14
16
  import * as ReactNativeFeatureFlags from '../../src/private/featureflags/ReactNativeFeatureFlags';
15
17
  import {isPublicInstance as isFabricPublicInstance} from '../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstanceUtils';
16
18
  import useRefEffect from '../Utilities/useRefEffect';
17
19
  import {AnimatedEvent} from './AnimatedEvent';
18
- import NativeAnimatedHelper from '../../src/private/animated/NativeAnimatedHelper';
19
20
  import AnimatedNode from './nodes/AnimatedNode';
20
21
  import AnimatedProps from './nodes/AnimatedProps';
21
22
  import AnimatedValue from './nodes/AnimatedValue';
@@ -28,7 +29,6 @@ import {
28
29
  useReducer,
29
30
  useRef,
30
31
  } from 'react';
31
- import {useAnimatedPropsMemo} from '../../src/private/animated/useAnimatedPropsMemo';
32
32
 
33
33
  type ReducedProps<TProps> = {
34
34
  ...TProps,
@@ -154,7 +154,7 @@ const ActivityIndicator = (
154
154
  */
155
155
 
156
156
  const ActivityIndicatorWithRef: component(
157
- ref: React.RefSetter<HostComponent<mixed>>,
157
+ ref: React.RefSetter<HostComponent<empty>>,
158
158
  ...props: Props
159
159
  ) = React.forwardRef(ActivityIndicator);
160
160
  ActivityIndicatorWithRef.displayName = 'ActivityIndicator';
@@ -191,6 +191,11 @@ class KeyboardAvoidingView extends React.Component<Props, State> {
191
191
  }
192
192
 
193
193
  componentDidMount(): void {
194
+ if (!Keyboard.isVisible()) {
195
+ this._keyboardEvent = null;
196
+ this._setBottom(0);
197
+ }
198
+
194
199
  if (Platform.OS === 'ios') {
195
200
  this._subscriptions = [
196
201
  Keyboard.addListener('keyboardWillChangeFrame', this._onKeyboardChange),
@@ -14,8 +14,9 @@ import type {HostComponent} from '../../../Renderer/shims/ReactNativeTypes';
14
14
  import requireNativeComponent from '../../../ReactNative/requireNativeComponent';
15
15
  import * as React from 'react';
16
16
 
17
- const RCTRefreshControl: HostComponent<mixed> =
18
- requireNativeComponent<mixed>('RCTRefreshControl');
17
+ const RCTRefreshControl: HostComponent<{}> = requireNativeComponent<{}>(
18
+ 'RCTRefreshControl',
19
+ );
19
20
 
20
21
  class RefreshControlMock extends React.Component<{...}> {
21
22
  static latestRef: ?RefreshControlMock;
@@ -371,10 +371,10 @@ type AndroidProps = $ReadOnly<{|
371
371
  fadingEdgeLength?: ?number,
372
372
  |}>;
373
373
 
374
- type StickyHeaderComponentType = React.AbstractComponent<
375
- ScrollViewStickyHeaderProps,
376
- $ReadOnly<interface {setNextHeaderY: number => void}>,
377
- >;
374
+ type StickyHeaderComponentType = component(
375
+ ref?: React.RefSetter<$ReadOnly<interface {setNextHeaderY: number => void}>>,
376
+ ...ScrollViewStickyHeaderProps
377
+ );
378
378
 
379
379
  export type Props = $ReadOnly<{|
380
380
  ...ViewProps,
@@ -14,7 +14,7 @@ import type {Double} from '../../Types/CodegenTypes';
14
14
  import codegenNativeCommands from '../../Utilities/codegenNativeCommands';
15
15
  import * as React from 'react';
16
16
 
17
- type ScrollViewNativeComponentType = HostComponent<mixed>;
17
+ type ScrollViewNativeComponentType = HostComponent<{...}>;
18
18
  interface NativeCommands {
19
19
  +flashScrollIndicators: (
20
20
  viewRef: React.ElementRef<ScrollViewNativeComponentType>,
@@ -18,5 +18,7 @@ if (__DEV__) {
18
18
  }
19
19
  export default ScrollViewContext;
20
20
 
21
+ // $FlowFixMe[incompatible-type] frozen objects are readonly
21
22
  export const HORIZONTAL: Value = Object.freeze({horizontal: true});
23
+ // $FlowFixMe[incompatible-type] frozen objects are readonly
22
24
  export const VERTICAL: Value = Object.freeze({horizontal: false});
@@ -65,8 +65,8 @@ const ScrollViewStickyHeaderWithForwardedRef: component(
65
65
  ref.setNextHeaderY = setNextHeaderLayoutY;
66
66
  setIsFabric(isFabricPublicInstance(ref));
67
67
  }, []);
68
- const ref: (React.ElementRef<typeof Animated.View> | null) => void =
69
- // $FlowFixMe[incompatible-type] - Ref is mutated by `callbackRef`.
68
+ const ref: React.RefSetter<React.ElementRef<typeof Animated.View>> =
69
+ // $FlowFixMe[prop-missing] - Instance is mutated to have `setNextHeaderY`.
70
70
  useMergeRefs<Instance>(callbackRef, forwardedRef);
71
71
 
72
72
  const offset = useMemo(
@@ -275,12 +275,12 @@ const ScrollViewStickyHeaderWithForwardedRef: component(
275
275
  : null;
276
276
 
277
277
  return (
278
- /* $FlowFixMe[prop-missing] passthroughAnimatedPropExplicitValues isn't properly
279
- included in the Animated.View flow type. */
280
278
  <Animated.View
281
279
  collapsable={false}
282
280
  nativeID={props.nativeID}
283
281
  onLayout={_onLayout}
282
+ /* $FlowFixMe[prop-missing] passthroughAnimatedPropExplicitValues isn't properly
283
+ included in the Animated.View flow type. */
284
284
  ref={ref}
285
285
  style={[
286
286
  child.props.style,
@@ -87,7 +87,7 @@ type Props = $ReadOnly<{|
87
87
  backgroundColor?: ?ColorValue,
88
88
  |}>;
89
89
 
90
- const InputAccessoryView: React.AbstractComponent<Props> = (props: Props) => {
90
+ const InputAccessoryView: React.ComponentType<Props> = (props: Props) => {
91
91
  const {width} = useWindowDimensions();
92
92
 
93
93
  if (Platform.OS === 'ios') {
@@ -18,7 +18,7 @@ import * as NativeComponentRegistry from '../../NativeComponent/NativeComponentR
18
18
  import codegenNativeCommands from '../../Utilities/codegenNativeCommands';
19
19
  import RCTTextInputViewConfig from './RCTTextInputViewConfig';
20
20
 
21
- type NativeType = HostComponent<mixed>;
21
+ type NativeType = HostComponent<{...}>;
22
22
 
23
23
  type NativeCommands = TextInputNativeCommands<NativeType>;
24
24
 
@@ -35,11 +35,11 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig = {
35
35
  },
36
36
  };
37
37
 
38
- const MultilineTextInputNativeComponent: HostComponent<mixed> =
39
- NativeComponentRegistry.get<mixed>(
38
+ const MultilineTextInputNativeComponent: HostComponent<{...}> =
39
+ NativeComponentRegistry.get<{...}>(
40
40
  'RCTMultilineTextInputView',
41
41
  () => __INTERNAL_VIEW_CONFIG,
42
42
  );
43
43
 
44
44
  // flowlint-next-line unclear-type:off
45
- export default ((MultilineTextInputNativeComponent: any): HostComponent<mixed>);
45
+ export default ((MultilineTextInputNativeComponent: any): HostComponent<{...}>);
@@ -18,7 +18,7 @@ import * as NativeComponentRegistry from '../../NativeComponent/NativeComponentR
18
18
  import codegenNativeCommands from '../../Utilities/codegenNativeCommands';
19
19
  import RCTTextInputViewConfig from './RCTTextInputViewConfig';
20
20
 
21
- type NativeType = HostComponent<mixed>;
21
+ type NativeType = HostComponent<{...}>;
22
22
 
23
23
  type NativeCommands = TextInputNativeCommands<NativeType>;
24
24
 
@@ -31,11 +31,13 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig = {
31
31
  ...RCTTextInputViewConfig,
32
32
  };
33
33
 
34
- const SinglelineTextInputNativeComponent: HostComponent<mixed> =
35
- NativeComponentRegistry.get<mixed>(
34
+ const SinglelineTextInputNativeComponent: HostComponent<{...}> =
35
+ NativeComponentRegistry.get<{...}>(
36
36
  'RCTSinglelineTextInputView',
37
37
  () => __INTERNAL_VIEW_CONFIG,
38
38
  );
39
39
 
40
40
  // flowlint-next-line unclear-type:off
41
- export default ((SinglelineTextInputNativeComponent: any): HostComponent<mixed>);
41
+ export default ((SinglelineTextInputNativeComponent: any): HostComponent<{
42
+ ...
43
+ }>);
@@ -255,6 +255,8 @@ export interface TextInputIOSProps {
255
255
  * - `'birthdateDay'` (iOS 17+)
256
256
  * - `'birthdateMonth'` (iOS 17+)
257
257
  * - `'birthdateYear'` (iOS 17+)
258
+ * - `'cellularEID'` (iOS 17.4+)
259
+ * - `'cellularIMEI'` (iOS 17.4+)
258
260
  * - `'dateTime'` (iOS 15+)
259
261
  * - `'flightNumber'` (iOS 15+)
260
262
  * - `'shipmentTrackingNumber'` (iOS 15+)
@@ -302,6 +304,8 @@ export interface TextInputIOSProps {
302
304
  | 'birthdateDay'
303
305
  | 'birthdateMonth'
304
306
  | 'birthdateYear'
307
+ | 'cellularEID'
308
+ | 'cellularIMEI'
305
309
  | 'dateTime'
306
310
  | 'flightNumber'
307
311
  | 'shipmentTrackingNumber'
@@ -198,6 +198,8 @@ export type TextContentType =
198
198
  | 'birthdateDay'
199
199
  | 'birthdateMonth'
200
200
  | 'birthdateYear'
201
+ | 'cellularEID'
202
+ | 'cellularIMEI'
201
203
  | 'dateTime'
202
204
  | 'flightNumber'
203
205
  | 'shipmentTrackingNumber';
@@ -1084,7 +1086,10 @@ type ImperativeMethods = $ReadOnly<{|
1084
1086
  * or control this param programmatically with native code.
1085
1087
  *
1086
1088
  */
1087
- type InternalTextInput = (props: Props) => React.Node;
1089
+ type InternalTextInput = component(
1090
+ ref: React.RefSetter<$ReadOnly<{...HostInstance, ...ImperativeMethods}>>,
1091
+ ...Props
1092
+ );
1088
1093
 
1089
1094
  export type TextInputComponentStatics = $ReadOnly<{|
1090
1095
  State: $ReadOnly<{|
@@ -1095,11 +1100,4 @@ export type TextInputComponentStatics = $ReadOnly<{|
1095
1100
  |}>,
1096
1101
  |}>;
1097
1102
 
1098
- export type TextInputType = React.AbstractComponent<
1099
- React.ElementConfig<InternalTextInput>,
1100
- $ReadOnly<{|
1101
- ...HostInstance,
1102
- ...ImperativeMethods,
1103
- |}>,
1104
- > &
1105
- TextInputComponentStatics;
1103
+ export type TextInputType = InternalTextInput & TextInputComponentStatics;
@@ -239,6 +239,8 @@ export type TextContentType =
239
239
  | 'birthdateDay'
240
240
  | 'birthdateMonth'
241
241
  | 'birthdateYear'
242
+ | 'cellularEID'
243
+ | 'cellularIMEI'
242
244
  | 'dateTime'
243
245
  | 'flightNumber'
244
246
  | 'shipmentTrackingNumber';
@@ -250,6 +250,8 @@ export type TextContentType =
250
250
  | 'birthdateDay'
251
251
  | 'birthdateMonth'
252
252
  | 'birthdateYear'
253
+ | 'cellularEID'
254
+ | 'cellularIMEI'
253
255
  | 'dateTime'
254
256
  | 'flightNumber'
255
257
  | 'shipmentTrackingNumber';
@@ -1366,6 +1368,7 @@ function InternalTextInput(props: Props): React.Node {
1366
1368
  mostRecentEventCount,
1367
1369
  selection,
1368
1370
  text,
1371
+ // $FlowFixMe[incompatible-call]
1369
1372
  viewCommands,
1370
1373
  });
1371
1374
 
@@ -8,6 +8,8 @@ import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
8
8
  import requireNativeComponent from '../../ReactNative/requireNativeComponent';
9
9
  import codegenNativeCommands from '../../Utilities/codegenNativeCommands';
10
10
  import type {TextInputNativeCommands} from './TextInputNativeCommands';
11
+
12
+ // $FlowFixMe[incompatible-type-arg]
11
13
  type NativeType = HostComponent<mixed>;
12
14
 
13
15
  type NativeCommands = TextInputNativeCommands<NativeType>;
@@ -17,6 +19,7 @@ export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
17
19
  });
18
20
 
19
21
  const WindowsTextInputComponent: NativeType =
22
+ // $FlowFixMe[incompatible-call]
20
23
  requireNativeComponent<mixed>('RCTTextInput');
21
24
 
22
25
  export default WindowsTextInputComponent;
@@ -189,6 +189,7 @@ class TouchableBounce extends React.Component<Props, State> {
189
189
  this.props.onPress !== undefined &&
190
190
  !this.props.disabled
191
191
  }
192
+ // $FlowFixMe[prop-missing]
192
193
  ref={this.props.hostRef}
193
194
  {...eventHandlersWithoutBlurAndFocus}>
194
195
  {this.props.children}
@@ -291,6 +291,7 @@ class TouchableOpacity extends React.Component<Props, State> {
291
291
  this.props.onPress !== undefined &&
292
292
  !this.props.disabled
293
293
  }
294
+ // $FlowFixMe[prop-missing]
294
295
  ref={this.props.hostRef}
295
296
  {...eventHandlersWithoutBlurAndFocus}>
296
297
  {this.props.children}
@@ -11,101 +11,16 @@
11
11
  import type {
12
12
  HostComponent,
13
13
  HostInstance,
14
- PartialViewConfig,
15
14
  } from '../../Renderer/shims/ReactNativeTypes';
16
15
 
17
16
  import * as NativeComponentRegistry from '../../NativeComponent/NativeComponentRegistry';
18
17
  import codegenNativeCommands from '../../Utilities/codegenNativeCommands';
19
- import Platform from '../../Utilities/Platform';
20
18
  import {type ViewProps as Props} from './ViewPropTypes';
21
19
 
22
- export const __INTERNAL_VIEW_CONFIG: PartialViewConfig =
23
- Platform.OS === 'android'
24
- ? {
25
- uiViewClassName: 'RCTView',
26
- validAttributes: {
27
- // ReactClippingViewManager @ReactProps
28
- removeClippedSubviews: true,
29
-
30
- // ReactViewManager @ReactProps
31
- accessible: true,
32
- hasTVPreferredFocus: true,
33
- nextFocusDown: true,
34
- nextFocusForward: true,
35
- nextFocusLeft: true,
36
- nextFocusRight: true,
37
- nextFocusUp: true,
38
-
39
- borderRadius: true,
40
- borderTopLeftRadius: true,
41
- borderTopRightRadius: true,
42
- borderBottomRightRadius: true,
43
- borderBottomLeftRadius: true,
44
- borderTopStartRadius: true,
45
- borderTopEndRadius: true,
46
- borderBottomStartRadius: true,
47
- borderBottomEndRadius: true,
48
- borderEndEndRadius: true,
49
- borderEndStartRadius: true,
50
- borderStartEndRadius: true,
51
- borderStartStartRadius: true,
52
- borderStyle: true,
53
- hitSlop: true,
54
- pointerEvents: true,
55
- nativeBackgroundAndroid: true,
56
- nativeForegroundAndroid: true,
57
- needsOffscreenAlphaCompositing: true,
58
-
59
- borderWidth: true,
60
- borderLeftWidth: true,
61
- borderRightWidth: true,
62
- borderTopWidth: true,
63
- borderBottomWidth: true,
64
- borderStartWidth: true,
65
- borderEndWidth: true,
66
-
67
- borderColor: {
68
- process: require('../../StyleSheet/processColor').default,
69
- },
70
- borderLeftColor: {
71
- process: require('../../StyleSheet/processColor').default,
72
- },
73
- borderRightColor: {
74
- process: require('../../StyleSheet/processColor').default,
75
- },
76
- borderTopColor: {
77
- process: require('../../StyleSheet/processColor').default,
78
- },
79
- borderBottomColor: {
80
- process: require('../../StyleSheet/processColor').default,
81
- },
82
- borderStartColor: {
83
- process: require('../../StyleSheet/processColor').default,
84
- },
85
- borderEndColor: {
86
- process: require('../../StyleSheet/processColor').default,
87
- },
88
- borderBlockColor: {
89
- process: require('../../StyleSheet/processColor').default,
90
- },
91
- borderBlockEndColor: {
92
- process: require('../../StyleSheet/processColor').default,
93
- },
94
- borderBlockStartColor: {
95
- process: require('../../StyleSheet/processColor').default,
96
- },
97
- focusable: true,
98
- overflow: true,
99
- backfaceVisibility: true,
100
- experimental_layoutConformance: true,
101
- },
102
- }
103
- : {
104
- uiViewClassName: 'RCTView',
105
- };
106
-
107
20
  const ViewNativeComponent: HostComponent<Props> =
108
- NativeComponentRegistry.get<Props>('RCTView', () => __INTERNAL_VIEW_CONFIG);
21
+ NativeComponentRegistry.get<Props>('RCTView', () => ({
22
+ uiViewClassName: 'RCTView',
23
+ }));
109
24
 
110
25
  interface NativeCommands {
111
26
  +hotspotUpdate: (viewRef: HostInstance, x: number, y: number) => void;
@@ -19,6 +19,7 @@ import warnOnce from '../../Utilities/warnOnce';
19
19
  * Basic View component with additional Win32 specific functionality
20
20
  */
21
21
 
22
+ // $FlowFixMe[prop-missing]
22
23
  const ViewWin32: React.AbstractComponent<
23
24
  ViewProps,
24
25
  React.ElementRef<typeof View>,