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

@krizaka/email

v0.4.0

Published

One email system for every Krizaka app: typed, branded, bilingual templates on React Email (email-safe HTML, a plain-text part always generated), brand themes from @krizaka/tokens, and a sendEmail() adapter with one-click unsubscribe headers, idempotency,

Readme

@krizaka/email

One email system for every Krizaka app. Typed, branded, bilingual (EN/FR) templates on React Email (MIT): email-safe HTML (tables, inline styles), a plain-text part always generated from the same tree, dark mode, one 600 px column, and a sendEmail() adapter over the MAIL_* provider (Mailgun today).

import { sendEmail, consoleLog } from "@krizaka/email";

await sendEmail(
  "newsletterConfirm",
  { confirmUrl: "https://blog.krizaka.com/api/newsletter/confirm?t=…" },
  { to: "[email protected]", locale: "fr", log: consoleLog(), idempotencyKey: "confirm:<hash>" },
);

Only rendering, without sending: const { subject, html, text, headers } = await renderEmail("newPost", props, { locale: "en" }).

Templates

| id | category | what | | :-- | :-- | :-- | | newsletterConfirm | transactional | double opt-in: one button, the link small underneath | | newsletterWelcome | marketing | after the click | | newPost | marketing | title, cover, excerpt, « Read the post » | | newsletterUnsubscribed | transactional | the last email, and a way back | | contactAutoreply | transactional | krizaka.com contact form: « we received it », the visitor's message echoed | | contactNotification | internal | the team's notification: every field, a reply button | | signInLink, commentReply, accountDeletion, dataExport, confirmEmail, passwordReset, emailChange | transactional | accounts |

Every template takes brand (default krizaka; one theme per product, generated from @krizaka/tokens), address (the postal address of the sender — CASL), signature (a name, a role, an avatar slot) and unsubscribeUrl. A marketing template refuses to render without unsubscribeUrl, and any email with one gets List-Unsubscribe and List-Unsubscribe-Post: List-Unsubscribe=One-Click (RFC 8058, Gmail and Yahoo's bulk-sender rules).

House of Brands: a product email wears its own brand and never names another product (tested for every brand).

Safety

  • Props are validated with zod before anything renders; the error names the fields, never the values.
  • React escapes every text; URLs must be https; names and titles cannot hold control characters (no header injection); contactNotification builds its mailto: only from a validated address. A test feeds hostile input to every field.
  • sendEmail never mails an address in the suppression list (bounce, complaint, unsubscribed) and sends once per idempotencyKey; the delivery log holds a hash of the recipient, never the address.
  • Bounces and complaints: handleMailgunWebhook(body, { signingKey, suppression, onSuppress }) verifies the signature (HMAC-SHA256, replay window) and feeds the suppression list; onSuppress is where an app removes the address from its own list.

Dark mode

Light colours are inline (the only thing every client keeps); the dark scheme is classes under @media (prefers-color-scheme: dark) and [data-ogsc] (Outlook.com), with color-scheme meta. The mark is two PNGs (brand/<brand>/mark-light|dark-256.png on Bunny) swapped by the scheme. All colours are tested for WCAG AA in both.

Preview

pnpm --filter @krizaka/email build
pnpm --filter @krizaka/email preview                         # .preview/index.html: every email, light/dark, phone width
pnpm --filter @krizaka/email preview -- --shots <dir>        # + Playwright screenshots

The committed snapshots (test/__snapshots__/*.html|txt) are the reference: a template change shows in the diff.

Colours

src/themes.generated.ts is generated from @krizaka/tokens (pnpm --filter @krizaka/email gen; the build fails when it is stale).