From 11c8bf313717a8c46165d48caba5e70b9f160d05 Mon Sep 17 00:00:00 2001 From: Adam Gleitman Date: Tue, 15 Nov 2022 19:03:37 -0800 Subject: [PATCH] Add Dynamic Type support for iOS (Paper and Fabric) (#35017) Summary: This adds Dynamic Type support in iOS as described [here](https://github.com/react-native-community/discussions-and-proposals/issues/519). `Text` elements have a new prop, `dynamicTypeRamp`, that allows users to specify which font ramp a particular `Text` element should take on as the OS's accessibility setting for text size. The different types line up with different values of `UIFontTextStyle`. If not specified, we default to the current behavior. ~~For the moment, this change is only for Paper. I tried applying a corresponding change to Fabric by adding an additional field to [`facebook::react::TextAttributes`](https://github.com/facebook/react-native/blob/main/ReactCommon/react/renderer/attributedstring/TextAttributes.h) and changing [`RCTEffectiveFontSizeMultiplierFromTextAttributes`](https://github.com/facebook/react-native/blob/afb124dcf0cdf0db525acc7cfd2cea2742c64068/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.mm#L79-L84) to use that new field, but in the process I discovered that this function doesn't seem to ever get called, hence [this bug](https://github.com/facebook/react-native/issues/34990).~~ ## Changelog [iOS] [Added] - Dynamic Type support Pull Request resolved: https://github.com/facebook/react-native/pull/35017 Test Plan: Validated with a test page in RNTester. Screenshots follow: A) Default text size B) Largest non-accessibility text size C) Largest accessibility text size, split across two screenshots due to size | A | B | C | |-|-|-| | ![Simulator Screen Shot - iPad (9th generation) - 2022-10-18 at 16 17 08](https://user-images.githubusercontent.com/717674/196562746-c8bbf53d-3c70-4e55-8600-0cfed8aacf5d.png) | ![Simulator Screen Shot - iPad (9th generation) - 2022-10-18 at 16 17 55](https://user-images.githubusercontent.com/717674/196563051-68bb0e34-c573-47ed-8c19-58ae45a7ce2b.png) | ![Simulator Screen Shot - iPad (9th generation) - 2022-10-18 at 16 18 33](https://user-images.githubusercontent.com/717674/196563185-61ede5ee-e79e-4af5-84a7-8f1e230a25f8.png) | ||| ![Simulator Screen Shot - iPad (9th generation) - 2022-10-18 at 16 18 42](https://user-images.githubusercontent.com/717674/196563208-2242efa2-5f24-466d-80f5-eb57a7678a67.png) | Reviewed By: sammy-SC Differential Revision: D40779346 Pulled By: NickGerleman fbshipit-source-id: efc7a8e9810a93afc82c5def97af15a2e8453d90 --- BUCK | 1 + .../Text/BaseText/RCTBaseTextViewManager.m | 1 + Libraries/Text/RCTTextAttributes.h | 2 + Libraries/Text/RCTTextAttributes.m | 10 +- Libraries/Text/Text.d.ts | 17 + Libraries/Text/Text/RCTDynamicTypeRamp.h | 37 + Libraries/Text/Text/RCTDynamicTypeRamp.m | 82 ++ Libraries/Text/TextNativeComponent.js | 1 + Libraries/Text/TextProps.js | 17 + .../attributedstring/TextAttributes.cpp | 6 + .../attributedstring/TextAttributes.h | 1 + .../renderer/attributedstring/conversions.h | 78 ++ .../renderer/attributedstring/primitives.h | 21 + .../components/text/BaseTextProps.cpp | 6 + .../textlayoutmanager/TextMeasureCache.h | 3 + .../platform/ios/RCTAttributedTextUtils.mm | 87 +- packages/rn-tester/Podfile.lock | 1001 ----------------- .../js/examples/Text/TextExample.ios.js | 45 + 18 files changed, 405 insertions(+), 1011 deletions(-) create mode 100644 Libraries/Text/Text/RCTDynamicTypeRamp.h create mode 100644 Libraries/Text/Text/RCTDynamicTypeRamp.m delete mode 100644 packages/rn-tester/Podfile.lock diff --git a/BUCK b/BUCK index 2ab1fbb5acb931..e998e2d09e5a88 100644 --- a/BUCK +++ b/BUCK @@ -267,6 +267,7 @@ REACT_PUBLIC_HEADERS = { "React/RCTDevLoadingViewProtocol.h": RCTDEVSUPPORT_PATH + "RCTDevLoadingViewProtocol.h", "React/RCTDevLoadingViewSetEnabled.h": RCTDEVSUPPORT_PATH + "RCTDevLoadingViewSetEnabled.h", "React/RCTDisplayLink.h": RCTBASE_PATH + "RCTDisplayLink.h", + "React/RCTDynamicTypeRamp.h": RCTLIB_PATH + "Text/Text/RCTDynamicTypeRamp.h", "React/RCTErrorCustomizer.h": RCTBASE_PATH + "RCTErrorCustomizer.h", "React/RCTErrorInfo.h": RCTBASE_PATH + "RCTErrorInfo.h", # NOTE: RCTEventDispatcher.h is exported from CoreModules:CoreModulesApple diff --git a/Libraries/Text/BaseText/RCTBaseTextViewManager.m b/Libraries/Text/BaseText/RCTBaseTextViewManager.m index 059f561c2f549e..ece68768c40251 100644 --- a/Libraries/Text/BaseText/RCTBaseTextViewManager.m +++ b/Libraries/Text/BaseText/RCTBaseTextViewManager.m @@ -36,6 +36,7 @@ - (RCTShadowView *)shadowView RCT_REMAP_SHADOW_PROPERTY(fontStyle, textAttributes.fontStyle, NSString) RCT_REMAP_SHADOW_PROPERTY(fontVariant, textAttributes.fontVariant, NSArray) RCT_REMAP_SHADOW_PROPERTY(allowFontScaling, textAttributes.allowFontScaling, BOOL) +RCT_REMAP_SHADOW_PROPERTY(dynamicTypeRamp, textAttributes.dynamicTypeRamp, RCTDynamicTypeRamp) RCT_REMAP_SHADOW_PROPERTY(maxFontSizeMultiplier, textAttributes.maxFontSizeMultiplier, CGFloat) RCT_REMAP_SHADOW_PROPERTY(letterSpacing, textAttributes.letterSpacing, CGFloat) // Paragraph Styles diff --git a/Libraries/Text/RCTTextAttributes.h b/Libraries/Text/RCTTextAttributes.h index 3491d598971b8e..22fb646d434940 100644 --- a/Libraries/Text/RCTTextAttributes.h +++ b/Libraries/Text/RCTTextAttributes.h @@ -7,6 +7,7 @@ #import +#import #import #import "RCTTextTransform.h" @@ -36,6 +37,7 @@ extern NSString *const RCTTextAttributesTagAttributeName; @property (nonatomic, copy, nullable) NSString *fontStyle; @property (nonatomic, copy, nullable) NSArray *fontVariant; @property (nonatomic, assign) BOOL allowFontScaling; +@property (nonatomic, assign) RCTDynamicTypeRamp dynamicTypeRamp; @property (nonatomic, assign) CGFloat letterSpacing; // Paragraph Styles @property (nonatomic, assign) CGFloat lineHeight; diff --git a/Libraries/Text/RCTTextAttributes.m b/Libraries/Text/RCTTextAttributes.m index 1fb13011430736..c8323388ce684b 100644 --- a/Libraries/Text/RCTTextAttributes.m +++ b/Libraries/Text/RCTTextAttributes.m @@ -59,6 +59,8 @@ - (void)applyTextAttributes:(RCTTextAttributes *)textAttributes _fontStyle = textAttributes->_fontStyle ?: _fontStyle; _fontVariant = textAttributes->_fontVariant ?: _fontVariant; _allowFontScaling = textAttributes->_allowFontScaling || _allowFontScaling; // * + _dynamicTypeRamp = textAttributes->_dynamicTypeRamp != RCTDynamicTypeRampUndefined ? textAttributes->_dynamicTypeRamp + : _dynamicTypeRamp; _letterSpacing = !isnan(textAttributes->_letterSpacing) ? textAttributes->_letterSpacing : _letterSpacing; // Paragraph Styles @@ -230,6 +232,12 @@ - (CGFloat)effectiveFontSizeMultiplier if (fontScalingEnabled) { CGFloat fontSizeMultiplier = !isnan(_fontSizeMultiplier) ? _fontSizeMultiplier : 1.0; + if (_dynamicTypeRamp != RCTDynamicTypeRampUndefined) { + UIFontMetrics *fontMetrics = RCTUIFontMetricsForDynamicTypeRamp(_dynamicTypeRamp); + // Using a specific font size reduces rounding errors from -scaledValueForValue: + CGFloat requestedSize = isnan(_fontSize) ? RCTBaseSizeForDynamicTypeRamp(_dynamicTypeRamp) : _fontSize; + fontSizeMultiplier = [fontMetrics scaledValueForValue:requestedSize] / requestedSize; + } CGFloat maxFontSizeMultiplier = !isnan(_maxFontSizeMultiplier) ? _maxFontSizeMultiplier : 0.0; return maxFontSizeMultiplier >= 1.0 ? fminf(maxFontSizeMultiplier, fontSizeMultiplier) : fontSizeMultiplier; } else { @@ -324,7 +332,7 @@ - (BOOL)isEqual:(RCTTextAttributes *)textAttributes RCTTextAttributesCompareFloats(_fontSizeMultiplier) && RCTTextAttributesCompareFloats(_maxFontSizeMultiplier) && RCTTextAttributesCompareStrings(_fontWeight) && RCTTextAttributesCompareObjects(_fontStyle) && RCTTextAttributesCompareObjects(_fontVariant) && RCTTextAttributesCompareOthers(_allowFontScaling) && - RCTTextAttributesCompareFloats(_letterSpacing) && + RCTTextAttributesCompareOthers(_dynamicTypeRamp) && RCTTextAttributesCompareFloats(_letterSpacing) && // Paragraph Styles RCTTextAttributesCompareFloats(_lineHeight) && RCTTextAttributesCompareFloats(_alignment) && RCTTextAttributesCompareOthers(_baseWritingDirection) && RCTTextAttributesCompareOthers(_lineBreakStrategy) && diff --git a/Libraries/Text/Text.d.ts b/Libraries/Text/Text.d.ts index e752148a5d5257..a9d2a1b46a3a2d 100644 --- a/Libraries/Text/Text.d.ts +++ b/Libraries/Text/Text.d.ts @@ -26,6 +26,23 @@ export interface TextPropsIOS { */ adjustsFontSizeToFit?: boolean | undefined; + /** + * The Dynamic Text scale ramp to apply to this element on iOS. + */ + dynamicTypeRamp?: + | 'caption2' + | 'caption1' + | 'footnote' + | 'subheadline' + | 'callout' + | 'body' + | 'headline' + | 'title3' + | 'title2' + | 'title1' + | 'largeTitle' + | undefined; + /** * Specifies smallest possible scale a font can reach when adjustsFontSizeToFit is enabled. (values 0.01-1.0). */ diff --git a/Libraries/Text/Text/RCTDynamicTypeRamp.h b/Libraries/Text/Text/RCTDynamicTypeRamp.h new file mode 100644 index 00000000000000..0a34a5a8a17332 --- /dev/null +++ b/Libraries/Text/Text/RCTDynamicTypeRamp.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#import + +#import + +typedef NS_ENUM(NSInteger, RCTDynamicTypeRamp) { + RCTDynamicTypeRampUndefined, + RCTDynamicTypeRampCaption2, + RCTDynamicTypeRampCaption1, + RCTDynamicTypeRampFootnote, + RCTDynamicTypeRampSubheadline, + RCTDynamicTypeRampCallout, + RCTDynamicTypeRampBody, + RCTDynamicTypeRampHeadline, + RCTDynamicTypeRampTitle3, + RCTDynamicTypeRampTitle2, + RCTDynamicTypeRampTitle1, + RCTDynamicTypeRampLargeTitle +}; + +@interface RCTConvert (DynamicTypeRamp) + ++ (RCTDynamicTypeRamp)RCTDynamicTypeRamp:(nullable id)json; + +@end + +/// Generates a `UIFontMetrics` instance representing a particular Dynamic Type ramp. +UIFontMetrics *_Nonnull RCTUIFontMetricsForDynamicTypeRamp(RCTDynamicTypeRamp dynamicTypeRamp); +/// The "reference" size for a particular font scale ramp, equal to a text element's size under default text size +/// settings. +CGFloat RCTBaseSizeForDynamicTypeRamp(RCTDynamicTypeRamp dynamicTypeRamp); diff --git a/Libraries/Text/Text/RCTDynamicTypeRamp.m b/Libraries/Text/Text/RCTDynamicTypeRamp.m new file mode 100644 index 00000000000000..be97a50a61f405 --- /dev/null +++ b/Libraries/Text/Text/RCTDynamicTypeRamp.m @@ -0,0 +1,82 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#import + +@implementation RCTConvert (DynamicTypeRamp) + +RCT_ENUM_CONVERTER( + RCTDynamicTypeRamp, + (@{ + @"caption2" : @(RCTDynamicTypeRampCaption2), + @"caption1" : @(RCTDynamicTypeRampCaption1), + @"footnote" : @(RCTDynamicTypeRampFootnote), + @"subheadline" : @(RCTDynamicTypeRampSubheadline), + @"callout" : @(RCTDynamicTypeRampCallout), + @"body" : @(RCTDynamicTypeRampBody), + @"headline" : @(RCTDynamicTypeRampHeadline), + @"title3" : @(RCTDynamicTypeRampTitle3), + @"title2" : @(RCTDynamicTypeRampTitle2), + @"title1" : @(RCTDynamicTypeRampTitle1), + @"largeTitle" : @(RCTDynamicTypeRampLargeTitle), + }), + RCTDynamicTypeRampUndefined, + integerValue) + +@end + +UIFontMetrics *RCTUIFontMetricsForDynamicTypeRamp(RCTDynamicTypeRamp dynamicTypeRamp) +{ + static NSDictionary *mapping; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + mapping = @{ + @(RCTDynamicTypeRampCaption2) : UIFontTextStyleCaption2, + @(RCTDynamicTypeRampCaption1) : UIFontTextStyleCaption1, + @(RCTDynamicTypeRampFootnote) : UIFontTextStyleFootnote, + @(RCTDynamicTypeRampSubheadline) : UIFontTextStyleSubheadline, + @(RCTDynamicTypeRampCallout) : UIFontTextStyleCallout, + @(RCTDynamicTypeRampBody) : UIFontTextStyleBody, + @(RCTDynamicTypeRampHeadline) : UIFontTextStyleHeadline, + @(RCTDynamicTypeRampTitle3) : UIFontTextStyleTitle3, + @(RCTDynamicTypeRampTitle2) : UIFontTextStyleTitle2, + @(RCTDynamicTypeRampTitle1) : UIFontTextStyleTitle1, + @(RCTDynamicTypeRampLargeTitle) : UIFontTextStyleLargeTitle, + }; + }); + + id textStyle = + mapping[@(dynamicTypeRamp)] ?: UIFontTextStyleBody; // Default to body if we don't recognize the specified ramp + return [UIFontMetrics metricsForTextStyle:textStyle]; +} + +CGFloat RCTBaseSizeForDynamicTypeRamp(RCTDynamicTypeRamp dynamicTypeRamp) +{ + static NSDictionary *mapping; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + // Values taken from + // https://developer.apple.com/design/human-interface-guidelines/foundations/typography/#specifications + mapping = @{ + @(RCTDynamicTypeRampCaption2) : @11, + @(RCTDynamicTypeRampCaption1) : @12, + @(RCTDynamicTypeRampFootnote) : @13, + @(RCTDynamicTypeRampSubheadline) : @15, + @(RCTDynamicTypeRampCallout) : @16, + @(RCTDynamicTypeRampBody) : @17, + @(RCTDynamicTypeRampHeadline) : @17, + @(RCTDynamicTypeRampTitle3) : @20, + @(RCTDynamicTypeRampTitle2) : @22, + @(RCTDynamicTypeRampTitle1) : @28, + @(RCTDynamicTypeRampLargeTitle) : @34, + }; + }); + + NSNumber *baseSize = + mapping[@(dynamicTypeRamp)] ?: @17; // Default to body size if we don't recognize the specified ramp + return CGFLOAT_IS_DOUBLE ? [baseSize doubleValue] : [baseSize floatValue]; +} diff --git a/Libraries/Text/TextNativeComponent.js b/Libraries/Text/TextNativeComponent.js index dd687c1697bf9a..0d5990455b5be0 100644 --- a/Libraries/Text/TextNativeComponent.js +++ b/Libraries/Text/TextNativeComponent.js @@ -34,6 +34,7 @@ const textViewConfig = { numberOfLines: true, ellipsizeMode: true, allowFontScaling: true, + dynamicTypeRamp: true, maxFontSizeMultiplier: true, disabled: true, selectable: true, diff --git a/Libraries/Text/TextProps.js b/Libraries/Text/TextProps.js index b39cb1eee1e56b..7971c37362d7cd 100644 --- a/Libraries/Text/TextProps.js +++ b/Libraries/Text/TextProps.js @@ -228,6 +228,23 @@ export type TextProps = $ReadOnly<{| */ adjustsFontSizeToFit?: ?boolean, + /** + * The Dynamic Text scale ramp to apply to this element on iOS. + */ + dynamicTypeRamp?: ?( + | 'caption2' + | 'caption1' + | 'footnote' + | 'subheadline' + | 'callout' + | 'body' + | 'headline' + | 'title3' + | 'title2' + | 'title1' + | 'largeTitle' + ), + /** * Smallest possible scale a font can reach. * diff --git a/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp b/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp index 24f5bbd07b8072..63b5a4aab19fce 100644 --- a/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp +++ b/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp @@ -46,6 +46,9 @@ void TextAttributes::apply(TextAttributes textAttributes) { allowFontScaling = textAttributes.allowFontScaling.has_value() ? textAttributes.allowFontScaling : allowFontScaling; + dynamicTypeRamp = textAttributes.dynamicTypeRamp.has_value() + ? textAttributes.dynamicTypeRamp + : dynamicTypeRamp; letterSpacing = !std::isnan(textAttributes.letterSpacing) ? textAttributes.letterSpacing : letterSpacing; @@ -111,6 +114,7 @@ bool TextAttributes::operator==(const TextAttributes &rhs) const { fontStyle, fontVariant, allowFontScaling, + dynamicTypeRamp, alignment, baseWritingDirection, lineBreakStrategy, @@ -131,6 +135,7 @@ bool TextAttributes::operator==(const TextAttributes &rhs) const { rhs.fontStyle, rhs.fontVariant, rhs.allowFontScaling, + rhs.dynamicTypeRamp, rhs.alignment, rhs.baseWritingDirection, rhs.lineBreakStrategy, @@ -186,6 +191,7 @@ SharedDebugStringConvertibleList TextAttributes::getDebugProps() const { debugStringConvertibleItem("fontStyle", fontStyle), debugStringConvertibleItem("fontVariant", fontVariant), debugStringConvertibleItem("allowFontScaling", allowFontScaling), + debugStringConvertibleItem("dynamicTypeRamp", dynamicTypeRamp), debugStringConvertibleItem("letterSpacing", letterSpacing), // Paragraph Styles diff --git a/ReactCommon/react/renderer/attributedstring/TextAttributes.h b/ReactCommon/react/renderer/attributedstring/TextAttributes.h index 4d1a19a04bc9ff..f53ad73f60e065 100644 --- a/ReactCommon/react/renderer/attributedstring/TextAttributes.h +++ b/ReactCommon/react/renderer/attributedstring/TextAttributes.h @@ -51,6 +51,7 @@ class TextAttributes : public DebugStringConvertible { std::optional fontStyle{}; std::optional fontVariant{}; std::optional allowFontScaling{}; + std::optional dynamicTypeRamp{}; Float letterSpacing{std::numeric_limits::quiet_NaN()}; std::optional textTransform{}; diff --git a/ReactCommon/react/renderer/attributedstring/conversions.h b/ReactCommon/react/renderer/attributedstring/conversions.h index f854d6f53036ca..f768de8cd82d2f 100644 --- a/ReactCommon/react/renderer/attributedstring/conversions.h +++ b/ReactCommon/react/renderer/attributedstring/conversions.h @@ -34,6 +34,84 @@ namespace facebook { namespace react { +inline std::string toString(const DynamicTypeRamp &dynamicTypeRamp) { + switch (dynamicTypeRamp) { + case DynamicTypeRamp::Caption2: + return "caption2"; + case DynamicTypeRamp::Caption1: + return "caption1"; + case DynamicTypeRamp::Footnote: + return "footnote"; + case DynamicTypeRamp::Subheadline: + return "subheadline"; + case DynamicTypeRamp::Callout: + return "callout"; + case DynamicTypeRamp::Body: + return "body"; + case DynamicTypeRamp::Headline: + return "headline"; + case DynamicTypeRamp::Title3: + return "title3"; + case DynamicTypeRamp::Title2: + return "title2"; + case DynamicTypeRamp::Title1: + return "title1"; + case DynamicTypeRamp::LargeTitle: + return "largeTitle"; + } + + LOG(ERROR) << "Unsupported DynamicTypeRamp value"; + react_native_assert(false); + + // Sane default in case of parsing errors + return "body"; +} + +inline void fromRawValue( + const PropsParserContext &context, + const RawValue &value, + DynamicTypeRamp &result) { + react_native_assert(value.hasType()); + if (value.hasType()) { + auto string = (std::string)value; + if (string == "caption2") { + result = DynamicTypeRamp::Caption2; + } else if (string == "caption1") { + result = DynamicTypeRamp::Caption1; + } else if (string == "footnote") { + result = DynamicTypeRamp::Footnote; + } else if (string == "subheadline") { + result = DynamicTypeRamp::Subheadline; + } else if (string == "callout") { + result = DynamicTypeRamp::Callout; + } else if (string == "body") { + result = DynamicTypeRamp::Body; + } else if (string == "headline") { + result = DynamicTypeRamp::Headline; + } else if (string == "title3") { + result = DynamicTypeRamp::Title3; + } else if (string == "title2") { + result = DynamicTypeRamp::Title2; + } else if (string == "title1") { + result = DynamicTypeRamp::Title1; + } else if (string == "largeTitle") { + result = DynamicTypeRamp::LargeTitle; + } else { + // sane default + LOG(ERROR) << "Unsupported DynamicTypeRamp value: " << string; + react_native_assert(false); + result = DynamicTypeRamp::Body; + } + return; + } + + LOG(ERROR) << "Unsupported DynamicTypeRamp type"; + react_native_assert(false); + + // Sane default in case of parsing errors + result = DynamicTypeRamp::Body; +} + inline std::string toString(const EllipsizeMode &ellipsisMode) { switch (ellipsisMode) { case EllipsizeMode::Clip: diff --git a/ReactCommon/react/renderer/attributedstring/primitives.h b/ReactCommon/react/renderer/attributedstring/primitives.h index 3c6c7bda2654b6..f3ef237c9a829f 100644 --- a/ReactCommon/react/renderer/attributedstring/primitives.h +++ b/ReactCommon/react/renderer/attributedstring/primitives.h @@ -46,6 +46,20 @@ enum class FontVariant : int { ProportionalNums = 1 << 5 }; +enum class DynamicTypeRamp { + Caption2, + Caption1, + Footnote, + Subheadline, + Callout, + Body, + Headline, + Title3, + Title2, + Title1, + LargeTitle +}; + enum class EllipsizeMode { Clip, // Do not add ellipsize, simply clip. Head, // Truncate at head of line: "...wxyz". @@ -190,6 +204,13 @@ struct hash { } }; +template <> +struct hash { + size_t operator()(const facebook::react::DynamicTypeRamp &v) const { + return hash()(static_cast(v)); + } +}; + template <> struct hash { size_t operator()(const facebook::react::EllipsizeMode &v) const { diff --git a/ReactCommon/react/renderer/components/text/BaseTextProps.cpp b/ReactCommon/react/renderer/components/text/BaseTextProps.cpp index 6f4741ba69c9ee..e098e7beab2404 100644 --- a/ReactCommon/react/renderer/components/text/BaseTextProps.cpp +++ b/ReactCommon/react/renderer/components/text/BaseTextProps.cpp @@ -73,6 +73,12 @@ static TextAttributes convertRawProp( "allowFontScaling", sourceTextAttributes.allowFontScaling, defaultTextAttributes.allowFontScaling); + textAttributes.dynamicTypeRamp = convertRawProp( + context, + rawProps, + "dynamicTypeRamp", + sourceTextAttributes.dynamicTypeRamp, + defaultTextAttributes.dynamicTypeRamp); textAttributes.letterSpacing = convertRawProp( context, rawProps, diff --git a/ReactCommon/react/renderer/textlayoutmanager/TextMeasureCache.h b/ReactCommon/react/renderer/textlayoutmanager/TextMeasureCache.h index aee6ebdeceea73..23486173c68068 100644 --- a/ReactCommon/react/renderer/textlayoutmanager/TextMeasureCache.h +++ b/ReactCommon/react/renderer/textlayoutmanager/TextMeasureCache.h @@ -94,6 +94,7 @@ inline bool areTextAttributesEquivalentLayoutWise( lhs.fontStyle, lhs.fontVariant, lhs.allowFontScaling, + lhs.dynamicTypeRamp, lhs.alignment) == std::tie( rhs.fontFamily, @@ -101,6 +102,7 @@ inline bool areTextAttributesEquivalentLayoutWise( rhs.fontStyle, rhs.fontVariant, rhs.allowFontScaling, + rhs.dynamicTypeRamp, rhs.alignment) && floatEquality(lhs.fontSize, rhs.fontSize) && floatEquality(lhs.fontSizeMultiplier, rhs.fontSizeMultiplier) && @@ -121,6 +123,7 @@ inline size_t textAttributesHashLayoutWise( textAttributes.fontStyle, textAttributes.fontVariant, textAttributes.allowFontScaling, + textAttributes.dynamicTypeRamp, textAttributes.letterSpacing, textAttributes.lineHeight, textAttributes.alignment); diff --git a/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.mm b/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.mm index 7f5117040cc1a2..dca3ab892c8d15 100644 --- a/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.mm +++ b/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.mm @@ -55,6 +55,83 @@ inline static UIFontWeight RCTUIFontWeightFromInteger(NSInteger fontWeight) return weights[(fontWeight + 50) / 100 - 1]; } +inline static UIFontTextStyle RCTUIFontTextStyleForDynamicTypeRamp(const DynamicTypeRamp &dynamicTypeRamp) +{ + switch (dynamicTypeRamp) { + case DynamicTypeRamp::Caption2: + return UIFontTextStyleCaption2; + case DynamicTypeRamp::Caption1: + return UIFontTextStyleCaption1; + case DynamicTypeRamp::Footnote: + return UIFontTextStyleFootnote; + case DynamicTypeRamp::Subheadline: + return UIFontTextStyleSubheadline; + case DynamicTypeRamp::Callout: + return UIFontTextStyleCallout; + case DynamicTypeRamp::Body: + return UIFontTextStyleBody; + case DynamicTypeRamp::Headline: + return UIFontTextStyleHeadline; + case DynamicTypeRamp::Title3: + return UIFontTextStyleTitle3; + case DynamicTypeRamp::Title2: + return UIFontTextStyleTitle2; + case DynamicTypeRamp::Title1: + return UIFontTextStyleTitle1; + case DynamicTypeRamp::LargeTitle: + return UIFontTextStyleLargeTitle; + } +} + +inline static CGFloat RCTBaseSizeForDynamicTypeRamp(const DynamicTypeRamp &dynamicTypeRamp) +{ + // Values taken from + // https://developer.apple.com/design/human-interface-guidelines/foundations/typography/#specifications + switch (dynamicTypeRamp) { + case DynamicTypeRamp::Caption2: + return 11.0; + case DynamicTypeRamp::Caption1: + return 12.0; + case facebook::react::DynamicTypeRamp::Footnote: + return 13.0; + case facebook::react::DynamicTypeRamp::Subheadline: + return 15.0; + case facebook::react::DynamicTypeRamp::Callout: + return 16.0; + case facebook::react::DynamicTypeRamp::Body: + return 17.0; + case facebook::react::DynamicTypeRamp::Headline: + return 17.0; + case facebook::react::DynamicTypeRamp::Title3: + return 20.0; + case facebook::react::DynamicTypeRamp::Title2: + return 22.0; + case facebook::react::DynamicTypeRamp::Title1: + return 28.0; + case facebook::react::DynamicTypeRamp::LargeTitle: + return 34.0; + } +} + +inline static CGFloat RCTEffectiveFontSizeMultiplierFromTextAttributes(const TextAttributes &textAttributes) +{ + if (textAttributes.allowFontScaling.value_or(true)) { + if (textAttributes.dynamicTypeRamp.has_value()) { + DynamicTypeRamp dynamicTypeRamp = textAttributes.dynamicTypeRamp.value(); + UIFontMetrics *fontMetrics = + [UIFontMetrics metricsForTextStyle:RCTUIFontTextStyleForDynamicTypeRamp(dynamicTypeRamp)]; + // Using a specific font size reduces rounding errors from -scaledValueForValue: + CGFloat requestedSize = + isnan(textAttributes.fontSize) ? RCTBaseSizeForDynamicTypeRamp(dynamicTypeRamp) : textAttributes.fontSize; + return [fontMetrics scaledValueForValue:requestedSize] / requestedSize; + } else { + return textAttributes.fontSizeMultiplier; + } + } else { + return 1.0; + } +} + inline static UIFont *RCTEffectiveFontFromTextAttributes(const TextAttributes &textAttributes) { NSString *fontFamily = [NSString stringWithCString:textAttributes.fontFamily.c_str() encoding:NSUTF8StringEncoding]; @@ -71,19 +148,11 @@ inline static UIFontWeight RCTUIFontWeightFromInteger(NSInteger fontWeight) fontProperties.weight = textAttributes.fontWeight.has_value() ? RCTUIFontWeightFromInteger((NSInteger)textAttributes.fontWeight.value()) : NAN; - fontProperties.sizeMultiplier = - textAttributes.allowFontScaling.value_or(true) ? textAttributes.fontSizeMultiplier : 1; + fontProperties.sizeMultiplier = RCTEffectiveFontSizeMultiplierFromTextAttributes(textAttributes); return RCTFontWithFontProperties(fontProperties); } -inline static CGFloat RCTEffectiveFontSizeMultiplierFromTextAttributes(const TextAttributes &textAttributes) -{ - return textAttributes.allowFontScaling.value_or(true) && !isnan(textAttributes.fontSizeMultiplier) - ? textAttributes.fontSizeMultiplier - : 1.0; -} - inline static UIColor *RCTEffectiveForegroundColorFromTextAttributes(const TextAttributes &textAttributes) { UIColor *effectiveForegroundColor = RCTUIColorFromSharedColor(textAttributes.foregroundColor) ?: [UIColor blackColor]; diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock deleted file mode 100644 index d6bfa85c149f95..00000000000000 --- a/packages/rn-tester/Podfile.lock +++ /dev/null @@ -1,1001 +0,0 @@ -PODS: - - boost (1.76.0) - - CocoaAsyncSocket (7.6.5) - - DoubleConversion (1.1.6) - - FBLazyVector (1000.0.0) - - FBReactNativeSpec (1000.0.0): - - RCT-Folly (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-Core (= 1000.0.0) - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - Flipper (0.125.0): - - Flipper-Folly (~> 2.6) - - Flipper-RSocket (~> 1.4) - - Flipper-Boost-iOSX (1.76.0.1.11) - - Flipper-DoubleConversion (3.2.0.1) - - Flipper-Fmt (7.1.7) - - Flipper-Folly (2.6.10): - - Flipper-Boost-iOSX - - Flipper-DoubleConversion - - Flipper-Fmt (= 7.1.7) - - Flipper-Glog - - libevent (~> 2.1.12) - - OpenSSL-Universal (= 1.1.1100) - - Flipper-Glog (0.5.0.5) - - Flipper-PeerTalk (0.0.4) - - Flipper-RSocket (1.4.3): - - Flipper-Folly (~> 2.6) - - FlipperKit (0.125.0): - - FlipperKit/Core (= 0.125.0) - - FlipperKit/Core (0.125.0): - - Flipper (~> 0.125.0) - - FlipperKit/CppBridge - - FlipperKit/FBCxxFollyDynamicConvert - - FlipperKit/FBDefines - - FlipperKit/FKPortForwarding - - SocketRocket (~> 0.6.0) - - FlipperKit/CppBridge (0.125.0): - - Flipper (~> 0.125.0) - - FlipperKit/FBCxxFollyDynamicConvert (0.125.0): - - Flipper-Folly (~> 2.6) - - FlipperKit/FBDefines (0.125.0) - - FlipperKit/FKPortForwarding (0.125.0): - - CocoaAsyncSocket (~> 7.6) - - Flipper-PeerTalk (~> 0.0.4) - - FlipperKit/FlipperKitHighlightOverlay (0.125.0) - - FlipperKit/FlipperKitLayoutHelpers (0.125.0): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutTextSearchable - - FlipperKit/FlipperKitLayoutIOSDescriptors (0.125.0): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutHelpers - - YogaKit (~> 1.18) - - FlipperKit/FlipperKitLayoutPlugin (0.125.0): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutHelpers - - FlipperKit/FlipperKitLayoutIOSDescriptors - - FlipperKit/FlipperKitLayoutTextSearchable - - YogaKit (~> 1.18) - - FlipperKit/FlipperKitLayoutTextSearchable (0.125.0) - - FlipperKit/FlipperKitNetworkPlugin (0.125.0): - - FlipperKit/Core - - FlipperKit/FlipperKitReactPlugin (0.125.0): - - FlipperKit/Core - - FlipperKit/FlipperKitUserDefaultsPlugin (0.125.0): - - FlipperKit/Core - - FlipperKit/SKIOSNetworkPlugin (0.125.0): - - FlipperKit/Core - - FlipperKit/FlipperKitNetworkPlugin - - fmt (6.2.1) - - glog (0.3.5) - - hermes-engine (1000.0.0): - - hermes-engine/Hermes (= 1000.0.0) - - hermes-engine/JSI (= 1000.0.0) - - hermes-engine/Public (= 1000.0.0) - - hermes-engine/Hermes (1000.0.0) - - hermes-engine/JSI (1000.0.0) - - hermes-engine/Public (1000.0.0) - - libevent (2.1.12) - - OpenSSL-Universal (1.1.1100) - - RCT-Folly (2021.07.22.00): - - boost - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - RCT-Folly/Default (= 2021.07.22.00) - - RCT-Folly/Default (2021.07.22.00): - - boost - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - RCT-Folly/Fabric (2021.07.22.00): - - boost - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - RCT-Folly/Futures (2021.07.22.00): - - boost - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - libevent - - RCTRequired (1000.0.0) - - RCTTypeSafety (1000.0.0): - - FBLazyVector (= 1000.0.0) - - RCTRequired (= 1000.0.0) - - React-Core (= 1000.0.0) - - React (1000.0.0): - - React-Core (= 1000.0.0) - - React-Core/DevSupport (= 1000.0.0) - - React-Core/RCTWebSocket (= 1000.0.0) - - React-RCTActionSheet (= 1000.0.0) - - React-RCTAnimation (= 1000.0.0) - - React-RCTBlob (= 1000.0.0) - - React-RCTImage (= 1000.0.0) - - React-RCTLinking (= 1000.0.0) - - React-RCTNetwork (= 1000.0.0) - - React-RCTSettings (= 1000.0.0) - - React-RCTText (= 1000.0.0) - - React-RCTVibration (= 1000.0.0) - - React-callinvoker (1000.0.0) - - React-Codegen (1000.0.0): - - FBReactNativeSpec (= 1000.0.0) - - hermes-engine (= 1000.0.0) - - RCT-Folly (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-Core (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - React-rncore (= 1000.0.0) - - ReactCommon/turbomodule/bridging (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Core (1000.0.0): - - glog - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 1000.0.0) - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - Yoga - - React-Core/CoreModulesHeaders (1000.0.0): - - glog - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - Yoga - - React-Core/Default (1000.0.0): - - glog - - RCT-Folly (= 2021.07.22.00) - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - Yoga - - React-Core/DevSupport (1000.0.0): - - glog - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 1000.0.0) - - React-Core/RCTWebSocket (= 1000.0.0) - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - React-jsinspector (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - Yoga - - React-Core/RCTActionSheetHeaders (1000.0.0): - - glog - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - Yoga - - React-Core/RCTAnimationHeaders (1000.0.0): - - glog - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - Yoga - - React-Core/RCTBlobHeaders (1000.0.0): - - glog - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - Yoga - - React-Core/RCTImageHeaders (1000.0.0): - - glog - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - Yoga - - React-Core/RCTLinkingHeaders (1000.0.0): - - glog - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - Yoga - - React-Core/RCTNetworkHeaders (1000.0.0): - - glog - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - Yoga - - React-Core/RCTPushNotificationHeaders (1000.0.0): - - glog - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - Yoga - - React-Core/RCTSettingsHeaders (1000.0.0): - - glog - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - Yoga - - React-Core/RCTTextHeaders (1000.0.0): - - glog - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - Yoga - - React-Core/RCTVibrationHeaders (1000.0.0): - - glog - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - Yoga - - React-Core/RCTWebSocket (1000.0.0): - - glog - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 1000.0.0) - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - Yoga - - React-CoreModules (1000.0.0): - - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 1000.0.0) - - React-Codegen (= 1000.0.0) - - React-Core/CoreModulesHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-RCTImage (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-cxxreact (1000.0.0): - - boost (= 1.76.0) - - DoubleConversion - - glog - - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsinspector (= 1000.0.0) - - React-logger (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - React-runtimeexecutor (= 1000.0.0) - - React-Fabric (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-Fabric/animations (= 1000.0.0) - - React-Fabric/attributedstring (= 1000.0.0) - - React-Fabric/butter (= 1000.0.0) - - React-Fabric/componentregistry (= 1000.0.0) - - React-Fabric/componentregistrynative (= 1000.0.0) - - React-Fabric/components (= 1000.0.0) - - React-Fabric/config (= 1000.0.0) - - React-Fabric/core (= 1000.0.0) - - React-Fabric/debug_core (= 1000.0.0) - - React-Fabric/debug_renderer (= 1000.0.0) - - React-Fabric/imagemanager (= 1000.0.0) - - React-Fabric/leakchecker (= 1000.0.0) - - React-Fabric/mapbuffer (= 1000.0.0) - - React-Fabric/mounting (= 1000.0.0) - - React-Fabric/runtimescheduler (= 1000.0.0) - - React-Fabric/scheduler (= 1000.0.0) - - React-Fabric/telemetry (= 1000.0.0) - - React-Fabric/templateprocessor (= 1000.0.0) - - React-Fabric/textlayoutmanager (= 1000.0.0) - - React-Fabric/uimanager (= 1000.0.0) - - React-Fabric/utils (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/animations (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/attributedstring (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/butter (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/componentregistry (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/componentregistrynative (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-Fabric/components/activityindicator (= 1000.0.0) - - React-Fabric/components/image (= 1000.0.0) - - React-Fabric/components/inputaccessory (= 1000.0.0) - - React-Fabric/components/legacyviewmanagerinterop (= 1000.0.0) - - React-Fabric/components/modal (= 1000.0.0) - - React-Fabric/components/root (= 1000.0.0) - - React-Fabric/components/safeareaview (= 1000.0.0) - - React-Fabric/components/scrollview (= 1000.0.0) - - React-Fabric/components/slider (= 1000.0.0) - - React-Fabric/components/text (= 1000.0.0) - - React-Fabric/components/textinput (= 1000.0.0) - - React-Fabric/components/unimplementedview (= 1000.0.0) - - React-Fabric/components/view (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/activityindicator (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/image (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/inputaccessory (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/legacyviewmanagerinterop (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/modal (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/root (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/safeareaview (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/scrollview (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/slider (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/text (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/textinput (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/unimplementedview (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/components/view (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - Yoga - - React-Fabric/config (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/core (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsidynamic (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/debug_core (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/debug_renderer (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/imagemanager (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - React-RCTImage (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/leakchecker (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/mapbuffer (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/mounting (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/runtimescheduler (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/scheduler (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/telemetry (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/templateprocessor (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/textlayoutmanager (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-Fabric/uimanager - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/uimanager (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsidynamic (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-Fabric/utils (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 1000.0.0) - - RCTTypeSafety (= 1000.0.0) - - React-graphics (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-graphics (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - React-Core/Default (= 1000.0.0) - - React-hermes (1000.0.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - RCT-Folly/Futures (= 2021.07.22.00) - - React-cxxreact (= 1000.0.0) - - React-jsidynamic (= 1000.0.0) - - React-jsiexecutor (= 1000.0.0) - - React-jsinspector (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - React-jsi (1000.0.0): - - hermes-engine - - React-jsidynamic (1000.0.0): - - boost (= 1.76.0) - - DoubleConversion - - glog - - RCT-Folly (= 2021.07.22.00) - - React-jsi (= 1000.0.0) - - React-jsiexecutor (1000.0.0): - - DoubleConversion - - glog - - RCT-Folly (= 2021.07.22.00) - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsidynamic (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - React-jsinspector (1000.0.0) - - React-logger (1000.0.0): - - glog - - React-perflogger (1000.0.0) - - React-RCTActionSheet (1000.0.0): - - React-Core/RCTActionSheetHeaders (= 1000.0.0) - - React-RCTAnimation (1000.0.0): - - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 1000.0.0) - - React-Codegen (= 1000.0.0) - - React-Core/RCTAnimationHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTAppDelegate (1000.0.0): - - RCT-Folly - - RCTRequired - - RCTTypeSafety - - React-Core - - ReactCommon/turbomodule/core - - React-RCTBlob (1000.0.0): - - RCT-Folly (= 2021.07.22.00) - - React-Codegen (= 1000.0.0) - - React-Core/RCTBlobHeaders (= 1000.0.0) - - React-Core/RCTWebSocket (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-RCTNetwork (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTFabric (1000.0.0): - - RCT-Folly/Fabric (= 2021.07.22.00) - - React-Core (= 1000.0.0) - - React-Fabric (= 1000.0.0) - - React-RCTImage (= 1000.0.0) - - React-RCTImage (1000.0.0): - - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 1000.0.0) - - React-Codegen (= 1000.0.0) - - React-Core/RCTImageHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-RCTNetwork (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTLinking (1000.0.0): - - React-Codegen (= 1000.0.0) - - React-Core/RCTLinkingHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTNetwork (1000.0.0): - - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 1000.0.0) - - React-Codegen (= 1000.0.0) - - React-Core/RCTNetworkHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTPushNotification (1000.0.0): - - RCTTypeSafety (= 1000.0.0) - - React-Codegen (= 1000.0.0) - - React-Core/RCTPushNotificationHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTSettings (1000.0.0): - - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 1000.0.0) - - React-Codegen (= 1000.0.0) - - React-Core/RCTSettingsHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTTest (1000.0.0): - - RCT-Folly (= 2021.07.22.00) - - React-Core (= 1000.0.0) - - React-CoreModules (= 1000.0.0) - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-RCTText (1000.0.0): - - React-Core/RCTTextHeaders (= 1000.0.0) - - React-RCTVibration (1000.0.0): - - RCT-Folly (= 2021.07.22.00) - - React-Codegen (= 1000.0.0) - - React-Core/RCTVibrationHeaders (= 1000.0.0) - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - React-rncore (1000.0.0) - - React-runtimeexecutor (1000.0.0): - - React-jsi (= 1000.0.0) - - ReactCommon/turbomodule/bridging (1000.0.0): - - DoubleConversion - - glog - - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 1000.0.0) - - React-Core (= 1000.0.0) - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-logger (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - ReactCommon/turbomodule/core (1000.0.0): - - DoubleConversion - - glog - - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 1000.0.0) - - React-Core (= 1000.0.0) - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-jsidynamic (= 1000.0.0) - - React-logger (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - ReactCommon/turbomodule/samples (1000.0.0): - - DoubleConversion - - glog - - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 1000.0.0) - - React-Core (= 1000.0.0) - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-logger (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - ReactCommon/turbomodule/core (= 1000.0.0) - - ScreenshotManager (0.0.1): - - RCT-Folly (= 2021.07.22.00) - - React-Core - - SocketRocket (0.6.0) - - Yoga (1.14.0) - - YogaKit (1.18.1): - - Yoga (~> 1.14) - -DEPENDENCIES: - - boost (from `../../third-party-podspecs/boost.podspec`) - - DoubleConversion (from `../../third-party-podspecs/DoubleConversion.podspec`) - - FBLazyVector (from `../../Libraries/FBLazyVector`) - - FBReactNativeSpec (from `../../React/FBReactNativeSpec`) - - Flipper (= 0.125.0) - - Flipper-Boost-iOSX (= 1.76.0.1.11) - - Flipper-DoubleConversion (= 3.2.0.1) - - Flipper-Fmt (= 7.1.7) - - Flipper-Folly (= 2.6.10) - - Flipper-Glog (= 0.5.0.5) - - Flipper-PeerTalk (= 0.0.4) - - Flipper-RSocket (= 1.4.3) - - FlipperKit (= 0.125.0) - - FlipperKit/Core (= 0.125.0) - - FlipperKit/CppBridge (= 0.125.0) - - FlipperKit/FBCxxFollyDynamicConvert (= 0.125.0) - - FlipperKit/FBDefines (= 0.125.0) - - FlipperKit/FKPortForwarding (= 0.125.0) - - FlipperKit/FlipperKitHighlightOverlay (= 0.125.0) - - FlipperKit/FlipperKitLayoutPlugin (= 0.125.0) - - FlipperKit/FlipperKitLayoutTextSearchable (= 0.125.0) - - FlipperKit/FlipperKitNetworkPlugin (= 0.125.0) - - FlipperKit/FlipperKitReactPlugin (= 0.125.0) - - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.125.0) - - FlipperKit/SKIOSNetworkPlugin (= 0.125.0) - - glog (from `../../third-party-podspecs/glog.podspec`) - - hermes-engine (from `../../sdks/hermes/hermes-engine.podspec`) - - libevent (~> 2.1.12) - - OpenSSL-Universal (= 1.1.1100) - - RCT-Folly (from `../../third-party-podspecs/RCT-Folly.podspec`) - - RCT-Folly/Fabric (from `../../third-party-podspecs/RCT-Folly.podspec`) - - RCTRequired (from `../../Libraries/RCTRequired`) - - RCTTypeSafety (from `../../Libraries/TypeSafety`) - - React (from `../../`) - - React-callinvoker (from `../../ReactCommon/callinvoker`) - - React-Codegen (from `build/generated/ios`) - - React-Core (from `../../`) - - React-Core/DevSupport (from `../../`) - - React-Core/RCTWebSocket (from `../../`) - - React-CoreModules (from `../../React/CoreModules`) - - React-cxxreact (from `../../ReactCommon/cxxreact`) - - React-Fabric (from `../../ReactCommon`) - - React-graphics (from `../../ReactCommon/react/renderer/graphics`) - - React-hermes (from `../../ReactCommon/hermes`) - - React-jsi (from `../../ReactCommon/jsi`) - - React-jsidynamic (from `../../ReactCommon/jsi`) - - React-jsiexecutor (from `../../ReactCommon/jsiexecutor`) - - React-jsinspector (from `../../ReactCommon/jsinspector`) - - React-logger (from `../../ReactCommon/logger`) - - React-perflogger (from `../../ReactCommon/reactperflogger`) - - React-RCTActionSheet (from `../../Libraries/ActionSheetIOS`) - - React-RCTAnimation (from `../../Libraries/NativeAnimation`) - - React-RCTAppDelegate (from `../../Libraries/AppDelegate`) - - React-RCTBlob (from `../../Libraries/Blob`) - - React-RCTFabric (from `../../React`) - - React-RCTImage (from `../../Libraries/Image`) - - React-RCTLinking (from `../../Libraries/LinkingIOS`) - - React-RCTNetwork (from `../../Libraries/Network`) - - React-RCTPushNotification (from `../../Libraries/PushNotificationIOS`) - - React-RCTSettings (from `../../Libraries/Settings`) - - React-RCTTest (from `./RCTTest`) - - React-RCTText (from `../../Libraries/Text`) - - React-RCTVibration (from `../../Libraries/Vibration`) - - React-rncore (from `../../ReactCommon`) - - React-runtimeexecutor (from `../../ReactCommon/runtimeexecutor`) - - ReactCommon/turbomodule/core (from `../../ReactCommon`) - - ReactCommon/turbomodule/samples (from `../../ReactCommon`) - - ScreenshotManager (from `NativeModuleExample`) - - Yoga (from `../../ReactCommon/yoga`) - -SPEC REPOS: - trunk: - - CocoaAsyncSocket - - Flipper - - Flipper-Boost-iOSX - - Flipper-DoubleConversion - - Flipper-Fmt - - Flipper-Folly - - Flipper-Glog - - Flipper-PeerTalk - - Flipper-RSocket - - FlipperKit - - fmt - - libevent - - OpenSSL-Universal - - SocketRocket - - YogaKit - -EXTERNAL SOURCES: - boost: - :podspec: "../../third-party-podspecs/boost.podspec" - DoubleConversion: - :podspec: "../../third-party-podspecs/DoubleConversion.podspec" - FBLazyVector: - :path: "../../Libraries/FBLazyVector" - FBReactNativeSpec: - :path: "../../React/FBReactNativeSpec" - glog: - :podspec: "../../third-party-podspecs/glog.podspec" - hermes-engine: - :podspec: "../../sdks/hermes/hermes-engine.podspec" - RCT-Folly: - :podspec: "../../third-party-podspecs/RCT-Folly.podspec" - RCTRequired: - :path: "../../Libraries/RCTRequired" - RCTTypeSafety: - :path: "../../Libraries/TypeSafety" - React: - :path: "../../" - React-callinvoker: - :path: "../../ReactCommon/callinvoker" - React-Codegen: - :path: build/generated/ios - React-Core: - :path: "../../" - React-CoreModules: - :path: "../../React/CoreModules" - React-cxxreact: - :path: "../../ReactCommon/cxxreact" - React-Fabric: - :path: "../../ReactCommon" - React-graphics: - :path: "../../ReactCommon/react/renderer/graphics" - React-hermes: - :path: "../../ReactCommon/hermes" - React-jsi: - :path: "../../ReactCommon/jsi" - React-jsidynamic: - :path: "../../ReactCommon/jsi" - React-jsiexecutor: - :path: "../../ReactCommon/jsiexecutor" - React-jsinspector: - :path: "../../ReactCommon/jsinspector" - React-logger: - :path: "../../ReactCommon/logger" - React-perflogger: - :path: "../../ReactCommon/reactperflogger" - React-RCTActionSheet: - :path: "../../Libraries/ActionSheetIOS" - React-RCTAnimation: - :path: "../../Libraries/NativeAnimation" - React-RCTAppDelegate: - :path: "../../Libraries/AppDelegate" - React-RCTBlob: - :path: "../../Libraries/Blob" - React-RCTFabric: - :path: "../../React" - React-RCTImage: - :path: "../../Libraries/Image" - React-RCTLinking: - :path: "../../Libraries/LinkingIOS" - React-RCTNetwork: - :path: "../../Libraries/Network" - React-RCTPushNotification: - :path: "../../Libraries/PushNotificationIOS" - React-RCTSettings: - :path: "../../Libraries/Settings" - React-RCTTest: - :path: "./RCTTest" - React-RCTText: - :path: "../../Libraries/Text" - React-RCTVibration: - :path: "../../Libraries/Vibration" - React-rncore: - :path: "../../ReactCommon" - React-runtimeexecutor: - :path: "../../ReactCommon/runtimeexecutor" - ReactCommon: - :path: "../../ReactCommon" - ScreenshotManager: - :path: NativeModuleExample - Yoga: - :path: "../../ReactCommon/yoga" - -SPEC CHECKSUMS: - boost: 57d2868c099736d80fcd648bf211b4431e51a558 - CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 - DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 - FBLazyVector: d68947eddece25638eb0f642d1b957c90388afd1 - FBReactNativeSpec: 9a029e7dec747a8836d785b3b7a433db5960504b - Flipper: 26fc4b7382499f1281eb8cb921e5c3ad6de91fe0 - Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c - Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 - Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b - Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3 - Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446 - Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 - Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541 - FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86 - fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 - glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b - hermes-engine: d344c89c3f4657f7031e5280e1b3dd531b425bfd - libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 - OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c - RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 - RCTRequired: 54a4f03dbbebb0cfdb4e2ba8d3b1d0b1258f8c08 - RCTTypeSafety: a41e253b4ed644708899857d912b2f50c7b6214d - React: 2fc6c4c656cccd6753016528ad41199c16fd558e - React-callinvoker: a7d5e883a83bb9bd3985b08be832c5e76451d18f - React-Codegen: 4a022870a58b95e17da8f32641ba3d72b551f268 - React-Core: 719bec4b41c93b1affb1e2c3a43956ec482ecb9f - React-CoreModules: feaa45c54c58e1420981f6dd544c8b3d01200caa - React-cxxreact: c5f93e7a35f3545489d8e1f89beb9d2d56acfde5 - React-Fabric: 8a854fd89c932ab073f67036bb45d1787d0d31a4 - React-graphics: cb8a85648695c60f33a00d732b985f734d1470d8 - React-hermes: 299c7f56d32e8953480fd8e7fba2a7968a534b3f - React-jsi: d40e13b7f545f9af2af780f153f5321018b5e2f8 - React-jsidynamic: 8aa406dfc1eff081f3443e55a28b51d11616a3bf - React-jsiexecutor: 04a945f040cc085d79655359ec29e5f501fb6e01 - React-jsinspector: a56861590ddfcb5cb544877ade3e007a32ff9616 - React-logger: 07c9b44040a6f948b8e2033207b23cb623f0b9b4 - React-perflogger: b4b9fb2ddd856b78003708ab3cf66ce03e6bc7c4 - React-RCTActionSheet: 1b1501ef80928be10702cd0ce09120358094cd82 - React-RCTAnimation: 6741f7be3e269e057c1426074cc70f34b56e114b - React-RCTAppDelegate: 0b3b2c1e02c02f952f5033535ddb23d690e3b890 - React-RCTBlob: 94feb99abafd0527a78f6caaa17a0bcec9ce3167 - React-RCTFabric: db1d7fe55db4811b63ae4060078e7048ebb4a918 - React-RCTImage: 055685a12c88939437f6520d9e7c120cd666cbf1 - React-RCTLinking: b149b3ff1f96fa93fc445230b9c171adb0e5572c - React-RCTNetwork: 21abb4231182651f48b7035beaa011b1ab7ae8f4 - React-RCTPushNotification: f3af966de34c1fe2df8860625d225fb2f581d15e - React-RCTSettings: 64b6acabfddf7f96796229b101bd91f46d14391b - React-RCTTest: 81ebfa8c2e1b0b482effe12485e6486dc0ff70d7 - React-RCTText: 4e5ae05b778a0ed2b22b012af025da5e1a1c4e54 - React-RCTVibration: ecfd04c1886a9c9a4e31a466c0fbcf6b36e92fde - React-rncore: 08566b41339706758229f407c8907b2f7987f058 - React-runtimeexecutor: c7b2cd6babf6cc50340398bfbb7a9da13c93093f - ReactCommon: fc336a81ae40421e172c3ca9496677e34d7e3ed5 - ScreenshotManager: 2bd28f9b590a13c811f1f4ce32aab767f8845c6b - SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608 - Yoga: 1b1a12ff3d86a10565ea7cbe057d42f5e5fb2a07 - YogaKit: f782866e155069a2cca2517aafea43200b01fd5a - -PODFILE CHECKSUM: 20298ecd3f30aa788ad491637e593ed0d8c100ca - -COCOAPODS: 1.11.3 diff --git a/packages/rn-tester/js/examples/Text/TextExample.ios.js b/packages/rn-tester/js/examples/Text/TextExample.ios.js index b0e6572a07722b..4a4edacc5c690f 100644 --- a/packages/rn-tester/js/examples/Text/TextExample.ios.js +++ b/packages/rn-tester/js/examples/Text/TextExample.ios.js @@ -1283,4 +1283,49 @@ exports.examples = [ ); }, }, + { + title: 'Dynamic Type (iOS only)', + render: function (): React.Node { + const boldStyle = {fontWeight: 'bold'}; + const boxStyle = { + borderWidth: 1, + padding: 8, + margin: 8, + }; + return ( + + + Adjust text size in Accessibility settings and watch how the font + sizes change relative to each other. + + + With `dynamicTypeRamp`: + + Large Title + + + Title + + + Title 2 + + + Title 3 + + + Body + + + + Without `dynamicTypeRamp`: + Large Title + Title + Title 2 + Title 3 + Body + + + ); + }, + }, ];