phirepass-widgets 0.0.102 → 0.0.104
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/cjs/loader.cjs.js +1 -1
- package/dist/cjs/phirepass-rdp.cjs.entry.js +2 -2
- package/dist/cjs/phirepass-sftp-client.cjs.entry.js +2 -2
- package/dist/cjs/phirepass-terminal.cjs.entry.js +145 -3
- package/dist/cjs/phirepass-widgets.cjs.js +1 -1
- package/dist/cjs/{protocol-BcMWzyWp.js → protocol-9IbZ-NTW.js} +3 -3
- package/dist/collection/components/phirepass-rdp/phirepass-rdp.css +48 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.css +132 -0
- package/dist/collection/components/phirepass-terminal/phirepass-terminal.css +95 -2
- package/dist/collection/components/phirepass-terminal/phirepass-terminal.js +169 -1
- package/dist/collection/phirepass-channel_bg.wasm +0 -0
- package/dist/{phirepass-widgets/p-Dzyd97Ok.js → components/p-D4vz9Xu4.js} +1 -1
- package/dist/components/phirepass-rdp.js +1 -1
- package/dist/components/phirepass-sftp-client.js +1 -1
- package/dist/components/phirepass-terminal.js +5 -5
- package/dist/esm/loader.js +1 -1
- package/dist/esm/phirepass-rdp.entry.js +2 -2
- package/dist/esm/phirepass-sftp-client.entry.js +2 -2
- package/dist/esm/phirepass-terminal.entry.js +145 -3
- package/dist/esm/phirepass-widgets.js +1 -1
- package/dist/esm/{protocol-Dzyd97Ok.js → protocol-D4vz9Xu4.js} +2 -2
- package/dist/phirepass-widgets/{p-16145ab4.entry.js → p-151b957b.entry.js} +5 -5
- package/dist/phirepass-widgets/{p-11aedd04.entry.js → p-944c0f09.entry.js} +1 -1
- package/dist/{components/p-Dzyd97Ok.js → phirepass-widgets/p-D4vz9Xu4.js} +1 -1
- package/dist/phirepass-widgets/{p-57d80137.entry.js → p-a6f2b860.entry.js} +1 -1
- package/dist/phirepass-widgets/phirepass-channel_bg.wasm +0 -0
- package/dist/phirepass-widgets/phirepass-widgets.esm.js +1 -1
- package/dist/types/components/phirepass-terminal/phirepass-terminal.d.ts +68 -0
- package/dist/types/components.d.ts +11 -0
- package/package.json +2 -2
|
@@ -57,6 +57,25 @@ export declare class PhirepassTerminal {
|
|
|
57
57
|
nodeId: string;
|
|
58
58
|
serviceId: string;
|
|
59
59
|
token: string;
|
|
60
|
+
/**
|
|
61
|
+
* Whether to draw the on-screen key bar.
|
|
62
|
+
*
|
|
63
|
+
* `auto` shows it wherever the pointer is coarse, which is the whole of the
|
|
64
|
+
* decision on a phone and none of it on a desktop — so it is answered in
|
|
65
|
+
* CSS (`@media (pointer: coarse)`) rather than by sniffing the user agent
|
|
66
|
+
* here. `on` and `off` exist because an embedder may know better: a tablet
|
|
67
|
+
* with a keyboard case reports a coarse pointer and does not need this.
|
|
68
|
+
*/
|
|
69
|
+
keyBar: 'auto' | 'on' | 'off';
|
|
70
|
+
/**
|
|
71
|
+
* The sticky modifiers, armed by a tap and spent on the next key.
|
|
72
|
+
*
|
|
73
|
+
* State rather than a plain field because the bar has to show which of them
|
|
74
|
+
* is armed — a modifier you cannot see the state of is a modifier you press
|
|
75
|
+
* twice.
|
|
76
|
+
*/
|
|
77
|
+
private ctrlArmed;
|
|
78
|
+
private altArmed;
|
|
60
79
|
onNodeIdChange(newValue?: string, _oldValue?: string): void;
|
|
61
80
|
serverId?: string;
|
|
62
81
|
onServerIdChange(_newValue?: string, _oldValue?: string): void;
|
|
@@ -85,9 +104,58 @@ export declare class PhirepassTerminal {
|
|
|
85
104
|
private connect;
|
|
86
105
|
private setup_resize_observer;
|
|
87
106
|
private handle_terminal_data;
|
|
107
|
+
/**
|
|
108
|
+
* The one place input reaches the session, whatever produced it.
|
|
109
|
+
*
|
|
110
|
+
* The key bar goes through here too, which is what makes it work during the
|
|
111
|
+
* credential prompts: a tapped backspace at the password prompt is the same
|
|
112
|
+
* event as a typed one, and neither has to know which of the three modes
|
|
113
|
+
* the widget is in.
|
|
114
|
+
*/
|
|
115
|
+
private dispatch_input;
|
|
116
|
+
/**
|
|
117
|
+
* Spend whatever the key bar has armed on this keystroke.
|
|
118
|
+
*
|
|
119
|
+
* Only single characters are transformed. A paste arrives as one `onData`
|
|
120
|
+
* call carrying the whole clipboard, and control-ing the first character of
|
|
121
|
+
* it — or worse, escape-prefixing a hundred lines — is not what anybody
|
|
122
|
+
* armed the modifier for. An escape sequence the terminal generated itself
|
|
123
|
+
* (an arrow key on a hardware keyboard) is left alone for the same reason:
|
|
124
|
+
* it already encodes its own modifiers.
|
|
125
|
+
*/
|
|
126
|
+
private apply_modifiers;
|
|
127
|
+
private clear_modifiers;
|
|
128
|
+
/**
|
|
129
|
+
* A key from the bar.
|
|
130
|
+
*
|
|
131
|
+
* Focus is returned to the terminal afterwards: on a phone the soft
|
|
132
|
+
* keyboard is tied to the focused element, and a bar that dismissed it on
|
|
133
|
+
* every tap would be a bar you use once.
|
|
134
|
+
*/
|
|
135
|
+
private press;
|
|
136
|
+
/**
|
|
137
|
+
* An arrow, encoded with whatever is armed.
|
|
138
|
+
*
|
|
139
|
+
* xterm's modifier encoding is a bitfield offset by one: 1 is unmodified,
|
|
140
|
+
* +1 shift, +2 alt, +4 ctrl. Unmodified arrows keep the short form, because
|
|
141
|
+
* some remote programs only ever learned that one.
|
|
142
|
+
*/
|
|
143
|
+
private arrow;
|
|
88
144
|
private handle_username_input;
|
|
89
145
|
private submit_username;
|
|
90
146
|
private handle_password_input;
|
|
91
147
|
private submit_password;
|
|
148
|
+
/**
|
|
149
|
+
* One key on the bar.
|
|
150
|
+
*
|
|
151
|
+
* The press swallows its own default so the button never takes focus:
|
|
152
|
+
* moving focus off the terminal is what closes the soft keyboard, and a
|
|
153
|
+
* modifier bar that closes the keyboard is a modifier bar for nothing.
|
|
154
|
+
*
|
|
155
|
+
* Both events are guarded because either can be the one that moves focus —
|
|
156
|
+
* a touch fires `pointerdown` and then a compatibility `mousedown`, and it
|
|
157
|
+
* is whichever of them runs first that has to be refused.
|
|
158
|
+
*/
|
|
159
|
+
private key_button;
|
|
92
160
|
render(): any;
|
|
93
161
|
}
|
|
@@ -133,6 +133,11 @@ export namespace Components {
|
|
|
133
133
|
* @default 30_000
|
|
134
134
|
*/
|
|
135
135
|
"heartbeatInterval": number;
|
|
136
|
+
/**
|
|
137
|
+
* Whether to draw the on-screen key bar. `auto` shows it wherever the pointer is coarse, which is the whole of the decision on a phone and none of it on a desktop — so it is answered in CSS (`@media (pointer: coarse)`) rather than by sniffing the user agent here. `on` and `off` exist because an embedder may know better: a tablet with a keyboard case reports a coarse pointer and does not need this.
|
|
138
|
+
* @default 'auto'
|
|
139
|
+
*/
|
|
140
|
+
"keyBar": 'auto' | 'on' | 'off';
|
|
136
141
|
"nodeId": string;
|
|
137
142
|
/**
|
|
138
143
|
* @default "phirepass.com"
|
|
@@ -340,6 +345,11 @@ declare namespace LocalJSX {
|
|
|
340
345
|
* @default 30_000
|
|
341
346
|
*/
|
|
342
347
|
"heartbeatInterval"?: number;
|
|
348
|
+
/**
|
|
349
|
+
* Whether to draw the on-screen key bar. `auto` shows it wherever the pointer is coarse, which is the whole of the decision on a phone and none of it on a desktop — so it is answered in CSS (`@media (pointer: coarse)`) rather than by sniffing the user agent here. `on` and `off` exist because an embedder may know better: a tablet with a keyboard case reports a coarse pointer and does not need this.
|
|
350
|
+
* @default 'auto'
|
|
351
|
+
*/
|
|
352
|
+
"keyBar"?: 'auto' | 'on' | 'off';
|
|
343
353
|
"nodeId": string;
|
|
344
354
|
"onConnectionStateChanged"?: (event: PhirepassTerminalCustomEvent<[ConnectionState, unknown?]>) => void;
|
|
345
355
|
/**
|
|
@@ -397,6 +407,7 @@ declare namespace LocalJSX {
|
|
|
397
407
|
"nodeId": string;
|
|
398
408
|
"serviceId": string;
|
|
399
409
|
"token": string;
|
|
410
|
+
"keyBar": 'auto' | 'on' | 'off';
|
|
400
411
|
"serverId": string;
|
|
401
412
|
}
|
|
402
413
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "phirepass-widgets",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.104",
|
|
4
4
|
"description": "Phirepass widgets for the web application",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -57,6 +57,6 @@
|
|
|
57
57
|
"@xterm/addon-web-links": "^0.12.0",
|
|
58
58
|
"@xterm/addon-webgl": "^0.19.0",
|
|
59
59
|
"@xterm/xterm": "^6.0.0",
|
|
60
|
-
"phirepass-channel": "^0.1.
|
|
60
|
+
"phirepass-channel": "^0.1.344"
|
|
61
61
|
}
|
|
62
62
|
}
|