mudlet-map-editor 0.1.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.
Files changed (54) hide show
  1. package/README.md +77 -0
  2. package/dist-lib/App.d.ts +5 -0
  3. package/dist-lib/components/AreaManagerModal.d.ts +8 -0
  4. package/dist-lib/components/ContextMenu.d.ts +8 -0
  5. package/dist-lib/components/DropdownSelect.d.ts +15 -0
  6. package/dist-lib/components/EnvManagerModal.d.ts +8 -0
  7. package/dist-lib/components/EnvPicker.d.ts +13 -0
  8. package/dist-lib/components/HelpModal.d.ts +10 -0
  9. package/dist-lib/components/RoomPanel.d.ts +15 -0
  10. package/dist-lib/components/SessionsPanel.d.ts +1 -0
  11. package/dist-lib/components/SidePanel.d.ts +10 -0
  12. package/dist-lib/components/SwatchPalette.d.ts +6 -0
  13. package/dist-lib/components/Toolbar.d.ts +6 -0
  14. package/dist-lib/components/UrlLoadModal.d.ts +4 -0
  15. package/dist-lib/components/icons.d.ts +7 -0
  16. package/dist-lib/components/panelShared.d.ts +27 -0
  17. package/dist-lib/components/panels/CustomLinePanel.d.ts +20 -0
  18. package/dist-lib/components/panels/ExitPanel.d.ts +15 -0
  19. package/dist-lib/components/panels/HistoryPanel.d.ts +8 -0
  20. package/dist-lib/components/panels/LabelPanel.d.ts +13 -0
  21. package/dist-lib/components/panels/MapPanel.d.ts +8 -0
  22. package/dist-lib/editor/commands.d.ts +30 -0
  23. package/dist-lib/editor/coords.d.ts +6 -0
  24. package/dist-lib/editor/effects/ConnectHandlesEffect.d.ts +21 -0
  25. package/dist-lib/editor/effects/CustomLinePreviewEffect.d.ts +19 -0
  26. package/dist-lib/editor/effects/GridOverlayEffect.d.ts +27 -0
  27. package/dist-lib/editor/effects/HoverHaloEffect.d.ts +19 -0
  28. package/dist-lib/editor/effects/LabelHaloEffect.d.ts +25 -0
  29. package/dist-lib/editor/effects/MarqueeEffect.d.ts +11 -0
  30. package/dist-lib/editor/effects/RubberBandEffect.d.ts +17 -0
  31. package/dist-lib/editor/effects/SelectedLinkEffect.d.ts +17 -0
  32. package/dist-lib/editor/effects/SelectionHaloEffect.d.ts +20 -0
  33. package/dist-lib/editor/effects/SnapIndicatorEffect.d.ts +14 -0
  34. package/dist-lib/editor/hitTest.d.ts +100 -0
  35. package/dist-lib/editor/labelPixmap.d.ts +12 -0
  36. package/dist-lib/editor/loadFile.d.ts +2 -0
  37. package/dist-lib/editor/mapBytes.d.ts +1 -0
  38. package/dist-lib/editor/mapHelpers.d.ts +17 -0
  39. package/dist-lib/editor/plugin.d.ts +20 -0
  40. package/dist-lib/editor/pointerController.d.ts +2 -0
  41. package/dist-lib/editor/reader/EditorMapReader.d.ts +175 -0
  42. package/dist-lib/editor/scene.d.ts +22 -0
  43. package/dist-lib/editor/session.d.ts +19 -0
  44. package/dist-lib/editor/store.d.ts +98 -0
  45. package/dist-lib/editor/tools.d.ts +52 -0
  46. package/dist-lib/editor/types.d.ts +523 -0
  47. package/dist-lib/index.d.ts +5 -0
  48. package/dist-lib/index.js +11029 -0
  49. package/dist-lib/main.d.ts +1 -0
  50. package/dist-lib/mapIO.d.ts +6 -0
  51. package/dist-lib/platform.d.ts +2 -0
  52. package/dist-lib/shims/fs-stub.d.ts +7 -0
  53. package/dist-lib/styles.css +3476 -0
  54. package/package.json +45 -0
package/README.md ADDED
@@ -0,0 +1,77 @@
1
+ # Mudlet Map Editor
2
+
3
+ A browser-based visual editor for [Mudlet](https://www.mudlet.org/) `.dat` binary map files. Load, edit, and save MUD maps directly in your browser — no installation required.
4
+
5
+ ## Features
6
+
7
+ - **Visual editing** — add, move, and delete rooms on an interactive canvas
8
+ - **Exit management** — create bidirectional or one-way exits between rooms in 14+ directions
9
+ - **Labels** — place text labels with custom fonts, colors, and optional images
10
+ - **Custom lines** — draw waypoint-based paths with configurable colors and arrowheads
11
+ - **Area & environment management** — organize rooms into areas, customize terrain colors
12
+ - **Swatches / Paint tool** — define symbol+environment presets and paint them onto rooms in one click
13
+ - **Undo/redo** — full command history with descriptive labels
14
+ - **Binary I/O** — load and save Mudlet `.dat` files directly in the browser; also load from URL
15
+ - **Session persistence** — work is auto-saved to IndexedDB and restored on next visit
16
+
17
+ ## Tools
18
+
19
+ | Key | Tool | Description |
20
+ |-----|------|-------------|
21
+ | `1` | Select | Click rooms to view/edit properties; nudge with arrow keys |
22
+ | `2` | Connect | Click source then target to create an exit |
23
+ | `3` | Unlink | Click an exit stub to remove that exit |
24
+ | `4` | Add Room | Click an empty grid cell to create a room |
25
+ | `5` | Add Label | Place a text label on the map |
26
+ | `6` | Delete | Remove rooms, exits, or labels |
27
+ | `7` | Pan | Drag to move the viewport |
28
+ | `8` | Paint | Apply the active swatch (symbol + environment) to rooms |
29
+
30
+ The **Custom Line** tool is activated from the side panel (on a selected exit), not the toolbar. Hold **Space** to temporarily pan from any tool.
31
+
32
+ ## Keyboard Shortcuts
33
+
34
+ | Shortcut | Action |
35
+ |----------|--------|
36
+ | `Ctrl+Z` | Undo |
37
+ | `Ctrl+Y` | Redo |
38
+ | `G` | Toggle grid snap |
39
+ | `F` | Fit area in view |
40
+ | `Delete` | Remove selection |
41
+ | `Ctrl+A` | Select all rooms in current area/z-level |
42
+ | `Esc` | Cancel current operation |
43
+
44
+ ## Getting Started
45
+
46
+ ```bash
47
+ npm install
48
+ npm run dev
49
+ ```
50
+
51
+ Then open the app, click **Load** in the toolbar to open a `.dat` file, or click **New** to start from scratch. Use **Download** to save your changes.
52
+
53
+ ## Commands
54
+
55
+ ```bash
56
+ npm run dev # Vite dev server with HMR
57
+ npm run build # Type-check and bundle for production
58
+ npm run preview # Preview the production build
59
+ ```
60
+
61
+ ## Tech Stack
62
+
63
+ - **React 19** + **TypeScript**
64
+ - **Vite** for bundling
65
+ - **Konva** for canvas rendering (via [`mudlet-map-renderer`](https://github.com/Delwing/mudlet-map-renderer))
66
+ - [`mudlet-map-binary-reader`](https://github.com/Delwing/mudlet-map-binary-reader) for parsing and serializing Mudlet `.dat` files
67
+
68
+ ## Architecture
69
+
70
+ ```
71
+ Binary .dat file
72
+ → mudlet-map-binary-reader → MudletMap (in-memory model)
73
+ → EditorMapReader (adapter, Y-flip)
74
+ → MapRenderer (Konva canvas) + LiveEffect overlays
75
+ ```
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.
@@ -0,0 +1,5 @@
1
+ import type { EditorPlugin } from './editor/plugin';
2
+ export default function App({ plugins, title }: {
3
+ plugins?: EditorPlugin[];
4
+ title?: string;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import type { SceneHandle } from '../editor/scene';
2
+ interface AreaPanelProps {
3
+ sceneRef: {
4
+ current: SceneHandle | null;
5
+ };
6
+ }
7
+ export declare function AreaPanel({ sceneRef }: AreaPanelProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { SceneHandle } from '../editor/scene';
2
+ interface ContextMenuProps {
3
+ sceneRef: {
4
+ current: SceneHandle | null;
5
+ };
6
+ }
7
+ export declare function ContextMenu({ sceneRef }: ContextMenuProps): import("react/jsx-runtime").JSX.Element | null;
8
+ export {};
@@ -0,0 +1,15 @@
1
+ export interface DropdownOption {
2
+ value: number;
3
+ label: string;
4
+ }
5
+ interface Props {
6
+ label: string;
7
+ value: number | null;
8
+ options: DropdownOption[];
9
+ onChange: (value: number) => void;
10
+ searchable?: boolean;
11
+ emptyText?: string;
12
+ width?: number;
13
+ }
14
+ export declare function DropdownSelect({ label, value, options, onChange, searchable, emptyText, width }: Props): import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { SceneHandle } from '../editor/scene';
2
+ interface EnvPanelProps {
3
+ sceneRef: {
4
+ current: SceneHandle | null;
5
+ };
6
+ }
7
+ export declare function EnvPanel({ sceneRef }: EnvPanelProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,13 @@
1
+ import type { MudletMap } from '../mapIO';
2
+ import type { SceneHandle } from '../editor/scene';
3
+ interface EnvPickerProps {
4
+ map: MudletMap;
5
+ sceneRef: {
6
+ current: SceneHandle | null;
7
+ };
8
+ currentEnvId: number;
9
+ onSelect: (envId: number) => void;
10
+ onClose: () => void;
11
+ }
12
+ export declare function EnvPicker({ map, sceneRef, currentEnvId, onSelect, onClose }: EnvPickerProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { ToolId } from '../editor/types';
2
+ export declare const TOOL_BUTTONS: {
3
+ id: ToolId;
4
+ label: string;
5
+ hint: string;
6
+ key: string;
7
+ }[];
8
+ export declare function HelpModal({ onClose }: {
9
+ onClose: () => void;
10
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import type { SceneHandle } from '../editor/scene';
2
+ import type { MudletMap } from '../mapIO';
3
+ interface RoomPanelProps {
4
+ selection: {
5
+ kind: 'room';
6
+ ids: number[];
7
+ };
8
+ room: NonNullable<MudletMap['rooms'][number]>;
9
+ map: MudletMap;
10
+ sceneRef: {
11
+ current: SceneHandle | null;
12
+ };
13
+ }
14
+ export declare function RoomPanel({ selection, room, map, sceneRef }: RoomPanelProps): import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1 @@
1
+ export declare function SessionsPanel(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import type { SceneHandle } from '../editor/scene';
2
+ import type { SidebarTab } from '../editor/plugin';
3
+ interface SidePanelProps {
4
+ sceneRef: {
5
+ current: SceneHandle | null;
6
+ };
7
+ extraTabs?: SidebarTab[];
8
+ }
9
+ export declare function SidePanel({ sceneRef, extraTabs }: SidePanelProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { SceneHandle } from '../editor/scene';
2
+ export declare function SwatchPalette({ sceneRef }: {
3
+ sceneRef: {
4
+ current: SceneHandle | null;
5
+ };
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ export declare function Toolbar({ title, onHelpClick, onLoadFromUrl, onSave }: {
2
+ title?: string;
3
+ onHelpClick: () => void;
4
+ onLoadFromUrl: () => void;
5
+ onSave?: (bytes: Uint8Array) => void;
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare function UrlLoadModal({ onClose, initialUrl }: {
2
+ onClose: () => void;
3
+ initialUrl?: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ export declare function DoorIcon(): import("react/jsx-runtime").JSX.Element;
2
+ export declare function LockIcon({ locked }: {
3
+ locked: boolean;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ export declare function WeightIcon(): import("react/jsx-runtime").JSX.Element;
6
+ export declare function CenterOnRoomIcon(): import("react/jsx-runtime").JSX.Element;
7
+ export declare function CrosshairIcon(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,27 @@
1
+ import type { MudletColor } from '../mapIO';
2
+ export declare function RoomLink({ id, name, className }: {
3
+ id: number;
4
+ name?: string | null;
5
+ className?: string;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ export declare function Field({ label, children, as: Tag }: {
8
+ label: string;
9
+ children: React.ReactNode;
10
+ as?: 'label' | 'div';
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ export declare function CheckboxField({ checked, onChange, description }: {
13
+ checked: boolean;
14
+ onChange: (checked: boolean) => void;
15
+ description: string;
16
+ }): import("react/jsx-runtime").JSX.Element;
17
+ export declare function ToolHint({ activeTool }: {
18
+ activeTool: string;
19
+ }): import("react/jsx-runtime").JSX.Element;
20
+ interface UserDataEditorProps {
21
+ data: Record<string, string> | undefined;
22
+ onCommit: (key: string, from: string | null, to: string | null) => void;
23
+ }
24
+ export declare function UserDataEditor({ data, onCommit }: UserDataEditorProps): import("react/jsx-runtime").JSX.Element;
25
+ export declare function mudletColorToHex(c: MudletColor): string;
26
+ export declare function hexToMudletColor(hex: string): MudletColor;
27
+ export {};
@@ -0,0 +1,20 @@
1
+ import type { PendingCustomLine } from '../../editor/types';
2
+ import type { SceneHandle } from '../../editor/scene';
3
+ import type { MudletMap } from '../../mapIO';
4
+ export declare function CustomLineDrawPanel({ pending, sceneRef }: {
5
+ pending: PendingCustomLine;
6
+ sceneRef: {
7
+ current: SceneHandle | null;
8
+ };
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ export declare function CustomLineSelectPanel({ selection, map, sceneRef }: {
11
+ selection: {
12
+ kind: 'customLine';
13
+ roomId: number;
14
+ exitName: string;
15
+ };
16
+ map: MudletMap;
17
+ sceneRef: {
18
+ current: SceneHandle | null;
19
+ };
20
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import type { Direction } from '../../editor/types';
2
+ import type { SceneHandle } from '../../editor/scene';
3
+ import type { MudletMap } from '../../mapIO';
4
+ export declare function ExitPanel({ selection, map, sceneRef }: {
5
+ selection: {
6
+ kind: 'exit';
7
+ fromId: number;
8
+ toId: number;
9
+ dir: Direction;
10
+ };
11
+ map: MudletMap;
12
+ sceneRef: {
13
+ current: SceneHandle | null;
14
+ };
15
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import type { Command } from '../../editor/types';
2
+ import type { SceneHandle } from '../../editor/scene';
3
+ export declare function commandLabel(cmd: Command): string;
4
+ export declare function HistoryPanel({ sceneRef }: {
5
+ sceneRef: {
6
+ current: SceneHandle | null;
7
+ };
8
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import type { SceneHandle } from '../../editor/scene';
2
+ interface LabelPanelProps {
3
+ selection: {
4
+ kind: 'label';
5
+ id: number;
6
+ areaId: number;
7
+ };
8
+ sceneRef: {
9
+ current: SceneHandle | null;
10
+ };
11
+ }
12
+ export declare function LabelPanel({ selection, sceneRef }: LabelPanelProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { SceneHandle } from '../../editor/scene';
2
+ interface MapPanelProps {
3
+ sceneRef: {
4
+ current: SceneHandle | null;
5
+ };
6
+ }
7
+ export declare function MapPanel({ sceneRef }: MapPanelProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,30 @@
1
+ import type { MudletMap } from '../mapIO';
2
+ import type { Command, NeighborEdit } from './types';
3
+ import type { SceneHandle } from './scene';
4
+ /**
5
+ * Apply a command. When a `scene` is provided, mutations go through
6
+ * `scene.reader` so the renderer stays in sync automatically. When it is
7
+ * omitted (tests, etc.) we mutate the raw map directly — the caller is
8
+ * responsible for triggering a rebuild.
9
+ */
10
+ export declare function applyCommand(map: MudletMap, cmd: Command, scene?: SceneHandle | null): {
11
+ structural: boolean;
12
+ };
13
+ export declare function revertCommand(map: MudletMap, cmd: Command, scene?: SceneHandle | null): {
14
+ structural: boolean;
15
+ };
16
+ export declare function pushCommand(cmd: Command, scene?: SceneHandle | null): boolean;
17
+ export declare function pushBatch(cmds: Command[], scene?: SceneHandle | null): boolean;
18
+ export declare function undoOnce(scene?: SceneHandle | null): {
19
+ changed: boolean;
20
+ structural: boolean;
21
+ };
22
+ export declare function redoOnce(scene?: SceneHandle | null): {
23
+ changed: boolean;
24
+ structural: boolean;
25
+ };
26
+ /** Build setCustomLine commands that translate all waypoints of a room's custom lines by (dx, dy) in raw Mudlet space (y-up). */
27
+ export declare function buildCustomLineMoveCommands(map: MudletMap, roomId: number, dx: number, dy: number): Command[];
28
+ export declare function buildDeleteNeighborEdits(map: MudletMap, roomId: number): NeighborEdit[];
29
+ /** O(n) version for batch deletion: one pass over all rooms, results for each deleted id. */
30
+ export declare function buildDeleteNeighborEditsForMany(map: MudletMap, ids: number[]): Map<number, NeighborEdit[]>;
@@ -0,0 +1,6 @@
1
+ import type { MapRenderer } from 'mudlet-map-renderer';
2
+ export declare function snap(value: number, step: number): number;
3
+ export declare function clientToMap(renderer: MapRenderer, container: HTMLElement, clientX: number, clientY: number): {
4
+ x: number;
5
+ y: number;
6
+ };
@@ -0,0 +1,21 @@
1
+ import Konva from 'konva';
2
+ import type { CoordinateTransform, LiveEffect, ViewportBounds } from 'mudlet-map-renderer';
3
+ import type { SceneHandle } from '../scene';
4
+ export declare class ConnectHandlesEffect implements LiveEffect {
5
+ private readonly roomSize;
6
+ private readonly sceneRef;
7
+ private source?;
8
+ private target?;
9
+ private layer?;
10
+ private unsubscribe?;
11
+ constructor(roomSize: number, sceneRef: {
12
+ current: SceneHandle | null;
13
+ });
14
+ attach(layer: Konva.Layer): void;
15
+ updateViewport(_bounds: ViewportBounds, scale: number, _transform: CoordinateTransform): void;
16
+ destroy(): void;
17
+ private buildHandleSet;
18
+ private placeHandles;
19
+ private hide;
20
+ private sync;
21
+ }
@@ -0,0 +1,19 @@
1
+ import Konva from 'konva';
2
+ import type { CoordinateTransform, LiveEffect, ViewportBounds } from 'mudlet-map-renderer';
3
+ import type { SceneHandle } from '../scene';
4
+ /** Draws waypoints + in-progress line while the custom line tool is active. */
5
+ export declare class CustomLinePreviewEffect implements LiveEffect {
6
+ private readonly sceneRef;
7
+ private group?;
8
+ private layer?;
9
+ private unsubscribe?;
10
+ private currentScale;
11
+ constructor(sceneRef: {
12
+ current: SceneHandle | null;
13
+ });
14
+ attach(layer: Konva.Layer): void;
15
+ updateViewport(_bounds: ViewportBounds, scale: number, _transform: CoordinateTransform): void;
16
+ destroy(): void;
17
+ private sync;
18
+ private resolveTargetRoom;
19
+ }
@@ -0,0 +1,27 @@
1
+ import Konva from 'konva';
2
+ import type { CoordinateTransform, LiveEffect, ViewportBounds } from 'mudlet-map-renderer';
3
+ /**
4
+ * Fallback grid drawn on the LiveEffect layer for empty area/z levels where the
5
+ * renderer's own GridRenderer never fires (it returns early when there's no plane).
6
+ * Matches the renderer's grid color, line width, and cell size exactly.
7
+ * Draws subtle x=0 and y=0 axis lines plus a fixed-size (0,0) label at the origin.
8
+ */
9
+ export declare class GridOverlayEffect implements LiveEffect {
10
+ private readonly gridColor;
11
+ private readonly gridLineWidth;
12
+ private readonly gridSize;
13
+ private readonly getIsEmpty;
14
+ private readonly getViewportBounds;
15
+ private gridShape?;
16
+ private axisShape?;
17
+ private labelShape?;
18
+ private layer?;
19
+ private bounds;
20
+ private scale;
21
+ private unsubscribe?;
22
+ constructor(gridColor: string, gridLineWidth: number, gridSize: number, getIsEmpty: () => boolean, getViewportBounds: () => ViewportBounds);
23
+ attach(layer: Konva.Layer): void;
24
+ updateViewport(bounds: ViewportBounds, scale: number, _transform: CoordinateTransform): void;
25
+ destroy(): void;
26
+ syncVisibility(): void;
27
+ }
@@ -0,0 +1,19 @@
1
+ import Konva from 'konva';
2
+ import type { CoordinateTransform, LiveEffect, ViewportBounds } from 'mudlet-map-renderer';
3
+ import type { SceneHandle } from '../scene';
4
+ export declare class HoverHaloEffect implements LiveEffect {
5
+ private readonly roomSize;
6
+ private readonly sceneRef;
7
+ private roomRect?;
8
+ private linkGroup?;
9
+ private layer?;
10
+ private unsubscribe?;
11
+ private currentScale;
12
+ constructor(roomSize: number, sceneRef: {
13
+ current: SceneHandle | null;
14
+ });
15
+ attach(layer: Konva.Layer): void;
16
+ updateViewport(_bounds: ViewportBounds, scale: number, _transform: CoordinateTransform): void;
17
+ destroy(): void;
18
+ private sync;
19
+ }
@@ -0,0 +1,25 @@
1
+ import Konva from 'konva';
2
+ import type { CoordinateTransform, LiveEffect, ViewportBounds } from 'mudlet-map-renderer';
3
+ import type { SceneHandle } from '../scene';
4
+ export declare class LabelHaloEffect implements LiveEffect {
5
+ private readonly sceneRef;
6
+ private selRect?;
7
+ private hoverRect?;
8
+ private previewRect?;
9
+ private handles;
10
+ private layer?;
11
+ private unsubscribe?;
12
+ private strokeWidth;
13
+ private handleSize;
14
+ constructor(sceneRef: {
15
+ current: SceneHandle | null;
16
+ });
17
+ attach(layer: Konva.Layer): void;
18
+ updateViewport(_bounds: ViewportBounds, scale: number, _transform: CoordinateTransform): void;
19
+ syncPositions(): void;
20
+ destroy(): void;
21
+ private getLabelBounds;
22
+ private applyBounds;
23
+ private updateHandles;
24
+ private sync;
25
+ }
@@ -0,0 +1,11 @@
1
+ import Konva from 'konva';
2
+ import type { CoordinateTransform, LiveEffect, ViewportBounds } from 'mudlet-map-renderer';
3
+ export declare class MarqueeEffect implements LiveEffect {
4
+ private rect?;
5
+ private layer?;
6
+ private unsubscribe?;
7
+ attach(layer: Konva.Layer): void;
8
+ updateViewport(_bounds: ViewportBounds, scale: number, _transform: CoordinateTransform): void;
9
+ destroy(): void;
10
+ private sync;
11
+ }
@@ -0,0 +1,17 @@
1
+ import Konva from 'konva';
2
+ import type { CoordinateTransform, LiveEffect, ViewportBounds } from 'mudlet-map-renderer';
3
+ import type { SceneHandle } from '../scene';
4
+ export declare class RubberBandEffect implements LiveEffect {
5
+ private readonly sceneRef;
6
+ private line?;
7
+ private dirLabel?;
8
+ private layer?;
9
+ private unsubscribe?;
10
+ constructor(sceneRef: {
11
+ current: SceneHandle | null;
12
+ });
13
+ attach(layer: Konva.Layer): void;
14
+ updateViewport(_bounds: ViewportBounds, scale: number, _transform: CoordinateTransform): void;
15
+ destroy(): void;
16
+ private sync;
17
+ }
@@ -0,0 +1,17 @@
1
+ import Konva from 'konva';
2
+ import type { CoordinateTransform, LiveEffect, ViewportBounds } from 'mudlet-map-renderer';
3
+ import type { SceneHandle } from '../scene';
4
+ /** Highlights the currently selected exit line or custom line. */
5
+ export declare class SelectedLinkEffect implements LiveEffect {
6
+ private readonly sceneRef;
7
+ private group?;
8
+ private layer?;
9
+ private unsubscribe?;
10
+ constructor(sceneRef: {
11
+ current: SceneHandle | null;
12
+ }, _roomSize: number);
13
+ attach(layer: Konva.Layer): void;
14
+ updateViewport(_bounds: ViewportBounds, scale: number, _transform: CoordinateTransform): void;
15
+ destroy(): void;
16
+ private sync;
17
+ }
@@ -0,0 +1,20 @@
1
+ import Konva from 'konva';
2
+ import type { CoordinateTransform, LiveEffect, ViewportBounds } from 'mudlet-map-renderer';
3
+ import type { SceneHandle } from '../scene';
4
+ export declare class SelectionHaloEffect implements LiveEffect {
5
+ private readonly roomSize;
6
+ private readonly sceneRef;
7
+ private rects;
8
+ private layer?;
9
+ private unsubscribe?;
10
+ private strokeWidth;
11
+ private dash;
12
+ constructor(roomSize: number, sceneRef: {
13
+ current: SceneHandle | null;
14
+ });
15
+ attach(layer: Konva.Layer): void;
16
+ updateViewport(_bounds: ViewportBounds, scale: number, _transform: CoordinateTransform): void;
17
+ syncPositions(): void;
18
+ destroy(): void;
19
+ private sync;
20
+ }
@@ -0,0 +1,14 @@
1
+ import Konva from 'konva';
2
+ import type { CoordinateTransform, LiveEffect, ViewportBounds } from 'mudlet-map-renderer';
3
+ /** Room silhouette preview at the snapped cell — used for Add Room. */
4
+ export declare class SnapIndicatorEffect implements LiveEffect {
5
+ private readonly roomSize;
6
+ private rect?;
7
+ private layer?;
8
+ private unsubscribe?;
9
+ constructor(roomSize: number);
10
+ attach(layer: Konva.Layer): void;
11
+ updateViewport(_bounds: ViewportBounds, scale: number, _transform: CoordinateTransform): void;
12
+ destroy(): void;
13
+ private sync;
14
+ }