gesture-kit-drag-pan 1.0.0
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.
- package/dist/CircularSwipeGesture.d.ts +11 -0
- package/dist/CircularSwipeGesture.js +18 -0
- package/dist/CornerSwipeGesture.d.ts +11 -0
- package/dist/CornerSwipeGesture.js +18 -0
- package/dist/CurvedSwipeGesture.d.ts +11 -0
- package/dist/CurvedSwipeGesture.js +18 -0
- package/dist/DiagonalSwipeGesture.d.ts +11 -0
- package/dist/DiagonalSwipeGesture.js +18 -0
- package/dist/DragAndDropGesture.d.ts +11 -0
- package/dist/DragAndDropGesture.js +18 -0
- package/dist/DragGesture.d.ts +11 -0
- package/dist/DragGesture.js +18 -0
- package/dist/EdgeSwipeGesture.d.ts +11 -0
- package/dist/EdgeSwipeGesture.js +18 -0
- package/dist/PanGesture.d.ts +11 -0
- package/dist/PanGesture.js +18 -0
- package/dist/SwipeDownGesture.d.ts +11 -0
- package/dist/SwipeDownGesture.js +18 -0
- package/dist/SwipeLeftGesture.d.ts +11 -0
- package/dist/SwipeLeftGesture.js +18 -0
- package/dist/SwipeRightGesture.d.ts +11 -0
- package/dist/SwipeRightGesture.js +18 -0
- package/dist/SwipeUpGesture.d.ts +11 -0
- package/dist/SwipeUpGesture.js +18 -0
- package/dist/hooks/index.d.ts +12 -0
- package/dist/hooks/index.js +27 -0
- package/dist/hooks/useCircularSwipe.d.ts +10 -0
- package/dist/hooks/useCircularSwipe.js +14 -0
- package/dist/hooks/useCornerSwipe.d.ts +10 -0
- package/dist/hooks/useCornerSwipe.js +14 -0
- package/dist/hooks/useCurvedSwipe.d.ts +10 -0
- package/dist/hooks/useCurvedSwipe.js +14 -0
- package/dist/hooks/useDiagonalSwipe.d.ts +10 -0
- package/dist/hooks/useDiagonalSwipe.js +14 -0
- package/dist/hooks/useDrag.d.ts +10 -0
- package/dist/hooks/useDrag.js +14 -0
- package/dist/hooks/useDragAndDrop.d.ts +10 -0
- package/dist/hooks/useDragAndDrop.js +14 -0
- package/dist/hooks/useEdgeSwipe.d.ts +10 -0
- package/dist/hooks/useEdgeSwipe.js +14 -0
- package/dist/hooks/usePan.d.ts +10 -0
- package/dist/hooks/usePan.js +14 -0
- package/dist/hooks/useSwipeDown.d.ts +10 -0
- package/dist/hooks/useSwipeDown.js +14 -0
- package/dist/hooks/useSwipeLeft.d.ts +10 -0
- package/dist/hooks/useSwipeLeft.js +14 -0
- package/dist/hooks/useSwipeRight.d.ts +10 -0
- package/dist/hooks/useSwipeRight.js +14 -0
- package/dist/hooks/useSwipeUp.d.ts +10 -0
- package/dist/hooks/useSwipeUp.js +14 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +46 -0
- package/dist/types.d.ts +134 -0
- package/dist/types.js +2 -0
- package/package.json +30 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Circular Swipe Gesture - Detects circular swipe gestures
|
|
3
|
+
* @module gestures
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface CircularSwipeGestureProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export declare const CircularSwipeGesture: React.FC<CircularSwipeGestureProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Circular Swipe Gesture - Detects circular swipe gestures
|
|
4
|
+
* @module gestures
|
|
5
|
+
*/
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.CircularSwipeGesture = void 0;
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const react_native_1 = require("react-native");
|
|
13
|
+
const CircularSwipeGesture = ({ children, enabled = true, ...rest }) => {
|
|
14
|
+
// TODO: Implement Circular Swipe Gesture logic
|
|
15
|
+
return react_1.default.createElement(react_native_1.View, { ...rest }, children);
|
|
16
|
+
};
|
|
17
|
+
exports.CircularSwipeGesture = CircularSwipeGesture;
|
|
18
|
+
exports.CircularSwipeGesture.displayName = 'CircularSwipeGesture';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Corner Swipe Gesture - Detects swipes from screen corners
|
|
3
|
+
* @module gestures
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface CornerSwipeGestureProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export declare const CornerSwipeGesture: React.FC<CornerSwipeGestureProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Corner Swipe Gesture - Detects swipes from screen corners
|
|
4
|
+
* @module gestures
|
|
5
|
+
*/
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.CornerSwipeGesture = void 0;
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const react_native_1 = require("react-native");
|
|
13
|
+
const CornerSwipeGesture = ({ children, enabled = true, ...rest }) => {
|
|
14
|
+
// TODO: Implement Corner Swipe Gesture logic
|
|
15
|
+
return react_1.default.createElement(react_native_1.View, { ...rest }, children);
|
|
16
|
+
};
|
|
17
|
+
exports.CornerSwipeGesture = CornerSwipeGesture;
|
|
18
|
+
exports.CornerSwipeGesture.displayName = 'CornerSwipeGesture';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Curved Swipe Gesture - Detects curved swipe paths
|
|
3
|
+
* @module gestures
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface CurvedSwipeGestureProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export declare const CurvedSwipeGesture: React.FC<CurvedSwipeGestureProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Curved Swipe Gesture - Detects curved swipe paths
|
|
4
|
+
* @module gestures
|
|
5
|
+
*/
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.CurvedSwipeGesture = void 0;
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const react_native_1 = require("react-native");
|
|
13
|
+
const CurvedSwipeGesture = ({ children, enabled = true, ...rest }) => {
|
|
14
|
+
// TODO: Implement Curved Swipe Gesture logic
|
|
15
|
+
return react_1.default.createElement(react_native_1.View, { ...rest }, children);
|
|
16
|
+
};
|
|
17
|
+
exports.CurvedSwipeGesture = CurvedSwipeGesture;
|
|
18
|
+
exports.CurvedSwipeGesture.displayName = 'CurvedSwipeGesture';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diagonal Swipe Gesture - Detects diagonal swipes
|
|
3
|
+
* @module gestures
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface DiagonalSwipeGestureProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export declare const DiagonalSwipeGesture: React.FC<DiagonalSwipeGestureProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Diagonal Swipe Gesture - Detects diagonal swipes
|
|
4
|
+
* @module gestures
|
|
5
|
+
*/
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.DiagonalSwipeGesture = void 0;
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const react_native_1 = require("react-native");
|
|
13
|
+
const DiagonalSwipeGesture = ({ children, enabled = true, ...rest }) => {
|
|
14
|
+
// TODO: Implement Diagonal Swipe Gesture logic
|
|
15
|
+
return react_1.default.createElement(react_native_1.View, { ...rest }, children);
|
|
16
|
+
};
|
|
17
|
+
exports.DiagonalSwipeGesture = DiagonalSwipeGesture;
|
|
18
|
+
exports.DiagonalSwipeGesture.displayName = 'DiagonalSwipeGesture';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drag and Drop Gesture - Detects drag and drop
|
|
3
|
+
* @module gestures
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface DragAndDropGestureProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export declare const DragAndDropGesture: React.FC<DragAndDropGestureProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Drag and Drop Gesture - Detects drag and drop
|
|
4
|
+
* @module gestures
|
|
5
|
+
*/
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.DragAndDropGesture = void 0;
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const react_native_1 = require("react-native");
|
|
13
|
+
const DragAndDropGesture = ({ children, enabled = true, ...rest }) => {
|
|
14
|
+
// TODO: Implement Drag and Drop Gesture logic
|
|
15
|
+
return react_1.default.createElement(react_native_1.View, { ...rest }, children);
|
|
16
|
+
};
|
|
17
|
+
exports.DragAndDropGesture = DragAndDropGesture;
|
|
18
|
+
exports.DragAndDropGesture.displayName = 'DragAndDropGesture';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drag Gesture - Detects drag gestures
|
|
3
|
+
* @module gestures
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface DragGestureProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export declare const DragGesture: React.FC<DragGestureProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Drag Gesture - Detects drag gestures
|
|
4
|
+
* @module gestures
|
|
5
|
+
*/
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.DragGesture = void 0;
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const react_native_1 = require("react-native");
|
|
13
|
+
const DragGesture = ({ children, enabled = true, ...rest }) => {
|
|
14
|
+
// TODO: Implement Drag Gesture logic
|
|
15
|
+
return react_1.default.createElement(react_native_1.View, { ...rest }, children);
|
|
16
|
+
};
|
|
17
|
+
exports.DragGesture = DragGesture;
|
|
18
|
+
exports.DragGesture.displayName = 'DragGesture';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Edge Swipe Gesture - Detects swipes from screen edges
|
|
3
|
+
* @module gestures
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface EdgeSwipeGestureProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export declare const EdgeSwipeGesture: React.FC<EdgeSwipeGestureProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Edge Swipe Gesture - Detects swipes from screen edges
|
|
4
|
+
* @module gestures
|
|
5
|
+
*/
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.EdgeSwipeGesture = void 0;
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const react_native_1 = require("react-native");
|
|
13
|
+
const EdgeSwipeGesture = ({ children, enabled = true, ...rest }) => {
|
|
14
|
+
// TODO: Implement Edge Swipe Gesture logic
|
|
15
|
+
return react_1.default.createElement(react_native_1.View, { ...rest }, children);
|
|
16
|
+
};
|
|
17
|
+
exports.EdgeSwipeGesture = EdgeSwipeGesture;
|
|
18
|
+
exports.EdgeSwipeGesture.displayName = 'EdgeSwipeGesture';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pan Gesture - Detects pan/drag movement
|
|
3
|
+
* @module gestures
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface PanGestureProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export declare const PanGesture: React.FC<PanGestureProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Pan Gesture - Detects pan/drag movement
|
|
4
|
+
* @module gestures
|
|
5
|
+
*/
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.PanGesture = void 0;
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const react_native_1 = require("react-native");
|
|
13
|
+
const PanGesture = ({ children, enabled = true, ...rest }) => {
|
|
14
|
+
// TODO: Implement Pan Gesture logic
|
|
15
|
+
return react_1.default.createElement(react_native_1.View, { ...rest }, children);
|
|
16
|
+
};
|
|
17
|
+
exports.PanGesture = PanGesture;
|
|
18
|
+
exports.PanGesture.displayName = 'PanGesture';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Swipe Down Gesture - Detects downward swipes
|
|
3
|
+
* @module gestures
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface SwipeDownGestureProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export declare const SwipeDownGesture: React.FC<SwipeDownGestureProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Swipe Down Gesture - Detects downward swipes
|
|
4
|
+
* @module gestures
|
|
5
|
+
*/
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.SwipeDownGesture = void 0;
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const react_native_1 = require("react-native");
|
|
13
|
+
const SwipeDownGesture = ({ children, enabled = true, ...rest }) => {
|
|
14
|
+
// TODO: Implement Swipe Down Gesture logic
|
|
15
|
+
return react_1.default.createElement(react_native_1.View, { ...rest }, children);
|
|
16
|
+
};
|
|
17
|
+
exports.SwipeDownGesture = SwipeDownGesture;
|
|
18
|
+
exports.SwipeDownGesture.displayName = 'SwipeDownGesture';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Swipe Left Gesture - Detects leftward swipes
|
|
3
|
+
* @module gestures
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface SwipeLeftGestureProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export declare const SwipeLeftGesture: React.FC<SwipeLeftGestureProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Swipe Left Gesture - Detects leftward swipes
|
|
4
|
+
* @module gestures
|
|
5
|
+
*/
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.SwipeLeftGesture = void 0;
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const react_native_1 = require("react-native");
|
|
13
|
+
const SwipeLeftGesture = ({ children, enabled = true, ...rest }) => {
|
|
14
|
+
// TODO: Implement Swipe Left Gesture logic
|
|
15
|
+
return react_1.default.createElement(react_native_1.View, { ...rest }, children);
|
|
16
|
+
};
|
|
17
|
+
exports.SwipeLeftGesture = SwipeLeftGesture;
|
|
18
|
+
exports.SwipeLeftGesture.displayName = 'SwipeLeftGesture';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Swipe Right Gesture - Detects rightward swipes
|
|
3
|
+
* @module gestures
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface SwipeRightGestureProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export declare const SwipeRightGesture: React.FC<SwipeRightGestureProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Swipe Right Gesture - Detects rightward swipes
|
|
4
|
+
* @module gestures
|
|
5
|
+
*/
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.SwipeRightGesture = void 0;
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const react_native_1 = require("react-native");
|
|
13
|
+
const SwipeRightGesture = ({ children, enabled = true, ...rest }) => {
|
|
14
|
+
// TODO: Implement Swipe Right Gesture logic
|
|
15
|
+
return react_1.default.createElement(react_native_1.View, { ...rest }, children);
|
|
16
|
+
};
|
|
17
|
+
exports.SwipeRightGesture = SwipeRightGesture;
|
|
18
|
+
exports.SwipeRightGesture.displayName = 'SwipeRightGesture';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Swipe Up Gesture - Detects upward swipes
|
|
3
|
+
* @module gestures
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface SwipeUpGestureProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export declare const SwipeUpGesture: React.FC<SwipeUpGestureProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Swipe Up Gesture - Detects upward swipes
|
|
4
|
+
* @module gestures
|
|
5
|
+
*/
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.SwipeUpGesture = void 0;
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const react_native_1 = require("react-native");
|
|
13
|
+
const SwipeUpGesture = ({ children, enabled = true, ...rest }) => {
|
|
14
|
+
// TODO: Implement Swipe Up Gesture logic
|
|
15
|
+
return react_1.default.createElement(react_native_1.View, { ...rest }, children);
|
|
16
|
+
};
|
|
17
|
+
exports.SwipeUpGesture = SwipeUpGesture;
|
|
18
|
+
exports.SwipeUpGesture.displayName = 'SwipeUpGesture';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { usePan } from './usePan';
|
|
2
|
+
export { useDrag } from './useDrag';
|
|
3
|
+
export { useDragAndDrop } from './useDragAndDrop';
|
|
4
|
+
export { useSwipeUp } from './useSwipeUp';
|
|
5
|
+
export { useSwipeDown } from './useSwipeDown';
|
|
6
|
+
export { useSwipeLeft } from './useSwipeLeft';
|
|
7
|
+
export { useSwipeRight } from './useSwipeRight';
|
|
8
|
+
export { useEdgeSwipe } from './useEdgeSwipe';
|
|
9
|
+
export { useCornerSwipe } from './useCornerSwipe';
|
|
10
|
+
export { useDiagonalSwipe } from './useDiagonalSwipe';
|
|
11
|
+
export { useCurvedSwipe } from './useCurvedSwipe';
|
|
12
|
+
export { useCircularSwipe } from './useCircularSwipe';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCircularSwipe = exports.useCurvedSwipe = exports.useDiagonalSwipe = exports.useCornerSwipe = exports.useEdgeSwipe = exports.useSwipeRight = exports.useSwipeLeft = exports.useSwipeDown = exports.useSwipeUp = exports.useDragAndDrop = exports.useDrag = exports.usePan = void 0;
|
|
4
|
+
var usePan_1 = require("./usePan");
|
|
5
|
+
Object.defineProperty(exports, "usePan", { enumerable: true, get: function () { return usePan_1.usePan; } });
|
|
6
|
+
var useDrag_1 = require("./useDrag");
|
|
7
|
+
Object.defineProperty(exports, "useDrag", { enumerable: true, get: function () { return useDrag_1.useDrag; } });
|
|
8
|
+
var useDragAndDrop_1 = require("./useDragAndDrop");
|
|
9
|
+
Object.defineProperty(exports, "useDragAndDrop", { enumerable: true, get: function () { return useDragAndDrop_1.useDragAndDrop; } });
|
|
10
|
+
var useSwipeUp_1 = require("./useSwipeUp");
|
|
11
|
+
Object.defineProperty(exports, "useSwipeUp", { enumerable: true, get: function () { return useSwipeUp_1.useSwipeUp; } });
|
|
12
|
+
var useSwipeDown_1 = require("./useSwipeDown");
|
|
13
|
+
Object.defineProperty(exports, "useSwipeDown", { enumerable: true, get: function () { return useSwipeDown_1.useSwipeDown; } });
|
|
14
|
+
var useSwipeLeft_1 = require("./useSwipeLeft");
|
|
15
|
+
Object.defineProperty(exports, "useSwipeLeft", { enumerable: true, get: function () { return useSwipeLeft_1.useSwipeLeft; } });
|
|
16
|
+
var useSwipeRight_1 = require("./useSwipeRight");
|
|
17
|
+
Object.defineProperty(exports, "useSwipeRight", { enumerable: true, get: function () { return useSwipeRight_1.useSwipeRight; } });
|
|
18
|
+
var useEdgeSwipe_1 = require("./useEdgeSwipe");
|
|
19
|
+
Object.defineProperty(exports, "useEdgeSwipe", { enumerable: true, get: function () { return useEdgeSwipe_1.useEdgeSwipe; } });
|
|
20
|
+
var useCornerSwipe_1 = require("./useCornerSwipe");
|
|
21
|
+
Object.defineProperty(exports, "useCornerSwipe", { enumerable: true, get: function () { return useCornerSwipe_1.useCornerSwipe; } });
|
|
22
|
+
var useDiagonalSwipe_1 = require("./useDiagonalSwipe");
|
|
23
|
+
Object.defineProperty(exports, "useDiagonalSwipe", { enumerable: true, get: function () { return useDiagonalSwipe_1.useDiagonalSwipe; } });
|
|
24
|
+
var useCurvedSwipe_1 = require("./useCurvedSwipe");
|
|
25
|
+
Object.defineProperty(exports, "useCurvedSwipe", { enumerable: true, get: function () { return useCurvedSwipe_1.useCurvedSwipe; } });
|
|
26
|
+
var useCircularSwipe_1 = require("./useCircularSwipe");
|
|
27
|
+
Object.defineProperty(exports, "useCircularSwipe", { enumerable: true, get: function () { return useCircularSwipe_1.useCircularSwipe; } });
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* useCircularSwipe - useCircularSwipe hook
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useCircularSwipe = useCircularSwipe;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
function useCircularSwipe(options = {}) {
|
|
9
|
+
const { enabled = true } = options;
|
|
10
|
+
return (0, react_1.useMemo)(() => {
|
|
11
|
+
// TODO: Implement useCircularSwipe logic
|
|
12
|
+
return { enabled };
|
|
13
|
+
}, [enabled]);
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* useCornerSwipe - useCornerSwipe hook
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useCornerSwipe = useCornerSwipe;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
function useCornerSwipe(options = {}) {
|
|
9
|
+
const { enabled = true } = options;
|
|
10
|
+
return (0, react_1.useMemo)(() => {
|
|
11
|
+
// TODO: Implement useCornerSwipe logic
|
|
12
|
+
return { enabled };
|
|
13
|
+
}, [enabled]);
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* useCurvedSwipe - useCurvedSwipe hook
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useCurvedSwipe = useCurvedSwipe;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
function useCurvedSwipe(options = {}) {
|
|
9
|
+
const { enabled = true } = options;
|
|
10
|
+
return (0, react_1.useMemo)(() => {
|
|
11
|
+
// TODO: Implement useCurvedSwipe logic
|
|
12
|
+
return { enabled };
|
|
13
|
+
}, [enabled]);
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* useDiagonalSwipe - useDiagonalSwipe hook
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useDiagonalSwipe = useDiagonalSwipe;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
function useDiagonalSwipe(options = {}) {
|
|
9
|
+
const { enabled = true } = options;
|
|
10
|
+
return (0, react_1.useMemo)(() => {
|
|
11
|
+
// TODO: Implement useDiagonalSwipe logic
|
|
12
|
+
return { enabled };
|
|
13
|
+
}, [enabled]);
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* useDrag - useDrag hook
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useDrag = useDrag;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
function useDrag(options = {}) {
|
|
9
|
+
const { enabled = true } = options;
|
|
10
|
+
return (0, react_1.useMemo)(() => {
|
|
11
|
+
// TODO: Implement useDrag logic
|
|
12
|
+
return { enabled };
|
|
13
|
+
}, [enabled]);
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* useDragAndDrop - useDragAndDrop hook
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useDragAndDrop = useDragAndDrop;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
function useDragAndDrop(options = {}) {
|
|
9
|
+
const { enabled = true } = options;
|
|
10
|
+
return (0, react_1.useMemo)(() => {
|
|
11
|
+
// TODO: Implement useDragAndDrop logic
|
|
12
|
+
return { enabled };
|
|
13
|
+
}, [enabled]);
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* useEdgeSwipe - useEdgeSwipe hook
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useEdgeSwipe = useEdgeSwipe;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
function useEdgeSwipe(options = {}) {
|
|
9
|
+
const { enabled = true } = options;
|
|
10
|
+
return (0, react_1.useMemo)(() => {
|
|
11
|
+
// TODO: Implement useEdgeSwipe logic
|
|
12
|
+
return { enabled };
|
|
13
|
+
}, [enabled]);
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* usePan - usePan hook
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.usePan = usePan;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
function usePan(options = {}) {
|
|
9
|
+
const { enabled = true } = options;
|
|
10
|
+
return (0, react_1.useMemo)(() => {
|
|
11
|
+
// TODO: Implement usePan logic
|
|
12
|
+
return { enabled };
|
|
13
|
+
}, [enabled]);
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* useSwipeDown - useSwipeDown hook
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useSwipeDown = useSwipeDown;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
function useSwipeDown(options = {}) {
|
|
9
|
+
const { enabled = true } = options;
|
|
10
|
+
return (0, react_1.useMemo)(() => {
|
|
11
|
+
// TODO: Implement useSwipeDown logic
|
|
12
|
+
return { enabled };
|
|
13
|
+
}, [enabled]);
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* useSwipeLeft - useSwipeLeft hook
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useSwipeLeft = useSwipeLeft;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
function useSwipeLeft(options = {}) {
|
|
9
|
+
const { enabled = true } = options;
|
|
10
|
+
return (0, react_1.useMemo)(() => {
|
|
11
|
+
// TODO: Implement useSwipeLeft logic
|
|
12
|
+
return { enabled };
|
|
13
|
+
}, [enabled]);
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* useSwipeRight - useSwipeRight hook
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useSwipeRight = useSwipeRight;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
function useSwipeRight(options = {}) {
|
|
9
|
+
const { enabled = true } = options;
|
|
10
|
+
return (0, react_1.useMemo)(() => {
|
|
11
|
+
// TODO: Implement useSwipeRight logic
|
|
12
|
+
return { enabled };
|
|
13
|
+
}, [enabled]);
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* useSwipeUp - useSwipeUp hook
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useSwipeUp = useSwipeUp;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
function useSwipeUp(options = {}) {
|
|
9
|
+
const { enabled = true } = options;
|
|
10
|
+
return (0, react_1.useMemo)(() => {
|
|
11
|
+
// TODO: Implement useSwipeUp logic
|
|
12
|
+
return { enabled };
|
|
13
|
+
}, [enabled]);
|
|
14
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './types';
|
|
2
|
+
export { PanGesture } from './PanGesture';
|
|
3
|
+
export { DragGesture } from './DragGesture';
|
|
4
|
+
export { DragAndDropGesture } from './DragAndDropGesture';
|
|
5
|
+
export { SwipeUpGesture } from './SwipeUpGesture';
|
|
6
|
+
export { SwipeDownGesture } from './SwipeDownGesture';
|
|
7
|
+
export { SwipeLeftGesture } from './SwipeLeftGesture';
|
|
8
|
+
export { SwipeRightGesture } from './SwipeRightGesture';
|
|
9
|
+
export { EdgeSwipeGesture } from './EdgeSwipeGesture';
|
|
10
|
+
export { CornerSwipeGesture } from './CornerSwipeGesture';
|
|
11
|
+
export { DiagonalSwipeGesture } from './DiagonalSwipeGesture';
|
|
12
|
+
export { CurvedSwipeGesture } from './CurvedSwipeGesture';
|
|
13
|
+
export { CircularSwipeGesture } from './CircularSwipeGesture';
|
|
14
|
+
export * from './hooks';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.CircularSwipeGesture = exports.CurvedSwipeGesture = exports.DiagonalSwipeGesture = exports.CornerSwipeGesture = exports.EdgeSwipeGesture = exports.SwipeRightGesture = exports.SwipeLeftGesture = exports.SwipeDownGesture = exports.SwipeUpGesture = exports.DragAndDropGesture = exports.DragGesture = exports.PanGesture = void 0;
|
|
18
|
+
// Drag & Pan Gestures
|
|
19
|
+
__exportStar(require("./types"), exports);
|
|
20
|
+
// Components
|
|
21
|
+
var PanGesture_1 = require("./PanGesture");
|
|
22
|
+
Object.defineProperty(exports, "PanGesture", { enumerable: true, get: function () { return PanGesture_1.PanGesture; } });
|
|
23
|
+
var DragGesture_1 = require("./DragGesture");
|
|
24
|
+
Object.defineProperty(exports, "DragGesture", { enumerable: true, get: function () { return DragGesture_1.DragGesture; } });
|
|
25
|
+
var DragAndDropGesture_1 = require("./DragAndDropGesture");
|
|
26
|
+
Object.defineProperty(exports, "DragAndDropGesture", { enumerable: true, get: function () { return DragAndDropGesture_1.DragAndDropGesture; } });
|
|
27
|
+
var SwipeUpGesture_1 = require("./SwipeUpGesture");
|
|
28
|
+
Object.defineProperty(exports, "SwipeUpGesture", { enumerable: true, get: function () { return SwipeUpGesture_1.SwipeUpGesture; } });
|
|
29
|
+
var SwipeDownGesture_1 = require("./SwipeDownGesture");
|
|
30
|
+
Object.defineProperty(exports, "SwipeDownGesture", { enumerable: true, get: function () { return SwipeDownGesture_1.SwipeDownGesture; } });
|
|
31
|
+
var SwipeLeftGesture_1 = require("./SwipeLeftGesture");
|
|
32
|
+
Object.defineProperty(exports, "SwipeLeftGesture", { enumerable: true, get: function () { return SwipeLeftGesture_1.SwipeLeftGesture; } });
|
|
33
|
+
var SwipeRightGesture_1 = require("./SwipeRightGesture");
|
|
34
|
+
Object.defineProperty(exports, "SwipeRightGesture", { enumerable: true, get: function () { return SwipeRightGesture_1.SwipeRightGesture; } });
|
|
35
|
+
var EdgeSwipeGesture_1 = require("./EdgeSwipeGesture");
|
|
36
|
+
Object.defineProperty(exports, "EdgeSwipeGesture", { enumerable: true, get: function () { return EdgeSwipeGesture_1.EdgeSwipeGesture; } });
|
|
37
|
+
var CornerSwipeGesture_1 = require("./CornerSwipeGesture");
|
|
38
|
+
Object.defineProperty(exports, "CornerSwipeGesture", { enumerable: true, get: function () { return CornerSwipeGesture_1.CornerSwipeGesture; } });
|
|
39
|
+
var DiagonalSwipeGesture_1 = require("./DiagonalSwipeGesture");
|
|
40
|
+
Object.defineProperty(exports, "DiagonalSwipeGesture", { enumerable: true, get: function () { return DiagonalSwipeGesture_1.DiagonalSwipeGesture; } });
|
|
41
|
+
var CurvedSwipeGesture_1 = require("./CurvedSwipeGesture");
|
|
42
|
+
Object.defineProperty(exports, "CurvedSwipeGesture", { enumerable: true, get: function () { return CurvedSwipeGesture_1.CurvedSwipeGesture; } });
|
|
43
|
+
var CircularSwipeGesture_1 = require("./CircularSwipeGesture");
|
|
44
|
+
Object.defineProperty(exports, "CircularSwipeGesture", { enumerable: true, get: function () { return CircularSwipeGesture_1.CircularSwipeGesture; } });
|
|
45
|
+
// Hooks
|
|
46
|
+
__exportStar(require("./hooks"), exports);
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for Drag/Pan gestures.
|
|
3
|
+
*/
|
|
4
|
+
import type { BaseGestureEvent, BaseGestureProps, SwipeDirection, PanEvent, SwipeEvent, UsePanOptions } from 'gesture-kit-core';
|
|
5
|
+
export type { SwipeDirection, PanEvent, SwipeEvent, UsePanOptions };
|
|
6
|
+
export type EdgePosition = 'top' | 'bottom' | 'left' | 'right';
|
|
7
|
+
export type CornerPosition = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
|
|
8
|
+
export interface DragEvent extends PanEvent {
|
|
9
|
+
state: 'start' | 'move' | 'end';
|
|
10
|
+
}
|
|
11
|
+
export interface DragAndDropEvent extends DragEvent {
|
|
12
|
+
dropTargetId?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface EdgeSwipeEvent extends SwipeEvent {
|
|
15
|
+
edge: EdgePosition;
|
|
16
|
+
}
|
|
17
|
+
export interface CornerSwipeEvent extends SwipeEvent {
|
|
18
|
+
corner: CornerPosition;
|
|
19
|
+
}
|
|
20
|
+
export interface CurvedSwipeEvent extends SwipeEvent {
|
|
21
|
+
curvature: number;
|
|
22
|
+
path: Array<{
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
}>;
|
|
26
|
+
}
|
|
27
|
+
export interface CircularSwipeEvent extends BaseGestureEvent {
|
|
28
|
+
angle: number;
|
|
29
|
+
direction: 'clockwise' | 'counterclockwise';
|
|
30
|
+
revolutions: number;
|
|
31
|
+
}
|
|
32
|
+
export interface PanProps extends BaseGestureProps {
|
|
33
|
+
onPanStart?: (event: PanEvent) => void;
|
|
34
|
+
onPanMove?: (event: PanEvent) => void;
|
|
35
|
+
onPanEnd?: (event: PanEvent) => void;
|
|
36
|
+
minDistance?: number;
|
|
37
|
+
}
|
|
38
|
+
export interface DragProps extends BaseGestureProps {
|
|
39
|
+
onDragStart?: (event: DragEvent) => void;
|
|
40
|
+
onDrag?: (event: DragEvent) => void;
|
|
41
|
+
onDragEnd?: (event: DragEvent) => void;
|
|
42
|
+
}
|
|
43
|
+
export interface DragAndDropProps extends BaseGestureProps {
|
|
44
|
+
onDragStart?: (event: DragAndDropEvent) => void;
|
|
45
|
+
onDrag?: (event: DragAndDropEvent) => void;
|
|
46
|
+
onDrop?: (event: DragAndDropEvent) => void;
|
|
47
|
+
}
|
|
48
|
+
export interface SwipeProps extends BaseGestureProps {
|
|
49
|
+
onSwipe: (event: SwipeEvent) => void;
|
|
50
|
+
direction?: SwipeDirection;
|
|
51
|
+
threshold?: number;
|
|
52
|
+
velocityThreshold?: number;
|
|
53
|
+
}
|
|
54
|
+
export interface EdgeSwipeProps extends BaseGestureProps {
|
|
55
|
+
onEdgeSwipe: (event: EdgeSwipeEvent) => void;
|
|
56
|
+
edge?: EdgePosition;
|
|
57
|
+
edgeWidth?: number;
|
|
58
|
+
}
|
|
59
|
+
export interface CornerSwipeProps extends BaseGestureProps {
|
|
60
|
+
onCornerSwipe: (event: CornerSwipeEvent) => void;
|
|
61
|
+
corner?: CornerPosition;
|
|
62
|
+
cornerSize?: number;
|
|
63
|
+
}
|
|
64
|
+
export interface DiagonalSwipeProps extends BaseGestureProps {
|
|
65
|
+
onDiagonalSwipe: (event: SwipeEvent) => void;
|
|
66
|
+
threshold?: number;
|
|
67
|
+
}
|
|
68
|
+
export interface CurvedSwipeProps extends BaseGestureProps {
|
|
69
|
+
onCurvedSwipe: (event: CurvedSwipeEvent) => void;
|
|
70
|
+
minCurvature?: number;
|
|
71
|
+
}
|
|
72
|
+
export interface CircularSwipeProps extends BaseGestureProps {
|
|
73
|
+
onCircularSwipe: (event: CircularSwipeEvent) => void;
|
|
74
|
+
minAngle?: number;
|
|
75
|
+
}
|
|
76
|
+
export interface UseDragOptions {
|
|
77
|
+
onDragStart?: (e: DragEvent) => void;
|
|
78
|
+
onDrag?: (e: DragEvent) => void;
|
|
79
|
+
onDragEnd?: (e: DragEvent) => void;
|
|
80
|
+
enabled?: boolean;
|
|
81
|
+
}
|
|
82
|
+
export interface UseDragAndDropOptions {
|
|
83
|
+
onDragStart?: (e: DragAndDropEvent) => void;
|
|
84
|
+
onDrag?: (e: DragAndDropEvent) => void;
|
|
85
|
+
onDrop?: (e: DragAndDropEvent) => void;
|
|
86
|
+
enabled?: boolean;
|
|
87
|
+
}
|
|
88
|
+
export interface UseSwipeUpOptions {
|
|
89
|
+
onSwipeUp: (e: SwipeEvent) => void;
|
|
90
|
+
threshold?: number;
|
|
91
|
+
enabled?: boolean;
|
|
92
|
+
}
|
|
93
|
+
export interface UseSwipeDownOptions {
|
|
94
|
+
onSwipeDown: (e: SwipeEvent) => void;
|
|
95
|
+
threshold?: number;
|
|
96
|
+
enabled?: boolean;
|
|
97
|
+
}
|
|
98
|
+
export interface UseSwipeLeftOptions {
|
|
99
|
+
onSwipeLeft: (e: SwipeEvent) => void;
|
|
100
|
+
threshold?: number;
|
|
101
|
+
enabled?: boolean;
|
|
102
|
+
}
|
|
103
|
+
export interface UseSwipeRightOptions {
|
|
104
|
+
onSwipeRight: (e: SwipeEvent) => void;
|
|
105
|
+
threshold?: number;
|
|
106
|
+
enabled?: boolean;
|
|
107
|
+
}
|
|
108
|
+
export interface UseEdgeSwipeOptions {
|
|
109
|
+
onEdgeSwipe: (e: EdgeSwipeEvent) => void;
|
|
110
|
+
edge?: EdgePosition;
|
|
111
|
+
edgeWidth?: number;
|
|
112
|
+
enabled?: boolean;
|
|
113
|
+
}
|
|
114
|
+
export interface UseCornerSwipeOptions {
|
|
115
|
+
onCornerSwipe: (e: CornerSwipeEvent) => void;
|
|
116
|
+
corner?: CornerPosition;
|
|
117
|
+
cornerSize?: number;
|
|
118
|
+
enabled?: boolean;
|
|
119
|
+
}
|
|
120
|
+
export interface UseDiagonalSwipeOptions {
|
|
121
|
+
onDiagonalSwipe: (e: SwipeEvent) => void;
|
|
122
|
+
threshold?: number;
|
|
123
|
+
enabled?: boolean;
|
|
124
|
+
}
|
|
125
|
+
export interface UseCurvedSwipeOptions {
|
|
126
|
+
onCurvedSwipe: (e: CurvedSwipeEvent) => void;
|
|
127
|
+
minCurvature?: number;
|
|
128
|
+
enabled?: boolean;
|
|
129
|
+
}
|
|
130
|
+
export interface UseCircularSwipeOptions {
|
|
131
|
+
onCircularSwipe: (e: CircularSwipeEvent) => void;
|
|
132
|
+
minAngle?: number;
|
|
133
|
+
enabled?: boolean;
|
|
134
|
+
}
|
package/dist/types.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "gesture-kit-drag-pan",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Drag, pan, and swipe gesture components and hooks",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": ["dist", "README.md"],
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "tsc",
|
|
10
|
+
"prepare": "npm run build",
|
|
11
|
+
"typecheck": "tsc --noEmit"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"gesture-kit-core": "^1.0.0"
|
|
15
|
+
},
|
|
16
|
+
"peerDependencies": {
|
|
17
|
+
"react": ">=18.0.0",
|
|
18
|
+
"react-native": ">=0.71.0",
|
|
19
|
+
"react-native-gesture-handler": ">=2.10.0"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@types/react": "^18.2.0",
|
|
23
|
+
"react": "^18.2.0",
|
|
24
|
+
"react-native": "^0.73.11",
|
|
25
|
+
"react-native-gesture-handler": "^2.30.0",
|
|
26
|
+
"typescript": "^5.9.3"
|
|
27
|
+
},
|
|
28
|
+
"keywords": ["react-native", "gesture", "drag", "pan", "swipe"],
|
|
29
|
+
"license": "MIT"
|
|
30
|
+
}
|