doxa-maps/library/data
Doxa Maps b95c40e0f9 Map sheets are generated in the browser at the click, by the same generator the Node script runs
The Driver's print standard: every export is generated when it is asked for, and only previews are
stored. The zone and country map sheets — the poster, and the map-only sheet on a packet's page 1 —
existed only if library/scripts/posters/generate.mjs (Node) had written them ahead of time; no country
had a print-resolution sheet at all.

- library/packet/poster-render.js is generate.mjs's drawing layer (2,645 lines) as a pure factory,
  createPosterGenerator({ env, SERIES_DEF, ISO3_NAME, adm0, adm1Ind, adm1Chn, nePlaces, series }). Moved
  VERBATIM (template literals carry their whitespace into the output), `process.env` read through a
  local shadow; its inputs are its free variables, found by a scope-aware parse, not a grep (a grep
  missed adm0, and the proof caught it). generate.mjs is now its Node driver.
- PROVEN BYTE-IDENTICAL: all 118 sheets of a pinned offline matrix — the 28 zones in 3x4, 3x3, letter
  and packet, and a country sample at both sheet sizes — hash the same before and after.
- data/zone-sheet.js is which group pins in which zone (first claim wins), now ONE function both the
  Node driver and the browser call, so a group cannot pin in one zone on paper and another on screen.
- library/packet/posterSheets.js feeds the factory in the browser: the served full-resolution
  boundaries, the shared series and places tables, a generator per call (caching by format pinned the
  first caller's data on every later sheet). generateCountrySheet does a country end to end;
  data/zone-sheet-print.js a UPG-100 zone. ISO3_NAME moves to library/data (territory-counts re-exports).
- usePosterPrints gains opts.sheet: the poster print is the generated letter sheet as a VECTOR page,
  and the packet's page 1 the generated map-only sheet (item.mapId honoured); stored images remain the
  fallback when generation fails. PosterWall forwards it; the Country Posters wall, the UPG-100 wall and
  the UPG-100 map pass it. The UPG-100 wall and map drop their own record fetches for the shared
  provider, and the map's legend and selection HUD offer the card deck (production).
- check:poster-browser-equiv: the browser feed's sheet is byte-identical to the Node generator's for an
  India zone (packet) and a country — proven two-sided (it fails when the feed drops the city dots).
  check:selection-kinds reads the handler's branches instead of a fixed poster/packet pair, anchored on
  `if (` (proven: it fails with the cards branch deleted). library/packet/README.md: the standard.
gates:pre 68/68; both bundles build.
2026-09-29 05:26:27 +00:00
..
countries.json Regions: one rollup, ported from theirs, instead of two copies 2026-09-24 04:01:34 +00:00
country-posters.json Regions: expand a region to its country posters, reusing the shared wall 2026-09-24 04:26:29 +00:00
iso-numeric-to-alpha2.json doxa-maps — portable bundler for embeddable JAMstack maps 2026-09-10 01:53:07 +00:00
iso3-name.js Map sheets are generated in the browser at the click, by the same generator the Node script runs 2026-09-29 05:26:27 +00:00
iso3-to-alpha2.json Country names in the reader's language, for all 242 2026-09-27 04:14:31 +00:00
langFamilyByIso.json doxa-maps — portable bundler for embeddable JAMstack maps 2026-09-10 01:53:07 +00:00
langFamilyByLanguage.json doxa-maps — portable bundler for embeddable JAMstack maps 2026-09-10 01:53:07 +00:00
README.md docs: simplify all folder READMEs (what's here + graphic + link); migrate complex reference to docs/architecture/{data-sources,i18n,components,app-wrappers,poster-generation}.md 2026-09-11 18:50:31 +00:00

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"). Derives languageFamily when the API returns null for imb_language_family. English labels only.
  • langFamilyByIso.json — ISO 639-3 code → family ("afr": "Indo-European"). Used first, because the API localizes language labels but primary_language.value (the ISO code) is stable across locales. Generated by joining langFamilyByLanguage.json onto 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.