diff --git a/modules/BlueskyNSE/README.md b/modules/BlueskyNSE/README.md index 63136141c..0891d6815 100644 --- a/modules/BlueskyNSE/README.md +++ b/modules/BlueskyNSE/README.md @@ -111,7 +111,7 @@ The extension coordinates with the main app through: Users can control notification sounds via the Chat Settings screen (`src/screens/Messages/Settings.tsx`): ```typescript -import {useBackgroundNotificationPreferences} from '../../../modules/expo-background-notification-handler/src/BackgroundNotificationHandlerProvider' +import {useBackgroundNotificationPreferences} from '@bsky.app/expo-background-notification-handler/src/BackgroundNotificationHandlerProvider' const {preferences, setPref} = useBackgroundNotificationPreferences() setPref('playSoundChat', true) // Enable DM sounds diff --git a/modules/bottom-sheet/README.md b/modules/bottom-sheet/README.md index 19a9e9ea6..9a2438120 100644 --- a/modules/bottom-sheet/README.md +++ b/modules/bottom-sheet/README.md @@ -142,7 +142,7 @@ interface BottomSheetViewProps { ### Basic Example ```tsx -import {BottomSheet, BottomSheetProvider, BottomSheetOutlet} from '@modules/bottom-sheet' +import {BottomSheet, BottomSheetProvider, BottomSheetOutlet} from '@bsky.app/bottom-sheet' // In your app root: function App() { @@ -204,7 +204,7 @@ The module supports nesting sheets by using `BottomSheetPortalProvider` within s ### Dismiss All Sheets ```tsx -import {BottomSheetNativeComponent} from '@modules/bottom-sheet' +import {BottomSheetNativeComponent} from '@bsky.app/bottom-sheet' BottomSheetNativeComponent.dismissAll() ``` diff --git a/modules/bottom-sheet/package.json b/modules/bottom-sheet/package.json new file mode 100644 index 000000000..57e9cb787 --- /dev/null +++ b/modules/bottom-sheet/package.json @@ -0,0 +1,7 @@ +{ + "name": "@bsky.app/bottom-sheet", + "version": "0.0.0", + "private": true, + "main": "index.ts", + "types": "index.ts" +} diff --git a/modules/expo-background-notification-handler/README.md b/modules/expo-background-notification-handler/README.md index 1e50890b7..c6d8741da 100644 --- a/modules/expo-background-notification-handler/README.md +++ b/modules/expo-background-notification-handler/README.md @@ -100,7 +100,7 @@ The module provides a React Context provider for managing preferences in the app import { BackgroundNotificationPreferencesProvider, useBackgroundNotificationPreferences, -} from 'expo-background-notification-handler/src/BackgroundNotificationHandlerProvider' +} from '@bsky.app/expo-background-notification-handler/src/BackgroundNotificationHandlerProvider' function App() { return ( diff --git a/modules/expo-background-notification-handler/package.json b/modules/expo-background-notification-handler/package.json new file mode 100644 index 000000000..282ef00e8 --- /dev/null +++ b/modules/expo-background-notification-handler/package.json @@ -0,0 +1,7 @@ +{ + "name": "@bsky.app/expo-background-notification-handler", + "version": "0.0.0", + "private": true, + "main": "index.ts", + "types": "index.ts" +} diff --git a/modules/expo-bluesky-gif-view/package.json b/modules/expo-bluesky-gif-view/package.json new file mode 100644 index 000000000..b45f54789 --- /dev/null +++ b/modules/expo-bluesky-gif-view/package.json @@ -0,0 +1,7 @@ +{ + "name": "@bsky.app/expo-bluesky-gif-view", + "version": "0.0.0", + "private": true, + "main": "index.ts", + "types": "index.ts" +} diff --git a/modules/expo-bluesky-swiss-army/package.json b/modules/expo-bluesky-swiss-army/package.json new file mode 100644 index 000000000..86c8543e1 --- /dev/null +++ b/modules/expo-bluesky-swiss-army/package.json @@ -0,0 +1,7 @@ +{ + "name": "@bsky.app/expo-bluesky-swiss-army", + "version": "0.0.0", + "private": true, + "main": "index.ts", + "types": "index.ts" +} diff --git a/modules/expo-emoji-picker/package.json b/modules/expo-emoji-picker/package.json new file mode 100644 index 000000000..ad87627a9 --- /dev/null +++ b/modules/expo-emoji-picker/package.json @@ -0,0 +1,7 @@ +{ + "name": "@bsky.app/expo-emoji-picker", + "version": "0.0.0", + "private": true, + "main": "index.ts", + "types": "index.ts" +} diff --git a/modules/react-native-scroll-forwarder/package.json b/modules/react-native-scroll-forwarder/package.json index 735eefd26..a2362a092 100644 --- a/modules/react-native-scroll-forwarder/package.json +++ b/modules/react-native-scroll-forwarder/package.json @@ -1,5 +1,5 @@ { - "name": "react-native-scroll-forwarder", + "name": "@bsky.app/react-native-scroll-forwarder", "version": "0.0.0", "description": "Scroll forwarder module for Bluesky profile headers", "main": "src/index", diff --git a/package.json b/package.json index 07c6bee40..afea688fc 100644 --- a/package.json +++ b/package.json @@ -119,12 +119,18 @@ "@bitdrift/react-native": "^0.6.8", "@braintree/sanitize-url": "^6.0.2", "@bsky.app/alf": "^0.1.15", + "@bsky.app/bottom-sheet": "link:./modules/bottom-sheet", + "@bsky.app/expo-background-notification-handler": "link:./modules/expo-background-notification-handler", + "@bsky.app/expo-bluesky-gif-view": "link:./modules/expo-bluesky-gif-view", + "@bsky.app/expo-bluesky-swiss-army": "link:./modules/expo-bluesky-swiss-army", "@bsky.app/expo-dynamic-app-icon": "^1.8.5", + "@bsky.app/expo-emoji-picker": "link:./modules/expo-emoji-picker", "@bsky.app/expo-guess-language": "^0.2.8", "@bsky.app/expo-image-crop-tool": "^0.5.1", "@bsky.app/expo-scroll-edge-effect": "^0.1.10", "@bsky.app/expo-translate-text": "^0.2.9", "@bsky.app/peek-menu": "^0.3.2", + "@bsky.app/react-native-scroll-forwarder": "link:./modules/react-native-scroll-forwarder", "@bsky.app/react-native-uitextview": "^2.7.1", "@bsky.app/sift": "^0.3.9", "@bsky.app/tapper": "^0.6.1", @@ -259,7 +265,6 @@ "react-native-reanimated": "~4.6.0", "react-native-safe-area-context": "~5.7.0", "react-native-screens": "4.26.2", - "react-native-scroll-forwarder": "link:./modules/react-native-scroll-forwarder", "react-native-svg": "15.15.4", "react-native-uuid": "^2.0.3", "react-native-view-shot": "^5.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9efcc988a..e7c121054 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -259,9 +259,24 @@ importers: '@bsky.app/alf': specifier: ^0.1.15 version: 0.1.15(react-native@0.86.3(patch_hash=b98fd903a666d35370a478712d555fc967023b6b40a07efe51e90adc04da15d9)(@babel/core@7.29.0(supports-color@8.1.1))(@react-native/jest-preset@0.86.3(@babel/core@7.29.0(supports-color@8.1.1))(react@19.2.3)(supports-color@8.1.1))(@react-native/metro-config@0.86.3(@babel/core@7.29.0(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.3)(supports-color@8.1.1))(react@19.2.3) + '@bsky.app/bottom-sheet': + specifier: link:./modules/bottom-sheet + version: link:modules/bottom-sheet + '@bsky.app/expo-background-notification-handler': + specifier: link:./modules/expo-background-notification-handler + version: link:modules/expo-background-notification-handler + '@bsky.app/expo-bluesky-gif-view': + specifier: link:./modules/expo-bluesky-gif-view + version: link:modules/expo-bluesky-gif-view + '@bsky.app/expo-bluesky-swiss-army': + specifier: link:./modules/expo-bluesky-swiss-army + version: link:modules/expo-bluesky-swiss-army '@bsky.app/expo-dynamic-app-icon': specifier: ^1.8.5 version: 1.8.5(expo@57.0.24)(react-native@0.86.3(patch_hash=b98fd903a666d35370a478712d555fc967023b6b40a07efe51e90adc04da15d9)(@babel/core@7.29.0(supports-color@8.1.1))(@react-native/jest-preset@0.86.3(@babel/core@7.29.0(supports-color@8.1.1))(react@19.2.3)(supports-color@8.1.1))(@react-native/metro-config@0.86.3(@babel/core@7.29.0(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.3)(supports-color@8.1.1))(react@19.2.3) + '@bsky.app/expo-emoji-picker': + specifier: link:./modules/expo-emoji-picker + version: link:modules/expo-emoji-picker '@bsky.app/expo-guess-language': specifier: ^0.2.8 version: 0.2.8(expo@57.0.24)(react-native@0.86.3(patch_hash=b98fd903a666d35370a478712d555fc967023b6b40a07efe51e90adc04da15d9)(@babel/core@7.29.0(supports-color@8.1.1))(@react-native/jest-preset@0.86.3(@babel/core@7.29.0(supports-color@8.1.1))(react@19.2.3)(supports-color@8.1.1))(@react-native/metro-config@0.86.3(@babel/core@7.29.0(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.3)(supports-color@8.1.1))(react@19.2.3) @@ -277,6 +292,9 @@ importers: '@bsky.app/peek-menu': specifier: ^0.3.2 version: 0.3.2(expo@57.0.24)(react-native@0.86.3(patch_hash=b98fd903a666d35370a478712d555fc967023b6b40a07efe51e90adc04da15d9)(@babel/core@7.29.0(supports-color@8.1.1))(@react-native/jest-preset@0.86.3(@babel/core@7.29.0(supports-color@8.1.1))(react@19.2.3)(supports-color@8.1.1))(@react-native/metro-config@0.86.3(@babel/core@7.29.0(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.3)(supports-color@8.1.1))(react@19.2.3) + '@bsky.app/react-native-scroll-forwarder': + specifier: link:./modules/react-native-scroll-forwarder + version: link:modules/react-native-scroll-forwarder '@bsky.app/react-native-uitextview': specifier: ^2.7.1 version: 2.7.1(react-native@0.86.3(patch_hash=b98fd903a666d35370a478712d555fc967023b6b40a07efe51e90adc04da15d9)(@babel/core@7.29.0(supports-color@8.1.1))(@react-native/jest-preset@0.86.3(@babel/core@7.29.0(supports-color@8.1.1))(react@19.2.3)(supports-color@8.1.1))(@react-native/metro-config@0.86.3(@babel/core@7.29.0(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.3)(supports-color@8.1.1))(react@19.2.3) @@ -679,9 +697,6 @@ importers: react-native-screens: specifier: 4.26.2 version: 4.26.2(patch_hash=64db79e069eed40559b3621792683842e9785a55a8617d138459817cf27b1926)(react-native@0.86.3(patch_hash=b98fd903a666d35370a478712d555fc967023b6b40a07efe51e90adc04da15d9)(@babel/core@7.29.0(supports-color@8.1.1))(@react-native/jest-preset@0.86.3(@babel/core@7.29.0(supports-color@8.1.1))(react@19.2.3)(supports-color@8.1.1))(@react-native/metro-config@0.86.3(@babel/core@7.29.0(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.3)(supports-color@8.1.1))(react@19.2.3) - react-native-scroll-forwarder: - specifier: link:./modules/react-native-scroll-forwarder - version: link:modules/react-native-scroll-forwarder react-native-svg: specifier: 15.15.4 version: 15.15.4(patch_hash=8612b482f2e894a420aa2db3c68494960745cf8d259ce64411454d6eb4bb5adb)(react-native@0.86.3(patch_hash=b98fd903a666d35370a478712d555fc967023b6b40a07efe51e90adc04da15d9)(@babel/core@7.29.0(supports-color@8.1.1))(@react-native/jest-preset@0.86.3(@babel/core@7.29.0(supports-color@8.1.1))(react@19.2.3)(supports-color@8.1.1))(@react-native/metro-config@0.86.3(@babel/core@7.29.0(supports-color@8.1.1))(supports-color@8.1.1))(@types/react@19.2.18)(react@19.2.3)(supports-color@8.1.1))(react@19.2.3) diff --git a/src/App.tsx b/src/App.tsx index eaaf70afa..be558e9a2 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -10,6 +10,8 @@ import { import * as ScreenOrientation from 'expo-screen-orientation' import * as SplashScreen from 'expo-splash-screen' import * as SystemUI from 'expo-system-ui' +import {BottomSheetProvider} from '@bsky.app/bottom-sheet' +import {BackgroundNotificationPreferencesProvider} from '@bsky.app/expo-background-notification-handler/src/BackgroundNotificationHandlerProvider' import {useLingui} from '@lingui/react/macro' import {Provider as HideBottomBarBorderProvider} from '#/lib/hooks/useHideBottomBarBorder' @@ -83,8 +85,6 @@ import { } from '#/features/liveEvents/context' import * as Geo from '#/geolocation' import {Splash} from '#/Splash' -import {BottomSheetProvider} from '../modules/bottom-sheet' -import {BackgroundNotificationPreferencesProvider} from '../modules/expo-background-notification-handler/src/BackgroundNotificationHandlerProvider' void SplashScreen.preventAutoHideAsync() if (IS_IOS) { diff --git a/src/App.web.tsx b/src/App.web.tsx index 1f5763045..46856eae9 100644 --- a/src/App.web.tsx +++ b/src/App.web.tsx @@ -4,6 +4,7 @@ import './style.css' import {Fragment, useEffect, useState} from 'react' import {KeyboardProvider as KeyboardControllerProvider} from 'react-native-keyboard-controller' import {SafeAreaProvider} from 'react-native-safe-area-context' +import {BackgroundNotificationPreferencesProvider} from '@bsky.app/expo-background-notification-handler/src/BackgroundNotificationHandlerProvider' import {useLingui} from '@lingui/react/macro' import {Provider as HotkeysProvider} from '#/lib/hotkeys' @@ -75,7 +76,6 @@ import { } from '#/features/liveEvents/context' import * as Geo from '#/geolocation' import {Splash} from '#/Splash' -import {BackgroundNotificationPreferencesProvider} from '../modules/expo-background-notification-handler/src/BackgroundNotificationHandlerProvider' import {Provider as HideBottomBarBorderProvider} from './lib/hooks/useHideBottomBarBorder' /** diff --git a/src/Navigation.tsx b/src/Navigation.tsx index 86295f379..f5e523a33 100644 --- a/src/Navigation.tsx +++ b/src/Navigation.tsx @@ -1,6 +1,7 @@ import {type JSX, useCallback, useRef} from 'react' import * as Linking from 'expo-linking' import * as Notifications from 'expo-notifications' +import {Referrer} from '@bsky.app/expo-bluesky-swiss-army' import {i18n, type MessageDescriptor} from '@lingui/core' import {msg} from '@lingui/core/macro' import { @@ -143,7 +144,6 @@ import {setNavigationMetadata} from '#/analytics/metadata' import {IS_LIQUID_GLASS, IS_NATIVE, IS_WEB} from '#/env' import {InviteScannerScreen} from '#/features/inviteFriends' import {router} from '#/routes' -import {Referrer} from '../modules/expo-bluesky-swiss-army' const navigationRef = createNavigationContainerRef() diff --git a/src/ageAssurance/components/NoAccessScreen.tsx b/src/ageAssurance/components/NoAccessScreen.tsx index 3aeb3a3b1..ee1c2f9f1 100644 --- a/src/ageAssurance/components/NoAccessScreen.tsx +++ b/src/ageAssurance/components/NoAccessScreen.tsx @@ -1,6 +1,7 @@ import {useCallback, useEffect, useEffectEvent} from 'react' import {ScrollView, View} from 'react-native' import {useSafeAreaInsets} from 'react-native-safe-area-context' +import {BottomSheetOutlet} from '@bsky.app/bottom-sheet' import {Trans, useLingui} from '@lingui/react/macro' import {dateDiff, useGetTimeAgo} from '#/lib/hooks/useTimeAgo' @@ -26,7 +27,6 @@ import {Loader} from '#/components/Loader' import {Outlet as PortalOutlet} from '#/components/Portal' import * as Toast from '#/components/Toast' import {Text} from '#/components/Typography' -import {BottomSheetOutlet} from '#/../modules/bottom-sheet' import {useAgeAssurance} from '#/ageAssurance' import {DeviceSignalsNotice} from '#/ageAssurance/components/DeviceSignalsNotice' import {useAgeAssuranceServerDataContext} from '#/ageAssurance/data' diff --git a/src/components/Dialog/context.ts b/src/components/Dialog/context.ts index 93f741432..0ee482070 100644 --- a/src/components/Dialog/context.ts +++ b/src/components/Dialog/context.ts @@ -6,6 +6,7 @@ import { useMemo, useRef, } from 'react' +import {BottomSheetSnapPoint} from '@bsky.app/bottom-sheet/src/BottomSheet.types' import {useDialogStateContext} from '#/state/dialogs' import { @@ -14,7 +15,6 @@ import { type DialogOuterProps, } from '#/components/Dialog/types' import {IS_DEV} from '#/env' -import {BottomSheetSnapPoint} from '../../../modules/bottom-sheet/src/BottomSheet.types' export const Context = createContext({ close: () => {}, diff --git a/src/components/Dialog/index.tsx b/src/components/Dialog/index.tsx index 5cfa2d1c1..446c94c5a 100644 --- a/src/components/Dialog/index.tsx +++ b/src/components/Dialog/index.tsx @@ -26,6 +26,12 @@ import Animated, { } from 'react-native-reanimated' import {useSafeAreaInsets} from 'react-native-safe-area-context' import {scheduleOnRN} from 'react-native-worklets' +import {BottomSheet, BottomSheetSnapPoint} from '@bsky.app/bottom-sheet' +import { + type BottomSheetSnapPointChangeEvent, + type BottomSheetStateChangeEvent, +} from '@bsky.app/bottom-sheet/src/BottomSheet.types' +import {type BottomSheetNativeComponent} from '@bsky.app/bottom-sheet/src/BottomSheetNativeComponent' import {msg} from '@lingui/core/macro' import {useLingui} from '@lingui/react' @@ -45,12 +51,6 @@ import { import {createInput} from '#/components/forms/TextField' import {useOnKeyboard} from '#/components/hooks/useOnKeyboard' import {IS_ANDROID, IS_IOS, IS_LIQUID_GLASS} from '#/env' -import {BottomSheet, BottomSheetSnapPoint} from '../../../modules/bottom-sheet' -import { - type BottomSheetSnapPointChangeEvent, - type BottomSheetStateChangeEvent, -} from '../../../modules/bottom-sheet/src/BottomSheet.types' -import {type BottomSheetNativeComponent} from '../../../modules/bottom-sheet/src/BottomSheetNativeComponent' export {useDialogContext, useDialogControl} from '#/components/Dialog/context' export * from '#/components/Dialog/shared' diff --git a/src/components/Dialog/types.ts b/src/components/Dialog/types.ts index 341cb6c36..099443403 100644 --- a/src/components/Dialog/types.ts +++ b/src/components/Dialog/types.ts @@ -5,10 +5,10 @@ import { type StyleProp, type ViewStyle, } from 'react-native' +import {type BottomSheetViewProps} from '@bsky.app/bottom-sheet' +import {type BottomSheetSnapPoint} from '@bsky.app/bottom-sheet/src/BottomSheet.types' import {type ViewStyleProp} from '#/alf' -import {type BottomSheetViewProps} from '../../../modules/bottom-sheet' -import {type BottomSheetSnapPoint} from '../../../modules/bottom-sheet/src/BottomSheet.types' type A11yProps = Required diff --git a/src/components/Lightbox/pager/ImagePager.tsx b/src/components/Lightbox/pager/ImagePager.tsx index d89bb74d8..b46f047e6 100644 --- a/src/components/Lightbox/pager/ImagePager.tsx +++ b/src/components/Lightbox/pager/ImagePager.tsx @@ -36,6 +36,7 @@ import Animated, { import {scheduleOnRN, scheduleOnUI} from 'react-native-worklets' import {Image} from 'expo-image' import * as ScreenOrientation from 'expo-screen-orientation' +import {PlatformInfo} from '@bsky.app/expo-bluesky-swiss-army' import {type Dimensions} from '#/lib/media/types' import {useTheme} from '#/alf' @@ -43,7 +44,6 @@ import {setSystemUITheme} from '#/alf/util/systemUI' import {type Lightbox} from '#/components/Lightbox/state' import {useAnalytics} from '#/analytics' import {IS_IOS} from '#/env' -import {PlatformInfo} from '../../../../modules/expo-bluesky-swiss-army' import {Footer} from '../chrome/Footer' import {Header} from '../chrome/Header' import { diff --git a/src/components/Post/Embed/ExternalEmbed/Gif.tsx b/src/components/Post/Embed/ExternalEmbed/Gif.tsx index e5fb2f946..bde7378b6 100644 --- a/src/components/Post/Embed/ExternalEmbed/Gif.tsx +++ b/src/components/Post/Embed/ExternalEmbed/Gif.tsx @@ -1,5 +1,7 @@ import {useRef, useState} from 'react' import {View} from 'react-native' +import {GifView} from '@bsky.app/expo-bluesky-gif-view' +import {type GifViewStateChangeEvent} from '@bsky.app/expo-bluesky-gif-view/src/GifView.types' import {msg} from '@lingui/core/macro' import {useLingui} from '@lingui/react' @@ -9,8 +11,6 @@ import {atoms as a, useTheme} from '#/alf' import {Fill} from '#/components/Fill' import {ConstrainedImage} from '#/components/images/AutoSizedImage' import {MediaInsetBorder} from '#/components/MediaInsetBorder' -import {GifView} from '../../../../../modules/expo-bluesky-gif-view' -import {type GifViewStateChangeEvent} from '../../../../../modules/expo-bluesky-gif-view/src/GifView.types' import {GifPresentationControls} from '../VideoEmbed/GifPresentationControls' export function GifEmbed({ diff --git a/src/components/Prompt.tsx b/src/components/Prompt.tsx index 5fdf18e2a..85e7b8286 100644 --- a/src/components/Prompt.tsx +++ b/src/components/Prompt.tsx @@ -1,5 +1,6 @@ import {createContext, useCallback, useContext, useId, useMemo} from 'react' import {type GestureResponderEvent, View} from 'react-native' +import {type BottomSheetViewProps} from '@bsky.app/bottom-sheet' import {useLingui} from '@lingui/react/macro' import {atoms as a, type TextStyleProp, useTheme, web} from '#/alf' @@ -12,7 +13,6 @@ import { import * as Dialog from '#/components/Dialog' import {type Props as SVGIconProps} from '#/components/icons/common' import {Text} from '#/components/Typography' -import {type BottomSheetViewProps} from '../../modules/bottom-sheet' export { type DialogControlProps as PromptControlProps, diff --git a/src/components/dms/EmojiPopup.android.tsx b/src/components/dms/EmojiPopup.android.tsx index 3e5559607..b97968180 100644 --- a/src/components/dms/EmojiPopup.android.tsx +++ b/src/components/dms/EmojiPopup.android.tsx @@ -1,6 +1,7 @@ import {useState} from 'react' import {Modal, Pressable, View} from 'react-native' import {SafeAreaView} from 'react-native-safe-area-context' +import {EmojiPicker} from '@bsky.app/expo-emoji-picker' import {msg} from '@lingui/core/macro' import {useLingui} from '@lingui/react' import {Trans} from '@lingui/react/macro' @@ -9,7 +10,6 @@ import {atoms as a, useTheme} from '#/alf' import {Button, ButtonIcon} from '#/components/Button' import {TimesLarge_Stroke2_Corner0_Rounded as CloseIcon} from '#/components/icons/Times' import {Text} from '#/components/Typography' -import {EmojiPicker} from '../../../modules/expo-emoji-picker' export function EmojiPopup({ children, diff --git a/src/components/dms/EmojiPopup.tsx b/src/components/dms/EmojiPopup.tsx index a988d00b5..5a7c74240 100644 --- a/src/components/dms/EmojiPopup.tsx +++ b/src/components/dms/EmojiPopup.tsx @@ -1 +1 @@ -export {EmojiPicker as EmojiPopup} from '../../../modules/expo-emoji-picker' +export {EmojiPicker as EmojiPopup} from '@bsky.app/expo-emoji-picker' diff --git a/src/components/hooks/useLandingEntry.native.ts b/src/components/hooks/useLandingEntry.native.ts index 275840370..21097ea51 100644 --- a/src/components/hooks/useLandingEntry.native.ts +++ b/src/components/hooks/useLandingEntry.native.ts @@ -1,5 +1,6 @@ import {useEffect, useState} from 'react' import * as Linking from 'expo-linking' +import {Referrer, SharedPrefs} from '@bsky.app/expo-bluesky-swiss-army' import {parseLinkingUrl} from '#/lib/parseLinkingUrl' import { @@ -13,7 +14,6 @@ import { useSetActiveStarterPack, } from '#/state/shell/landing' import {IS_ANDROID} from '#/env' -import {Referrer, SharedPrefs} from '../../../modules/expo-bluesky-swiss-army' export function useLandingEntry() { const [ready, setReady] = useState(false) diff --git a/src/lib/hooks/useIntentHandler.ts b/src/lib/hooks/useIntentHandler.ts index 428ed39f8..42e866b15 100644 --- a/src/lib/hooks/useIntentHandler.ts +++ b/src/lib/hooks/useIntentHandler.ts @@ -2,6 +2,7 @@ import {useCallback, useEffect} from 'react' import {Alert} from 'react-native' import * as Linking from 'expo-linking' import * as WebBrowser from 'expo-web-browser' +import {Referrer} from '@bsky.app/expo-bluesky-swiss-army' import {useOpenComposer} from '#/lib/hooks/useOpenComposer' import {parseLinkingUrl} from '#/lib/parseLinkingUrl' @@ -14,7 +15,6 @@ import {useCloseAllActiveElements} from '#/state/util' import {useIntentDialogs} from '#/components/intents/IntentDialogs' import {useAnalytics} from '#/analytics' import {IS_IOS, IS_NATIVE} from '#/env' -import {Referrer} from '../../../modules/expo-bluesky-swiss-army' import {useApplyPullRequestOTAUpdate} from './useOTAUpdates' type IntentType = 'compose' | 'verify-email' | 'age-assurance' | 'apply-ota' diff --git a/src/lib/notifications/notifications.ts b/src/lib/notifications/notifications.ts index be2b957d2..83b1c2380 100644 --- a/src/lib/notifications/notifications.ts +++ b/src/lib/notifications/notifications.ts @@ -3,6 +3,7 @@ import {Platform} from 'react-native' import * as Notifications from 'expo-notifications' import {getBadgeCountAsync, setBadgeCountAsync} from 'expo-notifications' import {type Client} from '@atproto/lex' +import BackgroundNotificationHandler from '@bsky.app/expo-background-notification-handler' import debounce from 'lodash.debounce' import { @@ -13,7 +14,6 @@ import { import {logger as notyLogger} from '#/lib/notifications/util' import {isNetworkError} from '#/lib/strings/errors' import {type SessionAccount, usePdsClient, useSession} from '#/state/session' -import BackgroundNotificationHandler from '#/../modules/expo-background-notification-handler' import {useAgeAssurance} from '#/ageAssurance' import {useAnalytics} from '#/analytics' import {IS_DEV, IS_NATIVE} from '#/env' diff --git a/src/screens/E2E/SharedPreferencesTesterScreen.tsx b/src/screens/E2E/SharedPreferencesTesterScreen.tsx index 95ead347d..680f31ffb 100644 --- a/src/screens/E2E/SharedPreferencesTesterScreen.tsx +++ b/src/screens/E2E/SharedPreferencesTesterScreen.tsx @@ -1,12 +1,12 @@ import {useState} from 'react' import {View} from 'react-native' +import {SharedPrefs} from '@bsky.app/expo-bluesky-swiss-army' import {ScrollView} from '#/view/com/util/Views' import {atoms as a} from '#/alf' import {Button, ButtonText} from '#/components/Button' import * as Layout from '#/components/Layout' import {Text} from '#/components/Typography' -import {SharedPrefs} from '../../../modules/expo-bluesky-swiss-army' export function SharedPreferencesTesterScreen() { const [currentTestOutput, setCurrentTestOutput] = useState('') diff --git a/src/screens/Messages/Settings.tsx b/src/screens/Messages/Settings.tsx index 07190d2be..a2a037023 100644 --- a/src/screens/Messages/Settings.tsx +++ b/src/screens/Messages/Settings.tsx @@ -1,5 +1,6 @@ import {useCallback} from 'react' import {Pressable, View} from 'react-native' +import {useBackgroundNotificationPreferences} from '@bsky.app/expo-background-notification-handler/src/BackgroundNotificationHandlerProvider' import {Trans, useLingui} from '@lingui/react/macro' import {type NativeStackScreenProps} from '@react-navigation/native-stack' @@ -33,7 +34,6 @@ import {Text} from '#/components/Typography' import {useAgeAssurance} from '#/ageAssurance' import {useAnalytics} from '#/analytics' import {IS_NATIVE} from '#/env' -import {useBackgroundNotificationPreferences} from '../../../modules/expo-background-notification-handler/src/BackgroundNotificationHandlerProvider' type AllowIncoming = 'all' | 'none' | 'following' diff --git a/src/state/a11y.tsx b/src/state/a11y.tsx index 36cf9ac07..b4f7acc43 100644 --- a/src/state/a11y.tsx +++ b/src/state/a11y.tsx @@ -1,8 +1,8 @@ import {createContext, useContext, useEffect, useMemo, useState} from 'react' import {AccessibilityInfo} from 'react-native' +import {PlatformInfo} from '@bsky.app/expo-bluesky-swiss-army' import {IS_WEB} from '#/env' -import {PlatformInfo} from '../../modules/expo-bluesky-swiss-army' const Context = createContext({ reduceMotionEnabled: false, diff --git a/src/state/dialogs/index.tsx b/src/state/dialogs/index.tsx index f9711bfa3..4dc06d3e4 100644 --- a/src/state/dialogs/index.tsx +++ b/src/state/dialogs/index.tsx @@ -6,12 +6,12 @@ import { useRef, useState, } from 'react' +import {BottomSheetNativeComponent} from '@bsky.app/bottom-sheet' import {useHotkeysContext} from '#/lib/hotkeys' import {type DialogControlRefProps} from '#/components/Dialog' import {Provider as GlobalDialogsProvider} from '#/components/dialogs/Context' import {IS_WEB} from '#/env' -import {BottomSheetNativeComponent} from '../../../modules/bottom-sheet' interface IDialogContext { /** diff --git a/src/state/persisted/schema.ts b/src/state/persisted/schema.ts index 5ce33e678..39bee6d3f 100644 --- a/src/state/persisted/schema.ts +++ b/src/state/persisted/schema.ts @@ -1,10 +1,10 @@ import {isDidString} from '@atproto/lex' +import {PlatformInfo} from '@bsky.app/expo-bluesky-swiss-army' import {z} from 'zod' import {deviceLanguageCodes, deviceLocales} from '#/locale/deviceLocales' import {findSupportedAppLanguage} from '#/locale/helpers' import {logger} from '#/logger' -import {PlatformInfo} from '../../../modules/expo-bluesky-swiss-army' const externalEmbedOptions = ['show', 'hide'] as const diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx index 836a5e302..e627cfeff 100644 --- a/src/view/com/composer/Composer.tsx +++ b/src/view/com/composer/Composer.tsx @@ -46,6 +46,7 @@ import * as FileSystem from 'expo-file-system' import {type ImagePickerAsset} from 'expo-image-picker' import {type Client, type UriString} from '@atproto/lex' import {AtUri, type AtUriString} from '@atproto/syntax' +import {BottomSheetPortalProvider} from '@bsky.app/bottom-sheet' import {type RichText} from '@bsky/sdk/richtext' import {plural} from '@lingui/core/macro' import {Trans, useLingui} from '@lingui/react/macro' @@ -145,7 +146,6 @@ import { import {type Gif} from '#/features/gifPicker/types' import {app, chat} from '#/lexicons' import * as bsky from '#/types/bsky' -import {BottomSheetPortalProvider} from '../../../../modules/bottom-sheet' import { draftToComposerPosts, extractLocalRefs, diff --git a/src/view/screens/Profile.tsx b/src/view/screens/Profile.tsx index e2eb20b1b..1e35f5ee7 100644 --- a/src/view/screens/Profile.tsx +++ b/src/view/screens/Profile.tsx @@ -1,7 +1,7 @@ import {useCallback, useEffect, useMemo, useRef, useState} from 'react' import {StyleSheet} from 'react-native' import {SafeAreaView} from 'react-native-safe-area-context' -import {ScrollForwarderView} from 'react-native-scroll-forwarder' +import {ScrollForwarderView} from '@bsky.app/react-native-scroll-forwarder' import {moderateProfile, type ModerationOpts} from '@bsky/sdk/moderation' import {RichText as RichTextAPI} from '@bsky/sdk/richtext' import {msg} from '@lingui/core/macro' diff --git a/src/view/screens/Storybook/Dialogs.tsx b/src/view/screens/Storybook/Dialogs.tsx index 99bcef784..723534fe0 100644 --- a/src/view/screens/Storybook/Dialogs.tsx +++ b/src/view/screens/Storybook/Dialogs.tsx @@ -1,5 +1,6 @@ import {useRef, useState} from 'react' import {View} from 'react-native' +import {PlatformInfo} from '@bsky.app/expo-bluesky-swiss-army' import {useDialogStateControlContext} from '#/state/dialogs' import {atoms as a} from '#/alf' @@ -8,7 +9,6 @@ import * as Dialog from '#/components/Dialog' import * as Menu from '#/components/Menu' import * as Prompt from '#/components/Prompt' import {H3, P, Text} from '#/components/Typography' -import {PlatformInfo} from '../../../../modules/expo-bluesky-swiss-army' export function Dialogs() { const scrollable = Dialog.useDialogControl() diff --git a/src/view/shell/desktop/LeftNav.tsx b/src/view/shell/desktop/LeftNav.tsx index 029990625..b22936f77 100644 --- a/src/view/shell/desktop/LeftNav.tsx +++ b/src/view/shell/desktop/LeftNav.tsx @@ -1,5 +1,6 @@ import {useCallback, useMemo, useState} from 'react' import {StyleSheet, View} from 'react-native' +import {PlatformInfo} from '@bsky.app/expo-bluesky-swiss-army' import {plural} from '@lingui/core/macro' import {Trans, useLingui} from '@lingui/react/macro' import {useNavigation, useNavigationState} from '@react-navigation/native' @@ -88,7 +89,6 @@ import {type Events} from '#/analytics/metrics/types' import {useActorStatus} from '#/features/liveNow' import {type app} from '#/lexicons' import {router} from '#/routes' -import {PlatformInfo} from '../../../../modules/expo-bluesky-swiss-army' const LARGE_ELEMENT_SIZE = 48 const NAV_ICON_WIDTH = 28 diff --git a/src/view/shell/index.tsx b/src/view/shell/index.tsx index c74a05549..053949490 100644 --- a/src/view/shell/index.tsx +++ b/src/view/shell/index.tsx @@ -4,6 +4,8 @@ import {Drawer} from 'react-native-drawer-layout' import {SystemBars} from 'react-native-edge-to-edge' import {Gesture} from 'react-native-gesture-handler' import {useSafeAreaInsets} from 'react-native-safe-area-context' +import {BottomSheetOutlet} from '@bsky.app/bottom-sheet' +import {updateActiveViewAsync} from '@bsky.app/expo-bluesky-swiss-army/src/VisibilityView' import {useNavigation, useNavigationState} from '@react-navigation/native' import {useDedupe} from '#/lib/hooks/useDedupe' @@ -46,8 +48,6 @@ import {RedirectOverlay} from '#/ageAssurance/components/RedirectOverlay' import {PassiveAnalytics} from '#/analytics/PassiveAnalytics' import {IS_ANDROID, IS_IOS, IS_LIQUID_GLASS} from '#/env' import {RoutesContainer, TabsNavigator} from '#/Navigation' -import {BottomSheetOutlet} from '../../../modules/bottom-sheet' -import {updateActiveViewAsync} from '../../../modules/expo-bluesky-swiss-army/src/VisibilityView' import {Composer} from './Composer' import {DrawerContent} from './Drawer'