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

@wix/zero-config-implementation

v1.41.0

Published

Core library for extracting component manifests from JS and CSS files

Downloads

2,493

Readme

@wix/zero-config

CLI and library to generate component manifests from React TypeScript and CSS files. Consumes .ts/.tsx entry files and produces EditorReactComponent manifests.

Installation

yarn add -D @wix/zero-config

Peer dependencies: react (^18 || ^19), react-dom (^18 || ^19), typescript (^5).

Usage

Programmatic

import { extractComponentManifest, extractComponentManifestResult } from '@wix/zero-config'

const manifest = await extractComponentManifest(
  './src/MyComponent.tsx',
  './dist/index.js', // path to the compiled JS entry of the component's package
)

console.log(manifest.component) // EditorReactComponent
console.log(manifest.errors) // non-fatal ExtractionError[]

// If you prefer neverthrow ResultAsync semantics:
const result = await extractComponentManifestResult('./src/MyComponent.tsx', './dist/index.js')
result.match(
  (manifestResult) => {
    console.log(manifestResult.component)
    console.log(manifestResult.errors)
  },
  (error) => console.error(error),
)

CLI

npx @wix/zero-config ./src/MyComponent.tsx
# or
npx @wix/zero-config
# then enter path when prompted

Scripts

| Script | Description | |--------|-------------| | yarn build | Build with Vite; output in dist/ | | yarn dev | Run CLI in dev (vite-node) | | yarn start | Run built CLI: node dist/cli.js | | yarn lint | Biome check on src/ | | yarn test | Vitest | | yarn docs | Generate TypeDoc markdown into docs-audit/ |

API layers

  • Tier 1 — High-level: extractComponentManifest() — one call, default pipeline (Promise<ManifestResult>).
  • Tier 1 (neverthrow variant): extractComponentManifestResult() — same pipeline with ResultAsync return.
  • Tier 2 — Pipeline building blocks: compileTsFile, extractAllComponentInfo, extractCssImports, processComponent, runExtractors, ExtractorStore, buildElementTree, createPropTrackerExtractor, createCssPropertiesExtractor, parseCss, toEditorReactComponent, and exported types (e.g. ComponentInfo, PropInfo, ExtractionResult, ReactExtractor).
  • Tier 3 — Low-level: renderWithExtractors, CreateElementListener for custom createElement/JSX interception.

Full API reference: docs-audit/README.md (generate with yarn docs).

Structure

  • src/cli.ts — CLI entry (bin: zero-config)
  • src/index.ts — Library exports and main API
  • src/ts-compiler.ts — TypeScript compilation
  • src/manifest-pipeline.ts — Per-component pipeline (load → render → CSS → conversion)
  • src/component-loader.ts — Resolve and load component package
  • src/component-renderer/ — React createElement interception and renderWithExtractors
  • src/information-extractors/ — TS (AST), CSS (css-tree), React (prop tracking, DOM coupling)
  • src/converters/ — To EditorReactComponent and data items
  • src/errors.ts — BaseError, NotFoundError, ParseError, etc.