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

@numueg/theme-plugin

v0.6.0

Published

Vite plugin for NUMU themes — validates the manifest, externalizes the SDK + React, emits the federation manifest, and generates section schema types

Readme

@numueg/theme-plugin

Vite plugin for NUMU themes. Contract validation, schema codegen, federation externals, asset pipeline, manifest emission.

npm license

The plugin every NUMU theme registers in its vite.config.ts. It enforces the BYOT contract at build time and generates typed declarations from your schemas/sections/*.json so section components get fully-typed settings.

Install

npm install --save-dev @numueg/theme-plugin

Usage

// vite.config.ts
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import numuTheme from "@numueg/theme-plugin";

export default defineConfig({
  plugins: [react(), numuTheme()],
  build: {
    lib: {
      entry: "src/main.tsx",
      formats: ["es"],
      fileName: "theme",
    },
    cssCodeSplit: false,
  },
});

numu-theme init <name> scaffolds a config with the plugin pre-wired.

What it does

| Step | What | |---|---| | Contract validation | Requires theme.json + settings_schema.json + styles.css; finds the entry (src/main.tsx etc.) and asserts it exports mount; validates manifest fields (id, name, semver version); registry sync — every schemas/sections/<type>.json must have a matching src/sections/<Type>.tsx (hard fail), component-without-schema is a soft warning | | Federation externals | federate: true (default) externalizes react, react-dom, jsx runtimes, and @numueg/theme-sdk — the host provides them via its import map. federate: false builds a self-contained bundle | | Dev middleware | Serves /theme.js, /theme.css, /sections.json (synthesized live from schemas), and code-split chunks from dist/; emits a numu:schema-changed WebSocket event when schemas change so the customizer refetches forms | | Schema codegen | schemas/sections/*.json → src/__generated__/sections.d.ts (typed settings per section) | | Manifest emission | Writes dist/manifest.json (normalized theme.json + all section/block schemas + locale catalogs + build metadata) and dist/import-map.json (plugin, federate, sdk_compat_major, sdk_compat_minor, host_provided) — the host install endpoint refuses bundles with a mismatched sdk_compat_major, and (while on major 0, where minors are breaking) any bundle whose sdk_compat_minor exceeds the host's served SDK minor | | CSS fallback | Copies styles.css → dist/theme.css if Vite didn't emit one |

theme.json extras the plugin understands: error_template / loading_template (static HTML fallbacks) and variants[] (theme-level style variants).

Options

numuTheme({
  themeDir: process.cwd(),  // theme root override
  skipValidation: false,    // escape hatch for tests
  federate: true,           // externalize React + SDK (default)
  extraExternal: [],        // additional modules to externalize
});

Docs

License

MIT — see LICENSE.