@mudlet/mudlet-web 0.5.0 → 1.0.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/README.md +1 -1
- package/dist-lib/analytics.d.ts +27 -0
- package/dist-lib/assets/fonts/Vera.woff2 +0 -0
- package/dist-lib/assets/fonts/VeraBI.woff2 +0 -0
- package/dist-lib/assets/fonts/VeraBd.woff2 +0 -0
- package/dist-lib/assets/fonts/VeraIt.woff2 +0 -0
- package/dist-lib/assets/mapParser.worker-DrVZ3wg_.js +9 -0
- package/dist-lib/backupImport-wt8r7JXI.js +233 -0
- package/dist-lib/branding.d.ts +111 -13
- package/dist-lib/db/sqliteClient.d.ts +195 -7
- package/dist-lib/hooks/useAutoReconnect.d.ts +61 -0
- package/dist-lib/hooks/useDocumentFullscreen.d.ts +23 -0
- package/dist-lib/hooks/useKeyboardShortcuts.d.ts +37 -0
- package/dist-lib/hooks/useRecordLastPlayed.d.ts +10 -0
- package/dist-lib/import/applyMudletProfile.d.ts +35 -9
- package/dist-lib/import/backupImport.d.ts +118 -0
- package/dist-lib/import/collectProfileExport.d.ts +33 -2
- package/dist-lib/import/defaultPackages.d.ts +57 -14
- package/dist-lib/import/defaults/CF-loader/CF-loader.mpackage +0 -0
- package/dist-lib/import/defaults/MedBootstrap/MedBootstrap.mpackage +0 -0
- package/dist-lib/import/defaults/deleteOldProfiles/deleteOldProfiles.mpackage +0 -0
- package/dist-lib/import/defaults/echo/echo.mpackage +0 -0
- package/dist-lib/import/defaults/enable-accessibility/enable-accessibility.mpackage +0 -0
- 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/icesus-loader/icesus-loader.mpackage +0 -0
- package/dist-lib/import/defaults/mg-loader/mg-loader.mpackage +0 -0
- package/dist-lib/import/defaults/mudlet-base-ui/mudlet-base-ui.mpackage +0 -0
- package/dist-lib/import/defaults/mudlet-mapper.xml +1215 -389
- package/dist-lib/import/mudletControlChars.d.ts +14 -0
- package/dist-lib/import/mudletHost.d.ts +73 -10
- package/dist-lib/import/mudletLink.d.ts +53 -2
- package/dist-lib/import/mudletProfileExport.d.ts +38 -5
- package/dist-lib/import/mudletProfileImport.d.ts +110 -12
- package/dist-lib/import/mudletVariables.d.ts +4 -3
- package/dist-lib/import/mudletWriteback.d.ts +15 -1
- package/dist-lib/import/mudletXmlImport.d.ts +46 -0
- package/dist-lib/import/packageFonts.d.ts +33 -0
- package/dist-lib/import/packageInstaller.d.ts +111 -7
- package/dist-lib/import/qtProfileData.d.ts +10 -0
- package/dist-lib/import/remotePackageInstall.d.ts +23 -7
- package/dist-lib/import/zipEntries.d.ts +45 -0
- package/dist-lib/index.d.ts +7 -3
- package/dist-lib/index.js +50508 -29836
- package/dist-lib/logging/SessionLogger.d.ts +75 -15
- package/dist-lib/map/MapSelectionOverlay.d.ts +2 -2
- package/dist-lib/map/MapStore.d.ts +387 -60
- package/dist-lib/map/MudletHighlightOverlay.d.ts +2 -2
- package/dist-lib/map/{MudixMapReader.d.ts → MudletMapReader.d.ts} +2 -2
- package/dist-lib/map/areaGraph.d.ts +120 -0
- package/dist-lib/map/environmentKit.d.ts +36 -0
- package/dist-lib/map/labelPixmap.d.ts +90 -0
- package/dist-lib/map/mapImageExport.d.ts +36 -2
- package/dist-lib/map/mapStyle.d.ts +11 -0
- package/dist-lib/map/mapVersion.d.ts +66 -0
- package/dist-lib/map/pathfinding.d.ts +2 -2
- package/dist-lib/mud/CharLoginController.d.ts +230 -0
- package/dist-lib/mud/ItemIdSequence.d.ts +1 -1
- package/dist-lib/mud/MudSession.d.ts +279 -22
- package/dist-lib/mud/PatternEngine.d.ts +153 -14
- package/dist-lib/mud/aliases/AliasEngine.d.ts +55 -9
- package/dist-lib/mud/autoLogin.d.ts +59 -0
- package/dist-lib/mud/commandSplit.d.ts +9 -0
- package/dist-lib/mud/connection/LineAssembler.d.ts +38 -11
- package/dist-lib/mud/connection/MudClient.d.ts +291 -53
- package/dist-lib/mud/connection/SubnegotiationRepair.d.ts +24 -0
- package/dist-lib/mud/connection/TelnetNegotiator.d.ts +208 -68
- package/dist-lib/mud/connection/telnetDebug.d.ts +8 -8
- package/dist-lib/mud/events.d.ts +102 -23
- package/dist-lib/mud/games/bundledGames.d.ts +12 -7
- package/dist-lib/mud/games/gameLinks.d.ts +40 -0
- package/dist-lib/mud/games/icons/3Kingdoms.png +0 -0
- package/dist-lib/mud/games/icons/3Scapes.png +0 -0
- package/dist-lib/mud/games/icons/achaea.png +0 -0
- package/dist-lib/mud/games/icons/aetolia.png +0 -0
- package/dist-lib/mud/games/icons/banner_astaria.png +0 -0
- package/dist-lib/mud/games/icons/banner_darkmists.png +0 -0
- package/dist-lib/mud/games/icons/banner_dreamland.png +0 -0
- package/dist-lib/mud/games/icons/banner_petria.jpg +0 -0
- package/dist-lib/mud/games/icons/banner_ropmud.png +0 -0
- package/dist-lib/mud/games/icons/blackmud.png +0 -0
- package/dist-lib/mud/games/icons/carrionfields.png +0 -0
- package/dist-lib/mud/games/icons/dragonfire_icon.png +0 -0
- package/dist-lib/mud/games/icons/fed2-logo.png +0 -0
- package/dist-lib/mud/games/icons/icesus_480x120.png +0 -0
- package/dist-lib/mud/games/icons/imperian.png +0 -0
- package/dist-lib/mud/games/icons/infinity_480x120.png +0 -0
- package/dist-lib/mud/games/icons/lusternia.png +0 -0
- package/dist-lib/mud/games/icons/morgengrauen_480x120.png +0 -0
- package/dist-lib/mud/games/icons/mudlet-tutorial.png +0 -0
- package/dist-lib/mud/games/icons/phoenixmud_480x120.png +0 -0
- package/dist-lib/mud/games/icons/starmourn.png +0 -0
- package/dist-lib/mud/games/icons/voidmud_icon.png +0 -0
- package/dist-lib/mud/games/icons/wotmudicon.png +0 -0
- package/dist-lib/mud/games/websiteLinks.d.ts +21 -0
- package/dist-lib/mud/keybindings/KeyEngine.d.ts +110 -4
- package/dist-lib/mud/keybindings/browserReservedKeys.d.ts +2 -2
- package/dist-lib/mud/keybindings/keyEventTarget.d.ts +61 -0
- package/dist-lib/mud/keybindings/qtKeys.d.ts +91 -12
- package/dist-lib/mud/protocol/atcp.d.ts +19 -0
- package/dist-lib/mud/protocol/byteString.d.ts +24 -0
- package/dist-lib/mud/protocol/charLoginFlow.d.ts +243 -16
- package/dist-lib/mud/protocol/charset.d.ts +111 -46
- package/dist-lib/mud/protocol/codePages.d.ts +10 -0
- package/dist-lib/mud/protocol/constants.d.ts +17 -10
- package/dist-lib/mud/protocol/echo.d.ts +23 -27
- package/dist-lib/mud/protocol/gmcp.d.ts +36 -6
- package/dist-lib/mud/protocol/index.d.ts +3 -2
- package/dist-lib/mud/protocol/luaLiteral.d.ts +12 -0
- package/dist-lib/mud/protocol/mccp.d.ts +83 -1
- package/dist-lib/mud/protocol/mnes.d.ts +41 -58
- package/dist-lib/mud/protocol/msdp.d.ts +11 -4
- package/dist-lib/mud/protocol/msp.d.ts +3 -2
- package/dist-lib/mud/protocol/mssp.d.ts +9 -4
- package/dist-lib/mud/protocol/multiByte.d.ts +51 -0
- package/dist-lib/mud/protocol/multiByteEncode.d.ts +42 -0
- package/dist-lib/mud/protocol/mxp.d.ts +193 -14
- package/dist-lib/mud/protocol/oauthClientFlow.d.ts +128 -0
- package/dist-lib/mud/protocol/qtCodePages.generated.d.ts +1 -0
- package/dist-lib/mud/protocol/tlsCodes.d.ts +40 -3
- package/dist-lib/mud/replay/ReplayPlayer.d.ts +16 -1
- package/dist-lib/mud/replay/replayFormat.d.ts +29 -2
- package/dist-lib/mud/text/Console.d.ts +255 -49
- package/dist-lib/mud/text/FormatState.d.ts +137 -14
- package/dist-lib/mud/text/ansiEscapes.d.ts +32 -16
- package/dist-lib/mud/text/colorParsers.d.ts +14 -2
- package/dist-lib/mud/text/colorSpaceId.d.ts +2 -0
- package/dist-lib/mud/text/colors.d.ts +17 -10
- package/dist-lib/mud/text/controlCharacterMode.d.ts +1 -1
- package/dist-lib/mud/text/hyperlinkVisibility.d.ts +1 -1
- package/dist-lib/mud/text/lineBreak.d.ts +5 -0
- package/dist-lib/mud/text/serverWrap.d.ts +2 -2
- package/dist-lib/mud/text/textAnalyzer.d.ts +79 -0
- package/dist-lib/mud/text/unicodeRuns.d.ts +11 -0
- package/dist-lib/mud/text/unicodeTables.generated.d.ts +3 -0
- package/dist-lib/mud/text/wcwidth.d.ts +27 -22
- package/dist-lib/mud/timers/TimerEngine.d.ts +163 -11
- package/dist-lib/mud/timers/workerClock.d.ts +67 -0
- package/dist-lib/mud/triggers/TriggerEngine.d.ts +449 -47
- package/dist-lib/mud/triggers/legacyColorPatterns.d.ts +58 -0
- package/dist-lib/mud/triggers/pcre/Pcre2.d.ts +83 -1
- package/dist-lib/oauth-callback.html +94 -0
- package/dist-lib/pcre2Wasm.d.ts +54 -0
- package/dist-lib/pcre2Wasm.js +241 -0
- package/dist-lib/scripting/EngineHost.d.ts +45 -21
- package/dist-lib/scripting/IScriptingRuntime.d.ts +103 -27
- package/dist-lib/scripting/MxpFrameManager.d.ts +10 -1
- package/dist-lib/scripting/ScriptingAPI.d.ts +1030 -213
- package/dist-lib/scripting/ScriptingEngine.d.ts +727 -106
- package/dist-lib/scripting/StopwatchManager.d.ts +97 -36
- package/dist-lib/scripting/http/HttpService.d.ts +9 -1
- package/dist-lib/scripting/http/userUrl.d.ts +41 -0
- package/dist-lib/scripting/lua/LuaRuntime.d.ts +352 -77
- package/dist-lib/scripting/lua/argContracts.d.ts +71 -0
- package/dist-lib/scripting/lua/bindings/automation.d.ts +1 -1
- package/dist-lib/scripting/lua/bindings/commands.d.ts +13 -0
- package/dist-lib/scripting/lua/bindings/context.d.ts +20 -2
- package/dist-lib/scripting/lua/bindings/diagnostics.d.ts +1 -1
- package/dist-lib/scripting/lua/bindings/map.d.ts +1 -1
- package/dist-lib/scripting/lua/bindings/media.d.ts +2 -2
- package/dist-lib/scripting/lua/bindings/output.d.ts +1 -1
- package/dist-lib/scripting/lua/bindings/session.d.ts +2 -2
- package/dist-lib/scripting/lua/bindings/textEdit.d.ts +1 -1
- package/dist-lib/scripting/lua/bindings/userWindows.d.ts +1 -1
- package/dist-lib/scripting/lua/byteArmor.d.ts +36 -0
- package/dist-lib/scripting/lua/imageSize.d.ts +7 -0
- package/dist-lib/scripting/lua/rex.d.ts +4 -2
- package/dist-lib/scripting/lua/sqlRowEncoder.d.ts +6 -1
- package/dist-lib/scripting/lua/utf8CaseMap.d.ts +1 -0
- package/dist-lib/scripting/lua/utf8Patterns.d.ts +21 -1
- package/dist-lib/scripting/lua/wellFormedStrings.d.ts +40 -0
- package/dist-lib/scripting/lua/yajl.d.ts +43 -5
- package/dist-lib/scripting/profilesPresence.d.ts +20 -2
- package/dist-lib/scripting/vfs/ProfileVFS.d.ts +164 -10
- package/dist-lib/scripting/vfs/fsErrors.d.ts +28 -0
- package/dist-lib/scripting/vfs/idbCommit.d.ts +20 -0
- package/dist-lib/storage/appStore.d.ts +24 -9
- package/dist-lib/storage/hooks.d.ts +5 -1
- package/dist-lib/storage/index.d.ts +2 -2
- package/dist-lib/storage/mapStorage.d.ts +2 -0
- package/dist-lib/storage/persistentStorage.d.ts +3 -1
- package/dist-lib/storage/profileStorage.d.ts +15 -0
- package/dist-lib/storage/profileVfsData.d.ts +3 -3
- package/dist-lib/storage/schema.d.ts +512 -40
- package/dist-lib/storage/storageMigration.d.ts +82 -0
- package/dist-lib/storage-g5V1b-c1.js +2039 -0
- package/dist-lib/styles.css +1 -1
- package/dist-lib/ui/AboutModal.d.ts +1 -1
- package/dist-lib/ui/BrandLoginFields.d.ts +1 -1
- package/dist-lib/ui/BrowserSignInModal.d.ts +23 -0
- package/dist-lib/ui/CmdLineMenuRegistry.d.ts +14 -5
- package/dist-lib/ui/CommandBar.d.ts +8 -8
- package/dist-lib/ui/ConnectionFormModal.d.ts +20 -1
- package/dist-lib/ui/ConnectionScreen.d.ts +9 -1
- package/dist-lib/ui/GameLinkPrompt.d.ts +28 -0
- package/dist-lib/ui/HelpModal.d.ts +5 -1
- package/dist-lib/ui/MapSymbolUsageModal.d.ts +32 -0
- package/dist-lib/ui/MouseEventRegistry.d.ts +31 -4
- package/dist-lib/ui/NotepadModal.d.ts +22 -0
- package/dist-lib/ui/ResizableModal.d.ts +16 -1
- package/dist-lib/ui/SettingsModal.d.ts +10 -1
- package/dist-lib/ui/TlsAlertBanner.d.ts +3 -1
- package/dist-lib/ui/Toolbar.d.ts +22 -1
- package/dist-lib/ui/VaultManageButton.d.ts +10 -5
- package/dist-lib/ui/VaultModal.d.ts +3 -0
- package/dist-lib/ui/buttons/ButtonsBar.d.ts +3 -1
- package/dist-lib/ui/buttons/inactiveButtons.d.ts +25 -0
- package/dist-lib/ui/cmdline/CommandLineManager.d.ts +19 -0
- package/dist-lib/ui/cmdline/plainText.d.ts +16 -0
- package/dist-lib/ui/cmdline/subCommandLine.d.ts +78 -0
- package/dist-lib/ui/cmdline/useCmdLineSelection.d.ts +26 -0
- package/dist-lib/ui/cmdline/useSubCommandLineKeys.d.ts +33 -0
- package/dist-lib/ui/codemirror/lineParagraphMarks.d.ts +19 -0
- package/dist-lib/ui/codemirror/luaHover.d.ts +7 -0
- package/dist-lib/ui/codemirror/options.d.ts +33 -0
- package/dist-lib/ui/codemirror/theme.d.ts +29 -5
- package/dist-lib/ui/commands/addonCommands.d.ts +134 -0
- package/dist-lib/ui/commands/appShortcuts.d.ts +86 -0
- package/dist-lib/ui/commands/hostCommands.d.ts +88 -0
- package/dist-lib/ui/commands/keyMatch.d.ts +20 -0
- package/dist-lib/ui/commands/keySequence.d.ts +57 -0
- package/dist-lib/ui/components/ContextMenu.d.ts +21 -1
- package/dist-lib/ui/components/FontPicker.d.ts +5 -1
- package/dist-lib/ui/components/useModalFocus.d.ts +13 -1
- package/dist-lib/ui/helpTopics.d.ts +15 -0
- package/dist-lib/ui/labels/LabelManager.d.ts +172 -9
- package/dist-lib/ui/labels/LabelOverlay.d.ts +19 -0
- package/dist-lib/ui/labels/backgroundImageSize.d.ts +19 -0
- package/dist-lib/ui/labels/labelModel.d.ts +64 -0
- package/dist-lib/ui/labels/qColor.d.ts +13 -0
- package/dist-lib/ui/labels/qtCss.d.ts +12 -4
- package/dist-lib/ui/landmarks.d.ts +9 -0
- package/dist-lib/ui/launcher/ActionMenu.d.ts +19 -0
- package/dist-lib/ui/launcher/GameDetails.d.ts +21 -0
- package/dist-lib/ui/launcher/GameSection.d.ts +18 -0
- package/dist-lib/ui/launcher/LauncherSearch.d.ts +23 -0
- package/dist-lib/ui/launcher/ProfileArt.d.ts +20 -0
- package/dist-lib/ui/launcher/ProfileSection.d.ts +43 -0
- package/dist-lib/ui/launcher/launcherModel.d.ts +72 -0
- package/dist-lib/ui/layout/overlayLayerOrder.d.ts +2 -2
- package/dist-lib/ui/menu/MenuBar.d.ts +31 -0
- package/dist-lib/ui/menu/SplitButton.d.ts +39 -0
- package/dist-lib/ui/menu/anchoredPopup.d.ts +74 -0
- package/dist-lib/ui/menu/appMenus.d.ts +65 -0
- package/dist-lib/ui/menu/menuModel.d.ts +88 -0
- package/dist-lib/ui/menu/toolbarModel.d.ts +56 -0
- package/dist-lib/ui/notepad.d.ts +76 -0
- package/dist-lib/ui/openSignInPage.d.ts +14 -0
- package/dist-lib/ui/output/OutputContextMenu.d.ts +14 -1
- package/dist-lib/ui/output/OutputRenderer.d.ts +5 -0
- package/dist-lib/ui/output/OutputSearchBar.d.ts +5 -1
- package/dist-lib/ui/output/StickyOutputPanel.d.ts +17 -3
- package/dist-lib/ui/output/TextAnalyzerModal.d.ts +25 -0
- package/dist-lib/ui/output/caretMode.d.ts +3 -2
- package/dist-lib/ui/output/clearSplit.d.ts +11 -0
- package/dist-lib/ui/output/outputCopy.d.ts +41 -2
- package/dist-lib/ui/output/outputRows.d.ts +43 -0
- package/dist-lib/ui/output/selectionGesture.d.ts +35 -0
- package/dist-lib/ui/output/wordSelection.d.ts +33 -0
- package/dist-lib/ui/search/matcher.d.ts +14 -4
- package/dist-lib/ui/settings/SettingsShell.d.ts +91 -0
- package/dist-lib/ui/settings/ShortcutEditor.d.ts +13 -0
- package/dist-lib/ui/sound/SoundManager.d.ts +210 -44
- package/dist-lib/ui/sound/closedCaption.d.ts +4 -1
- package/dist-lib/ui/sound/mediaDirection.d.ts +35 -0
- package/dist-lib/ui/tabCompletion.d.ts +53 -0
- package/dist-lib/ui/textedit/TextEditManager.d.ts +11 -2
- package/dist-lib/ui/useOpenProfiles.d.ts +1 -1
- package/dist-lib/ui/video/VideoManager.d.ts +7 -0
- package/dist-lib/ui/windows/WindowManager.d.ts +452 -37
- package/dist-lib/ui/windows/panels/ScriptEditorPanel.d.ts +14 -0
- package/dist-lib/ui/windows/panels/ScriptSearch.d.ts +6 -1
- package/dist-lib/ui/windows/panels/TextPanel.d.ts +4 -1
- package/dist-lib/ui/windows/panels/VariablesView.d.ts +37 -7
- package/dist-lib/ui/windows/panels/WindowCmdLine.d.ts +4 -2
- package/dist-lib/ui/windows/panels/aliasLoop.d.ts +24 -0
- package/dist-lib/ui/windows/panels/editorClipboard.d.ts +45 -0
- package/dist-lib/ui/windows/panels/editorUndo.d.ts +79 -0
- package/dist-lib/ui/windows/panels/mapAreaChange.d.ts +10 -0
- package/dist-lib/utils/appShellCache.d.ts +25 -0
- package/dist-lib/utils/fontFamilyName.d.ts +13 -0
- package/dist-lib/utils/fontLoader.d.ts +31 -0
- package/dist-lib/utils/formatBytes.d.ts +4 -0
- package/dist-lib/utils/mustBeOneOf.d.ts +9 -0
- package/dist-lib/utils/profileLock.d.ts +1 -1
- package/dist-lib/utils/systemTheme.d.ts +24 -0
- package/dist-lib/utils/timeZone.d.ts +10 -0
- package/dist-lib/vault/CredentialVault.d.ts +51 -5
- package/dist-lib/vault/deviceUnlock.d.ts +47 -0
- package/dist-lib/vault/vaultAccess.d.ts +24 -2
- package/dist-lib/vault/vaultHelpTopic.d.ts +9 -0
- package/dist-lib/vault/vaultRecord.d.ts +33 -1
- package/dist-lib/vfs-sw.js +220 -11
- package/dist-lib/vite.d.ts +1 -1
- package/dist-lib/vite.js +66 -43
- package/package.json +23 -15
- package/dist-lib/assets/mapParser.worker-t-3rd1zR.js +0 -9
- package/dist-lib/mud/connection/PingTracker.d.ts +0 -41
- package/dist-lib/ui/BundledGameGrid.d.ts +0 -21
- package/dist-lib/ui/ConnectionGrid.d.ts +0 -21
- package/dist-lib/ui/bufferWords.d.ts +0 -38
|
@@ -1,9 +1,56 @@
|
|
|
1
1
|
import type { ProfileVFS } from '../scripting/vfs/ProfileVFS';
|
|
2
|
-
import type { PackageKind, PackageManifest } from '../storage/schema';
|
|
2
|
+
import type { PackageKind, PackageManifest, ProfileSettings } from '../storage/schema';
|
|
3
3
|
import { type MudletImportResult } from './mudletXmlImport';
|
|
4
4
|
export interface InstallResult {
|
|
5
5
|
manifest: PackageManifest;
|
|
6
6
|
data: MudletImportResult;
|
|
7
|
+
/**
|
|
8
|
+
* Why the archive's `config.lua` gave up nothing, when it did. The install
|
|
9
|
+
* still goes ahead — under the archive's own name, with no details filed —
|
|
10
|
+
* and the caller says so, because the silence is what costs: a name-based
|
|
11
|
+
* uninstall, a repository update and anything depending on the package all
|
|
12
|
+
* stop matching, with nothing to go on.
|
|
13
|
+
*/
|
|
14
|
+
configProblem?: string;
|
|
15
|
+
/**
|
|
16
|
+
* The name config.lua asked for, when a folder is already sitting at it.
|
|
17
|
+
*
|
|
18
|
+
* Reported rather than refused here because the ORDER matters: a name that
|
|
19
|
+
* is already installed is refused for that first, and only a folder standing
|
|
20
|
+
* on its own is this. The caller knows what is installed; this module only
|
|
21
|
+
* knows what is on disk.
|
|
22
|
+
*/
|
|
23
|
+
occupiedFolder?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Set when the archive cannot be moved into a folder of its name that is
|
|
26
|
+
* already in the profile: one of its files would land where that folder
|
|
27
|
+
* has a folder, or one of its folders where it has a file. Desktop moves
|
|
28
|
+
* an archive into such a folder entry by entry, keeping everything else
|
|
29
|
+
* in it, and is refused by a clash; the reason is this.
|
|
30
|
+
*/
|
|
31
|
+
moveClash?: string;
|
|
32
|
+
/**
|
|
33
|
+
* The profile settings a package XML's `<HostPackage>` carries. Desktop's
|
|
34
|
+
* XMLimport reads a package's HostPackage into the profile as it reads a
|
|
35
|
+
* profile's own, so a package exported from a profile brings its settings.
|
|
36
|
+
*/
|
|
37
|
+
hostSettings?: Partial<ProfileSettings>;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* An install that has been validated and unpacked in memory but has not touched
|
|
41
|
+
* the profile's files yet: `commit()` is the only step that writes. A caller
|
|
42
|
+
* that decides to refuse — the name is already installed, the user cancelled —
|
|
43
|
+
* drops the prepared install and the profile is left exactly as it was.
|
|
44
|
+
*
|
|
45
|
+
* Desktop Mudlet takes the same order (`Host::installPackage` refuses an
|
|
46
|
+
* already-installed name before it unpacks anything). Wiping first meant every
|
|
47
|
+
* later refusal destroyed the files of the very install it declined to replace,
|
|
48
|
+
* leaving a package that was listed, had items in the store, and had nothing
|
|
49
|
+
* behind it on disk.
|
|
50
|
+
*/
|
|
51
|
+
export interface PreparedInstall extends InstallResult {
|
|
52
|
+
/** Write the package's files into the VFS. Nothing on disk changes before this. */
|
|
53
|
+
commit(): void;
|
|
7
54
|
}
|
|
8
55
|
export interface InstallOptions {
|
|
9
56
|
/**
|
|
@@ -19,10 +66,30 @@ export interface InstallOptions {
|
|
|
19
66
|
* the resources the script just staged.
|
|
20
67
|
*/
|
|
21
68
|
sourcePath?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Runs a package's `config.lua` and reports what it set, or why it never
|
|
71
|
+
* finished. Supplied by the caller that owns a Lua runtime — this module
|
|
72
|
+
* stays free of one — and when it is absent the manifest is read by pattern
|
|
73
|
+
* instead, which is enough for a well-formed config.lua and cannot tell a
|
|
74
|
+
* manifest that would RAISE from one that would not.
|
|
75
|
+
*/
|
|
76
|
+
readConfig?: (source: string) => {
|
|
77
|
+
ok: true;
|
|
78
|
+
info: Record<string, string>;
|
|
79
|
+
} | {
|
|
80
|
+
ok: false;
|
|
81
|
+
reason: string;
|
|
82
|
+
};
|
|
22
83
|
}
|
|
84
|
+
export declare function profileKeepsItsOwnDataIn(name: string): boolean;
|
|
85
|
+
/** The XML files an archive's package is read from: those at its root, by name
|
|
86
|
+
* ignoring case (QDir's default listing order), else the first at any depth. */
|
|
87
|
+
export declare function archiveXmlEntries(paths: string[]): string[];
|
|
23
88
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
89
|
+
* Validate and unpack a Mudlet package from in-memory bytes without writing
|
|
90
|
+
* anything — the returned `commit()` performs every filesystem change.
|
|
91
|
+
* Synchronous: the caller is expected to flush the VFS afterwards (or let the
|
|
92
|
+
* next idle flush handle it).
|
|
26
93
|
*
|
|
27
94
|
* Behaviour by kind:
|
|
28
95
|
* - .mpackage / .zip : always unzipped into <profilePath>/<packageName>/. The full payload
|
|
@@ -36,9 +103,33 @@ export interface InstallOptions {
|
|
|
36
103
|
* The XML is parsed in package-mode, which wraps each category in a top-level
|
|
37
104
|
* group and tags every node with the package name, making uninstall a tag-based cascade.
|
|
38
105
|
*/
|
|
106
|
+
export declare function preparePackageInstall(filename: string, buf: Uint8Array, vfs: ProfileVFS, opts?: InstallOptions): PreparedInstall;
|
|
107
|
+
/**
|
|
108
|
+
* Prepare and immediately commit — equivalent to `preparePackageInstall(...)`
|
|
109
|
+
* followed by `commit()`, for callers with nothing to decide in between.
|
|
110
|
+
*/
|
|
39
111
|
export declare function installPackageFromBytes(filename: string, buf: Uint8Array, vfs: ProfileVFS, opts?: InstallOptions): InstallResult;
|
|
40
112
|
/** Async wrapper that reads from a File and flushes the VFS to disk on success. */
|
|
41
113
|
export declare function installPackageFromFile(file: File, vfs: ProfileVFS, opts?: InstallOptions): Promise<InstallResult>;
|
|
114
|
+
/**
|
|
115
|
+
* {@link preparePackageInstall} over a `File`, for a caller that has to decide
|
|
116
|
+
* whether to go through with the install *after* seeing the name it would land
|
|
117
|
+
* under — which `config.lua` can rename to anything, so the file's own name
|
|
118
|
+
* settles nothing. Nothing is written until `commit()`; flushing the VFS
|
|
119
|
+
* afterwards is the caller's, as with every other prepare.
|
|
120
|
+
*/
|
|
121
|
+
export declare function preparePackageInstallFromFile(file: File, vfs: ProfileVFS, opts?: InstallOptions): Promise<PreparedInstall>;
|
|
122
|
+
/**
|
|
123
|
+
* The pattern pass over a config.lua's text: every `key = <string literal>`
|
|
124
|
+
* assignment, mapped onto the manifest's own fields and kept verbatim (keys
|
|
125
|
+
* lower-cased) as `declaredInfo`, which is what getPackageInfo answers with.
|
|
126
|
+
* Not a Lua eval — see {@link readConfigLua} for when one is used instead.
|
|
127
|
+
*
|
|
128
|
+
* Shared with the Mudlet profile import, which registers the packages a
|
|
129
|
+
* profile already has from the config.lua files left in its folder: a
|
|
130
|
+
* manifest built there without `declaredInfo` reported no info at all.
|
|
131
|
+
*/
|
|
132
|
+
export declare function parseConfigLuaText(text: string): Partial<PackageManifest>;
|
|
42
133
|
/**
|
|
43
134
|
* Remove a package's on-disk files. The store handles tag-based node removal
|
|
44
135
|
* separately. Modules are exempt: they unlink only — the underlying XML (and any
|
|
@@ -56,9 +147,15 @@ export declare function moduleXmlAbsolutePath(manifest: PackageManifest, vfs: Pr
|
|
|
56
147
|
* Re-read a module's XML from the VFS and return the parsed result.
|
|
57
148
|
* Throws if the on-disk file is missing — modules require their XML to be present.
|
|
58
149
|
*/
|
|
59
|
-
export declare function reloadModuleFromVfs(manifest: PackageManifest, vfs: ProfileVFS
|
|
150
|
+
export declare function reloadModuleFromVfs(manifest: PackageManifest, vfs: ProfileVFS, readConfig?: InstallOptions['readConfig'],
|
|
151
|
+
/** Filled in with the manifest an archive's config.lua now gives, which
|
|
152
|
+
* may name the module differently than it was installed as. */
|
|
153
|
+
out?: {
|
|
154
|
+
manifest?: PackageManifest;
|
|
155
|
+
}): MudletImportResult;
|
|
60
156
|
/**
|
|
61
|
-
*
|
|
157
|
+
* Prepare a module install from a path that already lives inside the profile's
|
|
158
|
+
* VFS. Nothing is written until the returned `commit()` runs.
|
|
62
159
|
*
|
|
63
160
|
* - Plain XML : referenced in place. The manifest stores `xmlVfsPath` and no pkgDir is
|
|
64
161
|
* created. Reload and sync read/write the user-chosen path verbatim, so
|
|
@@ -69,7 +166,14 @@ export declare function reloadModuleFromVfs(manifest: PackageManifest, vfs: Prof
|
|
|
69
166
|
*
|
|
70
167
|
* Throws on read/parse failures.
|
|
71
168
|
*/
|
|
72
|
-
export declare function
|
|
169
|
+
export declare function prepareModuleInstallFromVfsPath(absolutePath: string, vfs: ProfileVFS,
|
|
73
170
|
/** Consulted first, so a module under the read-only /lua/ namespace installs
|
|
74
171
|
* as readily as one in the profile — see LuaRuntime.readBuiltinBytes. */
|
|
75
|
-
readBuiltin?: (path: string) => Uint8Array | null
|
|
172
|
+
readBuiltin?: (path: string) => Uint8Array | null,
|
|
173
|
+
/** The same manifest reader the package path takes; see InstallOptions. */
|
|
174
|
+
readConfig?: InstallOptions['readConfig']): PreparedInstall;
|
|
175
|
+
/**
|
|
176
|
+
* Prepare and immediately commit — equivalent to
|
|
177
|
+
* `prepareModuleInstallFromVfsPath(...)` followed by `commit()`.
|
|
178
|
+
*/
|
|
179
|
+
export declare function installModuleFromVfsPath(absolutePath: string, vfs: ProfileVFS, readBuiltin?: (path: string) => Uint8Array | null): InstallResult;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The string a desktop profile-data file holds. Bytes that are not a whole
|
|
3
|
+
* serialised `QString` are read as UTF-8 text instead, so a file written by
|
|
4
|
+
* hand (or by an older Mudlet Web export) still reads; such text cannot pass
|
|
5
|
+
* as the binary form, whose first byte is always 0x00 or 0xFF for any length
|
|
6
|
+
* a file this small can carry.
|
|
7
|
+
*/
|
|
8
|
+
export declare function decodeProfileData(bytes: Uint8Array): string;
|
|
9
|
+
/** `text` as desktop's `writeProfileData` writes it, so desktop reads it back. */
|
|
10
|
+
export declare function encodeProfileData(text: string): Uint8Array;
|
|
@@ -8,9 +8,17 @@ import type { PackageManifest } from '../storage/schema';
|
|
|
8
8
|
export declare function downloadFromUrl(url: string, proxyUrlRaw?: string): Promise<Uint8Array>;
|
|
9
9
|
/** Pull the trailing path segment out of a URL, falling back when the URL is malformed. */
|
|
10
10
|
export declare function filenameFromUrl(url: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* The name desktop gives a `Client.GUI` package (cTelnet's
|
|
13
|
+
* handleGUIPackageInstallationAndUpgrade): the URL's last segment with the
|
|
14
|
+
* package extensions and every dot, slash and backslash taken out. It is what desktop
|
|
15
|
+
* looks for among the installed packages to tell a first install from an
|
|
16
|
+
* upgrade — so a package the player installed by hand counts as installed.
|
|
17
|
+
*/
|
|
18
|
+
export declare function clientGuiPackageName(url: string): string;
|
|
11
19
|
export interface ClientGuiPayload {
|
|
12
20
|
url: string;
|
|
13
|
-
version
|
|
21
|
+
version: string;
|
|
14
22
|
}
|
|
15
23
|
/**
|
|
16
24
|
* Decide whether a `Client.GUI` request is a re-delivery of a package already
|
|
@@ -42,11 +50,19 @@ export declare function parseClientMapPayload(value: unknown): string | null;
|
|
|
42
50
|
* Decode a `Client.GUI` GMCP payload. Mudlet supports two shapes
|
|
43
51
|
* (cTelnet::setGMCPVariables):
|
|
44
52
|
* - a `{ url, version }` JSON object (current MMP-style format)
|
|
45
|
-
* - a string `"<version>\n<url>"` (legacy raw telnet) — version first
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
53
|
+
* - a string `"<version>\n<url>"` (legacy raw telnet) — version first
|
|
54
|
+
* Mudlet acts on an offer only when it carries both a version and a URL
|
|
55
|
+
* (handleGUIPackageInstallationAndUpgrade returns on either being empty), in
|
|
56
|
+
* either shape, so neither a bare URL nor a half pair is salvaged: the version
|
|
57
|
+
* is what tells a re-delivery from an upgrade, and without it there is nothing
|
|
58
|
+
* to record against the install.
|
|
51
59
|
*/
|
|
52
60
|
export declare function parseClientGuiPayload(value: unknown): ClientGuiPayload | null;
|
|
61
|
+
/**
|
|
62
|
+
* Whether a `Client.GUI` payload declines the built-in starter UI —
|
|
63
|
+
* `{"baseui": false}`, which Mudlet (cTelnet::parseGUIBaseUiDeclinedFromJSON)
|
|
64
|
+
* also takes spelled as the string "false", trimmed and in any case, since some
|
|
65
|
+
* games' GMCP serializers can only write strings. Only the JSON object form can
|
|
66
|
+
* decline: the raw telnet form carries a version and a URL and nothing else.
|
|
67
|
+
*/
|
|
68
|
+
export declare function clientGuiDeclinesBaseUi(value: unknown): boolean;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ProfileVFS } from '../scripting/vfs/ProfileVFS';
|
|
2
|
+
/**
|
|
3
|
+
* A zip archive read entry by entry, the way libzip hands it to brimworks'
|
|
4
|
+
* lua-zip (what desktop's `zip` global is).
|
|
5
|
+
*
|
|
6
|
+
* fflate's `unzipSync` is all or nothing: one entry that will not inflate and
|
|
7
|
+
* the whole archive throws, it never checks a CRC, and it keys entries by name,
|
|
8
|
+
* so two with the same name collapse into one. Desktop's `unzip()` reports each
|
|
9
|
+
* entry it cannot read and carries on with the rest, so it needs an archive it
|
|
10
|
+
* can walk by index and read one entry of at a time.
|
|
11
|
+
*/
|
|
12
|
+
export interface ZipEntry {
|
|
13
|
+
/** The name as stored (Latin-1 unless the entry flags UTF-8, as fflate reads it). */
|
|
14
|
+
name: string;
|
|
15
|
+
/** The uncompressed size the archive records. */
|
|
16
|
+
size: number;
|
|
17
|
+
/** The entry's bytes, or throws with the reason they cannot be had. */
|
|
18
|
+
read(): Uint8Array;
|
|
19
|
+
}
|
|
20
|
+
/** The archive's entries in central-directory order, or null when the bytes
|
|
21
|
+
* are not a zip this can read. */
|
|
22
|
+
export declare function readZipEntries(bytes: Uint8Array): ZipEntry[] | null;
|
|
23
|
+
/**
|
|
24
|
+
* An entry name's path components inside the folder it unpacks into, with "."
|
|
25
|
+
* and ".." resolved, or null when the name is absolute or climbs out of it.
|
|
26
|
+
* Both separators count, as on Windows, which honours either: desktop's own
|
|
27
|
+
* `unzip()` reads names the same way, so an archive is judged identically
|
|
28
|
+
* whichever platform made it.
|
|
29
|
+
*/
|
|
30
|
+
export declare function zipEntryComponents(name: string): string[] | null;
|
|
31
|
+
/** `path` with any symbolic links standing at it followed to what they name,
|
|
32
|
+
* so a folder reached through a link can be written into. Left as it is when
|
|
33
|
+
* it is not a link, or the chain is too long to be anything but a loop. */
|
|
34
|
+
export declare function resolveLinkedDirectory(vfs: ProfileVFS, path: string): string;
|
|
35
|
+
/**
|
|
36
|
+
* Why the archive's entries cannot all be unpacked into `destDir`, or null when
|
|
37
|
+
* they can. Checked over every entry before anything is written, so a refused
|
|
38
|
+
* archive leaves nothing of itself behind:
|
|
39
|
+
* - a name that resolves outside `destDir`;
|
|
40
|
+
* - a symbolic link already inside `destDir` that an entry would pass through
|
|
41
|
+
* or write over, which would carry it outside.
|
|
42
|
+
* `destDir` itself may be reached through a link: that is where the caller
|
|
43
|
+
* asked for the files to go.
|
|
44
|
+
*/
|
|
45
|
+
export declare function zipExtractionProblem(vfs: ProfileVFS, destDir: string, names: string[]): string | null;
|
package/dist-lib/index.d.ts
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import './styles.css';
|
|
2
2
|
export { MudletWebApp } from "./MudletWebApp";
|
|
3
|
-
export { getBrand, isBrandedMode,
|
|
3
|
+
export { getBrand, isBrandedMode, getThemeChoices, isLightTheme, DEFAULT_BRAND, STOCK_THEMES, type BrandConfig, type BrandMudTarget, type BrandPackage, type BrandTheme, type BrandCommand, type BrandToolbarButton, type BrandToolbarConfig, type BrandToolbarContext, type StockToolbarButton, type LandingProps, } from "./branding";
|
|
4
|
+
export { hostCommands as commands } from "./ui/commands/hostCommands";
|
|
5
|
+
export type { HostCommand, HostCommandRequest } from "./ui/commands/hostCommands";
|
|
6
|
+
export type { MenuAction, MenuNode, MenuSeparator, MenuSubmenu, PlacedCommand, TopMenu, } from "./ui/menu/menuModel";
|
|
7
|
+
export type { ToolbarButtonItem, ToolbarCustomItem, ToolbarItem, ToolbarSplitItem, } from "./ui/menu/toolbarModel";
|
|
8
|
+
export { isPackageRemovable } from "./import/defaultPackages";
|
|
4
9
|
export { BrandLoginScreen } from "./ui/BrandLoginScreen";
|
|
5
10
|
export { useBrandLogin, type UseBrandLoginResult } from "./ui/useBrandLogin";
|
|
6
11
|
export { BrandLoginFields, type BrandLoginFieldsProps } from "./ui/BrandLoginFields";
|
|
7
12
|
export { setSessionCredentials, getSessionCredentials, getLastSessionCredentials, type SessionCredentials } from "./utils/sessionCredentials";
|
|
8
|
-
export type { MudConnection, ConnectionMode } from "./storage/schema";
|
|
13
|
+
export type { MudConnection, ConnectionMode, ProfileSettings } from "./storage/schema";
|
|
9
14
|
export { EventBus } from "./core/EventBus";
|
|
10
15
|
export { ScriptingAPI } from "./scripting/ScriptingAPI";
|
|
11
16
|
export { MudSession } from "./mud/MudSession";
|
|
@@ -23,7 +28,6 @@ export { setupOutputRenderer } from "./ui/output/OutputRenderer";
|
|
|
23
28
|
export type { OutputRendererControls } from "./ui/output/OutputRenderer";
|
|
24
29
|
export { MudClient } from "./mud/connection/MudClient";
|
|
25
30
|
export type { MudClientOptions } from "./mud/connection/MudClient";
|
|
26
|
-
export { PingTracker } from "./mud/connection/PingTracker";
|
|
27
31
|
export { createPassthroughProcessor } from "./mud/triggers/ChunkProcessor";
|
|
28
32
|
export type { ChunkProcessor } from "./mud/triggers/ChunkProcessor";
|
|
29
33
|
export { TriggerEngine } from "./mud/triggers/TriggerEngine";
|