@bsky.app/react-native-uitextview 2.3.0 → 2.4.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.
Files changed (25) hide show
  1. package/README.md +3 -4
  2. package/ios/RNUITextView.mm +66 -35
  3. package/ios/RNUITextViewChild.mm +0 -1
  4. package/ios/RNUITextViewManager.mm +0 -1
  5. package/ios/RNUITextViewShadowNode.cpp +32 -13
  6. package/ios/RNUITextViewShadowNode.h +1 -1
  7. package/lib/typescript/commonjs/example/src/App.d.ts.map +1 -1
  8. package/lib/typescript/commonjs/lib/commonjs/RNUITextViewChildNativeComponent.d.ts +29 -0
  9. package/lib/typescript/commonjs/lib/commonjs/RNUITextViewChildNativeComponent.d.ts.map +1 -0
  10. package/lib/typescript/commonjs/lib/commonjs/RNUITextViewNativeComponent.d.ts +43 -0
  11. package/lib/typescript/commonjs/lib/commonjs/RNUITextViewNativeComponent.d.ts.map +1 -0
  12. package/lib/typescript/commonjs/lib/module/RNUITextViewChildNativeComponent.d.ts +29 -0
  13. package/lib/typescript/commonjs/lib/module/RNUITextViewChildNativeComponent.d.ts.map +1 -0
  14. package/lib/typescript/commonjs/lib/module/RNUITextViewNativeComponent.d.ts +43 -0
  15. package/lib/typescript/commonjs/lib/module/RNUITextViewNativeComponent.d.ts.map +1 -0
  16. package/lib/typescript/module/example/src/App.d.ts.map +1 -1
  17. package/lib/typescript/module/lib/commonjs/RNUITextViewChildNativeComponent.d.ts +29 -0
  18. package/lib/typescript/module/lib/commonjs/RNUITextViewChildNativeComponent.d.ts.map +1 -0
  19. package/lib/typescript/module/lib/commonjs/RNUITextViewNativeComponent.d.ts +43 -0
  20. package/lib/typescript/module/lib/commonjs/RNUITextViewNativeComponent.d.ts.map +1 -0
  21. package/lib/typescript/module/lib/module/RNUITextViewChildNativeComponent.d.ts +29 -0
  22. package/lib/typescript/module/lib/module/RNUITextViewChildNativeComponent.d.ts.map +1 -0
  23. package/lib/typescript/module/lib/module/RNUITextViewNativeComponent.d.ts +43 -0
  24. package/lib/typescript/module/lib/module/RNUITextViewNativeComponent.d.ts.map +1 -0
  25. package/package.json +2 -2
package/README.md CHANGED
@@ -39,10 +39,9 @@ block of text.
39
39
  > work the same as `2.x` and higher.
40
40
 
41
41
  > [!NOTE]
42
- > Version 2.0.0 of `@bsky.app/react-native-uitextview` is tested against and used in production with React Nave 0.79. No other versions
43
- > are officially supported. As there have been a number of changes to the text layout engine in the new architecture, things
44
- > may be broken if you are not using this version of React Native with this package. Generally, these problems are inside of
45
- > `RNUITextViewShadowNode.cpp`.
42
+ > Version 2.4.0 of `@bsky.app/react-native-uitextview` is tested against React Native 0.86 and supports React Native 0.81.5 and newer.
43
+ > React Native's new-architecture text layout APIs can change between releases; compatibility issues are most likely to arise
44
+ > in `RNUITextViewShadowNode.cpp`.
46
45
 
47
46
  ```sh
48
47
  yarn add @bsky.app/react-native-uitextview
@@ -12,6 +12,20 @@
12
12
 
13
13
  using namespace facebook::react;
14
14
 
15
+ static NSLineBreakMode RCTNSLineBreakModeFromEllipsizeMode(RNUITextViewEllipsizeMode ellipsizeMode)
16
+ {
17
+ switch (ellipsizeMode) {
18
+ case RNUITextViewEllipsizeMode::Clip:
19
+ return NSLineBreakByClipping;
20
+ case RNUITextViewEllipsizeMode::Head:
21
+ return NSLineBreakByTruncatingHead;
22
+ case RNUITextViewEllipsizeMode::Tail:
23
+ return NSLineBreakByTruncatingTail;
24
+ case RNUITextViewEllipsizeMode::Middle:
25
+ return NSLineBreakByTruncatingMiddle;
26
+ }
27
+ }
28
+
15
29
  @interface RNUITextView () <RCTRNUITextViewViewProtocol, UIGestureRecognizerDelegate, UITextViewDelegate>
16
30
 
17
31
  @end
@@ -42,8 +56,13 @@ using namespace facebook::react;
42
56
  _textView = [[UITextView alloc] init];
43
57
  _textView.scrollEnabled = false;
44
58
  _textView.editable = false;
59
+ _textView.selectable = false;
45
60
  _textView.textContainerInset = UIEdgeInsetsZero;
46
61
  _textView.textContainer.lineFragmentPadding = 0;
62
+ // Keep UIKit's initial state in sync with the Codegen prop default. Since
63
+ // both oldProps and newProps default to `tail`, updateProps will not apply
64
+ // this value on the first render.
65
+ _textView.textContainer.lineBreakMode = NSLineBreakByTruncatingTail;
47
66
  _textView.delegate = self;
48
67
  // Must match RCTTextLayoutManager, which measures with usesFontLeading = NO.
49
68
  _textView.layoutManager.usesFontLeading = NO;
@@ -147,7 +166,7 @@ using namespace facebook::react;
147
166
 
148
167
  __block std::vector<std::string> lines;
149
168
  const int maxLines = props.numberOfLines;
150
- [_textView.layoutManager enumerateLineFragmentsForGlyphRange:NSMakeRange(0, convertedAttrString.string.length) usingBlock:^(CGRect rect,
169
+ [_textView.layoutManager enumerateLineFragmentsForGlyphRange:NSMakeRange(0, _textView.layoutManager.numberOfGlyphs) usingBlock:^(CGRect rect,
151
170
  CGRect usedRect,
152
171
  NSTextContainer * _Nonnull textContainer,
153
172
  NSRange glyphRange,
@@ -188,15 +207,8 @@ using namespace facebook::react;
188
207
  }
189
208
 
190
209
  if (oldViewProps.ellipsizeMode != newViewProps.ellipsizeMode) {
191
- if (newViewProps.ellipsizeMode == RNUITextViewEllipsizeMode::Head) {
192
- _textView.textContainer.lineBreakMode = NSLineBreakMode::NSLineBreakByTruncatingHead;
193
- } else if (newViewProps.ellipsizeMode == RNUITextViewEllipsizeMode::Middle) {
194
- _textView.textContainer.lineBreakMode = NSLineBreakMode::NSLineBreakByTruncatingMiddle;
195
- } else if (newViewProps.ellipsizeMode == RNUITextViewEllipsizeMode::Tail) {
196
- _textView.textContainer.lineBreakMode = NSLineBreakMode::NSLineBreakByTruncatingTail;
197
- } else if (newViewProps.ellipsizeMode == RNUITextViewEllipsizeMode::Clip) {
198
- _textView.textContainer.lineBreakMode = NSLineBreakMode::NSLineBreakByClipping;
199
- }
210
+ _textView.textContainer.lineBreakMode =
211
+ RCTNSLineBreakModeFromEllipsizeMode(newViewProps.ellipsizeMode);
200
212
  }
201
213
 
202
214
 
@@ -258,49 +270,68 @@ using namespace facebook::react;
258
270
  return [sender locationInView:_textView];
259
271
  }
260
272
 
261
- - (RNUITextViewChild*)getTouchChild:(CGPoint)location
273
+ - (std::shared_ptr<const RNUITextViewChildEventEmitter>)getTouchEventEmitter:(CGPoint)location
262
274
  {
263
- const auto charIndex = [_textView.layoutManager characterIndexForPoint:location
264
- inTextContainer:_textView.textContainer
265
- fractionOfDistanceBetweenInsertionPoints:nil
266
- ];
267
-
268
- int currIndex = -1;
269
- for (UIView* child in self.subviews) {
270
- if (![child isKindOfClass:[RNUITextViewChild class]]) {
271
- continue;
272
- }
273
-
274
- RNUITextViewChild* textChild = (RNUITextViewChild*)child;
275
+ CGFloat fraction;
276
+ const auto characterIndex = [_textView.layoutManager characterIndexForPoint:location
277
+ inTextContainer:_textView.textContainer
278
+ fractionOfDistanceBetweenInsertionPoints:&fraction];
279
+
280
+ const auto textLength = _textView.attributedText.length;
281
+ if (textLength == 0 || characterIndex == NSNotFound || characterIndex >= textLength) {
282
+ return nullptr;
283
+ }
275
284
 
276
- // This is UTF16 code units!!
277
- currIndex += textChild.text.length;
285
+ const auto lastCharacterRange =
286
+ [_textView.attributedText.string rangeOfComposedCharacterSequenceAtIndex:textLength - 1];
287
+ if ((characterIndex == 0 && fraction <= 0) ||
288
+ (characterIndex >= lastCharacterRange.location && fraction >= 1)) {
289
+ return nullptr;
290
+ }
278
291
 
279
- if (charIndex <= currIndex) {
280
- return textChild;
281
- }
292
+ const auto glyphIndex = [_textView.layoutManager glyphIndexForCharacterAtIndex:characterIndex];
293
+ const auto lineUsedRect = [_textView.layoutManager lineFragmentUsedRectForGlyphAtIndex:glyphIndex
294
+ effectiveRange:nullptr];
295
+ const auto textContainerLocation = CGPointMake(
296
+ location.x - _textView.textContainerInset.left,
297
+ location.y - _textView.textContainerInset.top);
298
+ if (!CGRectContainsPoint(lineUsedRect, textContainerLocation)) {
299
+ return nullptr;
282
300
  }
283
301
 
284
- return nil;
302
+ NSData *eventEmitterWrapper =
303
+ (NSData *)[_textView.attributedText attribute:RCTAttributedStringEventEmitterKey
304
+ atIndex:characterIndex
305
+ effectiveRange:nullptr];
306
+ const auto eventEmitter = RCTUnwrapEventEmitter(eventEmitterWrapper);
307
+ return std::dynamic_pointer_cast<const RNUITextViewChildEventEmitter>(eventEmitter);
285
308
  }
286
309
 
287
310
  - (void)handlePressIfNecessary:(UITapGestureRecognizer*)sender
288
311
  {
289
312
  const auto location = [self getLocationOfPress:sender];
290
- const auto child = [self getTouchChild:location];
313
+ const auto eventEmitter = [self getTouchEventEmitter:location];
291
314
 
292
- if (child) {
293
- [child onPress];
315
+ if (eventEmitter) {
316
+ const auto eventTarget = eventEmitter->getEventTarget();
317
+ const auto target = eventTarget ? eventTarget->getTag() : 0;
318
+ eventEmitter->onPress(RNUITextViewChildEventEmitter::OnPress{target});
294
319
  }
295
320
  }
296
321
 
297
322
  - (void)handleLongPressIfNecessary:(UILongPressGestureRecognizer*)sender
298
323
  {
324
+ if (sender.state != UIGestureRecognizerStateBegan) {
325
+ return;
326
+ }
327
+
299
328
  const auto location = [self getLocationOfPress:sender];
300
- const auto child = [self getTouchChild:location];
329
+ const auto eventEmitter = [self getTouchEventEmitter:location];
301
330
 
302
- if (child) {
303
- [child onLongPress];
331
+ if (eventEmitter) {
332
+ const auto eventTarget = eventEmitter->getEventTarget();
333
+ const auto target = eventTarget ? eventTarget->getTag() : 0;
334
+ eventEmitter->onLongPress(RNUITextViewChildEventEmitter::OnLongPress{target});
304
335
  }
305
336
  }
306
337
 
@@ -5,7 +5,6 @@
5
5
  #import <react/renderer/components/RNUITextViewSpec/Props.h>
6
6
  #import <react/renderer/components/RNUITextViewSpec/RCTComponentViewHelpers.h>
7
7
  #import "RCTFabricComponentsPlugins.h"
8
- #import "Utils.h"
9
8
 
10
9
  using namespace facebook::react;
11
10
 
@@ -1,7 +1,6 @@
1
1
  #import <React/RCTViewManager.h>
2
2
  #import <React/RCTUIManager.h>
3
3
  #import "RCTBridge.h"
4
- #import "Utils.h"
5
4
 
6
5
  @interface RNUITextViewManager : RCTViewManager
7
6
  @end
@@ -1,11 +1,21 @@
1
1
  #include "RNUITextViewShadowNode.h"
2
2
  #include "RNUITextViewChildShadowNode.h"
3
3
  #include <react/renderer/components/view/ViewShadowNode.h>
4
+ #include <react/renderer/mounting/ShadowView.h>
4
5
 
5
6
  #include <cmath>
6
7
 
7
8
  namespace facebook::react {
8
9
 
10
+ static ShadowView shadowViewFromShadowNode(const ShadowNode& shadowNode) {
11
+ auto shadowView = ShadowView{shadowNode};
12
+ // The attributed string only needs the component identity and event emitter.
13
+ // Dropping props and state avoids retaining the shadow tree through state.
14
+ shadowView.props = nullptr;
15
+ shadowView.state = nullptr;
16
+ return shadowView;
17
+ }
18
+
9
19
  RNUITextViewShadowNode::RNUITextViewShadowNode(
10
20
  const ShadowNode& sourceShadowNode,
11
21
  const ShadowNodeFragment& fragment
@@ -28,6 +38,25 @@ Size RNUITextViewShadowNode::measureContent(
28
38
  paragraphAttributes.ellipsizeMode = EllipsizeMode::Clip;
29
39
  }
30
40
 
41
+ const auto attributedString = getAttributedString(layoutContext);
42
+
43
+ TextLayoutContext textLayoutContext{
44
+ .pointScaleFactor = layoutContext.pointScaleFactor,
45
+ .surfaceId = getSurfaceId(),
46
+ };
47
+ const auto textLayoutManager = std::make_shared<const TextLayoutManager>(getContextContainer());
48
+
49
+ return textLayoutManager->measure(
50
+ AttributedStringBox{attributedString},
51
+ paragraphAttributes,
52
+ textLayoutContext,
53
+ layoutConstraints
54
+ ).size;
55
+ }
56
+
57
+ AttributedString RNUITextViewShadowNode::getAttributedString(
58
+ const LayoutContext& layoutContext) const {
59
+ const auto &baseProps = getConcreteProps();
31
60
  auto baseTextAttributes = TextAttributes::defaultTextAttributes();
32
61
  baseTextAttributes.backgroundColor = baseProps.backgroundColor;
33
62
  baseTextAttributes.allowFontScaling = baseProps.allowFontScaling;
@@ -111,29 +140,19 @@ Size RNUITextViewShadowNode::measureContent(
111
140
 
112
141
  fragment.string = props.text;
113
142
  fragment.textAttributes = textAttributes;
143
+ fragment.parentShadowView = shadowViewFromShadowNode(*textViewChild);
114
144
 
115
145
  baseAttributedString.appendFragment(std::move(fragment));
116
146
  }
117
147
  }
118
148
 
119
- _attributedString = baseAttributedString;
120
-
121
- TextLayoutContext textLayoutContext{};
122
- textLayoutContext.pointScaleFactor = layoutContext.pointScaleFactor;
123
- const auto textLayoutManager = std::make_shared<const TextLayoutManager>(getContextContainer());
124
-
125
- return textLayoutManager->measure(
126
- AttributedStringBox{baseAttributedString},
127
- paragraphAttributes,
128
- textLayoutContext,
129
- layoutConstraints
130
- ).size;
149
+ return baseAttributedString;
131
150
  }
132
151
 
133
152
  void RNUITextViewShadowNode::layout(LayoutContext layoutContext) {
134
153
  ensureUnsealed();
135
154
  setStateData(RNUITextViewStateReal{
136
- _attributedString
155
+ getAttributedString(layoutContext)
137
156
  });
138
157
  }
139
158
  }
@@ -43,6 +43,6 @@ public:
43
43
  const LayoutConstraints& layoutConstraints) const override;
44
44
 
45
45
  private:
46
- mutable AttributedString _attributedString;
46
+ AttributedString getAttributedString(const LayoutContext& layoutContext) const;
47
47
  };
48
48
  } // namespace facebook::React
@@ -1 +1 @@
1
- {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../../../../example/src/App.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA8E9B,MAAM,CAAC,OAAO,UAAU,GAAG,sBA8sB1B"}
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../../../../example/src/App.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA8E9B,MAAM,CAAC,OAAO,UAAU,GAAG,sBAkwB1B"}
@@ -0,0 +1,29 @@
1
+ import { type CodegenTypes, type ColorValue, type ViewProps } from 'react-native';
2
+ interface TargetedEvent {
3
+ target: CodegenTypes.Int32;
4
+ }
5
+ type TextDecorationLine = 'none' | 'underline' | 'line-through';
6
+ type TextDecorationStyle = 'solid' | 'double' | 'dotted' | 'dashed';
7
+ export type NativeFontWeight = 'normal' | 'bold' | 'ultraLight' | 'light' | 'medium' | 'semibold' | 'heavy';
8
+ type FontStyle = 'normal' | 'italic';
9
+ type TextAlign = 'auto' | 'left' | 'right' | 'center' | 'justify';
10
+ interface NativeProps extends ViewProps {
11
+ text: string;
12
+ color?: ColorValue;
13
+ fontSize?: CodegenTypes.Float;
14
+ fontStyle?: CodegenTypes.WithDefault<FontStyle, 'normal'>;
15
+ fontWeight?: CodegenTypes.WithDefault<NativeFontWeight, 'normal'>;
16
+ fontFamily?: string;
17
+ letterSpacing?: CodegenTypes.Float;
18
+ lineHeight?: CodegenTypes.Float;
19
+ textDecorationLine?: CodegenTypes.WithDefault<TextDecorationLine, 'none'>;
20
+ textDecorationStyle?: CodegenTypes.WithDefault<TextDecorationStyle, 'solid'>;
21
+ textDecorationColor?: ColorValue;
22
+ textAlign?: CodegenTypes.WithDefault<TextAlign, 'auto'>;
23
+ shadowRadius?: CodegenTypes.WithDefault<CodegenTypes.Float, 0>;
24
+ onPress?: CodegenTypes.BubblingEventHandler<TargetedEvent>;
25
+ onLongPress?: CodegenTypes.BubblingEventHandler<TargetedEvent>;
26
+ }
27
+ declare const _default: import("react-native").HostComponent<NativeProps>;
28
+ export default _default;
29
+ //# sourceMappingURL=RNUITextViewChildNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RNUITextViewChildNativeComponent.d.ts","sourceRoot":"","sources":["../../../../commonjs/RNUITextViewChildNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,SAAS,EAEf,MAAM,cAAc,CAAA;AAErB,UAAU,aAAa;IACrB,MAAM,EAAE,YAAY,CAAC,KAAK,CAAA;CAC3B;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,YAAY,CAAC,KAAK,CAAA;IAC7B,SAAS,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAA;IACzD,UAAU,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAA;IACjE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,YAAY,CAAC,KAAK,CAAA;IAClC,UAAU,CAAC,EAAE,YAAY,CAAC,KAAK,CAAA;IAC/B,kBAAkB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAA;IACzE,mBAAmB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAA;IAC5E,mBAAmB,CAAC,EAAE,UAAU,CAAA;IAChC,SAAS,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAA;IACvD,YAAY,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;IAC9D,OAAO,CAAC,EAAE,YAAY,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAA;IAC1D,WAAW,CAAC,EAAE,YAAY,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAA;CAC/D;;AAED,wBAEE"}
@@ -0,0 +1,43 @@
1
+ import { type CodegenTypes, type ViewProps } from 'react-native';
2
+ interface TargetedEvent {
3
+ target: CodegenTypes.Int32;
4
+ }
5
+ interface TextLayoutEvent extends TargetedEvent {
6
+ lines: string[];
7
+ }
8
+ /**
9
+ * Event fired when text selection changes in the UITextView.
10
+ * @property target - The view tag identifier
11
+ * @property start - The start index of the selected range (0-based)
12
+ * @property end - The end index of the selected range (0-based, exclusive)
13
+ */
14
+ interface SelectionChangeEvent extends TargetedEvent {
15
+ start: CodegenTypes.Int32;
16
+ end: CodegenTypes.Int32;
17
+ }
18
+ type EllipsizeMode = 'head' | 'middle' | 'tail' | 'clip';
19
+ interface NativeProps extends ViewProps {
20
+ numberOfLines?: CodegenTypes.Int32;
21
+ allowFontScaling?: CodegenTypes.WithDefault<boolean, true>;
22
+ ellipsizeMode?: CodegenTypes.WithDefault<EllipsizeMode, 'tail'>;
23
+ selectable?: boolean;
24
+ onTextLayout?: CodegenTypes.BubblingEventHandler<TextLayoutEvent>;
25
+ /**
26
+ * Callback fired when the text selection changes.
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * <UITextView
31
+ * onSelectionChange={(event) => {
32
+ * console.log('Selection:', event.nativeEvent.start, event.nativeEvent.end);
33
+ * }}
34
+ * >
35
+ * Selectable text
36
+ * </UITextView>
37
+ * ```
38
+ */
39
+ onSelectionChange?: CodegenTypes.BubblingEventHandler<SelectionChangeEvent>;
40
+ }
41
+ declare const _default: import("react-native").HostComponent<NativeProps>;
42
+ export default _default;
43
+ //# sourceMappingURL=RNUITextViewNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RNUITextViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../commonjs/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,29 @@
1
+ import { type CodegenTypes, type ColorValue, type ViewProps } from 'react-native';
2
+ interface TargetedEvent {
3
+ target: CodegenTypes.Int32;
4
+ }
5
+ type TextDecorationLine = 'none' | 'underline' | 'line-through';
6
+ type TextDecorationStyle = 'solid' | 'double' | 'dotted' | 'dashed';
7
+ export type NativeFontWeight = 'normal' | 'bold' | 'ultraLight' | 'light' | 'medium' | 'semibold' | 'heavy';
8
+ type FontStyle = 'normal' | 'italic';
9
+ type TextAlign = 'auto' | 'left' | 'right' | 'center' | 'justify';
10
+ interface NativeProps extends ViewProps {
11
+ text: string;
12
+ color?: ColorValue;
13
+ fontSize?: CodegenTypes.Float;
14
+ fontStyle?: CodegenTypes.WithDefault<FontStyle, 'normal'>;
15
+ fontWeight?: CodegenTypes.WithDefault<NativeFontWeight, 'normal'>;
16
+ fontFamily?: string;
17
+ letterSpacing?: CodegenTypes.Float;
18
+ lineHeight?: CodegenTypes.Float;
19
+ textDecorationLine?: CodegenTypes.WithDefault<TextDecorationLine, 'none'>;
20
+ textDecorationStyle?: CodegenTypes.WithDefault<TextDecorationStyle, 'solid'>;
21
+ textDecorationColor?: ColorValue;
22
+ textAlign?: CodegenTypes.WithDefault<TextAlign, 'auto'>;
23
+ shadowRadius?: CodegenTypes.WithDefault<CodegenTypes.Float, 0>;
24
+ onPress?: CodegenTypes.BubblingEventHandler<TargetedEvent>;
25
+ onLongPress?: CodegenTypes.BubblingEventHandler<TargetedEvent>;
26
+ }
27
+ declare const _default: import("react-native").HostComponent<NativeProps>;
28
+ export default _default;
29
+ //# sourceMappingURL=RNUITextViewChildNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RNUITextViewChildNativeComponent.d.ts","sourceRoot":"","sources":["../../../../module/RNUITextViewChildNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,SAAS,EAEf,MAAM,cAAc,CAAA;AAErB,UAAU,aAAa;IACrB,MAAM,EAAE,YAAY,CAAC,KAAK,CAAA;CAC3B;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,YAAY,CAAC,KAAK,CAAA;IAC7B,SAAS,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAA;IACzD,UAAU,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAA;IACjE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,YAAY,CAAC,KAAK,CAAA;IAClC,UAAU,CAAC,EAAE,YAAY,CAAC,KAAK,CAAA;IAC/B,kBAAkB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAA;IACzE,mBAAmB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAA;IAC5E,mBAAmB,CAAC,EAAE,UAAU,CAAA;IAChC,SAAS,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAA;IACvD,YAAY,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;IAC9D,OAAO,CAAC,EAAE,YAAY,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAA;IAC1D,WAAW,CAAC,EAAE,YAAY,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAA;CAC/D;;AAED,wBAEE"}
@@ -0,0 +1,43 @@
1
+ import { type CodegenTypes, type ViewProps } from 'react-native';
2
+ interface TargetedEvent {
3
+ target: CodegenTypes.Int32;
4
+ }
5
+ interface TextLayoutEvent extends TargetedEvent {
6
+ lines: string[];
7
+ }
8
+ /**
9
+ * Event fired when text selection changes in the UITextView.
10
+ * @property target - The view tag identifier
11
+ * @property start - The start index of the selected range (0-based)
12
+ * @property end - The end index of the selected range (0-based, exclusive)
13
+ */
14
+ interface SelectionChangeEvent extends TargetedEvent {
15
+ start: CodegenTypes.Int32;
16
+ end: CodegenTypes.Int32;
17
+ }
18
+ type EllipsizeMode = 'head' | 'middle' | 'tail' | 'clip';
19
+ interface NativeProps extends ViewProps {
20
+ numberOfLines?: CodegenTypes.Int32;
21
+ allowFontScaling?: CodegenTypes.WithDefault<boolean, true>;
22
+ ellipsizeMode?: CodegenTypes.WithDefault<EllipsizeMode, 'tail'>;
23
+ selectable?: boolean;
24
+ onTextLayout?: CodegenTypes.BubblingEventHandler<TextLayoutEvent>;
25
+ /**
26
+ * Callback fired when the text selection changes.
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * <UITextView
31
+ * onSelectionChange={(event) => {
32
+ * console.log('Selection:', event.nativeEvent.start, event.nativeEvent.end);
33
+ * }}
34
+ * >
35
+ * Selectable text
36
+ * </UITextView>
37
+ * ```
38
+ */
39
+ onSelectionChange?: CodegenTypes.BubblingEventHandler<SelectionChangeEvent>;
40
+ }
41
+ declare const _default: import("react-native").HostComponent<NativeProps>;
42
+ export default _default;
43
+ //# sourceMappingURL=RNUITextViewNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RNUITextViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../module/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"}
@@ -1 +1 @@
1
- {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../../../../example/src/App.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA8E9B,MAAM,CAAC,OAAO,UAAU,GAAG,sBA8sB1B"}
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../../../../example/src/App.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA8E9B,MAAM,CAAC,OAAO,UAAU,GAAG,sBAkwB1B"}
@@ -0,0 +1,29 @@
1
+ import { type CodegenTypes, type ColorValue, type ViewProps } from 'react-native';
2
+ interface TargetedEvent {
3
+ target: CodegenTypes.Int32;
4
+ }
5
+ type TextDecorationLine = 'none' | 'underline' | 'line-through';
6
+ type TextDecorationStyle = 'solid' | 'double' | 'dotted' | 'dashed';
7
+ export type NativeFontWeight = 'normal' | 'bold' | 'ultraLight' | 'light' | 'medium' | 'semibold' | 'heavy';
8
+ type FontStyle = 'normal' | 'italic';
9
+ type TextAlign = 'auto' | 'left' | 'right' | 'center' | 'justify';
10
+ interface NativeProps extends ViewProps {
11
+ text: string;
12
+ color?: ColorValue;
13
+ fontSize?: CodegenTypes.Float;
14
+ fontStyle?: CodegenTypes.WithDefault<FontStyle, 'normal'>;
15
+ fontWeight?: CodegenTypes.WithDefault<NativeFontWeight, 'normal'>;
16
+ fontFamily?: string;
17
+ letterSpacing?: CodegenTypes.Float;
18
+ lineHeight?: CodegenTypes.Float;
19
+ textDecorationLine?: CodegenTypes.WithDefault<TextDecorationLine, 'none'>;
20
+ textDecorationStyle?: CodegenTypes.WithDefault<TextDecorationStyle, 'solid'>;
21
+ textDecorationColor?: ColorValue;
22
+ textAlign?: CodegenTypes.WithDefault<TextAlign, 'auto'>;
23
+ shadowRadius?: CodegenTypes.WithDefault<CodegenTypes.Float, 0>;
24
+ onPress?: CodegenTypes.BubblingEventHandler<TargetedEvent>;
25
+ onLongPress?: CodegenTypes.BubblingEventHandler<TargetedEvent>;
26
+ }
27
+ declare const _default: import("react-native").HostComponent<NativeProps>;
28
+ export default _default;
29
+ //# sourceMappingURL=RNUITextViewChildNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RNUITextViewChildNativeComponent.d.ts","sourceRoot":"","sources":["../../../../commonjs/RNUITextViewChildNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,SAAS,EAEf,MAAM,cAAc,CAAA;AAErB,UAAU,aAAa;IACrB,MAAM,EAAE,YAAY,CAAC,KAAK,CAAA;CAC3B;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,YAAY,CAAC,KAAK,CAAA;IAC7B,SAAS,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAA;IACzD,UAAU,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAA;IACjE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,YAAY,CAAC,KAAK,CAAA;IAClC,UAAU,CAAC,EAAE,YAAY,CAAC,KAAK,CAAA;IAC/B,kBAAkB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAA;IACzE,mBAAmB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAA;IAC5E,mBAAmB,CAAC,EAAE,UAAU,CAAA;IAChC,SAAS,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAA;IACvD,YAAY,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;IAC9D,OAAO,CAAC,EAAE,YAAY,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAA;IAC1D,WAAW,CAAC,EAAE,YAAY,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAA;CAC/D;;AAED,wBAEE"}
@@ -0,0 +1,43 @@
1
+ import { type CodegenTypes, type ViewProps } from 'react-native';
2
+ interface TargetedEvent {
3
+ target: CodegenTypes.Int32;
4
+ }
5
+ interface TextLayoutEvent extends TargetedEvent {
6
+ lines: string[];
7
+ }
8
+ /**
9
+ * Event fired when text selection changes in the UITextView.
10
+ * @property target - The view tag identifier
11
+ * @property start - The start index of the selected range (0-based)
12
+ * @property end - The end index of the selected range (0-based, exclusive)
13
+ */
14
+ interface SelectionChangeEvent extends TargetedEvent {
15
+ start: CodegenTypes.Int32;
16
+ end: CodegenTypes.Int32;
17
+ }
18
+ type EllipsizeMode = 'head' | 'middle' | 'tail' | 'clip';
19
+ interface NativeProps extends ViewProps {
20
+ numberOfLines?: CodegenTypes.Int32;
21
+ allowFontScaling?: CodegenTypes.WithDefault<boolean, true>;
22
+ ellipsizeMode?: CodegenTypes.WithDefault<EllipsizeMode, 'tail'>;
23
+ selectable?: boolean;
24
+ onTextLayout?: CodegenTypes.BubblingEventHandler<TextLayoutEvent>;
25
+ /**
26
+ * Callback fired when the text selection changes.
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * <UITextView
31
+ * onSelectionChange={(event) => {
32
+ * console.log('Selection:', event.nativeEvent.start, event.nativeEvent.end);
33
+ * }}
34
+ * >
35
+ * Selectable text
36
+ * </UITextView>
37
+ * ```
38
+ */
39
+ onSelectionChange?: CodegenTypes.BubblingEventHandler<SelectionChangeEvent>;
40
+ }
41
+ declare const _default: import("react-native").HostComponent<NativeProps>;
42
+ export default _default;
43
+ //# sourceMappingURL=RNUITextViewNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RNUITextViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../commonjs/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,29 @@
1
+ import { type CodegenTypes, type ColorValue, type ViewProps } from 'react-native';
2
+ interface TargetedEvent {
3
+ target: CodegenTypes.Int32;
4
+ }
5
+ type TextDecorationLine = 'none' | 'underline' | 'line-through';
6
+ type TextDecorationStyle = 'solid' | 'double' | 'dotted' | 'dashed';
7
+ export type NativeFontWeight = 'normal' | 'bold' | 'ultraLight' | 'light' | 'medium' | 'semibold' | 'heavy';
8
+ type FontStyle = 'normal' | 'italic';
9
+ type TextAlign = 'auto' | 'left' | 'right' | 'center' | 'justify';
10
+ interface NativeProps extends ViewProps {
11
+ text: string;
12
+ color?: ColorValue;
13
+ fontSize?: CodegenTypes.Float;
14
+ fontStyle?: CodegenTypes.WithDefault<FontStyle, 'normal'>;
15
+ fontWeight?: CodegenTypes.WithDefault<NativeFontWeight, 'normal'>;
16
+ fontFamily?: string;
17
+ letterSpacing?: CodegenTypes.Float;
18
+ lineHeight?: CodegenTypes.Float;
19
+ textDecorationLine?: CodegenTypes.WithDefault<TextDecorationLine, 'none'>;
20
+ textDecorationStyle?: CodegenTypes.WithDefault<TextDecorationStyle, 'solid'>;
21
+ textDecorationColor?: ColorValue;
22
+ textAlign?: CodegenTypes.WithDefault<TextAlign, 'auto'>;
23
+ shadowRadius?: CodegenTypes.WithDefault<CodegenTypes.Float, 0>;
24
+ onPress?: CodegenTypes.BubblingEventHandler<TargetedEvent>;
25
+ onLongPress?: CodegenTypes.BubblingEventHandler<TargetedEvent>;
26
+ }
27
+ declare const _default: import("react-native").HostComponent<NativeProps>;
28
+ export default _default;
29
+ //# sourceMappingURL=RNUITextViewChildNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RNUITextViewChildNativeComponent.d.ts","sourceRoot":"","sources":["../../../../module/RNUITextViewChildNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,SAAS,EAEf,MAAM,cAAc,CAAA;AAErB,UAAU,aAAa;IACrB,MAAM,EAAE,YAAY,CAAC,KAAK,CAAA;CAC3B;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,YAAY,CAAC,KAAK,CAAA;IAC7B,SAAS,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAA;IACzD,UAAU,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAA;IACjE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,YAAY,CAAC,KAAK,CAAA;IAClC,UAAU,CAAC,EAAE,YAAY,CAAC,KAAK,CAAA;IAC/B,kBAAkB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAA;IACzE,mBAAmB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAA;IAC5E,mBAAmB,CAAC,EAAE,UAAU,CAAA;IAChC,SAAS,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAA;IACvD,YAAY,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;IAC9D,OAAO,CAAC,EAAE,YAAY,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAA;IAC1D,WAAW,CAAC,EAAE,YAAY,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAA;CAC/D;;AAED,wBAEE"}
@@ -0,0 +1,43 @@
1
+ import { type CodegenTypes, type ViewProps } from 'react-native';
2
+ interface TargetedEvent {
3
+ target: CodegenTypes.Int32;
4
+ }
5
+ interface TextLayoutEvent extends TargetedEvent {
6
+ lines: string[];
7
+ }
8
+ /**
9
+ * Event fired when text selection changes in the UITextView.
10
+ * @property target - The view tag identifier
11
+ * @property start - The start index of the selected range (0-based)
12
+ * @property end - The end index of the selected range (0-based, exclusive)
13
+ */
14
+ interface SelectionChangeEvent extends TargetedEvent {
15
+ start: CodegenTypes.Int32;
16
+ end: CodegenTypes.Int32;
17
+ }
18
+ type EllipsizeMode = 'head' | 'middle' | 'tail' | 'clip';
19
+ interface NativeProps extends ViewProps {
20
+ numberOfLines?: CodegenTypes.Int32;
21
+ allowFontScaling?: CodegenTypes.WithDefault<boolean, true>;
22
+ ellipsizeMode?: CodegenTypes.WithDefault<EllipsizeMode, 'tail'>;
23
+ selectable?: boolean;
24
+ onTextLayout?: CodegenTypes.BubblingEventHandler<TextLayoutEvent>;
25
+ /**
26
+ * Callback fired when the text selection changes.
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * <UITextView
31
+ * onSelectionChange={(event) => {
32
+ * console.log('Selection:', event.nativeEvent.start, event.nativeEvent.end);
33
+ * }}
34
+ * >
35
+ * Selectable text
36
+ * </UITextView>
37
+ * ```
38
+ */
39
+ onSelectionChange?: CodegenTypes.BubblingEventHandler<SelectionChangeEvent>;
40
+ }
41
+ declare const _default: import("react-native").HostComponent<NativeProps>;
42
+ export default _default;
43
+ //# sourceMappingURL=RNUITextViewNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RNUITextViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../module/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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bsky.app/react-native-uitextview",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "UITextView for React Native",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",
@@ -82,7 +82,7 @@
82
82
  },
83
83
  "peerDependencies": {
84
84
  "react": "*",
85
- "react-native": ">=0.80.0"
85
+ "react-native": ">=0.81.5"
86
86
  },
87
87
  "workspaces": [
88
88
  "example"