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

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 (86) hide show
  1. package/DrawerLayout/index.ts +2 -0
  2. package/Swipeable/index.ts +2 -0
  3. package/harmony/gesture_handler/BuildProfile.ets +15 -3
  4. package/harmony/gesture_handler/hvigorfile.ts +1 -1
  5. package/harmony/gesture_handler/index.ets +2 -2
  6. package/harmony/gesture_handler/oh-package-lock.json5 +4 -3
  7. package/harmony/gesture_handler/oh-package.json5 +4 -4
  8. package/harmony/gesture_handler/src/main/cpp/GestureHandlerPackage.cpp +63 -17
  9. package/harmony/gesture_handler/src/main/cpp/GestureHandlerPackage.h +3 -3
  10. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerRootViewJSIBinder.h +2 -2
  11. package/harmony/gesture_handler/src/main/cpp/{RNGestureHandlerButtonComponentInstance.h → componentInstances/RNGestureHandlerButtonComponentInstance.h} +2 -2
  12. package/harmony/gesture_handler/src/main/cpp/componentInstances/RNGestureHandlerRootViewComponentInstance.h +234 -0
  13. package/harmony/gesture_handler/src/main/ets/{GestureHandler.ts → core/GestureHandler.ts} +46 -25
  14. package/harmony/gesture_handler/src/main/ets/{GestureHandlerOrchestrator.ts → core/GestureHandlerOrchestrator.ts} +122 -67
  15. package/harmony/gesture_handler/src/main/ets/{GestureHandlerRegistry.ts → core/GestureHandlerRegistry.ts} +7 -0
  16. package/harmony/gesture_handler/src/main/ets/{Event.ts → core/IncomingEvent.ts} +30 -20
  17. package/harmony/gesture_handler/src/main/ets/core/InteractionManager.ts +144 -0
  18. package/harmony/gesture_handler/src/main/ets/{OutgoingEvent.ts → core/OutgoingEvent.ts} +1 -1
  19. package/harmony/gesture_handler/src/main/ets/core/OutgoingEventDispatcher.ts +12 -0
  20. package/harmony/gesture_handler/src/main/ets/{PointerTracker.ts → core/PointerTracker.ts} +4 -4
  21. package/harmony/gesture_handler/src/main/ets/core/RNGHLogger.ts +12 -0
  22. package/harmony/gesture_handler/src/main/ets/core/Vector2D.ts +80 -0
  23. package/harmony/gesture_handler/src/main/ets/{VelocityTracker.ts → core/VelocityTracker.ts} +13 -5
  24. package/harmony/gesture_handler/src/main/ets/core/View.ts +19 -0
  25. package/harmony/gesture_handler/src/main/ets/core/index.ts +13 -0
  26. package/harmony/gesture_handler/src/main/ets/detectors/ScaleGestureDetector.ts +169 -0
  27. package/harmony/gesture_handler/src/main/ets/gesture-handlers/FlingGestureHandler.ts +211 -0
  28. package/harmony/gesture_handler/src/main/ets/gesture-handlers/GestureHandlerFactory.ts +64 -0
  29. package/harmony/gesture_handler/src/main/ets/gesture-handlers/LongPressGestureHandler.ts +127 -0
  30. package/harmony/gesture_handler/src/main/ets/gesture-handlers/ManualGestureHandler.ts +42 -0
  31. package/harmony/gesture_handler/src/main/ets/{NativeViewGestureHandler.ts → gesture-handlers/NativeViewGestureHandler.ts} +10 -12
  32. package/harmony/gesture_handler/src/main/ets/{PanGestureHandler.ts → gesture-handlers/PanGestureHandler.ts} +27 -13
  33. package/harmony/gesture_handler/src/main/ets/gesture-handlers/PinchGestureHandler.ts +159 -0
  34. package/harmony/gesture_handler/src/main/ets/gesture-handlers/RotationGestureHandler.ts +164 -0
  35. package/harmony/gesture_handler/src/main/ets/{TapGestureHandler.ts → gesture-handlers/TapGestureHandler.ts} +11 -11
  36. package/harmony/gesture_handler/src/main/ets/gesture-handlers/detectors/RotationGestureDetector.ts +167 -0
  37. package/harmony/gesture_handler/src/main/ets/gesture-handlers/index.ts +1 -0
  38. package/harmony/gesture_handler/src/main/ets/namespace/RNGestureHandlerModule.ts +8 -9
  39. package/harmony/gesture_handler/src/main/ets/namespace/{RNGestureHandlerButton.ts → components/RNGestureHandlerButton.ts} +35 -36
  40. package/harmony/gesture_handler/src/main/ets/namespace/{RNGestureHandlerRootView.ts → components/RNGestureHandlerRootView.ts} +23 -23
  41. package/harmony/gesture_handler/src/main/ets/namespace/components/ts.ts +2 -0
  42. package/harmony/gesture_handler/src/main/ets/namespace/ts.ts +2 -3
  43. package/harmony/gesture_handler/src/main/ets/rnoh/GestureHandlerArkUIAdapter.ts +240 -0
  44. package/harmony/gesture_handler/src/main/ets/{GestureHandlerPackage.ts → rnoh/GestureHandlerPackage.ts} +4 -4
  45. package/harmony/gesture_handler/src/main/ets/rnoh/Logger.ts +49 -0
  46. package/harmony/gesture_handler/src/main/ets/rnoh/OutgoingEventDispatchers.ts +71 -0
  47. package/harmony/gesture_handler/src/main/ets/rnoh/RNGHRootTouchHandlerArkTS.ts +104 -0
  48. package/harmony/gesture_handler/src/main/ets/rnoh/RNGHRootTouchHandlerCAPI.ts +110 -0
  49. package/harmony/gesture_handler/src/main/ets/{RNGestureHandlerButton.ets → rnoh/RNGestureHandlerButton.ets} +3 -3
  50. package/harmony/gesture_handler/src/main/ets/{RNGestureHandlerModule.ts → rnoh/RNGestureHandlerModule.ts} +74 -27
  51. package/harmony/gesture_handler/src/main/ets/{RNGestureHandlerRootView.ets → rnoh/RNGestureHandlerRootView.ets} +3 -3
  52. package/harmony/gesture_handler/src/main/ets/rnoh/RNOHGestureResponder.ts +24 -0
  53. package/harmony/gesture_handler/src/main/ets/rnoh/RNOHScrollLocker.ts +32 -0
  54. package/harmony/gesture_handler/src/main/ets/rnoh/View.ts +119 -0
  55. package/harmony/gesture_handler/src/main/ets/rnoh/ViewRegistry.ts +95 -0
  56. package/harmony/gesture_handler/src/main/module.json5 +8 -6
  57. package/harmony/gesture_handler/ts.ts +2 -2
  58. package/harmony/gesture_handler.har +0 -0
  59. package/lib/commonjs/index.js +98 -138
  60. package/lib/commonjs/index.js.map +1 -1
  61. package/lib/module/index.js +9 -142
  62. package/lib/module/index.js.map +1 -1
  63. package/lib/typescript/index.d.ts +35 -1
  64. package/lib/typescript/index.d.ts.map +1 -1
  65. package/package.json +13 -10
  66. package/src/index.ts +136 -136
  67. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerPackage.h +0 -72
  68. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerRootViewComponentInstance.h +0 -78
  69. package/harmony/gesture_handler/src/main/ets/EventDispatcher.ts +0 -53
  70. package/harmony/gesture_handler/src/main/ets/GestureHandlerArkUIAdapter.ts +0 -203
  71. package/harmony/gesture_handler/src/main/ets/GestureHandlerFactory.ts +0 -45
  72. package/harmony/gesture_handler/src/main/ets/InteractionManager.ts +0 -109
  73. package/harmony/gesture_handler/src/main/ets/RNGHLogger.ts +0 -48
  74. package/harmony/gesture_handler/src/main/ets/RNGHRootTouchHandlerArkTS.ts +0 -60
  75. package/harmony/gesture_handler/src/main/ets/RNGHRootTouchHandlerCAPI.ts +0 -87
  76. package/harmony/gesture_handler/src/main/ets/RNOHScrollLocker.ts +0 -23
  77. package/harmony/gesture_handler/src/main/ets/Vector2D.ts +0 -36
  78. package/harmony/gesture_handler/src/main/ets/View.ts +0 -71
  79. package/harmony/gesture_handler/src/main/ets/ViewRegistry.ts +0 -43
  80. package/harmony/gesture_handler/src/main/ets/pages/Index.ets +0 -17
  81. package/harmony/gesture_handler/src/main/ets/webviewability/WebviewAbility.ts +0 -41
  82. /package/harmony/gesture_handler/src/main/ets/{CircularBuffer.ts → core/CircularBuffer.ts} +0 -0
  83. /package/harmony/gesture_handler/src/main/ets/{LeastSquareSolver.ts → core/LeastSquareSolver.ts} +0 -0
  84. /package/harmony/gesture_handler/src/main/ets/{RNGHError.ts → core/RNGHError.ts} +0 -0
  85. /package/harmony/gesture_handler/src/main/ets/{State.ts → core/State.ts} +0 -0
  86. /package/harmony/gesture_handler/src/main/ets/{types.ts → rnoh/types.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,EAAE,MAAM,wCAAwC,CAAC;AAE/D,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAexF,YAAY,EA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,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,uDAAuD,CAAC;AAC7F,YAAY,EACV,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,UAAU,EACV,cAAc,EACd,yBAAyB,GAC1B,MAAM,0DAA0D,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,0DAA0D,CAAC;AAEnG,OAAO,EACL,mCAAmC,EACnC,6BAA6B,GAC9B,MAAM,6DAA6D,CAAC"}
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "type": "git",
9
9
  "url": "https://github.com/react-native-oh-library/react-native-harmony-gesture-handler.git"
10
10
  },
11
- "version": "2.12.9",
11
+ "version": "2.14.1-2.14.9",
12
12
  "description": "",
13
13
  "react-native": "src/index.ts",
14
14
  "main": "lib/commonjs/index.js",
@@ -17,21 +17,22 @@
17
17
  "scripts": {
18
18
  "prepack": "bob build",
19
19
  "test": "jest",
20
- "pack:harmony": "react-native pack-harmony --oh-module-path ../tester/harmony/react_native_modules/gesture_handler --harmony-dir-path ./harmony --package-json-path ./package.json",
21
- "pack:prod": "npm run pack:harmony && npm pack"
20
+ "pack:prod": "npm pack",
21
+ "update_version": "node ./scripts/update-version.js",
22
+ "deploy": "node ./scripts/deploy.js"
22
23
  },
23
24
  "peerDependencies": {
24
25
  "react": "*",
25
26
  "react-native": "*",
26
- "react-native-harmony": "*"
27
+ "react-native-harmony": "*",
28
+ "react-native-gesture-handler": "2.14.1"
27
29
  },
28
30
  "keywords": [],
29
31
  "author": "",
30
32
  "license": "ISC",
31
- "dependencies": {
32
- "react-native-gesture-handler": "2.12.1"
33
- },
34
33
  "devDependencies": {
34
+ "@types/hoist-non-react-statics": "^3.3.1",
35
+ "react-native-gesture-handler": "2.14.1",
35
36
  "@babel/core": "^7.12.9",
36
37
  "@babel/plugin-proposal-class-properties": "^7.12.1",
37
38
  "@babel/preset-env": "^7.12.11",
@@ -45,9 +46,11 @@
45
46
  "typescript": "4.5.5"
46
47
  },
47
48
  "files": [
48
- "harmony",
49
+ "./harmony/*",
49
50
  "src",
50
- "lib"
51
+ "lib",
52
+ "DrawerLayout/",
53
+ "Swipeable/"
51
54
  ],
52
55
  "react-native-builder-bob": {
53
56
  "source": "src",
@@ -63,4 +66,4 @@
63
66
  ]
64
67
  ]
65
68
  }
66
- }
69
+ }
package/src/index.ts CHANGED
@@ -6,56 +6,56 @@ global.isFormsStackingContext = () => true; // TODO: add using JSI
6
6
 
7
7
  import { initialize } from 'react-native-gesture-handler/src/init';
8
8
 
9
- // export { Directions } from './Directions';
9
+ export { Directions } from 'react-native-gesture-handler/src/Directions';
10
10
  export { State } from 'react-native-gesture-handler/src/State';
11
- // export { default as gestureHandlerRootHOC } from './components/gestureHandlerRootHOC';
11
+ export { default as gestureHandlerRootHOC } from 'react-native-gesture-handler/src/components/gestureHandlerRootHOC';
12
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';
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
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';
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
59
  export { TapGestureHandler } from 'react-native-gesture-handler/src/handlers/TapGestureHandler';
60
60
  // export { ForceTouchGestureHandler } from './handlers/ForceTouchGestureHandler';
61
61
  // export { LongPressGestureHandler } from './handlers/LongPressGestureHandler';
@@ -63,46 +63,46 @@ export { PanGestureHandler } from 'react-native-gesture-handler/src/handlers/Pan
63
63
  // export { PinchGestureHandler } from './handlers/PinchGestureHandler';
64
64
  // export { RotationGestureHandler } from './handlers/RotationGestureHandler';
65
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';
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
71
  export { GestureDetector } from 'react-native-gesture-handler/src/handlers/gestures/GestureDetector';
72
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';
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 'react-native-gesture-handler/src/handlers/NativeViewGestureHandler';
90
+ export type {
91
+ RawButtonProps,
92
+ BaseButtonProps,
93
+ RectButtonProps,
94
+ BorderlessButtonProps,
95
+ } from 'react-native-gesture-handler/src/components/GestureButtons';
103
96
  export {
104
- // TouchableHighlight,
105
- // TouchableNativeFeedback,
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
106
  TouchableOpacity,
107
107
  TouchableWithoutFeedback,
108
108
  } from 'react-native-gesture-handler/src/components/touchables';
@@ -114,59 +114,59 @@ export {
114
114
  FlatList,
115
115
  RefreshControl,
116
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';
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
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';
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
166
 
167
- // export {
168
- // enableExperimentalWebImplementation,
169
- // enableLegacyWebImplementation,
170
- // } from './EnableNewWebImplementation';
167
+ export {
168
+ enableExperimentalWebImplementation,
169
+ enableLegacyWebImplementation,
170
+ } from 'react-native-gesture-handler/src/EnableNewWebImplementation';
171
171
 
172
172
  initialize();
@@ -1,72 +0,0 @@
1
- // #pragma once
2
- //
3
- // // This file was generated.
4
- //
5
- // #include "RNOH/Package.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
- // namespace rnoh {
14
- //
15
- // class RNOHGeneratedPackageTurboModuleFactoryDelegate : public TurboModuleFactoryDelegate {
16
- // public:
17
- // SharedTurboModule createTurboModule(Context ctx, const std::string &name) const override {
18
- // if (name == "RNGestureHandlerModule") {
19
- // return std::make_shared<RNGestureHandlerModule>(ctx, name);
20
- // }
21
- // return nullptr;
22
- // };
23
- // };
24
- //
25
- // class GeneratedEventEmitRequestHandler : public EventEmitRequestHandler {
26
- // public:
27
- // void handleEvent(Context const &ctx) override {
28
- // auto eventEmitter = ctx.shadowViewRegistry->getEventEmitter<facebook::react::EventEmitter>(ctx.tag);
29
- // if (eventEmitter == nullptr) {
30
- // return;
31
- // }
32
- //
33
- // std::vector<std::string> supportedEventNames = {
34
- // "directEvent",
35
- // "bubblingEvent",
36
- // };
37
- // if (std::find(supportedEventNames.begin(), supportedEventNames.end(), ctx.eventName) != supportedEventNames.end()) {
38
- // eventEmitter->dispatchEvent(ctx.eventName, ArkJS(ctx.env).getDynamic(ctx.payload));
39
- // }
40
- // }
41
- // };
42
- //
43
- // class RNOHGeneratedPackage : public Package {
44
- // public:
45
- // RNOHGeneratedPackage(Package::Context ctx) : Package(ctx){};
46
- //
47
- // std::unique_ptr<TurboModuleFactoryDelegate> createTurboModuleFactoryDelegate() override {
48
- // return std::make_unique<RNOHGeneratedPackageTurboModuleFactoryDelegate>();
49
- // }
50
- //
51
- // std::vector<facebook::react::ComponentDescriptorProvider> createComponentDescriptorProviders() override {
52
- // return {
53
- // facebook::react::concreteComponentDescriptorProvider<facebook::react::RNGestureHandlerButtonComponentDescriptor>(),
54
- // facebook::react::concreteComponentDescriptorProvider<facebook::react::RNGestureHandlerRootViewComponentDescriptor>(),
55
- // };
56
- // }
57
- //
58
- // ComponentJSIBinderByString createComponentJSIBinderByName() override {
59
- // return {
60
- // {"RNGestureHandlerButton", std::make_shared<RNGestureHandlerButtonJSIBinder>()},
61
- // {"RNGestureHandlerRootView", std::make_shared<RNGestureHandlerRootViewJSIBinder>()},
62
- // };
63
- // };
64
- //
65
- // EventEmitRequestHandlers createEventEmitRequestHandlers() override {
66
- // return {
67
- // std::make_shared<GeneratedEventEmitRequestHandler>(),
68
- // };
69
- // }
70
- // };
71
- //
72
- // } // namespace rnoh
@@ -1,78 +0,0 @@
1
- #pragma once
2
- #import "RNOH/CppComponentInstance.h"
3
- #import "RNOH/arkui/StackNode.h"
4
- #import "RNOH/arkui/ArkUINodeRegistry.h"
5
- #import "RNOH/arkui/NativeNodeApi.h"
6
- #import "RNGestureHandlerRootViewComponentDescriptor.h"
7
-
8
- namespace rnoh {
9
- class RNGestureHandlerRootViewComponentInstance
10
- : public CppComponentInstance<facebook::react::RNGestureHandlerRootViewShadowNode>,
11
- public TouchEventHandler {
12
- private:
13
- StackNode m_stackNode;
14
-
15
- public:
16
- RNGestureHandlerRootViewComponentInstance(Context context) : CppComponentInstance(std::move(context)) {
17
- ArkUINodeRegistry::getInstance().registerTouchHandler(&m_stackNode, this);
18
- NativeNodeApi::getInstance()->registerNodeEvent(m_stackNode.getArkUINodeHandle(), NODE_TOUCH_EVENT, 0);
19
- m_deps->arkTSChannel->postMessage("RNGH::ROOT_CREATED", m_tag);
20
- };
21
-
22
- ~RNGestureHandlerRootViewComponentInstance() {
23
- ArkUINodeRegistry::getInstance().unregisterTouchHandler(&m_stackNode);
24
- NativeNodeApi::getInstance()->unregisterNodeEvent(m_stackNode.getArkUINodeHandle(), NODE_TOUCH_EVENT);
25
- }
26
-
27
- StackNode &getLocalRootArkUINode() override { return m_stackNode; };
28
-
29
- void onTouchEvent(ArkUI_NodeTouchEvent e) override {
30
- folly::dynamic payload = folly::dynamic::object;
31
- payload["action"] = static_cast<int>(e.action);
32
- payload["actionTouch"] = this->convertNodeTouchPointToDynamic(e.actionTouch);
33
- folly::dynamic touchPoints = folly::dynamic::array();
34
- touchPoints.push_back(this->convertNodeTouchPointToDynamic(e.actionTouch));
35
- payload["touchPoints"] = touchPoints;
36
- payload["sourceType"] = static_cast<int>(e.sourceType);
37
- payload["timestamp"] = e.timeStamp;
38
- payload["rootTag"] = m_tag;
39
- m_deps->arkTSChannel->postMessage("RNGH::TOUCH_EVENT", payload);
40
- }
41
- private:
42
- folly::dynamic convertNodeTouchPointToDynamic(ArkUI_NodeTouchPoint actionTouch) {
43
- folly::dynamic result = folly::dynamic::object;
44
- result["contactAreaHeight"] = actionTouch.contactAreaHeight;
45
- result["contactAreaWidth"] = actionTouch.contactAreaWidth;
46
- result["id"] = actionTouch.id;
47
- result["nodeX"] = actionTouch.nodeX;
48
- result["nodeY"] = actionTouch.nodeY;
49
- result["pressedTime"] = actionTouch.pressedTime;
50
- result["pressure"] = actionTouch.pressure;
51
- result["rawX"] = actionTouch.rawX;
52
- result["rawY"] = actionTouch.rawY;
53
- result["screenX"] = actionTouch.screenX;
54
- result["screenY"] = actionTouch.screenY;
55
- result["tiltX"] = actionTouch.tiltX;
56
- result["tiltY"] = actionTouch.tiltY;
57
- result["toolHeight"] = actionTouch.toolHeight;
58
- result["toolWidth"] = actionTouch.toolWidth;
59
- result["toolX"] = actionTouch.toolX;
60
- result["toolY"] = actionTouch.toolY;
61
- result["toolType"] = static_cast<int>(actionTouch.toolType);
62
- result["windowX"] = actionTouch.windowX;
63
- result["windowY"] = actionTouch.windowY;
64
- return result;
65
- }
66
-
67
- protected:
68
- void onChildInserted(ComponentInstance::Shared const &childComponentInstance, std::size_t index) override {
69
- CppComponentInstance::onChildInserted(childComponentInstance, index);
70
- m_stackNode.insertChild(childComponentInstance->getLocalRootArkUINode(), index);
71
- };
72
-
73
- void onChildRemoved(ComponentInstance::Shared const &childComponentInstance) override {
74
- CppComponentInstance::onChildRemoved(childComponentInstance);
75
- m_stackNode.removeChild(childComponentInstance->getLocalRootArkUINode());
76
- };
77
- };
78
- } // namespace rnoh
@@ -1,53 +0,0 @@
1
- import { RNInstance } from "@rnoh/react-native-openharmony/ts"
2
- import { GestureStateChangeEvent, GestureUpdateEvent, GestureTouchEvent } from "./OutgoingEvent"
3
- import { RNGHLogger } from './RNGHLogger'
4
-
5
- export interface EventDispatcher {
6
- onGestureHandlerStateChange(event: GestureStateChangeEvent): void
7
- onGestureHandlerEvent(event: GestureStateChangeEvent | GestureUpdateEvent | GestureTouchEvent): void
8
- }
9
-
10
- export class JSEventDispatcher implements EventDispatcher {
11
- constructor(private rnInstance: RNInstance, private logger: RNGHLogger) {
12
- }
13
-
14
- public onGestureHandlerStateChange(event: GestureStateChangeEvent) {
15
- this.logger.info(`onGestureHandlerStateChange`)
16
- this.rnInstance.emitDeviceEvent("onGestureHandlerStateChange", event)
17
- }
18
-
19
- public onGestureHandlerEvent(event: GestureStateChangeEvent | GestureUpdateEvent | GestureTouchEvent) {
20
- this.logger.info(`onGestureHandlerEvent`)
21
- this.rnInstance.emitDeviceEvent("onGestureHandlerEvent", event)
22
- }
23
- }
24
-
25
- export class AnimatedEventDispatcher implements EventDispatcher {
26
- constructor(private rnInstance: RNInstance, private logger: RNGHLogger, private viewTag: number) {
27
- }
28
-
29
- public onGestureHandlerStateChange(event: GestureStateChangeEvent) {
30
- this.logger.info(`onGestureHandlerStateChange`)
31
- this.rnInstance.emitDeviceEvent("onGestureHandlerStateChange", event)
32
- }
33
-
34
- public onGestureHandlerEvent(event: GestureStateChangeEvent | GestureUpdateEvent | GestureTouchEvent) {
35
- this.logger.info(`onGestureHandlerEvent`)
36
- this.rnInstance.emitComponentEvent(this.viewTag, "onGestureHandlerEvent", event)
37
- }
38
- }
39
-
40
- export class ReanimatedEventDispatcher implements EventDispatcher {
41
- constructor(private rnInstance: RNInstance, private logger: RNGHLogger, private viewTag: number) {
42
- }
43
-
44
- public onGestureHandlerStateChange(event: GestureStateChangeEvent) {
45
- this.logger.info(`onGestureHandlerStateChange`)
46
- this.rnInstance.emitComponentEvent(this.viewTag, "onGestureHandlerStateChange", event)
47
- }
48
-
49
- public onGestureHandlerEvent(event: GestureStateChangeEvent | GestureUpdateEvent | GestureTouchEvent) {
50
- this.logger.info(`onGestureHandlerEvent`)
51
- this.rnInstance.emitComponentEvent(this.viewTag, "onGestureHandlerEvent", event)
52
- }
53
- }