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

figma-plugin-bundle

v0.0.3

Published

Figma Plugin Bundle is a framework-agnostic, Vite-powered build tool for Figma plugins development. It abstracts postMessage plumbing so you can import and call code-side logic like standard UI functions.

Readme

Figma Plugin Bundle

Figma Plugin Bundle is a Vite-based tool for building plugins for Figma. It focuses on one specific problem: making communication between the UI and the plugin code simple, type-safe, and pleasant to use.

Why Figma Plugin Bundle

Building Figma plugins is powerful. You can extend the editor with custom workflows tailored to your team or product. The problem starts when the UI (running in an iframe) needs to talk to the plugin code (running in the main thread).

By default, this means working with postMessage, setting up event listeners, defining payload contracts manually, and keeping types in sync on both sides. It works, but it adds boilerplate, weakens type safety, and makes refactoring harder than it should be.

There are libraries that improve this experience, including figwire. Figma Plugin Bundle builds on that idea and integrates it directly into the build process so you don’t have to think about wiring at all.

How it works

With Figma Plugin Bundle, you write plugin-side functions normally and export them from files that follow a simple naming convention. During the build, Figma Plugin Bundle detects those files, bundles them into a single plugin file, and automatically connects them to the UI using an internal figwire instance.

From the UI perspective, those functions behave like regular async functions. You import them and call them. TypeScript provides full autocomplete and type inference across the UI–plugin boundary.

Here’s an example.

Plugin code (get-collections.code.ts):

export async function getCollections() {
  const collections = await figma.variables.getLocalVariableCollectionsAsync();
  return collections.map(collection => ({
      id: collection.id,
      name: collection.name
    }));
}

UI usage:

import { getCollections } from './get-collections.code.ts';

const collections = await getCollections();

There is no manual messaging, no event handling, and no duplicated types. You call a function and await the result.

The result

Figma Plugin Bundle gives you a simple mental model: treat plugin-side functions as remote async functions. Everything is bundled into a single plugin file, fully typed, and easy to reason about.

The goal is robustness with minimal abstraction. The behavior is explicit, the implementation is predictable, and the developer experience stays clean.

API