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

@salmonui/data

v0.4.2

Published

Data sources for Salmon UI components over the Salmon UI JSON protocol: remote, live, offline, cursor and infinite paging, cache, dedupe, retry, optimistic writes and state storage.

Readme

@salmonui/data

Data sources for Salmon UI components over one efficient JSON protocol: remote reads, offset/cursor/infinite paging, lazy group and tree loads, facets, optimistic CRUD with row/cell errors and conflicts, live patches, offline mode, cache/dedupe/retry/prefetch, and state storage. The DataGrid is the main consumer; the dropdown components, PivotTable and Gantt read remote data through the same sources.

npm install @salmonui/data

Every @salmonui/* package of an application must resolve to the same version (they are released together and exact-pinned to each other).

  • Zero runtime dependencies, ESM only, sideEffects: false, no React, no DOM.
  • fetch, AbortController, and timers are injected or read lazily from globalThis; tests inject createManualScheduler().
import { createDataGridEngine } from '@salmonui/data-grid/engine';
import { createJsonDataSource, tupleColumns, tupleRowId } from '@salmonui/data';

const fields = ['id', 'name', 'country', 'amount', 'createdAt'];
const dataSource = createJsonDataSource({
  url: '/api/orders',            // POST application/json, Salmon UI protocol v1
  key: 'id',
  fields,                        // rows stay decoded tuples in this order
  paging: { kind: 'offset' },
  policy: { cache: { ttlMs: 30_000 }, retry: { attempts: 3, delayMs: 200 }, prefetch: { adjacentPages: 1 } },
});

const engine = createDataGridEngine({
  getRowId: tupleRowId(fields, 'id'),
  columns: tupleColumns([{ field: 'name' }, { field: 'amount', type: 'number' }, { field: 'createdAt', type: 'date' }], fields),
  dataSource,
});

Any other backend (GraphQL, WebSocket, an RPC client) plugs in through transport: (request, { signal }) => Promise<response>. The reference handler @salmonui/data/server (createJsonQueryHandler(rows, { key })) answers the protocol over an in-memory array and doubles as an in-process transport for tests and SSR.

Entry points

| Entry | Contents | | --- | --- | | @salmonui/data | Everything below except ./server | | @salmonui/data/json | createJsonDataSource, transports, protocol types and codecs, tupleColumns | | @salmonui/data/stream | createLiveDataSource | | @salmonui/data/local | createOfflineDataSource | | @salmonui/data/storage | createKeyValueStateStorage, createJsonStateStorage | | @salmonui/data/views | createSavedViews (named saved views) | | @salmonui/data/lookup | createLookup, createJsonLookup (cached lookup sources) | | @salmonui/data/server | createJsonQueryHandler reference server |

License

MIT