From aa1ef630508bc61aa3d1f95e11657e027913ede2 Mon Sep 17 00:00:00 2001 From: shubhamguptadream11 Date: Tue, 6 Aug 2024 15:36:03 +0530 Subject: [PATCH 1/4] feat: added support for linebreak mode in ios --- .../TextInput/RCTTextInputViewConfig.js | 1 + .../Components/TextInput/TextInput.d.ts | 13 +++++ .../Components/TextInput/TextInput.flow.js | 6 +++ .../Components/TextInput/TextInput.js | 6 +++ .../Text/BaseText/RCTBaseTextViewManager.mm | 1 + .../Libraries/Text/RCTTextAttributes.h | 1 + .../Libraries/Text/RCTTextAttributes.mm | 8 +++ .../attributedstring/TextAttributes.cpp | 4 ++ .../attributedstring/TextAttributes.h | 2 + .../renderer/attributedstring/conversions.h | 54 +++++++++++++++++++ .../renderer/attributedstring/primitives.h | 9 ++++ .../components/text/BaseTextProps.cpp | 12 +++++ .../RCTAttributedTextUtils.mm | 6 +++ .../RCTTextPrimitivesConversions.h | 19 +++++++ 14 files changed, 142 insertions(+) diff --git a/packages/react-native/Libraries/Components/TextInput/RCTTextInputViewConfig.js b/packages/react-native/Libraries/Components/TextInput/RCTTextInputViewConfig.js index 0aa8965bda382d..1bc2dcacc3d9f3 100644 --- a/packages/react-native/Libraries/Components/TextInput/RCTTextInputViewConfig.js +++ b/packages/react-native/Libraries/Components/TextInput/RCTTextInputViewConfig.js @@ -144,6 +144,7 @@ const RCTTextInputViewConfig = { showSoftInputOnFocus: true, autoFocus: true, lineBreakStrategyIOS: true, + lineBreakModeIOS: true, smartInsertDelete: true, ...ConditionallyIgnoredEventHandlers({ onChange: true, diff --git a/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts b/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts index 0aa50fe80fc277..c2329bf9c892a5 100644 --- a/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts +++ b/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts @@ -314,6 +314,19 @@ export interface TextInputIOSProps { | 'push-out' | undefined; + /** + * Set line break mode on iOS. + * @platform ios + */ + lineBreakModeIOS?: + | 'wordWrapping' + | 'char' + | 'clip' + | 'head' + | 'middle' + | 'tail' + | undefined, + /** * If `false`, the iOS system will not insert an extra space after a paste operation * neither delete one or two spaces after a cut or delete operation. diff --git a/packages/react-native/Libraries/Components/TextInput/TextInput.flow.js b/packages/react-native/Libraries/Components/TextInput/TextInput.flow.js index 638acd7c7925a2..7b10e38e584574 100644 --- a/packages/react-native/Libraries/Components/TextInput/TextInput.flow.js +++ b/packages/react-native/Libraries/Components/TextInput/TextInput.flow.js @@ -312,6 +312,12 @@ type IOSProps = $ReadOnly<{| */ lineBreakStrategyIOS?: ?('none' | 'standard' | 'hangul-word' | 'push-out'), + /** + * Set line break mode on iOS. + * @platform ios + */ + lineBreakModeIOS?: ?('wordWrapping' | 'char' | 'clip' | 'head' | 'middle' | 'tail'), + /** * If `false`, the iOS system will not insert an extra space after a paste operation * neither delete one or two spaces after a cut or delete operation. diff --git a/packages/react-native/Libraries/Components/TextInput/TextInput.js b/packages/react-native/Libraries/Components/TextInput/TextInput.js index b60ae10fa8abcf..fa9e96d01d7282 100644 --- a/packages/react-native/Libraries/Components/TextInput/TextInput.js +++ b/packages/react-native/Libraries/Components/TextInput/TextInput.js @@ -357,6 +357,12 @@ type IOSProps = $ReadOnly<{| */ lineBreakStrategyIOS?: ?('none' | 'standard' | 'hangul-word' | 'push-out'), + /** + * Set line break mode on iOS. + * @platform ios + */ + lineBreakModeIOS?: ?('wordWrapping' | 'char' | 'clip' | 'head' | 'middle' | 'tail'), + /** * If `false`, the iOS system will not insert an extra space after a paste operation * neither delete one or two spaces after a cut or delete operation. diff --git a/packages/react-native/Libraries/Text/BaseText/RCTBaseTextViewManager.mm b/packages/react-native/Libraries/Text/BaseText/RCTBaseTextViewManager.mm index ece68768c40251..e9ce272b5f55fb 100644 --- a/packages/react-native/Libraries/Text/BaseText/RCTBaseTextViewManager.mm +++ b/packages/react-native/Libraries/Text/BaseText/RCTBaseTextViewManager.mm @@ -44,6 +44,7 @@ - (RCTShadowView *)shadowView RCT_REMAP_SHADOW_PROPERTY(textAlign, textAttributes.alignment, NSTextAlignment) RCT_REMAP_SHADOW_PROPERTY(writingDirection, textAttributes.baseWritingDirection, NSWritingDirection) RCT_REMAP_SHADOW_PROPERTY(lineBreakStrategyIOS, textAttributes.lineBreakStrategy, NSLineBreakStrategy) +RCT_REMAP_SHADOW_PROPERTY(lineBreakModeIOS, textAttributes.lineBreakMode, NSLineBreakMode) // Decoration RCT_REMAP_SHADOW_PROPERTY(textDecorationColor, textAttributes.textDecorationColor, UIColor) RCT_REMAP_SHADOW_PROPERTY(textDecorationStyle, textAttributes.textDecorationStyle, NSUnderlineStyle) diff --git a/packages/react-native/Libraries/Text/RCTTextAttributes.h b/packages/react-native/Libraries/Text/RCTTextAttributes.h index 22fb646d434940..c6923928d2d224 100644 --- a/packages/react-native/Libraries/Text/RCTTextAttributes.h +++ b/packages/react-native/Libraries/Text/RCTTextAttributes.h @@ -44,6 +44,7 @@ extern NSString *const RCTTextAttributesTagAttributeName; @property (nonatomic, assign) NSTextAlignment alignment; @property (nonatomic, assign) NSWritingDirection baseWritingDirection; @property (nonatomic, assign) NSLineBreakStrategy lineBreakStrategy; +@property (nonatomic, assign) NSLineBreakMode lineBreakMode; // Decoration @property (nonatomic, strong, nullable) UIColor *textDecorationColor; @property (nonatomic, assign) NSUnderlineStyle textDecorationStyle; diff --git a/packages/react-native/Libraries/Text/RCTTextAttributes.mm b/packages/react-native/Libraries/Text/RCTTextAttributes.mm index c8323388ce684b..57283d1820a60c 100644 --- a/packages/react-native/Libraries/Text/RCTTextAttributes.mm +++ b/packages/react-native/Libraries/Text/RCTTextAttributes.mm @@ -28,6 +28,7 @@ - (instancetype)init _alignment = NSTextAlignmentNatural; _baseWritingDirection = NSWritingDirectionNatural; _lineBreakStrategy = NSLineBreakStrategyNone; + _lineBreakMode = NSLineBreakByWordWrapping; _textShadowRadius = NAN; _opacity = NAN; _textTransform = RCTTextTransformUndefined; @@ -70,6 +71,7 @@ - (void)applyTextAttributes:(RCTTextAttributes *)textAttributes ? textAttributes->_baseWritingDirection : _baseWritingDirection; // * _lineBreakStrategy = textAttributes->_lineBreakStrategy ?: _lineBreakStrategy; + _lineBreakMode = textAttributes->_lineBreakMode ?: _lineBreakMode; // Decoration _textDecorationColor = textAttributes->_textDecorationColor ?: _textDecorationColor; @@ -128,6 +130,11 @@ - (NSParagraphStyle *)effectiveParagraphStyle } } + if (_lineBreakMode != NSLineBreakByWordWrapping) { + paragraphStyle.lineBreakMode = _lineBreakMode; + isParagraphStyleUsed = YES; + } + if (!isnan(_lineHeight)) { CGFloat lineHeight = _lineHeight * self.effectiveFontSizeMultiplier; paragraphStyle.minimumLineHeight = lineHeight; @@ -336,6 +343,7 @@ - (BOOL)isEqual:(RCTTextAttributes *)textAttributes // Paragraph Styles RCTTextAttributesCompareFloats(_lineHeight) && RCTTextAttributesCompareFloats(_alignment) && RCTTextAttributesCompareOthers(_baseWritingDirection) && RCTTextAttributesCompareOthers(_lineBreakStrategy) && + RCTTextAttributesCompareOthers(_lineBreakMode) && // Decoration RCTTextAttributesCompareObjects(_textDecorationColor) && RCTTextAttributesCompareOthers(_textDecorationStyle) && RCTTextAttributesCompareOthers(_textDecorationLine) && diff --git a/packages/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp b/packages/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp index cd32048480f540..3445c37e852cd5 100644 --- a/packages/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp +++ b/packages/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp @@ -68,6 +68,9 @@ void TextAttributes::apply(TextAttributes textAttributes) { lineBreakStrategy = textAttributes.lineBreakStrategy.has_value() ? textAttributes.lineBreakStrategy : lineBreakStrategy; + lineBreakMode = textAttributes.lineBreakMode.has_value() + ? textAttributes.lineBreakMode + : lineBreakMode; // Decoration textDecorationColor = textAttributes.textDecorationColor @@ -216,6 +219,7 @@ SharedDebugStringConvertibleList TextAttributes::getDebugProps() const { debugStringConvertibleItem("alignment", alignment), debugStringConvertibleItem("baseWritingDirection", baseWritingDirection), debugStringConvertibleItem("lineBreakStrategyIOS", lineBreakStrategy), + debugStringConvertibleItem("lineBreakModeIOS", lineBreakMode), // Decoration debugStringConvertibleItem("textDecorationColor", textDecorationColor), diff --git a/packages/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.h b/packages/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.h index c8ff0cbd40a4d8..37db36656f8d67 100644 --- a/packages/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.h +++ b/packages/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.h @@ -60,6 +60,7 @@ class TextAttributes : public DebugStringConvertible { std::optional alignment{}; std::optional baseWritingDirection{}; std::optional lineBreakStrategy{}; + std::optional lineBreakMode{}; // Decoration SharedColor textDecorationColor{}; @@ -128,6 +129,7 @@ struct hash { textAttributes.textAlignVertical, textAttributes.baseWritingDirection, textAttributes.lineBreakStrategy, + textAttributes.lineBreakMode, textAttributes.textDecorationColor, textAttributes.textDecorationLineType, textAttributes.textDecorationStyle, diff --git a/packages/react-native/ReactCommon/react/renderer/attributedstring/conversions.h b/packages/react-native/ReactCommon/react/renderer/attributedstring/conversions.h index d2a40f49765304..92a549e777c8f7 100644 --- a/packages/react-native/ReactCommon/react/renderer/attributedstring/conversions.h +++ b/packages/react-native/ReactCommon/react/renderer/attributedstring/conversions.h @@ -589,6 +589,60 @@ inline std::string toString(const LineBreakStrategy& lineBreakStrategy) { return "none"; } +inline void fromRawValue( + const PropsParserContext& context, + const RawValue& value, + LineBreakMode& result) { + react_native_expect(value.hasType()); + if (value.hasType()) { + auto string = (std::string)value; + if (string == "wordWrapping") { + result = LineBreakMode::Word; + } else if (string == "char") { + result = LineBreakMode::Char; + } else if (string == "clip") { + result = LineBreakMode::Clip; + } else if (string == "head") { + result = LineBreakMode::Head; + } else if (string == "middle") { + result = LineBreakMode::Middle; + } else if (string == "tail") { + result = LineBreakMode::Tail; + } else { + LOG(ERROR) << "Unsupported LineBreakStrategy value: " << string; + react_native_expect(false); + // sane default for prod + result = LineBreakMode::Word; + } + return; + } + + LOG(ERROR) << "Unsupported LineBreakStrategy type"; + // sane default for prod + result = LineBreakMode::Tail; +} + +inline std::string toString(const LineBreakMode& lineBreakMode) { + switch (lineBreakMode) { + case LineBreakMode::Word: + return "word"; + case LineBreakMode::Char: + return "char"; + case LineBreakMode::Clip: + return "clip"; + case LineBreakMode::Head: + return "head"; + case LineBreakMode::Middle: + return "middle"; + case LineBreakMode::Tail: + return "tail"; + } + + LOG(ERROR) << "Unsupported LineBreakStrategy value"; + // sane default for prod + return "word"; +} + inline void fromRawValue( const PropsParserContext& context, const RawValue& value, diff --git a/packages/react-native/ReactCommon/react/renderer/attributedstring/primitives.h b/packages/react-native/ReactCommon/react/renderer/attributedstring/primitives.h index 49afdff3525f51..9bc23079e43359 100644 --- a/packages/react-native/ReactCommon/react/renderer/attributedstring/primitives.h +++ b/packages/react-native/ReactCommon/react/renderer/attributedstring/primitives.h @@ -103,6 +103,15 @@ enum class LineBreakStrategy { // system uses for standard UI labels. }; +enum class LineBreakMode { + Word, // Wrap at word boundaries, default + Char, // Wrap at character boundaries + Clip, // Simply clip + Head, // Truncate at head of line: "...wxyz" + Middle, // Truncate middle of line: "ab...yz" + Tail // Truncate at tail of line: "abcd..." +}; + enum class TextDecorationLineType { None, Underline, diff --git a/packages/react-native/ReactCommon/react/renderer/components/text/BaseTextProps.cpp b/packages/react-native/ReactCommon/react/renderer/components/text/BaseTextProps.cpp index 2dfe49020d2eec..6f6dd563aa12f2 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/text/BaseTextProps.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/text/BaseTextProps.cpp @@ -123,6 +123,12 @@ static TextAttributes convertRawProp( "lineBreakStrategyIOS", sourceTextAttributes.lineBreakStrategy, defaultTextAttributes.lineBreakStrategy); + textAttributes.lineBreakMode = convertRawProp( + context, + rawProps, + "lineBreakModeIOS", + sourceTextAttributes.lineBreakMode, + defaultTextAttributes.lineBreakMode); // Decoration textAttributes.textDecorationColor = convertRawProp( @@ -286,6 +292,12 @@ void BaseTextProps::setProp( textAttributes, lineBreakStrategy, "lineBreakStrategyIOS"); + REBUILD_FIELD_SWITCH_CASE( + defaults, + value, + textAttributes, + lineBreakMode, + "lineBreakModeIOS"); REBUILD_FIELD_SWITCH_CASE( defaults, value, diff --git a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm index 5bdeac31b493c1..da8aa35a436b4e 100644 --- a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm +++ b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm @@ -239,6 +239,12 @@ inline static CGFloat RCTEffectiveFontSizeMultiplierFromTextAttributes(const Tex paragraphStyle.maximumLineHeight = lineHeight; isParagraphStyleUsed = YES; } + + if (textAttributes.lineBreakMode.has_value()) { + paragraphStyle.lineBreakMode = + RCTNSLineBreakModeFromLineBreakMode(textAttributes.lineBreakMode.value()); + isParagraphStyleUsed = YES; + } if (isParagraphStyleUsed) { attributes[NSParagraphStyleAttributeName] = paragraphStyle; diff --git a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextPrimitivesConversions.h b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextPrimitivesConversions.h index c3f3ac20bd8597..42bcc30cc1886d 100644 --- a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextPrimitivesConversions.h +++ b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextPrimitivesConversions.h @@ -63,6 +63,25 @@ inline static NSLineBreakStrategy RCTNSLineBreakStrategyFromLineBreakStrategy( } } +inline static NSLineBreakMode RCTNSLineBreakModeFromLineBreakMode( + facebook::react::LineBreakMode lineBreakMode) +{ + switch (lineBreakMode) { + case facebook::react::LineBreakMode::Word: + return NSLineBreakByWordWrapping; + case facebook::react::LineBreakMode::Char: + return NSLineBreakByCharWrapping; + case facebook::react::LineBreakMode::Clip: + return NSLineBreakByClipping; + case facebook::react::LineBreakMode::Head: + return NSLineBreakByTruncatingHead; + case facebook::react::LineBreakMode::Middle: + return NSLineBreakByTruncatingMiddle; + case facebook::react::LineBreakMode::Tail: + return NSLineBreakByTruncatingTail; + } +} + inline static RCTFontStyle RCTFontStyleFromFontStyle(facebook::react::FontStyle fontStyle) { switch (fontStyle) { From 7ea05f5061abd364aa4b017307e29b7b01ab5105 Mon Sep 17 00:00:00 2001 From: shubhamguptadream11 Date: Tue, 6 Aug 2024 16:10:24 +0530 Subject: [PATCH 2/4] feat: test cases added --- .../Components/TextInput/TextInput.d.ts | 2 +- .../TextInput/TextInputExample.ios.js | 35 +++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts b/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts index c2329bf9c892a5..841195598dbbf6 100644 --- a/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts +++ b/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts @@ -318,7 +318,7 @@ export interface TextInputIOSProps { * Set line break mode on iOS. * @platform ios */ - lineBreakModeIOS?: + lineBreakModeIOS?: | 'wordWrapping' | 'char' | 'clip' diff --git a/packages/rn-tester/js/examples/TextInput/TextInputExample.ios.js b/packages/rn-tester/js/examples/TextInput/TextInputExample.ios.js index 2e861a6fcdd870..33668b2a4de2ee 100644 --- a/packages/rn-tester/js/examples/TextInput/TextInputExample.ios.js +++ b/packages/rn-tester/js/examples/TextInput/TextInputExample.ios.js @@ -865,6 +865,41 @@ const textInputExamples: Array = [ ); }, }, + { + title: 'Line Break Mode', + render: function (): React.Node { + const lineBreakMode = ['wordWrapping', 'char', 'clip', 'head', 'middle','tail']; + const textByCode = { + en: 'verylongtext-dummydummydummydummydummydummydummydummydummydummydummydummy', + ko: '한글개행한글개행-한글개행한글개행한글개행한글개행한글개행한글개행한글개행한글개행한글개행한글개행', + }; + return ( + + {lineBreakMode.map(strategy => { + return ( + + {`Mode: ${strategy}`} + {Object.keys(textByCode).map(code => { + return ( + + {`[${code}]`} + + + ); + })} + + ); + })} + + ); + }, + }, ]; module.exports = ({ From 4609727c452a28f517d8ae2714270c27f5ee78c9 Mon Sep 17 00:00:00 2001 From: shubhamguptadream11 Date: Fri, 9 Aug 2024 23:14:06 +0530 Subject: [PATCH 3/4] fix: lint and prettier fixed --- .../Libraries/Components/TextInput/TextInput.d.ts | 14 +++++++------- .../Components/TextInput/TextInput.flow.js | 9 ++++++++- .../Libraries/Components/TextInput/TextInput.js | 9 ++++++++- .../js/examples/TextInput/TextInputExample.ios.js | 9 ++++++++- 4 files changed, 31 insertions(+), 10 deletions(-) diff --git a/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts b/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts index 841195598dbbf6..df0a5560ff4fbc 100644 --- a/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts +++ b/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts @@ -318,14 +318,14 @@ export interface TextInputIOSProps { * Set line break mode on iOS. * @platform ios */ - lineBreakModeIOS?: - | 'wordWrapping' - | 'char' - | 'clip' - | 'head' - | 'middle' + lineBreakModeIOS?: + | 'wordWrapping' + | 'char' + | 'clip' + | 'head' + | 'middle' | 'tail' - | undefined, + | undefined; /** * If `false`, the iOS system will not insert an extra space after a paste operation diff --git a/packages/react-native/Libraries/Components/TextInput/TextInput.flow.js b/packages/react-native/Libraries/Components/TextInput/TextInput.flow.js index 7b10e38e584574..e8126e122019e4 100644 --- a/packages/react-native/Libraries/Components/TextInput/TextInput.flow.js +++ b/packages/react-native/Libraries/Components/TextInput/TextInput.flow.js @@ -316,7 +316,14 @@ type IOSProps = $ReadOnly<{| * Set line break mode on iOS. * @platform ios */ - lineBreakModeIOS?: ?('wordWrapping' | 'char' | 'clip' | 'head' | 'middle' | 'tail'), + lineBreakModeIOS?: ?( + | 'wordWrapping' + | 'char' + | 'clip' + | 'head' + | 'middle' + | 'tail' + ), /** * If `false`, the iOS system will not insert an extra space after a paste operation diff --git a/packages/react-native/Libraries/Components/TextInput/TextInput.js b/packages/react-native/Libraries/Components/TextInput/TextInput.js index fa9e96d01d7282..c54356bc10d214 100644 --- a/packages/react-native/Libraries/Components/TextInput/TextInput.js +++ b/packages/react-native/Libraries/Components/TextInput/TextInput.js @@ -361,7 +361,14 @@ type IOSProps = $ReadOnly<{| * Set line break mode on iOS. * @platform ios */ - lineBreakModeIOS?: ?('wordWrapping' | 'char' | 'clip' | 'head' | 'middle' | 'tail'), + lineBreakModeIOS?: ?( + | 'wordWrapping' + | 'char' + | 'clip' + | 'head' + | 'middle' + | 'tail' + ), /** * If `false`, the iOS system will not insert an extra space after a paste operation diff --git a/packages/rn-tester/js/examples/TextInput/TextInputExample.ios.js b/packages/rn-tester/js/examples/TextInput/TextInputExample.ios.js index 33668b2a4de2ee..d13359827a574e 100644 --- a/packages/rn-tester/js/examples/TextInput/TextInputExample.ios.js +++ b/packages/rn-tester/js/examples/TextInput/TextInputExample.ios.js @@ -868,7 +868,14 @@ const textInputExamples: Array = [ { title: 'Line Break Mode', render: function (): React.Node { - const lineBreakMode = ['wordWrapping', 'char', 'clip', 'head', 'middle','tail']; + const lineBreakMode = [ + 'wordWrapping', + 'char', + 'clip', + 'head', + 'middle', + 'tail', + ]; const textByCode = { en: 'verylongtext-dummydummydummydummydummydummydummydummydummydummydummydummy', ko: '한글개행한글개행-한글개행한글개행한글개행한글개행한글개행한글개행한글개행한글개행한글개행한글개행', From e158feb5f057d8cbd7624072085b56b338637ad4 Mon Sep 17 00:00:00 2001 From: shubhamguptadream11 Date: Sat, 10 Aug 2024 10:19:16 +0530 Subject: [PATCH 4/4] feat: snap updated --- .../__snapshots__/public-api-test.js.snap | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap index 181990cd2030ba..ac4afe67d643d1 100644 --- a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap +++ b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap @@ -2593,6 +2593,14 @@ type IOSProps = $ReadOnly<{| spellCheck?: ?boolean, textContentType?: ?TextContentType, lineBreakStrategyIOS?: ?(\\"none\\" | \\"standard\\" | \\"hangul-word\\" | \\"push-out\\"), + lineBreakModeIOS?: ?( + | \\"wordWrapping\\" + | \\"char\\" + | \\"clip\\" + | \\"head\\" + | \\"middle\\" + | \\"tail\\" + ), smartInsertDelete?: ?boolean, |}>; type AndroidProps = $ReadOnly<{| @@ -2938,6 +2946,14 @@ type IOSProps = $ReadOnly<{| spellCheck?: ?boolean, textContentType?: ?TextContentType, lineBreakStrategyIOS?: ?(\\"none\\" | \\"standard\\" | \\"hangul-word\\" | \\"push-out\\"), + lineBreakModeIOS?: ?( + | \\"wordWrapping\\" + | \\"char\\" + | \\"clip\\" + | \\"head\\" + | \\"middle\\" + | \\"tail\\" + ), smartInsertDelete?: ?boolean, |}>; type AndroidProps = $ReadOnly<{|