react-native-windows 0.81.0-preview.4 → 0.81.0-preview.6
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/Directory.Build.props +5 -2
- package/Folly/Folly.vcxproj +6 -7
- package/Folly/cgmanifest.json +1 -1
- package/Microsoft.ReactNative/ReactHost/ReactHost.cpp +0 -4
- package/PropertySheets/Generated/PackageVersion.g.props +2 -2
- package/PropertySheets/React.Cpp.props +1 -0
- package/package.json +1 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/css/CSSTokenizer.h +0 -232
package/Directory.Build.props
CHANGED
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
<IncludeSource Condition="'$(Configuration)' == 'Release'">false</IncludeSource>
|
|
28
28
|
<!-- When bumping the Folly version, be sure to bump the git hash of that version's commit, find the matching fastfloat dependency and build Folly.vcxproj (to update its cgmanifest.json) too. -->
|
|
29
29
|
<FollyVersion>2024.10.14.00</FollyVersion>
|
|
30
|
-
<FastFloatVersion>
|
|
30
|
+
<FastFloatVersion>8.0.0</FastFloatVersion>
|
|
31
31
|
<FollyCommitHash>ad90720829db5ba0c3d0e44994856dcce33d7940</FollyCommitHash>
|
|
32
|
-
<FastFloatCommitHash>
|
|
32
|
+
<FastFloatCommitHash>77cc847c842c49e7e3477c1e95da2b6540166d66</FastFloatCommitHash>
|
|
33
33
|
<!-- When bumping the fmt version, be sure to bump the git hash of that version's commit and build fmt.vcxproj (to update its cgmanifest.json) too. -->
|
|
34
34
|
<FmtVersion>10.1.0</FmtVersion>
|
|
35
35
|
<FmtCommitHash>ca2e3685b160617d3d95fcd9e789c4e06ca88</FmtCommitHash>
|
|
@@ -52,6 +52,9 @@
|
|
|
52
52
|
<FollyDir Condition="'$(FollyDir)' == '' AND Exists('$([MSBuild]::NormalizeDirectory($(ReactNativeDir)..\..\node_modules))')">$(ReactNativeDir)..\..\node_modules\.folly\folly-$(FollyVersion)</FollyDir>
|
|
53
53
|
<FollyDir>$([MSBuild]::NormalizeDirectory($(FollyDir)))</FollyDir>
|
|
54
54
|
|
|
55
|
+
<FastFloatDir Condition="'$(FastFloatDir)' == '' AND Exists('$([MSBuild]::NormalizeDirectory($(ReactNativeDir)..\..\node_modules))')">$(ReactNativeDir)..\..\node_modules\.fastfloat\fast_float-$(FastFloatVersion)</FastFloatDir>
|
|
56
|
+
<FastFloatDir>$([MSBuild]::NormalizeDirectory($(FastFloatDir)))</FastFloatDir>
|
|
57
|
+
|
|
55
58
|
<FmtDir Condition="'$(FmtDir)' == '' AND Exists('$([MSBuild]::NormalizeDirectory($(ReactNativeDir)..\..\node_modules))')">$(ReactNativeDir)..\..\node_modules\.fmt\fmt-$(FmtVersion)</FmtDir>
|
|
56
59
|
<FmtDir>$([MSBuild]::NormalizeDirectory($(FmtDir)))</FmtDir>
|
|
57
60
|
|
package/Folly/Folly.vcxproj
CHANGED
|
@@ -243,7 +243,6 @@
|
|
|
243
243
|
<ClInclude Include="$(FollyDir)\folly\Uri.h" />
|
|
244
244
|
<ClInclude Include="$(FollyDir)\folly\Utility.h" />
|
|
245
245
|
<ClInclude Include="$(FollyDir)\folly\Varint.h" />
|
|
246
|
-
<ClInclude Include="$(FollyDir)\..\fast_float-6.1.4\include\fast_float\fast_float.h" />
|
|
247
246
|
<ClInclude Include="pch.h" />
|
|
248
247
|
</ItemGroup>
|
|
249
248
|
<ItemGroup>
|
|
@@ -271,7 +270,7 @@
|
|
|
271
270
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
|
272
271
|
<CompileAsWinRT>false</CompileAsWinRT>
|
|
273
272
|
<SDLCheck>true</SDLCheck>
|
|
274
|
-
<AdditionalIncludeDirectories>$(ReactNativeWindowsDir)stubs;$(FollyDir);$(
|
|
273
|
+
<AdditionalIncludeDirectories>$(ReactNativeWindowsDir)stubs;$(FollyDir);$(FastFloatDir)\include;$(FmtDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
275
274
|
<PreprocessorDefinitions>FOLLY_CFG_NO_COROUTINES;FOLLY_NO_CONFIG;NOMINMAX;_CRT_SECURE_NO_WARNINGS;WINAPI_PARTITION_APP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
276
275
|
<ForcedUsingFiles />
|
|
277
276
|
<DisableSpecificWarnings>4251;4293;4305;4800;4804;4310;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
|
@@ -292,8 +291,8 @@
|
|
|
292
291
|
<CGManifestFile>$(MSBuildThisFileDirectory)cgmanifest.json</CGManifestFile>
|
|
293
292
|
</PropertyGroup>
|
|
294
293
|
<PropertyGroup>
|
|
295
|
-
<FastFloatZipDir>$(
|
|
296
|
-
<FastFloatZipFile>$(
|
|
294
|
+
<FastFloatZipDir>$(FastFloatDir)..\.fastfloatzip</FastFloatZipDir>
|
|
295
|
+
<FastFloatZipFile>$(FastFloatZipDir)\fastfloat.zip</FastFloatZipFile>
|
|
297
296
|
</PropertyGroup>
|
|
298
297
|
<Target Name="DownloadFolly" BeforeTargets="PrepareForBuild" Inputs="$(FollyZipFile)" Outputs="$(FollyZipFile)">
|
|
299
298
|
<Message Importance="High" Text="Downloading folly..." />
|
|
@@ -320,11 +319,11 @@
|
|
|
320
319
|
OverwriteReadOnlyFiles="true" />
|
|
321
320
|
</Target>
|
|
322
321
|
<Target Name="UnzipFastFloat" BeforeTargets="PrepareForBuild" DependsOnTargets="DownloadFastFloat">
|
|
323
|
-
<Message Condition="!Exists('$(
|
|
322
|
+
<Message Condition="!Exists('$(FastFloatDir)\include\fast_float\fast_float.h')" Importance="High" Text="Unzipping FastFloat to $([MSBuild]::NormalizePath($(FastFloatDir)..))." />
|
|
324
323
|
<Unzip
|
|
325
|
-
Condition="!Exists('$(
|
|
324
|
+
Condition="!Exists('$(FastFloatDir)\include\fast_float\fast_float.h')"
|
|
326
325
|
SourceFiles="$(FastFloatZipFile)"
|
|
327
|
-
DestinationFolder="$([MSBuild]::NormalizePath($(
|
|
326
|
+
DestinationFolder="$([MSBuild]::NormalizePath($(FastFloatDir)..))"
|
|
328
327
|
OverwriteReadOnlyFiles="true" />
|
|
329
328
|
</Target>
|
|
330
329
|
<Target Name="WriteCGManifest" BeforeTargets="PrepareForBuild" DependsOnTargets="DownloadFolly" Inputs="$(FollyZipFile)" Outputs="$(CGManifestFile)">
|
package/Folly/cgmanifest.json
CHANGED
|
@@ -310,10 +310,6 @@ class ReactNativeWindowsFeatureFlags : public facebook::react::ReactNativeFeatur
|
|
|
310
310
|
bool fuseboxEnabledRelease() override {
|
|
311
311
|
return true; // Enable Fusebox (modern CDP backend) by default for React Native Windows
|
|
312
312
|
}
|
|
313
|
-
|
|
314
|
-
bool fuseboxNetworkInspectionEnabled() override {
|
|
315
|
-
return true; // Enable network inspection support in Fusebox
|
|
316
|
-
}
|
|
317
313
|
};
|
|
318
314
|
|
|
319
315
|
//=============================================================================================
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
-->
|
|
11
11
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
12
12
|
<PropertyGroup>
|
|
13
|
-
<ReactNativeWindowsVersion>0.81.0-preview.
|
|
13
|
+
<ReactNativeWindowsVersion>0.81.0-preview.6</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
15
|
<ReactNativeWindowsMinor>81</ReactNativeWindowsMinor>
|
|
16
16
|
<ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
|
|
17
17
|
<ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
|
|
18
|
-
<ReactNativeWindowsCommitId>
|
|
18
|
+
<ReactNativeWindowsCommitId>15b72b3f2121e6f7d3d8aabff5e7f1f26e989829</ReactNativeWindowsCommitId>
|
|
19
19
|
</PropertyGroup>
|
|
20
20
|
</Project>
|
package/package.json
CHANGED
|
@@ -1,232 +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 <cmath>
|
|
11
|
-
#include <string_view>
|
|
12
|
-
|
|
13
|
-
#include <folly/../../fast_float-6.1.4/include/fast_float/fast_float.h> // [Windows] - Full relative path needed to find file
|
|
14
|
-
#include <react/renderer/css/CSSToken.h>
|
|
15
|
-
|
|
16
|
-
namespace facebook::react {
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* A minimal tokenizer for a subset of CSS syntax.
|
|
20
|
-
*
|
|
21
|
-
* This is based on the W3C CSS Syntax specification, with simplifications made
|
|
22
|
-
* for syntax which React Native does not attempt to support.
|
|
23
|
-
* https://www.w3.org/TR/css-syntax-3/#tokenizing-and-parsing
|
|
24
|
-
*/
|
|
25
|
-
class CSSTokenizer {
|
|
26
|
-
public:
|
|
27
|
-
explicit constexpr CSSTokenizer(std::string_view characters)
|
|
28
|
-
: remainingCharacters_{characters} {}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Returns the next token according to the algorithm described in
|
|
32
|
-
* https://www.w3.org/TR/css-syntax-3/#consume-token
|
|
33
|
-
*/
|
|
34
|
-
constexpr CSSToken next() {
|
|
35
|
-
char nextChar = peek();
|
|
36
|
-
|
|
37
|
-
if (isWhitespace(nextChar)) {
|
|
38
|
-
return consumeWhitespace();
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
switch (nextChar) {
|
|
42
|
-
case '(':
|
|
43
|
-
return consumeCharacter(CSSTokenType::OpenParen);
|
|
44
|
-
case ')':
|
|
45
|
-
return consumeCharacter(CSSTokenType::CloseParen);
|
|
46
|
-
case '[':
|
|
47
|
-
return consumeCharacter(CSSTokenType::OpenSquare);
|
|
48
|
-
case ']':
|
|
49
|
-
return consumeCharacter(CSSTokenType::CloseSquare);
|
|
50
|
-
case '{':
|
|
51
|
-
return consumeCharacter(CSSTokenType::OpenCurly);
|
|
52
|
-
case '}':
|
|
53
|
-
return consumeCharacter(CSSTokenType::CloseCurly);
|
|
54
|
-
case ',':
|
|
55
|
-
return consumeCharacter(CSSTokenType::Comma);
|
|
56
|
-
case '+':
|
|
57
|
-
case '-':
|
|
58
|
-
case '.':
|
|
59
|
-
if (wouldStartNumber()) {
|
|
60
|
-
return consumeNumeric();
|
|
61
|
-
} else {
|
|
62
|
-
return consumeDelim();
|
|
63
|
-
}
|
|
64
|
-
case '#':
|
|
65
|
-
if (isIdent(peek(1))) {
|
|
66
|
-
return consumeHash();
|
|
67
|
-
} else {
|
|
68
|
-
return consumeDelim();
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if (isDigit(nextChar)) {
|
|
73
|
-
return consumeNumeric();
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
if (isIdentStart(nextChar)) {
|
|
77
|
-
return consumeIdentlikeToken();
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
if (nextChar == '\0') {
|
|
81
|
-
return CSSToken{CSSTokenType::EndOfFile};
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
return consumeDelim();
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
private:
|
|
88
|
-
constexpr char peek(size_t i = 0) const {
|
|
89
|
-
auto index = position_ + i;
|
|
90
|
-
return index >= remainingCharacters_.size() ? '\0'
|
|
91
|
-
: remainingCharacters_[index];
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
constexpr void advance() {
|
|
95
|
-
position_ += 1;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
constexpr CSSToken consumeDelim() {
|
|
99
|
-
advance();
|
|
100
|
-
return {CSSTokenType::Delim, consumeRunningValue()};
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
constexpr CSSToken consumeCharacter(CSSTokenType tokenType) {
|
|
104
|
-
advance();
|
|
105
|
-
consumeRunningValue();
|
|
106
|
-
return CSSToken{tokenType};
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
constexpr CSSToken consumeWhitespace() {
|
|
110
|
-
while (isWhitespace(peek())) {
|
|
111
|
-
advance();
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
consumeRunningValue();
|
|
115
|
-
return CSSToken{CSSTokenType::WhiteSpace};
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
constexpr bool wouldStartNumber() const {
|
|
119
|
-
// https://www.w3.org/TR/css-syntax-3/#starts-with-a-number
|
|
120
|
-
if (peek() == '+' || peek() == '-') {
|
|
121
|
-
if (isDigit(peek(1))) {
|
|
122
|
-
return true;
|
|
123
|
-
}
|
|
124
|
-
if (peek(1) == '.' && isDigit(peek(2))) {
|
|
125
|
-
return true;
|
|
126
|
-
}
|
|
127
|
-
} else if (peek() == '.' && isDigit(peek(1))) {
|
|
128
|
-
return true;
|
|
129
|
-
} else if (isDigit(peek())) {
|
|
130
|
-
return true;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
return false;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
constexpr CSSToken consumeNumber() {
|
|
137
|
-
// https://www.w3.org/TR/css-syntax-3/#consume-number
|
|
138
|
-
// https://www.w3.org/TR/css-syntax-3/#convert-a-string-to-a-number
|
|
139
|
-
auto* b = remainingCharacters_.data();
|
|
140
|
-
auto* e = b + remainingCharacters_.size();
|
|
141
|
-
|
|
142
|
-
float value;
|
|
143
|
-
fast_float::parse_options options{
|
|
144
|
-
fast_float::chars_format::general};
|
|
145
|
-
auto [ptr, ec] = fast_float::from_chars_advanced(b, e, value, options);
|
|
146
|
-
|
|
147
|
-
consumeRunningValue();
|
|
148
|
-
return {CSSTokenType::Number, value};
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
constexpr CSSToken consumeNumeric() {
|
|
152
|
-
// https://www.w3.org/TR/css-syntax-3/#consume-numeric-token
|
|
153
|
-
auto numberToken = consumeNumber();
|
|
154
|
-
|
|
155
|
-
if (isIdent(peek())) {
|
|
156
|
-
auto ident = consumeIdentSequence();
|
|
157
|
-
return {
|
|
158
|
-
CSSTokenType::Dimension,
|
|
159
|
-
numberToken.numericValue(),
|
|
160
|
-
ident.stringValue()};
|
|
161
|
-
} else if (peek() == '%') {
|
|
162
|
-
advance();
|
|
163
|
-
consumeRunningValue();
|
|
164
|
-
return {CSSTokenType::Percentage, numberToken.numericValue()};
|
|
165
|
-
} else {
|
|
166
|
-
return numberToken;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
constexpr CSSToken consumeIdentlikeToken() {
|
|
171
|
-
// https://www.w3.org/TR/css-syntax-3/#consume-ident-like-token
|
|
172
|
-
auto ident = consumeIdentSequence();
|
|
173
|
-
if (peek() == '(') {
|
|
174
|
-
advance();
|
|
175
|
-
consumeRunningValue();
|
|
176
|
-
return {CSSTokenType::Function, ident.stringValue()};
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
return ident;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
constexpr CSSToken consumeIdentSequence() {
|
|
183
|
-
// https://www.w3.org/TR/css-syntax-3/#consume-an-ident-sequence
|
|
184
|
-
while (isIdent(peek())) {
|
|
185
|
-
advance();
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
return {CSSTokenType::Ident, consumeRunningValue()};
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
constexpr CSSToken consumeHash() {
|
|
192
|
-
// https://www.w3.org/TR/css-syntax-3/#consume-token (U+0023 NUMBER SIGN)
|
|
193
|
-
advance();
|
|
194
|
-
consumeRunningValue();
|
|
195
|
-
|
|
196
|
-
return {CSSTokenType::Hash, consumeIdentSequence().stringValue()};
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
constexpr std::string_view consumeRunningValue() {
|
|
200
|
-
auto next = remainingCharacters_.substr(0, position_);
|
|
201
|
-
remainingCharacters_ = remainingCharacters_.substr(next.size());
|
|
202
|
-
position_ = 0;
|
|
203
|
-
return next;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
static constexpr bool isDigit(char c) {
|
|
207
|
-
// https://www.w3.org/TR/css-syntax-3/#digit
|
|
208
|
-
return c >= '0' && c <= '9';
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
static constexpr bool isIdentStart(char c) {
|
|
212
|
-
// https://www.w3.org/TR/css-syntax-3/#ident-start-code-point
|
|
213
|
-
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_' ||
|
|
214
|
-
static_cast<unsigned char>(c) > 0x80;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
static constexpr bool isIdent(char c) {
|
|
218
|
-
{
|
|
219
|
-
// https://www.w3.org/TR/css-syntax-3/#ident-code-point
|
|
220
|
-
return isIdentStart(c) || isDigit(c) || c == '-';
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
static constexpr bool isWhitespace(char c) {
|
|
225
|
-
// https://www.w3.org/TR/css-syntax-3/#whitespace
|
|
226
|
-
return c == ' ' || c == '\t' || c == '\r' || c == '\n';
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
std::string_view remainingCharacters_;
|
|
230
|
-
size_t position_{0};
|
|
231
|
-
};
|
|
232
|
-
} // namespace facebook::react
|