@office-iss/react-native-win32 0.0.0-canary.301 → 0.0.0-canary.303
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.
- package/.flowconfig +2 -2
- package/CHANGELOG.json +49 -1
- package/CHANGELOG.md +24 -5
- package/IntegrationTests/IntegrationTestsApp.js +1 -1
- package/IntegrationTests/LayoutEventsTest.js +3 -3
- package/Libraries/ActionSheetIOS/ActionSheetIOS.js +3 -3
- package/Libraries/Alert/RCTAlertManager.android.js +2 -2
- package/Libraries/Animated/AnimatedEvent.js +1 -1
- package/Libraries/Animated/AnimatedImplementation.js +2 -2
- package/Libraries/Animated/AnimatedMock.js +1 -1
- package/Libraries/Animated/NativeAnimatedAllowlist.js +1 -0
- package/Libraries/Animated/animations/Animation.js +5 -6
- package/Libraries/Animated/components/AnimatedScrollView.js +1 -1
- package/Libraries/Animated/nodes/AnimatedColor.js +9 -9
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +4 -4
- package/Libraries/Animated/nodes/AnimatedProps.js +2 -2
- package/Libraries/Animated/nodes/AnimatedStyle.js +6 -4
- package/Libraries/Animated/nodes/AnimatedTransform.js +1 -1
- package/Libraries/AppState/AppState.js +5 -1
- package/Libraries/BatchedBridge/NativeModules.js +1 -1
- package/Libraries/Blob/BlobManager.js +1 -1
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +1 -1
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +1 -1
- package/Libraries/Components/Button.js +1 -1
- package/Libraries/Components/Button.win32.js +1 -1
- package/Libraries/Components/Pressable/useAndroidRippleForView.js +2 -2
- package/Libraries/Components/ScrollView/ScrollView.js +3 -2
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
- package/Libraries/Components/TextInput/TextInput.flow.js +12 -5
- package/Libraries/Components/TextInput/TextInput.flow.win32.js +12 -5
- package/Libraries/Components/TextInput/TextInput.js +9 -4
- package/Libraries/Components/TextInput/TextInput.win32.js +9 -6
- package/Libraries/Components/TextInput/Win32TextInputNativeComponent.js +2 -3
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +1 -1
- package/Libraries/Components/View/View.win32.js +3 -1
- package/Libraries/Core/Devtools/loadBundleFromServer.js +1 -1
- package/Libraries/Core/Devtools/loadBundleFromServer.win32.js +1 -1
- package/Libraries/Core/ExceptionsManager.js +2 -2
- package/Libraries/Core/ReactFiberErrorDialog.js +3 -3
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/Timers/JSTimers.js +1 -1
- package/Libraries/Core/Timers/immediateShim.js +1 -1
- package/Libraries/Debugging/DebuggingOverlayRegistry.js +5 -3
- package/Libraries/Image/Image.android.js +318 -111
- package/Libraries/Image/ImageSourceUtils.js +8 -2
- package/Libraries/Image/resolveAssetSource.js +1 -1
- package/Libraries/Interaction/InteractionManager.js +1 -1
- package/Libraries/Interaction/PanResponder.js +1 -1
- package/Libraries/Lists/FlatList.js +5 -6
- package/Libraries/LogBox/Data/LogBoxData.js +1 -1
- package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.win32.js +1 -1
- package/Libraries/Modal/Modal.js +2 -2
- package/Libraries/NativeComponent/NativeComponentRegistry.js +1 -1
- package/Libraries/NativeComponent/ViewConfig.js +1 -1
- package/Libraries/Network/RCTNetworking.android.js +1 -1
- package/Libraries/Network/RCTNetworking.ios.js +1 -1
- package/Libraries/Network/RCTNetworking.win32.js +1 -1
- package/Libraries/Network/convertRequestBody.js +1 -1
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +10 -9
- package/Libraries/Pressability/HoverState.js +2 -0
- package/Libraries/Pressability/HoverState.win32.js +2 -0
- package/Libraries/PushNotificationIOS/PushNotificationIOS.js +2 -2
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +2 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +3 -3
- package/Libraries/ReactNative/RendererImplementation.js +116 -116
- package/Libraries/ReactNative/UIManager.js +3 -3
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +1 -1
- package/Libraries/Renderer/shims/ReactFabric.js +1 -3
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +1 -3
- package/Libraries/Renderer/shims/ReactNative.js +1 -3
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +1 -3
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +1 -3
- package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +2 -2
- package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +2 -2
- package/Libraries/StyleSheet/PlatformColorValueTypes.win32.js +4 -0
- package/Libraries/StyleSheet/flattenStyle.js +2 -2
- package/Libraries/StyleSheet/splitLayoutProps.js +2 -2
- package/Libraries/Text/Text.js +509 -235
- package/Libraries/Text/Text.win32.js +622 -275
- package/Libraries/Text/TextNativeComponent.js +2 -2
- package/Libraries/Text/TextNativeComponent.win32.js +2 -2
- package/Libraries/Utilities/HMRClient.js +0 -1
- package/Libraries/Utilities/Platform.android.js +3 -3
- package/Libraries/Utilities/Platform.d.ts +1 -0
- package/Libraries/Utilities/Platform.ios.js +1 -1
- package/Libraries/Utilities/Platform.win32.js +3 -3
- package/Libraries/Utilities/PlatformTypes.js +1 -1
- package/Libraries/Utilities/ReactNativeTestTools.js +12 -0
- package/Libraries/Utilities/codegenNativeCommands.js +1 -1
- package/Libraries/Utilities/codegenNativeComponent.js +1 -1
- package/Libraries/Utilities/differ/pointsDiffer.js +1 -1
- package/Libraries/vendor/emitter/EventEmitter.js +1 -1
- package/index.js +3 -0
- package/index.win32.js +4 -0
- package/jest/local-setup.js +2 -2
- package/jest/mock.js +1 -1
- package/jest/mockComponent.js +8 -8
- package/jest/mockNativeComponent.js +3 -2
- package/jest/mocks/Modal.js +1 -1
- package/jest/mocks/ScrollView.js +1 -1
- package/jest/mocks/ViewNativeComponent.js +1 -1
- package/jest/setup.js +12 -12
- package/overrides.json +16 -16
- package/package.json +12 -12
- package/src/private/animated/NativeAnimatedHelper.js +3 -3
- package/src/private/animated/NativeAnimatedHelper.win32.js +3 -3
- package/src/private/animated/createAnimatedPropsHook.js +9 -11
- package/src/private/animated/createAnimatedPropsMemoHook.js +6 -6
- package/src/private/components/virtualview/VirtualView.js +7 -4
- package/src/private/components/virtualview/VirtualViewNativeComponent.js +6 -0
- package/src/private/devsupport/devmenu/elementinspector/Inspector.js +2 -2
- package/src/private/featureflags/ReactNativeFeatureFlags.js +9 -8
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +1 -2
- package/src/private/renderer/errorhandling/ErrorHandlers.js +3 -3
- package/src/private/types/HostInstance.js +4 -1
- package/src/private/webapis/dom/nodes/ReactNativeDocument.js +22 -2
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +1 -1
- package/src/private/webapis/dom/nodes/ReadOnlyElement.js +5 -3
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +16 -13
- package/src/private/webapis/dom/nodes/internals/NodeInternals.js +45 -22
- package/src/private/webapis/dom/nodes/internals/ReactNativeDocumentInstanceHandle.js +1 -1
- package/src/private/webapis/dom/nodes/specs/NativeDOM.js +26 -192
- package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +14 -11
- package/src/private/webapis/dom/oldstylecollections/NodeList.js +13 -10
- package/src/private/webapis/geometry/DOMRectList.js +1 -1
- package/src/private/webapis/mutationobserver/internals/MutationObserverManager.js +1 -1
- package/src/private/webapis/performance/EventTiming.js +1 -1
- package/src/private/webapis/performance/Performance.js +12 -30
- package/src/private/webapis/performance/specs/NativePerformance.js +4 -4
- package/src/private/webapis/structuredClone/structuredClone.js +9 -9
package/.flowconfig
CHANGED
|
@@ -150,7 +150,7 @@ module.system.haste.module_ref_prefix=m#
|
|
|
150
150
|
|
|
151
151
|
react.runtime=automatic
|
|
152
152
|
|
|
153
|
-
|
|
153
|
+
experimental.error_code_migration=new
|
|
154
154
|
|
|
155
155
|
ban_spread_key_props=true
|
|
156
156
|
|
|
@@ -177,4 +177,4 @@ untyped-import
|
|
|
177
177
|
untyped-type-import
|
|
178
178
|
|
|
179
179
|
[version]
|
|
180
|
-
^0.
|
|
180
|
+
^0.279.0
|
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,55 @@
|
|
|
2
2
|
"name": "@office-iss/react-native-win32",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Thu, 25 Dec 2025 06:38:44 GMT",
|
|
6
|
+
"version": "0.0.0-canary.303",
|
|
7
|
+
"tag": "@office-iss/react-native-win32_v0.0.0-canary.303",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "66076509+vineethkuttan@users.noreply.github.com",
|
|
12
|
+
"package": "@office-iss/react-native-win32",
|
|
13
|
+
"commit": "5ef7484667043c898e77f7ab4fdda8d42d833ce5",
|
|
14
|
+
"comment": "Integrate 0.82.0-nightly-20250821-0ef21bf8a"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "66076509+vineethkuttan@users.noreply.github.com",
|
|
18
|
+
"package": "@office-iss/react-native-win32",
|
|
19
|
+
"commit": "857247f5f8dd3bae2c02ad266dc4ff6f9d6f2579",
|
|
20
|
+
"comment": "Bump Jsi Version to 21"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@office-iss/react-native-win32",
|
|
25
|
+
"comment": "Bump react-native-platform-override to v0.0.0-canary.1017",
|
|
26
|
+
"commit": "not available"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"date": "Wed, 03 Dec 2025 06:40:45 GMT",
|
|
33
|
+
"version": "0.0.0-canary.302",
|
|
34
|
+
"tag": "@office-iss/react-native-win32_v0.0.0-canary.302",
|
|
35
|
+
"comments": {
|
|
36
|
+
"prerelease": [
|
|
37
|
+
{
|
|
38
|
+
"author": "vmorozov@microsoft.com",
|
|
39
|
+
"package": "@office-iss/react-native-win32",
|
|
40
|
+
"commit": "6099ed486aabbdc654176d4cab27708e24e8ab0c",
|
|
41
|
+
"comment": "Use 0.0.0-canary.1015 version for public NPM packages"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"author": "beachball",
|
|
45
|
+
"package": "@office-iss/react-native-win32",
|
|
46
|
+
"comment": "Bump react-native-platform-override to v0.0.0-canary.1016",
|
|
47
|
+
"commit": "not available"
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"date": "Mon, 17 Nov 2025 06:42:06 GMT",
|
|
6
54
|
"version": "0.0.0-canary.301",
|
|
7
55
|
"tag": "@office-iss/react-native-win32_v0.0.0-canary.301",
|
|
8
56
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,37 @@
|
|
|
1
1
|
# Change Log - @office-iss/react-native-win32
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Thu, 25 Dec 2025 06:38:44 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## 0.0.0-canary.
|
|
7
|
+
## 0.0.0-canary.303
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Thu, 25 Dec 2025 06:38:44 GMT
|
|
10
10
|
|
|
11
11
|
### Changes
|
|
12
12
|
|
|
13
|
-
-
|
|
14
|
-
- Bump
|
|
13
|
+
- Integrate 0.82.0-nightly-20250821-0ef21bf8a (66076509+vineethkuttan@users.noreply.github.com)
|
|
14
|
+
- Bump Jsi Version to 21 (66076509+vineethkuttan@users.noreply.github.com)
|
|
15
|
+
- Bump react-native-platform-override to v0.0.0-canary.1017
|
|
15
16
|
|
|
17
|
+
## 0.0.0-canary.302
|
|
18
|
+
|
|
19
|
+
Wed, 03 Dec 2025 06:40:45 GMT
|
|
20
|
+
|
|
21
|
+
### Changes
|
|
22
|
+
|
|
23
|
+
- Use 0.0.0-canary.1015 version for public NPM packages (vmorozov@microsoft.com)
|
|
24
|
+
- Bump react-native-platform-override to v0.0.0-canary.1016
|
|
25
|
+
|
|
26
|
+
## 0.0.0-canary.301
|
|
27
|
+
|
|
28
|
+
Mon, 17 Nov 2025 06:42:06 GMT
|
|
29
|
+
|
|
30
|
+
### Changes
|
|
31
|
+
|
|
32
|
+
- Bump @rnw-scripts/just-task to v2.3.58
|
|
33
|
+
- Bump react-native-platform-override to v1.9.61
|
|
34
|
+
|
|
16
35
|
## 0.0.0-canary.300
|
|
17
36
|
|
|
18
37
|
Wed, 12 Nov 2025 21:00:43 GMT
|
|
@@ -36,7 +36,7 @@ const TESTS = [
|
|
|
36
36
|
TESTS.forEach(test =>
|
|
37
37
|
AppRegistry.registerComponent(
|
|
38
38
|
test.displayName || test.name || '',
|
|
39
|
-
/* $FlowFixMe[incompatible-
|
|
39
|
+
/* $FlowFixMe[incompatible-type] (>=0.54.0 site=react_native_fb,react_native_
|
|
40
40
|
* oss) This comment suppresses an error found when Flow v0.54 was deployed.
|
|
41
41
|
* To see the error delete this comment and run Flow. */
|
|
42
42
|
() => test,
|
|
@@ -119,19 +119,19 @@ class LayoutEventsTest extends React.Component<Props, State> {
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
onViewLayout: (e: LayoutChangeEvent) => void = (e: LayoutChangeEvent) => {
|
|
122
|
-
// $FlowFixMe[incompatible-
|
|
122
|
+
// $FlowFixMe[incompatible-type]
|
|
123
123
|
debug('received view layout event\n', e.nativeEvent);
|
|
124
124
|
this.setState({viewLayout: e.nativeEvent.layout}, this.checkLayout);
|
|
125
125
|
};
|
|
126
126
|
|
|
127
127
|
onTextLayout: (e: LayoutChangeEvent) => void = (e: LayoutChangeEvent) => {
|
|
128
|
-
// $FlowFixMe[incompatible-
|
|
128
|
+
// $FlowFixMe[incompatible-type]
|
|
129
129
|
debug('received text layout event\n', e.nativeEvent);
|
|
130
130
|
this.setState({textLayout: e.nativeEvent.layout}, this.checkLayout);
|
|
131
131
|
};
|
|
132
132
|
|
|
133
133
|
onImageLayout: (e: LayoutChangeEvent) => void = (e: LayoutChangeEvent) => {
|
|
134
|
-
// $FlowFixMe[incompatible-
|
|
134
|
+
// $FlowFixMe[incompatible-type]
|
|
135
135
|
debug('received image layout event\n', e.nativeEvent);
|
|
136
136
|
this.setState({imageLayout: e.nativeEvent.layout}, this.checkLayout);
|
|
137
137
|
};
|
|
@@ -121,11 +121,11 @@ const ActionSheetIOS = {
|
|
|
121
121
|
RCTActionSheetManager.showActionSheetWithOptions(
|
|
122
122
|
{
|
|
123
123
|
...remainingOptions,
|
|
124
|
-
// $FlowFixMe[incompatible-
|
|
124
|
+
// $FlowFixMe[incompatible-type]
|
|
125
125
|
tintColor: processedTintColor,
|
|
126
|
-
// $FlowFixMe[incompatible-
|
|
126
|
+
// $FlowFixMe[incompatible-type]
|
|
127
127
|
cancelButtonTintColor: processedCancelButtonTintColor,
|
|
128
|
-
// $FlowFixMe[incompatible-
|
|
128
|
+
// $FlowFixMe[incompatible-type]
|
|
129
129
|
disabledButtonTintColor: processedDisabledButtonTintColor,
|
|
130
130
|
destructiveButtonIndices,
|
|
131
131
|
},
|
|
@@ -24,10 +24,10 @@ export function alertWithArgs(
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
NativeDialogManagerAndroid.showAlert(
|
|
27
|
-
// $FlowFixMe[
|
|
27
|
+
// $FlowFixMe[incompatible-type] - Mismatched platform interfaces.
|
|
28
28
|
args,
|
|
29
29
|
emptyCallback,
|
|
30
|
-
// $FlowFixMe[incompatible-
|
|
30
|
+
// $FlowFixMe[incompatible-type] - Mismatched platform interfaces.
|
|
31
31
|
/* $FlowFixMe[constant-condition] Error discovered during Constant
|
|
32
32
|
* Condition roll out. See https://fburl.com/workplace/1v97vimq. */
|
|
33
33
|
callback || emptyCallback,
|
|
@@ -374,7 +374,7 @@ const parallelImpl = function (
|
|
|
374
374
|
const hasEnded: {[number]: boolean} = {};
|
|
375
375
|
const stopTogether = !(config && config.stopTogether === false);
|
|
376
376
|
|
|
377
|
-
const result = {
|
|
377
|
+
const result: CompositeAnimation = {
|
|
378
378
|
start: function (callback?: ?EndCallback, isLooping?: boolean) {
|
|
379
379
|
if (doneCount === animations.length) {
|
|
380
380
|
callback && callback({finished: true});
|
|
@@ -462,7 +462,7 @@ type LoopAnimationConfig = {
|
|
|
462
462
|
|
|
463
463
|
const loopImpl = function (
|
|
464
464
|
animation: CompositeAnimation,
|
|
465
|
-
// $FlowFixMe[
|
|
465
|
+
// $FlowFixMe[incompatible-type]
|
|
466
466
|
{iterations = -1, resetBeforeIteration = true}: LoopAnimationConfig = {},
|
|
467
467
|
): CompositeAnimation {
|
|
468
468
|
let isFinished = false;
|
|
@@ -158,7 +158,7 @@ type LoopAnimationConfig = {
|
|
|
158
158
|
|
|
159
159
|
const loop = function (
|
|
160
160
|
animation: CompositeAnimation,
|
|
161
|
-
// $FlowFixMe[
|
|
161
|
+
// $FlowFixMe[incompatible-type]
|
|
162
162
|
{iterations = -1}: LoopAnimationConfig = {},
|
|
163
163
|
): CompositeAnimation {
|
|
164
164
|
return emptyAnimation;
|
|
@@ -150,12 +150,11 @@ export default class Animation {
|
|
|
150
150
|
if (value != null) {
|
|
151
151
|
animatedValue.__onAnimatedValueUpdateReceived(value, offset);
|
|
152
152
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
) {
|
|
153
|
+
const isJsSyncRemoved =
|
|
154
|
+
ReactNativeFeatureFlags.cxxNativeAnimatedEnabled() &&
|
|
155
|
+
!ReactNativeFeatureFlags.disableFabricCommitInCXXAnimated() &&
|
|
156
|
+
ReactNativeFeatureFlags.cxxNativeAnimatedRemoveJsSync();
|
|
157
|
+
if (!isJsSyncRemoved) {
|
|
159
158
|
if (this.__isLooping === true) {
|
|
160
159
|
return;
|
|
161
160
|
}
|
|
@@ -89,7 +89,7 @@ const AnimatedScrollViewWithInvertedRefreshControl =
|
|
|
89
89
|
const {intermediatePropsForRefreshControl, intermediatePropsForScrollView} =
|
|
90
90
|
useMemo(() => {
|
|
91
91
|
// $FlowFixMe[underconstrained-implicit-instantiation]
|
|
92
|
-
// $FlowFixMe[incompatible-
|
|
92
|
+
// $FlowFixMe[incompatible-type]
|
|
93
93
|
const {outer, inner} = splitLayoutProps(flattenStyle(props.style));
|
|
94
94
|
return {
|
|
95
95
|
intermediatePropsForRefreshControl: {style: outer},
|
|
@@ -60,12 +60,12 @@ function processColor(
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
if (isRgbaValue(color)) {
|
|
63
|
-
// $
|
|
63
|
+
// $FlowFixMe[incompatible-type] - Type is verified above
|
|
64
64
|
return (color: RgbaValue);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
let normalizedColor: ?ProcessedColorValue = normalizeColor(
|
|
68
|
-
// $
|
|
68
|
+
// $FlowFixMe[incompatible-type] - Type is verified above
|
|
69
69
|
(color: ColorValue),
|
|
70
70
|
);
|
|
71
71
|
if (normalizedColor === undefined || normalizedColor === null) {
|
|
@@ -125,7 +125,7 @@ export default class AnimatedColor extends AnimatedWithChildren {
|
|
|
125
125
|
let value: RgbaValue | RgbaAnimatedValue | ColorValue =
|
|
126
126
|
valueIn ?? defaultColor;
|
|
127
127
|
if (isRgbaAnimatedValue(value)) {
|
|
128
|
-
// $
|
|
128
|
+
// $FlowFixMe[incompatible-type] - Type is verified above
|
|
129
129
|
const rgbaAnimatedValue: RgbaAnimatedValue = (value: RgbaAnimatedValue);
|
|
130
130
|
this.r = rgbaAnimatedValue.r;
|
|
131
131
|
this.g = rgbaAnimatedValue.g;
|
|
@@ -133,14 +133,14 @@ export default class AnimatedColor extends AnimatedWithChildren {
|
|
|
133
133
|
this.a = rgbaAnimatedValue.a;
|
|
134
134
|
} else {
|
|
135
135
|
const processedColor: RgbaValue | NativeColorValue =
|
|
136
|
-
// $
|
|
136
|
+
// $FlowFixMe[incompatible-type] - Type is verified above
|
|
137
137
|
processColor((value: ColorValue | RgbaValue)) ?? defaultColor;
|
|
138
138
|
let initColor: RgbaValue = defaultColor;
|
|
139
139
|
if (isRgbaValue(processedColor)) {
|
|
140
|
-
// $
|
|
140
|
+
// $FlowFixMe[incompatible-type] - Type is verified above
|
|
141
141
|
initColor = (processedColor: RgbaValue);
|
|
142
142
|
} else {
|
|
143
|
-
// $
|
|
143
|
+
// $FlowFixMe[incompatible-type] - Type is verified above
|
|
144
144
|
this.nativeColor = (processedColor: NativeColorValue);
|
|
145
145
|
}
|
|
146
146
|
|
|
@@ -170,7 +170,7 @@ export default class AnimatedColor extends AnimatedWithChildren {
|
|
|
170
170
|
processColor(value) ?? defaultColor;
|
|
171
171
|
this._withSuspendedCallbacks(() => {
|
|
172
172
|
if (isRgbaValue(processedColor)) {
|
|
173
|
-
// $
|
|
173
|
+
// $FlowFixMe[incompatible-type] - Type is verified above
|
|
174
174
|
const rgbaValue: RgbaValue = processedColor;
|
|
175
175
|
this.r.setValue(rgbaValue.r);
|
|
176
176
|
this.g.setValue(rgbaValue.g);
|
|
@@ -181,7 +181,7 @@ export default class AnimatedColor extends AnimatedWithChildren {
|
|
|
181
181
|
shouldUpdateNodeConfig = true;
|
|
182
182
|
}
|
|
183
183
|
} else {
|
|
184
|
-
// $
|
|
184
|
+
// $FlowFixMe[incompatible-type] - Type is verified above
|
|
185
185
|
const nativeColor: NativeColorValue = processedColor;
|
|
186
186
|
if (this.nativeColor !== nativeColor) {
|
|
187
187
|
this.nativeColor = nativeColor;
|
|
@@ -203,7 +203,7 @@ export default class AnimatedColor extends AnimatedWithChildren {
|
|
|
203
203
|
flushValue(this);
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
// $FlowFixMe[incompatible-
|
|
206
|
+
// $FlowFixMe[incompatible-type]
|
|
207
207
|
this.__callListeners(this.__getValue());
|
|
208
208
|
}
|
|
209
209
|
|
|
@@ -224,7 +224,7 @@ function createStringInterpolation(
|
|
|
224
224
|
outputRange.every(output =>
|
|
225
225
|
output.components.every(
|
|
226
226
|
(component, i) =>
|
|
227
|
-
// $
|
|
227
|
+
// $FlowFixMe[invalid-compare]
|
|
228
228
|
typeof component === 'number' || component === firstOutput[i],
|
|
229
229
|
),
|
|
230
230
|
),
|
|
@@ -235,9 +235,9 @@ function createStringInterpolation(
|
|
|
235
235
|
const numericComponents: $ReadOnlyArray<$ReadOnlyArray<number>> =
|
|
236
236
|
outputRange.map(output =>
|
|
237
237
|
isColor
|
|
238
|
-
? // $
|
|
238
|
+
? // $FlowFixMe[incompatible-type]
|
|
239
239
|
output.components
|
|
240
|
-
: // $
|
|
240
|
+
: // $FlowFixMe[incompatible-call]
|
|
241
241
|
output.components.filter(c => typeof c === 'number'),
|
|
242
242
|
);
|
|
243
243
|
const interpolations = numericComponents[0].map((_, i) =>
|
|
@@ -393,7 +393,7 @@ export default class AnimatedInterpolation<
|
|
|
393
393
|
let outputRange = this._config.outputRange;
|
|
394
394
|
let outputType = null;
|
|
395
395
|
if (typeof outputRange[0] === 'string') {
|
|
396
|
-
// $
|
|
396
|
+
// $FlowFixMe[incompatible-type]
|
|
397
397
|
outputRange = ((outputRange: $ReadOnlyArray<string>).map(value => {
|
|
398
398
|
const processedColor = processColor(value);
|
|
399
399
|
if (typeof processedColor === 'number') {
|
|
@@ -325,8 +325,8 @@ export default class AnimatedProps extends AnimatedNode {
|
|
|
325
325
|
|
|
326
326
|
// Supported versions of JSC do not implement the newer Object.hasOwn. Remove
|
|
327
327
|
// this shim when they do.
|
|
328
|
-
// $
|
|
328
|
+
// $FlowFixMe[method-unbinding]
|
|
329
329
|
const _hasOwnProp = Object.prototype.hasOwnProperty;
|
|
330
330
|
const hasOwn: (obj: $ReadOnly<{...}>, prop: string) => boolean =
|
|
331
|
-
// $
|
|
331
|
+
// $FlowFixMe[method-unbinding]
|
|
332
332
|
Object.hasOwn ?? ((obj, prop) => _hasOwnProp.call(obj, prop));
|
|
@@ -43,7 +43,7 @@ function createAnimatedStyle(
|
|
|
43
43
|
if (value != null && key === 'transform') {
|
|
44
44
|
node = ReactNativeFeatureFlags.shouldUseAnimatedObjectForTransform()
|
|
45
45
|
? AnimatedObject.from(value)
|
|
46
|
-
: // $FlowFixMe[incompatible-
|
|
46
|
+
: // $FlowFixMe[incompatible-type] - `value` is mixed.
|
|
47
47
|
AnimatedTransform.from(value);
|
|
48
48
|
} else if (value instanceof AnimatedNode) {
|
|
49
49
|
node = value;
|
|
@@ -102,6 +102,8 @@ export default class AnimatedStyle extends AnimatedWithChildren {
|
|
|
102
102
|
const [nodeKeys, nodes, style] = createAnimatedStyle(
|
|
103
103
|
flatStyle,
|
|
104
104
|
allowlist,
|
|
105
|
+
/* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
|
|
106
|
+
* roll out. See https://fburl.com/workplace/4oq3zi07. */
|
|
105
107
|
Platform.OS !== 'web',
|
|
106
108
|
);
|
|
107
109
|
if (nodes.length === 0) {
|
|
@@ -123,7 +125,7 @@ export default class AnimatedStyle extends AnimatedWithChildren {
|
|
|
123
125
|
this._style = style;
|
|
124
126
|
|
|
125
127
|
if ((Platform.OS as string) === 'web') {
|
|
126
|
-
// $
|
|
128
|
+
// $FlowFixMe[cannot-write] - Intentional shadowing.
|
|
127
129
|
this.__getValueForStyle = resultStyle => [
|
|
128
130
|
originalStyleForWeb,
|
|
129
131
|
resultStyle,
|
|
@@ -249,8 +251,8 @@ export default class AnimatedStyle extends AnimatedWithChildren {
|
|
|
249
251
|
|
|
250
252
|
// Supported versions of JSC do not implement the newer Object.hasOwn. Remove
|
|
251
253
|
// this shim when they do.
|
|
252
|
-
// $
|
|
254
|
+
// $FlowFixMe[method-unbinding]
|
|
253
255
|
const _hasOwnProp = Object.prototype.hasOwnProperty;
|
|
254
256
|
const hasOwn: (obj: $ReadOnly<{...}>, prop: string) => boolean =
|
|
255
|
-
// $
|
|
257
|
+
// $FlowFixMe[method-unbinding]
|
|
256
258
|
Object.hasOwn ?? ((obj, prop) => _hasOwnProp.call(obj, prop));
|
|
@@ -148,7 +148,7 @@ export default class AnimatedTransform extends AnimatedWithChildren {
|
|
|
148
148
|
transformsConfig.push({
|
|
149
149
|
type: 'static',
|
|
150
150
|
property: key,
|
|
151
|
-
/* $FlowFixMe[incompatible-
|
|
151
|
+
/* $FlowFixMe[incompatible-type] - `value` can be an array or an
|
|
152
152
|
object. This is not currently handled by `transformDataType`.
|
|
153
153
|
Migrating to `TransformObject` might solve this. */
|
|
154
154
|
value: NativeAnimatedHelper.transformDataType(value),
|
|
@@ -97,7 +97,7 @@ class AppStateImpl {
|
|
|
97
97
|
// It's possible that the state will have changed here & listeners need to be notified
|
|
98
98
|
if (!eventUpdated && this.currentState !== appStateData.app_state) {
|
|
99
99
|
this.currentState = appStateData.app_state;
|
|
100
|
-
// $FlowFixMe[incompatible-
|
|
100
|
+
// $FlowFixMe[incompatible-type]
|
|
101
101
|
emitter.emit('appStateDidChange', appStateData);
|
|
102
102
|
}
|
|
103
103
|
}, logError);
|
|
@@ -134,9 +134,13 @@ class AppStateImpl {
|
|
|
134
134
|
// $FlowFixMe[invalid-tuple-arity] Flow cannot refine handler based on the event type
|
|
135
135
|
const focusOrBlurHandler: () => void = handler;
|
|
136
136
|
return emitter.addListener('appStateFocusChange', hasFocus => {
|
|
137
|
+
/* $FlowFixMe[invalid-compare] Error discovered during Constant
|
|
138
|
+
* Condition roll out. See https://fburl.com/workplace/4oq3zi07. */
|
|
137
139
|
if (type === 'blur' && !hasFocus) {
|
|
138
140
|
focusOrBlurHandler();
|
|
139
141
|
}
|
|
142
|
+
/* $FlowFixMe[invalid-compare] Error discovered during Constant
|
|
143
|
+
* Condition roll out. See https://fburl.com/workplace/4oq3zi07. */
|
|
140
144
|
if (type === 'focus' && hasFocus) {
|
|
141
145
|
focusOrBlurHandler();
|
|
142
146
|
}
|
|
@@ -173,7 +173,7 @@ function updateErrorWithErrorData(
|
|
|
173
173
|
): ExtendedError {
|
|
174
174
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for this
|
|
175
175
|
* parameters */
|
|
176
|
-
// $FlowFixMe[incompatible-
|
|
176
|
+
// $FlowFixMe[incompatible-type]
|
|
177
177
|
// $FlowFixMe[unsafe-object-assign]
|
|
178
178
|
return Object.assign(error, errorData || {});
|
|
179
179
|
}
|
|
@@ -86,7 +86,7 @@ class BlobManager {
|
|
|
86
86
|
});
|
|
87
87
|
const size = items.reduce((acc, curr) => {
|
|
88
88
|
if (curr.type === 'string') {
|
|
89
|
-
/* $FlowFixMe[incompatible-
|
|
89
|
+
/* $FlowFixMe[incompatible-type] Natural Inference rollout. See
|
|
90
90
|
* https://fburl.com/workplace/6291gfvu */
|
|
91
91
|
return acc + global.unescape(encodeURI(curr.data)).length;
|
|
92
92
|
} else {
|
|
@@ -402,7 +402,7 @@ const AccessibilityInfo = {
|
|
|
402
402
|
const deviceEventName = EventNames.get(eventName);
|
|
403
403
|
return deviceEventName == null
|
|
404
404
|
? {remove(): void {}}
|
|
405
|
-
: // $FlowFixMe[incompatible-
|
|
405
|
+
: // $FlowFixMe[incompatible-type]
|
|
406
406
|
RCTDeviceEventEmitter.addListener(deviceEventName, handler);
|
|
407
407
|
},
|
|
408
408
|
|
|
@@ -426,7 +426,7 @@ const AccessibilityInfo = {
|
|
|
426
426
|
const deviceEventName = EventNames.get(eventName);
|
|
427
427
|
return deviceEventName == null
|
|
428
428
|
? {remove(): void {}}
|
|
429
|
-
: // $FlowFixMe[incompatible-
|
|
429
|
+
: // $FlowFixMe[incompatible-type]
|
|
430
430
|
RCTDeviceEventEmitter.addListener(deviceEventName, handler);
|
|
431
431
|
},
|
|
432
432
|
|
|
@@ -386,7 +386,7 @@ const Button: component(
|
|
|
386
386
|
touchSoundDisabled={touchSoundDisabled}
|
|
387
387
|
// $FlowFixMe[incompatible-exact]
|
|
388
388
|
// $FlowFixMe[prop-missing]
|
|
389
|
-
// $FlowFixMe[incompatible-type
|
|
389
|
+
// $FlowFixMe[incompatible-type]
|
|
390
390
|
ref={ref}>
|
|
391
391
|
<View style={buttonStyles}>
|
|
392
392
|
<Text style={textStyles} disabled={disabled}>
|
|
@@ -394,7 +394,7 @@ const Button: component(
|
|
|
394
394
|
touchSoundDisabled={touchSoundDisabled}
|
|
395
395
|
// $FlowFixMe[incompatible-exact]
|
|
396
396
|
// $FlowFixMe[prop-missing]
|
|
397
|
-
// $FlowFixMe[incompatible-type
|
|
397
|
+
// $FlowFixMe[incompatible-type]
|
|
398
398
|
ref={ref}>
|
|
399
399
|
<View style={buttonStyles}>
|
|
400
400
|
<Text style={textStyles} disabled={disabled}>
|
|
@@ -71,9 +71,9 @@ export default function useAndroidRippleForView(
|
|
|
71
71
|
return {
|
|
72
72
|
viewProps:
|
|
73
73
|
foreground === true
|
|
74
|
-
? // $FlowFixMe[incompatible-
|
|
74
|
+
? // $FlowFixMe[incompatible-type]
|
|
75
75
|
{nativeForegroundAndroid: nativeRippleValue}
|
|
76
|
-
: // $FlowFixMe[incompatible-
|
|
76
|
+
: // $FlowFixMe[incompatible-type]
|
|
77
77
|
{nativeBackgroundAndroid: nativeRippleValue},
|
|
78
78
|
onPressIn(event: GestureResponderEvent): void {
|
|
79
79
|
const view = viewRef.current;
|
|
@@ -1169,6 +1169,7 @@ class ScrollView extends React.Component<ScrollViewProps, ScrollViewState> {
|
|
|
1169
1169
|
// they are callable from the ref.
|
|
1170
1170
|
|
|
1171
1171
|
// $FlowFixMe[prop-missing] - Known issue with appending custom methods.
|
|
1172
|
+
// $FlowFixMe[incompatible-type]
|
|
1172
1173
|
// $FlowFixMe[unsafe-object-assign]
|
|
1173
1174
|
const publicInstance: PublicScrollViewInstance = Object.assign(
|
|
1174
1175
|
nativeInstance,
|
|
@@ -1502,7 +1503,7 @@ class ScrollView extends React.Component<ScrollViewProps, ScrollViewState> {
|
|
|
1502
1503
|
keyboardNeverPersistTaps &&
|
|
1503
1504
|
this._keyboardIsDismissible() &&
|
|
1504
1505
|
e.target != null &&
|
|
1505
|
-
// $FlowFixMe
|
|
1506
|
+
// $FlowFixMe Error supressed during the migration of HostInstance to ReactNativeElement
|
|
1506
1507
|
!TextInputState.isTextInput(e.target)
|
|
1507
1508
|
) {
|
|
1508
1509
|
return true;
|
|
@@ -1834,7 +1835,7 @@ class ScrollView extends React.Component<ScrollViewProps, ScrollViewState> {
|
|
|
1834
1835
|
// Note: we should split props.style on the inner and outer props
|
|
1835
1836
|
// however, the ScrollView still needs the baseStyle to be scrollable
|
|
1836
1837
|
const {outer, inner} = splitLayoutProps(flattenStyle(props.style));
|
|
1837
|
-
// $FlowFixMe[incompatible-
|
|
1838
|
+
// $FlowFixMe[incompatible-type]
|
|
1838
1839
|
return cloneElement(
|
|
1839
1840
|
refreshControl,
|
|
1840
1841
|
{style: StyleSheet.compose(baseStyle, outer)},
|
|
@@ -78,7 +78,7 @@ const ScrollViewStickyHeader: component(
|
|
|
78
78
|
setIsFabric(isFabricPublicInstance(ref));
|
|
79
79
|
}, []);
|
|
80
80
|
const ref: React.RefSetter<React.ElementRef<typeof Animated.View>> =
|
|
81
|
-
// $FlowFixMe[
|
|
81
|
+
// $FlowFixMe[incompatible-type] - Instance is mutated to have `setNextHeaderY`.
|
|
82
82
|
useMergeRefs<Instance>(callbackRef, forwardedRef);
|
|
83
83
|
|
|
84
84
|
const offset = useMemo(
|
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
} from '../../Types/CoreEventTypes';
|
|
19
19
|
import type {ViewProps} from '../View/ViewPropTypes';
|
|
20
20
|
|
|
21
|
+
import ReactNativeElement from '../../../src/private/webapis/dom/nodes/ReactNativeElement';
|
|
21
22
|
import {type ColorValue, type TextStyleProp} from '../../StyleSheet/StyleSheet';
|
|
22
23
|
import * as React from 'react';
|
|
23
24
|
|
|
@@ -1037,13 +1038,19 @@ export type TextInputProps = $ReadOnly<{
|
|
|
1037
1038
|
...TextInputBaseProps,
|
|
1038
1039
|
}>;
|
|
1039
1040
|
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1041
|
+
/**
|
|
1042
|
+
* TextInput monkey-patches the native element instance with these methods.
|
|
1043
|
+
* It isn't technically a class but this is the most elegant way to type it.
|
|
1044
|
+
*/
|
|
1045
|
+
declare class _TextInputInstance extends ReactNativeElement {
|
|
1046
|
+
clear(): void;
|
|
1047
|
+
isFocused(): boolean;
|
|
1048
|
+
getNativeRef(): ?ReactNativeElement;
|
|
1049
|
+
setSelection(start: number, end: number): void;
|
|
1045
1050
|
}
|
|
1046
1051
|
|
|
1052
|
+
export type TextInputInstance = _TextInputInstance;
|
|
1053
|
+
|
|
1047
1054
|
/**
|
|
1048
1055
|
* A foundational component for inputting text into the app via a
|
|
1049
1056
|
* keyboard. Props provide configurability for several features, such as
|
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
} from '../../Types/CoreEventTypes';
|
|
19
19
|
import type {ViewProps} from '../View/ViewPropTypes';
|
|
20
20
|
|
|
21
|
+
import ReactNativeElement from '../../../src/private/webapis/dom/nodes/ReactNativeElement';
|
|
21
22
|
import {type ColorValue, type TextStyleProp} from '../../StyleSheet/StyleSheet';
|
|
22
23
|
import * as React from 'react';
|
|
23
24
|
|
|
@@ -1071,13 +1072,19 @@ export type TextInputProps = $ReadOnly<{
|
|
|
1071
1072
|
...TextInputWindowsProps, // [Windows]
|
|
1072
1073
|
}>;
|
|
1073
1074
|
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1075
|
+
/**
|
|
1076
|
+
* TextInput monkey-patches the native element instance with these methods.
|
|
1077
|
+
* It isn't technically a class but this is the most elegant way to type it.
|
|
1078
|
+
*/
|
|
1079
|
+
declare class _TextInputInstance extends ReactNativeElement {
|
|
1080
|
+
clear(): void;
|
|
1081
|
+
isFocused(): boolean;
|
|
1082
|
+
getNativeRef(): ?ReactNativeElement;
|
|
1083
|
+
setSelection(start: number, end: number): void;
|
|
1079
1084
|
}
|
|
1080
1085
|
|
|
1086
|
+
export type TextInputInstance = _TextInputInstance;
|
|
1087
|
+
|
|
1081
1088
|
/**
|
|
1082
1089
|
* A foundational component for inputting text into the app via a
|
|
1083
1090
|
* keyboard. Props provide configurability for several features, such as
|