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

@synergy-design-system/metadata

v3.2.0

Published

Metadata for the Synergy Design System, usable by MCP Servers or other AI tools

Readme

@synergy-design-system/metadata

Machine-readable metadata for the Synergy Design System.

Public API

This package publishes a stable runtime query API and metadata artifacts.

import {
  clearMetadataStoreCache,
  createMetadataStore,
} from "@synergy-design-system/metadata";

const store = createMetadataStore();
const components = await store.getPackageEntities("components");
const migrationFiles = await store.getDataForLayer("migrations", "full");

// Optional: explicitly clear process-local caches (for tests or controlled refresh flows)
clearMetadataStoreCache();

Cache Behavior

createMetadataStore() uses a process-local read-through cache for:

  • data/index.json
  • core entity JSON files under data/core/**
  • layer file content reads via readLayerFile

Cache entries are scoped by dataDir and are shared across store instances in the same Node.js process. For production, this means metadata behaves as an immutable snapshot per deploy/process lifetime.

Use clearMetadataStoreCache() when you need to force a refresh without restarting the process (for example in tests).

Component Cluster Queries

Component metadata can be grouped via cluster ids (for example components-by-tag/structure). You can list cluster groups and filter component queries by cluster.

import {
  listComponentClusters,
  listComponents,
  listComponentsByCluster,
} from "@synergy-design-system/metadata";

const clusters = await listComponentClusters();
const structureComponents = await listComponents({
  cluster: "components-by-tag/structure",
});
const sameResult = await listComponentsByCluster("components-by-tag/structure");

cluster accepts a single cluster id or an array of ids.

Layer Content Workflow

Layer APIs return file references first. Resolve file contents through readLayerFile.

import {
  createMetadataStore,
  getComponentMetadata,
  readLayerFilesForEntity,
} from "@synergy-design-system/metadata";

const store = createMetadataStore();

const component = await getComponentMetadata("syn-header", {
  includeLayerRefs: true,
  layer: "full",
});

if (component.data) {
  const files = await readLayerFilesForEntity(store, component.data, "full");
  const firstFile = files.at(0);
  console.log(firstFile?.ref.path, firstFile?.content);
}

Use this flow when you need real file content (for example framework wrappers, styles, or examples), not only layer file paths.

Public data artifacts

  • data/index.json
  • data/core/**
  • data/layers/**
  • data/manifest.json
  • data/schemas/**

Internal Modules

Collectors, writers, pipeline orchestration, schemas, core helpers, and CLI build logic live under src/internal/ and are internal runtime behavior that may change without notice.

For repository-local tooling, an internal barrel exists at src/internal/index.ts, but it is intentionally not exported or published as part of the package contract.