diff --git a/apps/mobile/metro.config.js b/apps/mobile/metro.config.js index ae283bef6..b4934a582 100644 --- a/apps/mobile/metro.config.js +++ b/apps/mobile/metro.config.js @@ -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, diff --git a/apps/mobile/src/App.tsx b/apps/mobile/src/App.tsx index bea64f237..79d792399 100644 --- a/apps/mobile/src/App.tsx +++ b/apps/mobile/src/App.tsx @@ -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" diff --git a/apps/mobile/src/api/trending.ts b/apps/mobile/src/api/trending.ts index 59db4e0ad..89f76687b 100644 --- a/apps/mobile/src/api/trending.ts +++ b/apps/mobile/src/api/trending.ts @@ -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" diff --git a/apps/mobile/src/atoms/server-configs.ts b/apps/mobile/src/atoms/server-configs.ts index bd4b358e2..fb36d1a1f 100644 --- a/apps/mobile/src/atoms/server-configs.ts +++ b/apps/mobile/src/atoms/server-configs.ts @@ -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" diff --git a/apps/mobile/src/atoms/settings/general.ts b/apps/mobile/src/atoms/settings/general.ts index 9138f420f..f4a6be281 100644 --- a/apps/mobile/src/atoms/settings/general.ts +++ b/apps/mobile/src/atoms/settings/general.ts @@ -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" diff --git a/apps/mobile/src/atoms/settings/ui.ts b/apps/mobile/src/atoms/settings/ui.ts index d7b248eba..dbbb4d522 100644 --- a/apps/mobile/src/atoms/settings/ui.ts +++ b/apps/mobile/src/atoms/settings/ui.ts @@ -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" diff --git a/apps/mobile/src/components/native/webview/EntryContentWebView.tsx b/apps/mobile/src/components/native/webview/EntryContentWebView.tsx index ad33031a0..9cd5e4bf3 100644 --- a/apps/mobile/src/components/native/webview/EntryContentWebView.tsx +++ b/apps/mobile/src/components/native/webview/EntryContentWebView.tsx @@ -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" diff --git a/apps/mobile/src/components/ui/carousel/MediaCarousel.tsx b/apps/mobile/src/components/ui/carousel/MediaCarousel.tsx index 8017cc37b..edf38aad8 100644 --- a/apps/mobile/src/components/ui/carousel/MediaCarousel.tsx +++ b/apps/mobile/src/components/ui/carousel/MediaCarousel.tsx @@ -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, { diff --git a/apps/mobile/src/components/ui/icon/feed-icon.tsx b/apps/mobile/src/components/ui/icon/feed-icon.tsx index 493ed80eb..336bf5142 100644 --- a/apps/mobile/src/components/ui/icon/feed-icon.tsx +++ b/apps/mobile/src/components/ui/icon/feed-icon.tsx @@ -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" diff --git a/apps/mobile/src/components/ui/image/ImageContextMenu.tsx b/apps/mobile/src/components/ui/image/ImageContextMenu.tsx index 217cdbd51..2813170d6 100644 --- a/apps/mobile/src/components/ui/image/ImageContextMenu.tsx +++ b/apps/mobile/src/components/ui/image/ImageContextMenu.tsx @@ -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" diff --git a/apps/mobile/src/components/ui/typography/MarkdownWeb.tsx b/apps/mobile/src/components/ui/typography/MarkdownWeb.tsx index 03733fa8a..c47dc0827 100644 --- a/apps/mobile/src/components/ui/typography/MarkdownWeb.tsx +++ b/apps/mobile/src/components/ui/typography/MarkdownWeb.tsx @@ -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" diff --git a/apps/mobile/src/hooks/useMessaging.ts b/apps/mobile/src/hooks/useMessaging.ts index 548250db1..3ea04e48b 100644 --- a/apps/mobile/src/hooks/useMessaging.ts +++ b/apps/mobile/src/hooks/useMessaging.ts @@ -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" diff --git a/apps/mobile/src/hooks/useOnboarding.ts b/apps/mobile/src/hooks/useOnboarding.ts index 0281120a1..764828686 100644 --- a/apps/mobile/src/hooks/useOnboarding.ts +++ b/apps/mobile/src/hooks/useOnboarding.ts @@ -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" diff --git a/apps/mobile/src/hooks/useUnreadCountBadge.ts b/apps/mobile/src/hooks/useUnreadCountBadge.ts index 37bb54c11..a45daf4b3 100644 --- a/apps/mobile/src/hooks/useUnreadCountBadge.ts +++ b/apps/mobile/src/hooks/useUnreadCountBadge.ts @@ -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" diff --git a/apps/mobile/src/initialize/analytics.ts b/apps/mobile/src/initialize/analytics.ts index 5cd6ba50a..e0ce1af5f 100644 --- a/apps/mobile/src/initialize/analytics.ts +++ b/apps/mobile/src/initialize/analytics.ts @@ -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" diff --git a/apps/mobile/src/initialize/app-check.ts b/apps/mobile/src/initialize/app-check.ts index 1f6d68ec1..69e3ae9e6 100644 --- a/apps/mobile/src/initialize/app-check.ts +++ b/apps/mobile/src/initialize/app-check.ts @@ -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, diff --git a/apps/mobile/src/initialize/background.ts b/apps/mobile/src/initialize/background.ts index 5d5f38c53..cffcf7797 100644 --- a/apps/mobile/src/initialize/background.ts +++ b/apps/mobile/src/initialize/background.ts @@ -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" diff --git a/apps/mobile/src/initialize/crashlytics.tsx b/apps/mobile/src/initialize/crashlytics.tsx index 3ab5baed5..8d41b20c2 100644 --- a/apps/mobile/src/initialize/crashlytics.tsx +++ b/apps/mobile/src/initialize/crashlytics.tsx @@ -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 () => { diff --git a/apps/mobile/src/initialize/index.ts b/apps/mobile/src/initialize/index.ts index f4f582c89..7b039e49d 100644 --- a/apps/mobile/src/initialize/index.ts +++ b/apps/mobile/src/initialize/index.ts @@ -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" diff --git a/apps/mobile/src/initialize/migration.ts b/apps/mobile/src/initialize/migration.ts index ef2503414..66176bdb2 100644 --- a/apps/mobile/src/initialize/migration.ts +++ b/apps/mobile/src/initialize/migration.ts @@ -1,4 +1,4 @@ -import { migrateDb } from "@follow/database/src/db" +import { migrateDb } from "@follow/database/db" import { useSyncExternalStore } from "react" let storeChangeFn: () => void diff --git a/apps/mobile/src/lib/api-fetch.ts b/apps/mobile/src/lib/api-fetch.ts index f8faad8ae..82dda6e84 100644 --- a/apps/mobile/src/lib/api-fetch.ts +++ b/apps/mobile/src/lib/api-fetch.ts @@ -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" diff --git a/apps/mobile/src/lib/auth.ts b/apps/mobile/src/lib/auth.ts index 77089df3f..b8f2584ff 100644 --- a/apps/mobile/src/lib/auth.ts +++ b/apps/mobile/src/lib/auth.ts @@ -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" diff --git a/apps/mobile/src/lib/language.ts b/apps/mobile/src/lib/language.ts index d1278617f..48cf42f69 100644 --- a/apps/mobile/src/lib/language.ts +++ b/apps/mobile/src/lib/language.ts @@ -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 diff --git a/apps/mobile/src/lib/player.ts b/apps/mobile/src/lib/player.ts index 14fa50b9b..4d53f4b2f 100644 --- a/apps/mobile/src/lib/player.ts +++ b/apps/mobile/src/lib/player.ts @@ -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" diff --git a/apps/mobile/src/lib/proxy-env.ts b/apps/mobile/src/lib/proxy-env.ts index f05ac07d9..746455f4b 100644 --- a/apps/mobile/src/lib/proxy-env.ts +++ b/apps/mobile/src/lib/proxy-env.ts @@ -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" diff --git a/apps/mobile/src/lib/translation.ts b/apps/mobile/src/lib/translation.ts index 8c1e9940f..c88691b6c 100644 --- a/apps/mobile/src/lib/translation.ts +++ b/apps/mobile/src/lib/translation.ts @@ -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" diff --git a/apps/mobile/src/main.tsx b/apps/mobile/src/main.tsx index ee7ab9ad2..013506fcc 100644 --- a/apps/mobile/src/main.tsx +++ b/apps/mobile/src/main.tsx @@ -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 diff --git a/apps/mobile/src/modules/context-menu/entry.tsx b/apps/mobile/src/modules/context-menu/entry.tsx index 29dc58160..3b3bafc7e 100644 --- a/apps/mobile/src/modules/context-menu/entry.tsx +++ b/apps/mobile/src/modules/context-menu/entry.tsx @@ -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" diff --git a/apps/mobile/src/modules/context-menu/feeds.tsx b/apps/mobile/src/modules/context-menu/feeds.tsx index c4220a1bb..962794453 100644 --- a/apps/mobile/src/modules/context-menu/feeds.tsx +++ b/apps/mobile/src/modules/context-menu/feeds.tsx @@ -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" diff --git a/apps/mobile/src/modules/context-menu/inbox.tsx b/apps/mobile/src/modules/context-menu/inbox.tsx index 65ebd517d..baf97eb28 100644 --- a/apps/mobile/src/modules/context-menu/inbox.tsx +++ b/apps/mobile/src/modules/context-menu/inbox.tsx @@ -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" diff --git a/apps/mobile/src/modules/context-menu/lists.tsx b/apps/mobile/src/modules/context-menu/lists.tsx index b538cf834..4173aef39 100644 --- a/apps/mobile/src/modules/context-menu/lists.tsx +++ b/apps/mobile/src/modules/context-menu/lists.tsx @@ -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" diff --git a/apps/mobile/src/modules/context-menu/video.tsx b/apps/mobile/src/modules/context-menu/video.tsx index 9534eef70..78e068ff8 100644 --- a/apps/mobile/src/modules/context-menu/video.tsx +++ b/apps/mobile/src/modules/context-menu/video.tsx @@ -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" diff --git a/apps/mobile/src/modules/debug/index.tsx b/apps/mobile/src/modules/debug/index.tsx index b97dc0a9b..7b258e574 100644 --- a/apps/mobile/src/modules/debug/index.tsx +++ b/apps/mobile/src/modules/debug/index.tsx @@ -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" diff --git a/apps/mobile/src/modules/dialogs/MarkAllAsReadDialog.tsx b/apps/mobile/src/modules/dialogs/MarkAllAsReadDialog.tsx index eb73fbc4d..c7c0a26ab 100644 --- a/apps/mobile/src/modules/dialogs/MarkAllAsReadDialog.tsx +++ b/apps/mobile/src/modules/dialogs/MarkAllAsReadDialog.tsx @@ -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" diff --git a/apps/mobile/src/modules/discover/RecommendationListItem.tsx b/apps/mobile/src/modules/discover/RecommendationListItem.tsx index 542aa0f96..fb3eae1e1 100644 --- a/apps/mobile/src/modules/discover/RecommendationListItem.tsx +++ b/apps/mobile/src/modules/discover/RecommendationListItem.tsx @@ -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" diff --git a/apps/mobile/src/modules/discover/Recommendations.tsx b/apps/mobile/src/modules/discover/Recommendations.tsx index 42d95b3f8..d6e4e878c 100644 --- a/apps/mobile/src/modules/discover/Recommendations.tsx +++ b/apps/mobile/src/modules/discover/Recommendations.tsx @@ -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" diff --git a/apps/mobile/src/modules/discover/search-tabs/SearchFeedCard.tsx b/apps/mobile/src/modules/discover/search-tabs/SearchFeedCard.tsx index 347c03af6..4233b5052 100644 --- a/apps/mobile/src/modules/discover/search-tabs/SearchFeedCard.tsx +++ b/apps/mobile/src/modules/discover/search-tabs/SearchFeedCard.tsx @@ -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" diff --git a/apps/mobile/src/modules/discover/search-tabs/SearchList.tsx b/apps/mobile/src/modules/discover/search-tabs/SearchList.tsx index e8939160b..ad7db88d0 100644 --- a/apps/mobile/src/modules/discover/search-tabs/SearchList.tsx +++ b/apps/mobile/src/modules/discover/search-tabs/SearchList.tsx @@ -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" diff --git a/apps/mobile/src/modules/entry-content/EntryAISummary.tsx b/apps/mobile/src/modules/entry-content/EntryAISummary.tsx index 4cca1c2db..48bbded2d 100644 --- a/apps/mobile/src/modules/entry-content/EntryAISummary.tsx +++ b/apps/mobile/src/modules/entry-content/EntryAISummary.tsx @@ -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" diff --git a/apps/mobile/src/modules/entry-content/EntryContentHeaderRightActions.tsx b/apps/mobile/src/modules/entry-content/EntryContentHeaderRightActions.tsx index 67d9419a1..99510e0a6 100644 --- a/apps/mobile/src/modules/entry-content/EntryContentHeaderRightActions.tsx +++ b/apps/mobile/src/modules/entry-content/EntryContentHeaderRightActions.tsx @@ -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" diff --git a/apps/mobile/src/modules/entry-content/EntryGridFooter.tsx b/apps/mobile/src/modules/entry-content/EntryGridFooter.tsx index d6cb469b5..4e8d9f47e 100644 --- a/apps/mobile/src/modules/entry-content/EntryGridFooter.tsx +++ b/apps/mobile/src/modules/entry-content/EntryGridFooter.tsx @@ -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" diff --git a/apps/mobile/src/modules/entry-content/EntryNavigationHeader.tsx b/apps/mobile/src/modules/entry-content/EntryNavigationHeader.tsx index d5d633592..b5020b455 100644 --- a/apps/mobile/src/modules/entry-content/EntryNavigationHeader.tsx +++ b/apps/mobile/src/modules/entry-content/EntryNavigationHeader.tsx @@ -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" diff --git a/apps/mobile/src/modules/entry-content/EntryReadHistory.tsx b/apps/mobile/src/modules/entry-content/EntryReadHistory.tsx index ad9e613a9..40953ad15 100644 --- a/apps/mobile/src/modules/entry-content/EntryReadHistory.tsx +++ b/apps/mobile/src/modules/entry-content/EntryReadHistory.tsx @@ -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" diff --git a/apps/mobile/src/modules/entry-content/EntryTitle.tsx b/apps/mobile/src/modules/entry-content/EntryTitle.tsx index 3e4633da8..1ce0ab956 100644 --- a/apps/mobile/src/modules/entry-content/EntryTitle.tsx +++ b/apps/mobile/src/modules/entry-content/EntryTitle.tsx @@ -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" diff --git a/apps/mobile/src/modules/entry-list/EntryListContentArticle.tsx b/apps/mobile/src/modules/entry-list/EntryListContentArticle.tsx index 53b29371b..4a9c8a29c 100644 --- a/apps/mobile/src/modules/entry-list/EntryListContentArticle.tsx +++ b/apps/mobile/src/modules/entry-list/EntryListContentArticle.tsx @@ -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" diff --git a/apps/mobile/src/modules/entry-list/EntryListContentPicture.tsx b/apps/mobile/src/modules/entry-list/EntryListContentPicture.tsx index f3cb9f058..d2c7e3624 100644 --- a/apps/mobile/src/modules/entry-list/EntryListContentPicture.tsx +++ b/apps/mobile/src/modules/entry-list/EntryListContentPicture.tsx @@ -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" diff --git a/apps/mobile/src/modules/entry-list/EntryListContentSocial.tsx b/apps/mobile/src/modules/entry-list/EntryListContentSocial.tsx index b4d43df83..269f2f1db 100644 --- a/apps/mobile/src/modules/entry-list/EntryListContentSocial.tsx +++ b/apps/mobile/src/modules/entry-list/EntryListContentSocial.tsx @@ -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" diff --git a/apps/mobile/src/modules/entry-list/EntryListContentVideo.tsx b/apps/mobile/src/modules/entry-list/EntryListContentVideo.tsx index f8391b949..97ba0e036 100644 --- a/apps/mobile/src/modules/entry-list/EntryListContentVideo.tsx +++ b/apps/mobile/src/modules/entry-list/EntryListContentVideo.tsx @@ -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" diff --git a/apps/mobile/src/modules/entry-list/EntryListFooter.tsx b/apps/mobile/src/modules/entry-list/EntryListFooter.tsx index 710bcc39f..0696153f6 100644 --- a/apps/mobile/src/modules/entry-list/EntryListFooter.tsx +++ b/apps/mobile/src/modules/entry-list/EntryListFooter.tsx @@ -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" diff --git a/apps/mobile/src/modules/entry-list/EntryListSelector.tsx b/apps/mobile/src/modules/entry-list/EntryListSelector.tsx index 2b5f4a55e..bd4037b29 100644 --- a/apps/mobile/src/modules/entry-list/EntryListSelector.tsx +++ b/apps/mobile/src/modules/entry-list/EntryListSelector.tsx @@ -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" diff --git a/apps/mobile/src/modules/entry-list/hooks.ts b/apps/mobile/src/modules/entry-list/hooks.ts index f44645d54..c12067778 100644 --- a/apps/mobile/src/modules/entry-list/hooks.ts +++ b/apps/mobile/src/modules/entry-list/hooks.ts @@ -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" diff --git a/apps/mobile/src/modules/entry-list/index.tsx b/apps/mobile/src/modules/entry-list/index.tsx index b11431747..31fc9e0db 100644 --- a/apps/mobile/src/modules/entry-list/index.tsx +++ b/apps/mobile/src/modules/entry-list/index.tsx @@ -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" diff --git a/apps/mobile/src/modules/entry-list/templates/EntryNormalItem.tsx b/apps/mobile/src/modules/entry-list/templates/EntryNormalItem.tsx index 733e80574..9317dd685 100644 --- a/apps/mobile/src/modules/entry-list/templates/EntryNormalItem.tsx +++ b/apps/mobile/src/modules/entry-list/templates/EntryNormalItem.tsx @@ -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" diff --git a/apps/mobile/src/modules/entry-list/templates/EntryPictureItem.tsx b/apps/mobile/src/modules/entry-list/templates/EntryPictureItem.tsx index 94d596e9d..fde78dde0 100644 --- a/apps/mobile/src/modules/entry-list/templates/EntryPictureItem.tsx +++ b/apps/mobile/src/modules/entry-list/templates/EntryPictureItem.tsx @@ -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" diff --git a/apps/mobile/src/modules/entry-list/templates/EntrySocialItem.tsx b/apps/mobile/src/modules/entry-list/templates/EntrySocialItem.tsx index 55065f37e..1da633bb8 100644 --- a/apps/mobile/src/modules/entry-list/templates/EntrySocialItem.tsx +++ b/apps/mobile/src/modules/entry-list/templates/EntrySocialItem.tsx @@ -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" diff --git a/apps/mobile/src/modules/entry-list/templates/EntryVideoItem.tsx b/apps/mobile/src/modules/entry-list/templates/EntryVideoItem.tsx index 0997713d4..bd9a7266c 100644 --- a/apps/mobile/src/modules/entry-list/templates/EntryVideoItem.tsx +++ b/apps/mobile/src/modules/entry-list/templates/EntryVideoItem.tsx @@ -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" diff --git a/apps/mobile/src/modules/feed/FollowFeed.tsx b/apps/mobile/src/modules/feed/FollowFeed.tsx index ed92adcee..777e8f2e6 100644 --- a/apps/mobile/src/modules/feed/FollowFeed.tsx +++ b/apps/mobile/src/modules/feed/FollowFeed.tsx @@ -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" diff --git a/apps/mobile/src/modules/list/FollowList.tsx b/apps/mobile/src/modules/list/FollowList.tsx index 59e8937e7..11a4a0d66 100644 --- a/apps/mobile/src/modules/list/FollowList.tsx +++ b/apps/mobile/src/modules/list/FollowList.tsx @@ -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" diff --git a/apps/mobile/src/modules/player/PlayerTabBar.tsx b/apps/mobile/src/modules/player/PlayerTabBar.tsx index 4332d1d7b..e46786dc1 100644 --- a/apps/mobile/src/modules/player/PlayerTabBar.tsx +++ b/apps/mobile/src/modules/player/PlayerTabBar.tsx @@ -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" diff --git a/apps/mobile/src/modules/player/hooks.ts b/apps/mobile/src/modules/player/hooks.ts index b56779726..a2fd9b9e6 100644 --- a/apps/mobile/src/modules/player/hooks.ts +++ b/apps/mobile/src/modules/player/hooks.ts @@ -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" diff --git a/apps/mobile/src/modules/screen/PagerList.ios.tsx b/apps/mobile/src/modules/screen/PagerList.ios.tsx index 52654443e..4af4b41b7 100644 --- a/apps/mobile/src/modules/screen/PagerList.ios.tsx +++ b/apps/mobile/src/modules/screen/PagerList.ios.tsx @@ -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" diff --git a/apps/mobile/src/modules/screen/PagerList.tsx b/apps/mobile/src/modules/screen/PagerList.tsx index 788500d10..6c2d8dc8d 100644 --- a/apps/mobile/src/modules/screen/PagerList.tsx +++ b/apps/mobile/src/modules/screen/PagerList.tsx @@ -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" diff --git a/apps/mobile/src/modules/screen/TimelineSelectorList.tsx b/apps/mobile/src/modules/screen/TimelineSelectorList.tsx index ace46cabf..174b25e72 100644 --- a/apps/mobile/src/modules/screen/TimelineSelectorList.tsx +++ b/apps/mobile/src/modules/screen/TimelineSelectorList.tsx @@ -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, diff --git a/apps/mobile/src/modules/screen/TimelineViewSelector.tsx b/apps/mobile/src/modules/screen/TimelineViewSelector.tsx index b3469ec78..6bbbdf58c 100644 --- a/apps/mobile/src/modules/screen/TimelineViewSelector.tsx +++ b/apps/mobile/src/modules/screen/TimelineViewSelector.tsx @@ -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" diff --git a/apps/mobile/src/modules/screen/TimelineViewSelectorContextMenu.tsx b/apps/mobile/src/modules/screen/TimelineViewSelectorContextMenu.tsx index efbe5d712..4e5ee1417 100644 --- a/apps/mobile/src/modules/screen/TimelineViewSelectorContextMenu.tsx +++ b/apps/mobile/src/modules/screen/TimelineViewSelectorContextMenu.tsx @@ -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" diff --git a/apps/mobile/src/modules/screen/action.tsx b/apps/mobile/src/modules/screen/action.tsx index 38aefea2c..3ad25317e 100644 --- a/apps/mobile/src/modules/screen/action.tsx +++ b/apps/mobile/src/modules/screen/action.tsx @@ -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" diff --git a/apps/mobile/src/modules/screen/atoms.ts b/apps/mobile/src/modules/screen/atoms.ts index 1e15657e9..dfcd488a7 100644 --- a/apps/mobile/src/modules/screen/atoms.ts +++ b/apps/mobile/src/modules/screen/atoms.ts @@ -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" diff --git a/apps/mobile/src/modules/settings/SettingsList.tsx b/apps/mobile/src/modules/settings/SettingsList.tsx index 27b6322ac..0bfab4b57 100644 --- a/apps/mobile/src/modules/settings/SettingsList.tsx +++ b/apps/mobile/src/modules/settings/SettingsList.tsx @@ -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" diff --git a/apps/mobile/src/modules/settings/UserHeaderBanner.tsx b/apps/mobile/src/modules/settings/UserHeaderBanner.tsx index 5bb4c409a..f86d9edb9 100644 --- a/apps/mobile/src/modules/settings/UserHeaderBanner.tsx +++ b/apps/mobile/src/modules/settings/UserHeaderBanner.tsx @@ -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" diff --git a/apps/mobile/src/modules/settings/actions/constant.ts b/apps/mobile/src/modules/settings/actions/constant.ts index 78d7e5d95..20d237451 100644 --- a/apps/mobile/src/modules/settings/actions/constant.ts +++ b/apps/mobile/src/modules/settings/actions/constant.ts @@ -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" diff --git a/apps/mobile/src/modules/settings/hooks/useTOTPModalWrapper.tsx b/apps/mobile/src/modules/settings/hooks/useTOTPModalWrapper.tsx index f3c49c4d1..7dbc19e9b 100644 --- a/apps/mobile/src/modules/settings/hooks/useTOTPModalWrapper.tsx +++ b/apps/mobile/src/modules/settings/hooks/useTOTPModalWrapper.tsx @@ -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" diff --git a/apps/mobile/src/modules/settings/routes/2FASetting.tsx b/apps/mobile/src/modules/settings/routes/2FASetting.tsx index 869fa4f1a..e6460e8e3 100644 --- a/apps/mobile/src/modules/settings/routes/2FASetting.tsx +++ b/apps/mobile/src/modules/settings/routes/2FASetting.tsx @@ -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" diff --git a/apps/mobile/src/modules/settings/routes/Account.tsx b/apps/mobile/src/modules/settings/routes/Account.tsx index fbafc16dc..b307da066 100644 --- a/apps/mobile/src/modules/settings/routes/Account.tsx +++ b/apps/mobile/src/modules/settings/routes/Account.tsx @@ -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" diff --git a/apps/mobile/src/modules/settings/routes/Actions.tsx b/apps/mobile/src/modules/settings/routes/Actions.tsx index b8c5a3165..6e554ac66 100644 --- a/apps/mobile/src/modules/settings/routes/Actions.tsx +++ b/apps/mobile/src/modules/settings/routes/Actions.tsx @@ -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" diff --git a/apps/mobile/src/modules/settings/routes/Appearance.tsx b/apps/mobile/src/modules/settings/routes/Appearance.tsx index 7f485b103..ce2ac741d 100644 --- a/apps/mobile/src/modules/settings/routes/Appearance.tsx +++ b/apps/mobile/src/modules/settings/routes/Appearance.tsx @@ -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" diff --git a/apps/mobile/src/modules/settings/routes/EditCondition.tsx b/apps/mobile/src/modules/settings/routes/EditCondition.tsx index 51559fb36..67d5ae81f 100644 --- a/apps/mobile/src/modules/settings/routes/EditCondition.tsx +++ b/apps/mobile/src/modules/settings/routes/EditCondition.tsx @@ -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" diff --git a/apps/mobile/src/modules/settings/routes/EditProfile.tsx b/apps/mobile/src/modules/settings/routes/EditProfile.tsx index fd53d8b95..b5e0095a3 100644 --- a/apps/mobile/src/modules/settings/routes/EditProfile.tsx +++ b/apps/mobile/src/modules/settings/routes/EditProfile.tsx @@ -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" diff --git a/apps/mobile/src/modules/settings/routes/EditRewriteRules.tsx b/apps/mobile/src/modules/settings/routes/EditRewriteRules.tsx index c76e24971..ac4ba822e 100644 --- a/apps/mobile/src/modules/settings/routes/EditRewriteRules.tsx +++ b/apps/mobile/src/modules/settings/routes/EditRewriteRules.tsx @@ -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" diff --git a/apps/mobile/src/modules/settings/routes/EditRule.tsx b/apps/mobile/src/modules/settings/routes/EditRule.tsx index dd3d0a462..490754114 100644 --- a/apps/mobile/src/modules/settings/routes/EditRule.tsx +++ b/apps/mobile/src/modules/settings/routes/EditRule.tsx @@ -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" diff --git a/apps/mobile/src/modules/settings/routes/EditWebhooks.tsx b/apps/mobile/src/modules/settings/routes/EditWebhooks.tsx index 15eede4ab..dbe3fd308 100644 --- a/apps/mobile/src/modules/settings/routes/EditWebhooks.tsx +++ b/apps/mobile/src/modules/settings/routes/EditWebhooks.tsx @@ -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" diff --git a/apps/mobile/src/modules/settings/routes/Lists.tsx b/apps/mobile/src/modules/settings/routes/Lists.tsx index 12a733751..d0be22a1a 100644 --- a/apps/mobile/src/modules/settings/routes/Lists.tsx +++ b/apps/mobile/src/modules/settings/routes/Lists.tsx @@ -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" diff --git a/apps/mobile/src/modules/settings/routes/ManageList.tsx b/apps/mobile/src/modules/settings/routes/ManageList.tsx index 32d5e0eee..27cfa9fe3 100644 --- a/apps/mobile/src/modules/settings/routes/ManageList.tsx +++ b/apps/mobile/src/modules/settings/routes/ManageList.tsx @@ -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" diff --git a/apps/mobile/src/modules/settings/sync-queue.ts b/apps/mobile/src/modules/settings/sync-queue.ts index b7dfb8946..a2d3a35d3 100644 --- a/apps/mobile/src/modules/settings/sync-queue.ts +++ b/apps/mobile/src/modules/settings/sync-queue.ts @@ -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" diff --git a/apps/mobile/src/modules/settings/utils.ts b/apps/mobile/src/modules/settings/utils.ts index 515fca14e..426383fd6 100644 --- a/apps/mobile/src/modules/settings/utils.ts +++ b/apps/mobile/src/modules/settings/utils.ts @@ -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" diff --git a/apps/mobile/src/modules/subscription/CategoryGrouped.tsx b/apps/mobile/src/modules/subscription/CategoryGrouped.tsx index 965198803..20fae3195 100644 --- a/apps/mobile/src/modules/subscription/CategoryGrouped.tsx +++ b/apps/mobile/src/modules/subscription/CategoryGrouped.tsx @@ -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" diff --git a/apps/mobile/src/modules/subscription/SubscriptionLists.tsx b/apps/mobile/src/modules/subscription/SubscriptionLists.tsx index 686c4757e..c8b116d24 100644 --- a/apps/mobile/src/modules/subscription/SubscriptionLists.tsx +++ b/apps/mobile/src/modules/subscription/SubscriptionLists.tsx @@ -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" diff --git a/apps/mobile/src/modules/subscription/UnGroupedList.tsx b/apps/mobile/src/modules/subscription/UnGroupedList.tsx index 210a459d2..ee4ecf267 100644 --- a/apps/mobile/src/modules/subscription/UnGroupedList.tsx +++ b/apps/mobile/src/modules/subscription/UnGroupedList.tsx @@ -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" diff --git a/apps/mobile/src/modules/subscription/items/InboxItem.tsx b/apps/mobile/src/modules/subscription/items/InboxItem.tsx index 39e4414c9..b81a58689 100644 --- a/apps/mobile/src/modules/subscription/items/InboxItem.tsx +++ b/apps/mobile/src/modules/subscription/items/InboxItem.tsx @@ -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" diff --git a/apps/mobile/src/modules/subscription/items/ListSubscriptionItem.tsx b/apps/mobile/src/modules/subscription/items/ListSubscriptionItem.tsx index 22bffea11..949d93066 100644 --- a/apps/mobile/src/modules/subscription/items/ListSubscriptionItem.tsx +++ b/apps/mobile/src/modules/subscription/items/ListSubscriptionItem.tsx @@ -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" diff --git a/apps/mobile/src/modules/subscription/items/SubscriptionItem.tsx b/apps/mobile/src/modules/subscription/items/SubscriptionItem.tsx index 11c1d5526..9075d2939 100644 --- a/apps/mobile/src/modules/subscription/items/SubscriptionItem.tsx +++ b/apps/mobile/src/modules/subscription/items/SubscriptionItem.tsx @@ -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" diff --git a/apps/mobile/src/providers/index.tsx b/apps/mobile/src/providers/index.tsx index 07ea3e05a..867a1da06 100644 --- a/apps/mobile/src/providers/index.tsx +++ b/apps/mobile/src/providers/index.tsx @@ -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" diff --git a/apps/mobile/src/screens/(headless)/debug.tsx b/apps/mobile/src/screens/(headless)/debug.tsx index 685cbc857..db72cb5dd 100644 --- a/apps/mobile/src/screens/(headless)/debug.tsx +++ b/apps/mobile/src/screens/(headless)/debug.tsx @@ -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" diff --git a/apps/mobile/src/screens/(headless)/privacy.tsx b/apps/mobile/src/screens/(headless)/privacy.tsx index 8d754d8d0..4d5f6c4d3 100644 --- a/apps/mobile/src/screens/(headless)/privacy.tsx +++ b/apps/mobile/src/screens/(headless)/privacy.tsx @@ -1,4 +1,4 @@ -import { legalMarkdown } from "@follow/legal/dist/index" +import { legalMarkdown } from "@follow/legal" import { NavigationBlurEffectHeaderView, diff --git a/apps/mobile/src/screens/(headless)/terms.tsx b/apps/mobile/src/screens/(headless)/terms.tsx index 933561379..c5c6cfe3f 100644 --- a/apps/mobile/src/screens/(headless)/terms.tsx +++ b/apps/mobile/src/screens/(headless)/terms.tsx @@ -1,4 +1,4 @@ -import { legalMarkdown } from "@follow/legal/dist/index" +import { legalMarkdown } from "@follow/legal" import { NavigationBlurEffectHeaderView, diff --git a/apps/mobile/src/screens/(modal)/EditEmailScreen.tsx b/apps/mobile/src/screens/(modal)/EditEmailScreen.tsx index 777eedd04..c21bcfbda 100644 --- a/apps/mobile/src/screens/(modal)/EditEmailScreen.tsx +++ b/apps/mobile/src/screens/(modal)/EditEmailScreen.tsx @@ -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" diff --git a/apps/mobile/src/screens/(modal)/InvitationScreen.tsx b/apps/mobile/src/screens/(modal)/InvitationScreen.tsx index 5f53691f6..3aba4e177 100644 --- a/apps/mobile/src/screens/(modal)/InvitationScreen.tsx +++ b/apps/mobile/src/screens/(modal)/InvitationScreen.tsx @@ -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" diff --git a/apps/mobile/src/screens/(modal)/ListScreen.tsx b/apps/mobile/src/screens/(modal)/ListScreen.tsx index c15909410..6080a66d8 100644 --- a/apps/mobile/src/screens/(modal)/ListScreen.tsx +++ b/apps/mobile/src/screens/(modal)/ListScreen.tsx @@ -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" diff --git a/apps/mobile/src/screens/(modal)/LoginScreen.tsx b/apps/mobile/src/screens/(modal)/LoginScreen.tsx index 1a60ef874..5669ae769 100644 --- a/apps/mobile/src/screens/(modal)/LoginScreen.tsx +++ b/apps/mobile/src/screens/(modal)/LoginScreen.tsx @@ -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" diff --git a/apps/mobile/src/screens/(modal)/ProfileScreen.tsx b/apps/mobile/src/screens/(modal)/ProfileScreen.tsx index 81b937b4a..c468f65ea 100644 --- a/apps/mobile/src/screens/(modal)/ProfileScreen.tsx +++ b/apps/mobile/src/screens/(modal)/ProfileScreen.tsx @@ -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" diff --git a/apps/mobile/src/screens/(modal)/RsshubFormScreen.tsx b/apps/mobile/src/screens/(modal)/RsshubFormScreen.tsx index 458117545..780d83386 100644 --- a/apps/mobile/src/screens/(modal)/RsshubFormScreen.tsx +++ b/apps/mobile/src/screens/(modal)/RsshubFormScreen.tsx @@ -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, diff --git a/apps/mobile/src/screens/(modal)/TwoFactorAuthScreen.tsx b/apps/mobile/src/screens/(modal)/TwoFactorAuthScreen.tsx index b72a0c362..629dde6ff 100644 --- a/apps/mobile/src/screens/(modal)/TwoFactorAuthScreen.tsx +++ b/apps/mobile/src/screens/(modal)/TwoFactorAuthScreen.tsx @@ -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 { Text, TouchableWithoutFeedback, View } from "react-native" diff --git a/apps/mobile/src/screens/(stack)/(tabs)/settings.tsx b/apps/mobile/src/screens/(stack)/(tabs)/settings.tsx index 32b2ee201..3624f2e71 100644 --- a/apps/mobile/src/screens/(stack)/(tabs)/settings.tsx +++ b/apps/mobile/src/screens/(stack)/(tabs)/settings.tsx @@ -1,4 +1,4 @@ -import { useWhoami } from "@follow/store/src/user/hooks" +import { useWhoami } from "@follow/store/user/hooks" import { use } from "react" import { useTranslation } from "react-i18next" import type { ScrollView } from "react-native" diff --git a/apps/mobile/src/screens/(stack)/(tabs)/subscriptions.tsx b/apps/mobile/src/screens/(stack)/(tabs)/subscriptions.tsx index 500e553eb..bb9063c11 100644 --- a/apps/mobile/src/screens/(stack)/(tabs)/subscriptions.tsx +++ b/apps/mobile/src/screens/(stack)/(tabs)/subscriptions.tsx @@ -1,5 +1,5 @@ import type { FeedViewType } from "@follow/constants" -import { useWhoami } from "@follow/store/src/user/hooks" +import { useWhoami } from "@follow/store/user/hooks" import { useMemo } from "react" import { useColor } from "react-native-uikit-colors" diff --git a/apps/mobile/src/screens/(stack)/entries/[entryId]/EntryDetailScreen.tsx b/apps/mobile/src/screens/(stack)/entries/[entryId]/EntryDetailScreen.tsx index 9a6561c0b..d8f1f3ba8 100644 --- a/apps/mobile/src/screens/(stack)/entries/[entryId]/EntryDetailScreen.tsx +++ b/apps/mobile/src/screens/(stack)/entries/[entryId]/EntryDetailScreen.tsx @@ -1,13 +1,10 @@ import { FeedViewType } from "@follow/constants" -import { useEntry, usePrefetchEntryDetail } from "@follow/store/src/entry/hooks" -import { entrySyncServices } from "@follow/store/src/entry/store" -import type { EntryWithTranslation } from "@follow/store/src/entry/types" -import { useFeed } from "@follow/store/src/feed/hooks" -import { - useEntryTranslation, - usePrefetchEntryTranslation, -} from "@follow/store/src/translation/hooks" -import { useAutoMarkAsRead } from "@follow/store/src/unread/hooks" +import { useEntry, usePrefetchEntryDetail } from "@follow/store/entry/hooks" +import { entrySyncServices } from "@follow/store/entry/store" +import type { EntryWithTranslation } from "@follow/store/entry/types" +import { useFeed } from "@follow/store/feed/hooks" +import { useEntryTranslation, usePrefetchEntryTranslation } from "@follow/store/translation/hooks" +import { useAutoMarkAsRead } from "@follow/store/unread/hooks" import { PortalProvider } from "@gorhom/portal" import { atom, useAtomValue, useSetAtom } from "jotai" import { useCallback, useEffect, useMemo } from "react" diff --git a/apps/mobile/src/screens/(stack)/feeds/[feedId]/FeedScreen.tsx b/apps/mobile/src/screens/(stack)/feeds/[feedId]/FeedScreen.tsx index 076904893..1dc96a09c 100644 --- a/apps/mobile/src/screens/(stack)/feeds/[feedId]/FeedScreen.tsx +++ b/apps/mobile/src/screens/(stack)/feeds/[feedId]/FeedScreen.tsx @@ -1,13 +1,13 @@ import { FeedViewType } from "@follow/constants" -import { useCollectionEntryList } from "@follow/store/src/collection/hooks" +import { useCollectionEntryList } from "@follow/store/collection/hooks" import { useEntryIdsByCategory, useEntryIdsByFeedId, useEntryIdsByInboxId, useEntryIdsByListId, -} from "@follow/store/src/entry/hooks" -import { FEED_COLLECTION_LIST } from "@follow/store/src/entry/utils" -import { useFeed } from "@follow/store/src/feed/hooks" +} from "@follow/store/entry/hooks" +import { FEED_COLLECTION_LIST } from "@follow/store/entry/utils" +import { useFeed } from "@follow/store/feed/hooks" import { useMemo } from "react" import { RootSiblingParent } from "react-native-root-siblings" import { useSafeAreaInsets } from "react-native-safe-area-context" diff --git a/apps/mobile/src/screens/OnboardingScreen.tsx b/apps/mobile/src/screens/OnboardingScreen.tsx index 9eec96bb9..ba1482d88 100644 --- a/apps/mobile/src/screens/OnboardingScreen.tsx +++ b/apps/mobile/src/screens/OnboardingScreen.tsx @@ -1,4 +1,4 @@ -import { isNewUserQueryKey, isOnboardingFinishedStorageKey } from "@follow/store/src/user/constants" +import { isNewUserQueryKey, isOnboardingFinishedStorageKey } from "@follow/store/user/constants" import { tracker } from "@follow/tracker" import { useCallback, useEffect, useState } from "react" import { useTranslation } from "react-i18next" diff --git a/apps/mobile/src/screens/PlayerScreen.tsx b/apps/mobile/src/screens/PlayerScreen.tsx index 20df7ca6f..9b6fc4bfd 100644 --- a/apps/mobile/src/screens/PlayerScreen.tsx +++ b/apps/mobile/src/screens/PlayerScreen.tsx @@ -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 { LinearGradient } from "expo-linear-gradient" import { useEffect, useMemo } from "react" diff --git a/apps/mobile/src/theme/web.ts b/apps/mobile/src/theme/web.ts index b2962f26d..fcc3ff466 100644 --- a/apps/mobile/src/theme/web.ts +++ b/apps/mobile/src/theme/web.ts @@ -1 +1 @@ -export { useCSSInjection } from "react-native-uikit-colors/dist/web" +export { useCSSInjection } from "react-native-uikit-colors/web" diff --git a/apps/mobile/tsconfig.json b/apps/mobile/tsconfig.json index bc20ad5cb..7c92b8606 100644 --- a/apps/mobile/tsconfig.json +++ b/apps/mobile/tsconfig.json @@ -1,19 +1,18 @@ { "extends": "expo/tsconfig.base", "compilerOptions": { - "moduleResolution": "node", "strict": true, "noUncheckedIndexedAccess": true, "skipLibCheck": true, "noImplicitOverride": true, - "module": "commonjs", + "allowImportingTsExtensions": true, "baseUrl": ".", "paths": { "@/*": ["./*"], "@locales/*": ["../../locales/*"] }, "jsx": "preserve", - "types": ["@follow/types/global"] + "types": ["@follow/types/global", "vite/client"] }, "include": ["**/*.ts", "**/*.tsx", "nativewind-env.d.ts"], "exclude": ["./native", "./web-app", "../../node_modules"] diff --git a/packages/internal/components/package.json b/packages/internal/components/package.json index 0c0d00cf9..f6d31348d 100644 --- a/packages/internal/components/package.json +++ b/packages/internal/components/package.json @@ -3,6 +3,7 @@ "private": true, "sideEffects": false, "exports": { + ".": "./exports.ts", "./assets/*": "./assets/*", "./atoms/*": "./src/atoms/*", "./common/*": "./src/common/*", diff --git a/packages/internal/database/package.json b/packages/internal/database/package.json index 1e35d55df..10ccd5eb8 100644 --- a/packages/internal/database/package.json +++ b/packages/internal/database/package.json @@ -11,7 +11,7 @@ }, "sideEffects": false, "exports": { - "./src/*": { + "./*": { "types": "./src/*.ts", "require": "./src/*.ts", "import": "./src/*.ts" diff --git a/packages/internal/database/src/schemas/index.ts b/packages/internal/database/src/schemas/index.ts index 620f867b4..ee808cbd2 100644 --- a/packages/internal/database/src/schemas/index.ts +++ b/packages/internal/database/src/schemas/index.ts @@ -1,6 +1,6 @@ import type { FeedViewType } from "@follow/constants" -import type { ActionSettings } from "@follow/models/src/types" -import type { SupportedActionLanguage } from "@follow/shared/src/language" +import type { ActionSettings } from "@follow/models/types" +import type { SupportedActionLanguage } from "@follow/shared/language" import { sql } from "drizzle-orm" import { integer, sqliteTable, text, uniqueIndex } from "drizzle-orm/sqlite-core" diff --git a/packages/internal/models/package.json b/packages/internal/models/package.json index 822716f6b..9426203fa 100644 --- a/packages/internal/models/package.json +++ b/packages/internal/models/package.json @@ -11,11 +11,6 @@ "import": "./src/rsshub.ts", "types": "./src/rsshub.ts" }, - "./src/*": { - "types": "./src/*.ts", - "require": "./src/*.ts", - "import": "./src/*.ts" - }, "./types": { "import": "./src/types.ts", "require": "./src/types.ts" diff --git a/packages/internal/shared/package.json b/packages/internal/shared/package.json index ec2b40724..16ad95a6a 100644 --- a/packages/internal/shared/package.json +++ b/packages/internal/shared/package.json @@ -25,11 +25,6 @@ "types": "./src/interface/*.ts", "require": "./src/interface/*.ts", "import": "./src/interface/*.ts" - }, - "./src/*": { - "types": "./src/*.ts", - "require": "./src/*.ts", - "import": "./src/*.ts" } }, "main": "./exports.ts", diff --git a/packages/internal/shared/src/constants.ts b/packages/internal/shared/src/constants.ts index 44d561742..b2c0768df 100644 --- a/packages/internal/shared/src/constants.ts +++ b/packages/internal/shared/src/constants.ts @@ -14,9 +14,9 @@ export enum ModeEnum { production = "production", } -export const MODE = import.meta.env.MODE as ModeEnum +export const MODE = import.meta.env?.MODE as ModeEnum -export const { PROD } = import.meta.env +export const { PROD } = import.meta.env ?? {} export const DEV = "process" in globalThis ? process.env.NODE_ENV === "development" : import.meta.env.DEV diff --git a/packages/internal/store/package.json b/packages/internal/store/package.json index 9a3be8535..5400f6134 100644 --- a/packages/internal/store/package.json +++ b/packages/internal/store/package.json @@ -11,7 +11,12 @@ }, "sideEffects": false, "exports": { - "./src/*": { + ".": { + "types": "./src/index.ts", + "require": "./src/index.ts", + "import": "./src/index.ts" + }, + "./*": { "types": "./src/*.ts", "require": "./src/*.ts", "import": "./src/*.ts" diff --git a/packages/internal/store/src/action/store.ts b/packages/internal/store/src/action/store.ts index 3ff4b52ba..abfa10a79 100644 --- a/packages/internal/store/src/action/store.ts +++ b/packages/internal/store/src/action/store.ts @@ -4,7 +4,7 @@ import type { ActionId, ActionModel, ActionRules, -} from "@follow/models/src/types" +} from "@follow/models/types" import { merge } from "es-toolkit/compat" import { createImmerSetter, createZustandStore } from "../internal/helper" diff --git a/packages/internal/store/src/collection/store.ts b/packages/internal/store/src/collection/store.ts index 4d3dd1996..c9e0b0be0 100644 --- a/packages/internal/store/src/collection/store.ts +++ b/packages/internal/store/src/collection/store.ts @@ -1,6 +1,6 @@ import type { FeedViewType } from "@follow/constants" -import type { CollectionSchema } from "@follow/database/src/schemas/types" -import { CollectionService } from "@follow/database/src/services/collection" +import type { CollectionSchema } from "@follow/database/schemas/types" +import { CollectionService } from "@follow/database/services/collection" import type { Hydratable } from "../internal/base" import { createTransaction, createZustandStore } from "../internal/helper" diff --git a/packages/internal/store/src/collection/types.ts b/packages/internal/store/src/collection/types.ts index df7c9c5ac..0c4fe99ea 100644 --- a/packages/internal/store/src/collection/types.ts +++ b/packages/internal/store/src/collection/types.ts @@ -1,3 +1,3 @@ -import type { CollectionSchema } from "@follow/database/src/schemas/types" +import type { CollectionSchema } from "@follow/database/schemas/types" export type CollectionModel = CollectionSchema diff --git a/packages/internal/store/src/entry/store.ts b/packages/internal/store/src/entry/store.ts index 9715ffdfe..03bcbf80c 100644 --- a/packages/internal/store/src/entry/store.ts +++ b/packages/internal/store/src/entry/store.ts @@ -1,5 +1,5 @@ import { FeedViewType } from "@follow/constants" -import { EntryService } from "@follow/database/src/services/entry" +import { EntryService } from "@follow/database/services/entry" import { debounce } from "es-toolkit/compat" import { collectionActions } from "../collection/store" diff --git a/packages/internal/store/src/entry/types.ts b/packages/internal/store/src/entry/types.ts index b76776491..79b96a8b1 100644 --- a/packages/internal/store/src/entry/types.ts +++ b/packages/internal/store/src/entry/types.ts @@ -1,4 +1,4 @@ -import type { EntrySchema } from "@follow/database/src/schemas/types" +import type { EntrySchema } from "@follow/database/schemas/types" import type { EntryTranslation } from "../translation/types" diff --git a/packages/internal/store/src/feed/getter.ts b/packages/internal/store/src/feed/getter.ts index f819a36d9..9add4631c 100644 --- a/packages/internal/store/src/feed/getter.ts +++ b/packages/internal/store/src/feed/getter.ts @@ -1,4 +1,4 @@ -import type { FeedSchema } from "@follow/database/src/schemas/types" +import type { FeedSchema } from "@follow/database/schemas/types" import { useFeedStore } from "./store" diff --git a/packages/internal/store/src/feed/store.ts b/packages/internal/store/src/feed/store.ts index 0114e4df3..0774fd5b8 100644 --- a/packages/internal/store/src/feed/store.ts +++ b/packages/internal/store/src/feed/store.ts @@ -1,5 +1,5 @@ -import type { FeedSchema } from "@follow/database/src/schemas/types" -import { FeedService } from "@follow/database/src/services/feed" +import type { FeedSchema } from "@follow/database/schemas/types" +import { FeedService } from "@follow/database/services/feed" import type { Hydratable } from "../internal/base" import { createImmerSetter, createTransaction, createZustandStore } from "../internal/helper" diff --git a/packages/internal/store/src/feed/types.ts b/packages/internal/store/src/feed/types.ts index 738b307b4..8522f6b13 100644 --- a/packages/internal/store/src/feed/types.ts +++ b/packages/internal/store/src/feed/types.ts @@ -1,4 +1,4 @@ -import type { FeedSchema } from "@follow/database/src/schemas/types" +import type { FeedSchema } from "@follow/database/schemas/types" export type FeedModel = FeedSchema & { nonce?: string diff --git a/packages/internal/store/src/image/store.ts b/packages/internal/store/src/image/store.ts index 6707222ba..b5ccabef9 100644 --- a/packages/internal/store/src/image/store.ts +++ b/packages/internal/store/src/image/store.ts @@ -1,5 +1,5 @@ -import type { ImageSchema } from "@follow/database/src/schemas/types" -import { ImagesService } from "@follow/database/src/services/image" +import type { ImageSchema } from "@follow/database/schemas/types" +import { ImagesService } from "@follow/database/services/image" import ImageColors from "react-native-image-colors" import type { Hydratable } from "../internal/base" diff --git a/packages/internal/store/src/inbox/store.ts b/packages/internal/store/src/inbox/store.ts index 87803ea2f..20cb62512 100644 --- a/packages/internal/store/src/inbox/store.ts +++ b/packages/internal/store/src/inbox/store.ts @@ -1,5 +1,5 @@ -import type { InboxSchema } from "@follow/database/src/schemas/types" -import { InboxService } from "@follow/database/src/services/inbox" +import type { InboxSchema } from "@follow/database/schemas/types" +import { InboxService } from "@follow/database/services/inbox" import type { Hydratable } from "../internal/base" import { createTransaction, createZustandStore } from "../internal/helper" diff --git a/packages/internal/store/src/list/store.ts b/packages/internal/store/src/list/store.ts index 1f43d9e30..164b09083 100644 --- a/packages/internal/store/src/list/store.ts +++ b/packages/internal/store/src/list/store.ts @@ -1,5 +1,5 @@ -import type { ListSchema } from "@follow/database/src/schemas/types" -import { ListService } from "@follow/database/src/services/list" +import type { ListSchema } from "@follow/database/schemas/types" +import { ListService } from "@follow/database/services/list" import { feedActions } from "../feed/store" import type { Hydratable } from "../internal/base" diff --git a/packages/internal/store/src/morph/db-store.ts b/packages/internal/store/src/morph/db-store.ts index 90a6809ad..b37dcbd1f 100644 --- a/packages/internal/store/src/morph/db-store.ts +++ b/packages/internal/store/src/morph/db-store.ts @@ -1,4 +1,4 @@ -import type { EntrySchema, SubscriptionSchema } from "@follow/database/src/schemas/types" +import type { EntrySchema, SubscriptionSchema } from "@follow/database/schemas/types" import type { EntryModel } from "../entry/types" import type { SubscriptionModel } from "../subscription/store" diff --git a/packages/internal/store/src/morph/hono.ts b/packages/internal/store/src/morph/hono.ts index 9dd7836ee..581a7a1c5 100644 --- a/packages/internal/store/src/morph/hono.ts +++ b/packages/internal/store/src/morph/hono.ts @@ -1,5 +1,5 @@ import type { FeedViewType } from "@follow/constants" -import type { FeedSchema, InboxSchema } from "@follow/database/src/schemas/types" +import type { FeedSchema, InboxSchema } from "@follow/database/schemas/types" import type { CollectionModel } from "../collection/types" import type { EntryModel } from "../entry/types" diff --git a/packages/internal/store/src/morph/store-db.ts b/packages/internal/store/src/morph/store-db.ts index 6760fb058..d76b69475 100644 --- a/packages/internal/store/src/morph/store-db.ts +++ b/packages/internal/store/src/morph/store-db.ts @@ -1,8 +1,4 @@ -import type { - EntrySchema, - ListSchema, - SubscriptionSchema, -} from "@follow/database/src/schemas/types" +import type { EntrySchema, ListSchema, SubscriptionSchema } from "@follow/database/schemas/types" import type { EntryModel } from "../entry/types" import type { ListModel } from "../list/store" diff --git a/packages/internal/store/src/morph/types.ts b/packages/internal/store/src/morph/types.ts index 852b92665..54c528df7 100644 --- a/packages/internal/store/src/morph/types.ts +++ b/packages/internal/store/src/morph/types.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-namespace */ -import type { AuthSession } from "@follow/shared/src/hono" +import type { AuthSession } from "@follow/shared/hono" // Add ExtractData type utility type ExtractData any> = diff --git a/packages/internal/store/src/subscription/store.ts b/packages/internal/store/src/subscription/store.ts index caeb0666a..26f79ae29 100644 --- a/packages/internal/store/src/subscription/store.ts +++ b/packages/internal/store/src/subscription/store.ts @@ -1,6 +1,6 @@ import { FeedViewType } from "@follow/constants" -import type { SubscriptionSchema } from "@follow/database/src/schemas/types" -import { SubscriptionService } from "@follow/database/src/services/subscription" +import type { SubscriptionSchema } from "@follow/database/schemas/types" +import { SubscriptionService } from "@follow/database/services/subscription" import { tracker } from "@follow/tracker" import { feedActions } from "../feed/store" diff --git a/packages/internal/store/src/summary/store.ts b/packages/internal/store/src/summary/store.ts index 5f70c7745..8214df8e4 100644 --- a/packages/internal/store/src/summary/store.ts +++ b/packages/internal/store/src/summary/store.ts @@ -1,5 +1,5 @@ -import type { SummarySchema } from "@follow/database/src/schemas/types" -import { summaryService } from "@follow/database/src/services/summary" +import type { SummarySchema } from "@follow/database/schemas/types" +import { summaryService } from "@follow/database/services/summary" import type { SupportedActionLanguage } from "@follow/shared" import { getEntry } from "../entry/getter" diff --git a/packages/internal/store/src/translation/hooks.ts b/packages/internal/store/src/translation/hooks.ts index 3f632a35f..79baf41ae 100644 --- a/packages/internal/store/src/translation/hooks.ts +++ b/packages/internal/store/src/translation/hooks.ts @@ -1,4 +1,4 @@ -import type { SupportedLanguages } from "@follow/models/src/types" +import type { SupportedLanguages } from "@follow/models/types" import type { SupportedActionLanguage } from "@follow/shared" import { useQueries } from "@tanstack/react-query" import { useCallback } from "react" diff --git a/packages/internal/store/src/translation/store.ts b/packages/internal/store/src/translation/store.ts index f12db9a13..908af7aaf 100644 --- a/packages/internal/store/src/translation/store.ts +++ b/packages/internal/store/src/translation/store.ts @@ -1,6 +1,6 @@ -import type { TranslationSchema } from "@follow/database/src/schemas/types" -import { TranslationService } from "@follow/database/src/services/translation" -import type { SupportedLanguages } from "@follow/models/src/types" +import type { TranslationSchema } from "@follow/database/schemas/types" +import { TranslationService } from "@follow/database/services/translation" +import type { SupportedLanguages } from "@follow/models/types" import type { SupportedActionLanguage } from "@follow/shared" import { getEntry } from "../entry/getter" diff --git a/packages/internal/store/src/types.ts b/packages/internal/store/src/types.ts index a2df0e85e..b7edb9c5e 100644 --- a/packages/internal/store/src/types.ts +++ b/packages/internal/store/src/types.ts @@ -1,5 +1,5 @@ import type { AppType } from "@follow/shared" -import type { authPlugins } from "@follow/shared/src/hono" +import type { authPlugins } from "@follow/shared/hono" import { inferAdditionalFields, twoFactorClient } from "better-auth/client/plugins" import type { createAuthClient } from "better-auth/react" import type { BetterAuthClientPlugin } from "better-auth/types" diff --git a/packages/internal/store/src/unread/store.ts b/packages/internal/store/src/unread/store.ts index 945569277..894d6713f 100644 --- a/packages/internal/store/src/unread/store.ts +++ b/packages/internal/store/src/unread/store.ts @@ -1,7 +1,7 @@ import type { FeedViewType } from "@follow/constants" -import type { UnreadSchema } from "@follow/database/src/schemas/types" -import { EntryService } from "@follow/database/src/services/entry" -import { UnreadService } from "@follow/database/src/services/unread" +import type { UnreadSchema } from "@follow/database/schemas/types" +import { EntryService } from "@follow/database/services/entry" +import { UnreadService } from "@follow/database/services/unread" import { getEntry } from "../entry/getter" import { entryActions } from "../entry/store" diff --git a/packages/internal/store/src/user/store.ts b/packages/internal/store/src/user/store.ts index 92b825ce4..75b029bfc 100644 --- a/packages/internal/store/src/user/store.ts +++ b/packages/internal/store/src/user/store.ts @@ -1,7 +1,7 @@ import { UserRole } from "@follow/constants" -import type { UserSchema } from "@follow/database/src/schemas/types" -import { UserService } from "@follow/database/src/services/user" -import type { AuthSession } from "@follow/shared/src/hono" +import type { UserSchema } from "@follow/database/schemas/types" +import { UserService } from "@follow/database/services/user" +import type { AuthSession } from "@follow/shared/hono" import type { Hydratable } from "../internal/base" import { createImmerSetter, createTransaction, createZustandStore } from "../internal/helper" diff --git a/packages/internal/utils/src/event-bus.native.ts b/packages/internal/utils/src/event-bus.rn.ts similarity index 100% rename from packages/internal/utils/src/event-bus.native.ts rename to packages/internal/utils/src/event-bus.rn.ts diff --git a/packages/internal/utils/src/index.ts b/packages/internal/utils/src/index.ts new file mode 100644 index 000000000..7c96e7fbd --- /dev/null +++ b/packages/internal/utils/src/index.ts @@ -0,0 +1,8 @@ +export * from "./cjk" +export * from "./color" +export * from "./dom" +export * from "./duration" +export * from "./jotai" +export * from "./path-parser" +export * from "./url-for-video" +export * from "./utils"