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

@wral/map-center-lightbox

v0.2.1

Published

Lit web component that renders the WRAL Map Center tile grid and an interactive lightbox (region presets + frame animation) from the api-wxdata maps endpoints.

Readme

@wral/map-center-lightbox

<wral-map-center-lightbox> — Lit web component that renders the WRAL Map Center tile grid and an interactive per-layer lightbox (region-preset switching plus a frame-animation loop), driven by the api-wxdata maps endpoints.

Replaces the legacy Baron tile widgets. All imagery comes from the wxdata maps catalog / frames endpoints.

Usage

<wral-map-center-lightbox
    base-url="https://api.wral.com/dev/wxdata/v2"
    frame-interval-ms="600"
></wral-map-center-lightbox>

<script type="module" src=".../define.standalone.js"></script>

Attributes

| Attribute | Default | Description | |---|---|---| | base-url | https://api.wral.com/dev/wxdata/v2 | Base URL for the maps endpoints. Point at the production wxdata base (https://api.wral.com/wxdata/v2) once the maps endpoints are promoted. | | frame-interval-ms | 600 | Animation cadence in milliseconds between frames in the lightbox loop. | | layers | (all) | Optional comma-separated list of layer ids to show, in order (e.g. radar,satellite,forecasts). Omit to render every layer from the catalog. Ids absent from the catalog are dropped. |

By default the component renders every layer returned by maps/catalog, in catalog order, using each layer's first listed location as the tile preview and the lightbox's initial region. Pass layers to show a curated subset (e.g. a teaser grid on a section front).

Slots

| Slot | Description | |---|---| | ad | Optional horizontal ad rail rendered inside the lightbox, below the animation. Omit it and the slot adds no markup or spacing. |

Pass the ad markup as a child with slot="ad" and the component projects it below the loop:

<wral-map-center-lightbox base-url="https://api.wral.com/wxdata/v2">
    <div slot="ad" class="opscoad-Desktop_Leaderboard" data-unit="wral-v4/weather"
         data-sizes="0x0:|767x0:728x90|1024x0:728x90,970x90,970x250" …></div>
</wral-map-center-lightbox>

Slotted content stays in the light DOM (it is not moved into the shadow root), so the ad script can find and fill the container as usual — third-party ad code generally cannot reach inside a shadow root. Because the ad only renders while the lightbox is open, lazy/viewable ad units load when a user opens the lightbox rather than on initial page load.

Builds

  • Library: dist/index.mjs + dist/define.mjs. Consumer bundles lit.
  • Standalone: dist/define.standalone.js. Single file with lit inlined; drop into any page via <script type="module" src="…">.

Development

npm install
npm run dev      # Vite playground at http://localhost:5173/
npm run lint
npm run build    # both lib + standalone outputs in dist/

Data shape

GET {base}/maps/catalog:

{
    "data": {
        "layer_count": 12,
        "layers": [
            {
                "id": "radar",
                "title": "Radar",
                "locations": [
                    { "headline": "North Carolina", "slug": "radar_nc2d" }
                ]
            }
        ]
    }
}

GET {base}/maps/frames?slug=<slug> (frames newest-first):

{
    "data": {
        "slug": "radar_nc2d",
        "frame_count": 2,
        "frames": [
            { "url": "https://…/radar_nc2d/8220518656123.jpg", "epoch_ms": 1779481343876, "recorded_at": "2026-05-22T20:22:23.876Z" }
        ]
    }
}

A tile's preview is the newest frame of the layer's first location. The lightbox plays a region's frames oldest → newest; a region with zero frames shows a "No imagery available right now" message.