@@ -5,7 +5,7 @@ import { tagMessage } from '../../utils';
55import {
66 LogicChildren ,
77 Gesture ,
8- GestureEvents ,
8+ DetectorCallbacks ,
99 GestureHandlerEvent ,
1010} from '../types' ;
1111import { DetectorContext } from './useDetectorContext' ;
@@ -29,9 +29,9 @@ export function NativeDetector<THandlerData, TConfig>({
2929 children,
3030} : NativeDetectorProps < THandlerData , TConfig > ) {
3131 const [ logicChildren , setLogicChildren ] = useState < LogicChildren [ ] > ( [ ] ) ;
32- const logicMethods = useRef < Map < number , RefObject < GestureEvents < unknown > > > > (
33- new Map ( )
34- ) ;
32+ const logicMethods = useRef <
33+ Map < number , RefObject < DetectorCallbacks < unknown > > >
34+ > ( new Map ( ) ) ;
3535
3636 const NativeDetectorComponent = gesture . config . dispatchesAnimatedEvents
3737 ? AnimatedNativeDetector
@@ -40,7 +40,7 @@ export function NativeDetector<THandlerData, TConfig>({
4040 : HostGestureDetector ;
4141
4242 const register = useCallback (
43- ( child : LogicChildren , methods : RefObject < GestureEvents < unknown > > ) => {
43+ ( child : LogicChildren , methods : RefObject < DetectorCallbacks < unknown > > ) => {
4444 setLogicChildren ( ( prev ) => {
4545 const index = prev . findIndex ( ( c ) => c . viewTag === child . viewTag ) ;
4646 if ( index !== - 1 ) {
@@ -74,10 +74,10 @@ export function NativeDetector<THandlerData, TConfig>({
7474
7575 configureRelations ( gesture ) ;
7676
77- const handleGestureEvent = ( key : keyof GestureEvents < THandlerData > ) => {
77+ const handleGestureEvent = ( key : keyof DetectorCallbacks < THandlerData > ) => {
7878 return ( e : GestureHandlerEvent < THandlerData > ) => {
79- if ( gesture . gestureEvents [ key ] ) {
80- gesture . gestureEvents [ key ] ( e ) ;
79+ if ( gesture . detectorCallbacks [ key ] ) {
80+ gesture . detectorCallbacks [ key ] ( e ) ;
8181 }
8282
8383 logicMethods . current . forEach ( ( ref ) => {
@@ -90,12 +90,12 @@ export function NativeDetector<THandlerData, TConfig>({
9090 } ;
9191
9292 const getHandlers = useCallback (
93- ( key : keyof GestureEvents < unknown > ) => {
93+ ( key : keyof DetectorCallbacks < unknown > ) => {
9494 const handlers : ( ( e : GestureHandlerEvent < THandlerData > ) => void ) [ ] = [ ] ;
9595
96- if ( gesture . gestureEvents [ key ] ) {
96+ if ( gesture . detectorCallbacks [ key ] ) {
9797 handlers . push (
98- gesture . gestureEvents [ key ] as (
98+ gesture . detectorCallbacks [ key ] as (
9999 e : GestureHandlerEvent < unknown >
100100 ) => void
101101 ) ;
@@ -112,7 +112,7 @@ export function NativeDetector<THandlerData, TConfig>({
112112
113113 return handlers ;
114114 } ,
115- [ logicChildren , gesture . gestureEvents ]
115+ [ logicChildren , gesture . detectorCallbacks ]
116116 ) ;
117117
118118 const reanimatedEventHandler = Reanimated ?. useComposedEventHandler (
@@ -136,7 +136,7 @@ export function NativeDetector<THandlerData, TConfig>({
136136 onGestureHandlerEvent = { handleGestureEvent ( 'onGestureHandlerEvent' ) }
137137 // @ts -ignore This is a type mismatch between RNGH types and RN Codegen types
138138 onGestureHandlerAnimatedEvent = {
139- gesture . gestureEvents . onGestureHandlerAnimatedEvent
139+ gesture . detectorCallbacks . onGestureHandlerAnimatedEvent
140140 }
141141 // @ts -ignore This is a type mismatch between RNGH types and RN Codegen types
142142 onGestureHandlerTouchEvent = { handleGestureEvent (
0 commit comments