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

@aihu/primitives

v0.1.0

Published

aihu headless behavior primitives — WAI-ARIA APG patterns as vanilla custom elements, zero CSS.

Readme

@aihu/primitives

Aihu — agentic discovery and interaction, for human purpose.

aihu headless behavior primitives — WAI-ARIA APG patterns as vanilla custom elements, zero CSS.

The headless behavior layer on top of the aihu CSS engine. Every primitive is a vanilla custom element that manages focus, keyboard interaction, ARIA wiring, and controlled/uncontrolled state — the WAI-ARIA APG patterns — while emitting NO CSS. Consumers style via the CSS engine's cn() + style packs.

State lives on @aihu/signals; DOM structure comes from @aihu/arbor; focus/ARIA use native DOM APIs; cross-component coordination uses a self-contained DOM-walk context (@aihu/primitives/context).

Surface

| Entry | What it is | |---|---| | @aihu/primitives/context | createDomContext / provideContext / injectContext — live DOM-walk ancestor traversal, Symbol-keyed, signal-backed | | @aihu/primitives/presence-gate | mount/unmount with exit-animation hold | | @aihu/primitives/form-control | disabled/required/invalid + ARIA association | | @aihu/primitives/config-provider | colorScheme/density/dir via reactive DOM context | | @aihu/primitives/roving-focus | arrow-key roving tabindex (orientation/loop/RTL) | | @aihu/primitives/collection | DOM-ordered descendant registration | | @aihu/primitives/dialog | dialog-root + pieces (focus-trap, return-focus, escape) — APG Dialog Modal | | @aihu/primitives/tooltip | tooltip-root + pieces (reuses css-engine position() shim) — APG Tooltip | | @aihu/primitives/button | headless button base (ARIA/keyboard/toggle/disabled) — APG Button |

Local development

bun run build    # rolldown multi-entry → dist/<entry>.js
bun run test     # vitest (keyboard + APG conformance)
bun run typecheck

Install

npm install @aihu/primitives
# or
bun add @aihu/primitives

Auto-generated against @aihu/[email protected].

Package facts

| | | |---|---| | Version | 0.1.0 | | Tier | E — Held private (unmapped tier) | | Published files | 3 entries | | License | MIT |

Auto-generated against @aihu/[email protected].

Exports

| Subpath | ESM | CJS | |---|---|---| | . | ./dist/index.js | | | ./context | ./dist/dom-context.js | | | ./presence-gate | ./dist/presence-gate.js | | | ./form-control | ./dist/form-control.js | | | ./config-provider | ./dist/config-provider.js | | | ./roving-focus | ./dist/roving-focus.js | | | ./collection | ./dist/collection.js | | | ./dialog | ./dist/dialog.js | | | ./tooltip | ./dist/tooltip.js | | | ./button | ./dist/button.js | | | ./separator | ./dist/separator.js | | | ./label | ./dist/label.js | | | ./input | ./dist/input.js | | | ./textarea | ./dist/textarea.js | | | ./checkbox | ./dist/checkbox.js | | | ./switch | ./dist/switch.js | | | ./radio-group | ./dist/radio-group.js | |

Auto-generated against @aihu/[email protected].

Dependencies

Dependencies:

  • @aihu/signalsworkspace:*
  • @aihu/arborworkspace:*
  • @aihu/css-engineworkspace:*

Auto-generated against @aihu/[email protected].

See also

Auto-generated against @aihu/[email protected].

License

MIT — see LICENSE.

Auto-generated against @aihu/[email protected].