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

wallet-web

v0.1.0

Published

Render Apple Wallet and Google Wallet event tickets in the browser, with React components

Readme

wallet-web

Render Apple Wallet and Google Wallet event tickets in the browser, matched to the iOS Wallet and Google Wallet apps (and to our Figma mockups).

Apple: event tickets (eventTicket), in both the strip-image and background/thumbnail layouts; .lproj localisation; date, number and currency formatting; back fields; voided and expired states. Google: event tickets (EventTicketClass + EventTicketObject, or a "Save to Google Wallet" JWT), as the classic card or the new full-screen view; Google's default template and cardTemplateOverride rows; localized strings. Both: QR, PDF417, Aztec and Code 128 barcodes; React components. Not supported: other pass types, iOS 18 poster event tickets, NFC.

React

import { ApplePass, GooglePass } from 'wallet-web/react'

<ApplePass pass="/tickets/concert.pkpass" side={side} fallback={<Spinner />} />
<GooglePass pass={{ class: ticketClass, object: ticketObject }} variant="fullscreen" />

Objects passed as pass are compared by identity, so memoise them. Both components are client-only (the entry is marked 'use client') and accept every render option as a prop, plus fallback, errorFallback, onRender and onError. <ApplePass> exposes flip() through its ref.

Vanilla

import { renderApplePass } from 'wallet-web'

const pass = await renderApplePass('/tickets/concert.pkpass', { zoom: 1 })
document.body.append(pass.element)
pass.flip('back')
import { renderGooglePass } from 'wallet-web'

const google = await renderGooglePass(saveToWalletJwt, { variant: 'classic' })
document.body.append(google.element)

Apple input can be a .pkpass URL, a Blob/File, an ArrayBuffer, or { pass, files }, where files maps file names such as [email protected] to Blobs, bytes or URLs.

Or use the custom element:

import { defineApplePassElement } from 'wallet-web'
defineApplePassElement()
// <apple-wallet-pass src="/tickets/concert.pkpass" zoom="0.8"></apple-wallet-pass>

How it works

  1. readPkpass unzips the bundle. buildEventTicketModel resolves localisation, formats field values and picks the image variants.
  2. layoutEventTicket uses Pretext to measure text without reflow. It shrinks the primary field, the logo text and crowded rows the way Wallet does, and splits row widths between fields.
  3. The DOM renderer draws the card inside a Shadow DOM. Barcodes are rendered lazily with bwip-js, or with your own barcodeRenderer.

Every visual constant lives in src/apple/tokens.ts and src/google/tokens.ts, with the Figma node each value comes from. Pass tokens to override them.

Fonts: Google passes use Google Sans Flex (on Google Fonts). SF Pro can't be served on the web. The default stack uses SF Pro when it is installed locally, then Inter. Load your web font before rendering, or pass fontFamily. The renderer waits for document.fonts so that Pretext measures the right font.

Development

pnpm storybook   # sample passes + drop-in .pkpass viewer
pnpm test
pnpm build

Releasing

Releases are published to npm by GitHub Actions when a version tag is pushed:

npm version patch   # or minor / major: bumps package.json, commits, tags vX.Y.Z
git push --follow-tags

The workflow checks that the tag matches package.json, runs the typecheck, tests and build, then publishes with provenance. It authenticates through npm trusted publishing (package settings → Trusted publisher → GitHub Actions, workflow release.yml), falling back to an NPM_TOKEN repository secret.