react-native-windows 0.82.0-preview.1 → 0.82.0-preview.11
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/Libraries/Animated/nodes/AnimatedValue.js +0 -8
- package/Libraries/BatchedBridge/BatchedBridge.js +1 -0
- package/Libraries/BatchedBridge/MessageQueue.js +1 -0
- package/Libraries/Components/Switch/Switch.js +1 -1
- package/Libraries/Components/Switch/Switch.windows.js +1 -1
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Core/Timers/JSTimers.js +1 -0
- package/Libraries/Core/Timers/NativeTiming.js +1 -0
- package/Libraries/Core/Timers/immediateShim.js +1 -0
- package/Libraries/Core/setUpPerformance.js +3 -5
- package/Libraries/Interaction/PanResponder.js +6 -51
- package/Microsoft.ReactNative/ComponentView.idl +2 -0
- package/Microsoft.ReactNative/Composition.Input.idl +7 -0
- package/Microsoft.ReactNative/CompositionComponentView.idl +3 -0
- package/Microsoft.ReactNative/Fabric/ComponentView.cpp +18 -0
- package/Microsoft.ReactNative/Fabric/ComponentView.h +9 -0
- package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.cpp +12 -0
- package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.h +15 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +75 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +1 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +84 -17
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +4 -0
- package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp +56 -82
- package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h +7 -4
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +82 -14
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.h +11 -4
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +33 -0
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +17 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +59 -31
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +3 -0
- package/Microsoft.ReactNative/Modules/ImageViewManagerModule.cpp +42 -15
- package/Microsoft.ReactNative.Cxx/ReactCommon/react/timing/primitives.h +12 -0
- package/PropertySheets/Generated/PackageVersion.g.props +2 -2
- package/PropertySheets/Warnings.props +1 -2
- package/PropertySheets/WinUI.props +1 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/text/BaseParagraphProps.cpp +174 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/text/BaseParagraphProps.h +69 -0
- package/Scripts/NuGetRestoreForceEvaluateAllSolutions.ps1 +5 -11
- package/Scripts/rnw-dependencies.ps1 +15 -1
- package/Shared/Shared.vcxitems +1 -0
- package/Shared/Shared.vcxitems.filters +1 -3
- package/codegen/NativePerformanceSpec.g.h +41 -35
- package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +55 -49
- package/codegen/rnwcoreJSI-generated.cpp +434 -422
- package/codegen/rnwcoreJSI.h +18 -0
- package/index.js +6 -0
- package/index.windows.js +6 -0
- package/package.json +15 -14
- package/src/private/featureflags/ReactNativeFeatureFlags.js +6 -1
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +2 -1
- package/src/private/setup/{setUpPerformanceObserver.js → setUpPerformanceModern.js} +43 -18
- package/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js +1 -0
- package/src/private/specs_DEPRECATED/modules/NativeTiming.js +1 -0
- package/src/private/webapis/performance/EventTiming.js +34 -15
- package/src/private/webapis/performance/LongTasks.js +35 -2
- package/src/private/webapis/performance/Performance.js +49 -13
- package/src/private/webapis/performance/PerformanceEntry.js +21 -8
- package/src/private/webapis/performance/PerformanceObserver.js +30 -1
- 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 +33 -28
- package/src/private/webapis/performance/internals/RawPerformanceEntry.js +3 -4
- package/src/private/webapis/performance/specs/NativePerformance.js +2 -0
|
@@ -16,9 +16,7 @@ type ReactNativeStartupTimingLike = {
|
|
|
16
16
|
startTime: ?number,
|
|
17
17
|
endTime: ?number,
|
|
18
18
|
initializeRuntimeStart: ?number,
|
|
19
|
-
initializeRuntimeEnd: ?number,
|
|
20
19
|
executeJavaScriptBundleEntryPointStart: ?number,
|
|
21
|
-
executeJavaScriptBundleEntryPointEnd: ?number,
|
|
22
20
|
};
|
|
23
21
|
|
|
24
22
|
// Read-only object with RN startup timing information.
|
|
@@ -29,22 +27,17 @@ export default class ReactNativeStartupTiming {
|
|
|
29
27
|
// 1. The `ReactNativeStartupTiming` is non-standard API
|
|
30
28
|
// 2. The timing information is relative to the time origin, which means `0` has valid meaning
|
|
31
29
|
#startTime: ?number;
|
|
32
|
-
#endTime: ?number;
|
|
33
30
|
#initializeRuntimeStart: ?number;
|
|
34
|
-
#initializeRuntimeEnd: ?number;
|
|
35
31
|
#executeJavaScriptBundleEntryPointStart: ?number;
|
|
36
|
-
#
|
|
32
|
+
#endTime: ?number;
|
|
37
33
|
|
|
38
34
|
constructor(startUpTiming: ?ReactNativeStartupTimingLike) {
|
|
39
35
|
if (startUpTiming != null) {
|
|
40
36
|
this.#startTime = startUpTiming.startTime;
|
|
41
|
-
this.#endTime = startUpTiming.endTime;
|
|
42
37
|
this.#initializeRuntimeStart = startUpTiming.initializeRuntimeStart;
|
|
43
|
-
this.#initializeRuntimeEnd = startUpTiming.initializeRuntimeEnd;
|
|
44
38
|
this.#executeJavaScriptBundleEntryPointStart =
|
|
45
39
|
startUpTiming.executeJavaScriptBundleEntryPointStart;
|
|
46
|
-
this.#
|
|
47
|
-
startUpTiming.executeJavaScriptBundleEntryPointEnd;
|
|
40
|
+
this.#endTime = startUpTiming.endTime;
|
|
48
41
|
}
|
|
49
42
|
}
|
|
50
43
|
|
|
@@ -56,7 +49,7 @@ export default class ReactNativeStartupTiming {
|
|
|
56
49
|
}
|
|
57
50
|
|
|
58
51
|
/**
|
|
59
|
-
* End time of the RN app startup process.
|
|
52
|
+
* End time of the RN app startup process.
|
|
60
53
|
*/
|
|
61
54
|
get endTime(): ?number {
|
|
62
55
|
return this.#endTime;
|
|
@@ -69,26 +62,12 @@ export default class ReactNativeStartupTiming {
|
|
|
69
62
|
return this.#initializeRuntimeStart;
|
|
70
63
|
}
|
|
71
64
|
|
|
72
|
-
/**
|
|
73
|
-
* End time when RN runtime get initialized. This is the last marker before ends of the app startup process.
|
|
74
|
-
*/
|
|
75
|
-
get initializeRuntimeEnd(): ?number {
|
|
76
|
-
return this.#initializeRuntimeEnd;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
65
|
/**
|
|
80
66
|
* Start time of JS bundle being executed. This indicates the RN JS bundle is loaded and start to be evaluated.
|
|
81
67
|
*/
|
|
82
68
|
get executeJavaScriptBundleEntryPointStart(): ?number {
|
|
83
69
|
return this.#executeJavaScriptBundleEntryPointStart;
|
|
84
70
|
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* End time of JS bundle being executed. This indicates all the synchronous entry point jobs are finished.
|
|
88
|
-
*/
|
|
89
|
-
get executeJavaScriptBundleEntryPointEnd(): ?number {
|
|
90
|
-
return this.#executeJavaScriptBundleEntryPointEnd;
|
|
91
|
-
}
|
|
92
71
|
}
|
|
93
72
|
|
|
94
73
|
setPlatformObject(ReactNativeStartupTiming);
|
|
@@ -29,6 +29,19 @@ export type PerformanceResourceTimingJSON = {
|
|
|
29
29
|
...
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
+
export interface PerformanceResourceTimingInit {
|
|
33
|
+
+name: string;
|
|
34
|
+
+startTime: DOMHighResTimeStamp;
|
|
35
|
+
+duration: DOMHighResTimeStamp;
|
|
36
|
+
+fetchStart: DOMHighResTimeStamp;
|
|
37
|
+
+requestStart: DOMHighResTimeStamp;
|
|
38
|
+
+connectStart: DOMHighResTimeStamp;
|
|
39
|
+
+connectEnd: DOMHighResTimeStamp;
|
|
40
|
+
+responseStart: DOMHighResTimeStamp;
|
|
41
|
+
+responseEnd: DOMHighResTimeStamp;
|
|
42
|
+
+responseStatus?: number;
|
|
43
|
+
}
|
|
44
|
+
|
|
32
45
|
export class PerformanceResourceTiming extends PerformanceEntry {
|
|
33
46
|
#fetchStart: DOMHighResTimeStamp;
|
|
34
47
|
#requestStart: DOMHighResTimeStamp;
|
|
@@ -38,24 +51,9 @@ export class PerformanceResourceTiming extends PerformanceEntry {
|
|
|
38
51
|
#responseEnd: DOMHighResTimeStamp;
|
|
39
52
|
#responseStatus: ?number;
|
|
40
53
|
|
|
41
|
-
constructor(init: {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
duration: DOMHighResTimeStamp,
|
|
45
|
-
fetchStart: DOMHighResTimeStamp,
|
|
46
|
-
requestStart: DOMHighResTimeStamp,
|
|
47
|
-
connectStart: DOMHighResTimeStamp,
|
|
48
|
-
connectEnd: DOMHighResTimeStamp,
|
|
49
|
-
responseStart: DOMHighResTimeStamp,
|
|
50
|
-
responseEnd: DOMHighResTimeStamp,
|
|
51
|
-
responseStatus?: number,
|
|
52
|
-
}) {
|
|
53
|
-
super({
|
|
54
|
-
name: init.name,
|
|
55
|
-
entryType: 'resource',
|
|
56
|
-
startTime: init.startTime,
|
|
57
|
-
duration: init.duration,
|
|
58
|
-
});
|
|
54
|
+
constructor(init: PerformanceResourceTimingInit) {
|
|
55
|
+
super('resource', init);
|
|
56
|
+
|
|
59
57
|
this.#fetchStart = init.fetchStart;
|
|
60
58
|
this.#requestStart = init.requestStart;
|
|
61
59
|
this.#connectStart = init.connectStart;
|
|
@@ -106,3 +104,16 @@ export class PerformanceResourceTiming extends PerformanceEntry {
|
|
|
106
104
|
};
|
|
107
105
|
}
|
|
108
106
|
}
|
|
107
|
+
|
|
108
|
+
export const PerformanceResourceTiming_public: typeof PerformanceResourceTiming =
|
|
109
|
+
/* eslint-disable no-shadow */
|
|
110
|
+
// $FlowExpectedError[incompatible-type]
|
|
111
|
+
function PerformanceResourceTiming() {
|
|
112
|
+
throw new TypeError(
|
|
113
|
+
"Failed to construct 'PerformanceResourceTiming': Illegal constructor",
|
|
114
|
+
);
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
// $FlowExpectedError[prop-missing]
|
|
118
|
+
PerformanceResourceTiming_public.prototype =
|
|
119
|
+
PerformanceResourceTiming.prototype;
|
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
// flowlint unsafe-getters-setters:off
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
import type {
|
|
13
|
+
DOMHighResTimeStamp,
|
|
14
|
+
PerformanceEntryInit,
|
|
15
|
+
} from './PerformanceEntry';
|
|
14
16
|
import type {
|
|
15
17
|
ExtensionMarkerPayload,
|
|
16
18
|
ExtensionTrackEntryPayload,
|
|
@@ -25,18 +27,16 @@ export type DetailType =
|
|
|
25
27
|
// but we'll use it as documentation for how to use the extensibility API.
|
|
26
28
|
| {devtools?: ExtensionMarkerPayload | ExtensionTrackEntryPayload, ...};
|
|
27
29
|
|
|
28
|
-
export
|
|
29
|
-
detail?: DetailType
|
|
30
|
-
startTime?: DOMHighResTimeStamp
|
|
31
|
-
}
|
|
30
|
+
export interface PerformanceMarkOptions {
|
|
31
|
+
+detail?: DetailType;
|
|
32
|
+
+startTime?: DOMHighResTimeStamp;
|
|
33
|
+
}
|
|
32
34
|
|
|
33
35
|
export type TimeStampOrName = DOMHighResTimeStamp | string;
|
|
34
36
|
|
|
35
|
-
export
|
|
36
|
-
detail?: DetailType
|
|
37
|
-
|
|
38
|
-
duration: DOMHighResTimeStamp,
|
|
39
|
-
}>;
|
|
37
|
+
export interface PerformanceMeasureInit extends PerformanceEntryInit {
|
|
38
|
+
+detail?: DetailType;
|
|
39
|
+
}
|
|
40
40
|
|
|
41
41
|
class PerformanceMarkTemplate extends PerformanceEntry {
|
|
42
42
|
// We don't use private fields because they're significantly slower to
|
|
@@ -45,9 +45,8 @@ class PerformanceMarkTemplate extends PerformanceEntry {
|
|
|
45
45
|
|
|
46
46
|
// This constructor isn't really used. See `PerformanceMark` below.
|
|
47
47
|
constructor(markName: string, markOptions?: PerformanceMarkOptions) {
|
|
48
|
-
super({
|
|
48
|
+
super('mark', {
|
|
49
49
|
name: markName,
|
|
50
|
-
entryType: 'mark',
|
|
51
50
|
startTime: markOptions?.startTime ?? getCurrentTimeStamp(),
|
|
52
51
|
duration: 0,
|
|
53
52
|
});
|
|
@@ -72,8 +71,8 @@ export const PerformanceMark: typeof PerformanceMarkTemplate =
|
|
|
72
71
|
markName: string,
|
|
73
72
|
markOptions?: PerformanceMarkOptions,
|
|
74
73
|
) {
|
|
75
|
-
this.__name = markName;
|
|
76
74
|
this.__entryType = 'mark';
|
|
75
|
+
this.__name = markName;
|
|
77
76
|
this.__startTime = markOptions?.startTime ?? getCurrentTimeStamp();
|
|
78
77
|
this.__duration = 0;
|
|
79
78
|
|
|
@@ -89,15 +88,10 @@ class PerformanceMeasureTemplate extends PerformanceEntry {
|
|
|
89
88
|
__detail: DetailType;
|
|
90
89
|
|
|
91
90
|
// This constructor isn't really used. See `PerformanceMeasure` below.
|
|
92
|
-
constructor(
|
|
93
|
-
super(
|
|
94
|
-
name: measureName,
|
|
95
|
-
entryType: 'measure',
|
|
96
|
-
startTime: measureOptions.startTime,
|
|
97
|
-
duration: measureOptions.duration,
|
|
98
|
-
});
|
|
91
|
+
constructor(init: PerformanceMeasureInit) {
|
|
92
|
+
super('measure', init);
|
|
99
93
|
|
|
100
|
-
this.__detail =
|
|
94
|
+
this.__detail = init?.detail ?? null;
|
|
101
95
|
}
|
|
102
96
|
|
|
103
97
|
get detail(): DetailType {
|
|
@@ -110,16 +104,27 @@ export const PerformanceMeasure: typeof PerformanceMeasureTemplate =
|
|
|
110
104
|
// $FlowExpectedError[incompatible-type]
|
|
111
105
|
function PerformanceMeasure(
|
|
112
106
|
this: PerformanceMeasureTemplate,
|
|
113
|
-
|
|
114
|
-
measureOptions: PerformanceMeasureInit,
|
|
107
|
+
init: PerformanceMeasureInit,
|
|
115
108
|
) {
|
|
116
|
-
this.__name = measureName;
|
|
117
109
|
this.__entryType = 'measure';
|
|
118
|
-
this.
|
|
119
|
-
this.
|
|
110
|
+
this.__name = init.name;
|
|
111
|
+
this.__startTime = init.startTime;
|
|
112
|
+
this.__duration = init.duration;
|
|
120
113
|
|
|
121
|
-
this.__detail =
|
|
114
|
+
this.__detail = init.detail ?? null;
|
|
122
115
|
};
|
|
123
116
|
|
|
124
117
|
// $FlowExpectedError[prop-missing]
|
|
125
118
|
PerformanceMeasure.prototype = PerformanceMeasureTemplate.prototype;
|
|
119
|
+
|
|
120
|
+
export const PerformanceMeasure_public: typeof PerformanceMeasure =
|
|
121
|
+
/* eslint-disable no-shadow */
|
|
122
|
+
// $FlowExpectedError[incompatible-type]
|
|
123
|
+
function PerformanceMeasure() {
|
|
124
|
+
throw new TypeError(
|
|
125
|
+
"Failed to construct 'PerformanceMeasure': Illegal constructor",
|
|
126
|
+
);
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
// $FlowExpectedError[prop-missing]
|
|
130
|
+
PerformanceMeasure_public.prototype = PerformanceMeasure.prototype;
|
|
@@ -44,7 +44,6 @@ export function rawToPerformanceEntry(
|
|
|
44
44
|
case RawPerformanceEntryTypeValues.LONGTASK:
|
|
45
45
|
return new PerformanceLongTaskTiming({
|
|
46
46
|
name: entry.name,
|
|
47
|
-
entryType: rawToPerformanceEntryType(entry.entryType),
|
|
48
47
|
startTime: entry.startTime,
|
|
49
48
|
duration: entry.duration,
|
|
50
49
|
});
|
|
@@ -53,7 +52,8 @@ export function rawToPerformanceEntry(
|
|
|
53
52
|
startTime: entry.startTime,
|
|
54
53
|
});
|
|
55
54
|
case RawPerformanceEntryTypeValues.MEASURE:
|
|
56
|
-
return new PerformanceMeasure(
|
|
55
|
+
return new PerformanceMeasure({
|
|
56
|
+
name: entry.name,
|
|
57
57
|
startTime: entry.startTime,
|
|
58
58
|
duration: entry.duration,
|
|
59
59
|
});
|
|
@@ -71,9 +71,8 @@ export function rawToPerformanceEntry(
|
|
|
71
71
|
responseStatus: entry.responseStatus,
|
|
72
72
|
});
|
|
73
73
|
default:
|
|
74
|
-
return new PerformanceEntry({
|
|
74
|
+
return new PerformanceEntry(rawToPerformanceEntryType(entry.entryType), {
|
|
75
75
|
name: entry.name,
|
|
76
|
-
entryType: rawToPerformanceEntryType(entry.entryType),
|
|
77
76
|
startTime: entry.startTime,
|
|
78
77
|
duration: entry.duration,
|
|
79
78
|
});
|