@mudlet/mudlet-web 0.5.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist-lib/analytics.d.ts +27 -0
- package/dist-lib/assets/fonts/Vera.woff2 +0 -0
- package/dist-lib/assets/fonts/VeraBI.woff2 +0 -0
- package/dist-lib/assets/fonts/VeraBd.woff2 +0 -0
- package/dist-lib/assets/fonts/VeraIt.woff2 +0 -0
- package/dist-lib/assets/mapParser.worker-DrVZ3wg_.js +9 -0
- package/dist-lib/backupImport-wt8r7JXI.js +233 -0
- package/dist-lib/branding.d.ts +111 -13
- package/dist-lib/db/sqliteClient.d.ts +195 -7
- package/dist-lib/hooks/useAutoReconnect.d.ts +61 -0
- package/dist-lib/hooks/useDocumentFullscreen.d.ts +23 -0
- package/dist-lib/hooks/useKeyboardShortcuts.d.ts +37 -0
- package/dist-lib/hooks/useRecordLastPlayed.d.ts +10 -0
- package/dist-lib/import/applyMudletProfile.d.ts +35 -9
- package/dist-lib/import/backupImport.d.ts +118 -0
- package/dist-lib/import/collectProfileExport.d.ts +33 -2
- package/dist-lib/import/defaultPackages.d.ts +57 -14
- package/dist-lib/import/defaults/CF-loader/CF-loader.mpackage +0 -0
- package/dist-lib/import/defaults/MedBootstrap/MedBootstrap.mpackage +0 -0
- package/dist-lib/import/defaults/deleteOldProfiles/deleteOldProfiles.mpackage +0 -0
- package/dist-lib/import/defaults/echo/echo.mpackage +0 -0
- package/dist-lib/import/defaults/enable-accessibility/enable-accessibility.mpackage +0 -0
- package/dist-lib/import/defaults/generic_mapper/generic_mapper.mpackage +0 -0
- package/dist-lib/import/defaults/gui-drop/gui-drop.mpackage +0 -0
- package/dist-lib/import/defaults/icesus-loader/icesus-loader.mpackage +0 -0
- package/dist-lib/import/defaults/mg-loader/mg-loader.mpackage +0 -0
- package/dist-lib/import/defaults/mudlet-base-ui/mudlet-base-ui.mpackage +0 -0
- package/dist-lib/import/defaults/mudlet-mapper.xml +1215 -389
- package/dist-lib/import/mudletControlChars.d.ts +14 -0
- package/dist-lib/import/mudletHost.d.ts +73 -10
- package/dist-lib/import/mudletLink.d.ts +53 -2
- package/dist-lib/import/mudletProfileExport.d.ts +38 -5
- package/dist-lib/import/mudletProfileImport.d.ts +110 -12
- package/dist-lib/import/mudletVariables.d.ts +4 -3
- package/dist-lib/import/mudletWriteback.d.ts +15 -1
- package/dist-lib/import/mudletXmlImport.d.ts +46 -0
- package/dist-lib/import/packageFonts.d.ts +33 -0
- package/dist-lib/import/packageInstaller.d.ts +111 -7
- package/dist-lib/import/qtProfileData.d.ts +10 -0
- package/dist-lib/import/remotePackageInstall.d.ts +23 -7
- package/dist-lib/import/zipEntries.d.ts +45 -0
- package/dist-lib/index.d.ts +7 -3
- package/dist-lib/index.js +50508 -29836
- package/dist-lib/logging/SessionLogger.d.ts +75 -15
- package/dist-lib/map/MapSelectionOverlay.d.ts +2 -2
- package/dist-lib/map/MapStore.d.ts +387 -60
- package/dist-lib/map/MudletHighlightOverlay.d.ts +2 -2
- package/dist-lib/map/{MudixMapReader.d.ts → MudletMapReader.d.ts} +2 -2
- package/dist-lib/map/areaGraph.d.ts +120 -0
- package/dist-lib/map/environmentKit.d.ts +36 -0
- package/dist-lib/map/labelPixmap.d.ts +90 -0
- package/dist-lib/map/mapImageExport.d.ts +36 -2
- package/dist-lib/map/mapStyle.d.ts +11 -0
- package/dist-lib/map/mapVersion.d.ts +66 -0
- package/dist-lib/map/pathfinding.d.ts +2 -2
- package/dist-lib/mud/CharLoginController.d.ts +230 -0
- package/dist-lib/mud/ItemIdSequence.d.ts +1 -1
- package/dist-lib/mud/MudSession.d.ts +279 -22
- package/dist-lib/mud/PatternEngine.d.ts +153 -14
- package/dist-lib/mud/aliases/AliasEngine.d.ts +55 -9
- package/dist-lib/mud/autoLogin.d.ts +59 -0
- package/dist-lib/mud/commandSplit.d.ts +9 -0
- package/dist-lib/mud/connection/LineAssembler.d.ts +38 -11
- package/dist-lib/mud/connection/MudClient.d.ts +291 -53
- package/dist-lib/mud/connection/SubnegotiationRepair.d.ts +24 -0
- package/dist-lib/mud/connection/TelnetNegotiator.d.ts +208 -68
- package/dist-lib/mud/connection/telnetDebug.d.ts +8 -8
- package/dist-lib/mud/events.d.ts +102 -23
- package/dist-lib/mud/games/bundledGames.d.ts +12 -7
- package/dist-lib/mud/games/gameLinks.d.ts +40 -0
- package/dist-lib/mud/games/icons/3Kingdoms.png +0 -0
- package/dist-lib/mud/games/icons/3Scapes.png +0 -0
- package/dist-lib/mud/games/icons/achaea.png +0 -0
- package/dist-lib/mud/games/icons/aetolia.png +0 -0
- package/dist-lib/mud/games/icons/banner_astaria.png +0 -0
- package/dist-lib/mud/games/icons/banner_darkmists.png +0 -0
- package/dist-lib/mud/games/icons/banner_dreamland.png +0 -0
- package/dist-lib/mud/games/icons/banner_petria.jpg +0 -0
- package/dist-lib/mud/games/icons/banner_ropmud.png +0 -0
- package/dist-lib/mud/games/icons/blackmud.png +0 -0
- package/dist-lib/mud/games/icons/carrionfields.png +0 -0
- package/dist-lib/mud/games/icons/dragonfire_icon.png +0 -0
- package/dist-lib/mud/games/icons/fed2-logo.png +0 -0
- package/dist-lib/mud/games/icons/icesus_480x120.png +0 -0
- package/dist-lib/mud/games/icons/imperian.png +0 -0
- package/dist-lib/mud/games/icons/infinity_480x120.png +0 -0
- package/dist-lib/mud/games/icons/lusternia.png +0 -0
- package/dist-lib/mud/games/icons/morgengrauen_480x120.png +0 -0
- package/dist-lib/mud/games/icons/mudlet-tutorial.png +0 -0
- package/dist-lib/mud/games/icons/phoenixmud_480x120.png +0 -0
- package/dist-lib/mud/games/icons/starmourn.png +0 -0
- package/dist-lib/mud/games/icons/voidmud_icon.png +0 -0
- package/dist-lib/mud/games/icons/wotmudicon.png +0 -0
- package/dist-lib/mud/games/websiteLinks.d.ts +21 -0
- package/dist-lib/mud/keybindings/KeyEngine.d.ts +110 -4
- package/dist-lib/mud/keybindings/browserReservedKeys.d.ts +2 -2
- package/dist-lib/mud/keybindings/keyEventTarget.d.ts +61 -0
- package/dist-lib/mud/keybindings/qtKeys.d.ts +91 -12
- package/dist-lib/mud/protocol/atcp.d.ts +19 -0
- package/dist-lib/mud/protocol/byteString.d.ts +24 -0
- package/dist-lib/mud/protocol/charLoginFlow.d.ts +243 -16
- package/dist-lib/mud/protocol/charset.d.ts +111 -46
- package/dist-lib/mud/protocol/codePages.d.ts +10 -0
- package/dist-lib/mud/protocol/constants.d.ts +17 -10
- package/dist-lib/mud/protocol/echo.d.ts +23 -27
- package/dist-lib/mud/protocol/gmcp.d.ts +36 -6
- package/dist-lib/mud/protocol/index.d.ts +3 -2
- package/dist-lib/mud/protocol/luaLiteral.d.ts +12 -0
- package/dist-lib/mud/protocol/mccp.d.ts +83 -1
- package/dist-lib/mud/protocol/mnes.d.ts +41 -58
- package/dist-lib/mud/protocol/msdp.d.ts +11 -4
- package/dist-lib/mud/protocol/msp.d.ts +3 -2
- package/dist-lib/mud/protocol/mssp.d.ts +9 -4
- package/dist-lib/mud/protocol/multiByte.d.ts +51 -0
- package/dist-lib/mud/protocol/multiByteEncode.d.ts +42 -0
- package/dist-lib/mud/protocol/mxp.d.ts +193 -14
- package/dist-lib/mud/protocol/oauthClientFlow.d.ts +128 -0
- package/dist-lib/mud/protocol/qtCodePages.generated.d.ts +1 -0
- package/dist-lib/mud/protocol/tlsCodes.d.ts +40 -3
- package/dist-lib/mud/replay/ReplayPlayer.d.ts +16 -1
- package/dist-lib/mud/replay/replayFormat.d.ts +29 -2
- package/dist-lib/mud/text/Console.d.ts +255 -49
- package/dist-lib/mud/text/FormatState.d.ts +137 -14
- package/dist-lib/mud/text/ansiEscapes.d.ts +32 -16
- package/dist-lib/mud/text/colorParsers.d.ts +14 -2
- package/dist-lib/mud/text/colorSpaceId.d.ts +2 -0
- package/dist-lib/mud/text/colors.d.ts +17 -10
- package/dist-lib/mud/text/controlCharacterMode.d.ts +1 -1
- package/dist-lib/mud/text/hyperlinkVisibility.d.ts +1 -1
- package/dist-lib/mud/text/lineBreak.d.ts +5 -0
- package/dist-lib/mud/text/serverWrap.d.ts +2 -2
- package/dist-lib/mud/text/textAnalyzer.d.ts +79 -0
- package/dist-lib/mud/text/unicodeRuns.d.ts +11 -0
- package/dist-lib/mud/text/unicodeTables.generated.d.ts +3 -0
- package/dist-lib/mud/text/wcwidth.d.ts +27 -22
- package/dist-lib/mud/timers/TimerEngine.d.ts +163 -11
- package/dist-lib/mud/timers/workerClock.d.ts +67 -0
- package/dist-lib/mud/triggers/TriggerEngine.d.ts +449 -47
- package/dist-lib/mud/triggers/legacyColorPatterns.d.ts +58 -0
- package/dist-lib/mud/triggers/pcre/Pcre2.d.ts +83 -1
- package/dist-lib/oauth-callback.html +94 -0
- package/dist-lib/pcre2Wasm.d.ts +54 -0
- package/dist-lib/pcre2Wasm.js +241 -0
- package/dist-lib/scripting/EngineHost.d.ts +45 -21
- package/dist-lib/scripting/IScriptingRuntime.d.ts +103 -27
- package/dist-lib/scripting/MxpFrameManager.d.ts +10 -1
- package/dist-lib/scripting/ScriptingAPI.d.ts +1030 -213
- package/dist-lib/scripting/ScriptingEngine.d.ts +727 -106
- package/dist-lib/scripting/StopwatchManager.d.ts +97 -36
- package/dist-lib/scripting/http/HttpService.d.ts +9 -1
- package/dist-lib/scripting/http/userUrl.d.ts +41 -0
- package/dist-lib/scripting/lua/LuaRuntime.d.ts +352 -77
- package/dist-lib/scripting/lua/argContracts.d.ts +71 -0
- package/dist-lib/scripting/lua/bindings/automation.d.ts +1 -1
- package/dist-lib/scripting/lua/bindings/commands.d.ts +13 -0
- package/dist-lib/scripting/lua/bindings/context.d.ts +20 -2
- package/dist-lib/scripting/lua/bindings/diagnostics.d.ts +1 -1
- package/dist-lib/scripting/lua/bindings/map.d.ts +1 -1
- package/dist-lib/scripting/lua/bindings/media.d.ts +2 -2
- package/dist-lib/scripting/lua/bindings/output.d.ts +1 -1
- package/dist-lib/scripting/lua/bindings/session.d.ts +2 -2
- package/dist-lib/scripting/lua/bindings/textEdit.d.ts +1 -1
- package/dist-lib/scripting/lua/bindings/userWindows.d.ts +1 -1
- package/dist-lib/scripting/lua/byteArmor.d.ts +36 -0
- package/dist-lib/scripting/lua/imageSize.d.ts +7 -0
- package/dist-lib/scripting/lua/rex.d.ts +4 -2
- package/dist-lib/scripting/lua/sqlRowEncoder.d.ts +6 -1
- package/dist-lib/scripting/lua/utf8CaseMap.d.ts +1 -0
- package/dist-lib/scripting/lua/utf8Patterns.d.ts +21 -1
- package/dist-lib/scripting/lua/wellFormedStrings.d.ts +40 -0
- package/dist-lib/scripting/lua/yajl.d.ts +43 -5
- package/dist-lib/scripting/profilesPresence.d.ts +20 -2
- package/dist-lib/scripting/vfs/ProfileVFS.d.ts +164 -10
- package/dist-lib/scripting/vfs/fsErrors.d.ts +28 -0
- package/dist-lib/scripting/vfs/idbCommit.d.ts +20 -0
- package/dist-lib/storage/appStore.d.ts +24 -9
- package/dist-lib/storage/hooks.d.ts +5 -1
- package/dist-lib/storage/index.d.ts +2 -2
- package/dist-lib/storage/mapStorage.d.ts +2 -0
- package/dist-lib/storage/persistentStorage.d.ts +3 -1
- package/dist-lib/storage/profileStorage.d.ts +15 -0
- package/dist-lib/storage/profileVfsData.d.ts +3 -3
- package/dist-lib/storage/schema.d.ts +512 -40
- package/dist-lib/storage/storageMigration.d.ts +82 -0
- package/dist-lib/storage-g5V1b-c1.js +2039 -0
- package/dist-lib/styles.css +1 -1
- package/dist-lib/ui/AboutModal.d.ts +1 -1
- package/dist-lib/ui/BrandLoginFields.d.ts +1 -1
- package/dist-lib/ui/BrowserSignInModal.d.ts +23 -0
- package/dist-lib/ui/CmdLineMenuRegistry.d.ts +14 -5
- package/dist-lib/ui/CommandBar.d.ts +8 -8
- package/dist-lib/ui/ConnectionFormModal.d.ts +20 -1
- package/dist-lib/ui/ConnectionScreen.d.ts +9 -1
- package/dist-lib/ui/GameLinkPrompt.d.ts +28 -0
- package/dist-lib/ui/HelpModal.d.ts +5 -1
- package/dist-lib/ui/MapSymbolUsageModal.d.ts +32 -0
- package/dist-lib/ui/MouseEventRegistry.d.ts +31 -4
- package/dist-lib/ui/NotepadModal.d.ts +22 -0
- package/dist-lib/ui/ResizableModal.d.ts +16 -1
- package/dist-lib/ui/SettingsModal.d.ts +10 -1
- package/dist-lib/ui/TlsAlertBanner.d.ts +3 -1
- package/dist-lib/ui/Toolbar.d.ts +22 -1
- package/dist-lib/ui/VaultManageButton.d.ts +10 -5
- package/dist-lib/ui/VaultModal.d.ts +3 -0
- package/dist-lib/ui/buttons/ButtonsBar.d.ts +3 -1
- package/dist-lib/ui/buttons/inactiveButtons.d.ts +25 -0
- package/dist-lib/ui/cmdline/CommandLineManager.d.ts +19 -0
- package/dist-lib/ui/cmdline/plainText.d.ts +16 -0
- package/dist-lib/ui/cmdline/subCommandLine.d.ts +78 -0
- package/dist-lib/ui/cmdline/useCmdLineSelection.d.ts +26 -0
- package/dist-lib/ui/cmdline/useSubCommandLineKeys.d.ts +33 -0
- package/dist-lib/ui/codemirror/lineParagraphMarks.d.ts +19 -0
- package/dist-lib/ui/codemirror/luaHover.d.ts +7 -0
- package/dist-lib/ui/codemirror/options.d.ts +33 -0
- package/dist-lib/ui/codemirror/theme.d.ts +29 -5
- package/dist-lib/ui/commands/addonCommands.d.ts +134 -0
- package/dist-lib/ui/commands/appShortcuts.d.ts +86 -0
- package/dist-lib/ui/commands/hostCommands.d.ts +88 -0
- package/dist-lib/ui/commands/keyMatch.d.ts +20 -0
- package/dist-lib/ui/commands/keySequence.d.ts +57 -0
- package/dist-lib/ui/components/ContextMenu.d.ts +21 -1
- package/dist-lib/ui/components/FontPicker.d.ts +5 -1
- package/dist-lib/ui/components/useModalFocus.d.ts +13 -1
- package/dist-lib/ui/helpTopics.d.ts +15 -0
- package/dist-lib/ui/labels/LabelManager.d.ts +172 -9
- package/dist-lib/ui/labels/LabelOverlay.d.ts +19 -0
- package/dist-lib/ui/labels/backgroundImageSize.d.ts +19 -0
- package/dist-lib/ui/labels/labelModel.d.ts +64 -0
- package/dist-lib/ui/labels/qColor.d.ts +13 -0
- package/dist-lib/ui/labels/qtCss.d.ts +12 -4
- package/dist-lib/ui/landmarks.d.ts +9 -0
- package/dist-lib/ui/launcher/ActionMenu.d.ts +19 -0
- package/dist-lib/ui/launcher/GameDetails.d.ts +21 -0
- package/dist-lib/ui/launcher/GameSection.d.ts +18 -0
- package/dist-lib/ui/launcher/LauncherSearch.d.ts +23 -0
- package/dist-lib/ui/launcher/ProfileArt.d.ts +20 -0
- package/dist-lib/ui/launcher/ProfileSection.d.ts +43 -0
- package/dist-lib/ui/launcher/launcherModel.d.ts +72 -0
- package/dist-lib/ui/layout/overlayLayerOrder.d.ts +2 -2
- package/dist-lib/ui/menu/MenuBar.d.ts +31 -0
- package/dist-lib/ui/menu/SplitButton.d.ts +39 -0
- package/dist-lib/ui/menu/anchoredPopup.d.ts +74 -0
- package/dist-lib/ui/menu/appMenus.d.ts +65 -0
- package/dist-lib/ui/menu/menuModel.d.ts +88 -0
- package/dist-lib/ui/menu/toolbarModel.d.ts +56 -0
- package/dist-lib/ui/notepad.d.ts +76 -0
- package/dist-lib/ui/openSignInPage.d.ts +14 -0
- package/dist-lib/ui/output/OutputContextMenu.d.ts +14 -1
- package/dist-lib/ui/output/OutputRenderer.d.ts +5 -0
- package/dist-lib/ui/output/OutputSearchBar.d.ts +5 -1
- package/dist-lib/ui/output/StickyOutputPanel.d.ts +17 -3
- package/dist-lib/ui/output/TextAnalyzerModal.d.ts +25 -0
- package/dist-lib/ui/output/caretMode.d.ts +3 -2
- package/dist-lib/ui/output/clearSplit.d.ts +11 -0
- package/dist-lib/ui/output/outputCopy.d.ts +41 -2
- package/dist-lib/ui/output/outputRows.d.ts +43 -0
- package/dist-lib/ui/output/selectionGesture.d.ts +35 -0
- package/dist-lib/ui/output/wordSelection.d.ts +33 -0
- package/dist-lib/ui/search/matcher.d.ts +14 -4
- package/dist-lib/ui/settings/SettingsShell.d.ts +91 -0
- package/dist-lib/ui/settings/ShortcutEditor.d.ts +13 -0
- package/dist-lib/ui/sound/SoundManager.d.ts +210 -44
- package/dist-lib/ui/sound/closedCaption.d.ts +4 -1
- package/dist-lib/ui/sound/mediaDirection.d.ts +35 -0
- package/dist-lib/ui/tabCompletion.d.ts +53 -0
- package/dist-lib/ui/textedit/TextEditManager.d.ts +11 -2
- package/dist-lib/ui/useOpenProfiles.d.ts +1 -1
- package/dist-lib/ui/video/VideoManager.d.ts +7 -0
- package/dist-lib/ui/windows/WindowManager.d.ts +452 -37
- package/dist-lib/ui/windows/panels/ScriptEditorPanel.d.ts +14 -0
- package/dist-lib/ui/windows/panels/ScriptSearch.d.ts +6 -1
- package/dist-lib/ui/windows/panels/TextPanel.d.ts +4 -1
- package/dist-lib/ui/windows/panels/VariablesView.d.ts +37 -7
- package/dist-lib/ui/windows/panels/WindowCmdLine.d.ts +4 -2
- package/dist-lib/ui/windows/panels/aliasLoop.d.ts +24 -0
- package/dist-lib/ui/windows/panels/editorClipboard.d.ts +45 -0
- package/dist-lib/ui/windows/panels/editorUndo.d.ts +79 -0
- package/dist-lib/ui/windows/panels/mapAreaChange.d.ts +10 -0
- package/dist-lib/utils/appShellCache.d.ts +25 -0
- package/dist-lib/utils/fontFamilyName.d.ts +13 -0
- package/dist-lib/utils/fontLoader.d.ts +31 -0
- package/dist-lib/utils/formatBytes.d.ts +4 -0
- package/dist-lib/utils/mustBeOneOf.d.ts +9 -0
- package/dist-lib/utils/profileLock.d.ts +1 -1
- package/dist-lib/utils/systemTheme.d.ts +24 -0
- package/dist-lib/utils/timeZone.d.ts +10 -0
- package/dist-lib/vault/CredentialVault.d.ts +51 -5
- package/dist-lib/vault/deviceUnlock.d.ts +47 -0
- package/dist-lib/vault/vaultAccess.d.ts +24 -2
- package/dist-lib/vault/vaultHelpTopic.d.ts +9 -0
- package/dist-lib/vault/vaultRecord.d.ts +33 -1
- package/dist-lib/vfs-sw.js +220 -11
- package/dist-lib/vite.d.ts +1 -1
- package/dist-lib/vite.js +66 -43
- package/package.json +23 -15
- package/dist-lib/assets/mapParser.worker-t-3rd1zR.js +0 -9
- package/dist-lib/mud/connection/PingTracker.d.ts +0 -41
- package/dist-lib/ui/BundledGameGrid.d.ts +0 -21
- package/dist-lib/ui/ConnectionGrid.d.ts +0 -21
- package/dist-lib/ui/bufferWords.d.ts +0 -38
|
@@ -1,15 +1,61 @@
|
|
|
1
1
|
import type { AliasNode } from '../../storage/schema';
|
|
2
2
|
import { PatternEngine } from '../PatternEngine';
|
|
3
3
|
export type { AliasNode };
|
|
4
|
+
/** One permanent alias a command matched — see AliasEngine.forEachPermMatch. */
|
|
5
|
+
export interface PermAliasMatch {
|
|
6
|
+
alias: AliasNode;
|
|
7
|
+
matchedText: string;
|
|
8
|
+
captures: string[];
|
|
9
|
+
named: Record<string, string>;
|
|
10
|
+
}
|
|
4
11
|
export declare class AliasEngine extends PatternEngine<AliasNode> {
|
|
5
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Fire EVERY matching temp alias, and report whether any did.
|
|
14
|
+
*
|
|
15
|
+
* Not "the first one": `AliasUnit::processDataStream` walks the whole unit
|
|
16
|
+
* and calls `match()` on each active alias, so two aliases on one command
|
|
17
|
+
* both run — which is how a package can add its own handling of a command
|
|
18
|
+
* the player already has an alias for, and what the corpus pins by putting
|
|
19
|
+
* two aliases on one pattern and expecting both to see it.
|
|
20
|
+
*
|
|
21
|
+
* The walk is over a snapshot, as Mudlet's is (issue #4297): an alias's
|
|
22
|
+
* script may create or kill one, and mutating the map underneath the
|
|
23
|
+
* iterator is precisely what the deferred reap exists to avoid. One killed
|
|
24
|
+
* by an earlier fire is skipped rather than run, which is what `isActive()`
|
|
25
|
+
* decides on the desktop side.
|
|
26
|
+
*/
|
|
6
27
|
processTemp(input: string): boolean;
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
28
|
+
/** Match one temp alias against `input` and run it if it hits. */
|
|
29
|
+
private fireTemp;
|
|
30
|
+
/**
|
|
31
|
+
* A command's whole alias pass: every matching alias, temporary and
|
|
32
|
+
* permanent alike, in the one order desktop's `mAliasRootNodeList` holds
|
|
33
|
+
* them — creation order, with a permanent subtree walked where its root
|
|
34
|
+
* sits (see PatternEngine's unified ordering). Running all the temps first
|
|
35
|
+
* put a tempAlias made after a permAlias ahead of it (mudlet-web#327).
|
|
36
|
+
* Temps fire themselves; each permanent hit goes to `firePerm` as it is
|
|
37
|
+
* reached, for the reason {@link forEachPermMatch} gives. Both lists are
|
|
38
|
+
* the ones that stood when the pass began. True when anything fired.
|
|
39
|
+
*/
|
|
40
|
+
process(input: string, firePerm: (hit: PermAliasMatch) => void): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Walk the perm aliases in tree order and hand each one the input matches
|
|
43
|
+
* to `fire` as it is reached — all of them fire, for the reason
|
|
44
|
+
* {@link processTemp} gives. `matchedText` is the portion of `input` the
|
|
45
|
+
* regex actually matched (Mudlet's `matches[1]`), which differs from the
|
|
46
|
+
* whole input for an unanchored pattern.
|
|
47
|
+
*
|
|
48
|
+
* Match-then-fire, one alias at a time, rather than collecting every match
|
|
49
|
+
* first: `AliasUnit::processDataStream` asks each alias `isActive()` as it
|
|
50
|
+
* reaches it, so an earlier alias's `disableAlias`/`enableAlias` decides
|
|
51
|
+
* whether a later one runs in the same pass (issue #284). The walk is over
|
|
52
|
+
* the list as it stood when the pass began — a new alias waits for the
|
|
53
|
+
* next command — but each step reads the live state, which the toggle has
|
|
54
|
+
* already reloaded through the store subscription.
|
|
55
|
+
*/
|
|
56
|
+
forEachPermMatch(input: string, fire: (hit: PermAliasMatch) => void): void;
|
|
57
|
+
private firePermIfMatched;
|
|
58
|
+
/** Every perm alias the input matches, in tree order, without firing any.
|
|
59
|
+
* A command goes through {@link forEachPermMatch} instead. */
|
|
60
|
+
matchAllPerm(input: string): PermAliasMatch[];
|
|
15
61
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Text auto-login — Mudlet's `mTimerLogin` / `mTimerPass` pair in cTelnet.
|
|
3
|
+
*
|
|
4
|
+
* Desktop answers a text login on fixed timers and nothing else:
|
|
5
|
+
* `slot_socketConnected` starts the login timer, `slot_send_login` sends the
|
|
6
|
+
* saved character name when there is one and, when a password is saved too
|
|
7
|
+
* (`Host::hasAutoLoginCredentials`), starts the password timer, and
|
|
8
|
+
* `slot_send_pass` sends the password — "timer-based, independent of ECHO
|
|
9
|
+
* mode". No prompt marker, no ECHO negotiation, moves either step earlier.
|
|
10
|
+
*
|
|
11
|
+
* Mudlet Web used to answer the first IAC GA/EOR with the name and the first
|
|
12
|
+
* ECHO-off with the password. A game that greets with a GA-marked splash
|
|
13
|
+
* ("Press ENTER to continue") took the name at 42 ms, answering a question the
|
|
14
|
+
* game had not asked yet (issue #237). And the name was sent only when a
|
|
15
|
+
* password was saved as well, where desktop sends it whenever it is set.
|
|
16
|
+
*
|
|
17
|
+
* Neither step echoes: both are `cTelnet::sendData`, below `Host::send` where
|
|
18
|
+
* the command echo lives, and neither is a game command (so neither arms
|
|
19
|
+
* character-at-a-time detection — the password prompt the name walks into is
|
|
20
|
+
* exactly the ECHO+SGA state that detection is trying to tell apart).
|
|
21
|
+
*/
|
|
22
|
+
/** cTelnet's `AUTO_LOGIN_USERNAME_DELAY_MS`: connect → character name. */
|
|
23
|
+
export declare const AUTO_LOGIN_USERNAME_DELAY_MS = 2000;
|
|
24
|
+
/** cTelnet's `AUTO_LOGIN_PASSWORD_DELAY_MS`: character name → password. */
|
|
25
|
+
export declare const AUTO_LOGIN_PASSWORD_DELAY_MS = 1000;
|
|
26
|
+
export interface AutoLoginCredentials {
|
|
27
|
+
account: string;
|
|
28
|
+
password: string;
|
|
29
|
+
}
|
|
30
|
+
export interface TextAutoLoginDeps {
|
|
31
|
+
/** Read at each step rather than at connect, as Mudlet reads the Host's
|
|
32
|
+
* login and password when its timers fire. */
|
|
33
|
+
readCredentials: () => AutoLoginCredentials;
|
|
34
|
+
/** `cTelnet::sendData(login)` — no echo, not a game command. */
|
|
35
|
+
sendLogin: (account: string) => void;
|
|
36
|
+
/** `cTelnet::sendData(pass, false)` — never shown, never echoed. */
|
|
37
|
+
sendPassword: (password: string) => void;
|
|
38
|
+
setTimeout?: (fn: () => void, ms: number) => unknown;
|
|
39
|
+
clearTimeout?: (handle: unknown) => void;
|
|
40
|
+
}
|
|
41
|
+
export declare class TextAutoLogin {
|
|
42
|
+
private readonly deps;
|
|
43
|
+
private loginTimer;
|
|
44
|
+
private passTimer;
|
|
45
|
+
private readonly setTimer;
|
|
46
|
+
private readonly clearTimer;
|
|
47
|
+
constructor(deps: TextAutoLoginDeps);
|
|
48
|
+
/** The game link is up — `slot_socketConnected` starting `mTimerLogin`.
|
|
49
|
+
* Started on every connection, credentials or not: they are looked at
|
|
50
|
+
* only when the timer fires. */
|
|
51
|
+
start(): void;
|
|
52
|
+
/** `cancelLoginTimers` — the connection ended, or GMCP `Char.Login` has
|
|
53
|
+
* taken the login over. */
|
|
54
|
+
cancel(): void;
|
|
55
|
+
/** Whether either step is still to come. */
|
|
56
|
+
get pending(): boolean;
|
|
57
|
+
private sendLogin;
|
|
58
|
+
private sendPassword;
|
|
59
|
+
}
|
|
@@ -14,3 +14,12 @@
|
|
|
14
14
|
* quietly inventing an empty command.
|
|
15
15
|
*/
|
|
16
16
|
export declare function splitCommands(text: string, separator: string): string[];
|
|
17
|
+
/**
|
|
18
|
+
* The rest of Host::send's loop on top of the split: each part has its line
|
|
19
|
+
* feeds removed, but only after the empty parts were skipped. So a part that
|
|
20
|
+
* was nothing but a line feed survives as an EMPTY command — which is what an
|
|
21
|
+
* echoed command's trailing line feed (see MudSession.echoSentCommand) leaves
|
|
22
|
+
* after a final separator, or as the whole of an empty one, and what a `^$`
|
|
23
|
+
* alias then fires on.
|
|
24
|
+
*/
|
|
25
|
+
export declare function splitSentCommands(text: string, separator: string): string[];
|
|
@@ -10,8 +10,10 @@ export interface LineAssemblerCallbacks {
|
|
|
10
10
|
/** Deliver assembled whole lines (or a flushed prompt tail) downstream —
|
|
11
11
|
* the trigger pipeline and rendering treat each chunk as complete lines. */
|
|
12
12
|
onChunk(text: string, ts: number): void;
|
|
13
|
-
/** Fired
|
|
14
|
-
* owner emits its `prompt` event here
|
|
13
|
+
/** Fired for every prompt marker (IAC GA/EOR), after it flushed the line
|
|
14
|
+
* it ends — the owner emits its `prompt` event here, and the line just
|
|
15
|
+
* handed to `onChunk` is the prompt. A bare marker ends an empty line, so
|
|
16
|
+
* there always is one. */
|
|
15
17
|
onPrompt(): void;
|
|
16
18
|
/** Fired after an idle-timer flush so the owner can render any messages
|
|
17
19
|
* the flushed chunk produced (MudClient.flushMessageBuffer). */
|
|
@@ -56,12 +58,6 @@ export declare class LineAssembler {
|
|
|
56
58
|
* partial lines here, because our render path finalizes every emitted
|
|
57
59
|
* chunk and has no downstream open-line carry. */
|
|
58
60
|
private _gaDriver;
|
|
59
|
-
/** True at the start of a GA-driven data block — i.e. before any content of
|
|
60
|
-
* the current post-GA transmission has been seen. Drives the
|
|
61
|
-
* `fixUnnecessaryLinebreaks` leading-newline strip, which fires at most once
|
|
62
|
-
* per block. Set true on connect and after each prompt flush, cleared once
|
|
63
|
-
* the block's leading-newline question has been settled. */
|
|
64
|
-
private atPromptBlockStart;
|
|
65
61
|
private fixUnnecessaryLinebreaks;
|
|
66
62
|
private undoServerWrap;
|
|
67
63
|
private undoServerWrapWidth;
|
|
@@ -82,14 +78,44 @@ export declare class LineAssembler {
|
|
|
82
78
|
setPromptTimeoutMs(ms: number): void;
|
|
83
79
|
getPromptTimeoutMs(): number;
|
|
84
80
|
/** Mudlet `setConfig("fixUnnecessaryLinebreaks", …)`. Takes effect on the
|
|
85
|
-
* next
|
|
81
|
+
* next block that ends in a prompt marker; never retroactive. */
|
|
86
82
|
setFixUnnecessaryLinebreaks(enabled: boolean): void;
|
|
83
|
+
/**
|
|
84
|
+
* Mudlet's "Fix unnecessary linebreaks on GA servers" (cTelnet::gotPrompt
|
|
85
|
+
* under `mUSE_IRE_DRIVER_BUGFIX`): from a block of one read that ENDS in
|
|
86
|
+
* IAC GA/EOR, drop a single leading newline — after any leading SGR
|
|
87
|
+
* escapes, none of which it removes. `block` is that run's raw text, up to
|
|
88
|
+
* the marker; it is returned unchanged when the option is off.
|
|
89
|
+
*
|
|
90
|
+
* Only such a block is touched. Text that arrives on its own, with no
|
|
91
|
+
* prompt marker after it — the reply that follows a prompt a moment later,
|
|
92
|
+
* say — keeps its newline, as desktop's gotRest posts it untouched.
|
|
93
|
+
*
|
|
94
|
+
* Desktop strips from `mMudData`, which once GA-driven holds only this
|
|
95
|
+
* block (every read's leftovers are posted straight away). Before the first
|
|
96
|
+
* marker it also still holds whatever partial line the previous reads left
|
|
97
|
+
* waiting for the posting timer, so a block continuing one does not start
|
|
98
|
+
* at its own first byte — which is what the held tail stands in for here.
|
|
99
|
+
*/
|
|
100
|
+
stripPromptBlockNewline(block: string): string;
|
|
101
|
+
/**
|
|
102
|
+
* The fix-up above for text posted ahead of an encoding change in a read
|
|
103
|
+
* (cTelnet::postHeldDataBeforeEncodingChange): it may open a prompt whose
|
|
104
|
+
* GA the posting hides it from, so once GA-driven its leading newline is
|
|
105
|
+
* dropped there instead. Null when the fix does not apply — then the GA
|
|
106
|
+
* still judges the rest of the block.
|
|
107
|
+
*/
|
|
108
|
+
stripPostedPromptStart(text: string): string | null;
|
|
87
109
|
/** Mudlet `setConfig("undoServerWrap", …)`. Turning it off commits anything
|
|
88
110
|
* held on the spot rather than stranding it until the next line. */
|
|
89
111
|
setUndoServerWrap(enabled: boolean): void;
|
|
90
112
|
/** Mudlet `setConfig("undoServerWrapWidth", …)`. Applies from the next line;
|
|
91
113
|
* the held one was already judged against the previous column. */
|
|
92
114
|
setUndoServerWrapWidth(width: number): void;
|
|
115
|
+
/** Nothing held back: no partial tail and no line waiting on a wrap
|
|
116
|
+
* continuation, so no timer of ours has anything to fire on. MudClient
|
|
117
|
+
* only pauses between slices of a large read at such a point. */
|
|
118
|
+
get idle(): boolean;
|
|
93
119
|
/** Drop all held state (call on connect and after close). */
|
|
94
120
|
reset(): void;
|
|
95
121
|
/** Feed one frame's decoded text plus whether the frame carried a prompt
|
|
@@ -101,8 +127,9 @@ export declare class LineAssembler {
|
|
|
101
127
|
/** Flush a held-back partial line (text after the final `\n` of a frame).
|
|
102
128
|
* Triggered by prompt markers (IAC GA/EOR), the idle-flush timer, or
|
|
103
129
|
* socket close. Pushes the tail through the normal chunk path so triggers
|
|
104
|
-
* and rendering treat it as a complete line.
|
|
105
|
-
|
|
130
|
+
* and rendering treat it as a complete line. Returns whether any text was
|
|
131
|
+
* emitted. */
|
|
132
|
+
flush(ts: number, final?: boolean): boolean;
|
|
106
133
|
/**
|
|
107
134
|
* Run the whole lines of one ready chunk through the server-wrap join and
|
|
108
135
|
* emit what comes out. With the option off this is `onChunk(ready)` and
|