mudlet-map-editor 0.15.0 → 0.16.1
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/dist-lib/components/FontPicker.d.ts +2 -1
- package/dist-lib/components/HelpModal.d.ts +11 -0
- package/dist-lib/components/LanguageSwitcher.d.ts +1 -0
- package/dist-lib/components/panels/HistoryPanel.d.ts +3 -1
- package/dist-lib/editor/store.d.ts +1 -1
- package/dist-lib/i18n/index.d.ts +8 -0
- package/dist-lib/i18n/locales/areas.en.d.ts +22 -0
- package/dist-lib/i18n/locales/areas.pl.d.ts +2 -0
- package/dist-lib/i18n/locales/context.en.d.ts +49 -0
- package/dist-lib/i18n/locales/context.pl.d.ts +2 -0
- package/dist-lib/i18n/locales/en.d.ts +128 -0
- package/dist-lib/i18n/locales/envs.en.d.ts +22 -0
- package/dist-lib/i18n/locales/envs.pl.d.ts +2 -0
- package/dist-lib/i18n/locales/modals.en.d.ts +37 -0
- package/dist-lib/i18n/locales/modals.pl.d.ts +2 -0
- package/dist-lib/i18n/locales/panels.en.d.ts +336 -0
- package/dist-lib/i18n/locales/panels.pl.d.ts +2 -0
- package/dist-lib/i18n/locales/pl.d.ts +2 -0
- package/dist-lib/i18n/locales/search.en.d.ts +15 -0
- package/dist-lib/i18n/locales/search.pl.d.ts +2 -0
- package/dist-lib/i18n/locales/sessions.en.d.ts +15 -0
- package/dist-lib/i18n/locales/sessions.pl.d.ts +2 -0
- package/dist-lib/i18n/locales/swatches.en.d.ts +21 -0
- package/dist-lib/i18n/locales/swatches.pl.d.ts +2 -0
- package/dist-lib/index.d.ts +3 -0
- package/dist-lib/index.js +5445 -4023
- package/dist-lib/styles.css +1 -1
- package/package.json +4 -2
|
@@ -2,6 +2,7 @@ interface Props {
|
|
|
2
2
|
value: string;
|
|
3
3
|
options: string[];
|
|
4
4
|
onChange: (family: string) => void;
|
|
5
|
+
searchPlaceholder?: string;
|
|
5
6
|
}
|
|
6
|
-
export declare function FontPicker({ value, options, onChange }: Props): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function FontPicker({ value, options, onChange, searchPlaceholder }: Props): import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export {};
|
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
import type { ToolId } from '../editor/types';
|
|
2
|
+
export declare const TOOL_BUTTON_META: {
|
|
3
|
+
id: ToolId;
|
|
4
|
+
key: string;
|
|
5
|
+
}[];
|
|
6
|
+
/** Static English fallbacks — used by Toolbar before React renders */
|
|
2
7
|
export declare const TOOL_BUTTONS: {
|
|
3
8
|
id: ToolId;
|
|
4
9
|
label: string;
|
|
5
10
|
hint: string;
|
|
6
11
|
key: string;
|
|
7
12
|
}[];
|
|
13
|
+
export declare function useToolButtons(): {
|
|
14
|
+
id: ToolId;
|
|
15
|
+
key: string;
|
|
16
|
+
label: string;
|
|
17
|
+
hint: string;
|
|
18
|
+
}[];
|
|
8
19
|
export declare function HelpModal({ onClose }: {
|
|
9
20
|
onClose: () => void;
|
|
10
21
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function LanguageSwitcher(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { Command } from '../../editor/types';
|
|
2
2
|
import type { SceneHandle } from '../../editor/scene';
|
|
3
|
-
|
|
3
|
+
type CmdT = (key: string, opts?: Record<string, unknown>) => string;
|
|
4
|
+
export declare function commandLabel(cmd: Command, t: CmdT): string;
|
|
4
5
|
export declare function HistoryPanel({ sceneRef }: {
|
|
5
6
|
sceneRef: {
|
|
6
7
|
current: SceneHandle | null;
|
|
7
8
|
};
|
|
8
9
|
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -41,7 +41,7 @@ export interface EditorState {
|
|
|
41
41
|
spaceHeld: boolean;
|
|
42
42
|
undo: Command[];
|
|
43
43
|
redo: Command[];
|
|
44
|
-
status: string;
|
|
44
|
+
status: string | null;
|
|
45
45
|
/** Bumped on structural changes (room added/removed, area/z changed) that need a full rebuild. */
|
|
46
46
|
structureVersion: number;
|
|
47
47
|
/** Bumped on every mutation (coord, exits, props) to trigger React re-renders of panels. */
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import i18n from 'i18next';
|
|
2
|
+
import type { EditorLocale } from './locales/en';
|
|
3
|
+
export { type EditorLocale };
|
|
4
|
+
/** Register translations for a plugin namespace. Call before the app mounts. */
|
|
5
|
+
export declare function addTranslations(lng: string, ns: string, resources: object): void;
|
|
6
|
+
export declare function changeLanguage(lng: string): void;
|
|
7
|
+
export declare function getCurrentLanguage(): string;
|
|
8
|
+
export default i18n;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const areasEn: {
|
|
2
|
+
readonly noMap: "No map loaded.";
|
|
3
|
+
readonly noAreas: "No areas.";
|
|
4
|
+
readonly newAreaPlaceholder: "New area name…";
|
|
5
|
+
readonly add: "Add";
|
|
6
|
+
readonly rename: "Rename";
|
|
7
|
+
readonly editUserData: "Edit user data";
|
|
8
|
+
readonly deleteArea: "Delete area";
|
|
9
|
+
readonly doubleClickToRename: "Double-click to rename";
|
|
10
|
+
readonly hasRooms: "{{name}} has {{count}} room(s). Choose:";
|
|
11
|
+
readonly deleteAllRooms: "Delete all rooms & area";
|
|
12
|
+
readonly moveRoomsTo: "Move rooms to…";
|
|
13
|
+
readonly moveAndDelete: "Move & delete";
|
|
14
|
+
readonly cancelDelete: "Cancel";
|
|
15
|
+
readonly added: "Area '{{name}}' added (ID {{id}})";
|
|
16
|
+
readonly deleted: "Area '{{name}}' and {{count}} rooms deleted";
|
|
17
|
+
readonly renamed: "Renamed area to '{{name}}'";
|
|
18
|
+
readonly moved: "Moved {{count}} rooms to area #{{targetId}}, deleted '{{name}}'";
|
|
19
|
+
};
|
|
20
|
+
export type AreasLocale = {
|
|
21
|
+
[K in keyof typeof areasEn]: string;
|
|
22
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export declare const contextEn: {
|
|
2
|
+
readonly menu: {
|
|
3
|
+
readonly select: "Select";
|
|
4
|
+
readonly deleteWaypoint: "Delete waypoint";
|
|
5
|
+
readonly moveTo: "Move to…";
|
|
6
|
+
readonly deleteRoom: "Delete room";
|
|
7
|
+
readonly deleteRooms: "Delete {{count}} rooms";
|
|
8
|
+
readonly deleteLabel: "Delete label";
|
|
9
|
+
readonly spread: "Spread…";
|
|
10
|
+
readonly shrink: "Shrink…";
|
|
11
|
+
readonly back: "Back";
|
|
12
|
+
readonly move: "Move";
|
|
13
|
+
readonly area: "Area";
|
|
14
|
+
readonly roomTitle: "Room {{id}}";
|
|
15
|
+
readonly roomsTitle: "{{count}} rooms";
|
|
16
|
+
readonly labelTitle: "Label {{id}}";
|
|
17
|
+
readonly moveRoomTo: "Move room {{id}} to";
|
|
18
|
+
readonly moveRoomsTo: "Move {{count}} rooms to";
|
|
19
|
+
readonly moveLabelTo: "Move label {{id}} to";
|
|
20
|
+
readonly removedExit: "Removed exit {{from}} → {{to}}";
|
|
21
|
+
readonly removedWaypoint: "Removed waypoint from '{{exit}}' on room {{id}}";
|
|
22
|
+
readonly deletedLabel: "Deleted label {{id}}";
|
|
23
|
+
readonly movedLabel: "Moved label {{id}} to ({{x}}, {{y}}, {{z}})";
|
|
24
|
+
readonly movedRoom: "Moved room {{id}} to area {{areaId}} ({{x}}, {{y}}, {{z}})";
|
|
25
|
+
readonly movedRooms: "Moved {{count}} rooms to area {{areaId}} ({{x}}, {{y}}, {{z}})";
|
|
26
|
+
readonly deletedRoom: "Deleted room {{id}}";
|
|
27
|
+
readonly deletedRooms: "Deleted {{count}} rooms";
|
|
28
|
+
};
|
|
29
|
+
readonly spread: {
|
|
30
|
+
readonly spreadTitle: "Spread {{count}} rooms";
|
|
31
|
+
readonly shrinkTitle: "Shrink {{count}} rooms";
|
|
32
|
+
readonly spread: "Spread";
|
|
33
|
+
readonly shrink: "Shrink";
|
|
34
|
+
readonly centroid: "Centroid";
|
|
35
|
+
readonly anchor: "Anchor";
|
|
36
|
+
readonly rightClickAnchor: "Right-click a room to set anchor";
|
|
37
|
+
readonly anchorRoom: "Anchor: room {{id}}";
|
|
38
|
+
readonly scaleFactor: "Scale factor";
|
|
39
|
+
readonly cancel: "Cancel";
|
|
40
|
+
readonly apply: "Apply";
|
|
41
|
+
readonly spreadStatus: "Spread {{count}} rooms (×{{factor}})";
|
|
42
|
+
readonly shrinkStatus: "Shrunk {{count}} rooms (×{{factor}})";
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export type ContextLocale = {
|
|
46
|
+
[K in keyof typeof contextEn]: {
|
|
47
|
+
[K2 in keyof typeof contextEn[K]]: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
export declare const en: {
|
|
2
|
+
readonly toolbar: {
|
|
3
|
+
readonly newMap: "New Map";
|
|
4
|
+
readonly loadDat: "Load .dat";
|
|
5
|
+
readonly loadFromUrl: "Load .dat from URL";
|
|
6
|
+
readonly saveDat: "Save .dat";
|
|
7
|
+
readonly area: "Area";
|
|
8
|
+
readonly level: "Level";
|
|
9
|
+
readonly room: "Room";
|
|
10
|
+
readonly go: "Go";
|
|
11
|
+
readonly goToRoomTitle: "Go to room by ID";
|
|
12
|
+
readonly fitTitle: "Fit area to view (F)";
|
|
13
|
+
readonly fit: "Fit";
|
|
14
|
+
readonly search: "Search";
|
|
15
|
+
readonly searchTitle: "Search rooms and labels ({{modKey}}+F)";
|
|
16
|
+
readonly rendererSettings: "Renderer settings";
|
|
17
|
+
readonly helpTitle: "Help (keyboard shortcuts)";
|
|
18
|
+
readonly snapTitle: "Snap to grid (G)";
|
|
19
|
+
readonly snap: "Snap";
|
|
20
|
+
readonly undo: "↶ Undo";
|
|
21
|
+
readonly undoTitle: "Undo ({{modKey}}+Z)";
|
|
22
|
+
readonly redo: "↷ Redo";
|
|
23
|
+
readonly redoTitle: "Redo ({{modKey}}+Shift+Z)";
|
|
24
|
+
readonly swatches: "Swatches";
|
|
25
|
+
readonly swatchesTitle: "Room swatches palette";
|
|
26
|
+
};
|
|
27
|
+
readonly status: {
|
|
28
|
+
readonly initialStatus: "Load a Mudlet .dat file to begin.";
|
|
29
|
+
readonly roomNotFound: "Room #{{id}} not found";
|
|
30
|
+
readonly newMapCreated: "New map created · 0 rooms · 1 area";
|
|
31
|
+
readonly saved: "Saved {{filename}}";
|
|
32
|
+
readonly saveFailed: "Save failed: {{error}}";
|
|
33
|
+
readonly cancelled: "Cancelled.";
|
|
34
|
+
readonly undone: "Undone";
|
|
35
|
+
readonly redone: "Redone";
|
|
36
|
+
readonly movedLabel: "Moved label {{id}}";
|
|
37
|
+
readonly movedRoom: "Moved room {{id}} → ({{x}}, {{y}}, {{z}})";
|
|
38
|
+
readonly movedRooms: "Moved {{count}} rooms";
|
|
39
|
+
readonly deletedRoom: "Deleted room {{id}}";
|
|
40
|
+
readonly deletedRooms: "Deleted {{count}} rooms";
|
|
41
|
+
readonly removedExit: "Removed exit {{from}} → {{to}}";
|
|
42
|
+
readonly removedStub: "Removed stub {{dir}} on room {{id}}";
|
|
43
|
+
readonly removedWaypoint: "Removed waypoint from '{{exit}}' on room {{id}}";
|
|
44
|
+
readonly removedCustomLine: "Removed custom line '{{exit}}'";
|
|
45
|
+
readonly deletedLabel: "Deleted label {{id}}";
|
|
46
|
+
readonly copied: "Copied {{count}} rooms";
|
|
47
|
+
readonly pasted: "Pasted {{count}} rooms";
|
|
48
|
+
readonly duplicated: "Duplicated {{count}} rooms";
|
|
49
|
+
readonly externalExitsStubbed: "{{count}} external exit(s) → stub";
|
|
50
|
+
readonly specialExitsDropped: "{{count}} special exit(s) dropped";
|
|
51
|
+
};
|
|
52
|
+
readonly hints: {
|
|
53
|
+
readonly marquee: "Hold Ctrl to toggle selection";
|
|
54
|
+
readonly connect: "Pick target · Shift = one-way · Esc cancels";
|
|
55
|
+
readonly customLine: "Click to add waypoints · right-click or Enter to finish · Esc cancels";
|
|
56
|
+
readonly select: "Click to select · Shift+click/drag to add · Ctrl+click/drag to toggle · drag selected rooms to move · MMB or Space to pan";
|
|
57
|
+
readonly unlink: "Click a room to remove all its exits · click an exit or custom line to remove just that one";
|
|
58
|
+
readonly addRoom: "Click an empty grid cell to place a room · {{modKey}}+click to place without selecting";
|
|
59
|
+
readonly addLabel: "Click to place a label · select to move/edit · Delete to remove";
|
|
60
|
+
readonly paintDrag: "Drag to paint multiple rooms · release to commit";
|
|
61
|
+
readonly paintActive: "Painting \"{{name}}\" (env {{env}}{{symbol}}) · click or drag rooms";
|
|
62
|
+
readonly paintNoSwatch: "No swatch selected — open Swatches palette and pick one";
|
|
63
|
+
readonly pickSwatch: "Click a room to copy its symbol & room color · Esc to cancel";
|
|
64
|
+
};
|
|
65
|
+
readonly tools: {
|
|
66
|
+
readonly select: {
|
|
67
|
+
readonly label: "Select";
|
|
68
|
+
readonly hint: "Click to select · Shift+click/drag to add · Ctrl+click/drag to toggle · drag to move (snaps to grid) · arrow keys nudge · MMB or Space to pan.";
|
|
69
|
+
};
|
|
70
|
+
readonly connect: {
|
|
71
|
+
readonly label: "Connect";
|
|
72
|
+
readonly hint: "Click source, then target. Shift = one-way.";
|
|
73
|
+
};
|
|
74
|
+
readonly unlink: {
|
|
75
|
+
readonly label: "Unlink";
|
|
76
|
+
readonly hint: "Click a room to remove all its exits. Click an exit/custom line to remove just that one.";
|
|
77
|
+
};
|
|
78
|
+
readonly addRoom: {
|
|
79
|
+
readonly label: "Add Room";
|
|
80
|
+
readonly hint: "Click empty cell to create a room. {{modKey}}+click to place without selecting.";
|
|
81
|
+
};
|
|
82
|
+
readonly addLabel: {
|
|
83
|
+
readonly label: "Add Label";
|
|
84
|
+
readonly hint: "Click to place a text label. Select to move/edit, Delete to remove.";
|
|
85
|
+
};
|
|
86
|
+
readonly delete: {
|
|
87
|
+
readonly label: "Delete";
|
|
88
|
+
readonly hint: "Click a room to delete it, or an exit/custom line/label to remove it.";
|
|
89
|
+
};
|
|
90
|
+
readonly pan: {
|
|
91
|
+
readonly label: "Pan";
|
|
92
|
+
readonly hint: "Drag background to pan. Hold Space with any tool for temporary pan.";
|
|
93
|
+
};
|
|
94
|
+
readonly paint: {
|
|
95
|
+
readonly label: "Paint";
|
|
96
|
+
readonly hint: "Click or drag rooms to apply the active room swatch (symbol + room color). Select a swatch in the Swatches palette first.";
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
readonly help: {
|
|
100
|
+
readonly title: "Mudlet Map Editor — Help";
|
|
101
|
+
readonly description: "Browser-based editor for Mudlet .dat map files. Load a map, navigate areas and z-levels, then use the tools below to build or modify rooms, exits, custom lines, and labels. Changes are auto-saved to your browser session. Export with Save when ready.";
|
|
102
|
+
readonly toolsSection: "Tools";
|
|
103
|
+
readonly shortcutsSection: "Keyboard shortcuts";
|
|
104
|
+
readonly close: "Close";
|
|
105
|
+
readonly shortcuts: {
|
|
106
|
+
readonly switchTool: "Switch tool";
|
|
107
|
+
readonly tempPan: "Hold to pan temporarily (any tool)";
|
|
108
|
+
readonly snapGrid: "Toggle snap to grid";
|
|
109
|
+
readonly fitView: "Fit area to view";
|
|
110
|
+
readonly search: "Open / close search (rooms, labels)";
|
|
111
|
+
readonly selectAll: "Select all rooms on current level";
|
|
112
|
+
readonly copy: "Copy selected rooms";
|
|
113
|
+
readonly paste: "Paste rooms at cursor (external exits become stubs)";
|
|
114
|
+
readonly duplicate: "Duplicate selected rooms with offset";
|
|
115
|
+
readonly delete: "Delete selection";
|
|
116
|
+
readonly nudge: "Nudge selected room (Shift = ×5)";
|
|
117
|
+
readonly undo: "Undo";
|
|
118
|
+
readonly redo: "Redo";
|
|
119
|
+
readonly finishLine: "Finish custom line";
|
|
120
|
+
readonly cancel: "Cancel / deselect";
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
type StringValues<T> = {
|
|
125
|
+
[K in keyof T]: T[K] extends string ? string : StringValues<T[K]>;
|
|
126
|
+
};
|
|
127
|
+
export type EditorLocale = StringValues<typeof en>;
|
|
128
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const envsEn: {
|
|
2
|
+
readonly noMap: "No map loaded.";
|
|
3
|
+
readonly filterPlaceholder: "Filter ID…";
|
|
4
|
+
readonly addTitle: "Add room color";
|
|
5
|
+
readonly envTitle: "Room color {{id}}";
|
|
6
|
+
readonly noneTitle: "None (−1)";
|
|
7
|
+
readonly noMatch: "No match";
|
|
8
|
+
readonly filterByIdPlaceholder: "Filter by ID…";
|
|
9
|
+
readonly newEnv: "New room color";
|
|
10
|
+
readonly id: "ID";
|
|
11
|
+
readonly color: "Color";
|
|
12
|
+
readonly add: "Add";
|
|
13
|
+
readonly remove: "Remove";
|
|
14
|
+
readonly envIdPlaceholder: "Room color ID";
|
|
15
|
+
readonly reservedIds: "Room color IDs 1–256 are reserved. Use 257 or higher.";
|
|
16
|
+
readonly colorUpdated: "Room color {{id}} updated";
|
|
17
|
+
readonly customColorRemoved: "Custom color for room color {{id}} removed";
|
|
18
|
+
readonly customEnvSet: "Custom room color {{id}} set to {{color}}";
|
|
19
|
+
};
|
|
20
|
+
export type EnvsLocale = {
|
|
21
|
+
[K in keyof typeof envsEn]: string;
|
|
22
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const modalsEn: {
|
|
2
|
+
readonly renderer: {
|
|
3
|
+
readonly title: "Renderer Settings";
|
|
4
|
+
readonly reset: "Reset";
|
|
5
|
+
readonly resetTitle: "Reset all to defaults";
|
|
6
|
+
readonly closeTitle: "Close";
|
|
7
|
+
readonly room: "Room";
|
|
8
|
+
readonly lines: "Lines";
|
|
9
|
+
readonly background: "Background";
|
|
10
|
+
readonly shape: "Shape";
|
|
11
|
+
readonly size: "Size";
|
|
12
|
+
readonly style: "Style";
|
|
13
|
+
readonly width: "Width";
|
|
14
|
+
readonly color: "Color";
|
|
15
|
+
readonly areaName: "Area name";
|
|
16
|
+
readonly showOnMap: "Show on map";
|
|
17
|
+
readonly rectangle: "Rectangle";
|
|
18
|
+
readonly rounded: "Rounded";
|
|
19
|
+
readonly circle: "Circle";
|
|
20
|
+
readonly borders: "Borders";
|
|
21
|
+
readonly frame: "Frame";
|
|
22
|
+
readonly colored: "Colored";
|
|
23
|
+
readonly emboss: "Emboss";
|
|
24
|
+
};
|
|
25
|
+
readonly urlLoad: {
|
|
26
|
+
readonly title: "Load map from URL";
|
|
27
|
+
readonly placeholder: "https://example.com/map.dat";
|
|
28
|
+
readonly loading: "Loading…";
|
|
29
|
+
readonly load: "Load";
|
|
30
|
+
readonly corsNote: "The server must allow cross-origin requests (CORS). If loading fails, download the file and use \"Load .dat\" instead.";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export type ModalsLocale = {
|
|
34
|
+
[K in keyof typeof modalsEn]: {
|
|
35
|
+
[K2 in keyof typeof modalsEn[K]]: string;
|
|
36
|
+
};
|
|
37
|
+
};
|