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

@ranjeetk25/schema-grid-core

v0.4.1

Published

Schema-driven data grid core: schemas, field types, filters, formulas and the wire contract. Zero UI dependencies.

Readme

@ranjeetk25/schema-grid-core

Framework-free core of Schema Grid: schema and field types, filter AST, query model, permissions, the formula engine, the DataSource contract, an in-memory reference data source and the transport-neutral wire contract.

Subpath exports

@ranjeetk25/schema-grid-core              – schema, field-type ids, query/row/permission types, formulas, filters
@ranjeetk25/schema-grid-core/field-types  – built-in field types and registries
@ranjeetk25/schema-grid-core/filter       – filter AST, operators, validateFilter, resolveRelativeDate
@ranjeetk25/schema-grid-core/formula      – parser, evaluator, dependency graph
@ranjeetk25/schema-grid-core/memory       – createInMemoryDataSource (reference semantics)
@ranjeetk25/schema-grid-core/testing      – fixture schema/rows used by every package's tests
@ranjeetk25/schema-grid-core/wire         – run a DataSource across any transport (below)

Running a DataSource over the network (./wire)

The grid only needs a DataSource. ./wire splits one into a server half and a client half that meet over any transport — tRPC, REST, Hono, Lambda, a worker postMessage — without the grid knowing or caring. No transport is a dependency.

import { createDataSourceHandler, createRemoteDataSource, unwrapWireResult } from "@ranjeetk25/schema-grid-core/wire";

// server: (op, untrustedInput) => { ok: true, data } | { ok: false, error, status }. Never throws.
const handle = createDataSourceHandler(dataSource, { validateOutput: process.env.NODE_ENV !== "production" });

// client: any (op, input) => Promise<output> function becomes a DataSource<GridRow>
const remote = createRemoteDataSource(async (op, input) => unwrapWireResult(await callServer(op, input)));
  • GRID_OPERATIONS — the eight ops: fetch, applyChanges, createRows, deleteRows, getChanges, getOptions, createOption, lookup.
  • wireSchemas[op].input / .output — Zod schemas (zod ^3.25 || ^4). Multi-argument ops send named objects ({ partials }, { ids }, { since }, { columnId, search? }, { columnId, label }, { columnId, search }); deleteRows answers null.
  • toWireError(err) / httpStatusFor(code) — map thrown errors to { code, message, details? } by duck-typing on err.code / err.name (server and in-memory errors included; unknown errors become INTERNAL, message hidden).
  • createDataSourceHandler(ds, { validateOutput?, exposeInternalErrors?, mapError?, onError? }) — validates input, calls ds, maps errors; a missing optional op answers UNSUPPORTED_OPERATION (501).
  • createRemoteDataSource(transport, { supports?, validateOutput? }) — validates responses (default on) and rethrows WireErrors as RemoteDataSourceError (code, status, details). Optional ops exist only when supports[op] !== false.

Full list of codes, statuses and the HTTP binding: docs/wire-contract.md. Ready-made HTTP pieces: @ranjeetk25/schema-grid-server/http (server) and createHttpDataSource in @ranjeetk25/schema-grid-ag-grid (browser).