MapLibre style + protocol for a self-hosted .pmtiles basemap (Protomaps flavors or your own layers).
$ npx shadcn@latest add @highcommand/pmtiles-basemapCopies the source into your project and pulls in what it needs (1 other item). First time? Add the registry to components.json.
registerPmtiles(): Promise<void>Registers the `pmtiles://` protocol on the MapLibre instance mapcn uses. Idempotent. Call before the first map with a PMTiles style mounts.
usePmtiles(): booleanTrue once `pmtiles://` works. Render `<Map>` only after this is true.
pmtilesStyle({ url, flavor, layers: customLayers, glyphs, sprite, attribution, lang, }: PmtilesStyleOptions): StyleSpecificationA MapLibre style that reads tiles from a single PMTiles file you host: no tile server, no API key, no per-view billing. Pass it to mapcn's `<Map styles={{ light, dark }}>`.