mudlet-map-editor 0.5.0 → 0.6.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.
@@ -0,0 +1,8 @@
1
+ import type { SceneHandle } from '../editor/scene';
2
+ interface SpreadShrinkPopupProps {
3
+ sceneRef: {
4
+ current: SceneHandle | null;
5
+ };
6
+ }
7
+ export declare function SpreadShrinkPopup({ sceneRef }: SpreadShrinkPopupProps): import("react/jsx-runtime").JSX.Element | null;
8
+ export {};
@@ -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 GhostRoomsEffect 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 computePositions;
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
+ export declare class SelectionCenterEffect implements LiveEffect {
5
+ private readonly sceneRef;
6
+ private hLine?;
7
+ private vLine?;
8
+ private dot?;
9
+ private layer?;
10
+ private unsubscribe?;
11
+ constructor(sceneRef: {
12
+ current: SceneHandle | null;
13
+ });
14
+ attach(layer: Konva.Layer): void;
15
+ updateViewport(_bounds: ViewportBounds, scale: number, _transform: CoordinateTransform): void;
16
+ syncPositions(): void;
17
+ destroy(): void;
18
+ private sync;
19
+ }
@@ -5,6 +5,12 @@ interface UserSettings {
5
5
  }
6
6
  export declare function saveUserSettings(patch: Partial<UserSettings>): void;
7
7
  export declare function saveSwatchState(sets: SwatchSet[], activeSetId: string | null, activeSwatchId: string | null): void;
8
+ export type SpreadShrinkState = {
9
+ mode: 'spread' | 'shrink';
10
+ factor: number;
11
+ centerMode: 'centroid' | 'anchor';
12
+ anchorRoomId: number | null;
13
+ };
8
14
  export interface EditorState {
9
15
  map: MudletMap | null;
10
16
  loaded: LoadedMap | null;
@@ -58,6 +64,7 @@ export interface EditorState {
58
64
  activeSwatchId: string | null;
59
65
  swatchPaletteOpen: boolean;
60
66
  sessionId: string | null;
67
+ spreadShrink: SpreadShrinkState | null;
61
68
  }
62
69
  export type ContextMenuState = {
63
70
  kind: 'customLinePoint';