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

@hasna/ui

v0.0.4

Published

Offline-first UI design toolkit: mirror the ui.sh design skill locally and preview variants with a self-contained, dependency-free picker — no remote MCP, no hosted picker script.

Downloads

135

Readme

@hasna/ui

Offline-first UI design toolkit. It mirrors the ui.sh design skill locally and previews UI variants in the browser with a self-contained, dependency-free picker — no remote MCP, no hosted picker script. Bring your own ui.sh access, harvest the design skill once, and work fully offline after that.

Note on content: this repo ships the tooling only. The ui.sh design guidelines are ui.sh's content and are not redistributed here — run bun run harvest with your own ui.sh MCP credentials to populate content/ locally (git-ignored). The variant picker (src/picker.ts) is an original, behaviour-compatible reimplementation of ui.sh's picker.

What's here

| Piece | File | Role | | --- | --- | --- | | MCP client | src/mcp-client.ts | Minimal MCP-over-HTTP client (initialize + tools/call), SSE/JSON aware | | Harvester | src/harvest.ts | Crawls the design skill from its root resource and mirrors the tree to content/ | | Fetch shim | src/fetch.ts | Offline resource fetch (reads content/) | | Picker | src/picker.tspublic/ui-picker.js | Self-contained variant picker (data-uidotsh-* contract), ~9 KB, zero deps | | Server | src/server.ts | Serves a demo, the picker, and an HTTP fetch shim | | CLI | src/cli.ts (ui) | ui fetch <uri…>, ui list, ui serve [port] | | Demo | src/demo.ts | Three hero variants for picker comparison |

Install

bun add -g @hasna/ui     # or: bunx @hasna/ui ...

Use

bun install
# configure access (git-ignored): UIDOTSH_TOKEN + UIDOTSH_MCP_URL
cp .env.example .env.local && $EDITOR .env.local
set -a; source .env.local; set +a

bun run harvest          # mirror the design skill into content/ (your token)
bun run build:picker     # build public/ui-picker.js
bun run serve            # http://localhost:5173  (?picker=local | ?picker=reference)
bun test                 # fetch-shim + content-tree tests (needs content/)

ui fetch uidotsh://ui/design-guidelines/buttons
ui list

The variant picker

Mark up variants with the picker contract and one option visible:

<div data-uidotsh-pick="Hero style" class="contents">
  <div data-uidotsh-option="Minimal" class="contents">…</div>
  <div data-uidotsh-option="Bold" class="contents" hidden>…</div>
</div>
<script src="/ui-picker.js"></script>   <!-- our local, self-contained picker -->

The picker renders a fixed bottom-center toolbar (prev / select / next, ←/→ to change, ↑/↓ to open the list) to toggle variants live, then you keep the chosen one. No external script is loaded.

License

MIT © hasna