- README rewritten as a BLUF-first vision cast for vibe coders (key-terms glossary, origin story, features, requirements, data caveat, developer's note). - library/components/WARNING.md: prototype in your app-profile; only proven, parameterized components graduate into the shared library. - generate-tree.mjs: inject Subresource Integrity (sha384) + crossorigin into the standalone page <script> tags and the copy-paste embed snippets (manifest = registry). - Scrubbed identity-tied phrasing from comments/docs, keeping the technical rationale and the mission content.
1.3 KiB
1.3 KiB
⚠️ Read before you touch these components
These are the SHARED, REUSABLE components — every map in app-profiles/ depends on them.
A change here does not affect one map. It ripples to all of them. So:
- Prototyping or experimenting? Don't edit these. Put your custom, one-off, not-yet-proven component
inside your own map's folder (
app-profiles/<your-map>/), where it can be as messy as you need and breaks nothing else. - Only proven, parameterized, reusable components graduate into this library. If a component has hard-coded values, assumptions about one specific map, or hasn't been used by more than one map yet — it is not ready to live here.
- A reusable component takes props, not assumptions. Before you move something in, make it parameterized: the map, the legend, the controls, the search bar all take configuration — yours should too.
- If you must change a shared component, check every map that uses it. Run
bun run devand click through the maps before you commit. The whole point of this library is that maps don't have to be rewritten — don't undo that by breaking the shared pieces.
Rule of thumb: custom code in your app-profile, reusable code in the library — and things only move from the first to the second once they've earned it.