v0.5.0-dm-tools: Initiative tracker, random tables, encounter builder, calendar

- Initiative Tracker: add/remove combatants, roll initiative, HP bars with
  color transitions (green→gold→red), condition badges, round counter,
  next-turn cycling, gold active-state border
- Random Tables: 4 built-in tables (Tavern Names, Weather, NPC Quirks,
  Treasure), dice notation parser, roll history, highlight matching result
- Encounter Builder: AI-generated encounters via LLM, party level/size,
  terrain selector, JSON response parsing, difficulty badge
- Calendar Widget: Faerûn calendar (Hammer–Nightal), event creation per
  day, event indicators, month navigation, year display
- All glass-card wrapped with framer-motion hover/tap animations
- Full production build clean: tsc, vite, cargo, tauri build
This commit is contained in:
itsamejms
2026-06-28 22:40:11 +01:00
parent 9675e05b07
commit 5ce2686ced
5 changed files with 704 additions and 43 deletions
+15 -43
View File
@@ -13,6 +13,10 @@ import { BentoCard } from "./BentoCard";
import { NpcGenerator } from "./NpcGenerator";
import { DiceRoller } from "./DiceRoller";
import { SessionLogger } from "./SessionLogger";
import { EncounterBuilder } from "./EncounterBuilder";
import { InitiativeTracker } from "./InitiativeTracker";
import { RandomTables } from "./RandomTables";
import { CalendarWidget } from "./CalendarWidget";
export function Dashboard() {
return (
@@ -39,71 +43,39 @@ export function Dashboard() {
</BentoCard>
{/* Encounter Builder — 1×1 */}
<BentoCard
title="Encounter"
icon={<Swords size={16} />}
span="col-span-1 row-span-1"
>
<div className="flex items-center justify-center h-full text-[var(--color-text-dim)] text-sm">
Encounter builder coming soon
</div>
<BentoCard title="Encounter" icon={<Swords size={16} />} span="col-span-1 row-span-1">
<EncounterBuilder />
</BentoCard>
{/* Session Log — 2×1 */}
<BentoCard
title="Session Log"
icon={<ScrollText size={16} />}
span="col-span-2 row-span-1"
>
<BentoCard title="Session Log" icon={<ScrollText size={16} />} span="col-span-2 row-span-1">
<SessionLogger />
</BentoCard>
{/* Quest Designer — 2×1 */}
<BentoCard
title="Quest Designer"
icon={<Sparkles size={16} />}
span="col-span-2 row-span-1"
>
<BentoCard title="Quest Designer" icon={<Sparkles size={16} />} span="col-span-2 row-span-1">
<div className="flex items-center justify-center h-full text-[var(--color-text-dim)] text-sm">
Quest flowchart coming soon
Quest flowchart coming soon react-flow integration pending
</div>
</BentoCard>
{/* Initiative Tracker — 1×1 */}
<BentoCard title="Initiative" icon={<Timer size={16} />} span="col-span-1 row-span-1">
<div className="flex items-center justify-center h-full text-[var(--color-text-dim)] text-sm">
Combat tracker coming soon
</div>
<InitiativeTracker />
</BentoCard>
{/* Random Tables — 1×1 */}
<BentoCard
title="Random Tables"
icon={<Sparkles size={16} />}
span="col-span-1 row-span-1"
>
<div className="flex items-center justify-center h-full text-[var(--color-text-dim)] text-sm">
Random tables coming soon
</div>
<BentoCard title="Random Tables" icon={<Sparkles size={16} />} span="col-span-1 row-span-1">
<RandomTables />
</BentoCard>
{/* Calendar — 1×1 */}
<BentoCard
title="Calendar"
icon={<Calendar size={16} />}
span="col-span-1 row-span-1"
>
<div className="flex items-center justify-center h-full text-[var(--color-text-dim)] text-sm">
Calendar coming soon
</div>
<BentoCard title="Calendar" icon={<Calendar size={16} />} span="col-span-1 row-span-1">
<CalendarWidget />
</BentoCard>
{/* Soundboard — 1×1 */}
<BentoCard
title="Soundboard"
icon={<Volume2 size={16} />}
span="col-span-1 row-span-1"
>
<BentoCard title="Soundboard" icon={<Volume2 size={16} />} span="col-span-1 row-span-1">
<div className="flex items-center justify-center h-full text-[var(--color-text-dim)] text-sm">
Soundboard coming soon
</div>