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

@hanzo/data

v1.4.8

Published

Hanzo Data — cross-platform, metadata-driven data-app components (typed fields, record table, kanban board, record detail, saved views) on @hanzo/gui. The universal object/field/record/view layer that powers any Base-backed CRM, CMS, or commerce app on we

Readme

@hanzo/data

Cross-platform, metadata-driven data-app components for any Hanzo Base-backed app — CRM, CMS, commerce, or a one-off internal tool. One model (typed fields → records → views) renders everywhere, on web, native (iOS), and desktop, because it's built on @hanzo/gui and drawn with @hanzo/ui's record kit — table ⇆ board, filter, sort, group, inline edit, saved views.

An object is a set of typed fields. A record is values for those fields. Every view — table, board, detail — renders from that one model, dispatched through a registry, so adding a field type is one registration, never a switch edit. A business app (CRM/CMS/ERP) is just a curated set of views over these components.

Install

bun add @hanzo/data @hanzo/ui @hanzo/gui

@hanzo/ui, @hanzo/gui and react are peers. Mount it under <Hanzo> (the @hanzo/ui root) and the cells, cards and editors follow the theme. Wrap a record surface in <Density value="compact"> for the record density: 32px rows and controls, an 8px gutter, 13px text; without it the table keeps 44px rows and the editors the kit's 36px.

The flagship: RecordsView

One shell turns any collection into a record surface — a toolbar (view switch, search, filter builder, sort builder, board group-by) over a DataTable or a BoardView, driven by a single ViewConfig. Presentational + data-injected: the host supplies raw records and the persistence callbacks; the view owns interaction state.

import { RecordsView, type FieldDefinition } from '@hanzo/data'

<RecordsView
  fields={fields}
  records={records}                              // raw rows; the view applies search + filter + sort
  onOpen={openDetail}                            // expand a record
  onEditCommit={(rec, field, value) => save(rec, field, value)}  // inline cell / board edit
  onCreate={createRecord}
  savedViews={{ views, activeId, onSelect, onSave, onDelete, deletable }}  // optional named views; deletable(id) keeps built-ins
/>
  • DataTable — click-to-sort headers, drag-resize + drag-reorder columns, row selection with a header select-all, inline cell editing (the field's own editor), pagination, hover-reveal open, honest empty/loading.
  • BoardView — kanban grouped by a select/status/boolean/relation field; drag a card to another lane and the record patch is emitted (optimistic, reverts on failure).
  • RecordDetail — a titled panel of fields, optionally inline-editable, with a related slot. RecordForm — the create/edit form.

A view's rules combine by match: and (every rule, the default) or or (any one); the word between two rules switches it. Numbers, money and dates also filter between two values, either end left open, and a range that ends on a day takes that day whole.

A server's page. For a collection too large to hold, the host runs the view as its query and passes the one page it got back with remote: the records are shown as given, never re-filtered, and the pager reads the total.

<RecordsView
  fields={fields}
  records={page.items}                                       // already searched, filtered, sorted
  view={view}
  onViewChange={setView}                                     // the host re-queries on every change
  remote={{ page: page.page, total: page.total, onPage: setPageNumber }}
/>

Field types

text · longText · number · percent · currency · boolean · select · multiSelect · date · dateTime · email · url · links · phone · rating · relation · json · uuid · fullName · address · files · richText · position · actor

Each type has a read Display and (where editable) an Input, resolved by the registry, both from @hanzo/ui's record kit: a select is a Tag in its option's colour (thirty data hues, TagColor) and its editor a searchable menu with a "No …" row; several values are one line of tags or pills with a +N; emails, links and phones are pills with their mailto / https / tel target; a relation is a record chip with an Avatar; a currency is an amount with a currency picker at its start; a phone a number with a calling-code picker; a date the kit's calendar under a typed day; a rating a row of stars. Enter commits an edit, Escape cancels it.

Extend

Register a renderer for any type — built-in or custom — and it works in every view:

import { registerField } from '@hanzo/data'

registerField('rating', { Display: MyStars, Input: MyStarPicker })

Pure logic (host-usable, tested)

The sort / filter / search / group / view helpers are pure and exported (also on subpaths @hanzo/data/{table,board,view}/logic so a Node host can import them with no gui runtime):

import { applyView, sortRecords, filterRecords, boardColumns } from '@hanzo/data'

Surface

  • Model — FieldDefinition, FieldType, FieldMetadata, SelectOption, TagColor, CurrencyValue, LinkValue, AddressValue, FullNameValue, ActorValue
  • Lists — regions(), currencies() (from Intl, in the reader's language), CALLING (E.164 calling codes)
  • Views — RecordsView, DataTable, BoardView, RecordDetail, RecordForm, RecordCard, RecordsToolbar
  • Primitives — Menu, MenuItem, CheckBox, Toggle, Calendar
  • Routers / Registry — FieldDisplay, FieldInput, isEditable, registerField, getFieldRenderers
  • Logic — applyView, sortRecords, filterRecords, searchRecords, paginate, boardColumns, movePatch, operatorsForType, emptyView, describeView, …
  • Theme — TAG_TONES, tagTone (the data palette's tag pairs as custom properties); tokens (the old fixed dark palette, kept for callers)

MIT · Hanzo AI — see LICENSE.md. HIP-0137 (hanzoai/hips).