doxa-maps/library/utils
doxa-maps d5ba21fa76 doxa-maps — portable bundler for embeddable JAMstack maps
Standalone repo that builds embeddable JAMstack map bundles (web components),
composes them into a lazy-loaded SPA via layouts/, and optionally wraps a
Capacitor Android/iOS app — one build, choose your output/CDN. Diátaxis docs.

History reset to a single clean commit; no PII, IPs, or internal terms.
2026-09-10 01:53:07 +00:00
..
.gitkeep doxa-maps — portable bundler for embeddable JAMstack maps 2026-09-10 01:53:07 +00:00
apiBaseUrl.js doxa-maps — portable bundler for embeddable JAMstack maps 2026-09-10 01:53:07 +00:00
ClusterHelpers.js doxa-maps — portable bundler for embeddable JAMstack maps 2026-09-10 01:53:07 +00:00
DataSourceManager.js doxa-maps — portable bundler for embeddable JAMstack maps 2026-09-10 01:53:07 +00:00
geoUtils.js doxa-maps — portable bundler for embeddable JAMstack maps 2026-09-10 01:53:07 +00:00
MSTClusteringUtil.js doxa-maps — portable bundler for embeddable JAMstack maps 2026-09-10 01:53:07 +00:00
NetworkClusteringUtil.js doxa-maps — portable bundler for embeddable JAMstack maps 2026-09-10 01:53:07 +00:00
README.md doxa-maps — portable bundler for embeddable JAMstack maps 2026-09-10 01:53:07 +00:00

library/utils/

Pure JavaScript helpers. No Vue, no Pinia, no Mapbox imports. Anything reactive is a composable; anything stateful is a store. See /docs/utils/ and /docs/geo-math/ for the full catalog.

File Purpose
apiBaseUrl.js Resolves the API base URL at runtime from window.MAP_APP_API_URL / VITE_API_BASE_URL
geoUtils.js Centroid, bounds, validation, GeoJSON helpers
ClusterHelpers.js Shared helpers used by both clustering utilities below
MSTClusteringUtil.js Minimum-spanning-tree clustering for affinity blocks
NetworkClusteringUtil.js Network-line clustering — connect nearby pins with edges

Conventions

  • No import { ref } from 'vue' allowed in this folder.
  • No import mapboxgl from 'mapbox-gl' — operate on plain [lng, lat] arrays.
  • Prefer named exports for tree-shaking.
  • JSDoc on every export.

Cross-references

Next

If you find yourself writing reactive logic here, stop — move it to ../composables/ and rename useXxx. If you need Mapbox APIs, same — that's a composable, not a util.