react-native-windows 0.0.0-canary.960 → 0.0.0-canary.962
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/Common/Common.vcxproj +1 -1
- package/Microsoft.ReactNative/Fabric/AbiShadowNode.cpp +4 -4
- package/Microsoft.ReactNative/Fabric/AbiShadowNode.h +5 -5
- package/Microsoft.ReactNative/Fabric/ComponentView.h +6 -5
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +1 -0
- package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +3 -1
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +3 -2
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentDescriptor.h +2 -1
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +2 -1
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +0 -8
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h +2 -2
- package/Microsoft.ReactNative/Fabric/Composition/TooltipService.cpp +3 -2
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +7 -3
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +10 -1
- package/Microsoft.ReactNative/Fabric/WindowsComponentDescriptorRegistry.h +2 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/HostPlatformColor.h +0 -1
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorUtils.h +1 -1
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/{TextLayoutManager.cpp → WindowsTextLayoutManager.cpp} +21 -36
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/WindowsTextLayoutManager.h +68 -0
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +0 -2
- package/Microsoft.ReactNative.Cxx/JSValue.cpp +19 -3
- package/Microsoft.ReactNative.Cxx/JSValue.h +15 -7
- package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Bridging.h +3 -3
- package/Microsoft.ReactNative.Cxx/stubs/glog/logging.h +1 -1
- package/PropertySheets/Generated/PackageVersion.g.props +2 -2
- package/PropertySheets/React.Cpp.props +6 -2
- package/ReactCommon/ReactCommon.vcxproj +1 -9
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Bridging.h +3 -3
- package/Shared/Shared.vcxitems +4 -4
- package/Shared/Shared.vcxitems.filters +3 -3
- package/package.json +1 -2
- package/stubs/glog/logging.h +1 -1
- package/templates/cpp-lib/windows/MyLib/MyLib.cpp +1 -1
- package/templates/cpp-lib/windows/MyLib/MyLib.h +2 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformTouch.h +0 -10
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/Float.h +0 -20
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.h +0 -117
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/textinput/TextInputState.h +0 -73
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/HostPlatformTouch.h +0 -14
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/HostPlatformViewEventEmitter.h +0 -14
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/HostPlatformViewProps.h +0 -14
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/graphics/Float.h +0 -433
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/graphics/HostPlatformColor.h +0 -62
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/imagemanager/ImageRequestParams.h +0 -30
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/runtimescheduler/SchedulerPriorityUtils.h +0 -60
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.h +0 -87
|
@@ -181,17 +181,25 @@ bool operator!=(JSValueArray const &left, JSValueArray const &right) noexcept;
|
|
|
181
181
|
//! For copy operations the explicit Copy() method must be used.
|
|
182
182
|
//! Note that the move operations are not thread safe.
|
|
183
183
|
struct JSValue {
|
|
184
|
-
//! JSValue with JSValueType::Null.
|
|
184
|
+
//! JSValue with JSValueType::Null. - Maybe removed in future version - replaced with NullRef
|
|
185
185
|
static JSValue const Null;
|
|
186
|
+
//! JSValue with JSValueType::Null.
|
|
187
|
+
static const JSValue &NullRef() noexcept;
|
|
186
188
|
|
|
187
|
-
//! JSValue with empty object.
|
|
189
|
+
//! JSValue with empty object. - Maybe removed in future version - replaced with EmptyObjectRef
|
|
188
190
|
static JSValue const EmptyObject;
|
|
191
|
+
//! JSValue with empty object.
|
|
192
|
+
static const JSValue &EmptyObjectRef() noexcept;
|
|
189
193
|
|
|
190
|
-
//! JSValue with empty array.
|
|
194
|
+
//! JSValue with empty array. - Maybe removed in future version - replaced with EmptyArrayRef
|
|
191
195
|
static JSValue const EmptyArray;
|
|
196
|
+
//! JSValue with empty array.
|
|
197
|
+
static const JSValue &EmptyArrayRef() noexcept;
|
|
192
198
|
|
|
193
|
-
//! JSValue with empty string.
|
|
199
|
+
//! JSValue with empty string. - Maybe removed in future version - replaced with EmptyStringRef
|
|
194
200
|
static JSValue const EmptyString;
|
|
201
|
+
//! JSValue with empty string.
|
|
202
|
+
static const JSValue &EmptyStringRef() noexcept;
|
|
195
203
|
|
|
196
204
|
//! Create a Null JSValue.
|
|
197
205
|
JSValue() noexcept;
|
|
@@ -654,11 +662,11 @@ inline double const *JSValue::TryGetDouble() const noexcept {
|
|
|
654
662
|
}
|
|
655
663
|
|
|
656
664
|
inline JSValueObject const &JSValue::AsObject() const noexcept {
|
|
657
|
-
return (m_type == JSValueType::Object) ? m_object :
|
|
665
|
+
return (m_type == JSValueType::Object) ? m_object : EmptyObjectRef().m_object;
|
|
658
666
|
}
|
|
659
667
|
|
|
660
668
|
inline JSValueArray const &JSValue::AsArray() const noexcept {
|
|
661
|
-
return (m_type == JSValueType::Array) ? m_array :
|
|
669
|
+
return (m_type == JSValueType::Array) ? m_array : EmptyArrayRef().m_array;
|
|
662
670
|
}
|
|
663
671
|
|
|
664
672
|
inline int8_t JSValue::AsInt8() const noexcept {
|
|
@@ -860,7 +868,7 @@ inline const JSValueArray &JSValue::Array() const noexcept {
|
|
|
860
868
|
}
|
|
861
869
|
|
|
862
870
|
inline const std::string &JSValue::String() const noexcept {
|
|
863
|
-
return (m_type == JSValueType::String) ? m_string :
|
|
871
|
+
return (m_type == JSValueType::String) ? m_string : EmptyStringRef().m_string;
|
|
864
872
|
}
|
|
865
873
|
|
|
866
874
|
inline bool JSValue::Boolean() const noexcept {
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
#include <react/bridging/Array.h>
|
|
12
12
|
#include <react/bridging/Bool.h>
|
|
13
13
|
#include <react/bridging/Class.h>
|
|
14
|
-
// #include <react/bridging/Dynamic.h> // Line causes Error C1083 Cannot open include file: 'double-conversion/double-conversion.h' #11644
|
|
14
|
+
// #include <react/bridging/Dynamic.h> // [Windows] Line causes Error C1083 Cannot open include file: 'double-conversion/double-conversion.h' #11644
|
|
15
15
|
#include <react/bridging/Error.h>
|
|
16
|
-
#include <react/bridging/EventEmitter.h>
|
|
16
|
+
#include <react/bridging/EventEmitter.h>
|
|
17
17
|
#include <react/bridging/Function.h>
|
|
18
18
|
#include <react/bridging/Number.h>
|
|
19
19
|
#include <react/bridging/Object.h>
|
|
20
20
|
#include <react/bridging/Promise.h>
|
|
21
|
-
#include <react/bridging/Value.h>
|
|
21
|
+
#include <react/bridging/Value.h>
|
|
@@ -72,7 +72,7 @@ inline std::ostream &GetNullLog() noexcept {
|
|
|
72
72
|
#define LOG_EVERY_N(severity, n) GlogStub::GetNullLog()
|
|
73
73
|
|
|
74
74
|
typedef int LogSeverity;
|
|
75
|
-
inline void FlushLogFiles(LogSeverity
|
|
75
|
+
inline void FlushLogFiles(LogSeverity) {}
|
|
76
76
|
|
|
77
77
|
#define google GlogStub
|
|
78
78
|
static const int GLOG_INFO = 1;
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
-->
|
|
11
11
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
12
12
|
<PropertyGroup>
|
|
13
|
-
<ReactNativeWindowsVersion>0.0.0-canary.
|
|
13
|
+
<ReactNativeWindowsVersion>0.0.0-canary.962</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
15
|
<ReactNativeWindowsMinor>0</ReactNativeWindowsMinor>
|
|
16
16
|
<ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
|
|
17
17
|
<ReactNativeWindowsCanary>true</ReactNativeWindowsCanary>
|
|
18
|
-
<ReactNativeWindowsCommitId>
|
|
18
|
+
<ReactNativeWindowsCommitId>ebfbdbe6dbd982204e1b36fa75465875129380ad</ReactNativeWindowsCommitId>
|
|
19
19
|
</PropertyGroup>
|
|
20
20
|
</Project>
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
|
139
139
|
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
|
140
140
|
<ShowIncludes Condition="'$(ShowIncludes)'=='true'">true</ShowIncludes>
|
|
141
|
-
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
|
|
141
|
+
<AdditionalOptions>/utf-8 %(AdditionalOptions) /await</AdditionalOptions>
|
|
142
142
|
<ControlFlowGuard>Guard</ControlFlowGuard>
|
|
143
143
|
<SpectreMitigation>Spectre</SpectreMitigation>
|
|
144
144
|
|
|
@@ -150,12 +150,16 @@
|
|
|
150
150
|
$(ReactNativeDir)\ReactCommon\callinvoker;
|
|
151
151
|
$(ReactNativeDir)\ReactCommon\jsi;
|
|
152
152
|
$(ReactNativeDir)\ReactCommon\jsiexecutor;
|
|
153
|
+
$(ReactNativeDir)\ReactCommon\jsitooling;
|
|
153
154
|
$(ReactNativeDir)\ReactCommon\react\nativemodule\core;
|
|
154
155
|
$(ReactNativeDir)\ReactCommon\react\nativemodule\samples;
|
|
155
156
|
$(ReactNativeDir)\ReactCommon\react\bridging;
|
|
156
157
|
$(ReactNativeDir)\ReactCommon\reactperflogger;
|
|
157
158
|
$(ReactNativeDir)\ReactCommon\runtimeexecutor;
|
|
158
|
-
$(
|
|
159
|
+
$(ReactNativeWindowsDir)Microsoft.ReactNative\Fabric\platform;
|
|
160
|
+
$(ReactNativeDir)\ReactCommon\react\renderer\graphics\platform\cxx;
|
|
161
|
+
$(ReactNativeDir)\ReactCommon\react\renderer\components\view\platform\cxx;
|
|
162
|
+
$(ReactNativeDir)\ReactCommon\react\renderer\imagemanager\platform\cxx;
|
|
159
163
|
%(AdditionalIncludeDirectories);
|
|
160
164
|
</AdditionalIncludeDirectories>
|
|
161
165
|
</ClCompile>
|
|
@@ -69,15 +69,6 @@
|
|
|
69
69
|
<CompileAsWinRT>false</CompileAsWinRT>
|
|
70
70
|
<SDLCheck>true</SDLCheck>
|
|
71
71
|
<AdditionalIncludeDirectories>
|
|
72
|
-
$(ReactNativeDir)\ReactCommon;
|
|
73
|
-
$(ReactNativeDir)\ReactCommon\react;
|
|
74
|
-
$(ReactNativeDir)\ReactCommon\react\nativemodule\core\ReactCommon;
|
|
75
|
-
$(ReactNativeDir)\ReactCommon\react\renderer;
|
|
76
|
-
$(ReactNativeDir)\ReactCommon\react\renderer\components\view;
|
|
77
|
-
$(ReactNativeDir)\ReactCommon\react\renderer\graphics;
|
|
78
|
-
$(ReactNativeDir)\ReactCommon\jsi;
|
|
79
|
-
$(ReactNativeDir)\ReactCommon\jsitooling;
|
|
80
|
-
$(FmtDir)\include;
|
|
81
72
|
$(ReactNativeWindowsDir)stubs;
|
|
82
73
|
$(ReactNativeWindowsDir)\Shared\tracing;
|
|
83
74
|
%(AdditionalIncludeDirectories);
|
|
@@ -224,6 +215,7 @@
|
|
|
224
215
|
</ItemGroup>
|
|
225
216
|
<ItemGroup>
|
|
226
217
|
<PackageReference Include="boost" Version="1.83.0.0" />
|
|
218
|
+
<PackageReference Include="Microsoft.Windows.CppWinRT" Version="$(CppWinRTVersion)" PrivateAssets="all" />
|
|
227
219
|
</ItemGroup>
|
|
228
220
|
<PropertyGroup>
|
|
229
221
|
<NodeApiJsiZipDir>$(NodeApiJsiDir)..\.node-api-jsi-zip</NodeApiJsiZipDir>
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
#include <react/bridging/Array.h>
|
|
12
12
|
#include <react/bridging/Bool.h>
|
|
13
13
|
#include <react/bridging/Class.h>
|
|
14
|
-
// #include <react/bridging/Dynamic.h> // Line causes Error C1083 Cannot open include file: 'double-conversion/double-conversion.h' #11644
|
|
14
|
+
// #include <react/bridging/Dynamic.h> // [Windows] Line causes Error C1083 Cannot open include file: 'double-conversion/double-conversion.h' #11644
|
|
15
15
|
#include <react/bridging/Error.h>
|
|
16
|
-
#include <react/bridging/EventEmitter.h>
|
|
16
|
+
#include <react/bridging/EventEmitter.h>
|
|
17
17
|
#include <react/bridging/Function.h>
|
|
18
18
|
#include <react/bridging/Number.h>
|
|
19
19
|
#include <react/bridging/Object.h>
|
|
20
20
|
#include <react/bridging/Promise.h>
|
|
21
|
-
#include <react/bridging/Value.h>
|
|
21
|
+
#include <react/bridging/Value.h>
|
package/Shared/Shared.vcxitems
CHANGED
|
@@ -219,7 +219,7 @@
|
|
|
219
219
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\platform\react\renderer\graphics\PlatformColorUtils.cpp">
|
|
220
220
|
<ExcludedFromBuild Condition="'$(UseFabric)' != 'true'">true</ExcludedFromBuild>
|
|
221
221
|
</ClCompile>
|
|
222
|
-
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\platform\react\renderer\textlayoutmanager\
|
|
222
|
+
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\platform\react\renderer\textlayoutmanager\WindowsTextLayoutManager.cpp">
|
|
223
223
|
<ExcludedFromBuild Condition="'$(UseFabric)' != 'true'">true</ExcludedFromBuild>
|
|
224
224
|
</ClCompile>
|
|
225
225
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\WindowsImageManager.cpp">
|
|
@@ -593,12 +593,12 @@
|
|
|
593
593
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\components\text\BaseTextShadowNode.cpp" />
|
|
594
594
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\components\text\ParagraphEventEmitter.cpp" />
|
|
595
595
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\components\text\ParagraphProps.cpp" />
|
|
596
|
-
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\components\text\ParagraphShadowNode.cpp" DisableSpecificWarnings="4305;%(DisableSpecificWarnings)" />
|
|
596
|
+
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\components\text\ParagraphShadowNode.cpp" DisableSpecificWarnings="4305;5028;%(DisableSpecificWarnings)" />
|
|
597
597
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\components\text\RawTextProps.cpp" />
|
|
598
598
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\components\text\TextShadowNode.cpp" />
|
|
599
599
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\components\text\RawTextShadowNode.cpp" />
|
|
600
|
-
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\components\text\ParagraphComponentDescriptor.cpp" />
|
|
601
|
-
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\components\textinput\TextInputState.cpp" />
|
|
600
|
+
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\components\text\ParagraphComponentDescriptor.cpp" DisableSpecificWarnings="5028;%(DisableSpecificWarnings)"/>
|
|
601
|
+
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\components\textinput\TextInputState.cpp" DisableSpecificWarnings="5028;%(DisableSpecificWarnings)"/>
|
|
602
602
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\components\view\AccessibilityProps.cpp" />
|
|
603
603
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\components\view\PointerEvent.cpp" />
|
|
604
604
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\components\view\BaseTouch.cpp" />
|
|
@@ -236,9 +236,6 @@
|
|
|
236
236
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\CompositionUIService.cpp">
|
|
237
237
|
<Filter>Source Files\Fabric</Filter>
|
|
238
238
|
</ClCompile>
|
|
239
|
-
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\platform\react\renderer\textlayoutmanager\TextLayoutManager.cpp">
|
|
240
|
-
<Filter>Source Files\Fabric\platform\react\renderer\textlayoutmanager</Filter>
|
|
241
|
-
</ClCompile>
|
|
242
239
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\PortalComponentView.cpp" />
|
|
243
240
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\RootComponentView.cpp" />
|
|
244
241
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\UnimplementedNativeViewComponentView.cpp" />
|
|
@@ -343,6 +340,9 @@
|
|
|
343
340
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\CompositionAnnotationProvider.cpp" />
|
|
344
341
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\ImageRequestParams.cpp" />
|
|
345
342
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\CallInvoker.cpp" />
|
|
343
|
+
<ClCompile Include="$(ReactNativeDir)\ReactCommon\oscompat\OSCompatPosix.cpp" />
|
|
344
|
+
<ClCompile Include="$(ReactNativeDir)\ReactCommon\oscompat\OSCompatWindows.cpp" />
|
|
345
|
+
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\platform\react\renderer\textlayoutmanager\WindowsTextLayoutManager.cpp" />
|
|
346
346
|
</ItemGroup>
|
|
347
347
|
<ItemGroup>
|
|
348
348
|
<Filter Include="Source Files">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-windows",
|
|
3
|
-
"version": "0.0.0-canary.
|
|
3
|
+
"version": "0.0.0-canary.962",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -57,7 +57,6 @@
|
|
|
57
57
|
"promise": "^8.3.0",
|
|
58
58
|
"react-devtools-core": "^6.1.1",
|
|
59
59
|
"react-refresh": "^0.14.0",
|
|
60
|
-
"react-shallow-renderer": "^16.15.0",
|
|
61
60
|
"regenerator-runtime": "^0.13.2",
|
|
62
61
|
"scheduler": "0.25.0",
|
|
63
62
|
"semver": "^7.1.3",
|
package/stubs/glog/logging.h
CHANGED
|
@@ -72,7 +72,7 @@ inline std::ostream &GetNullLog() noexcept {
|
|
|
72
72
|
#define LOG_EVERY_N(severity, n) GlogStub::GetNullLog()
|
|
73
73
|
|
|
74
74
|
typedef int LogSeverity;
|
|
75
|
-
inline void FlushLogFiles(LogSeverity
|
|
75
|
+
inline void FlushLogFiles(LogSeverity) {}
|
|
76
76
|
|
|
77
77
|
#define google GlogStub
|
|
78
78
|
static const int GLOG_INFO = 1;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
namespace winrt::{{ namespaceCpp }}
|
|
6
6
|
{
|
|
7
7
|
|
|
8
|
-
// See https://microsoft.github.io/react-native-windows/docs/native-
|
|
8
|
+
// See https://microsoft.github.io/react-native-windows/docs/native-platform for help writing native modules
|
|
9
9
|
|
|
10
10
|
void {{ pascalName }}::Initialize(React::ReactContext const &reactContext) noexcept {
|
|
11
11
|
m_context = reactContext;
|
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
|
|
12
|
-
namespace facebook::react {
|
|
13
|
-
|
|
14
|
-
/*
|
|
15
|
-
* Exact type of float numbers which ideally should match a type behing
|
|
16
|
-
* platform- and chip-architecture-specific float type.
|
|
17
|
-
*/
|
|
18
|
-
using Float = float;
|
|
19
|
-
|
|
20
|
-
} // namespace facebook::react
|
package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.h
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
#pragma once
|
|
5
|
-
|
|
6
|
-
#include <dwrite.h>
|
|
7
|
-
#include <react/renderer/attributedstring/AttributedString.h>
|
|
8
|
-
#include <react/renderer/attributedstring/AttributedStringBox.h>
|
|
9
|
-
#include <react/renderer/attributedstring/ParagraphAttributes.h>
|
|
10
|
-
#include <react/renderer/core/LayoutConstraints.h>
|
|
11
|
-
#include <react/renderer/textlayoutmanager/TextLayoutContext.h>
|
|
12
|
-
#include <react/renderer/textlayoutmanager/TextMeasureCache.h>
|
|
13
|
-
#include <react/utils/ContextContainer.h>
|
|
14
|
-
#include <memory>
|
|
15
|
-
|
|
16
|
-
namespace facebook {
|
|
17
|
-
namespace react {
|
|
18
|
-
|
|
19
|
-
class TextLayoutManager;
|
|
20
|
-
|
|
21
|
-
using SharedTextLayoutManager = std::shared_ptr<const TextLayoutManager>;
|
|
22
|
-
|
|
23
|
-
/*
|
|
24
|
-
* Windows-specific TextLayoutManager.
|
|
25
|
-
*/
|
|
26
|
-
class TextLayoutManager {
|
|
27
|
-
public:
|
|
28
|
-
using Shared = std::shared_ptr<const TextLayoutManager>;
|
|
29
|
-
|
|
30
|
-
#pragma region required interface from core cxx cross platform impl
|
|
31
|
-
TextLayoutManager(const ContextContainer::Shared &contextContainer) : m_contextContainer(contextContainer){};
|
|
32
|
-
~TextLayoutManager() = default;
|
|
33
|
-
|
|
34
|
-
/*
|
|
35
|
-
* Measures `attributedStringBox` using native text rendering infrastructure.
|
|
36
|
-
*/
|
|
37
|
-
TextMeasurement measure(
|
|
38
|
-
const AttributedStringBox &attributedStringBox,
|
|
39
|
-
const ParagraphAttributes ¶graphAttributes,
|
|
40
|
-
const TextLayoutContext &layoutContext,
|
|
41
|
-
LayoutConstraints layoutConstraints) const;
|
|
42
|
-
|
|
43
|
-
/*
|
|
44
|
-
* Measures lines of `attributedString` using native text rendering
|
|
45
|
-
* infrastructure.
|
|
46
|
-
*/
|
|
47
|
-
LinesMeasurements measureLines(
|
|
48
|
-
const AttributedStringBox &attributedStringBox,
|
|
49
|
-
const ParagraphAttributes ¶graphAttributes,
|
|
50
|
-
Size size) const;
|
|
51
|
-
|
|
52
|
-
std::shared_ptr<void> getHostTextStorage(
|
|
53
|
-
const AttributedStringBox &attributedStringBox,
|
|
54
|
-
const ParagraphAttributes ¶graphAttributes,
|
|
55
|
-
LayoutConstraints layoutConstraints) const;
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Measures an AttributedString on the platform, as identified by some
|
|
59
|
-
* opaque cache ID.
|
|
60
|
-
*/
|
|
61
|
-
TextMeasurement measureCachedSpannableById(
|
|
62
|
-
int64_t cacheId,
|
|
63
|
-
const ParagraphAttributes ¶graphAttributes,
|
|
64
|
-
LayoutConstraints layoutConstraints) const;
|
|
65
|
-
|
|
66
|
-
/*
|
|
67
|
-
* Calculates baseline of `attributedString` using native text rendering
|
|
68
|
-
* infrastructure.
|
|
69
|
-
*/
|
|
70
|
-
Float baseline(AttributedStringBox attributedStringBox, ParagraphAttributes paragraphAttributes, Size size) const;
|
|
71
|
-
|
|
72
|
-
/*
|
|
73
|
-
* Returns an opaque pointer to platform-specific TextLayoutManager.
|
|
74
|
-
* Is used on a native views layer to delegate text rendering to the manager.
|
|
75
|
-
*/
|
|
76
|
-
void *getNativeTextLayoutManager() const;
|
|
77
|
-
|
|
78
|
-
static void GetTextLayout(
|
|
79
|
-
const AttributedStringBox &attributedStringBox,
|
|
80
|
-
const ParagraphAttributes ¶graphAttributes,
|
|
81
|
-
Size size,
|
|
82
|
-
winrt::com_ptr<IDWriteTextLayout> &spTextLayout,
|
|
83
|
-
TextMeasurement::Attachments &attachments) noexcept;
|
|
84
|
-
|
|
85
|
-
static void GetTextLayout(
|
|
86
|
-
const AttributedStringBox &attributedStringBox,
|
|
87
|
-
const ParagraphAttributes ¶graphAttributes,
|
|
88
|
-
LayoutConstraints layoutConstraints,
|
|
89
|
-
winrt::com_ptr<IDWriteTextLayout> &spTextLayout) noexcept;
|
|
90
|
-
|
|
91
|
-
static void GetTextLayoutByAdjustingFontSizeToFit(
|
|
92
|
-
AttributedStringBox attributedStringBox,
|
|
93
|
-
const ParagraphAttributes ¶graphAttributes,
|
|
94
|
-
LayoutConstraints layoutConstraints,
|
|
95
|
-
winrt::com_ptr<IDWriteTextLayout> &spTextLayout,
|
|
96
|
-
TextMeasurement::Attachments &attachments,
|
|
97
|
-
float minimumFontScale) noexcept;
|
|
98
|
-
|
|
99
|
-
#pragma endregion
|
|
100
|
-
|
|
101
|
-
private:
|
|
102
|
-
static winrt::hstring GetTransformedText(const AttributedStringBox &attributedStringBox);
|
|
103
|
-
static void GetTextLayout(
|
|
104
|
-
const AttributedStringBox &attributedStringBox,
|
|
105
|
-
const ParagraphAttributes ¶graphAttributes,
|
|
106
|
-
Size size,
|
|
107
|
-
winrt::com_ptr<IDWriteTextLayout> &spTextLayout) noexcept;
|
|
108
|
-
|
|
109
|
-
ContextContainer::Shared m_contextContainer;
|
|
110
|
-
#pragma warning(push)
|
|
111
|
-
#pragma warning(disable : 5028)
|
|
112
|
-
TextMeasureCache m_measureCache{};
|
|
113
|
-
#pragma warning(pop)
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
} // namespace react
|
|
117
|
-
} // namespace facebook
|
package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/textinput/TextInputState.h
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
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 <react/renderer/attributedstring/AttributedStringBox.h>
|
|
11
|
-
#include <react/renderer/attributedstring/ParagraphAttributes.h>
|
|
12
|
-
#include <react/renderer/textlayoutmanager/TextLayoutManager.h>
|
|
13
|
-
|
|
14
|
-
#ifdef ANDROID
|
|
15
|
-
#include <folly/dynamic.h>
|
|
16
|
-
#include <react/renderer/mapbuffer/MapBuffer.h>
|
|
17
|
-
#endif
|
|
18
|
-
|
|
19
|
-
namespace facebook::react {
|
|
20
|
-
|
|
21
|
-
/*
|
|
22
|
-
* State for <TextInput> component.
|
|
23
|
-
*/
|
|
24
|
-
class TextInputState final {
|
|
25
|
-
public:
|
|
26
|
-
TextInputState() = default;
|
|
27
|
-
|
|
28
|
-
TextInputState(
|
|
29
|
-
AttributedStringBox attributedStringBox,
|
|
30
|
-
AttributedString reactTreeAttributedString,
|
|
31
|
-
ParagraphAttributes paragraphAttributes,
|
|
32
|
-
int64_t mostRecentEventCount);
|
|
33
|
-
|
|
34
|
-
#ifdef ANDROID
|
|
35
|
-
TextInputState(
|
|
36
|
-
const TextInputState& previousState,
|
|
37
|
-
const folly::dynamic& data);
|
|
38
|
-
folly::dynamic getDynamic() const;
|
|
39
|
-
MapBuffer getMapBuffer() const;
|
|
40
|
-
#endif
|
|
41
|
-
|
|
42
|
-
/*
|
|
43
|
-
* All content of <TextInput> component.
|
|
44
|
-
*/
|
|
45
|
-
AttributedStringBox attributedStringBox;
|
|
46
|
-
|
|
47
|
-
/*
|
|
48
|
-
* All content of <TextInput> component represented as an `AttributedString`.
|
|
49
|
-
* This stores the previous computed *from the React tree*. This usually
|
|
50
|
-
* doesn't change as the TextInput contents are being updated. If it does
|
|
51
|
-
* change, we need to wipe out current contents of the TextInput and replace
|
|
52
|
-
* with the new value from the tree.
|
|
53
|
-
*/
|
|
54
|
-
AttributedString reactTreeAttributedString{};
|
|
55
|
-
|
|
56
|
-
/*
|
|
57
|
-
* Represents all visual attributes of a paragraph of text represented as
|
|
58
|
-
* a ParagraphAttributes.
|
|
59
|
-
*/
|
|
60
|
-
ParagraphAttributes paragraphAttributes;
|
|
61
|
-
|
|
62
|
-
int64_t mostRecentEventCount{0};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Stores an opaque cache ID used on the Java side to refer to a specific
|
|
67
|
-
* AttributedString for measurement purposes only.
|
|
68
|
-
*/
|
|
69
|
-
int64_t cachedAttributedStringId{0};
|
|
70
|
-
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
} // namespace facebook::react
|
package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/HostPlatformTouch.h
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
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 <react/renderer/components/view/BaseTouch.h>
|
|
11
|
-
|
|
12
|
-
namespace facebook::react {
|
|
13
|
-
using HostPlatformTouch = BaseTouch;
|
|
14
|
-
} // namespace facebook::react
|
|
@@ -1,14 +0,0 @@
|
|
|
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 <react/renderer/components/view/BaseViewEventEmitter.h>
|
|
11
|
-
|
|
12
|
-
namespace facebook::react {
|
|
13
|
-
using HostPlatformViewEventEmitter = BaseViewEventEmitter;
|
|
14
|
-
} // namespace facebook::react
|
|
@@ -1,14 +0,0 @@
|
|
|
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 <react/renderer/components/view/BaseViewProps.h>
|
|
11
|
-
|
|
12
|
-
namespace facebook::react {
|
|
13
|
-
using HostPlatformViewProps = BaseViewProps;
|
|
14
|
-
} // namespace facebook::react
|