@office-iss/react-native-win32 0.0.0-canary.302 → 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 +28 -1
- package/CHANGELOG.md +15 -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
|
@@ -67,7 +67,7 @@ const virtualTextViewConfig = {
|
|
|
67
67
|
|
|
68
68
|
export const NativeText: HostComponent<NativeTextProps> =
|
|
69
69
|
(createReactNativeComponentClass('RCTText', () =>
|
|
70
|
-
/* $FlowFixMe[incompatible-
|
|
70
|
+
/* $FlowFixMe[incompatible-type] Natural Inference rollout. See
|
|
71
71
|
* https://fburl.com/workplace/6291gfvu */
|
|
72
72
|
createViewConfig(textViewConfig),
|
|
73
73
|
): any);
|
|
@@ -76,7 +76,7 @@ export const NativeVirtualText: HostComponent<NativeTextProps> =
|
|
|
76
76
|
!global.RN$Bridgeless && !UIManager.hasViewManagerConfig('RCTVirtualText')
|
|
77
77
|
? NativeText
|
|
78
78
|
: (createReactNativeComponentClass('RCTVirtualText', () =>
|
|
79
|
-
/* $FlowFixMe[incompatible-
|
|
79
|
+
/* $FlowFixMe[incompatible-type] Natural Inference rollout. See
|
|
80
80
|
* https://fburl.com/workplace/6291gfvu */
|
|
81
81
|
createViewConfig(virtualTextViewConfig),
|
|
82
82
|
): any);
|
|
@@ -101,7 +101,7 @@ const virtualTextViewConfig = {
|
|
|
101
101
|
|
|
102
102
|
export const NativeText: HostComponent<NativeTextProps> =
|
|
103
103
|
(createReactNativeComponentClass('RCTText', () =>
|
|
104
|
-
/* $FlowFixMe[incompatible-
|
|
104
|
+
/* $FlowFixMe[incompatible-type] Natural Inference rollout. See
|
|
105
105
|
* https://fburl.com/workplace/6291gfvu */
|
|
106
106
|
createViewConfig(textViewConfig),
|
|
107
107
|
): any);
|
|
@@ -111,7 +111,7 @@ export const NativeVirtualText: HostComponent<NativeTextProps> =
|
|
|
111
111
|
UIManager.getViewManagerConfig('RCTVirtualText') == null
|
|
112
112
|
? NativeText
|
|
113
113
|
: (createReactNativeComponentClass('RCTVirtualText', () =>
|
|
114
|
-
/* $FlowFixMe[incompatible-
|
|
114
|
+
/* $FlowFixMe[incompatible-type] Natural Inference rollout. See
|
|
115
115
|
* https://fburl.com/workplace/6291gfvu */
|
|
116
116
|
createViewConfig(virtualTextViewConfig),
|
|
117
117
|
): any);
|
|
@@ -72,12 +72,12 @@ const Platform: PlatformType = {
|
|
|
72
72
|
},
|
|
73
73
|
select: <T>(spec: PlatformSelectSpec<T>): T =>
|
|
74
74
|
'android' in spec
|
|
75
|
-
? // $FlowFixMe[incompatible-
|
|
75
|
+
? // $FlowFixMe[incompatible-type]
|
|
76
76
|
spec.android
|
|
77
77
|
: 'native' in spec
|
|
78
|
-
? // $FlowFixMe[incompatible-
|
|
78
|
+
? // $FlowFixMe[incompatible-type]
|
|
79
79
|
spec.native
|
|
80
|
-
: // $FlowFixMe[incompatible-
|
|
80
|
+
: // $FlowFixMe[incompatible-type]
|
|
81
81
|
spec.default,
|
|
82
82
|
};
|
|
83
83
|
|
|
@@ -78,7 +78,7 @@ const Platform: PlatformType = {
|
|
|
78
78
|
return this.constants.isMacCatalyst ?? false;
|
|
79
79
|
},
|
|
80
80
|
select: <T>(spec: PlatformSelectSpec<T>): T =>
|
|
81
|
-
// $FlowFixMe[incompatible-
|
|
81
|
+
// $FlowFixMe[incompatible-type]
|
|
82
82
|
'ios' in spec ? spec.ios : 'native' in spec ? spec.native : spec.default,
|
|
83
83
|
};
|
|
84
84
|
|
|
@@ -66,12 +66,12 @@ const Platform: PlatformType = {
|
|
|
66
66
|
},
|
|
67
67
|
select: <T>(spec: PlatformSelectSpec<T>): T =>
|
|
68
68
|
'win32' in spec
|
|
69
|
-
? // $FlowFixMe[incompatible-
|
|
69
|
+
? // $FlowFixMe[incompatible-type]
|
|
70
70
|
spec.win32
|
|
71
71
|
: 'native' in spec
|
|
72
|
-
? // $FlowFixMe[incompatible-
|
|
72
|
+
? // $FlowFixMe[incompatible-type]
|
|
73
73
|
spec.native
|
|
74
|
-
: // $FlowFixMe[incompatible-
|
|
74
|
+
: // $FlowFixMe[incompatible-type]
|
|
75
75
|
spec.default,
|
|
76
76
|
};
|
|
77
77
|
|
|
@@ -38,13 +38,21 @@ function byClickable(): Predicate {
|
|
|
38
38
|
node =>
|
|
39
39
|
// note: <Text /> lazy-mounts press handlers after the first press,
|
|
40
40
|
// so this is a workaround for targeting text nodes.
|
|
41
|
+
/* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
|
|
42
|
+
* roll out. See https://fburl.com/workplace/4oq3zi07. */
|
|
41
43
|
(node.type === Text &&
|
|
42
44
|
node.props &&
|
|
43
45
|
typeof node.props.onPress === 'function') ||
|
|
44
46
|
// note: Special casing <Switch /> since it doesn't use touchable
|
|
47
|
+
/* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
|
|
48
|
+
* roll out. See https://fburl.com/workplace/4oq3zi07. */
|
|
45
49
|
(node.type === Switch && node.props && node.props.disabled !== true) ||
|
|
50
|
+
/* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
|
|
51
|
+
* roll out. See https://fburl.com/workplace/4oq3zi07. */
|
|
46
52
|
(node.type === View &&
|
|
47
53
|
node?.props?.onStartShouldSetResponder?.testOnly_pressabilityConfig) ||
|
|
54
|
+
/* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
|
|
55
|
+
* roll out. See https://fburl.com/workplace/4oq3zi07. */
|
|
48
56
|
(node.type === TouchableWithoutFeedback &&
|
|
49
57
|
node.props &&
|
|
50
58
|
typeof node.props.onPress === 'function') ||
|
|
@@ -174,8 +182,12 @@ function renderWithStrictMode(element: React.Node): ReactTestRendererType {
|
|
|
174
182
|
|
|
175
183
|
function tap(instance: ReactTestInstance) {
|
|
176
184
|
const touchable = instance.find(byClickable());
|
|
185
|
+
/* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
|
|
186
|
+
* roll out. See https://fburl.com/workplace/4oq3zi07. */
|
|
177
187
|
if (touchable.type === Text && touchable.props && touchable.props.onPress) {
|
|
178
188
|
touchable.props.onPress();
|
|
189
|
+
/* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
|
|
190
|
+
* roll out. See https://fburl.com/workplace/4oq3zi07. */
|
|
179
191
|
} else if (touchable.type === Switch && touchable.props) {
|
|
180
192
|
const value = !touchable.props.value;
|
|
181
193
|
const {onChange, onValueChange} = touchable.props;
|
|
@@ -22,7 +22,7 @@ function codegenNativeCommands<T: interface {}>(
|
|
|
22
22
|
options.supportedCommands.forEach(command => {
|
|
23
23
|
// $FlowFixMe[missing-local-annot]
|
|
24
24
|
commandObj[command] = (ref, ...args) => {
|
|
25
|
-
// $FlowFixMe[incompatible-
|
|
25
|
+
// $FlowFixMe[incompatible-type]
|
|
26
26
|
dispatchCommand(ref, command, args);
|
|
27
27
|
};
|
|
28
28
|
});
|
|
@@ -126,7 +126,7 @@ export default class EventEmitter<
|
|
|
126
126
|
// Copy `registrations` to take a snapshot when we invoke `emit`, in case
|
|
127
127
|
// registrations are added or removed when listeners are invoked.
|
|
128
128
|
for (const registration of Array.from(registrations)) {
|
|
129
|
-
// $FlowFixMe[incompatible-
|
|
129
|
+
// $FlowFixMe[incompatible-type]
|
|
130
130
|
registration.listener.apply(registration.context, args);
|
|
131
131
|
}
|
|
132
132
|
}
|
package/index.js
CHANGED
|
@@ -241,6 +241,9 @@ module.exports = {
|
|
|
241
241
|
get NativeAppEventEmitter() {
|
|
242
242
|
return require('./Libraries/EventEmitter/RCTNativeAppEventEmitter').default;
|
|
243
243
|
},
|
|
244
|
+
get NativeComponentRegistry() {
|
|
245
|
+
return require('./Libraries/NativeComponent/NativeComponentRegistry');
|
|
246
|
+
},
|
|
244
247
|
get NativeDialogManagerAndroid() {
|
|
245
248
|
return require('./Libraries/NativeModules/specs/NativeDialogManagerAndroid')
|
|
246
249
|
.default;
|
package/index.win32.js
CHANGED
|
@@ -73,6 +73,7 @@ import typeof LogBox from './Libraries/LogBox/LogBox';
|
|
|
73
73
|
import typeof Modal from './Libraries/Modal/Modal';
|
|
74
74
|
// $FlowFixMe[invalid-exported-annotation]
|
|
75
75
|
import typeof NativeDialogManagerAndroid from './Libraries/NativeModules/specs/NativeDialogManagerAndroid';
|
|
76
|
+
import typeof * as NativeComponentRegistry from './Libraries/NativeComponent/NativeComponentRegistry';
|
|
76
77
|
import typeof Networking from './Libraries/Network/RCTNetworking';
|
|
77
78
|
import typeof * as Systrace from './Libraries/Performance/Systrace';
|
|
78
79
|
import typeof PermissionsAndroid from './Libraries/PermissionsAndroid/PermissionsAndroid';
|
|
@@ -327,6 +328,9 @@ module.exports = {
|
|
|
327
328
|
get NativeAppEventEmitter(): RCTNativeAppEventEmitter {
|
|
328
329
|
return require('./Libraries/EventEmitter/RCTNativeAppEventEmitter').default;
|
|
329
330
|
},
|
|
331
|
+
get NativeComponentRegistry(): NativeComponentRegistry {
|
|
332
|
+
return require('./Libraries/NativeComponent/NativeComponentRegistry');
|
|
333
|
+
},
|
|
330
334
|
get NativeDialogManagerAndroid(): NativeDialogManagerAndroid {
|
|
331
335
|
return require('./Libraries/NativeModules/specs/NativeDialogManagerAndroid')
|
|
332
336
|
.default;
|
package/jest/local-setup.js
CHANGED
|
@@ -16,13 +16,13 @@ import './setup';
|
|
|
16
16
|
const consoleError = console.error;
|
|
17
17
|
const consoleWarn = console.warn;
|
|
18
18
|
|
|
19
|
-
// $
|
|
19
|
+
// $FlowFixMe[cannot-write]
|
|
20
20
|
console.error = (...args) => {
|
|
21
21
|
consoleError(...args);
|
|
22
22
|
throw new Error('console.error() was called (see error above)');
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
// $
|
|
25
|
+
// $FlowFixMe[cannot-write]
|
|
26
26
|
console.warn = (...args) => {
|
|
27
27
|
consoleWarn(...args);
|
|
28
28
|
throw new Error('console.warn() was called (see warning above)');
|
package/jest/mock.js
CHANGED
package/jest/mockComponent.js
CHANGED
|
@@ -30,9 +30,9 @@ export default function mockComponent<
|
|
|
30
30
|
? ModuleDefault<TComponentModule & typeof instanceMethods>
|
|
31
31
|
: TComponentModule & typeof instanceMethods {
|
|
32
32
|
const RealComponent: TComponentType = isESModule
|
|
33
|
-
? // $
|
|
33
|
+
? // $FlowFixMe[prop-missing]
|
|
34
34
|
jest.requireActual<TComponentModule>(moduleName).default
|
|
35
|
-
: // $
|
|
35
|
+
: // $FlowFixMe[incompatible-type]
|
|
36
36
|
jest.requireActual<TComponentModule>(moduleName);
|
|
37
37
|
|
|
38
38
|
const SuperClass: typeof React.Component<
|
|
@@ -58,7 +58,7 @@ export default function mockComponent<
|
|
|
58
58
|
static displayName: ?string = 'Component';
|
|
59
59
|
|
|
60
60
|
render(): React.Node {
|
|
61
|
-
// $
|
|
61
|
+
// $FlowFixMe[prop-missing]
|
|
62
62
|
const props = {...RealComponent.defaultProps};
|
|
63
63
|
|
|
64
64
|
if (this.props) {
|
|
@@ -74,8 +74,8 @@ export default function mockComponent<
|
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
// $
|
|
78
|
-
// $
|
|
77
|
+
// $FlowFixMe[not-a-function]
|
|
78
|
+
// $FlowFixMe[prop-missing]
|
|
79
79
|
return createElement(nameWithoutPrefix, props, this.props.children);
|
|
80
80
|
}
|
|
81
81
|
};
|
|
@@ -89,16 +89,16 @@ export default function mockComponent<
|
|
|
89
89
|
|
|
90
90
|
Component.displayName = nameWithoutPrefix;
|
|
91
91
|
|
|
92
|
-
// $
|
|
92
|
+
// $FlowFixMe[not-an-object]
|
|
93
93
|
Object.keys(RealComponent).forEach(classStatic => {
|
|
94
94
|
Component[classStatic] = RealComponent[classStatic];
|
|
95
95
|
});
|
|
96
96
|
|
|
97
97
|
if (instanceMethods != null) {
|
|
98
|
-
// $
|
|
98
|
+
// $FlowFixMe[unsafe-object-assign]
|
|
99
99
|
Object.assign(Component.prototype, instanceMethods);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
// $
|
|
102
|
+
// $FlowFixMe[incompatible-type]
|
|
103
103
|
return Component;
|
|
104
104
|
}
|
|
@@ -27,8 +27,8 @@ export default function mockNativeComponent<TProps: {...}>(
|
|
|
27
27
|
_nativeTag: number = nativeTag++;
|
|
28
28
|
|
|
29
29
|
render(): React.Node {
|
|
30
|
-
// $
|
|
31
|
-
// $
|
|
30
|
+
// $FlowFixMe[not-a-function]
|
|
31
|
+
// $FlowFixMe[prop-missing]
|
|
32
32
|
return createElement(viewName, this.props, this.props.children);
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -47,5 +47,6 @@ export default function mockNativeComponent<TProps: {...}>(
|
|
|
47
47
|
Component.displayName = viewName;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
// $FlowFixMe - Error supressed during the migration of HostInstance to ReactNativeElement
|
|
50
51
|
return Component;
|
|
51
52
|
}
|
package/jest/mocks/Modal.js
CHANGED
|
@@ -22,7 +22,7 @@ const BaseComponent = mockComponent(
|
|
|
22
22
|
true, // isESModule
|
|
23
23
|
) as TModal;
|
|
24
24
|
|
|
25
|
-
// $
|
|
25
|
+
// $FlowFixMe[incompatible-use]
|
|
26
26
|
export default class Modal extends BaseComponent {
|
|
27
27
|
render(): React.Node {
|
|
28
28
|
if (this.props.visible === false) {
|
package/jest/mocks/ScrollView.js
CHANGED
|
@@ -44,7 +44,7 @@ const BaseComponent = mockComponent(
|
|
|
44
44
|
true, // isESModule
|
|
45
45
|
) as TScrollView;
|
|
46
46
|
|
|
47
|
-
// $FlowFixMe[incompatible-
|
|
47
|
+
// $FlowFixMe[incompatible-type]
|
|
48
48
|
// $FlowFixMe[invalid-exported-annotation]
|
|
49
49
|
export default class ScrollViewMock extends BaseComponent {
|
|
50
50
|
render(): React.Node {
|
|
@@ -15,7 +15,7 @@ import {createElement} from 'react';
|
|
|
15
15
|
|
|
16
16
|
export default class View extends React.Component<ViewProps> {
|
|
17
17
|
render(): React.Node {
|
|
18
|
-
// $
|
|
18
|
+
// $FlowFixMe[not-a-function]
|
|
19
19
|
return createElement('View', this.props, this.props.children);
|
|
20
20
|
}
|
|
21
21
|
}
|
package/jest/setup.js
CHANGED
|
@@ -17,7 +17,7 @@ import '@react-native/js-polyfills/error-guard';
|
|
|
17
17
|
|
|
18
18
|
import mock from './mock';
|
|
19
19
|
|
|
20
|
-
// $
|
|
20
|
+
// $FlowFixMe[cannot-write]
|
|
21
21
|
Object.defineProperties(global, {
|
|
22
22
|
__DEV__: {
|
|
23
23
|
configurable: true,
|
|
@@ -43,7 +43,7 @@ Object.defineProperties(global, {
|
|
|
43
43
|
configurable: true,
|
|
44
44
|
enumerable: true,
|
|
45
45
|
value: {
|
|
46
|
-
// $
|
|
46
|
+
// $FlowFixMe[method-unbinding]
|
|
47
47
|
now: jest.fn(Date.now),
|
|
48
48
|
},
|
|
49
49
|
writable: true,
|
|
@@ -81,7 +81,7 @@ jest.mock('prettier', () => {
|
|
|
81
81
|
return module.prototype.require(require.resolve('prettier'));
|
|
82
82
|
});
|
|
83
83
|
|
|
84
|
-
// $FlowFixMe[incompatible-
|
|
84
|
+
// $FlowFixMe[incompatible-type] - `./mocks/AppState` is incomplete.
|
|
85
85
|
mock('m#../Libraries/AppState/AppState', 'm#./mocks/AppState');
|
|
86
86
|
mock('m#../Libraries/BatchedBridge/NativeModules', 'm#./mocks/NativeModules');
|
|
87
87
|
mock(
|
|
@@ -95,41 +95,41 @@ mock(
|
|
|
95
95
|
mock('m#../Libraries/Components/Clipboard/Clipboard', 'm#./mocks/Clipboard');
|
|
96
96
|
mock(
|
|
97
97
|
'm#../Libraries/Components/RefreshControl/RefreshControl',
|
|
98
|
-
// $FlowFixMe[incompatible-
|
|
98
|
+
// $FlowFixMe[incompatible-type] - `../Libraries/Components/RefreshControl/RefreshControl` should export a component type.
|
|
99
99
|
'm#./mocks/RefreshControl',
|
|
100
100
|
);
|
|
101
101
|
// $FlowFixMe[incompatible-exact] - `../Libraries/Components/ScrollView/ScrollView` is... I don't even.
|
|
102
|
-
// $FlowFixMe[
|
|
102
|
+
// $FlowFixMe[incompatible-type]
|
|
103
103
|
mock('m#../Libraries/Components/ScrollView/ScrollView', 'm#./mocks/ScrollView');
|
|
104
104
|
mock('m#../Libraries/Components/TextInput/TextInput', 'm#./mocks/TextInput');
|
|
105
105
|
mock('m#../Libraries/Components/View/View', 'm#./mocks/View');
|
|
106
106
|
mock(
|
|
107
107
|
'm#../Libraries/Components/View/ViewNativeComponent',
|
|
108
|
-
// $FlowFixMe[incompatible-
|
|
108
|
+
// $FlowFixMe[incompatible-type] - `./mocks/ViewNativeComponent` is incomplete.
|
|
109
109
|
// $FlowFixMe[prop-missing]
|
|
110
110
|
'm#./mocks/ViewNativeComponent',
|
|
111
111
|
);
|
|
112
112
|
mock('m#../Libraries/Core/InitializeCore', 'm#./mocks/InitializeCore');
|
|
113
113
|
mock('m#../Libraries/Core/NativeExceptionsManager');
|
|
114
114
|
mock('m#../Libraries/Image/Image', 'm#./mocks/Image');
|
|
115
|
-
// $FlowFixMe[incompatible-
|
|
115
|
+
// $FlowFixMe[incompatible-type] - `./mocks/Linking` is incomplete.
|
|
116
116
|
mock('m#../Libraries/Linking/Linking', 'm#./mocks/Linking');
|
|
117
|
-
// $FlowFixMe[incompatible-
|
|
117
|
+
// $FlowFixMe[incompatible-type] - `../Libraries/Modal/Modal` should export a component type.
|
|
118
118
|
mock('m#../Libraries/Modal/Modal', 'm#./mocks/Modal');
|
|
119
119
|
mock(
|
|
120
120
|
'm#../Libraries/NativeComponent/NativeComponentRegistry',
|
|
121
|
-
// $FlowFixMe[
|
|
121
|
+
// $FlowFixMe[incompatible-type] - `./mocks/NativeComponentRegistry` should export named functions.
|
|
122
122
|
'm#./mocks/NativeComponentRegistry',
|
|
123
123
|
);
|
|
124
|
-
// $FlowFixMe[
|
|
124
|
+
// $FlowFixMe[incompatible-type] - `./mocks/RendererProxy` is incomplete.
|
|
125
125
|
mock('m#../Libraries/ReactNative/RendererProxy', 'm#./mocks/RendererProxy');
|
|
126
126
|
mock(
|
|
127
127
|
'm#../Libraries/ReactNative/requireNativeComponent',
|
|
128
128
|
'm#./mocks/requireNativeComponent',
|
|
129
129
|
);
|
|
130
|
-
// $FlowFixMe[
|
|
130
|
+
// $FlowFixMe[incompatible-type] - `./mocks/UIManager` is incomplete.
|
|
131
131
|
mock('m#../Libraries/ReactNative/UIManager', 'm#./mocks/UIManager');
|
|
132
132
|
mock('m#../Libraries/Text/Text', 'm#./mocks/Text');
|
|
133
133
|
mock('m#../Libraries/Utilities/useColorScheme', 'm#./mocks/useColorScheme');
|
|
134
|
-
// $FlowFixMe[incompatible-
|
|
134
|
+
// $FlowFixMe[incompatible-type]
|
|
135
135
|
mock('m#../Libraries/Vibration/Vibration', 'm#./mocks/Vibration');
|
package/overrides.json
CHANGED
|
@@ -7,19 +7,19 @@
|
|
|
7
7
|
"**/__snapshots__/**",
|
|
8
8
|
"src-win/rntypes/**"
|
|
9
9
|
],
|
|
10
|
-
"baseVersion": "0.82.0-nightly-
|
|
10
|
+
"baseVersion": "0.82.0-nightly-20250821-0ef21bf8a",
|
|
11
11
|
"overrides": [
|
|
12
12
|
{
|
|
13
13
|
"type": "derived",
|
|
14
14
|
"file": ".flowconfig",
|
|
15
15
|
"baseFile": ".flowconfig",
|
|
16
|
-
"baseHash": "
|
|
16
|
+
"baseHash": "56b1b6a6ecee3c54f2c63eadd6bf5d67b11f5cd9"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"type": "derived",
|
|
20
20
|
"file": "src-win/index.win32.js",
|
|
21
21
|
"baseFile": "packages/react-native/index.js",
|
|
22
|
-
"baseHash": "
|
|
22
|
+
"baseHash": "88aa62f2d86a810631bcbc871f45c28c53fceec7"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"type": "platform",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"type": "derived",
|
|
42
42
|
"file": "src-win/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js",
|
|
43
43
|
"baseFile": "packages/react-native/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js",
|
|
44
|
-
"baseHash": "
|
|
44
|
+
"baseHash": "b77b87e32a86265a3c8c29ebbbee46558596aec8"
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"type": "copy",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"type": "derived",
|
|
61
61
|
"file": "src-win/Libraries/Components/Button.win32.js",
|
|
62
62
|
"baseFile": "packages/react-native/Libraries/Components/Button.js",
|
|
63
|
-
"baseHash": "
|
|
63
|
+
"baseHash": "26d3afc77f82939021f848eb8185b3b441fb3c7d"
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
"type": "platform",
|
|
@@ -108,13 +108,13 @@
|
|
|
108
108
|
"type": "derived",
|
|
109
109
|
"file": "src-win/Libraries/Components/TextInput/TextInput.flow.win32.js",
|
|
110
110
|
"baseFile": "packages/react-native/Libraries/Components/TextInput/TextInput.flow.js",
|
|
111
|
-
"baseHash": "
|
|
111
|
+
"baseHash": "c3e71a2dbba8e4dd45a34c0c21327aa36d79a1b1"
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
"type": "derived",
|
|
115
115
|
"file": "src-win/Libraries/Components/TextInput/TextInput.win32.js",
|
|
116
116
|
"baseFile": "packages/react-native/Libraries/Components/TextInput/TextInput.js",
|
|
117
|
-
"baseHash": "
|
|
117
|
+
"baseHash": "ed5d48ce62056182bf81dfa2d22d511d611d5201"
|
|
118
118
|
},
|
|
119
119
|
{
|
|
120
120
|
"type": "patch",
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
"type": "patch",
|
|
219
219
|
"file": "src-win/Libraries/Core/Devtools/loadBundleFromServer.win32.js",
|
|
220
220
|
"baseFile": "packages/react-native/Libraries/Core/Devtools/loadBundleFromServer.js",
|
|
221
|
-
"baseHash": "
|
|
221
|
+
"baseHash": "5177ecc736e9bebd4e798dcc2c6dd19c38b0a937",
|
|
222
222
|
"issue": 12704
|
|
223
223
|
},
|
|
224
224
|
{
|
|
@@ -309,7 +309,7 @@
|
|
|
309
309
|
"type": "derived",
|
|
310
310
|
"file": "src-win/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.win32.js",
|
|
311
311
|
"baseFile": "packages/react-native/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js",
|
|
312
|
-
"baseHash": "
|
|
312
|
+
"baseHash": "ccbfc8413dc7bd26eb7bc9726b273f1cf23b1c70"
|
|
313
313
|
},
|
|
314
314
|
{
|
|
315
315
|
"type": "derived",
|
|
@@ -335,7 +335,7 @@
|
|
|
335
335
|
"type": "copy",
|
|
336
336
|
"file": "src-win/Libraries/Network/RCTNetworking.win32.js",
|
|
337
337
|
"baseFile": "packages/react-native/Libraries/Network/RCTNetworking.ios.js",
|
|
338
|
-
"baseHash": "
|
|
338
|
+
"baseHash": "1c7dcc3e3cf7339c3450e7722b7b0a355266a001",
|
|
339
339
|
"issue": 4318
|
|
340
340
|
},
|
|
341
341
|
{
|
|
@@ -358,7 +358,7 @@
|
|
|
358
358
|
"type": "patch",
|
|
359
359
|
"file": "src-win/Libraries/Pressability/HoverState.win32.js",
|
|
360
360
|
"baseFile": "packages/react-native/Libraries/Pressability/HoverState.js",
|
|
361
|
-
"baseHash": "
|
|
361
|
+
"baseHash": "ac3381594462358f75de1182b26a162dff691f0e",
|
|
362
362
|
"issue": 6240
|
|
363
363
|
},
|
|
364
364
|
{
|
|
@@ -425,13 +425,13 @@
|
|
|
425
425
|
"type": "derived",
|
|
426
426
|
"file": "src-win/Libraries/Text/Text.win32.js",
|
|
427
427
|
"baseFile": "packages/react-native/Libraries/Text/Text.js",
|
|
428
|
-
"baseHash": "
|
|
428
|
+
"baseHash": "14367e55fca8889783f7dea94ec2c09205960c3c"
|
|
429
429
|
},
|
|
430
430
|
{
|
|
431
431
|
"type": "derived",
|
|
432
432
|
"file": "src-win/Libraries/Text/TextNativeComponent.win32.js",
|
|
433
433
|
"baseFile": "packages/react-native/Libraries/Text/TextNativeComponent.js",
|
|
434
|
-
"baseHash": "
|
|
434
|
+
"baseHash": "259a625b5f7cf3a70ecd4af6388d82d47f446e50",
|
|
435
435
|
"issue": 7074
|
|
436
436
|
},
|
|
437
437
|
{
|
|
@@ -478,13 +478,13 @@
|
|
|
478
478
|
"type": "derived",
|
|
479
479
|
"file": "src-win/Libraries/Utilities/Platform.win32.js",
|
|
480
480
|
"baseFile": "packages/react-native/Libraries/Utilities/Platform.android.js",
|
|
481
|
-
"baseHash": "
|
|
481
|
+
"baseHash": "6497ec623691b34885e226e4d05bc55ba582a135"
|
|
482
482
|
},
|
|
483
483
|
{
|
|
484
484
|
"type": "patch",
|
|
485
485
|
"file": "src-win/Libraries/Utilities/PlatformTypes.js",
|
|
486
486
|
"baseFile": "packages/react-native/Libraries/Utilities/PlatformTypes.js",
|
|
487
|
-
"baseHash": "
|
|
487
|
+
"baseHash": "f4859039e2bf991ff60d38308c25456ec752191f",
|
|
488
488
|
"issue": 14686
|
|
489
489
|
},
|
|
490
490
|
{
|
|
@@ -497,7 +497,7 @@
|
|
|
497
497
|
"type": "patch",
|
|
498
498
|
"file": "src-win/src/private/animated/NativeAnimatedHelper.win32.js",
|
|
499
499
|
"baseFile": "packages/react-native/src/private/animated/NativeAnimatedHelper.js",
|
|
500
|
-
"baseHash": "
|
|
500
|
+
"baseHash": "c3fdc3d1e9879c6fe03a1a5caad7b02b386ddcde",
|
|
501
501
|
"issue": 11041
|
|
502
502
|
},
|
|
503
503
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@office-iss/react-native-win32",
|
|
3
|
-
"version": "0.0.0-canary.
|
|
3
|
+
"version": "0.0.0-canary.303",
|
|
4
4
|
"description": "Implementation of react native on top of Office's Win32 platform.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"@react-native-community/cli-platform-android": "20.0.0",
|
|
31
31
|
"@react-native-community/cli-platform-ios": "20.0.0",
|
|
32
32
|
"@react-native/assets": "1.0.0",
|
|
33
|
-
"@react-native/assets-registry": "0.82.0-nightly-
|
|
34
|
-
"@react-native/codegen": "0.82.0-nightly-
|
|
35
|
-
"@react-native/community-cli-plugin": "0.82.0-nightly-
|
|
36
|
-
"@react-native/gradle-plugin": "0.82.0-nightly-
|
|
37
|
-
"@react-native/js-polyfills": "0.82.0-nightly-
|
|
38
|
-
"@react-native/normalize-colors": "0.82.0-nightly-
|
|
39
|
-
"@react-native/virtualized-lists": "0.82.0-nightly-
|
|
33
|
+
"@react-native/assets-registry": "0.82.0-nightly-20250821-0ef21bf8a",
|
|
34
|
+
"@react-native/codegen": "0.82.0-nightly-20250821-0ef21bf8a",
|
|
35
|
+
"@react-native/community-cli-plugin": "0.82.0-nightly-20250821-0ef21bf8a",
|
|
36
|
+
"@react-native/gradle-plugin": "0.82.0-nightly-20250821-0ef21bf8a",
|
|
37
|
+
"@react-native/js-polyfills": "0.82.0-nightly-20250821-0ef21bf8a",
|
|
38
|
+
"@react-native/normalize-colors": "0.82.0-nightly-20250821-0ef21bf8a",
|
|
39
|
+
"@react-native/virtualized-lists": "0.82.0-nightly-20250821-0ef21bf8a",
|
|
40
40
|
"abort-controller": "^3.0.0",
|
|
41
41
|
"anser": "^1.4.9",
|
|
42
42
|
"ansi-regex": "^5.0.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@babel/core": "^7.25.2",
|
|
74
74
|
"@babel/eslint-parser": "^7.25.1",
|
|
75
|
-
"@react-native/metro-config": "0.82.0-nightly-
|
|
75
|
+
"@react-native/metro-config": "0.82.0-nightly-20250821-0ef21bf8a",
|
|
76
76
|
"@rnw-scripts/babel-react-native-config": "0.0.0",
|
|
77
77
|
"@rnw-scripts/eslint-config": "1.2.38",
|
|
78
78
|
"@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.42",
|
|
@@ -88,14 +88,14 @@
|
|
|
88
88
|
"just-scripts": "^1.3.3",
|
|
89
89
|
"prettier": "2.8.8",
|
|
90
90
|
"react": "19.1.0",
|
|
91
|
-
"react-native": "0.82.0-nightly-
|
|
92
|
-
"react-native-platform-override": "0.0.0-canary.
|
|
91
|
+
"react-native": "0.82.0-nightly-20250821-0ef21bf8a",
|
|
92
|
+
"react-native-platform-override": "0.0.0-canary.1017",
|
|
93
93
|
"typescript": "5.0.4"
|
|
94
94
|
},
|
|
95
95
|
"peerDependencies": {
|
|
96
96
|
"@types/react": "^19.1.0",
|
|
97
97
|
"react": "^19.1.0",
|
|
98
|
-
"react-native": "0.82.0-nightly-
|
|
98
|
+
"react-native": "0.82.0-nightly-20250821-0ef21bf8a"
|
|
99
99
|
},
|
|
100
100
|
"beachball": {
|
|
101
101
|
"defaultNpmTag": "canary",
|
|
@@ -127,7 +127,7 @@ function createNativeOperations(): $NonMaybeType<typeof NativeAnimatedModule> {
|
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
// $FlowExpectedError[incompatible-
|
|
130
|
+
// $FlowExpectedError[incompatible-type] - Dynamism.
|
|
131
131
|
return nativeOperations;
|
|
132
132
|
}
|
|
133
133
|
|
|
@@ -145,7 +145,7 @@ const API = {
|
|
|
145
145
|
if (saveValueCallback) {
|
|
146
146
|
eventListenerGetValueCallbacks[tag] = saveValueCallback;
|
|
147
147
|
}
|
|
148
|
-
/* $FlowExpectedError[incompatible-
|
|
148
|
+
/* $FlowExpectedError[incompatible-type] - `saveValueCallback` is handled
|
|
149
149
|
differently when `isSingleOpBatching` is enabled. */
|
|
150
150
|
NativeOperations.getValue(tag);
|
|
151
151
|
}
|
|
@@ -271,7 +271,7 @@ const API = {
|
|
|
271
271
|
if (endCallback) {
|
|
272
272
|
eventListenerAnimationFinishedCallbacks[animationId] = endCallback;
|
|
273
273
|
}
|
|
274
|
-
/* $FlowExpectedError[incompatible-
|
|
274
|
+
/* $FlowExpectedError[incompatible-type] - `endCallback` is handled
|
|
275
275
|
differently when `isSingleOpBatching` is enabled. */
|
|
276
276
|
NativeOperations.startAnimatingNode(animationId, nodeTag, config);
|
|
277
277
|
}
|