@react-native-oh-tpl/react-native-gesture-handler 2.12.9 → 2.14.4-1
Sign up to get free protection for your applications and to get access to all the features.
- package/DrawerLayout/index.ts +2 -0
- package/Swipeable/index.ts +2 -0
- package/harmony/gesture_handler.har +0 -0
- package/lib/commonjs/RNGestureHandlerModule.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -1
- package/lib/commonjs/handlers/createHandler.js.map +1 -1
- package/lib/commonjs/index.js +91 -137
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.js.map +1 -1
- package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -1
- package/lib/module/RNGestureHandlerModule.js.map +1 -1
- package/lib/module/components/GestureHandlerRootView.js.map +1 -1
- package/lib/module/handlers/createHandler.js.map +1 -1
- package/lib/module/index.js +10 -141
- package/lib/module/index.js.map +1 -1
- package/lib/module/specs/NativeRNGestureHandlerModule.js.map +1 -1
- package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -1
- package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -1
- package/lib/typescript/RNGestureHandlerModule.d.ts +2 -2
- package/lib/typescript/components/GestureHandlerRootView.d.ts +6 -6
- package/lib/typescript/handlers/createHandler.d.ts +11 -11
- package/lib/typescript/index.d.ts +42 -9
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts +14 -14
- package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts +14 -14
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts +6 -6
- package/package.json +69 -66
- package/src/RNGestureHandlerModule.ts +4 -4
- package/src/components/GestureHandlerRootView.tsx +23 -23
- package/src/handlers/createHandler.tsx +534 -534
- package/src/index.ts +172 -172
- package/src/specs/NativeRNGestureHandlerModule.ts +26 -26
- package/src/specs/RNGestureHandlerButtonNativeComponent.ts +18 -18
- package/src/specs/RNGestureHandlerRootViewNativeComponent.ts +6 -6
- package/harmony/gesture_handler/BuildProfile.ets +0 -5
- package/harmony/gesture_handler/build-profile.json5 +0 -19
- package/harmony/gesture_handler/hvigorfile.ts +0 -2
- package/harmony/gesture_handler/index.ets +0 -3
- package/harmony/gesture_handler/oh-package-lock.json5 +0 -17
- package/harmony/gesture_handler/oh-package.json5 +0 -12
- package/harmony/gesture_handler/src/main/cpp/CMakeLists.txt +0 -8
- package/harmony/gesture_handler/src/main/cpp/GestureHandlerPackage.cpp +0 -103
- package/harmony/gesture_handler/src/main/cpp/GestureHandlerPackage.h +0 -21
- package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerButtonComponentDescriptor.h +0 -36
- package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerButtonComponentInstance.h +0 -27
- package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerButtonJSIBinder.h +0 -32
- package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerModule.cpp +0 -22
- package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerModule.h +0 -15
- package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerPackage.h +0 -72
- package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerRootViewComponentDescriptor.h +0 -36
- package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerRootViewComponentInstance.h +0 -78
- package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerRootViewJSIBinder.h +0 -25
- package/harmony/gesture_handler/src/main/ets/CircularBuffer.ts +0 -42
- package/harmony/gesture_handler/src/main/ets/Event.ts +0 -68
- package/harmony/gesture_handler/src/main/ets/EventDispatcher.ts +0 -53
- package/harmony/gesture_handler/src/main/ets/GestureHandler.ts +0 -663
- package/harmony/gesture_handler/src/main/ets/GestureHandlerArkUIAdapter.ts +0 -203
- package/harmony/gesture_handler/src/main/ets/GestureHandlerFactory.ts +0 -45
- package/harmony/gesture_handler/src/main/ets/GestureHandlerOrchestrator.ts +0 -280
- package/harmony/gesture_handler/src/main/ets/GestureHandlerPackage.ts +0 -22
- package/harmony/gesture_handler/src/main/ets/GestureHandlerRegistry.ts +0 -28
- package/harmony/gesture_handler/src/main/ets/InteractionManager.ts +0 -109
- package/harmony/gesture_handler/src/main/ets/LeastSquareSolver.ts +0 -182
- package/harmony/gesture_handler/src/main/ets/NativeViewGestureHandler.ts +0 -115
- package/harmony/gesture_handler/src/main/ets/OutgoingEvent.ts +0 -34
- package/harmony/gesture_handler/src/main/ets/PanGestureHandler.ts +0 -328
- package/harmony/gesture_handler/src/main/ets/PointerTracker.ts +0 -239
- package/harmony/gesture_handler/src/main/ets/RNGHError.ts +0 -5
- package/harmony/gesture_handler/src/main/ets/RNGHLogger.ts +0 -48
- package/harmony/gesture_handler/src/main/ets/RNGHRootTouchHandlerArkTS.ts +0 -60
- package/harmony/gesture_handler/src/main/ets/RNGHRootTouchHandlerCAPI.ts +0 -87
- package/harmony/gesture_handler/src/main/ets/RNGestureHandlerButton.ets +0 -38
- package/harmony/gesture_handler/src/main/ets/RNGestureHandlerModule.ts +0 -183
- package/harmony/gesture_handler/src/main/ets/RNGestureHandlerRootView.ets +0 -53
- package/harmony/gesture_handler/src/main/ets/RNOHScrollLocker.ts +0 -23
- package/harmony/gesture_handler/src/main/ets/State.ts +0 -47
- package/harmony/gesture_handler/src/main/ets/TapGestureHandler.ts +0 -206
- package/harmony/gesture_handler/src/main/ets/Vector2D.ts +0 -36
- package/harmony/gesture_handler/src/main/ets/VelocityTracker.ts +0 -98
- package/harmony/gesture_handler/src/main/ets/View.ts +0 -71
- package/harmony/gesture_handler/src/main/ets/ViewRegistry.ts +0 -43
- package/harmony/gesture_handler/src/main/ets/namespace/RNGestureHandlerButton.ts +0 -140
- package/harmony/gesture_handler/src/main/ets/namespace/RNGestureHandlerModule.ts +0 -25
- package/harmony/gesture_handler/src/main/ets/namespace/RNGestureHandlerRootView.ts +0 -101
- package/harmony/gesture_handler/src/main/ets/namespace/ts.ts +0 -3
- package/harmony/gesture_handler/src/main/ets/pages/Index.ets +0 -17
- package/harmony/gesture_handler/src/main/ets/types.ts +0 -25
- package/harmony/gesture_handler/src/main/ets/webviewability/WebviewAbility.ts +0 -41
- package/harmony/gesture_handler/src/main/module.json5 +0 -7
- package/harmony/gesture_handler/src/main/resources/base/element/color.json +0 -8
- package/harmony/gesture_handler/src/main/resources/base/element/string.json +0 -16
- package/harmony/gesture_handler/src/main/resources/base/media/icon.png +0 -0
- package/harmony/gesture_handler/src/main/resources/base/profile/main_pages.json +0 -5
- package/harmony/gesture_handler/src/main/resources/en_US/element/string.json +0 -16
- package/harmony/gesture_handler/src/main/resources/zh_CN/element/string.json +0 -16
- package/harmony/gesture_handler/ts.ts +0 -2
package/src/index.ts
CHANGED
@@ -1,172 +1,172 @@
|
|
1
|
-
declare const global: {
|
2
|
-
isFormsStackingContext: (node: unknown) => boolean | null; // JSI function
|
3
|
-
};
|
4
|
-
|
5
|
-
global.isFormsStackingContext = () => true; // TODO: add using JSI
|
6
|
-
|
7
|
-
import { initialize } from 'react-native-gesture-handler/src/init';
|
8
|
-
|
9
|
-
|
10
|
-
export { State } from 'react-native-gesture-handler/src/State';
|
11
|
-
|
12
|
-
export { default as GestureHandlerRootView } from './components/GestureHandlerRootView';
|
13
|
-
|
14
|
-
//
|
15
|
-
|
16
|
-
|
17
|
-
//
|
18
|
-
|
19
|
-
|
20
|
-
//
|
21
|
-
|
22
|
-
|
23
|
-
//
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
export type { GestureType } from 'react-native-gesture-handler/src/handlers/gestures/gesture';
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
export { TapGestureHandler } from 'react-native-gesture-handler/src/handlers/TapGestureHandler';
|
60
|
-
// export { ForceTouchGestureHandler } from './handlers/ForceTouchGestureHandler';
|
61
|
-
// export { LongPressGestureHandler } from './handlers/LongPressGestureHandler';
|
62
|
-
export { PanGestureHandler } from 'react-native-gesture-handler/src/handlers/PanGestureHandler';
|
63
|
-
// export { PinchGestureHandler } from './handlers/PinchGestureHandler';
|
64
|
-
// export { RotationGestureHandler } from './handlers/RotationGestureHandler';
|
65
|
-
// export { FlingGestureHandler } from './handlers/FlingGestureHandler';
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
export { GestureDetector } from 'react-native-gesture-handler/src/handlers/gestures/GestureDetector';
|
72
|
-
export { GestureObjects as Gesture } from 'react-native-gesture-handler/src/handlers/gestures/gestureObjects';
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
// export { NativeViewGestureHandler } from './handlers/NativeViewGestureHandler';
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
export {
|
104
|
-
|
105
|
-
|
106
|
-
TouchableOpacity,
|
107
|
-
TouchableWithoutFeedback,
|
108
|
-
} from 'react-native-gesture-handler/src/components/touchables';
|
109
|
-
export {
|
110
|
-
ScrollView,
|
111
|
-
Switch,
|
112
|
-
TextInput,
|
113
|
-
DrawerLayoutAndroid,
|
114
|
-
FlatList,
|
115
|
-
RefreshControl,
|
116
|
-
} from 'react-native-gesture-handler/src/components/GestureComponents';
|
117
|
-
|
118
|
-
//
|
119
|
-
|
120
|
-
|
121
|
-
//
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
//
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
//
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
initialize();
|
1
|
+
declare const global: {
|
2
|
+
isFormsStackingContext: (node: unknown) => boolean | null; // JSI function
|
3
|
+
};
|
4
|
+
|
5
|
+
global.isFormsStackingContext = () => true; // TODO: add using JSI
|
6
|
+
|
7
|
+
import { initialize } from 'react-native-gesture-handler/src/init';
|
8
|
+
|
9
|
+
export { Directions } from 'react-native-gesture-handler/src/Directions';
|
10
|
+
export { State } from 'react-native-gesture-handler/src/State';
|
11
|
+
export { default as gestureHandlerRootHOC } from 'react-native-gesture-handler/src/components/gestureHandlerRootHOC';
|
12
|
+
export { default as GestureHandlerRootView } from './components/GestureHandlerRootView';
|
13
|
+
export type {
|
14
|
+
// event types
|
15
|
+
GestureEvent,
|
16
|
+
HandlerStateChangeEvent,
|
17
|
+
// event payloads types
|
18
|
+
GestureEventPayload,
|
19
|
+
HandlerStateChangeEventPayload,
|
20
|
+
// pointer events
|
21
|
+
GestureTouchEvent,
|
22
|
+
TouchData,
|
23
|
+
// new api event types
|
24
|
+
GestureUpdateEvent,
|
25
|
+
GestureStateChangeEvent,
|
26
|
+
} from 'react-native-gesture-handler/src/handlers/gestureHandlerCommon';
|
27
|
+
export type { GestureType } from 'react-native-gesture-handler/src/handlers/gestures/gesture';
|
28
|
+
export type {
|
29
|
+
TapGestureHandlerEventPayload,
|
30
|
+
TapGestureHandlerProps,
|
31
|
+
} from 'react-native-gesture-handler/src/handlers/TapGestureHandler';
|
32
|
+
export type {
|
33
|
+
ForceTouchGestureHandlerEventPayload,
|
34
|
+
ForceTouchGestureHandlerProps,
|
35
|
+
} from 'react-native-gesture-handler/src/handlers/ForceTouchGestureHandler';
|
36
|
+
export type { ForceTouchGestureChangeEventPayload } from 'react-native-gesture-handler/src/handlers/gestures/forceTouchGesture';
|
37
|
+
export type {
|
38
|
+
LongPressGestureHandlerEventPayload,
|
39
|
+
LongPressGestureHandlerProps,
|
40
|
+
} from 'react-native-gesture-handler/src/handlers/LongPressGestureHandler';
|
41
|
+
export type {
|
42
|
+
PanGestureHandlerEventPayload,
|
43
|
+
PanGestureHandlerProps,
|
44
|
+
} from 'react-native-gesture-handler/src/handlers/PanGestureHandler';
|
45
|
+
export type { PanGestureChangeEventPayload } from 'react-native-gesture-handler/src/handlers/gestures/panGesture';
|
46
|
+
export type {
|
47
|
+
PinchGestureHandlerEventPayload,
|
48
|
+
PinchGestureHandlerProps,
|
49
|
+
} from 'react-native-gesture-handler/src/handlers/PinchGestureHandler';
|
50
|
+
export type { PinchGestureChangeEventPayload } from 'react-native-gesture-handler/src/handlers/gestures/pinchGesture';
|
51
|
+
export type {
|
52
|
+
RotationGestureHandlerEventPayload,
|
53
|
+
RotationGestureHandlerProps,
|
54
|
+
} from 'react-native-gesture-handler/src/handlers/RotationGestureHandler';
|
55
|
+
export type {
|
56
|
+
FlingGestureHandlerEventPayload,
|
57
|
+
FlingGestureHandlerProps,
|
58
|
+
} from 'react-native-gesture-handler/src/handlers/FlingGestureHandler';
|
59
|
+
export { TapGestureHandler } from 'react-native-gesture-handler/src/handlers/TapGestureHandler';
|
60
|
+
// export { ForceTouchGestureHandler } from './handlers/ForceTouchGestureHandler';
|
61
|
+
// export { LongPressGestureHandler } from './handlers/LongPressGestureHandler';
|
62
|
+
export { PanGestureHandler } from 'react-native-gesture-handler/src/handlers/PanGestureHandler';
|
63
|
+
// export { PinchGestureHandler } from './handlers/PinchGestureHandler';
|
64
|
+
// export { RotationGestureHandler } from './handlers/RotationGestureHandler';
|
65
|
+
// export { FlingGestureHandler } from './handlers/FlingGestureHandler';
|
66
|
+
export { default as createNativeWrapper } from 'react-native-gesture-handler/src/handlers/createNativeWrapper';
|
67
|
+
export type {
|
68
|
+
NativeViewGestureHandlerPayload,
|
69
|
+
NativeViewGestureHandlerProps,
|
70
|
+
} from 'react-native-gesture-handler/src/handlers/NativeViewGestureHandler';
|
71
|
+
export { GestureDetector } from 'react-native-gesture-handler/src/handlers/gestures/GestureDetector';
|
72
|
+
export { GestureObjects as Gesture } from 'react-native-gesture-handler/src/handlers/gestures/gestureObjects';
|
73
|
+
export type { TapGestureType as TapGesture } from 'react-native-gesture-handler/src/handlers/gestures/tapGesture';
|
74
|
+
export type { PanGestureType as PanGesture } from 'react-native-gesture-handler/src/handlers/gestures/panGesture';
|
75
|
+
export type { FlingGestureType as FlingGesture } from 'react-native-gesture-handler/src/handlers/gestures/flingGesture';
|
76
|
+
export type { LongPressGestureType as LongPressGesture } from 'react-native-gesture-handler/src/handlers/gestures/longPressGesture';
|
77
|
+
export type { PinchGestureType as PinchGesture } from 'react-native-gesture-handler/src/handlers/gestures/pinchGesture';
|
78
|
+
export type { RotationGestureType as RotationGesture } from 'react-native-gesture-handler/src/handlers/gestures/rotationGesture';
|
79
|
+
export type { ForceTouchGestureType as ForceTouchGesture } from 'react-native-gesture-handler/src/handlers/gestures/forceTouchGesture';
|
80
|
+
export type { NativeGestureType as NativeGesture } from 'react-native-gesture-handler/src/handlers/gestures/nativeGesture';
|
81
|
+
export type { ManualGestureType as ManualGesture } from 'react-native-gesture-handler/src/handlers/gestures/manualGesture';
|
82
|
+
export type {
|
83
|
+
ComposedGestureType as ComposedGesture,
|
84
|
+
RaceGestureType as RaceGesture,
|
85
|
+
SimultaneousGestureType as SimultaneousGesture,
|
86
|
+
ExclusiveGestureType as ExclusiveGesture,
|
87
|
+
} from 'react-native-gesture-handler/src/handlers/gestures/gestureComposition';
|
88
|
+
export type { GestureStateManagerType as GestureStateManager } from 'react-native-gesture-handler/src/handlers/gestures/gestureStateManager';
|
89
|
+
// export { NativeViewGestureHandler } from './handlers/NativeViewGestureHandler';
|
90
|
+
export type {
|
91
|
+
RawButtonProps,
|
92
|
+
BaseButtonProps,
|
93
|
+
RectButtonProps,
|
94
|
+
BorderlessButtonProps,
|
95
|
+
} from 'react-native-gesture-handler/src/components/GestureButtons';
|
96
|
+
export {
|
97
|
+
RawButton,
|
98
|
+
BaseButton,
|
99
|
+
RectButton,
|
100
|
+
BorderlessButton,
|
101
|
+
PureNativeButton,
|
102
|
+
} from 'react-native-gesture-handler/src/components/GestureButtons';
|
103
|
+
export {
|
104
|
+
TouchableHighlight,
|
105
|
+
TouchableNativeFeedback,
|
106
|
+
TouchableOpacity,
|
107
|
+
TouchableWithoutFeedback,
|
108
|
+
} from 'react-native-gesture-handler/src/components/touchables';
|
109
|
+
export {
|
110
|
+
ScrollView,
|
111
|
+
Switch,
|
112
|
+
TextInput,
|
113
|
+
DrawerLayoutAndroid,
|
114
|
+
FlatList,
|
115
|
+
RefreshControl,
|
116
|
+
} from 'react-native-gesture-handler/src/components/GestureComponents';
|
117
|
+
export type {
|
118
|
+
//events
|
119
|
+
GestureHandlerGestureEvent,
|
120
|
+
GestureHandlerStateChangeEvent,
|
121
|
+
//event payloads
|
122
|
+
GestureHandlerGestureEventNativeEvent,
|
123
|
+
GestureHandlerStateChangeNativeEvent,
|
124
|
+
NativeViewGestureHandlerGestureEvent,
|
125
|
+
NativeViewGestureHandlerStateChangeEvent,
|
126
|
+
TapGestureHandlerGestureEvent,
|
127
|
+
TapGestureHandlerStateChangeEvent,
|
128
|
+
ForceTouchGestureHandlerGestureEvent,
|
129
|
+
ForceTouchGestureHandlerStateChangeEvent,
|
130
|
+
LongPressGestureHandlerGestureEvent,
|
131
|
+
LongPressGestureHandlerStateChangeEvent,
|
132
|
+
PanGestureHandlerGestureEvent,
|
133
|
+
PanGestureHandlerStateChangeEvent,
|
134
|
+
PinchGestureHandlerGestureEvent,
|
135
|
+
PinchGestureHandlerStateChangeEvent,
|
136
|
+
RotationGestureHandlerGestureEvent,
|
137
|
+
RotationGestureHandlerStateChangeEvent,
|
138
|
+
FlingGestureHandlerGestureEvent,
|
139
|
+
FlingGestureHandlerStateChangeEvent,
|
140
|
+
// handlers props
|
141
|
+
NativeViewGestureHandlerProperties,
|
142
|
+
TapGestureHandlerProperties,
|
143
|
+
LongPressGestureHandlerProperties,
|
144
|
+
PanGestureHandlerProperties,
|
145
|
+
PinchGestureHandlerProperties,
|
146
|
+
RotationGestureHandlerProperties,
|
147
|
+
FlingGestureHandlerProperties,
|
148
|
+
ForceTouchGestureHandlerProperties,
|
149
|
+
// buttons props
|
150
|
+
RawButtonProperties,
|
151
|
+
BaseButtonProperties,
|
152
|
+
RectButtonProperties,
|
153
|
+
BorderlessButtonProperties,
|
154
|
+
} from 'react-native-gesture-handler/src/handlers/gestureHandlerTypesCompat';
|
155
|
+
|
156
|
+
export { default as Swipeable } from 'react-native-gesture-handler/src/components/Swipeable';
|
157
|
+
export type {
|
158
|
+
DrawerLayoutProps,
|
159
|
+
DrawerPosition,
|
160
|
+
DrawerState,
|
161
|
+
DrawerType,
|
162
|
+
DrawerLockMode,
|
163
|
+
DrawerKeyboardDismissMode,
|
164
|
+
} from 'react-native-gesture-handler/src/components/DrawerLayout';
|
165
|
+
export { default as DrawerLayout } from 'react-native-gesture-handler/src/components/DrawerLayout';
|
166
|
+
|
167
|
+
export {
|
168
|
+
enableExperimentalWebImplementation,
|
169
|
+
enableLegacyWebImplementation,
|
170
|
+
} from 'react-native-gesture-handler/src/EnableNewWebImplementation';
|
171
|
+
|
172
|
+
initialize();
|
@@ -1,26 +1,26 @@
|
|
1
|
-
import { TurboModuleRegistry, TurboModule } from 'react-native';
|
2
|
-
import { Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
3
|
-
|
4
|
-
export interface Spec extends TurboModule {
|
5
|
-
handleSetJSResponder: (tag: Int32, blockNativeResponder: boolean) => void;
|
6
|
-
handleClearJSResponder: () => void;
|
7
|
-
createGestureHandler: (
|
8
|
-
handlerName: string,
|
9
|
-
handlerTag: Int32,
|
10
|
-
// Record<> is not supported by codegen
|
11
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
12
|
-
config: Object
|
13
|
-
) => void;
|
14
|
-
attachGestureHandler: (
|
15
|
-
handlerTag: Int32,
|
16
|
-
newView: Int32,
|
17
|
-
actionType: Int32
|
18
|
-
) => void;
|
19
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
20
|
-
updateGestureHandler: (handlerTag: Int32, newConfig: Object) => void;
|
21
|
-
dropGestureHandler: (handlerTag: Int32) => void;
|
22
|
-
install: () => boolean;
|
23
|
-
flushOperations: () => void;
|
24
|
-
}
|
25
|
-
|
26
|
-
export default TurboModuleRegistry.getEnforcing<Spec>('RNGestureHandlerModule');
|
1
|
+
import { TurboModuleRegistry, TurboModule } from 'react-native';
|
2
|
+
import { Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
3
|
+
|
4
|
+
export interface Spec extends TurboModule {
|
5
|
+
handleSetJSResponder: (tag: Int32, blockNativeResponder: boolean) => void;
|
6
|
+
handleClearJSResponder: () => void;
|
7
|
+
createGestureHandler: (
|
8
|
+
handlerName: string,
|
9
|
+
handlerTag: Int32,
|
10
|
+
// Record<> is not supported by codegen
|
11
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
12
|
+
config: Object
|
13
|
+
) => void;
|
14
|
+
attachGestureHandler: (
|
15
|
+
handlerTag: Int32,
|
16
|
+
newView: Int32,
|
17
|
+
actionType: Int32
|
18
|
+
) => void;
|
19
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
20
|
+
updateGestureHandler: (handlerTag: Int32, newConfig: Object) => void;
|
21
|
+
dropGestureHandler: (handlerTag: Int32) => void;
|
22
|
+
install: () => boolean;
|
23
|
+
flushOperations: () => void;
|
24
|
+
}
|
25
|
+
|
26
|
+
export default TurboModuleRegistry.getEnforcing<Spec>('RNGestureHandlerModule');
|
@@ -1,18 +1,18 @@
|
|
1
|
-
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
2
|
-
import type {
|
3
|
-
Int32,
|
4
|
-
WithDefault,
|
5
|
-
} from 'react-native/Libraries/Types/CodegenTypes';
|
6
|
-
import type { ViewProps, ColorValue } from 'react-native';
|
7
|
-
|
8
|
-
interface NativeProps extends ViewProps {
|
9
|
-
exclusive?: WithDefault<boolean, true>;
|
10
|
-
foreground?: boolean;
|
11
|
-
borderless?: boolean;
|
12
|
-
enabled?: WithDefault<boolean, true>;
|
13
|
-
rippleColor?: ColorValue;
|
14
|
-
rippleRadius?: Int32;
|
15
|
-
touchSoundDisabled?: WithDefault<boolean, false>;
|
16
|
-
}
|
17
|
-
|
18
|
-
export default codegenNativeComponent<NativeProps>('RNGestureHandlerButton');
|
1
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
2
|
+
import type {
|
3
|
+
Int32,
|
4
|
+
WithDefault,
|
5
|
+
} from 'react-native/Libraries/Types/CodegenTypes';
|
6
|
+
import type { ViewProps, ColorValue } from 'react-native';
|
7
|
+
|
8
|
+
interface NativeProps extends ViewProps {
|
9
|
+
exclusive?: WithDefault<boolean, true>;
|
10
|
+
foreground?: boolean;
|
11
|
+
borderless?: boolean;
|
12
|
+
enabled?: WithDefault<boolean, true>;
|
13
|
+
rippleColor?: ColorValue;
|
14
|
+
rippleRadius?: Int32;
|
15
|
+
touchSoundDisabled?: WithDefault<boolean, false>;
|
16
|
+
}
|
17
|
+
|
18
|
+
export default codegenNativeComponent<NativeProps>('RNGestureHandlerButton');
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
2
|
-
import type { ViewProps } from 'react-native';
|
3
|
-
|
4
|
-
interface NativeProps extends ViewProps {}
|
5
|
-
|
6
|
-
export default codegenNativeComponent<NativeProps>('RNGestureHandlerRootView');
|
1
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
2
|
+
import type { ViewProps } from 'react-native';
|
3
|
+
|
4
|
+
interface NativeProps extends ViewProps {}
|
5
|
+
|
6
|
+
export default codegenNativeComponent<NativeProps>('RNGestureHandlerRootView');
|
@@ -1,19 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"apiType": 'stageMode',
|
3
|
-
// "buildOption": {
|
4
|
-
// "externalNativeOptions": {
|
5
|
-
// "path": "./src/main/cpp/CMakeLists.txt",
|
6
|
-
// "arguments": "",
|
7
|
-
// "cppFlags": "",
|
8
|
-
// },
|
9
|
-
// },
|
10
|
-
"targets": [
|
11
|
-
{
|
12
|
-
"name": "default",
|
13
|
-
"runtimeOS": "HarmonyOS"
|
14
|
-
},
|
15
|
-
{
|
16
|
-
"name": "ohosTest",
|
17
|
-
}
|
18
|
-
]
|
19
|
-
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"meta": {
|
3
|
-
"stableOrder": false
|
4
|
-
},
|
5
|
-
"lockfileVersion": 3,
|
6
|
-
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
|
7
|
-
"specifiers": {
|
8
|
-
"@rnoh/react-native-openharmony@../rnoh": "@rnoh/react-native-openharmony@../rnoh"
|
9
|
-
},
|
10
|
-
"packages": {
|
11
|
-
"@rnoh/react-native-openharmony@../rnoh": {
|
12
|
-
"name": "@rnoh/react-native-openharmony",
|
13
|
-
"resolved": "../rnoh",
|
14
|
-
"registryType": "local"
|
15
|
-
}
|
16
|
-
}
|
17
|
-
}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
{
|
2
|
-
license: '',
|
3
|
-
devDependencies: {},
|
4
|
-
author: '',
|
5
|
-
name: '@react-native-oh-tpl/react-native-gesture-handler',
|
6
|
-
description: '',
|
7
|
-
main: 'index.ets',
|
8
|
-
version: '2.12.9',
|
9
|
-
dependencies: {
|
10
|
-
"@rnoh/react-native-openharmony": 'file:../rnoh',
|
11
|
-
},
|
12
|
-
}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
cmake_minimum_required(VERSION 3.13)
|
2
|
-
set(CMAKE_VERBOSE_MAKEFILE on)
|
3
|
-
|
4
|
-
file(GLOB rnoh_gesture_handler_SRC CONFIGURE_DEPENDS *.cpp)
|
5
|
-
add_library(rnoh_gesture_handler SHARED ${rnoh_gesture_handler_SRC})
|
6
|
-
target_include_directories(rnoh_gesture_handler PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
7
|
-
target_link_libraries(rnoh_gesture_handler PUBLIC rnoh)
|
8
|
-
|
@@ -1,103 +0,0 @@
|
|
1
|
-
#pragma once
|
2
|
-
#include "GestureHandlerPackage.h"
|
3
|
-
#include "RNOH/RNInstanceCAPI.h"
|
4
|
-
#include "RNGestureHandlerButtonComponentInstance.h"
|
5
|
-
#include "RNGestureHandlerRootViewComponentInstance.h"
|
6
|
-
#include "RNOH/ArkTSTurboModule.h"
|
7
|
-
#include "RNGestureHandlerModule.h"
|
8
|
-
#include "RNGestureHandlerButtonComponentDescriptor.h"
|
9
|
-
#include "RNGestureHandlerRootViewComponentDescriptor.h"
|
10
|
-
#include "RNGestureHandlerButtonJSIBinder.h"
|
11
|
-
#include "RNGestureHandlerRootViewJSIBinder.h"
|
12
|
-
|
13
|
-
using namespace rnoh;
|
14
|
-
using namespace facebook;
|
15
|
-
|
16
|
-
class GestureHandlerTurboModuleFactoryDelegate : public TurboModuleFactoryDelegate {
|
17
|
-
public:
|
18
|
-
SharedTurboModule createTurboModule(Context ctx, const std::string &name) const override {
|
19
|
-
if (name == "RNGestureHandlerModule") {
|
20
|
-
return std::make_shared<RNGestureHandlerModule>(ctx, name);
|
21
|
-
}
|
22
|
-
return nullptr;
|
23
|
-
};
|
24
|
-
};
|
25
|
-
|
26
|
-
class RNGHEventEmitRequestHandler : public EventEmitRequestHandler {
|
27
|
-
void handleEvent(EventEmitRequestHandler::Context const &ctx) override {
|
28
|
-
auto eventEmitter = ctx.shadowViewRegistry->getEventEmitter<facebook::react::ViewEventEmitter>(ctx.tag);
|
29
|
-
if (eventEmitter == nullptr) {
|
30
|
-
return;
|
31
|
-
}
|
32
|
-
if (ctx.eventName == "onGestureHandlerEvent") {
|
33
|
-
eventEmitter->dispatchEvent(ctx.eventName, ArkJS(ctx.env).getDynamic(ctx.payload));
|
34
|
-
}
|
35
|
-
}
|
36
|
-
};
|
37
|
-
|
38
|
-
class RNOHCorePackageComponentInstanceFactoryDelegate : public ComponentInstanceFactoryDelegate {
|
39
|
-
public:
|
40
|
-
using ComponentInstanceFactoryDelegate::ComponentInstanceFactoryDelegate;
|
41
|
-
|
42
|
-
ComponentInstance::Shared create(ComponentInstance::Context ctx) override {
|
43
|
-
if (ctx.componentName == "RNGestureHandlerButton") {
|
44
|
-
return std::make_shared<RNGestureHandlerButtonComponentInstance>(ctx);
|
45
|
-
} else if (ctx.componentName == "RNGestureHandlerRootView") {
|
46
|
-
return std::make_shared<RNGestureHandlerRootViewComponentInstance>(ctx);
|
47
|
-
}
|
48
|
-
return nullptr;
|
49
|
-
}
|
50
|
-
};
|
51
|
-
|
52
|
-
std::unique_ptr<TurboModuleFactoryDelegate> GestureHandlerPackage::createTurboModuleFactoryDelegate() {
|
53
|
-
return std::make_unique<GestureHandlerTurboModuleFactoryDelegate>();
|
54
|
-
}
|
55
|
-
|
56
|
-
std::vector<react::ComponentDescriptorProvider> GestureHandlerPackage::createComponentDescriptorProviders() {
|
57
|
-
return {
|
58
|
-
react::concreteComponentDescriptorProvider<react::RNGestureHandlerRootViewComponentDescriptor>(),
|
59
|
-
react::concreteComponentDescriptorProvider<react::RNGestureHandlerButtonComponentDescriptor>(),
|
60
|
-
};
|
61
|
-
}
|
62
|
-
|
63
|
-
ComponentJSIBinderByString GestureHandlerPackage::createComponentJSIBinderByName() {
|
64
|
-
return {
|
65
|
-
{"RNGestureHandlerButton", std::make_shared<RNGestureHandlerButtonJSIBinder>()},
|
66
|
-
{"RNGestureHandlerRootView", std::make_shared<RNGestureHandlerRootViewJSIBinder>()},
|
67
|
-
};
|
68
|
-
};
|
69
|
-
|
70
|
-
EventEmitRequestHandlers GestureHandlerPackage::createEventEmitRequestHandlers() {
|
71
|
-
return {
|
72
|
-
std::make_shared<RNGHEventEmitRequestHandler>(),
|
73
|
-
};
|
74
|
-
}
|
75
|
-
|
76
|
-
ComponentInstanceFactoryDelegate::Shared GestureHandlerPackage::createComponentInstanceFactoryDelegate() {
|
77
|
-
return std::make_shared<RNOHCorePackageComponentInstanceFactoryDelegate>();
|
78
|
-
}
|
79
|
-
|
80
|
-
class ScrollLockerArkTSMessageHandler : public ArkTSMessageHandler {
|
81
|
-
public:
|
82
|
-
void handleArkTSMessage(const Context &ctx) override {
|
83
|
-
if (ctx.messageName == "RNGH::SET_NATIVE_RESPONDERS_BLOCK") {
|
84
|
-
auto targetComponentInstanceTag = ctx.messagePayload["targetTag"].asDouble();
|
85
|
-
auto shouldBlock = ctx.messagePayload["shouldBlock"].asBool();
|
86
|
-
auto rnInstance = ctx.rnInstance.lock();
|
87
|
-
if (rnInstance != nullptr) {
|
88
|
-
auto rnInstanceCAPI = std::dynamic_pointer_cast<RNInstanceCAPI>(rnInstance);
|
89
|
-
if (rnInstanceCAPI != nullptr) {
|
90
|
-
auto tmpComponentInstance = rnInstanceCAPI->findComponentInstanceByTag(targetComponentInstanceTag);
|
91
|
-
while (tmpComponentInstance != nullptr) {
|
92
|
-
tmpComponentInstance->setNativeResponderBlocked(shouldBlock, "RNGH");
|
93
|
-
tmpComponentInstance = tmpComponentInstance->getParent().lock();
|
94
|
-
}
|
95
|
-
}
|
96
|
-
}
|
97
|
-
}
|
98
|
-
};
|
99
|
-
};
|
100
|
-
|
101
|
-
std::vector<ArkTSMessageHandler::Shared> GestureHandlerPackage::createArkTSMessageHandlers() {
|
102
|
-
return {std::make_shared<ScrollLockerArkTSMessageHandler>()};
|
103
|
-
}
|