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

map-fanbox-points

v0.1.1

Published

FAN Courier map library with locations and pick up points, built-in with ReactJs, Leaflet & MUI.

Readme

map-fanbox-points

Description

FAN Courier map library with locations and pick up points, built-in with ReactJs, Leaflet & MUI.

Installation

Using a Hosted Version

The latest stable release is available on several CDN’s — to start using it straight away, place this in the head of your HTML code or at the end of your body.

<script src="https://unpkg.com/map-fanbox-points@latest/umd/map-fanbox-points.js" crossorigin defer></script>

Using a Downloaded Version

Inside the archives downloaded from the above links, you will see:

  • /umd/map-fanbox-points.js - The UMD build, suitable for use in the browser via a script tag. The script inject a global function to the window called LoadMapFanBox.

Unzip the downloaded archive to your website’s directory and add this to the head of your HTML code:

<script src="/path/to/map-fanbox-points.js" defer></script>

Using a JavaScript package manager

If you use the npm package manager, you can fetch a local copy of package by running:

$ npm install map-fanbox-points

Usage

After installing the library and importing, you can use it into your project as follow:

<script type="module">
    const defaultCounty = "Arad";
    const defaultLocality = "Arad";

    let selectedPickUpPoint = null;
    window.addEventListener("map:select-point", event => {
        selectedPickUpPoint = event.detail.item;
        // you can store the selected point on your side
    });

    const rootNode = document.getElementById("mapDiv");

    const btn = document.getElementById("openMap");
    btn.addEventListener("click", () => {

    window.LoadMapFanBox({
          pickUpPoint: selectedPickUpPoint,
          county: defaultCounty,
          locality: defaultLocality,
          rootNode,
          // rootId = mapDiv
        });
    });

</script>
async click() {
      const { LoadMap } = await import('map-fanbox-points')
      const config: LoadMapProps = {
        county: 'Bucuresti',
        locality: 'Bucuresti',
        rootId: 'mapRootId'
      }

      if (this.selectedItem) {
        config.pickUpPoint = this.selectedItem
      }

      LoadMap(config)
    }

NOTE: The functions window.LoadMapFanBox and LoadMap will load the map with following parameters:

interface LoadMapProps {
  pickUpPoint?: PickUpPoint; // the selected point
  county?: string; // the default county
  locality?: string; // the default locality
  rootNode?: HTMLDivElement; // the root node where the map will be rendered
  rootId?: string; // the root id where the map will be rendered
  variant?: 'preview' | 'modal'; // the map variant (default: 'modal')
  enableMultiplePointTypes?: boolean; // enable multiple point types (default: false; will be visible only the Lockers)
  currentPointType?: PickUpPointType; // the current point type to display (default: PickUpPointType.FANBox). Note: has no effect if enableMultiplePointTypes is true
  themeMode?: 'light' | 'dark' | 'system'; // theme mode (default: 'light')
}

enum PickUpPointType {
  agency = 1,
  FANBox = 2,
  payPoint = 3,
}

The rootNode or rootId should be provided to render the map.

NOTE: The CustomEvent name that listen for selected point is: map:select-point

window.addEventListener('map:select-point', (event) => {
  const pickUpPoint: PickUpPoint = event.detail.item;
});
type PickUpPoint = {
  id: string;
  name: string;
  description: string;
  address: string;
  latitude: number;
  longitude: number;
  schedule: string;
  countyId: number;
  localityId: number;
};

License

This library is MIT licensed.

Getting Involved

Send suggestions for changes to the source Alexandru Grigore & Fan Courier team.

Alexandru Grigore