@office-iss/react-native-win32 0.0.0-canary.273 → 0.0.0-canary.275
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 +5 -1
- package/CHANGELOG.json +31 -1
- package/CHANGELOG.md +20 -4
- package/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts +1 -0
- package/Libraries/ActionSheetIOS/ActionSheetIOS.js +13 -0
- package/Libraries/Animated/animations/Animation.js +1 -5
- package/Libraries/Animated/components/AnimatedFlatList.js +1 -1
- package/Libraries/Animated/components/AnimatedSectionList.js +3 -1
- package/Libraries/Animated/createAnimatedComponent.js +7 -7
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +16 -2
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +21 -2
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +1 -1
- package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +3 -2
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +0 -1
- package/Libraries/Components/ScrollView/ScrollView.js +39 -78
- package/Libraries/Components/ScrollView/ScrollViewCommands.js +1 -1
- package/Libraries/Components/ScrollView/ScrollViewContext.js +2 -0
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +0 -2
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +2 -3
- package/Libraries/Components/TextInput/InputAccessoryView.js +1 -1
- package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +4 -4
- package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +6 -4
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
- package/Libraries/Components/TextInput/TextInput.flow.js +11 -9
- package/Libraries/Components/TextInput/TextInput.js +7 -1
- package/Libraries/Components/TextInput/TextInput.win32.js +8 -1
- package/Libraries/Components/TextInput/Win32TextInputNativeComponent.js +3 -0
- package/Libraries/Components/Touchable/TouchableBounce.js +1 -0
- package/Libraries/Components/Touchable/TouchableOpacity.js +1 -0
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +1 -2
- package/Libraries/Components/View/ViewPropTypes.d.ts +7 -0
- package/Libraries/Components/View/ViewWin32.js +1 -0
- package/Libraries/Core/ExceptionsManager.js +41 -27
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/__mocks__/NativeExceptionsManager.js +0 -1
- package/Libraries/Core/setUpErrorHandling.js +18 -22
- package/Libraries/Core/setUpTimers.js +4 -12
- package/Libraries/Image/Image.d.ts +20 -29
- package/Libraries/Image/ImageProps.js +2 -1
- package/Libraries/Image/ImageResizeMode.d.ts +8 -1
- package/Libraries/Image/ImageResizeMode.js +4 -1
- package/Libraries/Image/ImageSource.d.ts +0 -2
- package/Libraries/Image/ImageSource.js +0 -2
- package/Libraries/Image/ImageUtils.js +6 -3
- package/Libraries/Inspector/Inspector.win32.js +1 -1
- package/Libraries/Interaction/InteractionManager.js +6 -1
- package/Libraries/Interaction/InteractionManagerStub.js +176 -0
- package/Libraries/Lists/FlatList.js +2 -2
- package/Libraries/Lists/SectionListModern.js +7 -7
- package/Libraries/LogBox/Data/LogBoxData.js +2 -2
- package/Libraries/LogBox/LogBox.js +1 -1
- package/Libraries/LogBox/LogBoxInspectorContainer.js +1 -1
- package/Libraries/LogBox/LogBoxNotificationContainer.js +1 -1
- package/Libraries/LogBox/UI/AnsiHighlight.js +26 -17
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +6 -1
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.win32.js +6 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +1 -1
- package/Libraries/Modal/Modal.d.ts +5 -0
- package/Libraries/Modal/Modal.js +19 -3
- package/Libraries/NativeComponent/NativeComponentRegistry.js +3 -3
- package/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +49 -2
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +4 -4
- package/Libraries/Pressability/usePressability.js +4 -1
- package/Libraries/ReactNative/AppContainer.js +1 -1
- package/Libraries/ReactNative/AppRegistry.js +0 -6
- package/Libraries/ReactNative/DisplayMode.js +1 -1
- package/Libraries/ReactNative/RendererImplementation.js +14 -14
- package/Libraries/ReactNative/getCachedComponentWithDebugName.js +1 -3
- package/Libraries/ReactNative/renderApplication.js +9 -8
- package/Libraries/ReactNative/requireNativeComponent.js +5 -2
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +26149 -15434
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +1630 -2675
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +1691 -2954
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +27069 -16192
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +1657 -2714
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +1733 -2980
- package/Libraries/Renderer/shims/ReactFabric.js +3 -3
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +2 -2
- package/Libraries/Renderer/shims/ReactNative.js +3 -3
- package/Libraries/Renderer/shims/ReactNativeTypes.js +9 -10
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +2 -2
- package/Libraries/StyleSheet/StyleSheet.js +7 -1
- package/Libraries/StyleSheet/StyleSheet.win32.js +7 -1
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +7 -1
- package/Libraries/StyleSheet/StyleSheetTypes.js +5 -4
- package/Libraries/Utilities/BackHandler.android.js +6 -18
- package/Libraries/Utilities/BackHandler.d.ts +0 -4
- package/Libraries/Utilities/BackHandler.ios.js +0 -7
- package/Libraries/Utilities/BackHandler.win32.js +6 -18
- package/Libraries/Utilities/__mocks__/BackHandler.js +3 -8
- package/Libraries/Utilities/codegenNativeComponent.js +1 -1
- package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +1 -1
- package/index.js +1 -1
- package/index.win32.js +1 -1
- package/overrides.json +11 -11
- package/package.json +13 -13
- package/src/private/components/HScrollViewNativeComponents.js +1 -26
- package/src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE.js +4 -4
- package/src/private/components/VScrollViewNativeComponents.js +2 -24
- package/src/private/featureflags/ReactNativeFeatureFlags.js +36 -46
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +7 -9
- package/src/private/specs/components/RCTModalHostViewNativeComponent.js +8 -0
- package/src/private/specs/modules/NativeAccessibilityInfo.js +6 -0
- package/src/private/specs/modules/NativeAccessibilityInfoWin32.js +6 -0
- package/src/private/specs/modules/NativeActionSheetManager.js +2 -0
- package/src/private/specs/modules/NativeExceptionsManager.js +0 -12
- package/src/private/webapis/intersectionobserver/IntersectionObserver.js +6 -0
- package/src/private/webapis/performance/Performance.js +1 -1
- package/src/private/webapis/performance/UserTiming.js +5 -5
- package/src-win/Libraries/Components/View/ViewPropTypes.d.ts +7 -0
- package/Libraries/ReactNative/ReactFabricInternals.js +0 -17
- package/src/private/components/useSyncOnScroll.js +0 -48
- package/types/experimental.d.ts +0 -59
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @noformat
|
|
8
8
|
* @nolint
|
|
9
9
|
* @flow
|
|
10
|
-
* @generated SignedSource<<
|
|
10
|
+
* @generated SignedSource<<cf323fc5ca893bab5669c7d321660412>>
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
'use strict';
|
|
@@ -16,7 +16,7 @@ import {BatchedBridge} from 'react-native/Libraries/ReactPrivate/ReactNativePriv
|
|
|
16
16
|
|
|
17
17
|
import type {ReactFabricType} from './ReactNativeTypes';
|
|
18
18
|
|
|
19
|
-
let ReactFabric;
|
|
19
|
+
let ReactFabric: ReactFabricType;
|
|
20
20
|
|
|
21
21
|
if (__DEV__) {
|
|
22
22
|
ReactFabric = require('../implementations/ReactFabric-dev');
|
|
@@ -30,4 +30,4 @@ if (global.RN$Bridgeless !== true) {
|
|
|
30
30
|
BatchedBridge.registerCallableModule('ReactFabric', ReactFabric);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
export default ReactFabric;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @noformat
|
|
8
8
|
* @nolint
|
|
9
9
|
* @flow strict-local
|
|
10
|
-
* @generated SignedSource<<
|
|
10
|
+
* @generated SignedSource<<908f5fb85384725318e261f40e49d9a6>>
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
'use strict';
|
|
@@ -16,4 +16,4 @@ const ReactFeatureFlags = {
|
|
|
16
16
|
debugRenderPhaseSideEffects: false,
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
export default ReactFeatureFlags;
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
* @noformat
|
|
8
8
|
* @nolint
|
|
9
9
|
* @flow
|
|
10
|
-
* @generated SignedSource<<
|
|
10
|
+
* @generated SignedSource<<8f46fdc9267fcc4fdc9e76842fe24066>>
|
|
11
11
|
*/
|
|
12
12
|
'use strict';
|
|
13
13
|
|
|
14
14
|
import type {ReactNativeType} from './ReactNativeTypes';
|
|
15
15
|
|
|
16
|
-
let ReactNative;
|
|
16
|
+
let ReactNative: ReactNativeType;
|
|
17
17
|
|
|
18
18
|
if (__DEV__) {
|
|
19
19
|
ReactNative = require('../implementations/ReactNativeRenderer-dev');
|
|
@@ -21,4 +21,4 @@ if (__DEV__) {
|
|
|
21
21
|
ReactNative = require('../implementations/ReactNativeRenderer-prod');
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
export default ReactNative;
|
|
@@ -7,15 +7,10 @@
|
|
|
7
7
|
* @noformat
|
|
8
8
|
* @nolint
|
|
9
9
|
* @flow strict
|
|
10
|
-
* @generated SignedSource<<
|
|
10
|
+
* @generated SignedSource<<9cf3e28d6ca0299bc0bb5caa75b19556>>
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import type {
|
|
14
|
-
ElementRef,
|
|
15
|
-
ElementType,
|
|
16
|
-
MixedElement,
|
|
17
|
-
AbstractComponent,
|
|
18
|
-
} from 'react';
|
|
13
|
+
import type {ElementRef, ElementType, MixedElement} from 'react';
|
|
19
14
|
|
|
20
15
|
export type MeasureOnSuccessCallback = (
|
|
21
16
|
x: number,
|
|
@@ -138,7 +133,9 @@ declare const ensureNativeMethodsAreSynced: NativeMethods;
|
|
|
138
133
|
(ensureNativeMethodsAreSynced: INativeMethods);
|
|
139
134
|
|
|
140
135
|
export type HostInstance = NativeMethods;
|
|
141
|
-
|
|
136
|
+
/*::
|
|
137
|
+
export type HostComponent<Config: {...}> = component(ref: React$RefSetter<HostInstance>, ...Config);
|
|
138
|
+
*/
|
|
142
139
|
|
|
143
140
|
type InspectorDataProps = $ReadOnly<{
|
|
144
141
|
[propName: string]: string,
|
|
@@ -209,8 +206,10 @@ export type ReactNativeType = {
|
|
|
209
206
|
componentOrHandle: ?(ElementRef<TElementType> | number),
|
|
210
207
|
): ?number,
|
|
211
208
|
isChildPublicInstance(
|
|
212
|
-
|
|
213
|
-
|
|
209
|
+
// eslint-disable-next-line no-undef
|
|
210
|
+
parent: PublicInstance | HostComponent<empty>,
|
|
211
|
+
// eslint-disable-next-line no-undef
|
|
212
|
+
child: PublicInstance | HostComponent<empty>,
|
|
214
213
|
): boolean,
|
|
215
214
|
dispatchCommand(
|
|
216
215
|
handle: HostInstance,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @noformat
|
|
8
8
|
* @nolint
|
|
9
9
|
* @flow strict-local
|
|
10
|
-
* @generated SignedSource<<
|
|
10
|
+
* @generated SignedSource<<52163887de05f1cff05388145cf85b3b>>
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
'use strict';
|
|
@@ -32,4 +32,4 @@ const createReactNativeComponentClass = function (
|
|
|
32
32
|
return register(name, callback);
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
export default createReactNativeComponentClass;
|
|
@@ -170,7 +170,13 @@ if (hairlineWidth === 0) {
|
|
|
170
170
|
hairlineWidth = 1 / PixelRatio.get();
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
const absoluteFill
|
|
173
|
+
const absoluteFill: {
|
|
174
|
+
+bottom: 0,
|
|
175
|
+
+left: 0,
|
|
176
|
+
+position: 'absolute',
|
|
177
|
+
+right: 0,
|
|
178
|
+
+top: 0,
|
|
179
|
+
} = {
|
|
174
180
|
position: 'absolute',
|
|
175
181
|
left: 0,
|
|
176
182
|
right: 0,
|
|
@@ -172,7 +172,13 @@ if (hairlineWidth === 0) {
|
|
|
172
172
|
hairlineWidth = 1 / PixelRatio.get();
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
const absoluteFill
|
|
175
|
+
const absoluteFill: {
|
|
176
|
+
+bottom: 0,
|
|
177
|
+
+left: 0,
|
|
178
|
+
+position: 'absolute',
|
|
179
|
+
+right: 0,
|
|
180
|
+
+top: 0,
|
|
181
|
+
} = {
|
|
176
182
|
position: 'absolute',
|
|
177
183
|
left: 0,
|
|
178
184
|
right: 0,
|
|
@@ -434,6 +434,12 @@ export interface ViewStyle extends FlexStyle, ShadowStyleIOS, TransformsStyle {
|
|
|
434
434
|
cursor?: CursorValue | undefined;
|
|
435
435
|
boxShadow?: ReadonlyArray<BoxShadowValue> | string | undefined;
|
|
436
436
|
filter?: ReadonlyArray<FilterFunction> | string | undefined;
|
|
437
|
+
|
|
438
|
+
mixBlendMode?: BlendMode | undefined;
|
|
439
|
+
experimental_backgroundImage?:
|
|
440
|
+
| ReadonlyArray<GradientValue>
|
|
441
|
+
| string
|
|
442
|
+
| undefined;
|
|
437
443
|
}
|
|
438
444
|
|
|
439
445
|
export type FontVariant =
|
|
@@ -562,6 +568,6 @@ export interface ImageStyle extends FlexStyle, ShadowStyleIOS, TransformsStyle {
|
|
|
562
568
|
overlayColor?: ColorValue | undefined;
|
|
563
569
|
tintColor?: ColorValue | undefined;
|
|
564
570
|
opacity?: AnimatableNumericValue | undefined;
|
|
565
|
-
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | undefined;
|
|
571
|
+
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | 'none' | undefined;
|
|
566
572
|
cursor?: CursorValue | undefined;
|
|
567
573
|
}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
13
|
import type AnimatedNode from '../Animated/nodes/AnimatedNode';
|
|
14
|
+
import type {ImageResizeMode} from './../Image/ImageResizeMode';
|
|
14
15
|
import type {
|
|
15
16
|
____DangerouslyImpreciseStyle_InternalOverrides,
|
|
16
17
|
____ImageStyle_InternalOverrides,
|
|
@@ -941,8 +942,8 @@ export type ____TextStyle_Internal = $ReadOnly<{
|
|
|
941
942
|
|
|
942
943
|
export type ____ImageStyle_InternalCore = $ReadOnly<{
|
|
943
944
|
...$Exact<____ViewStyle_Internal>,
|
|
944
|
-
resizeMode?:
|
|
945
|
-
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down',
|
|
945
|
+
resizeMode?: ImageResizeMode,
|
|
946
|
+
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | 'none',
|
|
946
947
|
tintColor?: ____ColorValue_Internal,
|
|
947
948
|
overlayColor?: string,
|
|
948
949
|
}>;
|
|
@@ -954,8 +955,8 @@ export type ____ImageStyle_Internal = $ReadOnly<{
|
|
|
954
955
|
|
|
955
956
|
export type ____DangerouslyImpreciseStyle_InternalCore = $ReadOnly<{
|
|
956
957
|
...$Exact<____TextStyle_Internal>,
|
|
957
|
-
resizeMode?:
|
|
958
|
-
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down',
|
|
958
|
+
resizeMode?: ImageResizeMode,
|
|
959
|
+
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | 'none',
|
|
959
960
|
tintColor?: ____ColorValue_Internal,
|
|
960
961
|
overlayColor?: string,
|
|
961
962
|
}>;
|
|
@@ -59,10 +59,6 @@ type TBackHandler = {|
|
|
|
59
59
|
eventName: BackPressEventName,
|
|
60
60
|
handler: () => ?boolean,
|
|
61
61
|
) => {remove: () => void, ...},
|
|
62
|
-
+removeEventListener: (
|
|
63
|
-
eventName: BackPressEventName,
|
|
64
|
-
handler: () => ?boolean,
|
|
65
|
-
) => void,
|
|
66
62
|
|};
|
|
67
63
|
const BackHandler: TBackHandler = {
|
|
68
64
|
exitApp: function (): void {
|
|
@@ -86,22 +82,14 @@ const BackHandler: TBackHandler = {
|
|
|
86
82
|
_backPressSubscriptions.push(handler);
|
|
87
83
|
}
|
|
88
84
|
return {
|
|
89
|
-
remove: (): void =>
|
|
85
|
+
remove: (): void => {
|
|
86
|
+
const index = _backPressSubscriptions.indexOf(handler);
|
|
87
|
+
if (index !== -1) {
|
|
88
|
+
_backPressSubscriptions.splice(index, 1);
|
|
89
|
+
}
|
|
90
|
+
},
|
|
90
91
|
};
|
|
91
92
|
},
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Removes the event handler.
|
|
95
|
-
*/
|
|
96
|
-
removeEventListener: function (
|
|
97
|
-
eventName: BackPressEventName,
|
|
98
|
-
handler: () => ?boolean,
|
|
99
|
-
): void {
|
|
100
|
-
const index = _backPressSubscriptions.indexOf(handler);
|
|
101
|
-
if (index !== -1) {
|
|
102
|
-
_backPressSubscriptions.splice(index, 1);
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
93
|
};
|
|
106
94
|
|
|
107
95
|
module.exports = BackHandler;
|
|
@@ -28,10 +28,6 @@ export interface BackHandlerStatic {
|
|
|
28
28
|
eventName: BackPressEventName,
|
|
29
29
|
handler: () => boolean | null | undefined,
|
|
30
30
|
): NativeEventSubscription;
|
|
31
|
-
removeEventListener(
|
|
32
|
-
eventName: BackPressEventName,
|
|
33
|
-
handler: () => boolean | null | undefined,
|
|
34
|
-
): void;
|
|
35
31
|
}
|
|
36
32
|
|
|
37
33
|
export const BackHandler: BackHandlerStatic;
|
|
@@ -10,8 +10,6 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
module.exports = require('../Components/UnimplementedViews/UnimplementedView');
|
|
14
|
-
|
|
15
13
|
type BackPressEventName = 'backPress' | 'hardwareBackPress';
|
|
16
14
|
|
|
17
15
|
function emptyFunction(): void {}
|
|
@@ -22,10 +20,6 @@ type TBackHandler = {|
|
|
|
22
20
|
eventName: BackPressEventName,
|
|
23
21
|
handler: () => ?boolean,
|
|
24
22
|
) => {remove: () => void, ...},
|
|
25
|
-
+removeEventListener: (
|
|
26
|
-
eventName: BackPressEventName,
|
|
27
|
-
handler: () => ?boolean,
|
|
28
|
-
) => void,
|
|
29
23
|
|};
|
|
30
24
|
|
|
31
25
|
let BackHandler: TBackHandler = {
|
|
@@ -35,7 +29,6 @@ let BackHandler: TBackHandler = {
|
|
|
35
29
|
remove: emptyFunction,
|
|
36
30
|
};
|
|
37
31
|
},
|
|
38
|
-
removeEventListener(_eventName: BackPressEventName, _handler: Function) {},
|
|
39
32
|
};
|
|
40
33
|
|
|
41
34
|
module.exports = BackHandler;
|
|
@@ -59,10 +59,6 @@ type TBackHandler = {|
|
|
|
59
59
|
eventName: BackPressEventName,
|
|
60
60
|
handler: () => ?boolean,
|
|
61
61
|
) => {remove: () => void, ...},
|
|
62
|
-
+removeEventListener: (
|
|
63
|
-
eventName: BackPressEventName,
|
|
64
|
-
handler: () => ?boolean,
|
|
65
|
-
) => void,
|
|
66
62
|
|};
|
|
67
63
|
const BackHandler: TBackHandler = {
|
|
68
64
|
exitApp: function (): void {
|
|
@@ -86,22 +82,14 @@ const BackHandler: TBackHandler = {
|
|
|
86
82
|
_backPressSubscriptions.push(handler);
|
|
87
83
|
}
|
|
88
84
|
return {
|
|
89
|
-
remove: (): void =>
|
|
85
|
+
remove: (): void => {
|
|
86
|
+
const index = _backPressSubscriptions.indexOf(handler);
|
|
87
|
+
if (index !== -1) {
|
|
88
|
+
_backPressSubscriptions.splice(index, 1);
|
|
89
|
+
}
|
|
90
|
+
},
|
|
90
91
|
};
|
|
91
92
|
},
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Removes the event handler.
|
|
95
|
-
*/
|
|
96
|
-
removeEventListener: function (
|
|
97
|
-
eventName: BackPressEventName,
|
|
98
|
-
handler: () => ?boolean,
|
|
99
|
-
): void {
|
|
100
|
-
const index = _backPressSubscriptions.indexOf(handler);
|
|
101
|
-
if (index !== -1) {
|
|
102
|
-
_backPressSubscriptions.splice(index, 1);
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
93
|
};
|
|
106
94
|
|
|
107
95
|
module.exports = BackHandler;
|
|
@@ -20,17 +20,12 @@ const BackHandler = {
|
|
|
20
20
|
): {remove: () => void} {
|
|
21
21
|
_backPressSubscriptions.add(handler);
|
|
22
22
|
return {
|
|
23
|
-
remove: () =>
|
|
23
|
+
remove: () => {
|
|
24
|
+
_backPressSubscriptions.delete(handler);
|
|
25
|
+
},
|
|
24
26
|
};
|
|
25
27
|
},
|
|
26
28
|
|
|
27
|
-
removeEventListener: function (
|
|
28
|
-
eventName: BackPressEventName,
|
|
29
|
-
handler: () => ?boolean,
|
|
30
|
-
): void {
|
|
31
|
-
_backPressSubscriptions.delete(handler);
|
|
32
|
-
},
|
|
33
|
-
|
|
34
29
|
mockPressBack: function () {
|
|
35
30
|
let invokeDefault = true;
|
|
36
31
|
const subscriptions = [..._backPressSubscriptions].reverse();
|
|
@@ -31,7 +31,7 @@ export type NativeComponentType<T> = HostComponent<T>;
|
|
|
31
31
|
// `requireNativeComponent` is not available in Bridgeless mode.
|
|
32
32
|
// e.g. This function runs at runtime if `codegenNativeComponent` was not called
|
|
33
33
|
// from a file suffixed with NativeComponent.js.
|
|
34
|
-
function codegenNativeComponent<Props>(
|
|
34
|
+
function codegenNativeComponent<Props: {...}>(
|
|
35
35
|
componentName: string,
|
|
36
36
|
options?: Options,
|
|
37
37
|
): NativeComponentType<Props> {
|
|
@@ -17,7 +17,7 @@ import * as React from 'react';
|
|
|
17
17
|
|
|
18
18
|
function takesHostComponentInstance(instance: HostInstance | null): void {}
|
|
19
19
|
|
|
20
|
-
const MyHostComponent = (('Host': any): HostComponent<
|
|
20
|
+
const MyHostComponent = (('Host': any): HostComponent<{...}>);
|
|
21
21
|
|
|
22
22
|
<MyHostComponent
|
|
23
23
|
ref={hostComponentRef => {
|
package/index.js
CHANGED
|
@@ -375,7 +375,7 @@ module.exports = {
|
|
|
375
375
|
get processColor(): processColor {
|
|
376
376
|
return require('./Libraries/StyleSheet/processColor').default;
|
|
377
377
|
},
|
|
378
|
-
get requireNativeComponent(): <T>(
|
|
378
|
+
get requireNativeComponent(): <T: {...}>(
|
|
379
379
|
uiViewClassName: string,
|
|
380
380
|
) => HostComponent<T> {
|
|
381
381
|
return require('./Libraries/ReactNative/requireNativeComponent').default;
|
package/index.win32.js
CHANGED
|
@@ -381,7 +381,7 @@ module.exports = {
|
|
|
381
381
|
get processColor(): processColor {
|
|
382
382
|
return require('./Libraries/StyleSheet/processColor').default;
|
|
383
383
|
},
|
|
384
|
-
get requireNativeComponent(): <T>(
|
|
384
|
+
get requireNativeComponent(): <T: {...}>(
|
|
385
385
|
uiViewClassName: string,
|
|
386
386
|
) => HostComponent<T> {
|
|
387
387
|
return require('./Libraries/ReactNative/requireNativeComponent').default;
|
package/overrides.json
CHANGED
|
@@ -7,19 +7,19 @@
|
|
|
7
7
|
"**/__snapshots__/**",
|
|
8
8
|
"src-win/rntypes/**"
|
|
9
9
|
],
|
|
10
|
-
"baseVersion": "0.77.0-nightly-
|
|
10
|
+
"baseVersion": "0.77.0-nightly-20241118-3986eefed",
|
|
11
11
|
"overrides": [
|
|
12
12
|
{
|
|
13
13
|
"type": "derived",
|
|
14
14
|
"file": ".flowconfig",
|
|
15
15
|
"baseFile": ".flowconfig",
|
|
16
|
-
"baseHash": "
|
|
16
|
+
"baseHash": "afa414432bb8dae6ce606a148b74f85fcef8a59d"
|
|
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": "5f0532348ca7440731478ef5b119a3a569529a7f"
|
|
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": "e91ae4454ae1301d97a60755ecc863bf738542e3"
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"type": "copy",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"type": "derived",
|
|
110
110
|
"file": "src-win/Libraries/Components/TextInput/TextInput.win32.js",
|
|
111
111
|
"baseFile": "packages/react-native/Libraries/Components/TextInput/TextInput.js",
|
|
112
|
-
"baseHash": "
|
|
112
|
+
"baseHash": "1f9adcb7ca64fa536372ed28b7af5e03b05458ac"
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
"type": "patch",
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
"type": "derived",
|
|
192
192
|
"file": "src-win/Libraries/Components/View/ViewPropTypes.d.ts",
|
|
193
193
|
"baseFile": "packages/react-native/Libraries/Components/View/ViewPropTypes.d.ts",
|
|
194
|
-
"baseHash": "
|
|
194
|
+
"baseHash": "050f28e7caeef2e52717a7c43c6964612eb75ee9"
|
|
195
195
|
},
|
|
196
196
|
{
|
|
197
197
|
"type": "patch",
|
|
@@ -298,13 +298,13 @@
|
|
|
298
298
|
"type": "derived",
|
|
299
299
|
"file": "src-win/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.win32.js",
|
|
300
300
|
"baseFile": "packages/react-native/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js",
|
|
301
|
-
"baseHash": "
|
|
301
|
+
"baseHash": "c4ffa785bf199918400e4f569849b73187f4b3cc"
|
|
302
302
|
},
|
|
303
303
|
{
|
|
304
304
|
"type": "patch",
|
|
305
305
|
"file": "src-win/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js",
|
|
306
306
|
"baseFile": "packages/react-native/Libraries/LogBox/UI/LogBoxInspectorHeader.js",
|
|
307
|
-
"baseHash": "
|
|
307
|
+
"baseHash": "c4a8a3591ffb65360237708c9fb919408835cb76",
|
|
308
308
|
"issue": 7952
|
|
309
309
|
},
|
|
310
310
|
{
|
|
@@ -414,7 +414,7 @@
|
|
|
414
414
|
"type": "patch",
|
|
415
415
|
"file": "src-win/Libraries/StyleSheet/StyleSheet.win32.js",
|
|
416
416
|
"baseFile": "packages/react-native/Libraries/StyleSheet/StyleSheet.js",
|
|
417
|
-
"baseHash": "
|
|
417
|
+
"baseHash": "46f00f057f504c71fa0feb5695307e3e3806211b"
|
|
418
418
|
},
|
|
419
419
|
{
|
|
420
420
|
"type": "derived",
|
|
@@ -452,7 +452,7 @@
|
|
|
452
452
|
"type": "copy",
|
|
453
453
|
"file": "src-win/Libraries/Utilities/BackHandler.win32.js",
|
|
454
454
|
"baseFile": "packages/react-native/Libraries/Utilities/BackHandler.android.js",
|
|
455
|
-
"baseHash": "
|
|
455
|
+
"baseHash": "b5972a6f2b9da718f57eb7dd9f20b4d67164c980",
|
|
456
456
|
"issue": 4629
|
|
457
457
|
},
|
|
458
458
|
{
|
|
@@ -516,7 +516,7 @@
|
|
|
516
516
|
"type": "derived",
|
|
517
517
|
"file": "src-win/src/private/specs/modules/NativeAccessibilityInfoWin32.js",
|
|
518
518
|
"baseFile": "packages/react-native/src/private/specs/modules/NativeAccessibilityInfo.js",
|
|
519
|
-
"baseHash": "
|
|
519
|
+
"baseHash": "82fc086f675dec489e485c3aabaabe1225ef5f36"
|
|
520
520
|
},
|
|
521
521
|
{
|
|
522
522
|
"type": "derived",
|
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.275",
|
|
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": "15.0.0-alpha.2",
|
|
31
31
|
"@react-native-community/cli-platform-ios": "15.0.0-alpha.2",
|
|
32
32
|
"@react-native/assets": "1.0.0",
|
|
33
|
-
"@react-native/assets-registry": "0.77.0-nightly-
|
|
34
|
-
"@react-native/codegen": "0.77.0-nightly-
|
|
35
|
-
"@react-native/community-cli-plugin": "0.77.0-nightly-
|
|
36
|
-
"@react-native/gradle-plugin": "0.77.0-nightly-
|
|
37
|
-
"@react-native/js-polyfills": "0.77.0-nightly-
|
|
38
|
-
"@react-native/normalize-colors": "0.77.0-nightly-
|
|
39
|
-
"@react-native/virtualized-lists": "0.77.0-nightly-
|
|
33
|
+
"@react-native/assets-registry": "0.77.0-nightly-20241118-3986eefed",
|
|
34
|
+
"@react-native/codegen": "0.77.0-nightly-20241118-3986eefed",
|
|
35
|
+
"@react-native/community-cli-plugin": "0.77.0-nightly-20241118-3986eefed",
|
|
36
|
+
"@react-native/gradle-plugin": "0.77.0-nightly-20241118-3986eefed",
|
|
37
|
+
"@react-native/js-polyfills": "0.77.0-nightly-20241118-3986eefed",
|
|
38
|
+
"@react-native/normalize-colors": "0.77.0-nightly-20241118-3986eefed",
|
|
39
|
+
"@react-native/virtualized-lists": "0.77.0-nightly-20241118-3986eefed",
|
|
40
40
|
"abort-controller": "^3.0.0",
|
|
41
41
|
"anser": "^1.4.9",
|
|
42
42
|
"ansi-regex": "^5.0.0",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"react-refresh": "^0.14.0",
|
|
65
65
|
"react-shallow-renderer": "^16.15.0",
|
|
66
66
|
"regenerator-runtime": "^0.13.2",
|
|
67
|
-
"scheduler": "0.
|
|
67
|
+
"scheduler": "0.24.0-canary-efb381bbf-20230505",
|
|
68
68
|
"semver": "^7.1.3",
|
|
69
69
|
"stacktrace-parser": "^0.1.10",
|
|
70
70
|
"whatwg-fetch": "^3.0.0",
|
|
@@ -89,15 +89,15 @@
|
|
|
89
89
|
"jscodeshift": "^0.14.0",
|
|
90
90
|
"just-scripts": "^1.3.3",
|
|
91
91
|
"prettier": "2.8.8",
|
|
92
|
-
"react": "
|
|
93
|
-
"react-native": "0.77.0-nightly-
|
|
92
|
+
"react": "18.3.1",
|
|
93
|
+
"react-native": "0.77.0-nightly-20241118-3986eefed",
|
|
94
94
|
"react-native-platform-override": "^1.9.49",
|
|
95
95
|
"typescript": "5.0.4"
|
|
96
96
|
},
|
|
97
97
|
"peerDependencies": {
|
|
98
98
|
"@types/react": "^18.2.6",
|
|
99
|
-
"react": "^
|
|
100
|
-
"react-native": "0.77.0-nightly-
|
|
99
|
+
"react": "^18.2.0",
|
|
100
|
+
"react-native": "0.77.0-nightly-20241118-3986eefed"
|
|
101
101
|
},
|
|
102
102
|
"beachball": {
|
|
103
103
|
"defaultNpmTag": "canary",
|
|
@@ -12,43 +12,18 @@
|
|
|
12
12
|
import type {ScrollViewNativeProps} from '../../../Libraries/Components/ScrollView/ScrollViewNativeComponentType';
|
|
13
13
|
import type {ViewProps} from '../../../Libraries/Components/View/ViewPropTypes';
|
|
14
14
|
import type {HostComponent} from '../../../Libraries/Renderer/shims/ReactNativeTypes';
|
|
15
|
-
import type {TScrollViewNativeImperativeHandle} from './useSyncOnScroll';
|
|
16
15
|
|
|
17
16
|
import AndroidHorizontalScrollViewNativeComponent from '../../../Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent';
|
|
18
17
|
import ScrollContentViewNativeComponent from '../../../Libraries/Components/ScrollView/ScrollContentViewNativeComponent';
|
|
19
18
|
import ScrollViewNativeComponent from '../../../Libraries/Components/ScrollView/ScrollViewNativeComponent';
|
|
20
19
|
import Platform from '../../../Libraries/Utilities/Platform';
|
|
21
20
|
import AndroidHorizontalScrollContentViewNativeComponent from '../specs/components/AndroidHorizontalScrollContentViewNativeComponent';
|
|
22
|
-
import useSyncOnScroll from './useSyncOnScroll';
|
|
23
|
-
import * as React from 'react';
|
|
24
|
-
import {forwardRef} from 'react';
|
|
25
21
|
|
|
26
|
-
const
|
|
22
|
+
export const HScrollViewNativeComponent: HostComponent<ScrollViewNativeProps> =
|
|
27
23
|
Platform.OS === 'android'
|
|
28
24
|
? AndroidHorizontalScrollViewNativeComponent
|
|
29
25
|
: ScrollViewNativeComponent;
|
|
30
26
|
|
|
31
|
-
// TODO: After upgrading to React 19, remove `forwardRef` from this component.
|
|
32
|
-
export const HScrollViewNativeComponent: component(
|
|
33
|
-
ref: React.RefSetter<TScrollViewNativeImperativeHandle>,
|
|
34
|
-
...ScrollViewNativeProps
|
|
35
|
-
) = forwardRef(function HScrollViewNativeComponent(
|
|
36
|
-
props: ScrollViewNativeProps,
|
|
37
|
-
ref: ?React.RefSetter<TScrollViewNativeImperativeHandle | null>,
|
|
38
|
-
): React.Node {
|
|
39
|
-
const [componentRef, enableSyncOnScroll] = useSyncOnScroll(ref);
|
|
40
|
-
// NOTE: When `useSyncOnScroll` triggers an update, `props` will not have
|
|
41
|
-
// changed. Notably, `props.children` will be the same, allowing React to
|
|
42
|
-
// bail out during reconciliation.
|
|
43
|
-
return (
|
|
44
|
-
<HScrollViewNativeComponentForPlatform
|
|
45
|
-
{...props}
|
|
46
|
-
ref={componentRef}
|
|
47
|
-
enableSyncOnScroll={enableSyncOnScroll}
|
|
48
|
-
/>
|
|
49
|
-
);
|
|
50
|
-
});
|
|
51
|
-
|
|
52
27
|
export const HScrollContentViewNativeComponent: HostComponent<ViewProps> =
|
|
53
28
|
Platform.OS === 'android'
|
|
54
29
|
? AndroidHorizontalScrollContentViewNativeComponent
|
|
@@ -16,10 +16,10 @@ import UIManager from '../../../Libraries/ReactNative/UIManager';
|
|
|
16
16
|
import Platform from '../../../Libraries/Utilities/Platform';
|
|
17
17
|
import * as React from 'react';
|
|
18
18
|
|
|
19
|
-
const exported:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
const exported: component(
|
|
20
|
+
ref?: React.RefSetter<React.ElementRef<typeof View>>,
|
|
21
|
+
...ViewProps
|
|
22
|
+
) = Platform.select({
|
|
23
23
|
ios: require('../../../src/private/specs/components/RCTSafeAreaViewNativeComponent')
|
|
24
24
|
.default,
|
|
25
25
|
android: UIManager.hasViewManagerConfig('RCTSafeAreaView')
|
|
@@ -12,36 +12,14 @@
|
|
|
12
12
|
import type {ScrollViewNativeProps} from '../../../Libraries/Components/ScrollView/ScrollViewNativeComponentType';
|
|
13
13
|
import type {ViewProps} from '../../../Libraries/Components/View/ViewPropTypes';
|
|
14
14
|
import type {HostComponent} from '../../../Libraries/Renderer/shims/ReactNativeTypes';
|
|
15
|
-
import type {TScrollViewNativeImperativeHandle} from './useSyncOnScroll';
|
|
16
15
|
|
|
17
16
|
import ScrollContentViewNativeComponent from '../../../Libraries/Components/ScrollView/ScrollContentViewNativeComponent';
|
|
18
17
|
import ScrollViewNativeComponent from '../../../Libraries/Components/ScrollView/ScrollViewNativeComponent';
|
|
19
18
|
import View from '../../../Libraries/Components/View/View';
|
|
20
19
|
import Platform from '../../../Libraries/Utilities/Platform';
|
|
21
|
-
import useSyncOnScroll from './useSyncOnScroll';
|
|
22
|
-
import * as React from 'react';
|
|
23
|
-
import {forwardRef} from 'react';
|
|
24
20
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
ref: React.RefSetter<TScrollViewNativeImperativeHandle>,
|
|
28
|
-
...props: ScrollViewNativeProps
|
|
29
|
-
) = forwardRef(function VScrollViewNativeComponent(
|
|
30
|
-
props: ScrollViewNativeProps,
|
|
31
|
-
ref: ?React.RefSetter<TScrollViewNativeImperativeHandle | null>,
|
|
32
|
-
): React.Node {
|
|
33
|
-
const [componentRef, enableSyncOnScroll] = useSyncOnScroll(ref);
|
|
34
|
-
// NOTE: When `useSyncOnScroll` triggers an update, `props` will not have
|
|
35
|
-
// changed. Notably, `props.children` will be the same, allowing React to
|
|
36
|
-
// bail out during reconciliation.
|
|
37
|
-
return (
|
|
38
|
-
<ScrollViewNativeComponent
|
|
39
|
-
{...props}
|
|
40
|
-
ref={componentRef}
|
|
41
|
-
enableSyncOnScroll={enableSyncOnScroll}
|
|
42
|
-
/>
|
|
43
|
-
);
|
|
44
|
-
});
|
|
21
|
+
export const VScrollViewNativeComponent: HostComponent<ScrollViewNativeProps> =
|
|
22
|
+
ScrollViewNativeComponent;
|
|
45
23
|
|
|
46
24
|
export const VScrollContentViewNativeComponent: HostComponent<ViewProps> =
|
|
47
25
|
Platform.OS === 'android' ? View : ScrollContentViewNativeComponent;
|