mudlet-map-editor 0.6.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -74,4 +74,6 @@ Binary .dat file
74
74
  → MapRenderer (Konva canvas) + LiveEffect overlays
75
75
  ```
76
76
 
77
- All map mutations go through a command system (`applyCommand`) that records operations for undo/redo. State is managed in a single centralized store.
77
+ All map mutations go through a command system (`applyCommand`) that records operations for undo/redo. State is managed in a single centralized store.
78
+
79
+ Bulk operations (multi-room delete, move rooms to area, undo/redo of the above) go through optimized paths in `EditorMapReader` that perform a single `rebuildPlanes`/`rebuildExits` per affected area rather than one per room, keeping large selections responsive.
@@ -0,0 +1,14 @@
1
+ import type { SceneHandle } from '../editor/scene';
2
+ import type { MudletMap } from '../mapIO';
3
+ interface MultiRoomPanelProps {
4
+ selection: {
5
+ kind: 'room';
6
+ ids: number[];
7
+ };
8
+ map: MudletMap;
9
+ sceneRef: {
10
+ current: SceneHandle | null;
11
+ };
12
+ }
13
+ export declare function MultiRoomPanel({ selection, map, sceneRef }: MultiRoomPanelProps): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -75,6 +75,7 @@ export declare class EditorArea {
75
75
  getLinkExits(zIndex: number): EditorExit[];
76
76
  setLabels(labels: any[]): void;
77
77
  addRoomLive(room: LiveRoom): void;
78
+ addRoomsLive(newRooms: LiveRoom[]): void;
78
79
  removeRoomById(id: number): void;
79
80
  removeRoomsById(ids: Set<number>): void;
80
81
  rebuildPlanes(): void;
@@ -121,6 +122,11 @@ export declare class EditorMapReader {
121
122
  setUserDataEntry(id: number, key: string, value: string | null): void;
122
123
  /** Add a raw room (expected `raw.rooms[id]` already set or not, we set it). */
123
124
  addRoom(id: number, rawRoom: MudletRoom): void;
125
+ /** Bulk-add many rooms. Does one rebuildPlanes/rebuildExits per affected area. */
126
+ addRooms(rooms: Array<{
127
+ id: number;
128
+ room: MudletRoom;
129
+ }>): void;
124
130
  setSpecialExit(roomId: number, name: string, toId: number): void;
125
131
  removeSpecialExit(roomId: number, name: string): void;
126
132
  setDoor(roomId: number, dir: Direction, value: number): void;