@dongsuo/react-native-uitextview 1.0.2 → 1.0.3
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/ios/RNUITextView.mm +32 -8
- package/lib/typescript/commonjs/lib/commonjs/RNUITextViewChildNativeComponent.d.ts +30 -0
- package/lib/typescript/commonjs/lib/commonjs/RNUITextViewChildNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/lib/commonjs/RNUITextViewNativeComponent.d.ts +29 -0
- package/lib/typescript/commonjs/lib/commonjs/RNUITextViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/lib/module/RNUITextViewChildNativeComponent.d.ts +30 -0
- package/lib/typescript/commonjs/lib/module/RNUITextViewChildNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/lib/module/RNUITextViewNativeComponent.d.ts +29 -0
- package/lib/typescript/commonjs/lib/module/RNUITextViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/lib/commonjs/RNUITextViewChildNativeComponent.d.ts +30 -0
- package/lib/typescript/module/lib/commonjs/RNUITextViewChildNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/lib/commonjs/RNUITextViewNativeComponent.d.ts +29 -0
- package/lib/typescript/module/lib/commonjs/RNUITextViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/lib/module/RNUITextViewChildNativeComponent.d.ts +30 -0
- package/lib/typescript/module/lib/module/RNUITextViewChildNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/lib/module/RNUITextViewNativeComponent.d.ts +29 -0
- package/lib/typescript/module/lib/module/RNUITextViewNativeComponent.d.ts.map +1 -0
- package/package.json +1 -1
package/ios/RNUITextView.mm
CHANGED
|
@@ -14,6 +14,22 @@
|
|
|
14
14
|
|
|
15
15
|
using namespace facebook::react;
|
|
16
16
|
|
|
17
|
+
static inline NSString *_Nullable RNStringFromStdString(const std::string &value)
|
|
18
|
+
{
|
|
19
|
+
if (value.empty()) {
|
|
20
|
+
return nil;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
NSString *convertedString = [[NSString alloc] initWithBytes:value.data()
|
|
24
|
+
length:value.size()
|
|
25
|
+
encoding:NSUTF8StringEncoding];
|
|
26
|
+
if (!convertedString) {
|
|
27
|
+
NSLog(@"[RNUITextView] Failed to convert std::string (length: %lu) to NSString", (unsigned long)value.size());
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return convertedString;
|
|
31
|
+
}
|
|
32
|
+
|
|
17
33
|
@interface RNUITextView () <RCTRNUITextViewViewProtocol, UIGestureRecognizerDelegate, UITextViewDelegate>
|
|
18
34
|
|
|
19
35
|
// 用于跟踪自定义菜单项
|
|
@@ -175,15 +191,23 @@ using namespace facebook::react;
|
|
|
175
191
|
_textView.backgroundColor = RCTUIColorFromSharedColor(newViewProps.backgroundColor);
|
|
176
192
|
}
|
|
177
193
|
if (newViewProps.customMenuItems.size() > 0) {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
194
|
+
NSMutableArray<NSDictionary *> *items = [NSMutableArray array];
|
|
195
|
+
for (const auto &item : newViewProps.customMenuItems) {
|
|
196
|
+
NSString *title = RNStringFromStdString(item.title);
|
|
197
|
+
NSString *actionId = RNStringFromStdString(item.actionId);
|
|
198
|
+
|
|
199
|
+
if (title.length == 0 || actionId.length == 0) {
|
|
200
|
+
NSLog(@"[RNUITextView] Skipping invalid custom menu item (title length: %lu, actionId length: %lu)", (unsigned long)title.length, (unsigned long)actionId.length);
|
|
201
|
+
continue;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
[items addObject:@{ @"title": title, @"actionId": actionId }];
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
self.customMenuItems = items.count > 0 ? items : nil;
|
|
208
|
+
} else {
|
|
209
|
+
self.customMenuItems = nil;
|
|
184
210
|
}
|
|
185
|
-
self.customMenuItems = items;
|
|
186
|
-
}
|
|
187
211
|
// 自定义菜单项属性会在 JS 层设置,这里不需要从 props 中提取
|
|
188
212
|
|
|
189
213
|
[super updateProps:props oldProps:oldProps];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ColorValue, ViewProps } from 'react-native';
|
|
2
|
+
import type { BubblingEventHandler, Float, Int32, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
interface TargetedEvent {
|
|
4
|
+
target: Int32;
|
|
5
|
+
}
|
|
6
|
+
type TextDecorationLine = 'none' | 'underline' | 'line-through';
|
|
7
|
+
type TextDecorationStyle = 'solid' | 'double' | 'dotted' | 'dashed';
|
|
8
|
+
export type NativeFontWeight = 'normal' | 'bold' | 'ultraLight' | 'light' | 'medium' | 'semibold' | 'heavy';
|
|
9
|
+
type FontStyle = 'normal' | 'italic';
|
|
10
|
+
type TextAlign = 'auto' | 'left' | 'right' | 'center' | 'justify';
|
|
11
|
+
interface NativeProps extends ViewProps {
|
|
12
|
+
text: string;
|
|
13
|
+
color?: ColorValue;
|
|
14
|
+
fontSize?: Float;
|
|
15
|
+
fontStyle?: WithDefault<FontStyle, 'normal'>;
|
|
16
|
+
fontWeight?: WithDefault<NativeFontWeight, 'normal'>;
|
|
17
|
+
fontFamily?: string;
|
|
18
|
+
letterSpacing?: Float;
|
|
19
|
+
lineHeight?: Float;
|
|
20
|
+
textDecorationLine?: WithDefault<TextDecorationLine, 'none'>;
|
|
21
|
+
textDecorationStyle?: WithDefault<TextDecorationStyle, 'solid'>;
|
|
22
|
+
textDecorationColor?: ColorValue;
|
|
23
|
+
textAlign?: WithDefault<TextAlign, 'auto'>;
|
|
24
|
+
shadowRadius?: WithDefault<Float, 0>;
|
|
25
|
+
onPress?: BubblingEventHandler<TargetedEvent>;
|
|
26
|
+
onLongPress?: BubblingEventHandler<TargetedEvent>;
|
|
27
|
+
}
|
|
28
|
+
declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
|
|
29
|
+
export default _default;
|
|
30
|
+
//# sourceMappingURL=RNUITextViewChildNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RNUITextViewChildNativeComponent.d.ts","sourceRoot":"","sources":["../../../../commonjs/RNUITextViewChildNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,cAAc,CAAA;AACvD,OAAO,KAAK,EACV,oBAAoB,EACpB,KAAK,EACL,KAAK,EACL,WAAW,EACZ,MAAM,2CAA2C,CAAA;AAGlD,UAAU,aAAa;IACrB,MAAM,EAAE,KAAK,CAAA;CACd;AAED,KAAK,kBAAkB,GAAG,MAAM,GAAG,WAAW,GAAG,cAAc,CAAA;AAE/D,KAAK,mBAAmB,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAEnE,MAAM,MAAM,gBAAgB,GACxB,QAAQ,GACR,MAAM,GACN,YAAY,GACZ,OAAO,GACP,QAAQ,GACR,UAAU,GACV,OAAO,CAAA;AAEX,KAAK,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAEpC,KAAK,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAA;AAEjE,UAAU,WAAY,SAAQ,SAAS;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,SAAS,CAAC,EAAE,WAAW,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAA;IAC5C,UAAU,CAAC,EAAE,WAAW,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAA;IACpD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,KAAK,CAAA;IACrB,UAAU,CAAC,EAAE,KAAK,CAAA;IAClB,kBAAkB,CAAC,EAAE,WAAW,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAA;IAC5D,mBAAmB,CAAC,EAAE,WAAW,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAA;IAC/D,mBAAmB,CAAC,EAAE,UAAU,CAAA;IAChC,SAAS,CAAC,EAAE,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAA;IAC1C,YAAY,CAAC,EAAE,WAAW,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;IACpC,OAAO,CAAC,EAAE,oBAAoB,CAAC,aAAa,CAAC,CAAA;IAC7C,WAAW,CAAC,EAAE,oBAAoB,CAAC,aAAa,CAAC,CAAA;CAClD;;AAED,wBAEE"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ViewProps } from "react-native";
|
|
2
|
+
import type { BubblingEventHandler, Int32, WithDefault, DirectEventHandler } from "react-native/Libraries/Types/CodegenTypes";
|
|
3
|
+
interface TargetedEvent {
|
|
4
|
+
target: Int32;
|
|
5
|
+
}
|
|
6
|
+
interface TextLayoutEvent extends TargetedEvent {
|
|
7
|
+
lines: string[];
|
|
8
|
+
}
|
|
9
|
+
interface CustomMenuItem {
|
|
10
|
+
title: string;
|
|
11
|
+
actionId: string;
|
|
12
|
+
}
|
|
13
|
+
interface CustomMenuActionEvent extends TargetedEvent {
|
|
14
|
+
actionId: string;
|
|
15
|
+
selectedText: string;
|
|
16
|
+
}
|
|
17
|
+
type EllipsizeMode = "head" | "middle" | "tail" | "clip";
|
|
18
|
+
interface NativeProps extends ViewProps {
|
|
19
|
+
numberOfLines?: Int32;
|
|
20
|
+
allowFontScaling?: WithDefault<boolean, true>;
|
|
21
|
+
ellipsizeMode?: WithDefault<EllipsizeMode, "tail">;
|
|
22
|
+
selectable?: boolean;
|
|
23
|
+
onTextLayout?: BubblingEventHandler<TextLayoutEvent>;
|
|
24
|
+
customMenuItems?: ReadonlyArray<CustomMenuItem>;
|
|
25
|
+
onCustomMenuAction?: DirectEventHandler<CustomMenuActionEvent>;
|
|
26
|
+
}
|
|
27
|
+
declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
|
|
28
|
+
export default _default;
|
|
29
|
+
//# sourceMappingURL=RNUITextViewNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RNUITextViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../commonjs/RNUITextViewNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EACV,oBAAoB,EACpB,KAAK,EACL,WAAW,EACX,kBAAkB,EACnB,MAAM,2CAA2C,CAAC;AAEnD,UAAU,aAAa;IACrB,MAAM,EAAE,KAAK,CAAC;CACf;AAED,UAAU,eAAgB,SAAQ,aAAa;IAC7C,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAGD,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAGD,UAAU,qBAAsB,SAAQ,aAAa;IACnD,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,KAAK,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzD,UAAU,WAAY,SAAQ,SAAS;IAErC,aAAa,CAAC,EAAE,KAAK,CAAC;IACtB,gBAAgB,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC9C,aAAa,CAAC,EAAE,WAAW,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,oBAAoB,CAAC,eAAe,CAAC,CAAC;IAGrD,eAAe,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IAChD,kBAAkB,CAAC,EAAE,kBAAkB,CAAC,qBAAqB,CAAC,CAAC;CAChE;;AAED,wBAEG"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ColorValue, ViewProps } from 'react-native';
|
|
2
|
+
import type { BubblingEventHandler, Float, Int32, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
interface TargetedEvent {
|
|
4
|
+
target: Int32;
|
|
5
|
+
}
|
|
6
|
+
type TextDecorationLine = 'none' | 'underline' | 'line-through';
|
|
7
|
+
type TextDecorationStyle = 'solid' | 'double' | 'dotted' | 'dashed';
|
|
8
|
+
export type NativeFontWeight = 'normal' | 'bold' | 'ultraLight' | 'light' | 'medium' | 'semibold' | 'heavy';
|
|
9
|
+
type FontStyle = 'normal' | 'italic';
|
|
10
|
+
type TextAlign = 'auto' | 'left' | 'right' | 'center' | 'justify';
|
|
11
|
+
interface NativeProps extends ViewProps {
|
|
12
|
+
text: string;
|
|
13
|
+
color?: ColorValue;
|
|
14
|
+
fontSize?: Float;
|
|
15
|
+
fontStyle?: WithDefault<FontStyle, 'normal'>;
|
|
16
|
+
fontWeight?: WithDefault<NativeFontWeight, 'normal'>;
|
|
17
|
+
fontFamily?: string;
|
|
18
|
+
letterSpacing?: Float;
|
|
19
|
+
lineHeight?: Float;
|
|
20
|
+
textDecorationLine?: WithDefault<TextDecorationLine, 'none'>;
|
|
21
|
+
textDecorationStyle?: WithDefault<TextDecorationStyle, 'solid'>;
|
|
22
|
+
textDecorationColor?: ColorValue;
|
|
23
|
+
textAlign?: WithDefault<TextAlign, 'auto'>;
|
|
24
|
+
shadowRadius?: WithDefault<Float, 0>;
|
|
25
|
+
onPress?: BubblingEventHandler<TargetedEvent>;
|
|
26
|
+
onLongPress?: BubblingEventHandler<TargetedEvent>;
|
|
27
|
+
}
|
|
28
|
+
declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
|
|
29
|
+
export default _default;
|
|
30
|
+
//# sourceMappingURL=RNUITextViewChildNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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,mBAAmB,CAAC,EAAE,UAAU,CAAA;IAChC,SAAS,CAAC,EAAE,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAA;IAC1C,YAAY,CAAC,EAAE,WAAW,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;IACpC,OAAO,CAAC,EAAE,oBAAoB,CAAC,aAAa,CAAC,CAAA;IAC7C,WAAW,CAAC,EAAE,oBAAoB,CAAC,aAAa,CAAC,CAAA;CAClD;;AAED,wBAEE"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ViewProps } from "react-native";
|
|
2
|
+
import type { BubblingEventHandler, Int32, WithDefault, DirectEventHandler } from "react-native/Libraries/Types/CodegenTypes";
|
|
3
|
+
interface TargetedEvent {
|
|
4
|
+
target: Int32;
|
|
5
|
+
}
|
|
6
|
+
interface TextLayoutEvent extends TargetedEvent {
|
|
7
|
+
lines: string[];
|
|
8
|
+
}
|
|
9
|
+
interface CustomMenuItem {
|
|
10
|
+
title: string;
|
|
11
|
+
actionId: string;
|
|
12
|
+
}
|
|
13
|
+
interface CustomMenuActionEvent extends TargetedEvent {
|
|
14
|
+
actionId: string;
|
|
15
|
+
selectedText: string;
|
|
16
|
+
}
|
|
17
|
+
type EllipsizeMode = "head" | "middle" | "tail" | "clip";
|
|
18
|
+
interface NativeProps extends ViewProps {
|
|
19
|
+
numberOfLines?: Int32;
|
|
20
|
+
allowFontScaling?: WithDefault<boolean, true>;
|
|
21
|
+
ellipsizeMode?: WithDefault<EllipsizeMode, "tail">;
|
|
22
|
+
selectable?: boolean;
|
|
23
|
+
onTextLayout?: BubblingEventHandler<TextLayoutEvent>;
|
|
24
|
+
customMenuItems?: ReadonlyArray<CustomMenuItem>;
|
|
25
|
+
onCustomMenuAction?: DirectEventHandler<CustomMenuActionEvent>;
|
|
26
|
+
}
|
|
27
|
+
declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
|
|
28
|
+
export default _default;
|
|
29
|
+
//# sourceMappingURL=RNUITextViewNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RNUITextViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../module/RNUITextViewNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EACV,oBAAoB,EACpB,KAAK,EACL,WAAW,EACX,kBAAkB,EACnB,MAAM,2CAA2C,CAAC;AAEnD,UAAU,aAAa;IACrB,MAAM,EAAE,KAAK,CAAC;CACf;AAED,UAAU,eAAgB,SAAQ,aAAa;IAC7C,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAGD,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAGD,UAAU,qBAAsB,SAAQ,aAAa;IACnD,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,KAAK,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzD,UAAU,WAAY,SAAQ,SAAS;IAErC,aAAa,CAAC,EAAE,KAAK,CAAC;IACtB,gBAAgB,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC9C,aAAa,CAAC,EAAE,WAAW,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,oBAAoB,CAAC,eAAe,CAAC,CAAC;IAGrD,eAAe,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IAChD,kBAAkB,CAAC,EAAE,kBAAkB,CAAC,qBAAqB,CAAC,CAAC;CAChE;;AAED,wBAEG"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ColorValue, ViewProps } from 'react-native';
|
|
2
|
+
import type { BubblingEventHandler, Float, Int32, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
interface TargetedEvent {
|
|
4
|
+
target: Int32;
|
|
5
|
+
}
|
|
6
|
+
type TextDecorationLine = 'none' | 'underline' | 'line-through';
|
|
7
|
+
type TextDecorationStyle = 'solid' | 'double' | 'dotted' | 'dashed';
|
|
8
|
+
export type NativeFontWeight = 'normal' | 'bold' | 'ultraLight' | 'light' | 'medium' | 'semibold' | 'heavy';
|
|
9
|
+
type FontStyle = 'normal' | 'italic';
|
|
10
|
+
type TextAlign = 'auto' | 'left' | 'right' | 'center' | 'justify';
|
|
11
|
+
interface NativeProps extends ViewProps {
|
|
12
|
+
text: string;
|
|
13
|
+
color?: ColorValue;
|
|
14
|
+
fontSize?: Float;
|
|
15
|
+
fontStyle?: WithDefault<FontStyle, 'normal'>;
|
|
16
|
+
fontWeight?: WithDefault<NativeFontWeight, 'normal'>;
|
|
17
|
+
fontFamily?: string;
|
|
18
|
+
letterSpacing?: Float;
|
|
19
|
+
lineHeight?: Float;
|
|
20
|
+
textDecorationLine?: WithDefault<TextDecorationLine, 'none'>;
|
|
21
|
+
textDecorationStyle?: WithDefault<TextDecorationStyle, 'solid'>;
|
|
22
|
+
textDecorationColor?: ColorValue;
|
|
23
|
+
textAlign?: WithDefault<TextAlign, 'auto'>;
|
|
24
|
+
shadowRadius?: WithDefault<Float, 0>;
|
|
25
|
+
onPress?: BubblingEventHandler<TargetedEvent>;
|
|
26
|
+
onLongPress?: BubblingEventHandler<TargetedEvent>;
|
|
27
|
+
}
|
|
28
|
+
declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
|
|
29
|
+
export default _default;
|
|
30
|
+
//# sourceMappingURL=RNUITextViewChildNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RNUITextViewChildNativeComponent.d.ts","sourceRoot":"","sources":["../../../../commonjs/RNUITextViewChildNativeComponent.ts"],"names":[],"mappings":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AAA;IAC1C,YAAY,CAAC,EAAE,WAAW,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;IACpC,OAAO,CAAC,EAAE,oBAAoB,CAAC,aAAa,CAAC,CAAA;IAC7C,WAAW,CAAC,EAAE,oBAAoB,CAAC,aAAa,CAAC,CAAA;CAClD;;AAED,wBAEE"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ViewProps } from "react-native";
|
|
2
|
+
import type { BubblingEventHandler, Int32, WithDefault, DirectEventHandler } from "react-native/Libraries/Types/CodegenTypes";
|
|
3
|
+
interface TargetedEvent {
|
|
4
|
+
target: Int32;
|
|
5
|
+
}
|
|
6
|
+
interface TextLayoutEvent extends TargetedEvent {
|
|
7
|
+
lines: string[];
|
|
8
|
+
}
|
|
9
|
+
interface CustomMenuItem {
|
|
10
|
+
title: string;
|
|
11
|
+
actionId: string;
|
|
12
|
+
}
|
|
13
|
+
interface CustomMenuActionEvent extends TargetedEvent {
|
|
14
|
+
actionId: string;
|
|
15
|
+
selectedText: string;
|
|
16
|
+
}
|
|
17
|
+
type EllipsizeMode = "head" | "middle" | "tail" | "clip";
|
|
18
|
+
interface NativeProps extends ViewProps {
|
|
19
|
+
numberOfLines?: Int32;
|
|
20
|
+
allowFontScaling?: WithDefault<boolean, true>;
|
|
21
|
+
ellipsizeMode?: WithDefault<EllipsizeMode, "tail">;
|
|
22
|
+
selectable?: boolean;
|
|
23
|
+
onTextLayout?: BubblingEventHandler<TextLayoutEvent>;
|
|
24
|
+
customMenuItems?: ReadonlyArray<CustomMenuItem>;
|
|
25
|
+
onCustomMenuAction?: DirectEventHandler<CustomMenuActionEvent>;
|
|
26
|
+
}
|
|
27
|
+
declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
|
|
28
|
+
export default _default;
|
|
29
|
+
//# sourceMappingURL=RNUITextViewNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RNUITextViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../commonjs/RNUITextViewNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EACV,oBAAoB,EACpB,KAAK,EACL,WAAW,EACX,kBAAkB,EACnB,MAAM,2CAA2C,CAAC;AAEnD,UAAU,aAAa;IACrB,MAAM,EAAE,KAAK,CAAC;CACf;AAED,UAAU,eAAgB,SAAQ,aAAa;IAC7C,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAGD,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAGD,UAAU,qBAAsB,SAAQ,aAAa;IACnD,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,KAAK,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzD,UAAU,WAAY,SAAQ,SAAS;IAErC,aAAa,CAAC,EAAE,KAAK,CAAC;IACtB,gBAAgB,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC9C,aAAa,CAAC,EAAE,WAAW,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,oBAAoB,CAAC,eAAe,CAAC,CAAC;IAGrD,eAAe,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IAChD,kBAAkB,CAAC,EAAE,kBAAkB,CAAC,qBAAqB,CAAC,CAAC;CAChE;;AAED,wBAEG"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ColorValue, ViewProps } from 'react-native';
|
|
2
|
+
import type { BubblingEventHandler, Float, Int32, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
interface TargetedEvent {
|
|
4
|
+
target: Int32;
|
|
5
|
+
}
|
|
6
|
+
type TextDecorationLine = 'none' | 'underline' | 'line-through';
|
|
7
|
+
type TextDecorationStyle = 'solid' | 'double' | 'dotted' | 'dashed';
|
|
8
|
+
export type NativeFontWeight = 'normal' | 'bold' | 'ultraLight' | 'light' | 'medium' | 'semibold' | 'heavy';
|
|
9
|
+
type FontStyle = 'normal' | 'italic';
|
|
10
|
+
type TextAlign = 'auto' | 'left' | 'right' | 'center' | 'justify';
|
|
11
|
+
interface NativeProps extends ViewProps {
|
|
12
|
+
text: string;
|
|
13
|
+
color?: ColorValue;
|
|
14
|
+
fontSize?: Float;
|
|
15
|
+
fontStyle?: WithDefault<FontStyle, 'normal'>;
|
|
16
|
+
fontWeight?: WithDefault<NativeFontWeight, 'normal'>;
|
|
17
|
+
fontFamily?: string;
|
|
18
|
+
letterSpacing?: Float;
|
|
19
|
+
lineHeight?: Float;
|
|
20
|
+
textDecorationLine?: WithDefault<TextDecorationLine, 'none'>;
|
|
21
|
+
textDecorationStyle?: WithDefault<TextDecorationStyle, 'solid'>;
|
|
22
|
+
textDecorationColor?: ColorValue;
|
|
23
|
+
textAlign?: WithDefault<TextAlign, 'auto'>;
|
|
24
|
+
shadowRadius?: WithDefault<Float, 0>;
|
|
25
|
+
onPress?: BubblingEventHandler<TargetedEvent>;
|
|
26
|
+
onLongPress?: BubblingEventHandler<TargetedEvent>;
|
|
27
|
+
}
|
|
28
|
+
declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
|
|
29
|
+
export default _default;
|
|
30
|
+
//# sourceMappingURL=RNUITextViewChildNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RNUITextViewChildNativeComponent.d.ts","sourceRoot":"","sources":["../../../../module/RNUITextViewChildNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,cAAc,CAAA;AACvD,OAAO,KAAK,EACV,oBAA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,oBAAoB,CAAC,aAAa,CAAC,CAAA;IAC7C,WAAW,CAAC,EAAE,oBAAoB,CAAC,aAAa,CAAC,CAAA;CAClD;;AAED,wBAEE"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ViewProps } from "react-native";
|
|
2
|
+
import type { BubblingEventHandler, Int32, WithDefault, DirectEventHandler } from "react-native/Libraries/Types/CodegenTypes";
|
|
3
|
+
interface TargetedEvent {
|
|
4
|
+
target: Int32;
|
|
5
|
+
}
|
|
6
|
+
interface TextLayoutEvent extends TargetedEvent {
|
|
7
|
+
lines: string[];
|
|
8
|
+
}
|
|
9
|
+
interface CustomMenuItem {
|
|
10
|
+
title: string;
|
|
11
|
+
actionId: string;
|
|
12
|
+
}
|
|
13
|
+
interface CustomMenuActionEvent extends TargetedEvent {
|
|
14
|
+
actionId: string;
|
|
15
|
+
selectedText: string;
|
|
16
|
+
}
|
|
17
|
+
type EllipsizeMode = "head" | "middle" | "tail" | "clip";
|
|
18
|
+
interface NativeProps extends ViewProps {
|
|
19
|
+
numberOfLines?: Int32;
|
|
20
|
+
allowFontScaling?: WithDefault<boolean, true>;
|
|
21
|
+
ellipsizeMode?: WithDefault<EllipsizeMode, "tail">;
|
|
22
|
+
selectable?: boolean;
|
|
23
|
+
onTextLayout?: BubblingEventHandler<TextLayoutEvent>;
|
|
24
|
+
customMenuItems?: ReadonlyArray<CustomMenuItem>;
|
|
25
|
+
onCustomMenuAction?: DirectEventHandler<CustomMenuActionEvent>;
|
|
26
|
+
}
|
|
27
|
+
declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
|
|
28
|
+
export default _default;
|
|
29
|
+
//# sourceMappingURL=RNUITextViewNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RNUITextViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../module/RNUITextViewNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EACV,oBAAoB,EACpB,KAAK,EACL,WAAW,EACX,kBAAkB,EACnB,MAAM,2CAA2C,CAAC;AAEnD,UAAU,aAAa;IACrB,MAAM,EAAE,KAAK,CAAC;CACf;AAED,UAAU,eAAgB,SAAQ,aAAa;IAC7C,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAGD,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAGD,UAAU,qBAAsB,SAAQ,aAAa;IACnD,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,KAAK,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzD,UAAU,WAAY,SAAQ,SAAS;IAErC,aAAa,CAAC,EAAE,KAAK,CAAC;IACtB,gBAAgB,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC9C,aAAa,CAAC,EAAE,WAAW,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,oBAAoB,CAAC,eAAe,CAAC,CAAC;IAGrD,eAAe,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IAChD,kBAAkB,CAAC,EAAE,kBAAkB,CAAC,qBAAqB,CAAC,CAAC;CAChE;;AAED,wBAEG"}
|