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

@blinkpage/component-builder

v0.2.0

Published

Shared component builder for Blinkpage. Compiles TSX (or raw HTML) into a base64 IIFE bundle plus extracted CSS, ready for upload to a Blinkpage project.

Readme

@blinkpage/component-builder

Shared component build pipeline used by:

  • component-studio (Electron app) — the original filesystem-driven builder.
  • @blinkpage/mcp (Task #11) — the in-memory TSX/HTML builder.

Public API

buildComponent({ tsx, scss? })

Compile an in-memory TSX string (plus optional SCSS) into a minified IIFE bundle.

Returns:

{
  bundle: string;       // base64
  styles?: string;      // base64, present when CSS was emitted
  name: string;
  propsSchema?: any[];  // currently always undefined in V1
}

buildFromHtml({ html, css?, name })

Convert raw HTML + CSS to a class component, then reuse buildComponent.

  • classclassName, forhtmlFor, onclickonClick, etc.
  • Inline style="..." → JSX object literal.
  • Void tags self-closed.

Returns the same shape as buildComponent minus propsSchema (HTML mode has no props in V1).

ComponentBuilder

Verbatim extraction of component-studio's filesystem-driven builder. Takes (componentDir, componentRelativePath), spawns npx vite build inside the user's project so that @blinkpage/composer-tools resolves out of their node_modules. Use this for editor/desktop workflows; use buildComponent for headless / MCP server use.

Build output contract

  • bundle: base64 of a minified IIFE that registers the component on window.__CUSTOM_COMPONENTS__[name] and exports it as default.
  • styles: base64 of a single CSS file (CSS code splitting is disabled).
  • Externals (mapped to globals): reactReact, react-domReactDOM, @blinkpage/composer-toolsComposerTools.

Logging

All log lines are tagged [ComponentBuilder][<module>] and emitted to console.info / warn / error. The package does not use Blinkpage's runtime logger because it is consumed in node-only contexts (Electron main process, MCP stdio server).