@office-iss/react-native-win32 0.73.1 → 0.73.2
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/CHANGELOG.json +22 -1
- package/CHANGELOG.md +14 -5
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
- package/Libraries/Text/Text.d.ts +86 -0
- package/Libraries/platform-types.d.ts +1 -1
- package/overrides.json +7 -1
- package/package.json +6 -6
- package/src/Libraries/Text/Text.d.ts +305 -0
- package/src/Libraries/platform-types.d.ts +1 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,28 @@
|
|
|
2
2
|
"name": "@office-iss/react-native-win32",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Mon, 18 Mar 2024 15:15:20 GMT",
|
|
6
|
+
"version": "0.73.2",
|
|
7
|
+
"tag": "@office-iss/react-native-win32_v0.73.2",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "30809111+acoates-ms@users.noreply.github.com",
|
|
12
|
+
"package": "@office-iss/react-native-win32",
|
|
13
|
+
"commit": "1a56053a4c4912271841269db84956d6b525f795",
|
|
14
|
+
"comment": "TextProps from rn-win32 should include win32 properties"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "30809111+acoates-ms@users.noreply.github.com",
|
|
18
|
+
"package": "@office-iss/react-native-win32",
|
|
19
|
+
"commit": "e0cd40b5f2d99ae208f1e1540426ec8275039171",
|
|
20
|
+
"comment": "Update react-native 0.73.4 -> 0.73.6"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"date": "Fri, 09 Feb 2024 17:12:46 GMT",
|
|
6
27
|
"version": "0.73.1",
|
|
7
28
|
"tag": "@office-iss/react-native-win32_v0.73.1",
|
|
8
29
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
# Change Log - @office-iss/react-native-win32
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Mon, 18 Mar 2024 15:15:20 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## 0.73.
|
|
7
|
+
## 0.73.2
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Mon, 18 Mar 2024 15:15:20 GMT
|
|
10
10
|
|
|
11
11
|
### Patches
|
|
12
12
|
|
|
13
|
-
-
|
|
14
|
-
- Update
|
|
13
|
+
- TextProps from rn-win32 should include win32 properties (30809111+acoates-ms@users.noreply.github.com)
|
|
14
|
+
- Update react-native 0.73.4 -> 0.73.6 (30809111+acoates-ms@users.noreply.github.com)
|
|
15
15
|
|
|
16
|
+
## 0.73.1
|
|
17
|
+
|
|
18
|
+
Fri, 09 Feb 2024 17:12:46 GMT
|
|
19
|
+
|
|
20
|
+
### Patches
|
|
21
|
+
|
|
22
|
+
- [Win32] view.focus sometimes skips setting focus (30809111+acoates-ms@users.noreply.github.com)
|
|
23
|
+
- Update to react-native 0.73.4 (30809111+acoates-ms@users.noreply.github.com)
|
|
24
|
+
|
|
16
25
|
## 0.73.0
|
|
17
26
|
|
|
18
27
|
Fri, 08 Dec 2023 00:26:14 GMT
|
|
@@ -192,7 +192,7 @@ export function parseComponentStack(message: string): ComponentStack {
|
|
|
192
192
|
if (!s) {
|
|
193
193
|
return null;
|
|
194
194
|
}
|
|
195
|
-
const match = s.match(/(.*) \(at (.*\.js):([\d]+)\)/);
|
|
195
|
+
const match = s.match(/(.*) \(at (.*\.(?:js|jsx|ts|tsx)):([\d]+)\)/);
|
|
196
196
|
if (!match) {
|
|
197
197
|
return null;
|
|
198
198
|
}
|
package/Libraries/Text/Text.d.ts
CHANGED
|
@@ -101,10 +101,96 @@ export interface TextPropsAndroid {
|
|
|
101
101
|
android_hyphenationFrequency?: 'normal' | 'none' | 'full' | undefined;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
import type {
|
|
105
|
+
IKeyboardEvent,
|
|
106
|
+
IHandledKeyboardEvent,
|
|
107
|
+
} from '../Components/View/ViewPropTypes';
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Role-based text style names.
|
|
111
|
+
*/
|
|
112
|
+
export type TextWin32TextStyle =
|
|
113
|
+
| 'None'
|
|
114
|
+
| 'SmallStandard'
|
|
115
|
+
| 'SmallSecondary'
|
|
116
|
+
| 'MediumStandard'
|
|
117
|
+
| 'MediumSecondary'
|
|
118
|
+
| 'MediumApp'
|
|
119
|
+
| 'MediumBold'
|
|
120
|
+
| 'MediumBoldApp'
|
|
121
|
+
| 'LargeStandard'
|
|
122
|
+
| 'LargePlusStandard'
|
|
123
|
+
| 'ExtraLargeStandard'
|
|
124
|
+
| 'HugeStandard';
|
|
125
|
+
|
|
126
|
+
export interface TextPropsWin32 {
|
|
127
|
+
onKeyDown?: (args: IKeyboardEvent) => void;
|
|
128
|
+
onKeyDownCapture?: (args: IKeyboardEvent) => void;
|
|
129
|
+
onKeyUp?: (args: IKeyboardEvent) => void;
|
|
130
|
+
onKeyUpCapture?: (args: IKeyboardEvent) => void;
|
|
131
|
+
|
|
132
|
+
keyDownEvents?: IHandledKeyboardEvent[];
|
|
133
|
+
keyUpEvents?: IHandledKeyboardEvent[];
|
|
134
|
+
|
|
135
|
+
/** Enables a focusable label with copyability but without character selectability (property:selectable) */
|
|
136
|
+
focusable?: boolean;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* The onBlur event occurs when an element loses focus. The opposite of onBlur is onFocus. Note that in React
|
|
140
|
+
* Native, unlike in the web, the onBlur event bubbles (similar to onFocusOut in the web).
|
|
141
|
+
*
|
|
142
|
+
* `ev.target === ev.currentTarget` when the focus is being lost from this component.
|
|
143
|
+
* `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
|
|
144
|
+
*/
|
|
145
|
+
onBlur?: (ev: NativeSyntheticEvent<{}>) => void;
|
|
146
|
+
/**
|
|
147
|
+
* The onBlur event occurs when an element loses focus. The opposite of onBlur is onFocus. Note that in React
|
|
148
|
+
* Native, unlike in the web, the onBlur event bubbles (similar to onFocusOut in the web).
|
|
149
|
+
*
|
|
150
|
+
* `ev.target === ev.currentTarget` when the focus is being lost from this component.
|
|
151
|
+
* `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
|
|
152
|
+
*/
|
|
153
|
+
onBlurCapture?: (ev: NativeSyntheticEvent<{}>) => void;
|
|
154
|
+
/**
|
|
155
|
+
* The onFocus event occurs when an element gets focus. The opposite of onFocus is onBlur. Note that in React
|
|
156
|
+
* Native, unlike in the web, the onFocus event bubbles (similar to onFocusIn in the web).
|
|
157
|
+
*
|
|
158
|
+
* `ev.target === ev.currentTarget` when the focus is being lost from this component.
|
|
159
|
+
* `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
|
|
160
|
+
*/
|
|
161
|
+
onFocus?: (ev: NativeSyntheticEvent<{}>) => void;
|
|
162
|
+
/**
|
|
163
|
+
* The onFocus event occurs when an element gets focus. The opposite of onFocus is onBlur. Note that in React
|
|
164
|
+
* Native, unlike in the web, the onFocus event bubbles (similar to onFocusIn in the web).
|
|
165
|
+
*
|
|
166
|
+
* `ev.target === ev.currentTarget` when the focus is being lost from this component.
|
|
167
|
+
* `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
|
|
168
|
+
*/
|
|
169
|
+
onFocusCapture?: (ev: NativeSyntheticEvent<{}>) => void;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Role-based styling of the text control. The styles applied include
|
|
173
|
+
* font face, size, weight and color. These styles take precedence over
|
|
174
|
+
* the `style` property.
|
|
175
|
+
*
|
|
176
|
+
* @remarks
|
|
177
|
+
* The default value is `MediumStandard`.
|
|
178
|
+
*
|
|
179
|
+
* When set to `None`, role-based styling is disabled.
|
|
180
|
+
*
|
|
181
|
+
* @deprecated Use `style` instead.
|
|
182
|
+
*/
|
|
183
|
+
textStyle?: TextWin32TextStyle;
|
|
184
|
+
|
|
185
|
+
/** Tooltip displayed on mouse hover of this element */
|
|
186
|
+
tooltip?: string;
|
|
187
|
+
}
|
|
188
|
+
|
|
104
189
|
// https://reactnative.dev/docs/text#props
|
|
105
190
|
export interface TextProps
|
|
106
191
|
extends TextPropsIOS,
|
|
107
192
|
TextPropsAndroid,
|
|
193
|
+
TextPropsWin32,
|
|
108
194
|
AccessibilityProps {
|
|
109
195
|
/**
|
|
110
196
|
* Specifies whether fonts should scale to respect Text Size accessibility settings.
|
|
@@ -11,7 +11,7 @@ export { AccessibilityPropsWin32 } from '@office-iss/react-native-win32/Librarie
|
|
|
11
11
|
export type IViewWin32Props = IViewWin32PropsOnly & AccessibilityPropsWin32;
|
|
12
12
|
export {ViewWin32} from './Components/View/ViewWin32';
|
|
13
13
|
export {IKeyboardEvent, IHandledKeyboardEvent, EventPhase} from './Components/View/ViewPropTypes';
|
|
14
|
-
import {
|
|
14
|
+
import {TextPropsWin32 as ITextWin32PropsOnly} from './Text/Text';
|
|
15
15
|
export type ITextWin32Props = ITextWin32PropsOnly & AccessibilityPropsWin32;
|
|
16
16
|
export {TextWin32TextStyle } from './Components/Text/TextWin32.Props';
|
|
17
17
|
export {TextWin32} from './Components/Text/TextWin32';
|
package/overrides.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"**/__snapshots__/**",
|
|
8
8
|
"src/rntypes/**"
|
|
9
9
|
],
|
|
10
|
-
"baseVersion": "0.73.
|
|
10
|
+
"baseVersion": "0.73.6",
|
|
11
11
|
"overrides": [
|
|
12
12
|
{
|
|
13
13
|
"type": "derived",
|
|
@@ -425,6 +425,12 @@
|
|
|
425
425
|
"baseFile": "packages/react-native/Libraries/StyleSheet/StyleSheet.js",
|
|
426
426
|
"baseHash": "e73098e3a22f8f74328e0a9f387839bb03322bb6"
|
|
427
427
|
},
|
|
428
|
+
{
|
|
429
|
+
"type": "derived",
|
|
430
|
+
"file": "src/Libraries/Text/Text.d.ts",
|
|
431
|
+
"baseFile": "packages/react-native/Libraries/Text/Text.d.ts",
|
|
432
|
+
"baseHash": "4b523469a5c8dcfe53749d1739ccf77c0106375e"
|
|
433
|
+
},
|
|
428
434
|
{
|
|
429
435
|
"type": "derived",
|
|
430
436
|
"file": "src/Libraries/Text/Text.win32.js",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@office-iss/react-native-win32",
|
|
3
|
-
"version": "0.73.
|
|
3
|
+
"version": "0.73.2",
|
|
4
4
|
"description": "Implementation of react native on top of Office's Win32 platform.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@babel/runtime": "^7.0.0",
|
|
28
28
|
"@jest/create-cache-key-function": "^29.6.3",
|
|
29
|
-
"@react-native-community/cli": "12.3.
|
|
30
|
-
"@react-native-community/cli-platform-android": "12.3.
|
|
31
|
-
"@react-native-community/cli-platform-ios": "12.3.
|
|
29
|
+
"@react-native-community/cli": "12.3.6",
|
|
30
|
+
"@react-native-community/cli-platform-android": "12.3.6",
|
|
31
|
+
"@react-native-community/cli-platform-ios": "12.3.6",
|
|
32
32
|
"@react-native/assets-registry": "0.73.1",
|
|
33
33
|
"@react-native/codegen": "0.73.3",
|
|
34
|
-
"@react-native/community-cli-plugin": "0.73.
|
|
34
|
+
"@react-native/community-cli-plugin": "0.73.17",
|
|
35
35
|
"@react-native/gradle-plugin": "0.73.4",
|
|
36
36
|
"@react-native/js-polyfills": "0.73.1",
|
|
37
37
|
"@react-native/metro-config": "^0.73.0",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"just-scripts": "^1.3.3",
|
|
86
86
|
"prettier": "^2.4.1",
|
|
87
87
|
"react": "18.2.0",
|
|
88
|
-
"react-native": "0.73.
|
|
88
|
+
"react-native": "0.73.6",
|
|
89
89
|
"react-native-platform-override": "^1.9.16",
|
|
90
90
|
"typescript": "^4.9.5"
|
|
91
91
|
},
|
|
@@ -0,0 +1,305 @@
|
|
|
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
|
+
* @format
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type * as React from 'react';
|
|
11
|
+
import {Constructor} from '../../types/private/Utilities';
|
|
12
|
+
import {AccessibilityProps} from '../Components/View/ViewAccessibility';
|
|
13
|
+
import {NativeMethods} from '../../types/public/ReactNativeTypes';
|
|
14
|
+
import {ColorValue, StyleProp} from '../StyleSheet/StyleSheet';
|
|
15
|
+
import {TextStyle} from '../StyleSheet/StyleSheetTypes';
|
|
16
|
+
import {
|
|
17
|
+
GestureResponderEvent,
|
|
18
|
+
LayoutChangeEvent,
|
|
19
|
+
NativeSyntheticEvent,
|
|
20
|
+
TextLayoutEventData,
|
|
21
|
+
} from '../Types/CoreEventTypes';
|
|
22
|
+
|
|
23
|
+
export interface TextPropsIOS {
|
|
24
|
+
/**
|
|
25
|
+
* Specifies whether font should be scaled down automatically to fit given style constraints.
|
|
26
|
+
*/
|
|
27
|
+
adjustsFontSizeToFit?: boolean | undefined;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The Dynamic Type scale ramp to apply to this element on iOS.
|
|
31
|
+
*/
|
|
32
|
+
dynamicTypeRamp?:
|
|
33
|
+
| 'caption2'
|
|
34
|
+
| 'caption1'
|
|
35
|
+
| 'footnote'
|
|
36
|
+
| 'subheadline'
|
|
37
|
+
| 'callout'
|
|
38
|
+
| 'body'
|
|
39
|
+
| 'headline'
|
|
40
|
+
| 'title3'
|
|
41
|
+
| 'title2'
|
|
42
|
+
| 'title1'
|
|
43
|
+
| 'largeTitle'
|
|
44
|
+
| undefined;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* When `true`, no visual change is made when text is pressed down. By
|
|
48
|
+
* default, a gray oval highlights the text on press down.
|
|
49
|
+
*/
|
|
50
|
+
suppressHighlighting?: boolean | undefined;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Set line break strategy on iOS.
|
|
54
|
+
*/
|
|
55
|
+
lineBreakStrategyIOS?:
|
|
56
|
+
| 'none'
|
|
57
|
+
| 'standard'
|
|
58
|
+
| 'hangul-word'
|
|
59
|
+
| 'push-out'
|
|
60
|
+
| undefined;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface TextPropsAndroid {
|
|
64
|
+
/**
|
|
65
|
+
* Specifies the disabled state of the text view for testing purposes.
|
|
66
|
+
*/
|
|
67
|
+
disabled?: boolean | undefined;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Lets the user select text, to use the native copy and paste functionality.
|
|
71
|
+
*/
|
|
72
|
+
selectable?: boolean | undefined;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The highlight color of the text.
|
|
76
|
+
*/
|
|
77
|
+
selectionColor?: ColorValue | undefined;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Set text break strategy on Android API Level 23+
|
|
81
|
+
* default is `highQuality`.
|
|
82
|
+
*/
|
|
83
|
+
textBreakStrategy?: 'simple' | 'highQuality' | 'balanced' | undefined;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Determines the types of data converted to clickable URLs in the text element.
|
|
87
|
+
* By default no data types are detected.
|
|
88
|
+
*/
|
|
89
|
+
dataDetectorType?:
|
|
90
|
+
| null
|
|
91
|
+
| 'phoneNumber'
|
|
92
|
+
| 'link'
|
|
93
|
+
| 'email'
|
|
94
|
+
| 'none'
|
|
95
|
+
| 'all'
|
|
96
|
+
| undefined;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Hyphenation strategy
|
|
100
|
+
*/
|
|
101
|
+
android_hyphenationFrequency?: 'normal' | 'none' | 'full' | undefined;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
import type {
|
|
105
|
+
IKeyboardEvent,
|
|
106
|
+
IHandledKeyboardEvent,
|
|
107
|
+
} from '../Components/View/ViewPropTypes';
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Role-based text style names.
|
|
111
|
+
*/
|
|
112
|
+
export type TextWin32TextStyle =
|
|
113
|
+
| 'None'
|
|
114
|
+
| 'SmallStandard'
|
|
115
|
+
| 'SmallSecondary'
|
|
116
|
+
| 'MediumStandard'
|
|
117
|
+
| 'MediumSecondary'
|
|
118
|
+
| 'MediumApp'
|
|
119
|
+
| 'MediumBold'
|
|
120
|
+
| 'MediumBoldApp'
|
|
121
|
+
| 'LargeStandard'
|
|
122
|
+
| 'LargePlusStandard'
|
|
123
|
+
| 'ExtraLargeStandard'
|
|
124
|
+
| 'HugeStandard';
|
|
125
|
+
|
|
126
|
+
export interface TextPropsWin32 {
|
|
127
|
+
onKeyDown?: (args: IKeyboardEvent) => void;
|
|
128
|
+
onKeyDownCapture?: (args: IKeyboardEvent) => void;
|
|
129
|
+
onKeyUp?: (args: IKeyboardEvent) => void;
|
|
130
|
+
onKeyUpCapture?: (args: IKeyboardEvent) => void;
|
|
131
|
+
|
|
132
|
+
keyDownEvents?: IHandledKeyboardEvent[];
|
|
133
|
+
keyUpEvents?: IHandledKeyboardEvent[];
|
|
134
|
+
|
|
135
|
+
/** Enables a focusable label with copyability but without character selectability (property:selectable) */
|
|
136
|
+
focusable?: boolean;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* The onBlur event occurs when an element loses focus. The opposite of onBlur is onFocus. Note that in React
|
|
140
|
+
* Native, unlike in the web, the onBlur event bubbles (similar to onFocusOut in the web).
|
|
141
|
+
*
|
|
142
|
+
* `ev.target === ev.currentTarget` when the focus is being lost from this component.
|
|
143
|
+
* `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
|
|
144
|
+
*/
|
|
145
|
+
onBlur?: (ev: NativeSyntheticEvent<{}>) => void;
|
|
146
|
+
/**
|
|
147
|
+
* The onBlur event occurs when an element loses focus. The opposite of onBlur is onFocus. Note that in React
|
|
148
|
+
* Native, unlike in the web, the onBlur event bubbles (similar to onFocusOut in the web).
|
|
149
|
+
*
|
|
150
|
+
* `ev.target === ev.currentTarget` when the focus is being lost from this component.
|
|
151
|
+
* `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
|
|
152
|
+
*/
|
|
153
|
+
onBlurCapture?: (ev: NativeSyntheticEvent<{}>) => void;
|
|
154
|
+
/**
|
|
155
|
+
* The onFocus event occurs when an element gets focus. The opposite of onFocus is onBlur. Note that in React
|
|
156
|
+
* Native, unlike in the web, the onFocus event bubbles (similar to onFocusIn in the web).
|
|
157
|
+
*
|
|
158
|
+
* `ev.target === ev.currentTarget` when the focus is being lost from this component.
|
|
159
|
+
* `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
|
|
160
|
+
*/
|
|
161
|
+
onFocus?: (ev: NativeSyntheticEvent<{}>) => void;
|
|
162
|
+
/**
|
|
163
|
+
* The onFocus event occurs when an element gets focus. The opposite of onFocus is onBlur. Note that in React
|
|
164
|
+
* Native, unlike in the web, the onFocus event bubbles (similar to onFocusIn in the web).
|
|
165
|
+
*
|
|
166
|
+
* `ev.target === ev.currentTarget` when the focus is being lost from this component.
|
|
167
|
+
* `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
|
|
168
|
+
*/
|
|
169
|
+
onFocusCapture?: (ev: NativeSyntheticEvent<{}>) => void;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Role-based styling of the text control. The styles applied include
|
|
173
|
+
* font face, size, weight and color. These styles take precedence over
|
|
174
|
+
* the `style` property.
|
|
175
|
+
*
|
|
176
|
+
* @remarks
|
|
177
|
+
* The default value is `MediumStandard`.
|
|
178
|
+
*
|
|
179
|
+
* When set to `None`, role-based styling is disabled.
|
|
180
|
+
*
|
|
181
|
+
* @deprecated Use `style` instead.
|
|
182
|
+
*/
|
|
183
|
+
textStyle?: TextWin32TextStyle;
|
|
184
|
+
|
|
185
|
+
/** Tooltip displayed on mouse hover of this element */
|
|
186
|
+
tooltip?: string;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// https://reactnative.dev/docs/text#props
|
|
190
|
+
export interface TextProps
|
|
191
|
+
extends TextPropsIOS,
|
|
192
|
+
TextPropsAndroid,
|
|
193
|
+
TextPropsWin32,
|
|
194
|
+
AccessibilityProps {
|
|
195
|
+
/**
|
|
196
|
+
* Specifies whether fonts should scale to respect Text Size accessibility settings.
|
|
197
|
+
* The default is `true`.
|
|
198
|
+
*/
|
|
199
|
+
allowFontScaling?: boolean | undefined;
|
|
200
|
+
|
|
201
|
+
children?: React.ReactNode | undefined;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* This can be one of the following values:
|
|
205
|
+
*
|
|
206
|
+
* - `head` - The line is displayed so that the end fits in the container and the missing text
|
|
207
|
+
* at the beginning of the line is indicated by an ellipsis glyph. e.g., "...wxyz"
|
|
208
|
+
* - `middle` - The line is displayed so that the beginning and end fit in the container and the
|
|
209
|
+
* missing text in the middle is indicated by an ellipsis glyph. "ab...yz"
|
|
210
|
+
* - `tail` - The line is displayed so that the beginning fits in the container and the
|
|
211
|
+
* missing text at the end of the line is indicated by an ellipsis glyph. e.g., "abcd..."
|
|
212
|
+
* - `clip` - Lines are not drawn past the edge of the text container.
|
|
213
|
+
*
|
|
214
|
+
* The default is `tail`.
|
|
215
|
+
*
|
|
216
|
+
* `numberOfLines` must be set in conjunction with this prop.
|
|
217
|
+
*
|
|
218
|
+
* > `clip` is working only for iOS
|
|
219
|
+
*/
|
|
220
|
+
ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip' | undefined;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Used to reference react managed views from native code.
|
|
224
|
+
*/
|
|
225
|
+
id?: string | undefined;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Line Break mode. Works only with numberOfLines.
|
|
229
|
+
* clip is working only for iOS
|
|
230
|
+
*/
|
|
231
|
+
lineBreakMode?: 'head' | 'middle' | 'tail' | 'clip' | undefined;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Used to truncate the text with an ellipsis after computing the text
|
|
235
|
+
* layout, including line wrapping, such that the total number of lines
|
|
236
|
+
* does not exceed this number.
|
|
237
|
+
*
|
|
238
|
+
* This prop is commonly used with `ellipsizeMode`.
|
|
239
|
+
*/
|
|
240
|
+
numberOfLines?: number | undefined;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Invoked on mount and layout changes with
|
|
244
|
+
*
|
|
245
|
+
* {nativeEvent: { layout: {x, y, width, height}}}.
|
|
246
|
+
*/
|
|
247
|
+
onLayout?: ((event: LayoutChangeEvent) => void) | undefined;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Invoked on Text layout
|
|
251
|
+
*/
|
|
252
|
+
onTextLayout?:
|
|
253
|
+
| ((event: NativeSyntheticEvent<TextLayoutEventData>) => void)
|
|
254
|
+
| undefined;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* This function is called on press.
|
|
258
|
+
* Text intrinsically supports press handling with a default highlight state (which can be disabled with suppressHighlighting).
|
|
259
|
+
*/
|
|
260
|
+
onPress?: ((event: GestureResponderEvent) => void) | undefined;
|
|
261
|
+
|
|
262
|
+
onPressIn?: ((event: GestureResponderEvent) => void) | undefined;
|
|
263
|
+
onPressOut?: ((event: GestureResponderEvent) => void) | undefined;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* This function is called on long press.
|
|
267
|
+
* e.g., `onLongPress={this.increaseSize}>``
|
|
268
|
+
*/
|
|
269
|
+
onLongPress?: ((event: GestureResponderEvent) => void) | undefined;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* @see https://reactnative.dev/docs/text#style
|
|
273
|
+
*/
|
|
274
|
+
style?: StyleProp<TextStyle> | undefined;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Used to locate this view in end-to-end tests.
|
|
278
|
+
*/
|
|
279
|
+
testID?: string | undefined;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Used to reference react managed views from native code.
|
|
283
|
+
*/
|
|
284
|
+
nativeID?: string | undefined;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Specifies largest possible scale a font can reach when allowFontScaling is enabled. Possible values:
|
|
288
|
+
* - null/undefined (default): inherit from the parent node or the global default (0)
|
|
289
|
+
* - 0: no max, ignore parent/global default
|
|
290
|
+
* - >= 1: sets the maxFontSizeMultiplier of this node to this value
|
|
291
|
+
*/
|
|
292
|
+
maxFontSizeMultiplier?: number | null | undefined;
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Specifies smallest possible scale a font can reach when adjustsFontSizeToFit is enabled. (values 0.01-1.0).
|
|
296
|
+
*/
|
|
297
|
+
minimumFontScale?: number | undefined;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* A React component for displaying text which supports nesting, styling, and touch handling.
|
|
302
|
+
*/
|
|
303
|
+
declare class TextComponent extends React.Component<TextProps> {}
|
|
304
|
+
declare const TextBase: Constructor<NativeMethods> & typeof TextComponent;
|
|
305
|
+
export class Text extends TextBase {}
|
|
@@ -11,7 +11,7 @@ export { AccessibilityPropsWin32 } from '@office-iss/react-native-win32/Librarie
|
|
|
11
11
|
export type IViewWin32Props = IViewWin32PropsOnly & AccessibilityPropsWin32;
|
|
12
12
|
export {ViewWin32} from './Components/View/ViewWin32';
|
|
13
13
|
export {IKeyboardEvent, IHandledKeyboardEvent, EventPhase} from './Components/View/ViewPropTypes';
|
|
14
|
-
import {
|
|
14
|
+
import {TextPropsWin32 as ITextWin32PropsOnly} from './Text/Text';
|
|
15
15
|
export type ITextWin32Props = ITextWin32PropsOnly & AccessibilityPropsWin32;
|
|
16
16
|
export {TextWin32TextStyle } from './Components/Text/TextWin32.Props';
|
|
17
17
|
export {TextWin32} from './Components/Text/TextWin32';
|