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

@vertekum/ext-export-figma

v0.3.15

Published

Vertekum extension: export a resolved, Figma-shaped model (collections, modes, variables, styles) with pluggable dialect writers for Figma importers

Readme

@vertekum/ext-export-figma

Exports a resolved token composition as a Figma-shaped model — collections, modes, variables, aliases, and styles — plus pluggable dialect writers that reshape the model for specific Figma importers.

The model is the artifact

The exporter's canonical output, figma.model.json, is a versioned document (schema shipped as model.schema.json) describing one composition in Figma's own vocabulary:

  • Each resolver set becomes a single-mode collection.
  • Each modifier becomes a collection whose contexts are its modes, with values resolved per context. The composition is the topology — nothing to configure.
  • References survive as alias edges (per mode); a reference whose target has no variable is materialized instead — never dropped.
  • Figma is variables and styles: typography tokens become text styles, shadows become effect styles, each with resolved per-property values and bindings to member variables where the member was authored as a reference.
  • Every variable carries the Figma-typed value (COLOR as {r,g,b,a} floats, dimensions as unitless px FLOAT, STRING, BOOLEAN) and the verbatim DTCG source — a consumer of the model loses nothing to any importer's dialect.
  • scopes and codeSyntax are reserved fields; nothing populates them yet.

Configuration

import { figmaExportExtension } from '@vertekum/ext-export-figma';
import { microsoftManifest } from '@vertekum/figma-dialect-microsoft';

export default defineConfig({
  extensions: [figmaExportExtension],
  targets: [
    {
      id: 'figma',
      exporter: 'figma',
      composition: 'default',
      out: 'build/figma',
      options: {
        dialects: [microsoftManifest({ modes: 'native' })],
        types: { /* custom-$type contributors, see below */ },
      },
    },
  ],
});

| Option | Value space | Meaning | | --- | --- | --- | | dialects | FigmaDialect[] | writers run over the model; their files land under <out>/<dialect-id>/. The model itself is always emitted. | | types | Record<$type, TypeContributor> | how a custom type becomes variables (below). A $type with no mapping is skipped with a notice in figma.model.json. |

Dialects

A dialect is { id, write(model): OutputFile[] } — a pure function from the model to one importer's file shape. Ship your own as a package; pass an instance in options.dialects.

The first dialect ships as its own contribution package — @vertekum/figma-dialect-microsoft — targeting the figma-variables-import plugin lineage (sidecar manifest, one DTCG string-dialect file per collection-mode, with native/split-collections/split-files mode strategies for seats without multi-mode collections). The model never downgrades; a dialect's output does.

Custom types

A contributor maps one mode-value of a token to variable atoms:

const spacial: TypeContributor = (value, token) =>
  (value as Entry[]).map((entry, i) => ({
    suffix: ['top', 'right', 'bottom', 'left'][i], // extends the token's path
    type: 'FLOAT',
    ...(typeof entry === 'string'
      ? { alias: entry.slice(1, -1) }               // dotted token path
      : { value: entry.value }),
  }));

suffix unfolds a compound into sibling variables; alias becomes a real alias edge when the target exists in the model.