@react-native-oh-tpl/react-native-gesture-handler 2.12.9 → 2.14.1

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.
Files changed (104) hide show
  1. package/DrawerLayout/index.ts +2 -0
  2. package/Swipeable/index.ts +2 -0
  3. package/harmony/gesture_handler.har +0 -0
  4. package/lib/commonjs/RNGestureHandlerModule.js +2 -3
  5. package/lib/commonjs/RNGestureHandlerModule.js.map +1 -1
  6. package/lib/commonjs/components/GestureHandlerRootView.js +3 -3
  7. package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -1
  8. package/lib/commonjs/handlers/createHandler.js +15 -18
  9. package/lib/commonjs/handlers/createHandler.js.map +1 -1
  10. package/lib/commonjs/index.js +94 -137
  11. package/lib/commonjs/index.js.map +1 -1
  12. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js +1 -2
  13. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js.map +1 -1
  14. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js +2 -3
  15. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -1
  16. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js +2 -3
  17. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -1
  18. package/lib/module/RNGestureHandlerModule.js.map +1 -1
  19. package/lib/module/components/GestureHandlerRootView.js.map +1 -1
  20. package/lib/module/handlers/createHandler.js +12 -15
  21. package/lib/module/handlers/createHandler.js.map +1 -1
  22. package/lib/module/index.js +10 -141
  23. package/lib/module/index.js.map +1 -1
  24. package/lib/module/specs/NativeRNGestureHandlerModule.js.map +1 -1
  25. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -1
  26. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -1
  27. package/lib/typescript/RNGestureHandlerModule.d.ts +2 -2
  28. package/lib/typescript/components/GestureHandlerRootView.d.ts +6 -6
  29. package/lib/typescript/handlers/createHandler.d.ts +11 -11
  30. package/lib/typescript/index.d.ts +42 -9
  31. package/lib/typescript/index.d.ts.map +1 -1
  32. package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts +14 -14
  33. package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts +14 -14
  34. package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts +6 -6
  35. package/package.json +74 -66
  36. package/src/RNGestureHandlerModule.ts +4 -4
  37. package/src/components/GestureHandlerRootView.tsx +23 -23
  38. package/src/handlers/createHandler.tsx +534 -534
  39. package/src/index.ts +172 -172
  40. package/src/specs/NativeRNGestureHandlerModule.ts +26 -26
  41. package/src/specs/RNGestureHandlerButtonNativeComponent.ts +18 -18
  42. package/src/specs/RNGestureHandlerRootViewNativeComponent.ts +6 -6
  43. package/harmony/gesture_handler/BuildProfile.ets +0 -5
  44. package/harmony/gesture_handler/build-profile.json5 +0 -19
  45. package/harmony/gesture_handler/hvigorfile.ts +0 -2
  46. package/harmony/gesture_handler/index.ets +0 -3
  47. package/harmony/gesture_handler/oh-package-lock.json5 +0 -17
  48. package/harmony/gesture_handler/oh-package.json5 +0 -12
  49. package/harmony/gesture_handler/src/main/cpp/CMakeLists.txt +0 -8
  50. package/harmony/gesture_handler/src/main/cpp/GestureHandlerPackage.cpp +0 -103
  51. package/harmony/gesture_handler/src/main/cpp/GestureHandlerPackage.h +0 -21
  52. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerButtonComponentDescriptor.h +0 -36
  53. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerButtonComponentInstance.h +0 -27
  54. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerButtonJSIBinder.h +0 -32
  55. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerModule.cpp +0 -22
  56. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerModule.h +0 -15
  57. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerPackage.h +0 -72
  58. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerRootViewComponentDescriptor.h +0 -36
  59. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerRootViewComponentInstance.h +0 -78
  60. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerRootViewJSIBinder.h +0 -25
  61. package/harmony/gesture_handler/src/main/ets/CircularBuffer.ts +0 -42
  62. package/harmony/gesture_handler/src/main/ets/Event.ts +0 -68
  63. package/harmony/gesture_handler/src/main/ets/EventDispatcher.ts +0 -53
  64. package/harmony/gesture_handler/src/main/ets/GestureHandler.ts +0 -663
  65. package/harmony/gesture_handler/src/main/ets/GestureHandlerArkUIAdapter.ts +0 -203
  66. package/harmony/gesture_handler/src/main/ets/GestureHandlerFactory.ts +0 -45
  67. package/harmony/gesture_handler/src/main/ets/GestureHandlerOrchestrator.ts +0 -280
  68. package/harmony/gesture_handler/src/main/ets/GestureHandlerPackage.ts +0 -22
  69. package/harmony/gesture_handler/src/main/ets/GestureHandlerRegistry.ts +0 -28
  70. package/harmony/gesture_handler/src/main/ets/InteractionManager.ts +0 -109
  71. package/harmony/gesture_handler/src/main/ets/LeastSquareSolver.ts +0 -182
  72. package/harmony/gesture_handler/src/main/ets/NativeViewGestureHandler.ts +0 -115
  73. package/harmony/gesture_handler/src/main/ets/OutgoingEvent.ts +0 -34
  74. package/harmony/gesture_handler/src/main/ets/PanGestureHandler.ts +0 -328
  75. package/harmony/gesture_handler/src/main/ets/PointerTracker.ts +0 -239
  76. package/harmony/gesture_handler/src/main/ets/RNGHError.ts +0 -5
  77. package/harmony/gesture_handler/src/main/ets/RNGHLogger.ts +0 -48
  78. package/harmony/gesture_handler/src/main/ets/RNGHRootTouchHandlerArkTS.ts +0 -60
  79. package/harmony/gesture_handler/src/main/ets/RNGHRootTouchHandlerCAPI.ts +0 -87
  80. package/harmony/gesture_handler/src/main/ets/RNGestureHandlerButton.ets +0 -38
  81. package/harmony/gesture_handler/src/main/ets/RNGestureHandlerModule.ts +0 -183
  82. package/harmony/gesture_handler/src/main/ets/RNGestureHandlerRootView.ets +0 -53
  83. package/harmony/gesture_handler/src/main/ets/RNOHScrollLocker.ts +0 -23
  84. package/harmony/gesture_handler/src/main/ets/State.ts +0 -47
  85. package/harmony/gesture_handler/src/main/ets/TapGestureHandler.ts +0 -206
  86. package/harmony/gesture_handler/src/main/ets/Vector2D.ts +0 -36
  87. package/harmony/gesture_handler/src/main/ets/VelocityTracker.ts +0 -98
  88. package/harmony/gesture_handler/src/main/ets/View.ts +0 -71
  89. package/harmony/gesture_handler/src/main/ets/ViewRegistry.ts +0 -43
  90. package/harmony/gesture_handler/src/main/ets/namespace/RNGestureHandlerButton.ts +0 -140
  91. package/harmony/gesture_handler/src/main/ets/namespace/RNGestureHandlerModule.ts +0 -25
  92. package/harmony/gesture_handler/src/main/ets/namespace/RNGestureHandlerRootView.ts +0 -101
  93. package/harmony/gesture_handler/src/main/ets/namespace/ts.ts +0 -3
  94. package/harmony/gesture_handler/src/main/ets/pages/Index.ets +0 -17
  95. package/harmony/gesture_handler/src/main/ets/types.ts +0 -25
  96. package/harmony/gesture_handler/src/main/ets/webviewability/WebviewAbility.ts +0 -41
  97. package/harmony/gesture_handler/src/main/module.json5 +0 -7
  98. package/harmony/gesture_handler/src/main/resources/base/element/color.json +0 -8
  99. package/harmony/gesture_handler/src/main/resources/base/element/string.json +0 -16
  100. package/harmony/gesture_handler/src/main/resources/base/media/icon.png +0 -0
  101. package/harmony/gesture_handler/src/main/resources/base/profile/main_pages.json +0 -5
  102. package/harmony/gesture_handler/src/main/resources/en_US/element/string.json +0 -16
  103. package/harmony/gesture_handler/src/main/resources/zh_CN/element/string.json +0 -16
  104. 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
- // export { Directions } from './Directions';
10
- export { State } from 'react-native-gesture-handler/src/State';
11
- // export { default as gestureHandlerRootHOC } from './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 './handlers/gestureHandlerCommon';
27
- export type { GestureType } from 'react-native-gesture-handler/src/handlers/gestures/gesture';
28
- // export type {
29
- // TapGestureHandlerEventPayload,
30
- // TapGestureHandlerProps,
31
- // } from './handlers/TapGestureHandler';
32
- // export type {
33
- // ForceTouchGestureHandlerEventPayload,
34
- // ForceTouchGestureHandlerProps,
35
- // } from './handlers/ForceTouchGestureHandler';
36
- // export type { ForceTouchGestureChangeEventPayload } from './handlers/gestures/forceTouchGesture';
37
- // export type {
38
- // LongPressGestureHandlerEventPayload,
39
- // LongPressGestureHandlerProps,
40
- // } from './handlers/LongPressGestureHandler';
41
- // export type {
42
- // PanGestureHandlerEventPayload,
43
- // PanGestureHandlerProps,
44
- // } from './handlers/PanGestureHandler';
45
- // export type { PanGestureChangeEventPayload } from './handlers/gestures/panGesture';
46
- // export type {
47
- // PinchGestureHandlerEventPayload,
48
- // PinchGestureHandlerProps,
49
- // } from './handlers/PinchGestureHandler';
50
- // export type { PinchGestureChangeEventPayload } from './handlers/gestures/pinchGesture';
51
- // export type {
52
- // RotationGestureHandlerEventPayload,
53
- // RotationGestureHandlerProps,
54
- // } from './handlers/RotationGestureHandler';
55
- // export type {
56
- // FlingGestureHandlerEventPayload,
57
- // FlingGestureHandlerProps,
58
- // } from './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 './handlers/createNativeWrapper';
67
- // export type {
68
- // NativeViewGestureHandlerPayload,
69
- // NativeViewGestureHandlerProps,
70
- // } from './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 './handlers/gestures/tapGesture';
74
- // export type { PanGestureType as PanGesture } from './handlers/gestures/panGesture';
75
- // export type { FlingGestureType as FlingGesture } from './handlers/gestures/flingGesture';
76
- // export type { LongPressGestureType as LongPressGesture } from './handlers/gestures/longPressGesture';
77
- // export type { PinchGestureType as PinchGesture } from './handlers/gestures/pinchGesture';
78
- // export type { RotationGestureType as RotationGesture } from './handlers/gestures/rotationGesture';
79
- // export type { ForceTouchGestureType as ForceTouchGesture } from './handlers/gestures/forceTouchGesture';
80
- // export type { NativeGestureType as NativeGesture } from './handlers/gestures/nativeGesture';
81
- // export type { ManualGestureType as ManualGesture } from './handlers/gestures/manualGesture';
82
- // export type {
83
- // ComposedGestureType as ComposedGesture,
84
- // RaceGestureType as RaceGesture,
85
- // SimultaneousGestureType as SimultaneousGesture,
86
- // ExclusiveGestureType as ExclusiveGesture,
87
- // } from './handlers/gestures/gestureComposition';
88
- // export type { GestureStateManagerType as GestureStateManager } from './handlers/gestures/gestureStateManager';
89
- // export { NativeViewGestureHandler } from './handlers/NativeViewGestureHandler';
90
- // export type {
91
- // RawButtonProps,
92
- // BaseButtonProps,
93
- // RectButtonProps,
94
- // BorderlessButtonProps,
95
- // } from './components/GestureButtons';
96
- // export {
97
- // RawButton,
98
- // BaseButton,
99
- // RectButton,
100
- // BorderlessButton,
101
- // PureNativeButton,
102
- // } from './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 './handlers/gestureHandlerTypesCompat';
155
-
156
- // export { default as Swipeable } from './components/Swipeable';
157
- // export type {
158
- // DrawerLayoutProps,
159
- // DrawerPosition,
160
- // DrawerState,
161
- // DrawerType,
162
- // DrawerLockMode,
163
- // DrawerKeyboardDismissMode,
164
- // } from './components/DrawerLayout';
165
- // export { default as DrawerLayout } from './components/DrawerLayout';
166
-
167
- // export {
168
- // enableExperimentalWebImplementation,
169
- // enableLegacyWebImplementation,
170
- // } from './EnableNewWebImplementation';
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,5 +0,0 @@
1
- export default class BuildProfile {
2
- static readonly HAR_VERSION = '2.12.9';
3
- static readonly BUILD_MODE_NAME = 'debug';
4
- static readonly DEBUG = true;
5
- }
@@ -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,2 +0,0 @@
1
- // Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
2
- export { harTasks } from '@ohos/hvigor-ohos-plugin';
@@ -1,3 +0,0 @@
1
- export * from "./ts"
2
- export * from "./src/main/ets/RNGestureHandlerRootView"
3
- export * from "./src/main/ets/RNGestureHandlerButton"
@@ -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
- }