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

@edux-design/overlays

v0.3.0

Published

Original headless overlay behaviour shared by Edux component packages. React and React DOM are peer dependencies; the foundation does not depend on another UI, positioning, focus-management or scroll-lock library.

Readme

Edux overlays

Original headless overlay behaviour shared by Edux component packages. React and React DOM are peer dependencies; the foundation does not depend on another UI, positioning, focus-management or scroll-lock library.

This package is under local implementation and has not been published. Component adapters and compatibility evidence are being developed on the original-overlays branch. Public component styling remains in the existing Edux packages.

The core state helper treats undefined as uncontrolled state. Controlled updates request a change from the host and do not change the displayed value unless the host accepts. State callbacks are interaction-driven and never run from a React state updater or initial render.

Slot composes onto one element without adding DOM. Child attributes take precedence, class names are joined, and styles merge with the child's declarations last. Both native event handlers run child first; internal primitive behaviour uses composeEventHandlers to respect the event's defaultPrevented state. Native object/callback refs and React 19 callback cleanup are preserved.

Observing an anchor from the shared position tracker

usePosition accepts two optional subscriptions. onAnchorRectChange(rect) runs when the numeric rectangle changes; onAnchorMeasure(rect) runs on every measurement, including unchanged geometry. Both receive the same immutable Readonly<RectLike> | null value in viewport CSS pixels (x, y, width, height). Equal rectangles reuse their snapshot identity. A transformed positioner may use different local coordinates; these callbacks always report the original viewport rectangle.

const position = usePosition({
  open,
  anchorRef,
  contentRef,
  positionerRef,
  updatePositionStrategy: "always",
  positioning: !docked && !instructionHost,
  onAnchorMeasure: (rect) => {
    // Derive application-owned padding, corners and highlight state here.
    // Return previous state when those derived values are unchanged.
    updateHighlight(rect);
  },
});

The position tracker owns the observer/event/frame queue. "always" uses that same queue to follow transforms and animation; an event never adds a second frame tracker. The callback reads the latest function without restarting observers. Changing callback identity does not replay an unchanged snapshot. A per-measurement callback can sample styles when geometry is unchanged; compare derived state before setting it, and keep virtual getBoundingClientRect getters free of state updates. Callback-induced renders use the next shared frame instead of measuring again synchronously.

A missing, disconnected, invalid, cross-document or CSS-hidden anchor reports null. CSS-hidden means display:none on the element/ancestor, or computed visibility:hidden/collapse on the element. Valid offscreen and zero-sized virtual anchors remain valid. aria-hidden, inert, opacity and application target eligibility belong to the consumer. Callback visibility does not change existing floating visibility/placement rules. An initially closed hook reports null once; closing reports null if the previous snapshot was available. Closed hooks perform no measurements or observer/frame work. Unmount cancels work without calling the callbacks. Unavailable-anchor measurements may keep reporting null through onAnchorMeasure while the hook is open.

Set positioning:false for a docked card or an external instruction host. The hook keeps tracking/reporting the real anchor, skips floating content, arrow and positioner measurements, returns an empty positionerStyle, and reports isPositioned:false. It works without mounted floating content. Supply a contextElement for a virtual anchor when no floating content establishes the owner document. Measurement-only mode without either subscription allocates no tracker. Keep ref objects stable while their element is unchanged. When replacing the anchor, supply a new anchorRef object so its observer lifecycle follows the new element (continuous mode also reads the current element on every frame). For per-frame style-only changes, use updatePositionStrategy:"always".