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

@swirepay-developer/swirepay-frontend-payment-sdk

v2.1.2

Published

A framework-agnostic set of web components (Svelte 5 under the hood), distributed as a standalone bundle — embed them the same way you'd drop in a Stripe Elements `<script>` tag, no build step or framework required on the consuming page.

Downloads

597

Readme

swirepay-sdk

A framework-agnostic set of web components (Svelte 5 under the hood), distributed as a standalone bundle — embed them the same way you'd drop in a Stripe Elements <script> tag, no build step or framework required on the consuming page.

Developing

npm install
npm run dev

This serves index.html at the project root, which loads the element straight from source for local preview: <swirepay-contact-onboarding></swirepay-contact-onboarding>.

Project structure

src/lib/
  elements/    the custom element(s) registered via <svelte:options customElement="...">
  components/  internal Svelte components composed inside an element's shadow root
  store/       per-instance state (Svelte 5 runes classes), shared via context
  styles/      shared design tokens (CSS custom properties), inlined into each
               element's shadow root — see styles/tokens.css
  index.ts     public entry point; importing it registers the custom element(s)

Because each root element renders inside its own shadow DOM, --swp-* tokens declared once in styles/tokens.css are inherited by every nested component automatically — no per-component imports needed.

Building

npm run build:dev   # dist/dev  — unminified, sourcemapped, debug logging on
npm run build:prod  # dist/prod — minified, no sourcemaps, debug logging off
npm run build       # alias for build:prod; this is what gets published

Each produces two self-contained bundles (Svelte's runtime is inlined, so nothing else needs to be loaded) plus a .d.ts:

  • swirepay-sdk.js — ES module, for consumers using a bundler or <script type="module">
  • swirepay-sdk.iife.js — classic script, for a plain <script src="..."> tag
  • swirepay-sdk.d.ts — type declarations for the custom elements

dist/dev and dist/prod can coexist, e.g. to deploy the dev build to a staging CDN path alongside the prod build on the production path. Only dist/prod is included when the package is published (see files in package.json).

Publishing

Set the package name/version in package.json, then:

npm publish