// What the help remembers between openings: the tab, each tab's search, // the library's filters, and where the reader was on each page. Module // state, so it lasts the session and costs nothing to restore. import type { CardQuery } from "./reference"; export const HELP_TABS = ["play", "rules", "cards", "rulings", "about", "tally"] as const; export type HelpTab = (typeof HELP_TABS)[number]; export const helpState: { tab: HelpTab; rulesSearch: string; rulingsSearch: string; cards: CardQuery; scroll: Partial>; } = { tab: "play", rulesSearch: "", rulingsSearch: "", cards: { text: "", set: "all", type: "all", sight: "all" }, scroll: {}, };