@mudlet/mudlet-web 0.4.5 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) 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 +50660 -29735
  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 +432 -59
  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 +54 -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 +1039 -213
  149. package/dist-lib/scripting/ScriptingEngine.d.ts +753 -103
  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 +521 -44
  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/CharLoginModal.d.ts +24 -15
  192. package/dist-lib/ui/CmdLineMenuRegistry.d.ts +14 -5
  193. package/dist-lib/ui/CommandBar.d.ts +8 -8
  194. package/dist-lib/ui/ConnectionFormModal.d.ts +25 -1
  195. package/dist-lib/ui/ConnectionScreen.d.ts +9 -1
  196. package/dist-lib/ui/GameLinkPrompt.d.ts +28 -0
  197. package/dist-lib/ui/HelpModal.d.ts +5 -1
  198. package/dist-lib/ui/MapSymbolUsageModal.d.ts +32 -0
  199. package/dist-lib/ui/MouseEventRegistry.d.ts +31 -4
  200. package/dist-lib/ui/NotepadModal.d.ts +22 -0
  201. package/dist-lib/ui/ResizableModal.d.ts +16 -1
  202. package/dist-lib/ui/SettingsModal.d.ts +10 -1
  203. package/dist-lib/ui/TlsAlertBanner.d.ts +3 -1
  204. package/dist-lib/ui/Toolbar.d.ts +22 -1
  205. package/dist-lib/ui/VaultManageButton.d.ts +20 -0
  206. package/dist-lib/ui/VaultModal.d.ts +5 -0
  207. package/dist-lib/ui/VaultUnlockPrompt.d.ts +15 -0
  208. package/dist-lib/ui/buttons/ButtonsBar.d.ts +3 -1
  209. package/dist-lib/ui/buttons/inactiveButtons.d.ts +25 -0
  210. package/dist-lib/ui/cmdline/CommandLineManager.d.ts +19 -0
  211. package/dist-lib/ui/cmdline/plainText.d.ts +16 -0
  212. package/dist-lib/ui/cmdline/subCommandLine.d.ts +78 -0
  213. package/dist-lib/ui/cmdline/useCmdLineSelection.d.ts +26 -0
  214. package/dist-lib/ui/cmdline/useSubCommandLineKeys.d.ts +33 -0
  215. package/dist-lib/ui/codemirror/lineParagraphMarks.d.ts +19 -0
  216. package/dist-lib/ui/codemirror/luaHover.d.ts +7 -0
  217. package/dist-lib/ui/codemirror/options.d.ts +33 -0
  218. package/dist-lib/ui/codemirror/theme.d.ts +29 -5
  219. package/dist-lib/ui/commands/addonCommands.d.ts +134 -0
  220. package/dist-lib/ui/commands/appShortcuts.d.ts +86 -0
  221. package/dist-lib/ui/commands/hostCommands.d.ts +88 -0
  222. package/dist-lib/ui/commands/keyMatch.d.ts +20 -0
  223. package/dist-lib/ui/commands/keySequence.d.ts +57 -0
  224. package/dist-lib/ui/components/ContextMenu.d.ts +21 -1
  225. package/dist-lib/ui/components/FontPicker.d.ts +5 -1
  226. package/dist-lib/ui/components/useModalFocus.d.ts +13 -1
  227. package/dist-lib/ui/helpTopics.d.ts +15 -0
  228. package/dist-lib/ui/labels/LabelManager.d.ts +172 -9
  229. package/dist-lib/ui/labels/LabelOverlay.d.ts +19 -0
  230. package/dist-lib/ui/labels/backgroundImageSize.d.ts +19 -0
  231. package/dist-lib/ui/labels/labelModel.d.ts +64 -0
  232. package/dist-lib/ui/labels/qColor.d.ts +13 -0
  233. package/dist-lib/ui/labels/qtCss.d.ts +12 -4
  234. package/dist-lib/ui/landmarks.d.ts +9 -0
  235. package/dist-lib/ui/launcher/ActionMenu.d.ts +19 -0
  236. package/dist-lib/ui/launcher/GameDetails.d.ts +21 -0
  237. package/dist-lib/ui/launcher/GameSection.d.ts +18 -0
  238. package/dist-lib/ui/launcher/LauncherSearch.d.ts +23 -0
  239. package/dist-lib/ui/launcher/ProfileArt.d.ts +20 -0
  240. package/dist-lib/ui/launcher/ProfileSection.d.ts +43 -0
  241. package/dist-lib/ui/launcher/launcherModel.d.ts +72 -0
  242. package/dist-lib/ui/layout/overlayLayerOrder.d.ts +2 -2
  243. package/dist-lib/ui/menu/MenuBar.d.ts +31 -0
  244. package/dist-lib/ui/menu/SplitButton.d.ts +39 -0
  245. package/dist-lib/ui/menu/anchoredPopup.d.ts +74 -0
  246. package/dist-lib/ui/menu/appMenus.d.ts +65 -0
  247. package/dist-lib/ui/menu/menuModel.d.ts +88 -0
  248. package/dist-lib/ui/menu/toolbarModel.d.ts +56 -0
  249. package/dist-lib/ui/notepad.d.ts +76 -0
  250. package/dist-lib/ui/openSignInPage.d.ts +14 -0
  251. package/dist-lib/ui/output/OutputContextMenu.d.ts +14 -1
  252. package/dist-lib/ui/output/OutputRenderer.d.ts +5 -0
  253. package/dist-lib/ui/output/OutputSearchBar.d.ts +5 -1
  254. package/dist-lib/ui/output/StickyOutputPanel.d.ts +17 -3
  255. package/dist-lib/ui/output/TextAnalyzerModal.d.ts +25 -0
  256. package/dist-lib/ui/output/caretMode.d.ts +3 -2
  257. package/dist-lib/ui/output/clearSplit.d.ts +11 -0
  258. package/dist-lib/ui/output/outputCopy.d.ts +41 -2
  259. package/dist-lib/ui/output/outputRows.d.ts +43 -0
  260. package/dist-lib/ui/output/selectionGesture.d.ts +35 -0
  261. package/dist-lib/ui/output/wordSelection.d.ts +33 -0
  262. package/dist-lib/ui/search/matcher.d.ts +14 -4
  263. package/dist-lib/ui/settings/SettingsShell.d.ts +91 -0
  264. package/dist-lib/ui/settings/ShortcutEditor.d.ts +13 -0
  265. package/dist-lib/ui/sound/SoundManager.d.ts +210 -44
  266. package/dist-lib/ui/sound/closedCaption.d.ts +4 -1
  267. package/dist-lib/ui/sound/mediaDirection.d.ts +35 -0
  268. package/dist-lib/ui/tabCompletion.d.ts +53 -0
  269. package/dist-lib/ui/textedit/TextEditManager.d.ts +11 -2
  270. package/dist-lib/ui/useOpenProfiles.d.ts +1 -1
  271. package/dist-lib/ui/useVaultSaver.d.ts +26 -0
  272. package/dist-lib/ui/video/VideoManager.d.ts +7 -0
  273. package/dist-lib/ui/windows/WindowManager.d.ts +452 -37
  274. package/dist-lib/ui/windows/panels/ScriptEditorPanel.d.ts +14 -0
  275. package/dist-lib/ui/windows/panels/ScriptSearch.d.ts +6 -1
  276. package/dist-lib/ui/windows/panels/TextPanel.d.ts +4 -1
  277. package/dist-lib/ui/windows/panels/VariablesView.d.ts +37 -7
  278. package/dist-lib/ui/windows/panels/WindowCmdLine.d.ts +4 -2
  279. package/dist-lib/ui/windows/panels/aliasLoop.d.ts +24 -0
  280. package/dist-lib/ui/windows/panels/editorClipboard.d.ts +45 -0
  281. package/dist-lib/ui/windows/panels/editorUndo.d.ts +79 -0
  282. package/dist-lib/ui/windows/panels/mapAreaChange.d.ts +10 -0
  283. package/dist-lib/utils/appShellCache.d.ts +25 -0
  284. package/dist-lib/utils/fontFamilyName.d.ts +13 -0
  285. package/dist-lib/utils/fontLoader.d.ts +31 -0
  286. package/dist-lib/utils/formatBytes.d.ts +4 -0
  287. package/dist-lib/utils/mustBeOneOf.d.ts +9 -0
  288. package/dist-lib/utils/profileLock.d.ts +1 -1
  289. package/dist-lib/utils/storedCredentials.d.ts +31 -0
  290. package/dist-lib/utils/systemTheme.d.ts +24 -0
  291. package/dist-lib/utils/timeZone.d.ts +10 -0
  292. package/dist-lib/vault/CredentialVault.d.ts +197 -0
  293. package/dist-lib/vault/deviceUnlock.d.ts +47 -0
  294. package/dist-lib/vault/passkeyPrf.d.ts +56 -0
  295. package/dist-lib/vault/useVault.d.ts +8 -0
  296. package/dist-lib/vault/vaultAccess.d.ts +80 -0
  297. package/dist-lib/vault/vaultCrypto.d.ts +56 -0
  298. package/dist-lib/vault/vaultHelpTopic.d.ts +9 -0
  299. package/dist-lib/vault/vaultRecord.d.ts +92 -0
  300. package/dist-lib/vfs-sw.js +220 -11
  301. package/dist-lib/vite.d.ts +1 -1
  302. package/dist-lib/vite.js +66 -43
  303. package/package.json +22 -14
  304. package/dist-lib/assets/mapParser.worker-t-3rd1zR.js +0 -9
  305. package/dist-lib/mud/connection/PingTracker.d.ts +0 -41
  306. package/dist-lib/ui/BundledGameGrid.d.ts +0 -21
  307. package/dist-lib/ui/ConnectionGrid.d.ts +0 -21
  308. package/dist-lib/ui/bufferWords.d.ts +0 -38
@@ -4,6 +4,10 @@ interface FontPickerProps {
4
4
  value: OutputFontSource | undefined;
5
5
  onChange: (next: OutputFontSource | undefined) => void;
6
6
  vfs: ProfileVFS | null;
7
+ /** What is drawn with when nothing is chosen. The main display falls back to
8
+ * the browser's monospace; the map's room symbols to the bundled Bitstream
9
+ * Vera Sans Mono — so the picker has to be told, rather than assert one. */
10
+ fallbackLabel?: string;
7
11
  }
8
- export declare function FontPicker({ value, onChange, vfs }: FontPickerProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function FontPicker({ value, onChange, vfs, fallbackLabel }: FontPickerProps): import("react/jsx-runtime").JSX.Element;
9
13
  export {};
@@ -12,8 +12,20 @@ export interface ModalFocusOptions {
12
12
  * modal manages its own initial focus (e.g. a specific field or button). */
13
13
  autoFocus?: boolean;
14
14
  /** Close on Escape via `onClose`. Default true. Set false when the modal has
15
- * its own Escape handling (then `onClose` may be omitted). */
15
+ * its own Escape handling (then `onClose` may be omitted). Read live on
16
+ * every key, so it may vary over the dialog's life — a dialog can hand
17
+ * Escape to an inner editor for exactly as long as that editor is open
18
+ * (the file browser's inline rename does) without the trap being torn
19
+ * down and re-armed, which would re-grab focus. */
16
20
  closeOnEscape?: boolean;
21
+ /** Gate for a dialog whose node is not in the DOM on the first render — a
22
+ * portal whose container is only known after a layout effect, say. The
23
+ * setup below runs once, off a null ref, and refs don't re-render, so
24
+ * without this the trap, the Escape handler and the focus restore are all
25
+ * silently skipped (issue #49). Flip it true in the render that mounts the
26
+ * dialog node. One-way: flipping it back to false counts as a close and
27
+ * restores focus to the opener. Default true (node present immediately). */
28
+ ready?: boolean;
17
29
  /** Where focus should land on close, instead of the opener. Use when the
18
30
  * dialog was raised by the game rather than by a click, so "the opener" is
19
31
  * either nothing or a control that has since gone away — the GMCP login
@@ -11,6 +11,21 @@ export interface HelpTopic {
11
11
  }
12
12
  export declare const HELP_TOPICS: HelpTopic[];
13
13
  export declare const DEFAULT_HELP_TOPIC: string;
14
+ /**
15
+ * Add a topic that only some builds have.
16
+ *
17
+ * The manual is otherwise a fixed list, but a few features are stock-app-only —
18
+ * the credential vault above all — and a branded build must not carry
19
+ * documentation for something it doesn't ship. Those topics are registered from
20
+ * `main.tsx` at boot, alongside the feature itself, so they never enter the
21
+ * library's module graph. See `vault/vaultAccess` for the same seam.
22
+ *
23
+ * Idempotent, and ordered by `after` rather than appended, so an added topic
24
+ * lands next to the one it relates to instead of at the bottom.
25
+ */
26
+ export declare function registerHelpTopic(topic: HelpTopic, opts?: {
27
+ after?: string;
28
+ }): void;
14
29
  /** Resolve a markdown link href to a topic id, or null if it isn't one of ours.
15
30
  * Handles `./storage.md`, `storage.md`, `docs/help/storage.md` and a `#anchor`
16
31
  * suffix — the shapes a relative link between these files can take. */
@@ -1,4 +1,5 @@
1
1
  import type { MoviePlayer } from './gifMovie';
2
+ import { type LinkStyleState } from './labelModel';
2
3
  import { OverlayLayerOrder } from '../layout/overlayLayerOrder';
3
4
  export interface LabelCreateOptions {
4
5
  /** Parent window id ('main' for main viewport). Defaults to 'main'. */
@@ -43,9 +44,31 @@ export interface LabelState {
43
44
  url: string;
44
45
  width?: number;
45
46
  height?: number;
47
+ svg?: boolean;
46
48
  };
49
+ /** Mudlet setSvgTint / setSvgRotation / setSvgShear. Like TLabel's, these
50
+ * belong to the label rather than to its SVG: they outlive a
51
+ * resetBackgroundImage and a new image, and one set before any SVG arrives
52
+ * applies the moment one does — only their own reset functions clear them.
53
+ * The tint is a CSS colour painted over the SVG's opaque pixels
54
+ * (CompositionMode_SourceIn); rotation is in degrees and the shear factors
55
+ * are QTransform::shear's. */
56
+ svgTint?: string;
57
+ svgRotation?: number;
58
+ svgShearX?: number;
59
+ svgShearY?: number;
47
60
  /** Qt-style CSS string set via setLabelStyleSheet; parsed at render time. */
48
61
  styleSheet?: string;
62
+ /** Family set via `setFont(labelName, family)` — the widget font, which in
63
+ * Qt is a property of the QLabel itself and so is kept here rather than
64
+ * folded into `styleSheet`. A stylesheet `font-family` still wins over it
65
+ * at render, as QSS wins over a widget font in Qt. Always stored as the
66
+ * font database spells it (ScriptingAPI.resolveFontFamily), because
67
+ * Geyser.Label:setFont reads it straight back through getFont(). */
68
+ fontFamily?: string;
69
+ /** Point size set via `setFontSize(labelName, size)` — the other half of
70
+ * the widget font, kept and applied the same way as {@link fontFamily}. */
71
+ fontSize?: number;
49
72
  /** Sticky Qt `alignment` widget property, captured from a
50
73
  * `qproperty-alignment` declaration in any setStyleSheet call. In Qt,
51
74
  * qproperty-* declarations set the widget property permanently — a later
@@ -85,6 +108,10 @@ export interface LabelState {
85
108
  * same reason (Qt won't style them either). Only populated while a visited
86
109
  * color is set, as Mudlet does. */
87
110
  visitedLinks?: Set<string>;
111
+ /** What the last link-styling pass was given and made of it, so a styled
112
+ * tag read back with getLabelText can be given back as it was written —
113
+ * see labelModel.ts. */
114
+ linkText?: LinkStyleState;
88
115
  /** Click handler installed by setLabelClickCallback. The event table mirrors
89
116
  * Mudlet's `mudlet.mouse_button` shape: `{button, x, y, alt, ctrl, shift, meta}`. */
90
117
  onClick?: (event: LabelMouseEvent) => void;
@@ -104,17 +131,37 @@ export interface LabelState {
104
131
  onMouseLeave?: (event: LabelMouseEvent) => void;
105
132
  /** Tooltip text rendered via the title attribute. */
106
133
  tooltip?: string;
134
+ /** Mudlet setLabelAccessibleName — the name a screen reader gives the
135
+ * label. Empty means none of its own: TLabelModel::effectiveAccessibleName
136
+ * then names it after the text it shows, or else its tooltip. */
137
+ accessibleName?: string;
138
+ /** Mudlet setLabelAccessibleRole — `true` for "button", `false` for "text",
139
+ * unset for "" (decided by the label's click and release callbacks, as
140
+ * TLabelModel::actsAsButton does). */
141
+ accessibleButton?: boolean;
142
+ /** Mudlet setLabelLiveRegion — how a change to the label's text is spoken
143
+ * while the profile's `accessibleLabels` setting is on. Unset is "off". */
144
+ liveRegion?: LabelLiveRegion;
107
145
  /** CSS cursor value (e.g. 'pointer', 'crosshair', 'none'). */
108
146
  cursor?: string;
109
147
  /** Animated GIF player installed by Mudlet's setMovie. Rendered as a
110
148
  * <canvas> instead of the html content (QLabel shows one or the other). */
111
149
  movie?: MoviePlayer;
150
+ /** A movie text has taken the place of: QLabel::setText drops the movie
151
+ * from the label's display, but TLabel still owns the QMovie, so the
152
+ * profile goes on counting it (getProfileStats().gifs) until setMovie
153
+ * replaces it or the label is deleted. Nothing drives it any more. */
154
+ hiddenMovie?: MoviePlayer;
112
155
  }
113
156
  /** Event payload for label mouse callbacks. `button` is the Qt button *name*
114
157
  * Mudlet reports ("LeftButton" / "RightButton" / "MidButton" / "NoButton" / …),
115
158
  * so ported Geyser scripts that branch on `event.button == "LeftButton"` work. */
116
159
  export interface LabelMouseEvent {
117
160
  button: string;
161
+ /** Every button held while the event happened, as Qt button names in
162
+ * Qt's bit order (Mudlet's `event.buttons`, a Lua list): `["LeftButton"]`
163
+ * on a left press, empty on its release. */
164
+ buttons: string[];
118
165
  x: number;
119
166
  y: number;
120
167
  globalX: number;
@@ -125,23 +172,63 @@ export interface LabelMouseEvent {
125
172
  meta: boolean;
126
173
  }
127
174
  export interface LabelWheelEvent extends LabelMouseEvent {
128
- /** Mudlet exposes wheel deltas via `angleDelta.x` / `angleDelta.y` (Qt naming). */
175
+ /** Mudlet's wheel deltas, flat on the event: `event.angleDeltaX` /
176
+ * `event.angleDeltaY`, in Qt's eighths of a degree (±120 per notch). */
177
+ angleDeltaX: number;
178
+ angleDeltaY: number;
179
+ /** The same deltas nested, as Mudlet Web reported them before it matched
180
+ * Mudlet's shape. Kept so scripts written against it keep working. */
129
181
  angleDelta: {
130
182
  x: number;
131
183
  y: number;
132
184
  };
133
185
  }
134
186
  type Listener = (labels: LabelState[]) => void;
187
+ /** TLabelLiveRegion, by the name setLabelLiveRegion takes and getLabelLiveRegion gives. */
188
+ export type LabelLiveRegion = 'off' | 'polite' | 'assertive';
189
+ /** What getLabelAccessibleRole reports (Host::labelAccessibleRole). */
190
+ export type LabelAccessibleRole = 'button' | 'graphic' | 'animation' | 'text';
191
+ /** QTextDocumentFragment::fromHtml(html).toPlainText(), simplified — the text
192
+ * TLabelModel's plainName() names a label after. A block or line break is a
193
+ * break in Qt's plain text, so it parts the words on either side here too,
194
+ * where textContent would run them together. */
195
+ export declare function labelPlainName(html: string): string;
135
196
  /** Runs the action behind an `<a href>` clicked inside a label — installed by
136
197
  * ScriptingAPI, which owns the send/prompt/openUrl/Lua machinery the schemes
137
198
  * map onto (see {@link LabelManager.setLinkActivator}). */
138
199
  type LinkActivator = (href: string) => void;
200
+ /** `html` with every `<…>` run dropped: from each `<` up to the next `>`, and
201
+ * text after a `<` that never closes kept as is. The same string the regex
202
+ * `/<[^>]*>/g` replace gave, as a scanner — only renderedText's no-DOM
203
+ * fallback reads it, to decide whether a label is empty, and it never goes
204
+ * back into HTML. Exported for tests. */
205
+ export declare function stripTagsNoDom(html: string): string;
206
+ /** The text `html` renders to, trimmed — QTextDocumentFragment::toPlainText
207
+ * as TLabel::sizeHint reads it. Exported for tests. */
208
+ export declare function renderedText(html: string): string;
209
+ /** TLabelModel::actsAsButton: a role chosen for it, else whether it has a
210
+ * click or release callback to press — never while clicks pass through it. */
211
+ export declare function labelActsAsButton(lbl: Readonly<LabelState>): boolean;
212
+ /** TLabelModel::effectiveAccessibleName. */
213
+ export declare function effectiveAccessibleName(lbl: Readonly<LabelState>): string;
214
+ /** Host::labelAccessibleRole: a button whatever it shows, else what it shows —
215
+ * a movie is an animation, an image with no text over it a graphic
216
+ * (TLabel::showsImage), anything else text. */
217
+ export declare function accessibleRole(lbl: Readonly<LabelState>): LabelAccessibleRole;
139
218
  export declare class LabelManager {
140
219
  readonly overlayZ: OverlayLayerOrder;
220
+ /** Where a press or release a label has no callback for goes: TLabel hands
221
+ * it to the window under the label (`parent`), which raises it as that
222
+ * window's sysWindowMousePressEvent / ReleaseEvent. Wired by MudSession. */
223
+ onUnhandledMouse?: (kind: 'press' | 'release', parent: string, e: MouseEvent) => void;
141
224
  private readonly labels;
142
225
  private readonly byParent;
143
226
  private readonly listeners;
144
227
  private linkActivator;
228
+ /** The profile's `accessibleLabels` setting (Host::mAccessibleLabels): with it
229
+ * on, a label that acts as a button takes keyboard focus and is pressed with
230
+ * Space or Return, and a live region speaks its label's text changes. */
231
+ private accessibleLabelsOn;
145
232
  private indexAdd;
146
233
  private indexRemove;
147
234
  constructor(overlayZ?: OverlayLayerOrder);
@@ -159,19 +246,46 @@ export declare class LabelManager {
159
246
  * ('main', a userwindow / miniconsole id, or a scroll box name). Both
160
247
  * the old and the new parent's overlays re-render. */
161
248
  setParent(name: string, parent: string): boolean;
162
- /** Mudlet `getLabelSizeHint(name)` → the label's preferred `{width,height}`.
163
- * Mudlet returns the QLabel sizeHint (the size its content wants); the
164
- * browser analogue is the rendered node's content extent
165
- * (`scrollWidth`/`scrollHeight`), read off the `data-mudix-label` element.
166
- * Falls back to the configured geometry when the label isn't in the DOM
167
- * yet (hidden, or rendered before mount). null when no such label. */
249
+ /** Mudlet `getLabelSizeHint(name)` → the label's preferred `{width,height}`:
250
+ * TLabel::sizeHint, which is QLabel's — the extent of the label's contents
251
+ * (its text laid out unwrapped, or its movie frame) plus the margin, border
252
+ * and padding its stylesheet puts around them. It never depends on the box
253
+ * the label has now, which is what lets Geyser's adjustSize/autoWidth grow a
254
+ * label as well as shrink it. Falls back to the configured geometry only
255
+ * where there is no layout to measure at all. null when no such label. */
168
256
  getSizeHint(name: string): {
169
257
  width: number;
170
258
  height: number;
171
259
  } | null;
260
+ /**
261
+ * TLabel::sizeHint for a label whose only content is an SVG background: the
262
+ * document's own size plus the chrome (stylesheet margin, border and
263
+ * padding) QLabel adds around its contents. QLabel's hint cannot see the
264
+ * SVG layer, and Geyser's autoAdjustSize() sizes a label from the hint. A
265
+ * label that does carry text or a movie keeps the ordinary hint, because
266
+ * the SVG scales to fit whatever that asks for. Geyser.Label:new always
267
+ * echoes an empty rich-text div, so "text" is what the HTML renders to, not
268
+ * whether the string is empty. Null when this is not that case.
269
+ */
270
+ private svgSizeHint;
271
+ /** Mudlet setSvgTint(label, colour) — `color` is any CSS colour. */
272
+ setSvgTint(name: string, color: string): boolean;
273
+ /** Mudlet resetSvgTint(label). */
274
+ resetSvgTint(name: string): boolean;
275
+ /** Mudlet setSvgRotation(label, degrees); resetSvgRotation passes 0. */
276
+ setSvgRotation(name: string, degrees: number): boolean;
277
+ /** Mudlet setSvgShear(label, shearX, shearY); resetSvgShear passes 0, 0. */
278
+ setSvgShear(name: string, shearX: number, shearY: number): boolean;
279
+ /** Mudlet resetSvgTransform(label) — rotation and shear together; the tint stays. */
280
+ resetSvgTransform(name: string): boolean;
281
+ private patchSvg;
172
282
  show(name: string): boolean;
173
283
  hide(name: string): boolean;
174
284
  setHtml(name: string, html: string): boolean;
285
+ /** TLabel::reapplyLinkStyle: the links already shown are styled again from
286
+ * the text the last pass was given, after the link style or the visited
287
+ * links changed. A picture or movie took the text out, so there is none. */
288
+ private reapplyLinkStyle;
175
289
  /** Mudlet setMovie — install (or replace) the label's GIF player. */
176
290
  setMovie(name: string, player: MoviePlayer): boolean;
177
291
  getMovie(name: string): MoviePlayer | null;
@@ -193,12 +307,41 @@ export declare class LabelManager {
193
307
  b: number;
194
308
  a: number;
195
309
  } | null;
196
- setBackgroundImage(name: string, url: string): boolean;
310
+ /** `size` is the image's intrinsic size when it is already known (an SVG
311
+ * read synchronously out of the VFS); `svg` marks an SVG document, which
312
+ * is drawn as a layer of its own that fits the label rather than as a
313
+ * native-size pixmap. */
314
+ setBackgroundImage(name: string, url: string, svg?: boolean, size?: {
315
+ width: number;
316
+ height: number;
317
+ }): boolean;
197
318
  /** Fills in the intrinsic pixel size resolved asynchronously for `url`
198
319
  * (see backgroundImageSize.ts). No-ops if the label's image has since
199
320
  * changed away from `url` (stale resolution racing a newer call). */
200
321
  setBackgroundImageSize(name: string, url: string, width: number, height: number): boolean;
322
+ /** TLabel::setBackgroundImage with an empty path: an empty pixmap, which
323
+ * takes away the picture (raster or SVG), a movie and — as setPixmap()
324
+ * does — the text. */
325
+ clearPixmap(name: string): boolean;
201
326
  resetBackgroundImage(name: string): boolean;
327
+ /** Mudlet `setFont(labelName, family)` on a label. An empty family clears
328
+ * the override, leaving the label on whatever it inherits. */
329
+ setFont(name: string, family: string): boolean;
330
+ /** The label's own font family, or null when there is no such label.
331
+ * An existing label with no override reads as "" — the same "nothing set"
332
+ * answer a window with no override gives. */
333
+ getFont(name: string): string | null;
334
+ /** Mudlet `setFontSize(labelName, size)` on a label: the point size of its
335
+ * widget font. */
336
+ setFontSize(name: string, size: number): boolean;
337
+ /**
338
+ * The point size the label's text is drawn in, or null when there is no
339
+ * such label. A stylesheet `font-size` wins over the widget font, as QSS
340
+ * does in Qt; one in pixels is read as points at the CSS 96 dpi (QFont's
341
+ * pointSizeF for a pixel-sized font). With neither, the `.label` default
342
+ * of 12px.
343
+ */
344
+ getFontSize(name: string): number | null;
202
345
  setStyleSheet(name: string, css: string): boolean;
203
346
  /** Mudlet `setLinkStyle(labelName, linkColor, linkVisitedColor, underline)`. */
204
347
  setLinkStyle(name: string, color: string, visitedColor: string, underline: boolean): boolean;
@@ -217,8 +360,12 @@ export declare class LabelManager {
217
360
  activateLink(name: string, href: string): void;
218
361
  /** Mudlet `resetLinkStyle(labelName)` — drop any setLinkStyle override. */
219
362
  resetLinkStyle(name: string): boolean;
363
+ /** Mudlet `clearVisitedLinks(labelName)` — forget which links were clicked,
364
+ * so they take the link colour again. */
365
+ clearVisitedLinks(name: string): boolean;
220
366
  /** Mudlet `getLabelStyleSheet(name)` — the Qt-style CSS last set via
221
- * {@link setStyleSheet}, or `""` when none is set. Returns `undefined`
367
+ * {@link setStyleSheet}, with any {@link setBackgroundColor} declaration
368
+ * written into it (a new label starts with one), or `""` when none is set. Returns `undefined`
222
369
  * when the label doesn't exist so the caller can distinguish that case. */
223
370
  getStyleSheet(name: string): string | undefined;
224
371
  setClickCallback(name: string, fn: ((e: LabelMouseEvent) => void) | undefined): boolean;
@@ -229,6 +376,22 @@ export declare class LabelManager {
229
376
  setMouseEnterCallback(name: string, fn: ((e: LabelMouseEvent) => void) | undefined): boolean;
230
377
  setMouseLeaveCallback(name: string, fn: ((e: LabelMouseEvent) => void) | undefined): boolean;
231
378
  setTooltip(name: string, text: string | undefined): boolean;
379
+ /** TLabelModel::setAccessibleName. An empty name hands naming back to the
380
+ * label's text and tooltip. */
381
+ setAccessibleName(name: string, accessibleName: string): boolean;
382
+ /** TLabelModel::effectiveAccessibleName: the name set, else the text the
383
+ * label shows, else its tooltip (read literally unless it is rich text,
384
+ * as Qt shows it). Undefined for a label that is not there. */
385
+ getAccessibleName(name: string): string | undefined;
386
+ /** TLabelModel::setAccessibleButton — `undefined` decides by the callbacks. */
387
+ setAccessibleButton(name: string, button: boolean | undefined): boolean;
388
+ /** Host::labelAccessibleRole. Undefined for a label that is not there. */
389
+ getAccessibleRole(name: string): LabelAccessibleRole | undefined;
390
+ setLiveRegion(name: string, liveRegion: LabelLiveRegion): boolean;
391
+ getLiveRegion(name: string): LabelLiveRegion | undefined;
392
+ /** Host::setAccessibleLabels — every label's keyboard access follows it. */
393
+ setAccessibleLabels(on: boolean): void;
394
+ get accessibleLabels(): boolean;
232
395
  setClickThrough(name: string, value: boolean): boolean;
233
396
  setCursor(name: string, cursor: string | undefined): boolean;
234
397
  raise(name: string): boolean;
@@ -1,6 +1,25 @@
1
1
  import type { LabelManager } from './LabelManager';
2
2
  import './LabelOverlay.css';
3
3
  export declare function domButtonToMudlet(type: string, domButton: number): string;
4
+ /** Mudlet's `event.buttons`: every button held while the event happened —
5
+ * `{"LeftButton"}` on a left press, `{}` on its release. */
6
+ export declare function domButtonsToMudlet(domButtons: number): string[];
7
+ export interface PressHistory {
8
+ time: number;
9
+ button: number;
10
+ double: boolean;
11
+ }
12
+ /**
13
+ * Whether a press is the second half of a double-click. Qt delivers that press
14
+ * as a mouseDoubleClickEvent *instead of* a press, so TLabel runs the
15
+ * double-click callback and not the click one — and the press after it is an
16
+ * ordinary press again. The DOM reports it as a second pointerdown and then a
17
+ * separate dblclick, which ran the click callback twice. `detail` is the click
18
+ * count where the browser fills it in on pointerdown; where it is 0, the
19
+ * previous press (`prev`, which the caller keeps from the last return)
20
+ * stands in for it.
21
+ */
22
+ export declare function classifyPress(detail: number, button: number, time: number, prev: PressHistory | null): PressHistory;
4
23
  interface LabelOverlayProps {
5
24
  manager: LabelManager;
6
25
  parent: string;
@@ -2,9 +2,28 @@ export declare function resolveSvgIntrinsicSize(url: string): Promise<{
2
2
  width: number;
3
3
  height: number;
4
4
  } | null>;
5
+ export declare function isSvgUrl(url: string): boolean;
5
6
  /** Exported for tests. Mirrors Qt's defaultSize(): explicit width+height
6
7
  * wins, else the viewBox extent, else no intrinsic size (null). */
7
8
  export declare function parseSvgIntrinsicSize(svgText: string): {
8
9
  width: number;
9
10
  height: number;
10
11
  } | null;
12
+ /**
13
+ * Whether `bytes` are worth handing to an SVG parser, the way TLabel::svgCandidate
14
+ * decides it: gzip magic, or the first character past any byte order mark and
15
+ * whitespace being `<`. Mudlet reads a file by its content rather than its
16
+ * name, so a raster saved as `.svg` is still a raster, and an SVG under any
17
+ * name is still an SVG. The parser is the authority on what really is one.
18
+ */
19
+ export declare function isSvgCandidate(bytes: Uint8Array): boolean;
20
+ /**
21
+ * The document size of an SVG held in `bytes`, synchronously — or null when it
22
+ * is not an SVG the browser can parse, or has no size to offer (no width,
23
+ * height or viewBox). Gzipped documents are not inflated here; they resolve
24
+ * through {@link resolveSvgIntrinsicSize} like a remote URL does.
25
+ */
26
+ export declare function svgIntrinsicSizeFromBytes(bytes: Uint8Array): {
27
+ width: number;
28
+ height: number;
29
+ } | null;
@@ -0,0 +1,64 @@
1
+ /**
2
+ * The text-side half of Mudlet's `TLabelModel` (src/TLabelModel.cpp): what a
3
+ * label does to the text and the stylesheet it is given, kept apart from the
4
+ * widget so it can be ported line for line. Two jobs:
5
+ *
6
+ * - {@link styleSheetWithoutBackgroundImage}, which `resetBackgroundImage`
7
+ * applies to the label's own stylesheet;
8
+ * - the link-styling pass (`TLabelModel::styleLinks` and friends): every
9
+ * `<a href=…>` in a label's text gets an inline `style` carrying the colours
10
+ * `setLinkStyle` asked for, because QTextDocument reads neither the widget
11
+ * stylesheet nor the palette for link colours. `getLabelText` answers with
12
+ * the styled text, so the pass has to happen here, and each tag it rewrote is
13
+ * remembered so the text can be given back as it was written — on
14
+ * `resetLinkStyle`, and when a script echoes what it read back.
15
+ *
16
+ * Indices are UTF-16 code units, which is what both QString and a JS string
17
+ * index by, so the scanners carry over unchanged.
18
+ */
19
+ /** A tag the last styling pass rewrote, and what it was given as. */
20
+ export interface StyledAnchor {
21
+ styled: string;
22
+ original: string;
23
+ }
24
+ /** The link-styling state a label carries between passes (TLabelModel's
25
+ * `mUnstyledText`, `mStyledText` and `mStyledAnchors`). */
26
+ export interface LinkStyleState {
27
+ /** The text the last pass was given, before any styling. */
28
+ unstyled: string;
29
+ /** What the last pass produced. */
30
+ styled: string;
31
+ anchors: StyledAnchor[];
32
+ }
33
+ export interface LinkStyle {
34
+ color?: string;
35
+ visitedColor?: string;
36
+ underline: boolean;
37
+ }
38
+ /**
39
+ * `sheet` with every background-image declaration taken out, and nothing else
40
+ * touched. Comments, quoted strings and a url()'s contents hold no declarations
41
+ * and no braces, as in CSS; a declaration starts the sheet or follows a ';' or
42
+ * a rule's '}', so selector text such as `QLabel#background-image:hover` is not
43
+ * one. Geyser.Label carries a Lua copy of the same scanner and the specs
44
+ * compare the two character for character, so this follows the C++ exactly.
45
+ */
46
+ export declare function styleSheetWithoutBackgroundImage(sheet: string): string;
47
+ /**
48
+ * Whether `text` holds an anchor tag: a `<a` followed by whitespace whose
49
+ * closing `>` comes before any other `<`. Not a case-insensitive
50
+ * contains("<a "): that cannot tell a tag from prose.
51
+ */
52
+ export declare function containsAnchorTag(text: string): boolean;
53
+ /** TLabelModel::linkStyledText — what TLabel::setText shows for `text`, with
54
+ * whatever the last pass injected into it put back first. */
55
+ export declare function linkStyledText(text: string, style: LinkStyle | undefined, visited: ReadonlySet<string> | undefined, state: LinkStyleState | undefined, current: string): {
56
+ text: string;
57
+ state: LinkStyleState;
58
+ };
59
+ /** TLabelModel::restyledText — the last pass's input styled again, after the
60
+ * link style or the visited links changed. */
61
+ export declare function restyledText(style: LinkStyle | undefined, visited: ReadonlySet<string> | undefined, state: LinkStyleState): {
62
+ text: string;
63
+ state: LinkStyleState;
64
+ };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * `QColor(QString)` for the forms Mudlet's colour arguments accept, answering
3
+ * `[r, g, b]` (0..255) or null for a string QColor would call invalid.
4
+ *
5
+ * Deliberately not `CSS.supports('color', …)`: CSS takes far more than QColor
6
+ * does (`rgb(…)`, `hsl(…)`, `currentcolor`), so a script that worked here would
7
+ * be refused by Mudlet, and it reads `#AARRGGBB` as `#RRGGBBAA`. The forms are
8
+ * Qt's own: `#RGB`, `#RRGGBB`, `#AARRGGBB`, `#RRRGGGBBB`, `#RRRRGGGGBBBB`, and
9
+ * the SVG 1.0 colour keywords, case-insensitively. A half-written hex such as
10
+ * `#ff` is invalid, as it is in Qt. Alpha is not returned: the callers here
11
+ * (setSvgTint) build an opaque colour from the three channels.
12
+ */
13
+ export declare function parseQColor(input: string): [number, number, number] | null;
@@ -1,5 +1,8 @@
1
1
  import type React from 'react';
2
- export declare function cssTextToStyle(css: string): React.CSSProperties;
2
+ /** A stylesheet's flat declarations as inline style, with those of a
3
+ * `<widget> { … }` ruleset — a button's sheet is a QPushButton's, which
4
+ * setButtonStyleSheet callers write as `QPushButton { … }`. */
5
+ export declare function cssTextToStyle(css: string, widget?: string): React.CSSProperties;
3
6
  export interface QtMargin {
4
7
  top: number;
5
8
  right: number;
@@ -17,7 +20,7 @@ export interface CssParts {
17
20
  export declare function cssTextToParts(css: string): CssParts;
18
21
  export declare function userWindowQssToScopedCss(qss: string, scope: string): string;
19
22
  export declare function cmdLineQssToScopedCss(qss: string, scope: string): string;
20
- /** Qt objectNames (from Mudlet's `.ui` files) that mudix mirrors onto a DOM node
23
+ /** Qt objectNames (from Mudlet's `.ui` files) that Mudlet Web mirrors onto a DOM node
21
24
  * via `data-qt-object`, so package stylesheets addressing them keep working.
22
25
  * Reference these instead of writing the raw string at the render site. */
23
26
  export declare const QT_OBJECT_NAMES: {
@@ -37,9 +40,9 @@ export declare const QT_OBJECT_NAMES: {
37
40
  /**
38
41
  * Rewrite the Qt selectors in an app/profile-level stylesheet — objectName forms
39
42
  * (`QWidget#widget_panel`) and mapped widget types (`QDockWidget::title`) — onto
40
- * the DOM they correspond to in mudix. Returns the input unchanged when it holds
43
+ * the DOM they correspond to in mudlet. Returns the input unchanged when it holds
41
44
  * no Qt selector at all, which is the common case for CSS written against
42
- * mudix's own `.mudix-*` classes.
45
+ * Mudlet Web's own `.mudlet-*` classes.
43
46
  *
44
47
  * A rule whose selector we rewrote also gets its *declarations* translated
45
48
  * (`qtDeclarationsToCss`): that body was written for Qt, so it may carry
@@ -56,3 +59,8 @@ export declare function qtAlignmentToFlex(val: string): Record<string, string>;
56
59
  export declare function extractQtAlignment(css: string): string | undefined;
57
60
  export declare function extractQtScaledContents(css: string): boolean | undefined;
58
61
  export declare function extractQtWordWrap(css: string): boolean | undefined;
62
+ /** The text a `qproperty-text: "…"` declaration gives a label, or undefined
63
+ * when the sheet sets none. Qt writes a qproperty through the widget's own
64
+ * setter — QLabel::setText — so the label's text is replaced there and then,
65
+ * rather than styled at paint time. Last one wins, as in Qt. */
66
+ export declare function extractQtText(css: string): string | undefined;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * DOM ids for the two places a keyboard user needs to reach directly on the
3
+ * session screen. They are shared because the skip links in `ProfileSession`
4
+ * live several components away from the elements they target — the console is
5
+ * rendered into a detached host by `ContentLayout`, the command line by
6
+ * `CommandBar` — so a literal in each file would silently drift apart.
7
+ */
8
+ export declare const MAIN_OUTPUT_ID = "mudlet-output";
9
+ export declare const COMMAND_INPUT_ID = "mudlet-command-input";
@@ -0,0 +1,19 @@
1
+ export interface MenuAction {
2
+ label: string;
3
+ onSelect: () => void;
4
+ disabled?: boolean;
5
+ danger?: boolean;
6
+ }
7
+ interface Props {
8
+ /** Accessible name of the trigger, e.g. "More actions for Achaea". */
9
+ label: string;
10
+ actions: MenuAction[];
11
+ className?: string;
12
+ disabled?: boolean;
13
+ /** Visible trigger content; defaults to a bare ⋯ icon. */
14
+ children?: React.ReactNode;
15
+ }
16
+ /** A "⋯" button that opens a small menu of actions below it, right-aligned
17
+ * to the button so it never runs off the edge of a tile or the banner. */
18
+ export declare function ActionMenu({ label, actions, className, disabled, children }: Props): import("react/jsx-runtime").JSX.Element;
19
+ export {};
@@ -0,0 +1,21 @@
1
+ import type { BundledGame } from '../../mud/games/bundledGames';
2
+ import type { MudConnection } from '../../storage';
3
+ interface Props {
4
+ game: BundledGame;
5
+ connections: MudConnection[];
6
+ busy: boolean;
7
+ /** Set up a profile for the game — the prefilled Add form. */
8
+ onPlay: (game: BundledGame) => void;
9
+ /** Connect one of the player's existing profiles for this game. */
10
+ onConnect: (c: MudConnection) => void;
11
+ onClose: () => void;
12
+ }
13
+ /**
14
+ * A game's details: a card centred over the launcher (a bottom sheet on
15
+ * phones), the same whether the game was picked from the grid, the full
16
+ * catalogue or the search box. Centred rather than a side drawer — on a wide
17
+ * screen a drawer opens at the window's edge, far from the tile that opened
18
+ * it. Focus is held inside while it's open and handed back on close.
19
+ */
20
+ export declare function GameDetails({ game, connections, busy, onPlay, onConnect, onClose }: Props): import("react/jsx-runtime").JSX.Element;
21
+ export {};
@@ -0,0 +1,18 @@
1
+ import type { BundledGame } from '../../mud/games/bundledGames';
2
+ import type { MudConnection } from '../../storage';
3
+ /** First sentence-or-so of a blurb, for a tile. */
4
+ export declare function gameTeaser(description: string, max?: number): string;
5
+ interface Props {
6
+ /** The player's profiles — a tile says when one is already for its game. */
7
+ connections: MudConnection[];
8
+ onSelect: (game: BundledGame) => void;
9
+ }
10
+ /** Fisher–Yates; returns a new array. */
11
+ export declare function shuffle<T>(items: readonly T[], random?: () => number): T[];
12
+ /**
13
+ * The bundled catalogue: a couple of rows by default, or every game in
14
+ * a filterable grid behind "Browse all". Picking a game opens its details;
15
+ * nothing is created until the player chooses Play there and submits the form.
16
+ */
17
+ export declare function GameSection({ connections, onSelect }: Props): import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -0,0 +1,23 @@
1
+ import type { BundledGame } from '../../mud/games/bundledGames';
2
+ import { type MudConnection } from '../../storage';
3
+ import { type TypedAddress } from './launcherModel';
4
+ interface Props {
5
+ connections: MudConnection[];
6
+ /** Catalogue to search — empty in a branded build, which has none. */
7
+ games: readonly BundledGame[];
8
+ disabled?: boolean;
9
+ onConnect: (c: MudConnection) => void;
10
+ onSelectGame: (g: BundledGame) => void;
11
+ onAddress: (a: TypedAddress) => void;
12
+ }
13
+ /**
14
+ * "Where to?" — one box that finds a profile, a catalogue game, or takes a
15
+ * server address as typed. An ARIA combobox: arrows move through the options,
16
+ * Enter takes one, Escape clears. "/" focuses it from anywhere on the screen.
17
+ */
18
+ export declare function LauncherSearch({ connections, games, disabled, onConnect, onSelectGame, onAddress }: Props): import("react/jsx-runtime").JSX.Element;
19
+ /** Up to two letters standing for a name: the initials of its first two
20
+ * words ("My test MUD" → "MT"), or its first two letters when it is one word
21
+ * ("alteraeon.com" → "AL"). */
22
+ export declare function nameInitials(name: string): string;
23
+ export {};
@@ -0,0 +1,20 @@
1
+ import type { MudConnection } from '../../storage';
2
+ /** The logo a profile is drawn with: its own icon (setProfileIcon) first, else
3
+ * its game's vendored logo. A profile made from the catalogue keeps the game's
4
+ * logo without storing a copy — matched by host too, so a renamed or second
5
+ * "Achaea (2)" is recognised. Null when there is neither. */
6
+ export declare function profileIconUrl(connection: MudConnection): string | null;
7
+ interface Props {
8
+ /** The logo to glow behind, or null for the name-derived aurora. */
9
+ icon: string | null;
10
+ /** Seeds the aurora when there is no icon. */
11
+ name: string;
12
+ }
13
+ /**
14
+ * The backdrop behind a profile or game: its logo blown up and blurred into a
15
+ * glow when it has one, otherwise an aurora coloured from its name. Purely
16
+ * decorative — callers draw the logo or name on top, and a scrim keeps that
17
+ * readable whatever colours land here.
18
+ */
19
+ export declare function ProfileArt({ icon, name }: Props): import("react/jsx-runtime").JSX.Element;
20
+ export {};