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

@osmix/shortbread

v0.1.0

Published

Shortbread schema vector tile encoder for Osmix

Readme

@osmix/shortbread

Shortbread schema vector tile encoder for Osmix. Generates vector tiles following the Shortbread schema specification.

Installation

pnpm add @osmix/shortbread

Usage

import { ShortbreadVtEncoder } from "@osmix/shortbread";
import { fromPbf } from "osmix";

// Load OSM data
const osm = await fromPbf(pbfStream);

// Create encoder
const encoder = new ShortbreadVtEncoder(osm);

// Generate a tile
const tile = encoder.getTile([x, y, z]);

For repeated or concurrent tile generation, build the compact transferable classification index once and share its backing buffers with workers:

import { ShortbreadFeatureIndex, ShortbreadVtEncoder } from "@osmix/shortbread";

const featureIndex = ShortbreadFeatureIndex.build(osm);
const encoder = new ShortbreadVtEncoder(osm, { featureIndex });

The existing positional new ShortbreadVtEncoder(osm, extent, buffer, featureIndex) form remains supported for compatibility.

featureIndex.transferables() can be reconstructed with ShortbreadFeatureIndex.fromTransferables(). Its buffers use SharedArrayBuffer whenever the runtime supports it, so workers can share one index without cloning regional data. featureIndex.query(bbox) remains available, while the typed query form can prefilter records by entity kind, geometry mask, and Shortbread layer before materialization. Classified area relations suppress only the corresponding member-way layers they replace. Other independently classified layers on the same way remain available, and route membership never suppresses road geometry.

Layers

The encoder generates the following Shortbread-compliant layers:

  • water - Water bodies (lakes, reservoirs, etc.)
  • water_lines - Rivers, streams, canals
  • land - Land cover (forests, farmland, residential, etc.)
  • sites - Site areas (parks, zoos, hospitals, etc.)
  • buildings - Building footprints
  • streets - Roads and paths
  • street_labels / street_labels_points - Street label placement
  • pois - Points of interest
  • places - Place labels (cities, towns, villages)
  • boundary_lines / boundary_labels - Administrative boundaries
  • addresses - Address points
  • public_transport - Transit features
  • aerialways - Ski lifts, gondolas
  • ferries - Ferry routes
  • bridges, dams, piers - Infrastructure features

API

WIP