Phase 7: maps & VTT

- BattleMap entity (image dataURL, grid, tokens, fog) — Dexie v5, repo, hook,
  cascade-deleted with campaign
- Maps page: upload image (8MB cap), per-campaign list
- Map editor canvas: grid overlay (toggle + cell size), fog of war (canvas) with
  reveal/hide painting + reveal-all/hide-all, draggable tokens that snap to the
  grid (pointer events, touch+mouse), add/remove tokens; debounced autosave
- Dashboard + routes get a Maps entry

New maps e2e (upload, add token, toggle fog).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-08 02:01:29 +02:00
parent 522ff8abce
commit 1632018ce9
9 changed files with 354 additions and 5 deletions
+3
View File
@@ -11,6 +11,7 @@ import { NotesPage } from '@/features/world/NotesPage';
import { NpcsPage } from '@/features/world/NpcsPage';
import { QuestsPage } from '@/features/world/QuestsPage';
import { CalendarPage } from '@/features/world/CalendarPage';
import { MapsPage } from '@/features/world/MapsPage';
const rootRoute = createRootRoute({ component: RootLayout });
@@ -29,6 +30,7 @@ const notesRoute = createRoute({ getParentRoute: () => rootRoute, path: '/notes'
const npcsRoute = createRoute({ getParentRoute: () => rootRoute, path: '/npcs', component: NpcsPage });
const questsRoute = createRoute({ getParentRoute: () => rootRoute, path: '/quests', component: QuestsPage });
const calendarRoute = createRoute({ getParentRoute: () => rootRoute, path: '/calendar', component: CalendarPage });
const mapsRoute = createRoute({ getParentRoute: () => rootRoute, path: '/maps', component: MapsPage });
const routeTree = rootRoute.addChildren([
indexRoute,
@@ -42,6 +44,7 @@ const routeTree = rootRoute.addChildren([
npcsRoute,
questsRoute,
calendarRoute,
mapsRoute,
]);
export const router = createRouter({ routeTree, defaultPreload: 'intent' });