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.
53 lines
3.5 KiB
JavaScript
53 lines
3.5 KiB
JavaScript
/**
|
|
* iso3-name.js — the ISO3 -> English country name table the map sheets are LABELLED from.
|
|
*
|
|
* It lived in the UPG-100 profile's data (territory-counts.js). The print standard needs it wherever a
|
|
* sheet is drawn — the Node generator, the browser generator for any map, and the packet's relabeller,
|
|
* which inverts this exact table to recognise each drawn name — so it is library data now, with a named
|
|
* second consumer (Country Posters). territory-counts.js re-exports it, so its importers are unchanged.
|
|
* Short common names, as a poster prints them.
|
|
*/
|
|
export const ISO3_NAME = {
|
|
ABW: 'Aruba', IND: 'India', AFG: 'Afghanistan', AGO: 'Angola', ALB: 'Albania',
|
|
AND: 'Andorra', ARE: 'United Arab Emirates', ARM: 'Armenia',
|
|
ASM: 'American Samoa', ATG: 'Antigua and Barbuda', AZE: 'Azerbaijan',
|
|
BEN: 'Benin', BFA: 'Burkina Faso', BGD: 'Bangladesh', BGR: 'Bulgaria',
|
|
BHR: 'Bahrain', BHS: 'Bahamas', BIH: 'Bosnia and Herzegovina',
|
|
BLM: 'Saint Barthélemy', BLR: 'Belarus', BMU: 'Bermuda', BOL: 'Bolivia',
|
|
BRA: 'Brazil', BRB: 'Barbados', BRN: 'Brunei', BTN: 'Bhutan',
|
|
CAF: 'Central African Republic', CHN: 'China', CIV: "Côte d'Ivoire",
|
|
CMR: 'Cameroon', COD: 'DR Congo', COG: 'Congo', COK: 'Cook Islands',
|
|
COL: 'Colombia', COM: 'Comoros', CUB: 'Cuba', CUW: 'Curaçao',
|
|
CYM: 'Cayman Islands', CYP: 'Cyprus', CZE: 'Czechia', DJI: 'Djibouti',
|
|
DMA: 'Dominica', DZA: 'Algeria', ECU: 'Ecuador', EGY: 'Egypt',
|
|
ERI: 'Eritrea', ESP: 'Spain', ETH: 'Ethiopia', FIN: 'Finland', FJI: 'Fiji',
|
|
FRO: 'Faroe Islands', FSM: 'Micronesia', GAB: 'Gabon', GEO: 'Georgia',
|
|
GGY: 'Guernsey', GHA: 'Ghana', GIN: 'Guinea', GLP: 'Guadeloupe',
|
|
GMB: 'Gambia', GNB: 'Guinea-Bissau', GNQ: 'Equatorial Guinea', GRC: 'Greece',
|
|
GRD: 'Grenada', GUF: 'French Guiana', GUM: 'Guam', GUY: 'Guyana',
|
|
IDN: 'Indonesia', IRN: 'Iran', IRQ: 'Iraq', ISL: 'Iceland', ISR: 'Israel',
|
|
JAM: 'Jamaica', JOR: 'Jordan', JPN: 'Japan', KAZ: 'Kazakhstan', KEN: 'Kenya',
|
|
KGZ: 'Kyrgyzstan', KHM: 'Cambodia', KIR: 'Kiribati', KWT: 'Kuwait',
|
|
LAO: 'Laos', LBN: 'Lebanon', LBR: 'Liberia', LBY: 'Libya', LCA: 'Saint Lucia',
|
|
LIE: 'Liechtenstein', LKA: 'Sri Lanka', LUX: 'Luxembourg', MAR: 'Morocco',
|
|
MDV: 'Maldives', MHL: 'Marshall Islands', MLI: 'Mali', MLT: 'Malta',
|
|
MMR: 'Myanmar', MNE: 'Montenegro', MNG: 'Mongolia',
|
|
MNP: 'Northern Mariana Islands', MOZ: 'Mozambique', MRT: 'Mauritania',
|
|
MSR: 'Montserrat', MUS: 'Mauritius', MWI: 'Malawi', MYS: 'Malaysia',
|
|
MYT: 'Mayotte', NAM: 'Namibia', NCL: 'New Caledonia', NER: 'Niger',
|
|
NGA: 'Nigeria', NIU: 'Niue', NPL: 'Nepal', NZL: 'New Zealand', OMN: 'Oman',
|
|
PAK: 'Pakistan', PAN: 'Panama', PER: 'Peru', PHL: 'Philippines',
|
|
PLW: 'Palau', PNG: 'Papua New Guinea', PRK: 'North Korea', PRY: 'Paraguay',
|
|
PSE: 'Palestine', PYF: 'French Polynesia', QAT: 'Qatar', RUS: 'Russia',
|
|
SAU: 'Saudi Arabia', SDN: 'Sudan', SEN: 'Senegal', SHN: 'Saint Helena',
|
|
SLB: 'Solomon Islands', SLE: 'Sierra Leone', SMR: 'San Marino',
|
|
SOM: 'Somalia', SSD: 'South Sudan', STP: 'São Tomé and Príncipe',
|
|
SUR: 'Suriname', SWE: 'Sweden', SWZ: 'Eswatini', SYR: 'Syria',
|
|
TCA: 'Turks and Caicos Islands', TCD: 'Chad', TGO: 'Togo', THA: 'Thailand',
|
|
TJK: 'Tajikistan', TON: 'Tonga', TUN: 'Tunisia', TUR: 'Turkey',
|
|
TZA: 'Tanzania', UGA: 'Uganda', USA: 'United States', UZB: 'Uzbekistan',
|
|
VCT: 'Saint Vincent and the Grenadines', VEN: 'Venezuela',
|
|
VGB: 'British Virgin Islands', VIR: 'U.S. Virgin Islands', VNM: 'Vietnam',
|
|
VUT: 'Vanuatu', WLF: 'Wallis and Futuna', WSM: 'Samoa', YEM: 'Yemen',
|
|
ZAF: 'South Africa', ZMB: 'Zambia', ZWE: 'Zimbabwe',
|
|
};
|