P20: map viewport zoom/pan/fit + token placement palette

Render maps at natural resolution inside a CSS-transform world layer (zoom,
pan, fit-to-view) instead of shrinking to maxWidth — large maps are now usable.
Pure viewport math in src/lib/map/viewport.ts (unit-tested). New TokenPalette
places party PCs / active-encounter combatants / blanks in one click with dup
detection; tokens gain optional combatantId (Dexie v9) for live encounter HP.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-08 12:34:00 +02:00
parent a8cb7d65f4
commit c28c29a6c6
13 changed files with 505 additions and 137 deletions
+4
View File
@@ -96,6 +96,10 @@ export class TtrpgDatabase extends Dexie {
}
});
});
// v9 — Phase 20: tokens gain optional combatantId (live HP from an encounter
// combatant). Optional field — no backfill needed; existing rows parse fine.
this.version(9).stores({});
}
}