puck / frontend /src /main.tsx
vu1n's picture
Puck β€” desktop fairy familiar (HF Build Small)
3c124f3
Raw
History Blame Contribute Delete
777 Bytes
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { installDebugLog } from "./lib/debuglog";
import { SimApp } from "./modes/sim/SimApp";
import "./styles/base.css";
import "./styles/ui.css";
installDebugLog(); // overlay console β†’ daemon log (the WKWebView inspector is unusable)
const root = document.getElementById("root");
if (!root) throw new Error("no #root element");
// ?mode=overlay β†’ transparent shell over the real desktop; running inside the
// Tauri shell implies overlay. Default (browser/Space) β†’ sim.
const overlay =
new URLSearchParams(location.search).get("mode") === "overlay" || "__TAURI_INTERNALS__" in window;
createRoot(root).render(
<StrictMode>
<SimApp overlay={overlay} />
</StrictMode>,
);