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

@mapvx/web-components

v0.12.0

Published

MapVX Web Components is a web components library that provides interactive and accessible mapping solutions. Built with Lit, it offers a modern, lightweight, and framework-agnostic way to integrate maps into any web application.

Readme

Mapvx Web Components

npm version

A collection of interactive map components built with Lit and TypeScript.

Full documentation: docs.mapvx.app/web-components

Features

  • Interactive map visualization
  • Floor navigation
  • Route generation
  • Accessibility support
  • QR mode

Installation

NPM

npm install @mapvx/web-components

CDN (iife)

https://unpkg.com/@mapvx/[email protected]/dist/iife/<component>

Always pin the version in the URL, as the snippets in this README do (never @latest, never without a version). Without one, unpkg serves the latest release: a new release changes what your page loads without you touching anything, and a CSS or layout change can break the embed or make a local patch obsolete. With the version pinned, you upgrade when you decide to, after testing it. The snippets here always point at the latest stable release: the release process rewrites them.

Service Worker (tile/asset cache)

The components automatically register a Service Worker at /mvx-tiles-sw.js when the site serves one at its root (HTTPS), and send INITIAL_TILE_LOAD with api-key and parent-place-id for a bounded, progressive tile prefetch.

  • Ready to copy (same version as the components you load): https://unpkg.com/@mapvx/[email protected]/dist/sw/mvx-tiles-sw.js
  • Strategies: MapVX APIs cached per endpoint; PBF tiles CacheFirst (24h, up to 10k entries); other assets StaleWhileRevalidate (*.mapvx.com, *.lazarillo.app).
  • Important: serve /mvx-tiles-sw.js with Cache-Control: no-cache (avoid a long max-age on CDN/S3) and invalidate the path after every deploy.

Exported helpers (registerMvxTileServiceWorker, triggerInitialTileLoad, etc.) and the full guide (Drupal, Nginx, SW messages): docs/content/en/examples.mdx / docs/content/es/examples.mdx.

Build Structure

dist/
├── es/ # Build for ES modules
│ ├── index.js
│ ├── map-view-with-modal.js
│ ├── route-view-totems.js
│ └── assets/
├── cjs/ # Build for CommonJS
│ ├── index.cjs
│ ├── map-view-with-modal.cjs
│ └── route-view-totems.cjs
├── iife/ # Build for IIFE
│ ├── route-view-totems.js
│ └── map-view-with-modal.js
└── sw/
   └── mvx-tiles-sw.js

The build directory structure is organized as follows:

  • dist/es/: Contains the ES (ECMAScript) modules build. Includes the main components and an assets/ folder with required resources.

  • dist/cjs/: Contains the CommonJS build, which allows using the components in Node.js environments.

  • dist/iife/: Contains the IIFE (Immediately Invoked Function Expression) build, which encapsulates all code in a self-executing function to avoid polluting the global scope.

  • dist/sw/: Contains the Service Worker file that you can copy to your site's root.

Available Components

route-view-totems

A totem view for routes with QR code and animated route generation option. Includes origin and destination markers.

map-view-with-modal

A map view that only shows the destination marker.

Destination pin style

Both components accept marker-variant="full" | "compact" (default compact). The default pin is icon-only, without the place name and category; pass marker-variant="full" to get the logo + name + category bubble instead. See the Destination Pin docs.

Usage

CJS (Recommended)

// Import components
const { RouteViewTotems, MapViewWithModal } = require('@mapvx/web-components');

// Use in your HTML
<route-view-totems
  apiKey="your-api-key"
  parentPlaceId="your-venue-id"
  destinationId="your-destination-id"
  ...
></route-view-totems>

<map-view-with-modal
  apiKey="your-api-key"
  parentPlaceId="your-venue-id"
  ...
></map-view-with-modal>

IIFE (CDN)

route-view-totems

<!-- Add the script -->
<script src="https://unpkg.com/@mapvx/[email protected]/dist/iife/route-view-totems.js"></script>

<!-- Use the components -->
<route-view-totems
  apiKey="your-api-key"
  parentPlaceId="your-venue-id"
  destinationId="your-destination-id"
  ...
></route-view-totems>

map-view-with-modal

<script src="https://unpkg.com/@mapvx/[email protected]/dist/iife/map-view-with-modal.js"></script>

<map-view-with-modal
  apiKey="your-api-key"
  parentPlaceId="your-venue-id"
  placeId="your-place-id"
  ...
></map-view-with-modal>

License

This project is under Private License - only clients of Mapvx can use it.