Merge main into bundler-2/work

This commit is contained in:
Doxa Maps 2026-09-26 06:52:36 +00:00
commit a34a85520a
8 changed files with 132 additions and 118 deletions

View file

@ -193,15 +193,6 @@ function formatNumber(n) {
try { return v.toLocaleString(`${locale.value || 'en'}-u-nu-latn`) } catch (_) { return v.toLocaleString('en-US') }
}
// Which size step a stat value needs so it is never CUT OFF. Their 47.68px fits up to 10
// characters in the 240px card at Bebas's width; our condensed fallback is wider, so the step
// down starts at 10. Only ever shrinks -- every value DX-life itself renders keeps their size.
function lenBucket(v) {
const n = String(v).length
if (n >= 12) return 'xlong'
if (n >= 10) return 'long'
return ''
}
// ── the selected subject ────────────────────────────────────────────────────
const selectedRegion = computed(() =>
@ -856,8 +847,16 @@ useShadowStyles(
'.rd-stats{ display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));' +
' gap:var(--spacing-md); }' +
'.rd-stat{ text-align:center; }' +
'.rd-stat__value[data-len="long"]{ font-size:var(--font-size-2xl); }' +
'.rd-stat__value[data-len="xlong"]{ font-size:var(--font-size-xl); }' +
// ★ THE data-len SHRINK IS GONE, AND ITS OWN COMMENT SHOWED WHY. Their .region-stat__value is
// font-family-heading + font-size-3xl + line-height:1 and nothing else -- no such attribute exists
// in their markup. Ours was a shrink-to-fit workaround whose stated premise was "our condensed
// fallback is wider" than Bebas. That is STALE: Bebas is vendored now (assets/fonts/bebas-neue,
// glyph oracle 279 = 279 SAME), so there is no wider fallback to compensate for.
// Its other claim -- "every value DX-life itself renders keeps their size" -- was FALSIFIED by
// measurement: rega found "43,045,275" (10 chars, so it hit the 'long' bucket) rendered at
// 38.15px against their 47.68px on the same-width card, while the other three stats matched
// exactly. A rule whose own invariant is violated in practice is not protecting anything.
// Deleted WITH its mechanism -- the binding and lenBucket() too, not just the rules.
'.rd-stat__value{ margin:0; font-size:var(--font-size-3xl); line-height:1;' +
' font-family:"Bebas Neue","Arial Narrow",BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;' +
' font-weight:400; }' +
@ -1154,7 +1153,7 @@ useShadowStyles(
<!-- RegionDetail.vue:53-70 — four stat cards. CountryDetail has none. -->
<div v-if="subject.kind !== 'country'" class="rd-stats">
<div v-for="st in stats" :key="st.label" class="rd-card rd-card--small rd-stat">
<p class="rd-stat__value" :data-len="lenBucket(st.value)">{{ st.value }}</p>
<p class="rd-stat__value">{{ st.value }}</p>
<p class="rd-stat__label">{{ st.label }}</p>
</div>
</div>

View file

@ -344,7 +344,22 @@ useShadowStyles(
'.search-icon{ position:absolute; inset-inline-start:1em; top:0; bottom:0; margin:auto 0;' +
' width:1em; height:1em; fill:none; stroke:var(--dx-muted); stroke-width:2; pointer-events:none; }' +
// .filters__toggle — centred, chevron rotates when expanded
'.filters__toggle{ background:none; border:0; cursor:pointer; font:inherit; font-size:var(--font-size-sm);' +
// ★ THEIRS IS .button.compact.link, NOT A BARE BUTTON, and ours was missing four of its
// declarations. rega measured the gap on /regions/ethiopia: ours 25.44px tall against their 37.63.
// Their numbers reconcile exactly once the right rules are applied -- _buttons.scss gives
// .button { border:1px solid var(--button-border-color, transparent); line-height:
// var(--line-height-none); border-radius:100px } and .button.compact { padding: var(--spacing-xs)
// var(--spacing-2xl) }, with .button.link setting --button-border-color: transparent:
// line-height 15.63 (font-size-sm x 1) + 2x10 padding + 2x1 border = 37.63
// Ours declared NO padding (so the UA's 1px showed) and border:0, and font:inherit pulled the
// base line-height 1.5 through as 23.44. All four are portable, so all four are ported.
// THE ONE SUBSTITUTION, documented rather than silently skipped: their .button also sets
// font-family: var(--font-family-buttons), which resolves to Brandon Grotesque. That face is
// commercial and BLOCKED ON THE DRIVER, so this button keeps our stand-in and the family remains
// the one measured difference here. Everything geometric now matches.
'.filters__toggle{ background:none; cursor:pointer; font:inherit; font-size:var(--font-size-sm);' +
' padding:var(--spacing-xs) var(--spacing-2xl); border:1px solid transparent; border-radius:100px;' +
' line-height:var(--line-height-none);' +
' display:inline-flex; align-items:center; gap:var(--spacing-2xs); margin-inline:auto; color:var(--dx-text); }' +
'.filters__toggle svg{ transition:transform 200ms ease; }' +
'.filters__toggle[aria-expanded="true"] svg{ transform:rotate(180deg); }' +

View file

@ -887,7 +887,7 @@
"bundle": "regions-dashboard",
"scriptUrl": "./regions-dashboard/regions-dashboard.js",
"output": "dx-maps/regions-dashboard/regions-dashboard.js",
"integrity": "sha384-gSTVcqAPMAXQMsOOO/gKxnbABq1RFzv9dskZqOu3LqBFwL57AWfn+kXFhwcRXtER",
"integrity": "sha384-eF8jmaDm1FIaoiZ5LDYcFXtKLnKVVW221qs4dFe93aKVqV/wzCO6IcA9zkp9nRo/",
"elements": [
"regions-dashboard"
],
@ -907,7 +907,7 @@
"scriptUrl": "./regions-dashboard/regions-dashboard.js",
"embed": {
"iframe": "<iframe src=\"./regions-dashboard/region-dashboards/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
"script": "<!-- Mapbox engine, fetched early. Keep it only with a real Mapbox token in \"tk\": without one (or with \"provider\":\"maplibre\") the map draws with MapLibre and this line must go -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\" integrity=\"sha384-tO0clamXONKwbiz7O6xJpUeyJbTSPugC+xM9clvfFvKTH3i8SmCawHGdf5quMWmZ\" crossorigin=\"anonymous\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./regions-dashboard/regions-dashboard.js\" integrity=\"sha384-gSTVcqAPMAXQMsOOO/gKxnbABq1RFzv9dskZqOu3LqBFwL57AWfn+kXFhwcRXtER\" crossorigin=\"anonymous\"></script>\n<regions-dashboard profile-config='{\"profile\":\"region-dashboards\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></regions-dashboard>"
"script": "<!-- Mapbox engine, fetched early. Keep it only with a real Mapbox token in \"tk\": without one (or with \"provider\":\"maplibre\") the map draws with MapLibre and this line must go -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\" integrity=\"sha384-tO0clamXONKwbiz7O6xJpUeyJbTSPugC+xM9clvfFvKTH3i8SmCawHGdf5quMWmZ\" crossorigin=\"anonymous\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./regions-dashboard/regions-dashboard.js\" integrity=\"sha384-eF8jmaDm1FIaoiZ5LDYcFXtKLnKVVW221qs4dFe93aKVqV/wzCO6IcA9zkp9nRo/\" crossorigin=\"anonymous\"></script>\n<regions-dashboard profile-config='{\"profile\":\"region-dashboards\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></regions-dashboard>"
}
},
{
@ -921,7 +921,7 @@
"scriptUrl": "./regions-dashboard/regions-dashboard.js",
"embed": {
"iframe": "<iframe src=\"./regions-dashboard/regions-list/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./regions-dashboard/regions-dashboard.js\" integrity=\"sha384-gSTVcqAPMAXQMsOOO/gKxnbABq1RFzv9dskZqOu3LqBFwL57AWfn+kXFhwcRXtER\" crossorigin=\"anonymous\"></script>\n<regions-dashboard profile-config='{\"profile\":\"regions-list\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></regions-dashboard>"
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./regions-dashboard/regions-dashboard.js\" integrity=\"sha384-eF8jmaDm1FIaoiZ5LDYcFXtKLnKVVW221qs4dFe93aKVqV/wzCO6IcA9zkp9nRo/\" crossorigin=\"anonymous\"></script>\n<regions-dashboard profile-config='{\"profile\":\"regions-list\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></regions-dashboard>"
}
},
{
@ -935,7 +935,7 @@
"scriptUrl": "./regions-dashboard/regions-dashboard.js",
"embed": {
"iframe": "<iframe src=\"./regions-dashboard/regions-mfe/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
"script": "<!-- Mapbox engine, fetched early. Keep it only with a real Mapbox token in \"tk\": without one (or with \"provider\":\"maplibre\") the map draws with MapLibre and this line must go -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\" integrity=\"sha384-tO0clamXONKwbiz7O6xJpUeyJbTSPugC+xM9clvfFvKTH3i8SmCawHGdf5quMWmZ\" crossorigin=\"anonymous\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./regions-dashboard/regions-dashboard.js\" integrity=\"sha384-gSTVcqAPMAXQMsOOO/gKxnbABq1RFzv9dskZqOu3LqBFwL57AWfn+kXFhwcRXtER\" crossorigin=\"anonymous\"></script>\n<regions-dashboard profile-config='{\"profile\":\"regions-mfe\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></regions-dashboard>"
"script": "<!-- Mapbox engine, fetched early. Keep it only with a real Mapbox token in \"tk\": without one (or with \"provider\":\"maplibre\") the map draws with MapLibre and this line must go -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\" integrity=\"sha384-tO0clamXONKwbiz7O6xJpUeyJbTSPugC+xM9clvfFvKTH3i8SmCawHGdf5quMWmZ\" crossorigin=\"anonymous\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./regions-dashboard/regions-dashboard.js\" integrity=\"sha384-eF8jmaDm1FIaoiZ5LDYcFXtKLnKVVW221qs4dFe93aKVqV/wzCO6IcA9zkp9nRo/\" crossorigin=\"anonymous\"></script>\n<regions-dashboard profile-config='{\"profile\":\"regions-mfe\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></regions-dashboard>"
}
}
]

View file

@ -887,7 +887,7 @@
"bundle": "regions-dashboard",
"scriptUrl": "./regions-dashboard/regions-dashboard.js",
"output": "dx-maps/regions-dashboard/regions-dashboard.js",
"integrity": "sha384-gSTVcqAPMAXQMsOOO/gKxnbABq1RFzv9dskZqOu3LqBFwL57AWfn+kXFhwcRXtER",
"integrity": "sha384-eF8jmaDm1FIaoiZ5LDYcFXtKLnKVVW221qs4dFe93aKVqV/wzCO6IcA9zkp9nRo/",
"elements": [
"regions-dashboard"
],
@ -907,7 +907,7 @@
"scriptUrl": "./regions-dashboard/regions-dashboard.js",
"embed": {
"iframe": "<iframe src=\"./regions-dashboard/region-dashboards/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
"script": "<!-- Mapbox engine, fetched early. Keep it only with a real Mapbox token in \"tk\": without one (or with \"provider\":\"maplibre\") the map draws with MapLibre and this line must go -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\" integrity=\"sha384-tO0clamXONKwbiz7O6xJpUeyJbTSPugC+xM9clvfFvKTH3i8SmCawHGdf5quMWmZ\" crossorigin=\"anonymous\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./regions-dashboard/regions-dashboard.js\" integrity=\"sha384-gSTVcqAPMAXQMsOOO/gKxnbABq1RFzv9dskZqOu3LqBFwL57AWfn+kXFhwcRXtER\" crossorigin=\"anonymous\"></script>\n<regions-dashboard profile-config='{\"profile\":\"region-dashboards\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></regions-dashboard>"
"script": "<!-- Mapbox engine, fetched early. Keep it only with a real Mapbox token in \"tk\": without one (or with \"provider\":\"maplibre\") the map draws with MapLibre and this line must go -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\" integrity=\"sha384-tO0clamXONKwbiz7O6xJpUeyJbTSPugC+xM9clvfFvKTH3i8SmCawHGdf5quMWmZ\" crossorigin=\"anonymous\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./regions-dashboard/regions-dashboard.js\" integrity=\"sha384-eF8jmaDm1FIaoiZ5LDYcFXtKLnKVVW221qs4dFe93aKVqV/wzCO6IcA9zkp9nRo/\" crossorigin=\"anonymous\"></script>\n<regions-dashboard profile-config='{\"profile\":\"region-dashboards\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></regions-dashboard>"
}
},
{
@ -921,7 +921,7 @@
"scriptUrl": "./regions-dashboard/regions-dashboard.js",
"embed": {
"iframe": "<iframe src=\"./regions-dashboard/regions-list/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./regions-dashboard/regions-dashboard.js\" integrity=\"sha384-gSTVcqAPMAXQMsOOO/gKxnbABq1RFzv9dskZqOu3LqBFwL57AWfn+kXFhwcRXtER\" crossorigin=\"anonymous\"></script>\n<regions-dashboard profile-config='{\"profile\":\"regions-list\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></regions-dashboard>"
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./regions-dashboard/regions-dashboard.js\" integrity=\"sha384-eF8jmaDm1FIaoiZ5LDYcFXtKLnKVVW221qs4dFe93aKVqV/wzCO6IcA9zkp9nRo/\" crossorigin=\"anonymous\"></script>\n<regions-dashboard profile-config='{\"profile\":\"regions-list\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></regions-dashboard>"
}
},
{
@ -935,7 +935,7 @@
"scriptUrl": "./regions-dashboard/regions-dashboard.js",
"embed": {
"iframe": "<iframe src=\"./regions-dashboard/regions-mfe/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
"script": "<!-- Mapbox engine, fetched early. Keep it only with a real Mapbox token in \"tk\": without one (or with \"provider\":\"maplibre\") the map draws with MapLibre and this line must go -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\" integrity=\"sha384-tO0clamXONKwbiz7O6xJpUeyJbTSPugC+xM9clvfFvKTH3i8SmCawHGdf5quMWmZ\" crossorigin=\"anonymous\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./regions-dashboard/regions-dashboard.js\" integrity=\"sha384-gSTVcqAPMAXQMsOOO/gKxnbABq1RFzv9dskZqOu3LqBFwL57AWfn+kXFhwcRXtER\" crossorigin=\"anonymous\"></script>\n<regions-dashboard profile-config='{\"profile\":\"regions-mfe\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></regions-dashboard>"
"script": "<!-- Mapbox engine, fetched early. Keep it only with a real Mapbox token in \"tk\": without one (or with \"provider\":\"maplibre\") the map draws with MapLibre and this line must go -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\" integrity=\"sha384-tO0clamXONKwbiz7O6xJpUeyJbTSPugC+xM9clvfFvKTH3i8SmCawHGdf5quMWmZ\" crossorigin=\"anonymous\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./regions-dashboard/regions-dashboard.js\" integrity=\"sha384-eF8jmaDm1FIaoiZ5LDYcFXtKLnKVVW221qs4dFe93aKVqV/wzCO6IcA9zkp9nRo/\" crossorigin=\"anonymous\"></script>\n<regions-dashboard profile-config='{\"profile\":\"regions-mfe\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></regions-dashboard>"
}
}
]

View file

@ -36,7 +36,7 @@
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
<!-- Bundle IIFE — registers the <regions-dashboard> custom element. -->
<script src="../regions-dashboard.js" integrity="sha384-gSTVcqAPMAXQMsOOO/gKxnbABq1RFzv9dskZqOu3LqBFwL57AWfn+kXFhwcRXtER" crossorigin="anonymous"></script>
<script src="../regions-dashboard.js" integrity="sha384-eF8jmaDm1FIaoiZ5LDYcFXtKLnKVVW221qs4dFe93aKVqV/wzCO6IcA9zkp9nRo/" crossorigin="anonymous"></script>
<script>
// Mapbox token resolution — the A3 ladder, in precedence order:

File diff suppressed because one or more lines are too long

View file

@ -32,7 +32,7 @@
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
<!-- Bundle IIFE — registers the <regions-dashboard> custom element. -->
<script src="../regions-dashboard.js" integrity="sha384-gSTVcqAPMAXQMsOOO/gKxnbABq1RFzv9dskZqOu3LqBFwL57AWfn+kXFhwcRXtER" crossorigin="anonymous"></script>
<script src="../regions-dashboard.js" integrity="sha384-eF8jmaDm1FIaoiZ5LDYcFXtKLnKVVW221qs4dFe93aKVqV/wzCO6IcA9zkp9nRo/" crossorigin="anonymous"></script>
<script>
// Mapbox token resolution — the A3 ladder, in precedence order:

View file

@ -47,7 +47,7 @@
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
<!-- Bundle IIFE — registers the <regions-dashboard> custom element. -->
<script src="../regions-dashboard.js" integrity="sha384-gSTVcqAPMAXQMsOOO/gKxnbABq1RFzv9dskZqOu3LqBFwL57AWfn+kXFhwcRXtER" crossorigin="anonymous"></script>
<script src="../regions-dashboard.js" integrity="sha384-eF8jmaDm1FIaoiZ5LDYcFXtKLnKVVW221qs4dFe93aKVqV/wzCO6IcA9zkp9nRo/" crossorigin="anonymous"></script>
<script>
// Mapbox token resolution — the A3 ladder, in precedence order: