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

@openg2p/registry-widgets

v1.1.3

Published

Complete React widget library with generic form widgets, data binding, validation, and conditional logic

Readme

@openg2p/registry-widgets

Schema-driven React widget library for the OpenG2P Registry platform. Renders sections, panels, and widgets from UI JSON, with Redux-backed form state, validation, conditional logic, API data sources, and theming.

Install

npm install @openg2p/registry-widgets json-edit-react

Peer dependencies: react, react-dom, @reduxjs/toolkit, react-redux, zod.

Quick start

import { Provider } from 'react-redux';
import {
  createWidgetStore,
  WidgetProvider,
  SectionsContainer,
} from '@openg2p/registry-widgets';
import type { SectionConfig } from '@openg2p/registry-widgets';

const store = createWidgetStore();
const sections: SectionConfig[] = [];
const schemaData = { };

function App() {
  return (
    <Provider store={store}>
      <WidgetProvider
        store={store}
        schemaData={schemaData}
        dataSourceRequestHandler={async (service, endpoint, method, params) => {
          return [];
        }}
        t={(key) => key}
      >
        <SectionsContainer
          sections={sections}
          schemaData={schemaData}
          mode="RegistryView"
          onSectionSave={async (changes) => console.log(changes)}
        />
      </WidgetProvider>
    </Provider>
  );
}

Core concepts

  • UI schema — Sections contain panels and widgets. Each widget has a widget-data-path (e.g. register-id.birth_date) resolved against schemaData.
  • WidgetProvider — Supplies schemaData, optional dataSourceRequestHandler for API/static selects, and a t translation function.
  • SectionsContainer — Renders one or more sections. Modes: RegistryView (read/edit per section) or IntakeForm (accordion flow).
  • SectionBuilder — Visual + JSON editor for authoring section schemas at runtime.

Widgets

Input: text, textarea, number, boolean, date, datetime, select, radio, checkbox, multi-select, phone, file, display.

Collections: table, dialog-table.

Special: profile, header-section, scores-display, id-authentication, register-lookup.

Custom widgets can be registered via widgetRegistry.

Theming

Pass a theme prop to WidgetProvider or read resolved tokens with useWidgetTheme(). See the Theme tab in the example app.

Example app

Interactive demos (Section Builder, Register Sections, Change Request, Intake Form, Special Sections, Widgets, Theme):

npm run example:setup   # first time
npm run example:dev

Details: examples/README.md

Sample section schemas and widget snippets live in example-ui-schema/.

Development

npm install
npm run build          # library → dist/
npm run type-check
npm run lint
npm run example:build  # example app → dist-examples/
  • tsconfig.json — type-check for src/ and examples/
  • tsconfig.build.json — Rollup library build (src/ only)

License

MPL-2.0