@bsky.app/react-native-uitextview 2.3.0
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/LICENSE +20 -0
- package/README.md +188 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/CMakeLists.txt +28 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/RNUITextViewSpec-generated.cpp +22 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/RNUITextViewSpec.h +24 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNUITextViewSpec/ComponentDescriptors.cpp +23 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNUITextViewSpec/ComponentDescriptors.h +25 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNUITextViewSpec/EventEmitters.cpp +61 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNUITextViewSpec/EventEmitters.h +49 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNUITextViewSpec/Props.cpp +151 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNUITextViewSpec/Props.h +236 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNUITextViewSpec/RNUITextViewSpecJSI.h +19 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNUITextViewSpec/ShadowNodes.cpp +18 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNUITextViewSpec/ShadowNodes.h +43 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNUITextViewSpec/States.cpp +16 -0
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNUITextViewSpec/States.h +22 -0
- package/ios/RNUITextView.h +13 -0
- package/ios/RNUITextView.mm +338 -0
- package/ios/RNUITextViewChild.h +24 -0
- package/ios/RNUITextViewChild.mm +72 -0
- package/ios/RNUITextViewChildComponentDescriptor.h +13 -0
- package/ios/RNUITextViewChildShadowNode.cpp +6 -0
- package/ios/RNUITextViewChildShadowNode.h +16 -0
- package/ios/RNUITextViewComponentDescriptor.h +13 -0
- package/ios/RNUITextViewManager.mm +36 -0
- package/ios/RNUITextViewShadowNode.cpp +139 -0
- package/ios/RNUITextViewShadowNode.h +48 -0
- package/ios/generated/build/generated/ios/ReactCodegen/RNUITextViewSpec/RNUITextViewSpec-generated.mm +16 -0
- package/ios/generated/build/generated/ios/ReactCodegen/RNUITextViewSpec/RNUITextViewSpec.h +38 -0
- package/ios/generated/build/generated/ios/ReactCodegen/RNUITextViewSpecJSI.h +19 -0
- package/ios/generated/build/generated/ios/ReactCodegen/react/renderer/components/RNUITextViewSpec/ComponentDescriptors.cpp +23 -0
- package/ios/generated/build/generated/ios/ReactCodegen/react/renderer/components/RNUITextViewSpec/ComponentDescriptors.h +25 -0
- package/ios/generated/build/generated/ios/ReactCodegen/react/renderer/components/RNUITextViewSpec/EventEmitters.cpp +61 -0
- package/ios/generated/build/generated/ios/ReactCodegen/react/renderer/components/RNUITextViewSpec/EventEmitters.h +49 -0
- package/ios/generated/build/generated/ios/ReactCodegen/react/renderer/components/RNUITextViewSpec/Props.cpp +151 -0
- package/ios/generated/build/generated/ios/ReactCodegen/react/renderer/components/RNUITextViewSpec/Props.h +236 -0
- package/ios/generated/build/generated/ios/ReactCodegen/react/renderer/components/RNUITextViewSpec/RCTComponentViewHelpers.h +24 -0
- package/ios/generated/build/generated/ios/ReactCodegen/react/renderer/components/RNUITextViewSpec/ShadowNodes.cpp +18 -0
- package/ios/generated/build/generated/ios/ReactCodegen/react/renderer/components/RNUITextViewSpec/ShadowNodes.h +43 -0
- package/ios/generated/build/generated/ios/ReactCodegen/react/renderer/components/RNUITextViewSpec/States.cpp +16 -0
- package/ios/generated/build/generated/ios/ReactCodegen/react/renderer/components/RNUITextViewSpec/States.h +22 -0
- package/lib/commonjs/RNUITextViewChildNativeComponent.ts +49 -0
- package/lib/commonjs/RNUITextViewNativeComponent.ts +53 -0
- package/lib/commonjs/Text.js +111 -0
- package/lib/commonjs/Text.js.map +1 -0
- package/lib/commonjs/Text.web.js +23 -0
- package/lib/commonjs/Text.web.js.map +1 -0
- package/lib/commonjs/index.js +17 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/util.js +66 -0
- package/lib/commonjs/util.js.map +1 -0
- package/lib/module/RNUITextViewChildNativeComponent.ts +49 -0
- package/lib/module/RNUITextViewNativeComponent.ts +53 -0
- package/lib/module/Text.js +106 -0
- package/lib/module/Text.js.map +1 -0
- package/lib/module/Text.web.js +19 -0
- package/lib/module/Text.web.js.map +1 -0
- package/lib/module/index.js +4 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/util.js +62 -0
- package/lib/module/util.js.map +1 -0
- package/lib/typescript/commonjs/example/src/App.d.ts +3 -0
- package/lib/typescript/commonjs/example/src/App.d.ts.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/RNUITextViewChildNativeComponent.d.ts +29 -0
- package/lib/typescript/commonjs/src/RNUITextViewChildNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/RNUITextViewNativeComponent.d.ts +43 -0
- package/lib/typescript/commonjs/src/RNUITextViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/Text.d.ts +25 -0
- package/lib/typescript/commonjs/src/Text.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/Text.web.d.ts +19 -0
- package/lib/typescript/commonjs/src/Text.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/util.d.ts +163 -0
- package/lib/typescript/commonjs/src/util.d.ts.map +1 -0
- package/lib/typescript/module/example/src/App.d.ts +3 -0
- package/lib/typescript/module/example/src/App.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/RNUITextViewChildNativeComponent.d.ts +29 -0
- package/lib/typescript/module/src/RNUITextViewChildNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/RNUITextViewNativeComponent.d.ts +43 -0
- package/lib/typescript/module/src/RNUITextViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/Text.d.ts +25 -0
- package/lib/typescript/module/src/Text.d.ts.map +1 -0
- package/lib/typescript/module/src/Text.web.d.ts +19 -0
- package/lib/typescript/module/src/Text.web.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +2 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/util.d.ts +163 -0
- package/lib/typescript/module/src/util.d.ts.map +1 -0
- package/package.json +185 -0
- package/react-native-uitextview.podspec +34 -0
- package/react-native.config.js +28 -0
- package/scripts/ensure-rnc-cli-executable.js +19 -0
- package/src/RNUITextViewChildNativeComponent.ts +49 -0
- package/src/RNUITextViewNativeComponent.ts +53 -0
- package/src/Text.tsx +125 -0
- package/src/Text.web.tsx +22 -0
- package/src/index.tsx +1 -0
- package/src/util.ts +67 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RNUITextViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/RNUITextViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,SAAS,EAEf,MAAM,cAAc,CAAA;AAErB,UAAU,aAAa;IACrB,MAAM,EAAE,YAAY,CAAC,KAAK,CAAA;CAC3B;AAED,UAAU,eAAgB,SAAQ,aAAa;IAC7C,KAAK,EAAE,MAAM,EAAE,CAAA;CAChB;AAED;;;;;GAKG;AACH,UAAU,oBAAqB,SAAQ,aAAa;IAClD,KAAK,EAAE,YAAY,CAAC,KAAK,CAAA;IACzB,GAAG,EAAE,YAAY,CAAC,KAAK,CAAA;CACxB;AAED,KAAK,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAA;AAExD,UAAU,WAAY,SAAQ,SAAS;IACrC,aAAa,CAAC,EAAE,YAAY,CAAC,KAAK,CAAA;IAClC,gBAAgB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;IAC1D,aAAa,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,aAAa,EAAE,MAAM,CAAC,CAAA;IAC/D,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC,oBAAoB,CAAC,eAAe,CAAC,CAAA;IACjE;;;;;;;;;;;;;OAaG;IACH,iBAAiB,CAAC,EAAE,YAAY,CAAC,oBAAoB,CAAC,oBAAoB,CAAC,CAAA;CAC5E;;AAED,wBAEE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type TextProps } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* Event fired by `onSelectionChange`. `start`/`end` are 0-based UTF-16 indices
|
|
4
|
+
* into the rendered string. `start === end` means the selection was cleared.
|
|
5
|
+
*/
|
|
6
|
+
export type SelectionChangeEvent = {
|
|
7
|
+
nativeEvent: {
|
|
8
|
+
target: number;
|
|
9
|
+
start: number;
|
|
10
|
+
end: number;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
type UITextViewProps = TextProps & {
|
|
14
|
+
uiTextView?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Fired when the native text selection changes. Only fires on iOS when
|
|
17
|
+
* `uiTextView` is true. Note: fires on every selection-edge adjustment
|
|
18
|
+
* (e.g. dragging a selection handle), so consumers driving expensive work
|
|
19
|
+
* off this event should debounce.
|
|
20
|
+
*/
|
|
21
|
+
onSelectionChange?: (event: SelectionChangeEvent) => void;
|
|
22
|
+
};
|
|
23
|
+
export declare function UITextView(props: UITextViewProps): import("react").JSX.Element;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=Text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../src/Text.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,SAAS,EAEf,MAAM,cAAc,CAAA;AAiBrB;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,WAAW,EAAE;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAC,CAAA;CAC1D,CAAA;AAED,KAAK,eAAe,GAAG,SAAS,GAAG;IACjC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAA;CAC1D,CAAA;AA8ED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,+BAKhD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type TextProps } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* Event fired by `onSelectionChange`. This event is only available when using
|
|
4
|
+
* the native UITextView implementation on iOS.
|
|
5
|
+
*/
|
|
6
|
+
export type SelectionChangeEvent = {
|
|
7
|
+
nativeEvent: {
|
|
8
|
+
target: number;
|
|
9
|
+
start: number;
|
|
10
|
+
end: number;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
type UITextViewProps = TextProps & {
|
|
14
|
+
uiTextView?: boolean;
|
|
15
|
+
onSelectionChange?: (event: SelectionChangeEvent) => void;
|
|
16
|
+
};
|
|
17
|
+
export declare function UITextView({ uiTextView: _uiTextView, onSelectionChange: _onSelectionChange, ...props }: UITextViewProps): import("react").JSX.Element;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=Text.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.web.d.ts","sourceRoot":"","sources":["../../../../src/Text.web.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAAC,MAAM,cAAc,CAAA;AAE3D;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,WAAW,EAAE;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAC,CAAA;CAC1D,CAAA;AAED,KAAK,eAAe,GAAG,SAAS,GAAG;IACjC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAA;CAC1D,CAAA;AAED,wBAAgB,UAAU,CAAC,EACzB,UAAU,EAAE,WAAW,EACvB,iBAAiB,EAAE,kBAAkB,EACrC,GAAG,KAAK,EACT,EAAE,eAAe,+BAEjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { type StyleProp, type TextStyle } from 'react-native';
|
|
2
|
+
import type { NativeFontWeight } from './RNUITextViewChildNativeComponent';
|
|
3
|
+
export declare function flattenStyles(rootStyle: TextStyle, style: StyleProp<TextStyle>): {
|
|
4
|
+
fontWeight: NativeFontWeight;
|
|
5
|
+
backgroundColor: import("react-native").ColorValue;
|
|
6
|
+
shadowOffset: Readonly<{
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
}>;
|
|
10
|
+
color?: import("react-native").ColorValue | undefined;
|
|
11
|
+
fontFamily?: string | undefined;
|
|
12
|
+
fontSize?: number | undefined;
|
|
13
|
+
fontStyle?: "normal" | "italic" | undefined;
|
|
14
|
+
letterSpacing?: number | undefined;
|
|
15
|
+
lineHeight?: number | undefined;
|
|
16
|
+
textAlign?: "auto" | "left" | "right" | "center" | "justify" | undefined;
|
|
17
|
+
textDecorationLine?: "none" | "underline" | "line-through" | "underline line-through" | undefined;
|
|
18
|
+
textDecorationStyle?: "solid" | "double" | "dotted" | "dashed" | undefined;
|
|
19
|
+
textDecorationColor?: import("react-native").ColorValue | undefined;
|
|
20
|
+
textShadowColor?: import("react-native").ColorValue | undefined;
|
|
21
|
+
textShadowOffset?: {
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
} | undefined;
|
|
25
|
+
textShadowRadius?: number | undefined;
|
|
26
|
+
textTransform?: "none" | "capitalize" | "uppercase" | "lowercase" | undefined;
|
|
27
|
+
userSelect?: "auto" | "none" | "text" | "contain" | "all" | undefined;
|
|
28
|
+
fontVariant?: import("react-native").FontVariant[] | undefined;
|
|
29
|
+
writingDirection?: "auto" | "ltr" | "rtl" | undefined;
|
|
30
|
+
backfaceVisibility?: "visible" | "hidden" | undefined;
|
|
31
|
+
borderBlockColor?: import("react-native").ColorValue | undefined;
|
|
32
|
+
borderBlockEndColor?: import("react-native").ColorValue | undefined;
|
|
33
|
+
borderBlockStartColor?: import("react-native").ColorValue | undefined;
|
|
34
|
+
borderBottomColor?: import("react-native").ColorValue | undefined;
|
|
35
|
+
borderBottomEndRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
36
|
+
borderBottomLeftRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
37
|
+
borderBottomRightRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
38
|
+
borderBottomStartRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
39
|
+
borderColor?: import("react-native").ColorValue | undefined;
|
|
40
|
+
borderCurve?: "circular" | "continuous" | undefined;
|
|
41
|
+
borderEndColor?: import("react-native").ColorValue | undefined;
|
|
42
|
+
borderEndEndRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
43
|
+
borderEndStartRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
44
|
+
borderLeftColor?: import("react-native").ColorValue | undefined;
|
|
45
|
+
borderRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
46
|
+
borderRightColor?: import("react-native").ColorValue | undefined;
|
|
47
|
+
borderStartColor?: import("react-native").ColorValue | undefined;
|
|
48
|
+
borderStartEndRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
49
|
+
borderStartStartRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
50
|
+
borderStyle?: "solid" | "dotted" | "dashed" | undefined;
|
|
51
|
+
borderTopColor?: import("react-native").ColorValue | undefined;
|
|
52
|
+
borderTopEndRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
53
|
+
borderTopLeftRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
54
|
+
borderTopRightRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
55
|
+
borderTopStartRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
56
|
+
outlineColor?: import("react-native").ColorValue | undefined;
|
|
57
|
+
outlineOffset?: import("react-native").AnimatableNumericValue | undefined;
|
|
58
|
+
outlineStyle?: "solid" | "dotted" | "dashed" | undefined;
|
|
59
|
+
outlineWidth?: import("react-native").AnimatableNumericValue | undefined;
|
|
60
|
+
opacity?: import("react-native").AnimatableNumericValue | undefined;
|
|
61
|
+
elevation?: number | undefined;
|
|
62
|
+
pointerEvents?: "box-none" | "none" | "box-only" | "auto" | undefined;
|
|
63
|
+
isolation?: "auto" | "isolate" | undefined;
|
|
64
|
+
cursor?: import("react-native").CursorValue | undefined;
|
|
65
|
+
boxShadow?: ReadonlyArray<import("react-native").BoxShadowValue> | string | undefined;
|
|
66
|
+
filter?: ReadonlyArray<import("react-native").FilterFunction> | string | undefined;
|
|
67
|
+
mixBlendMode?: import("react-native").BlendMode | undefined;
|
|
68
|
+
experimental_backgroundImage?: ReadonlyArray<import("react-native").BackgroundImageValue> | string | undefined;
|
|
69
|
+
experimental_backgroundSize?: ReadonlyArray<import("react-native").BackgroundSizeValue> | string | undefined;
|
|
70
|
+
experimental_backgroundPosition?: ReadonlyArray<import("react-native").BackgroundPositionValue> | string | undefined;
|
|
71
|
+
experimental_backgroundRepeat?: ReadonlyArray<import("react-native").BackgroundRepeatValue> | string | undefined;
|
|
72
|
+
alignContent?: "flex-start" | "flex-end" | "center" | "stretch" | "space-between" | "space-around" | "space-evenly" | undefined;
|
|
73
|
+
alignItems?: import("react-native").FlexAlignType | undefined;
|
|
74
|
+
alignSelf?: "auto" | import("react-native").FlexAlignType | undefined;
|
|
75
|
+
aspectRatio?: number | string | undefined;
|
|
76
|
+
borderBottomWidth?: number | undefined;
|
|
77
|
+
borderEndWidth?: number | undefined;
|
|
78
|
+
borderLeftWidth?: number | undefined;
|
|
79
|
+
borderRightWidth?: number | undefined;
|
|
80
|
+
borderStartWidth?: number | undefined;
|
|
81
|
+
borderTopWidth?: number | undefined;
|
|
82
|
+
borderWidth?: number | undefined;
|
|
83
|
+
bottom?: import("react-native").DimensionValue | undefined;
|
|
84
|
+
boxSizing?: "border-box" | "content-box" | undefined;
|
|
85
|
+
display?: "none" | "flex" | "contents" | undefined;
|
|
86
|
+
end?: import("react-native").DimensionValue | undefined;
|
|
87
|
+
flex?: number | undefined;
|
|
88
|
+
flexBasis?: import("react-native").DimensionValue | undefined;
|
|
89
|
+
flexDirection?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
|
|
90
|
+
rowGap?: number | string | undefined;
|
|
91
|
+
gap?: number | string | undefined;
|
|
92
|
+
columnGap?: number | string | undefined;
|
|
93
|
+
flexGrow?: number | undefined;
|
|
94
|
+
flexShrink?: number | undefined;
|
|
95
|
+
flexWrap?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
|
|
96
|
+
height?: import("react-native").DimensionValue | undefined;
|
|
97
|
+
justifyContent?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly" | undefined;
|
|
98
|
+
left?: import("react-native").DimensionValue | undefined;
|
|
99
|
+
margin?: import("react-native").DimensionValue | undefined;
|
|
100
|
+
marginBottom?: import("react-native").DimensionValue | undefined;
|
|
101
|
+
marginEnd?: import("react-native").DimensionValue | undefined;
|
|
102
|
+
marginHorizontal?: import("react-native").DimensionValue | undefined;
|
|
103
|
+
marginLeft?: import("react-native").DimensionValue | undefined;
|
|
104
|
+
marginRight?: import("react-native").DimensionValue | undefined;
|
|
105
|
+
marginStart?: import("react-native").DimensionValue | undefined;
|
|
106
|
+
marginTop?: import("react-native").DimensionValue | undefined;
|
|
107
|
+
marginVertical?: import("react-native").DimensionValue | undefined;
|
|
108
|
+
maxHeight?: import("react-native").DimensionValue | undefined;
|
|
109
|
+
maxWidth?: import("react-native").DimensionValue | undefined;
|
|
110
|
+
minHeight?: import("react-native").DimensionValue | undefined;
|
|
111
|
+
minWidth?: import("react-native").DimensionValue | undefined;
|
|
112
|
+
overflow?: "visible" | "hidden" | "scroll" | undefined;
|
|
113
|
+
padding?: import("react-native").DimensionValue | undefined;
|
|
114
|
+
paddingBottom?: import("react-native").DimensionValue | undefined;
|
|
115
|
+
paddingEnd?: import("react-native").DimensionValue | undefined;
|
|
116
|
+
paddingHorizontal?: import("react-native").DimensionValue | undefined;
|
|
117
|
+
paddingLeft?: import("react-native").DimensionValue | undefined;
|
|
118
|
+
paddingRight?: import("react-native").DimensionValue | undefined;
|
|
119
|
+
paddingStart?: import("react-native").DimensionValue | undefined;
|
|
120
|
+
paddingTop?: import("react-native").DimensionValue | undefined;
|
|
121
|
+
paddingVertical?: import("react-native").DimensionValue | undefined;
|
|
122
|
+
position?: "absolute" | "relative" | "static" | undefined;
|
|
123
|
+
right?: import("react-native").DimensionValue | undefined;
|
|
124
|
+
start?: import("react-native").DimensionValue | undefined;
|
|
125
|
+
top?: import("react-native").DimensionValue | undefined;
|
|
126
|
+
width?: import("react-native").DimensionValue | undefined;
|
|
127
|
+
zIndex?: number | undefined;
|
|
128
|
+
direction?: "inherit" | "ltr" | "rtl" | undefined;
|
|
129
|
+
inset?: import("react-native").DimensionValue | undefined;
|
|
130
|
+
insetBlock?: import("react-native").DimensionValue | undefined;
|
|
131
|
+
insetBlockEnd?: import("react-native").DimensionValue | undefined;
|
|
132
|
+
insetBlockStart?: import("react-native").DimensionValue | undefined;
|
|
133
|
+
insetInline?: import("react-native").DimensionValue | undefined;
|
|
134
|
+
insetInlineEnd?: import("react-native").DimensionValue | undefined;
|
|
135
|
+
insetInlineStart?: import("react-native").DimensionValue | undefined;
|
|
136
|
+
marginBlock?: import("react-native").DimensionValue | undefined;
|
|
137
|
+
marginBlockEnd?: import("react-native").DimensionValue | undefined;
|
|
138
|
+
marginBlockStart?: import("react-native").DimensionValue | undefined;
|
|
139
|
+
marginInline?: import("react-native").DimensionValue | undefined;
|
|
140
|
+
marginInlineEnd?: import("react-native").DimensionValue | undefined;
|
|
141
|
+
marginInlineStart?: import("react-native").DimensionValue | undefined;
|
|
142
|
+
paddingBlock?: import("react-native").DimensionValue | undefined;
|
|
143
|
+
paddingBlockEnd?: import("react-native").DimensionValue | undefined;
|
|
144
|
+
paddingBlockStart?: import("react-native").DimensionValue | undefined;
|
|
145
|
+
paddingInline?: import("react-native").DimensionValue | undefined;
|
|
146
|
+
paddingInlineEnd?: import("react-native").DimensionValue | undefined;
|
|
147
|
+
paddingInlineStart?: import("react-native").DimensionValue | undefined;
|
|
148
|
+
shadowColor?: import("react-native").ColorValue | undefined;
|
|
149
|
+
shadowOpacity?: import("react-native").AnimatableNumericValue | undefined;
|
|
150
|
+
shadowRadius?: number | undefined;
|
|
151
|
+
transform?: Readonly<import("react-native").MaximumOneOf<import("react-native").PerspectiveTransform & import("react-native").RotateTransform & import("react-native").RotateXTransform & import("react-native").RotateYTransform & import("react-native").RotateZTransform & import("react-native").ScaleTransform & import("react-native").ScaleXTransform & import("react-native").ScaleYTransform & import("react-native").TranslateXTransform & import("react-native").TranslateYTransform & import("react-native").SkewXTransform & import("react-native").SkewYTransform & import("react-native").MatrixTransform>[]> | string | undefined;
|
|
152
|
+
transformOrigin?: Array<string | number> | string | undefined;
|
|
153
|
+
transformMatrix?: Array<number> | undefined;
|
|
154
|
+
rotation?: import("react-native").AnimatableNumericValue | undefined;
|
|
155
|
+
scaleX?: import("react-native").AnimatableNumericValue | undefined;
|
|
156
|
+
scaleY?: import("react-native").AnimatableNumericValue | undefined;
|
|
157
|
+
translateX?: import("react-native").AnimatableNumericValue | undefined;
|
|
158
|
+
translateY?: import("react-native").AnimatableNumericValue | undefined;
|
|
159
|
+
textAlignVertical?: "auto" | "top" | "bottom" | "center" | undefined;
|
|
160
|
+
verticalAlign?: "auto" | "top" | "bottom" | "middle" | undefined;
|
|
161
|
+
includeFontPadding?: boolean | undefined;
|
|
162
|
+
};
|
|
163
|
+
//# sourceMappingURL=util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../src/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,SAAS,EAAc,KAAK,SAAS,EAAC,MAAM,cAAc,CAAA;AACvE,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,oCAAoC,CAAA;AAExE,wBAAgB,aAAa,CAC3B,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa5B"}
|
package/package.json
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bsky.app/react-native-uitextview",
|
|
3
|
+
"version": "2.3.0",
|
|
4
|
+
"description": "UITextView for React Native",
|
|
5
|
+
"source": "./src/index.tsx",
|
|
6
|
+
"main": "./lib/commonjs/index.js",
|
|
7
|
+
"types": "./lib/typescript/commonjs/src/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"src",
|
|
10
|
+
"lib",
|
|
11
|
+
"android",
|
|
12
|
+
"ios",
|
|
13
|
+
"cpp",
|
|
14
|
+
"scripts",
|
|
15
|
+
"*.podspec",
|
|
16
|
+
"react-native.config.js",
|
|
17
|
+
"!ios/build",
|
|
18
|
+
"!android/build",
|
|
19
|
+
"!android/gradle",
|
|
20
|
+
"!android/gradlew",
|
|
21
|
+
"!android/gradlew.bat",
|
|
22
|
+
"!android/local.properties",
|
|
23
|
+
"!**/__tests__",
|
|
24
|
+
"!**/__fixtures__",
|
|
25
|
+
"!**/__mocks__",
|
|
26
|
+
"!**/.*"
|
|
27
|
+
],
|
|
28
|
+
"scripts": {
|
|
29
|
+
"example": "yarn workspace react-native-uitextview-example",
|
|
30
|
+
"test": "jest",
|
|
31
|
+
"typecheck": "tsc",
|
|
32
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
33
|
+
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
34
|
+
"prepare": "node scripts/ensure-rnc-cli-executable.js && bob build",
|
|
35
|
+
"release": "release-it"
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"react-native",
|
|
39
|
+
"ios",
|
|
40
|
+
"android"
|
|
41
|
+
],
|
|
42
|
+
"repository": {
|
|
43
|
+
"type": "git",
|
|
44
|
+
"url": "git+https://github.com/bluesky-social/react-native-uitextview.git"
|
|
45
|
+
},
|
|
46
|
+
"author": "Hailey <hailey@blueskyweb.xyz> (https://github.com/haileyok)",
|
|
47
|
+
"license": "MIT",
|
|
48
|
+
"bugs": {
|
|
49
|
+
"url": "https://github.com/bluesky-social/react-native-uitextview/issues"
|
|
50
|
+
},
|
|
51
|
+
"homepage": "https://github.com/bluesky-social/react-native-uitextview#readme",
|
|
52
|
+
"publishConfig": {
|
|
53
|
+
"registry": "https://registry.npmjs.org/"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@commitlint/config-conventional": "^19.6.0",
|
|
57
|
+
"@eslint/compat": "^1.2.7",
|
|
58
|
+
"@eslint/eslintrc": "^3.3.0",
|
|
59
|
+
"@eslint/js": "^9.22.0",
|
|
60
|
+
"@evilmartians/lefthook": "^1.5.0",
|
|
61
|
+
"@react-native-community/cli": "20.1.0",
|
|
62
|
+
"@react-native/babel-preset": "0.86.0",
|
|
63
|
+
"@react-native/eslint-config": "0.86.0",
|
|
64
|
+
"@react-native/jest-preset": "0.86.0",
|
|
65
|
+
"@release-it/conventional-changelog": "^9.0.2",
|
|
66
|
+
"@types/jest": "^29.5.5",
|
|
67
|
+
"@types/react": "^19.2.0",
|
|
68
|
+
"commitlint": "^19.6.1",
|
|
69
|
+
"del-cli": "^5.1.0",
|
|
70
|
+
"eslint": "^9.22.0",
|
|
71
|
+
"eslint-config-prettier": "^10.1.1",
|
|
72
|
+
"eslint-plugin-prettier": "^5.2.3",
|
|
73
|
+
"jest": "^29.7.0",
|
|
74
|
+
"prettier": "^3.0.3",
|
|
75
|
+
"react": "19.2.3",
|
|
76
|
+
"react-native": "0.86.0",
|
|
77
|
+
"react-native-builder-bob": "0.43.0",
|
|
78
|
+
"react-native-test-app": "5.4.5",
|
|
79
|
+
"release-it": "^19.0.1",
|
|
80
|
+
"turbo": "^1.10.7",
|
|
81
|
+
"typescript": "^5.8.3"
|
|
82
|
+
},
|
|
83
|
+
"peerDependencies": {
|
|
84
|
+
"react": "*",
|
|
85
|
+
"react-native": ">=0.80.0"
|
|
86
|
+
},
|
|
87
|
+
"workspaces": [
|
|
88
|
+
"example"
|
|
89
|
+
],
|
|
90
|
+
"packageManager": "yarn@3.6.1",
|
|
91
|
+
"jest": {
|
|
92
|
+
"preset": "react-native",
|
|
93
|
+
"modulePathIgnorePatterns": [
|
|
94
|
+
"<rootDir>/example/node_modules",
|
|
95
|
+
"<rootDir>/lib/"
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
"commitlint": {
|
|
99
|
+
"extends": [
|
|
100
|
+
"@commitlint/config-conventional"
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
"release-it": {
|
|
104
|
+
"git": {
|
|
105
|
+
"commitMessage": "chore: release ${version}",
|
|
106
|
+
"tagName": "v${version}"
|
|
107
|
+
},
|
|
108
|
+
"npm": {
|
|
109
|
+
"publish": false
|
|
110
|
+
},
|
|
111
|
+
"github": {
|
|
112
|
+
"release": true
|
|
113
|
+
},
|
|
114
|
+
"plugins": {
|
|
115
|
+
"@release-it/conventional-changelog": {
|
|
116
|
+
"whatBump": false,
|
|
117
|
+
"preset": {
|
|
118
|
+
"name": "angular"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"prettier": {
|
|
124
|
+
"semi": false,
|
|
125
|
+
"arrowParens": "avoid",
|
|
126
|
+
"bracketSameLine": true,
|
|
127
|
+
"bracketSpacing": false,
|
|
128
|
+
"quoteProps": "consistent",
|
|
129
|
+
"singleQuote": true,
|
|
130
|
+
"tabWidth": 2,
|
|
131
|
+
"trailingComma": "all",
|
|
132
|
+
"useTabs": false
|
|
133
|
+
},
|
|
134
|
+
"codegenConfig": {
|
|
135
|
+
"name": "RNUITextViewSpec",
|
|
136
|
+
"type": "all",
|
|
137
|
+
"jsSrcsDir": "src",
|
|
138
|
+
"ios": {
|
|
139
|
+
"componentProvider": {
|
|
140
|
+
"RNUITextView": "RNUITextView",
|
|
141
|
+
"RNUITextViewChild": "RNUITextViewChild"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"android": {
|
|
145
|
+
"javaPackageName": "xyz.blueskyweb.rnuitextview"
|
|
146
|
+
},
|
|
147
|
+
"outputDir": {
|
|
148
|
+
"android": "android/generated",
|
|
149
|
+
"ios": "ios/generated"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"create-react-native-library": {
|
|
153
|
+
"languages": "kotlin-objc",
|
|
154
|
+
"type": "fabric-view",
|
|
155
|
+
"version": "0.49.8"
|
|
156
|
+
},
|
|
157
|
+
"module": "./lib/module/index.js",
|
|
158
|
+
"react-native-builder-bob": {
|
|
159
|
+
"source": "src",
|
|
160
|
+
"output": "lib",
|
|
161
|
+
"targets": [
|
|
162
|
+
[
|
|
163
|
+
"commonjs",
|
|
164
|
+
{
|
|
165
|
+
"esm": true
|
|
166
|
+
}
|
|
167
|
+
],
|
|
168
|
+
[
|
|
169
|
+
"module",
|
|
170
|
+
{
|
|
171
|
+
"esm": true
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
[
|
|
175
|
+
"typescript",
|
|
176
|
+
{}
|
|
177
|
+
],
|
|
178
|
+
"codegen"
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
"eslintIgnore": [
|
|
182
|
+
"node_modules/",
|
|
183
|
+
"lib/"
|
|
184
|
+
]
|
|
185
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
require "json"
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
+
|
|
5
|
+
# Detect whether the new architecture / Fabric is enabled
|
|
6
|
+
new_arch_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Pod::Spec.new do |s|
|
|
10
|
+
s.name = "react-native-uitextview"
|
|
11
|
+
s.version = package["version"]
|
|
12
|
+
s.summary = package["description"]
|
|
13
|
+
s.homepage = package["homepage"]
|
|
14
|
+
s.license = package["license"]
|
|
15
|
+
s.authors = package["author"]
|
|
16
|
+
|
|
17
|
+
s.platforms = { :ios => min_ios_version_supported }
|
|
18
|
+
s.source = { :git => "https://github.com/bluesky-social/react-native-uitextview.git", :tag => "#{s.version}" }
|
|
19
|
+
|
|
20
|
+
# Include module‑authored Obj‑C/Obj‑C++ plus the C++ files that Codegen
|
|
21
|
+
# writes to build/generated/ios during `pod install`
|
|
22
|
+
s.source_files = [
|
|
23
|
+
"ios/**/*.{h,mm,cpp}",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
install_modules_dependencies(s)
|
|
27
|
+
|
|
28
|
+
# ---------- Fabric Components (when using frameworks) ----------
|
|
29
|
+
if ENV['USE_FRAMEWORKS'] != nil && new_arch_enabled
|
|
30
|
+
add_dependency(s, "React-FabricComponents", :additional_framework_paths => [
|
|
31
|
+
"react/renderer/textlayoutmanager/platform/ios",
|
|
32
|
+
])
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const project = (() => {
|
|
2
|
+
const path = require('node:path')
|
|
3
|
+
try {
|
|
4
|
+
const {configureProjects} = require('react-native-test-app')
|
|
5
|
+
|
|
6
|
+
return configureProjects({
|
|
7
|
+
android: {},
|
|
8
|
+
ios: {
|
|
9
|
+
sourceDir: path.join('example', 'ios'),
|
|
10
|
+
},
|
|
11
|
+
})
|
|
12
|
+
} catch {
|
|
13
|
+
return undefined
|
|
14
|
+
}
|
|
15
|
+
})()
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @type {import('@react-native-community/cli-types').UserDependencyConfig}
|
|
19
|
+
*/
|
|
20
|
+
module.exports = {
|
|
21
|
+
dependencies: {
|
|
22
|
+
// Help rn-cli find and autolink this library
|
|
23
|
+
'@bsky.app/react-native-uitextview': {
|
|
24
|
+
root: __dirname,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
...(project ? {project} : undefined),
|
|
28
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const fs = require('node:fs')
|
|
2
|
+
const path = require('node:path')
|
|
3
|
+
|
|
4
|
+
if (process.platform !== 'win32') {
|
|
5
|
+
const packagePath = require.resolve(
|
|
6
|
+
'@react-native-community/cli/package.json',
|
|
7
|
+
)
|
|
8
|
+
const packageJson = JSON.parse(fs.readFileSync(packagePath, 'utf8'))
|
|
9
|
+
const binPath = packageJson.bin?.['rnc-cli']
|
|
10
|
+
|
|
11
|
+
if (typeof binPath !== 'string') {
|
|
12
|
+
throw new Error('Could not resolve the rnc-cli executable')
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const executablePath = path.resolve(path.dirname(packagePath), binPath)
|
|
16
|
+
const mode = fs.statSync(executablePath).mode
|
|
17
|
+
|
|
18
|
+
fs.chmodSync(executablePath, mode | 0o111)
|
|
19
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type CodegenTypes,
|
|
3
|
+
type ColorValue,
|
|
4
|
+
type ViewProps,
|
|
5
|
+
codegenNativeComponent,
|
|
6
|
+
} from 'react-native'
|
|
7
|
+
|
|
8
|
+
interface TargetedEvent {
|
|
9
|
+
target: CodegenTypes.Int32
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type TextDecorationLine = 'none' | 'underline' | 'line-through'
|
|
13
|
+
|
|
14
|
+
type TextDecorationStyle = 'solid' | 'double' | 'dotted' | 'dashed'
|
|
15
|
+
|
|
16
|
+
export type NativeFontWeight =
|
|
17
|
+
| 'normal'
|
|
18
|
+
| 'bold'
|
|
19
|
+
| 'ultraLight'
|
|
20
|
+
| 'light'
|
|
21
|
+
| 'medium'
|
|
22
|
+
| 'semibold'
|
|
23
|
+
| 'heavy'
|
|
24
|
+
|
|
25
|
+
type FontStyle = 'normal' | 'italic'
|
|
26
|
+
|
|
27
|
+
type TextAlign = 'auto' | 'left' | 'right' | 'center' | 'justify'
|
|
28
|
+
|
|
29
|
+
interface NativeProps extends ViewProps {
|
|
30
|
+
text: string
|
|
31
|
+
color?: ColorValue
|
|
32
|
+
fontSize?: CodegenTypes.Float
|
|
33
|
+
fontStyle?: CodegenTypes.WithDefault<FontStyle, 'normal'>
|
|
34
|
+
fontWeight?: CodegenTypes.WithDefault<NativeFontWeight, 'normal'>
|
|
35
|
+
fontFamily?: string
|
|
36
|
+
letterSpacing?: CodegenTypes.Float
|
|
37
|
+
lineHeight?: CodegenTypes.Float
|
|
38
|
+
textDecorationLine?: CodegenTypes.WithDefault<TextDecorationLine, 'none'>
|
|
39
|
+
textDecorationStyle?: CodegenTypes.WithDefault<TextDecorationStyle, 'solid'>
|
|
40
|
+
textDecorationColor?: ColorValue
|
|
41
|
+
textAlign?: CodegenTypes.WithDefault<TextAlign, 'auto'>
|
|
42
|
+
shadowRadius?: CodegenTypes.WithDefault<CodegenTypes.Float, 0>
|
|
43
|
+
onPress?: CodegenTypes.BubblingEventHandler<TargetedEvent>
|
|
44
|
+
onLongPress?: CodegenTypes.BubblingEventHandler<TargetedEvent>
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export default codegenNativeComponent<NativeProps>('RNUITextViewChild', {
|
|
48
|
+
excludedPlatforms: ['android'],
|
|
49
|
+
})
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type CodegenTypes,
|
|
3
|
+
type ViewProps,
|
|
4
|
+
codegenNativeComponent,
|
|
5
|
+
} from 'react-native'
|
|
6
|
+
|
|
7
|
+
interface TargetedEvent {
|
|
8
|
+
target: CodegenTypes.Int32
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface TextLayoutEvent extends TargetedEvent {
|
|
12
|
+
lines: string[]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Event fired when text selection changes in the UITextView.
|
|
17
|
+
* @property target - The view tag identifier
|
|
18
|
+
* @property start - The start index of the selected range (0-based)
|
|
19
|
+
* @property end - The end index of the selected range (0-based, exclusive)
|
|
20
|
+
*/
|
|
21
|
+
interface SelectionChangeEvent extends TargetedEvent {
|
|
22
|
+
start: CodegenTypes.Int32
|
|
23
|
+
end: CodegenTypes.Int32
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
type EllipsizeMode = 'head' | 'middle' | 'tail' | 'clip'
|
|
27
|
+
|
|
28
|
+
interface NativeProps extends ViewProps {
|
|
29
|
+
numberOfLines?: CodegenTypes.Int32
|
|
30
|
+
allowFontScaling?: CodegenTypes.WithDefault<boolean, true>
|
|
31
|
+
ellipsizeMode?: CodegenTypes.WithDefault<EllipsizeMode, 'tail'>
|
|
32
|
+
selectable?: boolean
|
|
33
|
+
onTextLayout?: CodegenTypes.BubblingEventHandler<TextLayoutEvent>
|
|
34
|
+
/**
|
|
35
|
+
* Callback fired when the text selection changes.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* <UITextView
|
|
40
|
+
* onSelectionChange={(event) => {
|
|
41
|
+
* console.log('Selection:', event.nativeEvent.start, event.nativeEvent.end);
|
|
42
|
+
* }}
|
|
43
|
+
* >
|
|
44
|
+
* Selectable text
|
|
45
|
+
* </UITextView>
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
onSelectionChange?: CodegenTypes.BubblingEventHandler<SelectionChangeEvent>
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export default codegenNativeComponent<NativeProps>('RNUITextView', {
|
|
52
|
+
excludedPlatforms: ['android'],
|
|
53
|
+
})
|