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

@revinel/browser

v0.9.0

Published

Browser runtime helpers for embedding the Revinel advertiser tier selector.

Readme

@revinel/browser

Browser runtime for embedding the Revinel tier selector, the "Subscribe to advertise" widget that lets your visitors pick an advertising plan and pay through Stripe. Renders as an auto-resizing iframe; inline or as a modal.

Looking to render ads on your site? Use @revinel/sdk (headless) or @revinel/react (hooks + components).

Install

npm install @revinel/browser

Inline widget

import { mountTierSelector } from "@revinel/browser"

const widget = mountTierSelector({
  workspaceId: "your-workspace-id",
  container: "#revinel-tiers", // a CSS selector or an Element
  theme: "auto", // "auto" | "light" | "dark"
  onCheckout: ({ tierPriceId }) => console.log("checkout started", tierPriceId),
})

widget.updateConfig({ theme: "dark" }) // reconfigure in place
widget.destroy() // remove + detach listeners

Popup (modal)

Opens the selector in a native <dialog> (focus-trap, Esc, and backdrop handled for you):

import { openTierSelector } from "@revinel/browser"

document.querySelector("#revinel-tiers-btn").addEventListener("click", () => {
  openTierSelector({ workspaceId: "your-workspace-id", onClose: () => {} })
})

No-code script (hosted)

No bundler needed. Drop in the hosted script and mark any element to open the popup:

<button data-revinel-tier-selector data-revinel-workspace-id="your-workspace-id">
  Advertise with us
</button>
<script async src="https://app.revinel.com/embed.js"></script>

The script also exposes window.Revinel.init({ workspaceId, container }) (inline) and window.Revinel.open({ workspaceId }) (popup). Copy a ready-to-paste snippet with your real workspace ID from the Embed page in the Revinel dashboard.

Options

| Option | Type | Notes | | --- | --- | --- | | workspaceId | string | Required. | | container | string \| Element | mountTierSelector only. Where to mount the iframe. | | theme | "auto" \| "light" \| "dark" | Defaults to "auto" (matches the host page). | | appUrl | string | Origin serving /embed. Defaults to the hosted Revinel app. | | height | number \| string | Initial height before the embed reports its own. | | title | string | openTierSelector only. The modal's accessible label. |

Events

Pass onReady, onCheckout, onError (and onClose for the popup):

  • onReady(): the selector has loaded and rendered.
  • onCheckout({ tierPriceId }): fires when the visitor starts checkout, just before the redirect to Stripe.
  • onError({ message }): tiers failed to load, or checkout creation failed.

There is no "completed" event: checkout redirects the top window to Stripe, so the embed is gone by the time payment finishes. Subscription state is delivered to your account by webhook.

API reference

Full reference and guides: revinel.com/docs. The OpenAPI spec is served at /v1/openapi.json on the Revinel API.