@react-native-oh-tpl/react-native-gesture-handler 2.14.7 → 2.14.13

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 (117) hide show
  1. package/DrawerLayout/index.ts +2 -2
  2. package/Swipeable/index.ts +2 -2
  3. package/harmony/gesture_handler/BuildProfile.ets +17 -0
  4. package/harmony/gesture_handler/build-profile.json5 +19 -0
  5. package/harmony/gesture_handler/hvigorfile.ts +2 -0
  6. package/harmony/gesture_handler/index.ets +3 -0
  7. package/harmony/gesture_handler/oh-package-lock.json5 +18 -0
  8. package/harmony/gesture_handler/oh-package.json5 +12 -0
  9. package/harmony/gesture_handler/src/main/cpp/CMakeLists.txt +8 -0
  10. package/harmony/gesture_handler/src/main/cpp/GestureHandlerPackage.cpp +149 -0
  11. package/harmony/gesture_handler/src/main/cpp/GestureHandlerPackage.h +21 -0
  12. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerButtonComponentDescriptor.h +36 -0
  13. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerButtonJSIBinder.h +32 -0
  14. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerModule.cpp +22 -0
  15. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerModule.h +15 -0
  16. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerRootViewComponentDescriptor.h +36 -0
  17. package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerRootViewJSIBinder.h +25 -0
  18. package/harmony/gesture_handler/src/main/cpp/componentInstances/RNGestureHandlerButtonComponentInstance.h +27 -0
  19. package/harmony/gesture_handler/src/main/cpp/componentInstances/RNGestureHandlerRootViewComponentInstance.h +242 -0
  20. package/harmony/gesture_handler/src/main/ets/core/CircularBuffer.ts +42 -0
  21. package/harmony/gesture_handler/src/main/ets/core/GestureHandler.ts +690 -0
  22. package/harmony/gesture_handler/src/main/ets/core/GestureHandlerOrchestrator.ts +335 -0
  23. package/harmony/gesture_handler/src/main/ets/core/GestureHandlerRegistry.ts +63 -0
  24. package/harmony/gesture_handler/src/main/ets/core/IncomingEvent.ts +78 -0
  25. package/harmony/gesture_handler/src/main/ets/core/InteractionManager.ts +144 -0
  26. package/harmony/gesture_handler/src/main/ets/core/LeastSquareSolver.ts +182 -0
  27. package/harmony/gesture_handler/src/main/ets/core/OutgoingEvent.ts +34 -0
  28. package/harmony/gesture_handler/src/main/ets/core/OutgoingEventDispatcher.ts +12 -0
  29. package/harmony/gesture_handler/src/main/ets/core/PointerTracker.ts +239 -0
  30. package/harmony/gesture_handler/src/main/ets/core/RNGHError.ts +5 -0
  31. package/harmony/gesture_handler/src/main/ets/core/RNGHLogger.ts +12 -0
  32. package/harmony/gesture_handler/src/main/ets/core/State.ts +47 -0
  33. package/harmony/gesture_handler/src/main/ets/core/Vector2D.ts +80 -0
  34. package/harmony/gesture_handler/src/main/ets/core/VelocityTracker.ts +106 -0
  35. package/harmony/gesture_handler/src/main/ets/core/View.ts +21 -0
  36. package/harmony/gesture_handler/src/main/ets/core/ViewFinder.ts +11 -0
  37. package/harmony/gesture_handler/src/main/ets/core/ViewRegistry.ts +8 -0
  38. package/harmony/gesture_handler/src/main/ets/core/index.ts +15 -0
  39. package/harmony/gesture_handler/src/main/ets/detectors/ScaleGestureDetector.ts +169 -0
  40. package/harmony/gesture_handler/src/main/ets/gesture-handlers/FlingGestureHandler.ts +211 -0
  41. package/harmony/gesture_handler/src/main/ets/gesture-handlers/GestureHandlerFactory.ts +64 -0
  42. package/harmony/gesture_handler/src/main/ets/gesture-handlers/LongPressGestureHandler.ts +127 -0
  43. package/harmony/gesture_handler/src/main/ets/gesture-handlers/ManualGestureHandler.ts +42 -0
  44. package/harmony/gesture_handler/src/main/ets/gesture-handlers/NativeViewGestureHandler.ts +115 -0
  45. package/harmony/gesture_handler/src/main/ets/gesture-handlers/PanGestureHandler.ts +342 -0
  46. package/harmony/gesture_handler/src/main/ets/gesture-handlers/PinchGestureHandler.ts +159 -0
  47. package/harmony/gesture_handler/src/main/ets/gesture-handlers/RotationGestureHandler.ts +164 -0
  48. package/harmony/gesture_handler/src/main/ets/gesture-handlers/TapGestureHandler.ts +206 -0
  49. package/harmony/gesture_handler/src/main/ets/gesture-handlers/detectors/RotationGestureDetector.ts +167 -0
  50. package/harmony/gesture_handler/src/main/ets/gesture-handlers/index.ts +1 -0
  51. package/harmony/gesture_handler/src/main/ets/namespace/RNGestureHandlerModule.ts +24 -0
  52. package/harmony/gesture_handler/src/main/ets/namespace/components/RNGestureHandlerButton.ts +139 -0
  53. package/harmony/gesture_handler/src/main/ets/namespace/components/RNGestureHandlerRootView.ts +101 -0
  54. package/harmony/gesture_handler/src/main/ets/namespace/components/ts.ts +2 -0
  55. package/harmony/gesture_handler/src/main/ets/namespace/ts.ts +2 -0
  56. package/harmony/gesture_handler/src/main/ets/rnoh/GestureHandlerArkUIAdapter.ts +240 -0
  57. package/harmony/gesture_handler/src/main/ets/rnoh/GestureHandlerPackage.ts +22 -0
  58. package/harmony/gesture_handler/src/main/ets/rnoh/Logger.ts +49 -0
  59. package/harmony/gesture_handler/src/main/ets/rnoh/OutgoingEventDispatchers.ts +71 -0
  60. package/harmony/gesture_handler/src/main/ets/rnoh/RNGHRootTouchHandlerArkTS.ts +98 -0
  61. package/harmony/gesture_handler/src/main/ets/rnoh/RNGHRootTouchHandlerCAPI.ts +110 -0
  62. package/harmony/gesture_handler/src/main/ets/rnoh/RNGestureHandlerButton.ets +38 -0
  63. package/harmony/gesture_handler/src/main/ets/rnoh/RNGestureHandlerModule.ts +233 -0
  64. package/harmony/gesture_handler/src/main/ets/rnoh/RNGestureHandlerRootView.ets +53 -0
  65. package/harmony/gesture_handler/src/main/ets/rnoh/RNOHGestureResponder.ts +24 -0
  66. package/harmony/gesture_handler/src/main/ets/rnoh/RNOHScrollLocker.ts +32 -0
  67. package/harmony/gesture_handler/src/main/ets/rnoh/View.ts +134 -0
  68. package/harmony/gesture_handler/src/main/ets/rnoh/ViewRegistry.ts +97 -0
  69. package/harmony/gesture_handler/src/main/ets/rnoh/types.ts +25 -0
  70. package/harmony/gesture_handler/src/main/module.json5 +9 -0
  71. package/harmony/gesture_handler/src/main/resources/base/element/color.json +8 -0
  72. package/harmony/gesture_handler/src/main/resources/base/element/string.json +16 -0
  73. package/harmony/gesture_handler/src/main/resources/base/media/icon.png +0 -0
  74. package/harmony/gesture_handler/src/main/resources/base/profile/main_pages.json +5 -0
  75. package/harmony/gesture_handler/src/main/resources/en_US/element/string.json +16 -0
  76. package/harmony/gesture_handler/src/main/resources/zh_CN/element/string.json +16 -0
  77. package/harmony/gesture_handler/ts.ts +2 -0
  78. package/harmony/gesture_handler.har +0 -0
  79. package/lib/commonjs/RNGestureHandlerModule.js +3 -2
  80. package/lib/commonjs/RNGestureHandlerModule.js.map +1 -1
  81. package/lib/commonjs/components/GestureHandlerRootView.js +3 -3
  82. package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -1
  83. package/lib/commonjs/handlers/createHandler.js +18 -15
  84. package/lib/commonjs/handlers/createHandler.js.map +1 -1
  85. package/lib/commonjs/index.js +36 -8
  86. package/lib/commonjs/index.js.map +1 -1
  87. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js +2 -1
  88. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js.map +1 -1
  89. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js +3 -2
  90. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -1
  91. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js +3 -2
  92. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -1
  93. package/lib/module/RNGestureHandlerModule.js.map +1 -1
  94. package/lib/module/components/GestureHandlerRootView.js.map +1 -1
  95. package/lib/module/handlers/createHandler.js +15 -12
  96. package/lib/module/handlers/createHandler.js.map +1 -1
  97. package/lib/module/index.js +5 -7
  98. package/lib/module/index.js.map +1 -1
  99. package/lib/module/specs/NativeRNGestureHandlerModule.js.map +1 -1
  100. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -1
  101. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -1
  102. package/lib/typescript/RNGestureHandlerModule.d.ts +2 -2
  103. package/lib/typescript/components/GestureHandlerRootView.d.ts +6 -6
  104. package/lib/typescript/handlers/createHandler.d.ts +11 -11
  105. package/lib/typescript/index.d.ts +47 -42
  106. package/lib/typescript/index.d.ts.map +1 -1
  107. package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts +14 -14
  108. package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts +14 -14
  109. package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts +6 -6
  110. package/package.json +73 -72
  111. package/src/RNGestureHandlerModule.ts +4 -4
  112. package/src/components/GestureHandlerRootView.tsx +23 -23
  113. package/src/handlers/createHandler.tsx +534 -534
  114. package/src/index.ts +172 -172
  115. package/src/specs/NativeRNGestureHandlerModule.ts +26 -26
  116. package/src/specs/RNGestureHandlerButtonNativeComponent.ts +18 -18
  117. package/src/specs/RNGestureHandlerRootViewNativeComponent.ts +6 -6
@@ -1,15 +1,15 @@
1
- /// <reference types="react-native/types/modules/codegen" />
2
- import type { Int32, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
3
- import type { ViewProps, ColorValue } from 'react-native';
4
- interface NativeProps extends ViewProps {
5
- exclusive?: WithDefault<boolean, true>;
6
- foreground?: boolean;
7
- borderless?: boolean;
8
- enabled?: WithDefault<boolean, true>;
9
- rippleColor?: ColorValue;
10
- rippleRadius?: Int32;
11
- touchSoundDisabled?: WithDefault<boolean, false>;
12
- }
13
- declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
14
- export default _default;
1
+ /// <reference types="react-native/types/modules/codegen" />
2
+ import type { Int32, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
3
+ import type { ViewProps, ColorValue } from 'react-native';
4
+ interface NativeProps extends ViewProps {
5
+ exclusive?: WithDefault<boolean, true>;
6
+ foreground?: boolean;
7
+ borderless?: boolean;
8
+ enabled?: WithDefault<boolean, true>;
9
+ rippleColor?: ColorValue;
10
+ rippleRadius?: Int32;
11
+ touchSoundDisabled?: WithDefault<boolean, false>;
12
+ }
13
+ declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
14
+ export default _default;
15
15
  //# sourceMappingURL=RNGestureHandlerButtonNativeComponent.d.ts.map
@@ -1,7 +1,7 @@
1
- /// <reference types="react-native/types/modules/codegen" />
2
- import type { ViewProps } from 'react-native';
3
- interface NativeProps extends ViewProps {
4
- }
5
- declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
6
- export default _default;
1
+ /// <reference types="react-native/types/modules/codegen" />
2
+ import type { ViewProps } from 'react-native';
3
+ interface NativeProps extends ViewProps {
4
+ }
5
+ declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
6
+ export default _default;
7
7
  //# sourceMappingURL=RNGestureHandlerRootViewNativeComponent.d.ts.map
package/package.json CHANGED
@@ -1,73 +1,74 @@
1
- {
2
- "name": "@react-native-oh-tpl/react-native-gesture-handler",
3
- "harmony": {
4
- "alias": "react-native-gesture-handler",
5
- "codegenConfig": {
6
- "specPaths": [
7
- "./src/specs"
8
- ]
9
- },
10
- "redirectInternalImports": true
11
- },
12
- "repository": {
13
- "type": "git",
14
- "url": "https://github.com/react-native-oh-library/react-native-harmony-gesture-handler.git"
15
- },
16
- "version": "2.14.7",
17
- "description": "",
18
- "react-native": "src/index.ts",
19
- "main": "lib/commonjs/index.js",
20
- "module": "lib/module/index.js",
21
- "types": "lib/typescript/index.d.ts",
22
- "scripts": {
23
- "prepack": "bob build",
24
- "test": "jest",
25
- "pack:prod": "npm pack",
26
- "update_version": "node ./scripts/update-version.js",
27
- "deploy": "node ./scripts/deploy.js"
28
- },
29
- "peerDependencies": {
30
- "react": "*",
31
- "react-native": "*",
32
- "react-native-gesture-handler": "2.14.1"
33
- },
34
- "keywords": [],
35
- "author": "",
36
- "license": "ISC",
37
- "devDependencies": {
38
- "@types/hoist-non-react-statics": "^3.3.1",
39
- "react-native-gesture-handler": "2.14.1",
40
- "@babel/core": "^7.12.9",
41
- "@babel/plugin-proposal-class-properties": "^7.12.1",
42
- "@babel/preset-env": "^7.12.11",
43
- "@babel/preset-typescript": "^7.12.7",
44
- "@babel/runtime": "^7.12.5",
45
- "@types/react": "^18.2.18",
46
- "metro-react-native-babel-preset": "^0.64.0",
47
- "react": "^18.2.0",
48
- "react-native": "^0.72.0",
49
- "react-native-builder-bob": "^0.21.3",
50
- "typescript": "4.5.5"
51
- },
52
- "files": [
53
- "harmony",
54
- "src",
55
- "lib",
56
- "DrawerLayout/",
57
- "Swipeable/"
58
- ],
59
- "react-native-builder-bob": {
60
- "source": "src",
61
- "output": "lib",
62
- "targets": [
63
- "commonjs",
64
- "module",
65
- [
66
- "typescript",
67
- {
68
- "project": "tsconfig.build.json"
69
- }
70
- ]
71
- ]
72
- }
1
+ {
2
+ "name": "@react-native-oh-tpl/react-native-gesture-handler",
3
+ "harmony": {
4
+ "alias": "react-native-gesture-handler",
5
+ "codegenConfig": {
6
+ "specPaths": [
7
+ "./src/specs"
8
+ ]
9
+ },
10
+ "redirectInternalImports": true
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/react-native-oh-library/react-native-harmony-gesture-handler.git"
15
+ },
16
+ "version": "2.14.13",
17
+ "description": "",
18
+ "react-native": "src/index.ts",
19
+ "main": "lib/commonjs/index.js",
20
+ "module": "lib/module/index.js",
21
+ "types": "lib/typescript/index.d.ts",
22
+ "scripts": {
23
+ "prepack": "bob build",
24
+ "test": "jest",
25
+ "pack:prod": "npm pack",
26
+ "update_version": "node ./scripts/update-version.js",
27
+ "deploy": "node ./scripts/deploy.js"
28
+ },
29
+ "peerDependencies": {
30
+ "react": "*",
31
+ "react-native": "*",
32
+ "react-native-harmony": "*",
33
+ "react-native-gesture-handler": "2.14.1"
34
+ },
35
+ "keywords": [],
36
+ "author": "",
37
+ "license": "ISC",
38
+ "devDependencies": {
39
+ "@types/hoist-non-react-statics": "^3.3.1",
40
+ "react-native-gesture-handler": "2.14.1",
41
+ "@babel/core": "^7.12.9",
42
+ "@babel/plugin-proposal-class-properties": "^7.12.1",
43
+ "@babel/preset-env": "^7.12.11",
44
+ "@babel/preset-typescript": "^7.12.7",
45
+ "@babel/runtime": "^7.12.5",
46
+ "@types/react": "^18.2.18",
47
+ "metro-react-native-babel-preset": "^0.64.0",
48
+ "react": "^18.2.0",
49
+ "react-native": "^0.72.0",
50
+ "react-native-builder-bob": "^0.21.3",
51
+ "typescript": "4.5.5"
52
+ },
53
+ "files": [
54
+ "./harmony/*",
55
+ "src",
56
+ "lib",
57
+ "DrawerLayout/",
58
+ "Swipeable/"
59
+ ],
60
+ "react-native-builder-bob": {
61
+ "source": "src",
62
+ "output": "lib",
63
+ "targets": [
64
+ "commonjs",
65
+ "module",
66
+ [
67
+ "typescript",
68
+ {
69
+ "project": "tsconfig.build.json"
70
+ }
71
+ ]
72
+ ]
73
+ }
73
74
  }
@@ -1,5 +1,5 @@
1
- import NativeRNGestureHandlerModule from '../src/specs/NativeRNGestureHandlerModule';
2
-
3
- const RNGestureHandlerModule = NativeRNGestureHandlerModule;
4
-
1
+ import NativeRNGestureHandlerModule from '../src/specs/NativeRNGestureHandlerModule';
2
+
3
+ const RNGestureHandlerModule = NativeRNGestureHandlerModule;
4
+
5
5
  export default RNGestureHandlerModule;
@@ -1,23 +1,23 @@
1
- import * as React from 'react';
2
- import { PropsWithChildren } from 'react';
3
- import { ViewProps } from 'react-native';
4
- import { maybeInitializeFabric } from "react-native-gesture-handler/src/init";
5
- import GestureHandlerRootViewContext from 'react-native-gesture-handler/src/GestureHandlerRootViewContext';
6
- import RNGestureHandlerRootViewNativeComponent from '../specs/RNGestureHandlerRootViewNativeComponent';
7
- export interface GestureHandlerRootViewProps
8
- extends PropsWithChildren<ViewProps> {}
9
-
10
- export default function GestureHandlerRootView(
11
- props: GestureHandlerRootViewProps
12
- ) {
13
- // try initialize fabric on the first render, at this point we can
14
- // reliably check if fabric is enabled (the function contains a flag
15
- // to make sure it's called only once)
16
- maybeInitializeFabric();
17
-
18
- return (
19
- <GestureHandlerRootViewContext.Provider value>
20
- <RNGestureHandlerRootViewNativeComponent {...props} />
21
- </GestureHandlerRootViewContext.Provider>
22
- );
23
- }
1
+ import * as React from 'react';
2
+ import { PropsWithChildren } from 'react';
3
+ import { ViewProps } from 'react-native';
4
+ import { maybeInitializeFabric } from "react-native-gesture-handler/src/init";
5
+ import GestureHandlerRootViewContext from 'react-native-gesture-handler/src/GestureHandlerRootViewContext';
6
+ import RNGestureHandlerRootViewNativeComponent from '../specs/RNGestureHandlerRootViewNativeComponent';
7
+ export interface GestureHandlerRootViewProps
8
+ extends PropsWithChildren<ViewProps> {}
9
+
10
+ export default function GestureHandlerRootView(
11
+ props: GestureHandlerRootViewProps
12
+ ) {
13
+ // try initialize fabric on the first render, at this point we can
14
+ // reliably check if fabric is enabled (the function contains a flag
15
+ // to make sure it's called only once)
16
+ maybeInitializeFabric();
17
+
18
+ return (
19
+ <GestureHandlerRootViewContext.Provider value>
20
+ <RNGestureHandlerRootViewNativeComponent {...props} />
21
+ </GestureHandlerRootViewContext.Provider>
22
+ );
23
+ }