// App entry — composes all sections + Tweaks panel const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{ "viewport": "auto" }/*EDITMODE-END*/; function App() { const [tweaks, setTweak] = useTweaks(TWEAK_DEFAULTS); const { isMobile, isAuto } = useEffectiveViewport(tweaks.viewport); // Expose viewport flag to all components reading via window window.__dch_isMobile = isMobile; // The 375 "phone frame" preview chrome only applies when the user has // explicitly forced the Mobile override in the Tweaks panel. On real devices // (auto mode) we let the layout fill the viewport naturally. const showPhoneFrame = !isAuto && isMobile; // Cache-bust child components when the EFFECTIVE viewport flips so // mount-time measurements (window.innerWidth etc.) re-run. const vpKey = isMobile ? 'm' : 'd'; return (
setTweak('viewport', v)} />
); } const root = ReactDOM.createRoot(document.getElementById('root')); root.render();