@mudlet/mudlet-web 0.4.2 → 0.4.3
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/dist-lib/hooks/useOutput.d.ts +1 -2
- package/dist-lib/hooks/useViewportMode.d.ts +26 -1
- package/dist-lib/index.js +8741 -8452
- package/dist-lib/mud/MudSession.d.ts +1 -0
- package/dist-lib/mud/connection/MudClient.d.ts +6 -1
- package/dist-lib/mud/connection/TelnetNegotiator.d.ts +6 -0
- package/dist-lib/mud/protocol/mnes.d.ts +6 -0
- package/dist-lib/mud/text/hyperlinkConfig.d.ts +4 -0
- package/dist-lib/scripting/ScriptingAPI.d.ts +4 -0
- package/dist-lib/scripting/lua/bindings/commandLine.d.ts +1 -1
- package/dist-lib/scripting/lua/bindings/output.d.ts +1 -1
- package/dist-lib/storage/schema.d.ts +21 -0
- package/dist-lib/styles.css +1 -1
- package/dist-lib/ui/labels/LabelManager.d.ts +8 -0
- package/dist-lib/ui/labels/qtCss.d.ts +1 -0
- package/dist-lib/ui/layout/ContentLayout.d.ts +23 -0
- package/dist-lib/ui/layout/MobileLayout.d.ts +5 -1
- package/dist-lib/ui/output/OutputRenderer.d.ts +1 -3
- package/dist-lib/ui/scrollbox/ScrollBoxOverlay.d.ts +12 -2
- package/dist-lib/ui/windows/WindowManager.d.ts +28 -0
- package/package.json +2 -2
|
@@ -75,6 +75,11 @@ export interface MudClientOptions {
|
|
|
75
75
|
* READER bit and the NEW-ENVIRON `SCREEN_READER` capability
|
|
76
76
|
* (`setConfig("advertiseScreenReader", …)`). Default false. */
|
|
77
77
|
screenReaderAdvertised?: boolean;
|
|
78
|
+
/** Whether OSC 8 hyperlinks are enabled for this profile (Mudlet 5.0's
|
|
79
|
+
* `mEnableOSC8Hyperlinks`). Reported as the `OSC_HYPERLINKS_*` NEW-ENVIRON
|
|
80
|
+
* capability block — all "0" when off. Default true. The rendering half of
|
|
81
|
+
* the toggle lives in the ANSI parser, not here. */
|
|
82
|
+
osc8HyperlinksEnabled?: boolean;
|
|
78
83
|
/** Whether to negotiate NAWS / window size (telnet option 31). Default true
|
|
79
84
|
* (matching Mudlet). When true the client offers IAC WILL NAWS on connect
|
|
80
85
|
* and, once the server accepts (IAC DO NAWS), reports the main output
|
|
@@ -228,7 +233,7 @@ export declare class MudClient {
|
|
|
228
233
|
/** Handed to the telnet sequence parser and mutated in place, so the parser
|
|
229
234
|
* reads the current setting rather than the one it was built with. */
|
|
230
235
|
private readonly telnetParserOpts;
|
|
231
|
-
constructor({ url, mccpEnabled, commandEcho, chunkProcessor, promptTimeoutMs, gmcpEnabled, mttsEnabled, msdpEnabled, msspEnabled, charsetEnabled, mspEnabled, mxpEnabled, mnesEnabled, newEnvironEnabled, secureTransport, screenReaderAdvertised, nawsEnabled, fixUnnecessaryLinebreaks, undoServerWrap, undoServerWrapWidth, inputLineStrictUnixEndings, specialForceGAOff, versionInTTYPE, promptForVersionInTTYPE, promptForMXPProcessorOn, specialForceMXPProcessorOn, subprotocols, }: MudClientOptions, eventBus: EventBus<MudClientEvents>);
|
|
236
|
+
constructor({ url, mccpEnabled, commandEcho, chunkProcessor, promptTimeoutMs, gmcpEnabled, mttsEnabled, msdpEnabled, msspEnabled, charsetEnabled, mspEnabled, mxpEnabled, mnesEnabled, newEnvironEnabled, secureTransport, screenReaderAdvertised, osc8HyperlinksEnabled, nawsEnabled, fixUnnecessaryLinebreaks, undoServerWrap, undoServerWrapWidth, inputLineStrictUnixEndings, specialForceGAOff, versionInTTYPE, promptForVersionInTTYPE, promptForMXPProcessorOn, specialForceMXPProcessorOn, subprotocols, }: MudClientOptions, eventBus: EventBus<MudClientEvents>);
|
|
232
237
|
/** Mudlet-parity character-at-a-time detection (cTelnet::sendData's
|
|
233
238
|
* `armCharacterModeDetection`). ECHO+SGA on its own is *not* the signature:
|
|
234
239
|
* an ordinary line-mode server masking a password negotiates exactly the
|
|
@@ -18,6 +18,12 @@ export interface TelnetNegotiatorFlags {
|
|
|
18
18
|
* key. Default false; some MUDs adjust their output (e.g. suppress ASCII
|
|
19
19
|
* art, add extra room-description detail) when this is set. */
|
|
20
20
|
screenReaderAdvertised: boolean;
|
|
21
|
+
/** Whether OSC 8 hyperlinks are enabled for this profile — Mudlet 5.0's
|
|
22
|
+
* `mEnableOSC8Hyperlinks`. Drives only the `OSC_HYPERLINKS_*` NEW-ENVIRON
|
|
23
|
+
* capability block here; the rendering side of the same toggle is a gate in
|
|
24
|
+
* the ANSI parser (see hyperlinkConfig's setOsc8HyperlinksEnabled). Default
|
|
25
|
+
* true, matching Mudlet. */
|
|
26
|
+
osc8HyperlinksEnabled: boolean;
|
|
21
27
|
/** Whether the first TTYPE cycle value carries our version after the client
|
|
22
28
|
* name — Mudlet's `versionInTTYPE` config key (`mVersionInTTYPE`). Default
|
|
23
29
|
* false: RFC 1091 doesn't permit the period, so Mudlet stopped sending it
|
|
@@ -60,6 +60,12 @@ export interface NewEnvironState {
|
|
|
60
60
|
* bit, NEW-ENVIRON SCREEN_READER var) — `setConfig("advertiseScreenReader", …)`.
|
|
61
61
|
* Defaults to false (matching Mudlet's opt-in behaviour). */
|
|
62
62
|
screenReader?: boolean;
|
|
63
|
+
/** Whether OSC 8 hyperlinks are enabled for this profile (Mudlet 5.0's
|
|
64
|
+
* `Host::mEnableOSC8Hyperlinks`). Every `OSC_HYPERLINKS_*` capability
|
|
65
|
+
* reports "0" while it is off, exactly as Mudlet's
|
|
66
|
+
* `cTelnet::getNewEnvironOSCHyperlinks*` do — a server that would light up
|
|
67
|
+
* its links for us must be told we won't render them. Defaults to true. */
|
|
68
|
+
osc8Hyperlinks?: boolean;
|
|
63
69
|
}
|
|
64
70
|
/** The five core variables MNES standardises (https://tintin.mudhalla.net/protocols/mnes/).
|
|
65
71
|
* Plain NEW-ENVIRON reports these too, plus the extended capability set below.
|
|
@@ -128,6 +128,10 @@ interface ExtractedQuery {
|
|
|
128
128
|
* Mudlet's hand-rolled scan; everything else is `&`-delimited `key=value`.
|
|
129
129
|
*/
|
|
130
130
|
export declare function extractQuery(uri: string): ExtractedQuery;
|
|
131
|
+
/** Enable/disable OSC 8 hyperlink parsing (Mudlet `mEnableOSC8Hyperlinks`). */
|
|
132
|
+
export declare function setOsc8HyperlinksEnabled(enabled: boolean): void;
|
|
133
|
+
/** Whether OSC 8 hyperlinks are currently honoured. */
|
|
134
|
+
export declare function isOsc8HyperlinksEnabled(): boolean;
|
|
131
135
|
/** Session-scoped store of `preset:NAME` definitions. Holds raw config objects
|
|
132
136
|
* (shorthand un-expanded, as Mudlet does) so a later `?preset=NAME` can deep-
|
|
133
137
|
* merge an override before expansion. */
|
|
@@ -41,6 +41,10 @@ declare class ScriptingWindowsAPI {
|
|
|
41
41
|
isMiniConsole(id: string): boolean;
|
|
42
42
|
move(id: string, x: number, y: number): void;
|
|
43
43
|
setParent(id: string, parent?: string): boolean;
|
|
44
|
+
/** Re-applies a docking area to a window that is already open — Mudlet's
|
|
45
|
+
* Host::openWindow honours the `area` argument on every call, not just
|
|
46
|
+
* the one that creates the dock widget. 'main' means floating. */
|
|
47
|
+
setDockArea(id: string, area: string): void;
|
|
44
48
|
bringToFront(id: string): void;
|
|
45
49
|
sendToBack(id: string): void;
|
|
46
50
|
resize(id: string, width: number, height: number): void;
|
|
@@ -8,4 +8,4 @@ import type { BindingContext } from './context';
|
|
|
8
8
|
* user window's embedded input, and a free-floating createCommandLine widget -
|
|
9
9
|
* which cmdLineKind below resolves from the name Lua passed.
|
|
10
10
|
*/
|
|
11
|
-
export declare function installCommandLineBindings({ lua, api,
|
|
11
|
+
export declare function installCommandLineBindings({ lua, api, emitEvent }: BindingContext): void;
|
|
@@ -7,4 +7,4 @@ import type { BindingContext } from './context';
|
|
|
7
7
|
* Colour channels are validated through the shared 0..255 coercion; Mudlet
|
|
8
8
|
* silently no-ops on an out-of-range channel rather than raising.
|
|
9
9
|
*/
|
|
10
|
-
export declare function installOutputBindings({ lua, api
|
|
10
|
+
export declare function installOutputBindings({ lua, api }: BindingContext): void;
|
|
@@ -210,6 +210,27 @@ export interface ProfileSettings {
|
|
|
210
210
|
* (reset). When disabled, those sequences are ignored and the user palette
|
|
211
211
|
* stands. Off by default — only an explicit `true` enables it. */
|
|
212
212
|
serverRedefineColors?: boolean;
|
|
213
|
+
/** Mudlet 5.0's `Host::mEnableOSC8Hyperlinks` ("Enable OSC 8 hyperlinks").
|
|
214
|
+
* When disabled, an OSC 8 sequence that *opens* a link is ignored so the
|
|
215
|
+
* text renders plain, and the whole `OSC_HYPERLINKS_*` NEW-ENVIRON
|
|
216
|
+
* capability block reports "0" — the two things Mudlet's toggle drives
|
|
217
|
+
* (TBuffer::decodeOSC and cTelnet::getNewEnvironOSCHyperlinks*). A
|
|
218
|
+
* *closing* sequence is always honoured, or a link open when the toggle
|
|
219
|
+
* flipped would never end. On by default: only an explicit `false`
|
|
220
|
+
* disables it, matching Mudlet's `= true` default. Unlike most of these,
|
|
221
|
+
* Mudlet exposes no `setConfig` key for it — preferences and the profile
|
|
222
|
+
* XML only — so mudix doesn't invent one either. */
|
|
223
|
+
osc8Hyperlinks?: boolean;
|
|
224
|
+
/** Mudlet 5.0's `Host::mUndoServerWrap` ("Undo the game's own wrapping",
|
|
225
|
+
* experimental). Rejoins the lines a game hard-wrapped itself before
|
|
226
|
+
* triggers see them, so a pattern can't be split mid-sentence; the client's
|
|
227
|
+
* own wrap then applies for display. Off by default. Also readable and
|
|
228
|
+
* writable from Lua as `getConfig`/`setConfig("undoServerWrap", …)`. */
|
|
229
|
+
undoServerWrap?: boolean;
|
|
230
|
+
/** The column the game wraps at, for {@link undoServerWrap} — Mudlet's
|
|
231
|
+
* `mUndoServerWrapWidth`, bounded 20–500 and defaulting to 80 (very often
|
|
232
|
+
* the right answer). `setConfig("undoServerWrapWidth", …)`. */
|
|
233
|
+
undoServerWrapWidth?: number;
|
|
213
234
|
/** Mudlet "Network packet timeout": how long (ms) to buffer a partial line
|
|
214
235
|
* (text after the last `\n` of a WebSocket frame) before flushing it as a
|
|
215
236
|
* prompt. Mitigates spurious mid-line breaks when long MUD lines arrive
|