@kahwee/sf-map-svg 2.1.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/README.md +38 -569
- package/dist/data/README.md +3 -2
- package/dist/src/configuration.js +1 -0
- package/dist/src/controller-types.d.ts +23 -2
- package/dist/src/explorer-core.js +230 -4
- package/dist/src/full-data.d.ts +3 -0
- package/dist/src/full-data.js +9 -0
- package/dist/src/guide-map.d.ts +1 -1
- package/dist/src/guide-map.js +4 -3
- package/dist/src/guide.d.ts +1 -2
- package/dist/src/layers.d.ts +2 -0
- package/dist/src/layers.js +2 -2
- package/dist/src/map-core.d.ts +33 -0
- package/dist/src/map-core.js +90 -28
- package/dist/src/map.d.ts +2 -2
- package/dist/src/map.js +13 -3
- package/dist/src/static-data.d.ts +3 -0
- package/dist/src/static-data.js +23 -0
- package/dist/src/static.d.ts +35 -2
- package/dist/src/static.js +5 -1
- package/dist/src/types.d.ts +19 -0
- package/dist/src/validation.js +3 -0
- package/docs/EXAMPLES.md +18 -9
- package/docs/api-audit.md +5 -14
- package/docs/consumer-integration.md +12 -159
- package/docs/guide-bundle-report.md +5 -7
- package/docs/migration-v3.md +30 -0
- package/package.json +13 -23
- package/dist/src/custom-map.d.ts +0 -3
- package/dist/src/custom-map.js +0 -1
- package/dist/src/explorer.d.ts +0 -4
- package/dist/src/explorer.js +0 -30
- package/dist/src/index.d.ts +0 -12
- package/dist/src/index.js +0 -21
- package/dist/src/interactive-data.d.ts +0 -6
- package/dist/src/interactive-data.js +0 -7
- package/dist/src/interactive.d.ts +0 -4
- package/dist/src/interactive.js +0 -7
- package/docs/migration-v2.md +0 -238
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,31 @@ User-visible changes are recorded here. Unreleased entries describe changes on `
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 3.0.0 — 2026-09-27
|
|
8
|
+
|
|
9
|
+
Version 3 removes the deprecated compatibility APIs. Applications must migrate before upgrading. The data-free root API introduced in version 2 remains the supported API.
|
|
10
|
+
|
|
11
|
+
### Breaking changes
|
|
12
|
+
|
|
13
|
+
- Remove the `/legacy`, `/custom-map`, `/explorer`, `/interactive`, and `/interactive-data` package entry points and their bundled-data factories. These imports fail to resolve in v3; they are removed, not merely marked deprecated.
|
|
14
|
+
- Replace `renderSFMap(options)` with `renderMap(fullMapData.map, options).svg`, `createSFMap(options)` with `renderMap(fullMapData.map, options)`, and `createSFMapWithData(options, data)` with `renderMap(data, options)`.
|
|
15
|
+
- Replace `createNeighborhoodExplorer(options)` and `createInteractiveSFMap(options)` with `createMap(fullMapData, options)`; mount the returned controller's `.element` and call `.destroy()` on unmount. Replace `createInteractiveSFMapWithData(data, options)` with `createMap(data, options)`.
|
|
16
|
+
- Import complete packaged geography explicitly from `/data/full`, or compose smaller data from `/data/*`. The root import continues to bundle no geography. Existing `/guide` and `/transit` entries remain available.
|
|
17
|
+
|
|
18
|
+
### Migration and verification
|
|
19
|
+
|
|
20
|
+
- Add a [v3 migration guide](docs/migration-v3.md) with import and method mappings. Update README, runnable examples, Storybook, Pages generation, TypeScript contracts, and packed-consumer checks to use the supported API.
|
|
21
|
+
- Preserve the generated SVG output for the old complete-data preset while making that data an explicit import. Keep the guide's narrow overview and detailed-data loading.
|
|
22
|
+
- Add `/data/static` for the complete static map without interactive lookup collections; use it on the Pages spot explorer so its detailed coast and labels retain their reviewed appearance without pulling in unused collections.
|
|
23
|
+
|
|
24
|
+
## 2.2.0 — 2026-09-27
|
|
25
|
+
|
|
26
|
+
- Add “One spot, three San Franciscos” to Pages and Storybook, comparing the same location across district, neighborhood, and transit views.
|
|
27
|
+
- Modernize the Storybook examples in TypeScript and gate map changes with reviewed desktop and 390 px visual snapshots on macOS and Linux.
|
|
28
|
+
- Add first-class election choropleths: static and interactive `districtStyle`, live district year/style setters, district selection and activation events, keyboard interaction, and a reduced-motion-aware year crossfade.
|
|
29
|
+
- Export `getLayerPaths` for canonical fitted layer geometry and `DistrictYear`, `DistrictRowData`, and `DistrictStyle` from the modern entrypoints.
|
|
30
|
+
- Add an official-election Storybook example covering three boundary years, vote-share coloring, mobile layout, keyboard selection, year changes, and accessibility checks.
|
|
31
|
+
|
|
7
32
|
## 2.1.0 — 2026-09-27
|
|
8
33
|
|
|
9
34
|
- Pages site: add motion and a dark theme. Cross-document View Transitions keep the header still and morph example titles into page titles; the home hero is an interactive dot map of the 2022 districts; entrances, count-ups, growing charts, and hover/focus micro-interactions respect reduced motion and print. The site adds no library.
|