gesture-kit-drawing 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/CustomShapeGesture.d.ts +11 -0
- package/dist/CustomShapeGesture.js +18 -0
- package/dist/DrawCircleGesture.d.ts +11 -0
- package/dist/DrawCircleGesture.js +18 -0
- package/dist/DrawLetterGesture.d.ts +11 -0
- package/dist/DrawLetterGesture.js +18 -0
- package/dist/DrawLineGesture.d.ts +11 -0
- package/dist/DrawLineGesture.js +18 -0
- package/dist/DrawSquareGesture.d.ts +11 -0
- package/dist/DrawSquareGesture.js +18 -0
- package/dist/DrawStarGesture.d.ts +11 -0
- package/dist/DrawStarGesture.js +18 -0
- package/dist/DrawTriangleGesture.d.ts +11 -0
- package/dist/DrawTriangleGesture.js +18 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/index.js +17 -0
- package/dist/hooks/useCustomShape.d.ts +10 -0
- package/dist/hooks/useCustomShape.js +14 -0
- package/dist/hooks/useDrawCircle.d.ts +10 -0
- package/dist/hooks/useDrawCircle.js +14 -0
- package/dist/hooks/useDrawLetter.d.ts +10 -0
- package/dist/hooks/useDrawLetter.js +14 -0
- package/dist/hooks/useDrawLine.d.ts +10 -0
- package/dist/hooks/useDrawLine.js +14 -0
- package/dist/hooks/useDrawSquare.d.ts +10 -0
- package/dist/hooks/useDrawSquare.js +14 -0
- package/dist/hooks/useDrawStar.d.ts +10 -0
- package/dist/hooks/useDrawStar.js +14 -0
- package/dist/hooks/useDrawTriangle.d.ts +10 -0
- package/dist/hooks/useDrawTriangle.js +14 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +36 -0
- package/dist/types.d.ts +18 -0
- package/dist/types.js +5 -0
- package/package.json +30 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom Shape - Detects custom shape recognition
|
|
3
|
+
* @module gestures
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface CustomShapeGestureProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export declare const CustomShapeGesture: React.FC<CustomShapeGestureProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Custom Shape - Detects custom shape recognition
|
|
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.CustomShapeGesture = void 0;
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const react_native_1 = require("react-native");
|
|
13
|
+
const CustomShapeGesture = ({ children, enabled = true, ...rest }) => {
|
|
14
|
+
// TODO: Implement Custom Shape logic
|
|
15
|
+
return react_1.default.createElement(react_native_1.View, { ...rest }, children);
|
|
16
|
+
};
|
|
17
|
+
exports.CustomShapeGesture = CustomShapeGesture;
|
|
18
|
+
exports.CustomShapeGesture.displayName = 'CustomShapeGesture';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Draw Circle - Detects circle drawing
|
|
3
|
+
* @module gestures
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface DrawCircleGestureProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export declare const DrawCircleGesture: React.FC<DrawCircleGestureProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Draw Circle - Detects circle drawing
|
|
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.DrawCircleGesture = void 0;
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const react_native_1 = require("react-native");
|
|
13
|
+
const DrawCircleGesture = ({ children, enabled = true, ...rest }) => {
|
|
14
|
+
// TODO: Implement Draw Circle logic
|
|
15
|
+
return react_1.default.createElement(react_native_1.View, { ...rest }, children);
|
|
16
|
+
};
|
|
17
|
+
exports.DrawCircleGesture = DrawCircleGesture;
|
|
18
|
+
exports.DrawCircleGesture.displayName = 'DrawCircleGesture';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Draw Letter - Detects letter/symbol drawing
|
|
3
|
+
* @module gestures
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface DrawLetterGestureProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export declare const DrawLetterGesture: React.FC<DrawLetterGestureProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Draw Letter - Detects letter/symbol drawing
|
|
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.DrawLetterGesture = void 0;
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const react_native_1 = require("react-native");
|
|
13
|
+
const DrawLetterGesture = ({ children, enabled = true, ...rest }) => {
|
|
14
|
+
// TODO: Implement Draw Letter logic
|
|
15
|
+
return react_1.default.createElement(react_native_1.View, { ...rest }, children);
|
|
16
|
+
};
|
|
17
|
+
exports.DrawLetterGesture = DrawLetterGesture;
|
|
18
|
+
exports.DrawLetterGesture.displayName = 'DrawLetterGesture';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Draw Line - Detects line drawing
|
|
3
|
+
* @module gestures
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface DrawLineGestureProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export declare const DrawLineGesture: React.FC<DrawLineGestureProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Draw Line - Detects line drawing
|
|
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.DrawLineGesture = void 0;
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const react_native_1 = require("react-native");
|
|
13
|
+
const DrawLineGesture = ({ children, enabled = true, ...rest }) => {
|
|
14
|
+
// TODO: Implement Draw Line logic
|
|
15
|
+
return react_1.default.createElement(react_native_1.View, { ...rest }, children);
|
|
16
|
+
};
|
|
17
|
+
exports.DrawLineGesture = DrawLineGesture;
|
|
18
|
+
exports.DrawLineGesture.displayName = 'DrawLineGesture';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Draw Square - Detects square drawing
|
|
3
|
+
* @module gestures
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface DrawSquareGestureProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export declare const DrawSquareGesture: React.FC<DrawSquareGestureProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Draw Square - Detects square drawing
|
|
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.DrawSquareGesture = void 0;
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const react_native_1 = require("react-native");
|
|
13
|
+
const DrawSquareGesture = ({ children, enabled = true, ...rest }) => {
|
|
14
|
+
// TODO: Implement Draw Square logic
|
|
15
|
+
return react_1.default.createElement(react_native_1.View, { ...rest }, children);
|
|
16
|
+
};
|
|
17
|
+
exports.DrawSquareGesture = DrawSquareGesture;
|
|
18
|
+
exports.DrawSquareGesture.displayName = 'DrawSquareGesture';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Draw Star - Detects star drawing
|
|
3
|
+
* @module gestures
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface DrawStarGestureProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export declare const DrawStarGesture: React.FC<DrawStarGestureProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Draw Star - Detects star drawing
|
|
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.DrawStarGesture = void 0;
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const react_native_1 = require("react-native");
|
|
13
|
+
const DrawStarGesture = ({ children, enabled = true, ...rest }) => {
|
|
14
|
+
// TODO: Implement Draw Star logic
|
|
15
|
+
return react_1.default.createElement(react_native_1.View, { ...rest }, children);
|
|
16
|
+
};
|
|
17
|
+
exports.DrawStarGesture = DrawStarGesture;
|
|
18
|
+
exports.DrawStarGesture.displayName = 'DrawStarGesture';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Draw Triangle - Detects triangle drawing
|
|
3
|
+
* @module gestures
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface DrawTriangleGestureProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export declare const DrawTriangleGesture: React.FC<DrawTriangleGestureProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Draw Triangle - Detects triangle drawing
|
|
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.DrawTriangleGesture = void 0;
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const react_native_1 = require("react-native");
|
|
13
|
+
const DrawTriangleGesture = ({ children, enabled = true, ...rest }) => {
|
|
14
|
+
// TODO: Implement Draw Triangle logic
|
|
15
|
+
return react_1.default.createElement(react_native_1.View, { ...rest }, children);
|
|
16
|
+
};
|
|
17
|
+
exports.DrawTriangleGesture = DrawTriangleGesture;
|
|
18
|
+
exports.DrawTriangleGesture.displayName = 'DrawTriangleGesture';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { useDrawLine } from './useDrawLine';
|
|
2
|
+
export { useDrawCircle } from './useDrawCircle';
|
|
3
|
+
export { useDrawSquare } from './useDrawSquare';
|
|
4
|
+
export { useDrawTriangle } from './useDrawTriangle';
|
|
5
|
+
export { useDrawStar } from './useDrawStar';
|
|
6
|
+
export { useDrawLetter } from './useDrawLetter';
|
|
7
|
+
export { useCustomShape } from './useCustomShape';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCustomShape = exports.useDrawLetter = exports.useDrawStar = exports.useDrawTriangle = exports.useDrawSquare = exports.useDrawCircle = exports.useDrawLine = void 0;
|
|
4
|
+
var useDrawLine_1 = require("./useDrawLine");
|
|
5
|
+
Object.defineProperty(exports, "useDrawLine", { enumerable: true, get: function () { return useDrawLine_1.useDrawLine; } });
|
|
6
|
+
var useDrawCircle_1 = require("./useDrawCircle");
|
|
7
|
+
Object.defineProperty(exports, "useDrawCircle", { enumerable: true, get: function () { return useDrawCircle_1.useDrawCircle; } });
|
|
8
|
+
var useDrawSquare_1 = require("./useDrawSquare");
|
|
9
|
+
Object.defineProperty(exports, "useDrawSquare", { enumerable: true, get: function () { return useDrawSquare_1.useDrawSquare; } });
|
|
10
|
+
var useDrawTriangle_1 = require("./useDrawTriangle");
|
|
11
|
+
Object.defineProperty(exports, "useDrawTriangle", { enumerable: true, get: function () { return useDrawTriangle_1.useDrawTriangle; } });
|
|
12
|
+
var useDrawStar_1 = require("./useDrawStar");
|
|
13
|
+
Object.defineProperty(exports, "useDrawStar", { enumerable: true, get: function () { return useDrawStar_1.useDrawStar; } });
|
|
14
|
+
var useDrawLetter_1 = require("./useDrawLetter");
|
|
15
|
+
Object.defineProperty(exports, "useDrawLetter", { enumerable: true, get: function () { return useDrawLetter_1.useDrawLetter; } });
|
|
16
|
+
var useCustomShape_1 = require("./useCustomShape");
|
|
17
|
+
Object.defineProperty(exports, "useCustomShape", { enumerable: true, get: function () { return useCustomShape_1.useCustomShape; } });
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* useCustomShape - useCustomShape hook
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useCustomShape = useCustomShape;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
function useCustomShape(options = {}) {
|
|
9
|
+
const { enabled = true } = options;
|
|
10
|
+
return (0, react_1.useMemo)(() => {
|
|
11
|
+
// TODO: Implement useCustomShape logic
|
|
12
|
+
return { enabled };
|
|
13
|
+
}, [enabled]);
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* useDrawCircle - useDrawCircle hook
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useDrawCircle = useDrawCircle;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
function useDrawCircle(options = {}) {
|
|
9
|
+
const { enabled = true } = options;
|
|
10
|
+
return (0, react_1.useMemo)(() => {
|
|
11
|
+
// TODO: Implement useDrawCircle logic
|
|
12
|
+
return { enabled };
|
|
13
|
+
}, [enabled]);
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* useDrawLetter - useDrawLetter hook
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useDrawLetter = useDrawLetter;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
function useDrawLetter(options = {}) {
|
|
9
|
+
const { enabled = true } = options;
|
|
10
|
+
return (0, react_1.useMemo)(() => {
|
|
11
|
+
// TODO: Implement useDrawLetter logic
|
|
12
|
+
return { enabled };
|
|
13
|
+
}, [enabled]);
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* useDrawLine - useDrawLine hook
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useDrawLine = useDrawLine;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
function useDrawLine(options = {}) {
|
|
9
|
+
const { enabled = true } = options;
|
|
10
|
+
return (0, react_1.useMemo)(() => {
|
|
11
|
+
// TODO: Implement useDrawLine logic
|
|
12
|
+
return { enabled };
|
|
13
|
+
}, [enabled]);
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* useDrawSquare - useDrawSquare hook
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useDrawSquare = useDrawSquare;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
function useDrawSquare(options = {}) {
|
|
9
|
+
const { enabled = true } = options;
|
|
10
|
+
return (0, react_1.useMemo)(() => {
|
|
11
|
+
// TODO: Implement useDrawSquare logic
|
|
12
|
+
return { enabled };
|
|
13
|
+
}, [enabled]);
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* useDrawStar - useDrawStar hook
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useDrawStar = useDrawStar;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
function useDrawStar(options = {}) {
|
|
9
|
+
const { enabled = true } = options;
|
|
10
|
+
return (0, react_1.useMemo)(() => {
|
|
11
|
+
// TODO: Implement useDrawStar logic
|
|
12
|
+
return { enabled };
|
|
13
|
+
}, [enabled]);
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* useDrawTriangle - useDrawTriangle hook
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useDrawTriangle = useDrawTriangle;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
function useDrawTriangle(options = {}) {
|
|
9
|
+
const { enabled = true } = options;
|
|
10
|
+
return (0, react_1.useMemo)(() => {
|
|
11
|
+
// TODO: Implement useDrawTriangle logic
|
|
12
|
+
return { enabled };
|
|
13
|
+
}, [enabled]);
|
|
14
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './types';
|
|
2
|
+
export { DrawLineGesture } from './DrawLineGesture';
|
|
3
|
+
export { DrawCircleGesture } from './DrawCircleGesture';
|
|
4
|
+
export { DrawSquareGesture } from './DrawSquareGesture';
|
|
5
|
+
export { DrawTriangleGesture } from './DrawTriangleGesture';
|
|
6
|
+
export { DrawStarGesture } from './DrawStarGesture';
|
|
7
|
+
export { DrawLetterGesture } from './DrawLetterGesture';
|
|
8
|
+
export { CustomShapeGesture } from './CustomShapeGesture';
|
|
9
|
+
export * from './hooks';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
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.CustomShapeGesture = exports.DrawLetterGesture = exports.DrawStarGesture = exports.DrawTriangleGesture = exports.DrawSquareGesture = exports.DrawCircleGesture = exports.DrawLineGesture = void 0;
|
|
18
|
+
// Drawing Gestures
|
|
19
|
+
__exportStar(require("./types"), exports);
|
|
20
|
+
// Components
|
|
21
|
+
var DrawLineGesture_1 = require("./DrawLineGesture");
|
|
22
|
+
Object.defineProperty(exports, "DrawLineGesture", { enumerable: true, get: function () { return DrawLineGesture_1.DrawLineGesture; } });
|
|
23
|
+
var DrawCircleGesture_1 = require("./DrawCircleGesture");
|
|
24
|
+
Object.defineProperty(exports, "DrawCircleGesture", { enumerable: true, get: function () { return DrawCircleGesture_1.DrawCircleGesture; } });
|
|
25
|
+
var DrawSquareGesture_1 = require("./DrawSquareGesture");
|
|
26
|
+
Object.defineProperty(exports, "DrawSquareGesture", { enumerable: true, get: function () { return DrawSquareGesture_1.DrawSquareGesture; } });
|
|
27
|
+
var DrawTriangleGesture_1 = require("./DrawTriangleGesture");
|
|
28
|
+
Object.defineProperty(exports, "DrawTriangleGesture", { enumerable: true, get: function () { return DrawTriangleGesture_1.DrawTriangleGesture; } });
|
|
29
|
+
var DrawStarGesture_1 = require("./DrawStarGesture");
|
|
30
|
+
Object.defineProperty(exports, "DrawStarGesture", { enumerable: true, get: function () { return DrawStarGesture_1.DrawStarGesture; } });
|
|
31
|
+
var DrawLetterGesture_1 = require("./DrawLetterGesture");
|
|
32
|
+
Object.defineProperty(exports, "DrawLetterGesture", { enumerable: true, get: function () { return DrawLetterGesture_1.DrawLetterGesture; } });
|
|
33
|
+
var CustomShapeGesture_1 = require("./CustomShapeGesture");
|
|
34
|
+
Object.defineProperty(exports, "CustomShapeGesture", { enumerable: true, get: function () { return CustomShapeGesture_1.CustomShapeGesture; } });
|
|
35
|
+
// Hooks
|
|
36
|
+
__exportStar(require("./hooks"), exports);
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for this gesture category.
|
|
3
|
+
*/
|
|
4
|
+
import type { BaseGestureEvent } from 'gesture-kit-core';
|
|
5
|
+
export interface DrawPoint {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
timestamp: number;
|
|
9
|
+
pressure?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface DrawEvent extends BaseGestureEvent {
|
|
12
|
+
path: DrawPoint[];
|
|
13
|
+
strokeWidth: number;
|
|
14
|
+
}
|
|
15
|
+
export interface ShapeRecognitionEvent extends DrawEvent {
|
|
16
|
+
shape: string;
|
|
17
|
+
confidence: number;
|
|
18
|
+
}
|
package/dist/types.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "gesture-kit-drawing",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Drawing gesture recognition: shapes, letters, custom paths",
|
|
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", "drawing", "shape-recognition"],
|
|
29
|
+
"license": "MIT"
|
|
30
|
+
}
|