react-native-windows 0.76.0-preview.4 → 0.76.0-preview.5
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.
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
import type {TextStyleProp} from '../StyleSheet/StyleSheet';
|
|
12
|
+
import type {____TextStyle_Internal as TextStyleInternal} from '../StyleSheet/StyleSheetTypes';
|
|
11
13
|
import type {PressEvent} from '../Types/CoreEventTypes';
|
|
12
14
|
import type {NativeTextProps} from './TextNativeComponent';
|
|
13
15
|
import type {PressRetentionOffset, TextProps} from './TextProps';
|
|
@@ -23,7 +25,7 @@ import * as React from 'react';
|
|
|
23
25
|
import {useContext, useMemo, useState} from 'react';
|
|
24
26
|
|
|
25
27
|
const View = require('../Components/View/View'); // [Windows]
|
|
26
|
-
import {type
|
|
28
|
+
import {type ViewStyleProp} from '../StyleSheet/StyleSheet'; // [Windows]
|
|
27
29
|
|
|
28
30
|
type TextForwardRef = React.ElementRef<
|
|
29
31
|
typeof NativeText | typeof NativeVirtualText,
|
|
@@ -144,25 +146,32 @@ const Text: React.AbstractComponent<TextProps, TextForwardRef> =
|
|
|
144
146
|
|
|
145
147
|
let _selectable = selectable;
|
|
146
148
|
|
|
147
|
-
|
|
149
|
+
let processedStyle = flattenStyle<TextStyleProp>(_style);
|
|
148
150
|
if (processedStyle != null) {
|
|
151
|
+
let overrides: ?{...TextStyleInternal} = null;
|
|
149
152
|
if (typeof processedStyle.fontWeight === 'number') {
|
|
150
|
-
|
|
151
|
-
|
|
153
|
+
overrides = overrides || ({}: {...TextStyleInternal});
|
|
154
|
+
overrides.fontWeight =
|
|
155
|
+
// $FlowFixMe[incompatible-cast]
|
|
156
|
+
(processedStyle.fontWeight.toString(): TextStyleInternal['fontWeight']);
|
|
152
157
|
}
|
|
153
158
|
|
|
154
159
|
if (processedStyle.userSelect != null) {
|
|
155
160
|
_selectable = userSelectToSelectableMap[processedStyle.userSelect];
|
|
156
|
-
|
|
157
|
-
|
|
161
|
+
overrides = overrides || ({}: {...TextStyleInternal});
|
|
162
|
+
overrides.userSelect = undefined;
|
|
158
163
|
}
|
|
159
164
|
|
|
160
165
|
if (processedStyle.verticalAlign != null) {
|
|
161
|
-
|
|
162
|
-
|
|
166
|
+
overrides = overrides || ({}: {...TextStyleInternal});
|
|
167
|
+
overrides.textAlignVertical =
|
|
163
168
|
verticalAlignToTextAlignVerticalMap[processedStyle.verticalAlign];
|
|
164
|
-
|
|
165
|
-
|
|
169
|
+
overrides.verticalAlign = undefined;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
if (overrides != null) {
|
|
173
|
+
// $FlowFixMe[incompatible-type]
|
|
174
|
+
_style = [_style, overrides];
|
|
166
175
|
}
|
|
167
176
|
}
|
|
168
177
|
|
|
@@ -185,7 +194,7 @@ const Text: React.AbstractComponent<TextProps, TextForwardRef> =
|
|
|
185
194
|
numberOfLines: _numberOfLines,
|
|
186
195
|
selectable: _selectable,
|
|
187
196
|
selectionColor: _selectionColor,
|
|
188
|
-
style:
|
|
197
|
+
style: _style,
|
|
189
198
|
disabled: disabled,
|
|
190
199
|
children,
|
|
191
200
|
}}
|
|
@@ -222,7 +231,7 @@ const Text: React.AbstractComponent<TextProps, TextForwardRef> =
|
|
|
222
231
|
ref={forwardedRef}
|
|
223
232
|
selectable={_selectable}
|
|
224
233
|
selectionColor={_selectionColor}
|
|
225
|
-
style={
|
|
234
|
+
style={_style}
|
|
226
235
|
disabled={disabled}>
|
|
227
236
|
{children}
|
|
228
237
|
</NativeVirtualText>
|
|
@@ -269,7 +278,7 @@ const Text: React.AbstractComponent<TextProps, TextForwardRef> =
|
|
|
269
278
|
numberOfLines: _numberOfLines,
|
|
270
279
|
selectable: _selectable,
|
|
271
280
|
selectionColor: _selectionColor,
|
|
272
|
-
style:
|
|
281
|
+
style: _style,
|
|
273
282
|
children,
|
|
274
283
|
}}
|
|
275
284
|
textPressabilityProps={{
|
|
@@ -307,7 +316,7 @@ const Text: React.AbstractComponent<TextProps, TextForwardRef> =
|
|
|
307
316
|
ref={forwardedRef}
|
|
308
317
|
selectable={_selectable}
|
|
309
318
|
selectionColor={_selectionColor}
|
|
310
|
-
style={
|
|
319
|
+
style={_style}>
|
|
311
320
|
{children}
|
|
312
321
|
</NativeText>
|
|
313
322
|
);
|
|
@@ -328,50 +337,6 @@ const Text: React.AbstractComponent<TextProps, TextForwardRef> =
|
|
|
328
337
|
styleProps.borderStartWidth != null ||
|
|
329
338
|
styleProps.borderTopWidth != null)
|
|
330
339
|
) {
|
|
331
|
-
let textStyleProps = Array.isArray(styleProps)
|
|
332
|
-
? // $FlowFixMe[underconstrained-implicit-instantiation]
|
|
333
|
-
flattenStyle(styleProps)
|
|
334
|
-
: styleProps;
|
|
335
|
-
let {
|
|
336
|
-
// $FlowFixMe[prop-missing]
|
|
337
|
-
margin,
|
|
338
|
-
// $FlowFixMe[prop-missing]
|
|
339
|
-
marginBottom,
|
|
340
|
-
// $FlowFixMe[prop-missing]
|
|
341
|
-
marginEnd,
|
|
342
|
-
// $FlowFixMe[prop-missing]
|
|
343
|
-
marginHorizontal,
|
|
344
|
-
// $FlowFixMe[prop-missing]
|
|
345
|
-
marginLeft,
|
|
346
|
-
// $FlowFixMe[prop-missing]
|
|
347
|
-
marginRight,
|
|
348
|
-
// $FlowFixMe[prop-missing]
|
|
349
|
-
marginStart,
|
|
350
|
-
// $FlowFixMe[prop-missing]
|
|
351
|
-
marginTop,
|
|
352
|
-
// $FlowFixMe[prop-missing]
|
|
353
|
-
marginVertical,
|
|
354
|
-
// $FlowFixMe[prop-missing]
|
|
355
|
-
padding,
|
|
356
|
-
// $FlowFixMe[prop-missing]
|
|
357
|
-
paddingBottom,
|
|
358
|
-
// $FlowFixMe[prop-missing]
|
|
359
|
-
paddingEnd,
|
|
360
|
-
// $FlowFixMe[prop-missing]
|
|
361
|
-
paddingHorizontal,
|
|
362
|
-
// $FlowFixMe[prop-missing]
|
|
363
|
-
paddingLeft,
|
|
364
|
-
// $FlowFixMe[prop-missing]
|
|
365
|
-
paddingRight,
|
|
366
|
-
// $FlowFixMe[prop-missing]
|
|
367
|
-
paddingStart,
|
|
368
|
-
// $FlowFixMe[prop-missing]
|
|
369
|
-
paddingTop,
|
|
370
|
-
// $FlowFixMe[prop-missing]
|
|
371
|
-
paddingVertical,
|
|
372
|
-
// $FlowFixMe[not-an-object]
|
|
373
|
-
...rest
|
|
374
|
-
} = textStyleProps != null ? textStyleProps : {};
|
|
375
340
|
return (
|
|
376
341
|
<View style={styleProps}>
|
|
377
342
|
<TextAncestor.Provider value={true}>
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
-->
|
|
11
11
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
12
12
|
<PropertyGroup>
|
|
13
|
-
<ReactNativeWindowsVersion>0.76.0-preview.
|
|
13
|
+
<ReactNativeWindowsVersion>0.76.0-preview.5</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
15
|
<ReactNativeWindowsMinor>76</ReactNativeWindowsMinor>
|
|
16
16
|
<ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
|
|
17
17
|
<ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
|
|
18
|
-
<ReactNativeWindowsCommitId>
|
|
18
|
+
<ReactNativeWindowsCommitId>0091bbb94a83bc73c1a62acf821256b48c65dee2</ReactNativeWindowsCommitId>
|
|
19
19
|
</PropertyGroup>
|
|
20
20
|
</Project>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-windows",
|
|
3
|
-
"version": "0.76.0-preview.
|
|
3
|
+
"version": "0.76.0-preview.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
"@react-native-community/cli-platform-ios": "15.0.0-alpha.2",
|
|
29
29
|
"@react-native-windows/cli": "0.76.0-preview.4",
|
|
30
30
|
"@react-native/assets": "1.0.0",
|
|
31
|
-
"@react-native/assets-registry": "0.76.0
|
|
32
|
-
"@react-native/codegen": "0.76.0
|
|
33
|
-
"@react-native/community-cli-plugin": "0.76.0
|
|
34
|
-
"@react-native/gradle-plugin": "0.76.0
|
|
35
|
-
"@react-native/js-polyfills": "0.76.0
|
|
36
|
-
"@react-native/normalize-colors": "0.76.0
|
|
37
|
-
"@react-native/virtualized-lists": "0.76.0
|
|
31
|
+
"@react-native/assets-registry": "0.76.0",
|
|
32
|
+
"@react-native/codegen": "0.76.0",
|
|
33
|
+
"@react-native/community-cli-plugin": "0.76.0",
|
|
34
|
+
"@react-native/gradle-plugin": "0.76.0",
|
|
35
|
+
"@react-native/js-polyfills": "0.76.0",
|
|
36
|
+
"@react-native/normalize-colors": "0.76.0",
|
|
37
|
+
"@react-native/virtualized-lists": "0.76.0",
|
|
38
38
|
"abort-controller": "^3.0.0",
|
|
39
39
|
"anser": "^1.4.9",
|
|
40
40
|
"ansi-regex": "^5.0.0",
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
"yargs": "^17.6.2"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
+
"@react-native/metro-config": "0.76.0",
|
|
72
73
|
"@react-native-windows/codegen": "0.76.0-preview.2",
|
|
73
|
-
"@react-native/metro-config": "0.76.0-rc.6",
|
|
74
74
|
"@rnw-scripts/babel-react-native-config": "0.0.0",
|
|
75
75
|
"@rnw-scripts/eslint-config": "1.2.27",
|
|
76
76
|
"@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.31",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"just-scripts": "^1.3.3",
|
|
86
86
|
"prettier": "2.8.8",
|
|
87
87
|
"react": "18.3.1",
|
|
88
|
-
"react-native": "0.76.0
|
|
88
|
+
"react-native": "0.76.0",
|
|
89
89
|
"react-native-platform-override": "^1.9.46",
|
|
90
90
|
"react-refresh": "^0.14.0",
|
|
91
91
|
"typescript": "5.0.4"
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"peerDependencies": {
|
|
94
94
|
"@types/react": "^18.2.6",
|
|
95
95
|
"react": "^18.2.0",
|
|
96
|
-
"react-native": "0.76.0
|
|
96
|
+
"react-native": "^0.76.0"
|
|
97
97
|
},
|
|
98
98
|
"beachball": {
|
|
99
99
|
"defaultNpmTag": "preview",
|