1 | import { View, AddChildFromBuilder } from '../core/view';
|
2 | import { FormattedString } from './formatted-string';
|
3 | import { Style } from '../styling/style';
|
4 | import { Length } from '../styling/style-properties';
|
5 | import { Property, CssProperty, InheritedCssProperty } from '../core/properties';
|
6 | import { CoreTypes } from '../../core-types';
|
7 | import { ShadowCSSValues } from '../styling/css-shadow';
|
8 | import { StrokeCSSValues } from '../styling/css-stroke';
|
9 |
|
10 | export class TextBase extends View implements AddChildFromBuilder {
|
11 | |
12 |
|
13 |
|
14 |
|
15 | public readonly nativeTextViewProtected: any;
|
16 |
|
17 | |
18 |
|
19 |
|
20 | text: string;
|
21 |
|
22 | |
23 |
|
24 |
|
25 | formattedText: FormattedString;
|
26 |
|
27 | |
28 |
|
29 |
|
30 | fontSize: number;
|
31 |
|
32 | |
33 |
|
34 |
|
35 | letterSpacing: number;
|
36 |
|
37 | |
38 |
|
39 |
|
40 | lineHeight: number;
|
41 |
|
42 | |
43 |
|
44 |
|
45 | textAlignment: CoreTypes.TextAlignmentType;
|
46 |
|
47 | |
48 |
|
49 |
|
50 | textDecoration: CoreTypes.TextDecorationType;
|
51 |
|
52 | |
53 |
|
54 |
|
55 | textTransform: CoreTypes.TextTransformType;
|
56 |
|
57 | |
58 |
|
59 |
|
60 | textShadow: ShadowCSSValues;
|
61 |
|
62 | |
63 |
|
64 |
|
65 | whiteSpace: CoreTypes.WhiteSpaceType;
|
66 |
|
67 | |
68 |
|
69 |
|
70 | textOverflow: CoreTypes.TextOverflowType;
|
71 |
|
72 | |
73 |
|
74 |
|
75 | maxLines: CoreTypes.MaxLinesType;
|
76 |
|
77 | |
78 |
|
79 |
|
80 | padding: string | CoreTypes.LengthType;
|
81 |
|
82 | |
83 |
|
84 |
|
85 | paddingBottom: CoreTypes.LengthType;
|
86 |
|
87 | |
88 |
|
89 |
|
90 | paddingLeft: CoreTypes.LengthType;
|
91 |
|
92 | |
93 |
|
94 |
|
95 | paddingRight: CoreTypes.LengthType;
|
96 |
|
97 | |
98 |
|
99 |
|
100 | paddingTop: CoreTypes.LengthType;
|
101 |
|
102 | |
103 |
|
104 |
|
105 | iosTextAnimation: 'inherit' | boolean;
|
106 |
|
107 | |
108 |
|
109 |
|
110 | static iosTextAnimationFallback: boolean;
|
111 |
|
112 | |
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 | _addChildFromBuilder(name: string, value: any): void;
|
120 |
|
121 |
|
122 | |
123 |
|
124 |
|
125 |
|
126 | _requestLayoutOnTextChanged(): void;
|
127 |
|
128 | |
129 |
|
130 |
|
131 | _setNativeText(reset?: boolean): void;
|
132 |
|
133 | |
134 |
|
135 |
|
136 | _isSingleLine: boolean;
|
137 |
|
138 | }
|
139 |
|
140 | export interface TextTransformation {
|
141 | new (owner: TextBase): any ;
|
142 | }
|
143 |
|
144 | export const textProperty: Property<TextBase, string>;
|
145 | export const formattedTextProperty: Property<TextBase, FormattedString>;
|
146 |
|
147 | export const maxLinesProperty: InheritedCssProperty<Style, number>;
|
148 | export const textAlignmentProperty: InheritedCssProperty<Style, CoreTypes.TextAlignmentType>;
|
149 | export const textDecorationProperty: CssProperty<Style, CoreTypes.TextDecorationType>;
|
150 | export const textTransformProperty: CssProperty<Style, CoreTypes.TextTransformType>;
|
151 | export const textShadowProperty: CssProperty<Style, ShadowCSSValues>;
|
152 | export const textStrokeProperty: CssProperty<Style, StrokeCSSValues>;
|
153 | export const whiteSpaceProperty: CssProperty<Style, CoreTypes.WhiteSpaceType>;
|
154 | export const textOverflowProperty: CssProperty<Style, CoreTypes.TextOverflowType>;
|
155 | export const letterSpacingProperty: CssProperty<Style, number>;
|
156 | export const lineHeightProperty: CssProperty<Style, number>;
|
157 |
|
158 |
|
159 | export function getTransformedText(text: string, textTransform: CoreTypes.TextTransformType): string;
|
160 |
|
161 | export const resetSymbol: symbol;
|