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

@machinemetrics/mm-react-blocks

v0.1.2

Published

Closed-config composite ("blocks") components for MachineMetrics applications, built on @machinemetrics/mm-react-components primitives.

Readme

@machinemetrics/mm-react-blocks

Closed-config composite ("blocks") components for MachineMetrics applications. Blocks peer-depend on @machinemetrics/mm-react-components for primitives, tokens, and theme — they never fork them.

Three blocks ship today: ControlBar, PageHeader and SplitTimeline. The rest of the repo is the toolchain, guardrails and CI shape described in the bootstrap proposal. Full context: mm-plans repo, carbide-dsl/mm-react-blocks-proposal.md.

Consuming a block

npm install @machinemetrics/mm-react-blocks

An app must import BOTH stylesheets, the peer's first:

import '@machinemetrics/mm-react-components/styles';
import '@machinemetrics/mm-react-blocks/styles';

The peer's sheet defines the palette tokens (--purple-500, --yellow-400 and the rest). This package's sheet only references them. Import this one alone and every themed colour resolves to nothing, with no error in the console and no build warning. The block still renders, which is what makes the failure easy to miss.

The Carbide subtree also needs the carbide class on an ancestor element, the same requirement mm-react-components documents.

The block contract

  1. A block's props are closed typed config — no children, no className/style, no render props/ReactNode props. Icons only as typed component references.
  2. Every variant is a literal union or enum; arrays are bounded and typed.
  3. Blocks import primitives from @machinemetrics/mm-react-components; primitives never import blocks.
  4. A block's props type must be expressible as a strict JSON schema minus callbacks — every block is a Carbide DSL vocabulary candidate by construction, admitted through the vocabulary-decision process.

Lint-enforced today (eslint.config.ts, scoped to src/components/blocks/**/*Props): the className/children/style half of rule 1, both identifier-spelled (className: string) and quoted-string-literal-key ('className': string) forms.

Review-enforced (not statically checkable cheaply, so not lint rules): the render-prop/ReactNode-prop half of rule 1, rule 2 (literal-union variants, bounded arrays), rule 3 (import direction — blocks → primitives, never the reverse), and rule 4 (JSON-schema expressibility). These are checked at block-admission review time, same group as Carbide DSL vocabulary decisions.

Theme tokens (interim)

The design ruling for how blocks get semantic-color utilities (bg-muted, text-foreground, etc.) is a tokens-only @theme export from the peer (deferred to mm-react-components 1.6.5). Until that ships, src/lib/styles.css vendors the peer's @theme inline color/radius mapping verbatim (values reference the peer's own tokens — var() indirections, plus the peer's three calc(var(--radius) ± N) radius steps — so resolved values can't drift; only the mapping list can). npm run check:token-emission (part of verify) fails loudly if that vendored block goes missing or stops mapping real utilities.

Development

npm install
npm run dev      # preview shell at http://localhost:5173
npm run verify   # lint + type-check + test:unit + build + token-emission + externals
npm test         # playwright visual suite (light + dark)

See AGENTS.md for the contract summary agents should follow when adding a block, and the proposal doc for full context (what moves here, versioning, consumer impact).