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

@dam-atlas/map-component

v1.0.11

Published

This is a package with two custom elements destined for The Dam Atlas.

Downloads

39

Readme

@dam-atlas/map-component

This is a package with two custom elements destined for The Dam Atlas.

Usage

Using these web components is a three step process.

  1. Add the appropriate script tag to your head.
  2. Configure the custom element with HTML attributes and CSS properties.
  3. Add the custom element tag to your document.

Usage : Supporting Figure

For Supporting Figures, use this setup:

<html>
  <head>
    <!-- 1. Add the /bundle.js src to the head -->
    <script type="module" src="https://esm.sh/@dam-atlas/map-component/bundle.js"></script>
    <style>
      /*  2. Configure the web font stack using these properties */
      :root {
        /* When using a variable font, configurating these is the same */
        --da-map-font-body: "Archivo", Helvetica, sans-serif;
        --da-map-font-body-semibold: "Archivo", Helvetica, sans-serif;
        --da-map-font-body-bold: "Archivo", Helvetica, sans-serif;

        /*
        This will set the `font-weight` property
        for the different body styles.
        These are the default values, no need to set them again,
        unless you are changing them from these.
        */
        --da-map-font-weight-body: 400;
        --da-map-font-weight-body-semibold: 600;
        --da-map-font-weight-body-bold: 700;
      }
      body {
        margin: 0;
        padding: 0;
      }
      .stack {
        display: flex;
        flex-direction: column;
        gap: 20px;
      }
      da-map-figure:first-child {
        width: 80vw;
        height: 80vh;
      }
      da-map-figure:nth-child(2) {
        width: 80vw;
        height: 80vh;
      }
    </style>
  </head>
  <body>
    <div class="stack">
      <!--
      3. The `da-map-figure` element is exposed by the /figure.js script tag above. This tag has 3 customizable attributes
      - csv = The URL to the Dams CSV
      - legend-open = true | false, sets the initial state of the legend
      - category = hazard | dam-height (more to come), sets the legend and symbology of the dams on the map.
      -->
      <da-map-figure
        csv="https://rr-studio-assets.nyc3.cdn.digitaloceanspaces.com/dam-atlas/gis-data/dam-atlas-2.0.csv"
        legend-open="true"
        category="hazard"
        ></da-map-figure>  
      <da-map-figure
        csv="https://rr-studio-assets.nyc3.cdn.digitaloceanspaces.com/dam-atlas/gis-data/dam-atlas-2.0.csv"
        legend-open="false"
        category="dam-height"
        ></da-map-figure>  
    </div>
  </body>
</html>

Usage : Interactive Map

For the full blown interactive map, use this setup:

<html>
  <head>
    <!-- 1. Add the /bundle.js src to the head -->
    <script type="module" src="https://esm.sh/@dam-atlas/map-component/bundle.js"></script>
    <style>
      /*  2a. Configure the web font stack using these properties */
      :root {
        /* When using a variable font, configurating these is the same */
        --da-map-font-body: "Archivo", Helvetica, sans-serif;
        --da-map-font-body-semibold: "Archivo", Helvetica, sans-serif;
        --da-map-font-body-bold: "Archivo", Helvetica, sans-serif;

        /*
        This will set the `font-weight` property
        for the different body styles.
        These are the default values, no need to set them again,
        unless you are changing them from these.
        */
        --da-map-font-weight-body: 400;
        --da-map-font-weight-body-semibold: 600;
        --da-map-font-weight-body-bold: 700;
      }
      body {
        margin: 0;
        padding: 0;
      }
    </style>
  </head>
  <body>
    <div class="stack">

      <!-- 2b. Expose a function to open the info modal  -->
     <script>
       function openMapInfoModal () {
         // jQuery to open modal
       }
       // Place it on the window so that we can
       // get to it from within our component.
       window.openMapInfoModal = openMapInfoModal
     </script>

      <!--
      4. The `da-map-interactive` element is exposed by the /interactive.js script tag above. This tag has 2 customizable attribute, and an available slot.

      Attribute:
      - csv = The URL to the Dams CSV
      - toolInfoClick = A string of javascript to execute to open the
          Info Modal.

      Slot:
      - nav, add an HTML element as the child of this component and give it the attribute `slot="nav"`, that will put your element in the full screen layout configured for the interactive map. Not including this will fallback to the non-interactive mockup element that defined as part of this package that is used just to fill the space in the UI.
      -->
      <da-map-interactive
        csv="https://rr-studio-assets.nyc3.cdn.digitaloceanspaces.com/dam-atlas/gis-data/dam-atlas-2.0.csv"
        toolInfoClick="window.openMapInfoModal()"
        >
        <nav slot="nav">Nav Trigger</nav>          
      </da-map-interactive>  
    </div>
  </body>
</html>