Add full shell, replaceable Omics adapter and bilingual interaction

Implement approved specification #32 and tickets #33-#37. Keep host authentication server-verified and pin session interaction language. Compile scoped base selectors for browser compatibility and retain full gutters during CSS pruning.
This commit is contained in:
Codex
2026-09-13 14:26:39 +02:00
parent 2d1b714ebe
commit d8a29bfbdd
207 changed files with 8570 additions and 2164 deletions
+18
View File
@@ -0,0 +1,18 @@
import { useEffect, useState } from "react";
/** Protect edits until reverted or unmounted after the host accepts the response. */
export function useUnsavedDraft(draft: string, active = true) {
const [initialDraft] = useState(draft);
const dirty = active && draft !== initialDraft;
useEffect(() => {
if (!dirty) return;
const protectDraft = (event: BeforeUnloadEvent) => {
event.preventDefault();
// The browser supplies its own localized warning.
event.returnValue = "";
};
window.addEventListener("beforeunload", protectDraft);
return () => window.removeEventListener("beforeunload", protectDraft);
}, [dirty]);
}