riprap-nyc / web /svelte /src /lib /stores.js
seriffic's picture
Frontend overhaul: Lit kickoff β†’ Svelte 5 custom elements β†’ SvelteKit design-system
e8a6c67
// Shared state across all three custom elements. Svelte stores have
// .subscribe (Svelte runtime uses it) AND a manual subscribe is exposed
// here so legacy agent.js can wire vanilla DOM to the same signal that
// Svelte components react to.
import { writable } from "svelte/store";
export const highlightedDocId = writable(null);
// { doc_id: number } β€” Briefing populates as it encounters citations,
// SourcesFooter renders the numbered list from this.
export const citeIndex = writable({});