@gjermundgaraba/clankermux 0.8.0 → 0.8.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 +4 -4
- package/dist/proto/messages.d.ts +1 -1
- package/ghostty-vt.wasm +0 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -40,7 +40,7 @@ A page holds one client: one worker, one WebSocket, the session list and the eve
|
|
|
40
40
|
|
|
41
41
|
## `connect`
|
|
42
42
|
|
|
43
|
-
`connect({url, worker, wasm, client?})` starts the worker and resolves with the `Client` once the engine is loaded, before the connection is up: the worker connects, and after a loss reconnects, by itself, and the client's `onLink`, and each terminal's, says how that goes (below). Requests need a `connected` link. It rejects when the worker script or the engine cannot be loaded. An exception in the worker after that is the browser's to report
|
|
43
|
+
`connect({url, worker, wasm, client?})` starts the worker and resolves with the `Client` once the engine is loaded, before the connection is up: the worker connects, and after a loss reconnects, by itself, and the client's `onLink`, and each terminal's, says how that goes (below). Requests need a `connected` link. It rejects when the worker script or the engine cannot be loaded. An exception in the worker after that is the browser's to report: it costs the message being handled, and the client goes on. `client` is the `{name, version}` the connection gives in `HELLO`, which the server lists in each session's `attachments`; `clankermux-web` and this package's version by default.
|
|
44
44
|
|
|
45
45
|
## `Client`
|
|
46
46
|
|
|
@@ -113,7 +113,7 @@ The terminal's input element is a textarea the mount places after the canvas: an
|
|
|
113
113
|
|
|
114
114
|
A page that holds input back (a pause) holds these events, which the terminal acts on: on the input element `keydown`, `keyup`, `beforeinput`, `compositionstart`, `compositionend`, `paste`, `beforecopy` and `copy`; on the canvas `mousedown` (focus and selection; the drag continues on `window` `mousemove`/`mouseup`) and `wheel` (which sends arrow keys on the alternate screen). macOS press-and-hold accents send the base letter on its keydown and then the accented one, as in xterm.js.
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
No test covers input methods; they are untested with a real input method, in Safari and in Firefox.
|
|
117
117
|
|
|
118
118
|
## `onSessions`
|
|
119
119
|
|
|
@@ -195,7 +195,7 @@ The selection is the engine's, drawn inverted, and the engine keeps it on its ce
|
|
|
195
195
|
|
|
196
196
|
It is cleared by a click (a press that selects nothing), by input sent to the session (a key that sends something, a paste, composed text; not a modifier alone), by a switch to the alternate screen (it is not back when the program leaves it), by a full reset (RIS), and by a new screen (attaching, a gap).
|
|
197
197
|
|
|
198
|
-
The copy on release starts within `mouseup`, as Safari requires: `navigator.clipboard.write` with a `ClipboardItem` whose text arrives when the worker has it, a few milliseconds later; when nothing was selected it fails and the clipboard is left alone. Where `ClipboardItem` is missing, or takes no text to come, it is `writeText` once the text arrives, which a browser that wants the gesture still running may refuse; Cmd+C then copies.
|
|
198
|
+
The copy on release starts within `mouseup`, as Safari requires: `navigator.clipboard.write` with a `ClipboardItem` whose text arrives when the worker has it, a few milliseconds later; when nothing was selected it fails and the clipboard is left alone. Where `ClipboardItem` is missing, or takes no text to come, it is `writeText` once the text arrives, which a browser that wants the gesture still running may refuse; Cmd+C then copies. A `beforecopy` listener lets WebKit offer Copy on the empty input element while there is a selection. Where the browser keeps Ctrl+Shift+C for itself (a developer tools shortcut), Cmd+C or the Copy menu copies. Programs that ask for mouse reports get none from this client, so the mouse always selects.
|
|
199
199
|
|
|
200
200
|
### Copy outcome
|
|
201
201
|
|
|
@@ -214,7 +214,7 @@ type CopySource = "release" | "keys" | "browser" | "program";
|
|
|
214
214
|
- `refused`: the browser rejected the write, `message` its error (`NotAllowedError: …`): a permission denied, a document without the focus, an Electron shell that does not allow it. `timeout`: the copy did not finish within two seconds (the worker's text or the write); without the worker's text it has no `chars`. `unavailable`: the page has no `navigator.clipboard` (it is not a secure context).
|
|
215
215
|
- A release that selected nothing (a click) is no copy and tells nothing; nor does a release whose copy a newer one replaced before its text arrived. Each copy is told once.
|
|
216
216
|
|
|
217
|
-
A page shows a brief notification on `ok: true` ("Copied 42 characters"), and on a failure says the clipboard did not take it (with Cmd+C as the way to try again, since the browser's own copy is the one a browser that refuses `navigator.clipboard` still allows). A mouseup with `selection()` is no substitute: it says nothing about whether the write succeeded. `program` copies arrive without the user's gesture, which a browser may refuse; a page that announces only the user's copies leaves them out.
|
|
217
|
+
A page shows a brief notification on `ok: true` ("Copied 42 characters"), and on a failure says the clipboard did not take it (with Cmd+C as the way to try again, since the browser's own copy is the one a browser that refuses `navigator.clipboard` still allows). A mouseup with `selection()` is no substitute: it says nothing about whether the write succeeded. `program` copies arrive without the user's gesture, which a browser may refuse; a page that announces only the user's copies leaves them out. Copying is tested in headless Chrome only, not in Safari, Firefox or Electron.
|
|
218
218
|
|
|
219
219
|
## Scrollback
|
|
220
220
|
|
package/dist/proto/messages.d.ts
CHANGED
|
@@ -315,7 +315,7 @@ export type Empty = Record<string, unknown>;
|
|
|
315
315
|
export type ErrorCode =
|
|
316
316
|
/** A connection error under Framing; the connection closes. */
|
|
317
317
|
"protocol_error"
|
|
318
|
-
/** `HELLO.version` is not
|
|
318
|
+
/** `HELLO.version` is not 2; the connection closes. */
|
|
319
319
|
| "version_mismatch"
|
|
320
320
|
/**
|
|
321
321
|
* Malformed payload, a field the protocol does not define, unknown method, a
|
package/ghostty-vt.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjermundgaraba/clankermux",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"xstate": "6.0.0-
|
|
39
|
+
"xstate": "6.0.0-beta.6"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@types/ws": "^8.18.
|
|
42
|
+
"@types/ws": "^8.18.2",
|
|
43
43
|
"ajv": "^8.20.0",
|
|
44
|
-
"ws": "^8.23.
|
|
44
|
+
"ws": "^8.23.1"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"typecheck": "tsc -p tsconfig.json && tsc -p tsconfig.worker.json",
|