Add moduleSuffixes to tsconfig (#11146)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import {type ColorValue} from 'react-native'
|
||||
|
||||
export interface GestureAction {
|
||||
color: ColorValue
|
||||
action: () => void
|
||||
threshold: number
|
||||
icon: React.ElementType
|
||||
}
|
||||
|
||||
export interface GestureActions {
|
||||
leftFirst?: GestureAction
|
||||
leftSecond?: GestureAction
|
||||
rightFirst?: GestureAction
|
||||
rightSecond?: GestureAction
|
||||
}
|
||||
@@ -16,20 +16,7 @@ import Animated, {
|
||||
} from 'react-native-reanimated'
|
||||
|
||||
import {useHaptics} from '#/lib/haptics'
|
||||
|
||||
interface GestureAction {
|
||||
color: ColorValue
|
||||
action: () => void
|
||||
threshold: number
|
||||
icon: React.ElementType
|
||||
}
|
||||
|
||||
interface GestureActions {
|
||||
leftFirst?: GestureAction
|
||||
leftSecond?: GestureAction
|
||||
rightFirst?: GestureAction
|
||||
rightSecond?: GestureAction
|
||||
}
|
||||
import {type GestureActions} from './GestureActionView.shared'
|
||||
|
||||
const MAX_WIDTH = Dimensions.get('screen').width
|
||||
const ICON_SIZE = 32
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
export function GestureActionView({children}: {children: React.ReactNode}) {
|
||||
import {type GestureActions} from './GestureActionView.shared'
|
||||
|
||||
/*
|
||||
* Swipe gestures only exist on native; children render as-is on web.
|
||||
*/
|
||||
export function GestureActionView({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode
|
||||
actions: GestureActions
|
||||
}) {
|
||||
return children
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ export function useIntentHandler() {
|
||||
await WebBrowser.dismissBrowser().catch(() => {})
|
||||
}
|
||||
|
||||
const referrerInfo = Referrer.getReferrerInfo()
|
||||
const referrerInfo = await Referrer.getReferrerInfo()
|
||||
if (referrerInfo && referrerInfo.hostname !== 'bsky.app') {
|
||||
ax.metric('deepLink:referrerReceived', {
|
||||
to: url,
|
||||
|
||||
@@ -8,6 +8,8 @@ export function useNavigationTabState() {
|
||||
return {
|
||||
isAtHome: currentRoute === 'Home',
|
||||
isAtSearch: currentRoute === 'Search',
|
||||
isAtFeeds: currentRoute === 'Feeds',
|
||||
isAtBookmarks: currentRoute === 'Bookmarks',
|
||||
isAtNotifications: currentRoute === 'Notifications',
|
||||
isAtMyProfile: currentRoute === 'MyProfile',
|
||||
isAtMessages: currentRoute === 'Messages',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export function useOTAUpdates() {}
|
||||
export function useApplyPullRequestOTAUpdate() {
|
||||
return {
|
||||
tryApplyUpdate: () => {},
|
||||
tryApplyUpdate: async (_channel: string) => {},
|
||||
revertToEmbedded: () => {},
|
||||
isCurrentlyRunningPullRequestDeployment: false,
|
||||
currentChannel: 'web-build',
|
||||
|
||||
@@ -4,7 +4,7 @@ export function Provider({children}: {children: React.ReactNode}) {
|
||||
return children
|
||||
}
|
||||
|
||||
const noop = () => {}
|
||||
const noop = (_scope: string) => {}
|
||||
|
||||
export function useHotkeysContext() {
|
||||
return useMemo(
|
||||
|
||||
@@ -168,10 +168,14 @@ function createResizedImage(
|
||||
|
||||
export async function saveBytesToDisk(
|
||||
filename: string,
|
||||
bytes: Uint8Array<ArrayBuffer>,
|
||||
bytes: Uint8Array,
|
||||
type: string,
|
||||
) {
|
||||
const blob = new Blob([bytes], {type})
|
||||
/*
|
||||
* Bytes handed to us are never SharedArrayBuffer-backed, but the broader
|
||||
* Uint8Array parameter type matches the native variant.
|
||||
*/
|
||||
const blob = new Blob([bytes as Uint8Array<ArrayBuffer>], {type})
|
||||
const url = URL.createObjectURL(blob)
|
||||
downloadUrl(url, filename)
|
||||
// Firefox requires a small delay
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import {type ImagePickerOptions} from 'expo-image-picker'
|
||||
import {type OpenCropperOptions} from '@bsky.app/expo-image-crop-tool'
|
||||
|
||||
import {type PickerImage} from './picker.shared'
|
||||
import {type CameraOpts} from './types'
|
||||
|
||||
export {openPicker, openUnifiedPicker} from './picker.shared'
|
||||
|
||||
export async function openCamera(_opts: CameraOpts): Promise<PickerImage> {
|
||||
export async function openCamera(
|
||||
_opts: ImagePickerOptions,
|
||||
): Promise<PickerImage> {
|
||||
throw new Error('openCamera is not supported on web')
|
||||
}
|
||||
|
||||
|
||||
@@ -8,10 +8,3 @@ export interface PickerOpts {
|
||||
multiple?: boolean
|
||||
maxFiles?: number
|
||||
}
|
||||
|
||||
export interface CameraOpts {
|
||||
width: number
|
||||
height: number
|
||||
freeStyleCropEnabled?: boolean
|
||||
cropperCircleOverlay?: boolean
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user