@maxr0ssi/glide-web-ui 0.1.1
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/README.md +75 -0
- package/dist/components/GlideDemo.d.ts +16 -0
- package/dist/components/GlideDemo.d.ts.map +1 -0
- package/dist/components/ScrollArea.d.ts +15 -0
- package/dist/components/ScrollArea.d.ts.map +1 -0
- package/dist/components/Visualizer.d.ts +20 -0
- package/dist/components/Visualizer.d.ts.map +1 -0
- package/dist/core/collections.d.ts +22 -0
- package/dist/core/collections.d.ts.map +1 -0
- package/dist/core/config.d.ts +68 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/types.d.ts +35 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/features/alignment.d.ts +36 -0
- package/dist/features/alignment.d.ts.map +1 -0
- package/dist/features/kinematics.d.ts +31 -0
- package/dist/features/kinematics.d.ts.map +1 -0
- package/dist/features/poses.d.ts +14 -0
- package/dist/features/poses.d.ts.map +1 -0
- package/dist/gestures/touchproof-detector.d.ts +37 -0
- package/dist/gestures/touchproof-detector.d.ts.map +1 -0
- package/dist/gestures/touchproof-scoring.d.ts +30 -0
- package/dist/gestures/touchproof-scoring.d.ts.map +1 -0
- package/dist/gestures/touchproof-signals.d.ts +16 -0
- package/dist/gestures/touchproof-signals.d.ts.map +1 -0
- package/dist/gestures/velocity-controller.d.ts +24 -0
- package/dist/gestures/velocity-controller.d.ts.map +1 -0
- package/dist/gestures/velocity-tracker.d.ts +23 -0
- package/dist/gestures/velocity-tracker.d.ts.map +1 -0
- package/dist/glide-demo.cjs.js +15 -0
- package/dist/glide-demo.es.js +4441 -0
- package/dist/hooks/useGlide.d.ts +31 -0
- package/dist/hooks/useGlide.d.ts.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/perception/hand-detector.d.ts +21 -0
- package/dist/perception/hand-detector.d.ts.map +1 -0
- package/package.json +57 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useGlide — core orchestration hook for the Glide gesture pipeline.
|
|
3
|
+
*
|
|
4
|
+
* Manages: getUserMedia → MediaPipe → alignment → kinematics → poses →
|
|
5
|
+
* touchproof → velocity → scroll signals
|
|
6
|
+
*/
|
|
7
|
+
import type { Landmark } from '../core/types';
|
|
8
|
+
import type { AppConfig } from '../core/config';
|
|
9
|
+
import type { TouchProofSignals } from '../gestures/touchproof-signals';
|
|
10
|
+
import type { Vec2D } from '../gestures/velocity-tracker';
|
|
11
|
+
import { GestureState } from '../gestures/velocity-controller';
|
|
12
|
+
export interface UseGlideOptions {
|
|
13
|
+
modelPath?: string;
|
|
14
|
+
config?: Partial<AppConfig>;
|
|
15
|
+
enabled?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface UseGlideReturn {
|
|
18
|
+
videoRef: React.RefObject<HTMLVideoElement | null>;
|
|
19
|
+
canvasRef: React.RefObject<HTMLCanvasElement | null>;
|
|
20
|
+
isReady: boolean;
|
|
21
|
+
isLoading: boolean;
|
|
22
|
+
error: string | null;
|
|
23
|
+
signals: TouchProofSignals;
|
|
24
|
+
velocity: Vec2D | null;
|
|
25
|
+
gestureState: GestureState;
|
|
26
|
+
landmarks: Landmark[] | null;
|
|
27
|
+
fps: number;
|
|
28
|
+
config: AppConfig;
|
|
29
|
+
}
|
|
30
|
+
export declare function useGlide(options?: UseGlideOptions): UseGlideReturn;
|
|
31
|
+
//# sourceMappingURL=useGlide.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGlide.d.ts","sourceRoot":"","sources":["../../src/hooks/useGlide.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAKhD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAGxE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAsB,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAGnF,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IACnD,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACrD,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,QAAQ,EAAE,KAAK,GAAG,IAAI,CAAC;IACvB,YAAY,EAAE,YAAY,CAAC;IAC3B,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,SAAS,CAAC;CACnB;AAED,wBAAgB,QAAQ,CAAC,OAAO,GAAE,eAAoB,GAAG,cAAc,CAmNtE"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { GlideDemo } from './components/GlideDemo';
|
|
2
|
+
export { useGlide } from './hooks/useGlide';
|
|
3
|
+
export type { GlideDemoProps, } from './components/GlideDemo';
|
|
4
|
+
export type { GateState, Landmark, BBox, HandDet, PoseFlags, } from './core/types';
|
|
5
|
+
export type { AppConfig, TouchProofConfig, KinematicsConfig, } from './core/config';
|
|
6
|
+
export type { TouchProofSignals, } from './gestures/touchproof-signals';
|
|
7
|
+
export type { GestureState, VelocityUpdate, } from './gestures/velocity-controller';
|
|
8
|
+
export type { Vec2D, } from './gestures/velocity-tracker';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,YAAY,EACV,cAAc,GACf,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,SAAS,EACT,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,iBAAiB,GAClB,MAAM,+BAA+B,CAAC;AACvC,YAAY,EACV,YAAY,EACZ,cAAc,GACf,MAAM,gCAAgC,CAAC;AACxC,YAAY,EACV,KAAK,GACN,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MediaPipe hand detection wrapper for browser.
|
|
3
|
+
* Uses @mediapipe/tasks-vision HandLandmarker.
|
|
4
|
+
*/
|
|
5
|
+
import type { HandDet } from '../core/types';
|
|
6
|
+
export interface WebHandDetectorOptions {
|
|
7
|
+
modelPath?: string;
|
|
8
|
+
wasmPath?: string;
|
|
9
|
+
numHands?: number;
|
|
10
|
+
minDetectionConfidence?: number;
|
|
11
|
+
minTrackingConfidence?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare class WebHandDetector {
|
|
14
|
+
private landmarker;
|
|
15
|
+
private _ready;
|
|
16
|
+
get isReady(): boolean;
|
|
17
|
+
initialize(options?: WebHandDetectorOptions): Promise<void>;
|
|
18
|
+
detect(video: HTMLVideoElement, timestampMs: number): HandDet | null;
|
|
19
|
+
destroy(): void;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=hand-detector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hand-detector.d.ts","sourceRoot":"","sources":["../../src/perception/hand-detector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAY,MAAM,eAAe,CAAC;AAQvD,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,qBAAa,eAAe;IAC1B,OAAO,CAAC,UAAU,CAA+B;IACjD,OAAO,CAAC,MAAM,CAAS;IAEvB,IAAI,OAAO,IAAI,OAAO,CAErB;IAEK,UAAU,CAAC,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;IAoBjE,MAAM,CAAC,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI;IAwBpE,OAAO,IAAI,IAAI;CAKhB"}
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@maxr0ssi/glide-web-ui",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"registry": "https://registry.npmjs.org",
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/maxr0ssi/Glide.git",
|
|
12
|
+
"directory": "apps/web-ui"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"dev": "vite --port 5175",
|
|
16
|
+
"build": "tsc -b && vite build",
|
|
17
|
+
"build:lib": "vite build --mode lib && tsc -p tsconfig.lib.json",
|
|
18
|
+
"preview": "vite preview",
|
|
19
|
+
"test": "vitest run",
|
|
20
|
+
"test:watch": "vitest",
|
|
21
|
+
"typecheck": "tsc --noEmit",
|
|
22
|
+
"lint": "eslint src --ext .ts,.tsx",
|
|
23
|
+
"prepublishOnly": "npm run build:lib"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@mediapipe/tasks-vision": "^0.10.18",
|
|
27
|
+
"react": "^18.0.0",
|
|
28
|
+
"react-dom": "^18.0.0"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/react": "^18.3.12",
|
|
32
|
+
"@types/react-dom": "^18.3.1",
|
|
33
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
34
|
+
"eslint": "^9.15.0",
|
|
35
|
+
"jsdom": "^27.0.1",
|
|
36
|
+
"typescript": "~5.6.3",
|
|
37
|
+
"vite": "^6.0.3",
|
|
38
|
+
"vitest": "^2.1.8"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"react": "^18.0.0",
|
|
42
|
+
"react-dom": "^18.0.0"
|
|
43
|
+
},
|
|
44
|
+
"files": [
|
|
45
|
+
"dist"
|
|
46
|
+
],
|
|
47
|
+
"main": "./dist/glide-demo.cjs.js",
|
|
48
|
+
"module": "./dist/glide-demo.es.js",
|
|
49
|
+
"types": "./dist/index.d.ts",
|
|
50
|
+
"exports": {
|
|
51
|
+
".": {
|
|
52
|
+
"types": "./dist/index.d.ts",
|
|
53
|
+
"import": "./dist/glide-demo.es.js",
|
|
54
|
+
"require": "./dist/glide-demo.cjs.js"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|