react-native-macos 0.73.31 → 0.73.32
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/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Text/Text/RCTTextView.h +4 -0
- package/Libraries/Text/Text/RCTTextView.mm +16 -0
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +1 -1
|
@@ -22,6 +22,10 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
22
22
|
contentFrame:(CGRect)contentFrame
|
|
23
23
|
descendantViews:(NSArray<RCTPlatformView *> *)descendantViews; // [macOS]
|
|
24
24
|
|
|
25
|
+
#if TARGET_OS_OSX // [macOS
|
|
26
|
+
- (NSRect)getRectForCharRange:(NSRange)charRange;
|
|
27
|
+
#endif // macOS]
|
|
28
|
+
|
|
25
29
|
/**
|
|
26
30
|
* (Experimental and unused for Paper) Pointer event handlers.
|
|
27
31
|
*/
|
|
@@ -207,6 +207,22 @@
|
|
|
207
207
|
[self setNeedsDisplay];
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
+
#if TARGET_OS_OSX // [macOS
|
|
211
|
+
- (NSRect)getRectForCharRange:(NSRange)charRange
|
|
212
|
+
{
|
|
213
|
+
if (_textStorage) {
|
|
214
|
+
NSLayoutManager *layoutManager = _textStorage.layoutManagers.firstObject;
|
|
215
|
+
NSTextContainer *textContainer = layoutManager.textContainers.firstObject;
|
|
216
|
+
if (layoutManager && textContainer) {
|
|
217
|
+
NSRange glyphRange = [layoutManager glyphRangeForCharacterRange:charRange actualCharacterRange:nullptr];
|
|
218
|
+
return [layoutManager boundingRectForGlyphRange:glyphRange inTextContainer:textContainer];
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
return {0, 0, 0, 0};
|
|
223
|
+
}
|
|
224
|
+
#endif // macOS]
|
|
225
|
+
|
|
210
226
|
- (void)drawRect:(CGRect)rect
|
|
211
227
|
{
|
|
212
228
|
[super drawRect:rect];
|
package/React/Base/RCTVersion.m
CHANGED