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

@sanity/themer-legacy

v0.2.2

Published

The hosted Themer service (themer.sanity.build) as an npm package: the exact same Sanity Studio theme generator, running locally, and a Studio tool to edit its themes.

Readme

@sanity/themer-legacy

The hosted Themer service (themer.sanity.build) as an npm package: the exact same Sanity Studio theme generator, running locally, and a Studio tool to edit its themes.

npm install @sanity/themer-legacy

The Studio tool

themerTool from @sanity/themer-legacy/tool re-hosts the Themer's editor inside your own Studio, so the theme previews on your real content instead of a demo:

import {themerTool} from '@sanity/themer-legacy/tool'
import {defineConfig} from 'sanity'

export default defineConfig({
  plugins: [themerTool()],
  // ...rest of the config
})

A toggle in the navbar opens the sidebar with the hosted presets and the six hue editors — the mid, lightest and darkest colors, the mid-point slider that places mid on the 50–950 ramp, and the generated tints (click one to copy its hex). Every change applies to the whole Studio while you browse around. The preview follows the Studio's appearance setting, or shows light and dark side by side with Split-screen. Drafts are kept in localStorage, so they survive reloads; Reset returns to the theme the Studio is configured with.

The plugin is named themer-legacy and titled "Themer (Legacy)", so it can be installed next to themerTool from @sanity/themer/tool, which edits the current buildTheme themes.

Migrating from themer.sanity.build

This package is the npm migration path off the hosted Themer service — the generator runs locally, so Studio configs no longer need to import modules from a hosted URL.

It generates the exact same colors as the hosted service, with the same createTheme, hues and theme exports that https://themer.sanity.build/api/hues served. Replace the URL import with buildThemeFromUrl and the URL as a string:

// Before:
import {theme} from 'https://themer.sanity.build/api/hues?preset=verdant&primary=22fca8'

// After:
import {buildThemeFromUrl} from '@sanity/themer-legacy'

const theme = buildThemeFromUrl(
  'https://themer.sanity.build/api/hues?preset=verdant&primary=22fca8',
)

Configs that used createTheme and hues from the URL import work the same way with parseHuesFromUrl:

// Before:
// import {createTheme, hues} from 'https://themer.sanity.build/api/hues?preset=verdant'

// After:
import {createTheme, parseHuesFromUrl} from '@sanity/themer-legacy'

const hues = parseHuesFromUrl('https://themer.sanity.build/api/hues?preset=verdant')

export default defineConfig({
  theme: createTheme({...hues, primary: {...hues.primary, mid: '#22fca8'}}),
  // ...rest of the config
})

The hosted presets are addressed by query, exactly like the service:

import {buildThemeFromUrl} from '@sanity/themer-legacy'

const theme = buildThemeFromUrl('?preset=verdant')

Once migrated, remove any themer.d.ts module declarations and urlImports config that the URL imports needed.

The generated theme carries no __themer flag, which is the one intentional difference from the hosted module. Sanity Studio uses that flag to throw away the fonts the hosted module bundled, because they had drifted from the Studio's own; here the fonts come from the @sanity/ui this package depends on, so there is nothing to throw away.

Migrating from @sanity/themer/legacy

The generator used to ship as the @sanity/themer/legacy subpath of @sanity/themer. That subpath still works as a deprecated re-export of this package until @sanity/[email protected] removes it — swap the import specifier to migrate:

-import {buildThemeFromUrl} from '@sanity/themer/legacy'
+import {buildThemeFromUrl} from '@sanity/themer-legacy'

License

MIT © Sanity.io — see LICENSE