★ LANDING 4 AS I SCOPED IT IS NOT POSSIBLE, AND THE SPEC WAS WRONG ABOUT THAT. go-int asked for the facet rail next and I agreed. Then the first step of a landing — look before moving — found that DashboardFacetRail imports FOUR plugin-local modules: useDashboardAggregations, useDashboardShell, useTreeLegendColors and useTreeLegendLabels. Moving the rail into library/ would have made a library component import plugin composables, which check:no-cross-plugin-imports rightly refuses. And two of those four are research-specific by my own spec's reckoning — useTreeLegendColors carries the DOXA colour strategies and is supposed to STAY in the plugin — so the rail cannot become library code by moving alone. Its colour and label dependencies have to be inverted into injection first, which section 8 named as a risk and then ordered as if it were free. So landing 4 is three commits, not one, and this is the first: the piece the rail stands on. THE SEARCH WAS NEVER A SHELL CONCERN. buildSearchAccessors, makeSearchMatcher and filterRowsBySearch were exported from useDashboardShell, and EIGHT files reached into the shell to get them — the table, the map panel, the charts rail, the facet rail, the research filters, the top bar, the profile and the config. A module that eight things import is a module, not a corner of another one. Nothing in it is domain-specific: the accessors come from config.facets / config.columns / config.searchKeys, and the matching comes from the already-shared fuzzy.js. Bodies are verbatim; this is a move. The shell re-exports the three names for one cycle, so none of the eight importers changes in this commit — a barrel line rather than a shim file, so there is nothing to delete later, only a line to remove when the eight point at the library directly. The now-dead fuzzy.js import is removed from the shell rather than left. An import nothing uses is the kind of thing that survives three more landings because it looks load-bearing. WHAT THIS DELIBERATELY DOES NOT TOUCH: the shell keeps rowMatchesFilters and the URL-hash escape helpers, which are what check:filter-multivalue reads out of it by path. I checked that before slicing, so no gate path moves in this commit. Library index regenerated in-commit. Source only; no rebuild needed beyond the usual, since every importer still resolves through the shell. |
||
|---|---|---|
| .. | ||
| api | ||
| colors | ||
| components | ||
| composables | ||
| constants | ||
| data | ||
| i18n | ||
| layouts | ||
| lists | ||
| maps | ||
| packet | ||
| scripts | ||
| stores | ||
| styles | ||
| utils | ||
| index.js | ||
| ProfileLoader.vue | ||
| README.md | ||
library/ (@map) — the shared map template
The other half of the architecture (see ../plugin-designs/README.md):
every map in plugin-designs/<your-map>/ composes the reusable, parameterized pieces that live here.
Fix something here and every map benefits on the next build; break something here and every map
breaks — read components/WARNING.md before touching shared pieces.
| Folder | What lives there |
|---|---|
ProfileLoader.vue |
The root of every bundle: parses profile-config, loads the profile, provides the stores + config |
components/ |
Shared UI — map, legends, controls, popup (PeopleGroupDetail), tables, charts, hints (README) |
composables/ |
Shared logic — map engine (useMapInstance), provider switch, shadow-DOM styles, theming |
stores/ |
Per-instance Pinia stores (ui / map / data) — provided by ProfileLoader, injected by children |
api/ |
Data-source registry (sources.json) + fetch layer — the JAMstack runtime wiring |
colors/ |
Color sets maps opt into via profile-config.colorSet |
i18n/ |
The shared string catalogs (all maps speak the same languages) |
data/ |
Small shared datasets baked at build time (big served data lives in ../data/) |
constants/ |
Shared constants |
scripts/ |
Maintainer pipelines (posters, research) — not part of any bundle |
The rule of thumb (same as WARNING.md): custom code in your app-profile, reusable code here — and things only move from the first to the second once they've earned it.