mudlet-map-editor 0.7.0 → 0.9.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.
@@ -1,8 +1,44 @@
1
1
  import type { SceneHandle } from '../../editor/scene';
2
+ import type { MudletMap } from '../../mapIO';
2
3
  interface MapPanelProps {
3
4
  sceneRef: {
4
5
  current: SceneHandle | null;
5
6
  };
6
7
  }
8
+ type MapWarning = {
9
+ kind: 'zeroSizeLabel';
10
+ labelId: number;
11
+ areaId: number;
12
+ areaName: string;
13
+ z: number;
14
+ text: string;
15
+ x: number;
16
+ y: number;
17
+ } | {
18
+ kind: 'selfLinkRoom';
19
+ roomId: number;
20
+ dirs: string[];
21
+ } | {
22
+ kind: 'orphanRoom';
23
+ roomId: number;
24
+ areaName: string;
25
+ } | {
26
+ kind: 'danglingExit';
27
+ roomId: number;
28
+ dir: string;
29
+ targetId: number;
30
+ areaName: string;
31
+ } | {
32
+ kind: 'duplicateCoord';
33
+ roomIds: number[];
34
+ areaId: number;
35
+ areaName: string;
36
+ x: number;
37
+ y: number;
38
+ z: number;
39
+ };
40
+ export declare function collectWarnings(sceneRef: {
41
+ current: SceneHandle | null;
42
+ }, map: MudletMap): MapWarning[];
7
43
  export declare function MapPanel({ sceneRef }: MapPanelProps): import("react/jsx-runtime").JSX.Element;
8
44
  export {};
@@ -0,0 +1,9 @@
1
+ import 'monaco-editor/esm/vs/basic-languages/javascript/javascript.contribution';
2
+ interface Props {
3
+ value: string;
4
+ onChange(value: string): void;
5
+ onRun(): void;
6
+ minHeight?: string;
7
+ }
8
+ export default function ScriptCodeEditor({ value, onChange, onRun, minHeight }: Props): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,5 @@
1
+ interface Props {
2
+ onClose(): void;
3
+ }
4
+ export declare function ScriptHelpModal({ onClose }: Props): import("react").ReactPortal;
5
+ export {};
@@ -0,0 +1,14 @@
1
+ interface SavedScript {
2
+ code: string;
3
+ savedAt: number;
4
+ }
5
+ type ScriptLibrary = Record<string, SavedScript>;
6
+ interface Props {
7
+ library: ScriptLibrary;
8
+ currentName: string | null;
9
+ onLoad(name: string): void;
10
+ onDelete(name: string): void;
11
+ onClose(): void;
12
+ }
13
+ export declare function ScriptLibraryModal({ library, currentName, onLoad, onDelete, onClose }: Props): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { SceneHandle } from '../../editor/scene';
2
+ interface Props {
3
+ sceneRef: {
4
+ current: SceneHandle | null;
5
+ };
6
+ }
7
+ export declare function ScriptPanel({ sceneRef }: Props): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,14 @@
1
+ import type { Direction } from '../../editor/types';
2
+ import type { SceneHandle } from '../../editor/scene';
3
+ import type { MudletMap } from '../../mapIO';
4
+ export declare function StubPanel({ selection, map, sceneRef }: {
5
+ selection: {
6
+ kind: 'stub';
7
+ roomId: number;
8
+ dir: Direction;
9
+ };
10
+ map: MudletMap;
11
+ sceneRef: {
12
+ current: SceneHandle | null;
13
+ };
14
+ }): import("react/jsx-runtime").JSX.Element;