@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.
Files changed (301) hide show
  1. package/README.md +1 -1
  2. package/dist-lib/analytics.d.ts +27 -0
  3. package/dist-lib/assets/fonts/Vera.woff2 +0 -0
  4. package/dist-lib/assets/fonts/VeraBI.woff2 +0 -0
  5. package/dist-lib/assets/fonts/VeraBd.woff2 +0 -0
  6. package/dist-lib/assets/fonts/VeraIt.woff2 +0 -0
  7. package/dist-lib/assets/mapParser.worker-DrVZ3wg_.js +9 -0
  8. package/dist-lib/backupImport-wt8r7JXI.js +233 -0
  9. package/dist-lib/branding.d.ts +111 -13
  10. package/dist-lib/db/sqliteClient.d.ts +195 -7
  11. package/dist-lib/hooks/useAutoReconnect.d.ts +61 -0
  12. package/dist-lib/hooks/useDocumentFullscreen.d.ts +23 -0
  13. package/dist-lib/hooks/useKeyboardShortcuts.d.ts +37 -0
  14. package/dist-lib/hooks/useRecordLastPlayed.d.ts +10 -0
  15. package/dist-lib/import/applyMudletProfile.d.ts +35 -9
  16. package/dist-lib/import/backupImport.d.ts +118 -0
  17. package/dist-lib/import/collectProfileExport.d.ts +33 -2
  18. package/dist-lib/import/defaultPackages.d.ts +57 -14
  19. package/dist-lib/import/defaults/CF-loader/CF-loader.mpackage +0 -0
  20. package/dist-lib/import/defaults/MedBootstrap/MedBootstrap.mpackage +0 -0
  21. package/dist-lib/import/defaults/deleteOldProfiles/deleteOldProfiles.mpackage +0 -0
  22. package/dist-lib/import/defaults/echo/echo.mpackage +0 -0
  23. package/dist-lib/import/defaults/enable-accessibility/enable-accessibility.mpackage +0 -0
  24. package/dist-lib/import/defaults/generic_mapper/generic_mapper.mpackage +0 -0
  25. package/dist-lib/import/defaults/gui-drop/gui-drop.mpackage +0 -0
  26. package/dist-lib/import/defaults/icesus-loader/icesus-loader.mpackage +0 -0
  27. package/dist-lib/import/defaults/mg-loader/mg-loader.mpackage +0 -0
  28. package/dist-lib/import/defaults/mudlet-base-ui/mudlet-base-ui.mpackage +0 -0
  29. package/dist-lib/import/defaults/mudlet-mapper.xml +1215 -389
  30. package/dist-lib/import/mudletControlChars.d.ts +14 -0
  31. package/dist-lib/import/mudletHost.d.ts +73 -10
  32. package/dist-lib/import/mudletLink.d.ts +53 -2
  33. package/dist-lib/import/mudletProfileExport.d.ts +38 -5
  34. package/dist-lib/import/mudletProfileImport.d.ts +110 -12
  35. package/dist-lib/import/mudletVariables.d.ts +4 -3
  36. package/dist-lib/import/mudletWriteback.d.ts +15 -1
  37. package/dist-lib/import/mudletXmlImport.d.ts +46 -0
  38. package/dist-lib/import/packageFonts.d.ts +33 -0
  39. package/dist-lib/import/packageInstaller.d.ts +111 -7
  40. package/dist-lib/import/qtProfileData.d.ts +10 -0
  41. package/dist-lib/import/remotePackageInstall.d.ts +23 -7
  42. package/dist-lib/import/zipEntries.d.ts +45 -0
  43. package/dist-lib/index.d.ts +7 -3
  44. package/dist-lib/index.js +50508 -29836
  45. package/dist-lib/logging/SessionLogger.d.ts +75 -15
  46. package/dist-lib/map/MapSelectionOverlay.d.ts +2 -2
  47. package/dist-lib/map/MapStore.d.ts +387 -60
  48. package/dist-lib/map/MudletHighlightOverlay.d.ts +2 -2
  49. package/dist-lib/map/{MudixMapReader.d.ts → MudletMapReader.d.ts} +2 -2
  50. package/dist-lib/map/areaGraph.d.ts +120 -0
  51. package/dist-lib/map/environmentKit.d.ts +36 -0
  52. package/dist-lib/map/labelPixmap.d.ts +90 -0
  53. package/dist-lib/map/mapImageExport.d.ts +36 -2
  54. package/dist-lib/map/mapStyle.d.ts +11 -0
  55. package/dist-lib/map/mapVersion.d.ts +66 -0
  56. package/dist-lib/map/pathfinding.d.ts +2 -2
  57. package/dist-lib/mud/CharLoginController.d.ts +230 -0
  58. package/dist-lib/mud/ItemIdSequence.d.ts +1 -1
  59. package/dist-lib/mud/MudSession.d.ts +279 -22
  60. package/dist-lib/mud/PatternEngine.d.ts +153 -14
  61. package/dist-lib/mud/aliases/AliasEngine.d.ts +55 -9
  62. package/dist-lib/mud/autoLogin.d.ts +59 -0
  63. package/dist-lib/mud/commandSplit.d.ts +9 -0
  64. package/dist-lib/mud/connection/LineAssembler.d.ts +38 -11
  65. package/dist-lib/mud/connection/MudClient.d.ts +291 -53
  66. package/dist-lib/mud/connection/SubnegotiationRepair.d.ts +24 -0
  67. package/dist-lib/mud/connection/TelnetNegotiator.d.ts +208 -68
  68. package/dist-lib/mud/connection/telnetDebug.d.ts +8 -8
  69. package/dist-lib/mud/events.d.ts +102 -23
  70. package/dist-lib/mud/games/bundledGames.d.ts +12 -7
  71. package/dist-lib/mud/games/gameLinks.d.ts +40 -0
  72. package/dist-lib/mud/games/icons/3Kingdoms.png +0 -0
  73. package/dist-lib/mud/games/icons/3Scapes.png +0 -0
  74. package/dist-lib/mud/games/icons/achaea.png +0 -0
  75. package/dist-lib/mud/games/icons/aetolia.png +0 -0
  76. package/dist-lib/mud/games/icons/banner_astaria.png +0 -0
  77. package/dist-lib/mud/games/icons/banner_darkmists.png +0 -0
  78. package/dist-lib/mud/games/icons/banner_dreamland.png +0 -0
  79. package/dist-lib/mud/games/icons/banner_petria.jpg +0 -0
  80. package/dist-lib/mud/games/icons/banner_ropmud.png +0 -0
  81. package/dist-lib/mud/games/icons/blackmud.png +0 -0
  82. package/dist-lib/mud/games/icons/carrionfields.png +0 -0
  83. package/dist-lib/mud/games/icons/dragonfire_icon.png +0 -0
  84. package/dist-lib/mud/games/icons/fed2-logo.png +0 -0
  85. package/dist-lib/mud/games/icons/icesus_480x120.png +0 -0
  86. package/dist-lib/mud/games/icons/imperian.png +0 -0
  87. package/dist-lib/mud/games/icons/infinity_480x120.png +0 -0
  88. package/dist-lib/mud/games/icons/lusternia.png +0 -0
  89. package/dist-lib/mud/games/icons/morgengrauen_480x120.png +0 -0
  90. package/dist-lib/mud/games/icons/mudlet-tutorial.png +0 -0
  91. package/dist-lib/mud/games/icons/phoenixmud_480x120.png +0 -0
  92. package/dist-lib/mud/games/icons/starmourn.png +0 -0
  93. package/dist-lib/mud/games/icons/voidmud_icon.png +0 -0
  94. package/dist-lib/mud/games/icons/wotmudicon.png +0 -0
  95. package/dist-lib/mud/games/websiteLinks.d.ts +21 -0
  96. package/dist-lib/mud/keybindings/KeyEngine.d.ts +110 -4
  97. package/dist-lib/mud/keybindings/browserReservedKeys.d.ts +2 -2
  98. package/dist-lib/mud/keybindings/keyEventTarget.d.ts +61 -0
  99. package/dist-lib/mud/keybindings/qtKeys.d.ts +91 -12
  100. package/dist-lib/mud/protocol/atcp.d.ts +19 -0
  101. package/dist-lib/mud/protocol/byteString.d.ts +24 -0
  102. package/dist-lib/mud/protocol/charLoginFlow.d.ts +243 -16
  103. package/dist-lib/mud/protocol/charset.d.ts +111 -46
  104. package/dist-lib/mud/protocol/codePages.d.ts +10 -0
  105. package/dist-lib/mud/protocol/constants.d.ts +17 -10
  106. package/dist-lib/mud/protocol/echo.d.ts +23 -27
  107. package/dist-lib/mud/protocol/gmcp.d.ts +36 -6
  108. package/dist-lib/mud/protocol/index.d.ts +3 -2
  109. package/dist-lib/mud/protocol/luaLiteral.d.ts +12 -0
  110. package/dist-lib/mud/protocol/mccp.d.ts +83 -1
  111. package/dist-lib/mud/protocol/mnes.d.ts +41 -58
  112. package/dist-lib/mud/protocol/msdp.d.ts +11 -4
  113. package/dist-lib/mud/protocol/msp.d.ts +3 -2
  114. package/dist-lib/mud/protocol/mssp.d.ts +9 -4
  115. package/dist-lib/mud/protocol/multiByte.d.ts +51 -0
  116. package/dist-lib/mud/protocol/multiByteEncode.d.ts +42 -0
  117. package/dist-lib/mud/protocol/mxp.d.ts +193 -14
  118. package/dist-lib/mud/protocol/oauthClientFlow.d.ts +128 -0
  119. package/dist-lib/mud/protocol/qtCodePages.generated.d.ts +1 -0
  120. package/dist-lib/mud/protocol/tlsCodes.d.ts +40 -3
  121. package/dist-lib/mud/replay/ReplayPlayer.d.ts +16 -1
  122. package/dist-lib/mud/replay/replayFormat.d.ts +29 -2
  123. package/dist-lib/mud/text/Console.d.ts +255 -49
  124. package/dist-lib/mud/text/FormatState.d.ts +137 -14
  125. package/dist-lib/mud/text/ansiEscapes.d.ts +32 -16
  126. package/dist-lib/mud/text/colorParsers.d.ts +14 -2
  127. package/dist-lib/mud/text/colorSpaceId.d.ts +2 -0
  128. package/dist-lib/mud/text/colors.d.ts +17 -10
  129. package/dist-lib/mud/text/controlCharacterMode.d.ts +1 -1
  130. package/dist-lib/mud/text/hyperlinkVisibility.d.ts +1 -1
  131. package/dist-lib/mud/text/lineBreak.d.ts +5 -0
  132. package/dist-lib/mud/text/serverWrap.d.ts +2 -2
  133. package/dist-lib/mud/text/textAnalyzer.d.ts +79 -0
  134. package/dist-lib/mud/text/unicodeRuns.d.ts +11 -0
  135. package/dist-lib/mud/text/unicodeTables.generated.d.ts +3 -0
  136. package/dist-lib/mud/text/wcwidth.d.ts +27 -22
  137. package/dist-lib/mud/timers/TimerEngine.d.ts +163 -11
  138. package/dist-lib/mud/timers/workerClock.d.ts +67 -0
  139. package/dist-lib/mud/triggers/TriggerEngine.d.ts +449 -47
  140. package/dist-lib/mud/triggers/legacyColorPatterns.d.ts +58 -0
  141. package/dist-lib/mud/triggers/pcre/Pcre2.d.ts +83 -1
  142. package/dist-lib/oauth-callback.html +94 -0
  143. package/dist-lib/pcre2Wasm.d.ts +54 -0
  144. package/dist-lib/pcre2Wasm.js +241 -0
  145. package/dist-lib/scripting/EngineHost.d.ts +45 -21
  146. package/dist-lib/scripting/IScriptingRuntime.d.ts +103 -27
  147. package/dist-lib/scripting/MxpFrameManager.d.ts +10 -1
  148. package/dist-lib/scripting/ScriptingAPI.d.ts +1030 -213
  149. package/dist-lib/scripting/ScriptingEngine.d.ts +727 -106
  150. package/dist-lib/scripting/StopwatchManager.d.ts +97 -36
  151. package/dist-lib/scripting/http/HttpService.d.ts +9 -1
  152. package/dist-lib/scripting/http/userUrl.d.ts +41 -0
  153. package/dist-lib/scripting/lua/LuaRuntime.d.ts +352 -77
  154. package/dist-lib/scripting/lua/argContracts.d.ts +71 -0
  155. package/dist-lib/scripting/lua/bindings/automation.d.ts +1 -1
  156. package/dist-lib/scripting/lua/bindings/commands.d.ts +13 -0
  157. package/dist-lib/scripting/lua/bindings/context.d.ts +20 -2
  158. package/dist-lib/scripting/lua/bindings/diagnostics.d.ts +1 -1
  159. package/dist-lib/scripting/lua/bindings/map.d.ts +1 -1
  160. package/dist-lib/scripting/lua/bindings/media.d.ts +2 -2
  161. package/dist-lib/scripting/lua/bindings/output.d.ts +1 -1
  162. package/dist-lib/scripting/lua/bindings/session.d.ts +2 -2
  163. package/dist-lib/scripting/lua/bindings/textEdit.d.ts +1 -1
  164. package/dist-lib/scripting/lua/bindings/userWindows.d.ts +1 -1
  165. package/dist-lib/scripting/lua/byteArmor.d.ts +36 -0
  166. package/dist-lib/scripting/lua/imageSize.d.ts +7 -0
  167. package/dist-lib/scripting/lua/rex.d.ts +4 -2
  168. package/dist-lib/scripting/lua/sqlRowEncoder.d.ts +6 -1
  169. package/dist-lib/scripting/lua/utf8CaseMap.d.ts +1 -0
  170. package/dist-lib/scripting/lua/utf8Patterns.d.ts +21 -1
  171. package/dist-lib/scripting/lua/wellFormedStrings.d.ts +40 -0
  172. package/dist-lib/scripting/lua/yajl.d.ts +43 -5
  173. package/dist-lib/scripting/profilesPresence.d.ts +20 -2
  174. package/dist-lib/scripting/vfs/ProfileVFS.d.ts +164 -10
  175. package/dist-lib/scripting/vfs/fsErrors.d.ts +28 -0
  176. package/dist-lib/scripting/vfs/idbCommit.d.ts +20 -0
  177. package/dist-lib/storage/appStore.d.ts +24 -9
  178. package/dist-lib/storage/hooks.d.ts +5 -1
  179. package/dist-lib/storage/index.d.ts +2 -2
  180. package/dist-lib/storage/mapStorage.d.ts +2 -0
  181. package/dist-lib/storage/persistentStorage.d.ts +3 -1
  182. package/dist-lib/storage/profileStorage.d.ts +15 -0
  183. package/dist-lib/storage/profileVfsData.d.ts +3 -3
  184. package/dist-lib/storage/schema.d.ts +512 -40
  185. package/dist-lib/storage/storageMigration.d.ts +82 -0
  186. package/dist-lib/storage-g5V1b-c1.js +2039 -0
  187. package/dist-lib/styles.css +1 -1
  188. package/dist-lib/ui/AboutModal.d.ts +1 -1
  189. package/dist-lib/ui/BrandLoginFields.d.ts +1 -1
  190. package/dist-lib/ui/BrowserSignInModal.d.ts +23 -0
  191. package/dist-lib/ui/CmdLineMenuRegistry.d.ts +14 -5
  192. package/dist-lib/ui/CommandBar.d.ts +8 -8
  193. package/dist-lib/ui/ConnectionFormModal.d.ts +20 -1
  194. package/dist-lib/ui/ConnectionScreen.d.ts +9 -1
  195. package/dist-lib/ui/GameLinkPrompt.d.ts +28 -0
  196. package/dist-lib/ui/HelpModal.d.ts +5 -1
  197. package/dist-lib/ui/MapSymbolUsageModal.d.ts +32 -0
  198. package/dist-lib/ui/MouseEventRegistry.d.ts +31 -4
  199. package/dist-lib/ui/NotepadModal.d.ts +22 -0
  200. package/dist-lib/ui/ResizableModal.d.ts +16 -1
  201. package/dist-lib/ui/SettingsModal.d.ts +10 -1
  202. package/dist-lib/ui/TlsAlertBanner.d.ts +3 -1
  203. package/dist-lib/ui/Toolbar.d.ts +22 -1
  204. package/dist-lib/ui/VaultManageButton.d.ts +10 -5
  205. package/dist-lib/ui/VaultModal.d.ts +3 -0
  206. package/dist-lib/ui/buttons/ButtonsBar.d.ts +3 -1
  207. package/dist-lib/ui/buttons/inactiveButtons.d.ts +25 -0
  208. package/dist-lib/ui/cmdline/CommandLineManager.d.ts +19 -0
  209. package/dist-lib/ui/cmdline/plainText.d.ts +16 -0
  210. package/dist-lib/ui/cmdline/subCommandLine.d.ts +78 -0
  211. package/dist-lib/ui/cmdline/useCmdLineSelection.d.ts +26 -0
  212. package/dist-lib/ui/cmdline/useSubCommandLineKeys.d.ts +33 -0
  213. package/dist-lib/ui/codemirror/lineParagraphMarks.d.ts +19 -0
  214. package/dist-lib/ui/codemirror/luaHover.d.ts +7 -0
  215. package/dist-lib/ui/codemirror/options.d.ts +33 -0
  216. package/dist-lib/ui/codemirror/theme.d.ts +29 -5
  217. package/dist-lib/ui/commands/addonCommands.d.ts +134 -0
  218. package/dist-lib/ui/commands/appShortcuts.d.ts +86 -0
  219. package/dist-lib/ui/commands/hostCommands.d.ts +88 -0
  220. package/dist-lib/ui/commands/keyMatch.d.ts +20 -0
  221. package/dist-lib/ui/commands/keySequence.d.ts +57 -0
  222. package/dist-lib/ui/components/ContextMenu.d.ts +21 -1
  223. package/dist-lib/ui/components/FontPicker.d.ts +5 -1
  224. package/dist-lib/ui/components/useModalFocus.d.ts +13 -1
  225. package/dist-lib/ui/helpTopics.d.ts +15 -0
  226. package/dist-lib/ui/labels/LabelManager.d.ts +172 -9
  227. package/dist-lib/ui/labels/LabelOverlay.d.ts +19 -0
  228. package/dist-lib/ui/labels/backgroundImageSize.d.ts +19 -0
  229. package/dist-lib/ui/labels/labelModel.d.ts +64 -0
  230. package/dist-lib/ui/labels/qColor.d.ts +13 -0
  231. package/dist-lib/ui/labels/qtCss.d.ts +12 -4
  232. package/dist-lib/ui/landmarks.d.ts +9 -0
  233. package/dist-lib/ui/launcher/ActionMenu.d.ts +19 -0
  234. package/dist-lib/ui/launcher/GameDetails.d.ts +21 -0
  235. package/dist-lib/ui/launcher/GameSection.d.ts +18 -0
  236. package/dist-lib/ui/launcher/LauncherSearch.d.ts +23 -0
  237. package/dist-lib/ui/launcher/ProfileArt.d.ts +20 -0
  238. package/dist-lib/ui/launcher/ProfileSection.d.ts +43 -0
  239. package/dist-lib/ui/launcher/launcherModel.d.ts +72 -0
  240. package/dist-lib/ui/layout/overlayLayerOrder.d.ts +2 -2
  241. package/dist-lib/ui/menu/MenuBar.d.ts +31 -0
  242. package/dist-lib/ui/menu/SplitButton.d.ts +39 -0
  243. package/dist-lib/ui/menu/anchoredPopup.d.ts +74 -0
  244. package/dist-lib/ui/menu/appMenus.d.ts +65 -0
  245. package/dist-lib/ui/menu/menuModel.d.ts +88 -0
  246. package/dist-lib/ui/menu/toolbarModel.d.ts +56 -0
  247. package/dist-lib/ui/notepad.d.ts +76 -0
  248. package/dist-lib/ui/openSignInPage.d.ts +14 -0
  249. package/dist-lib/ui/output/OutputContextMenu.d.ts +14 -1
  250. package/dist-lib/ui/output/OutputRenderer.d.ts +5 -0
  251. package/dist-lib/ui/output/OutputSearchBar.d.ts +5 -1
  252. package/dist-lib/ui/output/StickyOutputPanel.d.ts +17 -3
  253. package/dist-lib/ui/output/TextAnalyzerModal.d.ts +25 -0
  254. package/dist-lib/ui/output/caretMode.d.ts +3 -2
  255. package/dist-lib/ui/output/clearSplit.d.ts +11 -0
  256. package/dist-lib/ui/output/outputCopy.d.ts +41 -2
  257. package/dist-lib/ui/output/outputRows.d.ts +43 -0
  258. package/dist-lib/ui/output/selectionGesture.d.ts +35 -0
  259. package/dist-lib/ui/output/wordSelection.d.ts +33 -0
  260. package/dist-lib/ui/search/matcher.d.ts +14 -4
  261. package/dist-lib/ui/settings/SettingsShell.d.ts +91 -0
  262. package/dist-lib/ui/settings/ShortcutEditor.d.ts +13 -0
  263. package/dist-lib/ui/sound/SoundManager.d.ts +210 -44
  264. package/dist-lib/ui/sound/closedCaption.d.ts +4 -1
  265. package/dist-lib/ui/sound/mediaDirection.d.ts +35 -0
  266. package/dist-lib/ui/tabCompletion.d.ts +53 -0
  267. package/dist-lib/ui/textedit/TextEditManager.d.ts +11 -2
  268. package/dist-lib/ui/useOpenProfiles.d.ts +1 -1
  269. package/dist-lib/ui/video/VideoManager.d.ts +7 -0
  270. package/dist-lib/ui/windows/WindowManager.d.ts +452 -37
  271. package/dist-lib/ui/windows/panels/ScriptEditorPanel.d.ts +14 -0
  272. package/dist-lib/ui/windows/panels/ScriptSearch.d.ts +6 -1
  273. package/dist-lib/ui/windows/panels/TextPanel.d.ts +4 -1
  274. package/dist-lib/ui/windows/panels/VariablesView.d.ts +37 -7
  275. package/dist-lib/ui/windows/panels/WindowCmdLine.d.ts +4 -2
  276. package/dist-lib/ui/windows/panels/aliasLoop.d.ts +24 -0
  277. package/dist-lib/ui/windows/panels/editorClipboard.d.ts +45 -0
  278. package/dist-lib/ui/windows/panels/editorUndo.d.ts +79 -0
  279. package/dist-lib/ui/windows/panels/mapAreaChange.d.ts +10 -0
  280. package/dist-lib/utils/appShellCache.d.ts +25 -0
  281. package/dist-lib/utils/fontFamilyName.d.ts +13 -0
  282. package/dist-lib/utils/fontLoader.d.ts +31 -0
  283. package/dist-lib/utils/formatBytes.d.ts +4 -0
  284. package/dist-lib/utils/mustBeOneOf.d.ts +9 -0
  285. package/dist-lib/utils/profileLock.d.ts +1 -1
  286. package/dist-lib/utils/systemTheme.d.ts +24 -0
  287. package/dist-lib/utils/timeZone.d.ts +10 -0
  288. package/dist-lib/vault/CredentialVault.d.ts +51 -5
  289. package/dist-lib/vault/deviceUnlock.d.ts +47 -0
  290. package/dist-lib/vault/vaultAccess.d.ts +24 -2
  291. package/dist-lib/vault/vaultHelpTopic.d.ts +9 -0
  292. package/dist-lib/vault/vaultRecord.d.ts +33 -1
  293. package/dist-lib/vfs-sw.js +220 -11
  294. package/dist-lib/vite.d.ts +1 -1
  295. package/dist-lib/vite.js +66 -43
  296. package/package.json +23 -15
  297. package/dist-lib/assets/mapParser.worker-t-3rd1zR.js +0 -9
  298. package/dist-lib/mud/connection/PingTracker.d.ts +0 -41
  299. package/dist-lib/ui/BundledGameGrid.d.ts +0 -21
  300. package/dist-lib/ui/ConnectionGrid.d.ts +0 -21
  301. 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
- * Install a Mudlet package from in-memory bytes. Synchronous — the caller is
25
- * expected to flush the VFS afterwards (or let the next idle flush handle it).
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): MudletImportResult;
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
- * Install a module from a path that already lives inside the profile's VFS.
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 installModuleFromVfsPath(absolutePath: string, vfs: ProfileVFS,
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): InstallResult;
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?: string;
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, which
46
- * is the opposite of what this parser assumed before
47
- * Returns null when neither shape applies or the URL is empty. Mudlet also
48
- * requires both fields in the legacy shape and drops the message otherwise, so
49
- * a lone line is only accepted as a bare URL from the JSON-ish path, never as a
50
- * half-decoded legacy pair.
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;
@@ -1,11 +1,16 @@
1
1
  import './styles.css';
2
2
  export { MudletWebApp } from "./MudletWebApp";
3
- export { getBrand, isBrandedMode, isPackageRemovable, getThemeChoices, isLightTheme, DEFAULT_BRAND, STOCK_THEMES, type BrandConfig, type BrandMudTarget, type BrandPackage, type BrandTheme, type BrandToolbarButton, type BrandToolbarConfig, type BrandToolbarContext, type StockToolbarButton, type LandingProps, } from "./branding";
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";