new UI, unify map/demo/live architecture more, cleanup

This commit is contained in:
Brian Beck 2026-03-12 16:25:04 -07:00
parent d9b5e30831
commit 4741f59582
146 changed files with 5477 additions and 3005 deletions

View file

@ -0,0 +1,29 @@
import { lazy, Suspense } from "react";
import { useTouchDevice } from "./useTouchDevice";
const TouchJoystick = lazy(() =>
import("@/src/components/TouchJoystick").then((mod) => ({
default: mod.TouchJoystick,
})),
);
const KeyboardOverlay = lazy(() =>
import("@/src/components/KeyboardOverlay").then((mod) => ({
default: mod.KeyboardOverlay,
})),
);
export function VisualInput() {
const isTouch = useTouchDevice();
return (
<Suspense>
{isTouch ? <TouchJoystick /> : null}
{isTouch === false ? (
// isTouch can be `null` before we know for sure; make sure this doesn't
// render until it's definitively false
<KeyboardOverlay />
) : null}
</Suspense>
);
}