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

@flexops/elements

v2.0.0

Published

Embeddable React widgets for FlexOps shipping — rate calculator, delivery promise, tracking, address validation, returns, and label creation

Readme

@flexops/elements

Embeddable React widgets for FlexOps shipping — rate calculator and package tracking.

Installation

npm install @flexops/elements

Quick Start

import { FlexOpsProvider, RateCalculator, TrackingWidget } from '@flexops/elements';

function App() {
  return (
    <FlexOpsProvider config={{ baseUrl: 'https://gateway.flexops.io' }}>
      {/* Rate calculator with pre-filled origin */}
      <RateCalculator
        defaultFromPostalCode="10001"
        onRateSelected={(rate) => console.log('Selected:', rate)}
      />

      {/* Package tracking with a specific token */}
      <TrackingWidget token="your-tracking-token" />
    </FlexOpsProvider>
  );
}

Components

<FlexOpsProvider>

Wraps all FlexOps widgets with configuration and theming.

<FlexOpsProvider
  config={{
    baseUrl: 'https://gateway.flexops.io',  // Required
    apiKey: 'fxk_live_...',              // Optional — for future authenticated endpoints
    theme: {                              // Optional — override default styling
      primaryColor: '#your-brand-color',
      fontFamily: 'Inter, sans-serif',
    },
  }}
>
  {children}
</FlexOpsProvider>

<RateCalculator>

Displays shipping rate estimates from multiple carriers.

| Prop | Type | Default | Description | |------|------|---------|-------------| | defaultFromPostalCode | string | '' | Pre-fill origin ZIP | | defaultToPostalCode | string | '' | Pre-fill destination ZIP | | defaultWeightOz | number | — | Pre-fill weight | | showDimensions | boolean | true | Show L/W/H inputs | | showCountry | boolean | false | Show country selectors | | maxResults | number | unlimited | Limit displayed rates | | onRatesFetched | (rates) => void | — | Callback when rates load | | onRateSelected | (rate) => void | — | Callback when user clicks a rate | | onError | (error) => void | — | Callback on error |

<TrackingWidget>

Displays real-time package tracking with workspace branding.

| Prop | Type | Default | Description | |------|------|---------|-------------| | token | string | — | Tracking link token (auto-loads) | | showSearchInput | boolean | true | Show token search input | | pollingIntervalMs | number | 0 | Live update interval (0 = disabled) | | showBranding | boolean | true | Show workspace branding | | onTrackingLoaded | (data) => void | — | Callback when data loads | | onError | (error) => void | — | Callback on error |

Theming

Override any theme property via the provider or individual widgets:

const customTheme = {
  primaryColor: '#8b5cf6',
  backgroundColor: '#fafafa',
  borderRadius: '12px',
  fontFamily: 'Inter, sans-serif',
};

<FlexOpsProvider config={{ baseUrl: '...', theme: customTheme }}>
  <RateCalculator />
</FlexOpsProvider>

Available theme properties: primaryColor, secondaryColor, backgroundColor, textColor, mutedTextColor, borderColor, borderRadius, fontFamily, fontSize, successColor, errorColor, warningColor.

Requirements

  • React 18+
  • Modern browser with fetch API

License

MIT - FlexOps, LLC

<ShippingLabel> approval flow

The label form sends Gateway's normalized origin/destination/package payload. Enter a USD maximum and carrier/service, then select Preview Postage. Review the server quote and expiry, then explicitly Approve and Buy. Cancel returns to editing without a purchase. The maximum excludes later carrier adjustments and separate fees.

Deploy this widget with Gateway's bounded approval contract; an older Gateway cannot guarantee preview semantics. Sandbox responses may immediately show a synthetic label without postage. After any attempted live purchase, the form retains its request, original client configuration and key and offers Retry Same Purchase. An unknown outcome must be reconciled before starting another purchase. Operation state lasts for the mounted widget only: keep it mounted while unresolved and retain the displayed reference for operator recovery if the page closes. No browser persistence of private shipment data is added.

No npm publication or production carrier certification is implied by these source changes.

Guarded label release compatibility

This release requires a Gateway deployment with the bounded label preview/approval contract (Gateway PR #509 or later). Do not use its live label preparation against an older Gateway: older servers may purchase immediately. Upgrade the Gateway and affected callers together during a purchase maintenance window.

Live label creation now requires a USD maximum, preview, explicit approval, and replay of the saved request with its original idempotency key. Never retry an uncertain purchase with a new key. Sandbox results do not certify production postage.