@react-native-oh-tpl/react-native-gesture-handler 2.14.8-rc.1 → 2.14.13
Sign up to get free protection for your applications and to get access to all the features.
- package/DrawerLayout/index.ts +2 -2
- package/Swipeable/index.ts +2 -2
- package/harmony/gesture_handler/BuildProfile.ets +17 -0
- package/harmony/gesture_handler/build-profile.json5 +19 -0
- package/harmony/gesture_handler/hvigorfile.ts +2 -0
- package/harmony/gesture_handler/index.ets +3 -0
- package/harmony/gesture_handler/oh-package-lock.json5 +18 -0
- package/harmony/gesture_handler/oh-package.json5 +12 -0
- package/harmony/gesture_handler/src/main/cpp/CMakeLists.txt +8 -0
- package/harmony/gesture_handler/src/main/cpp/GestureHandlerPackage.cpp +149 -0
- package/harmony/gesture_handler/src/main/cpp/GestureHandlerPackage.h +21 -0
- package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerButtonComponentDescriptor.h +36 -0
- package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerButtonJSIBinder.h +32 -0
- package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerModule.cpp +22 -0
- package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerModule.h +15 -0
- package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerRootViewComponentDescriptor.h +36 -0
- package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerRootViewJSIBinder.h +25 -0
- package/harmony/gesture_handler/src/main/cpp/componentInstances/RNGestureHandlerButtonComponentInstance.h +27 -0
- package/harmony/gesture_handler/src/main/cpp/componentInstances/RNGestureHandlerRootViewComponentInstance.h +242 -0
- package/harmony/gesture_handler/src/main/ets/core/CircularBuffer.ts +42 -0
- package/harmony/gesture_handler/src/main/ets/core/GestureHandler.ts +690 -0
- package/harmony/gesture_handler/src/main/ets/core/GestureHandlerOrchestrator.ts +335 -0
- package/harmony/gesture_handler/src/main/ets/core/GestureHandlerRegistry.ts +63 -0
- package/harmony/gesture_handler/src/main/ets/core/IncomingEvent.ts +78 -0
- package/harmony/gesture_handler/src/main/ets/core/InteractionManager.ts +144 -0
- package/harmony/gesture_handler/src/main/ets/core/LeastSquareSolver.ts +182 -0
- package/harmony/gesture_handler/src/main/ets/core/OutgoingEvent.ts +34 -0
- package/harmony/gesture_handler/src/main/ets/core/OutgoingEventDispatcher.ts +12 -0
- package/harmony/gesture_handler/src/main/ets/core/PointerTracker.ts +239 -0
- package/harmony/gesture_handler/src/main/ets/core/RNGHError.ts +5 -0
- package/harmony/gesture_handler/src/main/ets/core/RNGHLogger.ts +12 -0
- package/harmony/gesture_handler/src/main/ets/core/State.ts +47 -0
- package/harmony/gesture_handler/src/main/ets/core/Vector2D.ts +80 -0
- package/harmony/gesture_handler/src/main/ets/core/VelocityTracker.ts +106 -0
- package/harmony/gesture_handler/src/main/ets/core/View.ts +21 -0
- package/harmony/gesture_handler/src/main/ets/core/ViewFinder.ts +11 -0
- package/harmony/gesture_handler/src/main/ets/core/ViewRegistry.ts +8 -0
- package/harmony/gesture_handler/src/main/ets/core/index.ts +15 -0
- package/harmony/gesture_handler/src/main/ets/detectors/ScaleGestureDetector.ts +169 -0
- package/harmony/gesture_handler/src/main/ets/gesture-handlers/FlingGestureHandler.ts +211 -0
- package/harmony/gesture_handler/src/main/ets/gesture-handlers/GestureHandlerFactory.ts +64 -0
- package/harmony/gesture_handler/src/main/ets/gesture-handlers/LongPressGestureHandler.ts +127 -0
- package/harmony/gesture_handler/src/main/ets/gesture-handlers/ManualGestureHandler.ts +42 -0
- package/harmony/gesture_handler/src/main/ets/gesture-handlers/NativeViewGestureHandler.ts +115 -0
- package/harmony/gesture_handler/src/main/ets/gesture-handlers/PanGestureHandler.ts +342 -0
- package/harmony/gesture_handler/src/main/ets/gesture-handlers/PinchGestureHandler.ts +159 -0
- package/harmony/gesture_handler/src/main/ets/gesture-handlers/RotationGestureHandler.ts +164 -0
- package/harmony/gesture_handler/src/main/ets/gesture-handlers/TapGestureHandler.ts +206 -0
- package/harmony/gesture_handler/src/main/ets/gesture-handlers/detectors/RotationGestureDetector.ts +167 -0
- package/harmony/gesture_handler/src/main/ets/gesture-handlers/index.ts +1 -0
- package/harmony/gesture_handler/src/main/ets/namespace/RNGestureHandlerModule.ts +24 -0
- package/harmony/gesture_handler/src/main/ets/namespace/components/RNGestureHandlerButton.ts +139 -0
- package/harmony/gesture_handler/src/main/ets/namespace/components/RNGestureHandlerRootView.ts +101 -0
- package/harmony/gesture_handler/src/main/ets/namespace/components/ts.ts +2 -0
- package/harmony/gesture_handler/src/main/ets/namespace/ts.ts +2 -0
- package/harmony/gesture_handler/src/main/ets/rnoh/GestureHandlerArkUIAdapter.ts +240 -0
- package/harmony/gesture_handler/src/main/ets/rnoh/GestureHandlerPackage.ts +22 -0
- package/harmony/gesture_handler/src/main/ets/rnoh/Logger.ts +49 -0
- package/harmony/gesture_handler/src/main/ets/rnoh/OutgoingEventDispatchers.ts +71 -0
- package/harmony/gesture_handler/src/main/ets/rnoh/RNGHRootTouchHandlerArkTS.ts +98 -0
- package/harmony/gesture_handler/src/main/ets/rnoh/RNGHRootTouchHandlerCAPI.ts +110 -0
- package/harmony/gesture_handler/src/main/ets/rnoh/RNGestureHandlerButton.ets +38 -0
- package/harmony/gesture_handler/src/main/ets/rnoh/RNGestureHandlerModule.ts +233 -0
- package/harmony/gesture_handler/src/main/ets/rnoh/RNGestureHandlerRootView.ets +53 -0
- package/harmony/gesture_handler/src/main/ets/rnoh/RNOHGestureResponder.ts +24 -0
- package/harmony/gesture_handler/src/main/ets/rnoh/RNOHScrollLocker.ts +32 -0
- package/harmony/gesture_handler/src/main/ets/rnoh/View.ts +134 -0
- package/harmony/gesture_handler/src/main/ets/rnoh/ViewRegistry.ts +97 -0
- package/harmony/gesture_handler/src/main/ets/rnoh/types.ts +25 -0
- package/harmony/gesture_handler/src/main/module.json5 +9 -0
- package/harmony/gesture_handler/src/main/resources/base/element/color.json +8 -0
- package/harmony/gesture_handler/src/main/resources/base/element/string.json +16 -0
- package/harmony/gesture_handler/src/main/resources/base/media/icon.png +0 -0
- package/harmony/gesture_handler/src/main/resources/base/profile/main_pages.json +5 -0
- package/harmony/gesture_handler/src/main/resources/en_US/element/string.json +16 -0
- package/harmony/gesture_handler/src/main/resources/zh_CN/element/string.json +16 -0
- package/harmony/gesture_handler/ts.ts +2 -0
- package/harmony/gesture_handler.har +0 -0
- package/lib/commonjs/RNGestureHandlerModule.js +3 -2
- package/lib/commonjs/RNGestureHandlerModule.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerRootView.js +3 -3
- package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -1
- package/lib/commonjs/handlers/createHandler.js +18 -15
- package/lib/commonjs/handlers/createHandler.js.map +1 -1
- package/lib/commonjs/index.js +36 -8
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.js +2 -1
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.js.map +1 -1
- package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js +3 -2
- package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js +3 -2
- package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -1
- package/lib/module/RNGestureHandlerModule.js.map +1 -1
- package/lib/module/components/GestureHandlerRootView.js.map +1 -1
- package/lib/module/handlers/createHandler.js +15 -12
- package/lib/module/handlers/createHandler.js.map +1 -1
- package/lib/module/index.js +5 -7
- package/lib/module/index.js.map +1 -1
- package/lib/module/specs/NativeRNGestureHandlerModule.js.map +1 -1
- package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -1
- package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -1
- package/lib/typescript/RNGestureHandlerModule.d.ts +2 -2
- package/lib/typescript/components/GestureHandlerRootView.d.ts +6 -6
- package/lib/typescript/handlers/createHandler.d.ts +11 -11
- package/lib/typescript/index.d.ts +47 -42
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts +14 -14
- package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts +14 -14
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts +6 -6
- package/package.json +73 -69
- package/src/RNGestureHandlerModule.ts +4 -4
- package/src/components/GestureHandlerRootView.tsx +23 -23
- package/src/handlers/createHandler.tsx +534 -534
- package/src/index.ts +172 -172
- package/src/specs/NativeRNGestureHandlerModule.ts +26 -26
- package/src/specs/RNGestureHandlerButtonNativeComponent.ts +18 -18
- 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,70 +1,74 @@
|
|
1
|
-
{
|
2
|
-
"name": "@react-native-oh-tpl/react-native-gesture-handler",
|
3
|
-
"harmony": {
|
4
|
-
"alias": "react-native-gesture-handler",
|
5
|
-
"
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
"
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
"
|
17
|
-
"
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
"
|
24
|
-
|
25
|
-
|
26
|
-
"
|
27
|
-
"
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
"@
|
40
|
-
"
|
41
|
-
"@babel/
|
42
|
-
"@
|
43
|
-
"
|
44
|
-
"
|
45
|
-
"
|
46
|
-
"react
|
47
|
-
"
|
48
|
-
|
49
|
-
|
50
|
-
"
|
51
|
-
"
|
52
|
-
|
53
|
-
|
54
|
-
"
|
55
|
-
|
56
|
-
|
57
|
-
"
|
58
|
-
"
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
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
|
+
}
|
70
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
|
+
}
|