@office-iss/react-native-win32 0.81.2 → 0.82.0-preview.2
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 +3 -11
- package/CHANGELOG.json +118 -43
- package/CHANGELOG.md +45 -27
- package/IntegrationTests/IntegrationTestsApp.js +2 -2
- package/IntegrationTests/LayoutEventsTest.js +3 -3
- package/Libraries/ActionSheetIOS/ActionSheetIOS.js +7 -3
- package/Libraries/Alert/RCTAlertManager.android.js +4 -2
- package/Libraries/Animated/Animated.d.ts +2 -0
- package/Libraries/Animated/AnimatedEvent.js +1 -1
- package/Libraries/Animated/AnimatedExports.js.flow +1 -0
- package/Libraries/Animated/AnimatedImplementation.js +4 -2
- package/Libraries/Animated/AnimatedMock.js +1 -1
- package/Libraries/Animated/Easing.js +2 -0
- package/Libraries/Animated/NativeAnimatedAllowlist.js +1 -0
- package/Libraries/Animated/animations/Animation.js +19 -20
- package/Libraries/Animated/animations/TimingAnimation.js +2 -0
- package/Libraries/Animated/components/AnimatedScrollView.js +3 -2
- package/Libraries/Animated/components/AnimatedSectionList.js +1 -1
- package/Libraries/Animated/nodes/AnimatedColor.js +9 -9
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +4 -4
- package/Libraries/Animated/nodes/AnimatedNode.js +14 -7
- package/Libraries/Animated/nodes/AnimatedObject.js +7 -7
- package/Libraries/Animated/nodes/AnimatedProps.js +32 -32
- package/Libraries/Animated/nodes/AnimatedStyle.js +23 -21
- package/Libraries/Animated/nodes/AnimatedTransform.js +6 -6
- package/Libraries/Animated/nodes/AnimatedValue.js +18 -26
- package/Libraries/AppState/AppState.js +8 -4
- package/Libraries/BatchedBridge/BatchedBridge.js +1 -0
- package/Libraries/BatchedBridge/MessageQueue.js +5 -0
- package/Libraries/BatchedBridge/NativeModules.js +1 -1
- package/Libraries/Blob/BlobManager.js +1 -1
- package/Libraries/Blob/URLSearchParams.js +2 -0
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +2 -2
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +2 -2
- package/Libraries/Components/Button.js +1 -1
- package/Libraries/Components/Button.win32.js +1 -1
- package/Libraries/Components/Pressable/Pressable.js +10 -1
- package/Libraries/Components/Pressable/Pressable.win32.js +9 -0
- package/Libraries/Components/Pressable/useAndroidRippleForView.js +2 -2
- package/Libraries/Components/ScrollView/ScrollView.js +13 -4
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
- package/Libraries/Components/StatusBar/StatusBar.js +2 -2
- package/Libraries/Components/Switch/Switch.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 +14 -5
- package/Libraries/Components/TextInput/TextInput.win32.js +15 -7
- package/Libraries/Components/TextInput/TextInputState.js +1 -1
- package/Libraries/Components/TextInput/TextInputState.win32.js +1 -1
- package/Libraries/Components/TextInput/Win32TextInputNativeComponent.js +2 -3
- package/Libraries/Components/Touchable/TouchableBounce.js +1 -1
- package/Libraries/Components/Touchable/TouchableHighlight.js +1 -1
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +1 -1
- package/Libraries/Components/Touchable/TouchableOpacity.js +1 -1
- package/Libraries/Components/Touchable/TouchableWin32.js +1 -1
- package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +3 -3
- package/Libraries/Components/View/View.js +81 -167
- 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 +4 -2
- package/Libraries/Core/ReactFiberErrorDialog.js +3 -3
- package/Libraries/Core/ReactNativeVersion.js +37 -10
- package/Libraries/Core/Timers/JSTimers.js +4 -1
- package/Libraries/Core/Timers/NativeTiming.js +1 -0
- package/Libraries/Core/Timers/immediateShim.js +2 -1
- package/Libraries/Core/Timers/queueMicrotask.js +1 -0
- package/Libraries/Core/setUpPerformance.js +3 -4
- package/Libraries/Debugging/DebuggingOverlayRegistry.js +5 -3
- package/Libraries/Image/Image.android.js +327 -111
- package/Libraries/Image/Image.ios.js +6 -1
- package/Libraries/Image/Image.win32.js +6 -1
- package/Libraries/Image/ImageSourceUtils.js +8 -2
- package/Libraries/Image/assetPaths.js +1 -1
- package/Libraries/Image/resolveAssetSource.js +1 -1
- package/Libraries/Image/resolveAssetSource.win32.js +6 -7
- package/Libraries/Interaction/InteractionManager.js +118 -167
- package/Libraries/Interaction/PanResponder.js +7 -52
- package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -0
- package/Libraries/Lists/FlatList.js +5 -6
- package/Libraries/LogBox/Data/LogBoxData.js +5 -2
- package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +2 -2
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.win32.js +1 -1
- package/Libraries/Modal/Modal.js +3 -3
- package/Libraries/NativeComponent/NativeComponentRegistry.js +1 -1
- package/Libraries/NativeComponent/ViewConfig.js +2 -2
- 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/XMLHttpRequest.js +20 -5
- 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/Pressability/Pressability.js +1 -1
- package/Libraries/Pressability/Pressability.win32.js +1 -1
- package/Libraries/PushNotificationIOS/PushNotificationIOS.js +2 -2
- package/Libraries/ReactNative/AppRegistryImpl.js +4 -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/ReactNative/renderApplication.js +1 -0
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +1 -1
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +38 -35
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +51 -22
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +54 -24
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +36 -33
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +5 -5
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +5 -5
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +3 -1
- package/Libraries/Share/Share.js +4 -0
- 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/StyleSheet.d.ts +7 -22
- package/Libraries/StyleSheet/StyleSheetExports.js +2 -8
- package/Libraries/StyleSheet/StyleSheetExports.js.flow +11 -18
- package/Libraries/StyleSheet/flattenStyle.js +2 -2
- package/Libraries/StyleSheet/processAspectRatio.js +2 -0
- package/Libraries/StyleSheet/processFilter.js +5 -5
- package/Libraries/StyleSheet/splitLayoutProps.js +2 -2
- package/Libraries/Text/Text.js +534 -234
- package/Libraries/Text/Text.win32.js +647 -274
- package/Libraries/Text/TextNativeComponent.js +2 -2
- package/Libraries/Text/TextNativeComponent.win32.js +2 -2
- package/Libraries/Utilities/Appearance.d.ts +3 -5
- package/Libraries/Utilities/Appearance.js +5 -17
- package/Libraries/Utilities/HMRClient.js +2 -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/SceneTracker.js +1 -1
- package/Libraries/Utilities/codegenNativeCommands.js +1 -1
- package/Libraries/Utilities/codegenNativeComponent.js +1 -1
- package/Libraries/Utilities/createPerformanceLogger.js +32 -0
- package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +2 -0
- package/Libraries/Utilities/differ/pointsDiffer.js +1 -1
- package/Libraries/Utilities/useMergeRefs.js +1 -1
- package/Libraries/WebSocket/WebSocketInterceptor.js +2 -0
- package/Libraries/promiseRejectionTrackingOptions.js +17 -31
- package/Libraries/vendor/emitter/EventEmitter.js +1 -1
- package/flow/bom.js.flow +223 -1
- package/flow/prettier.js.flow +14 -0
- package/index.js +14 -2
- package/index.win32.js +16 -2
- package/jest/local-setup.js +2 -2
- package/jest/mock.js +1 -1
- package/jest/mockComponent.js +9 -9
- 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 +23 -12
- package/overrides.json +23 -23
- package/package.json +28 -27
- package/saveAssetPlugin.js +2 -2
- package/src/private/animated/NativeAnimatedHelper.js +16 -5
- package/src/private/animated/NativeAnimatedHelper.win32.js +16 -5
- package/src/private/animated/createAnimatedPropsHook.js +11 -60
- package/src/private/animated/createAnimatedPropsMemoHook.js +8 -54
- package/src/private/components/virtualview/VirtualView.js +43 -12
- package/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.js +93 -0
- package/src/private/components/virtualview/VirtualViewNativeComponent.js +6 -0
- package/src/private/devsupport/devmenu/elementinspector/Inspector.js +2 -2
- package/src/private/devsupport/devmenu/elementinspector/ReactDevToolsOverlay.js +2 -2
- package/src/private/featureflags/ReactNativeFeatureFlags.js +85 -52
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +23 -4
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +15 -6
- package/src/private/renderer/errorhandling/ErrorHandlers.js +3 -3
- package/src/private/setup/{setUpPerformanceObserver.js → setUpPerformanceModern.js} +43 -18
- package/src/private/specs_DEPRECATED/modules/NativeTiming.js +1 -0
- 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 +15 -12
- package/src/private/webapis/dom/oldstylecollections/NodeList.js +14 -11
- package/src/private/webapis/geometry/DOMRectList.js +2 -2
- package/src/private/webapis/intersectionobserver/internals/IntersectionObserverManager.js +19 -74
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +0 -4
- package/src/private/webapis/mutationobserver/internals/MutationObserverManager.js +1 -1
- package/src/private/webapis/performance/EventTiming.js +40 -25
- package/src/private/webapis/performance/LongTasks.js +35 -2
- package/src/private/webapis/performance/Performance.js +347 -166
- package/src/private/webapis/performance/PerformanceEntry.js +40 -23
- package/src/private/webapis/performance/PerformanceObserver.js +37 -29
- package/src/private/webapis/performance/ReactNativeStartupTiming.js +3 -24
- package/src/private/webapis/performance/ResourceTiming.js +29 -18
- package/src/private/webapis/performance/UserTiming.js +92 -34
- package/src/private/webapis/performance/UserTimingExtensibility.js.flow +38 -0
- package/src/private/webapis/performance/internals/RawPerformanceEntry.js +3 -4
- package/src/private/webapis/performance/internals/Utilities.js +9 -0
- package/src/private/webapis/performance/specs/NativePerformance.js +23 -23
- package/src/private/webapis/structuredClone/structuredClone.js +10 -10
- package/src-win/Libraries/Components/Touchable/TouchableWin32.tsx +1 -1
- package/Libraries/Interaction/InteractionManagerStub.js +0 -184
- package/Libraries/Interaction/TaskQueue.js +0 -183
- package/Libraries/ReactNative/ReactNativeFeatureFlags.js +0 -31
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
|
|
11
11
|
import type {ViewProps} from './ViewPropTypes';
|
|
12
12
|
|
|
13
|
-
import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags';
|
|
14
13
|
import TextAncestorContext from '../../Text/TextAncestorContext';
|
|
15
14
|
import ViewNativeComponent from './ViewNativeComponent';
|
|
16
15
|
import * as React from 'react';
|
|
@@ -29,182 +28,97 @@ component View(
|
|
|
29
28
|
) {
|
|
30
29
|
const hasTextAncestor = use(TextAncestorContext);
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
processedProps.accessibilityLabelledBy = parsedAriaLabelledBy;
|
|
61
|
-
}
|
|
31
|
+
const {
|
|
32
|
+
accessibilityState,
|
|
33
|
+
accessibilityValue,
|
|
34
|
+
'aria-busy': ariaBusy,
|
|
35
|
+
'aria-checked': ariaChecked,
|
|
36
|
+
'aria-disabled': ariaDisabled,
|
|
37
|
+
'aria-expanded': ariaExpanded,
|
|
38
|
+
'aria-hidden': ariaHidden,
|
|
39
|
+
'aria-label': ariaLabel,
|
|
40
|
+
'aria-labelledby': ariaLabelledBy,
|
|
41
|
+
'aria-live': ariaLive,
|
|
42
|
+
'aria-selected': ariaSelected,
|
|
43
|
+
'aria-valuemax': ariaValueMax,
|
|
44
|
+
'aria-valuemin': ariaValueMin,
|
|
45
|
+
'aria-valuenow': ariaValueNow,
|
|
46
|
+
'aria-valuetext': ariaValueText,
|
|
47
|
+
id,
|
|
48
|
+
tabIndex,
|
|
49
|
+
...otherProps
|
|
50
|
+
} = props;
|
|
51
|
+
|
|
52
|
+
// Since we destructured props, we can now treat it as mutable
|
|
53
|
+
const processedProps = otherProps as {...ViewProps};
|
|
54
|
+
|
|
55
|
+
const parsedAriaLabelledBy = ariaLabelledBy?.split(/\s*,\s*/g);
|
|
56
|
+
if (parsedAriaLabelledBy !== undefined) {
|
|
57
|
+
processedProps.accessibilityLabelledBy = parsedAriaLabelledBy;
|
|
58
|
+
}
|
|
62
59
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
if (ariaLabel !== undefined) {
|
|
61
|
+
processedProps.accessibilityLabel = ariaLabel;
|
|
62
|
+
}
|
|
66
63
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
if (ariaLive !== undefined) {
|
|
65
|
+
processedProps.accessibilityLiveRegion =
|
|
66
|
+
ariaLive === 'off' ? 'none' : ariaLive;
|
|
67
|
+
}
|
|
71
68
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
69
|
+
if (ariaHidden !== undefined) {
|
|
70
|
+
processedProps.accessibilityElementsHidden = ariaHidden;
|
|
71
|
+
if (ariaHidden === true) {
|
|
72
|
+
processedProps.importantForAccessibility = 'no-hide-descendants';
|
|
77
73
|
}
|
|
74
|
+
}
|
|
78
75
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
76
|
+
if (id !== undefined) {
|
|
77
|
+
processedProps.nativeID = id;
|
|
78
|
+
}
|
|
82
79
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
80
|
+
if (tabIndex !== undefined) {
|
|
81
|
+
processedProps.focusable = !tabIndex;
|
|
82
|
+
}
|
|
86
83
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
84
|
+
if (
|
|
85
|
+
accessibilityState != null ||
|
|
86
|
+
ariaBusy != null ||
|
|
87
|
+
ariaChecked != null ||
|
|
88
|
+
ariaDisabled != null ||
|
|
89
|
+
ariaExpanded != null ||
|
|
90
|
+
ariaSelected != null
|
|
91
|
+
) {
|
|
92
|
+
processedProps.accessibilityState = {
|
|
93
|
+
busy: ariaBusy ?? accessibilityState?.busy,
|
|
94
|
+
checked: ariaChecked ?? accessibilityState?.checked,
|
|
95
|
+
disabled: ariaDisabled ?? accessibilityState?.disabled,
|
|
96
|
+
expanded: ariaExpanded ?? accessibilityState?.expanded,
|
|
97
|
+
selected: ariaSelected ?? accessibilityState?.selected,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
103
100
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
101
|
+
if (
|
|
102
|
+
accessibilityValue != null ||
|
|
103
|
+
ariaValueMax != null ||
|
|
104
|
+
ariaValueMin != null ||
|
|
105
|
+
ariaValueNow != null ||
|
|
106
|
+
ariaValueText != null
|
|
107
|
+
) {
|
|
108
|
+
processedProps.accessibilityValue = {
|
|
109
|
+
max: ariaValueMax ?? accessibilityValue?.max,
|
|
110
|
+
min: ariaValueMin ?? accessibilityValue?.min,
|
|
111
|
+
now: ariaValueNow ?? accessibilityValue?.now,
|
|
112
|
+
text: ariaValueText ?? accessibilityValue?.text,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
118
115
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
);
|
|
125
|
-
} else {
|
|
126
|
-
const {
|
|
127
|
-
accessibilityElementsHidden,
|
|
128
|
-
accessibilityLabel,
|
|
129
|
-
accessibilityLabelledBy,
|
|
130
|
-
accessibilityLiveRegion,
|
|
131
|
-
accessibilityState,
|
|
132
|
-
accessibilityValue,
|
|
133
|
-
'aria-busy': ariaBusy,
|
|
134
|
-
'aria-checked': ariaChecked,
|
|
135
|
-
'aria-disabled': ariaDisabled,
|
|
136
|
-
'aria-expanded': ariaExpanded,
|
|
137
|
-
'aria-hidden': ariaHidden,
|
|
138
|
-
'aria-label': ariaLabel,
|
|
139
|
-
'aria-labelledby': ariaLabelledBy,
|
|
140
|
-
'aria-live': ariaLive,
|
|
141
|
-
'aria-selected': ariaSelected,
|
|
142
|
-
'aria-valuemax': ariaValueMax,
|
|
143
|
-
'aria-valuemin': ariaValueMin,
|
|
144
|
-
'aria-valuenow': ariaValueNow,
|
|
145
|
-
'aria-valuetext': ariaValueText,
|
|
146
|
-
focusable,
|
|
147
|
-
id,
|
|
148
|
-
importantForAccessibility,
|
|
149
|
-
nativeID,
|
|
150
|
-
tabIndex,
|
|
151
|
-
...otherProps
|
|
152
|
-
} = props;
|
|
153
|
-
const _accessibilityLabelledBy =
|
|
154
|
-
ariaLabelledBy?.split(/\s*,\s*/g) ?? accessibilityLabelledBy;
|
|
155
|
-
|
|
156
|
-
const _accessibilityState =
|
|
157
|
-
accessibilityState != null ||
|
|
158
|
-
ariaBusy != null ||
|
|
159
|
-
ariaChecked != null ||
|
|
160
|
-
ariaDisabled != null ||
|
|
161
|
-
ariaExpanded != null ||
|
|
162
|
-
ariaSelected != null
|
|
163
|
-
? {
|
|
164
|
-
busy: ariaBusy ?? accessibilityState?.busy,
|
|
165
|
-
checked: ariaChecked ?? accessibilityState?.checked,
|
|
166
|
-
disabled: ariaDisabled ?? accessibilityState?.disabled,
|
|
167
|
-
expanded: ariaExpanded ?? accessibilityState?.expanded,
|
|
168
|
-
selected: ariaSelected ?? accessibilityState?.selected,
|
|
169
|
-
}
|
|
170
|
-
: undefined;
|
|
171
|
-
|
|
172
|
-
const _accessibilityValue =
|
|
173
|
-
accessibilityValue != null ||
|
|
174
|
-
ariaValueMax != null ||
|
|
175
|
-
ariaValueMin != null ||
|
|
176
|
-
ariaValueNow != null ||
|
|
177
|
-
ariaValueText != null
|
|
178
|
-
? {
|
|
179
|
-
max: ariaValueMax ?? accessibilityValue?.max,
|
|
180
|
-
min: ariaValueMin ?? accessibilityValue?.min,
|
|
181
|
-
now: ariaValueNow ?? accessibilityValue?.now,
|
|
182
|
-
text: ariaValueText ?? accessibilityValue?.text,
|
|
183
|
-
}
|
|
184
|
-
: undefined;
|
|
185
|
-
|
|
186
|
-
actualView = (
|
|
187
|
-
<ViewNativeComponent
|
|
188
|
-
{...otherProps}
|
|
189
|
-
accessibilityLiveRegion={
|
|
190
|
-
ariaLive === 'off' ? 'none' : ariaLive ?? accessibilityLiveRegion
|
|
191
|
-
}
|
|
192
|
-
accessibilityLabel={ariaLabel ?? accessibilityLabel}
|
|
193
|
-
focusable={tabIndex !== undefined ? !tabIndex : focusable}
|
|
194
|
-
accessibilityState={_accessibilityState}
|
|
195
|
-
accessibilityElementsHidden={ariaHidden ?? accessibilityElementsHidden}
|
|
196
|
-
accessibilityLabelledBy={_accessibilityLabelledBy}
|
|
197
|
-
accessibilityValue={_accessibilityValue}
|
|
198
|
-
importantForAccessibility={
|
|
199
|
-
ariaHidden === true
|
|
200
|
-
? 'no-hide-descendants'
|
|
201
|
-
: importantForAccessibility
|
|
202
|
-
}
|
|
203
|
-
nativeID={id ?? nativeID}
|
|
204
|
-
ref={ref}
|
|
205
|
-
/>
|
|
116
|
+
const actualView =
|
|
117
|
+
ref == null ? (
|
|
118
|
+
<ViewNativeComponent {...processedProps} />
|
|
119
|
+
) : (
|
|
120
|
+
<ViewNativeComponent {...processedProps} ref={ref} />
|
|
206
121
|
);
|
|
207
|
-
}
|
|
208
122
|
|
|
209
123
|
if (hasTextAncestor) {
|
|
210
124
|
return (
|
|
@@ -194,7 +194,8 @@ const View: component(
|
|
|
194
194
|
if (React.isValidElement(child)) {
|
|
195
195
|
// $FlowFixMe[incompatible-use]
|
|
196
196
|
if (child.props.children) {
|
|
197
|
-
// $FlowFixMe[incompatible-call]
|
|
197
|
+
// $FlowFixMe[incompatible-call] - React.Children.map types child as mixed
|
|
198
|
+
// $FlowFixMe[incompatible-type]
|
|
198
199
|
return React.cloneElement(child, {
|
|
199
200
|
accessible: false,
|
|
200
201
|
children: childrenWithImportantForAccessibility(
|
|
@@ -203,6 +204,7 @@ const View: component(
|
|
|
203
204
|
});
|
|
204
205
|
} else {
|
|
205
206
|
// $FlowFixMe[incompatible-call]
|
|
207
|
+
// $FlowFixMe[incompatible-type]
|
|
206
208
|
return React.cloneElement(child, {accessible: false});
|
|
207
209
|
}
|
|
208
210
|
}
|
|
@@ -169,7 +169,7 @@ function handleException(e: mixed, isFatal: boolean) {
|
|
|
169
169
|
inExceptionHandler = true;
|
|
170
170
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for this
|
|
171
171
|
* parameters */
|
|
172
|
-
// $FlowFixMe[incompatible-
|
|
172
|
+
// $FlowFixMe[incompatible-type]
|
|
173
173
|
reportException(error, isFatal, reportToConsole);
|
|
174
174
|
} finally {
|
|
175
175
|
inExceptionHandler = false;
|
|
@@ -242,6 +242,8 @@ function reactConsoleErrorHandler(...args) {
|
|
|
242
242
|
if (__DEV__) {
|
|
243
243
|
// If we're not reporting to the console in reportException,
|
|
244
244
|
// we need to report it as a console.error here.
|
|
245
|
+
/* $FlowFixMe[constant-condition] Error discovered during Constant
|
|
246
|
+
* Condition roll out. See https://fburl.com/workplace/1v97vimq. */
|
|
245
247
|
if (!reportToConsole) {
|
|
246
248
|
require('../LogBox/LogBox').default.addConsoleLog('error', ...args);
|
|
247
249
|
}
|
|
@@ -257,7 +259,7 @@ function reactConsoleErrorHandler(...args) {
|
|
|
257
259
|
reportException(
|
|
258
260
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for this
|
|
259
261
|
* parameters */
|
|
260
|
-
// $FlowFixMe[incompatible-
|
|
262
|
+
// $FlowFixMe[incompatible-type]
|
|
261
263
|
error,
|
|
262
264
|
isFatal,
|
|
263
265
|
reportToConsole,
|
|
@@ -32,17 +32,17 @@ const ReactFiberErrorDialog = {
|
|
|
32
32
|
if (errorValue instanceof Error) {
|
|
33
33
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
34
34
|
* this parameters */
|
|
35
|
-
// $FlowFixMe[incompatible-
|
|
35
|
+
// $FlowFixMe[incompatible-type]
|
|
36
36
|
error = (errorValue: ExtendedError);
|
|
37
37
|
} else if (typeof errorValue === 'string') {
|
|
38
38
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
39
39
|
* this parameters */
|
|
40
|
-
// $FlowFixMe[incompatible-
|
|
40
|
+
// $FlowFixMe[incompatible-type]
|
|
41
41
|
error = (new SyntheticError(errorValue): ExtendedError);
|
|
42
42
|
} else {
|
|
43
43
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
44
44
|
* this parameters */
|
|
45
|
-
// $FlowFixMe[incompatible-
|
|
45
|
+
// $FlowFixMe[incompatible-type]
|
|
46
46
|
error = (new SyntheticError('Unspecified error'): ExtendedError);
|
|
47
47
|
}
|
|
48
48
|
try {
|
|
@@ -9,14 +9,41 @@
|
|
|
9
9
|
* @generated by scripts/releases/set-version.js
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Object containing the current React Native version.
|
|
14
|
+
*
|
|
15
|
+
* Specifically, this is the source of truth for the resolved `react-native`
|
|
16
|
+
* package in the JavaScript bundle. Apps and libraries can use this to
|
|
17
|
+
* determine compatibility or enable version-specific features.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```js
|
|
21
|
+
* // Get the full version string
|
|
22
|
+
* const version = ReactNativeVersion.getVersionString();
|
|
23
|
+
*
|
|
24
|
+
* // Access individual version components
|
|
25
|
+
* const major = ReactNativeVersion.major;
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export default class ReactNativeVersion {
|
|
29
|
+
static major: number = 0;
|
|
30
|
+
static minor: number = 82;
|
|
31
|
+
static patch: number = 1;
|
|
32
|
+
static prerelease: string | null = null;
|
|
33
|
+
|
|
34
|
+
static getVersionString(): string {
|
|
35
|
+
return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated Compatibility export — please import `ReactNativeVersion` from
|
|
41
|
+
* `react-native`.
|
|
42
|
+
* See https://github.com/react-native-community/discussions-and-proposals/pull/894.
|
|
43
|
+
*/
|
|
44
|
+
export const version = {
|
|
45
|
+
major: ReactNativeVersion.major,
|
|
46
|
+
minor: ReactNativeVersion.minor,
|
|
47
|
+
patch: ReactNativeVersion.patch,
|
|
48
|
+
prerelease: ReactNativeVersion.prerelease,
|
|
22
49
|
};
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @flow
|
|
8
8
|
* @format
|
|
9
|
+
* @deprecated
|
|
9
10
|
*/
|
|
10
11
|
|
|
11
12
|
import NativeTiming from './NativeTiming';
|
|
@@ -473,12 +474,14 @@ let ExportedJSTimers: {
|
|
|
473
474
|
|
|
474
475
|
if (!NativeTiming) {
|
|
475
476
|
console.warn("Timing native module is not available, can't set timers.");
|
|
476
|
-
// $FlowFixMe[
|
|
477
|
+
// $FlowFixMe[incompatible-type] : we can assume timers are generally available
|
|
477
478
|
ExportedJSTimers = ({
|
|
478
479
|
callReactNativeMicrotasks: JSTimers.callReactNativeMicrotasks,
|
|
479
480
|
queueReactNativeMicrotask: JSTimers.queueReactNativeMicrotask,
|
|
481
|
+
// $FlowFixMe[incompatible-variance]
|
|
480
482
|
}: typeof JSTimers);
|
|
481
483
|
} else {
|
|
484
|
+
// $FlowFixMe[incompatible-variance]
|
|
482
485
|
ExportedJSTimers = JSTimers;
|
|
483
486
|
}
|
|
484
487
|
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @flow
|
|
8
8
|
* @format
|
|
9
|
+
* @deprecated
|
|
9
10
|
*/
|
|
10
11
|
|
|
11
12
|
'use strict';
|
|
@@ -40,7 +41,7 @@ export function setImmediate(callback: Function, ...args: any): number {
|
|
|
40
41
|
clearedImmediates.delete(id);
|
|
41
42
|
}
|
|
42
43
|
|
|
43
|
-
// $FlowFixMe[incompatible-
|
|
44
|
+
// $FlowFixMe[incompatible-type]
|
|
44
45
|
global.queueMicrotask(() => {
|
|
45
46
|
if (!clearedImmediates.has(id)) {
|
|
46
47
|
callback.apply(undefined, args);
|
|
@@ -30,6 +30,7 @@ export default function queueMicrotask(callback: Function) {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
// Try to reuse a lazily allocated resolved promise from closure.
|
|
33
|
+
// $FlowFixMe[constant-condition]
|
|
33
34
|
(resolvedPromise || (resolvedPromise = Promise.resolve()))
|
|
34
35
|
.then(callback)
|
|
35
36
|
.catch(error =>
|
|
@@ -4,18 +4,17 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @flow strict
|
|
7
|
+
* @flow strict-local
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import
|
|
11
|
+
import setUpPerformanceModern from '../../src/private/setup/setUpPerformanceModern';
|
|
12
12
|
import NativePerformance from '../../src/private/webapis/performance/specs/NativePerformance';
|
|
13
13
|
|
|
14
14
|
// In case if the native implementation of the Performance API is available, use it,
|
|
15
15
|
// otherwise fall back to the legacy/default one, which only defines 'Performance.now()'
|
|
16
16
|
if (NativePerformance) {
|
|
17
|
-
|
|
18
|
-
global.performance = new Performance();
|
|
17
|
+
setUpPerformanceModern();
|
|
19
18
|
} else {
|
|
20
19
|
if (!global.performance) {
|
|
21
20
|
// $FlowExpectedError[cannot-write]
|
|
@@ -98,13 +98,13 @@ class DebuggingOverlayRegistry {
|
|
|
98
98
|
// `canonical.publicInstance` => Fabric
|
|
99
99
|
// $FlowExpectedError[prop-missing]
|
|
100
100
|
if (instanceHandle.canonical?.publicInstance != null) {
|
|
101
|
-
// $FlowExpectedError[incompatible-
|
|
101
|
+
// $FlowExpectedError[incompatible-type]
|
|
102
102
|
return instanceHandle.canonical?.publicInstance;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
// `canonical` => Legacy Fabric
|
|
106
106
|
if (instanceHandle.canonical != null) {
|
|
107
|
-
// $FlowFixMe[incompatible-
|
|
107
|
+
// $FlowFixMe[incompatible-type]
|
|
108
108
|
return instanceHandle.canonical;
|
|
109
109
|
}
|
|
110
110
|
|
|
@@ -124,6 +124,8 @@ class DebuggingOverlayRegistry {
|
|
|
124
124
|
let iterator: ?ReadOnlyElement = instance;
|
|
125
125
|
while (iterator != null) {
|
|
126
126
|
for (const subscriber of this.#registry) {
|
|
127
|
+
/* $FlowFixMe[invalid-compare] Error discovered during Constant
|
|
128
|
+
* Condition roll out. See https://fburl.com/workplace/4oq3zi07. */
|
|
127
129
|
if (subscriber.rootViewRef.current === iterator) {
|
|
128
130
|
return subscriber;
|
|
129
131
|
}
|
|
@@ -182,7 +184,7 @@ class DebuggingOverlayRegistry {
|
|
|
182
184
|
|
|
183
185
|
if (
|
|
184
186
|
isChildPublicInstance(
|
|
185
|
-
// $FlowFixMe[incompatible-
|
|
187
|
+
// $FlowFixMe[incompatible-type] There is a lot of stuff to untangle to make types for refs work.
|
|
186
188
|
potentialParent.rootViewRef.current,
|
|
187
189
|
// $FlowFixMe[incompatible-call] There is a lot of stuff to untangle to make types for refs work.
|
|
188
190
|
potentialChild.rootViewRef.current,
|