Repository navigation
v4.1.0
·
45 commits
to main
since this release
Light and lazy entry points, and a safe monitorsManager.init() (#111, #110).
Changes
@sjvair/monitor-map/core: the router context (provideMonitorMapRouter,useMonitorMapRouter,ROUTER_KEY,MonitorMapRouterApi) andmonitorsManagerwithout the map, for use at host-app startup.@sjvair/monitor-map/routes:monitorMapRouteswith a lazy layout and lazy route components, so a host router can reference it without loading maplibre.monitorsManager.init(): overlapping calls share one request; a failed init can be retried; an explicit pollutant wins over a call without one; the latest readings load in parallel with the monitor list.monitorsManager.resumeAutoUpdate(): refreshes once and restarts polling if it was stopped.- Bug fixes:
- Live updates resume when the map is reopened after being closed.
- A monitors update that resolves after the pollutant changed is dropped instead of overwriting the new pollutant's readings.
- The package builds on case-insensitive filesystems (macOS) without a resolver workaround:
map/map.svelte.jsis nowmap/map-manager.svelte.js.
- Tooling: the release workflow runs the unit tests and a bundle check before publishing.
The . entry is unchanged, including its eager monitorMapRoutes.
Upgrading
No changes are required. To keep the map off a host app's startup path, import the router context and monitorsManager from @sjvair/monitor-map/core and monitorMapRoutes from @sjvair/monitor-map/routes. On a cold deep link into the map, the router outlet is empty until the lazy layout chunk loads.