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

@ggts-sh/core

v0.43.0

Published

ggts core: framework-agnostic grammar-of-graphics pipeline, scale stability, layout, and the pure SVG-string renderer.

Downloads

40

Readme

@ggts-sh/core

codecov

Grammar pipeline (stats, positions, facets, scales, layout) and pure SVG-string renderer. The main entry has no DOM — Node, edge runtimes, workers. Canvas and hit-testing live under @ggts-sh/core/dom. Pre-1.0.

bun add @ggts-sh/core     # or: npm install @ggts-sh/core

For server, CLI, and agent rendering. Svelte apps use @ggts-sh/svelte.

Quick example

Author with the builder from @ggts-sh/spec, render here:

import { registerAll, renderToSVGString, runPipeline } from "@ggts-sh/core";
import { aes, gg } from "@ggts-sh/spec";

// The barrel is side-effect-free: register the grammar explicitly (or import
// "@ggts-sh/core/render" for identity charts only).
registerAll();

const spec = gg(
  [
    { year: "1835", value: 12 },
    { year: "2026", value: 31 },
  ],
  aes({ x: "year", y: "value" }),
)
  .geomLine()
  .spec();

const svg = renderToSVGString(spec, { width: 640, height: 400 });

const model = runPipeline(spec, { width: 640, height: 400 });
// model.scene, model.scaleDecisions, model.guidePlans,
// model.advisories, model.warnings, model.candidates

For the smallest point-only headless bundle, opt into one geom family:

import { renderToSVGString } from "@ggts-sh/core/headless";
import { registerBasicPoints } from "@ggts-sh/core/headless/register";

registerBasicPoints();

Mapped colors can stay catalog-free too: call registerDefaultOrdinalColor() for the built-in palette or an explicit range. Call registerOrdinalColor() instead when the spec selects a named categorical, ColorBrewer, sequential, or Crameri scheme.

Bare PortableSpec JSON works the same way — channel mappings use { field: "col" }, not bare strings:

import { renderToSVGString } from "@ggts-sh/core";

const svg = renderToSVGString(
  {
    data: {
      values: [
        { year: "1835", value: 12 },
        { year: "2026", value: 31 },
      ],
    },
    layers: [
      {
        geom: "line",
        aes: { x: { field: "year" }, y: { field: "value" } },
      },
    ],
  },
  { width: 640, height: 400 },
);

Entries

| Import | Use | | --------------------------------- | --------------------------------------------------- | | @ggts-sh/core | Full grammar + temporal + SVG string | | @ggts-sh/core/render | Lean identity-chart surface (auto-registers basics) | | @ggts-sh/core/headless | Side-effect-free headless pipeline and SVG renderer | | @ggts-sh/core/headless/register | Tree-shakeable basic geom/stat family registration | | @ggts-sh/core/data | Bundled teaching datasets for any framework | | @ggts-sh/core/dom | Browser canvas draw + hit index | | @ggts-sh/core/temporal | Temporal polyfill entry |

CLI without installing this package as a library: ggts render (same pipeline, JSONL diagnostics on stderr).

Specs validate through @ggts-sh/spec. Docs: ggts.sh · Repo: github.com/ggts-sh/ggts

MIT © Liam O'Dea