@office-iss/react-native-win32 0.0.0-canary.271 → 0.0.0-canary.273
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 +1 -1
- package/CHANGELOG.json +31 -1
- package/CHANGELOG.md +20 -4
- package/Libraries/Animated/AnimatedEvent.js +1 -1
- package/Libraries/Animated/animations/Animation.js +1 -1
- package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +1 -1
- package/Libraries/Animated/nodes/AnimatedProps.js +1 -1
- package/Libraries/Animated/nodes/AnimatedTransform.js +1 -1
- package/Libraries/Animated/nodes/AnimatedValue.js +1 -1
- package/Libraries/Animated/useAnimatedProps.js +3 -3
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +4 -4
- package/Libraries/Components/Button.js +3 -0
- package/Libraries/Components/Button.win32.js +3 -0
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +5 -0
- package/Libraries/Components/Pressable/Pressable.js +4 -4
- package/Libraries/Components/Pressable/Pressable.win32.js +4 -4
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js +9 -6
- package/Libraries/Components/SafeAreaView/SafeAreaView.js +4 -4
- package/Libraries/Components/SafeAreaView/SafeAreaView.win32.js +4 -4
- package/Libraries/Components/ScrollView/ScrollView.js +5 -5
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +6 -6
- package/Libraries/Components/TextInput/TextInput.d.ts +4 -0
- package/Libraries/Components/TextInput/TextInput.flow.js +2 -0
- package/Libraries/Components/TextInput/TextInput.js +6 -4
- package/Libraries/Components/TextInput/TextInput.win32.js +6 -4
- package/Libraries/Components/Touchable/TouchableBounce.js +4 -1
- package/Libraries/Components/Touchable/TouchableHighlight.js +4 -4
- package/Libraries/Components/Touchable/TouchableOpacity.js +4 -4
- package/Libraries/Components/View/View.js +4 -4
- package/Libraries/Components/View/View.win32.js +4 -4
- package/Libraries/Components/View/ViewNativeComponent.js +3 -88
- package/Libraries/Core/ExceptionsManager.js +3 -2
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/setUpReactDevTools.js +74 -1
- package/Libraries/Core/setUpTimers.js +21 -10
- package/Libraries/Debugging/DebuggingOverlay.js +4 -5
- package/Libraries/Image/Image.android.js +1 -3
- package/Libraries/Image/Image.ios.js +0 -2
- package/Libraries/Image/Image.win32.js +0 -2
- package/Libraries/Image/ImageProps.js +4 -4
- package/Libraries/Image/ImageTypes.flow.js +11 -9
- package/Libraries/Inspector/Inspector.js +1 -0
- package/Libraries/Inspector/Inspector.win32.js +1 -0
- package/Libraries/LogBox/LogBox.js +18 -5
- package/Libraries/LogBox/LogBoxNotificationContainer.js +1 -1
- package/Libraries/Modal/Modal.js +3 -0
- package/Libraries/NativeComponent/BaseViewConfig.android.js +65 -0
- package/Libraries/ReactNative/AppRegistry.js +1 -1
- package/Libraries/Renderer/shims/ReactNativeTypes.js +1 -9
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
- package/Libraries/StyleSheet/StyleSheetTypes.js +1 -1
- package/Libraries/Text/Text.js +1 -4
- package/Libraries/Text/Text.win32.js +1 -4
- package/Libraries/Utilities/FocusManager.win32.js +1 -1
- package/Libraries/Utilities/Platform.flow.win32.js +1 -0
- package/Libraries/Utilities/useMergeRefs.js +26 -7
- package/Libraries/promiseRejectionTrackingOptions.js +1 -1
- package/index.js +1 -1
- package/index.win32.js +1 -1
- package/jest/setup.js +1 -0
- package/overrides.json +13 -14
- package/package.json +14 -14
- package/src/private/animated/NativeAnimatedHelper.js +4 -4
- package/src/private/animated/NativeAnimatedHelper.win32.js +4 -4
- package/src/private/animated/useAnimatedPropsMemo.js +0 -1
- package/src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE.js +2 -1
- package/src/private/components/VScrollViewNativeComponents.js +4 -5
- package/src/private/featureflags/ReactNativeFeatureFlags.js +12 -12
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +3 -3
- package/src/private/fusebox/specs/NativeReactDevToolsRuntimeSettingsModule.js +34 -0
- package/src/private/specs/modules/NativeAppearance.js +4 -10
- package/src/private/webapis/performance/EventTiming.js +1 -1
- package/src/private/webapis/performance/Performance.js +36 -15
- package/src/private/webapis/performance/PerformanceObserver.js +2 -2
- package/src/private/webapis/performance/specs/NativePerformance.js +18 -2
- package/src/private/webapis/performance/specs/__mocks__/NativePerformanceMock.js +32 -12
|
@@ -33,6 +33,8 @@ export type RawPerformanceEntry = {
|
|
|
33
33
|
export type OpaqueNativeObserverHandle = mixed;
|
|
34
34
|
|
|
35
35
|
export type NativeBatchedObserverCallback = () => void;
|
|
36
|
+
export type NativePerformanceMarkResult = number;
|
|
37
|
+
export type NativePerformanceMeasureResult = $ReadOnlyArray<number>; // [startTime, duration]
|
|
36
38
|
|
|
37
39
|
export type PerformanceObserverInit = {
|
|
38
40
|
entryTypes?: $ReadOnlyArray<number>,
|
|
@@ -43,8 +45,10 @@ export type PerformanceObserverInit = {
|
|
|
43
45
|
|
|
44
46
|
export interface Spec extends TurboModule {
|
|
45
47
|
+now?: () => number;
|
|
46
|
-
|
|
47
|
-
+
|
|
48
|
+
// TODO: remove when `markWithResult` is fully rolled out.
|
|
49
|
+
+mark?: (name: string, startTime: number) => void;
|
|
50
|
+
// TODO: remove when `measureWithResult` is fully rolled out.
|
|
51
|
+
+measure?: (
|
|
48
52
|
name: string,
|
|
49
53
|
startTime: number,
|
|
50
54
|
endTime: number,
|
|
@@ -52,6 +56,18 @@ export interface Spec extends TurboModule {
|
|
|
52
56
|
startMark?: string,
|
|
53
57
|
endMark?: string,
|
|
54
58
|
) => void;
|
|
59
|
+
+markWithResult?: (
|
|
60
|
+
name: string,
|
|
61
|
+
startTime?: number,
|
|
62
|
+
) => NativePerformanceMarkResult;
|
|
63
|
+
+measureWithResult?: (
|
|
64
|
+
name: string,
|
|
65
|
+
startTime: number,
|
|
66
|
+
endTime: number,
|
|
67
|
+
duration?: number,
|
|
68
|
+
startMark?: string,
|
|
69
|
+
endMark?: string,
|
|
70
|
+
) => NativePerformanceMeasureResult;
|
|
55
71
|
+clearMarks?: (entryName?: string) => void;
|
|
56
72
|
+clearMeasures?: (entryName?: string) => void;
|
|
57
73
|
+getEntries?: () => $ReadOnlyArray<RawPerformanceEntry>;
|
|
@@ -11,13 +11,14 @@
|
|
|
11
11
|
import type {
|
|
12
12
|
NativeBatchedObserverCallback,
|
|
13
13
|
NativeMemoryInfo,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
PerformanceObserverInit,
|
|
14
|
+
NativePerformanceMarkResult,
|
|
15
|
+
NativePerformanceMeasureResult,
|
|
17
16
|
OpaqueNativeObserverHandle,
|
|
17
|
+
PerformanceObserverInit,
|
|
18
|
+
RawPerformanceEntry,
|
|
18
19
|
RawPerformanceEntryType,
|
|
20
|
+
ReactNativeStartupTiming,
|
|
19
21
|
} from '../NativePerformance';
|
|
20
|
-
|
|
21
22
|
import typeof NativePerformance from '../NativePerformance';
|
|
22
23
|
|
|
23
24
|
import {RawPerformanceEntryTypeValues} from '../../RawPerformanceEntry';
|
|
@@ -109,32 +110,51 @@ const NativePerformanceMock = {
|
|
|
109
110
|
|
|
110
111
|
now: (): number => currentTime,
|
|
111
112
|
|
|
112
|
-
|
|
113
|
-
|
|
113
|
+
markWithResult: (
|
|
114
|
+
name: string,
|
|
115
|
+
startTime?: number,
|
|
116
|
+
): NativePerformanceMarkResult => {
|
|
117
|
+
const computedStartTime = startTime ?? performance.now();
|
|
118
|
+
|
|
119
|
+
marks.set(name, computedStartTime);
|
|
114
120
|
reportEntry({
|
|
115
121
|
entryType: RawPerformanceEntryTypeValues.MARK,
|
|
116
122
|
name,
|
|
117
|
-
startTime,
|
|
123
|
+
startTime: computedStartTime,
|
|
118
124
|
duration: 0,
|
|
119
125
|
});
|
|
126
|
+
|
|
127
|
+
return computedStartTime;
|
|
120
128
|
},
|
|
121
129
|
|
|
122
|
-
|
|
130
|
+
measureWithResult: (
|
|
123
131
|
name: string,
|
|
124
132
|
startTime: number,
|
|
125
133
|
endTime: number,
|
|
126
134
|
duration?: number,
|
|
127
135
|
startMark?: string,
|
|
128
136
|
endMark?: string,
|
|
129
|
-
):
|
|
130
|
-
const start = startMark != null ? marks.get(startMark)
|
|
131
|
-
const end = endMark != null ? marks.get(endMark)
|
|
137
|
+
): NativePerformanceMeasureResult => {
|
|
138
|
+
const start = startMark != null ? marks.get(startMark) : startTime;
|
|
139
|
+
const end = endMark != null ? marks.get(endMark) : endTime;
|
|
140
|
+
|
|
141
|
+
if (start === undefined) {
|
|
142
|
+
throw new Error('startMark does not exist');
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if (end === undefined) {
|
|
146
|
+
throw new Error('endMark does not exist');
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const computedDuration = duration ?? end - start;
|
|
132
150
|
reportEntry({
|
|
133
151
|
entryType: RawPerformanceEntryTypeValues.MEASURE,
|
|
134
152
|
name,
|
|
135
153
|
startTime: start,
|
|
136
|
-
duration:
|
|
154
|
+
duration: computedDuration,
|
|
137
155
|
});
|
|
156
|
+
|
|
157
|
+
return [start, computedDuration];
|
|
138
158
|
},
|
|
139
159
|
|
|
140
160
|
getSimpleMemoryInfo: (): NativeMemoryInfo => {
|