@office-iss/react-native-win32 0.0.0-canary.286 → 0.0.0-canary.288

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 (148) hide show
  1. package/.flowconfig +4 -1
  2. package/CHANGELOG.json +57 -1
  3. package/CHANGELOG.md +23 -4
  4. package/Libraries/Alert/RCTAlertManager.js.flow +18 -0
  5. package/Libraries/Animated/Animated.js +8 -37
  6. package/Libraries/Animated/Animated.js.flow +15 -0
  7. package/Libraries/Animated/AnimatedExports.js +47 -0
  8. package/Libraries/Animated/AnimatedExports.js.flow +48 -0
  9. package/Libraries/Animated/useAnimatedValue.js +1 -3
  10. package/Libraries/Blob/URLSearchParams.js.flow +23 -0
  11. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +1 -1
  12. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +1 -1
  13. package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.js.flow +20 -0
  14. package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +8 -8
  15. package/Libraries/Components/Button.js +2 -2
  16. package/Libraries/Components/Button.win32.js +2 -2
  17. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +14 -100
  18. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +64 -4
  19. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidTypes.js +138 -0
  20. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +7 -4
  21. package/Libraries/Components/LayoutConformance/LayoutConformance.js +6 -4
  22. package/Libraries/Components/LayoutConformance/LayoutConformanceNativeComponent.js +1 -1
  23. package/Libraries/Components/Pressable/Pressable.js +18 -63
  24. package/Libraries/Components/Pressable/Pressable.win32.js +19 -65
  25. package/Libraries/Components/Pressable/useAndroidRippleForView.js +2 -2
  26. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js +4 -46
  27. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +10 -4
  28. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.js +54 -0
  29. package/Libraries/Components/RefreshControl/RefreshControl.js +10 -7
  30. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +2 -1
  31. package/Libraries/Components/SafeAreaView/SafeAreaView.js +1 -1
  32. package/Libraries/Components/SafeAreaView/SafeAreaView.win32.js +1 -1
  33. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +2 -4
  34. package/Libraries/Components/ScrollView/ScrollContentViewNativeComponent.js +2 -4
  35. package/Libraries/Components/ScrollView/ScrollView.js +43 -59
  36. package/Libraries/Components/ScrollView/ScrollViewCommands.js +1 -1
  37. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +2 -4
  38. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +6 -7
  39. package/Libraries/Components/StatusBar/StatusBar.js +33 -22
  40. package/Libraries/Components/Switch/Switch.js +70 -41
  41. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +2 -4
  42. package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +2 -4
  43. package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +2 -4
  44. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
  45. package/Libraries/Components/TextInput/TextInput.flow.js +10 -12
  46. package/Libraries/Components/TextInput/TextInput.js +22 -28
  47. package/Libraries/Components/TextInput/TextInput.win32.js +22 -28
  48. package/Libraries/Components/TextInput/TextInputState.js +2 -18
  49. package/Libraries/Components/TextInput/TextInputState.win32.js +2 -18
  50. package/Libraries/Components/TextInput/Win32TextInputNativeComponent.js +1 -1
  51. package/Libraries/Components/Touchable/Touchable.js +7 -7
  52. package/Libraries/Components/Touchable/Touchable.win32.js +7 -7
  53. package/Libraries/Components/Touchable/TouchableBounce.js +1 -1
  54. package/Libraries/Components/Touchable/TouchableHighlight.js +35 -14
  55. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +95 -47
  56. package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +248 -43
  57. package/Libraries/Components/Touchable/TouchableOpacity.js +52 -10
  58. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +112 -59
  59. package/Libraries/Components/View/View.js +1 -1
  60. package/Libraries/Components/View/View.win32.js +1 -1
  61. package/Libraries/Components/View/ViewNativeComponent.js +2 -4
  62. package/Libraries/Components/View/ViewPropTypes.js +15 -12
  63. package/Libraries/Components/View/ViewPropTypes.win32.js +74 -71
  64. package/Libraries/Core/ReactNativeVersion.js +1 -1
  65. package/Libraries/Core/setUpReactDevTools.js +2 -0
  66. package/Libraries/Debugging/DebuggingOverlayRegistry.js +10 -7
  67. package/Libraries/Image/Image.android.js +1 -1
  68. package/Libraries/Image/Image.js.flow +27 -0
  69. package/Libraries/Image/ImageBackground.js +1 -1
  70. package/Libraries/Image/ImageProps.js +97 -30
  71. package/Libraries/Image/ImageTypes.flow.js +16 -6
  72. package/Libraries/Image/ImageViewNativeComponent.js +3 -5
  73. package/Libraries/Image/TextInlineImageNativeComponent.js +2 -4
  74. package/Libraries/Interaction/InteractionManager.js +9 -1
  75. package/Libraries/Interaction/PanResponder.js +11 -11
  76. package/Libraries/Interaction/TaskQueue.js +2 -2
  77. package/Libraries/Lists/FlatList.js +8 -7
  78. package/Libraries/LogBox/LogBox.js +1 -1
  79. package/Libraries/NativeComponent/BaseViewConfig.js.flow +14 -0
  80. package/Libraries/NativeComponent/NativeComponentRegistry.js +1 -1
  81. package/Libraries/Network/RCTNetworking.js.flow +44 -0
  82. package/Libraries/Network/XMLHttpRequest_new.js +3 -0
  83. package/Libraries/Network/XMLHttpRequest_old.js +3 -0
  84. package/Libraries/Pressability/HoverState.js +1 -0
  85. package/Libraries/Pressability/HoverState.win32.js +1 -0
  86. package/Libraries/Pressability/Pressability.js +2 -2
  87. package/Libraries/Pressability/Pressability.win32.js +3 -3
  88. package/Libraries/ReactNative/FabricUIManager.js +5 -3
  89. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +7 -5
  90. package/Libraries/ReactNative/RendererImplementation.js +3 -5
  91. package/Libraries/ReactNative/requireNativeComponent.js +1 -1
  92. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +12 -0
  93. package/Libraries/Renderer/shims/ReactNativeTypes.js +39 -91
  94. package/Libraries/StyleSheet/PlatformColorValueTypes.js.flow +22 -0
  95. package/Libraries/Text/Text.d.ts +1 -1
  96. package/Libraries/Text/Text.js +3 -1
  97. package/Libraries/Text/Text.win32.js +3 -1
  98. package/Libraries/Text/TextNativeComponent.js +1 -1
  99. package/Libraries/Text/TextNativeComponent.win32.js +1 -1
  100. package/Libraries/Text/TextProps.js +124 -84
  101. package/Libraries/Text/TextProps.win32.js +124 -84
  102. package/Libraries/Types/CoreEventTypes.js +1 -1
  103. package/Libraries/Types/CoreEventTypes.win32.js +1 -1
  104. package/Libraries/Types/ReactDevToolsTypes.js +4 -8
  105. package/Libraries/Utilities/BackHandler.js.flow +25 -0
  106. package/Libraries/Utilities/DevSettings.js +14 -0
  107. package/Libraries/Utilities/Dimensions.js +5 -0
  108. package/Libraries/Utilities/Dimensions.win32.js +5 -0
  109. package/{flow/Position.js → Libraries/Utilities/Platform.js.flow} +3 -6
  110. package/Libraries/Utilities/PlatformTypes.js +97 -7
  111. package/Libraries/Utilities/codegenNativeComponent.js +1 -1
  112. package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +2 -4
  113. package/index.win32.js +3 -4
  114. package/overrides.json +24 -24
  115. package/package.json +15 -16
  116. package/src/private/components/HScrollViewNativeComponents.js +1 -1
  117. package/src/private/components/VScrollViewNativeComponents.js +1 -1
  118. package/src/private/featureflags/ReactNativeFeatureFlags.js +11 -6
  119. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +3 -2
  120. package/src/private/inspector/getInspectorDataForViewAtPoint.js +2 -4
  121. package/src/private/setup/setUpDOM.js +36 -1
  122. package/src/private/specs_DEPRECATED/components/ActivityIndicatorViewNativeComponent.js +1 -1
  123. package/src/private/specs_DEPRECATED/components/AndroidDrawerLayoutNativeComponent.js +1 -1
  124. package/src/private/specs_DEPRECATED/components/AndroidHorizontalScrollContentViewNativeComponent.js +1 -1
  125. package/src/private/specs_DEPRECATED/components/AndroidSwipeRefreshLayoutNativeComponent.js +1 -1
  126. package/src/private/specs_DEPRECATED/components/AndroidSwitchNativeComponent.js +1 -1
  127. package/src/private/specs_DEPRECATED/components/DebuggingOverlayNativeComponent.js +1 -1
  128. package/src/private/specs_DEPRECATED/components/ProgressBarAndroidNativeComponent.js +1 -1
  129. package/src/private/specs_DEPRECATED/components/PullToRefreshViewNativeComponent.js +1 -1
  130. package/src/private/specs_DEPRECATED/components/RCTInputAccessoryViewNativeComponent.js +1 -1
  131. package/src/private/specs_DEPRECATED/components/RCTModalHostViewNativeComponent.js +1 -1
  132. package/src/private/specs_DEPRECATED/components/RCTSafeAreaViewNativeComponent.js +1 -1
  133. package/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js +1 -1
  134. package/src/private/specs_DEPRECATED/components/UnimplementedNativeViewNativeComponent.js +1 -1
  135. package/src/private/types/HostComponent.js +16 -0
  136. package/src/private/types/HostInstance.js +50 -0
  137. package/src/private/webapis/dom/nodes/ReactNativeDocument.js +1 -0
  138. package/src/private/webapis/dom/nodes/ReactNativeElement.js +40 -32
  139. package/src/private/webapis/dom/nodes/ReadOnlyCharacterData.js +1 -1
  140. package/src/private/webapis/dom/nodes/ReadOnlyElement.js +1 -1
  141. package/src/private/webapis/dom/nodes/ReadOnlyNode.js +1 -1
  142. package/src/private/webapis/intersectionobserver/IntersectionObserver.js +4 -4
  143. package/src/private/webapis/mutationobserver/MutationObserver.js +9 -9
  144. package/src/private/webapis/performance/PerformanceObserver.js +6 -6
  145. package/src/types/globals.d.ts +628 -0
  146. package/src-win/Libraries/Text/Text.d.ts +1 -1
  147. package/types/index.d.ts +2 -53
  148. package/types/modules/globals.d.ts +0 -599
package/.flowconfig CHANGED
@@ -29,6 +29,7 @@
29
29
  <PROJECT_ROOT>/Libraries/Pressability/Pressability.js
30
30
  <PROJECT_ROOT>/Libraries/Pressability/HoverState.js
31
31
  <PROJECT_ROOT>/Libraries/StyleSheet/StyleSheet.js
32
+ <PROJECT_ROOT>/Libraries/StyleSheet/PlatformColorValueTypes.js
32
33
  <PROJECT_ROOT>/Libraries/Text/TextProps.js
33
34
  <PROJECT_ROOT>/Libraries/Types/CoreEventTypes.js
34
35
  <PROJECT_ROOT>/Libraries/Utilities/DeviceInfo.js
@@ -104,6 +105,8 @@
104
105
  interface.js
105
106
  flow/
106
107
  ../../../node_modules/.flow/flow-typed/
108
+ ../../../node_modules/react-native/src/types
109
+ src/types/
107
110
 
108
111
  [options]
109
112
  enums=true
@@ -164,4 +167,4 @@ untyped-import
164
167
  untyped-type-import
165
168
 
166
169
  [version]
167
- ^0.261.2
170
+ ^0.262.0
package/CHANGELOG.json CHANGED
@@ -2,7 +2,63 @@
2
2
  "name": "@office-iss/react-native-win32",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 22 May 2025 05:24:02 GMT",
5
+ "date": "Fri, 30 May 2025 05:23:07 GMT",
6
+ "version": "0.0.0-canary.288",
7
+ "tag": "@office-iss/react-native-win32_v0.0.0-canary.288",
8
+ "comments": {
9
+ "none": [
10
+ {
11
+ "author": "74712637+iamAbhi-916@users.noreply.github.com",
12
+ "package": "@office-iss/react-native-win32",
13
+ "commit": "02e7363a430b16c3e7437462be2e9c1558ab3ca6",
14
+ "comment": "integration nightly 0.79.0-nightly-20250303-cee63397b , overrides solved"
15
+ }
16
+ ],
17
+ "prerelease": [
18
+ {
19
+ "author": "beachball",
20
+ "package": "@office-iss/react-native-win32",
21
+ "comment": "Bump @rnw-scripts/eslint-config to v1.2.36",
22
+ "commit": "not available"
23
+ },
24
+ {
25
+ "author": "beachball",
26
+ "package": "@office-iss/react-native-win32",
27
+ "comment": "Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.40",
28
+ "commit": "not available"
29
+ },
30
+ {
31
+ "author": "beachball",
32
+ "package": "@office-iss/react-native-win32",
33
+ "comment": "Bump @rnw-scripts/just-task to v2.3.53",
34
+ "commit": "not available"
35
+ },
36
+ {
37
+ "author": "beachball",
38
+ "package": "@office-iss/react-native-win32",
39
+ "comment": "Bump react-native-platform-override to v1.9.55",
40
+ "commit": "not available"
41
+ }
42
+ ]
43
+ }
44
+ },
45
+ {
46
+ "date": "Wed, 28 May 2025 05:24:00 GMT",
47
+ "version": "0.0.0-canary.287",
48
+ "tag": "@office-iss/react-native-win32_v0.0.0-canary.287",
49
+ "comments": {
50
+ "prerelease": [
51
+ {
52
+ "author": "4123478+tido64@users.noreply.github.com",
53
+ "package": "@office-iss/react-native-win32",
54
+ "commit": "a5ce4300e5a32b010d7c471818922242d5bee52f",
55
+ "comment": "Removed unused `react-shallow-renderer` dependency"
56
+ }
57
+ ]
58
+ }
59
+ },
60
+ {
61
+ "date": "Thu, 22 May 2025 05:24:49 GMT",
6
62
  "version": "0.0.0-canary.286",
7
63
  "tag": "@office-iss/react-native-win32_v0.0.0-canary.286",
8
64
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,17 +1,36 @@
1
1
  # Change Log - @office-iss/react-native-win32
2
2
 
3
- <!-- This log was last generated on Thu, 22 May 2025 05:24:02 GMT and should not be manually modified. -->
3
+ <!-- This log was last generated on Fri, 30 May 2025 05:23:07 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## 0.0.0-canary.286
7
+ ## 0.0.0-canary.288
8
8
 
9
- Thu, 22 May 2025 05:24:02 GMT
9
+ Fri, 30 May 2025 05:23:07 GMT
10
10
 
11
11
  ### Changes
12
12
 
13
- - Integrate RN 0.79.0-nightly-20250220-41b597c73 (54227869+anupriya13@users.noreply.github.com)
13
+ - Bump @rnw-scripts/eslint-config to v1.2.36
14
+ - Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.40
15
+ - Bump @rnw-scripts/just-task to v2.3.53
16
+ - Bump react-native-platform-override to v1.9.55
14
17
 
18
+ ## 0.0.0-canary.287
19
+
20
+ Wed, 28 May 2025 05:24:00 GMT
21
+
22
+ ### Changes
23
+
24
+ - Removed unused `react-shallow-renderer` dependency (4123478+tido64@users.noreply.github.com)
25
+
26
+ ## 0.0.0-canary.286
27
+
28
+ Thu, 22 May 2025 05:24:49 GMT
29
+
30
+ ### Changes
31
+
32
+ - Integrate RN 0.79.0-nightly-20250220-41b597c73 (54227869+anupriya13@users.noreply.github.com)
33
+
15
34
  ## 0.0.0-canary.285
16
35
 
17
36
  Tue, 13 May 2025 21:05:06 GMT
@@ -0,0 +1,18 @@
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
+ * @format
8
+ * @flow strict-local
9
+ */
10
+
11
+ import type {Args} from './NativeAlertManager';
12
+
13
+ declare export default {
14
+ alertWithArgs(
15
+ args: Args,
16
+ callback: (id: number, value: string) => void,
17
+ ): void,
18
+ };
@@ -4,45 +4,16 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @flow
7
+ * @flow strict-local
8
8
  * @format
9
+ * @oncall react_native
9
10
  */
10
11
 
11
- export type {CompositeAnimation, Numeric} from './AnimatedImplementation';
12
+ import typeof * as AnimatedExports from './AnimatedExports';
12
13
 
13
- import typeof AnimatedFlatList from './components/AnimatedFlatList';
14
- import typeof AnimatedImage from './components/AnimatedImage';
15
- import typeof AnimatedScrollView from './components/AnimatedScrollView';
16
- import typeof AnimatedSectionList from './components/AnimatedSectionList';
17
- import typeof AnimatedText from './components/AnimatedText';
18
- import typeof AnimatedView from './components/AnimatedView';
14
+ // The AnimatedExports module is typed as multiple exports to allow
15
+ // for an implicit namespace, but underneath is's a single default export.
16
+ const Animated: AnimatedExports = (require('./AnimatedExports') as $FlowFixMe)
17
+ .default;
19
18
 
20
- import Platform from '../Utilities/Platform';
21
- import AnimatedImplementation from './AnimatedImplementation';
22
- import AnimatedMock from './AnimatedMock';
23
-
24
- const Animated: typeof AnimatedImplementation = Platform.isDisableAnimations
25
- ? AnimatedMock
26
- : AnimatedImplementation;
27
-
28
- export default {
29
- get FlatList(): AnimatedFlatList {
30
- return require('./components/AnimatedFlatList').default;
31
- },
32
- get Image(): AnimatedImage {
33
- return require('./components/AnimatedImage').default;
34
- },
35
- get ScrollView(): AnimatedScrollView {
36
- return require('./components/AnimatedScrollView').default;
37
- },
38
- get SectionList(): AnimatedSectionList {
39
- return require('./components/AnimatedSectionList').default;
40
- },
41
- get Text(): AnimatedText {
42
- return require('./components/AnimatedText').default;
43
- },
44
- get View(): AnimatedView {
45
- return require('./components/AnimatedView').default;
46
- },
47
- ...Animated,
48
- };
19
+ export default Animated;
@@ -0,0 +1,15 @@
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
+ * @flow strict-local
8
+ * @format
9
+ * @oncall react_native
10
+ */
11
+
12
+ import * as Animated from './AnimatedExports';
13
+
14
+ export type {CompositeAnimation, Numeric} from './AnimatedImplementation';
15
+ export default Animated;
@@ -0,0 +1,47 @@
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
+ * @flow
8
+ * @format
9
+ * @oncall react_native
10
+ */
11
+
12
+ import typeof AnimatedFlatList from './components/AnimatedFlatList';
13
+ import typeof AnimatedImage from './components/AnimatedImage';
14
+ import typeof AnimatedScrollView from './components/AnimatedScrollView';
15
+ import typeof AnimatedSectionList from './components/AnimatedSectionList';
16
+ import typeof AnimatedText from './components/AnimatedText';
17
+ import typeof AnimatedView from './components/AnimatedView';
18
+
19
+ import Platform from '../Utilities/Platform';
20
+ import AnimatedImplementation from './AnimatedImplementation';
21
+ import AnimatedMock from './AnimatedMock';
22
+
23
+ const Animated: typeof AnimatedImplementation = Platform.isDisableAnimations
24
+ ? AnimatedMock
25
+ : AnimatedImplementation;
26
+
27
+ export default {
28
+ get FlatList(): AnimatedFlatList {
29
+ return require('./components/AnimatedFlatList').default;
30
+ },
31
+ get Image(): AnimatedImage {
32
+ return require('./components/AnimatedImage').default;
33
+ },
34
+ get ScrollView(): AnimatedScrollView {
35
+ return require('./components/AnimatedScrollView').default;
36
+ },
37
+ get SectionList(): AnimatedSectionList {
38
+ return require('./components/AnimatedSectionList').default;
39
+ },
40
+ get Text(): AnimatedText {
41
+ return require('./components/AnimatedText').default;
42
+ },
43
+ get View(): AnimatedView {
44
+ return require('./components/AnimatedView').default;
45
+ },
46
+ ...Animated,
47
+ };
@@ -0,0 +1,48 @@
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
+ * @flow
8
+ * @format
9
+ * @oncall react_native
10
+ */
11
+
12
+ import AnimatedImplementation from './AnimatedImplementation';
13
+
14
+ export {default as FlatList} from './components/AnimatedFlatList';
15
+ export {default as Image} from './components/AnimatedImage';
16
+ export {default as ScrollView} from './components/AnimatedScrollView';
17
+ export {default as SectionList} from './components/AnimatedSectionList';
18
+ export {default as Text} from './components/AnimatedText';
19
+ export {default as View} from './components/AnimatedView';
20
+ export {default as Color} from './nodes/AnimatedColor';
21
+ export {AnimatedEvent as Event} from './AnimatedEvent';
22
+ export {default as Interpolation} from './nodes/AnimatedInterpolation';
23
+ export {default as Node} from './nodes/AnimatedNode';
24
+ export {default as Value} from './nodes/AnimatedValue';
25
+ export {default as ValueXY} from './nodes/AnimatedValueXY';
26
+
27
+ export type {AnimatedValueConfig as AnimatedConfig} from './nodes/AnimatedValue';
28
+
29
+ export const add = AnimatedImplementation.add;
30
+ export const attachNativeEvent = AnimatedImplementation.attachNativeEvent;
31
+ export const createAnimatedComponent =
32
+ AnimatedImplementation.createAnimatedComponent;
33
+ export const decay = AnimatedImplementation.decay;
34
+ export const delay = AnimatedImplementation.delay;
35
+ export const diffClamp = AnimatedImplementation.diffClamp;
36
+ export const divide = AnimatedImplementation.divide;
37
+ export const event = AnimatedImplementation.event;
38
+ export const forkEvent = AnimatedImplementation.forkEvent;
39
+ export const loop = AnimatedImplementation.loop;
40
+ export const modulo = AnimatedImplementation.modulo;
41
+ export const multiply = AnimatedImplementation.multiply;
42
+ export const parallel = AnimatedImplementation.parallel;
43
+ export const sequence = AnimatedImplementation.sequence;
44
+ export const spring = AnimatedImplementation.spring;
45
+ export const stagger = AnimatedImplementation.stagger;
46
+ export const subtract = AnimatedImplementation.subtract;
47
+ export const timing = AnimatedImplementation.timing;
48
+ export const unforkEvent = AnimatedImplementation.unforkEvent;
@@ -8,14 +8,12 @@
8
8
  * @format
9
9
  */
10
10
 
11
- import type {AnimatedValueConfig} from './nodes/AnimatedValue';
12
-
13
11
  import Animated from './Animated';
14
12
  import {useRef} from 'react';
15
13
 
16
14
  export default function useAnimatedValue(
17
15
  initialValue: number,
18
- config?: ?AnimatedValueConfig,
16
+ config?: ?Animated.AnimatedConfig,
19
17
  ): Animated.Value {
20
18
  const ref = useRef<null | Animated.Value>(null);
21
19
  if (ref.current == null) {
@@ -0,0 +1,23 @@
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
+ * @format
8
+ * @flow
9
+ */
10
+
11
+ declare export class URLSearchParams {
12
+ _searchParams: Array<[string, string]>;
13
+ constructor(params?: Record<string, string>): void;
14
+ append(key: string, value: string): void;
15
+ delete(name: string): empty;
16
+ get(name: string): empty;
17
+ getAll(name: string): empty;
18
+ has(name: string): empty;
19
+ set(name: string, value: string): empty;
20
+ sort(): empty;
21
+ @@iterator(): Iterator<[string, string]>;
22
+ toString(): string;
23
+ }
@@ -8,7 +8,7 @@
8
8
  * @format
9
9
  */
10
10
 
11
- import type {HostInstance} from '../../Renderer/shims/ReactNativeTypes';
11
+ import type {HostInstance} from '../../../src/private/types/HostInstance';
12
12
  import type {EventSubscription} from '../../vendor/emitter/EventEmitter';
13
13
 
14
14
  import RCTDeviceEventEmitter from '../../EventEmitter/RCTDeviceEventEmitter';
@@ -8,7 +8,7 @@
8
8
  * @format
9
9
  */
10
10
 
11
- import type {HostInstance} from '../../Renderer/shims/ReactNativeTypes';
11
+ import type {HostInstance} from '../../../src/private/types/HostInstance';
12
12
  import type {EventSubscription} from '../../vendor/emitter/EventEmitter';
13
13
 
14
14
  import RCTDeviceEventEmitter from '../../EventEmitter/RCTDeviceEventEmitter';
@@ -0,0 +1,20 @@
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
+ * @format
8
+ * @flow strict-local
9
+ */
10
+
11
+ /**
12
+ * This is a function exposed to the React Renderer that can be used by the
13
+ * pre-Fabric renderer to emit accessibility events to pre-Fabric nodes.
14
+ */
15
+ declare function legacySendAccessibilityEvent(
16
+ reactTag: number,
17
+ eventType: string,
18
+ ): void;
19
+
20
+ export default legacySendAccessibilityEvent;
@@ -9,7 +9,7 @@
9
9
  */
10
10
 
11
11
  'use strict';
12
- import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
12
+ import type {HostComponent} from '../../../src/private/types/HostComponent';
13
13
  import type {ViewProps} from '../View/ViewPropTypes';
14
14
 
15
15
  import StyleSheet, {type ColorValue} from '../../StyleSheet/StyleSheet';
@@ -26,7 +26,7 @@ const GRAY = '#999999';
26
26
 
27
27
  type IndicatorSize = number | 'small' | 'large';
28
28
 
29
- type IOSProps = $ReadOnly<{
29
+ type ActivityIndicatorIOSProps = $ReadOnly<{
30
30
  /**
31
31
  Whether the indicator should hide when not animating.
32
32
 
@@ -34,9 +34,9 @@ type IOSProps = $ReadOnly<{
34
34
  */
35
35
  hidesWhenStopped?: ?boolean,
36
36
  }>;
37
- type Props = $ReadOnly<{
37
+ export type ActivityIndicatorProps = $ReadOnly<{
38
38
  ...ViewProps,
39
- ...IOSProps,
39
+ ...ActivityIndicatorIOSProps,
40
40
 
41
41
  /**
42
42
  Whether to show the indicator (`true`) or hide it (`false`).
@@ -69,7 +69,7 @@ const ActivityIndicator = (
69
69
  size = 'small',
70
70
  style,
71
71
  ...restProps
72
- }: Props,
72
+ }: ActivityIndicatorProps,
73
73
  forwardedRef?: any,
74
74
  ) => {
75
75
  let sizeStyle;
@@ -112,7 +112,7 @@ const ActivityIndicator = (
112
112
  // $FlowFixMe[prop-missing] Flow doesn't know when this is the android component
113
113
  <PlatformActivityIndicator {...nativeProps} {...androidProps} />
114
114
  ) : (
115
- /* $FlowFixMe[prop-missing] (>=0.106.0 site=react_native_android_fb) This comment
115
+ /* $FlowFixMe[incompatible-type] (>=0.106.0 site=react_native_android_fb) This comment
116
116
  * suppresses an error found when Flow v0.106 was deployed. To see the
117
117
  * error, delete this comment and run Flow. */
118
118
  <PlatformActivityIndicator {...nativeProps} />
@@ -154,8 +154,8 @@ const ActivityIndicator = (
154
154
  */
155
155
 
156
156
  const ActivityIndicatorWithRef: component(
157
- ref: React.RefSetter<HostComponent<empty>>,
158
- ...props: Props
157
+ ref?: React.RefSetter<HostComponent<empty>>,
158
+ ...props: ActivityIndicatorProps
159
159
  ) = React.forwardRef(ActivityIndicator);
160
160
  ActivityIndicatorWithRef.displayName = 'ActivityIndicator';
161
161
 
@@ -27,7 +27,7 @@ import View from './View/View';
27
27
  import invariant from 'invariant';
28
28
  import * as React from 'react';
29
29
 
30
- type ButtonProps = $ReadOnly<{
30
+ export type ButtonProps = $ReadOnly<{
31
31
  /**
32
32
  Text to display inside the button. On Android the given title will be
33
33
  converted to the uppercased form.
@@ -286,7 +286,7 @@ const Touchable: typeof TouchableNativeFeedback | typeof TouchableOpacity =
286
286
  type ButtonRef = React.ElementRef<typeof Touchable>;
287
287
 
288
288
  const Button: component(
289
- ref: React.RefSetter<ButtonRef>,
289
+ ref?: React.RefSetter<ButtonRef>,
290
290
  ...props: ButtonProps
291
291
  ) = React.forwardRef((props: ButtonProps, ref: React.RefSetter<ButtonRef>) => {
292
292
  const {
@@ -28,7 +28,7 @@ import View from './View/View';
28
28
  import invariant from 'invariant';
29
29
  import * as React from 'react';
30
30
 
31
- type ButtonProps = $ReadOnly<{
31
+ export type ButtonProps = $ReadOnly<{
32
32
  /**
33
33
  Text to display inside the button. On Android the given title will be
34
34
  converted to the uppercased form.
@@ -289,7 +289,7 @@ const Touchable: typeof TouchableNativeFeedback | typeof TouchableOpacity =
289
289
  type ButtonRef = React.ElementRef<typeof Touchable>;
290
290
 
291
291
  const Button: component(
292
- ref: React.RefSetter<ButtonRef>,
292
+ ref?: React.RefSetter<ButtonRef>,
293
293
  ...props: ButtonProps
294
294
  ) = React.forwardRef((props: ButtonProps, ref: React.RefSetter<ButtonRef>) => {
295
295
  // Win32
@@ -8,14 +8,18 @@
8
8
  * @format
9
9
  */
10
10
 
11
- import type {AccessibilityRole} from '../../Components/View/ViewAccessibility';
12
11
  import type {
13
12
  MeasureInWindowOnSuccessCallback,
14
13
  MeasureLayoutOnSuccessCallback,
15
14
  MeasureOnSuccessCallback,
16
- } from '../../Renderer/shims/ReactNativeTypes';
17
- import type {ColorValue, ViewStyleProp} from '../../StyleSheet/StyleSheet';
18
- import type {DirectEventHandler} from '../../Types/CodegenTypes';
15
+ } from '../../../src/private/types/HostInstance';
16
+ import type {AccessibilityRole} from '../../Components/View/ViewAccessibility';
17
+ import typeof DrawerLayoutAndroidCommon from './DrawerLayoutAndroid.js';
18
+ import type {
19
+ DrawerLayoutAndroidMethods,
20
+ DrawerLayoutAndroidProps,
21
+ DrawerLayoutAndroidState,
22
+ } from './DrawerLayoutAndroidTypes';
19
23
 
20
24
  import StyleSheet from '../../StyleSheet/StyleSheet';
21
25
  import dismissKeyboard from '../../Utilities/dismissKeyboard';
@@ -29,99 +33,6 @@ import * as React from 'react';
29
33
 
30
34
  const DRAWER_STATES = ['Idle', 'Dragging', 'Settling'];
31
35
 
32
- type DrawerStates = 'Idle' | 'Dragging' | 'Settling';
33
-
34
- type DrawerSlideEvent = $ReadOnly<{
35
- offset: number,
36
- }>;
37
-
38
- type Props = $ReadOnly<{
39
- accessibilityRole?: ?AccessibilityRole,
40
-
41
- /**
42
- * Determines whether the keyboard gets dismissed in response to a drag.
43
- * - 'none' (the default), drags do not dismiss the keyboard.
44
- * - 'on-drag', the keyboard is dismissed when a drag begins.
45
- */
46
- keyboardDismissMode?: ?('none' | 'on-drag'),
47
-
48
- /**
49
- * Specifies the background color of the drawer. The default value is white.
50
- * If you want to set the opacity of the drawer, use rgba. Example:
51
- *
52
- * ```
53
- * return (
54
- * <DrawerLayoutAndroid drawerBackgroundColor="rgba(0,0,0,0.5)">
55
- * </DrawerLayoutAndroid>
56
- * );
57
- * ```
58
- */
59
- drawerBackgroundColor?: ?ColorValue,
60
-
61
- /**
62
- * Specifies the side of the screen from which the drawer will slide in.
63
- */
64
- drawerPosition: ?('left' | 'right'),
65
-
66
- /**
67
- * Specifies the width of the drawer, more precisely the width of the view that be pulled in
68
- * from the edge of the window.
69
- */
70
- drawerWidth?: ?number,
71
-
72
- /**
73
- * Specifies the lock mode of the drawer. The drawer can be locked in 3 states:
74
- * - unlocked (default), meaning that the drawer will respond (open/close) to touch gestures.
75
- * - locked-closed, meaning that the drawer will stay closed and not respond to gestures.
76
- * - locked-open, meaning that the drawer will stay opened and not respond to gestures.
77
- * The drawer may still be opened and closed programmatically (`openDrawer`/`closeDrawer`).
78
- */
79
- drawerLockMode?: ?('unlocked' | 'locked-closed' | 'locked-open'),
80
-
81
- /**
82
- * Function called whenever there is an interaction with the navigation view.
83
- */
84
- onDrawerSlide?: ?DirectEventHandler<DrawerSlideEvent>,
85
-
86
- /**
87
- * Function called when the drawer state has changed. The drawer can be in 3 states:
88
- * - Idle, meaning there is no interaction with the navigation view happening at the time
89
- * - Dragging, meaning there is currently an interaction with the navigation view
90
- * - Settling, meaning that there was an interaction with the navigation view, and the
91
- * navigation view is now finishing its closing or opening animation
92
- */
93
- onDrawerStateChanged?: ?(state: DrawerStates) => mixed,
94
-
95
- /**
96
- * Function called whenever the navigation view has been opened.
97
- */
98
- onDrawerOpen?: ?() => mixed,
99
-
100
- /**
101
- * Function called whenever the navigation view has been closed.
102
- */
103
- onDrawerClose?: ?() => mixed,
104
-
105
- /**
106
- * The navigation view that will be rendered to the side of the screen and can be pulled in.
107
- */
108
- renderNavigationView: () => React.MixedElement,
109
-
110
- /**
111
- * Make the drawer take the entire screen and draw the background of the
112
- * status bar to allow it to open over the status bar. It will only have an
113
- * effect on API 21+.
114
- */
115
- statusBarBackgroundColor?: ?ColorValue,
116
-
117
- children?: React.Node,
118
- style?: ?ViewStyleProp,
119
- }>;
120
-
121
- type State = {
122
- drawerOpened: boolean,
123
- };
124
-
125
36
  /**
126
37
  * React component that wraps the platform `DrawerLayout` (Android only). The
127
38
  * Drawer (typically used for navigation) is rendered with `renderNavigationView`
@@ -153,7 +64,10 @@ type State = {
153
64
  * },
154
65
  * ```
155
66
  */
156
- class DrawerLayoutAndroid extends React.Component<Props, State> {
67
+ class DrawerLayoutAndroid
68
+ extends React.Component<DrawerLayoutAndroidProps, DrawerLayoutAndroidState>
69
+ implements DrawerLayoutAndroidMethods
70
+ {
157
71
  static get positions(): mixed {
158
72
  console.warn(
159
73
  'Setting DrawerLayoutAndroid drawerPosition using `DrawerLayoutAndroid.positions` is deprecated. Instead pass the string value "left" or "right"',
@@ -168,7 +82,7 @@ class DrawerLayoutAndroid extends React.Component<Props, State> {
168
82
  React.ElementRef<typeof AndroidDrawerLayoutNativeComponent>,
169
83
  >();
170
84
 
171
- state: State = {
85
+ state: DrawerLayoutAndroidState = {
172
86
  drawerOpened: false,
173
87
  };
174
88
 
@@ -391,4 +305,4 @@ const styles = StyleSheet.create({
391
305
  },
392
306
  });
393
307
 
394
- export default DrawerLayoutAndroid;
308
+ export default DrawerLayoutAndroid as $FlowFixMe as DrawerLayoutAndroidCommon;