react-native-windows 0.82.0-preview.1 → 0.82.0-preview.10
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/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/ContentIslandComponentView.cpp +6 -67
- package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h +0 -4
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +82 -14
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.h +11 -4
- 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/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/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
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#include "BaseParagraphProps.h"
|
|
9
|
+
|
|
10
|
+
#include <react/featureflags/ReactNativeFeatureFlags.h>
|
|
11
|
+
#include <react/renderer/attributedstring/conversions.h>
|
|
12
|
+
#include <react/renderer/attributedstring/primitives.h>
|
|
13
|
+
#include <react/renderer/core/propsConversions.h>
|
|
14
|
+
#include <react/renderer/debug/debugStringConvertibleUtils.h>
|
|
15
|
+
|
|
16
|
+
#include <glog/logging.h>
|
|
17
|
+
|
|
18
|
+
namespace facebook::react {
|
|
19
|
+
|
|
20
|
+
BaseParagraphProps::BaseParagraphProps(
|
|
21
|
+
const PropsParserContext& context,
|
|
22
|
+
const BaseParagraphProps& sourceProps,
|
|
23
|
+
const RawProps& rawProps)
|
|
24
|
+
: ViewProps(context, sourceProps, rawProps),
|
|
25
|
+
BaseTextProps(context, sourceProps, rawProps),
|
|
26
|
+
paragraphAttributes(
|
|
27
|
+
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
|
28
|
+
? sourceProps.paragraphAttributes
|
|
29
|
+
: convertRawProp(
|
|
30
|
+
context,
|
|
31
|
+
rawProps,
|
|
32
|
+
sourceProps.paragraphAttributes,
|
|
33
|
+
{})),
|
|
34
|
+
isSelectable(
|
|
35
|
+
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
|
36
|
+
? sourceProps.isSelectable
|
|
37
|
+
: convertRawProp(
|
|
38
|
+
context,
|
|
39
|
+
rawProps,
|
|
40
|
+
"selectable",
|
|
41
|
+
sourceProps.isSelectable,
|
|
42
|
+
false)),
|
|
43
|
+
onTextLayout(
|
|
44
|
+
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
|
45
|
+
? sourceProps.onTextLayout
|
|
46
|
+
: convertRawProp(
|
|
47
|
+
context,
|
|
48
|
+
rawProps,
|
|
49
|
+
"onTextLayout",
|
|
50
|
+
sourceProps.onTextLayout,
|
|
51
|
+
{})),
|
|
52
|
+
// [Windows]
|
|
53
|
+
selectionColor(
|
|
54
|
+
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
|
55
|
+
? sourceProps.selectionColor
|
|
56
|
+
: convertRawProp(
|
|
57
|
+
context,
|
|
58
|
+
rawProps,
|
|
59
|
+
"selectionColor",
|
|
60
|
+
sourceProps.selectionColor,
|
|
61
|
+
{})) {
|
|
62
|
+
/*
|
|
63
|
+
* These props are applied to `View`, therefore they must not be a part of
|
|
64
|
+
* base text attributes.
|
|
65
|
+
*/
|
|
66
|
+
textAttributes.opacity = std::numeric_limits<Float>::quiet_NaN();
|
|
67
|
+
textAttributes.backgroundColor = {};
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
void BaseParagraphProps::setProp(
|
|
71
|
+
const PropsParserContext& context,
|
|
72
|
+
RawPropsPropNameHash hash,
|
|
73
|
+
const char* propName,
|
|
74
|
+
const RawValue& value) {
|
|
75
|
+
// All Props structs setProp methods must always, unconditionally,
|
|
76
|
+
// call all super::setProp methods, since multiple structs may
|
|
77
|
+
// reuse the same values.
|
|
78
|
+
ViewProps::setProp(context, hash, propName, value);
|
|
79
|
+
BaseTextProps::setProp(context, hash, propName, value);
|
|
80
|
+
|
|
81
|
+
static auto defaults = BaseParagraphProps{};
|
|
82
|
+
|
|
83
|
+
// ParagraphAttributes has its own switch statement - to keep all
|
|
84
|
+
// of these fields together, and because there are some collisions between
|
|
85
|
+
// propnames parsed here and outside of ParagraphAttributes.
|
|
86
|
+
// This code is also duplicated in AndroidTextInput.
|
|
87
|
+
static auto paDefaults = ParagraphAttributes{};
|
|
88
|
+
switch (hash) {
|
|
89
|
+
REBUILD_FIELD_SWITCH_CASE(
|
|
90
|
+
paDefaults,
|
|
91
|
+
value,
|
|
92
|
+
paragraphAttributes,
|
|
93
|
+
maximumNumberOfLines,
|
|
94
|
+
"numberOfLines");
|
|
95
|
+
REBUILD_FIELD_SWITCH_CASE(
|
|
96
|
+
paDefaults, value, paragraphAttributes, ellipsizeMode, "ellipsizeMode");
|
|
97
|
+
REBUILD_FIELD_SWITCH_CASE(
|
|
98
|
+
paDefaults,
|
|
99
|
+
value,
|
|
100
|
+
paragraphAttributes,
|
|
101
|
+
textBreakStrategy,
|
|
102
|
+
"textBreakStrategy");
|
|
103
|
+
REBUILD_FIELD_SWITCH_CASE(
|
|
104
|
+
paDefaults,
|
|
105
|
+
value,
|
|
106
|
+
paragraphAttributes,
|
|
107
|
+
adjustsFontSizeToFit,
|
|
108
|
+
"adjustsFontSizeToFit");
|
|
109
|
+
REBUILD_FIELD_SWITCH_CASE(
|
|
110
|
+
paDefaults,
|
|
111
|
+
value,
|
|
112
|
+
paragraphAttributes,
|
|
113
|
+
minimumFontScale,
|
|
114
|
+
"minimumFontScale");
|
|
115
|
+
REBUILD_FIELD_SWITCH_CASE(
|
|
116
|
+
paDefaults,
|
|
117
|
+
value,
|
|
118
|
+
paragraphAttributes,
|
|
119
|
+
minimumFontSize,
|
|
120
|
+
"minimumFontSize");
|
|
121
|
+
REBUILD_FIELD_SWITCH_CASE(
|
|
122
|
+
paDefaults,
|
|
123
|
+
value,
|
|
124
|
+
paragraphAttributes,
|
|
125
|
+
maximumFontSize,
|
|
126
|
+
"maximumFontSize");
|
|
127
|
+
REBUILD_FIELD_SWITCH_CASE(
|
|
128
|
+
paDefaults,
|
|
129
|
+
value,
|
|
130
|
+
paragraphAttributes,
|
|
131
|
+
includeFontPadding,
|
|
132
|
+
"includeFontPadding");
|
|
133
|
+
REBUILD_FIELD_SWITCH_CASE(
|
|
134
|
+
paDefaults,
|
|
135
|
+
value,
|
|
136
|
+
paragraphAttributes,
|
|
137
|
+
android_hyphenationFrequency,
|
|
138
|
+
"android_hyphenationFrequency");
|
|
139
|
+
REBUILD_FIELD_SWITCH_CASE(
|
|
140
|
+
paDefaults,
|
|
141
|
+
value,
|
|
142
|
+
paragraphAttributes,
|
|
143
|
+
textAlignVertical,
|
|
144
|
+
"textAlignVertical");
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
switch (hash) {
|
|
148
|
+
RAW_SET_PROP_SWITCH_CASE(isSelectable, "selectable");
|
|
149
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(onTextLayout);
|
|
150
|
+
// [Windows]
|
|
151
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(selectionColor);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/*
|
|
155
|
+
* These props are applied to `View`, therefore they must not be a part of
|
|
156
|
+
* base text attributes.
|
|
157
|
+
*/
|
|
158
|
+
textAttributes.opacity = std::numeric_limits<Float>::quiet_NaN();
|
|
159
|
+
textAttributes.backgroundColor = {};
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
#pragma mark - DebugStringConvertible
|
|
163
|
+
|
|
164
|
+
#if RN_DEBUG_STRING_CONVERTIBLE
|
|
165
|
+
SharedDebugStringConvertibleList BaseParagraphProps::getDebugProps() const {
|
|
166
|
+
return ViewProps::getDebugProps() + BaseTextProps::getDebugProps() +
|
|
167
|
+
paragraphAttributes.getDebugProps() +
|
|
168
|
+
SharedDebugStringConvertibleList{
|
|
169
|
+
debugStringConvertibleItem("selectable", isSelectable),
|
|
170
|
+
// [Windows]
|
|
171
|
+
debugStringConvertibleItem("selectionColor", selectionColor)};
|
|
172
|
+
}
|
|
173
|
+
#endif
|
|
174
|
+
} // namespace facebook::react
|
package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/text/BaseParagraphProps.h
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <limits>
|
|
11
|
+
#include <memory>
|
|
12
|
+
// [Windows]
|
|
13
|
+
#include <optional>
|
|
14
|
+
|
|
15
|
+
#include <react/renderer/attributedstring/ParagraphAttributes.h>
|
|
16
|
+
#include <react/renderer/components/text/BaseTextProps.h>
|
|
17
|
+
#include <react/renderer/components/view/ViewProps.h>
|
|
18
|
+
#include <react/renderer/core/Props.h>
|
|
19
|
+
#include <react/renderer/core/PropsParserContext.h>
|
|
20
|
+
// [Windows]
|
|
21
|
+
#include <react/renderer/graphics/Color.h>
|
|
22
|
+
|
|
23
|
+
namespace facebook::react {
|
|
24
|
+
|
|
25
|
+
/*
|
|
26
|
+
* Props of <Paragraph> component.
|
|
27
|
+
* Most of the props are directly stored in composed `ParagraphAttributes`
|
|
28
|
+
* object.
|
|
29
|
+
*/
|
|
30
|
+
class BaseParagraphProps : public ViewProps, public BaseTextProps {
|
|
31
|
+
public:
|
|
32
|
+
BaseParagraphProps() = default;
|
|
33
|
+
BaseParagraphProps(
|
|
34
|
+
const PropsParserContext &context,
|
|
35
|
+
const BaseParagraphProps &sourceProps,
|
|
36
|
+
const RawProps &rawProps);
|
|
37
|
+
|
|
38
|
+
void
|
|
39
|
+
setProp(const PropsParserContext &context, RawPropsPropNameHash hash, const char *propName, const RawValue &value);
|
|
40
|
+
|
|
41
|
+
#pragma mark - Props
|
|
42
|
+
|
|
43
|
+
/*
|
|
44
|
+
* Contains all prop values that affect visual representation of the
|
|
45
|
+
* paragraph.
|
|
46
|
+
*/
|
|
47
|
+
ParagraphAttributes paragraphAttributes{};
|
|
48
|
+
|
|
49
|
+
/*
|
|
50
|
+
* Defines can the text be selected (and copied) or not.
|
|
51
|
+
*/
|
|
52
|
+
bool isSelectable{};
|
|
53
|
+
|
|
54
|
+
bool onTextLayout{};
|
|
55
|
+
|
|
56
|
+
/*
|
|
57
|
+
* Defines the color of the selection highlight.
|
|
58
|
+
* [Windows]
|
|
59
|
+
*/
|
|
60
|
+
std::optional<SharedColor> selectionColor{};
|
|
61
|
+
|
|
62
|
+
#pragma mark - DebugStringConvertible
|
|
63
|
+
|
|
64
|
+
#if RN_DEBUG_STRING_CONVERTIBLE
|
|
65
|
+
SharedDebugStringConvertibleList getDebugProps() const override;
|
|
66
|
+
#endif
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
} // namespace facebook::react
|
|
@@ -469,7 +469,7 @@ $requirements = @(
|
|
|
469
469
|
Name = 'Node.js (LTS, >= 22.0)';
|
|
470
470
|
Tags = @('appDev');
|
|
471
471
|
Valid = { CheckNode; }
|
|
472
|
-
Install = { WinGetInstall OpenJS.NodeJS.
|
|
472
|
+
Install = { WinGetInstall OpenJS.NodeJS.22 "22.22.0"};
|
|
473
473
|
HasVerboseOutput = $true;
|
|
474
474
|
},
|
|
475
475
|
@{
|
|
@@ -600,6 +600,9 @@ function WinGetInstall {
|
|
|
600
600
|
Write-Verbose "Executing `winget install `"$wingetPackage`"";
|
|
601
601
|
& winget install "$wingetPackage" --accept-source-agreements --accept-package-agreements
|
|
602
602
|
}
|
|
603
|
+
|
|
604
|
+
# Refresh PATH environment variable to pick up newly installed tools
|
|
605
|
+
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
|
|
603
606
|
}
|
|
604
607
|
|
|
605
608
|
function IsElevated {
|
|
@@ -685,6 +688,17 @@ foreach ($req in $filteredRequirements)
|
|
|
685
688
|
$LASTEXITCODE = 0;
|
|
686
689
|
$outputFromInstall = Invoke-Command $req.Install -ErrorAction Stop;
|
|
687
690
|
|
|
691
|
+
# Re-validate after install attempt - winget may return non-zero for "already installed"
|
|
692
|
+
$validAfterInstall = $false;
|
|
693
|
+
try {
|
|
694
|
+
$validAfterInstall = Invoke-Command $req.Valid;
|
|
695
|
+
} catch { }
|
|
696
|
+
|
|
697
|
+
if ($validAfterInstall) {
|
|
698
|
+
$Installed++;
|
|
699
|
+
continue; # go to the next item
|
|
700
|
+
}
|
|
701
|
+
|
|
688
702
|
if ($LASTEXITCODE -ne 0) {
|
|
689
703
|
throw "Last exit code was non-zero: $LASTEXITCODE - $outputFromInstall";
|
|
690
704
|
}
|
package/Shared/Shared.vcxitems
CHANGED
|
@@ -444,6 +444,7 @@
|
|
|
444
444
|
<CLCompile Include="$(ReactNativeDir)\ReactCommon\react\nativemodule\featureflags\NativeReactNativeFeatureFlags.cpp" />
|
|
445
445
|
<CLCompile Include="$(ReactNativeDir)\ReactCommon\react\nativemodule\dom\NativeDOM.cpp" DisableSpecificWarnings="4715;%(DisableSpecificWarnings)" />
|
|
446
446
|
<CLCompile Include="$(ReactNativeDir)\ReactCommon\react\nativemodule\idlecallbacks\NativeIdleCallbacks.cpp" />
|
|
447
|
+
<CLCompile Include="$(ReactNativeDir)\ReactCommon\react\nativemodule\webperformance\NativePerformance.cpp" DisableSpecificWarnings="4996;%(DisableSpecificWarnings)" />
|
|
447
448
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\attributedstring\AttributedString.cpp" />
|
|
448
449
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\attributedstring\AttributedStringBox.cpp" DisableSpecificWarnings="4715;%(DisableSpecificWarnings)" />
|
|
449
450
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\components\view\BaseViewProps.cpp" DisableSpecificWarnings="4459;4715;%(DisableSpecificWarnings)" />
|
|
@@ -266,7 +266,6 @@
|
|
|
266
266
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\HostTarget.cpp" />
|
|
267
267
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\InspectorUtilities.cpp" />
|
|
268
268
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\RuntimeAgent.cpp" />
|
|
269
|
-
<ClCompile Include="$(ReactNativeDir)\ReactCommon\cxxreact\Instance.cpp" />
|
|
270
269
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\FallbackRuntimeAgentDelegate.cpp" />
|
|
271
270
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\FallbackRuntimeTargetDelegate.cpp" />
|
|
272
271
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\RuntimeTarget.cpp" />
|
|
@@ -279,7 +278,6 @@
|
|
|
279
278
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\utils\jsi-utils.cpp" />
|
|
280
279
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\TextDrawing.cpp" />
|
|
281
280
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\graphics\ColorComponents.cpp" />
|
|
282
|
-
<ClCompile Include="$(ReactNativeDir)\ReactCommon\cxxreact\JSExecutor.cpp" />
|
|
283
281
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\RuntimeTargetConsole.cpp" />
|
|
284
282
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\reactperflogger\reactperflogger\ReactPerfettoLogger.cpp" />
|
|
285
283
|
<ClCompile Include="$(MSBuildThisFileDirectory)Networking\NetworkPropertyIds.cpp" />
|
|
@@ -290,7 +288,7 @@
|
|
|
290
288
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\codegen\rnwcoreJSI-generated.cpp" />
|
|
291
289
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\tracing\PerformanceTracer.cpp" />
|
|
292
290
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\tracing\TraceEventSerializer.cpp" />
|
|
293
|
-
|
|
291
|
+
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\HostTargetTraceRecording.cpp " />
|
|
294
292
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\HostTargetTracing.cpp" />
|
|
295
293
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\tracing\TraceRecordingStateSerializer.cpp" />
|
|
296
294
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\PerfMonitorV2.cpp" />
|
|
@@ -94,24 +94,25 @@ inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(PerformanceSpec_Rea
|
|
|
94
94
|
struct PerformanceSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
|
|
95
95
|
static constexpr auto methods = std::tuple{
|
|
96
96
|
SyncMethod<double() noexcept>{0, L"now"},
|
|
97
|
-
|
|
98
|
-
Method<void(std::string, double,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
Method<void(std::string) noexcept>{5, L"
|
|
102
|
-
|
|
103
|
-
SyncMethod<std::vector<PerformanceSpec_RawPerformanceEntry>(
|
|
104
|
-
SyncMethod<std::vector<PerformanceSpec_RawPerformanceEntry>(double) noexcept>{8, L"
|
|
105
|
-
SyncMethod
|
|
106
|
-
SyncMethod<::React::
|
|
107
|
-
SyncMethod<::React::JSValue() noexcept>{11, L"
|
|
108
|
-
SyncMethod
|
|
109
|
-
SyncMethod<
|
|
110
|
-
|
|
111
|
-
Method<void() noexcept>{15, L"
|
|
112
|
-
|
|
113
|
-
SyncMethod<std::vector<
|
|
114
|
-
|
|
97
|
+
SyncMethod<double() noexcept>{1, L"timeOrigin"},
|
|
98
|
+
Method<void(std::string, double, ) noexcept>{2, L"reportMark"},
|
|
99
|
+
Method<void(std::string, double, double, ) noexcept>{3, L"reportMeasure"},
|
|
100
|
+
SyncMethod<std::optional<double>(std::string) noexcept>{4, L"getMarkTime"},
|
|
101
|
+
Method<void(std::string) noexcept>{5, L"clearMarks"},
|
|
102
|
+
Method<void(std::string) noexcept>{6, L"clearMeasures"},
|
|
103
|
+
SyncMethod<std::vector<PerformanceSpec_RawPerformanceEntry>() noexcept>{7, L"getEntries"},
|
|
104
|
+
SyncMethod<std::vector<PerformanceSpec_RawPerformanceEntry>(std::string, std::optional<double>) noexcept>{8, L"getEntriesByName"},
|
|
105
|
+
SyncMethod<std::vector<PerformanceSpec_RawPerformanceEntry>(double) noexcept>{9, L"getEntriesByType"},
|
|
106
|
+
SyncMethod<::React::JSValueArray() noexcept>{10, L"getEventCounts"},
|
|
107
|
+
SyncMethod<::React::JSValue() noexcept>{11, L"getSimpleMemoryInfo"},
|
|
108
|
+
SyncMethod<::React::JSValue() noexcept>{12, L"getReactNativeStartupTiming"},
|
|
109
|
+
SyncMethod<(Callback<>) noexcept>{13, L"createObserver"},
|
|
110
|
+
SyncMethod<double() noexcept>{14, L"getDroppedEntriesCount"},
|
|
111
|
+
Method<void(, PerformanceSpec_PerformanceObserverInit) noexcept>{15, L"observe"},
|
|
112
|
+
Method<void() noexcept>{16, L"disconnect"},
|
|
113
|
+
SyncMethod<std::vector<PerformanceSpec_RawPerformanceEntry>(, bool) noexcept>{17, L"takeRecords"},
|
|
114
|
+
SyncMethod<std::vector<double>() noexcept>{18, L"getSupportedPerformanceEntryTypes"},
|
|
115
|
+
Method<void() noexcept>{19, L"clearEventCountsForTesting"},
|
|
115
116
|
};
|
|
116
117
|
|
|
117
118
|
template <class TModule>
|
|
@@ -125,91 +126,96 @@ struct PerformanceSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
|
|
|
125
126
|
" REACT_SYNC_METHOD(now) static double now() noexcept { /* implementation */ }\n");
|
|
126
127
|
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
127
128
|
1,
|
|
129
|
+
"timeOrigin",
|
|
130
|
+
" REACT_SYNC_METHOD(timeOrigin) double timeOrigin() noexcept { /* implementation */ }\n"
|
|
131
|
+
" REACT_SYNC_METHOD(timeOrigin) static double timeOrigin() noexcept { /* implementation */ }\n");
|
|
132
|
+
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
133
|
+
2,
|
|
128
134
|
"reportMark",
|
|
129
135
|
" REACT_METHOD(reportMark) void reportMark(std::string name, double startTime, entry) noexcept { /* implementation */ }\n"
|
|
130
136
|
" REACT_METHOD(reportMark) static void reportMark(std::string name, double startTime, entry) noexcept { /* implementation */ }\n");
|
|
131
137
|
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
132
|
-
|
|
138
|
+
3,
|
|
133
139
|
"reportMeasure",
|
|
134
140
|
" REACT_METHOD(reportMeasure) void reportMeasure(std::string name, double startTime, double duration, entry) noexcept { /* implementation */ }\n"
|
|
135
141
|
" REACT_METHOD(reportMeasure) static void reportMeasure(std::string name, double startTime, double duration, entry) noexcept { /* implementation */ }\n");
|
|
136
142
|
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
137
|
-
|
|
143
|
+
4,
|
|
138
144
|
"getMarkTime",
|
|
139
145
|
" REACT_SYNC_METHOD(getMarkTime) std::optional<double> getMarkTime(std::string name) noexcept { /* implementation */ }\n"
|
|
140
146
|
" REACT_SYNC_METHOD(getMarkTime) static std::optional<double> getMarkTime(std::string name) noexcept { /* implementation */ }\n");
|
|
141
147
|
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
142
|
-
|
|
148
|
+
5,
|
|
143
149
|
"clearMarks",
|
|
144
150
|
" REACT_METHOD(clearMarks) void clearMarks(std::string entryName) noexcept { /* implementation */ }\n"
|
|
145
151
|
" REACT_METHOD(clearMarks) static void clearMarks(std::string entryName) noexcept { /* implementation */ }\n");
|
|
146
152
|
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
147
|
-
|
|
153
|
+
6,
|
|
148
154
|
"clearMeasures",
|
|
149
155
|
" REACT_METHOD(clearMeasures) void clearMeasures(std::string entryName) noexcept { /* implementation */ }\n"
|
|
150
156
|
" REACT_METHOD(clearMeasures) static void clearMeasures(std::string entryName) noexcept { /* implementation */ }\n");
|
|
151
157
|
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
152
|
-
|
|
158
|
+
7,
|
|
153
159
|
"getEntries",
|
|
154
160
|
" REACT_SYNC_METHOD(getEntries) std::vector<PerformanceSpec_RawPerformanceEntry> getEntries() noexcept { /* implementation */ }\n"
|
|
155
161
|
" REACT_SYNC_METHOD(getEntries) static std::vector<PerformanceSpec_RawPerformanceEntry> getEntries() noexcept { /* implementation */ }\n");
|
|
156
162
|
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
157
|
-
|
|
163
|
+
8,
|
|
158
164
|
"getEntriesByName",
|
|
159
165
|
" REACT_SYNC_METHOD(getEntriesByName) std::vector<PerformanceSpec_RawPerformanceEntry> getEntriesByName(std::string entryName, std::optional<double> entryType) noexcept { /* implementation */ }\n"
|
|
160
166
|
" REACT_SYNC_METHOD(getEntriesByName) static std::vector<PerformanceSpec_RawPerformanceEntry> getEntriesByName(std::string entryName, std::optional<double> entryType) noexcept { /* implementation */ }\n");
|
|
161
167
|
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
162
|
-
|
|
168
|
+
9,
|
|
163
169
|
"getEntriesByType",
|
|
164
170
|
" REACT_SYNC_METHOD(getEntriesByType) std::vector<PerformanceSpec_RawPerformanceEntry> getEntriesByType(double entryType) noexcept { /* implementation */ }\n"
|
|
165
171
|
" REACT_SYNC_METHOD(getEntriesByType) static std::vector<PerformanceSpec_RawPerformanceEntry> getEntriesByType(double entryType) noexcept { /* implementation */ }\n");
|
|
166
172
|
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
167
|
-
|
|
173
|
+
10,
|
|
168
174
|
"getEventCounts",
|
|
169
175
|
" REACT_SYNC_METHOD(getEventCounts) ::React::JSValueArray getEventCounts() noexcept { /* implementation */ }\n"
|
|
170
176
|
" REACT_SYNC_METHOD(getEventCounts) static ::React::JSValueArray getEventCounts() noexcept { /* implementation */ }\n");
|
|
171
177
|
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
172
|
-
|
|
178
|
+
11,
|
|
173
179
|
"getSimpleMemoryInfo",
|
|
174
180
|
" REACT_SYNC_METHOD(getSimpleMemoryInfo) ::React::JSValue getSimpleMemoryInfo() noexcept { /* implementation */ }\n"
|
|
175
181
|
" REACT_SYNC_METHOD(getSimpleMemoryInfo) static ::React::JSValue getSimpleMemoryInfo() noexcept { /* implementation */ }\n");
|
|
176
182
|
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
177
|
-
|
|
183
|
+
12,
|
|
178
184
|
"getReactNativeStartupTiming",
|
|
179
185
|
" REACT_SYNC_METHOD(getReactNativeStartupTiming) ::React::JSValue getReactNativeStartupTiming() noexcept { /* implementation */ }\n"
|
|
180
186
|
" REACT_SYNC_METHOD(getReactNativeStartupTiming) static ::React::JSValue getReactNativeStartupTiming() noexcept { /* implementation */ }\n");
|
|
181
187
|
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
182
|
-
|
|
188
|
+
13,
|
|
183
189
|
"createObserver",
|
|
184
190
|
" REACT_SYNC_METHOD(createObserver) createObserver(std::function<void()> const & callback) noexcept { /* implementation */ }\n"
|
|
185
191
|
" REACT_SYNC_METHOD(createObserver) static createObserver(std::function<void()> const & callback) noexcept { /* implementation */ }\n");
|
|
186
192
|
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
187
|
-
|
|
193
|
+
14,
|
|
188
194
|
"getDroppedEntriesCount",
|
|
189
195
|
" REACT_SYNC_METHOD(getDroppedEntriesCount) double getDroppedEntriesCount( observer) noexcept { /* implementation */ }\n"
|
|
190
196
|
" REACT_SYNC_METHOD(getDroppedEntriesCount) static double getDroppedEntriesCount( observer) noexcept { /* implementation */ }\n");
|
|
191
197
|
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
192
|
-
|
|
198
|
+
15,
|
|
193
199
|
"observe",
|
|
194
200
|
" REACT_METHOD(observe) void observe( observer, PerformanceSpec_PerformanceObserverInit && options) noexcept { /* implementation */ }\n"
|
|
195
201
|
" REACT_METHOD(observe) static void observe( observer, PerformanceSpec_PerformanceObserverInit && options) noexcept { /* implementation */ }\n");
|
|
196
202
|
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
197
|
-
|
|
203
|
+
16,
|
|
198
204
|
"disconnect",
|
|
199
205
|
" REACT_METHOD(disconnect) void disconnect( observer) noexcept { /* implementation */ }\n"
|
|
200
206
|
" REACT_METHOD(disconnect) static void disconnect( observer) noexcept { /* implementation */ }\n");
|
|
201
207
|
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
202
|
-
|
|
208
|
+
17,
|
|
203
209
|
"takeRecords",
|
|
204
210
|
" REACT_SYNC_METHOD(takeRecords) std::vector<PerformanceSpec_RawPerformanceEntry> takeRecords( observer, bool sort) noexcept { /* implementation */ }\n"
|
|
205
211
|
" REACT_SYNC_METHOD(takeRecords) static std::vector<PerformanceSpec_RawPerformanceEntry> takeRecords( observer, bool sort) noexcept { /* implementation */ }\n");
|
|
206
212
|
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
207
|
-
|
|
213
|
+
18,
|
|
208
214
|
"getSupportedPerformanceEntryTypes",
|
|
209
215
|
" REACT_SYNC_METHOD(getSupportedPerformanceEntryTypes) std::vector<double> getSupportedPerformanceEntryTypes() noexcept { /* implementation */ }\n"
|
|
210
216
|
" REACT_SYNC_METHOD(getSupportedPerformanceEntryTypes) static std::vector<double> getSupportedPerformanceEntryTypes() noexcept { /* implementation */ }\n");
|
|
211
217
|
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
212
|
-
|
|
218
|
+
19,
|
|
213
219
|
"clearEventCountsForTesting",
|
|
214
220
|
" REACT_METHOD(clearEventCountsForTesting) void clearEventCountsForTesting() noexcept { /* implementation */ }\n"
|
|
215
221
|
" REACT_METHOD(clearEventCountsForTesting) static void clearEventCountsForTesting() noexcept { /* implementation */ }\n");
|