···5151 warnOnMismatchingTextChild?: boolean
52525353 /**
5454- * Callback for when the link is pressed.
5454+ * Callback for when the link is pressed. Prevent default and return `false`
5555+ * to exit early and prevent navigation.
5556 *
5657 * DO NOT use this for navigation, that's what the `to` prop is for.
5758 */
5858- onPress?: (e: GestureResponderEvent) => void
5959+ onPress?: (e: GestureResponderEvent) => void | false
59606061 /**
6162 * Web-only attribute. Sets `download` attr on web.
···82838384 const onPress = React.useCallback(
8485 (e: GestureResponderEvent) => {
8585- outerOnPress?.(e)
8686+ const exitEarlyIfFalse = outerOnPress?.(e)
8787+8888+ if (exitEarlyIfFalse === false) return
86898790 const requiresWarning = Boolean(
8891 warnOnMismatchingTextChild &&
+2-2
src/components/RichText.tsx
···11import React from 'react'
22import {RichText as RichTextAPI, AppBskyRichtextFacet} from '@atproto/api'
3344-import {atoms as a, TextStyleProp} from '#/alf'
44+import {atoms as a, TextStyleProp, flatten} from '#/alf'
55import {InlineLink} from '#/components/Link'
66import {Text, TextProps} from '#/components/Typography'
77import {toShortUrl} from 'lib/strings/url-helpers'
···2929 const [richText, setRichText] = React.useState<RichTextAPI>(() =>
3030 value instanceof RichTextAPI ? value : new RichTextAPI({text: value}),
3131 )
3232- const styles = [a.leading_normal, style]
3232+ const styles = [a.leading_snug, flatten(style)]
33333434 React.useEffect(() => {
3535 if (!resolveFacets) return
+5-3
src/view/com/feeds/FeedSourceCard.tsx
···22import {Pressable, StyleProp, StyleSheet, View, ViewStyle} from 'react-native'
33import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
44import {Text} from '../util/text/Text'
55-import {RichText} from '../util/text/RichText'
55+import {RichText} from '#/components/RichText'
66import {usePalette} from 'lib/hooks/usePalette'
77import {s} from 'lib/styles'
88import {UserAvatar} from '../util/UserAvatar'
···2525} from '#/state/queries/preferences'
2626import {useFeedSourceInfoQuery, FeedSourceInfo} from '#/state/queries/feed'
2727import {FeedLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder'
2828+import {useTheme} from '#/alf'
28292930export function FeedSourceCard({
3031 feedUri,
···8283 pinOnSave?: boolean
8384 showMinimalPlaceholder?: boolean
8485}) {
8686+ const t = useTheme()
8587 const pal = usePalette('default')
8688 const {_} = useLingui()
8789 const navigation = useNavigation<NavigationProp>()
···266268267269 {showDescription && feed.description ? (
268270 <RichText
269269- style={[pal.textLight, styles.description]}
270270- richText={feed.description}
271271+ style={[t.atoms.text_contrast_high, styles.description]}
272272+ value={feed.description}
271273 numberOfLines={3}
272274 />
273275 ) : null}
+4-3
src/view/com/lists/ListCard.tsx
···33import {AtUri, AppBskyGraphDefs, RichText} from '@atproto/api'
44import {Link} from '../util/Link'
55import {Text} from '../util/text/Text'
66-import {RichText as RichTextCom} from '../util/text/RichText'
66+import {RichText as RichTextCom} from '#/components/RichText'
77import {UserAvatar} from '../util/UserAvatar'
88import {s} from 'lib/styles'
99import {usePalette} from 'lib/hooks/usePalette'
···1212import {sanitizeHandle} from 'lib/strings/handles'
1313import {makeProfileLink} from 'lib/routes/links'
1414import {Trans} from '@lingui/macro'
1515+import {atoms as a} from '#/alf'
15161617export const ListCard = ({
1718 testID,
···119120 {descriptionRichText ? (
120121 <View style={styles.details}>
121122 <RichTextCom
122122- style={[pal.text, s.flex1]}
123123+ style={[a.flex_1]}
123124 numberOfLines={20}
124124- richText={descriptionRichText}
125125+ value={descriptionRichText}
125126 />
126127 </View>
127128 ) : undefined}
+6-9
src/view/com/post-thread/PostThreadItem.tsx
···1111import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
1212import {PostThreadFollowBtn} from 'view/com/post-thread/PostThreadFollowBtn'
1313import {Link, TextLink} from '../util/Link'
1414-import {RichText} from '../util/text/RichText'
1414+import {RichText} from '#/components/RichText'
1515import {Text} from '../util/text/Text'
1616import {PreviewableUserAvatar} from '../util/UserAvatar'
1717import {s} from 'lib/styles'
···4444import {useSession} from 'state/session'
4545import {WhoCanReply} from '../threadgate/WhoCanReply'
4646import {LoadingPlaceholder} from '../util/LoadingPlaceholder'
4747+import {atoms as a} from '#/alf'
47484849export function PostThreadItem({
4950 post,
···326327 styles.postTextLargeContainer,
327328 ]}>
328329 <RichText
329329- type="post-text-lg"
330330- richText={richText}
331331- lineHeight={1.3}
332332- style={s.flex1}
330330+ value={richText}
331331+ style={[a.flex_1, a.text_xl]}
333332 selectable
334333 />
335334 </View>
···522521 {richText?.text ? (
523522 <View style={styles.postTextContainer}>
524523 <RichText
525525- type="post-text"
526526- richText={richText}
527527- style={[pal.text, s.flex1]}
528528- lineHeight={1.3}
524524+ value={richText}
525525+ style={[a.flex_1, a.text_md]}
529526 numberOfLines={limitLines ? MAX_POST_LINES : undefined}
530527 />
531528 </View>
+4-5
src/view/com/posts/FeedItem.tsx
···2020import {PostEmbeds} from '../util/post-embeds'
2121import {ContentHider} from '../util/moderation/ContentHider'
2222import {PostAlerts} from '../util/moderation/PostAlerts'
2323-import {RichText} from '../util/text/RichText'
2323+import {RichText} from '#/components/RichText'
2424import {PreviewableUserAvatar} from '../util/UserAvatar'
2525import {s} from 'lib/styles'
2626import {usePalette} from 'lib/hooks/usePalette'
···3636import {useSession} from '#/state/session'
3737import {Trans, msg} from '@lingui/macro'
3838import {useLingui} from '@lingui/react'
3939+import {atoms as a} from '#/alf'
39404041export function FeedItem({
4142 post,
···347348 <View style={styles.postTextContainer}>
348349 <RichText
349350 testID="postText"
350350- type="post-text"
351351- richText={richText}
352352- lineHeight={1.3}
351351+ value={richText}
353352 numberOfLines={limitLines ? MAX_POST_LINES : undefined}
354354- style={s.flex1}
353353+ style={[a.flex_1, a.text_md]}
355354 />
356355 </View>
357356 ) : undefined}
+5-4
src/view/com/profile/ProfileHeader.tsx
···2323import {LoadingPlaceholder} from '../util/LoadingPlaceholder'
2424import {Text} from '../util/text/Text'
2525import {ThemedText} from '../util/text/ThemedText'
2626-import {RichText} from '../util/text/RichText'
2626+import {RichText} from '#/components/RichText'
2727import {UserAvatar} from '../util/UserAvatar'
2828import {UserBanner} from '../util/UserBanner'
2929import {ProfileHeaderAlerts} from '../util/moderation/ProfileHeaderAlerts'
···5656import {useRequireAuth} from '#/state/session'
5757import {LabelInfo} from '../util/moderation/LabelInfo'
5858import {useProfileShadow} from 'state/cache/profile-shadow'
5959+import {atoms as a} from '#/alf'
59606061let ProfileHeaderLoading = (_props: {}): React.ReactNode => {
6162 const pal = usePalette('default')
···608609 </Text>
609610 </View>
610611 {descriptionRT && !moderation.profile.blur ? (
611611- <View pointerEvents="auto">
612612+ <View pointerEvents="auto" style={[styles.description]}>
612613 <RichText
613614 testID="profileHeaderDescription"
614614- style={[styles.description, pal.text]}
615615+ style={[a.text_md]}
615616 numberOfLines={15}
616616- richText={descriptionRT}
617617+ value={descriptionRT}
617618 />
618619 </View>
619620 ) : undefined}
+5-5
src/view/com/util/post-embeds/QuoteEmbed.tsx
···2020import {makeProfileLink} from 'lib/routes/links'
2121import {InfoCircleIcon} from 'lib/icons'
2222import {Trans} from '@lingui/macro'
2323-import {RichText} from 'view/com/util/text/RichText'
2323+import {RichText} from '#/components/RichText'
2424+import {atoms as a} from '#/alf'
24252526export function MaybeQuoteEmbed({
2627 embed,
···127128 ) : null}
128129 {richText ? (
129130 <RichText
130130- richText={richText}
131131- type="post-text"
132132- style={pal.text}
131131+ value={richText}
132132+ style={[a.text_md]}
133133 numberOfLines={20}
134134- noLinks
134134+ disableLinks
135135 />
136136 ) : null}
137137 {embed && <PostEmbeds embed={embed} moderation={{}} />}
+3
src/view/com/util/text/RichText.tsx
···10101111const WORD_WRAP = {wordWrap: 1}
12121313+/**
1414+ * @deprecated use `#/components/RichText`
1515+ */
1316export function RichText({
1417 testID,
1518 type = 'md',
+4-4
src/view/screens/ProfileFeed.tsx
···1717import {ListRef} from 'view/com/util/List'
1818import {Button} from 'view/com/util/forms/Button'
1919import {Text} from 'view/com/util/text/Text'
2020-import {RichText} from 'view/com/util/text/RichText'
2020+import {RichText} from '#/components/RichText'
2121import {LoadLatestBtn} from 'view/com/util/load-latest/LoadLatestBtn'
2222import {FAB} from 'view/com/util/fab/FAB'
2323import {EmptyState} from 'view/com/util/EmptyState'
···5959import {truncateAndInvalidate} from '#/state/queries/util'
6060import {isNative} from '#/platform/detection'
6161import {listenSoftReset} from '#/state/events'
6262+import {atoms as a} from '#/alf'
62636364const SECTION_TITLES = ['Posts', 'About']
6465···575576 {feedInfo.description ? (
576577 <RichText
577578 testID="listDescription"
578578- type="lg"
579579- style={pal.text}
580580- richText={feedInfo.description}
579579+ style={[a.text_md]}
580580+ value={feedInfo.description}
581581 />
582582 ) : (
583583 <Text type="lg" style={[{fontStyle: 'italic'}, pal.textLight]}>
+4-4
src/view/screens/ProfileList.tsx
···1414import {CenteredView} from 'view/com/util/Views'
1515import {EmptyState} from 'view/com/util/EmptyState'
1616import {LoadingScreen} from 'view/com/util/LoadingScreen'
1717-import {RichText} from 'view/com/util/text/RichText'
1717+import {RichText} from '#/components/RichText'
1818import {Button} from 'view/com/util/forms/Button'
1919import {TextLink} from 'view/com/util/Link'
2020import {ListRef} from 'view/com/util/List'
···6060import {logger} from '#/logger'
6161import {useAnalytics} from '#/lib/analytics/analytics'
6262import {listenSoftReset} from '#/state/events'
6363+import {atoms as a} from '#/alf'
63646465const SECTION_TITLES_CURATE = ['Posts', 'About']
6566const SECTION_TITLES_MOD = ['About']
···742743 {descriptionRT ? (
743744 <RichText
744745 testID="listDescription"
745745- type="lg"
746746- style={pal.text}
747747- richText={descriptionRT}
746746+ style={[a.text_md]}
747747+ value={descriptionRT}
748748 />
749749 ) : (
750750 <Text