@mudlet/mudlet-web 0.5.0 → 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.
- 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 +22 -14
- 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
|
@@ -4,6 +4,38 @@ import type { FormatStateSnapshot } from './FormatState';
|
|
|
4
4
|
/** Longest run of characters one echo or insert may add to a line. Mudlet's
|
|
5
5
|
* `TBuffer::MAX_CHARACTERS_PER_ECHO`. */
|
|
6
6
|
export declare const MAX_CHARACTERS_PER_ECHO = 1000000;
|
|
7
|
+
/**
|
|
8
|
+
* Scrollback line limit of a console nothing has sized — `TBuffer::mLinesLimit`
|
|
9
|
+
* (src/TBuffer.h:386), 10,000 lines with a batch of a tenth of that. Miniconsoles,
|
|
10
|
+
* user windows and buffers keep it until a script calls setConsoleBufferSize.
|
|
11
|
+
*
|
|
12
|
+
* The floor is `TBuffer::setBufferSize`'s (src/TBuffer.cpp:405) — a smaller
|
|
13
|
+
* buffer is not usable. The ceiling stands in for
|
|
14
|
+
* `TBuffer::getMaxBufferSize()`, which desktop derives from physical memory; a
|
|
15
|
+
* browser tab cannot ask about that, so "use the maximum" gets a fixed generous
|
|
16
|
+
* cap instead.
|
|
17
|
+
*/
|
|
18
|
+
export declare const DEFAULT_CONSOLE_BUFFER_SIZE = 10000;
|
|
19
|
+
/**
|
|
20
|
+
* The main console's scrollback on a fresh profile — Mudlet's per-profile
|
|
21
|
+
* `consoleBufferSize` (`Host::mConsoleBufferSize`, Host.h, saved to the profile
|
|
22
|
+
* XML by XMLexport.cpp), which desktop applies to main over TBuffer's own
|
|
23
|
+
* default. 100,000 lines with a batch of 20,000 (mudlet-web#341): a tenth of it
|
|
24
|
+
* dropped scrollback, fired sysBufferShrinkEvent and shifted line numbers ten
|
|
25
|
+
* times as early as desktop.
|
|
26
|
+
*/
|
|
27
|
+
export declare const MAIN_CONSOLE_BUFFER_SIZE = 100000;
|
|
28
|
+
export declare const MIN_CONSOLE_BUFFER_SIZE = 100;
|
|
29
|
+
export declare const MAX_CONSOLE_BUFFER_SIZE = 1000000;
|
|
30
|
+
/** What a line index outside the buffer reads as, byte for byte Mudlet's
|
|
31
|
+
* `badLineError` (TBuffer.cpp) — the QString its `line()` hands back for any
|
|
32
|
+
* index below zero or past the end, instead of failing. Scripts compare
|
|
33
|
+
* against this literal, so it is API surface, not a diagnostic. */
|
|
34
|
+
export declare const BAD_LINE_ERROR = "ERROR: invalid line number";
|
|
35
|
+
/** Mudlet's batch-deletion size for a given buffer size — 5% of it, never below
|
|
36
|
+
* 100 lines (mudlet.cpp:2270, and the identical sum in
|
|
37
|
+
* dlgProfilePreferences.cpp:3288 when the preference is applied). */
|
|
38
|
+
export declare function consoleBatchDeleteSize(lines: number): number;
|
|
7
39
|
/**
|
|
8
40
|
* Self-contained text output entity — equivalent of Mudlet's TConsole.
|
|
9
41
|
* Owns format state, line history, and cursor position.
|
|
@@ -15,7 +47,43 @@ export declare class Console {
|
|
|
15
47
|
private history;
|
|
16
48
|
private pending;
|
|
17
49
|
private partial;
|
|
50
|
+
/**
|
|
51
|
+
* Whether the buffer has a current line at all.
|
|
52
|
+
*
|
|
53
|
+
* Mudlet's TBuffer always keeps one — the line being built — as the last
|
|
54
|
+
* entry of lineBuffer, so a console that has printed nothing still holds a
|
|
55
|
+
* line and getLineCount() answers 0 rather than -1. Mudlet Web keeps that line in
|
|
56
|
+
* `partial`, beside `history` instead of in it, which is why getLineNumber()
|
|
57
|
+
* and moveTo() already treat it as living at index `history.length`; this
|
|
58
|
+
* flag is what lets the READ side agree with them.
|
|
59
|
+
*
|
|
60
|
+
* False in exactly one situation, and it is the one EmptyBufferOps_spec is
|
|
61
|
+
* about: deleteLine() removing the open line itself, which is what
|
|
62
|
+
* clearWindow() followed by deleteLine() does. That is the only way to a
|
|
63
|
+
* buffer of zero lines, and telling it apart from a one-line buffer is
|
|
64
|
+
* precisely what getLines() answering an empty table exists for.
|
|
65
|
+
*/
|
|
66
|
+
private hasOpenLine;
|
|
18
67
|
private cursorIdx;
|
|
68
|
+
/**
|
|
69
|
+
* Whether writing to the buffer carries the user cursor along with it.
|
|
70
|
+
*
|
|
71
|
+
* True only for the main console, whose cursor the trigger engine parks on
|
|
72
|
+
* each line as it arrives. Every other TConsole in Mudlet — miniconsoles,
|
|
73
|
+
* user windows, buffers — starts with `mUserCursor` at (0, 0) and keeps it
|
|
74
|
+
* there however much is echoed, until a script moves it (moveCursor,
|
|
75
|
+
* moveCursorEnd, …). So `getLineNumber`/`getCurrentLine`/`selectString`/
|
|
76
|
+
* `copy` on such a window act on line 0 by default (Mudlet/mudlet-web#236).
|
|
77
|
+
* With this off the cursor starts on line 0 and the paths that would
|
|
78
|
+
* otherwise send it back to "following the end" put it there instead.
|
|
79
|
+
*/
|
|
80
|
+
private readonly followsOutput;
|
|
81
|
+
constructor(options?: {
|
|
82
|
+
followsOutput?: boolean;
|
|
83
|
+
});
|
|
84
|
+
/** Where a reset (clear, a paste) leaves the cursor: following the end on
|
|
85
|
+
* the main console, the first line everywhere else — see followsOutput. */
|
|
86
|
+
private resetCursor;
|
|
19
87
|
private cursorCol;
|
|
20
88
|
private _maxLines;
|
|
21
89
|
private _batchDeleteSize;
|
|
@@ -38,7 +106,34 @@ export declare class Console {
|
|
|
38
106
|
setMaxLines(n: number): void;
|
|
39
107
|
get batchDeleteSize(): number;
|
|
40
108
|
setBatchDeleteSize(n: number): void;
|
|
109
|
+
/** Append `text`, interpreting any ANSI escape sequences in it against the
|
|
110
|
+
* current pen — the path for text that came from a server (feedTriggers'
|
|
111
|
+
* carried partial) or that Mudlet Web built as ANSI itself (the colour-echo
|
|
112
|
+
* fast path). A script's own `echo` goes through {@link echoText}. */
|
|
41
113
|
echo(text: string): void;
|
|
114
|
+
/**
|
|
115
|
+
* Append `text` verbatim in the current pen. Mudlet's echo family
|
|
116
|
+
* (`TConsoleModel::print` → `TBuffer::append`) stores every character it is
|
|
117
|
+
* given, an ESC byte included — only the network path decodes escape
|
|
118
|
+
* sequences — so `echo("A\27[31mB")` keeps the sequence as text and the pen
|
|
119
|
+
* colour unchanged.
|
|
120
|
+
*/
|
|
121
|
+
echoText(text: string, state?: FormatStateSnapshot): void;
|
|
122
|
+
/** `state` (literal writes only) replaces the pen for this one write and
|
|
123
|
+
* leaves the pen itself untouched — how a link gets Mudlet's standard
|
|
124
|
+
* link format without disturbing the format current on the console. */
|
|
125
|
+
private write;
|
|
126
|
+
/**
|
|
127
|
+
* Wrap the line still being built the moment it outgrows the wrap width,
|
|
128
|
+
* not when its newline arrives. Mudlet's TBuffer::append runs wrapLine() on
|
|
129
|
+
* the last line after every echo, so a long `echo` without a trailing
|
|
130
|
+
* newline is already several buffer lines: getLineCount, the cursor moves
|
|
131
|
+
* and getCurrentLine see them straight away, and the next echo carries on
|
|
132
|
+
* from the last piece. Every piece but the last is finished and goes to
|
|
133
|
+
* history; the last stays open as the new partial, marked as a
|
|
134
|
+
* continuation so its later wrap takes the hanging indent.
|
|
135
|
+
*/
|
|
136
|
+
private wrapPartial;
|
|
42
137
|
/**
|
|
43
138
|
* Move every newline-terminated line out of the in-flight `partial` and
|
|
44
139
|
* into history, leaving whatever follows the last newline as the new
|
|
@@ -55,10 +150,10 @@ export declare class Console {
|
|
|
55
150
|
* — the renderer for network output drains via the 'message' event
|
|
56
151
|
* pipeline; pending is reserved for script-driven echo flushes.
|
|
57
152
|
*/
|
|
58
|
-
appendLine(buffer: AnsiAwareBuffer): void;
|
|
153
|
+
appendLine(buffer: AnsiAwareBuffer, moveCursor?: boolean): void;
|
|
59
154
|
/**
|
|
60
|
-
*
|
|
61
|
-
* TConsole::appendBuffer, the primitive behind the `appendBuffer`/`paste`
|
|
155
|
+
* Write a pre-formatted buffer onto the end of the last line and end that
|
|
156
|
+
* line — mirrors Mudlet's TConsole::appendBuffer, the primitive behind the `appendBuffer`/`paste`
|
|
62
157
|
* clipboard functions. Unlike `appendLine` (network pipeline) this also
|
|
63
158
|
* enqueues into `pending` so the line reaches the renderer through the
|
|
64
159
|
* normal drain path; the cursor resets to the end so a following
|
|
@@ -73,10 +168,24 @@ export declare class Console {
|
|
|
73
168
|
* secret behind it.
|
|
74
169
|
*/
|
|
75
170
|
private store;
|
|
171
|
+
/**
|
|
172
|
+
* Give the buffer its open line back after deleteLine() removed it while
|
|
173
|
+
* complete lines remained. Mudlet has no separate open line: its last line
|
|
174
|
+
* is simply whatever lineBuffer ends with, so once the old last line is
|
|
175
|
+
* deleted the one above it is the line the next write lands on — an echo
|
|
176
|
+
* continues it rather than starting a fresh one. Here that line moves back
|
|
177
|
+
* out of history into `partial`; its row leaves the DOM so the partial
|
|
178
|
+
* render can show it in its place.
|
|
179
|
+
*/
|
|
180
|
+
private reopenLastLine;
|
|
76
181
|
private evict;
|
|
77
182
|
/** Drain newly completed lines to hand to the renderer. */
|
|
78
183
|
takeLines(): AnsiAwareBuffer[];
|
|
79
184
|
get currentPartial(): AnsiAwareBuffer;
|
|
185
|
+
/** The last finished line — the one before the line being built, which is
|
|
186
|
+
* where TBuffer's `buffer.size() - 2` points — or undefined when there is
|
|
187
|
+
* none yet. */
|
|
188
|
+
get lastFinishedLine(): AnsiAwareBuffer | undefined;
|
|
80
189
|
/**
|
|
81
190
|
* Promote the in-flight partial (an echo without a trailing newline, e.g.
|
|
82
191
|
* a trigger's `cecho("\n text")`) into a finished history line and return
|
|
@@ -89,6 +198,15 @@ export declare class Console {
|
|
|
89
198
|
* `takeLines()` won't re-emit it.
|
|
90
199
|
*/
|
|
91
200
|
completePartialLine(): AnsiAwareBuffer | null;
|
|
201
|
+
/**
|
|
202
|
+
* `TConsole::printCommand` outside the trigger engine: when the last line
|
|
203
|
+
* is still flagged as a prompt (and nothing has been echoed after it), the
|
|
204
|
+
* command is written onto the end of that line instead of onto a line of
|
|
205
|
+
* its own, and the line stops being a prompt — so only the first command
|
|
206
|
+
* after a prompt joins it. Returns the line it was added to, or null when
|
|
207
|
+
* there is no such prompt line and the caller appends as usual.
|
|
208
|
+
*/
|
|
209
|
+
appendToPromptLine(buffer: AnsiAwareBuffer): AnsiAwareBuffer | null;
|
|
92
210
|
clear(): void;
|
|
93
211
|
/**
|
|
94
212
|
* Discard only the in-flight partial (and the leading-newline latch),
|
|
@@ -110,11 +228,51 @@ export declare class Console {
|
|
|
110
228
|
* it made `prefix()`/`suffix()` on an unfinished line silent no-ops.
|
|
111
229
|
*/
|
|
112
230
|
private get onPartialLine();
|
|
231
|
+
/**
|
|
232
|
+
* Whether a script parked the cursor on the open line while it is still
|
|
233
|
+
* empty — moveCursorEnd(), or moveCursor() onto the line after a trailing
|
|
234
|
+
* `\n`. Desktop's cursor is on that empty line then: getCurrentLine() reads
|
|
235
|
+
* '' and insertText() starts the new line. Treating the slot as "the last
|
|
236
|
+
* complete line" glued the inserted text onto the line above
|
|
237
|
+
* (mudlet-web#331). Only an explicit index counts — the main console's
|
|
238
|
+
* following-the-end cursor (-1) still reads the last complete line — and
|
|
239
|
+
* not mid trigger pass, where there is no open line (see currentBuffer).
|
|
240
|
+
*/
|
|
241
|
+
private get onEmptyOpenLine();
|
|
113
242
|
getLine(): string;
|
|
114
243
|
getBuffer(): AnsiAwareBuffer | null;
|
|
115
244
|
/** The buffer the cursor is on: the partial when it is following the end,
|
|
116
245
|
* otherwise the history line it was parked on. */
|
|
117
246
|
private currentBuffer;
|
|
247
|
+
/** Line `index` in Mudlet's numbering (the open line last), or null when
|
|
248
|
+
* the index names no line. */
|
|
249
|
+
lineBuffer(index: number): AnsiAwareBuffer | null;
|
|
250
|
+
/** The Lua code of every scripted link or popup this console's lines hold. */
|
|
251
|
+
linkCommands(): string[];
|
|
252
|
+
/** Whether `buf` is still one of this console's lines — the open one or a
|
|
253
|
+
* complete one — rather than one a clear, a deletion or the scrollback
|
|
254
|
+
* limit has taken away. */
|
|
255
|
+
/** Lines the scrollback limit has trimmed away, as opposed to ones a
|
|
256
|
+
* clear or a delete took — see {@link wasTrimmed}. */
|
|
257
|
+
private readonly trimmed;
|
|
258
|
+
/** Whether `buf` was one of this console's lines until the scrollback
|
|
259
|
+
* limit trimmed it. */
|
|
260
|
+
wasTrimmed(buf: AnsiAwareBuffer): boolean;
|
|
261
|
+
holdsLine(buf: AnsiAwareBuffer): boolean;
|
|
262
|
+
/** The last complete line, whatever the cursor is on — where Mudlet's
|
|
263
|
+
* trigger-mode echo writes (`TConsoleModel::echo` inserts at the end of
|
|
264
|
+
* line `size() - 1`), which after deleteLine() is the line above. */
|
|
265
|
+
lastLine(): AnsiAwareBuffer | null;
|
|
266
|
+
/**
|
|
267
|
+
* Whether the buffer is between a trigger pass's beginLine and endLine,
|
|
268
|
+
* when it has no open line past the matched one. Set by ScriptingAPI on
|
|
269
|
+
* the main console only. See {@link currentBuffer}.
|
|
270
|
+
*/
|
|
271
|
+
private openLineSuspended;
|
|
272
|
+
suspendOpenLine(on: boolean): void;
|
|
273
|
+
/** The text of line `index` in Mudlet's numbering (the open line last), or
|
|
274
|
+
* null when there is no such line. */
|
|
275
|
+
lineText(index: number): string | null;
|
|
118
276
|
/** Per-line prompt flag on the current cursor line. Mirrors Mudlet's TBuffer
|
|
119
277
|
* behaviour: `isPrompt()` follows the cursor, so moveCursor + isPrompt can
|
|
120
278
|
* inspect any historical line's prompt status, not just the most recent. */
|
|
@@ -132,24 +290,30 @@ export declare class Console {
|
|
|
132
290
|
* current line into multiple history lines (Mudlet issue #8945): the text up
|
|
133
291
|
* to the first `\n` is inserted at the cursor column, each subsequent `\n`
|
|
134
292
|
* starts a new line, and the remainder of the original line trails the last
|
|
135
|
-
* inserted segment.
|
|
136
|
-
*
|
|
293
|
+
* inserted segment. The cursor stays at the insertion point, newline or not
|
|
294
|
+
* (Mudlet's `insertText` never moves `mUserCursor` — the
|
|
137
295
|
* bundled GUIUtils `xEcho`/`cinsertText` loop advances it explicitly with its
|
|
138
296
|
* own `moveCursor` after each segment; advancing here too would double-count
|
|
139
297
|
* and push later color segments past their intended column). Returns false
|
|
140
298
|
* when there's no current line to insert into (caller falls back to an echo).
|
|
141
299
|
* Mid-buffer multi-line inserts update the buffer model fully; the
|
|
142
300
|
* incremental renderer redraws the affected line(s) lazily.
|
|
301
|
+
*
|
|
302
|
+
* `split` false keeps every `\n` in the line as a character, the way a
|
|
303
|
+
* trigger's insertText does on desktop (TConsoleModel::insertText in
|
|
304
|
+
* trigger mode only inserts); a later wrapLine() splits it there.
|
|
143
305
|
*/
|
|
144
|
-
insertText(text: string, state?: FormatStateSnapshot): boolean;
|
|
306
|
+
insertText(text: string, state?: FormatStateSnapshot, split?: boolean): boolean;
|
|
145
307
|
/**
|
|
146
308
|
* Move the cursor up `lines` rows. When `keepHorizontal` is false (the
|
|
147
309
|
* default, matching Mudlet) the column resets to 0; when true the column
|
|
148
|
-
* is preserved across the move
|
|
149
|
-
* line's length on read via `getCursorColumn`.
|
|
310
|
+
* is preserved across the move, even past the end of a shorter line.
|
|
150
311
|
*/
|
|
151
312
|
moveUp(lines?: number, keepHorizontal?: boolean): boolean;
|
|
152
313
|
moveDown(lines?: number, keepHorizontal?: boolean): boolean;
|
|
314
|
+
/** The line number `buffer` is stored at, or -1 when it is not in the
|
|
315
|
+
* buffer (any more). */
|
|
316
|
+
lineIndexOf(buffer: AnsiAwareBuffer): number;
|
|
153
317
|
/**
|
|
154
318
|
* Seek the cursor to absolute line `line` (0-indexed). When `col` is
|
|
155
319
|
* supplied, also set the column; otherwise the column is reset to 0 (the
|
|
@@ -157,9 +321,10 @@ export declare class Console {
|
|
|
157
321
|
*/
|
|
158
322
|
moveTo(line: number, col?: number): boolean;
|
|
159
323
|
/**
|
|
160
|
-
* Mudlet's `mUserCursor.x()` — the column on the cursor line.
|
|
161
|
-
*
|
|
162
|
-
*
|
|
324
|
+
* Mudlet's `mUserCursor.x()` — the column on the cursor line. Not clamped
|
|
325
|
+
* to the line's length: TBuffer::moveCursor accepts any column, and each
|
|
326
|
+
* operation that writes through it decides what past the end means
|
|
327
|
+
* (insertText pads out to it). Never reports below 0.
|
|
163
328
|
*/
|
|
164
329
|
getCursorColumn(): number;
|
|
165
330
|
/**
|
|
@@ -176,7 +341,23 @@ export declare class Console {
|
|
|
176
341
|
* it can't leak onto an unrelated later echo. */
|
|
177
342
|
markCursorAtEnd(value?: boolean): void;
|
|
178
343
|
getLineNumber(): number;
|
|
344
|
+
/** How many lines the buffer holds, counting the open one — Mudlet's
|
|
345
|
+
* lineBuffer.size(). */
|
|
346
|
+
private get lineTotal();
|
|
347
|
+
/** The text of line `index` in Mudlet's numbering, where the open line is
|
|
348
|
+
* the last one; null when the index names no line. */
|
|
349
|
+
private lineAt;
|
|
179
350
|
getLineCount(): number;
|
|
351
|
+
/** Whether the cursor is somewhere text can be put: on a line the buffer
|
|
352
|
+
* holds, at a column that is not negative. A column past the end of the
|
|
353
|
+
* line counts — a write there pads up to it. Not after deleteLine() has
|
|
354
|
+
* taken the line the cursor was on and left it past the last one, nor mid
|
|
355
|
+
* trigger pass once the matched line is gone. */
|
|
356
|
+
cursorInText(): boolean;
|
|
357
|
+
/** Mudlet's TBuffer::getLastLineNumber() — the index of the last line, the
|
|
358
|
+
* open one included, and 0 for a buffer with no lines at all. Differs from
|
|
359
|
+
* getLineCount() + 1 only once deleteLine() has removed the open line. */
|
|
360
|
+
lastLineNumber(): number;
|
|
180
361
|
/**
|
|
181
362
|
* Mudlet `moveCursorEnd` — park the cursor on the empty line past the last
|
|
182
363
|
* complete one, which is where Mudlet's buffer always keeps its "current"
|
|
@@ -186,55 +367,54 @@ export declare class Console {
|
|
|
186
367
|
*/
|
|
187
368
|
moveToEnd(): void;
|
|
188
369
|
/**
|
|
189
|
-
* Mudlet `getLines(from, to)` — the lines
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
370
|
+
* Mudlet `getLines(from, to)` — the lines from the 0-based index `from`
|
|
371
|
+
* up to, not including, `to`; a reversed range reads downward from `from`
|
|
372
|
+
* (or the last line, when `from` is past it) to just above `to`.
|
|
373
|
+
* Only lines the buffer actually holds are returned: an index before line
|
|
374
|
+
* 0 or past the last line is dropped rather than padded, so the result can
|
|
375
|
+
* be shorter than asked for, and empty — `getLines(-2, 3)` reads lines 0
|
|
376
|
+
* to 2, not 0 to 4.
|
|
377
|
+
*
|
|
378
|
+
* An empty table is the only way a script can tell an empty buffer from a
|
|
379
|
+
* one-line one, because getLineCount() answers 0 for both — it reports the
|
|
380
|
+
* last line's index.
|
|
193
381
|
*/
|
|
194
382
|
getLines(from: number, to: number): string[];
|
|
383
|
+
/** TBuffer::getEndLines(n) — the text of the last `n` lines, oldest first,
|
|
384
|
+
* the open line included. Fewer when the buffer holds fewer. */
|
|
385
|
+
getEndLines(n: number): string[];
|
|
195
386
|
/**
|
|
196
387
|
* Mudlet `getTimestamp(lineNumber)` — the wall-clock time (epoch ms) the
|
|
197
|
-
* line entered the buffer
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
* Mudlet `wrapLine(lineNumber)` — re-display the line at `lineNumber`
|
|
206
|
-
* (0-indexed, matching getLineNumber/getLineCount), re-interpreting its
|
|
207
|
-
* embedded `\n` characters and re-wrapping to the current width. mudix
|
|
208
|
-
* renders each line buffer with CSS `white-space: pre-wrap`, and the
|
|
209
|
-
* rendered DOM node holds the very same buffer object as history (set via
|
|
210
|
-
* `notifyRender`), so re-rendering that buffer in place is what makes any
|
|
211
|
-
* `\n` show as line breaks — the documented use case after a `deleteLine()`
|
|
212
|
-
* + `echo()` sequence left un-displayed newlines in the buffer. Returns
|
|
213
|
-
* false when `lineNumber` is out of range.
|
|
214
|
-
*/
|
|
215
|
-
/**
|
|
216
|
-
* Mudlet `wrapLine(lineNumber)` — re-wrap one stored line to the console's
|
|
217
|
-
* current wrap width, replacing it with as many buffer lines as it now
|
|
218
|
-
* needs. That is a real buffer edit in Mudlet (TBuffer::wrapLine splits the
|
|
219
|
-
* line in place), not a repaint: getLineCount and getLines see the split
|
|
220
|
-
* afterwards.
|
|
221
|
-
*
|
|
222
|
-
* `wrapAt` of 0 (wrapping disabled) leaves the line alone and just
|
|
223
|
-
* repaints. `indent` prefixes the first resulting line and `hangingIndent`
|
|
224
|
-
* every continuation, matching setWindowWrapIndent /
|
|
225
|
-
* setWindowWrapHangingIndent.
|
|
388
|
+
* line entered the buffer, or {@link BLANK_TIMESTAMP} for a line wrapping
|
|
389
|
+
* continued from the one above. `lineNumber` indexes the buffer as
|
|
390
|
+
* getLineNumber() does, from 0 — Mudlet reads `timeBuffer.at(lineNumber)`
|
|
391
|
+
* — and the open line after the last complete one counts,
|
|
392
|
+
* having a time of its own. Omit it to read the current cursor line.
|
|
393
|
+
* Returns null when the line is out of range or the buffer is empty.
|
|
394
|
+
* Formatting into Mudlet's "hh:mm:ss.zzz" string happens one layer up, in
|
|
395
|
+
* ScriptingAPI.
|
|
226
396
|
*/
|
|
397
|
+
getLineTimestamp(lineNumber?: number): number | typeof BLANK_TIMESTAMP | '' | null;
|
|
227
398
|
/**
|
|
228
399
|
* The wrap this console applies to a line as it is stored — the console's
|
|
229
400
|
* own `setWindowWrap` width, so a line longer than it becomes several
|
|
230
401
|
* buffer lines rather than one long one that only *looks* wrapped.
|
|
231
402
|
*
|
|
232
|
-
*
|
|
233
|
-
* console
|
|
234
|
-
*
|
|
235
|
-
*
|
|
403
|
+
* Width 0 is off. A bare Console starts there; ScriptingAPI gives the main
|
|
404
|
+
* console the profile's `outputWrapAt` (100 unless changed, Mudlet's
|
|
405
|
+
* Host::mWrapAt) as soon as it exists and again whenever that setting
|
|
406
|
+
* moves. Miniconsoles and user windows stay off until a script sets a
|
|
407
|
+
* width, which is what desktop's {@link WINDOW_WRAP_DEFAULT} amounts to.
|
|
236
408
|
*/
|
|
237
409
|
setWrapWidth(width: number, indent?: number, hangingIndent?: number): void;
|
|
410
|
+
/** The stored-line wrap width set by {@link setWrapWidth}; 0 when off. */
|
|
411
|
+
getWrapWidth(): number;
|
|
412
|
+
getWrapIndent(): number;
|
|
413
|
+
getWrapHangingIndent(): number;
|
|
414
|
+
/** The open line, while it is the untimed one desktop starts after a game
|
|
415
|
+
* line — see {@link wrapAppendedLine}. Anything else in `partial` (a new
|
|
416
|
+
* buffer, or this one once written to) is timed as usual. */
|
|
417
|
+
private untimedOpenLine;
|
|
238
418
|
private wrapWidth;
|
|
239
419
|
private wrapIndent;
|
|
240
420
|
private wrapHangingIndent;
|
|
@@ -243,5 +423,31 @@ export declare class Console {
|
|
|
243
423
|
* width set — the usual case — this is the line itself, untouched.
|
|
244
424
|
*/
|
|
245
425
|
private toStoredLines;
|
|
246
|
-
|
|
426
|
+
/**
|
|
427
|
+
* Break a line that came in through {@link appendLine} to the console's wrap
|
|
428
|
+
* width once the triggers are done with it, and hand back the lines it is now
|
|
429
|
+
* stored as (just `buffer` when it needed no breaking, or is no longer in the
|
|
430
|
+
* buffer). Mudlet's TBuffer::translateToPlainText does the same: the triggers
|
|
431
|
+
* see the whole line as the server sent it, and only then does wrapLine() cut
|
|
432
|
+
* it into the buffer lines getLines() and the cursor APIs count.
|
|
433
|
+
*/
|
|
434
|
+
wrapAppendedLine(buffer: AnsiAwareBuffer, fromGame?: boolean): AnsiAwareBuffer[];
|
|
435
|
+
/**
|
|
436
|
+
* Mudlet `wrapLine(lineNumber)` — re-wrap the buffer from `lineNumber`
|
|
437
|
+
* (0-indexed, matching getLineNumber/getLineCount) to its end at `wrapAt`,
|
|
438
|
+
* replacing each line with as many buffer lines as it now needs, as
|
|
439
|
+
* TBuffer::wrapLine does: a real buffer edit that getLineCount and getLines
|
|
440
|
+
* see, not a repaint. Embedded `\n` become line breaks too. `wrapAt` of 0
|
|
441
|
+
* (wrapping off) only repaints the line, so pre-wrap rendering shows its
|
|
442
|
+
* `\n`. Returns false when `lineNumber` names no stored line.
|
|
443
|
+
*/
|
|
444
|
+
wrapLine(lineNumber: number, wrapAt?: number, indent?: number, hangingIndent?: number, stopAt?: number): boolean;
|
|
247
445
|
}
|
|
446
|
+
/** What getWindowWrap reports for a miniconsole or user window no script has
|
|
447
|
+
* set a width on — Mudlet's TBuffer::mWrapAt default. Only the main console
|
|
448
|
+
* and createBuffer buffers take the profile's width (TConsole::changeColors). */
|
|
449
|
+
export declare const WINDOW_WRAP_DEFAULT = 99999999;
|
|
450
|
+
/** What getTimestamp() answers for a continued line — Mudlet's
|
|
451
|
+
* `smBlankTimeStamp`, trailing space included, the same 13 characters as a
|
|
452
|
+
* real stamp ("hh:mm:ss.zzz "). */
|
|
453
|
+
export declare const BLANK_TIMESTAMP = "------------ ";
|