···1-import {useCallback, useRef} from 'react'
2import {Linking} from 'react-native'
3import * as Notifications from 'expo-notifications'
4import {i18n, type MessageDescriptor} from '@lingui/core'
···1+import {type JSX, useCallback, useRef} from 'react'
2import {Linking} from 'react-native'
3import * as Notifications from 'expo-notifications'
4import {i18n, type MessageDescriptor} from '@lingui/core'
-1
src/alf/typography.tsx
···3import {type StyleProp, type TextStyle} from 'react-native'
4import {UITextView} from 'react-native-uitextview'
5import createEmojiRegex from 'emoji-regex'
6-import type React from 'react'
78import {isNative} from '#/platform/detection'
9import {isIOS} from '#/platform/detection'
···3import {type StyleProp, type TextStyle} from 'react-native'
4import {UITextView} from 'react-native-uitextview'
5import createEmojiRegex from 'emoji-regex'
067import {isNative} from '#/platform/detection'
8import {isIOS} from '#/platform/detection'
···5 type ViewStyle,
6} from 'react-native'
7import {type SharedValue} from 'react-native-reanimated'
8-import type React from 'react'
910import type * as Dialog from '#/components/Dialog'
11import {
···5 type ViewStyle,
6} from 'react-native'
7import {type SharedValue} from 'react-native-reanimated'
089import type * as Dialog from '#/components/Dialog'
10import {
+1-2
src/components/Dialog/types.ts
···5 type StyleProp,
6 type ViewStyle,
7} from 'react-native'
8-import type React from 'react'
910import {type ViewStyleProp} from '#/alf'
11import {type BottomSheetViewProps} from '../../../modules/bottom-sheet'
···34 */
35export type DialogControlProps = DialogControlRefProps & {
36 id: string
37- ref: React.RefObject<DialogControlRefProps>
38 isOpen?: boolean
39}
40
···5 type StyleProp,
6 type ViewStyle,
7} from 'react-native'
089import {type ViewStyleProp} from '#/alf'
10import {type BottomSheetViewProps} from '../../../modules/bottom-sheet'
···33 */
34export type DialogControlProps = DialogControlRefProps & {
35 id: string
36+ ref: React.RefObject<DialogControlRefProps | null>
37 isOpen?: boolean
38}
39
-1
src/components/Lists.tsx
···2import {type StyleProp, View, type ViewStyle} from 'react-native'
3import {msg, Trans} from '@lingui/macro'
4import {useLingui} from '@lingui/react'
5-import type React from 'react'
67import {cleanError} from '#/lib/strings/errors'
8import {CenteredView} from '#/view/com/util/Views'
···2import {type StyleProp, View, type ViewStyle} from 'react-native'
3import {msg, Trans} from '@lingui/macro'
4import {useLingui} from '@lingui/react'
056import {cleanError} from '#/lib/strings/errors'
7import {CenteredView} from '#/view/com/util/Views'
···1import {View} from 'react-native'
2import {msg, Trans} from '@lingui/macro'
3import {useLingui} from '@lingui/react'
4-import type React from 'react'
56import {atoms as a, useTheme} from '#/alf'
7import {Button, ButtonText} from '#/components/Button'
···1import {View} from 'react-native'
2import {msg, Trans} from '@lingui/macro'
3import {useLingui} from '@lingui/react'
045import {atoms as a, useTheme} from '#/alf'
6import {Button, ButtonText} from '#/components/Button'
···1import {type SvgProps} from 'react-native-svg'
2-import type React from 'react'
34import {PressableWithHover} from '#/view/com/util/PressableWithHover'
5import {atoms as a, useTheme, web} from '#/alf'
···1import {type SvgProps} from 'react-native-svg'
023import {PressableWithHover} from '#/view/com/util/PressableWithHover'
4import {atoms as a, useTheme, web} from '#/alf'
···2import {View} from 'react-native'
3import {msg} from '@lingui/macro'
4import {useLingui} from '@lingui/react'
5-import type React from 'react'
67import {isFirefox, isTouchDevice} from '#/lib/browser'
8import {clamp} from '#/lib/numbers'
···2import {View} from 'react-native'
3import {msg} from '@lingui/macro'
4import {useLingui} from '@lingui/react'
056import {isFirefox, isTouchDevice} from '#/lib/browser'
7import {clamp} from '#/lib/numbers'
···3import Animated, {FadeIn, FadeOut} from 'react-native-reanimated'
4import {msg} from '@lingui/macro'
5import {useLingui} from '@lingui/react'
6-import type React from 'react'
78import {isSafari, isTouchDevice} from '#/lib/browser'
9import {atoms as a} from '#/alf'
···3import Animated, {FadeIn, FadeOut} from 'react-native-reanimated'
4import {msg} from '@lingui/macro'
5import {useLingui} from '@lingui/react'
067import {isSafari, isTouchDevice} from '#/lib/browser'
8import {atoms as a} from '#/alf'
···10import {type AppBskyEmbedVideo} from '@atproto/api'
11import {msg} from '@lingui/macro'
12import {useLingui} from '@lingui/react'
13-import type React from 'react'
1415import {isFirefox} from '#/lib/browser'
16import {ErrorBoundary} from '#/view/com/util/ErrorBoundary'
···38 useActiveVideoWeb()
39 const [onScreen, setOnScreen] = useState(false)
40 const [isFullscreen] = useFullscreen()
41- const lastKnownTime = useRef<number | undefined>()
4243 useEffect(() => {
44 if (!ref.current) return
···10import {type AppBskyEmbedVideo} from '@atproto/api'
11import {msg} from '@lingui/macro'
12import {useLingui} from '@lingui/react'
01314import {isFirefox} from '#/lib/browser'
15import {ErrorBoundary} from '#/view/com/util/ErrorBoundary'
···37 useActiveVideoWeb()
38 const [onScreen, setOnScreen] = useState(false)
39 const [isFullscreen] = useFullscreen()
40+ const lastKnownTime = useRef<number | undefined>(undefined)
4142 useEffect(() => {
43 if (!ref.current) return
-1
src/components/PostControls/PostMenu/index.tsx
···8} from '@atproto/api'
9import {msg} from '@lingui/macro'
10import {useLingui} from '@lingui/react'
11-import type React from 'react'
1213import {type Shadow} from '#/state/cache/post-shadow'
14import {EventStopper} from '#/view/com/util/EventStopper'
···8} from '@atproto/api'
9import {msg} from '@lingui/macro'
10import {useLingui} from '@lingui/react'
01112import {type Shadow} from '#/state/cache/post-shadow'
13import {EventStopper} from '#/view/com/util/EventStopper'
···3import {msg, Trans} from '@lingui/macro'
4import {useLingui} from '@lingui/react'
5import {useNavigation} from '@react-navigation/native'
6-import type React from 'react'
78import {makeProfileLink} from '#/lib/routes/links'
9import {type NavigationProp} from '#/lib/routes/types'
···3import {msg, Trans} from '@lingui/macro'
4import {useLingui} from '@lingui/react'
5import {useNavigation} from '@react-navigation/native'
067import {makeProfileLink} from '#/lib/routes/links'
8import {type NavigationProp} from '#/lib/routes/types'
-1
src/components/PostControls/ShareMenu/index.tsx
···9} from '@atproto/api'
10import {msg} from '@lingui/macro'
11import {useLingui} from '@lingui/react'
12-import type React from 'react'
1314import {makeProfileLink} from '#/lib/routes/links'
15import {shareUrl} from '#/lib/sharing'
···9} from '@atproto/api'
10import {msg} from '@lingui/macro'
11import {useLingui} from '@lingui/react'
01213import {makeProfileLink} from '#/lib/routes/links'
14import {shareUrl} from '#/lib/sharing'
-2
src/components/ProfileHoverCard/types.ts
···1-import type React from 'react'
2-3import {type ViewStyleProp} from '#/alf'
45export type ProfileHoverCardProps = ViewStyleProp & {
···001import {type ViewStyleProp} from '#/alf'
23export type ProfileHoverCardProps = ViewStyleProp & {
···3import {type ChatBskyConvoDefs} from '@atproto/api'
4import {msg} from '@lingui/macro'
5import {useLingui} from '@lingui/react'
6-import type React from 'react'
78import {useConvoActive} from '#/state/messages/convo'
9import {useSession} from '#/state/session'
···3import {type ChatBskyConvoDefs} from '@atproto/api'
4import {msg} from '@lingui/macro'
5import {useLingui} from '@lingui/react'
067import {useConvoActive} from '#/state/messages/convo'
8import {useSession} from '#/state/session'
···1import React from 'react'
2-import {AccessibilityProps, TextStyle, View, ViewStyle} from 'react-native'
0000034import {atoms as a, native, useTheme} from '#/alf'
5import * as Toggle from '#/components/forms/Toggle'
···78type ItemProps = Omit<Toggle.ItemProps, 'style' | 'role' | 'children'> &
9 AccessibilityProps & {
10- children: React.ReactElement
11 testID?: string
12 }
13
···1import React from 'react'
2+import {
3+ type AccessibilityProps,
4+ type TextStyle,
5+ View,
6+ type ViewStyle,
7+} from 'react-native'
89import {atoms as a, native, useTheme} from '#/alf'
10import * as Toggle from '#/components/forms/Toggle'
···1213type ItemProps = Omit<Toggle.ItemProps, 'style' | 'role' | 'children'> &
14 AccessibilityProps & {
15+ children: React.ReactElement<any>
16 testID?: string
17 }
18
+1-1
src/components/hooks/useFullscreen.ts
···14 return () => document.removeEventListener('fullscreenchange', onChange)
15}
1617-export function useFullscreen(ref?: React.RefObject<HTMLElement>) {
18 if (!isWeb) throw new Error("'useFullscreen' is a web-only hook")
19 const isFullscreen = useSyncExternalStore(fullscreenSubscribe, () =>
20 Boolean(document.fullscreenElement),
···14 return () => document.removeEventListener('fullscreenchange', onChange)
15}
1617+export function useFullscreen(ref?: React.RefObject<HTMLElement | null>) {
18 if (!isWeb) throw new Error("'useFullscreen' is a web-only hook")
19 const isFullscreen = useSyncExternalStore(fullscreenSubscribe, () =>
20 Boolean(document.fullscreenElement),
-1
src/components/moderation/LabelPreference.tsx
···5} from '@atproto/api'
6import {msg, Trans} from '@lingui/macro'
7import {useLingui} from '@lingui/react'
8-import type React from 'react'
910import {useGlobalLabelStrings} from '#/lib/moderation/useGlobalLabelStrings'
11import {useLabelBehaviorDescription} from '#/lib/moderation/useLabelBehaviorDescription'
···5} from '@atproto/api'
6import {msg, Trans} from '@lingui/macro'
7import {useLingui} from '@lingui/react'
089import {useGlobalLabelStrings} from '#/lib/moderation/useGlobalLabelStrings'
10import {useLabelBehaviorDescription} from '#/lib/moderation/useLabelBehaviorDescription'
+1-1
src/lib/hooks/useAnimatedValue.ts
···2import {Animated} from 'react-native'
34export function useAnimatedValue(initialValue: number) {
5- const lazyRef = React.useRef<Animated.Value>()
67 if (lazyRef.current === undefined) {
8 lazyRef.current = new Animated.Value(initialValue)
···2import {Animated} from 'react-native'
34export function useAnimatedValue(initialValue: number) {
5+ const lazyRef = React.useRef<Animated.Value>(undefined)
67 if (lazyRef.current === undefined) {
8 lazyRef.current = new Animated.Value(initialValue)
···13 * returns a ref callback function that can be used to merge multiple refs into a single ref.
14 */
15export function mergeRefs<T = any>(
16- refs: Array<React.MutableRefObject<T> | React.LegacyRef<T>>,
17): React.RefCallback<T> {
18 return value => {
19 refs.forEach(ref => {
···13 * returns a ref callback function that can be used to merge multiple refs into a single ref.
14 */
15export function mergeRefs<T = any>(
16+ refs: Array<React.MutableRefObject<T> | React.Ref<T>>,
17): React.RefCallback<T> {
18 return value => {
19 refs.forEach(ref => {
···1-import type React from 'react'
2-3import {Provider as ColorModeProvider} from './color-mode'
4import {Provider as DrawerOpenProvider} from './drawer-open'
5import {Provider as DrawerSwipableProvider} from './drawer-swipe-disabled'
···001import {Provider as ColorModeProvider} from './color-mode'
2import {Provider as DrawerOpenProvider} from './drawer-open'
3import {Provider as DrawerSwipableProvider} from './drawer-swipe-disabled'
···1-import {useCallback, useEffect, useMemo, useRef, useState} from 'react'
00000002import {View} from 'react-native'
3import {type AppBskyActorDefs, AppBskyFeedDefs} from '@atproto/api'
4import {msg} from '@lingui/macro'
···1+import {
2+ type JSX,
3+ useCallback,
4+ useEffect,
5+ useMemo,
6+ useRef,
7+ useState,
8+} from 'react'
9import {View} from 'react-native'
10import {type AppBskyActorDefs, AppBskyFeedDefs} from '@atproto/api'
11import {msg} from '@lingui/macro'
+2-1
src/view/com/home/HomeHeaderLayout.web.tsx
···1-import React from 'react'
2import {View} from 'react-native'
3import {msg} from '@lingui/macro'
4import {useLingui} from '@lingui/react'
056import {useKawaiiMode} from '#/state/preferences/kawaii'
7import {useSession} from '#/state/session'
···1+import {type JSX} from 'react'
2import {View} from 'react-native'
3import {msg} from '@lingui/macro'
4import {useLingui} from '@lingui/react'
5+import type React from 'react'
67import {useKawaiiMode} from '#/state/preferences/kawaii'
8import {useSession} from '#/state/session'
+1
src/view/com/home/HomeHeaderLayoutMobile.tsx
···01import {View} from 'react-native'
2import Animated from 'react-native-reanimated'
3import {msg} from '@lingui/macro'
···1+import {type JSX} from 'react'
2import {View} from 'react-native'
3import Animated from 'react-native-reanimated'
4import {msg} from '@lingui/macro'
+1-1
src/view/com/lists/ListMembers.tsx
···1-import React, {useCallback} from 'react'
2import {
3 Dimensions,
4 type GestureResponderEvent,
···1+import React, {type JSX, useCallback} from 'react'
2import {
3 Dimensions,
4 type GestureResponderEvent,
+5-5
src/view/com/lists/MyLists.tsx
···1-import React from 'react'
2import {
3 ActivityIndicator,
4 FlatList as RNFlatList,
5 RefreshControl,
6- StyleProp,
7 View,
8- ViewStyle,
9} from 'react-native'
10-import {AppBskyGraphDefs as GraphDefs} from '@atproto/api'
11import {msg} from '@lingui/macro'
12import {useLingui} from '@lingui/react'
13···16import {s} from '#/lib/styles'
17import {logger} from '#/logger'
18import {useModerationOpts} from '#/state/preferences/moderation-opts'
19-import {MyListsFilter, useMyListsQuery} from '#/state/queries/my-lists'
20import {atoms as a, useTheme} from '#/alf'
21import {BulletList_Stroke2_Corner0_Rounded as ListIcon} from '#/components/icons/BulletList'
22import * as ListCard from '#/components/ListCard'
···1+import React, {type JSX} from 'react'
2import {
3 ActivityIndicator,
4 FlatList as RNFlatList,
5 RefreshControl,
6+ type StyleProp,
7 View,
8+ type ViewStyle,
9} from 'react-native'
10+import {type AppBskyGraphDefs as GraphDefs} from '@atproto/api'
11import {msg} from '@lingui/macro'
12import {useLingui} from '@lingui/react'
13···16import {s} from '#/lib/styles'
17import {logger} from '#/logger'
18import {useModerationOpts} from '#/state/preferences/moderation-opts'
19+import {type MyListsFilter, useMyListsQuery} from '#/state/queries/my-lists'
20import {atoms as a, useTheme} from '#/alf'
21import {BulletList_Stroke2_Corner0_Rounded as ListIcon} from '#/components/icons/BulletList'
22import * as ListCard from '#/components/ListCard'
···1-import {memo, useCallback, useEffect, useRef, useState} from 'react'
2import {
3 type LayoutChangeEvent,
4 type NativeScrollEvent,
···1+import {type JSX, memo, useCallback, useEffect, useRef, useState} from 'react'
2import {
3 type LayoutChangeEvent,
4 type NativeScrollEvent,
+8-3
src/view/com/pager/PagerWithHeader.web.tsx
···1import * as React from 'react'
2-import {ScrollView, View} from 'react-native'
03import {useAnimatedRef} from 'react-native-reanimated'
45-import {Pager, PagerRef, RenderTabBarFnProps} from '#/view/com/pager/Pager'
00006import {atoms as a, web} from '#/alf'
7import * as Layout from '#/components/Layout'
8-import {ListMethods} from '../util/List'
9import {TabBar} from './TabBar'
1011export interface PagerWithHeaderChildParams {
···1import * as React from 'react'
2+import {type JSX} from 'react'
3+import {type ScrollView, View} from 'react-native'
4import {useAnimatedRef} from 'react-native-reanimated'
56+import {
7+ Pager,
8+ type PagerRef,
9+ type RenderTabBarFnProps,
10+} from '#/view/com/pager/Pager'
11import {atoms as a, web} from '#/alf'
12import * as Layout from '#/components/Layout'
13+import {type ListMethods} from '../util/List'
14import {TabBar} from './TabBar'
1516export interface PagerWithHeaderChildParams {
···4import {msg} from '@lingui/macro'
5import {useLingui} from '@lingui/react'
6import {useQueryClient} from '@tanstack/react-query'
7-import type React from 'react'
89import {useActorStatus} from '#/lib/actor-status'
10import {makeProfileLink} from '#/lib/routes/links'
···4import {msg} from '@lingui/macro'
5import {useLingui} from '@lingui/react'
6import {useQueryClient} from '@tanstack/react-query'
078import {useActorStatus} from '#/lib/actor-status'
9import {makeProfileLink} from '#/lib/routes/links'
+2-2
src/view/com/util/TimeElapsed.tsx
···1-import React from 'react'
2-import {I18n} from '@lingui/core'
3import {useLingui} from '@lingui/react'
45import {useGetTimeAgo} from '#/lib/hooks/useTimeAgo'
···1+import React, {type JSX} from 'react'
2+import {type I18n} from '@lingui/core'
3import {useLingui} from '@lingui/react'
45import {useGetTimeAgo} from '#/lib/hooks/useTimeAgo'
+2
src/view/com/util/ViewHeader.tsx
···001import {Header} from '#/components/Layout'
23/**
···1+import {type JSX} from 'react'
2+3import {Header} from '#/components/Layout'
45/**
···1-import {ComponentProps} from 'react'
2-import {StyleSheet, TouchableWithoutFeedback} from 'react-native'
3import Animated from 'react-native-reanimated'
4import {useSafeAreaInsets} from 'react-native-safe-area-context'
5import {LinearGradient} from 'expo-linear-gradient'
···1+import {type ComponentProps, type JSX} from 'react'
2+import {StyleSheet, type TouchableWithoutFeedback} from 'react-native'
3import Animated from 'react-native-reanimated'
4import {useSafeAreaInsets} from 'react-native-safe-area-context'
5import {LinearGradient} from 'expo-linear-gradient'
···4import {type AppBskyEmbedImages} from '@atproto/api'
5import {msg} from '@lingui/macro'
6import {useLingui} from '@lingui/react'
7-import type React from 'react'
89import {type Dimensions} from '#/lib/media/types'
10import {useLargeAltBadgeEnabled} from '#/state/preferences/large-alt-badge'
···4import {type AppBskyEmbedImages} from '@atproto/api'
5import {msg} from '@lingui/macro'
6import {useLingui} from '@lingui/react'
078import {type Dimensions} from '#/lib/media/types'
9import {useLargeAltBadgeEnabled} from '#/state/preferences/large-alt-badge'
···1-import React, {type ComponentProps} from 'react'
2import {Linking, ScrollView, TouchableOpacity, View} from 'react-native'
3import {useSafeAreaInsets} from 'react-native-safe-area-context'
4import {msg, Plural, plural, Trans} from '@lingui/macro'
···1+import React, {type ComponentProps, type JSX} from 'react'
2import {Linking, ScrollView, TouchableOpacity, View} from 'react-native'
3import {useSafeAreaInsets} from 'react-native-safe-area-context'
4import {msg, Plural, plural, Trans} from '@lingui/macro'
+1-1
src/view/shell/bottom-bar/BottomBar.tsx
···1-import {useCallback} from 'react'
2import {type GestureResponderEvent, View} from 'react-native'
3import Animated from 'react-native-reanimated'
4import {useSafeAreaInsets} from 'react-native-safe-area-context'
···1+import {type JSX, useCallback} from 'react'
2import {type GestureResponderEvent, View} from 'react-native'
3import Animated from 'react-native-reanimated'
4import {useSafeAreaInsets} from 'react-native-safe-area-context'