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

@propeller-commerce/propeller-v2-spl

v0.2.0

Published

SpareParts Live (SPL) interactive spare-parts browser for the Propeller eCommerce V2 platform — a drawing tree + pan/zoom hotspot drawing + Propeller-product panel, driven by the SpareParts Live API and @propeller-commerce/propeller-sdk-v2. Framework-agno

Readme

@propeller-commerce/propeller-v2-spl

SpareParts Live (SPL) interactive spare-parts browser for the Propeller eCommerce V2 platform — a drawing tree (left), a pan/zoom technical drawing with hotspots (middle), and a panel of Propeller products tied to the hotspots (right). Clicking a hotspot focuses its product; clicking a product highlights its hotspot. Ported from the propeller-sparepartslive WordPress plugin.

How it works

The SpareParts Live API exposes three endpoints (drawing tree / drawing SVG / hotspots). Each hotspot is either a navigation hotspot (drills to another drawing) or a part hotspot whose OEM code equals a Propeller SKU, resolved to a product via @propeller-commerce/propeller-sdk-v2.

The SPL token is a server secret, so the browser never calls SPL directly. The host app exposes thin /api/spl/* routes (using this package's ./server helpers) that proxy the SPL API and resolve products; the client <SparePartsLive> panel calls those routes.

Two entry points

| Import | Contents | Runs | |---|---|---| | @propeller-commerce/propeller-v2-spl | React surface (<SparePartsLive>, hooks) — "use client" | client | | @propeller-commerce/propeller-v2-spl/server | createSplClient, resolveHotspotProducts, assembleDrawing/assembleRoot, pure helpers | server (touches the SDK) | | @propeller-commerce/propeller-v2-spl/styles.css | self-contained styles (themeable via CSS vars) | — |

Host wiring (Next.js sketch)

// app/api/spl/drawings/route.ts
import { createSplClient, assembleRoot, resolveHotspotProducts } from '@propeller-commerce/propeller-v2-spl/server';

const spl = createSplClient({ baseUrl: process.env.SPL_BASE_URL!, token: process.env.SPL_TOKEN! });
const resolve = (skus: string[]) =>
  resolveHotspotProducts({ client, baseCategoryId, language, skus, imageVariantFilters, priceCalculateProductInput });

export async function GET(req: Request) {
  const publicationId = new URL(req.url).searchParams.get('publicationId')!;
  return Response.json(await assembleRoot(spl, publicationId, resolve));
}
// PDP client island
import '@propeller-commerce/propeller-v2-spl/styles.css';
import { SparePartsLive } from '@propeller-commerce/propeller-v2-spl';

<SparePartsLive
  publicationId={publicationId}
  labels={labels}                        // optional localized strings (SplLabels)
  renderProductActions={(product) => <AddToCart product={product} /* … */ />}
  onProductClick={(product) => router.push(getProductUrl(product))}
/>

A not-found part opens the built-in information-request modal, which POSTs to ${apiBase}/contact — the host route emails the configured contact address. There is no contactEmail prop; the recipient is a host-side env var (below).

Environment variables (host app)

This package reads no environment variables itself — its server helpers take baseUrl / token as arguments. The host app supplies them, and gates the panel on a product attribute. These are the variable names the Propeller boilerplates use; wire your own names to the same helper arguments if you prefer.

| Variable | Scope | Example | Purpose | |---|---|---|---| | SPL_BASE_URL | server | https://api.spareparts.live/v1 | SpareParts Live API base URL → createSplClient({ baseUrl }). | | SPL_TOKEN | server secret | cJWDUv… | SPL API token (sent as a query param) → createSplClient({ token }). Never expose to the client — keep it out of NEXT_PUBLIC_*; the panel calls the host's /api/spl/* proxy instead. | | SPL_PRODUCT_ATTRIBUTE | server | SPAREPARTSLIVEDRAWING | Name of the product track-attribute that gates the panel and whose value is the SPL publication id (publicationId). Empty/absent → no panel. | | NEXT_PUBLIC_SPL_CONTACT_EMAIL | public | [email protected] | Recipient of the "information request" a not-found part sends via the host's /api/spl/contact route. |

Hotspot SKUs are resolved under the host's existing base catalog category (the boilerplates reuse BOILERPLATE_BASE_CATEGORY_ID) — not an SPL-specific variable, so it isn't listed above.

Keep SPL_TOKEN server-only. Read it exclusively in route handlers / server helpers and pass it to createSplClient. The client <SparePartsLive> never sees it — it talks to your /api/spl/* routes, which hold the token.

Peer dependencies

react ≥ 18, react-dom ≥ 18, @propeller-commerce/propeller-sdk-v2 (*).