[SDK] Remove @atproto/api (#11386)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Samuel Newman
2026-08-13 22:26:22 +03:00
committed by GitHub
parent 54da80dfb0
commit 9fe0084874
391 changed files with 3130 additions and 3589 deletions
+7 -15
View File
@@ -2,12 +2,6 @@ import {useMemo} from 'react'
import {View} from 'react-native'
import {Image} from 'expo-image'
import {LinearGradient} from 'expo-linear-gradient'
import {
type AppBskyActorDefs,
AppBskyEmbedVideo,
type AppBskyFeedDefs,
AppBskyFeedPost,
} from '@atproto/api'
import {type ModerationDecision} from '@bsky.app/sdk/moderation'
import {useLingui} from '@lingui/react/macro'
@@ -26,6 +20,7 @@ import {Link} from '#/components/Link'
import {MediaInsetBorder} from '#/components/MediaInsetBorder'
import * as Hider from '#/components/moderation/Hider'
import {Text} from '#/components/Typography'
import {app} from '#/lexicons'
import * as bsky from '#/types/bsky'
function getBlackColor(t: ReturnType<typeof useTheme>) {
@@ -42,7 +37,7 @@ export function VideoPostCard({
moderation,
onInteract,
}: {
post: AppBskyFeedDefs.PostView
post: app.bsky.feed.defs.PostView
sourceContext: VideoFeedSourceContext
moderation: ModerationDecision
/**
@@ -75,13 +70,10 @@ export function VideoPostCard({
* Filtering should be done at a higher level, such as `PostFeed` or
* `PostFeedVideoGridRow`, but we need to protect here as well.
*/
if (!AppBskyEmbedVideo.isView(embed)) return null
if (!bsky.isType(app.bsky.embed.video.view, embed)) return null
const author = post.author
const text = bsky.dangerousIsType<AppBskyFeedPost.Record>(
post.record,
AppBskyFeedPost.isRecord,
)
const text = bsky.isType(app.bsky.feed.post, post.record)
? post.record?.text
: ''
const likeCount = post?.likeCount ?? 0
@@ -275,7 +267,7 @@ export function VideoPostCardPlaceholder() {
export function VideoPostCardTextPlaceholder({
author,
}: {
author?: AppBskyActorDefs.ProfileViewBasic
author?: app.bsky.actor.defs.ProfileViewBasic
}) {
const t = useTheme()
@@ -355,7 +347,7 @@ export function CompactVideoPostCard({
moderation,
onInteract,
}: {
post: AppBskyFeedDefs.PostView
post: app.bsky.feed.defs.PostView
sourceContext: VideoFeedSourceContext
moderation: ModerationDecision
/**
@@ -386,7 +378,7 @@ export function CompactVideoPostCard({
* Filtering should be done at a higher level, such as `PostFeed` or
* `PostFeedVideoGridRow`, but we need to protect here as well.
*/
if (!AppBskyEmbedVideo.isView(embed)) return null
if (!bsky.isType(app.bsky.embed.video.view, embed)) return null
const likeCount = post?.likeCount ?? 0
const showLikeCount = false