Initial commit: Theriapolis baseline at port/godot branch point
Captures the pre-Godot-port state of the codebase. This is the rollback anchor for the Godot port (M0 of theriapolis-rpg-implementation-plan-godot-port.md). All Phase 0 through Phase 6.5 work is included; Phase 7 is in flight. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
/* Entry point — loads data, mounts app. */
|
||||
|
||||
const Root = () => {
|
||||
const [data, setData] = React.useState(null);
|
||||
const [err, setErr] = React.useState(null);
|
||||
const [tweaks, setTweak] = useTweaks(window.TweakDefaults);
|
||||
|
||||
React.useEffect(() => {
|
||||
loadData().then(setData).catch(e => setErr(String(e)));
|
||||
}, []);
|
||||
|
||||
// setTweaks accepts a partial object: {theme: 'dark', density: 'compact'}
|
||||
const setTweaks = (patch) => {
|
||||
Object.entries(patch).forEach(([k, v]) => setTweak(k, v));
|
||||
};
|
||||
|
||||
if (err) return <div style={{padding: 40, color: "var(--seal)", fontFamily: "var(--serif-display)"}}>Failed to load codex: {err}</div>;
|
||||
if (!data) return (
|
||||
<div style={{padding: 80, textAlign: "center", fontFamily: "var(--serif-display)", fontStyle: "italic", color: "var(--ink-mute)"}}>
|
||||
Unsealing the codex…
|
||||
</div>
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<App data={data} tweaks={tweaks} setTweaks={setTweaks} />
|
||||
<TweaksWiring tweaks={tweaks} setTweaks={setTweaks} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
ReactDOM.createRoot(document.getElementById("app")).render(<Root />);
|
||||
Reference in New Issue
Block a user