@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
|
@@ -35,7 +35,7 @@ export function renderElement({
|
|
|
35
35
|
useConcurrentRoot: boolean,
|
|
36
36
|
}): void {
|
|
37
37
|
if (useFabric) {
|
|
38
|
-
require('../Renderer/shims/ReactFabric').render(
|
|
38
|
+
require('../Renderer/shims/ReactFabric').default.render(
|
|
39
39
|
element,
|
|
40
40
|
rootTag,
|
|
41
41
|
null,
|
|
@@ -47,7 +47,7 @@ export function renderElement({
|
|
|
47
47
|
},
|
|
48
48
|
);
|
|
49
49
|
} else {
|
|
50
|
-
require('../Renderer/shims/ReactNative').render(
|
|
50
|
+
require('../Renderer/shims/ReactNative').default.render(
|
|
51
51
|
element,
|
|
52
52
|
rootTag,
|
|
53
53
|
undefined,
|
|
@@ -63,7 +63,7 @@ export function renderElement({
|
|
|
63
63
|
export function findHostInstance_DEPRECATED<TElementType: ElementType>(
|
|
64
64
|
componentOrHandle: ?(ElementRef<TElementType> | number),
|
|
65
65
|
): ?HostInstance {
|
|
66
|
-
return require('../Renderer/shims/ReactNative').findHostInstance_DEPRECATED(
|
|
66
|
+
return require('../Renderer/shims/ReactNative').default.findHostInstance_DEPRECATED(
|
|
67
67
|
componentOrHandle,
|
|
68
68
|
);
|
|
69
69
|
}
|
|
@@ -71,7 +71,7 @@ export function findHostInstance_DEPRECATED<TElementType: ElementType>(
|
|
|
71
71
|
export function findNodeHandle<TElementType: ElementType>(
|
|
72
72
|
componentOrHandle: ?(ElementRef<TElementType> | number),
|
|
73
73
|
): ?number {
|
|
74
|
-
return require('../Renderer/shims/ReactNative').findNodeHandle(
|
|
74
|
+
return require('../Renderer/shims/ReactNative').default.findNodeHandle(
|
|
75
75
|
componentOrHandle,
|
|
76
76
|
);
|
|
77
77
|
}
|
|
@@ -84,13 +84,13 @@ export function dispatchCommand(
|
|
|
84
84
|
if (global.RN$Bridgeless === true) {
|
|
85
85
|
// Note: this function has the same implementation in the legacy and new renderer.
|
|
86
86
|
// However, evaluating the old renderer comes with some side effects.
|
|
87
|
-
return require('../Renderer/shims/ReactFabric').dispatchCommand(
|
|
87
|
+
return require('../Renderer/shims/ReactFabric').default.dispatchCommand(
|
|
88
88
|
handle,
|
|
89
89
|
command,
|
|
90
90
|
args,
|
|
91
91
|
);
|
|
92
92
|
} else {
|
|
93
|
-
return require('../Renderer/shims/ReactNative').dispatchCommand(
|
|
93
|
+
return require('../Renderer/shims/ReactNative').default.dispatchCommand(
|
|
94
94
|
handle,
|
|
95
95
|
command,
|
|
96
96
|
args,
|
|
@@ -102,7 +102,7 @@ export function sendAccessibilityEvent(
|
|
|
102
102
|
handle: HostInstance,
|
|
103
103
|
eventType: string,
|
|
104
104
|
): void {
|
|
105
|
-
return require('../Renderer/shims/ReactNative').sendAccessibilityEvent(
|
|
105
|
+
return require('../Renderer/shims/ReactNative').default.sendAccessibilityEvent(
|
|
106
106
|
handle,
|
|
107
107
|
eventType,
|
|
108
108
|
);
|
|
@@ -115,7 +115,7 @@ export function sendAccessibilityEvent(
|
|
|
115
115
|
export function unmountComponentAtNodeAndRemoveContainer(rootTag: RootTag) {
|
|
116
116
|
// $FlowExpectedError[incompatible-type] rootTag is an opaque type so we can't really cast it as is.
|
|
117
117
|
const rootTagAsNumber: number = rootTag;
|
|
118
|
-
require('../Renderer/shims/ReactNative').unmountComponentAtNodeAndRemoveContainer(
|
|
118
|
+
require('../Renderer/shims/ReactNative').default.unmountComponentAtNodeAndRemoveContainer(
|
|
119
119
|
rootTagAsNumber,
|
|
120
120
|
);
|
|
121
121
|
}
|
|
@@ -125,7 +125,7 @@ export function unstable_batchedUpdates<T>(
|
|
|
125
125
|
bookkeeping: T,
|
|
126
126
|
): void {
|
|
127
127
|
// This doesn't actually do anything when batching updates for a Fabric root.
|
|
128
|
-
return require('../Renderer/shims/ReactNative').unstable_batchedUpdates(
|
|
128
|
+
return require('../Renderer/shims/ReactNative').default.unstable_batchedUpdates(
|
|
129
129
|
fn,
|
|
130
130
|
bookkeeping,
|
|
131
131
|
);
|
|
@@ -136,10 +136,10 @@ export function isProfilingRenderer(): boolean {
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
export function isChildPublicInstance(
|
|
139
|
-
parentInstance: ReactFabricHostComponent | HostComponent<
|
|
140
|
-
childInstance: ReactFabricHostComponent | HostComponent<
|
|
139
|
+
parentInstance: ReactFabricHostComponent | HostComponent<empty>,
|
|
140
|
+
childInstance: ReactFabricHostComponent | HostComponent<empty>,
|
|
141
141
|
): boolean {
|
|
142
|
-
return require('../Renderer/shims/ReactNative').isChildPublicInstance(
|
|
142
|
+
return require('../Renderer/shims/ReactNative').default.isChildPublicInstance(
|
|
143
143
|
parentInstance,
|
|
144
144
|
childInstance,
|
|
145
145
|
);
|
|
@@ -149,7 +149,7 @@ export function getNodeFromInternalInstanceHandle(
|
|
|
149
149
|
internalInstanceHandle: InternalInstanceHandle,
|
|
150
150
|
): ?Node {
|
|
151
151
|
// This is only available in Fabric
|
|
152
|
-
return require('../Renderer/shims/ReactFabric').getNodeFromInternalInstanceHandle(
|
|
152
|
+
return require('../Renderer/shims/ReactFabric').default.getNodeFromInternalInstanceHandle(
|
|
153
153
|
internalInstanceHandle,
|
|
154
154
|
);
|
|
155
155
|
}
|
|
@@ -158,7 +158,7 @@ export function getPublicInstanceFromInternalInstanceHandle(
|
|
|
158
158
|
internalInstanceHandle: InternalInstanceHandle,
|
|
159
159
|
): mixed /*PublicInstance | PublicTextInstance | null*/ {
|
|
160
160
|
// This is only available in Fabric
|
|
161
|
-
return require('../Renderer/shims/ReactFabric').getPublicInstanceFromInternalInstanceHandle(
|
|
161
|
+
return require('../Renderer/shims/ReactFabric').default.getPublicInstanceFromInternalInstanceHandle(
|
|
162
162
|
internalInstanceHandle,
|
|
163
163
|
);
|
|
164
164
|
}
|
|
@@ -8,11 +8,9 @@
|
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import type {AbstractComponent} from 'react';
|
|
12
|
-
|
|
13
11
|
import * as React from 'react';
|
|
14
12
|
|
|
15
|
-
type NoopComponent =
|
|
13
|
+
type NoopComponent = component(children: React.Node);
|
|
16
14
|
|
|
17
15
|
const cache: Map<
|
|
18
16
|
string, // displayName
|
|
@@ -23,10 +23,12 @@ import * as React from 'react';
|
|
|
23
23
|
// require BackHandler so it sets the default handler that exits the app if no listeners respond
|
|
24
24
|
import '../Utilities/BackHandler';
|
|
25
25
|
|
|
26
|
-
type ActivityType =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
type ActivityType = component(
|
|
27
|
+
...{
|
|
28
|
+
mode: 'visible' | 'hidden',
|
|
29
|
+
children: React.Node,
|
|
30
|
+
}
|
|
31
|
+
);
|
|
30
32
|
|
|
31
33
|
export default function renderApplication<Props: Object>(
|
|
32
34
|
RootComponent: React.ComponentType<Props>,
|
|
@@ -39,7 +41,6 @@ export default function renderApplication<Props: Object>(
|
|
|
39
41
|
isLogBox?: boolean,
|
|
40
42
|
debugName?: string,
|
|
41
43
|
displayMode?: ?DisplayModeType,
|
|
42
|
-
useConcurrentRoot?: boolean,
|
|
43
44
|
useOffscreen?: boolean,
|
|
44
45
|
) {
|
|
45
46
|
invariant(rootTag, 'Expect to have a valid rootTag, instead got ', rootTag);
|
|
@@ -85,12 +86,12 @@ export default function renderApplication<Props: Object>(
|
|
|
85
86
|
}
|
|
86
87
|
|
|
87
88
|
// We want to have concurrentRoot always enabled when you're on Fabric.
|
|
88
|
-
const
|
|
89
|
+
const useConcurrentRoot = Boolean(fabric);
|
|
89
90
|
|
|
90
91
|
performanceLogger.startTimespan('renderApplication_React_render');
|
|
91
92
|
performanceLogger.setExtra(
|
|
92
93
|
'usedReactConcurrentRoot',
|
|
93
|
-
|
|
94
|
+
useConcurrentRoot ? '1' : '0',
|
|
94
95
|
);
|
|
95
96
|
performanceLogger.setExtra('usedReactFabric', fabric ? '1' : '0');
|
|
96
97
|
performanceLogger.setExtra(
|
|
@@ -101,7 +102,7 @@ export default function renderApplication<Props: Object>(
|
|
|
101
102
|
element: renderable,
|
|
102
103
|
rootTag,
|
|
103
104
|
useFabric: Boolean(fabric),
|
|
104
|
-
useConcurrentRoot
|
|
105
|
+
useConcurrentRoot,
|
|
105
106
|
});
|
|
106
107
|
performanceLogger.stopTimespan('renderApplication_React_render');
|
|
107
108
|
}
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
|
|
13
13
|
import type {HostComponent} from '../Renderer/shims/ReactNativeTypes';
|
|
14
14
|
|
|
15
|
-
const createReactNativeComponentClass =
|
|
15
|
+
const createReactNativeComponentClass =
|
|
16
|
+
require('../Renderer/shims/createReactNativeComponentClass').default;
|
|
16
17
|
const getNativeComponentAttributes = require('./getNativeComponentAttributes');
|
|
17
18
|
|
|
18
19
|
/**
|
|
@@ -24,7 +25,9 @@ const getNativeComponentAttributes = require('./getNativeComponentAttributes');
|
|
|
24
25
|
*
|
|
25
26
|
*/
|
|
26
27
|
|
|
27
|
-
const requireNativeComponent = <T
|
|
28
|
+
const requireNativeComponent = <T: {...}>(
|
|
29
|
+
uiViewClassName: string,
|
|
30
|
+
): HostComponent<T> =>
|
|
28
31
|
((createReactNativeComponentClass(uiViewClassName, () =>
|
|
29
32
|
getNativeComponentAttributes(uiViewClassName),
|
|
30
33
|
): any): HostComponent<T>);
|