English
English
Appearance
Single responsibility per file. Cross-module state lives in the orchestrator (
../MapChart.vue) only. Read this before editing anything in this folder.
color.ts โ โ hex/RGB conversion, lerp, interpHex, choroplethRamp.geometry.ts โ โ ptSegDist, bbox helpers, safeBounds, boxesIntersectOrTouch.svg-sanitize.ts โ โ sanitizeSvgMarkup + tag/attribute allow-list + stroke override.format-parsers.ts โ โ GeoJSON / TopoJSON / Shapefile / KML(Z) / CSV โ normalized GeoJSON.projection-registry.ts โ โ projection id โ d3 factory + display label.name-disambiguation.ts โ โ normName, abbrev index, neighbor disambiguation.state-schema.ts โ โ FROZEN serialize/deserialize for autosave. Round-trip tested per fixture.viewport-math.ts โ โ clampZoom, wheelFactorFromDelta, viewportโshape coord conversion.Rules:
{ state refs, computeds, actions }.Planned composables (one concern each): useHistory, useAutosave, useProjection, useMapData, useLegend, usePaint, useShapes, useLabels, useFeatureTransforms, useViewport, useKeyboard, useSvgLibrary, useDialogs, useOrientationTip.
Rules:
guide/) โAfter Phase 0 the sync from ../guide/src/.vitepress/components/MapChart.vue is gone. Record any back-portable fix here so a future merge is tractable.
| Date | Change | Reason |
|---|---|---|
| 2026-04-16 | Decoupled from sync; added test harness; extracted utils/color.ts | Refactor for AI manageability |
MapChart.vue with // X moved to ... marker.npm run test && npm run test:e2e โ both must stay green.