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

@jsonschema-editor/ui-schema

v0.1.9

Published

Object-oriented JSON UI Schema data model

Readme

@jsonschema-editor/ui-schema

Standalone, strictly object-oriented UI schema data model (JSON Forms compatible).

Principles

  • Inheritance: UiElementUiLayout / Control / Label
  • Encapsulation: UiCustomAttributeCollection, dedicated UiSchemaAttributeRegistry
  • Polymorphism: accept(visitor), deepClone()
  • Factory: UiSchemaFactory

Installation

npm install @jsonschema-editor/ui-schema

Optional for the bridge:

npm install @jsonschema-editor/json-schema

Development in the monorepo:

pnpm install
pnpm run build

Standalone (without JSON Schema)

import { UiSchemaFactory } from "@jsonschema-editor/ui-schema";

const factory = new UiSchemaFactory();
const ui = factory.createVerticalLayout([
  factory.createControl("#/properties/name", "Name"),
  factory.createControl("#/properties/email", "Email"),
]);

Load from JSON

import { UiSchemaFactory } from "@jsonschema-editor/ui-schema";

const factory = new UiSchemaFactory();
const ui = factory.fromJSON({
  type: "VerticalLayout",
  elements: [
    { type: "Control", scope: "#/properties/name", label: "Name" },
    { type: "Control", scope: "#/properties/email", label: "Email" },
  ],
});

Layout types: Stepper and Categorization

Multi-step wizards and tabbed forms are first-class layout elements:

{
  "type": "Stepper",
  "elements": [
    {
      "type": "Step",
      "label": "Vehicle",
      "elements": [
        {
          "type": "Categorization",
          "elements": [
            {
              "type": "Category",
              "label": "Model",
              "elements": [
                { "type": "Control", "scope": "#/properties/model", "label": "Model line" }
              ]
            },
            {
              "type": "Category",
              "label": "Engine",
              "elements": [
                { "type": "Control", "scope": "#/properties/engine", "label": "Engine" }
              ]
            }
          ]
        }
      ]
    },
    {
      "type": "Step",
      "label": "Options",
      "elements": [
        { "type": "Control", "scope": "#/properties/extras", "label": "Extras" }
      ]
    }
  ]
}

See the full car configurator UI in jsonschema-editor-examples/src/examples/data/car-configurator/ui.schema.json.

Bridge (with JSON Schema)

Generate a default layout from a schema, then customize:

import { ObjectSchema, StringSchema } from "@jsonschema-editor/json-schema";
import { UiSchema, FormDefinition } from "@jsonschema-editor/ui-schema/bridge";

const schema = new ObjectSchema();
schema.setProperty("name", new StringSchema(), true);
schema.setProperty("email", new StringSchema());

// Auto-generate VerticalLayout with one Control per property
const ui = UiSchema.generateForSchema(schema);

// Or combine both documents
const doc = FormDefinition.fromJSON(schema.toJSON(), ui.toJSON());
doc.schema.root; // SchemaNode
doc.uiSchema.root; // UiElement

Resolve schema at a control scope

The bridge delegates to the JSON Schema model:

import { documentFromJSON } from "@jsonschema-editor/json-schema";
import { resolveSchemaAtScope } from "@jsonschema-editor/ui-schema/bridge";

const doc = documentFromJSON({
  type: "object",
  properties: {
    address: {
      type: "object",
      properties: { city: { type: "string" } },
    },
  },
});

const citySchema = resolveSchemaAtScope(doc.root, "#/properties/address/properties/city");
citySchema?.kind; // "string"

With $ref / $defs, pass a resolver:

resolveSchemaAtScope(doc.root, "#/properties/name", (ref) => doc.resolveRef(ref));

Scopes

Controls bind to JSON Schema paths using JSON Pointer–style scopes:

| Scope | Meaning | | --- | --- | | #/properties/name | Root object property | | #/properties/address/properties/city | Nested property | | #/items | Array item schema | | #/oneOf/0/properties/title | Branch in a composition |

No JSON Schema in the core

The src/model/ folder does not import from @jsonschema-editor/json-schema. Coupling lives exclusively in src/bridge/.