The print-time files are pinned (poster-render.js and its classic copy, packet-strings.json, ne-places.json, india-states.json) and were fetched with cache: 'force-cache', which returns any cached copy, however old. After a re-pin, a reader who had printed before kept the previous copy: it failed its pin on every print and the print fell back without a word. Page 1 became the stored poster, a non-English packet would print in English, and India's state cards would be lost. sha384.js fetchPinned fetches force-cache first (fast, and offline once cached) and, when the copy is not served or fails its pin, once more with cache: 'reload', which skips and refreshes the HTTP cache; only that answer decides. posterSheets (the generator and the places table), packetStrings and indiaStates all fetch through it. The classic-script path refreshes the cache the same way and retries a refused tag once. check:pinned-fetch-fresh models the HTTP cache with stale copies: page 1 still draws, the packet keeps every language, India keeps its 36 states; a matching cached copy is used with one request; wrong bytes are refused. The previous loaders fail it. Self-test poisons: no fresh refetch, never the cache, a mismatch accepted, a loader fetching its pinned file directly. |
||
|---|---|---|
| .. | ||
| countries.json | ||
| country-posters.json | ||
| indiaStates.integrity.js | ||
| indiaStates.js | ||
| iso-numeric-to-alpha2.json | ||
| iso3-name.js | ||
| iso3-to-alpha2.json | ||
| langFamilyByIso.json | ||
| langFamilyByLanguage.json | ||
| README.md | ||
library/data/ — static lookup tables
Small JSON tables inlined into any bundle that imports them (eager JSON imports, no runtime fetch).
Import as @map/data/<file>.json.
langFamilyByLanguage.json— language label → family ("Telugu": "Dravidian"). DeriveslanguageFamilywhen the API returnsnullforimb_language_family. English labels only.langFamilyByIso.json— ISO 639-3 code → family ("afr": "Indo-European"). Used first, because the API localizes language labels butprimary_language.value(the ISO code) is stable across locales. Generated by joininglangFamilyByLanguage.jsononto EN API rows by ISO code; there is no regeneration script — re-run that join against a fresh EN pull if the language set changes.iso-numeric-to-alpha2.json— ISO 3166-1 numeric → alpha-2 ("840": "US"). For joining numeric-keyed geodata (world-atlas TopoJSON) to alpha-2 records. No code consumers yet — kept as a ready lookup.
Consumers of the language tables: composables/useMapData.js, useDoxaSearch.js, useMapLayers.js,
legends/useLanguageFamilyLegendData.js.