@mudlet/mudlet-web 0.4.1 → 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/import/defaultPackages.d.ts +9 -5
- package/dist-lib/import/defaults/mpkg/mpkg.mpackage +0 -0
- package/dist-lib/index.js +8914 -8515
- package/dist-lib/map/xmlMapImport.d.ts +29 -0
- package/dist-lib/mud/MudSession.d.ts +1 -0
- package/dist-lib/mud/connection/MudClient.d.ts +6 -1
- package/dist-lib/mud/connection/PingTracker.d.ts +13 -0
- package/dist-lib/mud/connection/TelnetNegotiator.d.ts +6 -0
- package/dist-lib/mud/protocol/byteString.d.ts +33 -0
- package/dist-lib/mud/protocol/gmcp.d.ts +12 -7
- package/dist-lib/mud/protocol/index.d.ts +2 -1
- package/dist-lib/mud/protocol/mnes.d.ts +38 -9
- 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/sound/SoundManager.d.ts +16 -4
- package/dist-lib/ui/video/VideoManager.d.ts +6 -1
- package/dist-lib/ui/windows/WindowManager.d.ts +28 -0
- package/dist-lib/utils/githubRawUrl.d.ts +1 -0
- package/package.json +2 -2
|
@@ -20,9 +20,38 @@
|
|
|
20
20
|
* </map>
|
|
21
21
|
*/
|
|
22
22
|
import type { MudletMap } from 'mudlet-map-binary-reader';
|
|
23
|
+
/**
|
|
24
|
+
* Why a document was refused. Mudlet keeps these three apart
|
|
25
|
+
* (`fileHoldsMapData` in `TMap.cpp`), because they are three different things
|
|
26
|
+
* to tell a player:
|
|
27
|
+
*
|
|
28
|
+
* `not-a-map` somebody else's well-formed document — a game's "no map
|
|
29
|
+
* here" page answered with a 200, or a `<MudletPackage>`.
|
|
30
|
+
* Every element parses and none of it means anything, which
|
|
31
|
+
* is what used to count as importing a map successfully.
|
|
32
|
+
* `import-failed` a map document that would not parse: the player's own map,
|
|
33
|
+
* damaged. Rooted at `<map>`, so the root test passes and the
|
|
34
|
+
* failure is further in.
|
|
35
|
+
* `damaged` not XML at all — no element to read a root from.
|
|
36
|
+
*
|
|
37
|
+
* The root is taken from the first start tag in the text rather than from a
|
|
38
|
+
* parsed document, exactly as Mudlet's streaming reader does, so a file that is
|
|
39
|
+
* rooted at `<map>` but truncated is still recognised as a map that broke.
|
|
40
|
+
*/
|
|
41
|
+
export type XmlMapRefusal = 'not-a-map' | 'import-failed' | 'damaged';
|
|
42
|
+
export type XmlMapParse = {
|
|
43
|
+
ok: true;
|
|
44
|
+
map: MudletMap;
|
|
45
|
+
} | {
|
|
46
|
+
ok: false;
|
|
47
|
+
reason: XmlMapRefusal;
|
|
48
|
+
};
|
|
23
49
|
/**
|
|
24
50
|
* Parse an XML map document into the `MudletMap` shape `loadFromBinary`
|
|
25
51
|
* ingests. Returns null when the text isn't well-formed XML or the root
|
|
26
52
|
* element isn't `<map>` (e.g. an HTML error page served for the map URL).
|
|
53
|
+
* {@link parseXmlMapResult} is the same parse with the refusal reason kept.
|
|
27
54
|
*/
|
|
28
55
|
export declare function parseXmlMap(xmlText: string): MudletMap | null;
|
|
56
|
+
/** {@link parseXmlMap}, reporting *why* a document was refused. */
|
|
57
|
+
export declare function parseXmlMapResult(xmlText: string): XmlMapParse;
|
|
@@ -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
|
|
@@ -11,6 +11,12 @@ export declare class PingTracker {
|
|
|
11
11
|
private lastSentAt;
|
|
12
12
|
private lastDuration;
|
|
13
13
|
private supported;
|
|
14
|
+
/** The responsiveness beat, live only while a ping is outstanding. */
|
|
15
|
+
private beatTimer;
|
|
16
|
+
private lastBeatAt;
|
|
17
|
+
/** Longest interval the event loop went undelivered during the current
|
|
18
|
+
* wait — see {@link MAX_BEAT_GAP_MS}. */
|
|
19
|
+
private worstBeatGapMs;
|
|
14
20
|
private readonly unsubs;
|
|
15
21
|
constructor(sendPingCommand: (latencyMs: number) => void, onPing: (duration: number | null) => void, source: PingEventSource);
|
|
16
22
|
destroy(): void;
|
|
@@ -24,5 +30,12 @@ export declare class PingTracker {
|
|
|
24
30
|
* `Core.Ping` makes servers that unconditionally JSON-parse the part after
|
|
25
31
|
* the module name choke on an empty string. */
|
|
26
32
|
private sendPing;
|
|
33
|
+
/** Begin witnessing the event loop for the wait that starts now. */
|
|
34
|
+
private startBeat;
|
|
35
|
+
private recordBeatGap;
|
|
36
|
+
/** Stop the beat and answer the worst gap it saw, counting the stretch
|
|
37
|
+
* between the final beat and now — a stall that began after the last beat
|
|
38
|
+
* and ran until the reply is still a stall the reading spans. */
|
|
39
|
+
private stopBeat;
|
|
27
40
|
private handlePingResponse;
|
|
28
41
|
}
|
|
@@ -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
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transcoding between the wire and JS strings, for the protocol handlers that
|
|
3
|
+
* carry UTF-8 text inside a telnet subnegotiation (GMCP, MSDP, MSSP).
|
|
4
|
+
*
|
|
5
|
+
* Everything upstream of these speaks *byte-strings*: `bytesToLatin1` in
|
|
6
|
+
* `MudClient.ts` maps each socket byte to one char, and the client's `sendBytes`
|
|
7
|
+
* reverses it with `charCodeAt(i) & 0xff`. Subnegotiations are extracted from that byte-string
|
|
8
|
+
* before the session codec ever runs (`stripTelnetSequences` precedes
|
|
9
|
+
* `codec.decode`), which is what makes these three protocols independent of the
|
|
10
|
+
* session's text encoding — and what obliges each of them to do its own
|
|
11
|
+
* transcoding here.
|
|
12
|
+
*/
|
|
13
|
+
export interface DecodedByteString {
|
|
14
|
+
text: string;
|
|
15
|
+
/** The bytes weren't valid UTF-8, so `text` contains U+FFFD where they were.
|
|
16
|
+
* Callers that can report it should; nothing downstream is able to notice,
|
|
17
|
+
* since the substitution is indistinguishable from a legitimate U+FFFD. */
|
|
18
|
+
malformed: boolean;
|
|
19
|
+
}
|
|
20
|
+
/** Decode a Latin-1 byte-string (one char per byte, as produced upstream) as
|
|
21
|
+
* UTF-8. Decoding is lenient by design — a replacement character in one field
|
|
22
|
+
* beats dropping the whole message — but a strict pass runs first so the
|
|
23
|
+
* caller can tell the two apart and say so. */
|
|
24
|
+
export declare const fromByteString: (s: string) => DecodedByteString;
|
|
25
|
+
/** UTF-8-encode into a Latin-1 byte-string, for `MudClient.sendBytes`. Inverse
|
|
26
|
+
* of {@link fromByteString} for well-formed input only — both directions are
|
|
27
|
+
* non-fatal, so invalid UTF-8 inbound and lone surrogates outbound each
|
|
28
|
+
* collapse to U+FFFD rather than round-tripping. Plain ASCII is unchanged. */
|
|
29
|
+
export declare const toByteString: (s: string) => string;
|
|
30
|
+
/** Render a byte-string as hex, for diagnostics that would otherwise print the
|
|
31
|
+
* post-decode text — where every malformed sequence has already collapsed to
|
|
32
|
+
* an indistinguishable U+FFFD. Truncated: the head is where the fault is. */
|
|
33
|
+
export declare const toHex: (s: string) => string;
|
|
@@ -3,9 +3,6 @@ export interface GmcpEnvelope {
|
|
|
3
3
|
value: unknown;
|
|
4
4
|
}
|
|
5
5
|
export type TelnetOptionHandler = (data: string) => string;
|
|
6
|
-
/** UTF-8-encode into a Latin-1 byte-string, for MudClient.sendBytes (which
|
|
7
|
-
* writes `charCodeAt(i) & 0xff` per char). The inverse of fromByteString. */
|
|
8
|
-
export declare const toByteString: (s: string) => string;
|
|
9
6
|
export declare const createTelnetOptionParser: (onSubnegotiation: (data: string) => void, opts?: {
|
|
10
7
|
/** When true, an inbound IAC GA / IAC EOR is replaced by a newline
|
|
11
8
|
* rather than stripped — Mudlet's `mFORCE_GA_OFF` behaviour
|
|
@@ -21,10 +18,18 @@ export declare const encodeGmcp: (path: string, payload: unknown) => string;
|
|
|
21
18
|
/** Encode a GMCP frame from a single pre-formatted body (e.g. `"Module.Sub args"`).
|
|
22
19
|
* Mudlet's `sendGMCP` semantics — the caller controls the body between IAC SB
|
|
23
20
|
* GMCP and IAC SE — except that the body is transcoded to UTF-8 rather than to
|
|
24
|
-
* the session's outgoing encoding, so
|
|
25
|
-
* bytes on the wire
|
|
26
|
-
* keeps a 0xFF byte (which would need
|
|
27
|
-
* out of the body in the first place.
|
|
21
|
+
* the session's outgoing encoding, so a JS caller can't use it to place arbitrary
|
|
22
|
+
* raw bytes on the wire: `U+00FF` goes out as `c3 bf`, not as `ff`. UTF-8 is what
|
|
23
|
+
* the GMCP spec asks for, and it's also what keeps a 0xFF byte (which would need
|
|
24
|
+
* IAC-escaping inside a subnegotiation) out of the body in the first place.
|
|
25
|
+
*
|
|
26
|
+
* From Lua the same limit holds, but it isn't this call that imposes it — the
|
|
27
|
+
* bytes are gone a layer earlier. wasmoon marshals Lua→JS strings through
|
|
28
|
+
* `UTF8ToString`, which UTF-8-*decodes* them, so `"\1\200"` reaches `sendGMCP`
|
|
29
|
+
* as `U+0001 U+0200` and `"\1\255"` as a lone surrogate. Re-encoding here
|
|
30
|
+
* restores the caller's original Lua bytes rather than destroying them.
|
|
31
|
+
* Carrying genuinely arbitrary bytes across that bridge needs numbers, or the
|
|
32
|
+
* `%XX` armoring the VFS io path uses. */
|
|
28
33
|
export declare const encodeGmcpRaw: (message: string) => string;
|
|
29
34
|
export interface GmcpStreamOptions {
|
|
30
35
|
onEnvelope: (payload: GmcpEnvelope) => void;
|
|
@@ -2,10 +2,11 @@ export * from "./constants";
|
|
|
2
2
|
export * from "./gmcp";
|
|
3
3
|
export * from "./msdp";
|
|
4
4
|
export * from "./mssp";
|
|
5
|
+
export { toByteString } from "./byteString";
|
|
5
6
|
export { MccpHandler } from "./mccp";
|
|
6
7
|
export { EchoHandler } from "./echo";
|
|
7
8
|
export { MspParser, type MspCommand, type MspKind } from "./msp";
|
|
8
9
|
export { MxpParser, splitMxpResultLines, type MxpLink, type MxpLineResult } from "./mxp";
|
|
9
|
-
export { parseMnesRequest, encodeMnesIs, selectMnesVars, buildNewEnvironVars, CLIENT_NAME, CLIENT_VERSION, TERMINAL_TYPE, type MnesVar, type MnesRequest, type NewEnvironState } from "./mnes";
|
|
10
|
+
export { parseMnesRequest, encodeMnesIs, selectMnesVars, MNES_UNMAINTAINED, buildNewEnvironVars, CLIENT_NAME, CLIENT_VERSION, TERMINAL_TYPE, type MnesVar, type MnesRequest, type NewEnvironState } from "./mnes";
|
|
10
11
|
export { encodeNaws } from "./naws";
|
|
11
12
|
export { SessionCodec, CharsetHandler, normalizeCharsetName, pickCharsetFromRequest, SUPPORTED_SERVER_ENCODINGS, DEFAULT_SERVER_ENCODING, canonicalServerEncoding, canEncodeForServer, type CharsetHandlerHooks } from "./charset";
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { CLIENT_NAME, CLIENT_VERSION, TERMINAL_TYPE } from "../../version";
|
|
2
2
|
/** A single MNES variable the client reports back, e.g. `{ name: "CHARSET",
|
|
3
|
-
* value: "UTF-8" }`.
|
|
3
|
+
* value: "UTF-8" }`.
|
|
4
|
+
*
|
|
5
|
+
* A null `value` means **undefined** rather than empty. RFC 1572 draws the
|
|
6
|
+
* distinction structurally: a name followed by VALUE is defined (and, with
|
|
7
|
+
* nothing after the VALUE, defined-but-empty), while a name followed by the
|
|
8
|
+
* next marker or IAC with no VALUE at all is undefined. That is how a variable
|
|
9
|
+
* the client deliberately does not supply is answered — see
|
|
10
|
+
* {@link MNES_UNMAINTAINED}. */
|
|
4
11
|
export interface MnesVar {
|
|
5
12
|
name: string;
|
|
6
|
-
value: string;
|
|
13
|
+
value: string | null;
|
|
7
14
|
}
|
|
8
15
|
/** Result of parsing an `IAC SB NEW-ENVIRON SEND … IAC SE` request body. */
|
|
9
16
|
export interface MnesRequest {
|
|
@@ -53,6 +60,12 @@ export interface NewEnvironState {
|
|
|
53
60
|
* bit, NEW-ENVIRON SCREEN_READER var) — `setConfig("advertiseScreenReader", …)`.
|
|
54
61
|
* Defaults to false (matching Mudlet's opt-in behaviour). */
|
|
55
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;
|
|
56
69
|
}
|
|
57
70
|
/** The five core variables MNES standardises (https://tintin.mudhalla.net/protocols/mnes/).
|
|
58
71
|
* Plain NEW-ENVIRON reports these too, plus the extended capability set below.
|
|
@@ -72,12 +85,28 @@ export { CLIENT_NAME, CLIENT_VERSION, TERMINAL_TYPE };
|
|
|
72
85
|
* the result with VAR (MNES) or USERVAR (NEW-ENVIRON) via encodeMnesIs.
|
|
73
86
|
*/
|
|
74
87
|
export declare function buildNewEnvironVars(state: NewEnvironState, extended: boolean): MnesVar[];
|
|
88
|
+
/** MNES names the standard defines that mudix deliberately does not supply.
|
|
89
|
+
* They are still *known*, so a server that asks for one is told it is
|
|
90
|
+
* undefined rather than left with silence — Mudlet's `isMNESVariable` lists
|
|
91
|
+
* IPADDRESS alongside the five it reports, and answers it with a name and no
|
|
92
|
+
* VALUE. (A browser tab has no way to learn its own address, and the client is
|
|
93
|
+
* not the right party to guess: the server already sees the peer address.) */
|
|
94
|
+
export declare const MNES_UNMAINTAINED: ReadonlyArray<string>;
|
|
75
95
|
/**
|
|
76
|
-
* Pick which of the client's `available`
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
96
|
+
* Pick which of the client's `available` variables to report in response to a
|
|
97
|
+
* parsed request, mirroring Mudlet's `sendIsMNESValues` /
|
|
98
|
+
* `sendIsNewEnvironValues`:
|
|
99
|
+
*
|
|
100
|
+
* - A bare SEND (no names) asks for everything, and gets it.
|
|
101
|
+
* - Named variables come back in request order, each either with its value or
|
|
102
|
+
* — for a name in `undefinedNames` — as undefined (no VALUE).
|
|
103
|
+
* - A name that is neither is left out entirely.
|
|
104
|
+
*
|
|
105
|
+
* A request naming only names we do not report therefore selects **nothing**.
|
|
106
|
+
* It used to fall back to sending everything on the reasoning that the server
|
|
107
|
+
* still learns who we are, but that answers a question nobody asked: a server
|
|
108
|
+
* probing for one specific variable gets an unsolicited dump of the whole set,
|
|
109
|
+
* which is not what Mudlet does and not what the request meant. The caller
|
|
110
|
+
* decides what an empty selection is framed as.
|
|
82
111
|
*/
|
|
83
|
-
export declare function selectMnesVars(request: MnesRequest, available: ReadonlyArray<MnesVar>): MnesVar[];
|
|
112
|
+
export declare function selectMnesVars(request: MnesRequest, available: ReadonlyArray<MnesVar>, undefinedNames?: ReadonlyArray<string>): MnesVar[];
|
|
@@ -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
|