@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,4 +1,4 @@
1
- import type { TriggerPattern } from '../storage/schema';
1
+ import type { KeyNode, TriggerPattern } from '../storage/schema';
2
2
  import type { InstallOutcome } from './ScriptingAPI';
3
3
  /**
4
4
  * The item families the tree-walking APIs accept, lowercased — Mudlet's
@@ -40,6 +40,12 @@ export interface TempComplexTriggerSpec {
40
40
  fg?: string;
41
41
  bg?: string;
42
42
  };
43
+ /** Its code string did not compile. Mudlet still makes the trigger, but it
44
+ * is inactive however it is switched — it never matches or highlights. */
45
+ uncompiled?: boolean;
46
+ /** Called once when the trigger is killed or expires, so the callback it
47
+ * dispatches to can be let go of. */
48
+ onFree?: () => void;
43
49
  }
44
50
  export interface EngineHost {
45
51
  /** Run a chunk of Lua on behalf of a clicked hyperlink. Errors are reported
@@ -75,11 +81,21 @@ export interface EngineHost {
75
81
  flushPendingApplies(): void;
76
82
  /** Raise a Mudlet event with the given arguments. */
77
83
  raiseEvent(event: string, args: unknown[]): void;
84
+ /** Raise sysExitEvent now, while the profile is still connected. It is
85
+ * raised at most once per engine, so the teardown that follows does not
86
+ * repeat it. */
87
+ raiseExitEvent(): void;
78
88
  installPackageFromVfsPath(path: string): InstallOutcome;
79
89
  uninstallPackageByName(name: string): boolean;
90
+ /** Which package or module owns the code a Lua frame is running ('' for
91
+ * the profile's own), from the frame's chunk source. */
92
+ packageOfCaller(source: string, isMain: boolean, calledFromMain: boolean): string;
93
+ /** Lua `uninstallPackage()`: the refusal, or null once it is uninstalled. */
94
+ uninstallPackageFromScript(name: string): string | null;
80
95
  getPackageNames(): string[];
81
96
  getPackageInfo(name: string): Record<string, string>;
82
- setPackageInfo(name: string, key: string, value: string): boolean;
97
+ /** The refusal, or null once the field is set. */
98
+ setPackageInfo(name: string, key: string, value: string): string | null;
83
99
  installModuleFromPath(path: string): InstallOutcome;
84
100
  uninstallModuleByName(name: string): boolean;
85
101
  syncModuleToFile(name: string): Promise<void>;
@@ -87,21 +103,27 @@ export interface EngineHost {
87
103
  saveSyncedModules(): void;
88
104
  /** Write the profile out as a Mudlet-format XML save, answering with the
89
105
  * full path written. The XML half of `saveProfile([location [, saveName]])`. */
106
+ /** A refusal names the file it could not write, when it got that far. */
90
107
  saveProfileXml(location?: string, saveName?: string): {
91
108
  ok: true;
92
109
  path: string;
93
110
  } | {
94
111
  ok: false;
95
112
  err: string;
113
+ path?: string;
96
114
  };
97
- reloadModuleFromFile(name: string): boolean;
115
+ /** Put package installs off until the turn that started a profile save has
116
+ * ended; see ScriptingEngine.markProfileSaveInFlight. */
117
+ markProfileSaveInFlight(): void;
118
+ reloadModuleFromFile(name: string): InstallOutcome;
98
119
  setModuleSync(name: string, sync: boolean): void;
99
120
  getModuleSync(name: string): boolean;
100
121
  setModulePriority(name: string, priority: number): boolean;
101
122
  getModulePriority(name: string): number;
102
123
  getModuleNames(): string[];
103
124
  getModulePath(name: string): string | null;
104
- setModuleInfo(name: string, key: string, value: string): boolean;
125
+ /** The refusal, or null once the field is set. */
126
+ setModuleInfo(name: string, key: string, value: string): string | null;
105
127
  /** Module manifest fields as a flat record, with any Lua-set overrides
106
128
  * applied. Null when no module by that name is installed. */
107
129
  getModuleInfoRecord(name: string): Record<string, unknown> | null;
@@ -132,20 +154,16 @@ export interface EngineHost {
132
154
  /** Null when the toolbar moved, otherwise why it did not. */
133
155
  toggleToolBarByName(name: string, show: boolean): string | null;
134
156
  setTriggerStayOpenByName(name: string, lines: number): boolean;
135
- /** The saved keybinding carrying this numeric id, or null — getKeyCode
136
- * resolves a permanent key by the id permKey returned, not only by name. */
137
- keyNodeByNumericId(numericId: number): {
138
- key: string;
139
- modifiers: string[];
140
- } | null;
157
+ /** The saved keybinding or key group carrying this numeric id or name, or
158
+ * null — getKeyCode resolves a permanent key by the id permKey returned as
159
+ * well as by name, and reaches the groups and switched-off keys the key
160
+ * engine does not hold. */
161
+ savedKeyNode(idOrName: number | string): KeyNode | null;
141
162
  /** Mudlet's Host::setForceMXPProcessorOn — run the in-band MXP parser with
142
163
  * no option-91 handshake. */
143
164
  setForceMxpProcessorOn(on: boolean): void;
144
165
  /** Mudlet `exists(nameOrId, type)` — count of matching items. */
145
166
  existsByName(nameOrId: string | number, type: string): number;
146
- /** enable/disable a script-created temp trigger or alias by its numeric id.
147
- * False when no live temp item has that id. */
148
- setTempItemEnabled(id: number, enabled: boolean): boolean;
149
167
  /** Mudlet `isActive(nameOrId, type)` — count of matching *active* items. */
150
168
  isActiveByName(nameOrId: string | number, type: string, checkAncestors: boolean): number;
151
169
  ancestorsById(id: number, type: string): Array<{
@@ -175,13 +193,13 @@ export interface EngineHost {
175
193
  /** `modifier` arrives as a Qt::KeyboardModifier int; the engine translates
176
194
  * it back into `["ctrl", …]` strings to store on the KeyNode. */
177
195
  createPermKey(name: string, parent: string, modifier: number, key: string | number, code: string): number;
178
- createTempButton(toolbar: string, name: string, code: string, orientation: number): number;
196
+ createTempButton(toolbar: string, name: string, orientation: number): number;
179
197
  createTempButtonToolbar(name: string, orientation: number, location: number): number;
180
198
  /** True when the state actually changed; false when it already was that. */
181
- setButtonStateByName(name: string, state: boolean): boolean;
182
- getButtonStateByName(name: string): boolean | null;
199
+ setButtonStateByName(name: string | number, state: boolean): boolean;
200
+ getButtonStateByName(name: string | number): boolean | null;
183
201
  /** Which of Mudlet's button refusals applies to `name`. */
184
- buttonKindByName(name: string): 'missing' | 'plain' | 'pushdown';
202
+ buttonKindByName(name: string | number): 'missing' | 'plain' | 'pushdown';
185
203
  setButtonStyleSheetByName(name: string, css: string): boolean;
186
204
  setScriptByName(name: string, code: string, pos: number): number;
187
205
  getScriptByName(name: string, pos: number): {
@@ -190,15 +208,21 @@ export interface EngineHost {
190
208
  } | null;
191
209
  /** Remove the script with this numeric id; true when one was removed. */
192
210
  removeScriptById(id: number): boolean;
211
+ /** Why the body of the script with this numeric id failed the last time it
212
+ * ran, or null when it ran cleanly. */
213
+ scriptLoadErrorById(id: number): string | null;
193
214
  /** Mudlet's killTimer/killAlias/killTrigger/killKey by permanent-item name. */
194
215
  killByName(kind: 'timer' | 'alias' | 'trigger' | 'key', name: string): boolean;
195
- /** Mudlet `resetProfile()` — reload the profile with a fresh Lua VM. */
196
- resetProfile(): void;
197
- /** Render a map area to a PNG inside the profile VFS. */
198
- exportAreaImageToVfs(areaId: number, filePath: string, zLevel?: number): {
216
+ /** Mudlet `resetProfile()` — reload the profile with a fresh Lua VM. True
217
+ * when the reset was armed, false when it was refused. */
218
+ resetProfile(): boolean;
219
+ /** Render a map area to a PNG inside the profile VFS — one z level, or
220
+ * every level to a file each for `true`. */
221
+ exportAreaImageToVfs(areaId: number, filePath: string, zLevel?: number | true): {
199
222
  path: string;
200
223
  } | {
201
224
  error: string;
225
+ target?: boolean;
202
226
  };
203
227
  }
204
228
  /**
@@ -26,10 +26,51 @@ export interface LuaGlobalEntry {
26
26
  builtin?: boolean;
27
27
  keyKind?: string;
28
28
  }
29
+ /** One step of a path into `_G`: the key, and whether Lua holds it as a string
30
+ * or a number (`myTable.name` vs `myTable[3]`). */
31
+ export interface VariablePathSegment {
32
+ key: string;
33
+ kind: 'string' | 'number';
34
+ }
35
+ /**
36
+ * One edit the Variables view asks the runtime to make.
37
+ *
38
+ * `set` assigns `value`, read according to `valueType` — retyping to `table`
39
+ * keeps an existing table's contents rather than emptying it. `move` renames
40
+ * the last segment in place (which is also how the key type is changed), and
41
+ * refuses to overwrite a key that already exists. `delete` assigns nil.
42
+ */
43
+ export type VariableEdit = {
44
+ op: 'set';
45
+ path: VariablePathSegment[];
46
+ valueType: 'string' | 'number' | 'boolean' | 'table';
47
+ value: string;
48
+ } | {
49
+ op: 'move';
50
+ path: VariablePathSegment[];
51
+ to: VariablePathSegment;
52
+ } | {
53
+ op: 'delete';
54
+ path: VariablePathSegment[];
55
+ };
56
+ /** A script's event-handler-list registration (Host::mEventHandlerMap entry):
57
+ * the name its handler function is looked up by, whether it may run right now
58
+ * (isActive() && ancestorsActive()), and the events it lists. No events means
59
+ * the script is not registered at all. */
60
+ export interface ScriptHandlerEntry {
61
+ id: string;
62
+ name: string;
63
+ active: boolean;
64
+ events: string[];
65
+ }
29
66
  export interface IScriptingRuntime {
30
67
  load(code: string, name: string): void;
31
- /** Execute a code chunk once, without match context. Used for timers and keybindings. */
32
- run(code: string, name: string): void;
68
+ /** Execute a code chunk once, without match context. Used for timers and
69
+ * keybindings. `chunkName` as for {@link runWithMatches}. */
70
+ run(code: string, name: string, chunkName?: string): void;
71
+ /** The error compiling `code` gives, without running it, or null when it
72
+ * compiles. `chunkName` is used as Lua's chunk name verbatim. */
73
+ syntaxError?(code: string, chunkName: string): string | null;
33
74
  /** Dispatch an event to user-registered handlers. Handlers run synchronously. */
34
75
  emitEvent(event: string, args: unknown[]): void;
35
76
  /**
@@ -47,7 +88,29 @@ export interface IScriptingRuntime {
47
88
  * `name` is the flat variable name; the value is a scalar string.
48
89
  */
49
90
  setMsspValue(name: string, value: string): void;
50
- runWithMatches(code: string, name: string, matches: (string | undefined)[], multimatches?: (string | undefined)[][], namedGroups?: Record<string, string>, captureSpans?: CaptureSpan[], namedSpans?: Record<string, CaptureSpan>, fullMatchSpan?: CaptureSpan): void;
91
+ /**
92
+ * Write one zMUD channel-102 report into the runtime's `channel102` table.
93
+ * Both halves are the raw bytes the subnegotiation carried.
94
+ */
95
+ setChannel102Value(variable: number, value: number): void;
96
+ /**
97
+ * Write one ATCP message into the runtime's `atcp` table: `name` is the
98
+ * dotless message name (`CharVitals`), `value` its string.
99
+ */
100
+ setAtcpValue(name: string, value: string): void;
101
+ runWithMatches(code: string, name: string, matches: (string | undefined)[], multimatches?: (string | undefined)[][], namedGroups?: Record<string, string>, captureSpans?: CaptureSpan[], namedSpans?: Record<string, CaptureSpan>, fullMatchSpan?: CaptureSpan,
102
+ /** Named captures per multimatches row, aligned with it. */
103
+ multiNamedGroups?: (Record<string, string> | undefined)[],
104
+ /** The chunk name Lua reports the code under — Mudlet's
105
+ * "Trigger: <name>" / "Alias: <name>". Without one, `name` is used
106
+ * as a file name ("@name"). Last, so the positional callers ahead of
107
+ * it are undisturbed. */
108
+ chunkName?: string): void;
109
+ /** Run `fn` with a fire's captures in place for selectCaptureGroup and the
110
+ * like, leaving the script-facing `matches` table alone — what a trigger
111
+ * whose command is sent, or which has no script, hands on (desktop's
112
+ * setCaptureGroups without the call that builds `matches`). */
113
+ withCaptures?(matches: (string | undefined)[], captureSpans: CaptureSpan[] | undefined, namedSpans: Record<string, CaptureSpan> | undefined, fullMatchSpan: CaptureSpan | undefined, fn: () => void): void;
51
114
  destroy(): void;
52
115
  /** Bytes behind a path in the runtime's read-only bundled namespace, or null
53
116
  * when it has none / the path is not one of them. Optional because it is a
@@ -64,11 +127,33 @@ export interface IScriptingRuntime {
64
127
  * stock "Repeat Last Command" key (`send(command)`).
65
128
  */
66
129
  setCommand(command: string): void;
130
+ /** Start an alias pass for `command`: {@link setCommand}, and drop what an
131
+ * enclosing pass kept for {@link settleCommandAfterAliasPass}. */
132
+ setExpandedCommand?(command: string): void;
133
+ /** End of an alias pass, at every depth: `command` holds the last command
134
+ * expanded unless a script set it (TLuaInterpreter::settleCommandAfterAliasPass). */
135
+ settleCommandAfterAliasPass?(): void;
136
+ /** Run `fn`, whose entry into the runtime is an alias's script — the only
137
+ * caller expandAlias() hands its own `command` back to. */
138
+ asAliasScript?<T>(fn: () => T): T;
67
139
  /**
68
140
  * Evaluate a Lua-function trigger pattern. Side effects (raiseEvent, etc.)
69
141
  * always run; the trigger "matches" only when the body returns truthy.
70
142
  */
71
143
  evalTriggerPattern(code: string): boolean;
144
+ /** Run a package's `config.lua` in an empty environment and report what it
145
+ * set, or why it never finished — the way Mudlet reads a manifest.
146
+ *
147
+ * Optional: a runtime that cannot run one leaves the installer to read the
148
+ * manifest by pattern, which is enough for a well-formed config.lua and
149
+ * cannot tell a manifest that would raise from one that would not. */
150
+ readPackageConfig?(source: string): {
151
+ ok: true;
152
+ info: Record<string, string>;
153
+ } | {
154
+ ok: false;
155
+ reason: string;
156
+ };
72
157
  /**
73
158
  * Raise sysDataSendRequest and report whether a handler called
74
159
  * denyCurrentSend().
@@ -81,32 +166,20 @@ export interface IScriptingRuntime {
81
166
  */
82
167
  startSpeedWalk(from: number, to: number): void;
83
168
  /**
84
- * Kill every event handler registered by `wrapScript` for the given
85
- * script id. Called when a script is removed or disabled so its handlers
86
- * stop firing without waiting for a full runtime reload.
87
- */
88
- killScriptHandlers(scriptId: string): void;
89
- /**
90
- * True when a script-created (temp) alias/trigger with this id is live and of
91
- * the given type. Backs exists(id, "alias"/"trigger") for temp items, which
92
- * (unlike permanent items) don't live in the persisted store.
169
+ * Bring scripts' event-handler-list registrations up to date: register,
170
+ * re-register after a list change (to the end, as setEventHandlerList
171
+ * does), rename, flip the active flag, or drop one (empty `events`).
93
172
  */
94
- tempItemExists(id: number, type: string): boolean;
95
- /** A live temp item of `type` carrying this script-supplied name (Mudlet's
96
- * tempComplexRegexTrigger is the one temp API that takes one), or null. */
97
- tempItemIdByName(name: string, type: string): number | null;
173
+ syncScriptHandlers(entries: ScriptHandlerEntry[]): void;
98
174
  /** Publish one use of a server-defined MXP element as `mxp.<element>`. */
99
- setMxpElement(name: string, attrs: Record<string, string>): void;
100
- /** Whether a live temp item is enabled — backs `isActive(id, type)`. */
101
- tempItemEnabled(id: number): boolean;
102
- /** enable/disable a live temp item by id — backs enableTrigger/disableTrigger
103
- * (and the alias pair) when handed the numeric id rather than a name. */
104
- setTempItemEnabled(id: number, enabled: boolean): boolean;
105
- /** Free every temp item killed since the last call, or only those of `type`.
106
- * A killed item stops firing immediately but stays findable until here,
107
- * which is Mudlet's deferred per-unit cleanup: aliases are reaped when
108
- * nested alias processing unwinds, triggers when the line batch finishes. */
109
- reapKilledTempItems(type?: 'alias' | 'trigger'): void;
175
+ setMxpElement(name: string, attrs: Record<string, string>, body?: {
176
+ text: string;
177
+ actions: string[];
178
+ }): void;
179
+ /** Whether the capture globals are being built, when a pass a __gc
180
+ * finaliser starts is refused (TLuaInterpreter::buildingCaptureTables).
181
+ * Optional: a runtime with no finalisers never builds under one. */
182
+ buildingCaptureTables?(): boolean;
110
183
  /** Rebuild saved Lua globals (a Mudlet `<VariablePackage>` tree) into `_G`. */
111
184
  restoreVariables(vars: MudletVariable[]): void;
112
185
  /** Snapshot the save-listed globals out of `_G` into a variable tree. */
@@ -114,4 +187,7 @@ export interface IScriptingRuntime {
114
187
  /** Enumerate `_G` for the Variables view: user globals as a full nested tree,
115
188
  * built-ins flagged (and not recursed). */
116
189
  listGlobals(): LuaGlobalEntry[];
190
+ /** Apply one Variables-view edit to `_G`. Returns null on success, or the
191
+ * reason it was refused. */
192
+ editVariable(request: VariableEdit): string | null;
117
193
  }
@@ -14,7 +14,7 @@
14
14
  * This class owns the same bookkeeping — the frame records, the accumulated
15
15
  * borders, the parent/child hierarchy and the tab groups — and drives the UI
16
16
  * through {@link MxpFrameHost} so the geometry is testable without a DOM.
17
- * mudix maps a frame's console onto a mini-console (an overlay panel with
17
+ * Mudlet Web maps a frame's console onto a mini-console (an overlay panel with
18
18
  * script-controlled geometry); the tab strip is window chrome rendered by
19
19
  * ScriptWindow, and child frames nest by portalling into the parent panel's
20
20
  * viewport, so their coordinates are parent-relative.
@@ -51,7 +51,13 @@ export interface MxpFrameHost {
51
51
  placeFrameConsole(name: string, x: number, y: number, width: number, height: number, parent?: string): void;
52
52
  /** Open an `EXTERNAL` frame as a free-floating window with its own titlebar. */
53
53
  openExternalFrame(name: string, title: string, width: number, height: number): void;
54
+ /** Close a frame's console — only while it is still the frame's own: a
55
+ * script that deleted it and made a window of its own under the name
56
+ * keeps that window. */
54
57
  destroyFrameConsole(name: string): void;
58
+ /** Whether a script's own window holds `name`, which a frame must not
59
+ * take over: closing the frame would leave the window unreachable. */
60
+ nameTakenByScript(name: string): boolean;
55
61
  showFrameConsole(name: string): void;
56
62
  raiseFrameConsole(name: string): void;
57
63
  setFrameScrolling(name: string, enabled: boolean): void;
@@ -101,6 +107,9 @@ export declare class MxpFrameManager {
101
107
  * omitting it keeps whichever page is showing, so a tab arriving or closing
102
108
  * never yanks the reader off the one they were watching. */
103
109
  private publishTabs;
110
+ /** Whether `name` is a page of a tab strip that is showing another page —
111
+ * a tab host's own console included, once a docked frame is in front. */
112
+ isBehindTab(name: string): boolean;
104
113
  /** Bring `name` to the front of whichever tab strip holds it, if any. */
105
114
  private selectTabFor;
106
115
  /**