diff --git a/.gitignore b/.gitignore index 6dacb2f8..9cd9b97e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -node_modules/**/* -.expo/* +node_modules/ +.expo/ .expo-shared/ npm-debug.* *.jks diff --git a/App.tsx b/App.tsx index a69a1ef0..bf57ef38 100644 --- a/App.tsx +++ b/App.tsx @@ -2,12 +2,12 @@ import React from 'react' import { AppearanceProvider } from 'react-native-appearance' import { QueryCache, ReactQueryCacheProvider, setConsole } from 'react-query' import { Provider } from 'react-redux' - -import ThemeManager from 'src/utils/styles/ThemeManager' -import { Index } from 'src/Index' -import { persistor, store } from 'src/store' import { PersistGate } from 'redux-persist/integration/react' +import { Index } from './src/Index' +import { persistor, store } from './src/store' +import ThemeManager from '@utils/styles/ThemeManager' + const queryCache = new QueryCache() setConsole({ @@ -33,7 +33,7 @@ const App: React.FC = () => { {bootstrapped => { if (bootstrapped) { - require('src/i18n/i18n') + require('@root/i18n/i18n') return ( diff --git a/app.config.ts b/app.config.ts index b50bdd32..439d063f 100644 --- a/app.config.ts +++ b/app.config.ts @@ -13,6 +13,7 @@ export default (): ExpoConfig => ({ developmentClient: { silentLaunch: true }, scheme: 'mastodonct', ios: { + bundleIdentifier: 'com.xmflsct.mastodon-app', infoPlist: { CFBundleAllowMixedLocalizations: true }, diff --git a/babel.config.js b/babel.config.js index e5e6c445..d260ea40 100644 --- a/babel.config.js +++ b/babel.config.js @@ -7,8 +7,13 @@ module.exports = function (api) { [ 'module-resolver', { + root: ['./'], alias: { - src: './src' + '@root': './src', + '@api': './src/api', + '@components': './src/components', + '@screens': './src/screens', + '@utils': './src/utils' } } ] diff --git a/src/Index.tsx b/src/Index.tsx index 50c0be08..313930c1 100644 --- a/src/Index.tsx +++ b/src/Index.tsx @@ -8,15 +8,15 @@ import { StatusBar } from 'react-native' import Toast from 'react-native-toast-message' import { Feather } from '@expo/vector-icons' -import ScreenLocal from 'src/screens/Local' -import ScreenPublic from 'src/screens/Public' -import ScreenNotifications from 'src/screens/Notifications' -import ScreenMe from 'src/screens/Me' +import ScreenLocal from '@screens/Local' +import ScreenPublic from '@screens/Public' +import ScreenNotifications from '@screens/Notifications' +import ScreenMe from '@screens/Me' -import { themes } from 'src/utils/styles/themes' -import { useTheme } from 'src/utils/styles/ThemeManager' -import getCurrentTab from 'src/utils/getCurrentTab' -import { toastConfig } from 'src/components/toast' +import { themes } from '@utils/styles/themes' +import { useTheme } from '@utils/styles/ThemeManager' +import getCurrentTab from '@utils/getCurrentTab' +import { toastConfig } from '@components/toast' import { useTranslation } from 'react-i18next' enableScreens() @@ -45,7 +45,7 @@ export const Index: React.FC = () => { ({ tabBarIcon: ({ focused, color, size }) => { - let name: string + let name: any switch (route.name) { case 'Screen-Local': name = 'home' diff --git a/src/api/client.ts b/src/api/client.ts index 5e6385cb..4231e991 100644 --- a/src/api/client.ts +++ b/src/api/client.ts @@ -1,5 +1,5 @@ import axios from 'axios' -import { store, RootState } from 'src/store' +import { store, RootState } from '@root/store' const client = async ({ method, diff --git a/src/components/BottomSheet.tsx b/src/components/BottomSheet.tsx index 967c0e5a..a77af39a 100644 --- a/src/components/BottomSheet.tsx +++ b/src/components/BottomSheet.tsx @@ -8,9 +8,9 @@ import { View } from 'react-native' import { useSafeAreaInsets } from 'react-native-safe-area-context' -import { useTheme } from 'src/utils/styles/ThemeManager' -import { StyleConstants } from 'src/utils/styles/constants' -import { ButtonRow } from './Button' +import { useTheme } from '@utils/styles/ThemeManager' +import { StyleConstants } from '@utils/styles/constants' +import { ButtonRow } from '@components/Button' export interface Props { children: React.ReactNode diff --git a/src/components/Button.tsx b/src/components/Button.tsx index 8260a62e..342b645a 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -1,4 +1,4 @@ -import ButtonRound from './Button/ButtonRound' -import ButtonRow from './Button/ButtonRow' +import ButtonRound from '@components/Button/ButtonRound' +import ButtonRow from '@components/Button/ButtonRow' export { ButtonRound, ButtonRow } diff --git a/src/components/Button/ButtonRound.tsx b/src/components/Button/ButtonRound.tsx index 4090ce21..195d6d45 100644 --- a/src/components/Button/ButtonRound.tsx +++ b/src/components/Button/ButtonRound.tsx @@ -1,8 +1,8 @@ import { Feather } from '@expo/vector-icons' import React from 'react' import { Pressable, StyleSheet } from 'react-native' -import { StyleConstants } from 'src/utils/styles/constants' -import { useTheme } from 'src/utils/styles/ThemeManager' +import { StyleConstants } from '@utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' export interface Props { styles: any diff --git a/src/components/Button/ButtonRow.tsx b/src/components/Button/ButtonRow.tsx index 9ce07c94..3036feb7 100644 --- a/src/components/Button/ButtonRow.tsx +++ b/src/components/Button/ButtonRow.tsx @@ -1,8 +1,8 @@ import { Feather } from '@expo/vector-icons' import React from 'react' import { Pressable, StyleSheet, Text } from 'react-native' -import { StyleConstants } from 'src/utils/styles/constants' -import { useTheme } from 'src/utils/styles/ThemeManager' +import { StyleConstants } from '@utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' type PropsBase = { onPress: () => void diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 868ea669..3e3fc582 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -1,4 +1,4 @@ -import HeaderLeft from './Header/Left' -import HeaderRight from './Header/Right' +import HeaderLeft from '@components/Header/Left' +import HeaderRight from '@components/Header/Right' export { HeaderLeft, HeaderRight } diff --git a/src/components/Header/Left.tsx b/src/components/Header/Left.tsx index c4dc5c70..2ad90f91 100644 --- a/src/components/Header/Left.tsx +++ b/src/components/Header/Left.tsx @@ -2,8 +2,8 @@ import { Feather } from '@expo/vector-icons' import React from 'react' import { Pressable, StyleSheet, Text } from 'react-native' -import { useTheme } from 'src/utils/styles/ThemeManager' -import { StyleConstants } from 'src/utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' +import { StyleConstants } from '@utils/styles/constants' export interface Props { onPress: () => void diff --git a/src/components/Header/Right.tsx b/src/components/Header/Right.tsx index 8f901917..9b3bac00 100644 --- a/src/components/Header/Right.tsx +++ b/src/components/Header/Right.tsx @@ -2,8 +2,8 @@ import { Feather } from '@expo/vector-icons' import React from 'react' import { Pressable, StyleSheet, Text } from 'react-native' -import { useTheme } from 'src/utils/styles/ThemeManager' -import { StyleConstants } from 'src/utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' +import { StyleConstants } from '@utils/styles/constants' type PropsBase = { disabled?: boolean diff --git a/src/components/Menu.tsx b/src/components/Menu.tsx index 08e76a9f..68d491f7 100644 --- a/src/components/Menu.tsx +++ b/src/components/Menu.tsx @@ -1,5 +1,5 @@ -import MenuContainer from './Menu/Container' -import MenuHeader from './Menu/Header' -import MenuRow from './Menu/Row' +import MenuContainer from '@components/Menu/Container' +import MenuHeader from '@components/Menu/Header' +import MenuRow from '@components/Menu/Row' export { MenuContainer, MenuHeader, MenuRow } diff --git a/src/components/Menu/Button.tsx b/src/components/Menu/Button.tsx index 906e9b34..f1db682c 100644 --- a/src/components/Menu/Button.tsx +++ b/src/components/Menu/Button.tsx @@ -8,8 +8,8 @@ import { Text, View } from 'react-native' -import { useTheme } from 'src/utils/styles/ThemeManager' -import { StyleConstants } from 'src/utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' +import { StyleConstants } from '@utils/styles/constants' export interface Props { text: string diff --git a/src/components/Menu/Container.tsx b/src/components/Menu/Container.tsx index aaf001f2..6f37de22 100644 --- a/src/components/Menu/Container.tsx +++ b/src/components/Menu/Container.tsx @@ -1,7 +1,7 @@ import React, { Children } from 'react' import { StyleSheet, View } from 'react-native' -import { useTheme } from 'src/utils/styles/ThemeManager' -import { StyleConstants } from 'src/utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' +import { StyleConstants } from '@utils/styles/constants' export interface Props { children: React.ReactNode diff --git a/src/components/Menu/Header.tsx b/src/components/Menu/Header.tsx index 62e67570..76be5ede 100644 --- a/src/components/Menu/Header.tsx +++ b/src/components/Menu/Header.tsx @@ -1,7 +1,7 @@ import React from 'react' import { StyleSheet, Text, View } from 'react-native' -import { StyleConstants } from 'src/utils/styles/constants' -import { useTheme } from 'src/utils/styles/ThemeManager' +import { StyleConstants } from '@utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' export interface Props { heading: string diff --git a/src/components/Menu/Row.tsx b/src/components/Menu/Row.tsx index 04ad55f9..a977a4d1 100644 --- a/src/components/Menu/Row.tsx +++ b/src/components/Menu/Row.tsx @@ -1,10 +1,10 @@ import React from 'react' import { Pressable, StyleSheet, Text, View } from 'react-native' import { Feather } from '@expo/vector-icons' -import { useTheme } from 'src/utils/styles/ThemeManager' +import { useTheme } from '@utils/styles/ThemeManager' -import { ColorDefinitions } from 'src/utils/styles/themes' -import { StyleConstants } from 'src/utils/styles/constants' +import { ColorDefinitions } from '@utils/styles/themes' +import { StyleConstants } from '@utils/styles/constants' export interface Props { iconFront?: any diff --git a/src/components/NetworkState.tsx b/src/components/NetworkState.tsx deleted file mode 100644 index 07e1ce72..00000000 --- a/src/components/NetworkState.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import NetworkStateError from './NetworkState/Error' - -export { NetworkStateError } diff --git a/src/components/ParseContent.tsx b/src/components/ParseContent.tsx index f5b8a1cb..3d2a5419 100644 --- a/src/components/ParseContent.tsx +++ b/src/components/ParseContent.tsx @@ -3,10 +3,10 @@ import { Pressable, Text } from 'react-native' import HTMLView from 'react-native-htmlview' import { useNavigation } from '@react-navigation/native' -import Emojis from 'src/components/Timelines/Timeline/Shared/Emojis' -import { useTheme } from 'src/utils/styles/ThemeManager' +import Emojis from '@components/Timelines/Timeline/Shared/Emojis' +import { useTheme } from '@utils/styles/ThemeManager' import { Feather } from '@expo/vector-icons' -import { StyleConstants } from 'src/utils/styles/constants' +import { StyleConstants } from '@utils/styles/constants' import { LinearGradient } from 'expo-linear-gradient' // Prevent going to the same hashtag multiple times diff --git a/src/components/Timelines.tsx b/src/components/Timelines.tsx index 70f71a2d..9392171f 100644 --- a/src/components/Timelines.tsx +++ b/src/components/Timelines.tsx @@ -5,17 +5,17 @@ import { createNativeStackNavigator } from 'react-native-screens/native-stack' import { useSelector } from 'react-redux' import { Feather } from '@expo/vector-icons' -import Timeline from './Timelines/Timeline' -import sharedScreens from 'src/screens/Shared/sharedScreens' +import Timeline from '@components/Timelines/Timeline' +import sharedScreens from '@screens/Shared/sharedScreens' import { getLocalUrl, getRemoteUrl, InstancesState -} from 'src/utils/slices/instancesSlice' -import { useTheme } from 'src/utils/styles/ThemeManager' +} from '@utils/slices/instancesSlice' +import { useTheme } from '@utils/styles/ThemeManager' import { useNavigation } from '@react-navigation/native' -import getCurrentTab from 'src/utils/getCurrentTab' -import PleaseLogin from './PleaseLogin' +import getCurrentTab from '@utils/getCurrentTab' +import PleaseLogin from '@components/PleaseLogin' const Stack = createNativeStackNavigator() diff --git a/src/components/Timelines/Timeline.tsx b/src/components/Timelines/Timeline.tsx index a187e368..e8df36d6 100644 --- a/src/components/Timelines/Timeline.tsx +++ b/src/components/Timelines/Timeline.tsx @@ -2,13 +2,13 @@ import React, { useCallback, useEffect, useMemo, useRef } from 'react' import { AppState, FlatList, StyleSheet } from 'react-native' import { setFocusHandler, useInfiniteQuery } from 'react-query' -import TimelineNotifications from 'src/components/Timelines/Timeline/Notifications' -import TimelineDefault from 'src/components/Timelines/Timeline/Default' -import TimelineConversation from 'src/components/Timelines/Timeline/Conversation' -import { timelineFetch } from 'src/utils/fetches/timelineFetch' -import TimelineSeparator from './Timeline/Separator' -import TimelineEmpty from './Timeline/Empty' -import TimelineEnd from './Timeline/Shared/End' +import TimelineNotifications from '@components/Timelines/Timeline/Notifications' +import TimelineDefault from '@components/Timelines/Timeline/Default' +import TimelineConversation from '@components/Timelines/Timeline/Conversation' +import { timelineFetch } from '@utils/fetches/timelineFetch' +import TimelineSeparator from '@components/Timelines/Timeline/Separator' +import TimelineEmpty from '@components/Timelines/Timeline/Empty' +import TimelineEnd from '@components/Timelines/Timeline/Shared/End' export interface Props { page: App.Pages diff --git a/src/components/Timelines/Timeline/Conversation.tsx b/src/components/Timelines/Timeline/Conversation.tsx index f9862d83..7be19737 100644 --- a/src/components/Timelines/Timeline/Conversation.tsx +++ b/src/components/Timelines/Timeline/Conversation.tsx @@ -2,11 +2,11 @@ import React, { useCallback, useMemo } from 'react' import { Pressable, StyleSheet, View } from 'react-native' import { useNavigation } from '@react-navigation/native' -import TimelineAvatar from './Shared/Avatar' -import TimelineHeaderConversation from './Shared/HeaderConversation' -import TimelineContent from './Shared/Content' -import { StyleConstants } from 'src/utils/styles/constants' -import TimelineActions from './Shared/Actions' +import TimelineAvatar from '@components/Timelines/Timeline/Shared/Avatar' +import TimelineHeaderConversation from '@components/Timelines/Timeline/Shared/HeaderConversation' +import TimelineContent from '@components/Timelines/Timeline/Shared/Content' +import { StyleConstants } from '@utils/styles/constants' +import TimelineActions from '@components/Timelines/Timeline/Shared/Actions' export interface Props { item: Mastodon.Conversation diff --git a/src/components/Timelines/Timeline/Default.tsx b/src/components/Timelines/Timeline/Default.tsx index e9cfb305..67804870 100644 --- a/src/components/Timelines/Timeline/Default.tsx +++ b/src/components/Timelines/Timeline/Default.tsx @@ -2,16 +2,16 @@ import React, { useCallback, useMemo } from 'react' import { Dimensions, Pressable, StyleSheet, View } from 'react-native' import { useNavigation } from '@react-navigation/native' -import TimelineActioned from './Shared/Actioned' -import TimelineActions from './Shared/Actions' -import TimelineAttachment from './Shared/Attachment' -import TimelineAvatar from './Shared/Avatar' -import TimelineCard from './Shared/Card' -import TimelineContent from './Shared/Content' -import TimelineHeaderDefault from './Shared/HeaderDefault' -import TimelinePoll from './Shared/Poll' +import TimelineActioned from '@components/Timelines/Timeline/Shared/Actioned' +import TimelineActions from '@components/Timelines/Timeline/Shared/Actions' +import TimelineAttachment from '@components/Timelines/Timeline/Shared/Attachment' +import TimelineAvatar from '@components/Timelines/Timeline/Shared/Avatar' +import TimelineCard from '@components/Timelines/Timeline/Shared/Card' +import TimelineContent from '@components/Timelines/Timeline/Shared/Content' +import TimelineHeaderDefault from '@components/Timelines/Timeline/Shared/HeaderDefault' +import TimelinePoll from '@components/Timelines/Timeline/Shared/Poll' -import { StyleConstants } from 'src/utils/styles/constants' +import { StyleConstants } from '@utils/styles/constants' export interface Props { item: Mastodon.Status diff --git a/src/components/Timelines/Timeline/Empty.tsx b/src/components/Timelines/Timeline/Empty.tsx index e3407b2f..df5c4bf2 100644 --- a/src/components/Timelines/Timeline/Empty.tsx +++ b/src/components/Timelines/Timeline/Empty.tsx @@ -2,9 +2,9 @@ import { Feather } from '@expo/vector-icons' import React, { useMemo } from 'react' import { ActivityIndicator, StyleSheet, Text, View } from 'react-native' import { QueryStatus } from 'react-query' -import { ButtonRow } from 'src/components/Button' -import { StyleConstants } from 'src/utils/styles/constants' -import { useTheme } from 'src/utils/styles/ThemeManager' +import { ButtonRow } from '@components/Button' +import { StyleConstants } from '@utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' export interface Props { status: QueryStatus @@ -43,7 +43,6 @@ const TimelineEmpty: React.FC = ({ status, refetch }) => { 空无一物 - refetch()} /> ) } diff --git a/src/components/Timelines/Timeline/Notifications.tsx b/src/components/Timelines/Timeline/Notifications.tsx index 28d151be..ab449961 100644 --- a/src/components/Timelines/Timeline/Notifications.tsx +++ b/src/components/Timelines/Timeline/Notifications.tsx @@ -2,16 +2,16 @@ import React, { useCallback, useMemo } from 'react' import { Dimensions, Pressable, StyleSheet, View } from 'react-native' import { useNavigation } from '@react-navigation/native' -import TimelineActioned from './Shared/Actioned' -import TimelineActions from './Shared/Actions' -import TimelineAttachment from './Shared/Attachment' -import TimelineAvatar from './Shared/Avatar' -import TimelineCard from './Shared/Card' -import TimelineContent from './Shared/Content' -import TimelineHeaderNotification from './Shared/HeaderNotification' -import TimelinePoll from './Shared/Poll' +import TimelineActioned from '@components/Timelines/Timeline/Shared/Actioned' +import TimelineActions from '@components/Timelines/Timeline/Shared/Actions' +import TimelineAttachment from '@components/Timelines/Timeline/Shared/Attachment' +import TimelineAvatar from '@components/Timelines/Timeline/Shared/Avatar' +import TimelineCard from '@components/Timelines/Timeline/Shared/Card' +import TimelineContent from '@components/Timelines/Timeline/Shared/Content' +import TimelineHeaderNotification from '@components/Timelines/Timeline/Shared/HeaderNotification' +import TimelinePoll from '@components/Timelines/Timeline/Shared/Poll' -import { StyleConstants } from 'src/utils/styles/constants' +import { StyleConstants } from '@utils/styles/constants' export interface Props { notification: Mastodon.Notification diff --git a/src/components/Timelines/Timeline/Separator.tsx b/src/components/Timelines/Timeline/Separator.tsx index 8ddbdbf4..4b88fb41 100644 --- a/src/components/Timelines/Timeline/Separator.tsx +++ b/src/components/Timelines/Timeline/Separator.tsx @@ -1,8 +1,8 @@ import React from 'react' import { StyleSheet, View } from 'react-native' -import { useTheme } from 'src/utils/styles/ThemeManager' -import { StyleConstants } from 'src/utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' +import { StyleConstants } from '@utils/styles/constants' export interface Props { highlighted?: boolean diff --git a/src/components/Timelines/Timeline/Shared/Actioned.tsx b/src/components/Timelines/Timeline/Shared/Actioned.tsx index 6b44308a..40260781 100644 --- a/src/components/Timelines/Timeline/Shared/Actioned.tsx +++ b/src/components/Timelines/Timeline/Shared/Actioned.tsx @@ -2,9 +2,9 @@ import React from 'react' import { StyleSheet, Text, View } from 'react-native' import { Feather } from '@expo/vector-icons' -import Emojis from './Emojis' -import { useTheme } from 'src/utils/styles/ThemeManager' -import { StyleConstants } from 'src/utils/styles/constants' +import Emojis from '@components/Timelines/Timeline/Shared/Emojis' +import { useTheme } from '@utils/styles/ThemeManager' +import { StyleConstants } from '@utils/styles/constants' export interface Props { account: Mastodon.Account diff --git a/src/components/Timelines/Timeline/Shared/Actions.tsx b/src/components/Timelines/Timeline/Shared/Actions.tsx index 6f3f7514..7a2f7422 100644 --- a/src/components/Timelines/Timeline/Shared/Actions.tsx +++ b/src/components/Timelines/Timeline/Shared/Actions.tsx @@ -3,12 +3,12 @@ import { ActionSheetIOS, Pressable, StyleSheet, Text, View } from 'react-native' import { useMutation, useQueryCache } from 'react-query' import { Feather } from '@expo/vector-icons' -import client from 'src/api/client' -import { useTheme } from 'src/utils/styles/ThemeManager' -import { toast } from 'src/components/toast' -import { StyleConstants } from 'src/utils/styles/constants' +import client from '@api/client' +import { useTheme } from '@utils/styles/ThemeManager' +import { toast } from '@components/toast' +import { StyleConstants } from '@utils/styles/constants' import { useNavigation } from '@react-navigation/native' -import getCurrentTab from 'src/utils/getCurrentTab' +import getCurrentTab from '@utils/getCurrentTab' const fireMutation = async ({ id, diff --git a/src/components/Timelines/Timeline/Shared/Attachment.tsx b/src/components/Timelines/Timeline/Shared/Attachment.tsx index d7812325..dc5555df 100644 --- a/src/components/Timelines/Timeline/Shared/Attachment.tsx +++ b/src/components/Timelines/Timeline/Shared/Attachment.tsx @@ -1,11 +1,11 @@ import { BlurView } from 'expo-blur' import React, { useCallback, useEffect, useState } from 'react' import { Pressable, StyleSheet, Text, View } from 'react-native' -import { StyleConstants } from 'src/utils/styles/constants' -import { useTheme } from 'src/utils/styles/ThemeManager' +import { StyleConstants } from '@utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' -import AttachmentImage from './Attachment/AttachmentImage' -import AttachmentVideo from './Attachment/AttachmentVideo' +import AttachmentImage from '@components/Timelines/Timeline/Shared/Attachment/AttachmentImage' +import AttachmentVideo from '@components/Timelines/Timeline/Shared/Attachment/AttachmentVideo' export interface Props { status: Pick diff --git a/src/components/Timelines/Timeline/Shared/Attachment/AttachmentImage.tsx b/src/components/Timelines/Timeline/Shared/Attachment/AttachmentImage.tsx index 8d9709e3..d45f9734 100644 --- a/src/components/Timelines/Timeline/Shared/Attachment/AttachmentImage.tsx +++ b/src/components/Timelines/Timeline/Shared/Attachment/AttachmentImage.tsx @@ -1,7 +1,7 @@ import React, { useState } from 'react' import { Image, Modal, StyleSheet, Pressable, View } from 'react-native' import ImageViewer from 'react-native-image-zoom-viewer' -import { StyleConstants } from 'src/utils/styles/constants' +import { StyleConstants } from '@utils/styles/constants' export interface Props { media_attachments: Mastodon.Attachment[] diff --git a/src/components/Timelines/Timeline/Shared/Attachment/AttachmentVideo.tsx b/src/components/Timelines/Timeline/Shared/Attachment/AttachmentVideo.tsx index 1ab0e98e..4b4eb66f 100644 --- a/src/components/Timelines/Timeline/Shared/Attachment/AttachmentVideo.tsx +++ b/src/components/Timelines/Timeline/Shared/Attachment/AttachmentVideo.tsx @@ -1,7 +1,7 @@ import React, { useCallback, useRef, useState } from 'react' import { View } from 'react-native' import { Video } from 'expo-av' -import { ButtonRound } from 'src/components/Button' +import { ButtonRound } from '@components/Button' export interface Props { media_attachments: Mastodon.AttachmentVideo[] diff --git a/src/components/Timelines/Timeline/Shared/Avatar.tsx b/src/components/Timelines/Timeline/Shared/Avatar.tsx index b5c68cd2..552f6669 100644 --- a/src/components/Timelines/Timeline/Shared/Avatar.tsx +++ b/src/components/Timelines/Timeline/Shared/Avatar.tsx @@ -1,7 +1,7 @@ import React, { useCallback } from 'react' import { Image, Pressable, StyleSheet } from 'react-native' import { useNavigation } from '@react-navigation/native' -import { StyleConstants } from 'src/utils/styles/constants' +import { StyleConstants } from '@utils/styles/constants' export interface Props { account: Mastodon.Account diff --git a/src/components/Timelines/Timeline/Shared/Card.tsx b/src/components/Timelines/Timeline/Shared/Card.tsx index fbe980f3..9a082455 100644 --- a/src/components/Timelines/Timeline/Shared/Card.tsx +++ b/src/components/Timelines/Timeline/Shared/Card.tsx @@ -1,8 +1,8 @@ import React, { useCallback } from 'react' import { Image, Pressable, StyleSheet, Text, View } from 'react-native' import { useNavigation } from '@react-navigation/native' -import { StyleConstants } from 'src/utils/styles/constants' -import { useTheme } from 'src/utils/styles/ThemeManager' +import { StyleConstants } from '@utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' export interface Props { card: Mastodon.Card diff --git a/src/components/Timelines/Timeline/Shared/Content.tsx b/src/components/Timelines/Timeline/Shared/Content.tsx index ac17fac5..cf52f802 100644 --- a/src/components/Timelines/Timeline/Shared/Content.tsx +++ b/src/components/Timelines/Timeline/Shared/Content.tsx @@ -2,10 +2,10 @@ import React, { useState } from 'react' import { Pressable, Text } from 'react-native' import Collapsible from 'react-native-collapsible' -import ParseContent from 'src/components/ParseContent' +import ParseContent from '@components/ParseContent' -import { useTheme } from 'src/utils/styles/ThemeManager' -import { StyleConstants } from 'src/utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' +import { StyleConstants } from '@utils/styles/constants' import { LinearGradient } from 'expo-linear-gradient' export interface Props { diff --git a/src/components/Timelines/Timeline/Shared/Emojis.tsx b/src/components/Timelines/Timeline/Shared/Emojis.tsx index 5da48eb4..d64c54eb 100644 --- a/src/components/Timelines/Timeline/Shared/Emojis.tsx +++ b/src/components/Timelines/Timeline/Shared/Emojis.tsx @@ -1,7 +1,7 @@ import React from 'react' import { Image, StyleSheet, Text, View } from 'react-native' -import { useTheme } from 'src/utils/styles/ThemeManager' -import { StyleConstants } from 'src/utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' +import { StyleConstants } from '@utils/styles/constants' const regexEmoji = new RegExp(/(:[a-z0-9_]+:)/) diff --git a/src/components/Timelines/Timeline/Shared/End.tsx b/src/components/Timelines/Timeline/Shared/End.tsx index 43a8f846..ea0a90f6 100644 --- a/src/components/Timelines/Timeline/Shared/End.tsx +++ b/src/components/Timelines/Timeline/Shared/End.tsx @@ -1,8 +1,8 @@ import { Feather } from '@expo/vector-icons' import React from 'react' import { ActivityIndicator, StyleSheet, Text, View } from 'react-native' -import { StyleConstants } from 'src/utils/styles/constants' -import { useTheme } from 'src/utils/styles/ThemeManager' +import { StyleConstants } from '@utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' export interface Props { isFetchingMore: false | 'previous' | 'next' | undefined diff --git a/src/components/Timelines/Timeline/Shared/HeaderConversation.tsx b/src/components/Timelines/Timeline/Shared/HeaderConversation.tsx index 21ee758a..cd319c4a 100644 --- a/src/components/Timelines/Timeline/Shared/HeaderConversation.tsx +++ b/src/components/Timelines/Timeline/Shared/HeaderConversation.tsx @@ -2,13 +2,13 @@ import { Feather } from '@expo/vector-icons' import React, { useCallback, useMemo } from 'react' import { Pressable, StyleSheet, Text, View } from 'react-native' import { useMutation, useQueryCache } from 'react-query' -import client from 'src/api/client' -import { toast } from 'src/components/toast' +import client from '@api/client' +import { toast } from '@components/toast' -import relativeTime from 'src/utils/relativeTime' -import { StyleConstants } from 'src/utils/styles/constants' -import { useTheme } from 'src/utils/styles/ThemeManager' -import Emojis from './Emojis' +import relativeTime from '@utils/relativeTime' +import { StyleConstants } from '@utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' +import Emojis from '@components/Timelines/Timeline/Shared/Emojis' export interface Props { queryKey: App.QueryKey diff --git a/src/components/Timelines/Timeline/Shared/HeaderDefault.tsx b/src/components/Timelines/Timeline/Shared/HeaderDefault.tsx index 2c0e01ef..684269f3 100644 --- a/src/components/Timelines/Timeline/Shared/HeaderDefault.tsx +++ b/src/components/Timelines/Timeline/Shared/HeaderDefault.tsx @@ -3,16 +3,16 @@ import { Pressable, StyleSheet, Text, View } from 'react-native' import { useNavigation } from '@react-navigation/native' import { Feather } from '@expo/vector-icons' -import Emojis from './Emojis' -import relativeTime from 'src/utils/relativeTime' -import { getLocalAccountId, getLocalUrl } from 'src/utils/slices/instancesSlice' -import { useTheme } from 'src/utils/styles/ThemeManager' -import BottomSheet from 'src/components/BottomSheet' +import Emojis from '@components/Timelines/Timeline/Shared/Emojis' +import relativeTime from '@utils/relativeTime' +import { getLocalAccountId, getLocalUrl } from '@utils/slices/instancesSlice' +import { useTheme } from '@utils/styles/ThemeManager' +import BottomSheet from '@components/BottomSheet' import { useSelector } from 'react-redux' -import { StyleConstants } from 'src/utils/styles/constants' -import HeaderDefaultActionsAccount from './HeaderDefault/ActionsAccount' -import HeaderDefaultActionsStatus from './HeaderDefault/ActionsStatus' -import HeaderDefaultActionsDomain from './HeaderDefault/ActionsDomain' +import { StyleConstants } from '@utils/styles/constants' +import HeaderDefaultActionsAccount from '@components/Timelines/Timeline/Shared/HeaderDefault/ActionsAccount' +import HeaderDefaultActionsStatus from '@components/Timelines/Timeline/Shared/HeaderDefault/ActionsStatus' +import HeaderDefaultActionsDomain from '@components/Timelines/Timeline/Shared/HeaderDefault/ActionsDomain' export interface Props { queryKey?: App.QueryKey diff --git a/src/components/Timelines/Timeline/Shared/HeaderDefault/ActionsAccount.tsx b/src/components/Timelines/Timeline/Shared/HeaderDefault/ActionsAccount.tsx index 6518e06d..07bb9ac7 100644 --- a/src/components/Timelines/Timeline/Shared/HeaderDefault/ActionsAccount.tsx +++ b/src/components/Timelines/Timeline/Shared/HeaderDefault/ActionsAccount.tsx @@ -1,8 +1,8 @@ import React from 'react' import { useMutation, useQueryCache } from 'react-query' -import client from 'src/api/client' -import { MenuContainer, MenuHeader, MenuRow } from 'src/components/Menu' -import { toast } from 'src/components/toast' +import client from '@api/client' +import { MenuContainer, MenuHeader, MenuRow } from '@components/Menu' +import { toast } from '@components/toast' const fireMutation = async ({ type, diff --git a/src/components/Timelines/Timeline/Shared/HeaderDefault/ActionsDomain.tsx b/src/components/Timelines/Timeline/Shared/HeaderDefault/ActionsDomain.tsx index 906efd43..4e34c58f 100644 --- a/src/components/Timelines/Timeline/Shared/HeaderDefault/ActionsDomain.tsx +++ b/src/components/Timelines/Timeline/Shared/HeaderDefault/ActionsDomain.tsx @@ -1,10 +1,10 @@ import React from 'react' import { useMutation, useQueryCache } from 'react-query' -import client from 'src/api/client' -import MenuContainer from 'src/components/Menu/Container' -import MenuHeader from 'src/components/Menu/Header' -import MenuRow from 'src/components/Menu/Row' -import { toast } from 'src/components/toast' +import client from '@api/client' +import MenuContainer from '@components/Menu/Container' +import MenuHeader from '@components/Menu/Header' +import MenuRow from '@components/Menu/Row' +import { toast } from '@components/toast' const fireMutation = async ({ domain }: { domain: string }) => { const res = await client({ diff --git a/src/components/Timelines/Timeline/Shared/HeaderDefault/ActionsStatus.tsx b/src/components/Timelines/Timeline/Shared/HeaderDefault/ActionsStatus.tsx index d74ecde8..68ceb08f 100644 --- a/src/components/Timelines/Timeline/Shared/HeaderDefault/ActionsStatus.tsx +++ b/src/components/Timelines/Timeline/Shared/HeaderDefault/ActionsStatus.tsx @@ -2,10 +2,10 @@ import { useNavigation } from '@react-navigation/native' import React from 'react' import { Alert } from 'react-native' import { useMutation, useQueryCache } from 'react-query' -import client from 'src/api/client' -import { MenuContainer, MenuHeader, MenuRow } from 'src/components/Menu' -import { toast } from 'src/components/toast' -import getCurrentTab from 'src/utils/getCurrentTab' +import client from '@api/client' +import { MenuContainer, MenuHeader, MenuRow } from '@components/Menu' +import { toast } from '@components/toast' +import getCurrentTab from '@utils/getCurrentTab' const fireMutation = async ({ id, diff --git a/src/components/Timelines/Timeline/Shared/HeaderNotification.tsx b/src/components/Timelines/Timeline/Shared/HeaderNotification.tsx index 56a8896a..96b21051 100644 --- a/src/components/Timelines/Timeline/Shared/HeaderNotification.tsx +++ b/src/components/Timelines/Timeline/Shared/HeaderNotification.tsx @@ -9,14 +9,14 @@ import { import { useNavigation } from '@react-navigation/native' import { Feather } from '@expo/vector-icons' -import Emojis from './Emojis' -import relativeTime from 'src/utils/relativeTime' -import { useTheme } from 'src/utils/styles/ThemeManager' -import { StyleConstants } from 'src/utils/styles/constants' +import Emojis from '@components/Timelines/Timeline/Shared/Emojis' +import relativeTime from '@utils/relativeTime' +import { useTheme } from '@utils/styles/ThemeManager' +import { StyleConstants } from '@utils/styles/constants' import { useQuery } from 'react-query' -import { relationshipFetch } from 'src/utils/fetches/relationshipFetch' -import client from 'src/api/client' -import { toast } from 'src/components/toast' +import { relationshipFetch } from '@utils/fetches/relationshipFetch' +import client from '@api/client' +import { toast } from '@components/toast' export interface Props { notification: Mastodon.Notification diff --git a/src/components/Timelines/Timeline/Shared/Poll.tsx b/src/components/Timelines/Timeline/Shared/Poll.tsx index f3972f24..c2d6c711 100644 --- a/src/components/Timelines/Timeline/Shared/Poll.tsx +++ b/src/components/Timelines/Timeline/Shared/Poll.tsx @@ -2,12 +2,12 @@ import { Feather } from '@expo/vector-icons' import React, { useMemo, useState } from 'react' import { Pressable, StyleSheet, Text, View } from 'react-native' import { useMutation, useQueryCache } from 'react-query' -import client from 'src/api/client' -import { ButtonRow } from 'src/components/Button' -import { toast } from 'src/components/toast' -import relativeTime from 'src/utils/relativeTime' -import { StyleConstants } from 'src/utils/styles/constants' -import { useTheme } from 'src/utils/styles/ThemeManager' +import client from '@api/client' +import { ButtonRow } from '@components/Button' +import { toast } from '@components/toast' +import relativeTime from '@utils/relativeTime' +import { StyleConstants } from '@utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' import Emojis from './Emojis' diff --git a/src/components/toast.tsx b/src/components/toast.tsx index 466de66c..26fe3fca 100644 --- a/src/components/toast.tsx +++ b/src/components/toast.tsx @@ -2,9 +2,9 @@ import React from 'react' import { StyleSheet, Text, View } from 'react-native' import { SafeAreaView } from 'react-native-safe-area-context' import Toast from 'react-native-toast-message' -import { useTheme } from 'src/utils/styles/ThemeManager' +import { useTheme } from '@utils/styles/ThemeManager' import { Feather } from '@expo/vector-icons' -import { StyleConstants } from 'src/utils/styles/constants' +import { StyleConstants } from '@utils/styles/constants' export interface Params { type: 'success' | 'error' | 'warning' diff --git a/src/i18n/i18n.ts b/src/i18n/i18n.ts index 1fcdddb0..7ed6f0d8 100644 --- a/src/i18n/i18n.ts +++ b/src/i18n/i18n.ts @@ -2,13 +2,13 @@ import i18next from 'i18next' import { initReactI18next } from 'react-i18next' import * as Localization from 'expo-localization' -import zh from 'src/i18n/zh/_all' -import en from 'src/i18n/en/_all' +import zh from '@root/i18n/zh/_all' +import en from '@root/i18n/en/_all' import { changeLanguage, getSettingsLanguage -} from 'src/utils/slices/settingsSlice' -import { store } from 'src/store' +} from '@utils/slices/settingsSlice' +import { store } from '@root/store' if (!getSettingsLanguage(store.getState())) { const deviceLocal = Localization.locale diff --git a/src/screens/Local.tsx b/src/screens/Local.tsx index 7d7e150c..67c18ab7 100644 --- a/src/screens/Local.tsx +++ b/src/screens/Local.tsx @@ -1,7 +1,7 @@ import React from 'react' import { useTranslation } from 'react-i18next' -import Timelines from 'src/components/Timelines' +import Timelines from '@components/Timelines' const ScreenLocal: React.FC = () => { const { t } = useTranslation() diff --git a/src/screens/Me.tsx b/src/screens/Me.tsx index 919797cc..ce04e281 100644 --- a/src/screens/Me.tsx +++ b/src/screens/Me.tsx @@ -3,14 +3,14 @@ import { createNativeStackNavigator } from 'react-native-screens/native-stack' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' -import ScreenMeRoot from 'src/screens/Me/Root' -import ScreenMeConversations from './Me/Cconversations' -import ScreenMeBookmarks from './Me/Bookmarks' -import ScreenMeFavourites from './Me/Favourites' -import ScreenMeLists from './Me/Lists' -import sharedScreens from 'src/screens/Shared/sharedScreens' -import ScreenMeListsList from './Me/Root/Lists/List' -import ScreenMeSettings from './Me/Settings' +import ScreenMeRoot from '@screens/Me/Root' +import ScreenMeConversations from '@screens/Me/Cconversations' +import ScreenMeBookmarks from '@screens/Me/Bookmarks' +import ScreenMeFavourites from '@screens/Me/Favourites' +import ScreenMeLists from '@screens/Me/Lists' +import sharedScreens from '@screens/Shared/sharedScreens' +import ScreenMeListsList from '@screens/Me/Root/Lists/List' +import ScreenMeSettings from '@screens/Me/Settings' import { RootState } from 'src/store' diff --git a/src/screens/Me/Bookmarks.tsx b/src/screens/Me/Bookmarks.tsx index 6dcfa57c..da78d206 100644 --- a/src/screens/Me/Bookmarks.tsx +++ b/src/screens/Me/Bookmarks.tsx @@ -1,6 +1,6 @@ import React from 'react' -import Timeline from 'src/components/Timelines/Timeline' +import Timeline from '@components/Timelines/Timeline' const ScreenMeBookmarks: React.FC = () => { return diff --git a/src/screens/Me/Cconversations.tsx b/src/screens/Me/Cconversations.tsx index 612f2697..f8d003c6 100644 --- a/src/screens/Me/Cconversations.tsx +++ b/src/screens/Me/Cconversations.tsx @@ -1,6 +1,6 @@ import React from 'react' -import Timeline from 'src/components/Timelines/Timeline' +import Timeline from '@components/Timelines/Timeline' const ScreenMeConversations: React.FC = () => { return diff --git a/src/screens/Me/Favourites.tsx b/src/screens/Me/Favourites.tsx index 3e82e76f..6dda73d5 100644 --- a/src/screens/Me/Favourites.tsx +++ b/src/screens/Me/Favourites.tsx @@ -1,6 +1,6 @@ import React from 'react' -import Timeline from 'src/components/Timelines/Timeline' +import Timeline from '@components/Timelines/Timeline' const ScreenMeFavourites: React.FC = () => { return diff --git a/src/screens/Me/Lists.tsx b/src/screens/Me/Lists.tsx index 87d55e25..60e7eba2 100644 --- a/src/screens/Me/Lists.tsx +++ b/src/screens/Me/Lists.tsx @@ -2,9 +2,9 @@ import { useNavigation } from '@react-navigation/native' import React from 'react' import { ActivityIndicator, Text } from 'react-native' import { useQuery } from 'react-query' -import { MenuContainer, MenuRow } from 'src/components/Menu' +import { MenuContainer, MenuRow } from '@components/Menu' -import { listsFetch } from 'src/utils/fetches/listsFetch' +import { listsFetch } from '@utils/fetches/listsFetch' const ScreenMeLists: React.FC = () => { const navigation = useNavigation() diff --git a/src/screens/Me/Root.tsx b/src/screens/Me/Root.tsx index bafd6340..d6717560 100644 --- a/src/screens/Me/Root.tsx +++ b/src/screens/Me/Root.tsx @@ -2,13 +2,13 @@ import React from 'react' import { ScrollView } from 'react-native' import { useSelector } from 'react-redux' -import { getLocalUrl } from 'src/utils/slices/instancesSlice' +import { getLocalUrl } from '@utils/slices/instancesSlice' -import Login from './Root/Login' -import MyInfo from './Root/MyInfo' -import Collections from './Root/Collections' -import Settings from './Root/Settings' -import Logout from './Root/Logout' +import Login from '@screens/Me/Root/Login' +import MyInfo from '@screens/Me/Root/MyInfo' +import Collections from '@screens/Me/Root/Collections' +import Settings from '@screens/Me/Root/Settings' +import Logout from '@screens/Me/Root/Logout' const ScreenMeRoot: React.FC = () => { const localRegistered = useSelector(getLocalUrl) diff --git a/src/screens/Me/Root/Collections.tsx b/src/screens/Me/Root/Collections.tsx index 4e97d963..8365b155 100644 --- a/src/screens/Me/Root/Collections.tsx +++ b/src/screens/Me/Root/Collections.tsx @@ -2,7 +2,7 @@ import { useNavigation } from '@react-navigation/native' import React from 'react' import { useTranslation } from 'react-i18next' -import { MenuContainer, MenuRow } from 'src/components/Menu' +import { MenuContainer, MenuRow } from '@components/Menu' const Collections: React.FC = () => { const { t } = useTranslation('meRoot') diff --git a/src/screens/Me/Root/Lists/List.tsx b/src/screens/Me/Root/Lists/List.tsx index c8999a04..1932a447 100644 --- a/src/screens/Me/Root/Lists/List.tsx +++ b/src/screens/Me/Root/Lists/List.tsx @@ -1,6 +1,6 @@ import React from 'react' -import Timeline from 'src/components/Timelines/Timeline' +import Timeline from '@components/Timelines/Timeline' // Show remote hashtag? Only when private, show local version? diff --git a/src/screens/Me/Root/Login.tsx b/src/screens/Me/Root/Login.tsx index 3d6c92bb..f53f74eb 100644 --- a/src/screens/Me/Root/Login.tsx +++ b/src/screens/Me/Root/Login.tsx @@ -3,17 +3,17 @@ import { StyleSheet, Text, TextInput, View } from 'react-native' import { useQuery } from 'react-query' import { debounce } from 'lodash' -import { instanceFetch } from 'src/utils/fetches/instanceFetch' -import client from 'src/api/client' +import { instanceFetch } from '@utils/fetches/instanceFetch' +import client from '@api/client' import * as AuthSession from 'expo-auth-session' import { useDispatch } from 'react-redux' -import { updateLocal } from 'src/utils/slices/instancesSlice' +import { updateLocal } from '@utils/slices/instancesSlice' import { useNavigation } from '@react-navigation/native' -import { useTheme } from 'src/utils/styles/ThemeManager' +import { useTheme } from '@utils/styles/ThemeManager' import { useTranslation } from 'react-i18next' -import { StyleConstants } from 'src/utils/styles/constants' -import { ButtonRow } from 'src/components/Button' +import { StyleConstants } from '@utils/styles/constants' +import { ButtonRow } from '@components/Button' const Login: React.FC = () => { const { t } = useTranslation('meRoot') diff --git a/src/screens/Me/Root/Logout.tsx b/src/screens/Me/Root/Logout.tsx index 70b63ace..840e7785 100644 --- a/src/screens/Me/Root/Logout.tsx +++ b/src/screens/Me/Root/Logout.tsx @@ -1,9 +1,9 @@ import React from 'react' import { useDispatch } from 'react-redux' -import { updateLocal } from 'src/utils/slices/instancesSlice' -import MenuButton from 'src/components/Menu/Button' -import { MenuContainer } from 'src/components/Menu' +import { updateLocal } from '@utils/slices/instancesSlice' +import MenuButton from '@components/Menu/Button' +import { MenuContainer } from '@components/Menu' import { useNavigation } from '@react-navigation/native' import { useTranslation } from 'react-i18next' diff --git a/src/screens/Me/Root/MyInfo.tsx b/src/screens/Me/Root/MyInfo.tsx index b779b26e..c8eb90d5 100644 --- a/src/screens/Me/Root/MyInfo.tsx +++ b/src/screens/Me/Root/MyInfo.tsx @@ -1,11 +1,11 @@ import React from 'react' import { useQuery } from 'react-query' -import { accountFetch } from 'src/utils/fetches/accountFetch' -import AccountHeader from 'src/screens/Shared/Account/Header' -import AccountInformation from 'src/screens/Shared/Account/Information' +import { accountFetch } from '@utils/fetches/accountFetch' +import AccountHeader from '@screens/Shared/Account/Header' +import AccountInformation from '@screens/Shared/Account/Information' import { useSelector } from 'react-redux' -import { getLocalAccountId } from 'src/utils/slices/instancesSlice' +import { getLocalAccountId } from '@utils/slices/instancesSlice' const MyInfo: React.FC = () => { const localAccountId = useSelector(getLocalAccountId) diff --git a/src/screens/Me/Root/Settings.tsx b/src/screens/Me/Root/Settings.tsx index 2f652972..e2820058 100644 --- a/src/screens/Me/Root/Settings.tsx +++ b/src/screens/Me/Root/Settings.tsx @@ -2,7 +2,7 @@ import { useNavigation } from '@react-navigation/native' import React from 'react' import { useTranslation } from 'react-i18next' -import { MenuContainer, MenuRow } from 'src/components/Menu' +import { MenuContainer, MenuRow } from '@components/Menu' const Settings: React.FC = () => { const { t } = useTranslation('meRoot') diff --git a/src/screens/Me/Settings.tsx b/src/screens/Me/Settings.tsx index 912a185b..aaf398c0 100644 --- a/src/screens/Me/Settings.tsx +++ b/src/screens/Me/Settings.tsx @@ -3,15 +3,15 @@ import { useTranslation } from 'react-i18next' import { ActionSheetIOS, StyleSheet, Text } from 'react-native' import { useDispatch, useSelector } from 'react-redux' -import { MenuContainer, MenuRow } from 'src/components/Menu' +import { MenuContainer, MenuRow } from '@components/Menu' import { changeLanguage, changeTheme, getSettingsLanguage, getSettingsTheme -} from 'src/utils/slices/settingsSlice' -import { StyleConstants } from 'src/utils/styles/constants' -import { useTheme } from 'src/utils/styles/ThemeManager' +} from '@utils/slices/settingsSlice' +import { StyleConstants } from '@utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' const ScreenMeSettings: React.FC = () => { const { t, i18n } = useTranslation('meSettings') diff --git a/src/screens/Notifications.tsx b/src/screens/Notifications.tsx index bbeac3ca..d87d4202 100644 --- a/src/screens/Notifications.tsx +++ b/src/screens/Notifications.tsx @@ -1,11 +1,11 @@ import React from 'react' import { createNativeStackNavigator } from 'react-native-screens/native-stack' -import Timeline from 'src/components/Timelines/Timeline' -import sharedScreens from 'src/screens/Shared/sharedScreens' +import Timeline from '@components/Timelines/Timeline' +import sharedScreens from '@screens/Shared/sharedScreens' import { useSelector } from 'react-redux' -import { RootState } from 'src/store' -import PleaseLogin from 'src/components/PleaseLogin' +import { RootState } from '@root/store' +import PleaseLogin from '@components/PleaseLogin' import { useTranslation } from 'react-i18next' const Stack = createNativeStackNavigator() diff --git a/src/screens/Public.tsx b/src/screens/Public.tsx index 42b7c9b5..a7e1c274 100644 --- a/src/screens/Public.tsx +++ b/src/screens/Public.tsx @@ -1,7 +1,7 @@ import React from 'react' import { useTranslation } from 'react-i18next' -import Timelines from 'src/components/Timelines' +import Timelines from '@components/Timelines' const ScreenPublic: React.FC = () => { const { t } = useTranslation() diff --git a/src/screens/Shared/Account.tsx b/src/screens/Shared/Account.tsx index 15375e68..e5afcc44 100644 --- a/src/screens/Shared/Account.tsx +++ b/src/screens/Shared/Account.tsx @@ -4,10 +4,10 @@ import { ScrollView } from 'react-native' // import * as relationshipsSlice from 'src/stacks/common/relationshipsSlice' import { useQuery } from 'react-query' -import { accountFetch } from '../../utils/fetches/accountFetch' -import AccountToots from './Account/Toots' -import AccountHeader from './Account/Header' -import AccountInformation from './Account/Information' +import { accountFetch } from '@utils/fetches/accountFetch' +import AccountToots from '@screens/Shared/Account/Toots' +import AccountHeader from '@screens/Shared/Account/Header' +import AccountInformation from '@screens/Shared/Account/Information' // Moved account example: https://m.cmx.im/web/accounts/27812 diff --git a/src/screens/Shared/Account/Information.tsx b/src/screens/Shared/Account/Information.tsx index 2a69c2aa..2e885170 100644 --- a/src/screens/Shared/Account/Information.tsx +++ b/src/screens/Shared/Account/Information.tsx @@ -3,11 +3,11 @@ import { Image, StyleSheet, Text, View } from 'react-native' import ShimmerPlaceholder from 'react-native-shimmer-placeholder' import { Feather } from '@expo/vector-icons' -import ParseContent from 'src/components/ParseContent' -import { useTheme } from 'src/utils/styles/ThemeManager' -import { StyleConstants } from 'src/utils/styles/constants' +import ParseContent from '@components/ParseContent' +import { useTheme } from '@utils/styles/ThemeManager' +import { StyleConstants } from '@utils/styles/constants' import { useTranslation } from 'react-i18next' -import Emojis from 'src/components/Timelines/Timeline/Shared/Emojis' +import Emojis from '@components/Timelines/Timeline/Shared/Emojis' export interface Props { account: Mastodon.Account | undefined diff --git a/src/screens/Shared/Account/Toots.tsx b/src/screens/Shared/Account/Toots.tsx index bd45ea48..7eb082cd 100644 --- a/src/screens/Shared/Account/Toots.tsx +++ b/src/screens/Shared/Account/Toots.tsx @@ -2,7 +2,7 @@ import React, { useRef, useState } from 'react' import { Dimensions, FlatList, View } from 'react-native' import SegmentedControl from '@react-native-community/segmented-control' -import Timeline from 'src/components/Timelines/Timeline' +import Timeline from '@components/Timelines/Timeline' import { useTranslation } from 'react-i18next' export interface Props { diff --git a/src/screens/Shared/Compose.tsx b/src/screens/Shared/Compose.tsx index b7e54faa..f00f488f 100644 --- a/src/screens/Shared/Compose.tsx +++ b/src/screens/Shared/Compose.tsx @@ -22,14 +22,14 @@ import { createNativeStackNavigator } from 'react-native-screens/native-stack' import { useNavigation } from '@react-navigation/native' import sha256 from 'crypto-js/sha256' -import { store } from 'src/store' -import ComposeRoot from './Compose/Root' -import client from 'src/api/client' -import { getLocalAccountPreferences } from 'src/utils/slices/instancesSlice' -import { HeaderLeft, HeaderRight } from 'src/components/Header' -import { StyleConstants } from 'src/utils/styles/constants' -import { useTheme } from 'src/utils/styles/ThemeManager' -import formatText from './Compose/formatText' +import { store } from '@root/store' +import ComposeRoot from '@screens/Shared/Compose/Root' +import client from '@api/client' +import { getLocalAccountPreferences } from '@utils/slices/instancesSlice' +import { HeaderLeft, HeaderRight } from '@components/Header' +import { StyleConstants } from '@utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' +import formatText from '@screens/Shared/Compose/formatText' const Stack = createNativeStackNavigator() diff --git a/src/screens/Shared/Compose/Actions.tsx b/src/screens/Shared/Compose/Actions.tsx index d01fbacf..23589b91 100644 --- a/src/screens/Shared/Compose/Actions.tsx +++ b/src/screens/Shared/Compose/Actions.tsx @@ -1,10 +1,10 @@ import { Feather } from '@expo/vector-icons' import React, { useCallback, useContext, useMemo } from 'react' import { ActionSheetIOS, StyleSheet, View } from 'react-native' -import { StyleConstants } from 'src/utils/styles/constants' -import { useTheme } from 'src/utils/styles/ThemeManager' -import { ComposeContext } from '../Compose' -import addAttachments from './addAttachments' +import { StyleConstants } from '@utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' +import { ComposeContext } from '@screens/Shared/Compose' +import addAttachments from '@screens/Shared/Compose/addAttachments' const ComposeActions: React.FC = () => { const { composeState, composeDispatch } = useContext(ComposeContext) diff --git a/src/screens/Shared/Compose/Attachments.tsx b/src/screens/Shared/Compose/Attachments.tsx index f9c5ef03..6bcd940b 100644 --- a/src/screens/Shared/Compose/Attachments.tsx +++ b/src/screens/Shared/Compose/Attachments.tsx @@ -8,13 +8,13 @@ import { View } from 'react-native' -import { ComposeContext } from '../Compose' -import { StyleConstants } from 'src/utils/styles/constants' -import { useTheme } from 'src/utils/styles/ThemeManager' +import { ComposeContext } from '@screens/Shared/Compose' +import { StyleConstants } from '@utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' import { useNavigation } from '@react-navigation/native' import ShimmerPlaceholder from 'react-native-shimmer-placeholder' -import { ButtonRound } from 'src/components/Button' -import addAttachments from './addAttachments' +import { ButtonRound } from '@components/Button' +import addAttachments from '@screens/Shared/Compose/addAttachments' import { Feather } from '@expo/vector-icons' const DEFAULT_HEIGHT = 200 diff --git a/src/screens/Shared/Compose/EditAttachment.tsx b/src/screens/Shared/Compose/EditAttachment.tsx index 262121ac..c51aeea5 100644 --- a/src/screens/Shared/Compose/EditAttachment.tsx +++ b/src/screens/Shared/Compose/EditAttachment.tsx @@ -22,13 +22,13 @@ import { SafeAreaView } from 'react-native-safe-area-context' import Svg, { Circle, G, Path } from 'react-native-svg' import { createNativeStackNavigator } from 'react-native-screens/native-stack' -import { HeaderLeft, HeaderRight } from 'src/components/Header' -import { StyleConstants } from 'src/utils/styles/constants' -import { useTheme } from 'src/utils/styles/ThemeManager' +import { HeaderLeft, HeaderRight } from '@components/Header' +import { StyleConstants } from '@utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' import { PanGestureHandler } from 'react-native-gesture-handler' -import { PostAction } from '../Compose' -import client from 'src/api/client' -import AttachmentVideo from 'src/components/Timelines/Timeline/Shared/Attachment/AttachmentVideo' +import { PostAction } from '@screens/Shared/Compose' +import client from '@api/client' +import AttachmentVideo from '@components/Timelines/Timeline/Shared/Attachment/AttachmentVideo' const Stack = createNativeStackNavigator() diff --git a/src/screens/Shared/Compose/Emojis.tsx b/src/screens/Shared/Compose/Emojis.tsx index 1e3399af..b3ea3077 100644 --- a/src/screens/Shared/Compose/Emojis.tsx +++ b/src/screens/Shared/Compose/Emojis.tsx @@ -7,10 +7,10 @@ import { Text, View } from 'react-native' -import { StyleConstants } from 'src/utils/styles/constants' -import { useTheme } from 'src/utils/styles/ThemeManager' +import { StyleConstants } from '@utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' -import { ComposeContext } from '../Compose' +import { ComposeContext } from '@screens/Shared/Compose' import updateText from './updateText' const SingleEmoji = ({ emoji }: { emoji: Mastodon.Emoji }) => { diff --git a/src/screens/Shared/Compose/Poll.tsx b/src/screens/Shared/Compose/Poll.tsx index a006cdc6..3fca71e4 100644 --- a/src/screens/Shared/Compose/Poll.tsx +++ b/src/screens/Shared/Compose/Poll.tsx @@ -2,11 +2,11 @@ import React, { useContext, useEffect, useState } from 'react' import { ActionSheetIOS, StyleSheet, TextInput, View } from 'react-native' import { Feather } from '@expo/vector-icons' -import { ComposeContext } from '../Compose' -import { useTheme } from 'src/utils/styles/ThemeManager' -import { StyleConstants } from 'src/utils/styles/constants' -import { ButtonRow } from 'src/components/Button' -import { MenuContainer, MenuRow } from 'src/components/Menu' +import { ComposeContext } from '@screens/Shared/Compose' +import { useTheme } from '@utils/styles/ThemeManager' +import { StyleConstants } from '@utils/styles/constants' +import { ButtonRow } from '@components/Button' +import { MenuContainer, MenuRow } from '@components/Menu' const ComposePoll: React.FC = () => { const { diff --git a/src/screens/Shared/Compose/Reply.tsx b/src/screens/Shared/Compose/Reply.tsx index 830a2187..ba4b0b73 100644 --- a/src/screens/Shared/Compose/Reply.tsx +++ b/src/screens/Shared/Compose/Reply.tsx @@ -1,14 +1,14 @@ import React, { useContext } from 'react' import { Dimensions, StyleSheet, View } from 'react-native' -import { useTheme } from 'src/utils/styles/ThemeManager' +import { useTheme } from '@utils/styles/ThemeManager' -import TimelineAttachment from 'src/components/Timelines/Timeline/Shared/Attachment' -import TimelineAvatar from 'src/components/Timelines/Timeline/Shared/Avatar' -import TimelineCard from 'src/components/Timelines/Timeline/Shared/Card' -import TimelineContent from 'src/components/Timelines/Timeline/Shared/Content' -import TimelineHeaderDefault from 'src/components/Timelines/Timeline/Shared/HeaderDefault' -import { ComposeContext } from '../Compose' -import { StyleConstants } from 'src/utils/styles/constants' +import TimelineAttachment from '@components/Timelines/Timeline/Shared/Attachment' +import TimelineAvatar from '@components/Timelines/Timeline/Shared/Avatar' +import TimelineCard from '@components/Timelines/Timeline/Shared/Card' +import TimelineContent from '@components/Timelines/Timeline/Shared/Content' +import TimelineHeaderDefault from '@components/Timelines/Timeline/Shared/HeaderDefault' +import { ComposeContext } from '@screens/Shared/Compose' +import { StyleConstants } from '@utils/styles/constants' const ComposeReply: React.FC = () => { const { diff --git a/src/screens/Shared/Compose/Root.tsx b/src/screens/Shared/Compose/Root.tsx index 48714322..ab44ee19 100644 --- a/src/screens/Shared/Compose/Root.tsx +++ b/src/screens/Shared/Compose/Root.tsx @@ -20,17 +20,17 @@ import { Image } from 'react-native' import { useQuery } from 'react-query' -import Emojis from 'src/components/Timelines/Timeline/Shared/Emojis' -import { emojisFetch } from 'src/utils/fetches/emojisFetch' -import { searchFetch } from 'src/utils/fetches/searchFetch' -import { StyleConstants } from 'src/utils/styles/constants' -import { useTheme } from 'src/utils/styles/ThemeManager' -import { PostAction, ComposeState, ComposeContext } from '../Compose' -import ComposeActions from './Actions' +import Emojis from '@components/Timelines/Timeline/Shared/Emojis' +import { emojisFetch } from '@utils/fetches/emojisFetch' +import { searchFetch } from '@utils/fetches/searchFetch' +import { StyleConstants } from '@utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' +import { PostAction, ComposeState, ComposeContext } from '@screens/Shared/Compose' +import ComposeActions from '@screens/Shared/Compose/Actions' import updateText from './updateText' import * as Permissions from 'expo-permissions' -import ComposeRootFooter from './Root/Footer' -import ComposeRootHeader from './Root/Header' +import ComposeRootFooter from '@screens/Shared/Compose/Root/Footer' +import ComposeRootHeader from '@screens/Shared/Compose/Root/Header' const ListItem = React.memo( ({ diff --git a/src/screens/Shared/Compose/Root/Footer.tsx b/src/screens/Shared/Compose/Root/Footer.tsx index 2acfdff0..481c7413 100644 --- a/src/screens/Shared/Compose/Root/Footer.tsx +++ b/src/screens/Shared/Compose/Root/Footer.tsx @@ -1,11 +1,11 @@ import React, { useContext } from 'react' import { StyleSheet, TextInput, View } from 'react-native' -import { StyleConstants } from 'src/utils/styles/constants' -import { ComposeContext } from '../../Compose' -import ComposeAttachments from '../Attachments' -import ComposeEmojis from '../Emojis' -import ComposePoll from '../Poll' -import ComposeReply from '../Reply' +import { StyleConstants } from '@utils/styles/constants' +import { ComposeContext } from '@screens/Shared/Compose' +import ComposeAttachments from '@screens/Shared/Compose/Attachments' +import ComposeEmojis from '@screens/Shared/Compose/Emojis' +import ComposePoll from '@screens/Shared/Compose/Poll' +import ComposeReply from '@screens/Shared/Compose/Reply' export interface Props { textInputRef: React.RefObject diff --git a/src/screens/Shared/Compose/Root/Header.tsx b/src/screens/Shared/Compose/Root/Header.tsx index 993a5385..82e1376c 100644 --- a/src/screens/Shared/Compose/Root/Header.tsx +++ b/src/screens/Shared/Compose/Root/Header.tsx @@ -1,7 +1,7 @@ import React, { useContext } from 'react' -import { ComposeContext } from '../../Compose' -import ComposeSpoilerInput from '../SpoilerInput' -import ComposeTextInput from '../TextInput' +import { ComposeContext } from '@screens/Shared/Compose' +import ComposeSpoilerInput from '@screens/Shared/Compose/SpoilerInput' +import ComposeTextInput from '@screens/Shared/Compose/TextInput' const ComposeRootHeader: React.FC = () => { const { composeState } = useContext(ComposeContext) diff --git a/src/screens/Shared/Compose/SpoilerInput.tsx b/src/screens/Shared/Compose/SpoilerInput.tsx index 5b8fc752..d5f9b899 100644 --- a/src/screens/Shared/Compose/SpoilerInput.tsx +++ b/src/screens/Shared/Compose/SpoilerInput.tsx @@ -1,8 +1,8 @@ import React, { useContext } from 'react' import { StyleSheet, Text, TextInput } from 'react-native' -import { StyleConstants } from 'src/utils/styles/constants' -import { useTheme } from 'src/utils/styles/ThemeManager' -import { ComposeContext } from '../Compose' +import { StyleConstants } from '@utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' +import { ComposeContext } from '@screens/Shared/Compose' import formatText from './formatText' const ComposeSpoilerInput: React.FC = () => { diff --git a/src/screens/Shared/Compose/TextInput.tsx b/src/screens/Shared/Compose/TextInput.tsx index e19ebe93..3401c8b6 100644 --- a/src/screens/Shared/Compose/TextInput.tsx +++ b/src/screens/Shared/Compose/TextInput.tsx @@ -1,8 +1,8 @@ import React, { useContext } from 'react' import { StyleSheet, Text, TextInput } from 'react-native' -import { StyleConstants } from 'src/utils/styles/constants' -import { useTheme } from 'src/utils/styles/ThemeManager' -import { ComposeContext } from '../Compose' +import { StyleConstants } from '@utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' +import { ComposeContext } from '@screens/Shared/Compose' import formatText from './formatText' const ComposeTextInput: React.FC = () => { diff --git a/src/screens/Shared/Compose/addAttachments.ts b/src/screens/Shared/Compose/addAttachments.ts index 611347c8..dff254e1 100644 --- a/src/screens/Shared/Compose/addAttachments.ts +++ b/src/screens/Shared/Compose/addAttachments.ts @@ -2,8 +2,8 @@ import { Dispatch } from 'react' import { ActionSheetIOS, Alert } from 'react-native' import * as ImagePicker from 'expo-image-picker' -import { PostAction, ComposeState } from '../Compose' -import client from 'src/api/client' +import { PostAction, ComposeState } from '@screens/Shared/Compose' +import client from '@api/client' import { ImageInfo } from 'expo-image-picker/build/ImagePicker.types' const uploadAttachment = async ({ diff --git a/src/screens/Shared/Compose/formatText.tsx b/src/screens/Shared/Compose/formatText.tsx index 11907b38..87926409 100644 --- a/src/screens/Shared/Compose/formatText.tsx +++ b/src/screens/Shared/Compose/formatText.tsx @@ -2,9 +2,9 @@ import { debounce, differenceWith, isEqual } from 'lodash' import React, { createElement, Dispatch } from 'react' import { Text } from 'react-native' import { RefetchOptions } from 'react-query/types/core/query' -import Autolinker from 'src/modules/autolinker' -import { useTheme } from 'src/utils/styles/ThemeManager' -import { PostAction, ComposeState } from '../Compose' +import Autolinker from '@root/modules/autolinker' +import { useTheme } from '@utils/styles/ThemeManager' +import { PostAction, ComposeState } from '@screens/Shared/Compose' export interface Params { textInput: ComposeState['textInputFocus']['current'] diff --git a/src/screens/Shared/Compose/updateText.ts b/src/screens/Shared/Compose/updateText.ts index d9f701aa..02f66102 100644 --- a/src/screens/Shared/Compose/updateText.ts +++ b/src/screens/Shared/Compose/updateText.ts @@ -1,5 +1,5 @@ import { Dispatch } from 'react' -import { PostAction, ComposeState } from '../Compose' +import { PostAction, ComposeState } from '@screens/Shared/Compose' import formatText from './formatText' const updateText = ({ diff --git a/src/screens/Shared/Hashtag.tsx b/src/screens/Shared/Hashtag.tsx index 82c57a27..48f052db 100644 --- a/src/screens/Shared/Hashtag.tsx +++ b/src/screens/Shared/Hashtag.tsx @@ -1,6 +1,6 @@ import React from 'react' -import Timeline from 'src/components/Timelines/Timeline' +import Timeline from '@components/Timelines/Timeline' // Show remote hashtag? Only when private, show local version? diff --git a/src/screens/Shared/Toot.tsx b/src/screens/Shared/Toot.tsx index 7f36efe4..75753ed6 100644 --- a/src/screens/Shared/Toot.tsx +++ b/src/screens/Shared/Toot.tsx @@ -1,6 +1,6 @@ import React from 'react' -import Timeline from 'src/components/Timelines/Timeline' +import Timeline from '@components/Timelines/Timeline' export interface Props { route: { diff --git a/src/screens/Shared/Webview.tsx b/src/screens/Shared/Webview.tsx index bd60d70e..7e1ae790 100644 --- a/src/screens/Shared/Webview.tsx +++ b/src/screens/Shared/Webview.tsx @@ -4,10 +4,10 @@ import { useTranslation } from 'react-i18next' import { ActionSheetIOS } from 'react-native' import { createNativeStackNavigator } from 'react-native-screens/native-stack' import { WebView } from 'react-native-webview' -import BottomSheet from 'src/components/BottomSheet' +import BottomSheet from '@components/BottomSheet' -import { HeaderLeft, HeaderRight } from 'src/components/Header' -import { MenuContainer, MenuRow } from 'src/components/Menu' +import { HeaderLeft, HeaderRight } from '@components/Header' +import { MenuContainer, MenuRow } from '@components/Menu' const Stack = createNativeStackNavigator() diff --git a/src/screens/Shared/sharedScreens.tsx b/src/screens/Shared/sharedScreens.tsx index 9d09fd4e..9ea6a120 100644 --- a/src/screens/Shared/sharedScreens.tsx +++ b/src/screens/Shared/sharedScreens.tsx @@ -1,12 +1,12 @@ import React from 'react' -import ScreenSharedAccount from 'src/screens/Shared/Account' -import ScreenSharedHashtag from 'src/screens/Shared/Hashtag' -import ScreenSharedToot from 'src/screens/Shared/Toot' -import ScreenSharedWebview from 'src/screens/Shared/Webview' -import Compose from 'src/screens/Shared/Compose' -import ComposeEditAttachment from './Compose/EditAttachment' -import ScreenSharedSearch from './Search' +import ScreenSharedAccount from '@screens/Shared/Account' +import ScreenSharedHashtag from '@screens/Shared/Hashtag' +import ScreenSharedToot from '@screens/Shared/Toot' +import ScreenSharedWebview from '@screens/Shared/Webview' +import Compose from '@screens/Shared/Compose' +import ComposeEditAttachment from '@screens/Shared/Compose/EditAttachment' +import ScreenSharedSearch from '@screens/Shared/Search' import { useTranslation } from 'react-i18next' const sharedScreens = (Stack: any) => { diff --git a/src/store.ts b/src/store.ts index f77c3aa9..e09a3e9d 100644 --- a/src/store.ts +++ b/src/store.ts @@ -2,8 +2,8 @@ import { configureStore, getDefaultMiddleware } from '@reduxjs/toolkit' import { persistReducer, persistStore } from 'redux-persist' import createSecureStore from 'redux-persist-expo-securestore' -import instancesSlice from 'src/utils/slices/instancesSlice' -import settingsSlice from 'src/utils/slices/settingsSlice' +import instancesSlice from '@utils/slices/instancesSlice' +import settingsSlice from '@utils/slices/settingsSlice' const secureStorage = createSecureStore() diff --git a/src/utils/fetches/accountFetch.ts b/src/utils/fetches/accountFetch.ts index 6d7e9c41..69fe0371 100644 --- a/src/utils/fetches/accountFetch.ts +++ b/src/utils/fetches/accountFetch.ts @@ -1,4 +1,4 @@ -import client from 'src/api/client' +import client from '@api/client' export const accountFetch = async (key: string, { id }: { id: string }) => { const res = await client({ diff --git a/src/utils/fetches/emojisFetch.ts b/src/utils/fetches/emojisFetch.ts index 31852ab6..4b1c7d4c 100644 --- a/src/utils/fetches/emojisFetch.ts +++ b/src/utils/fetches/emojisFetch.ts @@ -1,4 +1,4 @@ -import client from 'src/api/client' +import client from '@api/client' export const emojisFetch = async () => { const res = await client({ diff --git a/src/utils/fetches/instanceFetch.ts b/src/utils/fetches/instanceFetch.ts index cef9ea91..50ef0b87 100644 --- a/src/utils/fetches/instanceFetch.ts +++ b/src/utils/fetches/instanceFetch.ts @@ -1,4 +1,4 @@ -import client from 'src/api/client' +import client from '@api/client' export const instanceFetch = async ( key: string, diff --git a/src/utils/fetches/listsFetch.ts b/src/utils/fetches/listsFetch.ts index 6dc12d1b..2f0f7312 100644 --- a/src/utils/fetches/listsFetch.ts +++ b/src/utils/fetches/listsFetch.ts @@ -1,4 +1,4 @@ -import client from 'src/api/client' +import client from '@api/client' export const listsFetch = async () => { const res = await client({ diff --git a/src/utils/fetches/relationshipFetch.ts b/src/utils/fetches/relationshipFetch.ts index 817c7640..549ff462 100644 --- a/src/utils/fetches/relationshipFetch.ts +++ b/src/utils/fetches/relationshipFetch.ts @@ -1,4 +1,4 @@ -import client from 'src/api/client' +import client from '@api/client' export const relationshipFetch = async ( key: string, diff --git a/src/utils/fetches/searchFetch.ts b/src/utils/fetches/searchFetch.ts index 50c029fd..2e9d2f7a 100644 --- a/src/utils/fetches/searchFetch.ts +++ b/src/utils/fetches/searchFetch.ts @@ -1,4 +1,4 @@ -import client from 'src/api/client' +import client from '@api/client' export const searchFetch = async ( {} = {}, diff --git a/src/utils/fetches/timelineFetch.ts b/src/utils/fetches/timelineFetch.ts index 10de501e..af297018 100644 --- a/src/utils/fetches/timelineFetch.ts +++ b/src/utils/fetches/timelineFetch.ts @@ -1,6 +1,6 @@ import { uniqBy } from 'lodash' -import client from 'src/api/client' +import client from '@api/client' export const timelineFetch = async ( key: string, diff --git a/src/utils/relativeTime.ts b/src/utils/relativeTime.ts index 0e69f680..aa589e65 100644 --- a/src/utils/relativeTime.ts +++ b/src/utils/relativeTime.ts @@ -1,4 +1,4 @@ -import { store } from 'src/store' +import { store } from '@root/store' const relativeTime = (date: string) => { const units = { diff --git a/src/utils/slices/instancesSlice.ts b/src/utils/slices/instancesSlice.ts index 5025f2e5..3e0c3f7c 100644 --- a/src/utils/slices/instancesSlice.ts +++ b/src/utils/slices/instancesSlice.ts @@ -1,7 +1,7 @@ import { createAsyncThunk, createSlice } from '@reduxjs/toolkit' -import { RootState } from 'src/store' -import client from 'src/api/client' +import { RootState } from '@root/store' +import client from '@api/client' export type InstancesState = { local: { diff --git a/src/utils/slices/settingsSlice.ts b/src/utils/slices/settingsSlice.ts index ff821578..6d95bcd2 100644 --- a/src/utils/slices/settingsSlice.ts +++ b/src/utils/slices/settingsSlice.ts @@ -1,6 +1,6 @@ import { createAsyncThunk, createSlice, PayloadAction } from '@reduxjs/toolkit' -import { RootState } from 'src/store' +import { RootState } from '@root/store' // import client from 'src/api/client' export type SettingsState = { diff --git a/src/utils/styles/ThemeManager.tsx b/src/utils/styles/ThemeManager.tsx index 443132e6..65b4d313 100644 --- a/src/utils/styles/ThemeManager.tsx +++ b/src/utils/styles/ThemeManager.tsx @@ -1,8 +1,8 @@ import React, { createContext, useContext, useEffect, useState } from 'react' import { useColorScheme } from 'react-native-appearance' import { useSelector } from 'react-redux' -import { ColorDefinitions, getTheme } from 'src/utils/styles/themes' -import { getSettingsTheme } from '../slices/settingsSlice' +import { ColorDefinitions, getTheme } from '@utils/styles/themes' +import { getSettingsTheme } from '@utils/slices/settingsSlice' type ContextType = { mode: 'light' | 'dark' diff --git a/tsconfig.json b/tsconfig.json index 78311146..8aefea1e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,9 +9,13 @@ "skipLibCheck": true, "resolveJsonModule": true, "strict": true, - "baseUrl": ".", + "baseUrl": "./", "paths": { - "src/*": ["src/*"] + "@root/*": ["./src/*"], + "@api/*": ["./src/api/*"], + "@components/*": ["./src/components/*"], + "@screens/*": ["./src/screens/*"], + "@utils/*": ["./src/utils/*"] } }, "exclude": ["node_modules"] diff --git a/yarn.lock b/yarn.lock index eec3bd27..70b704c4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -37,24 +37,23 @@ source-map "^0.5.0" "@babel/core@^7.0.0", "@babel/core@^7.4.5": - version "7.12.9" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.9.tgz#fd450c4ec10cdbb980e2928b7aa7a28484593fc8" - integrity sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ== + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.10.tgz#b79a2e1b9f70ed3d84bbfb6d8c4ef825f606bccd" + integrity sha512-eTAlQKq65zHfkHZV0sIVODCPGVgoo1HdBlbSLi9CqOzuZanMv2ihzY+4paiKr1mH+XmYESMAmJ/dpZ68eN6d8w== dependencies: "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.12.5" + "@babel/generator" "^7.12.10" "@babel/helper-module-transforms" "^7.12.1" "@babel/helpers" "^7.12.5" - "@babel/parser" "^7.12.7" + "@babel/parser" "^7.12.10" "@babel/template" "^7.12.7" - "@babel/traverse" "^7.12.9" - "@babel/types" "^7.12.7" + "@babel/traverse" "^7.12.10" + "@babel/types" "^7.12.10" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.1" json5 "^2.1.2" lodash "^4.17.19" - resolve "^1.3.2" semver "^5.4.1" source-map "^0.5.0" @@ -80,7 +79,7 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.12.10", "@babel/generator@^7.9.6": +"@babel/generator@^7.12.10", "@babel/generator@^7.5.0", "@babel/generator@^7.9.0", "@babel/generator@^7.9.6": version "7.12.10" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.10.tgz#2b188fc329fb8e4f762181703beffc0fe6df3460" integrity sha512-6mCdfhWgmqLdtTkhXjnIz0LcdVCd26wS2JXRtj2XY0u5klDsXBREA/pG5NVOuVnF2LUrBGNFtQkIqqTbblg0ww== @@ -89,21 +88,12 @@ jsesc "^2.5.1" source-map "^0.5.0" -"@babel/generator@^7.12.5", "@babel/generator@^7.5.0", "@babel/generator@^7.9.0": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.5.tgz#a2c50de5c8b6d708ab95be5e6053936c1884a4de" - integrity sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A== +"@babel/helper-annotate-as-pure@^7.10.4", "@babel/helper-annotate-as-pure@^7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.10.tgz#54ab9b000e60a93644ce17b3f37d313aaf1d115d" + integrity sha512-XplmVbC1n+KY6jL8/fgLVXXUauDIB+lD5+GsQEh6F6GBF1dq1qy4DP4yXWzDKcoqXB3X58t61e85Fitoww4JVQ== dependencies: - "@babel/types" "^7.12.5" - jsesc "^2.5.1" - source-map "^0.5.0" - -"@babel/helper-annotate-as-pure@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz#5bf0d495a3f757ac3bda48b5bf3b3ba309c72ba3" - integrity sha512-XQlqKQP4vXFB7BN8fEEerrmYvHp3fK/rBkRFz9jaJbzK0B1DSfej9Kc7ZzE8Z/OnId1jpJdNAZ3BFQjWG68rcA== - dependencies: - "@babel/types" "^7.10.4" + "@babel/types" "^7.12.10" "@babel/helper-builder-binary-assignment-operator-visitor@^7.10.4": version "7.10.4" @@ -113,14 +103,14 @@ "@babel/helper-explode-assignable-expression" "^7.10.4" "@babel/types" "^7.10.4" -"@babel/helper-builder-react-jsx-experimental@^7.12.4": - version "7.12.4" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx-experimental/-/helper-builder-react-jsx-experimental-7.12.4.tgz#55fc1ead5242caa0ca2875dcb8eed6d311e50f48" - integrity sha512-AjEa0jrQqNk7eDQOo0pTfUOwQBMF+xVqrausQwT9/rTKy0g04ggFNaJpaE09IQMn9yExluigWMJcj0WC7bq+Og== +"@babel/helper-builder-react-jsx-experimental@^7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx-experimental/-/helper-builder-react-jsx-experimental-7.12.10.tgz#a58cb96a793dc0fcd5c9ed3bb36d62fdc60534c2" + integrity sha512-3Kcr2LGpL7CTRDTTYm1bzeor9qZbxbvU2AxsLA6mUG9gYarSfIKMK0UlU+azLWI+s0+BH768bwyaziWB2NOJlQ== dependencies: - "@babel/helper-annotate-as-pure" "^7.10.4" - "@babel/helper-module-imports" "^7.12.1" - "@babel/types" "^7.12.1" + "@babel/helper-annotate-as-pure" "^7.12.10" + "@babel/helper-module-imports" "^7.12.5" + "@babel/types" "^7.12.10" "@babel/helper-builder-react-jsx@^7.10.4": version "7.10.4" @@ -185,11 +175,11 @@ "@babel/types" "^7.10.4" "@babel/helper-get-function-arity@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz#98c1cbea0e2332f33f9a4661b8ce1505b2c19ba2" - integrity sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A== + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz#b158817a3165b5faa2047825dfa61970ddcc16cf" + integrity sha512-mm0n5BPjR06wh9mPQaDdXWDoll/j5UpCAPl1x8fS71GHm7HA6Ua2V4ylG1Ju8lvcTOietbPNNPaSilKj+pj+Ag== dependencies: - "@babel/types" "^7.10.4" + "@babel/types" "^7.12.10" "@babel/helper-hoist-variables@^7.10.4": version "7.10.4" @@ -228,11 +218,11 @@ lodash "^4.17.19" "@babel/helper-optimise-call-expression@^7.10.4": - version "7.12.7" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.7.tgz#7f94ae5e08721a49467346aa04fd22f750033b9c" - integrity sha512-I5xc9oSJ2h59OwyUqjv95HRyzxj53DAubUERgQMrpcCEYQyToeHA+NEcUEsVWB4j53RDeskeBJ0SgRAYHDBckw== + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.10.tgz#94ca4e306ee11a7dd6e9f42823e2ac6b49881e2d" + integrity sha512-4tpbU0SrSTjjt65UMWSrUOPZTsgvPgGG4S8QSTNHacKzpS51IVWGDj0yCwyeZND/i+LSN2g/O63jEXEWm49sYQ== dependencies: - "@babel/types" "^7.12.7" + "@babel/types" "^7.12.10" "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": version "7.10.4" @@ -317,12 +307,7 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.0.0", "@babel/parser@^7.12.7", "@babel/parser@^7.9.0": - version "7.12.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.7.tgz#fee7b39fe809d0e73e5b25eecaf5780ef3d73056" - integrity sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg== - -"@babel/parser@^7.12.10", "@babel/parser@^7.9.6": +"@babel/parser@^7.0.0", "@babel/parser@^7.12.10", "@babel/parser@^7.12.7", "@babel/parser@^7.9.0", "@babel/parser@^7.9.6": version "7.12.10" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.10.tgz#824600d59e96aea26a5a2af5a9d812af05c3ae81" integrity sha512-PJdRPwyoOqFAWfLytxrWwGrAxghCgh/yTNCYciOz8QgjflA7aZhECPZAa2VUedKg2+QMWkI0L9lynh2SNmNEgA== @@ -659,9 +644,9 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-transform-flow-strip-types@^7.0.0": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.12.1.tgz#8430decfa7eb2aea5414ed4a3fa6e1652b7d77c4" - integrity sha512-8hAtkmsQb36yMmEtk2JZ9JnVyDSnDOdlB+0nEGzIDLuK4yR3JcEjfuFPYkdEPSh8Id+rAMeBEn+X0iVEyho6Hg== + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.12.10.tgz#d85e30ecfa68093825773b7b857e5085bbd32c95" + integrity sha512-0ti12wLTLeUIzu9U7kjqIn4MyOL7+Wibc7avsHhj4o1l5C0ATs8p2IMHrVYjm9t9wzhfEO6S3kxax0Rpdo8LTg== dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-flow" "^7.12.1" @@ -798,12 +783,12 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-transform-react-jsx@^7.0.0": - version "7.12.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.12.7.tgz#8b14d45f6eccd41b7f924bcb65c021e9f0a06f7f" - integrity sha512-YFlTi6MEsclFAPIDNZYiCRbneg1MFGao9pPG9uD5htwE0vDbPaMUMeYd6itWjw7K4kro4UbdQf3ljmFl9y48dQ== + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.12.10.tgz#a7af3097c73479123594c8c8fe39545abebd44e3" + integrity sha512-MM7/BC8QdHXM7Qc1wdnuk73R4gbuOpfrSUgfV/nODGc86sPY1tgmY2M9E9uAnf2e4DOIp8aKGWqgZfQxnTNGuw== dependencies: "@babel/helper-builder-react-jsx" "^7.10.4" - "@babel/helper-builder-react-jsx-experimental" "^7.12.4" + "@babel/helper-builder-react-jsx-experimental" "^7.12.10" "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-jsx" "^7.12.1" @@ -822,13 +807,12 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-transform-runtime@^7.0.0": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.12.1.tgz#04b792057eb460389ff6a4198e377614ea1e7ba5" - integrity sha512-Ac/H6G9FEIkS2tXsZjL4RAdS3L3WHxci0usAnz7laPWUmFiGtj7tIASChqKZMHTSQTQY6xDbOq+V1/vIq3QrWg== + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.12.10.tgz#af0fded4e846c4b37078e8e5d06deac6cd848562" + integrity sha512-xOrUfzPxw7+WDm9igMgQCbO3cJKymX7dFdsgRr1eu9n3KjjyU4pptIXbXPseQDquw+W+RuJEJMHKHNsPNNm3CA== dependencies: - "@babel/helper-module-imports" "^7.12.1" + "@babel/helper-module-imports" "^7.12.5" "@babel/helper-plugin-utils" "^7.10.4" - resolve "^1.8.1" semver "^5.5.1" "@babel/plugin-transform-shorthand-properties@^7.0.0", "@babel/plugin-transform-shorthand-properties@^7.12.1": @@ -860,10 +844,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-typeof-symbol@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.12.1.tgz#9ca6be343d42512fbc2e68236a82ae64bc7af78a" - integrity sha512-EPGgpGy+O5Kg5pJFNDKuxt9RdmTgj5sgrus2XVeMp/ZIbOESadgILUbm50SNpghOh3/6yrbsH+NB5+WJTmsA7Q== +"@babel/plugin-transform-typeof-symbol@^7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.12.10.tgz#de01c4c8f96580bd00f183072b0d0ecdcf0dec4b" + integrity sha512-JQ6H8Rnsogh//ijxspCjc21YPd3VLVoYtAwv3zQmqAt8YGYUtdo5usNhdl4b9/Vir2kPFZl6n1h0PfUz4hJhaA== dependencies: "@babel/helper-plugin-utils" "^7.10.4" @@ -892,9 +876,9 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/preset-env@^7.4.4", "@babel/preset-env@^7.6.3": - version "7.12.7" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.12.7.tgz#54ea21dbe92caf6f10cb1a0a576adc4ebf094b55" - integrity sha512-OnNdfAr1FUQg7ksb7bmbKoby4qFOHw6DKWWUNB9KqnnCldxhxJlP+21dpyaWFmf2h0rTbOkXJtAGevY3XW1eew== + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.12.10.tgz#ca981b95f641f2610531bd71948656306905e6ab" + integrity sha512-Gz9hnBT/tGeTE2DBNDkD7BiWRELZt+8lSysHuDwmYXUIvtwZl0zI+D6mZgXZX0u8YBlLS4tmai9ONNY9tjRgRA== dependencies: "@babel/compat-data" "^7.12.7" "@babel/helper-compilation-targets" "^7.12.5" @@ -955,12 +939,12 @@ "@babel/plugin-transform-spread" "^7.12.1" "@babel/plugin-transform-sticky-regex" "^7.12.7" "@babel/plugin-transform-template-literals" "^7.12.1" - "@babel/plugin-transform-typeof-symbol" "^7.12.1" + "@babel/plugin-transform-typeof-symbol" "^7.12.10" "@babel/plugin-transform-unicode-escapes" "^7.12.1" "@babel/plugin-transform-unicode-regex" "^7.12.1" "@babel/preset-modules" "^0.1.3" - "@babel/types" "^7.12.7" - core-js-compat "^3.7.0" + "@babel/types" "^7.12.10" + core-js-compat "^3.8.0" semver "^5.5.0" "@babel/preset-modules@^0.1.3": @@ -984,9 +968,9 @@ "@babel/plugin-transform-typescript" "^7.12.1" "@babel/register@^7.0.0": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.12.1.tgz#cdb087bdfc4f7241c03231f22e15d211acf21438" - integrity sha512-XWcmseMIncOjoydKZnWvWi0/5CUCD+ZYKhRwgYlWOrA8fGZ/FjuLRpqtIhLOVD/fvR1b9DQHtZPn68VvhpYf+Q== + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.12.10.tgz#19b87143f17128af4dbe7af54c735663b3999f60" + integrity sha512-EvX/BvMMJRAA3jZgILWgbsrHwBQvllC5T8B29McyME8DvkdOxk4ujESfrMvME8IHSDvWXrmMXxPvA/lx2gqPLQ== dependencies: find-cache-dir "^2.0.0" lodash "^4.17.19" @@ -1010,22 +994,7 @@ "@babel/parser" "^7.12.7" "@babel/types" "^7.12.7" -"@babel/traverse@^7.0.0", "@babel/traverse@^7.10.4", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.5", "@babel/traverse@^7.12.9", "@babel/traverse@^7.9.0": - version "7.12.9" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.9.tgz#fad26c972eabbc11350e0b695978de6cc8e8596f" - integrity sha512-iX9ajqnLdoU1s1nHt36JDI9KG4k+vmI8WgjK5d+aDTwQbL2fUnzedNedssA645Ede3PM2ma1n8Q4h2ohwXgMXw== - dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.12.5" - "@babel/helper-function-name" "^7.10.4" - "@babel/helper-split-export-declaration" "^7.11.0" - "@babel/parser" "^7.12.7" - "@babel/types" "^7.12.7" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.19" - -"@babel/traverse@^7.9.6": +"@babel/traverse@^7.0.0", "@babel/traverse@^7.10.4", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.5", "@babel/traverse@^7.9.0", "@babel/traverse@^7.9.6": version "7.12.10" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.10.tgz#2d1f4041e8bf42ea099e5b2dc48d6a594c00017a" integrity sha512-6aEtf0IeRgbYWzta29lePeYSk+YAFIC3kyqESeft8o5CkFlYIMX+EQDDWEiAQ9LHOA3d0oHdgrSsID/CKqXJlg== @@ -1040,16 +1009,7 @@ globals "^11.1.0" lodash "^4.17.19" -"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.11.0", "@babel/types@^7.12.1", "@babel/types@^7.12.5", "@babel/types@^7.12.7", "@babel/types@^7.4.4", "@babel/types@^7.9.0": - version "7.12.7" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.7.tgz#6039ff1e242640a29452c9ae572162ec9a8f5d13" - integrity sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ== - dependencies: - "@babel/helper-validator-identifier" "^7.10.4" - lodash "^4.17.19" - to-fast-properties "^2.0.0" - -"@babel/types@^7.12.10", "@babel/types@^7.9.6": +"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.11.0", "@babel/types@^7.12.1", "@babel/types@^7.12.10", "@babel/types@^7.12.5", "@babel/types@^7.12.7", "@babel/types@^7.4.4", "@babel/types@^7.9.0", "@babel/types@^7.9.6": version "7.12.10" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.10.tgz#7965e4a7260b26f09c56bcfcb0498af1f6d9b260" integrity sha512-sf6wboJV5mGyip2hIpDSKsr80RszPinEFjsHTalMxZAZkoQ2/2yQzxlcFN52SJqsyPfLtPmenL4g2KB3KJXPDw== @@ -1091,15 +1051,16 @@ resolved "https://registry.yarnpkg.com/@expo/config-types/-/config-types-40.0.0-beta.2.tgz#4fea4ef5654d02218b02b0b3772529a9ce5b0471" integrity sha512-t9pHCQMXOP4nwd7LGXuHkLlFy0JdfknRSCAeVF4Kw2/y+5OBbR9hW9ZVnetpBf0kORrekgiI7K/qDaa3hh5+Qg== -"@expo/config@^3.3.15": - version "3.3.19" - resolved "https://registry.yarnpkg.com/@expo/config/-/config-3.3.19.tgz#0233aef8a498569aff1d8740c3272cd717f8fa1d" - integrity sha512-CIBPkOAQpz1jcHdopX5GFxn+GymwoLM4Y1c0RzsUfubTjtLTZ5yEPglz/JLvhb6U+heGog+BB1fiQW9SGXl6/Q== +"@expo/config@^3.3.15", "@expo/config@^3.3.18": + version "3.3.21" + resolved "https://registry.yarnpkg.com/@expo/config/-/config-3.3.21.tgz#e4aad368cebd222053c72f82b67990bc98c7bfe2" + integrity sha512-xwWJMnStU1Lx4H+A63egfsiUmOp8VPFCibUEPd+fMn3KkqmLKnaNKZ5McF8Z59nw9UF8qH7AUS9jY77kDlNY5w== dependencies: "@babel/core" "7.9.0" "@expo/babel-preset-cli" "0.2.18" "@expo/config-types" "^40.0.0-beta.2" "@expo/json-file" "8.2.25" + find-up "^5.0.0" fs-extra "9.0.0" getenv "0.7.0" glob "7.1.6" @@ -1137,9 +1098,9 @@ write-file-atomic "^2.3.0" "@expo/vector-icons@^12.0.0": - version "12.0.1" - resolved "https://registry.yarnpkg.com/@expo/vector-icons/-/vector-icons-12.0.1.tgz#a112dc51b5a1ad521621b2c0062b5225a60699f8" - integrity sha512-HIzNmnTtSPmsivQ2djqqttq5v7GvjsKz1ap5pbfJGxygtTymulm9j+2AdEY3JWUCBAUyjtOPorNGC9tuTSN3hw== + version "12.0.2" + resolved "https://registry.yarnpkg.com/@expo/vector-icons/-/vector-icons-12.0.2.tgz#ffb65a547091abcc529686be21b63ebf4cad041b" + integrity sha512-VJZDyMvSzgZrIKeytBcxZ7Ll0iBDBAXaVLVR7nMgmhAPERnxdbqUfP6/wrxl6tETzRnG0Xzu9d64jcQRtechlg== dependencies: lodash.frompairs "^4.0.1" lodash.isequal "^4.5.0" @@ -1500,15 +1461,10 @@ resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.165.tgz#74d55d947452e2de0742bad65270433b63a8c30f" integrity sha512-tjSSOTHhI5mCHTy/OOXYIhi2Wt1qcbHmuXD1Ha7q70CgI/I71afO4XtLb/cVexki1oVYchpul/TOuu3Arcdxrg== -"@types/node@*": - version "14.14.12" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.12.tgz#0b1d86f8c40141091285dea02e4940df73bba43f" - integrity sha512-ASH8OPHMNlkdjrEdmoILmzFfsJICvhBsFfAum4aKZ/9U4B6M6tTmTPh+f3ttWdD74CEGV5XvXWkbyfSdXaTd7g== - -"@types/node@^14.14.7": - version "14.14.10" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.10.tgz#5958a82e41863cfc71f2307b3748e3491ba03785" - integrity sha512-J32dgx2hw8vXrSbu4ZlVhn1Nm3GbeCFNw2FWL8S5QKucHGY0cyNwjdQdO+KMBZ4wpmC7KhLCiNsdk1RFRIYUQQ== +"@types/node@*", "@types/node@^14.14.7": + version "14.14.13" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.13.tgz#9e425079799322113ae8477297ae6ef51b8e0cdf" + integrity sha512-vbxr0VZ8exFMMAjCW8rJwaya0dMCDyYW2ZRdTyjtrCvJoENMpdUHOT/eTzvgyA5ZnqRZ/sI0NwqAxNHKYokLJQ== "@types/prop-types@*": version "15.7.3" @@ -1537,9 +1493,9 @@ react-navigation "*" "@types/react-redux@^7.1.11": - version "7.1.11" - resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.11.tgz#a18e8ab3651e8e8cc94798934927937c66021217" - integrity sha512-OjaFlmqy0CRbYKBoaWF84dub3impqnLJUrz4u8PRjDzaa4n1A2cVmjMV81shwXyAD5x767efhA8STFGJz/r1Zg== + version "7.1.12" + resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.12.tgz#148f2c768687346b556e29a322ca44cfa28cc3ac" + integrity sha512-xZj4/8oRZP5RlJPlC5XPnawPtMn+T2bV4Hxi38AcuoZzXlN/Il/ZPfgXuIq3WG37wVL6FP7suVfmE4BopuqtTg== dependencies: "@types/hoist-non-react-statics" "^3.3.0" "@types/react" "*" @@ -2013,13 +1969,13 @@ braces@^2.3.1: to-regex "^3.0.1" browserslist@^4.14.5, browserslist@^4.15.0: - version "4.15.0" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.15.0.tgz#3d48bbca6a3f378e86102ffd017d9a03f122bdb0" - integrity sha512-IJ1iysdMkGmjjYeRlDU8PQejVwxvVO5QOfXH7ylW31GO6LwNRSmm/SgRXtNsEXqMLl2e+2H5eEJ7sfynF8TCaQ== + version "4.16.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.0.tgz#410277627500be3cb28a1bfe037586fbedf9488b" + integrity sha512-/j6k8R0p3nxOC6kx5JGAxsnhc9ixaWJfYc+TNTzxg6+ARaESAvQGV7h0uNOB4t+pLQJZWzcrMxXOxjgsCj3dqQ== dependencies: - caniuse-lite "^1.0.30001164" + caniuse-lite "^1.0.30001165" colorette "^1.2.1" - electron-to-chromium "^1.3.612" + electron-to-chromium "^1.3.621" escalade "^3.1.1" node-releases "^1.1.67" @@ -2115,7 +2071,7 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@^1.0.30001164: +caniuse-lite@^1.0.30001165: version "1.0.30001165" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001165.tgz#32955490d2f60290bb186bb754f2981917fa744f" integrity sha512-8cEsSMwXfx7lWSUMA2s08z9dIgsnR5NAqjXP23stdsU3AUWkCr/rr4s4OFtHXn5XXr6+7kam3QFVoYyXNPdJPA== @@ -2369,7 +2325,7 @@ copy-descriptor@^0.1.0: resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= -core-js-compat@^3.7.0: +core-js-compat@^3.8.0: version "3.8.1" resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.8.1.tgz#8d1ddd341d660ba6194cbe0ce60f4c794c87a36e" integrity sha512-a16TLmy9NVD1rkjUGbwuyWkiDoN0FDpAwrfLONvHFQx0D9k7J9y0srwMT8QP/Z6HE3MIFaVynEeYwZwPX1o5RQ== @@ -2604,10 +2560,10 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= -electron-to-chromium@^1.3.612: - version "1.3.616" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.616.tgz#de63d1c79bb8eb61168774df0c11c9e1af69f9e8" - integrity sha512-CI8L38UN2BEnqXw3/oRIQTmde0LiSeqWSRlPA42ZTYgJQ8fYenzAM2Z3ni+jtILTcrs5aiXZCGJ96Pm+3/yGyQ== +electron-to-chromium@^1.3.621: + version "1.3.625" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.625.tgz#a7bd18da4dc732c180b2e95e0e296c0bf22f3bd6" + integrity sha512-CsLk/r0C9dAzVPa9QF74HIXduxaucsaRfqiOYvIv2PRhvyC6EOqc/KbpgToQuDVgPf3sNAFZi3iBu4vpGOwGag== emoji-regex@^7.0.1: version "7.0.3" @@ -2861,10 +2817,11 @@ expo-blur@~8.2.2: integrity sha512-Xiklw60RUPIchHKzfvLTIuccVDTIQEAIPv02yJY2xFDujQKjE0NU0/Z5Z+zsEI9QOi82jX9NbR8gQ+8Mm3hDhA== expo-constants@^9.3.3, expo-constants@~9.3.3: - version "9.3.4" - resolved "https://registry.yarnpkg.com/expo-constants/-/expo-constants-9.3.4.tgz#0fc8b6dca8feb6ddf095f016d4854f9f41e839f8" - integrity sha512-tZrZ4Ohdf9YWQK0dI2qU+ArugFaTrotFHmcZg12ehMIeJCy0xkPcEQpxhCECdrbD8zNiyGRog9jEA0dxWI7j9Q== + version "9.3.5" + resolved "https://registry.yarnpkg.com/expo-constants/-/expo-constants-9.3.5.tgz#78085763e8ed100a5f2df7c682fd99631aa03d5e" + integrity sha512-qIlv2ffSjQl3wrvJwXYoNfQNfH/sK46EXcgyEQnQ1SAQO4ukwTEpG9j3fdW6aTiVEVrv/DsA1IaVRqKrUwSd3A== dependencies: + "@expo/config" "^3.3.18" fbjs "1.0.0" uuid "^3.3.2" @@ -3220,6 +3177,14 @@ find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + follow-redirects@^1.10.0: version "1.13.0" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.0.tgz#b42e8d93a2a7eea5ed88633676d6597bc8e384db" @@ -3932,9 +3897,9 @@ jetifier@^1.6.2: integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== js-yaml@^3.13.1: - version "3.14.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" - integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -4077,6 +4042,13 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + lodash._reinterpolate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" @@ -4908,6 +4880,13 @@ p-limit@^2.0.0, p-limit@^2.2.0: dependencies: p-try "^2.0.0" +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" @@ -4929,6 +4908,13 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" @@ -5207,9 +5193,9 @@ react-dom@16.13.1: scheduler "^0.19.1" react-i18next@^11.7.3: - version "11.7.4" - resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-11.7.4.tgz#6c0142e15652d8dd80cd7d857e36efe2e9d4d09a" - integrity sha512-Aq0+QVW7NMYuAtk0Stcwp4jWeNTd1p5XefAfBPcjs/4c/2duG3v3G3zdtn8fC8L4EyA/coKLwdULHI+lYTbF8w== + version "11.8.3" + resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-11.8.3.tgz#d365586a537f759a1bff75e01054f6a5fc71e4f5" + integrity sha512-E5LjGmM3Kgje4M0oSkHFNAxiU1BM+P1J9QPfF7+Agm4sa1YS18GhQNJCZD3o9ofZLjq8ocQfGUuYweYGfrj0RQ== dependencies: "@babel/runtime" "^7.3.1" html-parse-stringify2 "2.0.1" @@ -5313,9 +5299,9 @@ react-native-svg@12.1.0: css-tree "^1.0.0-alpha.39" react-native-toast-message@^1.3.4: - version "1.4.0" - resolved "https://registry.yarnpkg.com/react-native-toast-message/-/react-native-toast-message-1.4.0.tgz#ccc80ba9659bed6bdf49dcb4d221a3ae53da694f" - integrity sha512-LnNTAcdDT1SkKlAn2T6mOtQI2Q4Lsq502K1F0lKHi5J4Mxo5BFmQDs2r2OefjPDaNLCkRvYyj7BI+fxl0HBxrQ== + version "1.4.1" + resolved "https://registry.yarnpkg.com/react-native-toast-message/-/react-native-toast-message-1.4.1.tgz#8be7b91d8a5405e86179f83e52e56de58bbce25f" + integrity sha512-3EcI2NCp+oMynAjDJ6eNZ44oiitlEHccQftdRAFOOKGk6H7mgTTDw299h+dWmpLnMZkfqBn/JtC75ozNleinzQ== dependencies: eslint-plugin-prettier "^3.2.0" prop-types "^15.7.2" @@ -5369,9 +5355,9 @@ react-navigation@*, react-navigation@^4.4.3: "@react-navigation/native" "^3.8.3" react-query@^2.26.2: - version "2.26.3" - resolved "https://registry.yarnpkg.com/react-query/-/react-query-2.26.3.tgz#fb893058523213b17f0033d8184eb5cd6c70d778" - integrity sha512-h4bhZioVY3kXfo+GLNg0zDn9XvbZkvK3I5eTzW82zpRwtJvUtxrkhrAyZ5N6A0Z9WPeRyo+384JubT5RkMaxEQ== + version "2.26.4" + resolved "https://registry.yarnpkg.com/react-query/-/react-query-2.26.4.tgz#18239b4c0b61d0b744f0d4a91f566b294fa9f752" + integrity sha512-sXGG0gh1ah11AcfptYOCRpGDoYMnssq6riQUpQaLSM2EOodVkexp3zNLk1MFDgfRGuXQst40Tnu17oNwni66aA== dependencies: "@babel/runtime" "^7.5.5" @@ -5560,7 +5546,7 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.13.1, resolve@^1.3.2, resolve@^1.4.0, resolve@^1.5.0, resolve@^1.8.1: +resolve@^1.13.1, resolve@^1.3.2, resolve@^1.4.0, resolve@^1.5.0: version "1.19.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== @@ -6188,9 +6174,9 @@ typescript@~4.0.0: integrity sha512-ywmr/VrTVCmNTJ6iV2LwIrfG1P+lv6luD8sUJs+2eI9NLGigaN+nUQc13iHqisq7bra9lnmUSYqbJvegraBOPQ== ua-parser-js@^0.7.18: - version "0.7.22" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.22.tgz#960df60a5f911ea8f1c818f3747b99c6e177eae3" - integrity sha512-YUxzMjJ5T71w6a8WWVcMGM6YWOTX27rCoIQgLXiWaxqXSx9D7DNjiGWn1aJIRSQ5qr0xuhra77bSIh6voR/46Q== + version "0.7.23" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.23.tgz#704d67f951e13195fbcd3d78818577f5bc1d547b" + integrity sha512-m4hvMLxgGHXG3O3fQVAyyAQpZzDOvwnhOTjYz5Xmr7r/+LpkNy3vJXdVRWgd1TkAb7NGROZuSy96CrlNVjA7KA== uglify-es@^3.1.9: version "3.3.9" @@ -6624,3 +6610,8 @@ yargs@^15.1.0: which-module "^2.0.0" y18n "^4.0.0" yargs-parser "^18.1.2" + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==