+1
-1
@@ -88,7 +88,7 @@
|
|||||||
"@bsky.app/expo-image-crop-tool": "^0.5.0",
|
"@bsky.app/expo-image-crop-tool": "^0.5.0",
|
||||||
"@bsky.app/expo-translate-text": "^0.2.9",
|
"@bsky.app/expo-translate-text": "^0.2.9",
|
||||||
"@bsky.app/react-native-mmkv": "2.12.5",
|
"@bsky.app/react-native-mmkv": "2.12.5",
|
||||||
"@bsky.app/sift": "^0.3.1",
|
"@bsky.app/sift": "^0.3.2",
|
||||||
"@bsky.app/tapper": "^0.5.0",
|
"@bsky.app/tapper": "^0.5.0",
|
||||||
"@discord/bottom-sheet": "bluesky-social/react-native-bottom-sheet",
|
"@discord/bottom-sheet": "bluesky-social/react-native-bottom-sheet",
|
||||||
"@emoji-mart/data": "^1.2.1",
|
"@emoji-mart/data": "^1.2.1",
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import Animated, {
|
|||||||
useAnimatedStyle,
|
useAnimatedStyle,
|
||||||
useSharedValue,
|
useSharedValue,
|
||||||
} from 'react-native-reanimated'
|
} from 'react-native-reanimated'
|
||||||
import {useSafeAreaInsets} from 'react-native-safe-area-context'
|
|
||||||
import {useSift, type UseSiftReturn} from '@bsky.app/sift'
|
import {useSift, type UseSiftReturn} from '@bsky.app/sift'
|
||||||
import {
|
import {
|
||||||
facets,
|
facets,
|
||||||
@@ -121,7 +120,6 @@ export function Composer({
|
|||||||
...rest
|
...rest
|
||||||
}: ComposerProps) {
|
}: ComposerProps) {
|
||||||
const {theme: t, fonts} = useAlf()
|
const {theme: t, fonts} = useAlf()
|
||||||
const insets = useSafeAreaInsets()
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Meat and potatoes
|
* Meat and potatoes
|
||||||
@@ -140,7 +138,6 @@ export function Composer({
|
|||||||
offset: a.p_sm.padding,
|
offset: a.p_sm.padding,
|
||||||
placement: autocompletePlacement,
|
placement: autocompletePlacement,
|
||||||
dynamicWidth: IS_WEB,
|
dynamicWidth: IS_WEB,
|
||||||
insets,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -306,7 +303,13 @@ export function Composer({
|
|||||||
{IS_WEB && (
|
{IS_WEB && (
|
||||||
<View
|
<View
|
||||||
pointerEvents="none"
|
pointerEvents="none"
|
||||||
style={[a.absolute, a.inset_0, a.z_10, {overflow: 'hidden'}]}>
|
style={[a.absolute, a.inset_0, a.z_10, {overflow: 'hidden'}]}
|
||||||
|
ref={node => {
|
||||||
|
if (IS_WEB && node) {
|
||||||
|
// @ts-ignore web only a11y
|
||||||
|
node.setAttribute('inert', '')
|
||||||
|
}
|
||||||
|
}}>
|
||||||
<Animated.View
|
<Animated.View
|
||||||
style={[
|
style={[
|
||||||
contentPaddingStyle,
|
contentPaddingStyle,
|
||||||
@@ -368,6 +371,7 @@ export function Composer({
|
|||||||
|
|
||||||
{activeFacet && activeFacet.type !== 'url' && (
|
{activeFacet && activeFacet.type !== 'url' && (
|
||||||
<AutocompleteInner
|
<AutocompleteInner
|
||||||
|
inverted={autocompletePlacement?.startsWith('top')}
|
||||||
sift={sift}
|
sift={sift}
|
||||||
activeFacet={activeFacet}
|
activeFacet={activeFacet}
|
||||||
onDismiss={() => setActiveFacet(null)}
|
onDismiss={() => setActiveFacet(null)}
|
||||||
@@ -382,10 +386,12 @@ export function Composer({
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
function AutocompleteInner({
|
function AutocompleteInner({
|
||||||
|
inverted,
|
||||||
sift,
|
sift,
|
||||||
activeFacet,
|
activeFacet,
|
||||||
onDismiss,
|
onDismiss,
|
||||||
}: {
|
}: {
|
||||||
|
inverted?: boolean
|
||||||
sift: UseSiftReturn
|
sift: UseSiftReturn
|
||||||
activeFacet: TapperActiveFacet
|
activeFacet: TapperActiveFacet
|
||||||
onDismiss: () => void
|
onDismiss: () => void
|
||||||
@@ -410,7 +416,7 @@ function AutocompleteInner({
|
|||||||
|
|
||||||
return items && items.length ? (
|
return items && items.length ? (
|
||||||
<AutocompleteBase
|
<AutocompleteBase
|
||||||
inverted={!IS_WEB}
|
inverted={inverted}
|
||||||
sift={sift}
|
sift={sift}
|
||||||
data={items}
|
data={items}
|
||||||
render={props => {
|
render={props => {
|
||||||
|
|||||||
@@ -2411,10 +2411,10 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@bsky.app/react-native-mmkv/-/react-native-mmkv-2.12.5.tgz#eb17d31a6158c74393f617a1763ac223ff3f83a6"
|
resolved "https://registry.yarnpkg.com/@bsky.app/react-native-mmkv/-/react-native-mmkv-2.12.5.tgz#eb17d31a6158c74393f617a1763ac223ff3f83a6"
|
||||||
integrity sha512-3vUz1nQY1DiKIPAWRkpp5ZGxH5f2G6Ui0UuQuEYjYv81xx1qFcSzS9KQ2sHcOKYdkOM9amWV2Q8TQCxt1lrAHg==
|
integrity sha512-3vUz1nQY1DiKIPAWRkpp5ZGxH5f2G6Ui0UuQuEYjYv81xx1qFcSzS9KQ2sHcOKYdkOM9amWV2Q8TQCxt1lrAHg==
|
||||||
|
|
||||||
"@bsky.app/sift@^0.3.1":
|
"@bsky.app/sift@^0.3.2":
|
||||||
version "0.3.1"
|
version "0.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/@bsky.app/sift/-/sift-0.3.1.tgz#f529832001bcd64950c214e85aec055a1f2edcdb"
|
resolved "https://registry.yarnpkg.com/@bsky.app/sift/-/sift-0.3.2.tgz#04122bf665fad3a7eb90e1d689028ec9a209c56f"
|
||||||
integrity sha512-jG9GDh0Yh4vBM98BP4HvBp8VBqnt+280tFx9Gh/bWYtZdiN1xfrTkqWqRkvxyujgpXlyoemREUn+7dGs8Bl60A==
|
integrity sha512-u48gzcA5QNkvfWzH+gnouXxLulrgA6yIc7NwSBnEZt9XwZfClLfvEDjRk/VxU4AJlEwQRhY2ZC593H0oo+5/bQ==
|
||||||
|
|
||||||
"@bsky.app/tapper@^0.5.0":
|
"@bsky.app/tapper@^0.5.0":
|
||||||
version "0.5.0"
|
version "0.5.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user