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

@warnthyfriends/compliance-widgets

v1.0.18

Published

Enterprise-grade ADA accessibility, GDPR/CCPA cookie consent, and AI assistant widgets with white-label branding, theme customization, and reseller license program

Downloads

2,001

Readme

@warnthyfriends/compliance-widgets

Enterprise-grade ADA accessibility, GDPR/CCPA cookie consent, and AI assistant widgets for any website. Includes white-label branding, automatic theme detection, preset themes, and a reseller license program.

Features

  • ADA Accessibility Widget — Full WCAG 2.1 / Section 508 compliance (font scaling, high contrast, zoom, line spacing, screen reader support)
  • GDPR Cookie Consent — Customizable cookie consent banner with granular preference controls
  • CCPA Notice — California Consumer Privacy Act "Do Not Sell" notice
  • AI Assistant — Optional AI chat assistant (OpenAI-powered or rule-based fallback)
  • ComplianceProvider — Single wrapper that initializes all widgets with unified config
  • One-click Color Import — Automatically detects host site's CSS variables and applies them
  • Preset Themes — Light, Dark, Corporate Blue, Minimal, Emerald, Purple
  • White-label Branding — Replace all WTF branding with your own logo, company name, and colors
  • Embeddable Script — Single <script> tag integration for non-React sites
  • Subscription Validation — API key verification with 7-day grace period
  • Reseller License Program — Bulk license tiers for agencies and consultants

Installation

npm install @warnthyfriends/compliance-widgets

Quick Start — React (with server-side validation)

License validation runs server-side only — the browser bundle makes zero network calls. Call validateSubscription from your Node.js backend and pass the result to the widget via subscriptionInfo.

1. Server-side validation (Node.js / Express / Next.js API route)

import { validateSubscription } from '@warnthyfriends/compliance-widgets/server';

// Call from your server — never from the browser
const subscriptionInfo = await validateSubscription(
  process.env.WTF_API_KEY,
  process.env.WTF_SITE_ID,
  'https://warnthyfriends.wtf/api/compliance/validate'
);

// Forward subscriptionInfo to your frontend (e.g. via getServerSideProps, API route, or SSR)

2. Pass to the widget

import { ComplianceProvider } from '@warnthyfriends/compliance-widgets';

function App({ subscriptionInfo }) {
  return (
    <ComplianceProvider
      subscriptionInfo={subscriptionInfo}
      enableAccessibility={true}
      enableCookieConsent={true}
      enableCCPA={false}
      enableAIAssistant={false}
    >
      <YourApp />
    </ComplianceProvider>
  );
}

When subscriptionInfo is not provided, isValid is false (safe degraded state — subscription-gated context consumers will see an invalid subscription).

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | subscriptionInfo | SubscriptionInfo | undefined | Result of server-side validateSubscription(). Required for gated features. | | apiKey | string | undefined | API key forwarded to child widgets (e.g. TTS proxy auth) | | siteId | string | undefined | Site identifier forwarded to child widgets | | theme | string \| ThemeConfig | 'light' | Preset name or custom theme object | | autoDetectColors | boolean | false | Auto-detect CSS variables from host site | | branding | BrandingConfig | {} | White-label branding options | | position | PositionConfig | {} | Widget positioning | | enableAccessibility | boolean | true | Show accessibility widget | | enableCookieConsent | boolean | true | Show cookie consent banner | | enableCCPA | boolean | false | Show CCPA "Do Not Sell" notice | | enableAIAssistant | boolean | false | Show AI chat assistant |

Preset Themes

<ComplianceProvider theme="dark" ...>
<ComplianceProvider theme="corporateBlue" ...>
<ComplianceProvider theme="minimal" ...>
<ComplianceProvider theme="emerald" ...>
<ComplianceProvider theme="purple" ...>

White-label Branding

<ComplianceProvider
  branding={{
    companyName: "Acme Corp",
    logoUrl: "https://acme.com/logo.png",
    hidePoweredBy: true,
    poweredByText: "Powered by Acme Compliance",
    accentColors: {
      primary: "#FF6B35",
      secondary: "#004E89",
      accent: "#1A936F",
    },
  }}
  ...
/>

Embeddable Script (non-React)

Coming Soon — CDN hosted script for non-React sites is not yet available. Subscribe at warnthyfriends.wtf/compliance-widgets for updates.

<!-- CDN coming soon — use npm package in the meantime -->
<!-- <script src="https://cdn.warnthyfriends.com/compliance-widgets/loader.js"></script> -->

License

SEE LICENSE IN LICENSE

© WarnThyFriends — warnthyfriends.com