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

@liiift-studio/sanity-utilities

v1.4.0

Published

Centralized Sanity utilities package for Liiift Studio foundry projects

Readme

@liiift-studio/sanity-utilities

Centralized Sanity utilities package for Liiift Studio foundry projects.

Overview

This package provides a collection of powerful utilities for Sanity Studio that help manage and manipulate content across foundry projects. All utilities are designed with safety features including danger mode locks and confirmation dialogs for destructive operations.

Installation

npm install @liiift-studio/sanity-utilities

Local Development

When developing the utilities package locally, you can use npm link to avoid publishing after every change. This creates a symlink so your Sanity project points directly to your local development folder.

Setup Once

# 1. In the foundry-utilities directory
cd /path/to/foundry-utilities
npm link

# 2. In your Sanity project directory
cd /path/to/your-project/sanity
npm link @liiift-studio/sanity-utilities

Now any changes you make to the utilities package will be instantly available in your Sanity studio (Vite will hot-reload automatically).

When Done Developing

# Unlink and return to the published version
cd /path/to/your-project/sanity
npm unlink @liiift-studio/sanity-utilities
npm install @liiift-studio/sanity-utilities@latest

Development Workflow

  1. Make changes to utility components in foundry-utilities/components/
  2. Save the file — Vite hot-reloads instantly
  3. Test in your linked Sanity studio
  4. When ready to release:
    • Bump version: npm version patch (or minor/major)
    • Publish: npm publish --access public
    • Update consuming projects: npm install @liiift-studio/sanity-utilities@latest

Usage

Basic Usage

Import and use the utilities desk in your Sanity config:

import { UtilitiesDesk } from '@liiift-studio/sanity-utilities';

// In your sanity.config.js
export default defineConfig({
	// ... other config
	tools: [UtilitiesDesk()]
});

Available Components

All utility components are exported individually if you need custom implementations:

import {
	ConvertIdsToSlug,
	ConvertToWeakReferences,
	DangerModeWarning,
	DeleteUnusedAssets,
	DuplicateAndRename,
	ExportData,
	GetFontData,
	SearchAddData,
	SearchAndDelete,
	UtilitiesDesk
} from '@liiift-studio/sanity-utilities';

Utilities Included

1. Convert IDs to Slug

Converts font document IDs from auto-generated to slug-based IDs, updating all references across your content.

2. Convert to Weak References

Transforms strong document references into weak references across matching documents.

3. Delete Unused Assets

Scans for unreferenced image and file assets and allows bulk deletion with preview thumbnails.

4. Duplicate and Rename

Copies field values to new field names across all documents of a specific type.

5. Export Data

Exports documents to CSV or JSON formats with optional reference population.

6. Get Font Data

Analyzes uploaded font files using fontkit, displaying metadata and OpenType properties.

7. Search & Add Data

Bulk add or replace field data with multiple modes:

  • Full Replace
  • Find & Replace
  • Prepend
  • Append
  • Transform (toLowerCase, toUpperCase, trim)

8. Search & Delete

Searches for and deletes documents matching specific criteria with confirmation dialogs.

Safety Features

  • Danger Mode Locks: Destructive operations require unlocking danger mode
  • Warning Modals: 48-hour suppression option for danger mode warnings
  • Confirmation Dialogs: Double confirmation for bulk delete operations
  • Preview Features: See what will be affected before taking action

Requirements

  • Sanity Studio v3
  • React 18+
  • @sanity/ui v1 or v2
  • @sanity/icons v2 or v3

License

UNLICENSED - Internal use only for Liiift Studio projects

Support

For issues or questions, please contact the Liiift Studio development team.