react-native-gtkx 0.3.0-alpha.1 → 0.4.0-alpha.2
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/README.md +1 -1
- package/dist/adw/index.d.ts +3 -2
- package/dist/adw/index.js +21 -4
- package/dist/adw/index.js.map +1 -1
- package/dist/adw/widgets.generated.d.ts +1 -1
- package/dist/adw/widgets.generated.js +2 -2
- package/dist/adw/widgets.generated.js.map +1 -1
- package/dist/animated/create-animated.d.ts +2 -0
- package/dist/animated/create-animated.js +2 -0
- package/dist/animated/create-animated.js.map +1 -1
- package/dist/animated/event.d.ts +15 -0
- package/dist/animated/event.js +80 -0
- package/dist/animated/event.js.map +1 -0
- package/dist/animated/index.d.ts +4 -0
- package/dist/animated/index.js +8 -0
- package/dist/animated/index.js.map +1 -1
- package/dist/animated/spring.d.ts +10 -0
- package/dist/animated/spring.js +20 -6
- package/dist/animated/spring.js.map +1 -1
- package/dist/animated/timing.d.ts +10 -0
- package/dist/animated/timing.js +21 -13
- package/dist/animated/timing.js.map +1 -1
- package/dist/apis/host.gtkx.js +70 -11
- package/dist/apis/host.gtkx.js.map +1 -1
- package/dist/common/navigation-stack.d.ts +6 -3
- package/dist/common/navigation-stack.js +8 -1
- package/dist/common/navigation-stack.js.map +1 -1
- package/dist/common/widget.js +2 -11
- package/dist/common/widget.js.map +1 -1
- package/dist/components/animated.d.ts +1 -0
- package/dist/components/animated.js +28 -4
- package/dist/components/animated.js.map +1 -1
- package/dist/components/app-registry.js +32 -8
- package/dist/components/app-registry.js.map +1 -1
- package/dist/components/request-animation-frame.d.ts +33 -0
- package/dist/components/request-animation-frame.js +83 -0
- package/dist/components/request-animation-frame.js.map +1 -0
- package/dist/components/scroll-view.js +60 -2
- package/dist/components/scroll-view.js.map +1 -1
- package/dist/components/virtualized-list.js +1 -4
- package/dist/components/virtualized-list.js.map +1 -1
- package/dist/dnd/autoscroll.d.ts +44 -0
- package/dist/dnd/autoscroll.js +176 -0
- package/dist/dnd/autoscroll.js.map +1 -0
- package/dist/dnd/grid-order.d.ts +45 -0
- package/dist/dnd/grid-order.js +151 -0
- package/dist/dnd/grid-order.js.map +1 -0
- package/dist/dnd/grid.d.ts +44 -0
- package/dist/dnd/grid.js +397 -0
- package/dist/dnd/grid.js.map +1 -0
- package/dist/dnd/gtk-controllers.d.ts +16 -2
- package/dist/dnd/gtk-controllers.js +23 -3
- package/dist/dnd/gtk-controllers.js.map +1 -1
- package/dist/dnd/index.d.ts +4 -2
- package/dist/dnd/index.js +9 -2
- package/dist/dnd/index.js.map +1 -1
- package/dist/dnd/order-state.d.ts +14 -0
- package/dist/dnd/order-state.js +55 -0
- package/dist/dnd/order-state.js.map +1 -0
- package/dist/dnd/order.d.ts +19 -0
- package/dist/dnd/order.js +19 -0
- package/dist/dnd/order.js.map +1 -1
- package/dist/dnd/sortable.d.ts +29 -4
- package/dist/dnd/sortable.js +308 -115
- package/dist/dnd/sortable.js.map +1 -1
- package/dist/dnd/types.d.ts +236 -14
- package/dist/dnd/types.js +30 -0
- package/dist/dnd/types.js.map +1 -1
- package/dist/gesture-handler-compat/attach-context.d.ts +29 -0
- package/dist/gesture-handler-compat/attach-context.js +90 -0
- package/dist/gesture-handler-compat/attach-context.js.map +1 -0
- package/dist/gesture-handler-compat/detector-runtime.d.ts +14 -3
- package/dist/gesture-handler-compat/detector-runtime.js +15 -5
- package/dist/gesture-handler-compat/detector-runtime.js.map +1 -1
- package/dist/gesture-handler-compat/detector.js +57 -2
- package/dist/gesture-handler-compat/detector.js.map +1 -1
- package/dist/gesture-handler-compat/gesture-state-manager.d.ts +5 -0
- package/dist/gesture-handler-compat/gesture-state-manager.js +77 -0
- package/dist/gesture-handler-compat/gesture-state-manager.js.map +1 -0
- package/dist/gesture-handler-compat/index.d.ts +2 -2
- package/dist/gesture-handler-compat/index.js +38 -33
- package/dist/gesture-handler-compat/index.js.map +1 -1
- package/dist/gesture-handler-compat/recognizer.d.ts +12 -1
- package/dist/gesture-handler-compat/recognizer.js +23 -9
- package/dist/gesture-handler-compat/recognizer.js.map +1 -1
- package/dist/gesture-handler-compat/tag-registry.d.ts +14 -0
- package/dist/gesture-handler-compat/tag-registry.js +19 -0
- package/dist/gesture-handler-compat/tag-registry.js.map +1 -0
- package/dist/globals/index.d.ts +47 -0
- package/dist/globals/index.js +181 -0
- package/dist/globals/index.js.map +1 -0
- package/dist/globals/install.d.ts +1 -0
- package/dist/globals/install.js +14 -0
- package/dist/globals/install.js.map +1 -0
- package/dist/gtkx/bridge/adw-namespace.d.ts +2 -0
- package/dist/gtkx/bridge/adw-namespace.js +26 -0
- package/dist/gtkx/bridge/adw-namespace.js.map +1 -0
- package/dist/gtkx/bridge/adw.d.ts +23 -0
- package/dist/gtkx/bridge/adw.js +93 -0
- package/dist/gtkx/bridge/adw.js.map +1 -0
- package/dist/gtkx/bridge/color-scheme-parse.d.ts +11 -0
- package/dist/gtkx/bridge/color-scheme-parse.js +42 -0
- package/dist/gtkx/bridge/color-scheme-parse.js.map +1 -0
- package/dist/gtkx/bridge/color-scheme-portal.d.ts +24 -0
- package/dist/gtkx/bridge/color-scheme-portal.js +172 -0
- package/dist/gtkx/bridge/color-scheme-portal.js.map +1 -0
- package/dist/gtkx/bridge/core.d.ts +25 -0
- package/dist/gtkx/bridge/core.js +69 -0
- package/dist/gtkx/bridge/core.js.map +1 -0
- package/dist/gtkx/bridge/drag-layer.d.ts +27 -0
- package/dist/gtkx/bridge/drag-layer.js +177 -0
- package/dist/gtkx/bridge/drag-layer.js.map +1 -0
- package/dist/gtkx/bridge/index.d.ts +1 -27
- package/dist/gtkx/bridge/index.js +12 -71
- package/dist/gtkx/bridge/index.js.map +1 -1
- package/dist/gtkx/bridge/widgets.generated.adw.d.ts +1 -0
- package/dist/gtkx/bridge/widgets.generated.adw.js +16 -0
- package/dist/gtkx/bridge/widgets.generated.adw.js.map +1 -0
- package/dist/gtkx/bridge/widgets.generated.d.ts +0 -1
- package/dist/gtkx/bridge/widgets.generated.js +3 -3
- package/dist/gtkx/bridge/widgets.generated.js.map +1 -1
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp/data/generated.d.ts +41 -20
- package/dist/mcp/data/generated.js +46 -20
- package/dist/mcp/data/generated.js.map +1 -1
- package/dist/metro/index.d.ts +1 -0
- package/dist/metro/index.js +12 -0
- package/dist/metro/index.js.map +1 -1
- package/dist/navigation/sidebar.js +2 -45
- package/dist/navigation/sidebar.js.map +1 -1
- package/dist/reanimated-compat/animatable-value.d.ts +158 -0
- package/dist/reanimated-compat/animatable-value.js +316 -0
- package/dist/reanimated-compat/animatable-value.js.map +1 -0
- package/dist/reanimated-compat/animation.d.ts +34 -13
- package/dist/reanimated-compat/animation.js +97 -25
- package/dist/reanimated-compat/animation.js.map +1 -1
- package/dist/reanimated-compat/mutable.js +6 -6
- package/dist/reanimated-compat/mutable.js.map +1 -1
- package/dist/reanimated-compat/updater-animations.js +32 -12
- package/dist/reanimated-compat/updater-animations.js.map +1 -1
- package/dist/runner/host-dev.js +5 -1
- package/dist/runner/host-dev.js.map +1 -1
- package/dist/runner/host.js +9 -1
- package/dist/runner/host.js.map +1 -1
- package/dist/vite/index.js +130 -0
- package/dist/vite/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/gtkx/bridge/theme.d.ts +0 -4
- package/dist/gtkx/bridge/theme.js +0 -5
- package/dist/gtkx/bridge/theme.js.map +0 -1
|
@@ -3,9 +3,10 @@ import { View } from "../components/view";
|
|
|
3
3
|
import { createUnsupportedFactory } from "../unsupported-export";
|
|
4
4
|
import { Gesture } from "./builder";
|
|
5
5
|
import { GestureDetector } from "./detector";
|
|
6
|
+
import { GestureStateManager } from "./gesture-state-manager";
|
|
6
7
|
import { useCompetingGestures, useExclusiveGestures, useFlingGesture, useHoverGesture, useLongPressGesture, useManualGesture, useNativeGesture, usePanGesture, usePinchGesture, useRotationGesture, useSimultaneousGestures, useTapGesture, } from "./hooks";
|
|
7
8
|
import { DIRECTIONS, GESTURE_STATE, HOVER_EFFECT, MOUSE_BUTTON, POINTER_TYPE, } from "./types";
|
|
8
|
-
export { Gesture, GestureDetector, useCompetingGestures, useExclusiveGestures, useFlingGesture, useHoverGesture, useLongPressGesture, useManualGesture, useNativeGesture, usePanGesture, usePinchGesture, useRotationGesture, useSimultaneousGestures, useTapGesture, };
|
|
9
|
+
export { Gesture, GestureDetector, GestureStateManager, useCompetingGestures, useExclusiveGestures, useFlingGesture, useHoverGesture, useLongPressGesture, useManualGesture, useNativeGesture, usePanGesture, usePinchGesture, useRotationGesture, useSimultaneousGestures, useTapGesture, };
|
|
9
10
|
export { FlingGestureBuilder, ForceTouchGestureBuilder, HoverGestureBuilder, LongPressGestureBuilder, ManualGestureBuilder, NativeGestureBuilder, PanGestureBuilder, PinchGestureBuilder, RotationGestureBuilder, TapGestureBuilder, } from "./builder";
|
|
10
11
|
/**
|
|
11
12
|
* Upstream's default, and note that it is `style ?? {flex: 1}` rather than
|
|
@@ -29,15 +30,15 @@ const ROOT_STYLE = { flex: 1 };
|
|
|
29
30
|
* provide and nothing is being skipped.
|
|
30
31
|
*/
|
|
31
32
|
export const GestureHandlerRootView = ({ children, style, testID, }) => (_jsx(View, { style: style ?? ROOT_STYLE, testID: testID, children: children }));
|
|
32
|
-
const unsupported = createUnsupportedFactory("react-native-gesture-handler", "Implemented: GestureHandlerRootView, GestureDetector, `State`,
|
|
33
|
-
"the re-exported ScrollView/FlatList/TextInput/Switch and the
|
|
34
|
-
"recognizers — Pan, Tap, LongPress, Native, Pinch, Rotation,
|
|
35
|
-
"ForceTouch — in both spellings where upstream has two
|
|
36
|
-
"`usePanGesture()`, and so on), plus the three cross-gesture relations
|
|
37
|
-
"composers. Three of them need input a mouse cannot produce: Pinch and
|
|
38
|
-
"TOUCHPAD (GtkGestureZoom/GtkGestureRotate) and ForceTouch needs a
|
|
39
|
-
"STYLUS (GtkGestureStylus). RN's own responder system and PanResponder
|
|
40
|
-
"(docs/api.md); drag-and-drop is react-native-gtkx/dnd.");
|
|
33
|
+
const unsupported = createUnsupportedFactory("react-native-gesture-handler", "Implemented: GestureHandlerRootView, GestureDetector, GestureStateManager, `State`, " +
|
|
34
|
+
"`Directions`, `HoverEffect`, the re-exported ScrollView/FlatList/TextInput/Switch and the " +
|
|
35
|
+
"three Touchables, and ALL TEN recognizers — Pan, Tap, LongPress, Native, Pinch, Rotation, " +
|
|
36
|
+
"Fling, Manual, Hover and ForceTouch — in both spellings where upstream has two " +
|
|
37
|
+
"(`Gesture.Pan()` and `usePanGesture()`, and so on), plus the three cross-gesture relations " +
|
|
38
|
+
"and the three composers. Three of them need input a mouse cannot produce: Pinch and " +
|
|
39
|
+
"Rotation need a TOUCHPAD (GtkGestureZoom/GtkGestureRotate) and ForceTouch needs a " +
|
|
40
|
+
"pressure-reporting STYLUS (GtkGestureStylus). RN's own responder system and PanResponder " +
|
|
41
|
+
"also work (docs/api.md); drag-and-drop is react-native-gtkx/dnd.");
|
|
41
42
|
// Every runtime value `react-native-gesture-handler` 3.1.0 exports, minus
|
|
42
43
|
// GestureHandlerRootView above. Enumerated rather than generated by a Proxy
|
|
43
44
|
// over the module, because ESM named imports are resolved statically: a
|
|
@@ -84,12 +85,24 @@ export const TapGestureHandler = unsupported("TapGestureHandler");
|
|
|
84
85
|
// are that reasoning applied to the components upstream wraps itself.
|
|
85
86
|
export const legacy_createNativeWrapper = unsupported("legacy_createNativeWrapper");
|
|
86
87
|
// --- the new (v3) gesture API ---
|
|
87
|
-
// `Gesture`, `GestureDetector`, the nine gesture hooks
|
|
88
|
-
// hooks are re-exported at the top of this file.
|
|
89
|
-
// and none of its statics throws any more.
|
|
88
|
+
// `Gesture`, `GestureDetector`, `GestureStateManager`, the nine gesture hooks
|
|
89
|
+
// and the three composer hooks are re-exported at the top of this file.
|
|
90
|
+
// `Gesture` is a real namespace and none of its statics throws any more.
|
|
90
91
|
//
|
|
91
|
-
//
|
|
92
|
-
//
|
|
92
|
+
// `GestureStateManager` used to be refused here, for a global tag→handler
|
|
93
|
+
// registry this platform deliberately did not keep — identity was the
|
|
94
|
+
// mounted detector, and ./relations resolved an app's gesture object to a
|
|
95
|
+
// tag lazily precisely so nothing had to be looked up in a process-wide map.
|
|
96
|
+
// Reversed 2026-08-05: react-native-sortables' real v3 gesture-handler
|
|
97
|
+
// adapter calls the standalone `GestureStateManager.activate(handlerTag)`
|
|
98
|
+
// from its own `onTouchesMove`, on every ordinary drag, reading only the
|
|
99
|
+
// numeric tag off the event — no lazy path was available to it. ./tag-registry
|
|
100
|
+
// is the registry that reversal needed; ./gesture-state-manager is the export
|
|
101
|
+
// built on it. Full account: docs/api.md, docs/research/upstream-libraries.md
|
|
102
|
+
// ("Wall 4, confirmed").
|
|
103
|
+
//
|
|
104
|
+
// The three below stay refused, for three different reasons, none of them
|
|
105
|
+
// "not got round to it":
|
|
93
106
|
//
|
|
94
107
|
// - `GestureDetectorType` is a TYPE upstream, not a value. It only ever
|
|
95
108
|
// appears in a type position, where this module is not in the path at all
|
|
@@ -97,25 +110,17 @@ export const legacy_createNativeWrapper = unsupported("legacy_createNativeWrappe
|
|
|
97
110
|
// from node_modules — see the note at the top of this file). A runtime
|
|
98
111
|
// value under that name could only be reached by code that has already
|
|
99
112
|
// gone wrong;
|
|
100
|
-
// - `
|
|
101
|
-
//
|
|
102
|
-
//
|
|
103
|
-
//
|
|
104
|
-
//
|
|
105
|
-
//
|
|
106
|
-
//
|
|
107
|
-
//
|
|
108
|
-
//
|
|
109
|
-
//
|
|
110
|
-
// - `InterceptingGestureDetector` and `VirtualGestureDetector` are 3.1.0's
|
|
111
|
-
// new experimental detectors. The first intercepts events destined for
|
|
112
|
-
// views BELOW it, which on this platform would mean claiming a GTK
|
|
113
|
-
// sequence before deciding — and `CLAIMED` is irrevocable here, so the
|
|
114
|
-
// "intercept, look, maybe give back" shape is not expressible. The second
|
|
115
|
-
// drives a gesture with no view at all, which needs the tag registry the
|
|
116
|
-
// entry above says why this platform does not have.
|
|
113
|
+
// - `InterceptingGestureDetector` intercepts events destined for views
|
|
114
|
+
// BELOW it, which on this platform would mean claiming a GTK sequence
|
|
115
|
+
// before deciding — and `CLAIMED` is irrevocable here, so the "intercept,
|
|
116
|
+
// look, maybe give it back" shape is not expressible;
|
|
117
|
+
// - `VirtualGestureDetector` drives a gesture with no view at all. The tag
|
|
118
|
+
// registry above answers "which recognizer does this number mean", not
|
|
119
|
+
// "mint a recognizer with nothing to measure, no bounds and no widget to
|
|
120
|
+
// attach a controller to" — every recognizer here is still built by a
|
|
121
|
+
// mounted `GestureDetector` wrapping exactly one child, and giving it none
|
|
122
|
+
// is a structural feature this reversal did not add.
|
|
117
123
|
export const GestureDetectorType = unsupported("GestureDetectorType");
|
|
118
|
-
export const GestureStateManager = unsupported("GestureStateManager");
|
|
119
124
|
export const InterceptingGestureDetector = unsupported("InterceptingGestureDetector");
|
|
120
125
|
export const VirtualGestureDetector = unsupported("VirtualGestureDetector");
|
|
121
126
|
// --- enums and constants ---
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/gesture-handler-compat/index.tsx"],"names":[],"mappings":";AA6CA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAEzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,uBAAuB,EACvB,aAAa,GACd,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,UAAU,EACV,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,YAAY,GACb,MAAM,SAAS,CAAA;AAEhB,OAAO,EACL,OAAO,EACP,eAAe,EACf,oBAAo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AAe,GAAQ,WAAW,CAAC,iBAAiB,CAAC,CAAA","sourcesContent":["// react-native-gtkx/gesture-handler — all ten recognizers, `GestureDetector`,\n// the relations and the root view, reimplemented over this platform's own\n// responder system, and a loud refusal for what is left.\n//\n// WHAT IS LEFT is now a short and deliberate list rather than a backlog: the\n// RNGH 1.x component API, the native button family, and the three exports that\n// need a process-wide handler-tag registry this platform does not keep. Each\n// carries its reason where it is declared below and in docs/api.md, because a\n// refusal that does not say why is indistinguishable from one nobody has\n// revisited — which is exactly what happened to `Gesture.Hover()`, refused for\n// a year on a judgement about the test rig that turned out to be wrong.\n//\n// NOT A PORT. `docs/research/gestures.md` refused RNGH on four grounds, two of\n// which expired when `react-native-gtkx/reanimated` shipped; the other two —\n// no `exports` map on `src/web/`, no out-of-tree platform story, and a\n// react-native-windows precedent that has been a literal `// NO-OP` since\n// 2.8.0 — stand. So this is the third instance of the pattern that has worked\n// twice already: reimplement the SEMANTICS behind the package name, take the\n// upstream implementation as a blueprint rather than as a dependency. The\n// recognizer and its arbitration are the implementation (see ./recognizer,\n// ./pan); `Gesture.Pan()` and `usePanGesture()` are two thin spellings over\n// it, which is the mistake upstream made and had to undo in 3.1.0.\n//\n// The root view came first and for its own reason: exactly one RNGH symbol\n// appears in apps that do not otherwise use RNGH — `GestureHandlerRootView`.\n// Every drag-and-drop app has it at the root, because\n// `react-native-reanimated-dnd`'s own quick start puts it there.\n//\n// WHY it is not a bare passthrough. `GestureHandlerRootView` is a real layout\n// box: upstream renders `<View style={style ?? {flex: 1}}>`, so an app that\n// leans on that box to fill the screen would collapse without it. Rendering\n// only the children would be a simplification, not a shim. See `ROOT_STYLE`.\n//\n// WHY everything else throws rather than no-oping. docs/research/gestures.md\n// records the failure mode this repo most wants to avoid: `Animated.View`\n// silently accepting the responder props and ignoring them compiled, ran, and\n// did nothing — \"the worst possible failure mode\". A `PanGestureHandler` that\n// renders its children without gestures is the same trap. An unsupported RNGH\n// import must fail where it is used, naming itself.\n//\n// Note on types: this is a BUNDLER alias, so `tsc` never sees it. An app\n// keeps `react-native-gesture-handler` in its dependencies for iOS and\n// Android, and TypeScript goes on resolving the real package's types from\n// node_modules. That is why nothing here mirrors RNGH's ~60 type exports.\nimport type { ReactNode } from \"react\"\nimport { View } from \"../components/view\"\nimport type { StyleProp } from \"../contracts\"\nimport { createUnsupportedFactory } from \"../unsupported-export\"\nimport { Gesture } from \"./builder\"\nimport { GestureDetector } from \"./detector\"\nimport {\n useCompetingGestures,\n useExclusiveGestures,\n useFlingGesture,\n useHoverGesture,\n useLongPressGesture,\n useManualGesture,\n useNativeGesture,\n usePanGesture,\n usePinchGesture,\n useRotationGesture,\n useSimultaneousGestures,\n useTapGesture,\n} from \"./hooks\"\nimport {\n DIRECTIONS,\n GESTURE_STATE,\n HOVER_EFFECT,\n MOUSE_BUTTON,\n POINTER_TYPE,\n} from \"./types\"\n\nexport {\n Gesture,\n GestureDetector,\n useCompetingGestures,\n useExclusiveGestures,\n useFlingGesture,\n useHoverGesture,\n useLongPressGesture,\n useManualGesture,\n useNativeGesture,\n usePanGesture,\n usePinchGesture,\n useRotationGesture,\n useSimultaneousGestures,\n useTapGesture,\n}\nexport {\n FlingGestureBuilder,\n ForceTouchGestureBuilder,\n HoverGestureBuilder,\n LongPressGestureBuilder,\n ManualGestureBuilder,\n NativeGestureBuilder,\n PanGestureBuilder,\n PinchGestureBuilder,\n RotationGestureBuilder,\n TapGestureBuilder,\n} from \"./builder\"\nexport type { GestureDetectorProps } from \"./detector\"\nexport type {\n FlingGestureHookConfig,\n HoverGestureHookConfig,\n LongPressGestureHookConfig,\n ManualGestureHookConfig,\n NativeGestureHookConfig,\n PanGestureHookConfig,\n TapGestureHookConfig,\n} from \"./hooks\"\nexport type {\n AnyGestureSpec,\n ComposedGestureKind,\n ComposedGestureSpec,\n GestureEndEventPayload,\n GestureEventPayload,\n GestureHitSlop,\n GestureKind,\n GestureRef,\n GestureRelations,\n GestureSpec,\n GestureStateManagerApi,\n GestureTouchData,\n GestureTouchEvent,\n OffsetBound,\n} from \"./types\"\n\n/**\n * Upstream's default, and note that it is `style ?? {flex: 1}` rather than\n * `[{flex: 1}, style]`: passing a style REPLACES the flex box, it does not\n * merge with it. Verified against react-native-gesture-handler 3.1.0, where\n * all three implementations (`.tsx`, `.web.tsx`, `.android.tsx`) agree on\n * `<View style={style ?? styles.container} {...rest} />`. The difference is\n * observable — with `style={{height: 100}}` upstream gives a 100px-tall box\n * with no `flex`, and a merged version would give a flexing one.\n */\nconst ROOT_STYLE = { flex: 1 } as const\n\nexport type GestureHandlerRootViewProps = {\n children?: ReactNode\n style?: StyleProp\n testID?: string\n}\n\n/**\n * The root box `react-native-gesture-handler` asks apps to put at the top of\n * the tree.\n *\n * Faithful, not merely tolerated. Upstream's does two things: it renders a\n * `flex: 1` `View`, and it marks the subtree as gesture-arbitrating. The\n * first is reproduced exactly. The second is genuinely this platform's job\n * already — RN's own gesture responder system is implemented here on GTK4\n * event controllers (#41), and its lock is global — so there is no context to\n * provide and nothing is being skipped.\n */\nexport const GestureHandlerRootView = ({\n children,\n style,\n testID,\n}: GestureHandlerRootViewProps): ReactNode => (\n <View\n style={style ?? ROOT_STYLE}\n testID={testID}\n >\n {children}\n </View>\n)\n\nconst unsupported = createUnsupportedFactory(\n \"react-native-gesture-handler\",\n \"Implemented: GestureHandlerRootView, GestureDetector, `State`, `Directions`, `HoverEffect`, \" +\n \"the re-exported ScrollView/FlatList/TextInput/Switch and the three Touchables, and ALL TEN \" +\n \"recognizers — Pan, Tap, LongPress, Native, Pinch, Rotation, Fling, Manual, Hover and \" +\n \"ForceTouch — in both spellings where upstream has two (`Gesture.Pan()` and \" +\n \"`usePanGesture()`, and so on), plus the three cross-gesture relations and the three \" +\n \"composers. Three of them need input a mouse cannot produce: Pinch and Rotation need a \" +\n \"TOUCHPAD (GtkGestureZoom/GtkGestureRotate) and ForceTouch needs a pressure-reporting \" +\n \"STYLUS (GtkGestureStylus). RN's own responder system and PanResponder also work \" +\n \"(docs/api.md); drag-and-drop is react-native-gtkx/dnd.\",\n)\n\n// Every runtime value `react-native-gesture-handler` 3.1.0 exports, minus\n// GestureHandlerRootView above. Enumerated rather than generated by a Proxy\n// over the module, because ESM named imports are resolved statically: a\n// symbol that is not exported here fails at BUILD time with \"no export named\n// X\", which is loud in its own right — but only the names listed here can\n// produce the descriptive runtime message, so the list is worth keeping\n// complete.\n//\n// The `any` is deliberate and load-bearing: an app's `<PanGestureHandler>`\n// must still type-check (it type-checks against the REAL package anyway, see\n// the note at the top) and fail when it runs, not before.\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n// --- the legacy handler components ---\n//\n// ALL NINE STAY REFUSED, and now that every recognizer behind them is\n// implemented the reason is worth stating precisely rather than leaving as a\n// bare `unsupported()`: these are not gestures, they are the RNGH **1.x\n// component API** — `<PanGestureHandler onGestureEvent={...}><View/></PanGestureHandler>`\n// — which upstream deprecated years before it deprecated the builder, and\n// which every one of the four libraries this epic targets has already\n// migrated off. Reimplementing them would mean a second public surface over\n// the same recognizers, with its own `onGestureEvent`/`onHandlerStateChange`\n// event shape, its own `enabled`/`waitFor` prop plumbing and its own\n// `createHandler` HOC — for zero measured consumers and a spelling upstream is\n// removing. `Gesture.Pan()` and `usePanGesture()` are the two spellings that\n// exist here, which is one more than upstream is keeping.\n//\n// The message each throws names itself, so an app on the old API is told which\n// symbol to migrate rather than left with a missing export.\nexport const FlingGestureHandler: any = unsupported(\"FlingGestureHandler\")\nexport const ForceTouchGestureHandler: any = unsupported(\n \"ForceTouchGestureHandler\",\n)\nexport const LongPressGestureHandler: any = unsupported(\n \"LongPressGestureHandler\",\n)\nexport const NativeViewGestureHandler: any = unsupported(\n \"NativeViewGestureHandler\",\n)\nexport const PanGestureHandler: any = unsupported(\"PanGestureHandler\")\nexport const PinchGestureHandler: any = unsupported(\"PinchGestureHandler\")\nexport const RotationGestureHandler: any = unsupported(\"RotationGestureHandler\")\nexport const TapGestureHandler: any = unsupported(\"TapGestureHandler\")\n// `createNativeWrapper(Component, config)` attaches a `NativeViewGestureHandler`\n// to an arbitrary RN component. On this platform the responder system IS the\n// arbitration that wrapper registers with, every component this package ships\n// already speaks it, and `Gesture.Native()` is how a gesture is declared over\n// one explicitly — so the wrapper has nothing to add and would be a no-op\n// dressed as a feature. The re-exported ScrollView/FlatList/Touchables below\n// are that reasoning applied to the components upstream wraps itself.\nexport const legacy_createNativeWrapper: any = unsupported(\n \"legacy_createNativeWrapper\",\n)\n\n// --- the new (v3) gesture API ---\n// `Gesture`, `GestureDetector`, the nine gesture hooks and the three composer\n// hooks are re-exported at the top of this file. `Gesture` is a real namespace\n// and none of its statics throws any more.\n//\n// The four below are refused for four different reasons, none of them \"not got\n// round to it\":\n//\n// - `GestureDetectorType` is a TYPE upstream, not a value. It only ever\n// appears in a type position, where this module is not in the path at all\n// (the alias is a BUNDLER alias; `tsc` resolves the real package's types\n// from node_modules — see the note at the top of this file). A runtime\n// value under that name could only be reached by code that has already\n// gone wrong;\n// - `GestureStateManager` is upstream's standalone FACTORY, `create(tag)`,\n// which looks a mounted handler up by tag in a global `NodeManager`. The\n// manager an app actually uses is the one handed into `onTouchesDown` /\n// `onTouchesMove` / `onTouchesUp` / `onTouchesCancel`, and that one IS\n// implemented — it is what drives `Gesture.Manual()`. What is missing is\n// the global tag→handler registry, and its absence is deliberate: identity\n// here is the mounted detector, and ./relations resolves an app's gesture\n// object to a tag lazily precisely so that nothing has to be looked up in\n// a process-wide map. Upstream marks this export deprecated in favour of\n// the hook API in the same breath;\n// - `InterceptingGestureDetector` and `VirtualGestureDetector` are 3.1.0's\n// new experimental detectors. The first intercepts events destined for\n// views BELOW it, which on this platform would mean claiming a GTK\n// sequence before deciding — and `CLAIMED` is irrevocable here, so the\n// \"intercept, look, maybe give back\" shape is not expressible. The second\n// drives a gesture with no view at all, which needs the tag registry the\n// entry above says why this platform does not have.\nexport const GestureDetectorType: any = unsupported(\"GestureDetectorType\")\nexport const GestureStateManager: any = unsupported(\"GestureStateManager\")\nexport const InterceptingGestureDetector: any = unsupported(\n \"InterceptingGestureDetector\",\n)\nexport const VirtualGestureDetector: any = unsupported(\"VirtualGestureDetector\")\n\n// --- enums and constants ---\n//\n// ALL FIVE ARE NOW DATA, and the last four changed here. The old rule was that\n// an enum is only meaningful next to a handler that can run, so reading one\n// was already a symptom — and that rule was right when six of the ten\n// recognizers threw. It stopped describing anything true when the last four\n// shipped, and the honest test is now the plain one: does an app comparing\n// against this constant get a correct answer? For every one of these, yes.\n//\n// `State` went first, in slice 2, and the reasoning generalises to the rest:\n// every payload carries a faithful `state`, so `=== State.ACTIVE` is ordinary\n// correct code. `react-native-drawer-layout` does exactly that — it re-exports\n// it as `GestureState`, seeds a shared value with `GestureState.UNDETERMINED`\n// and tests `=== GestureState.ACTIVE`.\n//\n// `Directions` is REQUIRED rather than merely harmless: `Gesture.Fling()`\n// takes a direction and this is the enum it takes. A refusal here would make\n// the recognizer unusable in its documented spelling.\n//\n// `PointerType` became meaningful with `ForceTouch`, which is the first kind\n// whose events are honestly not a mouse — every payload carries `pointerType`,\n// and a stylus one says `STYLUS`.\n//\n// `HoverEffect` and `MouseButton` are INERT and exported anyway, which is the\n// one place this file's rule bends. Both name values for knobs that are\n// already accepted-and-inert here (`.effect()`, `.mouseButton()`) exactly as\n// they are inert off their platforms upstream, and a knob that accepts a\n// number while refusing the constant that number has a name for is incoherent.\n// The refusal that matters is for something that would silently NOT WORK;\n// these do exactly what they do upstream on this platform, which is nothing.\n//\n// Every number in all five is pinned by a test against 3.1.0's own sources,\n// because nothing about a wrong one is loud: `state === State.ACTIVE` and\n// `direction === Directions.LEFT` both go on compiling, go on running, and\n// quietly answer false.\nexport const State = GESTURE_STATE\nexport const Directions = DIRECTIONS\nexport const HoverEffect = HOVER_EFFECT\nexport const MouseButton = MOUSE_BUTTON\nexport const PointerType = POINTER_TYPE\n\n// --- the wrapped RN components and buttons ---\n//\n// Upstream builds every one of these with `createNativeWrapper(RN.X, {\n// disallowInterruption: true, shouldCancelWhenOutside: false })` — an RN\n// component with a `NativeViewGestureHandler` attached, so that RNGH's\n// arbitration knows about the native scrolling or the native press underneath.\n// On this platform that wrapper has nothing to add: the responder system IS\n// the arbitration these are being registered with, every one of these\n// components already speaks it, and `Gesture.Native()` is how a gesture is\n// declared over one of them explicitly. So the honest re-export is the\n// platform's own component, unwrapped.\n//\n// They are here because they are RENDERED, not merely imported.\n// `react-native-draggable-flatlist` 4.0.3 hands `FlatList` and `ScrollView` to\n// `Animated.createAnimatedComponent()` at module scope in\n// `DraggableFlatList.tsx` and `NestableScrollContainer.tsx`, which is what\n// stopped that library at IMPORT rather than at use;\n// `react-native-reanimated-dnd`'s `Sortable`/`SortableGrid` do the same;\n// `@gorhom/bottom-sheet` re-exports the three Touchables from its own public\n// entry as `BottomSheetTouchable` on every platform except iOS, and renders\n// `TextInput` as `BottomSheetTextInput`.\n//\n// WHAT IS NOT HERE, and the boundary is upstream's own: the BUTTON family\n// (`RawButton`, `BaseButton`, `RectButton`, `BorderlessButton`) is not RN\n// components with a handler attached — it is RNGH's own NATIVE BUTTON VIEWS,\n// implemented in Java and Objective-C, with an Android ripple\n// (`TouchableNativeFeedback`'s), `borderless` drawable selection, `rippleColor`\n// / `rippleRadius`, `exclusive`, and an `activeOpacity` applied by the native\n// view rather than by style. There is no GTK widget with those semantics and\n// no way to fake the ripple, so any implementation would be a `Pressable`\n// wearing the name of something else — which is precisely the silent\n// substitution this whole surface refuses.\n//\n// RE-CHECKED WITH THE FOUR TARGET LIBRARIES rather than assumed, because that\n// is what settled the `Touchable` question in slice 4. Sweeping the shipped\n// sources of `@gorhom/bottom-sheet` 5.2.14, `react-native-draggable-flatlist`\n// 4.0.3, `react-native-drawer-layout` 4.2.9 and `react-native-reanimated-dnd`\n// 2.0.0 for every symbol still refused here finds exactly one hit —\n// `RefreshControl` in `@gorhom/bottom-sheet` — and it is not this package's:\n// it is imported from `react-native`, as a type in `bottomSheetRefreshControl/\n// index.ts` and as a value only in `BottomSheetRefreshControl.android.tsx`,\n// which Metro on this platform never resolves (`.linux.* -> .native.* -> .*`).\n// Nothing reaches for a button, a legacy handler component, `Directions`,\n// `MouseButton`, `PointerType`, `GestureStateManager` or any `Legacy*` alias.\n// The `Touchable` subset slice 4 shipped remains the only thing upstream's own\n// exports forced.\n//\n// `TouchableNativeFeedback` is Android's ripple by another name and `Touchable`\n// is RN's deprecated mixin; both stay refused for the reason RN itself would\n// not give them to you here. `RefreshControl` is pull-to-refresh, which needs\n// a scroll gesture this platform's `ScrollView` does not expose and a spinner\n// widget it does not have — and, per the sweep above, nothing asks for it.\nexport const BaseButton: any = unsupported(\"BaseButton\")\nexport const BorderlessButton: any = unsupported(\"BorderlessButton\")\nexport { FlatList } from \"../components/flat-list\"\nexport {\n Pressable,\n TouchableHighlight,\n TouchableOpacity,\n TouchableWithoutFeedback,\n} from \"../components/pressable\"\nexport { ScrollView } from \"../components/scroll-view\"\nexport { Switch } from \"../components/switch\"\nexport { TextInput } from \"../components/text-input\"\nexport const RawButton: any = unsupported(\"RawButton\")\nexport const RectButton: any = unsupported(\"RectButton\")\nexport const RefreshControl: any = unsupported(\"RefreshControl\")\nexport const Touchable: any = unsupported(\"Touchable\")\nexport const TouchableNativeFeedback: any = unsupported(\n \"TouchableNativeFeedback\",\n)\n\n// --- the 2.x legacy aliases, still exported by 3.x ---\n//\n// ALL TWELVE STAY REFUSED, for one reason that covers them: each is 3.x's\n// escape hatch back to the 2.x implementation of a component whose 3.x\n// spelling is either implemented here already (`LegacyScrollView`,\n// `LegacyFlatList`, `LegacyTextInput`, `LegacySwitch`, `LegacyPressable`,\n// `LegacyText`) or refused above with its own reason (`LegacyRawButton`,\n// `LegacyBaseButton`, `LegacyRectButton`, `LegacyBorderlessButton`,\n// `LegacyRefreshControl`). Where the modern name works, the legacy alias would\n// be a second name for the same component with a promise attached — \"this one\n// behaves like 2.x did\" — that this platform cannot keep, because it never\n// implemented 2.x's behaviour to differ from. Where the modern name is\n// refused, the alias inherits the refusal.\n//\n// `LegacyDrawerLayoutAndroid` is the odd one and is refused twice over: it is\n// Android's `DrawerLayoutAndroid`, which React Native itself does not ship off\n// Android, and `@react-navigation/drawer` reaches for\n// `react-native-drawer-layout` instead — which runs here (probe 3).\nexport const LegacyBaseButton: any = unsupported(\"LegacyBaseButton\")\nexport const LegacyBorderlessButton: any = unsupported(\"LegacyBorderlessButton\")\nexport const LegacyDrawerLayoutAndroid: any = unsupported(\n \"LegacyDrawerLayoutAndroid\",\n)\nexport const LegacyFlatList: any = unsupported(\"LegacyFlatList\")\nexport const LegacyPressable: any = unsupported(\"LegacyPressable\")\nexport const LegacyRawButton: any = unsupported(\"LegacyRawButton\")\nexport const LegacyRectButton: any = unsupported(\"LegacyRectButton\")\nexport const LegacyRefreshControl: any = unsupported(\"LegacyRefreshControl\")\nexport const LegacyScrollView: any = unsupported(\"LegacyScrollView\")\nexport const LegacySwitch: any = unsupported(\"LegacySwitch\")\nexport const LegacyText: any = unsupported(\"LegacyText\")\nexport const LegacyTextInput: any = unsupported(\"LegacyTextInput\")\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/gesture-handler-compat/index.tsx"],"names":[],"mappings":";AAkDA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAEzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,uBAAuB,EACvB,aAAa,GACd,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,UAAU,EACV,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,YAA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AAC,MAAM,UAAU,GAAQ,WAAW,CAAC,YAAY,CAAC,CAAA;AACxD,MAAM,CAAC,MAAM,eAAe,GAAQ,WAAW,CAAC,iBAAiB,CAAC,CAAA","sourcesContent":["// react-native-gtkx/gesture-handler — all ten recognizers, `GestureDetector`,\n// the relations and the root view, reimplemented over this platform's own\n// responder system, and a loud refusal for what is left.\n//\n// WHAT IS LEFT is now a short and deliberate list rather than a backlog: the\n// RNGH 1.x component API, the native button family, and three exports refused\n// for reasons that are each their own rather than one shared excuse. Each\n// carries its reason where it is declared below and in docs/api.md, because a\n// refusal that does not say why is indistinguishable from one nobody has\n// revisited — which is exactly what happened to `Gesture.Hover()`, refused for\n// a year on a judgement about the test rig that turned out to be wrong, and to\n// `GestureStateManager`, refused for a process-wide handler-tag registry this\n// platform did not keep — reversed 2026-08-05 once react-native-sortables'\n// real v3 adapter turned out to reach for exactly that. ./tag-registry is what\n// changed; see it and ./gesture-state-manager for the how, and docs/api.md for\n// the why.\n//\n// NOT A PORT. `docs/research/gestures.md` refused RNGH on four grounds, two of\n// which expired when `react-native-gtkx/reanimated` shipped; the other two —\n// no `exports` map on `src/web/`, no out-of-tree platform story, and a\n// react-native-windows precedent that has been a literal `// NO-OP` since\n// 2.8.0 — stand. So this is the third instance of the pattern that has worked\n// twice already: reimplement the SEMANTICS behind the package name, take the\n// upstream implementation as a blueprint rather than as a dependency. The\n// recognizer and its arbitration are the implementation (see ./recognizer,\n// ./pan); `Gesture.Pan()` and `usePanGesture()` are two thin spellings over\n// it, which is the mistake upstream made and had to undo in 3.1.0.\n//\n// The root view came first and for its own reason: exactly one RNGH symbol\n// appears in apps that do not otherwise use RNGH — `GestureHandlerRootView`.\n// Every drag-and-drop app has it at the root, because\n// `react-native-reanimated-dnd`'s own quick start puts it there.\n//\n// WHY it is not a bare passthrough. `GestureHandlerRootView` is a real layout\n// box: upstream renders `<View style={style ?? {flex: 1}}>`, so an app that\n// leans on that box to fill the screen would collapse without it. Rendering\n// only the children would be a simplification, not a shim. See `ROOT_STYLE`.\n//\n// WHY everything else throws rather than no-oping. docs/research/gestures.md\n// records the failure mode this repo most wants to avoid: `Animated.View`\n// silently accepting the responder props and ignoring them compiled, ran, and\n// did nothing — \"the worst possible failure mode\". A `PanGestureHandler` that\n// renders its children without gestures is the same trap. An unsupported RNGH\n// import must fail where it is used, naming itself.\n//\n// Note on types: this is a BUNDLER alias, so `tsc` never sees it. An app\n// keeps `react-native-gesture-handler` in its dependencies for iOS and\n// Android, and TypeScript goes on resolving the real package's types from\n// node_modules. That is why nothing here mirrors RNGH's ~60 type exports.\nimport type { ReactNode } from \"react\"\nimport { View } from \"../components/view\"\nimport type { StyleProp } from \"../contracts\"\nimport { createUnsupportedFactory } from \"../unsupported-export\"\nimport { Gesture } from \"./builder\"\nimport { GestureDetector } from \"./detector\"\nimport { GestureStateManager } from \"./gesture-state-manager\"\nimport {\n useCompetingGestures,\n useExclusiveGestures,\n useFlingGesture,\n useHoverGesture,\n useLongPressGesture,\n useManualGesture,\n useNativeGesture,\n usePanGesture,\n usePinchGesture,\n useRotationGesture,\n useSimultaneousGestures,\n useTapGesture,\n} from \"./hooks\"\nimport {\n DIRECTIONS,\n GESTURE_STATE,\n HOVER_EFFECT,\n MOUSE_BUTTON,\n POINTER_TYPE,\n} from \"./types\"\n\nexport {\n Gesture,\n GestureDetector,\n GestureStateManager,\n useCompetingGestures,\n useExclusiveGestures,\n useFlingGesture,\n useHoverGesture,\n useLongPressGesture,\n useManualGesture,\n useNativeGesture,\n usePanGesture,\n usePinchGesture,\n useRotationGesture,\n useSimultaneousGestures,\n useTapGesture,\n}\nexport {\n FlingGestureBuilder,\n ForceTouchGestureBuilder,\n HoverGestureBuilder,\n LongPressGestureBuilder,\n ManualGestureBuilder,\n NativeGestureBuilder,\n PanGestureBuilder,\n PinchGestureBuilder,\n RotationGestureBuilder,\n TapGestureBuilder,\n} from \"./builder\"\nexport type { GestureDetectorProps } from \"./detector\"\nexport type {\n FlingGestureHookConfig,\n HoverGestureHookConfig,\n LongPressGestureHookConfig,\n ManualGestureHookConfig,\n NativeGestureHookConfig,\n PanGestureHookConfig,\n TapGestureHookConfig,\n} from \"./hooks\"\nexport type {\n AnyGestureSpec,\n ComposedGestureKind,\n ComposedGestureSpec,\n GestureEndEventPayload,\n GestureEventPayload,\n GestureHitSlop,\n GestureKind,\n GestureRef,\n GestureRelations,\n GestureSpec,\n GestureStateManagerApi,\n GestureTouchData,\n GestureTouchEvent,\n OffsetBound,\n} from \"./types\"\n\n/**\n * Upstream's default, and note that it is `style ?? {flex: 1}` rather than\n * `[{flex: 1}, style]`: passing a style REPLACES the flex box, it does not\n * merge with it. Verified against react-native-gesture-handler 3.1.0, where\n * all three implementations (`.tsx`, `.web.tsx`, `.android.tsx`) agree on\n * `<View style={style ?? styles.container} {...rest} />`. The difference is\n * observable — with `style={{height: 100}}` upstream gives a 100px-tall box\n * with no `flex`, and a merged version would give a flexing one.\n */\nconst ROOT_STYLE = { flex: 1 } as const\n\nexport type GestureHandlerRootViewProps = {\n children?: ReactNode\n style?: StyleProp\n testID?: string\n}\n\n/**\n * The root box `react-native-gesture-handler` asks apps to put at the top of\n * the tree.\n *\n * Faithful, not merely tolerated. Upstream's does two things: it renders a\n * `flex: 1` `View`, and it marks the subtree as gesture-arbitrating. The\n * first is reproduced exactly. The second is genuinely this platform's job\n * already — RN's own gesture responder system is implemented here on GTK4\n * event controllers (#41), and its lock is global — so there is no context to\n * provide and nothing is being skipped.\n */\nexport const GestureHandlerRootView = ({\n children,\n style,\n testID,\n}: GestureHandlerRootViewProps): ReactNode => (\n <View\n style={style ?? ROOT_STYLE}\n testID={testID}\n >\n {children}\n </View>\n)\n\nconst unsupported = createUnsupportedFactory(\n \"react-native-gesture-handler\",\n \"Implemented: GestureHandlerRootView, GestureDetector, GestureStateManager, `State`, \" +\n \"`Directions`, `HoverEffect`, the re-exported ScrollView/FlatList/TextInput/Switch and the \" +\n \"three Touchables, and ALL TEN recognizers — Pan, Tap, LongPress, Native, Pinch, Rotation, \" +\n \"Fling, Manual, Hover and ForceTouch — in both spellings where upstream has two \" +\n \"(`Gesture.Pan()` and `usePanGesture()`, and so on), plus the three cross-gesture relations \" +\n \"and the three composers. Three of them need input a mouse cannot produce: Pinch and \" +\n \"Rotation need a TOUCHPAD (GtkGestureZoom/GtkGestureRotate) and ForceTouch needs a \" +\n \"pressure-reporting STYLUS (GtkGestureStylus). RN's own responder system and PanResponder \" +\n \"also work (docs/api.md); drag-and-drop is react-native-gtkx/dnd.\",\n)\n\n// Every runtime value `react-native-gesture-handler` 3.1.0 exports, minus\n// GestureHandlerRootView above. Enumerated rather than generated by a Proxy\n// over the module, because ESM named imports are resolved statically: a\n// symbol that is not exported here fails at BUILD time with \"no export named\n// X\", which is loud in its own right — but only the names listed here can\n// produce the descriptive runtime message, so the list is worth keeping\n// complete.\n//\n// The `any` is deliberate and load-bearing: an app's `<PanGestureHandler>`\n// must still type-check (it type-checks against the REAL package anyway, see\n// the note at the top) and fail when it runs, not before.\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n// --- the legacy handler components ---\n//\n// ALL NINE STAY REFUSED, and now that every recognizer behind them is\n// implemented the reason is worth stating precisely rather than leaving as a\n// bare `unsupported()`: these are not gestures, they are the RNGH **1.x\n// component API** — `<PanGestureHandler onGestureEvent={...}><View/></PanGestureHandler>`\n// — which upstream deprecated years before it deprecated the builder, and\n// which every one of the four libraries this epic targets has already\n// migrated off. Reimplementing them would mean a second public surface over\n// the same recognizers, with its own `onGestureEvent`/`onHandlerStateChange`\n// event shape, its own `enabled`/`waitFor` prop plumbing and its own\n// `createHandler` HOC — for zero measured consumers and a spelling upstream is\n// removing. `Gesture.Pan()` and `usePanGesture()` are the two spellings that\n// exist here, which is one more than upstream is keeping.\n//\n// The message each throws names itself, so an app on the old API is told which\n// symbol to migrate rather than left with a missing export.\nexport const FlingGestureHandler: any = unsupported(\"FlingGestureHandler\")\nexport const ForceTouchGestureHandler: any = unsupported(\n \"ForceTouchGestureHandler\",\n)\nexport const LongPressGestureHandler: any = unsupported(\n \"LongPressGestureHandler\",\n)\nexport const NativeViewGestureHandler: any = unsupported(\n \"NativeViewGestureHandler\",\n)\nexport const PanGestureHandler: any = unsupported(\"PanGestureHandler\")\nexport const PinchGestureHandler: any = unsupported(\"PinchGestureHandler\")\nexport const RotationGestureHandler: any = unsupported(\"RotationGestureHandler\")\nexport const TapGestureHandler: any = unsupported(\"TapGestureHandler\")\n// `createNativeWrapper(Component, config)` attaches a `NativeViewGestureHandler`\n// to an arbitrary RN component. On this platform the responder system IS the\n// arbitration that wrapper registers with, every component this package ships\n// already speaks it, and `Gesture.Native()` is how a gesture is declared over\n// one explicitly — so the wrapper has nothing to add and would be a no-op\n// dressed as a feature. The re-exported ScrollView/FlatList/Touchables below\n// are that reasoning applied to the components upstream wraps itself.\nexport const legacy_createNativeWrapper: any = unsupported(\n \"legacy_createNativeWrapper\",\n)\n\n// --- the new (v3) gesture API ---\n// `Gesture`, `GestureDetector`, `GestureStateManager`, the nine gesture hooks\n// and the three composer hooks are re-exported at the top of this file.\n// `Gesture` is a real namespace and none of its statics throws any more.\n//\n// `GestureStateManager` used to be refused here, for a global tag→handler\n// registry this platform deliberately did not keep — identity was the\n// mounted detector, and ./relations resolved an app's gesture object to a\n// tag lazily precisely so nothing had to be looked up in a process-wide map.\n// Reversed 2026-08-05: react-native-sortables' real v3 gesture-handler\n// adapter calls the standalone `GestureStateManager.activate(handlerTag)`\n// from its own `onTouchesMove`, on every ordinary drag, reading only the\n// numeric tag off the event — no lazy path was available to it. ./tag-registry\n// is the registry that reversal needed; ./gesture-state-manager is the export\n// built on it. Full account: docs/api.md, docs/research/upstream-libraries.md\n// (\"Wall 4, confirmed\").\n//\n// The three below stay refused, for three different reasons, none of them\n// \"not got round to it\":\n//\n// - `GestureDetectorType` is a TYPE upstream, not a value. It only ever\n// appears in a type position, where this module is not in the path at all\n// (the alias is a BUNDLER alias; `tsc` resolves the real package's types\n// from node_modules — see the note at the top of this file). A runtime\n// value under that name could only be reached by code that has already\n// gone wrong;\n// - `InterceptingGestureDetector` intercepts events destined for views\n// BELOW it, which on this platform would mean claiming a GTK sequence\n// before deciding — and `CLAIMED` is irrevocable here, so the \"intercept,\n// look, maybe give it back\" shape is not expressible;\n// - `VirtualGestureDetector` drives a gesture with no view at all. The tag\n// registry above answers \"which recognizer does this number mean\", not\n// \"mint a recognizer with nothing to measure, no bounds and no widget to\n// attach a controller to\" — every recognizer here is still built by a\n// mounted `GestureDetector` wrapping exactly one child, and giving it none\n// is a structural feature this reversal did not add.\nexport const GestureDetectorType: any = unsupported(\"GestureDetectorType\")\nexport const InterceptingGestureDetector: any = unsupported(\n \"InterceptingGestureDetector\",\n)\nexport const VirtualGestureDetector: any = unsupported(\"VirtualGestureDetector\")\n\n// --- enums and constants ---\n//\n// ALL FIVE ARE NOW DATA, and the last four changed here. The old rule was that\n// an enum is only meaningful next to a handler that can run, so reading one\n// was already a symptom — and that rule was right when six of the ten\n// recognizers threw. It stopped describing anything true when the last four\n// shipped, and the honest test is now the plain one: does an app comparing\n// against this constant get a correct answer? For every one of these, yes.\n//\n// `State` went first, in slice 2, and the reasoning generalises to the rest:\n// every payload carries a faithful `state`, so `=== State.ACTIVE` is ordinary\n// correct code. `react-native-drawer-layout` does exactly that — it re-exports\n// it as `GestureState`, seeds a shared value with `GestureState.UNDETERMINED`\n// and tests `=== GestureState.ACTIVE`.\n//\n// `Directions` is REQUIRED rather than merely harmless: `Gesture.Fling()`\n// takes a direction and this is the enum it takes. A refusal here would make\n// the recognizer unusable in its documented spelling.\n//\n// `PointerType` became meaningful with `ForceTouch`, which is the first kind\n// whose events are honestly not a mouse — every payload carries `pointerType`,\n// and a stylus one says `STYLUS`.\n//\n// `HoverEffect` and `MouseButton` are INERT and exported anyway, which is the\n// one place this file's rule bends. Both name values for knobs that are\n// already accepted-and-inert here (`.effect()`, `.mouseButton()`) exactly as\n// they are inert off their platforms upstream, and a knob that accepts a\n// number while refusing the constant that number has a name for is incoherent.\n// The refusal that matters is for something that would silently NOT WORK;\n// these do exactly what they do upstream on this platform, which is nothing.\n//\n// Every number in all five is pinned by a test against 3.1.0's own sources,\n// because nothing about a wrong one is loud: `state === State.ACTIVE` and\n// `direction === Directions.LEFT` both go on compiling, go on running, and\n// quietly answer false.\nexport const State = GESTURE_STATE\nexport const Directions = DIRECTIONS\nexport const HoverEffect = HOVER_EFFECT\nexport const MouseButton = MOUSE_BUTTON\nexport const PointerType = POINTER_TYPE\n\n// --- the wrapped RN components and buttons ---\n//\n// Upstream builds every one of these with `createNativeWrapper(RN.X, {\n// disallowInterruption: true, shouldCancelWhenOutside: false })` — an RN\n// component with a `NativeViewGestureHandler` attached, so that RNGH's\n// arbitration knows about the native scrolling or the native press underneath.\n// On this platform that wrapper has nothing to add: the responder system IS\n// the arbitration these are being registered with, every one of these\n// components already speaks it, and `Gesture.Native()` is how a gesture is\n// declared over one of them explicitly. So the honest re-export is the\n// platform's own component, unwrapped.\n//\n// They are here because they are RENDERED, not merely imported.\n// `react-native-draggable-flatlist` 4.0.3 hands `FlatList` and `ScrollView` to\n// `Animated.createAnimatedComponent()` at module scope in\n// `DraggableFlatList.tsx` and `NestableScrollContainer.tsx`, which is what\n// stopped that library at IMPORT rather than at use;\n// `react-native-reanimated-dnd`'s `Sortable`/`SortableGrid` do the same;\n// `@gorhom/bottom-sheet` re-exports the three Touchables from its own public\n// entry as `BottomSheetTouchable` on every platform except iOS, and renders\n// `TextInput` as `BottomSheetTextInput`.\n//\n// WHAT IS NOT HERE, and the boundary is upstream's own: the BUTTON family\n// (`RawButton`, `BaseButton`, `RectButton`, `BorderlessButton`) is not RN\n// components with a handler attached — it is RNGH's own NATIVE BUTTON VIEWS,\n// implemented in Java and Objective-C, with an Android ripple\n// (`TouchableNativeFeedback`'s), `borderless` drawable selection, `rippleColor`\n// / `rippleRadius`, `exclusive`, and an `activeOpacity` applied by the native\n// view rather than by style. There is no GTK widget with those semantics and\n// no way to fake the ripple, so any implementation would be a `Pressable`\n// wearing the name of something else — which is precisely the silent\n// substitution this whole surface refuses.\n//\n// RE-CHECKED WITH THE FOUR TARGET LIBRARIES rather than assumed, because that\n// is what settled the `Touchable` question in slice 4. Sweeping the shipped\n// sources of `@gorhom/bottom-sheet` 5.2.14, `react-native-draggable-flatlist`\n// 4.0.3, `react-native-drawer-layout` 4.2.9 and `react-native-reanimated-dnd`\n// 2.0.0 for every symbol still refused here finds exactly one hit —\n// `RefreshControl` in `@gorhom/bottom-sheet` — and it is not this package's:\n// it is imported from `react-native`, as a type in `bottomSheetRefreshControl/\n// index.ts` and as a value only in `BottomSheetRefreshControl.android.tsx`,\n// which Metro on this platform never resolves (`.linux.* -> .native.* -> .*`).\n// Nothing reaches for a button, a legacy handler component, `Directions`,\n// `MouseButton`, `PointerType`, `GestureStateManager` or any `Legacy*` alias.\n// The `Touchable` subset slice 4 shipped remains the only thing upstream's own\n// exports forced.\n//\n// `TouchableNativeFeedback` is Android's ripple by another name and `Touchable`\n// is RN's deprecated mixin; both stay refused for the reason RN itself would\n// not give them to you here. `RefreshControl` is pull-to-refresh, which needs\n// a scroll gesture this platform's `ScrollView` does not expose and a spinner\n// widget it does not have — and, per the sweep above, nothing asks for it.\nexport const BaseButton: any = unsupported(\"BaseButton\")\nexport const BorderlessButton: any = unsupported(\"BorderlessButton\")\nexport { FlatList } from \"../components/flat-list\"\nexport {\n Pressable,\n TouchableHighlight,\n TouchableOpacity,\n TouchableWithoutFeedback,\n} from \"../components/pressable\"\nexport { ScrollView } from \"../components/scroll-view\"\nexport { Switch } from \"../components/switch\"\nexport { TextInput } from \"../components/text-input\"\nexport const RawButton: any = unsupported(\"RawButton\")\nexport const RectButton: any = unsupported(\"RectButton\")\nexport const RefreshControl: any = unsupported(\"RefreshControl\")\nexport const Touchable: any = unsupported(\"Touchable\")\nexport const TouchableNativeFeedback: any = unsupported(\n \"TouchableNativeFeedback\",\n)\n\n// --- the 2.x legacy aliases, still exported by 3.x ---\n//\n// ALL TWELVE STAY REFUSED, for one reason that covers them: each is 3.x's\n// escape hatch back to the 2.x implementation of a component whose 3.x\n// spelling is either implemented here already (`LegacyScrollView`,\n// `LegacyFlatList`, `LegacyTextInput`, `LegacySwitch`, `LegacyPressable`,\n// `LegacyText`) or refused above with its own reason (`LegacyRawButton`,\n// `LegacyBaseButton`, `LegacyRectButton`, `LegacyBorderlessButton`,\n// `LegacyRefreshControl`). Where the modern name works, the legacy alias would\n// be a second name for the same component with a promise attached — \"this one\n// behaves like 2.x did\" — that this platform cannot keep, because it never\n// implemented 2.x's behaviour to differ from. Where the modern name is\n// refused, the alias inherits the refusal.\n//\n// `LegacyDrawerLayoutAndroid` is the odd one and is refused twice over: it is\n// Android's `DrawerLayoutAndroid`, which React Native itself does not ship off\n// Android, and `@react-navigation/drawer` reaches for\n// `react-native-drawer-layout` instead — which runs here (probe 3).\nexport const LegacyBaseButton: any = unsupported(\"LegacyBaseButton\")\nexport const LegacyBorderlessButton: any = unsupported(\"LegacyBorderlessButton\")\nexport const LegacyDrawerLayoutAndroid: any = unsupported(\n \"LegacyDrawerLayoutAndroid\",\n)\nexport const LegacyFlatList: any = unsupported(\"LegacyFlatList\")\nexport const LegacyPressable: any = unsupported(\"LegacyPressable\")\nexport const LegacyRawButton: any = unsupported(\"LegacyRawButton\")\nexport const LegacyRectButton: any = unsupported(\"LegacyRectButton\")\nexport const LegacyRefreshControl: any = unsupported(\"LegacyRefreshControl\")\nexport const LegacyScrollView: any = unsupported(\"LegacyScrollView\")\nexport const LegacySwitch: any = unsupported(\"LegacySwitch\")\nexport const LegacyText: any = unsupported(\"LegacyText\")\nexport const LegacyTextInput: any = unsupported(\"LegacyTextInput\")\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GestureResponderEvent } from "../responder/types";
|
|
2
2
|
import type { Orchestrator, Participant } from "./orchestrator";
|
|
3
|
-
import { type GestureHitSlop, type GestureKind, type RecognizerConfig } from "./types";
|
|
3
|
+
import { type GestureHitSlop, type GestureKind, type GestureStateManagerApi, type RecognizerConfig } from "./types";
|
|
4
4
|
export type Rect = {
|
|
5
5
|
x: number;
|
|
6
6
|
y: number;
|
|
@@ -256,6 +256,17 @@ export type Recognizer = {
|
|
|
256
256
|
controller: ControllerChannel | null;
|
|
257
257
|
/** This gesture's seat in the arbitration loop. */
|
|
258
258
|
participant: Participant;
|
|
259
|
+
/**
|
|
260
|
+
* The four transitions an app may drive by hand, exposed rather than kept
|
|
261
|
+
* private to the `onTouches*` closures below.
|
|
262
|
+
*
|
|
263
|
+
* Until ./tag-registry this was reachable only as the second argument
|
|
264
|
+
* `onTouchesDown`/`onTouchesMove`/`onTouchesUp`/`onTouchesCancel` receive —
|
|
265
|
+
* which is still how `Gesture.Manual()` itself works, unchanged. Putting
|
|
266
|
+
* the same object here too is what lets a numeric handler tag be turned
|
|
267
|
+
* back into it, which is the whole of what `GestureStateManager` needs.
|
|
268
|
+
*/
|
|
269
|
+
stateManager: GestureStateManagerApi;
|
|
259
270
|
/** Cancels any pending timer and leaves the loop; called on unmount. */
|
|
260
271
|
dispose: () => void;
|
|
261
272
|
};
|
|
@@ -676,11 +676,30 @@ export const createRecognizer = (handlerTag, decider, readConfig, env) => {
|
|
|
676
676
|
}
|
|
677
677
|
},
|
|
678
678
|
onTouchMove: (event) => {
|
|
679
|
+
if (runtime.state !== GESTURE_STATE.BEGAN &&
|
|
680
|
+
runtime.state !== GESTURE_STATE.ACTIVE) {
|
|
681
|
+
// A finished gesture is not tracked at all.
|
|
682
|
+
return;
|
|
683
|
+
}
|
|
684
|
+
const config = readConfig();
|
|
685
|
+
// Fires for as long as the gesture has not finished, ACTIVE included —
|
|
686
|
+
// matching `onTouchesUp`/`onTouchesCancel` below, which never gated on
|
|
687
|
+
// state either. `Gesture.Manual()` has no `onUpdate`/`onChange` channel
|
|
688
|
+
// of its own (`ManualGestureProperties` adds neither upstream), so this
|
|
689
|
+
// touch-level callback continuing past activation is the ONLY way an
|
|
690
|
+
// app driving one by hand — `react-native-sortables`' v3 gesture-handler
|
|
691
|
+
// adapter among them — can keep tracking a finger after its own
|
|
692
|
+
// `GestureStateManager.activate()` call. Skipping it once ACTIVE looked
|
|
693
|
+
// harmless for `Pan`/`Tap` (they have `onUpdate` for that), and quietly
|
|
694
|
+
// froze every `Manual` drag at the position it activated at instead —
|
|
695
|
+
// confirmed by instrumenting a real drag in the built gallery: the
|
|
696
|
+
// active item highlighted and never moved.
|
|
697
|
+
config.onTouchesMove?.(touchEventOf(event, TOUCH_EVENT_TYPE.TOUCHES_MOVE), stateManager);
|
|
679
698
|
if (runtime.state === GESTURE_STATE.ACTIVE) {
|
|
680
699
|
// A gesture that does not hold the lock has no `onResponderMove`
|
|
681
|
-
// coming, so this is where its updates live. One that
|
|
682
|
-
// from there instead, and emitting here as well would
|
|
683
|
-
// update it reports.
|
|
700
|
+
// coming, so this is where its continuous updates live. One that
|
|
701
|
+
// does is driven from there instead, and emitting here as well would
|
|
702
|
+
// double every update it reports.
|
|
684
703
|
//
|
|
685
704
|
// Two kinds of gesture end up here and the flag covers both: one that
|
|
686
705
|
// never takes the lock (`claimsResponder: false`), and one that would
|
|
@@ -692,13 +711,7 @@ export const createRecognizer = (handlerTag, decider, readConfig, env) => {
|
|
|
692
711
|
}
|
|
693
712
|
return;
|
|
694
713
|
}
|
|
695
|
-
if (runtime.state !== GESTURE_STATE.BEGAN) {
|
|
696
|
-
// A finished gesture is not tracked at all.
|
|
697
|
-
return;
|
|
698
|
-
}
|
|
699
714
|
track(event);
|
|
700
|
-
const config = readConfig();
|
|
701
|
-
config.onTouchesMove?.(touchEventOf(event, TOUCH_EVENT_TYPE.TOUCHES_MOVE), stateManager);
|
|
702
715
|
const view = viewOf();
|
|
703
716
|
// Failure is tested before activation, and the comparisons differ —
|
|
704
717
|
// failure is strict, activation is not — so a translation sitting
|
|
@@ -1046,6 +1059,7 @@ export const createRecognizer = (handlerTag, decider, readConfig, env) => {
|
|
|
1046
1059
|
handlers: drivenByController ? {} : handlers,
|
|
1047
1060
|
controller: drivenByController ? controller : null,
|
|
1048
1061
|
participant,
|
|
1062
|
+
stateManager,
|
|
1049
1063
|
dispose: () => {
|
|
1050
1064
|
clearActivationTimer();
|
|
1051
1065
|
clearDelayTimer();
|