@mudlet/mudlet-web 0.3.0 → 0.4.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/LICENSE +338 -338
- package/README.md +158 -150
- package/dist-lib/assets/qt-resources/index.d.ts +16 -0
- package/dist-lib/branding.d.ts +1 -1
- package/dist-lib/hooks/useMudSession.d.ts +1 -1
- package/dist-lib/hooks/useOutput.d.ts +3 -1
- package/dist-lib/import/defaultPackages.d.ts +35 -2
- package/dist-lib/import/defaults/generic_mapper/generic_mapper.mpackage +0 -0
- package/dist-lib/import/defaults/gui-drop/gui-drop.mpackage +0 -0
- package/dist-lib/import/defaults/{run-lua-code.mpackage → mudlet-base-ui/mudlet-base-ui.mpackage} +0 -0
- package/dist-lib/import/defaults/mudlet-mapper.xml +13023 -13023
- package/dist-lib/import/defaults/run-lua-code/run-lua-code.mpackage +0 -0
- package/dist-lib/import/packageExport.d.ts +71 -0
- package/dist-lib/import/packageInstaller.d.ts +4 -1
- package/dist-lib/index.js +45910 -39931
- package/dist-lib/logging/SessionLogger.d.ts +66 -1
- package/dist-lib/map/MapStore.d.ts +32 -4
- package/dist-lib/map/mapImageExport.d.ts +1 -1
- package/dist-lib/map/mapZoom.d.ts +71 -0
- package/dist-lib/mud/ItemIdSequence.d.ts +23 -0
- package/dist-lib/mud/MudSession.d.ts +113 -11
- package/dist-lib/mud/PatternEngine.d.ts +6 -1
- package/dist-lib/mud/commandSplit.d.ts +16 -0
- package/dist-lib/mud/connection/LineAssembler.d.ts +56 -0
- package/dist-lib/mud/connection/MudClient.d.ts +136 -19
- package/dist-lib/mud/connection/TelnetNegotiator.d.ts +39 -0
- package/dist-lib/mud/connection/telnetByteTags.d.ts +35 -0
- package/dist-lib/mud/events.d.ts +86 -4
- package/dist-lib/mud/games/bundledGames.d.ts +29 -0
- package/dist-lib/mud/games/gameIcons.d.ts +5 -0
- package/dist-lib/mud/keybindings/KeyEngine.d.ts +9 -2
- package/dist-lib/mud/keybindings/browserReservedKeys.d.ts +5 -1
- package/dist-lib/mud/keybindings/keyEventTarget.d.ts +17 -0
- package/dist-lib/mud/keybindings/qtKeys.d.ts +2 -0
- package/dist-lib/mud/protocol/charLoginFlow.d.ts +68 -0
- package/dist-lib/mud/protocol/charset.d.ts +27 -5
- package/dist-lib/mud/protocol/constants.d.ts +1 -0
- package/dist-lib/mud/protocol/gmcp.d.ts +19 -3
- package/dist-lib/mud/protocol/index.d.ts +1 -1
- package/dist-lib/mud/protocol/msspTls.d.ts +54 -0
- package/dist-lib/mud/protocol/mxp.d.ts +28 -5
- package/dist-lib/mud/protocol/tlsCodes.d.ts +4 -0
- package/dist-lib/mud/replay/ReplayPlayer.d.ts +17 -0
- package/dist-lib/mud/text/Console.d.ts +64 -0
- package/dist-lib/mud/text/FormatState.d.ts +66 -3
- package/dist-lib/mud/text/hyperlinkVisibility.d.ts +35 -0
- package/dist-lib/mud/text/osc8Docs.d.ts +23 -0
- package/dist-lib/mud/text/serverWrap.d.ts +191 -0
- package/dist-lib/mud/timers/TimerEngine.d.ts +43 -12
- package/dist-lib/mud/triggers/TriggerEngine.d.ts +112 -3
- package/dist-lib/scripting/EngineHost.d.ts +56 -3
- package/dist-lib/scripting/IScriptingRuntime.d.ts +22 -0
- package/dist-lib/scripting/MxpFrameManager.d.ts +118 -0
- package/dist-lib/scripting/ScriptingAPI.d.ts +331 -54
- package/dist-lib/scripting/ScriptingEngine.d.ts +181 -24
- package/dist-lib/scripting/http/HttpService.d.ts +51 -1
- package/dist-lib/scripting/lua/LuaRuntime.d.ts +159 -2
- package/dist-lib/scripting/lua/bindings/map.d.ts +0 -12
- package/dist-lib/scripting/lua/utf8Patterns.d.ts +59 -0
- package/dist-lib/storage/index.d.ts +1 -1
- package/dist-lib/storage/persistentStorage.d.ts +10 -0
- package/dist-lib/storage/schema.d.ts +166 -4
- package/dist-lib/styles.css +1 -1
- package/dist-lib/ui/BundledGameGrid.d.ts +21 -0
- package/dist-lib/ui/CharLoginModal.d.ts +5 -1
- package/dist-lib/ui/CommandBar.d.ts +7 -1
- package/dist-lib/ui/ConnectionGrid.d.ts +4 -1
- package/dist-lib/ui/FileBrowserModal.d.ts +1 -0
- package/dist-lib/ui/FilePickerModal.d.ts +3 -3
- package/dist-lib/ui/HelpModal.d.ts +11 -0
- package/dist-lib/ui/LogBrowserModal.d.ts +4 -1
- package/dist-lib/ui/PlayerMarkerPreview.d.ts +20 -0
- package/dist-lib/ui/SettingsModal.d.ts +5 -1
- package/dist-lib/ui/TlsAlertBanner.d.ts +18 -0
- package/dist-lib/ui/TlsCertificateBox.d.ts +20 -0
- package/dist-lib/ui/TlsUpgradeModal.d.ts +16 -0
- package/dist-lib/ui/Toolbar.d.ts +2 -1
- package/dist-lib/ui/VfsPickerModal.d.ts +26 -0
- package/dist-lib/ui/components/FileSourceButton.d.ts +47 -0
- package/dist-lib/ui/components/index.d.ts +1 -0
- package/dist-lib/ui/components/useModalFocus.d.ts +6 -0
- package/dist-lib/ui/helpTopics.d.ts +19 -0
- package/dist-lib/ui/labels/LabelManager.d.ts +32 -0
- package/dist-lib/ui/labels/labelLinks.d.ts +52 -0
- package/dist-lib/ui/layout/ScriptWindow.d.ts +11 -2
- package/dist-lib/ui/markdown.d.ts +10 -1
- package/dist-lib/ui/output/OutputArea.d.ts +11 -1
- package/dist-lib/ui/output/OutputContextMenu.d.ts +3 -1
- package/dist-lib/ui/output/OutputRenderer.d.ts +7 -1
- package/dist-lib/ui/output/OutputSearchBar.d.ts +25 -0
- package/dist-lib/ui/output/StickyOutputPanel.d.ts +5 -1
- package/dist-lib/ui/output/linkNavigation.d.ts +22 -0
- package/dist-lib/ui/output/outputSearch.d.ts +130 -0
- package/dist-lib/ui/search/matcher.d.ts +15 -0
- package/dist-lib/ui/search/useDebounced.d.ts +3 -0
- package/dist-lib/ui/tts/TtsManager.d.ts +3 -0
- package/dist-lib/ui/useCommandHistory.d.ts +4 -2
- package/dist-lib/ui/useOpenProfiles.d.ts +26 -0
- package/dist-lib/ui/video/VideoManager.d.ts +17 -0
- package/dist-lib/ui/windows/WindowManager.d.ts +149 -2
- package/dist-lib/ui/windows/panels/MapPanel.d.ts +4 -1
- package/dist-lib/ui/windows/panels/PackageExportModal.d.ts +18 -0
- package/dist-lib/ui/windows/panels/TextPanel.d.ts +3 -1
- package/dist-lib/ui/windows/types.d.ts +35 -0
- package/dist-lib/utils/describeThrown.d.ts +22 -0
- package/dist-lib/utils/fontLoader.d.ts +5 -0
- package/dist-lib/vfs-sw.js +131 -131
- package/dist-lib/vite.js +22 -0
- package/package.json +97 -93
- package/dist-lib/scripting/lua/mudlet-lua/generic-mapper/generic_mapper.mpackage +0 -0
- package/dist-lib/ui/windows/panels/VfsModulePickerModal.d.ts +0 -8
|
Binary file
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { type SerializeInput } from './mudletXmlExport';
|
|
2
|
+
export interface PackageExportMeta {
|
|
3
|
+
/** Package identity — also the XML filename and the install directory name. */
|
|
4
|
+
name: string;
|
|
5
|
+
author?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
version?: string;
|
|
9
|
+
helpURL?: string;
|
|
10
|
+
dependencies?: string[];
|
|
11
|
+
/** Icon filename as stored under `.mudlet/Icon/`; empty when there's no icon. */
|
|
12
|
+
icon?: string;
|
|
13
|
+
/** ISO-8601 creation stamp. Passed in rather than read from the clock so the
|
|
14
|
+
* builders stay pure and testable. */
|
|
15
|
+
created: string;
|
|
16
|
+
}
|
|
17
|
+
/** Strip characters that are illegal in zip entry / filesystem names. */
|
|
18
|
+
export declare function sanitizePackageName(raw: string, fallback?: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Mudlet's `config.lua`: every key is written even when empty, in the order
|
|
21
|
+
* dlgPackageExporter emits them, with `created` as a plain quoted string.
|
|
22
|
+
*/
|
|
23
|
+
export declare function buildConfigLua(meta: PackageExportMeta): string;
|
|
24
|
+
interface TreeNode {
|
|
25
|
+
id: string;
|
|
26
|
+
parentId: string | null;
|
|
27
|
+
isGroup: boolean;
|
|
28
|
+
}
|
|
29
|
+
/** Every descendant id of `rootId`, excluding the root itself. */
|
|
30
|
+
export declare function descendantIds<T extends TreeNode>(nodes: T[], rootId: string): string[];
|
|
31
|
+
/**
|
|
32
|
+
* Reduce a category's nodes to the selected ones, re-parenting any node whose
|
|
33
|
+
* parent wasn't selected to the top level.
|
|
34
|
+
*
|
|
35
|
+
* Mudlet drops such a node instead: its exporter walks from the roots and never
|
|
36
|
+
* reaches a selected child under an unselected group, so checking one trigger
|
|
37
|
+
* inside a folder exports nothing. Re-rooting keeps the item and makes the
|
|
38
|
+
* selection mean what it looks like; a fully-checked subtree serializes
|
|
39
|
+
* identically either way.
|
|
40
|
+
*/
|
|
41
|
+
export declare function selectExportNodes<T extends TreeNode>(nodes: T[], selected: ReadonlySet<string>): T[];
|
|
42
|
+
/** Ids of every category, as the modal tracks them. */
|
|
43
|
+
export interface PackageSelection {
|
|
44
|
+
scripts: ReadonlySet<string>;
|
|
45
|
+
aliases: ReadonlySet<string>;
|
|
46
|
+
triggers: ReadonlySet<string>;
|
|
47
|
+
timers: ReadonlySet<string>;
|
|
48
|
+
keys: ReadonlySet<string>;
|
|
49
|
+
buttons: ReadonlySet<string>;
|
|
50
|
+
}
|
|
51
|
+
/** Apply a selection across all six categories at once. */
|
|
52
|
+
export declare function selectExportInput(all: SerializeInput, selection: PackageSelection): SerializeInput;
|
|
53
|
+
export declare function countSelected(input: SerializeInput): number;
|
|
54
|
+
export interface PackageExportInput {
|
|
55
|
+
meta: PackageExportMeta;
|
|
56
|
+
/** Already filtered through `selectExportInput`. */
|
|
57
|
+
nodes: SerializeInput;
|
|
58
|
+
/** Extra files to carry, keyed by path relative to the package root. */
|
|
59
|
+
assets?: Record<string, Uint8Array>;
|
|
60
|
+
/** Icon bytes; stored at `.mudlet/Icon/<meta.icon>` when `meta.icon` is set. */
|
|
61
|
+
iconBytes?: Uint8Array;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Build the package's file map. `config.lua` and `<name>.xml` are written last
|
|
65
|
+
* and always win: an asset list harvested from an installed package directory
|
|
66
|
+
* contains the *previous* pair, and letting those through would ship stale
|
|
67
|
+
* metadata alongside the freshly serialized items.
|
|
68
|
+
*/
|
|
69
|
+
export declare function buildPackageEntries(input: PackageExportInput): Record<string, Uint8Array>;
|
|
70
|
+
export declare function buildPackageZip(input: PackageExportInput): Uint8Array;
|
|
71
|
+
export {};
|
|
@@ -69,4 +69,7 @@ export declare function reloadModuleFromVfs(manifest: PackageManifest, vfs: Prof
|
|
|
69
69
|
*
|
|
70
70
|
* Throws on read/parse failures.
|
|
71
71
|
*/
|
|
72
|
-
export declare function installModuleFromVfsPath(absolutePath: string, vfs: ProfileVFS
|
|
72
|
+
export declare function installModuleFromVfsPath(absolutePath: string, vfs: ProfileVFS,
|
|
73
|
+
/** Consulted first, so a module under the read-only /lua/ namespace installs
|
|
74
|
+
* as readily as one in the profile — see LuaRuntime.readBuiltinBytes. */
|
|
75
|
+
readBuiltin?: (path: string) => Uint8Array | null): InstallResult;
|