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

@kingsleyweb/bun-ui

v3.0.0-rc.2

Published

Every bun-node browser UI in one package, one subpath each: the bun-jobs management UI (./jobs, jobsUi()) and the OpenAPI/AsyncAPI docs viewer (./docs, docsUi()), each served by a bun-common router with a prebuilt React bundle, hash-named immutable assets

Readme

@kingsleyweb/bun-ui

Every bun-node browser UI in one package, each behind its own subpath. A UI is a React app prebuilt into dist/<ui>/ and served by a bun-common router you mount on any bun-common BunHttpAdapter, BunRouter or bun-nest's BunHttpAdapter: hash-named immutable assets, computed Subresource Integrity and a strict Content-Security-Policy. React and TanStack Query are bundled, so the host installs neither and has no build step.

| Subpath | What | Needs | |---|---|---| | @kingsleyweb/bun-ui/jobs | jobsUi(): the management UI for the @kingsleyweb/bun-jobs management API. Guide | @kingsleyweb/bun-jobs | | @kingsleyweb/bun-ui/jobs/browser | the jobs UI's browser-safe config contract (JobsUiConfig, JOBS_UI_CONFIG_ELEMENT_ID, …) | nothing | | @kingsleyweb/bun-ui/docs | docsUi(): a self-hosted viewer for one OpenAPI 3.1 or AsyncAPI 3.0 document. Guide | nothing | | @kingsleyweb/bun-ui/docs/browser | the docs viewer's browser-safe config contract and the unauthorized helpers | nothing | | @kingsleyweb/bun-ui/docs/hosted | what bun-common's docsRouter "self-hosted" viewer loads to serve the viewer itself | nothing | | @kingsleyweb/bun-ui/docs/embed, /docs/embed/{routing,router,context,permissions,client,errors,unauthorized} | the viewer's screens as source, for a React app that bundles them into its own UI | the host's react and @tanstack/react-query | | @kingsleyweb/bun-ui | what every UI shares, browser-safe: UiTheme, the unauthorized option's types and defaults, ASSET_CACHE_CONTROL | nothing |

Each UI's domain package is an optional peer that only its own subpath needs: install @kingsleyweb/bun-jobs to use /jobs. An app that mounts one UI never loads another's code or bundle.

Install

bun add @kingsleyweb/bun-ui                          # for /docs
bun add @kingsleyweb/bun-ui @kingsleyweb/bun-jobs   # for /jobs

Requires Bun >= 1.4.2. Bun runs the shipped TypeScript source in lib/; your type checker reads the built declarations in dts/, which describe lib/ only, so no React or TanStack type reaches your project.

Quick start: the jobs UI

import { BunHttpAdapter } from "@kingsleyweb/bun-common";
import { createJobsApi } from "@kingsleyweb/bun-jobs";
import { jobsUi } from "@kingsleyweb/bun-ui/jobs";

const api = createJobsApi({ jobs, basePath: "/admin/jobs-api", authorize });
const ui = jobsUi({ api, basePath: "/admin/jobs" });

const app = new BunHttpAdapter();
app.use(api.basePath, api.router);
app.use(ui.basePath, ui.router);
await app.listen(3000);

guides/jobs.md has every option, the screens, the permissions each element needs and the security notes.

Quick start: the docs viewer

import { BunRouter } from "@kingsleyweb/bun-common";
import { docsUi } from "@kingsleyweb/bun-ui/docs";

const app = new BunRouter();
const ui = docsUi({ document: "/api/openapi.json", basePath: "/docs" });
app.use(ui.basePath, ui.router);

bun-common's docsRouter({ viewer: { openapi: "self-hosted" } }) serves the same viewer from your own origin once @kingsleyweb/bun-ui is installed. guides/docs.md has every option and the embedding guide.

Layout

The package is layered: lib/<ui>/ is a UI's server (and lib/<ui>/browser/ its browser-safe half), app/<ui>/ its React app, __tests__/<ui>/ its tests and dist/<ui>/ its prebuilt bundle. lib/kit/ holds what the UIs share; it never imports a domain package.

Building

bun scripts/build.ts writes each UI's bundle into dist/<ui>/ and bun run build:types the declarations into dts/; prepack runs both, so a pack publishes both. Both directories are gitignored. In the repo, a UI with no dist/<ui>/ builds in memory on its first request.