react-native-gesture-handler 3.4.0-nightly-20261014-ee108aa53 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerOrchestrator.kt +6 -3
- package/apple/Handlers/RNNativeViewHandler.mm +36 -10
- package/lib/module/specs/RNGestureHandlerButtonNativeComponent.ts +3 -10
- package/lib/module/specs/RNGestureHandlerDetectorNativeComponent.ts +3 -3
- package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.ts +3 -5
- package/lib/module/v3/components/GestureComponents.web.js +2 -1
- package/lib/module/v3/components/GestureComponents.web.js.map +1 -1
- package/lib/module/v3/detectors/VirtualDetector/VirtualDetector.js +18 -1
- package/lib/module/v3/detectors/VirtualDetector/VirtualDetector.js.map +1 -1
- package/lib/typescript/mocks/hostDetector.d.ts +1 -3
- package/lib/typescript/mocks/hostDetector.d.ts.map +1 -1
- package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts +3 -2
- package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts.map +1 -1
- package/lib/typescript/specs/RNGestureHandlerDetectorNativeComponent.d.ts +3 -2
- package/lib/typescript/specs/RNGestureHandlerDetectorNativeComponent.d.ts.map +1 -1
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts +3 -2
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/v3/components/GestureComponents.web.d.ts.map +1 -1
- package/lib/typescript/v3/detectors/VirtualDetector/VirtualDetector.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/specs/RNGestureHandlerButtonNativeComponent.ts +3 -10
- package/src/specs/RNGestureHandlerDetectorNativeComponent.ts +3 -3
- package/src/specs/RNGestureHandlerRootViewNativeComponent.ts +3 -5
- package/src/v3/components/GestureComponents.web.tsx +8 -3
- package/src/v3/detectors/VirtualDetector/VirtualDetector.tsx +38 -1
package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerOrchestrator.kt
CHANGED
|
@@ -662,9 +662,12 @@ class GestureHandlerOrchestrator(
|
|
|
662
662
|
}
|
|
663
663
|
|
|
664
664
|
// if the pointer is inside the view but it overflows its parent, handlers attached to the parent
|
|
665
|
-
// might not have been extracted (pointer might be in a child, but may be outside parent)
|
|
666
|
-
|
|
667
|
-
|
|
665
|
+
// might not have been extracted (pointer might be in a child, but may be outside parent).
|
|
666
|
+
// Checked against the same bounds as the handlers above: a detector frame widened to cover a
|
|
667
|
+
// transformed child overflows its parent, but a pointer in the area the child vacated is not
|
|
668
|
+
// over its content and must not record the ancestors ahead of the views behind it.
|
|
669
|
+
if (boundsX in 0f..boundsView.width.toFloat() &&
|
|
670
|
+
boundsY in 0f..boundsView.height.toFloat() &&
|
|
668
671
|
isViewOverflowingParent(view) &&
|
|
669
672
|
extractAncestorHandlers(view, coords, pointerId, event)
|
|
670
673
|
) {
|
|
@@ -132,25 +132,51 @@
|
|
|
132
132
|
return self;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
- (void)
|
|
135
|
+
- (void)resetConfig
|
|
136
136
|
{
|
|
137
|
-
[super
|
|
138
|
-
_shouldActivateOnStart =
|
|
139
|
-
_disallowInterruption =
|
|
140
|
-
_yieldsToContinuousGestures =
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
137
|
+
[super resetConfig];
|
|
138
|
+
_shouldActivateOnStart = NO;
|
|
139
|
+
_disallowInterruption = NO;
|
|
140
|
+
_yieldsToContinuousGestures = NO;
|
|
141
|
+
_delaysChildPressedState = YES;
|
|
142
|
+
[self applyDelaysChildPressedState];
|
|
143
|
+
}
|
|
144
144
|
|
|
145
|
+
- (void)applyDelaysChildPressedState
|
|
146
|
+
{
|
|
145
147
|
#if !TARGET_OS_OSX
|
|
146
|
-
// Config may be updated after the handler is bound to a view — re-apply to the connected
|
|
147
|
-
// scroll view if there is one.
|
|
148
148
|
if (self.recognizer.view != nil) {
|
|
149
149
|
[self retrieveScrollView:self.recognizer.view].delaysContentTouches = _delaysChildPressedState;
|
|
150
150
|
}
|
|
151
151
|
#endif
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
+
- (void)updateConfig:(NSDictionary *)config
|
|
155
|
+
{
|
|
156
|
+
[super updateConfig:config];
|
|
157
|
+
|
|
158
|
+
id prop = config[@"shouldActivateOnStart"];
|
|
159
|
+
if (prop != nil) {
|
|
160
|
+
_shouldActivateOnStart = [RCTConvert BOOL:prop];
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
prop = config[@"disallowInterruption"];
|
|
164
|
+
if (prop != nil) {
|
|
165
|
+
_disallowInterruption = [RCTConvert BOOL:prop];
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
prop = config[@"yieldsToContinuousGestures"];
|
|
169
|
+
if (prop != nil) {
|
|
170
|
+
_yieldsToContinuousGestures = [RCTConvert BOOL:prop];
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
prop = config[@"delaysChildPressedState"];
|
|
174
|
+
if (prop != nil) {
|
|
175
|
+
_delaysChildPressedState = [RCTConvert BOOL:prop];
|
|
176
|
+
[self applyDelaysChildPressedState];
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
154
180
|
- (void)bindToView:(RNGHUIView *)view
|
|
155
181
|
{
|
|
156
182
|
_boundView = view;
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
CodegenTypes,
|
|
3
|
-
ColorValue,
|
|
4
|
-
HostComponent,
|
|
5
|
-
ViewProps,
|
|
6
|
-
} from 'react-native';
|
|
1
|
+
import type { CodegenTypes, ColorValue, ViewProps } from 'react-native';
|
|
7
2
|
import { codegenNativeComponent } from 'react-native';
|
|
8
3
|
|
|
9
4
|
export type ButtonEvent = Readonly<{
|
|
@@ -16,7 +11,7 @@ export type ButtonEvent = Readonly<{
|
|
|
16
11
|
pointerType: CodegenTypes.Int32;
|
|
17
12
|
}>;
|
|
18
13
|
|
|
19
|
-
|
|
14
|
+
/** @ts-ignore - Redefining pointerEvents with WithDefault for codegen, conflicts with ViewProps type but codegen needs it */
|
|
20
15
|
interface NativeProps extends ViewProps {
|
|
21
16
|
// The events are namespaced with `Button` because the base view config on iOS
|
|
22
17
|
// already registers `topPress` as a bubbling event — a direct event with the
|
|
@@ -131,6 +126,4 @@ interface NativeProps extends ViewProps {
|
|
|
131
126
|
borderStartStartRadius?: CodegenTypes.UnsafeMixed;
|
|
132
127
|
}
|
|
133
128
|
|
|
134
|
-
export default codegenNativeComponent<NativeProps>(
|
|
135
|
-
'RNGestureHandlerButton'
|
|
136
|
-
) as HostComponent<NativeProps>;
|
|
129
|
+
export default codegenNativeComponent<NativeProps>('RNGestureHandlerButton');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CodegenTypes,
|
|
1
|
+
import type { CodegenTypes, ViewProps } from 'react-native';
|
|
2
2
|
import { codegenNativeComponent } from 'react-native';
|
|
3
3
|
|
|
4
4
|
type GestureHandlerEvent = Readonly<{
|
|
@@ -41,7 +41,7 @@ export interface VirtualChildrenProps {
|
|
|
41
41
|
viewTag: CodegenTypes.Int32;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
/** @ts-expect-error WithDefault adds `| null` to the type, which doesn't align with ViewProps.pointerEvents */
|
|
45
45
|
// Using Exclude to remove null from the type makes the error go away, but breaks codegen.
|
|
46
46
|
export interface NativeProps extends ViewProps {
|
|
47
47
|
onGestureHandlerEvent?:
|
|
@@ -78,4 +78,4 @@ export interface NativeProps extends ViewProps {
|
|
|
78
78
|
|
|
79
79
|
export default codegenNativeComponent<NativeProps>('RNGestureHandlerDetector', {
|
|
80
80
|
interfaceOnly: true,
|
|
81
|
-
})
|
|
81
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CodegenTypes,
|
|
1
|
+
import type { CodegenTypes, ViewProps } from 'react-native';
|
|
2
2
|
import { codegenNativeComponent } from 'react-native';
|
|
3
3
|
|
|
4
4
|
// Publicly accessible type, moduleId is set internally
|
|
@@ -6,7 +6,7 @@ export interface RootViewNativeProps extends ViewProps {
|
|
|
6
6
|
unstable_forceActive?: boolean;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
/** @ts-expect-error WithDefault adds null for codegen, unlike ViewProps.pointerEvents. */
|
|
10
10
|
interface NativeProps extends ViewProps {
|
|
11
11
|
pointerEvents?: CodegenTypes.WithDefault<
|
|
12
12
|
'box-none' | 'none' | 'box-only' | 'auto',
|
|
@@ -16,6 +16,4 @@ interface NativeProps extends ViewProps {
|
|
|
16
16
|
unstable_forceActive?: boolean;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
export default codegenNativeComponent<NativeProps>(
|
|
20
|
-
'RNGestureHandlerRootView'
|
|
21
|
-
) as HostComponent<NativeProps>;
|
|
19
|
+
export default codegenNativeComponent<NativeProps>('RNGestureHandlerRootView');
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { FlatList as RNFlatList, ScrollView as RNScrollView, Switch as RNSwitch, TextInput as RNTextInput, View } from 'react-native';
|
|
5
5
|
import createNativeWrapper from '../createNativeWrapper';
|
|
6
|
+
import { GestureDetectorType } from '../detectors';
|
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
8
|
export const ScrollView = createNativeWrapper(RNScrollView, {
|
|
8
9
|
disallowInterruption: false
|
|
9
|
-
});
|
|
10
|
+
}, GestureDetectorType.Intercepting);
|
|
10
11
|
export const Switch = createNativeWrapper(RNSwitch, {
|
|
11
12
|
shouldCancelWhenOutside: false,
|
|
12
13
|
shouldActivateOnStart: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","FlatList","RNFlatList","ScrollView","RNScrollView","Switch","RNSwitch","TextInput","RNTextInput","View","createNativeWrapper","jsx","_jsx","disallowInterruption","shouldCancelWhenOutside","shouldActivateOnStart","DrawerLayoutAndroid","console","warn","RefreshControl","props","renderScrollComponent","scrollProps"],"sourceRoot":"../../../../src","sources":["v3/components/GestureComponents.web.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SACEC,QAAQ,IAAIC,UAAU,EACtBC,UAAU,IAAIC,YAAY,EAC1BC,MAAM,IAAIC,QAAQ,EAClBC,SAAS,IAAIC,WAAW,EACxBC,IAAI,QACC,cAAc;AAErB,OAAOC,mBAAmB,MAAM,wBAAwB;AAAC,SAAAC,GAAA,IAAAC,IAAA;
|
|
1
|
+
{"version":3,"names":["React","FlatList","RNFlatList","ScrollView","RNScrollView","Switch","RNSwitch","TextInput","RNTextInput","View","createNativeWrapper","GestureDetectorType","jsx","_jsx","disallowInterruption","Intercepting","shouldCancelWhenOutside","shouldActivateOnStart","DrawerLayoutAndroid","console","warn","RefreshControl","props","renderScrollComponent","scrollProps"],"sourceRoot":"../../../../src","sources":["v3/components/GestureComponents.web.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SACEC,QAAQ,IAAIC,UAAU,EACtBC,UAAU,IAAIC,YAAY,EAC1BC,MAAM,IAAIC,QAAQ,EAClBC,SAAS,IAAIC,WAAW,EACxBC,IAAI,QACC,cAAc;AAErB,OAAOC,mBAAmB,MAAM,wBAAwB;AACxD,SAASC,mBAAmB,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEnD,OAAO,MAAMV,UAAU,GAAGO,mBAAmB,CAC3CN,YAAY,EACZ;EACEU,oBAAoB,EAAE;AACxB,CAAC,EACDH,mBAAmB,CAACI,YACtB,CAAC;AAED,OAAO,MAAMV,MAAM,GAAGK,mBAAmB,CAACJ,QAAQ,EAAE;EAClDU,uBAAuB,EAAE,KAAK;EAC9BC,qBAAqB,EAAE,IAAI;EAC3BH,oBAAoB,EAAE;AACxB,CAAC,CAAC;AAEF,OAAO,MAAMP,SAAS,GAAGG,mBAAmB,CAACF,WAAW,CAAC;AAEzD,OAAO,MAAMU,mBAAmB,GAAGA,CAAA,KAAM;EACvCC,OAAO,CAACC,IAAI,CAAC,8CAA8C,CAAC;EAC5D,oBAAOP,IAAA,CAACJ,IAAI,IAAE,CAAC;AACjB,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMY,cAAc,GAAGX,mBAAmB,CAACD,IAAI,CAAC;AAEvD,OAAO,MAAMR,QAAQ,GAAYqB,KAA2B,iBAC1DT,IAAA,CAACX,UAAU;EAAA,GACLoB,KAAK;EACTC,qBAAqB,EAAGC,WAAW,iBAAKX,IAAA,CAACV,UAAU;IAAA,GAAKqB;EAAW,CAAG;AAAE,CACzE,CACF","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
+
import { Children, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
4
|
import { findNodeHandle, Platform } from 'react-native';
|
|
5
5
|
import { tagMessage } from '../../../utils';
|
|
6
6
|
import { isComposedGesture } from '../../hooks/utils/relationUtils';
|
|
@@ -10,6 +10,12 @@ import { useNativeGestureRole } from '../useNativeGestureRole';
|
|
|
10
10
|
import { InterceptingDetectorMode, useInterceptingDetectorContext } from './useInterceptingDetectorContext';
|
|
11
11
|
import { Wrap } from './Wrap';
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
function getChildName(children) {
|
|
14
|
+
const {
|
|
15
|
+
type
|
|
16
|
+
} = Children.only(children);
|
|
17
|
+
return typeof type === 'string' ? type : type.displayName ?? type.name ?? 'Unknown';
|
|
18
|
+
}
|
|
13
19
|
function useRequiredInterceptingDetectorContext() {
|
|
14
20
|
const context = useInterceptingDetectorContext();
|
|
15
21
|
if (!context) {
|
|
@@ -42,6 +48,17 @@ export function VirtualDetector(props) {
|
|
|
42
48
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
43
49
|
[props.children]);
|
|
44
50
|
useNativeGestureRole(viewRef, props.children);
|
|
51
|
+
|
|
52
|
+
// Dev-only: no host instance after a commit means the child did not hand
|
|
53
|
+
// its `ref` to one. A child that renders null first is reported as well.
|
|
54
|
+
const reportedRef = useRef(false);
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
if (!__DEV__ || reportedRef.current || viewRef.current) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
reportedRef.current = true;
|
|
60
|
+
console.error(tagMessage(`VirtualGestureDetector could not attach to its child (${getChildName(props.children)}). The child must be a host view or forward its \`ref\` to one.`));
|
|
61
|
+
});
|
|
45
62
|
const handlerTags = useMemo(() => isComposedGesture(props.gesture) ? props.gesture.handlerTags : [props.gesture.handlerTag], [props.gesture]);
|
|
46
63
|
useDetectorAttachmentGuard(handlerTags);
|
|
47
64
|
useEffect(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useEffect","useMemo","useRef","useState","findNodeHandle","Platform","tagMessage","isComposedGesture","useDetectorAttachmentGuard","useGestureRelationsUpdater","useNativeGestureRole","InterceptingDetectorMode","useInterceptingDetectorContext","Wrap","jsx","_jsx","useRequiredInterceptingDetectorContext","context","Error","VirtualDetector","props","register","unregister","setMode","viewRef","viewTag","setViewTag","handleRef","node","current","tag","OS","
|
|
1
|
+
{"version":3,"names":["Children","useCallback","useEffect","useMemo","useRef","useState","findNodeHandle","Platform","tagMessage","isComposedGesture","useDetectorAttachmentGuard","useGestureRelationsUpdater","useNativeGestureRole","InterceptingDetectorMode","useInterceptingDetectorContext","Wrap","jsx","_jsx","getChildName","children","type","only","displayName","name","useRequiredInterceptingDetectorContext","context","Error","VirtualDetector","props","register","unregister","setMode","viewRef","viewTag","setViewTag","handleRef","node","current","tag","OS","reportedRef","__DEV__","console","error","handlerTags","gesture","handlerTag","config","dispatchesAnimatedEvents","shouldUseReanimatedDetector","REANIMATED","virtualChild","methods","detectorCallbacks","undefined","userSelect","touchAction","enableContextMenu","ref"],"sourceRoot":"../../../../../src","sources":["v3/detectors/VirtualDetector/VirtualDetector.tsx"],"mappings":";;AACA,SACEA,QAAQ,EACRC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AACd,SAASC,cAAc,EAAEC,QAAQ,QAAQ,cAAc;AAEvD,SAASC,UAAU,QAAQ,gBAAgB;AAC3C,SAASC,iBAAiB,QAAQ,iCAAiC;AAGnE,SAASC,0BAA0B,QAAQ,+BAA+B;AAC1E,SAASC,0BAA0B,QAAQ,+BAA+B;AAC1E,SAASC,oBAAoB,QAAQ,yBAAyB;AAC9D,SACEC,wBAAwB,EACxBC,8BAA8B,QACzB,kCAAkC;AACzC,SAASC,IAAI,QAAQ,QAAQ;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE9B,SAASC,YAAYA,CAACC,QAAiB,EAAE;EACvC,MAAM;IAAEC;EAAK,CAAC,GAAGpB,QAAQ,CAACqB,IAAI,CAACF,QAAQ,CAGtC;EAED,OAAO,OAAOC,IAAI,KAAK,QAAQ,GAC3BA,IAAI,GACHA,IAAI,CAACE,WAAW,IAAIF,IAAI,CAACG,IAAI,IAAI,SAAU;AAClD;AAEA,SAASC,sCAAsCA,CAAA,EAAG;EAChD,MAAMC,OAAO,GAAGX,8BAA8B,CAAC,CAAC;EAChD,IAAI,CAACW,OAAO,EAAE;IACZ,MAAM,IAAIC,KAAK,CACblB,UAAU,CACR,+EACF,CACF,CAAC;EACH;EACA,OAAOiB,OAAO;AAChB;AAEA,OAAO,SAASE,eAAeA,CAI7BC,KAAwE,EAAE;EAC1E;EACA;EACA,aAAa;;EAEb,MAAM;IAAEC,QAAQ;IAAEC,UAAU;IAAEC;EAAQ,CAAC,GACrCP,sCAAsC,CAAC,CAAC;EAE1C,MAAMQ,OAAO,GAAG5B,MAAM,CAAC,IAAI,CAAC;EAC5B,MAAM,CAAC6B,OAAO,EAAEC,U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CAACE,MAAM,CAACC,wBAAwB,EAAE;MACjD,MAAM,IAAItB,KAAK,CACblB,UAAU,CACR,wLACF,CACF,CAAC;IACH,CAAC,MAAM,IAAIoB,KAAK,CAACiB,OAAO,CAACE,MAAM,CAACE,2BAA2B,EAAE;MAC3DlB,OAAO,CAAClB,wBAAwB,CAACqC,UAAU,CAAC;IAC9C;IAEA,MAAMC,YAA0B,GAAG;MACjClB,OAAO;MACPW,WAAW;MACXQ,OAAO,EAAExB,KAAK,CAACiB,OAAO,CAACQ,iBAGtB;MACD;MACArB,OAAO,EAAEzB,QAAQ,CAACgC,EAAE,KAAK,KAAK,GAAGP,OAAO,GAAGsB,SAAS;MACpDC,UAAU,EAAE3B,KAAK,CAAC2B,UAAU;MAC5BC,WAAW,EAAE5B,KAAK,CAAC4B,WAAW;MAC9BC,iBAAiB,EAAE7B,KAAK,CAAC6B;IAC3B,CAAC;IACD5B,QAAQ,CAACsB,YAAY,CAAC;IACtB,OAAO,MAAM;MACXrB,UAAU,CAACqB,YAAY,CAAC;IAC1B,CAAC;EACH,CAAC,EAAE,CACDlB,OAAO,EACPL,KAAK,CAACiB,OAAO,EACbD,WAAW,EACXhB,KAAK,CAAC2B,UAAU,EAChB3B,KAAK,CAAC4B,WAAW,EACjB5B,KAAK,CAAC6B,iBAAiB,EACvB5B,QAAQ,EACRC,UAAU,EACVC,OAAO,CACR,CAAC;EAEFpB,0BAA0B,CAACiB,KAAK,CAACiB,OAAO,CAAC;EAEzC,oBAAO5B,IAAA,CAACF,IAAI;IAAC2C,GAAG,EAAEvB,SAAU;IAAAhB,QAAA,EAAES,KAAK,CAACT;EAAQ,CAAO,CAAC;AACtD","ignoreList":[]}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
declare const HostGestureDetector: (props: Omit<import("react-native").ViewProps,
|
|
2
|
-
ref?: React.Ref<import("react-native").ViewInstance> | undefined;
|
|
3
|
-
}> & {
|
|
1
|
+
declare const HostGestureDetector: (props: Omit<import("react-native").ViewProps, "ref"> & {
|
|
4
2
|
ref?: React.Ref<import("react-native").ViewInstance> | undefined;
|
|
5
3
|
}) => React.ReactNode;
|
|
6
4
|
export default HostGestureDetector;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hostDetector.d.ts","sourceRoot":"","sources":["../../../src/mocks/hostDetector.tsx"],"names":[],"mappings":"AAEA,QAAA,MAAM,mBAAmB;
|
|
1
|
+
{"version":3,"file":"hostDetector.d.ts","sourceRoot":"","sources":["../../../src/mocks/hostDetector.tsx"],"names":[],"mappings":"AAEA,QAAA,MAAM,mBAAmB;OAG4hB,CAAC;qBAHthB,CAAC;AAEjC,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CodegenTypes, ColorValue,
|
|
1
|
+
import type { CodegenTypes, ColorValue, ViewProps } from 'react-native';
|
|
2
2
|
export type ButtonEvent = Readonly<{
|
|
3
3
|
pointerInside: boolean;
|
|
4
4
|
x: CodegenTypes.Double;
|
|
@@ -8,6 +8,7 @@ export type ButtonEvent = Readonly<{
|
|
|
8
8
|
numberOfPointers: CodegenTypes.Int32;
|
|
9
9
|
pointerType: CodegenTypes.Int32;
|
|
10
10
|
}>;
|
|
11
|
+
/** @ts-ignore - Redefining pointerEvents with WithDefault for codegen, conflicts with ViewProps type but codegen needs it */
|
|
11
12
|
interface NativeProps extends ViewProps {
|
|
12
13
|
onButtonPress?: CodegenTypes.DirectEventHandler<ButtonEvent> | undefined;
|
|
13
14
|
onButtonPressIn?: CodegenTypes.DirectEventHandler<ButtonEvent> | undefined;
|
|
@@ -86,6 +87,6 @@ interface NativeProps extends ViewProps {
|
|
|
86
87
|
borderStartEndRadius?: CodegenTypes.UnsafeMixed;
|
|
87
88
|
borderStartStartRadius?: CodegenTypes.UnsafeMixed;
|
|
88
89
|
}
|
|
89
|
-
declare const _default: HostComponent<NativeProps>;
|
|
90
|
+
declare const _default: import("react-native").HostComponent<NativeProps>;
|
|
90
91
|
export default _default;
|
|
91
92
|
//# sourceMappingURL=RNGestureHandlerButtonNativeComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RNGestureHandlerButtonNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/specs/RNGestureHandlerButtonNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"RNGestureHandlerButtonNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/specs/RNGestureHandlerButtonNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGxE,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;IACjC,aAAa,EAAE,OAAO,CAAC;IACvB,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC;IACvB,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC;IACvB,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC;IAC/B,gBAAgB,EAAE,YAAY,CAAC,KAAK,CAAC;IACrC,WAAW,EAAE,YAAY,CAAC,KAAK,CAAC;CACjC,CAAC,CAAC;AAEH,6HAA6H;AAC7H,UAAU,WAAY,SAAQ,SAAS;IAIrC,aAAa,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;IACzE,eAAe,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;IAC3E,gBAAgB,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;IAC5E,iBAAiB,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;IAC7E,eAAe,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;IAC3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AAU,CAAC;IAC5B,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAC9B,mBAAmB,CAAC,EAAE,UAAU,CAAC;IACjC,qBAAqB,CAAC,EAAE,UAAU,CAAC;IAWnC,YAAY,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC;IACxC,mBAAmB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC;IAC/C,oBAAoB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC;IAChD,sBAAsB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC;IAClD,uBAAuB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC;IACnD,oBAAoB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC;IAChD,kBAAkB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC;IAC9C,uBAAuB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC;IACnD,qBAAqB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC;IACjD,kBAAkB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC;IAC9C,oBAAoB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC;IAChD,oBAAoB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC;IAChD,sBAAsB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC;CACnD;;AAED,wBAA6E"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CodegenTypes,
|
|
1
|
+
import type { CodegenTypes, ViewProps } from 'react-native';
|
|
2
2
|
type GestureHandlerEvent = Readonly<{
|
|
3
3
|
handlerTag: CodegenTypes.Int32;
|
|
4
4
|
state: CodegenTypes.Int32;
|
|
@@ -35,6 +35,7 @@ export interface VirtualChildrenProps {
|
|
|
35
35
|
handlerTags: CodegenTypes.Int32[];
|
|
36
36
|
viewTag: CodegenTypes.Int32;
|
|
37
37
|
}
|
|
38
|
+
/** @ts-expect-error WithDefault adds `| null` to the type, which doesn't align with ViewProps.pointerEvents */
|
|
38
39
|
export interface NativeProps extends ViewProps {
|
|
39
40
|
onGestureHandlerEvent?: CodegenTypes.DirectEventHandler<GestureHandlerEvent> | undefined;
|
|
40
41
|
onGestureHandlerStateChange?: CodegenTypes.DirectEventHandler<GestureHandlerStateChangeEvent> | undefined;
|
|
@@ -48,6 +49,6 @@ export interface NativeProps extends ViewProps {
|
|
|
48
49
|
virtualChildren: VirtualChildrenProps[];
|
|
49
50
|
pointerEvents?: CodegenTypes.WithDefault<'box-none' | 'none' | 'box-only' | 'auto', 'auto'>;
|
|
50
51
|
}
|
|
51
|
-
declare const _default: HostComponent<NativeProps>;
|
|
52
|
+
declare const _default: import("react-native").HostComponent<NativeProps>;
|
|
52
53
|
export default _default;
|
|
53
54
|
//# sourceMappingURL=RNGestureHandlerDetectorNativeComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RNGestureHandlerDetectorNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/specs/RNGestureHandlerDetectorNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"RNGestureHandlerDetectorNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/specs/RNGestureHandlerDetectorNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG5D,KAAK,mBAAmB,GAAG,QAAQ,CAAC;IAClC,UAAU,EAAE,YAAY,CAAC,KAAK,CAAC;IAC/B,KAAK,EAAE,YAAY,CAAC,KAAK,CAAC;IAC1B,WAAW,EAAE,YAAY,CAAC,WAAW,CAAC;CACvC,CAAC,CAAC;AAEH,KAAK,8BAA8B,GAAG,QAAQ,CAAC;IAC7C,UAAU,EAAE,YAAY,CAAC,KAAK,CAAC;IAC/B,KAAK,EAAE,YAAY,CAAC,KAAK,CAAC;IAC1B,QAAQ,EAAE,YAAY,CAAC,KAAK,CAAC;IAC7B,WAAW,EAAE,YAAY,CAA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d,+BAA+B,CAAC,EAC5B,YAAY,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,GACpD,SAAS,CAAC;IACd,qCAAqC,CAAC,EAClC,YAAY,CAAC,kBAAkB,CAAC,8BAA8B,CAAC,GAC/D,SAAS,CAAC;IACd,oCAAoC,CAAC,EACjC,YAAY,CAAC,kBAAkB,CAAC,wBAAwB,CAAC,GACzD,SAAS,CAAC;IACd,6BAA6B,CAAC,EAC1B,YAAY,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,GACpD,SAAS,CAAC;IAEd,WAAW,EAAE,YAAY,CAAC,KAAK,EAAE,CAAC;IAClC,QAAQ,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;IAC5D,eAAe,EAAE,oBAAoB,EAAE,CAAC;IAExC,aAAa,CAAC,EAAE,YAAY,CAAC,WAAW,CACtC,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,EACzC,MAAM,CACP,CAAC;CACH;;AAED,wBAEG"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import type { CodegenTypes,
|
|
1
|
+
import type { CodegenTypes, ViewProps } from 'react-native';
|
|
2
2
|
export interface RootViewNativeProps extends ViewProps {
|
|
3
3
|
unstable_forceActive?: boolean;
|
|
4
4
|
}
|
|
5
|
+
/** @ts-expect-error WithDefault adds null for codegen, unlike ViewProps.pointerEvents. */
|
|
5
6
|
interface NativeProps extends ViewProps {
|
|
6
7
|
pointerEvents?: CodegenTypes.WithDefault<'box-none' | 'none' | 'box-only' | 'auto', 'auto'>;
|
|
7
8
|
moduleId?: CodegenTypes.WithDefault<CodegenTypes.Int32, -1>;
|
|
8
9
|
unstable_forceActive?: boolean;
|
|
9
10
|
}
|
|
10
|
-
declare const _default: HostComponent<NativeProps>;
|
|
11
|
+
declare const _default: import("react-native").HostComponent<NativeProps>;
|
|
11
12
|
export default _default;
|
|
12
13
|
//# sourceMappingURL=RNGestureHandlerRootViewNativeComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RNGestureHandlerRootViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/specs/RNGestureHandlerRootViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"RNGestureHandlerRootViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/specs/RNGestureHandlerRootViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI5D,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,0FAA0F;AAC1F,UAAU,WAAY,SAAQ,SAAS;IACrC,aAAa,CAAC,EAAE,YAAY,CAAC,WAAW,CACtC,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,EACzC,MAAM,CACP,CAAC;IACF,QAAQ,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;IAC5D,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;;AAED,wBAA+E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GestureComponents.web.d.ts","sourceRoot":"","sources":["../../../../src/v3/components/GestureComponents.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"GestureComponents.web.d.ts","sourceRoot":"","sources":["../../../../src/v3/components/GestureComponents.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAYlD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMtB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIjB,CAAC;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAmC,CAAC;AAE1D,eAAO,MAAM,mBAAmB,yBAG/B,CAAC;AAKF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA4B,CAAC;AAExD,eAAO,MAAM,QAAQ,GAAI,KAAK,EAAG,OAAO,aAAa,CAAC,KAAK,CAAC,sBAK3D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualDetector.d.ts","sourceRoot":"","sources":["../../../../../src/v3/detectors/VirtualDetector/VirtualDetector.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VirtualDetector.d.ts","sourceRoot":"","sources":["../../../../../src/v3/detectors/VirtualDetector/VirtualDetector.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAiCtD,wBAAgB,eAAe,CAC7B,OAAO,EACP,YAAY,EACZ,oBAAoB,SAAS,YAAY,EACzC,KAAK,EAAE,oBAAoB,CAAC,OAAO,EAAE,YAAY,EAAE,oBAAoB,CAAC,+BAuGzE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-gesture-handler",
|
|
3
|
-
"version": "3.4.0
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Declarative API exposing native platform touch and gesture system to React Native",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jest",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"@babel/core": "^7.25.2",
|
|
75
75
|
"@babel/preset-env": "^7.25.3",
|
|
76
76
|
"@babel/preset-typescript": "^7.12.7",
|
|
77
|
-
"@react-native/babel-preset": "0.
|
|
78
|
-
"@react-native/jest-preset": "0.
|
|
77
|
+
"@react-native/babel-preset": "0.88.0",
|
|
78
|
+
"@react-native/jest-preset": "0.88.0",
|
|
79
79
|
"@testing-library/react-native": "^12.5.1",
|
|
80
80
|
"@types/invariant": "^2.2.37",
|
|
81
81
|
"@types/jest": "^29.5.12",
|
|
@@ -95,12 +95,12 @@
|
|
|
95
95
|
"lint-staged": "^12.3.2",
|
|
96
96
|
"madge": "^6.1.0",
|
|
97
97
|
"prettier": "3.3.3",
|
|
98
|
-
"react": "19.
|
|
99
|
-
"react-native": "0.
|
|
98
|
+
"react": "19.3.0",
|
|
99
|
+
"react-native": "0.88.0",
|
|
100
100
|
"react-native-builder-bob": "^0.40.13",
|
|
101
|
-
"react-native-reanimated": "4.
|
|
102
|
-
"react-native-worklets": "0.
|
|
103
|
-
"react-test-renderer": "19.
|
|
101
|
+
"react-native-reanimated": "4.7.1",
|
|
102
|
+
"react-native-worklets": "0.13.0",
|
|
103
|
+
"react-test-renderer": "19.3.0",
|
|
104
104
|
"typescript": "~6.0.3"
|
|
105
105
|
},
|
|
106
106
|
"peerDependencies": {
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
CodegenTypes,
|
|
3
|
-
ColorValue,
|
|
4
|
-
HostComponent,
|
|
5
|
-
ViewProps,
|
|
6
|
-
} from 'react-native';
|
|
1
|
+
import type { CodegenTypes, ColorValue, ViewProps } from 'react-native';
|
|
7
2
|
import { codegenNativeComponent } from 'react-native';
|
|
8
3
|
|
|
9
4
|
export type ButtonEvent = Readonly<{
|
|
@@ -16,7 +11,7 @@ export type ButtonEvent = Readonly<{
|
|
|
16
11
|
pointerType: CodegenTypes.Int32;
|
|
17
12
|
}>;
|
|
18
13
|
|
|
19
|
-
|
|
14
|
+
/** @ts-ignore - Redefining pointerEvents with WithDefault for codegen, conflicts with ViewProps type but codegen needs it */
|
|
20
15
|
interface NativeProps extends ViewProps {
|
|
21
16
|
// The events are namespaced with `Button` because the base view config on iOS
|
|
22
17
|
// already registers `topPress` as a bubbling event — a direct event with the
|
|
@@ -131,6 +126,4 @@ interface NativeProps extends ViewProps {
|
|
|
131
126
|
borderStartStartRadius?: CodegenTypes.UnsafeMixed;
|
|
132
127
|
}
|
|
133
128
|
|
|
134
|
-
export default codegenNativeComponent<NativeProps>(
|
|
135
|
-
'RNGestureHandlerButton'
|
|
136
|
-
) as HostComponent<NativeProps>;
|
|
129
|
+
export default codegenNativeComponent<NativeProps>('RNGestureHandlerButton');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CodegenTypes,
|
|
1
|
+
import type { CodegenTypes, ViewProps } from 'react-native';
|
|
2
2
|
import { codegenNativeComponent } from 'react-native';
|
|
3
3
|
|
|
4
4
|
type GestureHandlerEvent = Readonly<{
|
|
@@ -41,7 +41,7 @@ export interface VirtualChildrenProps {
|
|
|
41
41
|
viewTag: CodegenTypes.Int32;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
/** @ts-expect-error WithDefault adds `| null` to the type, which doesn't align with ViewProps.pointerEvents */
|
|
45
45
|
// Using Exclude to remove null from the type makes the error go away, but breaks codegen.
|
|
46
46
|
export interface NativeProps extends ViewProps {
|
|
47
47
|
onGestureHandlerEvent?:
|
|
@@ -78,4 +78,4 @@ export interface NativeProps extends ViewProps {
|
|
|
78
78
|
|
|
79
79
|
export default codegenNativeComponent<NativeProps>('RNGestureHandlerDetector', {
|
|
80
80
|
interfaceOnly: true,
|
|
81
|
-
})
|
|
81
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CodegenTypes,
|
|
1
|
+
import type { CodegenTypes, ViewProps } from 'react-native';
|
|
2
2
|
import { codegenNativeComponent } from 'react-native';
|
|
3
3
|
|
|
4
4
|
// Publicly accessible type, moduleId is set internally
|
|
@@ -6,7 +6,7 @@ export interface RootViewNativeProps extends ViewProps {
|
|
|
6
6
|
unstable_forceActive?: boolean;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
/** @ts-expect-error WithDefault adds null for codegen, unlike ViewProps.pointerEvents. */
|
|
10
10
|
interface NativeProps extends ViewProps {
|
|
11
11
|
pointerEvents?: CodegenTypes.WithDefault<
|
|
12
12
|
'box-none' | 'none' | 'box-only' | 'auto',
|
|
@@ -16,6 +16,4 @@ interface NativeProps extends ViewProps {
|
|
|
16
16
|
unstable_forceActive?: boolean;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
export default codegenNativeComponent<NativeProps>(
|
|
20
|
-
'RNGestureHandlerRootView'
|
|
21
|
-
) as HostComponent<NativeProps>;
|
|
19
|
+
export default codegenNativeComponent<NativeProps>('RNGestureHandlerRootView');
|
|
@@ -9,10 +9,15 @@ import {
|
|
|
9
9
|
} from 'react-native';
|
|
10
10
|
|
|
11
11
|
import createNativeWrapper from '../createNativeWrapper';
|
|
12
|
+
import { GestureDetectorType } from '../detectors';
|
|
12
13
|
|
|
13
|
-
export const ScrollView = createNativeWrapper(
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
export const ScrollView = createNativeWrapper(
|
|
15
|
+
RNScrollView,
|
|
16
|
+
{
|
|
17
|
+
disallowInterruption: false,
|
|
18
|
+
},
|
|
19
|
+
GestureDetectorType.Intercepting
|
|
20
|
+
);
|
|
16
21
|
|
|
17
22
|
export const Switch = createNativeWrapper(RNSwitch, {
|
|
18
23
|
shouldCancelWhenOutside: false,
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ComponentType, ReactElement } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Children,
|
|
4
|
+
useCallback,
|
|
5
|
+
useEffect,
|
|
6
|
+
useMemo,
|
|
7
|
+
useRef,
|
|
8
|
+
useState,
|
|
9
|
+
} from 'react';
|
|
2
10
|
import { findNodeHandle, Platform } from 'react-native';
|
|
3
11
|
|
|
4
12
|
import { tagMessage } from '../../../utils';
|
|
@@ -14,6 +22,17 @@ import {
|
|
|
14
22
|
} from './useInterceptingDetectorContext';
|
|
15
23
|
import { Wrap } from './Wrap';
|
|
16
24
|
|
|
25
|
+
function getChildName(children: unknown) {
|
|
26
|
+
const { type } = Children.only(children) as ReactElement<
|
|
27
|
+
unknown,
|
|
28
|
+
string | ComponentType<unknown>
|
|
29
|
+
>;
|
|
30
|
+
|
|
31
|
+
return typeof type === 'string'
|
|
32
|
+
? type
|
|
33
|
+
: (type.displayName ?? type.name ?? 'Unknown');
|
|
34
|
+
}
|
|
35
|
+
|
|
17
36
|
function useRequiredInterceptingDetectorContext() {
|
|
18
37
|
const context = useInterceptingDetectorContext();
|
|
19
38
|
if (!context) {
|
|
@@ -58,6 +77,24 @@ export function VirtualDetector<
|
|
|
58
77
|
|
|
59
78
|
useNativeGestureRole(viewRef, props.children);
|
|
60
79
|
|
|
80
|
+
// Dev-only: no host instance after a commit means the child did not hand
|
|
81
|
+
// its `ref` to one. A child that renders null first is reported as well.
|
|
82
|
+
const reportedRef = useRef(false);
|
|
83
|
+
|
|
84
|
+
useEffect(() => {
|
|
85
|
+
if (!__DEV__ || reportedRef.current || viewRef.current) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
reportedRef.current = true;
|
|
90
|
+
|
|
91
|
+
console.error(
|
|
92
|
+
tagMessage(
|
|
93
|
+
`VirtualGestureDetector could not attach to its child (${getChildName(props.children)}). The child must be a host view or forward its \`ref\` to one.`
|
|
94
|
+
)
|
|
95
|
+
);
|
|
96
|
+
});
|
|
97
|
+
|
|
61
98
|
const handlerTags = useMemo(
|
|
62
99
|
() =>
|
|
63
100
|
isComposedGesture(props.gesture)
|