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

@purse-eu/oc-ui-kit

v0.5.5

Published

Purse OneCheck ui-kit

Readme

oc-ui-kit

UI kit — a library of reusable web components built with Lit and TypeScript, documented with Storybook 10, and published to npm via GitHub Actions.

Getting Started

Installation

npm install @purse-eu/oc-ui-kit lit

Usage

<!-- In your HTML -->
<script type="module">
  import '@purse-eu/oc-ui-kit';
</script>

<p-consent variant="save_card"></p-consent>
<p-tokens-list>
  <!-- Slotted token components go here (open shadow DOM, standard <slot>) -->
</p-tokens-list>
// In TypeScript
import { PConsent, PTokensList } from '@purse-eu/oc-ui-kit';

Development

Prerequisites

  • Node.js 20+
  • npm

Install dependencies

npm install

Run Storybook (development)

npm run storybook

Storybook runs on http://localhost:6006.

Build the library

npm run build

Output is in the dist/ folder:

  • dist/index.js — ES module
  • dist/index.umd.cjs — UMD (CommonJS)
  • dist/index.d.ts — TypeScript type declarations

Type check

npm run type-check

Build Storybook static site

npm run build-storybook

Components

| Component | Tag | Description | | -------------------- | ------------------------ | -------------------------------------------------------------------------------- | | PConsent | <p-consent> | Consent collection with three variants: save_card, transfer_card, account_creation. | | POtp | <p-otp> | OTP verification (SMS / email) with retry cooldown and error/success states. | | PProductEducation | <p-product-education> | Modal explaining the One Check flow. Focus-trapped, Escape to close. | | PTokensList | <p-tokens-list> | Section heading for saved-token lists. Exposes a <slot> for projected tokens. |

Testing

Visual regression tests run every story through Storybook's Vitest addon, take a screenshot, and diff against a baseline using Vitest 4's built-in toMatchScreenshot (pixelmatch, 1% allowed mismatch).

npm test           # run once (CI mode)
npm run test:watch # watch mode
npm run test:update # update baselines after an intentional visual change

Baselines are committed under src/components/p-*/__screenshots__/.

Regenerating baselines for CI

CI runs the suite inside the Microsoft Playwright Docker image so font rendering is deterministic. macOS and Linux render glyphs differently, so baselines generated locally on macOS will not match CI. To regenerate baselines inside the same container CI uses:

docker run --rm -v "$PWD:/work" -w /work mcr.microsoft.com/playwright:v1.59.1-noble \
  sh -c "npm ci && npm run test:update"

Then commit the updated PNGs in src/components/**/__screenshots__/. Keep the image tag in sync with the playwright devDependency version.

Publishing

The library is published automatically to npm when a tag matching v* is pushed:

git tag v1.0.0
git push origin v1.0.0

Requires an NPM_TOKEN secret configured in the GitHub repository settings.

CI

On every push to main, .github/workflows/on-push-main.yaml runs:

  • release-manager — creates a release when the version is bumped.
  • visual-tests (non-blocking) — runs npm test inside mcr.microsoft.com/playwright:v1.59.1-noble. On failure, uploads *-diff.png / *-actual.png from the __screenshots__ folders as a 7-day artifact. Marked continue-on-error: true — failure is surfaced in the UI but does not block the release job.

Storybook is deployed to GitHub Pages by .github/workflows/storybook.yml.