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

@3mo/pointer-controller

v1.6.1

Published

Lit controllers for pointer hover, press and type, and for turning presses into drags and held repeats.

Readme

Pointer Controller

Lit controllers for pointer hover, press and type, and for turning presses into drags and held repeats.

npm Documentation

Installation

npm install @3mo/pointer-controller
import {
	PointerDragController,
	PointerHoverController,
	PointerRepeatController,
	PointerController,
} from '@3mo/pointer-controller'

Examples

  • Default — Hover and press the area with a mouse, a pen or a finger: it reports all three.
  • Hover Under Layout Shift — Hover follows the boundary events, which also fire when the layout moves the box under a resting pointer - rest it where the box's edge passes.

Pointer Drag Controller

  • Default — A press becomes a drag once it has travelled 4px, so a click still counts - and dropping the card never clicks it.
  • Resize Handle — With threshold: 0 the press itself is the drag, captured at once, so the handle keeps following outside the frame.
  • Along One Axis — isDrag is asked on a press's first movement: sideways slides a row open to its action, up or down leaves the list to scroll.

Pointer Repeat Controller

  • Default — Hold + down: after 500ms it keeps stepping.
  • Press Only — Ignoring the repetitions, a held pointer steps once - while a held Enter still repeats.
  • Acceleration — The trigger receives the number of triggers before it, so a long hold can widen the step from 1 to 10 to 100 - the policy is the consumer's.
  • Stopping At A Bound — Hold + past 10: stop() ends the repetition at the bound while the press is still down, so nothing keeps firing into the clamp.
  • Timing — delay and interval are options, so a coarse control can be deliberate and a fine one brisk.

API

Exports

| Name | Kind | Description | | --- | --- | --- | | PointerDragController | class | Turns a press on an element into a drag once it travels far enough, or once a touch is held long enough. | | PointerHoverController | class | Tracks whether a pointer hovers the host from the boundary events, which also fire when the layout moves under a resting pointer. | | PointerPressController | class | Tracks whether a pointer is pressed on the host, until it is released anywhere. | | PointerRepeatController | class | Repeats a trigger while a pointer is held down, as a held key repeats on its own. | | PointerTypeController | class | Tracks which kind of pointer - mouse, touch or pen - the user last used anywhere in the document. | | PointerController | class | Tracks whether a pointer hovers or presses the host, and which kind of pointer the user last used. |

Links

License

MIT © 3MO GmbH