import type { Entry } from "@/lib/shared/types"; export const ENTRY_MUTATED_EVENT = "fiddy:entry-mutated"; export type EntryMutationDetail = { before: Entry | null; after: Entry | null; }; export function emitEntryMutated(detail: EntryMutationDetail) { if (typeof window === "undefined") return; window.dispatchEvent(new CustomEvent(ENTRY_MUTATED_EVENT, { detail })); }