be7f06e163
Mirror the screen into browser history via SvelteKit shallow routing (pushState/replaceState with page.state) so Back/Forward move between screens while the URL stays at /game/. Overlays (game, lobby-create) push; lobby/login replace. A popstate→page.state effect syncs the store back without re-pushing (no loop); the boot stamp puts a restored overlay above the load entry so Back falls through to lobby. In-game view switches never touch history. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
17 lines
465 B
TypeScript
17 lines
465 B
TypeScript
declare global {
|
|
// Build-time constant injected by Vite from package.json version.
|
|
const __APP_VERSION__: string;
|
|
|
|
namespace App {
|
|
// Shallow-routing state for the single-URL app-shell: the screen
|
|
// (and active game) live in `page.state` so browser Back/Forward
|
|
// move between screens while the address bar stays at /game/.
|
|
interface PageState {
|
|
screen?: "login" | "lobby" | "lobby-create" | "game";
|
|
gameId?: string | null;
|
|
}
|
|
}
|
|
}
|
|
|
|
export {};
|