@react-native-oh-tpl/react-native-gesture-handler 2.12.6-1 → 2.12.6-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.
Files changed (79) hide show
  1. package/harmony/gesture_handler/LICENSE +21 -0
  2. package/harmony/gesture_handler/OAT.xml +44 -0
  3. package/harmony/gesture_handler/README.OpenSource +11 -0
  4. package/harmony/gesture_handler/README.md +1 -0
  5. package/harmony/gesture_handler/build-profile.json5 +7 -7
  6. package/harmony/gesture_handler/hvigorfile.ts +2 -2
  7. package/harmony/gesture_handler/index.ets +2 -2
  8. package/harmony/gesture_handler/oh-package.json5 +13 -11
  9. package/harmony/gesture_handler/src/main/cpp/CMakeLists.txt +8 -8
  10. package/harmony/gesture_handler/src/main/cpp/GestureHandlerPackage.cpp +33 -33
  11. package/harmony/gesture_handler/src/main/cpp/GestureHandlerPackage.h +14 -14
  12. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerButtonComponentDescriptor.h +60 -60
  13. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerModule.cpp +17 -17
  14. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerModule.h +11 -11
  15. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerRootViewComponentDescriptor.h +60 -60
  16. package/harmony/gesture_handler/src/main/ets/CircularBuffer.ts +42 -42
  17. package/harmony/gesture_handler/src/main/ets/Event.ts +67 -67
  18. package/harmony/gesture_handler/src/main/ets/EventDispatcher.ts +37 -37
  19. package/harmony/gesture_handler/src/main/ets/GestureHandler.ts +663 -663
  20. package/harmony/gesture_handler/src/main/ets/GestureHandlerArkUIAdapter.ets +201 -201
  21. package/harmony/gesture_handler/src/main/ets/GestureHandlerFactory.ts +44 -44
  22. package/harmony/gesture_handler/src/main/ets/GestureHandlerOrchestrator.ts +280 -280
  23. package/harmony/gesture_handler/src/main/ets/GestureHandlerPackage.ts +22 -22
  24. package/harmony/gesture_handler/src/main/ets/GestureHandlerRegistry.ts +27 -27
  25. package/harmony/gesture_handler/src/main/ets/InteractionManager.ts +108 -108
  26. package/harmony/gesture_handler/src/main/ets/LeastSquareSolver.ts +182 -182
  27. package/harmony/gesture_handler/src/main/ets/NativeViewGestureHandler.ts +114 -114
  28. package/harmony/gesture_handler/src/main/ets/OutgoingEvent.ts +33 -33
  29. package/harmony/gesture_handler/src/main/ets/PanGestureHandler.ts +327 -327
  30. package/harmony/gesture_handler/src/main/ets/PointerTracker.ts +239 -239
  31. package/harmony/gesture_handler/src/main/ets/RNGHError.ts +4 -4
  32. package/harmony/gesture_handler/src/main/ets/RNGHLogger.ts +28 -28
  33. package/harmony/gesture_handler/src/main/ets/RNGHRootTouchHandler.ets +57 -57
  34. package/harmony/gesture_handler/src/main/ets/RNGestureHandlerButton.ets +36 -36
  35. package/harmony/gesture_handler/src/main/ets/RNGestureHandlerModule.ts +125 -125
  36. package/harmony/gesture_handler/src/main/ets/RNGestureHandlerRootView.ets +56 -55
  37. package/harmony/gesture_handler/src/main/ets/RNOHScrollLocker.ts +10 -10
  38. package/harmony/gesture_handler/src/main/ets/State.ts +46 -46
  39. package/harmony/gesture_handler/src/main/ets/TapGestureHandler.ts +205 -205
  40. package/harmony/gesture_handler/src/main/ets/Vector2D.ts +36 -36
  41. package/harmony/gesture_handler/src/main/ets/VelocityTracker.ts +98 -98
  42. package/harmony/gesture_handler/src/main/ets/View.ts +70 -70
  43. package/harmony/gesture_handler/src/main/ets/ViewRegistry.ts +42 -42
  44. package/harmony/gesture_handler/src/main/ets/pages/Index.ets +16 -16
  45. package/harmony/gesture_handler/src/main/ets/webviewability/WebviewAbility.ts +41 -41
  46. package/harmony/gesture_handler/src/main/module.json5 +6 -6
  47. package/harmony/gesture_handler/src/main/resources/base/element/color.json +7 -7
  48. package/harmony/gesture_handler/src/main/resources/base/element/string.json +15 -15
  49. package/harmony/gesture_handler/src/main/resources/base/profile/main_pages.json +5 -5
  50. package/harmony/gesture_handler/src/main/resources/en_US/element/string.json +15 -15
  51. package/harmony/gesture_handler/src/main/resources/zh_CN/element/string.json +15 -15
  52. package/harmony/gesture_handler.har +0 -0
  53. package/lib/commonjs/components/touchables/GenericTouchable.js +9 -9
  54. package/lib/commonjs/components/touchables/TouchableOpacity.js +2 -2
  55. package/lib/commonjs/handlers/createNativeWrapper.js +6 -6
  56. package/lib/commonjs/handlers/gestures/GestureDetector.js +3 -3
  57. package/lib/module/components/touchables/GenericTouchable.js +9 -9
  58. package/lib/module/components/touchables/TouchableOpacity.js +2 -2
  59. package/lib/module/handlers/createNativeWrapper.js +6 -6
  60. package/lib/module/handlers/gestures/GestureDetector.js +3 -3
  61. package/package.json +70 -70
  62. package/src/RNGestureHandlerModule.ts +6 -6
  63. package/src/components/GestureButtons.tsx +334 -334
  64. package/src/components/GestureHandlerButton.tsx +5 -5
  65. package/src/components/GestureHandlerRootView.tsx +34 -34
  66. package/src/components/RNGestureHandlerButton.tsx +23 -23
  67. package/src/components/touchables/GenericTouchable.tsx +301 -301
  68. package/src/components/touchables/TouchableOpacity.tsx +76 -76
  69. package/src/components/touchables/TouchableWithoutFeedback.tsx +14 -14
  70. package/src/components/touchables/index.ts +7 -7
  71. package/src/handlers/NativeViewGestureHandler.ts +55 -55
  72. package/src/handlers/PanGestureHandler.ts +327 -327
  73. package/src/handlers/TapGestureHandler.ts +95 -95
  74. package/src/handlers/createHandler.tsx +535 -535
  75. package/src/handlers/createNativeWrapper.tsx +81 -81
  76. package/src/handlers/gestureHandlerCommon.ts +15 -15
  77. package/src/handlers/gestures/GestureDetector.tsx +823 -823
  78. package/src/index.ts +172 -172
  79. package/src/init.ts +18 -18
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 './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 './handlers/TapGestureHandler';
60
- // export { ForceTouchGestureHandler } from './handlers/ForceTouchGestureHandler';
61
- // export { LongPressGestureHandler } from './handlers/LongPressGestureHandler';
62
- export { PanGestureHandler } from './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 './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 './components/touchables';
109
- // export {
110
- // ScrollView,
111
- // Switch,
112
- // TextInput,
113
- // DrawerLayoutAndroid,
114
- // FlatList,
115
- // RefreshControl,
116
- // } from './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 './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 './handlers/TapGestureHandler';
60
+ // export { ForceTouchGestureHandler } from './handlers/ForceTouchGestureHandler';
61
+ // export { LongPressGestureHandler } from './handlers/LongPressGestureHandler';
62
+ export { PanGestureHandler } from './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 './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 './components/touchables';
109
+ // export {
110
+ // ScrollView,
111
+ // Switch,
112
+ // TextInput,
113
+ // DrawerLayoutAndroid,
114
+ // FlatList,
115
+ // RefreshControl,
116
+ // } from './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();
package/src/init.ts CHANGED
@@ -1,18 +1,18 @@
1
- import { startListening } from 'react-native-gesture-handler/src/handlers/gestures/eventReceiver';
2
- import { RNGestureHandlerModule } from './RNGestureHandlerModule';
3
- import { isFabric } from 'react-native-gesture-handler/src/utils';
4
-
5
- let fabricInitialized = false;
6
-
7
- export function initialize() {
8
- startListening();
9
- }
10
-
11
- // since isFabric() may give wrong results before the first render, we call this
12
- // method during render of GestureHandlerRootView
13
- export function maybeInitializeFabric() {
14
- if (isFabric() && !fabricInitialized) {
15
- RNGestureHandlerModule.install();
16
- fabricInitialized = true;
17
- }
18
- }
1
+ import { startListening } from 'react-native-gesture-handler/src/handlers/gestures/eventReceiver';
2
+ import { RNGestureHandlerModule } from './RNGestureHandlerModule';
3
+ import { isFabric } from 'react-native-gesture-handler/src/utils';
4
+
5
+ let fabricInitialized = false;
6
+
7
+ export function initialize() {
8
+ startListening();
9
+ }
10
+
11
+ // since isFabric() may give wrong results before the first render, we call this
12
+ // method during render of GestureHandlerRootView
13
+ export function maybeInitializeFabric() {
14
+ if (isFabric() && !fabricInitialized) {
15
+ RNGestureHandlerModule.install();
16
+ fabricInitialized = true;
17
+ }
18
+ }