From 2f4cabf85f0240cb2ad8ed915fd67f7f7ff6b011 Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Fri, 2 Oct 2026 12:12:18 +0000 Subject: [PATCH] Poster Design: the 66x66 and 36x60 side-lane cards get a real sample India, the one large-sheet country, now prints at 5 x 8 ft only, so the 5.5 x 5.5 ft and 3 x 5 ft side-lane cards would have drawn India's 60x96 sheet under their own label. They now sample the largest drawable countries (China at 66x66, Sudan at 36x60) through the same shared sheet path, and their details say that no country prints at this size today (posterDesign.missing.noCountryAtSize, 11 locales). The 60x96 card keeps India and stays withheld. check:poster-design-catalogue now checks every sample: drawable, or withheld by countrySheet.js. --- library/i18n/locales/ar/posterDesign.json | 3 +- library/i18n/locales/de/posterDesign.json | 3 +- library/i18n/locales/en/posterDesign.json | 3 +- library/i18n/locales/es/posterDesign.json | 3 +- library/i18n/locales/fr/posterDesign.json | 3 +- library/i18n/locales/hi/posterDesign.json | 3 +- library/i18n/locales/it/posterDesign.json | 3 +- library/i18n/locales/pt/posterDesign.json | 3 +- library/i18n/locales/ro/posterDesign.json | 3 +- library/i18n/locales/ru/posterDesign.json | 3 +- library/i18n/locales/zh/posterDesign.json | 3 +- .../poster-design/scripts/check-catalogue.mjs | 21 +- plugin-designs/poster-design/src/templates.js | 11 +- public/dx-maps/doxa-maps-spa/manifest.json | 8 +- public/dx-maps/manifest.json | 8 +- .../poster-design-mfe/index.html | 2 +- public/dx-maps/poster-design/poster-design.js | 287 +++++++++--------- .../poster-design/poster-sizes/index.html | 2 +- .../poster-design/poster-styles/index.html | 2 +- 19 files changed, 199 insertions(+), 175 deletions(-) diff --git a/library/i18n/locales/ar/posterDesign.json b/library/i18n/locales/ar/posterDesign.json index dbf622436..284c2d1cc 100644 --- a/library/i18n/locales/ar/posterDesign.json +++ b/library/i18n/locales/ar/posterDesign.json @@ -49,7 +49,8 @@ }, "missing": { "bless": "الأوراق وشرائط اللصق ومواضع صفوف البطاقات مأخوذة من هندسة الألواح المشتركة؛ وتُعرض البطاقات كتخطيط، لأن جدار البركة يرسم بطاقاته في إضافته الخاصة.", - "mapPrint": "يطبع هذا القالب الخريطة الحية التي ينظر إليها القارئ، لذا ليست له صورة نموذجية." + "mapPrint": "يطبع هذا القالب الخريطة الحية التي ينظر إليها القارئ، لذا ليست له صورة نموذجية.", + "noCountryAtSize": "لا تُطبع أي دولة بهذا الحجم اليوم: الهند، الدولة الوحيدة التي كانت تُطبع به، تُطبع الآن بحجم 5 × 8 أقدام فقط. نعرضه هنا بدولة نموذجية لإظهار القالب." }, "details": { "configName": "اسم الإعداد", diff --git a/library/i18n/locales/de/posterDesign.json b/library/i18n/locales/de/posterDesign.json index c39189fc1..20a0879b7 100644 --- a/library/i18n/locales/de/posterDesign.json +++ b/library/i18n/locales/de/posterDesign.json @@ -49,7 +49,8 @@ }, "missing": { "bless": "Die Bögen, die Klebestreifen und die Lage der Kartenreihen stammen aus der gemeinsamen Tafelgeometrie; die Karten sind als Layout dargestellt, weil die Segnen-Wand ihre Karten in ihrem eigenen Plugin zeichnet.", - "mapPrint": "Diese Vorlage druckt die Live-Karte, die der Leser gerade ansieht, und hat deshalb kein Beispielbild." + "mapPrint": "Diese Vorlage druckt die Live-Karte, die der Leser gerade ansieht, und hat deshalb kein Beispielbild.", + "noCountryAtSize": "Heute wird kein Land in dieser Größe gedruckt: Indien, das einzige Land, das es wurde, wird jetzt nur noch in 5 × 8 ft gedruckt. Die Vorlage wird hier mit einem Beispielland gezeigt." }, "details": { "configName": "Name der Konfiguration", diff --git a/library/i18n/locales/en/posterDesign.json b/library/i18n/locales/en/posterDesign.json index 0c8035ad5..b970eaa7e 100644 --- a/library/i18n/locales/en/posterDesign.json +++ b/library/i18n/locales/en/posterDesign.json @@ -49,7 +49,8 @@ }, "missing": { "bless": "The sheets, the glue strips and where the card rows go come from the shared panel geometry; the cards are shown as a layout, because the Bless wall draws its cards in its own plugin.", - "mapPrint": "This template prints the live map the reader is looking at, so it has no sample picture." + "mapPrint": "This template prints the live map the reader is looking at, so it has no sample picture.", + "noCountryAtSize": "No country prints at this size today: India, the one country that did, now prints at 5 × 8 ft only. It is drawn here with a sample country to show the template." }, "details": { "configName": "Configuration name", diff --git a/library/i18n/locales/es/posterDesign.json b/library/i18n/locales/es/posterDesign.json index 3b7da0427..2edc7e748 100644 --- a/library/i18n/locales/es/posterDesign.json +++ b/library/i18n/locales/es/posterDesign.json @@ -49,7 +49,8 @@ }, "missing": { "bless": "Las hojas, las franjas de pegado y el lugar de las filas de tarjetas vienen de la geometría de paneles compartida; las tarjetas se muestran como un diseño, porque el muro Bendecir dibuja sus tarjetas en su propio complemento.", - "mapPrint": "Esta plantilla imprime el mapa en vivo que está mirando el lector, así que no tiene imagen de ejemplo." + "mapPrint": "Esta plantilla imprime el mapa en vivo que está mirando el lector, así que no tiene imagen de ejemplo.", + "noCountryAtSize": "Hoy ningún país se imprime en este tamaño: la India, el único que lo hacía, ahora se imprime solo a 5 × 8 ft. Aquí se dibuja con un país de muestra para mostrar la plantilla." }, "details": { "configName": "Nombre de la configuración", diff --git a/library/i18n/locales/fr/posterDesign.json b/library/i18n/locales/fr/posterDesign.json index 0e58cf838..79c66a6b8 100644 --- a/library/i18n/locales/fr/posterDesign.json +++ b/library/i18n/locales/fr/posterDesign.json @@ -49,7 +49,8 @@ }, "missing": { "bless": "Les feuilles, les bandes de collage et l'emplacement des rangées de cartes viennent de la géométrie de panneaux partagée ; les cartes sont montrées comme une mise en page, car le mur Bénir dessine ses cartes dans son propre module.", - "mapPrint": "Ce modèle imprime la carte en direct que le lecteur regarde, il n'a donc pas d'image d'exemple." + "mapPrint": "Ce modèle imprime la carte en direct que le lecteur regarde, il n'a donc pas d'image d'exemple.", + "noCountryAtSize": "Aucun pays ne s’imprime à ce format aujourd’hui : l’Inde, le seul qui le faisait, s’imprime désormais uniquement en 5 × 8 ft. Le modèle est dessiné ici avec un pays d’exemple." }, "details": { "configName": "Nom de la configuration", diff --git a/library/i18n/locales/hi/posterDesign.json b/library/i18n/locales/hi/posterDesign.json index 38b4624ce..d17457e22 100644 --- a/library/i18n/locales/hi/posterDesign.json +++ b/library/i18n/locales/hi/posterDesign.json @@ -49,7 +49,8 @@ }, "missing": { "bless": "शीटें, चिपकाने की पट्टियाँ और कार्ड-पंक्तियों की जगह साझा पैनल ज्यामिति से आती हैं; कार्ड लेआउट के रूप में दिखाए गए हैं, क्योंकि आशीष दीवार अपने कार्ड अपने प्लगइन में बनाती है।", - "mapPrint": "यह टेम्पलेट वह लाइव मानचित्र प्रिंट करता है जिसे पाठक देख रहा है, इसलिए इसकी कोई नमूना तस्वीर नहीं है।" + "mapPrint": "यह टेम्पलेट वह लाइव मानचित्र प्रिंट करता है जिसे पाठक देख रहा है, इसलिए इसकी कोई नमूना तस्वीर नहीं है।", + "noCountryAtSize": "आज कोई भी देश इस आकार में नहीं छपता: भारत, जो अकेला देश छपता था, अब केवल 5 × 8 फ़ुट में छपता है। टेम्पलेट दिखाने के लिए इसे यहाँ एक नमूना देश के साथ बनाया गया है।" }, "details": { "configName": "कॉन्फ़िगरेशन का नाम", diff --git a/library/i18n/locales/it/posterDesign.json b/library/i18n/locales/it/posterDesign.json index 242456dd3..4aec62b44 100644 --- a/library/i18n/locales/it/posterDesign.json +++ b/library/i18n/locales/it/posterDesign.json @@ -49,7 +49,8 @@ }, "missing": { "bless": "I fogli, le strisce da incollare e la posizione delle file di schede vengono dalla geometria dei pannelli condivisa; le schede sono mostrate come impaginazione, perché il muro Benedici disegna le sue schede nel proprio plugin.", - "mapPrint": "Questo modello stampa la mappa dal vivo che il lettore sta guardando, quindi non ha un'immagine di esempio." + "mapPrint": "Questo modello stampa la mappa dal vivo che il lettore sta guardando, quindi non ha un'immagine di esempio.", + "noCountryAtSize": "Oggi nessun paese si stampa in questo formato: l’India, l’unico che lo faceva, ora si stampa solo a 5 × 8 ft. Qui il modello è disegnato con un paese di esempio." }, "details": { "configName": "Nome della configurazione", diff --git a/library/i18n/locales/pt/posterDesign.json b/library/i18n/locales/pt/posterDesign.json index a6f43519f..69af6993a 100644 --- a/library/i18n/locales/pt/posterDesign.json +++ b/library/i18n/locales/pt/posterDesign.json @@ -49,7 +49,8 @@ }, "missing": { "bless": "As folhas, as faixas de colagem e a posição das fileiras de cartões vêm da geometria de painéis compartilhada; os cartões aparecem como um layout, porque o mural Abençoar desenha os seus cartões no seu próprio plugin.", - "mapPrint": "Este modelo imprime o mapa ao vivo que o leitor está vendo, por isso não tem imagem de exemplo." + "mapPrint": "Este modelo imprime o mapa ao vivo que o leitor está vendo, por isso não tem imagem de exemplo.", + "noCountryAtSize": "Hoje nenhum país é impresso neste tamanho: a Índia, o único que era, agora é impressa apenas em 5 × 8 ft. Aqui o modelo é desenhado com um país de exemplo." }, "details": { "configName": "Nome da configuração", diff --git a/library/i18n/locales/ro/posterDesign.json b/library/i18n/locales/ro/posterDesign.json index 5a8a6fd8c..86183bb77 100644 --- a/library/i18n/locales/ro/posterDesign.json +++ b/library/i18n/locales/ro/posterDesign.json @@ -49,7 +49,8 @@ }, "missing": { "bless": "Colile, benzile de lipire și locul rândurilor de cartonașe vin din geometria comună a panourilor; cartonașele sunt arătate ca machetă, pentru că peretele Binecuvântează își desenează cartonașele în propriul modul.", - "mapPrint": "Acest șablon tipărește harta live pe care o privește cititorul, așa că nu are imagine de exemplu." + "mapPrint": "Acest șablon tipărește harta live pe care o privește cititorul, așa că nu are imagine de exemplu.", + "noCountryAtSize": "Astăzi nicio țară nu se tipărește la această dimensiune: India, singura care o făcea, se tipărește acum doar la 5 × 8 ft. Șablonul este desenat aici cu o țară exemplu." }, "details": { "configName": "Numele configurației", diff --git a/library/i18n/locales/ru/posterDesign.json b/library/i18n/locales/ru/posterDesign.json index 203b31908..d5f05a992 100644 --- a/library/i18n/locales/ru/posterDesign.json +++ b/library/i18n/locales/ru/posterDesign.json @@ -49,7 +49,8 @@ }, "missing": { "bless": "Листы, полосы для склейки и места рядов карточек взяты из общей геометрии панелей; карточки показаны как макет, потому что стена «Благословить» рисует свои карточки в собственном плагине.", - "mapPrint": "Этот шаблон печатает живую карту, на которую смотрит читатель, поэтому у него нет примерного изображения." + "mapPrint": "Этот шаблон печатает живую карту, на которую смотрит читатель, поэтому у него нет примерного изображения.", + "noCountryAtSize": "Сегодня ни одна страна не печатается в этом размере: Индия, единственная, что печаталась, теперь печатается только в 5 × 8 футов. Шаблон показан здесь на примере другой страны." }, "details": { "configName": "Название конфигурации", diff --git a/library/i18n/locales/zh/posterDesign.json b/library/i18n/locales/zh/posterDesign.json index 3c31c79ea..f54ea4e85 100644 --- a/library/i18n/locales/zh/posterDesign.json +++ b/library/i18n/locales/zh/posterDesign.json @@ -49,7 +49,8 @@ }, "missing": { "bless": "纸张、粘贴条以及卡片行的位置都来自共享的拼板几何;卡片以版式示意,因为祝福墙在其自己的插件中绘制卡片。", - "mapPrint": "此模板打印读者正在查看的实时地图,因此没有示例图片。" + "mapPrint": "此模板打印读者正在查看的实时地图,因此没有示例图片。", + "noCountryAtSize": "如今没有国家以此尺寸印刷:唯一曾以此尺寸印刷的印度,现在只以 5 × 8 英尺印刷。这里用一个示例国家绘制,以展示该模板。" }, "details": { "configName": "配置名称", diff --git a/plugin-designs/poster-design/scripts/check-catalogue.mjs b/plugin-designs/poster-design/scripts/check-catalogue.mjs index 01aaa9246..563cd8b44 100644 --- a/plugin-designs/poster-design/scripts/check-catalogue.mjs +++ b/plugin-designs/poster-design/scripts/check-catalogue.mjs @@ -11,7 +11,9 @@ * 3. The card entries are exactly card-render.js STOCK, one per stock. * 4. Every catalogue key an entry names (labelKey, missing, the family keys) exists in the English * posterDesign catalogue. - * 5. The sample country exists in the country data and can be drawn (has geometry, a sheet tier). + * 5. Every sample country (the default and each format's own) exists in the country data and can be drawn (has + * geometry, a sheet tier), unless the shared path WITHHOLDS it (countrySheet.js sheetWithheld): that card shows + * the sentence instead of a drawing, so it is never drawn here. * 6. PLUGIN DESIGNS: every "posterDesign" block in plugin-designs//.meta.json is valid * (src/pluginDesigns.js blockProblems: family, name, size, mobileFriendly, optional labelKey / instance), its * labelKey exists in the English catalogue, and its instance is a preset of that profile. @@ -36,8 +38,9 @@ const server = await createServer({ server: { middlewareMode: true, hmr: false, ws: false, watch: null }, resolve: { alias: { '@map': join(ROOT, 'library') } }, }) -let cat, STOCK, PD +let cat, STOCK, PD, sheetWithheld try { + ;({ sheetWithheld } = await server.ssrLoadModule('/library/packet/countrySheet.js')) cat = await server.ssrLoadModule('/plugin-designs/poster-design/src/templates.js') PD = await server.ssrLoadModule('/plugin-designs/poster-design/src/pluginDesigns.js') ;({ STOCK } = await server.ssrLoadModule('/library/packet/card-render.js')) @@ -95,11 +98,15 @@ const keys = [...configs.flatMap((c) => [c.labelKey, c.missing].filter(Boolean)) for (const k of keys) if (!has(k)) fail(`catalogue key '${k}' is not in en/posterDesign.json`) for (const c of configs) if (!cat.FAMILY_KEYS[c.family]) fail(`'${c.name}' has family '${c.family}', which has no heading key`) -// 5. the sample +// 5. the samples const data = JSON.parse(readFileSync(join(ROOT, 'library/data/country-posters.json'), 'utf8')) -const s = (data.countries || []).find((c) => c.id === cat.SAMPLE_COUNTRY_ID) -if (!s) fail(`sample '${cat.SAMPLE_COUNTRY_ID}' is not in library/data/country-posters.json`) -else if (!s.hasGeometry || !s.sheet || s.unsupportedReason) fail(`sample '${s.id}' cannot be drawn (hasGeometry ${s.hasGeometry}, sheet ${s.sheet})`) +const samples = [...new Set([cat.SAMPLE_COUNTRY_ID, ...configs.map((c) => c.sample).filter(Boolean)])] +for (const id of samples) { + const s = (data.countries || []).find((c) => c.id === id) + if (!s) fail(`sample '${id}' is not in library/data/country-posters.json`) + else if (sheetWithheld(s)) continue // its card shows the withheld sentence; it is never drawn here + else if (!s.hasGeometry || !s.sheet || s.unsupportedReason) fail(`sample '${s.id}' cannot be drawn (hasGeometry ${s.hasGeometry}, sheet ${s.sheet})`) +} // 6-8: plugin designs, unique names, the ledger. Gathered once, judged by one function, so --self-test poisons the // same function the real run uses. @@ -170,5 +177,5 @@ if (failures.length) { console.error(`POSTER-DESIGN-CATALOGUE: FAIL (${failures.length})\n - ${failures.join('\n - ')}`) process.exitCode = 1 } else { - console.log(`POSTER-DESIGN-CATALOGUE: PASS — ${configs.length} configurations, ${Object.keys(cat.SHEET_FORMATS).length} sheet formats matching poster-render FORMATS, ${want.length} card stocks from STOCK, ${keys.length} catalogue keys present, sample ${cat.SAMPLE_COUNTRY_ID}; ${blocks.length} plugin design block(s) valid; ${ledger.length} ledger names all present${judged.fresh.length ? `; NEW (add to src/catalogue-names.json): ${judged.fresh.join(', ')}` : ''}`) + console.log(`POSTER-DESIGN-CATALOGUE: PASS — ${configs.length} configurations, ${Object.keys(cat.SHEET_FORMATS).length} sheet formats matching poster-render FORMATS, ${want.length} card stocks from STOCK, ${keys.length} catalogue keys present, samples ${samples.join(', ')} drawable or withheld; ${blocks.length} plugin design block(s) valid; ${ledger.length} ledger names all present${judged.fresh.length ? `; NEW (add to src/catalogue-names.json): ${judged.fresh.join(', ')}` : ''}`) } diff --git a/plugin-designs/poster-design/src/templates.js b/plugin-designs/poster-design/src/templates.js index c00cd5da1..a1b3d9cf6 100644 --- a/plugin-designs/poster-design/src/templates.js +++ b/plugin-designs/poster-design/src/templates.js @@ -27,13 +27,15 @@ export const SAMPLE_COUNTRY_ID = 'country-npl' // pinned asset, not bundled, so its table cannot be imported here; check:poster-design-catalogue reads // FORMATS from the source and fails when the two disagree. // In the gallery's order: the 3 × 3 country sheet first, then the large sizes, then the rest. The large SIDE-LANE -// sheets name a whole country's groups beside the map; the one country that prints on them is India (countrySheet.js -// LARGE_SHEETS), so India is their sample, drawn at each requested side-lane size through the shared path. +// sheets name a whole country's groups beside the map. India is the one large-sheet country (countrySheet.js +// LARGE_SHEETS) and prints at 5 × 8 ft ONLY, so it samples that card (withheld, so the card shows the sentence). No +// country prints at 66x66 or 36x60 today: those two are drawn with the largest drawable countries (China, Sudan) to +// show the template, and their details say so (missing: noCountryAtSize). Names never change (src/catalogue-names.json). export const SHEET_FORMATS = { '3x3': { page: '3 × 3', px: [1500, 1500] }, '60x96': { page: '5 × 8 ft, side lanes', px: [2500, 4000], sample: 'country-ind' }, - '66x66': { page: '5.5 × 5.5 ft, side lanes', px: [2750, 2750], sample: 'country-ind' }, - '36x60': { page: '3 × 5 ft, side lanes', px: [1500, 2500], sample: 'country-ind' }, + '66x66': { page: '5.5 × 5.5 ft, side lanes', px: [2750, 2750], sample: 'country-chn', missing: 'posterDesign.missing.noCountryAtSize' }, + '36x60': { page: '3 × 5 ft, side lanes', px: [1500, 2500], sample: 'country-sdn', missing: 'posterDesign.missing.noCountryAtSize' }, '3x4': { page: '3 × 4', px: [1500, 2000], legacy: true }, letter: { page: 'Letter, portrait', px: [1500, 1941] }, packet: { page: 'Letter, portrait (packet page 1)', px: [1500, 1941] }, @@ -58,6 +60,7 @@ function sheetEntry(format) { size: f.page, px: f.px, legacy: !!f.legacy, + ...(f.missing ? { missing: f.missing } : {}), renderer: 'library/packet/posterSheets.js generateCountrySheet → library/packet/poster-render.js', settings: { format }, sample: f.sample || SAMPLE_COUNTRY_ID, diff --git a/public/dx-maps/doxa-maps-spa/manifest.json b/public/dx-maps/doxa-maps-spa/manifest.json index aa80bbdb6..70633bc58 100644 --- a/public/dx-maps/doxa-maps-spa/manifest.json +++ b/public/dx-maps/doxa-maps-spa/manifest.json @@ -1117,7 +1117,7 @@ "bundle": "poster-design", "scriptUrl": "./poster-design/poster-design.js", "output": "dx-maps/poster-design/poster-design.js", - "integrity": "sha384-lmKbLPYkuoRaRLpC+JuT0FhUIZCb+e/ki0TcCsEcaIr9RBpXoTLjeO68t025moId", + "integrity": "sha384-lnZQZgYYcsz3aFI9fwT6UBlrYcYefVSixV7CmeQvav5fgXz9m5sFyWYNHJnn96/Q", "elements": [ "poster-design" ], @@ -1140,7 +1140,7 @@ "scriptUrl": "./poster-design/poster-design.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -1156,7 +1156,7 @@ "scriptUrl": "./poster-design/poster-design.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -1172,7 +1172,7 @@ "scriptUrl": "./poster-design/poster-design.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } } ] diff --git a/public/dx-maps/manifest.json b/public/dx-maps/manifest.json index aa80bbdb6..70633bc58 100644 --- a/public/dx-maps/manifest.json +++ b/public/dx-maps/manifest.json @@ -1117,7 +1117,7 @@ "bundle": "poster-design", "scriptUrl": "./poster-design/poster-design.js", "output": "dx-maps/poster-design/poster-design.js", - "integrity": "sha384-lmKbLPYkuoRaRLpC+JuT0FhUIZCb+e/ki0TcCsEcaIr9RBpXoTLjeO68t025moId", + "integrity": "sha384-lnZQZgYYcsz3aFI9fwT6UBlrYcYefVSixV7CmeQvav5fgXz9m5sFyWYNHJnn96/Q", "elements": [ "poster-design" ], @@ -1140,7 +1140,7 @@ "scriptUrl": "./poster-design/poster-design.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -1156,7 +1156,7 @@ "scriptUrl": "./poster-design/poster-design.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -1172,7 +1172,7 @@ "scriptUrl": "./poster-design/poster-design.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } } ] diff --git a/public/dx-maps/poster-design/poster-design-mfe/index.html b/public/dx-maps/poster-design/poster-design-mfe/index.html index a47b9019a..f8c329e80 100644 --- a/public/dx-maps/poster-design/poster-design-mfe/index.html +++ b/public/dx-maps/poster-design/poster-design-mfe/index.html @@ -73,7 +73,7 @@ - + - + - +