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

@uniformdev/toolbar

v20.73.4

Published

Framework-neutral engine for the Uniform toolbar: view models, visitor simulation and label resolution over a Uniform Context instance

Readme

@uniformdev/toolbar (experimental)

The framework-neutral engine behind the Uniform toolbar: view models, visitor simulation and label resolution over a Uniform Context instance.

No DOM, no framework — the Angular component (@uniformdev/toolbar-angular) and the custom element (@uniformdev/toolbar-element) are thin adapters over this. Use it directly if you want to build your own UI.

import { UniformToolbarStore } from '@uniformdev/toolbar';

const store = new UniformToolbarStore({
  context, // a Uniform Context instance
  storage: localStorage, // optional; omit on the server
  quirkGroups: [{ title: 'Geo', ids: ['vc-city', 'vc-country'] }],
  labels: () => fetch('/api/uniform-context-labels').then((r) => r.json()),
});

const unsubscribe = store.subscribe((state) => render(state));
store.getState();

State

ToolbarState is recomputed on every change and holds everything a UI needs:

| Field | What it is | | --------------------------------------------------- | ------------------------------------------------------------------------- | | dimensionGroups | Scored dimensions, grouped: signals, enrichments per category, aggregates | | inactiveDimensions | Manifest dimensions with no score yet | | inactiveGroups | Those plus unset quirks, grouped like dimensionGroups — what Inactive renders | | reveal | What the simulator set last and the group it landed in, so a UI can show it applying | | quirkGroups | Quirks, in the configured groups | | tests | A/B tests on the page, with variants and the current assignment | | labels | Resolved display names (raw keys until something resolves them) | | overrides, overrideCount | Simulated values, each with the value it replaced | | controlGroup | Whether the visitor is in the personalization control group | | connection, connectionStatus, connectionError | Uniform connection state |

Actions

Simulator — every change is a real Context storage command, so the app reacts as it would for a visitor who earned that state:

setScore / clearScore (modscoreS), setQuirk / clearQuirk (setquirk), clearOverrides, toggleControlGroup (setcontrol), forget.

Aggregates are computed from their inputs and bare enrichment categories have no value to attach a score to — neither is settable. Callers should not offer an editor for them; both shipped UIs check type and the presence of _ in the key.

A/B testsregisterTest(name, variantIds) declares what a rendered placement can show (the manifest lists test names but not their variants), and setTestVariant forces one. Tests that never register are still listed from their testResult event, with only the assigned variant.

Connectconnect({ projectId, apiKey }), disconnect(), refreshLabels(). Verifies Manifest Read (published manifest) and Context → Read Drafts (preview manifest) before saving anything. Friendly names are resolved afterwards from the definition APIs. Use a read-only key with those two permissions.

Also exported

buildDimensionRows, groupDimensions, buildActiveDimensionGroups, buildInactiveDimensionRows, buildQuirkGroups, clampPercent, listManifestDimensions — the pure shaping helpers, if you only want those.

ENTITY_ICON_PATHS — the css.gg icon paths the Uniform dashboard uses, keyed by entity kind, so any UI can draw the same marks.