@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
@@ -0,0 +1,25 @@
1
+ interface Props {
2
+ /** The raw selection, as taken from the console. Trimmed to its first line
3
+ * here rather than by the caller, so the modal can say that it did. */
4
+ selection: string;
5
+ onClose: () => void;
6
+ }
7
+ /**
8
+ * Mudlet's "Analyse characters" report (`TTextEdit::slot_analyseSelection`),
9
+ * as a dialog rather than as a tooltip.
10
+ *
11
+ * Desktop builds the table into the context-menu item's tooltip and shows it on
12
+ * hover, which works because a Qt tooltip can be arbitrarily large and stays up
13
+ * while the menu does. In a browser the menu item is a `<button>` and its
14
+ * `title` is a one-line string the OS draws — so the report gets a dialog of
15
+ * its own, where it can also be selected and copied, which the tooltip never
16
+ * allowed.
17
+ *
18
+ * The table is transposed from desktop's: Mudlet lays characters out across the
19
+ * page in rows of about sixteen, which suits a fixed-size tooltip and means a
20
+ * long selection wraps into a block. Here each character is a row, so the
21
+ * columns stay aligned however long the selection is and the dialog scrolls
22
+ * the way every other list in the app does.
23
+ */
24
+ export declare function TextAnalyzerModal({ selection, onClose }: Props): import("react").ReactPortal;
25
+ export {};
@@ -18,8 +18,9 @@ export type CaretShortcut = 'none' | 'tab' | 'ctrltab' | 'f6';
18
18
  * and the modifier flags. */
19
19
  export declare function matchCaretToggle(e: KeyboardEvent, shortcut: CaretShortcut): boolean;
20
20
  /** The rendered line elements under the main output wrapper, in order. Each
21
- * logical line is one `div.output-msg`; the height:0 sticky sentinel and any
22
- * other children are skipped (mirrors WindowManager.lineElements). */
21
+ * logical line is one `div.output-msg`, inside a scrollback block
22
+ * (outputRows.ts); the height:0 sticky sentinel and any other children are
23
+ * skipped (mirrors WindowManager.lineElements). */
23
24
  export declare function outputLineElements(outputEl: HTMLElement): HTMLElement[];
24
25
  /**
25
26
  * Clone one rendered output line for the review surface and revive its links.
@@ -1,3 +1,6 @@
1
+ /** The height in px the split view's lower pane opens at, before the player
2
+ * drags it. */
3
+ export declare const DEFAULT_SPLIT_PANE_HEIGHT = 160;
1
4
  /**
2
5
  * Closing the split view — Mudlet's `TConsole::clearSplit`, which drops the
3
6
  * frozen upper pane and puts the console back on the tail. Mudlet reaches it
@@ -15,3 +18,11 @@ export declare function matchClearSplitKey(e: KeyboardEvent): boolean;
15
18
  export declare function isClearSplitClick(e: {
16
19
  button: number;
17
20
  }): boolean;
21
+ /**
22
+ * The page the main command line's PageUp / PageDown scroll the main console by
23
+ * (`TCommandLine::event` → `TConsole::scrollUp/scrollDown`), or null when `e`
24
+ * is not one. Plain keys only, typed into the main command line: desktop offers
25
+ * a modified PageUp to the keybinding engine instead, and Qt reports a numpad
26
+ * key with KeypadModifier set, so that one is not plain either.
27
+ */
28
+ export declare function matchPageScrollKey(e: KeyboardEvent): 'up' | 'down' | null;
@@ -1,7 +1,44 @@
1
1
  /** True when the current selection touches any line inside `container`. */
2
2
  export declare function hasSelectionIn(container: HTMLElement): boolean;
3
+ /** A selection as desktop's TTextEdit holds it (mPA / mPB): the line and
4
+ * column of its first character and of its last, buffer lines counted from
5
+ * 0. All zero when nothing in the console is selected. */
6
+ export interface SelectionBounds {
7
+ startX: number;
8
+ startY: number;
9
+ endX: number;
10
+ endY: number;
11
+ }
12
+ export declare const NO_SELECTION_BOUNDS: SelectionBounds;
13
+ /**
14
+ * Where the selection lies in `container`, in the form addMouseEvent handlers
15
+ * receive it (TTextEdit::slot_mouseAction passes mPA.x, mPA.y, mPB.x, mPB.y).
16
+ * The end is the last selected character, not one past it.
17
+ */
18
+ export declare function selectionBounds(container: HTMLElement): SelectionBounds;
19
+ /** True when this console holds any line at all — what separates "nothing is
20
+ * selected" from "there is nothing here to copy". */
21
+ export declare function hasCopyableLines(container: HTMLElement): boolean;
22
+ /** Open a web search for the selected text, the way Mudlet's
23
+ * `TTextEdit::searchSelectionOnline` does. `engine` is a {@link SEARCH_ENGINES}
24
+ * key; an unknown one falls back to the default engine. */
25
+ export declare function searchSelectionOnline(engine: string | undefined): void;
26
+ /** The current selection's ranges, cloned so later collapsing cannot disturb
27
+ * them. Empty when nothing is selected. */
28
+ export declare function saveSelection(): Range[];
29
+ /**
30
+ * Put `saved` back when the selection has since been collapsed — the browser
31
+ * does that on a right-click outside the selection, and whenever a text field
32
+ * takes focus. A selection that survived is left alone, and so is one whose
33
+ * lines have since scrolled out of the buffer (restoring a detached range would
34
+ * select nothing at all).
35
+ */
36
+ export declare function restoreSelection(container: HTMLElement, saved: Range[]): void;
3
37
  /** Select every line in the container (Range over its contents). */
4
38
  export declare function selectAll(container: HTMLElement): void;
39
+ /** The native selection text verbatim (character-precise). Timestamps sit in a
40
+ * `user-select: none` span, so they are absent here as they are from a copy. */
41
+ export declare function selectionText(): string;
5
42
  /** Copy the native selection text verbatim (character-precise). */
6
43
  export declare function copySelectionText(): Promise<void>;
7
44
  /**
@@ -10,6 +47,8 @@ export declare function copySelectionText(): Promise<void>;
10
47
  * paste it rendered) and `text/plain` (so plain targets paste the HTML markup
11
48
  * itself), with a `writeText` fallback for browsers without ClipboardItem.
12
49
  */
13
- export declare function copySelectionAsHtml(container: HTMLElement): Promise<void>;
14
- /** Copy the selected lines to the clipboard as a PNG image. */
50
+ export declare function copySelectionAsHtml(container: HTMLElement, sourceName?: string): Promise<void>;
51
+ /** Copy the selection to the clipboard as a PNG image, falling back to a
52
+ * picture of the visible area when nothing is selected — unlike Copy and Copy
53
+ * as HTML, "as image" has an obvious default (Mudlet #9715). */
15
54
  export declare function copySelectionAsImage(container: HTMLElement): Promise<void>;
@@ -0,0 +1,43 @@
1
+ export declare const OUTPUT_ROW_CLASS = "output-msg";
2
+ export declare const OUTPUT_BLOCK_CLASS = "output-block";
3
+ /** The newest block, still being written to, which is always rendered. */
4
+ export declare const OUTPUT_OPEN_BLOCK_CLASS = "output-block--open";
5
+ /** Rows a block holds before the next row starts a new one. */
6
+ export declare const OUTPUT_BLOCK_ROWS = 100;
7
+ export declare function isOutputBlock(el: Element | null): el is HTMLElement;
8
+ /**
9
+ * Add `row` as the console's newest line: into the last block before
10
+ * `sentinel` (the end of the scroller when null), or a new block when that
11
+ * one is full or there is none.
12
+ */
13
+ export declare function appendRow(container: HTMLElement, row: HTMLElement, sentinel?: Element | null): void;
14
+ /** Every row of the console, oldest first. */
15
+ export declare function outputRows(container: Element): HTMLElement[];
16
+ /** The last `n` rows of the console, oldest first. */
17
+ export declare function lastRows(container: Element, n: number): HTMLElement[];
18
+ /** How many rows the console holds. Counts blocks, not rows. */
19
+ export declare function rowCount(container: Element): number;
20
+ /** The row at 0-based `index`, or null past either end. */
21
+ export declare function rowAt(container: Element, index: number): HTMLElement | null;
22
+ /** `row`'s 0-based position in the console, or -1 when it is not one of its rows. */
23
+ export declare function rowIndex(container: Element, row: Element): number;
24
+ /** The newest row, or null when the console is empty. */
25
+ export declare function lastRow(container: Element): HTMLElement | null;
26
+ /** The row before `row`, across a block boundary; null at the oldest. */
27
+ export declare function previousRow(row: Element): HTMLElement | null;
28
+ /** The row after `row`, across a block boundary; null at the newest. */
29
+ export declare function nextRow(row: Element): HTMLElement | null;
30
+ /** Take `el` out of its parent, and the block it was in with it once empty. */
31
+ export declare function detachRow(el: Element): void;
32
+ /**
33
+ * Take a run of `rows` out of the DOM at once — eviction's batch removal. A
34
+ * trim takes lines off the head of the console, which sit side by side in a
35
+ * few blocks: a block they fill goes whole, and the part of one they share
36
+ * with lines that stay goes as one Range deletion. Rows not side by side in
37
+ * their parent (some other element between two of them) are removed one at a
38
+ * time, so nothing that is not one of these rows is touched.
39
+ */
40
+ export declare function detachRows(rows: readonly Element[]): void;
41
+ /** Remove every row (and block) of the console, keeping anything else — the
42
+ * sticky sentinel. */
43
+ export declare function clearRows(container: Element): void;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Telling a click that *made* a selection from a click that is about to clear
3
+ * one — the question the console asks before handing focus back to the command
4
+ * line, since focusing a text field collapses the page selection.
5
+ *
6
+ * It cannot be answered by looking at the selection alone. Chrome collapses a
7
+ * selection on the click that lands inside it, but not until the tick *after*
8
+ * the click handler runs, so at that moment "text is selected" is equally true
9
+ * of a drag that just selected it and a click that is about to throw it away.
10
+ * (Clicking outside the selection is different again: that collapses on mouseup,
11
+ * before the click.) The gesture is what separates them — a drag or a
12
+ * multi-click selects, a plain single click does not.
13
+ */
14
+ /** The part of a click event this predicate reads. */
15
+ export interface ClickGesture {
16
+ /** Clicks in this sequence — 2 and 3 are the double/triple click that select
17
+ * a word and a line. */
18
+ detail: number;
19
+ /** Shift+click extends an existing selection rather than clearing it. */
20
+ shiftKey: boolean;
21
+ clientX: number;
22
+ clientY: number;
23
+ }
24
+ /**
25
+ * True when this click is the end of a gesture that selected text, and so must
26
+ * be left alone. False for a plain click — including one on top of an existing
27
+ * selection, which the browser is about to collapse anyway.
28
+ *
29
+ * `downAt` is where the button went down (null when the press was not seen, e.g.
30
+ * a click synthesised by the keyboard).
31
+ */
32
+ export declare function clickMadeSelection(e: ClickGesture, downAt: {
33
+ x: number;
34
+ y: number;
35
+ } | null, selectedText: string): boolean;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Mudlet's "Stop selecting a word on these characters"
3
+ * (`doubleclick_ignore_lineedit`).
4
+ *
5
+ * A double-click in the main display is the browser's own word selection, and
6
+ * the browser's idea of a word is not configurable. Mudlet's is: a profile can
7
+ * name extra characters that end a word, so double-clicking `"Ancalagon"` in a
8
+ * game that quotes names gives you the name rather than the name plus quotes.
9
+ *
10
+ * So the selection is narrowed after the fact — the browser picks a range, and
11
+ * this pulls each end inward past any listed character. Narrowing only: a
12
+ * double-click never selects *more* than the browser would, which keeps the
13
+ * behaviour predictable when the character set is empty or unhelpful.
14
+ */
15
+ /**
16
+ * Where the selection should end up, given the text the browser selected and
17
+ * the characters that end a word. Pure, so the edge cases are testable without
18
+ * a DOM: returns offsets into `text`, always within the original `[start, end)`.
19
+ *
20
+ * Trims from both ends, then — because a boundary character in the *middle* is
21
+ * a boundary too — keeps the run containing the click. `anchor` is where in the
22
+ * text the user actually clicked; the run covering it is the one they meant.
23
+ */
24
+ export declare function trimWordSelection(text: string, start: number, end: number, ignore: string, anchor?: number): {
25
+ start: number;
26
+ end: number;
27
+ };
28
+ /**
29
+ * Apply {@link trimWordSelection} to the live selection after a double-click.
30
+ * A no-op when the selection spans more than one text node — that is a
31
+ * multi-line or cross-span selection, which is not what a word looks like.
32
+ */
33
+ export declare function trimSelectionForDoubleClick(ignore: string): void;
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * The query compiler shared by every search bar in the app (the script editor's
3
- * `ScriptSearch`, the output find bar). Turns a raw query plus the case/regex
4
- * toggles into something that hands back match ranges for any string.
3
+ * `ScriptSearch`, the output find bar). Turns a raw query plus the
4
+ * case/regex/whole-word toggles into something that hands back match ranges for
5
+ * any string.
5
6
  */
6
7
  /** Half-open `[start, end)` character offsets of one match. */
7
8
  export type MatchRange = [number, number];
@@ -11,5 +12,14 @@ export interface SearchMatcher {
11
12
  valid: boolean;
12
13
  ranges: (s: string) => MatchRange[];
13
14
  }
14
- /** Compile a search bar query into a matcher honouring the case / regex flags. */
15
- export declare function buildMatcher(pattern: string, matchCase: boolean, useRegex: boolean): SearchMatcher;
15
+ /**
16
+ * Compile a search bar query into a matcher honouring the case / regex /
17
+ * whole-word flags.
18
+ *
19
+ * `wholeWord` follows `dlgTriggerEditor::findSearchMatch`
20
+ * (dlgTriggerEditor.cpp:13128-13148): the escaped needle wrapped in `\b…\b`. It
21
+ * composes with regex mode too, which desktop has no equivalent for since its
22
+ * search has no regex option — there the pattern is bracketed as written rather
23
+ * than escaped, so `gold|silver` matches either word whole.
24
+ */
25
+ export declare function buildMatcher(pattern: string, matchCase: boolean, useRegex: boolean, wholeWord?: boolean): SearchMatcher;
@@ -0,0 +1,91 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type LucideIcon } from 'lucide-react';
3
+ /**
4
+ * The sidebar-and-cards settings shell, ported from Mudlet's settings redesign
5
+ * (`dlgProfilePreferences` on its `settings-redesign` branch): a category
6
+ * sidebar down the left, a "Find in settings" field over a single reading
7
+ * column of cards, subpages reached by drilling into a card, and search results
8
+ * that gather the matching cards from every category under their own headings.
9
+ *
10
+ * Mudlet moves its real widgets between pages because Qt lets it. React does
11
+ * not, so every card is mounted once, in declaration order, and hidden when it
12
+ * is not on the page being shown — which is also what lets the search index be
13
+ * read straight off the rendered DOM instead of being duplicated as strings.
14
+ */
15
+ export type CategoryKey = 'general' | 'appearance' | 'mainDisplay' | 'inputLine' | 'editor' | 'shortcuts' | 'mapper' | 'media' | 'connection' | 'privacy' | 'accessibility' | 'advanced';
16
+ export interface CategoryDefinition {
17
+ key: CategoryKey;
18
+ /** Sidebar row, page title, and the heading a search result is filed under. */
19
+ label: string;
20
+ Icon: LucideIcon;
21
+ /** Mudlet's one sidebar separator, above Connection: what sits below it is
22
+ * about the game and the machine rather than about the client. */
23
+ separatorAbove?: boolean;
24
+ }
25
+ /** Sidebar order, icon and name — the one place a category is declared.
26
+ * Mirrors Mudlet's `categoryDefinitions()`, minus the category the web client
27
+ * has nothing to put on (Chat and sharing) and plus the one it does that
28
+ * Mudlet keeps on a toolbar instead (Sound and media). */
29
+ export declare const CATEGORIES: CategoryDefinition[];
30
+ /** A page reached by drilling into a card: the sidebar stays on the parent
31
+ * category and a breadcrumb with a back chevron leads out. */
32
+ export interface SubpageDefinition {
33
+ /** Unique across the dialog; the shell's `subpage` state and a card's
34
+ * `subpage` field both name a subpage by this. */
35
+ key: string;
36
+ category: CategoryKey;
37
+ /** What the breadcrumb calls it: "Connection › Game protocols". */
38
+ title: string;
39
+ }
40
+ export interface CardDefinition {
41
+ id: string;
42
+ category: CategoryKey;
43
+ /** Set to put the card on that subpage instead of on the category page. */
44
+ subpage?: string;
45
+ /** Omitted for a card that is a bare row rather than a titled group. */
46
+ title?: string;
47
+ /** One muted line under the title saying what the card is for. */
48
+ description?: ReactNode;
49
+ /** Where "Learn more" at the end of the description leads. */
50
+ learnMore?: string;
51
+ /** Words a player might type for a setting whose own text does not include
52
+ * them — folded into the card's search text, never shown. */
53
+ keywords?: string;
54
+ body: ReactNode;
55
+ }
56
+ interface SettingsShellProps {
57
+ cards: CardDefinition[];
58
+ subpages: SubpageDefinition[];
59
+ category: CategoryKey;
60
+ onCategory: (next: CategoryKey) => void;
61
+ /** Which subpage is showing, or null for the category page. */
62
+ subpage: string | null;
63
+ onSubpage: (next: string | null) => void;
64
+ /** The one sidebar row that is a link rather than a category — Mudlet's
65
+ * "Mudlet support", at the bottom under its own separator. Omit it and the
66
+ * row (and the offer under an empty search) goes away, which is how a
67
+ * branded build avoids pointing its players at someone else's wiki. */
68
+ support?: {
69
+ label: string;
70
+ url: string;
71
+ };
72
+ /** Opens the Help topic listing which desktop Mudlet preferences are absent
73
+ * here and why. Shown as a sidebar row, and offered again when a search
74
+ * finds nothing — the two moments a player is hunting for a setting that
75
+ * isn't there. Omitted like `support` by a branded build, which is not a
76
+ * subset of Mudlet as far as its own players are concerned. */
77
+ differences?: {
78
+ label: string;
79
+ onOpen: () => void;
80
+ };
81
+ }
82
+ export declare function SettingsShell({ cards, subpages, category, onCategory, subpage, onSubpage, support, differences }: SettingsShellProps): import("react/jsx-runtime").JSX.Element;
83
+ interface SubpageRowProps {
84
+ label: string;
85
+ /** What the row reports about the page behind it — Mudlet's "9 of 10 turned on". */
86
+ summary: string;
87
+ onOpen: () => void;
88
+ }
89
+ /** The chevron row a card carries when its settings live on a subpage. */
90
+ export declare function SubpageRow({ label, summary, onOpen }: SubpageRowProps): import("react/jsx-runtime").JSX.Element;
91
+ export {};
@@ -0,0 +1,13 @@
1
+ import { type AppCommandId, type ShortcutOverrides } from '../commands/appShortcuts';
2
+ import './ShortcutEditor.css';
3
+ interface Props {
4
+ overrides: ShortcutOverrides | undefined;
5
+ platform: string;
6
+ /** Write one command's binding. An empty string clears it; `undefined`
7
+ * puts it back to the platform default. */
8
+ onChange: (id: AppCommandId, shortcut: string | undefined) => void;
9
+ /** Put every binding back to its default. */
10
+ onResetAll: () => void;
11
+ }
12
+ export declare function ShortcutEditor({ overrides, platform, onChange, onResetAll }: Props): import("react/jsx-runtime").JSX.Element;
13
+ export {};