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

@hearthforge/forms

v0.2.0

Published

Descriptor-driven forms and wizards: JSON in, a rendered form with the keyboard, validation and a11y contract out

Readme

@hearthforge/forms

The descriptor-driven form and wizard engine of HearthForge. A form is data — a FormDescriptor (or a wizard of WizardStepDescriptors) of fields, groups, conditions and validation rules, the types @hearthforge/plugin-sdk defines — and this package renders it with @hearthforge/ui, owning the keyboard behaviour, zod validation, async and cross-field checks, conditional visibility, seeding and accessibility. Every form and wizard in the panel goes through it, and a game plugin describes its config form and creation wizard the same way, so neither ever hand-builds a form.

Install

pnpm add @hearthforge/forms @hearthforge/ui @hearthforge/plugin-sdk

Node >= 22.

Usage

import type { FormDescriptor } from "@hearthforge/plugin-sdk";
import { FormRenderer } from "@hearthforge/forms";

const descriptor: FormDescriptor = {
  fields: [
    { type: "text", key: "serverName", label: "my-game:config.serverName.label", required: true },
    { type: "number", key: "maxPlayers", label: "my-game:config.maxPlayers.label", min: 1, max: 200 },
  ],
  submitLabel: "my-game:config.save",
};

export function ServerSettings({ onSave }: { onSave: (values: Record<string, unknown>) => Promise<void> }) {
  return (
    <FormRenderer
      descriptor={descriptor}
      defaultValues={{ serverName: "", maxPlayers: 20 }}
      onSubmit={(values) => onSave(values)}
    />
  );
}

Labels are i18n keys, resolved through react-i18next; register the package's own catalog once under the forms namespace (import formsEn from "@hearthforge/forms/locales/en", then i18next.addResourceBundle("en", "forms", formsEn, true, true)). WizardRenderer, FormDialog and InlineEdit take descriptors the same way.

In a game plugin this package is provided by the panel through the host share scope (HOST_SHARED_MODULES in @hearthforge/plugin-sdk), exactly like @hearthforge/ui: declare it as a peer and never bundle it.

Peer dependencies

react and react-dom (^18 || ^19), @hearthforge/ui (the matching 0.x line), @hearthforge/plugin-sdk (^0.1.1 || ^0.2.0), zod (^4), i18next, react-i18next and lucide-react. The exact ranges are in package.json.

Versioning

Pre-1.0: a minor release may break the renderer's API; a patch never does. The descriptor format itself is versioned with @hearthforge/plugin-sdk. Maintenance lines publish from release/X.Y branches under the release-X.Y npm dist-tag and never move latest — see Maintenance releases.

License

Apache-2.0.

Links