replace radix imports
This commit is contained in:
committed by
Samuel Newman
parent
a7729a4fb4
commit
3785c46bf7
@@ -11,6 +11,9 @@ if (cfg.resolver.resolveRequest) {
|
|||||||
throw Error('Update this override because it is conflicting now.')
|
throw Error('Update this override because it is conflicting now.')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Enforce "no RNGH on web"
|
||||||
|
cfg.resolver.blockList = [/react-native-gesture-handler\/.*/]
|
||||||
|
|
||||||
if (process.env.BSKY_PROFILE) {
|
if (process.env.BSKY_PROFILE) {
|
||||||
cfg.cacheVersion += ':PROFILE'
|
cfg.cacheVersion += ':PROFILE'
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -47,7 +47,7 @@
|
|||||||
"web": "expo start --web",
|
"web": "expo start --web",
|
||||||
"use-build-number": "./scripts/useBuildNumberEnv.sh",
|
"use-build-number": "./scripts/useBuildNumberEnv.sh",
|
||||||
"use-build-number-with-bump": "./scripts/useBuildNumberEnvWithBump.sh",
|
"use-build-number-with-bump": "./scripts/useBuildNumberEnvWithBump.sh",
|
||||||
"build-web": "expo export:web && node ./scripts/post-web-build.js",
|
"build-web": "expo export --platform web && node ./scripts/post-web-build.js",
|
||||||
"build-all": "pnpm intl:build && pnpm use-build-number-with-bump eas build --platform all",
|
"build-all": "pnpm intl:build && pnpm use-build-number-with-bump eas build --platform all",
|
||||||
"build-ios": "pnpm use-build-number-with-bump eas build -p ios",
|
"build-ios": "pnpm use-build-number-with-bump eas build -p ios",
|
||||||
"build-android": "pnpm use-build-number-with-bump eas build -p android",
|
"build-android": "pnpm use-build-number-with-bump eas build -p android",
|
||||||
|
|||||||
@@ -16,7 +16,8 @@
|
|||||||
-->
|
-->
|
||||||
<link rel="preconnect" href="https://bsky.social">
|
<link rel="preconnect" href="https://bsky.social">
|
||||||
<link rel="preconnect" href="https://go.bsky.app">
|
<link rel="preconnect" href="https://go.bsky.app">
|
||||||
<title>%WEB_TITLE%</title>
|
<!-- let js set by leaving empty -->
|
||||||
|
<title></title>
|
||||||
|
|
||||||
<link rel="preload" as="font" type="font/woff2" href="/static/media/InterVariable.c504db5c06caaf7cdfba.woff2" crossorigin>
|
<link rel="preload" as="font" type="font/woff2" href="/static/media/InterVariable.c504db5c06caaf7cdfba.woff2" crossorigin>
|
||||||
<link rel="stylesheet" href="/static/style.css">
|
<link rel="stylesheet" href="/static/style.css">
|
||||||
@@ -18,7 +18,9 @@ import {
|
|||||||
} from 'react-native'
|
} from 'react-native'
|
||||||
import {msg} from '@lingui/core/macro'
|
import {msg} from '@lingui/core/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
import {DismissableLayer, FocusGuards, FocusScope} from 'radix-ui/internal'
|
import {DismissableLayer} from '@radix-ui/react-dismissable-layer'
|
||||||
|
import {useFocusGuards} from '@radix-ui/react-focus-guards'
|
||||||
|
import {FocusScope} from '@radix-ui/react-focus-scope'
|
||||||
import {RemoveScrollBar} from 'react-remove-scroll-bar'
|
import {RemoveScrollBar} from 'react-remove-scroll-bar'
|
||||||
|
|
||||||
import {logger} from '#/logger'
|
import {logger} from '#/logger'
|
||||||
@@ -176,9 +178,9 @@ export function Inner({
|
|||||||
const {close} = useContext(Context)
|
const {close} = useContext(Context)
|
||||||
const {gtMobile} = useBreakpoints()
|
const {gtMobile} = useBreakpoints()
|
||||||
const {reduceMotionEnabled} = useA11y()
|
const {reduceMotionEnabled} = useA11y()
|
||||||
FocusGuards.useFocusGuards()
|
useFocusGuards()
|
||||||
return (
|
return (
|
||||||
<FocusScope.FocusScope loop asChild trapped>
|
<FocusScope loop asChild trapped>
|
||||||
<View
|
<View
|
||||||
role="dialog"
|
role="dialog"
|
||||||
aria-role="dialog"
|
aria-role="dialog"
|
||||||
@@ -207,7 +209,7 @@ export function Inner({
|
|||||||
!reduceMotionEnabled && a.zoom_fade_in,
|
!reduceMotionEnabled && a.zoom_fade_in,
|
||||||
style,
|
style,
|
||||||
])}>
|
])}>
|
||||||
<DismissableLayer.DismissableLayer
|
<DismissableLayer
|
||||||
onInteractOutside={preventDefault}
|
onInteractOutside={preventDefault}
|
||||||
onFocusOutside={preventDefault}
|
onFocusOutside={preventDefault}
|
||||||
onDismiss={close}
|
onDismiss={close}
|
||||||
@@ -216,9 +218,9 @@ export function Inner({
|
|||||||
<View style={[gtMobile ? a.p_2xl : a.p_xl, contentContainerStyle]}>
|
<View style={[gtMobile ? a.p_2xl : a.p_xl, contentContainerStyle]}>
|
||||||
{children}
|
{children}
|
||||||
</View>
|
</View>
|
||||||
</DismissableLayer.DismissableLayer>
|
</DismissableLayer>
|
||||||
</View>
|
</View>
|
||||||
</FocusScope.FocusScope>
|
</FocusScope>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {FocusScope as RadixFocusScope} from 'radix-ui/internal'
|
import {FocusScope as RadixFocusScope} from '@radix-ui/react-focus-scope'
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The web version of the FocusScope component is a proper implementation, we
|
* The web version of the FocusScope component is a proper implementation, we
|
||||||
@@ -7,8 +7,8 @@ import {FocusScope as RadixFocusScope} from 'radix-ui/internal'
|
|||||||
*/
|
*/
|
||||||
export function FocusScope({children}: {children: React.ReactNode}) {
|
export function FocusScope({children}: {children: React.ReactNode}) {
|
||||||
return (
|
return (
|
||||||
<RadixFocusScope.FocusScope loop asChild trapped>
|
<RadixFocusScope loop asChild trapped>
|
||||||
{children}
|
{children}
|
||||||
</RadixFocusScope.FocusScope>
|
</RadixFocusScope>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ import {useCallback, useEffect, useRef, useState} from 'react'
|
|||||||
import {Pressable, StyleSheet, View} from 'react-native'
|
import {Pressable, StyleSheet, View} from 'react-native'
|
||||||
import {Image} from 'expo-image'
|
import {Image} from 'expo-image'
|
||||||
import {Trans, useLingui} from '@lingui/react/macro'
|
import {Trans, useLingui} from '@lingui/react/macro'
|
||||||
import {FocusGuards, FocusScope} from 'radix-ui/internal'
|
import {useFocusGuards} from '@radix-ui/react-focus-guards'
|
||||||
|
import {FocusScope} from '@radix-ui/react-focus-scope'
|
||||||
import {RemoveScrollBar} from 'react-remove-scroll-bar'
|
import {RemoveScrollBar} from 'react-remove-scroll-bar'
|
||||||
|
|
||||||
import {saveImageToMediaLibrary} from '#/lib/media/manip'
|
import {saveImageToMediaLibrary} from '#/lib/media/manip'
|
||||||
@@ -66,7 +67,7 @@ function LightboxContainer({
|
|||||||
handleBackgroundPress: () => void
|
handleBackgroundPress: () => void
|
||||||
}) {
|
}) {
|
||||||
const {t: l} = useLingui()
|
const {t: l} = useLingui()
|
||||||
FocusGuards.useFocusGuards()
|
useFocusGuards()
|
||||||
return (
|
return (
|
||||||
<Pressable
|
<Pressable
|
||||||
accessibilityHint={undefined}
|
accessibilityHint={undefined}
|
||||||
@@ -75,7 +76,7 @@ function LightboxContainer({
|
|||||||
style={[a.fixed, a.inset_0, a.z_10]}>
|
style={[a.fixed, a.inset_0, a.z_10]}>
|
||||||
<Backdrop />
|
<Backdrop />
|
||||||
<RemoveScrollBar />
|
<RemoveScrollBar />
|
||||||
<FocusScope.FocusScope loop trapped asChild>
|
<FocusScope loop trapped asChild>
|
||||||
<div
|
<div
|
||||||
role="dialog"
|
role="dialog"
|
||||||
aria-modal="true"
|
aria-modal="true"
|
||||||
@@ -83,7 +84,7 @@ function LightboxContainer({
|
|||||||
style={{position: 'absolute', inset: 0}}>
|
style={{position: 'absolute', inset: 0}}>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
</FocusScope.FocusScope>
|
</FocusScope>
|
||||||
</Pressable>
|
</Pressable>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ import {ImageBackground} from 'expo-image'
|
|||||||
import {msg} from '@lingui/core/macro'
|
import {msg} from '@lingui/core/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
import {Trans} from '@lingui/react/macro'
|
import {Trans} from '@lingui/react/macro'
|
||||||
import {FocusGuards, FocusScope} from 'radix-ui/internal'
|
import {useFocusGuards} from '@radix-ui/react-focus-guards'
|
||||||
|
import {FocusScope} from '@radix-ui/react-focus-scope'
|
||||||
|
|
||||||
import {useLoggedOutViewControls} from '#/state/shell/logged-out'
|
import {useLoggedOutViewControls} from '#/state/shell/logged-out'
|
||||||
import {Logo} from '#/view/icons/Logo'
|
import {Logo} from '#/view/icons/Logo'
|
||||||
@@ -64,7 +65,7 @@ export function WelcomeModal({control}: WelcomeModalProps) {
|
|||||||
requestSwitchToAccount({requestedAccount: 'existing'})
|
requestSwitchToAccount({requestedAccount: 'existing'})
|
||||||
}
|
}
|
||||||
|
|
||||||
FocusGuards.useFocusGuards()
|
useFocusGuards()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View
|
<View
|
||||||
@@ -79,7 +80,7 @@ export function WelcomeModal({control}: WelcomeModalProps) {
|
|||||||
web({backdropFilter: 'blur(15px)'}),
|
web({backdropFilter: 'blur(15px)'}),
|
||||||
isExiting ? a.fade_out : a.fade_in,
|
isExiting ? a.fade_out : a.fade_in,
|
||||||
]}>
|
]}>
|
||||||
<FocusScope.FocusScope asChild loop trapped>
|
<FocusScope asChild loop trapped>
|
||||||
<View
|
<View
|
||||||
style={flatten([
|
style={flatten([
|
||||||
{
|
{
|
||||||
@@ -244,7 +245,7 @@ export function WelcomeModal({control}: WelcomeModalProps) {
|
|||||||
</Button>
|
</Button>
|
||||||
</ImageBackground>
|
</ImageBackground>
|
||||||
</View>
|
</View>
|
||||||
</FocusScope.FocusScope>
|
</FocusScope>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import {StyleSheet, View} from 'react-native'
|
import {StyleSheet, View} from 'react-native'
|
||||||
import {DismissableLayer, FocusGuards, FocusScope} from 'radix-ui/internal'
|
import {DismissableLayer} from '@radix-ui/react-dismissable-layer'
|
||||||
|
import {useFocusGuards} from '@radix-ui/react-focus-guards'
|
||||||
|
import {FocusScope} from '@radix-ui/react-focus-scope'
|
||||||
import {RemoveScrollBar} from 'react-remove-scroll-bar'
|
import {RemoveScrollBar} from 'react-remove-scroll-bar'
|
||||||
|
|
||||||
import {useA11y} from '#/state/a11y'
|
import {useA11y} from '#/state/a11y'
|
||||||
@@ -36,11 +38,11 @@ function Inner({state}: {state: ComposerOpts}) {
|
|||||||
const {gtMobile} = useBreakpoints()
|
const {gtMobile} = useBreakpoints()
|
||||||
const {reduceMotionEnabled} = useA11y()
|
const {reduceMotionEnabled} = useA11y()
|
||||||
|
|
||||||
FocusGuards.useFocusGuards()
|
useFocusGuards()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FocusScope.FocusScope loop trapped asChild>
|
<FocusScope loop trapped asChild>
|
||||||
<DismissableLayer.DismissableLayer
|
<DismissableLayer
|
||||||
role="dialog"
|
role="dialog"
|
||||||
aria-modal
|
aria-modal
|
||||||
style={flatten([
|
style={flatten([
|
||||||
@@ -84,8 +86,8 @@ function Inner({state}: {state: ComposerOpts}) {
|
|||||||
openGallery={state.openGallery}
|
openGallery={state.openGallery}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
</DismissableLayer.DismissableLayer>
|
</DismissableLayer>
|
||||||
</FocusScope.FocusScope>
|
</FocusScope>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user