doxa-maps/library/components
doxa-maps-88655c70 79353ca66e One page, one map token — and the nested search bar comes back
"the element gets the tk to the element itself and does not need to only
gatekeep that to one component only — all components in a plugin can share
that tk" (Driver, 2026-09-23).

Inside ONE element that was already true: ProfileLoader provides
'mapboxToken' and eleven components inject it. The gate is the ELEMENT
BOUNDARY — every custom element mounts its own app with its own
ProfileLoader, which re-derives the token from its own profile-config, so a
composite that nests a real map hands the child nothing.

THE EXISTING FALLBACK COULD NOT FIRE. The ladder already read
window.MAP_TOKEN. MEASURED: that global IS set on the composite leaf and
the child still had no search bar — because the ladder lives in a
computed() and window.MAP_TOKEN is a plain global, not a reactive source.
The composite leaf FETCHES its token, so the computed resolved '' first,
cached, and never re-ran. useSharedMapToken makes it a ref that updates on
publish, and assignments to window.MAP_TOKEN are adopted through an
accessor, so already-generated pages keep working untouched. Storage lives
on window and changes travel as an event: each bundle is its own IIFE, so a
module-level ref is NOT shared between a composite and the bundle it nests.

THAT WAS NECESSARY AND NOT SUFFICIENT, which only measuring showed. With
the token shared and reactive the bar was STILL absent. Real cause:
GeocoderComponent's onMounted hit `typeof MapboxGeocoder === 'undefined'`
and RETURNED SILENTLY — no throw, no console error, no DOM. MapboxGeocoder
is "preloaded via index.html", true for a LEAF and false for a COMPOSITE
leaf, which generate-tree classifies as token-free while it goes on to nest
a real map. Measured, mapbox-gl-geocoder references per page: research-map
leaf 2, research-map-plus-grid leaf 0.

So the script is now fetched on demand when a host did not preload it,
reusing the exact shape the maplibre path already had (one loader, two
callers) and pinned to the same v5.0.0 the leaves preload. It resolves on
error as well as load, so a blocked CDN leaves the map usable and the bar
absent rather than hanging. This fixes every already-generated page without
regenerating any of them.

MEASURED on the built tree:
  leaf mapbox     search@56    legend@104
  leaf maplibre   search@NONE  legend@58    (unchanged: maplibre stays bar-free)
  composite       search@56    legend@104   (was NONE)

library/ reaches every bundle, so all 22 rebuilt: 22/22, 7/7 pre, 18/18
post, and a browser sweep of five StackLayout consumers plus all seven
studio dashboards.
2026-09-24 01:14:37 +00:00
..
charts Prepare repo to the vision: BLUF vision-cast README, library warning, SRI injection, term scrub 2026-09-15 22:58:19 +00:00
hints Stop the pin hint naming a colour the reader may not see 2026-09-23 18:06:25 +00:00
legends Search tier 2: a misspelled country resolves to THE country (best match, 2-edit cap) 2026-09-24 00:34:19 +00:00
map-controls One page, one map token — and the nested search bar comes back 2026-09-24 01:14:37 +00:00
poster Checkpoint the swarm's in-flight work 2026-09-22 21:42:18 +00:00
qa Brand-neutral shared VerticalTabsLayout with lazy nested-element hosting; fix cap-5 prayer tab leaf path; neutralize library identifiers; add Forgejo CI build-gate workflow 2026-09-19 17:24:30 +00:00
search Search tier 2: a misspelled country resolves to THE country (best match, 2-edit cap) 2026-09-24 00:34:19 +00:00
tables Checkpoint the swarm's in-flight work 2026-09-22 21:42:18 +00:00
PeopleGroupDetail.vue Teach the synced-CSS gate what a selector is, and turn it on 2026-09-23 01:22:36 +00:00
README.md consolidate docs into documentation/ and deployment shells into deployment/ 2026-09-21 23:23:23 +00:00
ResearchMapFilterPanel.vue doxa-maps — portable bundler for embeddable JAMstack maps 2026-09-10 01:53:07 +00:00
ResearchMapSideMenu.vue doxa-maps — portable bundler for embeddable JAMstack maps 2026-09-10 01:53:07 +00:00
SideMenuDrawer.vue doxa-maps — portable bundler for embeddable JAMstack maps 2026-09-10 01:53:07 +00:00
ViewSelect.vue UPG-100: lead with Prayer Resources, map second 2026-09-23 20:33:00 +00:00
WARNING.md Complete app-profiles->plugin-designs sweep across comments/docs; build green; layouts kept at root (load-bearing) 2026-09-17 18:18:19 +00:00

library/components/ — shared Vue components

The map UI, built from parameterized pieces every app-profile reuses. Fix one here and every map benefits — never edit a shared component to customize one map.

  library/components/
  ┌───────────────────────────────────────────┐
  │ legends/        map-controls/   poster/      │
  │ charts/         tables/                       │
  │ PeopleGroupDetail.vue   SideMenuDrawer.vue    │
  │ ResearchMapFilterPanel.vue  …SideMenu.vue     │
  └───────────────────────────────────────────┘
     reused by every app-profile via @map/components/…
  • legends/, map-controls/, poster/ each have their own README.
  • Every component uses <script setup>, calls useShadowStyles(), and reaches stores via inject('mapStore' | 'uiStore' | 'dataStore') — never a direct store import.

Full catalog + conventions: ../../documentation/architecture/components.md · per-file roles: ../../documentation/reference.md.