Loosen types

This commit is contained in:
Eric Bailey
2025-02-11 10:17:10 -06:00
parent bf5f604ac1
commit 1a210accf4
4 changed files with 27 additions and 52 deletions
+1
View File
@@ -266,6 +266,7 @@
"webpack-bundle-analyzer": "^4.10.1"
},
"resolutions": {
"@atproto/lexicon": "0.4.6-next.5",
"@expo/image-utils": "0.6.3",
"@react-native/babel-preset": "0.76.1",
"@react-native/normalize-colors": "0.76.1",
+3 -2
View File
@@ -10,6 +10,7 @@ import {UserAvatar} from '#/view/com/util/UserAvatar'
import {atoms as a, useTheme} from '#/alf'
import {Link, LinkProps} from '#/components/Link'
import {Text} from '#/components/Typography'
import * as bsky from '#/types/bsky'
const AVI_SIZE = 30
const AVI_SIZE_SMALL = 20
@@ -33,7 +34,7 @@ export function KnownFollowers({
onLinkPress,
minimal,
}: {
profile: AppBskyActorDefs.ProfileViewDetailed
profile: bsky.profile.AnyProfileView
moderationOpts: ModerationOpts
onLinkPress?: LinkProps['onPress']
minimal?: boolean
@@ -77,7 +78,7 @@ function KnownFollowersInner({
onLinkPress,
minimal,
}: {
profile: AppBskyActorDefs.ProfileViewDetailed
profile: bsky.profile.AnyProfileView
moderationOpts: ModerationOpts
cachedKnownFollowers: AppBskyActorDefs.KnownFollowers
onLinkPress?: LinkProps['onPress']
+22 -27
View File
@@ -77,6 +77,7 @@ export function ProfileCard({
showKnownFollowers &&
shouldShowKnownFollowers(profile.viewer?.knownFollowers) &&
moderationOpts
const hasDescription = 'description' in profile
return (
<Link
@@ -127,35 +128,29 @@ export function ProfileCard({
<View style={styles.layoutButton}>{renderButton(profile)}</View>
) : undefined}
</View>
{atp.profile.isView(profile) || atp.profile.isDetailedView(profile) ? (
<>
{profile.description || knownFollowersVisible ? (
<View style={styles.details}>
{profile.description ? (
<Text emoji style={pal.text} numberOfLines={4}>
{profile.description as string}
</Text>
) : null}
{knownFollowersVisible ? (
<View
style={[
a.flex_row,
a.align_center,
a.gap_sm,
!!profile.description && a.mt_md,
]}>
{atp.profile.isDetailedView(profile) && (
<KnownFollowers
minimal
profile={profile}
moderationOpts={moderationOpts}
/>
)}
</View>
) : null}
{hasDescription || knownFollowersVisible ? (
<View style={styles.details}>
{hasDescription && profile.description ? (
<Text emoji style={pal.text} numberOfLines={4}>
{profile.description as string}
</Text>
) : null}
{knownFollowersVisible ? (
<View
style={[
a.flex_row,
a.align_center,
a.gap_sm,
!!hasDescription && a.mt_md,
]}>
<KnownFollowers
minimal
profile={profile}
moderationOpts={moderationOpts}
/>
</View>
) : null}
</>
</View>
) : null}
</Link>
)
+1 -23
View File
@@ -282,7 +282,7 @@
multiformats "^9.9.0"
zod "^3.23.8"
"@atproto/lexicon@0.4.6-next.5", "@atproto/lexicon@^0.4.6-next.5":
"@atproto/lexicon@0.4.6-next.5", "@atproto/lexicon@^0.4.4", "@atproto/lexicon@^0.4.5", "@atproto/lexicon@^0.4.6-next.5":
version "0.4.6-next.5"
resolved "https://registry.yarnpkg.com/@atproto/lexicon/-/lexicon-0.4.6-next.5.tgz#433a941cf8902afec15135f70cf2cbed37c35406"
integrity sha512-Id1atQ1rZ3dUGAUyBcauD+zs5lGHSmoAlC1Kwb2DEvkaWMv3oTXUjtdQxyb0/Kz4YaFI+nxLLRH9NBO+BipG+w==
@@ -293,28 +293,6 @@
multiformats "^9.9.0"
zod "^3.23.8"
"@atproto/lexicon@^0.4.4":
version "0.4.4"
resolved "https://registry.yarnpkg.com/@atproto/lexicon/-/lexicon-0.4.4.tgz#0d97314bb57b693b76f2495fa5e02872469dd93a"
integrity sha512-QFEmr3rpj/RoAmfX9ALU/asBG/rsVtQZnw+9nOB1/AuIwoxXd+ZyndR6lVUc2+DL4GEjl6W2yvBru5xbQIZWyA==
dependencies:
"@atproto/common-web" "^0.3.1"
"@atproto/syntax" "^0.3.1"
iso-datestring-validator "^2.2.2"
multiformats "^9.9.0"
zod "^3.23.8"
"@atproto/lexicon@^0.4.5":
version "0.4.5"
resolved "https://registry.yarnpkg.com/@atproto/lexicon/-/lexicon-0.4.5.tgz#4fcf3731193c674286e9e8d677bbab5dd530b817"
integrity sha512-fljWqMGKn+XWtTprBcS3F1hGBREnQYh6qYHv2sjENucc7REms1gtmZXSerB9N6pVeHVNOnXiILdukeAcic5OEw==
dependencies:
"@atproto/common-web" "^0.3.2"
"@atproto/syntax" "^0.3.1"
iso-datestring-validator "^2.2.2"
multiformats "^9.9.0"
zod "^3.23.8"
"@atproto/oauth-provider@^0.2.10":
version "0.2.10"
resolved "https://registry.yarnpkg.com/@atproto/oauth-provider/-/oauth-provider-0.2.10.tgz#f9820d7f82c33d3b74e81a75873f50e1e654b901"