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

@facilitronworks/react-native-windows-maps

v0.1.0-pre.0

Published

The app-agnostic half of a react-native-windows map: Web Mercator projection maths, and a builder for the maplibre-gl page that renders inside a WebView2 island. Zero runtime dependencies.

Downloads

1,251

Readme

@facilitronworks/react-native-windows-maps

The app-agnostic half of a react-native-windows map surface: Web Mercator projection maths, and a builder for the maplibre-gl HTML page that renders inside a WebView2 island.

Zero runtime dependencies. Both modules are pure TypeScript with no imports.

What this is not

This package deliberately does not ship a <MapView> component or any basemap style resolution.

Style resolution reads EXPO_PUBLIC_* environment variables, and babel-preset-expo only inlines those for files outside node_modules. A resolver living in this package would silently read '' in every build: the map would fall back to raw OSM tiles and the dark-mode toggle would inject a byte-identical style, doing nothing, with no error and no failing test. The host app owns styling and passes the resolved style in.

Usage

import {
  buildMapPage,
  projectToViewport,
  regionToZoom,
  viewportToRegion,
  type LatLng,
  type Region,
} from '@facilitronworks/react-native-windows-maps';

buildMapPage(options) returns a complete HTML document. Render it in a WebView that injects window.ReactNativeWebView.postMessage before content load.

Bridge protocol

page → host, via window.ReactNativeWebView.postMessage:

| message | meaning | | --- | --- | | {type:'ready'} | maplibre constructed, first style loaded | | {type:'viewport', center, zoom, css} | on every move and on resize | | {type:'press', coordinate} | single click on the map surface | | {type:'markerPress', id} | an in-page marker element was clicked | | {type:'error', message} | script / style / tile failure |

host → page, via injectJavaScript against window.__worksMap:

| call | meaning | | --- | --- | | setRegion({center, zoom}, durationMs) | camera move (0 = jump) | | setStyle(styleJsonOrUrl) | appearance change | | setMarkers(list) | replace the in-page marker layer |

Markers render in the page, not over it

On react-native-windows the WebView2 island composites above all react-native content within its bounds, regardless of sibling order or zIndex (verified against three independent layering strategies). An RN overlay can therefore never be seen. The host still computes clusters and owns every handler; the page only draws the bubbles it is handed via setMarkers and reports presses back. Each entry is plain data — {id, latitude, longitude, kind:'cluster'|'pin', label, bg, fg, border, size} — themed by the host.

maplibre-gl is pinned by version and SRI

The page loads maplibre-gl from unpkg pinned by version and by sha384 subresource integrity. MAPLIBRE_JS_SRI / MAPLIBRE_CSS_SRI are the hashes of the exact artifacts in [email protected]. A tampered or substituted file fails the check, the script does not execute, and the page reports {type:'error'} so the host can fall back.

maplibre-gl is declared as an optional peer dependency so a host on a different version gets an install-time signal. If you bump it, the two SRI constants must be regenerated in the same change or the map loads nothing.

Platform

Correct only under the windows platform, where Metro redirects react-native to react-native-windows.

License

MIT