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

@coralreefventures/theme

v0.8.0

Published

Builds a product's Mantine theme from its brand tokens, and the stylesheet of CSS variables MantineProvider would inject for it.

Readme

@coralreefventures/theme

Builds a product's Mantine theme from its brand tokens, and generates the stylesheet of CSS variables that MantineProvider would inject for it, so a page that renders as server components only still gets the theme.

Both Coral Reef sites carried the same theme.ts and generate-css.ts, differing only in their scales, primary color and font variable. Each product's packages/theme is now its tokens file plus a call into this package, and the stylesheet it generates is byte-identical to what it generated before: a test here runs the builder over both products' token files and compares the output with their committed theme.css.

// packages/theme/src/theme.ts in a product
import { createBrandTheme } from "@coralreefventures/theme";
import tokens from "@streamlane/brand/tokens";

export const brand = tokens.color;

export const theme = createBrandTheme(tokens, {
  colors: {
    // Ten shades, each a hex or the name of a brand color: ink is shade 8, ink-soft shade 7.
    ink: ["#EEF4F4", "#D8E5E5", "#B3CBCC", "#8BAFB0", "#669496", "#4A7C7E", "#336567", "ink-soft", "ink", "#0B2728"],
    signal: ["#FEF6EA", "#FCEBD0", "#FADAA5", "signal-soft", "#F4B658", "signal", "#DB9425", "#B97A17", "#94610F", "#704908"],
  },
  black: "text",
  primaryColor: "ink",
  primaryShade: { light: 8, dark: 5 },
  fontVariable: "--streamlane-font-sans",
});
// packages/theme/scripts/generate-css.ts in a product
import { writeFile } from "node:fs/promises";
import { themeCss } from "@coralreefventures/theme";
import { cssVariablesResolver, theme } from "../src/theme";

await writeFile(
  new URL("../theme.css", import.meta.url),
  themeCss(theme, { generatedBy: "packages/theme (pnpm --filter @streamlane/theme generate)", resolver: cssVariablesResolver }),
);

resolver is a product's own CSSVariablesResolver (Streamlane's tones and ink surface) and stays in the product; Driftline passes none. generatedBy is the first line of the stylesheet, which tells a reader what to run.

What it exports

  • createBrandTheme(tokens, config): the MantineThemeOverride. config.colors are the scales, primaryColor and primaryShade as Mantine takes them, fontVariable the CSS variable an app sets to its web font (Mantine's system stack is the fallback), and black the light-scheme text color, each color a hex or a brand color's name.
  • themeCss(theme, { generatedBy?, resolver? }): the stylesheet.
  • brandColor(tokens, nameOrHex), brandFontFamily(variable), and the types BrandTokens, BrandThemeConfig, Scale, ThemeCssOptions.

Installing

This package ships TypeScript source and @mantine/core 9.6.3 is a peer. The code that imports it has to be transpiled: a product's theme package runs under tsx and Vitest and is bundled by Next through transpilePackages, all of which handle it. Add @coralreefventures/theme to transpilePackages where the product theme already is.