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

@moritzbrantner/maps

v0.1.5

Published

React map components and temporal geo utilities backed by density-aware aggregation.

Readme

@moritzbrantner/maps

React map components, density aggregation helpers, GeoJSON editing, and temporal geo utilities for interactive spatial views.

Install

bun add @moritzbrantner/maps @moritzbrantner/ui react react-dom
npm install @moritzbrantner/maps @moritzbrantner/ui react react-dom

Import the stylesheet once in your app shell:

import "@moritzbrantner/maps/styles.css";

The default stylesheet includes package map styles and MapLibre GL CSS without Tailwind preflight. If you need the legacy global reset, import:

import "@moritzbrantner/maps/styles.full.css";

Live demo: https://moritzbrantner.github.io/maps/

Which Map Should I Use?

| Need | Use | | --- | --- | | Plain point markers | PointMap | | Proportional point markers | BubbleMap | | Dense point aggregation and clusters | ClusteredMap | | Point density or scalar field surfaces | HeatMap / HeatFieldMap | | Origin-destination connections | FlowMap | | Mixed GeoJSON display | GeoJsonMap | | Moving point tracks | TemporalClusteredMap / TemporalHeatMap | | Multiple coordinated layers | MapView with MapLayers | | Create, reshape, group, or delete GeoJSON | EditableGeoJsonMap |

Minimal Example

import "@moritzbrantner/maps/styles.css";
import { ClusteredMap, type MapPoint } from "@moritzbrantner/maps";

const points: MapPoint[] = [
  { id: "berlin", latitude: 52.52, longitude: 13.405, metrics: { demand: 42 } },
];

export function FleetMap() {
  return (
    <ClusteredMap
      defaultViewState={{ center: [13.405, 52.52], zoom: 8 }}
      points={points}
      style={{ height: 420 }}
    />
  );
}

Common Controls

Compose overlays with the built-in legend components and keep feature state controlled when the surrounding app owns side panels, tables, or detail views.

import {
  ClusteredMap,
  MapColorRampLegend,
  type MapSurfaceController,
} from "@moritzbrantner/maps";

let controller: MapSurfaceController | null = null;

<ClusteredMap
  onMapControllerReady={(next) => {
    controller = next;
  }}
  onSelectedFeatureIdChange={(featureId) => setSelectedId(featureId)}
  points={points}
  selectedFeatureId={selectedId}
>
  <MapColorRampLegend
    stops={[[0, "#67e8f9"], [1, "#dc2626"]]}
    title="Demand"
  />
</ClusteredMap>;

controller?.fitPoints(points, { padding: 72 });

Documentation

Runtime Notes

  • Rendered React maps require the react, react-dom, and @moritzbrantner/ui peer dependencies.
  • @moritzbrantner/timeline-editor is an optional peer required only for timeline editor components.
  • MapLibre, Three, Turf helpers, supercluster, d3-delaunay, polygon-clipping, and related map/runtime packages are included as package dependencies.
  • Rendering map components requires browser DOM APIs and WebGL/canvas support.
  • React map entrypoints are client components and start with "use client".
  • @moritzbrantner/maps/styles.css is compiled CSS that includes package styles and MapLibre GL CSS without Tailwind preflight/global reset.
  • @moritzbrantner/maps/styles.full.css is a compatibility stylesheet that includes Tailwind preflight/global reset.
  • @moritzbrantner/maps/core is intended for data-only usage and must remain free of React, DOM, MapLibre, Three, @moritzbrantner/ui, and timeline editor runtime imports.

Verification

The release contract is:

bun run verify:fast
bun run test:browser
bun run verify:benchmarks