refactor(mobile): enable package exports (#3822)

This commit is contained in:
Stephen Zhou
2025-05-27 10:54:49 +08:00
committed by GitHub
parent ef304cdf69
commit ce7c421e0d
140 changed files with 286 additions and 287 deletions
-1
View File
@@ -17,7 +17,6 @@ config.resolver.nodeModulesPaths = [
path.resolve(__dirname, "./node_modules"),
path.resolve(__dirname, "../../node_modules"),
]
config.resolver.unstable_enablePackageExports = false
config.resolver.extraNodeModules = {
...config.resolver.extraNodeModules,
+2 -2
View File
@@ -1,5 +1,5 @@
import { usePrefetchActions } from "@follow/store/src/action/hooks"
import { usePrefetchSessionUser } from "@follow/store/src/user/hooks"
import { usePrefetchActions } from "@follow/store/action/hooks"
import { usePrefetchSessionUser } from "@follow/store/user/hooks"
import { StatusBar } from "expo-status-bar"
import { View } from "react-native"
import Animated, { interpolate, useAnimatedStyle } from "react-native-reanimated"
+1 -1
View File
@@ -1,4 +1,4 @@
import type { Models } from "@follow/models/src"
import type { Models } from "@follow/models"
import camelcaseKeys from "camelcase-keys"
import { apiFetch } from "../lib/api-fetch"
+1 -1
View File
@@ -1,4 +1,4 @@
import type { ServerConfigs } from "@follow/models/src/types"
import type { ServerConfigs } from "@follow/models/types"
import { createAtomHooks } from "@follow/utils/src/jotai"
import { atom } from "jotai"
+3 -3
View File
@@ -1,6 +1,6 @@
import { defaultGeneralSettings } from "@follow/shared/src/settings/defaults"
import type { GeneralSettings } from "@follow/shared/src/settings/interface"
import type { FetchEntriesPropsSettings } from "@follow/store/src/entry/types"
import { defaultGeneralSettings } from "@follow/shared/settings/defaults"
import type { GeneralSettings } from "@follow/shared/settings/interface"
import type { FetchEntriesPropsSettings } from "@follow/store/entry/types"
import { useMemo } from "react"
import { getDeviceLanguage } from "@/src/lib/i18n"
+2 -2
View File
@@ -1,5 +1,5 @@
import { defaultUISettings } from "@follow/shared/src/settings/defaults"
import type { UISettings } from "@follow/shared/src/settings/interface"
import { defaultUISettings } from "@follow/shared/settings/defaults"
import type { UISettings } from "@follow/shared/settings/interface"
import { getDeviceLanguage } from "@/src/lib/i18n"
@@ -1,4 +1,4 @@
import type { EntryModel, EntryWithTranslation } from "@follow/store/src/entry/types"
import type { EntryModel, EntryWithTranslation } from "@follow/store/entry/types"
import { clsx } from "@follow/utils"
import { Portal } from "@gorhom/portal"
import { useAtom } from "jotai"
@@ -1,5 +1,5 @@
import type { FeedViewType } from "@follow/constants"
import type { MediaModel } from "@follow/database/src/schemas/types"
import type { MediaModel } from "@follow/database/schemas/types"
import { useEffect, useMemo, useState } from "react"
import { ScrollView, View } from "react-native"
import Animated, {
@@ -1,5 +1,5 @@
import type { FeedViewType } from "@follow/constants"
import type { FeedSchema } from "@follow/database/src/schemas/types"
import type { FeedSchema } from "@follow/database/schemas/types"
import type { ReactNode } from "react"
import { useCallback, useMemo, useState } from "react"
@@ -1,8 +1,8 @@
import type { FeedViewType } from "@follow/constants"
import { useIsEntryStarred } from "@follow/store/src/collection/hooks"
import { collectionSyncService } from "@follow/store/src/collection/store"
import { useEntry } from "@follow/store/src/entry/hooks"
import { unreadSyncService } from "@follow/store/src/unread/store"
import { useIsEntryStarred } from "@follow/store/collection/hooks"
import { collectionSyncService } from "@follow/store/collection/store"
import { useEntry } from "@follow/store/entry/hooks"
import { unreadSyncService } from "@follow/store/unread/store"
import ImageEditor from "@react-native-community/image-editor"
import { requireNativeModule } from "expo"
import * as FileSystem from "expo-file-system"
@@ -1,7 +1,7 @@
"use dom"
import "@/src/global.css"
import { parseMarkdown } from "@follow/components/src/utils/parse-markdown"
import { parseMarkdown } from "@follow/components/utils/parse-markdown.tsx"
import { cn } from "@follow/utils"
import { useMemo } from "react"
import { useDarkMode } from "usehooks-ts"
+2 -2
View File
@@ -1,5 +1,5 @@
import { useHasNotificationActions } from "@follow/store/src/action/hooks"
import { useWhoami } from "@follow/store/src/user/hooks"
import { useHasNotificationActions } from "@follow/store/action/hooks"
import { useWhoami } from "@follow/store/user/hooks"
import { getApp } from "@react-native-firebase/app"
import type { FirebaseMessagingTypes } from "@react-native-firebase/messaging"
import { getMessaging } from "@react-native-firebase/messaging"
+2 -2
View File
@@ -1,5 +1,5 @@
import { isOnboardingFinishedStorageKey } from "@follow/store/src/user/constants"
import { useIsNewUser, useWhoami } from "@follow/store/src/user/hooks"
import { isOnboardingFinishedStorageKey } from "@follow/store/user/constants"
import { useIsNewUser, useWhoami } from "@follow/store/user/hooks"
import { useEffect } from "react"
import { kv } from "../lib/kv"
+1 -1
View File
@@ -1,4 +1,4 @@
import { useUnreadCounts } from "@follow/store/src/unread/hooks"
import { useUnreadCounts } from "@follow/store/unread/hooks"
import { useMutation } from "@tanstack/react-query"
import { useEffect } from "react"
+1 -1
View File
@@ -1,4 +1,4 @@
import { whoami } from "@follow/store/src/user/getters"
import { whoami } from "@follow/store/user/getters"
import { setFirebaseTracker, setOpenPanelTracker, tracker } from "@follow/tracker"
import { getAnalytics } from "@react-native-firebase/analytics"
import { nativeApplicationVersion, nativeBuildVersion } from "expo-application"
+1 -1
View File
@@ -1,4 +1,4 @@
import { env } from "@follow/shared/src/env.rn"
import { env } from "@follow/shared/env.rn"
import { getApp } from "@react-native-firebase/app"
import getAppCheck, {
initializeAppCheck as firebaseInitializeAppCheck,
+3 -3
View File
@@ -1,6 +1,6 @@
import { getAllUnreadCount } from "@follow/store/src/unread/getter"
import { unreadSyncService } from "@follow/store/src/unread/store"
import { whoami } from "@follow/store/src/user/getters"
import { getAllUnreadCount } from "@follow/store/unread/getter"
import { unreadSyncService } from "@follow/store/unread/store"
import { whoami } from "@follow/store/user/getters"
import * as BackgroundTask from "expo-background-task"
import * as TaskManager from "expo-task-manager"
+1 -1
View File
@@ -1,4 +1,4 @@
import { whoami } from "@follow/store/src/user/getters"
import { whoami } from "@follow/store/user/getters"
import { getCrashlytics, setAttributes, setUserId } from "@react-native-firebase/crashlytics"
export const initCrashlytics = async () => {
+2 -2
View File
@@ -1,5 +1,5 @@
import { initializeDb } from "@follow/database/src/db"
import { hydrateDatabaseToStore } from "@follow/store/src"
import { initializeDb } from "@follow/database/db"
import { hydrateDatabaseToStore } from "@follow/store"
import { tracker } from "@follow/tracker"
import { nativeApplicationVersion } from "expo-application"
+1 -1
View File
@@ -1,4 +1,4 @@
import { migrateDb } from "@follow/database/src/db"
import { migrateDb } from "@follow/database/db"
import { useSyncExternalStore } from "react"
let storeChangeFn: () => void
+1 -1
View File
@@ -1,6 +1,6 @@
/* eslint-disable no-console */
import type { AppType } from "@follow/shared"
import { userActions } from "@follow/store/src/user/store"
import { userActions } from "@follow/store/user/store"
import { FetchError, ofetch } from "ofetch"
import { InvitationScreen } from "../screens/(modal)/InvitationScreen"
+3 -3
View File
@@ -1,7 +1,7 @@
import { expoClient } from "@better-auth/expo/client"
import type { authPlugins } from "@follow/shared/src/hono"
import { isNewUserQueryKey } from "@follow/store/src/user/constants"
import { whoamiQueryKey } from "@follow/store/src/user/hooks"
import type { authPlugins } from "@follow/shared/hono"
import { isNewUserQueryKey } from "@follow/store/user/constants"
import { whoamiQueryKey } from "@follow/store/user/hooks"
import { useQuery } from "@tanstack/react-query"
import { inferAdditionalFields, twoFactorClient } from "better-auth/client/plugins"
import { createAuthClient } from "better-auth/react"
+1 -1
View File
@@ -1,4 +1,4 @@
import type { languageSchema } from "@follow/shared/src/hono"
import type { languageSchema } from "@follow/shared/hono"
import type { z } from "zod"
export type SupportedLanguages = z.infer<typeof languageSchema>
+1 -1
View File
@@ -1,4 +1,4 @@
import type { AttachmentsModel } from "@follow/database/src/schemas/types"
import type { AttachmentsModel } from "@follow/database/schemas/types"
import { atom, useAtom } from "jotai"
import { useCallback, useEffect } from "react"
import TrackPlayer, { State, useActiveTrack, usePlaybackState } from "react-native-track-player"
+2 -2
View File
@@ -1,5 +1,5 @@
import type { env, envProfileMap } from "@follow/shared/src/env.rn"
import { getEnvProfiles__dangerously } from "@follow/shared/src/env.rn"
import type { env, envProfileMap } from "@follow/shared/env.rn"
import { getEnvProfiles__dangerously } from "@follow/shared/env.rn"
import { createAtomHooks } from "@follow/utils"
import { reloadAppAsync } from "expo"
import { atomWithStorage } from "jotai/utils"
+1 -1
View File
@@ -1,4 +1,4 @@
import { parseHtml } from "@follow/components/src/ui/markdown/parse-html"
import { parseHtml } from "@follow/components/ui/markdown/parse-html.ts"
import type { SupportedActionLanguage } from "@follow/shared"
import { ACTION_LANGUAGE_MAP } from "@follow/shared"
import { duplicateIfLengthLessThan } from "@follow/utils"
+4
View File
@@ -25,6 +25,10 @@ import { SettingsTabScreen } from "./screens/(stack)/(tabs)/settings"
import { SubscriptionsTabScreen } from "./screens/(stack)/(tabs)/subscriptions"
import { registerSitemap } from "./sitemap"
// @ts-expect-error
global.APP_NAME = "Folo"
// @ts-expect-error
global.ELECTRON = false
// @ts-expect-error
globalThis.apiClient = apiClient
// @ts-expect-error
@@ -1,8 +1,8 @@
import type { FeedViewType } from "@follow/constants"
import { useIsEntryStarred } from "@follow/store/src/collection/hooks"
import { collectionSyncService } from "@follow/store/src/collection/store"
import { useEntry } from "@follow/store/src/entry/hooks"
import { unreadSyncService } from "@follow/store/src/unread/store"
import { useIsEntryStarred } from "@follow/store/collection/hooks"
import { collectionSyncService } from "@follow/store/collection/store"
import { useEntry } from "@follow/store/entry/hooks"
import { unreadSyncService } from "@follow/store/unread/store"
import { PortalProvider } from "@gorhom/portal"
import type { PropsWithChildren } from "react"
import { useCallback } from "react"
@@ -1,10 +1,10 @@
import { FeedViewType } from "@follow/constants"
import { useEntryIdsByFeedId, usePrefetchEntries } from "@follow/store/src/entry/hooks"
import { getFeed } from "@follow/store/src/feed/getter"
import { getSubscription } from "@follow/store/src/subscription/getter"
import { getSubscriptionCategory } from "@follow/store/src/subscription/hooks"
import { subscriptionSyncService } from "@follow/store/src/subscription/store"
import { unreadSyncService } from "@follow/store/src/unread/store"
import { useEntryIdsByFeedId, usePrefetchEntries } from "@follow/store/entry/hooks"
import { getFeed } from "@follow/store/feed/getter"
import { getSubscription } from "@follow/store/subscription/getter"
import { getSubscriptionCategory } from "@follow/store/subscription/hooks"
import { subscriptionSyncService } from "@follow/store/subscription/store"
import { unreadSyncService } from "@follow/store/unread/store"
import dayjs from "dayjs"
import { setStringAsync } from "expo-clipboard"
import { t } from "i18next"
@@ -1,4 +1,4 @@
import { useInbox } from "@follow/store/src/inbox/hooks"
import { useInbox } from "@follow/store/inbox/hooks"
import { setStringAsync } from "expo-clipboard"
import type { PropsWithChildren } from "react"
import { useTranslation } from "react-i18next"
@@ -1,7 +1,7 @@
import { env } from "@follow/shared/src/env.rn"
import { getList } from "@follow/store/src/list/getters"
import { subscriptionSyncService } from "@follow/store/src/subscription/store"
import { unreadSyncService } from "@follow/store/src/unread/store"
import { env } from "@follow/shared/env.rn"
import { getList } from "@follow/store/list/getters"
import { subscriptionSyncService } from "@follow/store/subscription/store"
import { unreadSyncService } from "@follow/store/unread/store"
import type { FC, PropsWithChildren } from "react"
import { useMemo } from "react"
import { useTranslation } from "react-i18next"
@@ -1,8 +1,8 @@
import { FeedViewType } from "@follow/constants"
import { useIsEntryStarred } from "@follow/store/src/collection/hooks"
import { collectionSyncService } from "@follow/store/src/collection/store"
import { useEntry } from "@follow/store/src/entry/hooks"
import { unreadSyncService } from "@follow/store/src/unread/store"
import { useIsEntryStarred } from "@follow/store/collection/hooks"
import { collectionSyncService } from "@follow/store/collection/store"
import { useEntry } from "@follow/store/entry/hooks"
import { unreadSyncService } from "@follow/store/unread/store"
import type { PropsWithChildren } from "react"
import { useTranslation } from "react-i18next"
import { Share } from "react-native"
+1 -1
View File
@@ -1,4 +1,4 @@
import type { envProfileMap } from "@follow/shared/src/env.rn"
import type { envProfileMap } from "@follow/shared/env.rn"
import { useAtom } from "jotai"
import { atomWithStorage } from "jotai/utils"
import { useMemo } from "react"
@@ -1,4 +1,4 @@
import { unreadSyncService } from "@follow/store/src/unread/store"
import { unreadSyncService } from "@follow/store/unread/store"
import { t } from "i18next"
import { useTranslation } from "react-i18next"
import { Text, View } from "react-native"
@@ -1,5 +1,5 @@
import type { RSSHubCategories } from "@follow/constants"
import type { RSSHubRouteDeclaration } from "@follow/models/src/rsshub"
import type { RSSHubRouteDeclaration } from "@follow/models/rsshub"
import type { FC } from "react"
import { memo, useMemo } from "react"
import { useTranslation } from "react-i18next"
@@ -1,5 +1,5 @@
import { RSSHubCategories } from "@follow/constants"
import type { RSSHubRouteDeclaration } from "@follow/models/src/rsshub"
import type { RSSHubRouteDeclaration } from "@follow/models/rsshub"
import { isASCII } from "@follow/utils"
import type { ContentStyle } from "@shopify/flash-list"
import { FlashList } from "@shopify/flash-list"
@@ -1,4 +1,4 @@
import { useSubscriptionByFeedId } from "@follow/store/src/subscription/hooks"
import { useSubscriptionByFeedId } from "@follow/store/subscription/hooks"
import { Text, View } from "react-native"
import { RelativeDateTime } from "@/src/components/ui/datetime/RelativeDateTime"
@@ -1,4 +1,4 @@
import { useSubscriptionByListId } from "@follow/store/src/subscription/hooks"
import { useSubscriptionByListId } from "@follow/store/subscription/hooks"
import { useQuery } from "@tanstack/react-query"
import { useAtomValue } from "jotai"
import { memo } from "react"
@@ -1,7 +1,7 @@
import { useEntry } from "@follow/store/src/entry/hooks"
import { SummaryGeneratingStatus } from "@follow/store/src/summary/enum"
import { usePrefetchSummary, useSummary } from "@follow/store/src/summary/hooks"
import { useSummaryStore } from "@follow/store/src/summary/store"
import { useEntry } from "@follow/store/entry/hooks"
import { SummaryGeneratingStatus } from "@follow/store/summary/enum"
import { usePrefetchSummary, useSummary } from "@follow/store/summary/hooks"
import { useSummaryStore } from "@follow/store/summary/store"
import { useAtomValue } from "jotai"
import type { FC } from "react"
@@ -1,11 +1,11 @@
import { useIsEntryStarred } from "@follow/store/src/collection/hooks"
import { collectionSyncService } from "@follow/store/src/collection/store"
import { useEntry } from "@follow/store/src/entry/hooks"
import { entrySyncServices } from "@follow/store/src/entry/store"
import { useFeed } from "@follow/store/src/feed/hooks"
import { useSubscription } from "@follow/store/src/subscription/hooks"
import { summaryActions, summarySyncService } from "@follow/store/src/summary/store"
import { translationSyncService } from "@follow/store/src/translation/store"
import { useIsEntryStarred } from "@follow/store/collection/hooks"
import { collectionSyncService } from "@follow/store/collection/store"
import { useEntry } from "@follow/store/entry/hooks"
import { entrySyncServices } from "@follow/store/entry/store"
import { useFeed } from "@follow/store/feed/hooks"
import { useSubscription } from "@follow/store/subscription/hooks"
import { summaryActions, summarySyncService } from "@follow/store/summary/store"
import { translationSyncService } from "@follow/store/translation/store"
import { setStringAsync } from "expo-clipboard"
import { useAtom } from "jotai"
import { useCallback, useEffect, useState } from "react"
@@ -1,7 +1,7 @@
import { FeedViewType } from "@follow/constants"
import { useEntry } from "@follow/store/src/entry/hooks"
import { useFeed } from "@follow/store/src/feed/hooks"
import { useEntryTranslation } from "@follow/store/src/translation/hooks"
import { useEntry } from "@follow/store/entry/hooks"
import { useFeed } from "@follow/store/feed/hooks"
import { useEntryTranslation } from "@follow/store/translation/hooks"
import { cn } from "@follow/utils"
import { Text, View } from "react-native"
@@ -1,5 +1,5 @@
import { useTypeScriptHappyCallback } from "@follow/hooks"
import { useEntry } from "@follow/store/src/entry/hooks"
import { useEntry } from "@follow/store/entry/hooks"
import { useAtomValue } from "jotai"
import type { FC } from "react"
import { use, useState } from "react"
@@ -1,6 +1,6 @@
import { useEntry } from "@follow/store/src/entry/hooks"
import { isInboxEntry } from "@follow/store/src/entry/utils"
import { userActions } from "@follow/store/src/user/store"
import { useEntry } from "@follow/store/entry/hooks"
import { isInboxEntry } from "@follow/store/entry/utils"
import { userActions } from "@follow/store/user/store"
import { useQuery } from "@tanstack/react-query"
import { Pressable, View } from "react-native"
@@ -1,6 +1,6 @@
import { useEntry } from "@follow/store/src/entry/hooks"
import { useFeed } from "@follow/store/src/feed/hooks"
import { useEntryTranslation } from "@follow/store/src/translation/hooks"
import { useEntry } from "@follow/store/entry/hooks"
import { useFeed } from "@follow/store/feed/hooks"
import { useEntryTranslation } from "@follow/store/translation/hooks"
import { useSetAtom } from "jotai"
import { use } from "react"
import { Text, View } from "react-native"
@@ -1,5 +1,5 @@
import type { FeedViewType } from "@follow/constants"
import { usePrefetchEntryTranslation } from "@follow/store/src/translation/hooks"
import { usePrefetchEntryTranslation } from "@follow/store/translation/hooks"
import type { ListRenderItemInfo } from "@shopify/flash-list"
import type { ElementRef } from "react"
import { useCallback, useImperativeHandle, useMemo } from "react"
@@ -1,5 +1,5 @@
import { useTypeScriptHappyCallback } from "@follow/hooks"
import { usePrefetchEntryTranslation } from "@follow/store/src/translation/hooks"
import { usePrefetchEntryTranslation } from "@follow/store/translation/hooks"
import type { MasonryFlashListProps } from "@shopify/flash-list"
import type { ElementRef } from "react"
import { useImperativeHandle } from "react"
@@ -1,4 +1,4 @@
import { usePrefetchEntryTranslation } from "@follow/store/src/translation/hooks"
import { usePrefetchEntryTranslation } from "@follow/store/translation/hooks"
import type { ListRenderItemInfo } from "@shopify/flash-list"
import type { ElementRef } from "react"
import { useCallback, useImperativeHandle, useMemo } from "react"
@@ -1,5 +1,5 @@
import { useTypeScriptHappyCallback } from "@follow/hooks"
import { usePrefetchEntryTranslation } from "@follow/store/src/translation/hooks"
import { usePrefetchEntryTranslation } from "@follow/store/translation/hooks"
import type { MasonryFlashListProps } from "@shopify/flash-list"
import type { ElementRef } from "react"
import { useImperativeHandle, useMemo } from "react"
@@ -1,4 +1,4 @@
import { unreadSyncService } from "@follow/store/src/unread/store"
import { unreadSyncService } from "@follow/store/unread/store"
import { useTranslation } from "react-i18next"
import { Text, TouchableOpacity } from "react-native"
@@ -1,5 +1,5 @@
import { FeedViewType } from "@follow/constants"
import { useWhoami } from "@follow/store/src/user/hooks"
import { useWhoami } from "@follow/store/user/hooks"
import type { FlashList } from "@shopify/flash-list"
import { useEffect } from "react"
+2 -2
View File
@@ -1,5 +1,5 @@
import { debouncedFetchEntryContentByStream } from "@follow/store/src/entry/store"
import { unreadSyncService } from "@follow/store/src/unread/store"
import { debouncedFetchEntryContentByStream } from "@follow/store/entry/store"
import { unreadSyncService } from "@follow/store/unread/store"
import type { FlashList } from "@shopify/flash-list"
import type ViewToken from "@shopify/flash-list/dist/viewability/ViewToken"
import { fetch as expoFetch } from "expo/fetch"
+1 -1
View File
@@ -5,7 +5,7 @@ import {
useEntryIdsByInboxId,
useEntryIdsByListId,
useEntryIdsByView,
} from "@follow/store/src/entry/hooks"
} from "@follow/store/entry/hooks"
import { memo, useMemo } from "react"
import { useSelectedFeed, useSelectedView } from "@/src/modules/screen/atoms"
@@ -1,9 +1,9 @@
import { FeedViewType } from "@follow/constants"
import { useEntry } from "@follow/store/src/entry/hooks"
import type { EntryModel } from "@follow/store/src/entry/types"
import { getInboxFrom } from "@follow/store/src/entry/utils"
import { useFeed } from "@follow/store/src/feed/hooks"
import { useEntryTranslation } from "@follow/store/src/translation/hooks"
import { useEntry } from "@follow/store/entry/hooks"
import type { EntryModel } from "@follow/store/entry/types"
import { getInboxFrom } from "@follow/store/entry/utils"
import { useFeed } from "@follow/store/feed/hooks"
import { useEntryTranslation } from "@follow/store/translation/hooks"
import { tracker } from "@follow/tracker"
import { cn, formatEstimatedMins, formatTimeToSeconds } from "@follow/utils"
import { useVideoPlayer, VideoView } from "expo-video"
@@ -1,8 +1,8 @@
import { FeedViewType } from "@follow/constants"
import type { MediaModel } from "@follow/database/src/schemas/types"
import { useEntry } from "@follow/store/src/entry/hooks"
import { getFeed } from "@follow/store/src/feed/getter"
import { unreadSyncService } from "@follow/store/src/unread/store"
import type { MediaModel } from "@follow/database/schemas/types"
import { useEntry } from "@follow/store/entry/hooks"
import { getFeed } from "@follow/store/feed/getter"
import { unreadSyncService } from "@follow/store/unread/store"
import { tracker } from "@follow/tracker"
import { uniqBy } from "es-toolkit/compat"
import { useMemo } from "react"
@@ -1,8 +1,8 @@
import { FeedViewType } from "@follow/constants"
import { useEntry } from "@follow/store/src/entry/hooks"
import { useFeed } from "@follow/store/src/feed/hooks"
import { useEntryTranslation } from "@follow/store/src/translation/hooks"
import { unreadSyncService } from "@follow/store/src/unread/store"
import { useEntry } from "@follow/store/entry/hooks"
import { useFeed } from "@follow/store/feed/hooks"
import { useEntryTranslation } from "@follow/store/translation/hooks"
import { unreadSyncService } from "@follow/store/unread/store"
import { tracker } from "@follow/tracker"
import { memo, useCallback, useMemo } from "react"
import { Pressable, Text, View } from "react-native"
@@ -1,6 +1,6 @@
import { FeedViewType } from "@follow/constants"
import { useEntry } from "@follow/store/src/entry/hooks"
import { unreadSyncService } from "@follow/store/src/unread/store"
import { useEntry } from "@follow/store/entry/hooks"
import { unreadSyncService } from "@follow/store/unread/store"
import { tracker } from "@follow/tracker"
import { formatDuration, transformVideoUrl } from "@follow/utils"
import { memo, useMemo } from "react"
+4 -4
View File
@@ -1,8 +1,8 @@
import { FeedViewType } from "@follow/constants"
import { useFeed, usePrefetchFeed, usePrefetchFeedByUrl } from "@follow/store/src/feed/hooks"
import { useSubscriptionByFeedId } from "@follow/store/src/subscription/hooks"
import { subscriptionSyncService } from "@follow/store/src/subscription/store"
import type { SubscriptionForm } from "@follow/store/src/subscription/types"
import { useFeed, usePrefetchFeed, usePrefetchFeedByUrl } from "@follow/store/feed/hooks"
import { useSubscriptionByFeedId } from "@follow/store/subscription/hooks"
import { subscriptionSyncService } from "@follow/store/subscription/store"
import type { SubscriptionForm } from "@follow/store/subscription/types"
import { zodResolver } from "@hookform/resolvers/zod"
import { useEffect, useState } from "react"
import { Controller, useForm } from "react-hook-form"
+4 -4
View File
@@ -1,8 +1,8 @@
import { FeedViewType } from "@follow/constants"
import { useList } from "@follow/store/src/list/hooks"
import { listSyncServices } from "@follow/store/src/list/store"
import { useSubscriptionByListId } from "@follow/store/src/subscription/hooks"
import { subscriptionSyncService } from "@follow/store/src/subscription/store"
import { useList } from "@follow/store/list/hooks"
import { listSyncServices } from "@follow/store/list/store"
import { useSubscriptionByListId } from "@follow/store/subscription/hooks"
import { subscriptionSyncService } from "@follow/store/subscription/store"
import { zodResolver } from "@hookform/resolvers/zod"
import { useQuery } from "@tanstack/react-query"
import { useEffect } from "react"
@@ -1,4 +1,4 @@
import { usePrefetchImageColors } from "@follow/store/src/image/hooks"
import { usePrefetchImageColors } from "@follow/store/image/hooks"
import { cn } from "@follow/utils"
import { useAtomValue } from "jotai"
import { use, useEffect } from "react"
+1 -1
View File
@@ -1,4 +1,4 @@
import { useImageColors } from "@follow/store/src/image/hooks"
import { useImageColors } from "@follow/store/image/hooks"
import { getLuminance, shadeColor } from "@follow/utils"
import { useMemo } from "react"
@@ -1,6 +1,6 @@
import type { FeedViewType } from "@follow/constants"
import { useTypeScriptHappyCallback } from "@follow/hooks"
import { useViewWithSubscription } from "@follow/store/src/subscription/hooks"
import { useViewWithSubscription } from "@follow/store/subscription/hooks"
import { EventBus } from "@follow/utils/src/event-bus"
import * as Haptics from "expo-haptics"
import { useEffect, useId, useMemo, useRef, useState } from "react"
+1 -1
View File
@@ -1,5 +1,5 @@
import type { FeedViewType } from "@follow/constants"
import { useViewWithSubscription } from "@follow/store/src/subscription/hooks"
import { useViewWithSubscription } from "@follow/store/subscription/hooks"
import { EventBus } from "@follow/utils/src/event-bus"
import * as Haptics from "expo-haptics"
import { useCallback, useEffect, useId, useMemo, useRef, useState } from "react"
@@ -1,6 +1,6 @@
import { useTypeScriptHappyCallback } from "@follow/hooks"
import { usePrefetchSubscription } from "@follow/store/src/subscription/hooks"
import { usePrefetchUnread } from "@follow/store/src/unread/hooks"
import { usePrefetchSubscription } from "@follow/store/subscription/hooks"
import { usePrefetchUnread } from "@follow/store/unread/hooks"
import { nextFrame } from "@follow/utils"
import type {
FlashListProps,
@@ -1,5 +1,5 @@
import { useViewWithSubscription } from "@follow/store/src/subscription/hooks"
import { useUnreadCountByView } from "@follow/store/src/unread/hooks"
import { useViewWithSubscription } from "@follow/store/subscription/hooks"
import { useUnreadCountByView } from "@follow/store/unread/hooks"
import * as React from "react"
import { useEffect } from "react"
import { useTranslation } from "react-i18next"
@@ -1,5 +1,5 @@
import type { FeedViewType } from "@follow/constants"
import { unreadSyncService } from "@follow/store/src/unread/store"
import { unreadSyncService } from "@follow/store/unread/store"
import type { FC, PropsWithChildren } from "react"
import { useTranslation } from "react-i18next"
+2 -2
View File
@@ -1,5 +1,5 @@
import { getFeed } from "@follow/store/src/feed/getter"
import { useWhoami } from "@follow/store/src/user/hooks"
import { getFeed } from "@follow/store/feed/getter"
import { useWhoami } from "@follow/store/user/hooks"
import { cn } from "@follow/utils"
import * as Haptics from "expo-haptics"
import type { PropsWithChildren } from "react"
+7 -7
View File
@@ -1,11 +1,11 @@
import { FeedViewType } from "@follow/constants"
import { usePrefetchEntries } from "@follow/store/src/entry/hooks"
import type { FetchEntriesProps } from "@follow/store/src/entry/types"
import { FEED_COLLECTION_LIST } from "@follow/store/src/entry/utils"
import { useFeed } from "@follow/store/src/feed/hooks"
import { useInbox } from "@follow/store/src/inbox/hooks"
import { useList } from "@follow/store/src/list/hooks"
import { getSubscriptionByCategory } from "@follow/store/src/subscription/getter"
import { usePrefetchEntries } from "@follow/store/entry/hooks"
import type { FetchEntriesProps } from "@follow/store/entry/types"
import { FEED_COLLECTION_LIST } from "@follow/store/entry/utils"
import { useFeed } from "@follow/store/feed/hooks"
import { useInbox } from "@follow/store/inbox/hooks"
import { useList } from "@follow/store/list/hooks"
import { getSubscriptionByCategory } from "@follow/store/subscription/getter"
import { jotaiStore } from "@follow/utils"
import { EventBus } from "@follow/utils/src/event-bus"
import { atom, useAtomValue } from "jotai"
@@ -1,6 +1,6 @@
import { UserRole } from "@follow/constants"
import type { ServerConfigs } from "@follow/models/src/types"
import { useRole, useWhoami } from "@follow/store/src/user/hooks"
import type { ServerConfigs } from "@follow/models/types"
import { useRole, useWhoami } from "@follow/store/user/hooks"
import * as FileSystem from "expo-file-system"
import type { ParseKeys } from "i18next"
import type { FC } from "react"
@@ -1,5 +1,5 @@
import { useImageColors, usePrefetchImageColors } from "@follow/store/src/image/hooks"
import { useUser } from "@follow/store/src/user/hooks"
import { useImageColors, usePrefetchImageColors } from "@follow/store/image/hooks"
import { useUser } from "@follow/store/user/hooks"
import { cn, getLuminance } from "@follow/utils"
import { LinearGradient } from "expo-linear-gradient"
import { useMemo } from "react"
@@ -1,5 +1,5 @@
import type { ActionId } from "@follow/models/src/types"
import { actionActions } from "@follow/store/src/action/store"
import type { ActionId } from "@follow/models/types"
import { actionActions } from "@follow/store/action/store"
import type { ParseKeys } from "i18next"
import type { SFSymbol } from "sf-symbols-typescript"
@@ -1,4 +1,4 @@
import { useWhoami } from "@follow/store/src/user/hooks"
import { useWhoami } from "@follow/store/user/hooks"
import { useCallback } from "react"
import Siblings from "react-native-root-siblings"
@@ -1,4 +1,4 @@
import { whoamiQueryKey } from "@follow/store/src/user/hooks"
import { whoamiQueryKey } from "@follow/store/user/hooks"
import { useMutation } from "@tanstack/react-query"
import { useRef } from "react"
import { KeyboardAvoidingView, Text, View } from "react-native"
@@ -1,5 +1,5 @@
import { useWhoami } from "@follow/store/src/user/hooks"
import { userSyncService } from "@follow/store/src/user/store"
import { useWhoami } from "@follow/store/user/hooks"
import { userSyncService } from "@follow/store/user/store"
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"
import * as FileSystem from "expo-file-system"
import type { FC } from "react"
@@ -1,11 +1,11 @@
import type { ActionModel } from "@follow/models/src/types"
import type { ActionModel } from "@follow/models/types"
import {
useActionRules,
useIsActionDataDirty,
usePrefetchActions,
useUpdateActionsMutation,
} from "@follow/store/src/action/hooks"
import { actionActions } from "@follow/store/src/action/store"
} from "@follow/store/action/hooks"
import { actionActions } from "@follow/store/action/store"
import { useCallback } from "react"
import { useTranslation } from "react-i18next"
import type { ListRenderItem } from "react-native"
@@ -1,4 +1,4 @@
import { getAllUnreadCount } from "@follow/store/src/unread/getter"
import { getAllUnreadCount } from "@follow/store/unread/getter"
import { themeNames } from "@shikijs/themes"
import { useTranslation } from "react-i18next"
import { useColorScheme, View } from "react-native"
@@ -1,6 +1,6 @@
import type { ActionConditionIndex } from "@follow/models/src/types"
import { useActionRuleCondition } from "@follow/store/src/action/hooks"
import { actionActions } from "@follow/store/src/action/store"
import type { ActionConditionIndex } from "@follow/models/types"
import { useActionRuleCondition } from "@follow/store/action/hooks"
import { actionActions } from "@follow/store/action/store"
import { useMemo } from "react"
import { useTranslation } from "react-i18next"
import { Text, View } from "react-native"
@@ -1,7 +1,7 @@
import { useWhoami } from "@follow/store/src/user/hooks"
import type { MeModel } from "@follow/store/src/user/store"
import { userSyncService } from "@follow/store/src/user/store"
import type { UserProfileEditable } from "@follow/store/src/user/types"
import { useWhoami } from "@follow/store/user/hooks"
import type { MeModel } from "@follow/store/user/store"
import { userSyncService } from "@follow/store/user/store"
import type { UserProfileEditable } from "@follow/store/user/types"
import { useMutation } from "@tanstack/react-query"
import type { FC } from "react"
import { useState } from "react"
@@ -1,5 +1,5 @@
import { useActionRule } from "@follow/store/src/action/hooks"
import { actionActions } from "@follow/store/src/action/store"
import { useActionRule } from "@follow/store/action/hooks"
import { actionActions } from "@follow/store/action/store"
import { useTranslation } from "react-i18next"
import { Text } from "react-native"
@@ -1,6 +1,6 @@
import type { ActionFilter, ActionModel } from "@follow/models/src/types"
import { useActionRule } from "@follow/store/src/action/hooks"
import { actionActions } from "@follow/store/src/action/store"
import type { ActionFilter, ActionModel } from "@follow/models/types"
import { useActionRule } from "@follow/store/action/hooks"
import { actionActions } from "@follow/store/action/store"
import { useTranslation } from "react-i18next"
import { Text, View } from "react-native"
import * as DropdownMenu from "zeego/dropdown-menu"
@@ -1,5 +1,5 @@
import { useActionRule } from "@follow/store/src/action/hooks"
import { actionActions } from "@follow/store/src/action/store"
import { useActionRule } from "@follow/store/action/hooks"
import { actionActions } from "@follow/store/action/store"
import { useTranslation } from "react-i18next"
import { Text } from "react-native"
@@ -1,6 +1,6 @@
import { useOwnedLists, usePrefetchOwnedLists } from "@follow/store/src/list/hooks"
import type { ListModel } from "@follow/store/src/list/store"
import type { HonoApiClient } from "@follow/store/src/morph/types"
import { useOwnedLists, usePrefetchOwnedLists } from "@follow/store/list/hooks"
import type { ListModel } from "@follow/store/list/store"
import type { HonoApiClient } from "@follow/store/morph/types"
import { createContext, createElement, use, useCallback, useMemo } from "react"
import { useTranslation } from "react-i18next"
import type { ListRenderItem } from "react-native"
@@ -1,11 +1,11 @@
import { useFeed } from "@follow/store/src/feed/hooks"
import { useList, usePrefetchOwnedLists } from "@follow/store/src/list/hooks"
import { listSyncServices } from "@follow/store/src/list/store"
import { useFeed } from "@follow/store/feed/hooks"
import { useList, usePrefetchOwnedLists } from "@follow/store/list/hooks"
import { listSyncServices } from "@follow/store/list/store"
import {
useFeedSubscriptionByView,
usePrefetchSubscription,
useSortedFeedSubscriptionByAlphabet,
} from "@follow/store/src/subscription/hooks"
} from "@follow/store/subscription/hooks"
import { useMutation } from "@tanstack/react-query"
import type { MutableRefObject } from "react"
import { createContext, use, useEffect, useMemo, useRef, useState } from "react"
@@ -1,4 +1,4 @@
import type { GeneralSettings, UISettings } from "@follow/shared/src/settings/interface"
import type { GeneralSettings, UISettings } from "@follow/shared/settings/interface"
import { isEmptyObject, jotaiStore, sleep } from "@follow/utils"
import { EventBus } from "@follow/utils/src/event-bus"
import { omit } from "es-toolkit/compat"
+1 -1
View File
@@ -1,4 +1,4 @@
import { userSyncService } from "@follow/store/src/user/store"
import { userSyncService } from "@follow/store/user/store"
import * as DocumentPicker from "expo-document-picker"
import * as FileSystem from "expo-file-system"
import * as Sharing from "expo-sharing"
@@ -1,4 +1,4 @@
import { useUnreadCounts } from "@follow/store/src/unread/hooks"
import { useUnreadCounts } from "@follow/store/unread/hooks"
import { cn } from "@follow/utils"
import { memo, useState } from "react"
import { Text, View } from "react-native"
@@ -1,5 +1,5 @@
import type { FeedViewType } from "@follow/constants"
import { FEED_COLLECTION_LIST } from "@follow/store/src/entry/utils"
import { FEED_COLLECTION_LIST } from "@follow/store/entry/utils"
import {
useGroupedSubscription,
useInboxSubscription,
@@ -7,8 +7,8 @@ import {
useSortedGroupedSubscription,
useSortedListSubscription,
useSortedUngroupedSubscription,
} from "@follow/store/src/subscription/hooks"
import { subscriptionSyncService } from "@follow/store/src/subscription/store"
} from "@follow/store/subscription/hooks"
import { subscriptionSyncService } from "@follow/store/subscription/store"
import type { FlashList } from "@shopify/flash-list"
import type { ParseKeys } from "i18next"
import { memo, useMemo, useState } from "react"
@@ -1,4 +1,4 @@
import { useSortedUngroupedSubscription } from "@follow/store/src/subscription/hooks"
import { useSortedUngroupedSubscription } from "@follow/store/subscription/hooks"
import type { FC } from "react"
import { useHideAllReadSubscriptions } from "@/src/atoms/settings/general"
@@ -1,6 +1,6 @@
import { useSubscription } from "@follow/store/src/subscription/hooks"
import { getInboxStoreId } from "@follow/store/src/subscription/utils"
import { useUnreadCount } from "@follow/store/src/unread/hooks"
import { useSubscription } from "@follow/store/subscription/hooks"
import { getInboxStoreId } from "@follow/store/subscription/utils"
import { useUnreadCount } from "@follow/store/unread/hooks"
import { cn } from "@follow/utils"
import { useColorScheme } from "nativewind"
import { memo } from "react"
@@ -1,6 +1,6 @@
import { useList } from "@follow/store/src/list/hooks"
import { useSubscription } from "@follow/store/src/subscription/hooks"
import { useListUnreadCount } from "@follow/store/src/unread/hooks"
import { useList } from "@follow/store/list/hooks"
import { useSubscription } from "@follow/store/subscription/hooks"
import { useListUnreadCount } from "@follow/store/unread/hooks"
import { cn } from "@follow/utils"
import { memo } from "react"
import { Text, View } from "react-native"
@@ -1,6 +1,6 @@
import { useFeed, usePrefetchFeed } from "@follow/store/src/feed/hooks"
import { useSubscription } from "@follow/store/src/subscription/hooks"
import { useUnreadCount } from "@follow/store/src/unread/hooks"
import { useFeed, usePrefetchFeed } from "@follow/store/feed/hooks"
import { useSubscription } from "@follow/store/subscription/hooks"
import { useUnreadCount } from "@follow/store/unread/hooks"
import { cn } from "@follow/utils"
import { memo, use } from "react"
import { Text, View } from "react-native"
+1 -1
View File
@@ -1,5 +1,5 @@
import { ActionSheetProvider } from "@expo/react-native-action-sheet"
import { sqlite } from "@follow/database/src/db"
import { sqlite } from "@follow/database/db"
import { jotaiStore } from "@follow/utils"
import { PortalProvider } from "@gorhom/portal"
import { QueryClientProvider } from "@tanstack/react-query"
+1 -1
View File
@@ -1,4 +1,4 @@
import type { envProfileMap } from "@follow/shared/src/env.rn"
import type { envProfileMap } from "@follow/shared/env.rn"
import { sleep } from "@follow/utils"
import { requireNativeModule } from "expo"
import * as Clipboard from "expo-clipboard"
@@ -1,4 +1,4 @@
import { legalMarkdown } from "@follow/legal/dist/index"
import { legalMarkdown } from "@follow/legal"
import {
NavigationBlurEffectHeaderView,
+1 -1
View File
@@ -1,4 +1,4 @@
import { legalMarkdown } from "@follow/legal/dist/index"
import { legalMarkdown } from "@follow/legal"
import {
NavigationBlurEffectHeaderView,
@@ -1,5 +1,5 @@
import { useWhoami } from "@follow/store/src/user/hooks"
import { userSyncService } from "@follow/store/src/user/store"
import { useWhoami } from "@follow/store/user/hooks"
import { userSyncService } from "@follow/store/user/store"
import { useMutation } from "@tanstack/react-query"
import { useMemo, useState } from "react"
import { useTranslation } from "react-i18next"
@@ -1,4 +1,4 @@
import { userSyncService } from "@follow/store/src/user/store"
import { userSyncService } from "@follow/store/user/store"
import { useMutation } from "@tanstack/react-query"
import { useState } from "react"
import { View } from "react-native"
@@ -1,10 +1,10 @@
import { useActionSheet } from "@expo/react-native-action-sheet"
import { FeedViewType } from "@follow/constants"
import { getList } from "@follow/store/src/list/getters"
import { useList } from "@follow/store/src/list/hooks"
import type { ListModel } from "@follow/store/src/list/store"
import { listSyncServices } from "@follow/store/src/list/store"
import type { CreateListModel } from "@follow/store/src/list/types"
import { getList } from "@follow/store/list/getters"
import { useList } from "@follow/store/list/hooks"
import type { ListModel } from "@follow/store/list/store"
import { listSyncServices } from "@follow/store/list/store"
import type { CreateListModel } from "@follow/store/list/types"
import { zodResolver } from "@hookform/resolvers/zod"
import { memo, useEffect, useState } from "react"
import { Controller, useForm } from "react-hook-form"
@@ -1,4 +1,4 @@
import { useWhoami } from "@follow/store/src/user/hooks"
import { useWhoami } from "@follow/store/user/hooks"
import { Fragment, useEffect } from "react"
import { ScrollView, Text, TouchableOpacity } from "react-native"
@@ -1,10 +1,10 @@
import type { FeedViewType } from "@follow/constants"
import type { FeedModel } from "@follow/store/src/feed/types"
import type { ListModel } from "@follow/store/src/list/store"
import { getSubscription } from "@follow/store/src/subscription/getter"
import { subscriptionSyncService } from "@follow/store/src/subscription/store"
import { useUser, useWhoami } from "@follow/store/src/user/hooks"
import { userSyncService } from "@follow/store/src/user/store"
import type { FeedModel } from "@follow/store/feed/types"
import type { ListModel } from "@follow/store/list/store"
import { getSubscription } from "@follow/store/subscription/getter"
import { subscriptionSyncService } from "@follow/store/subscription/store"
import { useUser, useWhoami } from "@follow/store/user/hooks"
import { userSyncService } from "@follow/store/user/store"
import { useQuery } from "@tanstack/react-query"
import { createContext, Fragment, use, useCallback, useEffect, useMemo } from "react"
import { useTranslation } from "react-i18next"
@@ -1,5 +1,5 @@
import type { RSSHubParameter, RSSHubParameterObject, RSSHubRoute } from "@follow/models/src/rsshub"
import { feedSyncServices } from "@follow/store/src/feed/store"
import type { RSSHubParameter, RSSHubParameterObject, RSSHubRoute } from "@follow/models/rsshub"
import { feedSyncServices } from "@follow/store/feed/store"
import {
MissingOptionalParamError,
parseFullPathParams,

Some files were not shown because too many files have changed in this diff Show More