@react-native-oh-tpl/react-native-gesture-handler 2.12.6-2 → 2.12.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. package/harmony/gesture_handler/BuildProfile.ets +5 -0
  2. package/harmony/gesture_handler/build-profile.json5 +13 -2
  3. package/harmony/gesture_handler/hvigorfile.ts +1 -1
  4. package/harmony/gesture_handler/index.ets +1 -1
  5. package/harmony/gesture_handler/oh-package-lock.json5 +17 -0
  6. package/harmony/gesture_handler/oh-package.json5 +10 -11
  7. package/harmony/gesture_handler/src/main/cpp/GestureHandlerPackage.cpp +75 -6
  8. package/harmony/gesture_handler/src/main/cpp/GestureHandlerPackage.h +14 -8
  9. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerButtonComponentDescriptor.h +4 -28
  10. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerButtonComponentInstance.h +27 -0
  11. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerButtonJSIBinder.h +32 -0
  12. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerModule.cpp +17 -12
  13. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerModule.h +5 -2
  14. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerPackage.h +72 -0
  15. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerRootViewComponentDescriptor.h +4 -28
  16. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerRootViewComponentInstance.h +78 -0
  17. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerRootViewJSIBinder.h +25 -0
  18. package/harmony/gesture_handler/src/main/ets/EventDispatcher.ts +16 -1
  19. package/harmony/gesture_handler/src/main/ets/GestureHandler.ts +2 -2
  20. package/harmony/gesture_handler/src/main/ets/{GestureHandlerArkUIAdapter.ets → GestureHandlerArkUIAdapter.ts} +2 -1
  21. package/harmony/gesture_handler/src/main/ets/GestureHandlerPackage.ts +2 -2
  22. package/harmony/gesture_handler/src/main/ets/OutgoingEvent.ts +5 -5
  23. package/harmony/gesture_handler/src/main/ets/RNGHLogger.ts +20 -1
  24. package/harmony/gesture_handler/src/main/ets/{RNGHRootTouchHandler.ets → RNGHRootTouchHandlerArkTS.ts} +5 -3
  25. package/harmony/gesture_handler/src/main/ets/RNGHRootTouchHandlerCAPI.ts +87 -0
  26. package/harmony/gesture_handler/src/main/ets/RNGestureHandlerButton.ets +4 -3
  27. package/harmony/gesture_handler/src/main/ets/RNGestureHandlerModule.ts +65 -7
  28. package/harmony/gesture_handler/src/main/ets/RNGestureHandlerRootView.ets +7 -11
  29. package/harmony/gesture_handler/src/main/ets/RNOHScrollLocker.ts +17 -5
  30. package/harmony/gesture_handler/src/main/ets/View.ts +1 -1
  31. package/harmony/gesture_handler/src/main/ets/ViewRegistry.ts +1 -1
  32. package/harmony/gesture_handler/src/main/ets/namespace/RNGestureHandlerButton.ts +140 -0
  33. package/harmony/gesture_handler/src/main/ets/namespace/RNGestureHandlerModule.ts +25 -0
  34. package/harmony/gesture_handler/src/main/ets/namespace/RNGestureHandlerRootView.ts +101 -0
  35. package/harmony/gesture_handler/src/main/ets/namespace/ts.ts +3 -0
  36. package/harmony/gesture_handler/src/main/ets/types.ts +25 -0
  37. package/harmony/gesture_handler/src/main/module.json5 +6 -6
  38. package/harmony/gesture_handler/ts.ts +2 -1
  39. package/harmony/gesture_handler.har +0 -0
  40. package/lib/commonjs/RNGestureHandlerModule.js +6 -3
  41. package/lib/commonjs/RNGestureHandlerModule.js.map +1 -1
  42. package/lib/commonjs/components/GestureHandlerRootView.js +5 -13
  43. package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -1
  44. package/lib/commonjs/handlers/createHandler.js +31 -28
  45. package/lib/commonjs/handlers/createHandler.js.map +1 -1
  46. package/lib/commonjs/index.js +42 -19
  47. package/lib/commonjs/index.js.map +1 -1
  48. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js +10 -0
  49. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js.map +1 -0
  50. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js +11 -0
  51. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -0
  52. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js +11 -0
  53. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -0
  54. package/lib/module/RNGestureHandlerModule.js +3 -2
  55. package/lib/module/RNGestureHandlerModule.js.map +1 -1
  56. package/lib/module/components/GestureHandlerRootView.js +3 -11
  57. package/lib/module/components/GestureHandlerRootView.js.map +1 -1
  58. package/lib/module/handlers/createHandler.js +20 -19
  59. package/lib/module/handlers/createHandler.js.map +1 -1
  60. package/lib/module/index.js +6 -14
  61. package/lib/module/index.js.map +1 -1
  62. package/lib/module/specs/NativeRNGestureHandlerModule.js +3 -0
  63. package/lib/module/specs/NativeRNGestureHandlerModule.js.map +1 -0
  64. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js +3 -0
  65. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -0
  66. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js +3 -0
  67. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -0
  68. package/lib/typescript/RNGestureHandlerModule.d.ts +2 -6
  69. package/lib/typescript/RNGestureHandlerModule.d.ts.map +1 -1
  70. package/lib/typescript/components/GestureHandlerRootView.d.ts +6 -6
  71. package/lib/typescript/components/GestureHandlerRootView.d.ts.map +1 -1
  72. package/lib/typescript/handlers/createHandler.d.ts +11 -11
  73. package/lib/typescript/handlers/createHandler.d.ts.map +1 -1
  74. package/lib/typescript/index.d.ts +9 -8
  75. package/lib/typescript/index.d.ts.map +1 -1
  76. package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts +15 -0
  77. package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts.map +1 -0
  78. package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts +15 -0
  79. package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts.map +1 -0
  80. package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts +7 -0
  81. package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts.map +1 -0
  82. package/package.json +9 -13
  83. package/src/RNGestureHandlerModule.ts +3 -4
  84. package/src/components/GestureHandlerRootView.tsx +4 -15
  85. package/src/handlers/createHandler.tsx +4 -5
  86. package/src/index.ts +13 -13
  87. package/src/specs/NativeRNGestureHandlerModule.ts +26 -0
  88. package/src/specs/RNGestureHandlerButtonNativeComponent.ts +18 -0
  89. package/src/specs/RNGestureHandlerRootViewNativeComponent.ts +6 -0
  90. package/README.md +0 -1
  91. package/harmony/gesture_handler/LICENSE +0 -21
  92. package/harmony/gesture_handler/OAT.xml +0 -44
  93. package/harmony/gesture_handler/README.OpenSource +0 -11
  94. package/harmony/gesture_handler/README.md +0 -1
  95. package/lib/commonjs/components/GestureButtons.js +0 -186
  96. package/lib/commonjs/components/GestureButtons.js.map +0 -1
  97. package/lib/commonjs/components/GestureHandlerButton.js +0 -9
  98. package/lib/commonjs/components/GestureHandlerButton.js.map +0 -1
  99. package/lib/commonjs/components/RNGestureHandlerButton.js +0 -23
  100. package/lib/commonjs/components/RNGestureHandlerButton.js.map +0 -1
  101. package/lib/commonjs/components/touchables/GenericTouchable.js +0 -247
  102. package/lib/commonjs/components/touchables/GenericTouchable.js.map +0 -1
  103. package/lib/commonjs/components/touchables/TouchableOpacity.js +0 -58
  104. package/lib/commonjs/components/touchables/TouchableOpacity.js.map +0 -1
  105. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js +0 -18
  106. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js.map +0 -1
  107. package/lib/commonjs/components/touchables/index.js +0 -21
  108. package/lib/commonjs/components/touchables/index.js.map +0 -1
  109. package/lib/commonjs/handlers/NativeViewGestureHandler.js +0 -19
  110. package/lib/commonjs/handlers/NativeViewGestureHandler.js.map +0 -1
  111. package/lib/commonjs/handlers/PanGestureHandler.js +0 -103
  112. package/lib/commonjs/handlers/PanGestureHandler.js.map +0 -1
  113. package/lib/commonjs/handlers/TapGestureHandler.js +0 -22
  114. package/lib/commonjs/handlers/TapGestureHandler.js.map +0 -1
  115. package/lib/commonjs/handlers/createNativeWrapper.js +0 -64
  116. package/lib/commonjs/handlers/createNativeWrapper.js.map +0 -1
  117. package/lib/commonjs/handlers/gestureHandlerCommon.js +0 -22
  118. package/lib/commonjs/handlers/gestureHandlerCommon.js.map +0 -1
  119. package/lib/commonjs/handlers/gestures/GestureDetector.js +0 -554
  120. package/lib/commonjs/handlers/gestures/GestureDetector.js.map +0 -1
  121. package/lib/commonjs/init.js +0 -24
  122. package/lib/commonjs/init.js.map +0 -1
  123. package/lib/module/components/GestureButtons.js +0 -168
  124. package/lib/module/components/GestureButtons.js.map +0 -1
  125. package/lib/module/components/GestureHandlerButton.js +0 -3
  126. package/lib/module/components/GestureHandlerButton.js.map +0 -1
  127. package/lib/module/components/RNGestureHandlerButton.js +0 -17
  128. package/lib/module/components/RNGestureHandlerButton.js.map +0 -1
  129. package/lib/module/components/touchables/GenericTouchable.js +0 -238
  130. package/lib/module/components/touchables/GenericTouchable.js.map +0 -1
  131. package/lib/module/components/touchables/TouchableOpacity.js +0 -49
  132. package/lib/module/components/touchables/TouchableOpacity.js.map +0 -1
  133. package/lib/module/components/touchables/TouchableWithoutFeedback.js +0 -9
  134. package/lib/module/components/touchables/TouchableWithoutFeedback.js.map +0 -1
  135. package/lib/module/components/touchables/index.js +0 -8
  136. package/lib/module/components/touchables/index.js.map +0 -1
  137. package/lib/module/handlers/NativeViewGestureHandler.js +0 -12
  138. package/lib/module/handlers/NativeViewGestureHandler.js.map +0 -1
  139. package/lib/module/handlers/PanGestureHandler.js +0 -92
  140. package/lib/module/handlers/PanGestureHandler.js.map +0 -1
  141. package/lib/module/handlers/TapGestureHandler.js +0 -14
  142. package/lib/module/handlers/TapGestureHandler.js.map +0 -1
  143. package/lib/module/handlers/createNativeWrapper.js +0 -57
  144. package/lib/module/handlers/createNativeWrapper.js.map +0 -1
  145. package/lib/module/handlers/gestureHandlerCommon.js +0 -15
  146. package/lib/module/handlers/gestureHandlerCommon.js.map +0 -1
  147. package/lib/module/handlers/gestures/GestureDetector.js +0 -543
  148. package/lib/module/handlers/gestures/GestureDetector.js.map +0 -1
  149. package/lib/module/init.js +0 -17
  150. package/lib/module/init.js.map +0 -1
  151. package/lib/typescript/components/GestureButtons.d.ts +0 -122
  152. package/lib/typescript/components/GestureButtons.d.ts.map +0 -1
  153. package/lib/typescript/components/GestureHandlerButton.d.ts +0 -5
  154. package/lib/typescript/components/GestureHandlerButton.d.ts.map +0 -1
  155. package/lib/typescript/components/RNGestureHandlerButton.d.ts +0 -2
  156. package/lib/typescript/components/RNGestureHandlerButton.d.ts.map +0 -1
  157. package/lib/typescript/components/touchables/GenericTouchable.d.ts +0 -68
  158. package/lib/typescript/components/touchables/GenericTouchable.d.ts.map +0 -1
  159. package/lib/typescript/components/touchables/TouchableOpacity.d.ts +0 -26
  160. package/lib/typescript/components/touchables/TouchableOpacity.d.ts.map +0 -1
  161. package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts +0 -8
  162. package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts.map +0 -1
  163. package/lib/typescript/components/touchables/index.d.ts +0 -4
  164. package/lib/typescript/components/touchables/index.d.ts.map +0 -1
  165. package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +0 -29
  166. package/lib/typescript/handlers/NativeViewGestureHandler.d.ts.map +0 -1
  167. package/lib/typescript/handlers/PanGestureHandler.d.ts +0 -140
  168. package/lib/typescript/handlers/PanGestureHandler.d.ts.map +0 -1
  169. package/lib/typescript/handlers/TapGestureHandler.d.ts +0 -58
  170. package/lib/typescript/handlers/TapGestureHandler.d.ts.map +0 -1
  171. package/lib/typescript/handlers/createNativeWrapper.d.ts +0 -4
  172. package/lib/typescript/handlers/createNativeWrapper.d.ts.map +0 -1
  173. package/lib/typescript/handlers/gestureHandlerCommon.d.ts +0 -2
  174. package/lib/typescript/handlers/gestureHandlerCommon.d.ts.map +0 -1
  175. package/lib/typescript/handlers/gestures/GestureDetector.d.ts +0 -24
  176. package/lib/typescript/handlers/gestures/GestureDetector.d.ts.map +0 -1
  177. package/lib/typescript/init.d.ts +0 -3
  178. package/lib/typescript/init.d.ts.map +0 -1
  179. package/src/components/GestureButtons.tsx +0 -334
  180. package/src/components/GestureHandlerButton.tsx +0 -5
  181. package/src/components/RNGestureHandlerButton.tsx +0 -23
  182. package/src/components/touchables/GenericTouchable.tsx +0 -301
  183. package/src/components/touchables/TouchableOpacity.tsx +0 -76
  184. package/src/components/touchables/TouchableWithoutFeedback.tsx +0 -14
  185. package/src/components/touchables/index.ts +0 -7
  186. package/src/handlers/NativeViewGestureHandler.ts +0 -55
  187. package/src/handlers/PanGestureHandler.ts +0 -327
  188. package/src/handlers/TapGestureHandler.ts +0 -95
  189. package/src/handlers/createNativeWrapper.tsx +0 -81
  190. package/src/handlers/gestureHandlerCommon.ts +0 -15
  191. package/src/handlers/gestures/GestureDetector.tsx +0 -823
  192. package/src/init.ts +0 -18
@@ -1,92 +0,0 @@
1
- // RNGH: patching to replace `createHandler`
2
-
3
- import createHandler from './createHandler'; // RNGH: using local create handler
4
- import { baseGestureHandlerProps } from 'react-native-gesture-handler/src/handlers/gestureHandlerCommon';
5
- export const panGestureHandlerProps = ['activeOffsetY', 'activeOffsetX', 'failOffsetY', 'failOffsetX', 'minDist', 'minVelocity', 'minVelocityX', 'minVelocityY', 'minPointers', 'maxPointers', 'avgTouches', 'enableTrackpadTwoFingerGesture', 'activateAfterLongPress'];
6
- export const panGestureHandlerCustomNativeProps = ['activeOffsetYStart', 'activeOffsetYEnd', 'activeOffsetXStart', 'activeOffsetXEnd', 'failOffsetYStart', 'failOffsetYEnd', 'failOffsetXStart', 'failOffsetXEnd'];
7
- export const panHandlerName = 'PanGestureHandler';
8
- // eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
9
- export const PanGestureHandler = createHandler({
10
- name: panHandlerName,
11
- allowedProps: [...baseGestureHandlerProps, ...panGestureHandlerProps],
12
- config: {},
13
- transformProps: managePanProps,
14
- customNativeProps: panGestureHandlerCustomNativeProps
15
- });
16
- function validatePanGestureHandlerProps(props) {
17
- if (Array.isArray(props.activeOffsetX) && (props.activeOffsetX[0] > 0 || props.activeOffsetX[1] < 0)) {
18
- throw new Error(`First element of activeOffsetX should be negative, a the second one should be positive`);
19
- }
20
- if (Array.isArray(props.activeOffsetY) && (props.activeOffsetY[0] > 0 || props.activeOffsetY[1] < 0)) {
21
- throw new Error(`First element of activeOffsetY should be negative, a the second one should be positive`);
22
- }
23
- if (Array.isArray(props.failOffsetX) && (props.failOffsetX[0] > 0 || props.failOffsetX[1] < 0)) {
24
- throw new Error(`First element of failOffsetX should be negative, a the second one should be positive`);
25
- }
26
- if (Array.isArray(props.failOffsetY) && (props.failOffsetY[0] > 0 || props.failOffsetY[1] < 0)) {
27
- throw new Error(`First element of failOffsetY should be negative, a the second one should be positive`);
28
- }
29
- if (props.minDist && (props.failOffsetX || props.failOffsetY)) {
30
- throw new Error(`It is not supported to use minDist with failOffsetX or failOffsetY, use activeOffsetX and activeOffsetY instead`);
31
- }
32
- if (props.minDist && (props.activeOffsetX || props.activeOffsetY)) {
33
- throw new Error(`It is not supported to use minDist with activeOffsetX or activeOffsetY`);
34
- }
35
- }
36
- function transformPanGestureHandlerProps(props) {
37
- const res = {
38
- ...props
39
- };
40
- if (props.activeOffsetX !== undefined) {
41
- delete res.activeOffsetX;
42
- if (Array.isArray(props.activeOffsetX)) {
43
- res.activeOffsetXStart = props.activeOffsetX[0];
44
- res.activeOffsetXEnd = props.activeOffsetX[1];
45
- } else if (props.activeOffsetX < 0) {
46
- res.activeOffsetXStart = props.activeOffsetX;
47
- } else {
48
- res.activeOffsetXEnd = props.activeOffsetX;
49
- }
50
- }
51
- if (props.activeOffsetY !== undefined) {
52
- delete res.activeOffsetY;
53
- if (Array.isArray(props.activeOffsetY)) {
54
- res.activeOffsetYStart = props.activeOffsetY[0];
55
- res.activeOffsetYEnd = props.activeOffsetY[1];
56
- } else if (props.activeOffsetY < 0) {
57
- res.activeOffsetYStart = props.activeOffsetY;
58
- } else {
59
- res.activeOffsetYEnd = props.activeOffsetY;
60
- }
61
- }
62
- if (props.failOffsetX !== undefined) {
63
- delete res.failOffsetX;
64
- if (Array.isArray(props.failOffsetX)) {
65
- res.failOffsetXStart = props.failOffsetX[0];
66
- res.failOffsetXEnd = props.failOffsetX[1];
67
- } else if (props.failOffsetX < 0) {
68
- res.failOffsetXStart = props.failOffsetX;
69
- } else {
70
- res.failOffsetXEnd = props.failOffsetX;
71
- }
72
- }
73
- if (props.failOffsetY !== undefined) {
74
- delete res.failOffsetY;
75
- if (Array.isArray(props.failOffsetY)) {
76
- res.failOffsetYStart = props.failOffsetY[0];
77
- res.failOffsetYEnd = props.failOffsetY[1];
78
- } else if (props.failOffsetY < 0) {
79
- res.failOffsetYStart = props.failOffsetY;
80
- } else {
81
- res.failOffsetYEnd = props.failOffsetY;
82
- }
83
- }
84
- return res;
85
- }
86
- export function managePanProps(props) {
87
- if (__DEV__) {
88
- validatePanGestureHandlerProps(props);
89
- }
90
- return transformPanGestureHandlerProps(props);
91
- }
92
- //# sourceMappingURL=PanGestureHandler.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["createHandler","baseGestureHandlerProps","panGestureHandlerProps","panGestureHandlerCustomNativeProps","panHandlerName","PanGestureHandler","name","allowedProps","config","transformProps","managePanProps","customNativeProps","validatePanGestureHandlerProps","props","Array","isArray","activeOffsetX","Error","activeOffsetY","failOffsetX","failOffsetY","minDist","transformPanGestureHandlerProps","res","undefined","activeOffsetXStart","activeOffsetXEnd","activeOffsetYStart","activeOffsetYEnd","failOffsetXStart","failOffsetXEnd","failOffsetYStart","failOffsetYEnd","__DEV__"],"sourceRoot":"..\\..\\..\\src","sources":["handlers/PanGestureHandler.ts"],"mappings":"AAAA;;AAEA,OAA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ACQ,gBAAgB,GAAGlB,KAAK,CAACO,WAAW,CAAC,CAAC,CAAC;MAC3CG,GAAG,CAACS,cAAc,GAAGnB,KAAK,CAACO,WAAW,CAAC,CAAC,CAAC;IAC3C,CAAC,MAAM,IAAIP,KAAK,CAACO,WAAW,GAAG,CAAC,EAAE;MAChCG,GAAG,CAACQ,gBAAgB,GAAGlB,KAAK,CAACO,WAAW;IAC1C,CAAC,MAAM;MACLG,GAAG,CAACS,cAAc,GAAGnB,KAAK,CAACO,WAAW;IACxC;EACF;EAEA,OAAOG,GAAG;AACZ;AAEA,OAAO,SAASb,cAAcA,CAACG,KAA6B,EAAE;EAC5D,IAAIoB,OAAO,EAAE;IACXrB,8BAA8B,CAACC,KAAK,CAAC;EACvC;EACA,OAAOS,+BAA+B,CAACT,KAAK,CAAC;AAC/C"}
@@ -1,14 +0,0 @@
1
- // RNGH: forking to use the forked createHandler
2
- import createHandler from './createHandler';
3
- import { baseGestureHandlerProps } from 'react-native-gesture-handler/src/handlers/gestureHandlerCommon';
4
- export const tapGestureHandlerProps = ['maxDurationMs', 'maxDelayMs', 'numberOfTaps', 'maxDeltaX', 'maxDeltaY', 'maxDist', 'minPointers'];
5
- export const tapHandlerName = 'TapGestureHandler';
6
- // eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
7
- export const TapGestureHandler = createHandler({
8
- name: tapHandlerName,
9
- allowedProps: [...baseGestureHandlerProps, ...tapGestureHandlerProps],
10
- config: {
11
- shouldCancelWhenOutside: true
12
- }
13
- });
14
- //# sourceMappingURL=TapGestureHandler.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["createHandler","baseGestureHandlerProps","tapGestureHandlerProps","tapHandlerName","TapGestureHandler","name","allowedProps","config","shouldCancelWhenOutside"],"sourceRoot":"..\\..\\..\\src","sources":["handlers/TapGestureHandler.ts"],"mappings":"AAAA;AACA,OAAOA,aAAa,MAAM,iBAAiB;AAC3C,SAEEC,uBAAuB,QAClB,gEAAgE;AAEvE,OAAO,MAAMC,sBAAsB,GAAG,CACpC,eAAe,EACf,YAAY,EACZ,cAAc,EACd,WAAW,EACX,WAAW,EACX,SAAS,EACT,aAAa,CACL;AA+DV,OAAO,MAAMC,cAAc,GAAG,mBAAmB;AAGjD;AACA,OAAO,MAAMC,iBAAiB,GAAGJ,aAAa,CAG5C;EACAK,IAAI,EAAEF,cAAc;EACpBG,YAAY,EAAE,CACZ,GAAGL,uBAAuB,EAC1B,GAAGC,sBAAsB,CACjB;EACVK,MAAM,EAAE;IACNC,uBAAuB,EAAE;EAC3B;AACF,CAAC,CAAC"}
@@ -1,57 +0,0 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
- import * as React from 'react';
3
- import { useImperativeHandle, useRef } from 'react';
4
- import { NativeViewGestureHandler, nativeViewProps } from './NativeViewGestureHandler';
5
-
6
- /*
7
- * This array should consist of:
8
- * - All keys in propTypes from NativeGestureHandler
9
- * (and all keys in GestureHandlerPropTypes)
10
- * - 'onGestureHandlerEvent'
11
- * - 'onGestureHandlerStateChange'
12
- */
13
- const NATIVE_WRAPPER_PROPS_FILTER = [...nativeViewProps, 'onGestureHandlerEvent', 'onGestureHandlerStateChange'];
14
- export default function createNativeWrapper(Component, config = {}) {
15
- var _Component$render;
16
- const ComponentWrapper = /*#__PURE__*/React.forwardRef((props, ref) => {
17
- // filter out props that should be passed to gesture handler wrapper
18
- const gestureHandlerProps = Object.keys(props).reduce((res, key) => {
19
- // TS being overly protective with it's types, see https://github.com/microsoft/TypeScript/issues/26255#issuecomment-458013731 for more info
20
- const allowedKeys = NATIVE_WRAPPER_PROPS_FILTER;
21
- if (allowedKeys.includes(key)) {
22
- // @ts-ignore FIXME(TS)
23
- res[key] = props[key];
24
- }
25
- return res;
26
- }, {
27
- ...config
28
- } // watch out not to modify config
29
- );
30
- const _ref = useRef();
31
- const _gestureHandlerRef = useRef();
32
- useImperativeHandle(ref,
33
- // @ts-ignore TODO(TS) decide how nulls work in this context
34
- () => {
35
- const node = _gestureHandlerRef.current;
36
- // add handlerTag for relations config
37
- if (_ref.current && node) {
38
- // @ts-ignore FIXME(TS) think about createHandler return type
39
- _ref.current.handlerTag = node.handlerTag;
40
- return _ref.current;
41
- }
42
- return null;
43
- }, [_ref, _gestureHandlerRef]);
44
- return /*#__PURE__*/React.createElement(NativeViewGestureHandler, _extends({}, gestureHandlerProps, {
45
- // @ts-ignore TODO(TS)
46
- ref: _gestureHandlerRef
47
- }), /*#__PURE__*/React.createElement(Component, _extends({}, props, {
48
- ref: _ref
49
- })));
50
- });
51
-
52
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
53
- ComponentWrapper.displayName = (Component === null || Component === void 0 ? void 0 : Component.displayName) || ( // @ts-ignore if render doesn't exist it will return undefined and go further
54
- Component === null || Component === void 0 || (_Component$render = Component.render) === null || _Component$render === void 0 ? void 0 : _Component$render.name) || typeof Component === 'string' && Component || 'ComponentWrapper';
55
- return ComponentWrapper;
56
- }
57
- //# sourceMappingURL=createNativeWrapper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","useImperativeHandle","useRef","NativeViewGestureHandler","nativeViewProps","NATIVE_WRAPPER_PROPS_FILTER","createNativeWrapper","Component","config","_Component$render","ComponentWrapper","forwardRef","props","ref","gestureHandlerProps","Object","keys","reduce","res","key","allowedKeys","includes","_ref","_gestureHandlerRef","node","current","handlerTag","createElement","_extends","displayName","render","name"],"sourceRoot":"..\\..\\..\\src","sources":["handlers/createNativeWrapper.tsx"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,mBAAmB,EAAEC,MAAM,QAAQ,OAAO;AAEnD,SACEC,wBAAwB,EAExBC,eAAe,QACV,4BAA4B;;AAEnC;AACA;AACA;AACA;AACA;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B,QAAA,KAAKhB,KAAK;MAAEC,GAAG,EAAES;IAAK,EAAE,CACV,CAAC;EAE/B,CAAC,CAAC;;EAEF;EACAZ,gBAAgB,CAACmB,WAAW,GAC1B,CAAAtB,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEsB,WAAW,OACtB;EACAtB,SAAS,aAATA,SAAS,gBAAAE,iBAAA,GAATF,SAAS,CAAEuB,MAAM,cAAArB,iBAAA,uBAAjBA,iBAAA,CAAmBsB,IAAI,KACtB,OAAOxB,SAAS,KAAK,QAAQ,IAAIA,SAAU,IAC5C,kBAAkB;EAEpB,OAAOG,gBAAgB;AACzB"}
@@ -1,15 +0,0 @@
1
- import { RNGestureHandlerModule } from '../RNGestureHandlerModule'; // RNGH: patch
2
-
3
- let flushOperationsScheduled = false;
4
- export function scheduleFlushOperations() {
5
- if (!flushOperationsScheduled) {
6
- flushOperationsScheduled = true;
7
- queueMicrotask(() => {
8
- if (RNGestureHandlerModule) {
9
- RNGestureHandlerModule.flushOperations();
10
- }
11
- flushOperationsScheduled = false;
12
- });
13
- }
14
- }
15
- //# sourceMappingURL=gestureHandlerCommon.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["RNGestureHandlerModule","flushOperationsScheduled","scheduleFlushOperations","queueMicrotask","flushOperations"],"sourceRoot":"..\\..\\..\\src","sources":["handlers/gestureHandlerCommon.ts"],"mappings":"AAAA,SAASA,sBAAsB,QAAQ,2BAA2B,CAAC,CAAC;;AAEpE,IAAIC,wBAAwB,GAAG,KAAK;AAEpC,OAAO,SAASC,uBAAuBA,CAAA,EAAG;EACxC,IAAI,CAACD,wBAAwB,EAAE;IAC7BA,wBAAwB,GAAG,IAAI;IAC/BE,cAAc,CAAC,MAAM;MACnB,IAAIH,sBAAsB,EAAE;QAC1BA,sBAAsB,CAACI,eAAe,CAAC,CAAC;MAC1C;MACAH,wBAAwB,GAAG,KAAK;IAClC,CAAC,CAAC;EACJ;AACF"}