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

json-renderers-specs

v1.4.1

Published

Headless component specification builder for json-renderers, compiling UI skeletons and data into JSON-to-DOM specs using json-to-spec

Readme

json-renderers-specs

Headless Component Specification Compiler for JSON-Driven UIs
Pure, deterministic UI specification generator compiling structured data and schemas into declarative JSON-to-DOM ASTs.

npm version License: MIT Bundle Size Live Docs

🌐 Live Documentation & Interactive Portal: https://keshavsoft.github.io/json-renderers-specs/


⚡ The Breakthrough Idea

Traditional UI builders force you to redefine data, structures, and event listeners for every single control.

json-renderers-specs introduces Unified Common Dataset Architecture:

  • Define your columns (schema, types, widths, labels) and data (records) once.
  • Compile any UI component simply by specifying its type!
                    ┌─────────────────────────┐
                    │  Common columns & data  │
                    └────────────┬────────────┘
                                 │
     ┌──────────────┬────────────┼────────────┬──────────────┐
     ▼              ▼            ▼            ▼              ▼
table.simple       form        select      dataList     searchInput

🚀 Installation

npm install json-renderers-specs

Or consume directly via modern ES modules in the browser:

<script type="module">
  import render from "https://keshavsoft.github.io/json-renderers-specs/dist/min.js";
</script>

💻 Quick Code Usage

import render from "json-renderers-specs";

// 1. Single source of data and columns
const columns = [
  { columnName: "itemName", label: "Item Name", type: "text", width: "240px" },
  { columnName: "category", label: "Category", type: "select", options: ["Fasteners", "Raw Materials"] },
  { columnName: "openingRate", label: "Rate", type: "text" },
  { columnName: "inStock", label: "In Stock", type: "checkbox" }
];

const data = [
  { itemName: "0.09/30mm Bolt", category: "Fasteners", openingRate: "1200.00", inStock: true }
];

// 2. Generate Table Spec
const tableSpec = render({
  type: "table.simple",
  data,
  columns,
  options: { showSerial: true }
});

// 3. Generate Form Spec (Prefilled from data[0], schema from columns)
const formSpec = render({
  type: "form",
  data,
  columns,
  options: { title: "Edit Product" }
});

// 4. Generate Select Dropdown Spec (Automatically targets category column)
const selectSpec = render({
  type: "select",
  data,
  columns
});

// 5. Generate DataList Autocomplete Spec (Automatically targets itemName)
const datalistSpec = render({
  type: "dataList",
  data,
  columns
});

📱 Live Interactive Screens

Each component has its own dedicated, un-bloated screen live on GitHub Pages:

| Component Screen | Type | Live Demo | | :--- | :--- | :--- | | Simple Table | table.simple | Open Screen → | | Table with Search | table.simple + showSearch: true | Open Screen → | | Declarative Form | form | Open Screen → | | Select Dropdown | select | Open Screen → | | DataList Autocomplete | dataList | Open Screen → | | Search Input | searchInput | Open Screen → | | Docs Portal & Catalog | Hub | Open Portal → | | Architecture & Roadmap | Guide | Read Architecture → |


🏗️ Architecture, Dependencies & Scope

Full detailed guide available at https://keshavsoft.github.io/json-renderers-specs/architecture/.

The 3-Tier Pipeline

  1. Tier 1 (Data & Schema): data.json + columns.json.
  2. Tier 2 (Headless Spec Compiler — THIS REPO): Compiles declarative AST trees (specAsJsonToDom). Zero DOM creation.
  3. Tier 3 (Browser DOM Renderer): Downstream json-renderers / @keshavsoft/json-to-dom mounts the AST to the physical DOM.

Dependency Roles

| Dependency | Role | Exact Responsibility | | :--- | :--- | :--- | | json-renderers-guard | Validation | Input contract guard verifying valid configurations. | | json-instruction-single | 1D Engine | 1-pass declarative transforms from source paths to target AST. | | json-instruction-double | 2D Engine | Matrix transforms (rows × cols) for tabular bodies (<tbody>). | | json-renderers-build-table-options | Table Enhancer | Injects serial column (#) and row actions (show). | | json-transformer-funcs | Collection | fromCollection projections for select & datalist options. |


🗺️ Project Roadmap

  • Phase 1 (Shipped • v1.3.x): Simple Table, Searchable Table, Form, Select, DataList, SearchInput with unified common dataset.
  • Phase 2 (In Progress): Card Grids, Tab Views, Modal Dialog specs, Pagination specs.
  • Phase 3 (Enterprise Scope): Schema-driven validation rules (regex, required, min/max), multi-step wizards, and column-level sorting/filter operators.

📦 Global Registration

In browser environments, the distribution bundle automatically registers under the standard KeshavSoft namespace:

globalThis.ks.jsonRenderersSpecs = {
  meta: { version: "1.3.1", name: "json-renderers-specs" },
  render: [Function: render]
};

📄 License

MIT © KeshavSoft