From a031ac3f5ea70a11d6c3604f11b608f9155b165d Mon Sep 17 00:00:00 2001 From: Innei Date: Tue, 21 Jan 2025 21:54:03 +0800 Subject: [PATCH] feat(rn-settings): impl data settings Signed-off-by: Innei --- apps/mobile/app.config.ts | 6 + apps/mobile/package.json | 1 + apps/mobile/src/atoms/settings/data.ts | 18 ++ .../src/components/ui/grouped/GroupedList.tsx | 33 ++- apps/mobile/src/icons/exit_cute_fi.tsx | 26 +++ apps/mobile/src/interfaces/settings/data.ts | 3 + apps/mobile/src/lib/api-fetch.ts | 25 ++- apps/mobile/src/modules/login/email.tsx | 2 +- .../src/modules/settings/SettingsList.tsx | 34 ++- .../src/modules/settings/routes/Data.tsx | 198 +++++++++++++++++- icons/mgc/exit_cute_fi.svg | 1 + pnpm-lock.yaml | 12 ++ 12 files changed, 348 insertions(+), 11 deletions(-) create mode 100644 apps/mobile/src/atoms/settings/data.ts create mode 100644 apps/mobile/src/icons/exit_cute_fi.tsx create mode 100644 apps/mobile/src/interfaces/settings/data.ts create mode 100644 icons/mgc/exit_cute_fi.svg diff --git a/apps/mobile/app.config.ts b/apps/mobile/app.config.ts index 35636dac3..84a79cd93 100644 --- a/apps/mobile/app.config.ts +++ b/apps/mobile/app.config.ts @@ -50,6 +50,12 @@ export default ({ config }: ConfigContext): ExpoConfig => ({ favicon: iconPath, }, plugins: [ + [ + "expo-document-picker", + { + iCloudContainerEnvironment: "Production", + }, + ], "expo-localization", [ "expo-router", diff --git a/apps/mobile/package.json b/apps/mobile/package.json index e42dd7881..288ed5dce 100644 --- a/apps/mobile/package.json +++ b/apps/mobile/package.json @@ -44,6 +44,7 @@ "expo-clipboard": "~7.0.0", "expo-constants": "~17.0.4", "expo-dev-client": "^5.0.9", + "expo-document-picker": "~13.0.2", "expo-file-system": "~18.0.6", "expo-font": "~13.0.1", "expo-haptics": "~14.0.0", diff --git a/apps/mobile/src/atoms/settings/data.ts b/apps/mobile/src/atoms/settings/data.ts new file mode 100644 index 000000000..b601933b2 --- /dev/null +++ b/apps/mobile/src/atoms/settings/data.ts @@ -0,0 +1,18 @@ +import type { DataSettings } from "@/src/interfaces/settings/data" + +import { createSettingAtom } from "./internal/helper" + +export const createDefaultSettings = (): DataSettings => ({ + sendAnonymousData: true, +}) + +export const { + useSettingKey: useDataSettingKey, + useSettingSelector: useDataSettingSelector, + useSettingKeys: useDataSettingKeys, + setSetting: setDataSetting, + clearSettings: clearDataSettings, + initializeDefaultSettings: initializeDefaultDataSettings, + getSettings: getDataSettings, + useSettingValue: useDataSettingValue, +} = createSettingAtom("data", createDefaultSettings) diff --git a/apps/mobile/src/components/ui/grouped/GroupedList.tsx b/apps/mobile/src/components/ui/grouped/GroupedList.tsx index 78d23dc15..68b85e6d4 100644 --- a/apps/mobile/src/components/ui/grouped/GroupedList.tsx +++ b/apps/mobile/src/components/ui/grouped/GroupedList.tsx @@ -85,12 +85,12 @@ export const GroupedInsetListNavigationLink: FC<{ - + {icon} {label} - + @@ -120,7 +120,7 @@ export const GroupedInsetListNavigationLinkIcon: FC< export const GroupedInsetListCell: FC<{ label: string description?: string - children: React.ReactNode + children?: React.ReactNode }> = ({ label, description, children }) => { return ( @@ -133,3 +133,30 @@ export const GroupedInsetListCell: FC<{ ) } + +export const GroupedInsetListActionCell: FC<{ + label: string + description?: string + onPress: () => void + disabled?: boolean +}> = ({ label, description, onPress, disabled }) => { + const rightIconColor = useColor("tertiaryLabel") + return ( + + {({ pressed }) => ( + + + {label} + {!!description && {description}} + + + + + + + )} + + ) +} diff --git a/apps/mobile/src/icons/exit_cute_fi.tsx b/apps/mobile/src/icons/exit_cute_fi.tsx new file mode 100644 index 000000000..70a895c9d --- /dev/null +++ b/apps/mobile/src/icons/exit_cute_fi.tsx @@ -0,0 +1,26 @@ +import * as React from "react" +import Svg, { Path } from "react-native-svg" + +interface ExitCuteFiIconProps { + width?: number + height?: number + color?: string +} + +export const ExitCuteFiIcon = ({ + width = 24, + height = 24, + color = "#10161F", +}: ExitCuteFiIconProps) => { + return ( + + + + + ) +} diff --git a/apps/mobile/src/interfaces/settings/data.ts b/apps/mobile/src/interfaces/settings/data.ts new file mode 100644 index 000000000..795c83446 --- /dev/null +++ b/apps/mobile/src/interfaces/settings/data.ts @@ -0,0 +1,3 @@ +export interface DataSettings { + sendAnonymousData: boolean +} diff --git a/apps/mobile/src/lib/api-fetch.ts b/apps/mobile/src/lib/api-fetch.ts index 272a6cad3..13b4e2de9 100644 --- a/apps/mobile/src/lib/api-fetch.ts +++ b/apps/mobile/src/lib/api-fetch.ts @@ -1,7 +1,7 @@ /* eslint-disable no-console */ import type { AppType } from "@follow/shared" import { router } from "expo-router" -import { ofetch } from "ofetch" +import { FetchError, ofetch } from "ofetch" import { getCookie } from "./auth" import { getApiUrl } from "./env" @@ -12,11 +12,16 @@ export const apiFetch = ofetch.create({ retry: false, baseURL: getApiUrl(), - onRequest: async ({ options, request }) => { + onRequest: async (ctx) => { + const { options, request } = ctx if (__DEV__) { // Logger console.log(`---> ${options.method} ${request as string}`) } + + // add cookie + options.headers = options.headers || new Headers() + options.headers.set("cookie", getCookie()) }, onRequestError: ({ error, request, options }) => { if (__DEV__) { @@ -54,3 +59,19 @@ export const apiClient = hc(getApiUrl(), { } }, }) + +export const getBizFetchErrorMessage = (error: unknown) => { + if (error instanceof FetchError && error.response) { + try { + const data = JSON.parse(error.response._data) + + if (data.message && data.code) { + // TODO i18n handle by code + return data.message + } + } catch { + return "" + } + } + return "" +} diff --git a/apps/mobile/src/modules/login/email.tsx b/apps/mobile/src/modules/login/email.tsx index 984eecf59..42cfe68f4 100644 --- a/apps/mobile/src/modules/login/email.tsx +++ b/apps/mobile/src/modules/login/email.tsx @@ -134,7 +134,7 @@ export function EmailLogin() { {submitMutation.isPending ? ( diff --git a/apps/mobile/src/modules/settings/SettingsList.tsx b/apps/mobile/src/modules/settings/SettingsList.tsx index 5cb70df4e..e43722972 100644 --- a/apps/mobile/src/modules/settings/SettingsList.tsx +++ b/apps/mobile/src/modules/settings/SettingsList.tsx @@ -1,9 +1,10 @@ import { useBottomTabBarHeight } from "@react-navigation/bottom-tabs" import { useIsFocused } from "@react-navigation/native" +import * as FileSystem from "expo-file-system" import type { FC, RefObject } from "react" import { Fragment, useContext, useEffect } from "react" import type { ScrollView } from "react-native" -import { View } from "react-native" +import { Alert, View } from "react-native" import { useSafeAreaInsets } from "react-native-safe-area-context" import { @@ -12,9 +13,11 @@ import { GroupedInsetListNavigationLinkIcon, } from "@/src/components/ui/grouped/GroupedList" import { SetBottomTabBarVisibleContext } from "@/src/contexts/BottomTabBarVisibleContext" +import { getDbPath } from "@/src/database" import { BellRingingCuteFiIcon } from "@/src/icons/bell_ringing_cute_fi" import { CertificateCuteFiIcon } from "@/src/icons/certificate_cute_fi" import { DatabaseIcon } from "@/src/icons/database" +import { ExitCuteFiIcon } from "@/src/icons/exit_cute_fi" import { Magic2CuteFiIcon } from "@/src/icons/magic_2_cute_fi" import { PaletteCuteFiIcon } from "@/src/icons/palette_cute_fi" import { RadaCuteFiIcon } from "@/src/icons/rada_cute_fi" @@ -23,6 +26,7 @@ import { Settings7CuteFiIcon } from "@/src/icons/settings_7_cute_fi" import { StarCuteFiIcon } from "@/src/icons/star_cute_fi" import { TrophyCuteFiIcon } from "@/src/icons/trophy_cute_fi" import { User3CuteFiIcon } from "@/src/icons/user_3_cute_fi" +import { signOut } from "@/src/lib/auth" import { useSettingsNavigation } from "./hooks" @@ -142,6 +146,33 @@ const PrivacyGroupNavigationLinks: GroupNavigationLink[] = [ }, ] +const ActionGroupNavigationLinks: GroupNavigationLink[] = [ + { + label: "Sign out", + icon: ExitCuteFiIcon, + onPress: () => { + Alert.alert("Sign out", "Are you sure you want to sign out?", [ + { + text: "Cancel", + style: "cancel", + }, + { + text: "Sign out", + style: "destructive", + onPress: async () => { + // sign out + await signOut() + const dbPath = getDbPath() + await FileSystem.deleteAsync(dbPath) + await expo.reloadAppAsync("User sign out") + }, + }, + ]) + }, + iconBackgroundColor: "#F87181", + }, +] + const NavigationLinkGroup: FC<{ links: GroupNavigationLink[] navigation: ReturnType @@ -174,6 +205,7 @@ const navigationGroups = [ DataGroupNavigationLinks, SettingGroupNavigationLinks, PrivacyGroupNavigationLinks, + ActionGroupNavigationLinks, ] as const export const SettingsList: FC<{ scrollRef: RefObject }> = ({ scrollRef }) => { diff --git a/apps/mobile/src/modules/settings/routes/Data.tsx b/apps/mobile/src/modules/settings/routes/Data.tsx index 7bbd240de..feb00aee0 100644 --- a/apps/mobile/src/modules/settings/routes/Data.tsx +++ b/apps/mobile/src/modules/settings/routes/Data.tsx @@ -1,9 +1,199 @@ -import { Text, View } from "react-native" +import * as DocumentPicker from "expo-document-picker" +import * as FileSystem from "expo-file-system" +import * as Sharing from "expo-sharing" +import { Alert, View } from "react-native" + +import { setDataSetting, useDataSettingKey } from "@/src/atoms/settings/data" +import { + NavigationBlurEffectHeader, + SafeNavigationScrollView, +} from "@/src/components/common/SafeNavigationScrollView" +import { + GroupedInsetListActionCell, + GroupedInsetListCard, + GroupedInsetListCell, + GroupedInsetListSectionHeader, +} from "@/src/components/ui/grouped/GroupedList" +import { Switch } from "@/src/components/ui/switch/Switch" +import { getDbPath } from "@/src/database" +import { apiFetch, getBizFetchErrorMessage } from "@/src/lib/api-fetch" +import { toast } from "@/src/lib/toast" + +type FeedResponseList = { + id: string + url: string + title: string | null +}[] + +type FileUpload = { + uri: string + name: string + type: string +} export const DataScreen = () => { + const sendAnonymousData = useDataSettingKey("sendAnonymousData") return ( - - Data Management - + + + + + + + + { + setDataSetting("sendAnonymousData", val) + }} + /> + + + + + {/* Data Sources */} + + + + { + const result = await DocumentPicker.getDocumentAsync({ + type: ["application/octet-stream", "text/x-opml"], + }) + if (result.canceled) { + return + } + + try { + const formData = new FormData() + const file = result.assets[0] + + if (!file) { + toast.error("No file selected") + return + } + + formData.append("file", { + uri: file.uri, + type: file.mimeType || "application/octet-stream", + name: file.name, + } as FileUpload as any) + + const { data } = await apiFetch<{ + data: { + successfulItems: FeedResponseList + conflictItems: FeedResponseList + parsedErrorItems: FeedResponseList + } + }>("/subscriptions/import", { + method: "POST", + body: formData, + headers: { + "Content-Type": "multipart/form-data", + }, + }) + + const { successfulItems, conflictItems, parsedErrorItems } = data + toast.info( + `Import successful, ${successfulItems.length} feeds were imported, ${conflictItems.length} feeds were already subscribed, and ${parsedErrorItems.length} feeds failed to import.`, + ) + } catch (error) { + const bizError = getBizFetchErrorMessage(error) + toast.error(`Import failed${bizError ? `: ${bizError}` : ""}`) + console.error(error) + } + }} + label="Import subscriptions from OPML" + /> + + { + const dbPath = getDbPath() + try { + const destinationUri = `${FileSystem.documentDirectory}follow.db` + await FileSystem.copyAsync({ + from: dbPath, + to: destinationUri, + }) + + await FileSystem.getInfoAsync(destinationUri) + await Sharing.shareAsync(destinationUri, { + UTI: "public.database", + mimeType: "application/x-sqlite3", + dialogTitle: "Export Database", + }) + } catch (error) { + console.error(error) + toast.error("Failed to export database") + } + }} + label="Export local database" + /> + + + + {/* Utils */} + + + + + + { + Alert.alert( + "Rebuild database?", + "This will delete all your offline cached data and rebuild the database, and after that the app will reload.", + [ + { + text: "Cancel", + style: "cancel", + }, + { + text: "Rebuild", + style: "destructive", + onPress: async () => { + const dbPath = getDbPath() + await FileSystem.deleteAsync(dbPath) + await expo.reloadAppAsync("Clear Sqlite Data") + }, + }, + ], + ) + }} + label="Rebuild database" + description="If you are experiencing rendering issues, rebuilding the database may solve them." + /> + + { + Alert.alert("Clear cache?", "This will clear all temporary files and cached data.", [ + { + text: "Cancel", + style: "cancel", + }, + { + text: "Clear", + + isPreferred: true, + onPress: async () => { + const cacheDir = FileSystem.cacheDirectory + if (cacheDir) { + await FileSystem.deleteAsync(cacheDir, { idempotent: true }) + } + toast.success("Cache cleared") + }, + }, + ]) + }} + label="Clear cache" + description="Clear temporary files and cached data to free up storage space." + /> + + + ) } diff --git a/icons/mgc/exit_cute_fi.svg b/icons/mgc/exit_cute_fi.svg new file mode 100644 index 000000000..42d7bed3b --- /dev/null +++ b/icons/mgc/exit_cute_fi.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 437c5b844..b8c4a4a7e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -496,6 +496,9 @@ importers: expo-dev-client: specifier: ^5.0.9 version: 5.0.9(expo@52.0.18(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@expo/metro-runtime@4.0.0(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)))(bufferutil@4.0.8)(encoding@0.1.13)(graphql@16.8.1)(react-native-webview@13.12.5(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1))(react@18.3.1))(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1))(react@18.3.1)) + expo-document-picker: + specifier: ~13.0.2 + version: 13.0.2(expo@52.0.18(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@expo/metro-runtime@4.0.0(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)))(bufferutil@4.0.8)(encoding@0.1.13)(graphql@16.8.1)(react-native-webview@13.12.5(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1))(react@18.3.1))(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1))(react@18.3.1)) expo-file-system: specifier: ~18.0.6 version: 18.0.6(yviy5suycsk3aacmyts4vro3la) @@ -8777,6 +8780,11 @@ packages: peerDependencies: expo: '*' + expo-document-picker@13.0.2: + resolution: {integrity: sha512-Ssnmgx6OTsFEBOx5ktVyJmD5q+7pnGvPRrBHppiJYwX65cREVZuuJ8xAPhoqPHYn65+4WjaxS1lP2rDkSsMo8w==} + peerDependencies: + expo: '*' + expo-drizzle-studio-plugin@0.1.1: resolution: {integrity: sha512-OfV79+crmAIMK0jlwmVOMRXdss5rEHtA8vDALPLkjisDSAVEwElzx4OEGuUG/Pf8QlTGUEr7kK3WtCoQvWzo8g==} peerDependencies: @@ -24711,6 +24719,10 @@ snapshots: expo: 52.0.18(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@expo/metro-runtime@4.0.0(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)))(bufferutil@4.0.8)(encoding@0.1.13)(graphql@16.8.1)(react-native-webview@13.12.5(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1))(react@18.3.1))(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1))(react@18.3.1) expo-dev-menu-interface: 1.9.2(expo@52.0.18(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@expo/metro-runtime@4.0.0(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)))(bufferutil@4.0.8)(encoding@0.1.13)(graphql@16.8.1)(react-native-webview@13.12.5(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1))(react@18.3.1))(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1))(react@18.3.1)) + expo-document-picker@13.0.2(expo@52.0.18(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@expo/metro-runtime@4.0.0(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)))(bufferutil@4.0.8)(encoding@0.1.13)(graphql@16.8.1)(react-native-webview@13.12.5(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1))(react@18.3.1))(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1))(react@18.3.1)): + dependencies: + expo: 52.0.18(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@expo/metro-runtime@4.0.0(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)))(bufferutil@4.0.8)(encoding@0.1.13)(graphql@16.8.1)(react-native-webview@13.12.5(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1))(react@18.3.1))(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1))(react@18.3.1) + expo-drizzle-studio-plugin@0.1.1(vc5zx7mqwgzirpvpjamp5nboge): dependencies: expo: 52.0.18(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@expo/metro-runtime@4.0.0(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)))(bufferutil@4.0.8)(encoding@0.1.13)(graphql@16.8.1)(react-native-webview@13.12.5(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1))(react@18.3.1))(react-native@0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1))(react@18.3.1)