All 28 tasks complete. Spec synced to openspec/specs/map-core/. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.7 KiB
1.7 KiB
Why
Map configuration is scattered across Planner components: tile URLs in packages/map/src/layers.ts, color palettes in ColoredRoute.tsx, POI categories in poi-categories.ts, z-index constants in z-index.ts, and overlay configs hardcoded in PlannerMap.tsx. This makes it impossible to share map definitions with a future mobile app (MapLibre) or migrate the web to a different renderer without duplicating everything.
What Changes
- New
packages/map-core/package: Renderer-agnostic map definitions — tile sources, overlay configs, route color palettes, POI category configs, z-index layering constants. Pure TypeScript data, no rendering code, no DOM dependencies. - Refactor
packages/map/: Import tile configs frommap-coreinstead of defining its own - Refactor Planner components: Import color palettes, POI categories, and z-index constants from
map-coreinstead of defining them locally
Capabilities
New Capabilities
map-core: Shared renderer-agnostic map definitions (tiles, colors, overlays, POI categories, z-index)
Modified Capabilities
map-display: Tile layer configs sourced frommap-coreinstead of locally definedroute-coloring: Color palettes and grade functions sourced frommap-coreosm-poi-overlays: POI category definitions sourced frommap-core
Impact
- New package:
packages/map-core/added to pnpm workspace and Turborepo packages/map/src/layers.ts→ thin re-export frommap-coreapps/planner/app/components/ColoredRoute.tsx→ imports palettes frommap-coreapps/planner/app/lib/poi-categories.ts→ moves tomap-coreapps/planner/app/lib/z-index.ts→ moves tomap-core- No user-facing changes — pure refactor