refactor: extract components from SpireTab.tsx to reduce below 400 lines
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m11s

This commit is contained in:
Refactoring Agent
2026-05-01 17:02:32 +02:00
parent f0ab3ca3ce
commit dc38445225
9 changed files with 1148 additions and 564 deletions
+63 -13
View File
@@ -1,14 +1,64 @@
// ─── Game Types ───────────────────────────────────────────────────────────────
// This file now re-exports types from domain-specific files in the types/ directory.
// All type definitions have been moved to:
// - types/elements.ts - element-related types
// - types/attunements.ts - attunement-related types
// - types/spells.ts - spell-related types
// - types/skills.ts - skill-related types
// - types/equipment.ts - equipment-related types
// - types/game.ts - core game state types
//
// Import from this file (types.ts) to maintain backward compatibility,
// or import directly from the domain-specific files.
import type { GameStore } from '@/lib/game/store';
import type { SPELLS } from '@/lib/game/constants';
import type { EquipmentSpellState } from '@/lib/game/state';
import type { RoomType, ActivityLogEntry } from '@/lib/game/types/game';
export * from './types/index';
// Re-export ActivityLogEntry for convenience
export { ActivityLogEntry };
// Room Display Props
export interface RoomDisplayProps {
roomType: RoomType;
roomConfig: { label: string; icon: string; color: string };
primaryEnemy: any;
swarmEnemies: any[];
puzzleId?: string;
puzzleProgress?: number;
simpleMode: boolean;
floorElemDef: any;
floorHP: number;
floorMaxHP: number;
totalDPS: number;
currentAction: string | null;
activeEquipmentSpells: Array<{ spellId: string; equipmentId: string }>;
}
// Floor Controls Props
export interface FloorControlsProps {
store: GameStore;
climbDirection: 'up' | 'down' | null;
isGuardianFloor: boolean;
currentRoom: any;
currentGuardian: any;
isFloorCleared: boolean;
floorElemDef: any;
roomType: RoomType;
roomConfig: { label: string; icon: string; color: string };
activeEquipmentSpells: Array<{ spellId: string; equipmentId: string }>;
upgradeEffects: any;
floorElem: string;
totalDPS: number;
getEnemyName: typeof import('@/lib/game/store').getEnemyName;
calcDamage: typeof import('@/lib/game/store').calcDamage;
SPELLS_DEF: typeof import('@/lib/game/constants').SPELLS_DEF;
canCastSpell: (spellId: string) => boolean;
storeCurrentAction: string | null;
handleClimb: (direction: 'up' | 'down') => void;
formatSpellCost: typeof import('@/lib/game/formatting').formatSpellCost;
getSpellCostColor: typeof import('@/lib/game/formatting').getSpellCostColor;
}
// Combat Stats Panel Props
export interface CombatStatsPanelProps {
activeEquipmentSpells: Array<{ spellId: string; equipmentId: string }>;
store: GameStore;
totalDPS: number;
calcDamage: typeof import('@/lib/game/store').calcDamage;
formatSpellCost: typeof import('@/lib/game/formatting').formatSpellCost;
getSpellCostColor: typeof import('@/lib/game/formatting').getSpellCostColor;
SPELLS_DEF: typeof import('@/lib/game/constants').SPELLS_DEF;
upgradeEffects: any;
canCastSpell: (spellId: string) => boolean;
studySpeedMult: number;
storeCurrentAction: string | null;
}