gesture-kit-body 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.
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Body Pose Gesture - Detects full body poses
3
+ * @module gestures
4
+ */
5
+ import React from 'react';
6
+ export interface BodyPoseGestureProps {
7
+ children: React.ReactNode;
8
+ enabled?: boolean;
9
+ [key: string]: any;
10
+ }
11
+ export declare const BodyPoseGesture: React.FC<BodyPoseGestureProps>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /**
3
+ * Body Pose Gesture - Detects full body poses
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.BodyPoseGesture = void 0;
11
+ const react_1 = __importDefault(require("react"));
12
+ const react_native_1 = require("react-native");
13
+ const BodyPoseGesture = ({ children, enabled = true, ...rest }) => {
14
+ // TODO: Implement Body Pose Gesture logic
15
+ return react_1.default.createElement(react_native_1.View, { ...rest }, children);
16
+ };
17
+ exports.BodyPoseGesture = BodyPoseGesture;
18
+ exports.BodyPoseGesture.displayName = 'BodyPoseGesture';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Clap Gesture - Detects clapping
3
+ * @module gestures
4
+ */
5
+ import React from 'react';
6
+ export interface ClapGestureProps {
7
+ children: React.ReactNode;
8
+ enabled?: boolean;
9
+ [key: string]: any;
10
+ }
11
+ export declare const ClapGesture: React.FC<ClapGestureProps>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /**
3
+ * Clap Gesture - Detects clapping
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.ClapGesture = void 0;
11
+ const react_1 = __importDefault(require("react"));
12
+ const react_native_1 = require("react-native");
13
+ const ClapGesture = ({ children, enabled = true, ...rest }) => {
14
+ // TODO: Implement Clap Gesture logic
15
+ return react_1.default.createElement(react_native_1.View, { ...rest }, children);
16
+ };
17
+ exports.ClapGesture = ClapGesture;
18
+ exports.ClapGesture.displayName = 'ClapGesture';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Head Nod Gesture - Detects head nod
3
+ * @module gestures
4
+ */
5
+ import React from 'react';
6
+ export interface HeadNodGestureProps {
7
+ children: React.ReactNode;
8
+ enabled?: boolean;
9
+ [key: string]: any;
10
+ }
11
+ export declare const HeadNodGesture: React.FC<HeadNodGestureProps>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /**
3
+ * Head Nod Gesture - Detects head nod
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.HeadNodGesture = void 0;
11
+ const react_1 = __importDefault(require("react"));
12
+ const react_native_1 = require("react-native");
13
+ const HeadNodGesture = ({ children, enabled = true, ...rest }) => {
14
+ // TODO: Implement Head Nod Gesture logic
15
+ return react_1.default.createElement(react_native_1.View, { ...rest }, children);
16
+ };
17
+ exports.HeadNodGesture = HeadNodGesture;
18
+ exports.HeadNodGesture.displayName = 'HeadNodGesture';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Head Shake Gesture - Detects head shake
3
+ * @module gestures
4
+ */
5
+ import React from 'react';
6
+ export interface HeadShakeGestureProps {
7
+ children: React.ReactNode;
8
+ enabled?: boolean;
9
+ [key: string]: any;
10
+ }
11
+ export declare const HeadShakeGesture: React.FC<HeadShakeGestureProps>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /**
3
+ * Head Shake Gesture - Detects head shake
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.HeadShakeGesture = void 0;
11
+ const react_1 = __importDefault(require("react"));
12
+ const react_native_1 = require("react-native");
13
+ const HeadShakeGesture = ({ children, enabled = true, ...rest }) => {
14
+ // TODO: Implement Head Shake Gesture logic
15
+ return react_1.default.createElement(react_native_1.View, { ...rest }, children);
16
+ };
17
+ exports.HeadShakeGesture = HeadShakeGesture;
18
+ exports.HeadShakeGesture.displayName = 'HeadShakeGesture';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Raise Hand Gesture - Detects raised hand
3
+ * @module gestures
4
+ */
5
+ import React from 'react';
6
+ export interface RaiseHandGestureProps {
7
+ children: React.ReactNode;
8
+ enabled?: boolean;
9
+ [key: string]: any;
10
+ }
11
+ export declare const RaiseHandGesture: React.FC<RaiseHandGestureProps>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /**
3
+ * Raise Hand Gesture - Detects raised hand
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.RaiseHandGesture = void 0;
11
+ const react_1 = __importDefault(require("react"));
12
+ const react_native_1 = require("react-native");
13
+ const RaiseHandGesture = ({ children, enabled = true, ...rest }) => {
14
+ // TODO: Implement Raise Hand Gesture logic
15
+ return react_1.default.createElement(react_native_1.View, { ...rest }, children);
16
+ };
17
+ exports.RaiseHandGesture = RaiseHandGesture;
18
+ exports.RaiseHandGesture.displayName = 'RaiseHandGesture';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Step Gesture - Detects step gestures
3
+ * @module gestures
4
+ */
5
+ import React from 'react';
6
+ export interface StepGestureProps {
7
+ children: React.ReactNode;
8
+ enabled?: boolean;
9
+ [key: string]: any;
10
+ }
11
+ export declare const StepGesture: React.FC<StepGestureProps>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /**
3
+ * Step Gesture - Detects step 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.StepGesture = void 0;
11
+ const react_1 = __importDefault(require("react"));
12
+ const react_native_1 = require("react-native");
13
+ const StepGesture = ({ children, enabled = true, ...rest }) => {
14
+ // TODO: Implement Step Gesture logic
15
+ return react_1.default.createElement(react_native_1.View, { ...rest }, children);
16
+ };
17
+ exports.StepGesture = StepGesture;
18
+ exports.StepGesture.displayName = 'StepGesture';
@@ -0,0 +1,6 @@
1
+ export { useHeadNod } from './useHeadNod';
2
+ export { useHeadShake } from './useHeadShake';
3
+ export { useRaiseHand } from './useRaiseHand';
4
+ export { useClap } from './useClap';
5
+ export { useStep } from './useStep';
6
+ export { useBodyPose } from './useBodyPose';
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useBodyPose = exports.useStep = exports.useClap = exports.useRaiseHand = exports.useHeadShake = exports.useHeadNod = void 0;
4
+ var useHeadNod_1 = require("./useHeadNod");
5
+ Object.defineProperty(exports, "useHeadNod", { enumerable: true, get: function () { return useHeadNod_1.useHeadNod; } });
6
+ var useHeadShake_1 = require("./useHeadShake");
7
+ Object.defineProperty(exports, "useHeadShake", { enumerable: true, get: function () { return useHeadShake_1.useHeadShake; } });
8
+ var useRaiseHand_1 = require("./useRaiseHand");
9
+ Object.defineProperty(exports, "useRaiseHand", { enumerable: true, get: function () { return useRaiseHand_1.useRaiseHand; } });
10
+ var useClap_1 = require("./useClap");
11
+ Object.defineProperty(exports, "useClap", { enumerable: true, get: function () { return useClap_1.useClap; } });
12
+ var useStep_1 = require("./useStep");
13
+ Object.defineProperty(exports, "useStep", { enumerable: true, get: function () { return useStep_1.useStep; } });
14
+ var useBodyPose_1 = require("./useBodyPose");
15
+ Object.defineProperty(exports, "useBodyPose", { enumerable: true, get: function () { return useBodyPose_1.useBodyPose; } });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * useBodyPose - useBodyPose hook
3
+ */
4
+ export interface useBodyPoseOptions {
5
+ enabled?: boolean;
6
+ [key: string]: any;
7
+ }
8
+ export declare function useBodyPose(options?: useBodyPoseOptions): {
9
+ enabled: boolean;
10
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ * useBodyPose - useBodyPose hook
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.useBodyPose = useBodyPose;
7
+ const react_1 = require("react");
8
+ function useBodyPose(options = {}) {
9
+ const { enabled = true } = options;
10
+ return (0, react_1.useMemo)(() => {
11
+ // TODO: Implement useBodyPose logic
12
+ return { enabled };
13
+ }, [enabled]);
14
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * useClap - useClap hook
3
+ */
4
+ export interface useClapOptions {
5
+ enabled?: boolean;
6
+ [key: string]: any;
7
+ }
8
+ export declare function useClap(options?: useClapOptions): {
9
+ enabled: boolean;
10
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ * useClap - useClap hook
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.useClap = useClap;
7
+ const react_1 = require("react");
8
+ function useClap(options = {}) {
9
+ const { enabled = true } = options;
10
+ return (0, react_1.useMemo)(() => {
11
+ // TODO: Implement useClap logic
12
+ return { enabled };
13
+ }, [enabled]);
14
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * useHeadNod - useHeadNod hook
3
+ */
4
+ export interface useHeadNodOptions {
5
+ enabled?: boolean;
6
+ [key: string]: any;
7
+ }
8
+ export declare function useHeadNod(options?: useHeadNodOptions): {
9
+ enabled: boolean;
10
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ * useHeadNod - useHeadNod hook
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.useHeadNod = useHeadNod;
7
+ const react_1 = require("react");
8
+ function useHeadNod(options = {}) {
9
+ const { enabled = true } = options;
10
+ return (0, react_1.useMemo)(() => {
11
+ // TODO: Implement useHeadNod logic
12
+ return { enabled };
13
+ }, [enabled]);
14
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * useHeadShake - useHeadShake hook
3
+ */
4
+ export interface useHeadShakeOptions {
5
+ enabled?: boolean;
6
+ [key: string]: any;
7
+ }
8
+ export declare function useHeadShake(options?: useHeadShakeOptions): {
9
+ enabled: boolean;
10
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ * useHeadShake - useHeadShake hook
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.useHeadShake = useHeadShake;
7
+ const react_1 = require("react");
8
+ function useHeadShake(options = {}) {
9
+ const { enabled = true } = options;
10
+ return (0, react_1.useMemo)(() => {
11
+ // TODO: Implement useHeadShake logic
12
+ return { enabled };
13
+ }, [enabled]);
14
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * useRaiseHand - useRaiseHand hook
3
+ */
4
+ export interface useRaiseHandOptions {
5
+ enabled?: boolean;
6
+ [key: string]: any;
7
+ }
8
+ export declare function useRaiseHand(options?: useRaiseHandOptions): {
9
+ enabled: boolean;
10
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ * useRaiseHand - useRaiseHand hook
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.useRaiseHand = useRaiseHand;
7
+ const react_1 = require("react");
8
+ function useRaiseHand(options = {}) {
9
+ const { enabled = true } = options;
10
+ return (0, react_1.useMemo)(() => {
11
+ // TODO: Implement useRaiseHand logic
12
+ return { enabled };
13
+ }, [enabled]);
14
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * useStep - useStep hook
3
+ */
4
+ export interface useStepOptions {
5
+ enabled?: boolean;
6
+ [key: string]: any;
7
+ }
8
+ export declare function useStep(options?: useStepOptions): {
9
+ enabled: boolean;
10
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ * useStep - useStep hook
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.useStep = useStep;
7
+ const react_1 = require("react");
8
+ function useStep(options = {}) {
9
+ const { enabled = true } = options;
10
+ return (0, react_1.useMemo)(() => {
11
+ // TODO: Implement useStep logic
12
+ return { enabled };
13
+ }, [enabled]);
14
+ }
@@ -0,0 +1,8 @@
1
+ export * from './types';
2
+ export { HeadNodGesture } from './HeadNodGesture';
3
+ export { HeadShakeGesture } from './HeadShakeGesture';
4
+ export { RaiseHandGesture } from './RaiseHandGesture';
5
+ export { ClapGesture } from './ClapGesture';
6
+ export { StepGesture } from './StepGesture';
7
+ export { BodyPoseGesture } from './BodyPoseGesture';
8
+ export * from './hooks';
package/dist/index.js ADDED
@@ -0,0 +1,34 @@
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.BodyPoseGesture = exports.StepGesture = exports.ClapGesture = exports.RaiseHandGesture = exports.HeadShakeGesture = exports.HeadNodGesture = void 0;
18
+ // Body Gestures
19
+ __exportStar(require("./types"), exports);
20
+ // Components
21
+ var HeadNodGesture_1 = require("./HeadNodGesture");
22
+ Object.defineProperty(exports, "HeadNodGesture", { enumerable: true, get: function () { return HeadNodGesture_1.HeadNodGesture; } });
23
+ var HeadShakeGesture_1 = require("./HeadShakeGesture");
24
+ Object.defineProperty(exports, "HeadShakeGesture", { enumerable: true, get: function () { return HeadShakeGesture_1.HeadShakeGesture; } });
25
+ var RaiseHandGesture_1 = require("./RaiseHandGesture");
26
+ Object.defineProperty(exports, "RaiseHandGesture", { enumerable: true, get: function () { return RaiseHandGesture_1.RaiseHandGesture; } });
27
+ var ClapGesture_1 = require("./ClapGesture");
28
+ Object.defineProperty(exports, "ClapGesture", { enumerable: true, get: function () { return ClapGesture_1.ClapGesture; } });
29
+ var StepGesture_1 = require("./StepGesture");
30
+ Object.defineProperty(exports, "StepGesture", { enumerable: true, get: function () { return StepGesture_1.StepGesture; } });
31
+ var BodyPoseGesture_1 = require("./BodyPoseGesture");
32
+ Object.defineProperty(exports, "BodyPoseGesture", { enumerable: true, get: function () { return BodyPoseGesture_1.BodyPoseGesture; } });
33
+ // Hooks
34
+ __exportStar(require("./hooks"), exports);
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Type definitions for this gesture category.
3
+ */
4
+ import type { BaseGestureEvent } from 'gesture-kit-core';
5
+ export interface BodyEvent extends BaseGestureEvent {
6
+ confidence: number;
7
+ }
8
+ export interface HeadEvent extends BodyEvent {
9
+ direction: 'nod' | 'shake';
10
+ angle: number;
11
+ }
12
+ export interface PoseEvent extends BodyEvent {
13
+ poseName: string;
14
+ landmarks: Array<{
15
+ x: number;
16
+ y: number;
17
+ z: number;
18
+ }>;
19
+ }
20
+ export interface ClapEvent extends BodyEvent {
21
+ intensity: number;
22
+ }
package/dist/types.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * Type definitions for this gesture category.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "gesture-kit-body",
3
+ "version": "1.0.0",
4
+ "description": "Body gesture recognition: head nod, clap, body pose detection",
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
+ "peerDependenciesMeta": {
22
+ "@mediapipe/pose": { "optional": true },
23
+ "react-native-camera": { "optional": true }
24
+ },
25
+ "devDependencies": {
26
+ "@types/react": "^18.2.0",
27
+ "react": "^18.2.0",
28
+ "react-native": "^0.73.11",
29
+ "react-native-gesture-handler": "^2.30.0",
30
+ "typescript": "^5.9.3"
31
+ },
32
+ "keywords": ["react-native", "gesture", "body", "pose", "head-tracking"],
33
+ "license": "MIT"
34
+ }