Init commit from initial prompt

This commit is contained in:
2025-08-17 12:21:15 +01:00
commit caee8e27f2
21 changed files with 3114 additions and 0 deletions

22
src/lib/checklist.ts Normal file
View File

@@ -0,0 +1,22 @@
export const CHECKLIST_KEY = 'magikarp-checklist-v1';
export function loadChecklist(): Set<string> {
if (typeof window === 'undefined') return new Set();
try {
const raw = localStorage.getItem(CHECKLIST_KEY);
if (!raw) return new Set();
const arr = JSON.parse(raw) as string[];
return new Set(arr);
} catch {
return new Set();
}
}
export function saveChecklist(set: Set<string>) {
if (typeof window === 'undefined') return;
try {
localStorage.setItem(CHECKLIST_KEY, JSON.stringify(Array.from(set)));
} catch {
// ignore
}
}