[SDK] Remove @atproto/api (#11386)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import {memo, useEffect} from 'react'
|
||||
import {View} from 'react-native'
|
||||
import {type AppBskyActorSearchActors} from '@atproto/api'
|
||||
import {type ModerationOpts} from '@bsky.app/sdk/moderation'
|
||||
import {msg} from '@lingui/core/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
@@ -14,6 +13,7 @@ import {boostInterests, InterestTabs} from '#/components/InterestTabs'
|
||||
import * as ProfileCard from '#/components/ProfileCard'
|
||||
import {SubtleHover} from '#/components/SubtleHover'
|
||||
import {useAnalytics} from '#/analytics'
|
||||
import {type app} from '#/lexicons'
|
||||
import type * as bsky from '#/types/bsky'
|
||||
|
||||
export function useLoadEnoughProfiles({
|
||||
@@ -25,7 +25,7 @@ export function useLoadEnoughProfiles({
|
||||
fetchNextPage,
|
||||
}: {
|
||||
interest: string | null
|
||||
data?: InfiniteData<AppBskyActorSearchActors.OutputSchema>
|
||||
data?: InfiniteData<app.bsky.actor.searchActors.$OutputBody>
|
||||
isLoading: boolean
|
||||
isFetchingNextPage: boolean
|
||||
hasNextPage: boolean
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import {useMemo} from 'react'
|
||||
import {Pressable, View} from 'react-native'
|
||||
import {Image} from 'expo-image'
|
||||
import {type AppBskyUnspeccedDefs} from '@atproto/api'
|
||||
import {moderateProfile} from '@bsky.app/sdk/moderation'
|
||||
import {RichText as RichTextApi} from '@bsky.app/sdk/richtext'
|
||||
import {Plural, Trans, useLingui} from '@lingui/react/macro'
|
||||
|
||||
import {moderateProfile} from '#/lib/moderation/subjects'
|
||||
import {useModerationOpts} from '#/state/preferences/moderation-opts'
|
||||
import {
|
||||
useTrendingSettings,
|
||||
@@ -28,6 +27,7 @@ import {SubtleHover} from '#/components/SubtleHover'
|
||||
import {useTrendingTopicSeen} from '#/components/TrendingTopics'
|
||||
import {Text} from '#/components/Typography'
|
||||
import {useAnalytics} from '#/analytics'
|
||||
import {type app} from '#/lexicons'
|
||||
import * as ModuleHeader from '../components/ModuleHeader'
|
||||
|
||||
const IMAGE_SIZE = 56
|
||||
@@ -118,7 +118,7 @@ export function TrendRow({
|
||||
children,
|
||||
onPress,
|
||||
}: ViewStyleProp & {
|
||||
trend: AppBskyUnspeccedDefs.TrendView
|
||||
trend: app.bsky.unspecced.defs.TrendView
|
||||
rank: number
|
||||
recId?: string
|
||||
children?: React.ReactNode
|
||||
@@ -229,7 +229,7 @@ export function TrendRow({
|
||||
|
||||
// Unused atm, but leaving here so we don't lose localization. -dsb
|
||||
export function useCategoryDisplayName(
|
||||
category: AppBskyUnspeccedDefs.TrendView['category'],
|
||||
category: app.bsky.unspecced.defs.TrendView['category'],
|
||||
) {
|
||||
const {t: l} = useLingui()
|
||||
|
||||
@@ -297,7 +297,7 @@ export function TrendingTopicRowSkeleton() {
|
||||
}
|
||||
|
||||
function useModerateTrendingActors(
|
||||
actors: AppBskyUnspeccedDefs.TrendView['actors'],
|
||||
actors: app.bsky.unspecced.defs.TrendView['actors'],
|
||||
) {
|
||||
const moderationOpts = useModerationOpts()
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {useMemo} from 'react'
|
||||
import {ScrollView, View} from 'react-native'
|
||||
import {AppBskyEmbedVideo, AtUri} from '@atproto/api'
|
||||
import {AtUri} from '@atproto/syntax'
|
||||
import {msg} from '@lingui/core/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
import {Trans} from '@lingui/react/macro'
|
||||
@@ -21,6 +21,8 @@ import {
|
||||
CompactVideoPostCardPlaceholder,
|
||||
} from '#/components/VideoPostCard'
|
||||
import {useAnalytics} from '#/analytics'
|
||||
import {app} from '#/lexicons'
|
||||
import * as bsky from '#/types/bsky'
|
||||
|
||||
const CARD_WIDTH = 100
|
||||
|
||||
@@ -158,7 +160,7 @@ function VideoCards({
|
||||
.flatMap(page => page.slices)
|
||||
.map(slice => slice.items[0])
|
||||
.filter(Boolean)
|
||||
.filter(item => AppBskyEmbedVideo.isView(item.post.embed))
|
||||
.filter(item => bsky.isType(app.bsky.embed.video.view, item.post.embed))
|
||||
.slice(0, 8)
|
||||
}, [data])
|
||||
const href = useMemo(() => {
|
||||
|
||||
Reference in New Issue
Block a user