replace react-nav header hack with scroll edge interaction module
- new expo-scroll-edge-interaction native module (iOS-only) that sets up UIScrollEdgeElementContainerInteraction on iOS 26+ - new ScrollEdgeInteractionProvider context and hooks - Layout.Screen gains `transparentHeader` prop - Layout.Header.Outer auto-detects transparent mode from context - List auto-registers scroll view and applies content inset Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import {type ViewStyle} from 'react-native'
|
||||
|
||||
export type ScrollEdgeInteractionEdge = 'top' | 'bottom' | 'left' | 'right'
|
||||
|
||||
export interface ExpoScrollEdgeInteractionViewProps {
|
||||
nodeHandle: number | null
|
||||
scrollViewTag: number | null
|
||||
edge?: ScrollEdgeInteractionEdge
|
||||
children: React.ReactNode
|
||||
style?: ViewStyle
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import {requireNativeViewManager} from 'expo-modules-core'
|
||||
|
||||
import {type ExpoScrollEdgeInteractionViewProps} from './ExpoScrollEdgeInteraction.types'
|
||||
|
||||
const NativeView: React.ComponentType<ExpoScrollEdgeInteractionViewProps> =
|
||||
requireNativeViewManager('ExpoScrollEdgeInteraction')
|
||||
|
||||
export function ExpoScrollEdgeInteractionView({
|
||||
children,
|
||||
...rest
|
||||
}: ExpoScrollEdgeInteractionViewProps) {
|
||||
return <NativeView {...rest}>{children}</NativeView>
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import {type ExpoScrollEdgeInteractionViewProps} from './ExpoScrollEdgeInteraction.types'
|
||||
|
||||
export function ExpoScrollEdgeInteractionView({
|
||||
children,
|
||||
}: React.PropsWithChildren<ExpoScrollEdgeInteractionViewProps>) {
|
||||
return children
|
||||
}
|
||||
Reference in New Issue
Block a user