@dongsuo/react-native-uitextview 1.0.2 → 1.0.4

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.
@@ -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,35 @@ using namespace facebook::react;
175
191
  _textView.backgroundColor = RCTUIColorFromSharedColor(newViewProps.backgroundColor);
176
192
  }
177
193
  if (newViewProps.customMenuItems.size() > 0) {
178
- NSMutableArray *items = [NSMutableArray array];
179
- for (const auto &item : newViewProps.customMenuItems) {
180
- [items addObject:@{
181
- @"title": [NSString stringWithUTF8String:item.title.c_str()],
182
- @"actionId": [NSString stringWithUTF8String:item.actionId.c_str()]
183
- }];
194
+ NSMutableArray<NSDictionary *> *items = [NSMutableArray array];
195
+ try {
196
+ for (const auto &item : newViewProps.customMenuItems) {
197
+ try {
198
+ NSString *title = RNStringFromStdString(item.title);
199
+ NSString *actionId = RNStringFromStdString(item.actionId);
200
+
201
+ if (title.length == 0 || actionId.length == 0) {
202
+ NSLog(@"[RNUITextView] Skipping invalid custom menu item (title length: %lu, actionId length: %lu)", (unsigned long)title.length, (unsigned long)actionId.length);
203
+ continue;
204
+ }
205
+
206
+ [items addObject:@{ @"title": title, @"actionId": actionId }];
207
+ } catch (const std::exception &e) {
208
+ NSLog(@"[RNUITextView] C++ exception processing custom menu item: %s", e.what());
209
+ } catch (...) {
210
+ NSLog(@"[RNUITextView] Unknown exception processing custom menu item");
211
+ }
212
+ }
213
+ } catch (const std::exception &e) {
214
+ NSLog(@"[RNUITextView] C++ exception iterating custom menu items: %s", e.what());
215
+ } catch (...) {
216
+ NSLog(@"[RNUITextView] Unknown exception iterating custom menu items");
217
+ }
218
+
219
+ self.customMenuItems = items.count > 0 ? items : nil;
220
+ } else {
221
+ self.customMenuItems = nil;
184
222
  }
185
- self.customMenuItems = items;
186
- }
187
223
  // 自定义菜单项属性会在 JS 层设置,这里不需要从 props 中提取
188
224
 
189
225
  [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
+ {"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,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,mBA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andler } 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":"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
+ {"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,oBAAoB,EACpB,KAAK,EACL,KAAK,EACL,WAAW,EACZ,MAAM,2CAA2C,CAAA;AAGlD,UAAU,aAAa;IACrB,MAA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AClD;;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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dongsuo/react-native-uitextview",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Enhanced UITextView for React Native with custom context menu support",
5
5
  "repository": {
6
6
  "type": "git",