This commit is contained in:
pj committed 2026-06-22 09:56:20 -04:00
1 parent 78fff9b6f4
commit 7cc36e3e40
37 files changed
+55361 -103

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
import { create } from "zustand";
interface ProofingState {
spelling: boolean;
grammar: boolean;
ignored: Set<string>;
toggleSpelling: () => void;
toggleGrammar: () => void;
ignore: (signature: string) => void;
resetIgnored: () => void;
}
export const useProofing = create<ProofingState>((set) => ({
spelling: true,
grammar: false,
ignored: new Set(),
toggleSpelling: () => set((s) => ({ spelling: !s.spelling })),
toggleGrammar: () => set((s) => ({ grammar: !s.grammar })),
ignore: (signature) =>
set((s) => {
const ignored = new Set(s.ignored);
ignored.add(signature);
return { ignored };
}),
resetIgnored: () => set({ ignored: new Set() }),
}));