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

@mapette/core

v0.1.7

Published

Framework-agnostic map UI on MapLibre for place-and-photo sites: Apple Maps–like basemap, cluster bubbles, photo pins, popovers, a side panel / bottom sheet, theme and locale helpers.

Readme

@mapette/core

Framework-agnostic map UI on MapLibre GL for sites built around places and photos. Everything that touches the DOM or MapLibre lives here; @mapette/vue is a thin binding.

npm i @mapette/core maplibre-gl
import { createMap } from "@mapette/core";
import "@mapette/core/mapette.css";

const ctrl = await createMap({ container: el, preset: "compact", center: [135.77, 34.97], zoom: 13 });

What's inside

  • createMap(options) – creates the map and returns a controller. MapLibre is loaded lazily, so this is safe in server-rendered apps.
    • preset: static (display only), compact (pan and zoom, no rotation; for cards), explore (full screen, globe, view in the URL hash).
    • interactive overrides the preset per feature, e.g. { pan: false }.
    • style: a style URL, a style object, or a function of { palette, dark, locale }. Defaults to the mapette basemap.
    • Follows the page's color scheme (data-theme, .dark, or the system), keeps given keepSources across restyles, and avoids panels via padding.
    • controller.reveal(lngLat) pans a location into view without changing the zoom.
  • Basemap and overlays – createBasemap, clusterSource / clusterLayers, pointLayer, focusPointLayer, heatmapLayer, coneLayers with viewCone / fieldOfView for camera directions.
  • Controls – ScaleBar, MapButtons (compass, locate, zoom), ClusterExpander.
  • Markers and popovers – LocationMarker, PhotoPins (photos on the map at street zoom), MapPopover (positioned with Floating UI inside the visible map; card or menu style; card style is off unless popovers: true). Menus stop at 360px tall and scroll inside; set --mapette-popover-menu-max-height to change that.
  • Layout – Sheet: side panel on desktop, bottom sheet on phones that moves as one piece: below full height any vertical drag moves the whole sheet, at full height the content scrolls and pulling down from the top lowers the sheet. It reports the area it covers, and the map keeps its view still when that area changes.
  • Theme – CSS variables (--mapette-*, each split into -light / -dark halves), applyTheme(el, theme), built-in themes, each with a day and a night half (neutral, the default; cool, with bluer land, buildings and roads; warm, paper-like; mono, grayscale), theme preference helpers and themeInitScript for a flash-free first paint.
  • Locale and SEO – path-prefix locales (/, /zh-hant, /ja, /en), built-in UI texts in four languages (kitText), seoHead for localized <head> data.
  • Keyboard – onShortcuts that ignores typing in inputs and IME composition.
  • PWA updates – registerServiceWorker registers the service worker and reports a new version waiting to take over; apply() switches to it and reloads. The service worker must wait for a { type: "SKIP_WAITING" } message instead of calling skipWaiting on install, and its content must change with each deploy.

License

MIT. The default basemap uses OpenFreeMap tiles (© OpenStreetMap contributors) and AWS Terrain Tiles; keep the attribution visible.