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

@metaboliccode-dev/widget

v0.2.61

Published

Publishable React dashboard library for Metabolic Code patient reports. It ships the dashboard component, iframe embed build, typed DTO mappers, report API helpers, LMS helpers, and Stealth Health payload builders.

Readme

@metaboliccode-dev/widget

Publishable React dashboard library for Metabolic Code patient reports. It ships the dashboard component, iframe embed build, typed DTO mappers, report API helpers, LMS helpers, and Stealth Health payload builders.

Requirements

  • Node.js 18+
  • React 18 or 19

Development

npm install
npm run dev:iframe

Scripts

| Command | Description | | --- | --- | | npm run build | Build library ESM/CSS/types plus the iframe bundle | | npm run build:lib | Build the library package only | | npm run build:iframe | Build the standalone iframe app only | | npm run dev:lib | Watch-build dist/ for a linked host app | | npm run dev:iframe | Run the iframe dev server | | npm run typecheck | TypeScript check | | npm run test:run | Vitest once | | npm run lint | Biome check |

Quick install

npm install @metaboliccode-dev/widget

Component usage

import { MetabolicDashboard } from "@metaboliccode-dev/widget";
import "@metaboliccode-dev/widget/styles.css";

export function App({ authToken }: { authToken: string }) {
  return (
    <div className="h-screen">
      <MetabolicDashboard
        reportHttpConfig={{ authToken, backendRegion: "us" }}
        sideMenuUserProfile={{ displayName: "User", email: "[email protected]" }}
      />
    </div>
  );
}

Hosts pass a signed backend JWT as authToken. The library sends it as Authorization: Bearer ... and uses the backend URLs baked into the build unless an MC-owned local/staging host passes backendBaseUrl or reportHttpConfig.baseUrl. In component mode there is no iframe session exchange; browser-visible backend traffic is the signed report API traffic, for example POST /api/v1/report/full.

Iframe usage

The iframe path uses a one-time embedToken in mb_context. A trusted host backend obtains that token server-to-server from POST /api/v1/embed/launches. The browser receives only the one-time token, and the iframe exchanges it through POST /api/v1/embed/sessions for an encrypted HttpOnly backend session cookie before loading report data.

import {
  metabolicIframeSrcWithConfig,
  metabolicIframeSrcWithRenderContext,
} from "@metaboliccode-dev/widget";

const withConfig = metabolicIframeSrcWithConfig(iframeUrl, whitelabelConfig);
const src = metabolicIframeSrcWithRenderContext(withConfig, {
  role: "patient",
  embedToken,
  backendRegion: "us",
});

Documentation

| Document | Description | |----------|-------------| | Installation | Install and framework notes | | Quick Start | Component and iframe setup | | API Reference | Props, helpers, exported types | | Configuration & Theming | Branding-only config | | HTTP API | Backend request contract | | Iframe Embed | Secure iframe flow | | Development | Local workflow, tests, release |

AG Charts enterprise license

Charts use AG Charts Enterprise. The license key is baked into the published bundle by the manual GitHub Actions release workflow; consuming apps do not need to handle the license key.