npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nexadesk

v1.0.0

Published

Client-side touchless 2D window manager and spatial workspace powered by MediaPipe hand tracking and CSS Glassmorphism.

Readme

NexaDesk

Client-Side Touchless 2D Window Manager & Spatial Computing Framework for React

NPM Version License: AGPL v3 Types: TypeScript React: >=18.0.0


Overview

NexaDesk is a production-grade, client-side spatial computing framework for React and Next.js applications. It translates real-time webcam video feeds into 21 three-dimensional skeletal hand landmarks using Google MediaPipe, smooths high-frequency coordinate tremor with an adaptive One Euro Filter, and executes a deterministic five-state gesture state machine to control a full-featured glassmorphic desktop operating system inside the browser.

The library is designed for zero-server dependency, executing all computer vision inference and window management entirely within the client's browser sandbox.


Key Features

  • Touchless Spatial Gestures: Native detection and classification of Hover, Pinch-to-Click, Window Drag, Dual-Hand Resize, and Fist-Hold Close interactions.
  • Adaptive Jitter Filtering: Integrated One Euro Filter and Linear Interpolation (Lerp) dynamically adjust cutoff frequencies according to instantaneous hand velocity.
  • Glassmorphic Window Management: Complete window lifecycle orchestration including z-index depth sorting, automatic cascading, minimize/restore transitions, and maximize scaling.
  • Modular Subpath Exports: Import only what you need via ./components, ./hooks, ./utils, or the complete desktop bundle.
  • Fallback Hand Simulator: Built-in mouse and keyboard emulation layer allowing complete desktop interaction when camera access is unavailable or disabled.
  • Zero Server Dependency: 100% client-side execution ensures user privacy; no video frames or biometric landmark coordinates are ever transmitted over the network.

Installation

Install the package via your preferred package manager:

npm install nexadesk

Or using pnpm or yarn:

pnpm add nexadesk
# or
yarn add nexadesk

Ensure peer dependencies are satisfied in your project:

npm install react react-dom

Quick Start

Basic Desktop Integration

Import the <NexaDesk /> component and stylesheet into your React or Next.js application:

import React from 'react';
import { NexaDesk } from 'nexadesk';
import 'nexadesk/style.css';

export default function App() {
  return (
    <div style={{ width: '100vw', height: '100vh' }}>
      <NexaDesk
        spatialModeDefault={false}
        initialApps={['control-panel', 'paint']}
        showTaskbar={true}
        showWebcamBubble={true}
        onGestureChange={(state) => {
          console.log('[GESTURE STATE]', state);
        }}
      />
    </div>
  );
}

Modular Subpath Imports

NexaDesk exports dedicated subpaths for granular usage:

1. Root Import (nexadesk)

Exports all components, hooks, utilities, and TypeScript types:

import {
  NexaDesk,
  NexaDesktop,
  NexaCursor,
  WebcamBubble,
  NexaTaskbar,
  useWindowManager,
  useGestureDetector,
  useSpatialTracker,
  OneEuroFilter,
  classifyGesture,
} from 'nexadesk';

2. Hooks (nexadesk/hooks)

Provides custom React hooks for building custom spatial interfaces:

import {
  useWindowManager,
  useGestureDetector,
  useSpatialTracker,
  useHandSimulator,
} from 'nexadesk/hooks';

3. Components (nexadesk/components)

Individual glassmorphic UI components:

import {
  NexaDesk,
  NexaCursor,
  WebcamBubble,
  NexaTaskbar,
  NexaWindow,
  VirtualKeyboard,
  HandSimulatorWidget,
} from 'nexadesk/components';

4. Utilities (nexadesk/utils)

Mathematical algorithms, signal filters, and constants:

import {
  OneEuroFilter,
  lerp,
  euclideanDistance,
  classifyGesture,
  calculateCascadeGeometry,
  GESTURE_STATE,
  DEFAULT_APPS,
} from 'nexadesk/utils';

5. Stylesheets (nexadesk/style.css)

Complete glassmorphism design tokens, keyframe animations, and cursor styles:

@import 'nexadesk/style.css';

Component Props Reference

<NexaDesk /> / <NexaDesktop />

| Prop | Type | Default | Description | | :--- | :--- | :--- | :--- | | className | string | '' | Optional CSS class name applied to root container. | | style | CSSProperties | {} | Optional inline styles applied to root container. | | initialApps | string[] | ['control-panel', 'paint'] | Array of default application window IDs to spawn on mount. | | spatialModeDefault | boolean | false | Initial active state of camera-based spatial tracking. | | showTaskbar | boolean | true | Whether the bottom glassmorphic dock is rendered. | | showWebcamBubble | boolean | true | Whether the floating webcam monitor bubble is visible. | | onGestureChange | (gesture: GestureState) => void | undefined | Callback fired when the classified gesture state changes. | | onWindowOpen | (windowId: string) => void | undefined | Callback fired when an application window opens. | | onWindowClose | (windowId: string) => void | undefined | Callback fired when an application window closes. |


Gesture Control Architecture

+-------------------+     +-------------------------+     +--------------------------+
| Camera Video Feed | --> | MediaPipe Hands WASM    | --> | 21 Skeletal Landmarks    |
+-------------------+     +-------------------------+     +--------------------------+
                                                                       |
                                                                       v
+-------------------+     +-------------------------+     +--------------------------+
| Desktop Action    | <-- | Gesture State Machine   | <-- | OneEuroFilter / Lerp     |
| (Drag/Resize/Win) |     | (Hover/Pinch/Fist/TwoH) |     | (Jitter Smoothing)       |
+-------------------+     +-------------------------+     +--------------------------+

| Gesture | Landmark Detection Criteria | Action | | :--- | :--- | :--- | | Hover | Index Finger Tip (Landmark 8) | Controls spatial cursor coordinates | | Click / Pinch | Euclidean distance $(8, 4) < 0.065$ | Triggers click event or activates control | | Window Drag | Active Pinch maintained within window titlebar | Translates window position across desktop | | Dual-Hand Resize | Distance delta between Index Tips $(8_L, 8_R)$ | Scales width and height of active window | | Fist Close | Finger tips curled over window for $> 1.0\text{s}$ | Fills countdown ring and destroys window |


Privacy & Security

NexaDesk is built with privacy-first engineering standards:

  • Local Execution: All MediaPipe skeletal landmark inference runs client-side via WebAssembly (WASM).
  • Zero Video Transmission: Raw webcam video frames and biometric landmarks never leave the user's browser.
  • Ephemeral Storage: Window geometries, session states, and terminal histories persist only in local localStorage.

Contributing

We welcome community contributions. Please review CONTRIBUTING.md and our CODE_OF_CONDUCT.md before submitting pull requests.


License

This project is licensed under the terms of the GNU Affero General Public License v3.0 (AGPL-3.0).