@office-iss/react-native-win32 0.0.0-canary.274 → 0.0.0-canary.276
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/useAnimatedProps.js +2 -14
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +16 -2
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +21 -2
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +2 -0
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +0 -1
- package/Libraries/Components/ScrollView/ScrollView.js +35 -74
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +0 -2
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +0 -1
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
- package/Libraries/Components/TextInput/TextInput.flow.js +6 -0
- package/Libraries/Components/TextInput/TextInput.js +7 -1
- package/Libraries/Components/TextInput/TextInput.win32.js +7 -1
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +1 -2
- package/Libraries/Components/View/ViewPropTypes.d.ts +7 -0
- package/Libraries/Components/View/ViewPropTypes.js +0 -3
- package/Libraries/Components/View/ViewPropTypes.win32.js +0 -3
- package/Libraries/Core/ExceptionsManager.js +7 -4
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/setUpErrorHandling.js +20 -18
- package/Libraries/Core/setUpTimers.js +4 -12
- package/Libraries/Image/Image.android.js +0 -2
- package/Libraries/Image/Image.d.ts +2 -0
- 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/Image/ImageViewNativeComponent.js +3 -1
- 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/LogBox/LogBox.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/Modal/Modal.d.ts +5 -0
- package/Libraries/Modal/Modal.js +17 -0
- package/Libraries/NewAppScreen/components/HermesBadge.js +1 -1
- package/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +49 -2
- package/Libraries/Pressability/usePressability.js +4 -1
- package/Libraries/ReactNative/AppRegistry.js +0 -6
- package/Libraries/ReactNative/RendererImplementation.js +12 -12
- package/Libraries/ReactNative/renderApplication.js +3 -4
- package/Libraries/ReactNative/requireNativeComponent.js +2 -1
- 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/createReactNativeComponentClass.js +2 -2
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +7 -1
- package/Libraries/StyleSheet/StyleSheetTypes.js +5 -4
- package/Libraries/StyleSheet/processBackgroundImage.js +87 -110
- package/Libraries/TurboModule/TurboModuleRegistry.js +5 -5
- package/Libraries/Utilities/Appearance.js +3 -1
- 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/jest/setup.js +5 -1
- package/overrides.json +9 -9
- package/package.json +14 -14
- package/src/private/components/HScrollViewNativeComponents.js +1 -26
- package/src/private/components/VScrollViewNativeComponents.js +2 -24
- package/src/private/featureflags/ReactNativeFeatureFlags.js +24 -55
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +2 -7
- package/src/private/setup/setUpDOM.js +14 -6
- package/src/private/setup/setUpMutationObserver.js +5 -0
- 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/webapis/intersectionobserver/IntersectionObserver.js +96 -11
- package/src/private/webapis/intersectionobserver/IntersectionObserverEntry.js +26 -0
- package/src/private/webapis/intersectionobserver/IntersectionObserverManager.js +1 -0
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +1 -0
- package/src/private/webapis/intersectionobserver/specs/__mocks__/NativeIntersectionObserver.js +9 -0
- 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
|
@@ -66,11 +66,58 @@ export interface PermissionsAndroidStatic {
|
|
|
66
66
|
/**
|
|
67
67
|
* A list of permission results that are returned
|
|
68
68
|
*/
|
|
69
|
-
RESULTS: {
|
|
69
|
+
RESULTS: {
|
|
70
|
+
[key in 'GRANTED' | 'DENIED' | 'NEVER_ASK_AGAIN']: PermissionStatus;
|
|
71
|
+
};
|
|
70
72
|
/**
|
|
71
73
|
* A list of specified "dangerous" permissions that require prompting the user
|
|
72
74
|
*/
|
|
73
|
-
PERMISSIONS: {
|
|
75
|
+
PERMISSIONS: {
|
|
76
|
+
[key in
|
|
77
|
+
| 'READ_CALENDAR'
|
|
78
|
+
| 'WRITE_CALENDAR'
|
|
79
|
+
| 'CAMERA'
|
|
80
|
+
| 'READ_CONTACTS'
|
|
81
|
+
| 'WRITE_CONTACTS'
|
|
82
|
+
| 'GET_ACCOUNTS'
|
|
83
|
+
| 'ACCESS_FINE_LOCATION'
|
|
84
|
+
| 'ACCESS_COARSE_LOCATION'
|
|
85
|
+
| 'ACCESS_BACKGROUND_LOCATION'
|
|
86
|
+
| 'RECORD_AUDIO'
|
|
87
|
+
| 'READ_PHONE_STATE'
|
|
88
|
+
| 'CALL_PHONE'
|
|
89
|
+
| 'READ_CALL_LOG'
|
|
90
|
+
| 'WRITE_CALL_LOG'
|
|
91
|
+
| 'ADD_VOICEMAIL'
|
|
92
|
+
| 'READ_VOICEMAIL'
|
|
93
|
+
| 'WRITE_VOICEMAIL'
|
|
94
|
+
| 'USE_SIP'
|
|
95
|
+
| 'PROCESS_OUTGOING_CALLS'
|
|
96
|
+
| 'BODY_SENSORS'
|
|
97
|
+
| 'BODY_SENSORS_BACKGROUND'
|
|
98
|
+
| 'SEND_SMS'
|
|
99
|
+
| 'RECEIVE_SMS'
|
|
100
|
+
| 'READ_SMS'
|
|
101
|
+
| 'RECEIVE_WAP_PUSH'
|
|
102
|
+
| 'RECEIVE_MMS'
|
|
103
|
+
| 'READ_EXTERNAL_STORAGE'
|
|
104
|
+
| 'READ_MEDIA_IMAGES'
|
|
105
|
+
| 'READ_MEDIA_VIDEO'
|
|
106
|
+
| 'READ_MEDIA_AUDIO'
|
|
107
|
+
| 'READ_MEDIA_VISUAL_USER_SELECTED'
|
|
108
|
+
| 'WRITE_EXTERNAL_STORAGE'
|
|
109
|
+
| 'BLUETOOTH_CONNECT'
|
|
110
|
+
| 'BLUETOOTH_SCAN'
|
|
111
|
+
| 'BLUETOOTH_ADVERTISE'
|
|
112
|
+
| 'ACCESS_MEDIA_LOCATION'
|
|
113
|
+
| 'ACCEPT_HANDOVER'
|
|
114
|
+
| 'ACTIVITY_RECOGNITION'
|
|
115
|
+
| 'ANSWER_PHONE_CALLS'
|
|
116
|
+
| 'READ_PHONE_NUMBERS'
|
|
117
|
+
| 'UWB_RANGING'
|
|
118
|
+
| 'POST_NOTIFICATIONS'
|
|
119
|
+
| 'NEARBY_WIFI_DEVICES']: Permission;
|
|
120
|
+
};
|
|
74
121
|
new (): PermissionsAndroidStatic;
|
|
75
122
|
/**
|
|
76
123
|
* @deprecated Use check instead
|
|
@@ -14,6 +14,9 @@ import Pressability, {
|
|
|
14
14
|
} from './Pressability';
|
|
15
15
|
import {useEffect, useRef} from 'react';
|
|
16
16
|
|
|
17
|
+
declare function usePressability(config: PressabilityConfig): EventHandlers;
|
|
18
|
+
declare function usePressability(config: null | void): null | EventHandlers;
|
|
19
|
+
|
|
17
20
|
/**
|
|
18
21
|
* Creates a persistent instance of `Pressability` that automatically configures
|
|
19
22
|
* itself and resets. Accepts null `config` to support lazy initialization. Once
|
|
@@ -28,7 +31,7 @@ import {useEffect, useRef} from 'react';
|
|
|
28
31
|
*/
|
|
29
32
|
export default function usePressability(
|
|
30
33
|
config: ?PressabilityConfig,
|
|
31
|
-
):
|
|
34
|
+
): null | EventHandlers {
|
|
32
35
|
const pressabilityRef = useRef<?Pressability>(null);
|
|
33
36
|
if (config != null && pressabilityRef.current == null) {
|
|
34
37
|
pressabilityRef.current = new Pressability(config);
|
|
@@ -46,7 +46,6 @@ type AppParameters = {
|
|
|
46
46
|
initialProps: $ReadOnly<{[string]: mixed, ...}>,
|
|
47
47
|
rootTag: RootTag,
|
|
48
48
|
fabric?: boolean,
|
|
49
|
-
concurrentRoot?: boolean,
|
|
50
49
|
};
|
|
51
50
|
export type Runnable = (
|
|
52
51
|
appParameters: AppParameters,
|
|
@@ -120,10 +119,6 @@ const AppRegistry = {
|
|
|
120
119
|
): string {
|
|
121
120
|
const scopedPerformanceLogger = createPerformanceLogger();
|
|
122
121
|
runnables[appKey] = (appParameters, displayMode) => {
|
|
123
|
-
const concurrentRootEnabled = Boolean(
|
|
124
|
-
appParameters.initialProps?.concurrentRoot ||
|
|
125
|
-
appParameters.concurrentRoot,
|
|
126
|
-
);
|
|
127
122
|
renderApplication(
|
|
128
123
|
componentProviderInstrumentationHook(
|
|
129
124
|
componentProvider,
|
|
@@ -138,7 +133,6 @@ const AppRegistry = {
|
|
|
138
133
|
appKey === 'LogBox', // is logbox
|
|
139
134
|
appKey,
|
|
140
135
|
displayMode,
|
|
141
|
-
concurrentRootEnabled,
|
|
142
136
|
);
|
|
143
137
|
};
|
|
144
138
|
if (section) {
|
|
@@ -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
|
);
|
|
@@ -139,7 +139,7 @@ export function isChildPublicInstance(
|
|
|
139
139
|
parentInstance: ReactFabricHostComponent | HostComponent<empty>,
|
|
140
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
|
}
|
|
@@ -41,7 +41,6 @@ export default function renderApplication<Props: Object>(
|
|
|
41
41
|
isLogBox?: boolean,
|
|
42
42
|
debugName?: string,
|
|
43
43
|
displayMode?: ?DisplayModeType,
|
|
44
|
-
useConcurrentRoot?: boolean,
|
|
45
44
|
useOffscreen?: boolean,
|
|
46
45
|
) {
|
|
47
46
|
invariant(rootTag, 'Expect to have a valid rootTag, instead got ', rootTag);
|
|
@@ -87,12 +86,12 @@ export default function renderApplication<Props: Object>(
|
|
|
87
86
|
}
|
|
88
87
|
|
|
89
88
|
// We want to have concurrentRoot always enabled when you're on Fabric.
|
|
90
|
-
const
|
|
89
|
+
const useConcurrentRoot = Boolean(fabric);
|
|
91
90
|
|
|
92
91
|
performanceLogger.startTimespan('renderApplication_React_render');
|
|
93
92
|
performanceLogger.setExtra(
|
|
94
93
|
'usedReactConcurrentRoot',
|
|
95
|
-
|
|
94
|
+
useConcurrentRoot ? '1' : '0',
|
|
96
95
|
);
|
|
97
96
|
performanceLogger.setExtra('usedReactFabric', fabric ? '1' : '0');
|
|
98
97
|
performanceLogger.setExtra(
|
|
@@ -103,7 +102,7 @@ export default function renderApplication<Props: Object>(
|
|
|
103
102
|
element: renderable,
|
|
104
103
|
rootTag,
|
|
105
104
|
useFabric: Boolean(fabric),
|
|
106
|
-
useConcurrentRoot
|
|
105
|
+
useConcurrentRoot,
|
|
107
106
|
});
|
|
108
107
|
performanceLogger.stopTimespan('renderApplication_React_render');
|
|
109
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
|
/**
|