move TransformHandler/UIState/Controller out of graphics/, drop dead GhostStructureChangedEvent

graphics/ was a canvas2D-era directory name — TransformHandler, UIState,
and the Controller interface aren't graphics, they're cross-cutting
client state. Hoist them to src/client/ so the path matches what they
are. GhostStructureChangedEvent had three emitters and zero listeners;
removed.
This commit is contained in:
evanpelle
2026-05-17 12:24:41 -07:00
parent 7b1557b886
commit eb046e5a58
40 changed files with 69 additions and 84 deletions
+1 -4
View File
@@ -6,7 +6,7 @@ import {
WarshipSelectionBoxCompleteEvent,
WarshipSelectionBoxUpdateEvent,
} from "../src/client/InputHandler";
import { UIState } from "../src/client/graphics/UIState";
import { UIState } from "../src/client/UIState";
import { EventBus } from "../src/core/EventBus";
import { UnitType } from "../src/core/game/Game";
import { GameView, PlayerView } from "../src/core/game/GameView";
@@ -928,13 +928,10 @@ describe("Warship box selection (Shift+drag)", () => {
test("Shift keydown discards active ghostStructure", () => {
uiState.ghostStructure = UnitType.Warship;
const emitSpy = vi.spyOn(eventBus, "emit");
window.dispatchEvent(new KeyboardEvent("keydown", { code: "ShiftLeft" }));
expect(uiState.ghostStructure).toBeNull();
const types = emitSpy.mock.calls.map((c) => c[0].constructor.name);
expect(types).toContain("GhostStructureChangedEvent");
});
test("Shift+drag emits WarshipSelectionBoxUpdateEvent", () => {