phirepass-widgets 0.0.79 → 0.0.81

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.
Files changed (44) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/phirepass-rdp.cjs.entry.js +308 -0
  3. package/dist/cjs/phirepass-sftp-client.cjs.entry.js +17 -17
  4. package/dist/cjs/phirepass-terminal.cjs.entry.js +2 -2
  5. package/dist/cjs/phirepass-widgets.cjs.js +1 -1
  6. package/dist/cjs/{protocol-DC4eLkqJ.js → protocol-DS0qXomZ.js} +25 -26
  7. package/dist/collection/collection-manifest.json +2 -2
  8. package/dist/collection/common/protocol.js +1 -0
  9. package/dist/collection/components/{phirepass-vnc/phirepass-vnc.css → phirepass-rdp/phirepass-rdp.css} +9 -2
  10. package/dist/collection/components/{phirepass-vnc/phirepass-vnc.js → phirepass-rdp/phirepass-rdp.js} +198 -90
  11. package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.js +16 -16
  12. package/dist/collection/components/phirepass-terminal/phirepass-terminal.js +1 -1
  13. package/dist/collection/phirepass-channel_bg.wasm +0 -0
  14. package/dist/components/p-CWIhN33k.js +1 -0
  15. package/dist/components/{phirepass-vnc.d.ts → phirepass-rdp.d.ts} +4 -4
  16. package/dist/components/phirepass-rdp.js +1 -0
  17. package/dist/components/phirepass-sftp-client.js +1 -1
  18. package/dist/components/phirepass-terminal.js +2 -2
  19. package/dist/esm/loader.js +1 -1
  20. package/dist/esm/phirepass-rdp.entry.js +306 -0
  21. package/dist/esm/phirepass-sftp-client.entry.js +17 -17
  22. package/dist/esm/phirepass-terminal.entry.js +2 -2
  23. package/dist/esm/phirepass-widgets.js +1 -1
  24. package/dist/esm/{protocol-BR2c80mW.js → protocol-CWIhN33k.js} +24 -25
  25. package/dist/phirepass-widgets/{p-339cd54e.entry.js → p-19789356.entry.js} +1 -1
  26. package/dist/phirepass-widgets/{p-14c7611f.entry.js → p-2478a6eb.entry.js} +2 -2
  27. package/dist/phirepass-widgets/p-CWIhN33k.js +1 -0
  28. package/dist/phirepass-widgets/p-a5528005.entry.js +1 -0
  29. package/dist/phirepass-widgets/phirepass-channel_bg.wasm +0 -0
  30. package/dist/phirepass-widgets/phirepass-widgets.esm.js +1 -1
  31. package/dist/types/common/protocol.d.ts +17 -1
  32. package/dist/types/components/phirepass-rdp/phirepass-rdp.d.ts +90 -0
  33. package/dist/types/components.d.ts +136 -90
  34. package/package.json +4 -3
  35. package/dist/cjs/phirepass-vnc.cjs.entry.js +0 -336
  36. package/dist/collection/common/channel-socket.js +0 -89
  37. package/dist/components/p-BR2c80mW.js +0 -1
  38. package/dist/components/phirepass-vnc.js +0 -1
  39. package/dist/esm/phirepass-vnc.entry.js +0 -334
  40. package/dist/phirepass-widgets/p-19e2a30c.entry.js +0 -1
  41. package/dist/phirepass-widgets/p-BR2c80mW.js +0 -1
  42. package/dist/types/common/channel-socket.d.ts +0 -47
  43. package/dist/types/common/novnc.d.ts +0 -53
  44. package/dist/types/components/phirepass-vnc/phirepass-vnc.d.ts +0 -52
@@ -0,0 +1,90 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ import { ConnectionState } from '../../common/protocol';
3
+ /**
4
+ * Remote desktop over RDP.
5
+ *
6
+ * Unlike the terminal and SFTP widgets this one does not pipe protocol bytes
7
+ * through the phirepass channel. The channel is used only to authorise the
8
+ * session; the actual RDP stream runs on a second WebSocket opened by IronRDP's
9
+ * own client, because that client speaks RDCleanPath and can set neither
10
+ * headers nor a subprotocol on the socket it opens. See `RDP.md` in
11
+ * `phirepass-rs` for why the session is split across two sockets.
12
+ */
13
+ export declare class PhirepassRdp {
14
+ private channel;
15
+ private containerEl?;
16
+ private ironEl?;
17
+ private userInteraction?;
18
+ private domReady;
19
+ private runtimeReady;
20
+ private connected;
21
+ private session_id?;
22
+ /** Credentials in force for this session, from props or from the prompt. */
23
+ private credentials?;
24
+ private credentialsPrompt;
25
+ private statusMessage?;
26
+ private usernameBuffer;
27
+ private passwordBuffer;
28
+ el: HTMLElement;
29
+ serverHost: string;
30
+ serverPort: number;
31
+ allowInsecure: boolean;
32
+ heartbeatInterval: number;
33
+ nodeId: string;
34
+ serviceId: string;
35
+ token: string;
36
+ /**
37
+ * Credentials for the remote host. When either is missing the widget
38
+ * prompts for both.
39
+ *
40
+ * They serve two purposes at once: the agent checks them before it
41
+ * authorises the tunnel, and the browser uses them for CredSSP. The agent
42
+ * never logs in with them — it discards them once the tunnel is authorised.
43
+ */
44
+ username?: string;
45
+ password?: string;
46
+ /**
47
+ * What to name the host in the CredSSP service principal (`TERMSRV/...`).
48
+ *
49
+ * The agent dials whatever the node's service settings say, so this is
50
+ * never used for routing. It matters only because some hosts check the SPN,
51
+ * and the browser has no other way to learn the host's real address.
52
+ */
53
+ destination?: string;
54
+ /** `fit` scales the desktop to the widget, `real` keeps 1:1 pixels. */
55
+ scale: 'fit' | 'full' | 'real';
56
+ onNodeIdChange(newValue?: string, _oldValue?: string): void;
57
+ serverId?: string;
58
+ onServerIdChange(_newValue?: string, _oldValue?: string): void;
59
+ connectionStateChanged: EventEmitter<[ConnectionState, unknown?]>;
60
+ private create_web_socket_endpoint;
61
+ connectedCallback(): Promise<void>;
62
+ componentDidLoad(): void;
63
+ disconnectedCallback(): Promise<void>;
64
+ private try_connect;
65
+ private connect;
66
+ private open_comms;
67
+ private close_comms;
68
+ private reset_session_state;
69
+ /**
70
+ * The channel stays open for the whole session even though no RDP byte ever
71
+ * travels over it: it is what keeps the tunnel registered server-side, and
72
+ * it is where `TunnelClosed` and `Error` arrive.
73
+ */
74
+ private handle_auth_success;
75
+ private request_tunnel;
76
+ /**
77
+ * The tunnel is authorised but nothing has been dialled yet: the agent only
78
+ * reserves `sid`. Handing the ticket to the RDP client is what triggers the
79
+ * TCP + x224 + TLS hop, and the ticket expires 60s from now.
80
+ */
81
+ private handle_rdp_authorized;
82
+ private start_session;
83
+ /** IronRDP rejects with its own error shape rather than an `Error`. */
84
+ private describe_error;
85
+ private handle_tunnel_closed;
86
+ private handle_error;
87
+ private teardown_client;
88
+ private submit_credentials;
89
+ render(): any;
90
+ }
@@ -8,30 +8,35 @@ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  import { ConnectionState } from "./common/protocol";
9
9
  export { ConnectionState } from "./common/protocol";
10
10
  export namespace Components {
11
- interface PhirepassSftpClient {
11
+ /**
12
+ * Remote desktop over RDP.
13
+ * Unlike the terminal and SFTP widgets this one does not pipe protocol bytes
14
+ * through the phirepass channel. The channel is used only to authorise the
15
+ * session; the actual RDP stream runs on a second WebSocket opened by IronRDP's
16
+ * own client, because that client speaks RDCleanPath and can set neither
17
+ * headers nor a subprotocol on the socket it opens. See `RDP.md` in
18
+ * `phirepass-rs` for why the session is split across two sockets.
19
+ */
20
+ interface PhirepassRdp {
12
21
  /**
13
22
  * @default false
14
23
  */
15
24
  "allowInsecure": boolean;
16
25
  /**
17
- * @default 'Client'
26
+ * What to name the host in the CredSSP service principal (`TERMSRV/...`). The agent dials whatever the node's service settings say, so this is never used for routing. It matters only because some hosts check the SPN, and the browser has no other way to learn the host's real address.
18
27
  */
19
- "description": string;
28
+ "destination"?: string;
20
29
  /**
21
30
  * @default 30_000
22
31
  */
23
32
  "heartbeatInterval": number;
33
+ "nodeId": string;
34
+ "password"?: string;
24
35
  /**
25
- * @default false
26
- */
27
- "hideHeader": boolean;
28
- "maximize": () => Promise<void>;
29
- "minimize": () => Promise<void>;
30
- /**
31
- * @default 'SFTP'
36
+ * `fit` scales the desktop to the widget, `real` keeps 1:1 pixels.
37
+ * @default 'fit'
32
38
  */
33
- "name": string;
34
- "nodeId": string;
39
+ "scale": 'fit' | 'full' | 'real';
35
40
  /**
36
41
  * @default "phirepass.com"
37
42
  */
@@ -43,16 +48,34 @@ export namespace Components {
43
48
  "serverPort": number;
44
49
  "serviceId": string;
45
50
  "token": string;
51
+ /**
52
+ * Credentials for the remote host. When either is missing the widget prompts for both. They serve two purposes at once: the agent checks them before it authorises the tunnel, and the browser uses them for CredSSP. The agent never logs in with them — it discards them once the tunnel is authorised.
53
+ */
54
+ "username"?: string;
46
55
  }
47
- interface PhirepassTerminal {
56
+ interface PhirepassSftpClient {
48
57
  /**
49
58
  * @default false
50
59
  */
51
60
  "allowInsecure": boolean;
61
+ /**
62
+ * @default 'Client'
63
+ */
64
+ "description": string;
52
65
  /**
53
66
  * @default 30_000
54
67
  */
55
68
  "heartbeatInterval": number;
69
+ /**
70
+ * @default false
71
+ */
72
+ "hideHeader": boolean;
73
+ "maximize": () => Promise<void>;
74
+ "minimize": () => Promise<void>;
75
+ /**
76
+ * @default 'SFTP'
77
+ */
78
+ "name": string;
56
79
  "nodeId": string;
57
80
  /**
58
81
  * @default "phirepass.com"
@@ -64,13 +87,9 @@ export namespace Components {
64
87
  */
65
88
  "serverPort": number;
66
89
  "serviceId": string;
67
- /**
68
- * @default { // Terminal identification termName: 'xterm-256color', // Rendering rendererType: 'canvas', // Better performance allowTransparency: false, fontFamily: '"Berkeley Mono", "Fira Code", "SFMono-Regular", Menlo, monospace', fontSize: 12, // fontWeight: 'normal', // fontWeightBold: 'bold', letterSpacing: 0, lineHeight: 1.0, allowProposedApi: true, // needed for bracketed paste // Cursor cursorBlink: true, // cursorStyle: 'block', cursorWidth: 1, // Colors theme: { background: "#0b1021", foreground: "#e2e8f0", cursor: "#67e8f9", }, // Scrolling scrollback: 10000, fastScrollModifier: 'shift', fastScrollSensitivity: 5, // Behavior bellStyle: 'sound', // or 'none' if you prefer convertEol: false, // true to treat \n as \r\n disableStdin: false, // Selection rightClickSelectsWord: true, // Performance drawBoldTextInBrightColors: true, minimumContrastRatio: 1, // Advanced windowsMode: false, // Important for Linux macOptionIsMeta: false, altClickMovesCursor: true }
69
- */
70
- "terminalOptions": { termName: string; rendererType: string; allowTransparency: boolean; fontFamily: string; fontSize: number; letterSpacing: number; lineHeight: number; allowProposedApi: boolean; cursorBlink: boolean; cursorWidth: number; theme: { background: string; foreground: string; cursor: string; }; scrollback: number; fastScrollModifier: string; fastScrollSensitivity: number; bellStyle: string; convertEol: boolean; disableStdin: boolean; rightClickSelectsWord: boolean; drawBoldTextInBrightColors: boolean; minimumContrastRatio: number; windowsMode: boolean; macOptionIsMeta: boolean; altClickMovesCursor: boolean; };
71
90
  "token": string;
72
91
  }
73
- interface PhirepassVnc {
92
+ interface PhirepassTerminal {
74
93
  /**
75
94
  * @default false
76
95
  */
@@ -80,16 +99,6 @@ export namespace Components {
80
99
  */
81
100
  "heartbeatInterval": number;
82
101
  "nodeId": string;
83
- /**
84
- * Asks the VNC server to match its resolution to the widget size.
85
- * @default true
86
- */
87
- "resizeSession": boolean;
88
- /**
89
- * Scales the remote desktop to fit the widget instead of showing scrollbars.
90
- * @default true
91
- */
92
- "scaleViewport": boolean;
93
102
  /**
94
103
  * @default "phirepass.com"
95
104
  */
@@ -100,9 +109,17 @@ export namespace Components {
100
109
  */
101
110
  "serverPort": number;
102
111
  "serviceId": string;
112
+ /**
113
+ * @default { // Terminal identification termName: 'xterm-256color', // Rendering rendererType: 'canvas', // Better performance allowTransparency: false, fontFamily: '"Berkeley Mono", "Fira Code", "SFMono-Regular", Menlo, monospace', fontSize: 12, // fontWeight: 'normal', // fontWeightBold: 'bold', letterSpacing: 0, lineHeight: 1.0, allowProposedApi: true, // needed for bracketed paste // Cursor cursorBlink: true, // cursorStyle: 'block', cursorWidth: 1, // Colors theme: { background: "#0b1021", foreground: "#e2e8f0", cursor: "#67e8f9", }, // Scrolling scrollback: 10000, fastScrollModifier: 'shift', fastScrollSensitivity: 5, // Behavior bellStyle: 'sound', // or 'none' if you prefer convertEol: false, // true to treat \n as \r\n disableStdin: false, // Selection rightClickSelectsWord: true, // Performance drawBoldTextInBrightColors: true, minimumContrastRatio: 1, // Advanced windowsMode: false, // Important for Linux macOptionIsMeta: false, altClickMovesCursor: true }
114
+ */
115
+ "terminalOptions": { termName: string; rendererType: string; allowTransparency: boolean; fontFamily: string; fontSize: number; letterSpacing: number; lineHeight: number; allowProposedApi: boolean; cursorBlink: boolean; cursorWidth: number; theme: { background: string; foreground: string; cursor: string; }; scrollback: number; fastScrollModifier: string; fastScrollSensitivity: number; bellStyle: string; convertEol: boolean; disableStdin: boolean; rightClickSelectsWord: boolean; drawBoldTextInBrightColors: boolean; minimumContrastRatio: number; windowsMode: boolean; macOptionIsMeta: boolean; altClickMovesCursor: boolean; };
103
116
  "token": string;
104
117
  }
105
118
  }
119
+ export interface PhirepassRdpCustomEvent<T> extends CustomEvent<T> {
120
+ detail: T;
121
+ target: HTMLPhirepassRdpElement;
122
+ }
106
123
  export interface PhirepassSftpClientCustomEvent<T> extends CustomEvent<T> {
107
124
  detail: T;
108
125
  target: HTMLPhirepassSftpClientElement;
@@ -111,11 +128,33 @@ export interface PhirepassTerminalCustomEvent<T> extends CustomEvent<T> {
111
128
  detail: T;
112
129
  target: HTMLPhirepassTerminalElement;
113
130
  }
114
- export interface PhirepassVncCustomEvent<T> extends CustomEvent<T> {
115
- detail: T;
116
- target: HTMLPhirepassVncElement;
117
- }
118
131
  declare global {
132
+ interface HTMLPhirepassRdpElementEventMap {
133
+ "connectionStateChanged": [ConnectionState, unknown?];
134
+ }
135
+ /**
136
+ * Remote desktop over RDP.
137
+ * Unlike the terminal and SFTP widgets this one does not pipe protocol bytes
138
+ * through the phirepass channel. The channel is used only to authorise the
139
+ * session; the actual RDP stream runs on a second WebSocket opened by IronRDP's
140
+ * own client, because that client speaks RDCleanPath and can set neither
141
+ * headers nor a subprotocol on the socket it opens. See `RDP.md` in
142
+ * `phirepass-rs` for why the session is split across two sockets.
143
+ */
144
+ interface HTMLPhirepassRdpElement extends Components.PhirepassRdp, HTMLStencilElement {
145
+ addEventListener<K extends keyof HTMLPhirepassRdpElementEventMap>(type: K, listener: (this: HTMLPhirepassRdpElement, ev: PhirepassRdpCustomEvent<HTMLPhirepassRdpElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
146
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
147
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
148
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
149
+ removeEventListener<K extends keyof HTMLPhirepassRdpElementEventMap>(type: K, listener: (this: HTMLPhirepassRdpElement, ev: PhirepassRdpCustomEvent<HTMLPhirepassRdpElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
150
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
151
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
152
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
153
+ }
154
+ var HTMLPhirepassRdpElement: {
155
+ prototype: HTMLPhirepassRdpElement;
156
+ new (): HTMLPhirepassRdpElement;
157
+ };
119
158
  interface HTMLPhirepassSftpClientElementEventMap {
120
159
  "maximize": any;
121
160
  "connectionStateChanged": [ConnectionState, unknown?];
@@ -151,56 +190,45 @@ declare global {
151
190
  prototype: HTMLPhirepassTerminalElement;
152
191
  new (): HTMLPhirepassTerminalElement;
153
192
  };
154
- interface HTMLPhirepassVncElementEventMap {
155
- "connectionStateChanged": [ConnectionState, unknown?];
156
- }
157
- interface HTMLPhirepassVncElement extends Components.PhirepassVnc, HTMLStencilElement {
158
- addEventListener<K extends keyof HTMLPhirepassVncElementEventMap>(type: K, listener: (this: HTMLPhirepassVncElement, ev: PhirepassVncCustomEvent<HTMLPhirepassVncElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
159
- addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
160
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
161
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
162
- removeEventListener<K extends keyof HTMLPhirepassVncElementEventMap>(type: K, listener: (this: HTMLPhirepassVncElement, ev: PhirepassVncCustomEvent<HTMLPhirepassVncElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
163
- removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
164
- removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
165
- removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
166
- }
167
- var HTMLPhirepassVncElement: {
168
- prototype: HTMLPhirepassVncElement;
169
- new (): HTMLPhirepassVncElement;
170
- };
171
193
  interface HTMLElementTagNameMap {
194
+ "phirepass-rdp": HTMLPhirepassRdpElement;
172
195
  "phirepass-sftp-client": HTMLPhirepassSftpClientElement;
173
196
  "phirepass-terminal": HTMLPhirepassTerminalElement;
174
- "phirepass-vnc": HTMLPhirepassVncElement;
175
197
  }
176
198
  }
177
199
  declare namespace LocalJSX {
178
200
  type OneOf<K extends string, PropT, AttrT = PropT> = { [P in K]: PropT } & { [P in `attr:${K}` | `prop:${K}`]?: never } | { [P in `attr:${K}`]: AttrT } & { [P in K | `prop:${K}`]?: never } | { [P in `prop:${K}`]: PropT } & { [P in K | `attr:${K}`]?: never };
179
201
 
180
- interface PhirepassSftpClient {
202
+ /**
203
+ * Remote desktop over RDP.
204
+ * Unlike the terminal and SFTP widgets this one does not pipe protocol bytes
205
+ * through the phirepass channel. The channel is used only to authorise the
206
+ * session; the actual RDP stream runs on a second WebSocket opened by IronRDP's
207
+ * own client, because that client speaks RDCleanPath and can set neither
208
+ * headers nor a subprotocol on the socket it opens. See `RDP.md` in
209
+ * `phirepass-rs` for why the session is split across two sockets.
210
+ */
211
+ interface PhirepassRdp {
181
212
  /**
182
213
  * @default false
183
214
  */
184
215
  "allowInsecure"?: boolean;
185
216
  /**
186
- * @default 'Client'
217
+ * What to name the host in the CredSSP service principal (`TERMSRV/...`). The agent dials whatever the node's service settings say, so this is never used for routing. It matters only because some hosts check the SPN, and the browser has no other way to learn the host's real address.
187
218
  */
188
- "description"?: string;
219
+ "destination"?: string;
189
220
  /**
190
221
  * @default 30_000
191
222
  */
192
223
  "heartbeatInterval"?: number;
224
+ "nodeId": string;
225
+ "onConnectionStateChanged"?: (event: PhirepassRdpCustomEvent<[ConnectionState, unknown?]>) => void;
226
+ "password"?: string;
193
227
  /**
194
- * @default false
228
+ * `fit` scales the desktop to the widget, `real` keeps 1:1 pixels.
229
+ * @default 'fit'
195
230
  */
196
- "hideHeader"?: boolean;
197
- /**
198
- * @default 'SFTP'
199
- */
200
- "name"?: string;
201
- "nodeId": string;
202
- "onConnectionStateChanged"?: (event: PhirepassSftpClientCustomEvent<[ConnectionState, unknown?]>) => void;
203
- "onMaximize"?: (event: PhirepassSftpClientCustomEvent<any>) => void;
231
+ "scale"?: 'fit' | 'full' | 'real';
204
232
  /**
205
233
  * @default "phirepass.com"
206
234
  */
@@ -212,18 +240,35 @@ declare namespace LocalJSX {
212
240
  "serverPort"?: number;
213
241
  "serviceId": string;
214
242
  "token": string;
243
+ /**
244
+ * Credentials for the remote host. When either is missing the widget prompts for both. They serve two purposes at once: the agent checks them before it authorises the tunnel, and the browser uses them for CredSSP. The agent never logs in with them — it discards them once the tunnel is authorised.
245
+ */
246
+ "username"?: string;
215
247
  }
216
- interface PhirepassTerminal {
248
+ interface PhirepassSftpClient {
217
249
  /**
218
250
  * @default false
219
251
  */
220
252
  "allowInsecure"?: boolean;
253
+ /**
254
+ * @default 'Client'
255
+ */
256
+ "description"?: string;
221
257
  /**
222
258
  * @default 30_000
223
259
  */
224
260
  "heartbeatInterval"?: number;
261
+ /**
262
+ * @default false
263
+ */
264
+ "hideHeader"?: boolean;
265
+ /**
266
+ * @default 'SFTP'
267
+ */
268
+ "name"?: string;
225
269
  "nodeId": string;
226
- "onConnectionStateChanged"?: (event: PhirepassTerminalCustomEvent<[ConnectionState, unknown?]>) => void;
270
+ "onConnectionStateChanged"?: (event: PhirepassSftpClientCustomEvent<[ConnectionState, unknown?]>) => void;
271
+ "onMaximize"?: (event: PhirepassSftpClientCustomEvent<any>) => void;
227
272
  /**
228
273
  * @default "phirepass.com"
229
274
  */
@@ -234,13 +279,9 @@ declare namespace LocalJSX {
234
279
  */
235
280
  "serverPort"?: number;
236
281
  "serviceId": string;
237
- /**
238
- * @default { // Terminal identification termName: 'xterm-256color', // Rendering rendererType: 'canvas', // Better performance allowTransparency: false, fontFamily: '"Berkeley Mono", "Fira Code", "SFMono-Regular", Menlo, monospace', fontSize: 12, // fontWeight: 'normal', // fontWeightBold: 'bold', letterSpacing: 0, lineHeight: 1.0, allowProposedApi: true, // needed for bracketed paste // Cursor cursorBlink: true, // cursorStyle: 'block', cursorWidth: 1, // Colors theme: { background: "#0b1021", foreground: "#e2e8f0", cursor: "#67e8f9", }, // Scrolling scrollback: 10000, fastScrollModifier: 'shift', fastScrollSensitivity: 5, // Behavior bellStyle: 'sound', // or 'none' if you prefer convertEol: false, // true to treat \n as \r\n disableStdin: false, // Selection rightClickSelectsWord: true, // Performance drawBoldTextInBrightColors: true, minimumContrastRatio: 1, // Advanced windowsMode: false, // Important for Linux macOptionIsMeta: false, altClickMovesCursor: true }
239
- */
240
- "terminalOptions"?: { termName: string; rendererType: string; allowTransparency: boolean; fontFamily: string; fontSize: number; letterSpacing: number; lineHeight: number; allowProposedApi: boolean; cursorBlink: boolean; cursorWidth: number; theme: { background: string; foreground: string; cursor: string; }; scrollback: number; fastScrollModifier: string; fastScrollSensitivity: number; bellStyle: string; convertEol: boolean; disableStdin: boolean; rightClickSelectsWord: boolean; drawBoldTextInBrightColors: boolean; minimumContrastRatio: number; windowsMode: boolean; macOptionIsMeta: boolean; altClickMovesCursor: boolean; };
241
282
  "token": string;
242
283
  }
243
- interface PhirepassVnc {
284
+ interface PhirepassTerminal {
244
285
  /**
245
286
  * @default false
246
287
  */
@@ -250,17 +291,7 @@ declare namespace LocalJSX {
250
291
  */
251
292
  "heartbeatInterval"?: number;
252
293
  "nodeId": string;
253
- "onConnectionStateChanged"?: (event: PhirepassVncCustomEvent<[ConnectionState, unknown?]>) => void;
254
- /**
255
- * Asks the VNC server to match its resolution to the widget size.
256
- * @default true
257
- */
258
- "resizeSession"?: boolean;
259
- /**
260
- * Scales the remote desktop to fit the widget instead of showing scrollbars.
261
- * @default true
262
- */
263
- "scaleViewport"?: boolean;
294
+ "onConnectionStateChanged"?: (event: PhirepassTerminalCustomEvent<[ConnectionState, unknown?]>) => void;
264
295
  /**
265
296
  * @default "phirepass.com"
266
297
  */
@@ -271,13 +302,14 @@ declare namespace LocalJSX {
271
302
  */
272
303
  "serverPort"?: number;
273
304
  "serviceId": string;
305
+ /**
306
+ * @default { // Terminal identification termName: 'xterm-256color', // Rendering rendererType: 'canvas', // Better performance allowTransparency: false, fontFamily: '"Berkeley Mono", "Fira Code", "SFMono-Regular", Menlo, monospace', fontSize: 12, // fontWeight: 'normal', // fontWeightBold: 'bold', letterSpacing: 0, lineHeight: 1.0, allowProposedApi: true, // needed for bracketed paste // Cursor cursorBlink: true, // cursorStyle: 'block', cursorWidth: 1, // Colors theme: { background: "#0b1021", foreground: "#e2e8f0", cursor: "#67e8f9", }, // Scrolling scrollback: 10000, fastScrollModifier: 'shift', fastScrollSensitivity: 5, // Behavior bellStyle: 'sound', // or 'none' if you prefer convertEol: false, // true to treat \n as \r\n disableStdin: false, // Selection rightClickSelectsWord: true, // Performance drawBoldTextInBrightColors: true, minimumContrastRatio: 1, // Advanced windowsMode: false, // Important for Linux macOptionIsMeta: false, altClickMovesCursor: true }
307
+ */
308
+ "terminalOptions"?: { termName: string; rendererType: string; allowTransparency: boolean; fontFamily: string; fontSize: number; letterSpacing: number; lineHeight: number; allowProposedApi: boolean; cursorBlink: boolean; cursorWidth: number; theme: { background: string; foreground: string; cursor: string; }; scrollback: number; fastScrollModifier: string; fastScrollSensitivity: number; bellStyle: string; convertEol: boolean; disableStdin: boolean; rightClickSelectsWord: boolean; drawBoldTextInBrightColors: boolean; minimumContrastRatio: number; windowsMode: boolean; macOptionIsMeta: boolean; altClickMovesCursor: boolean; };
274
309
  "token": string;
275
310
  }
276
311
 
277
- interface PhirepassSftpClientAttributes {
278
- "name": string;
279
- "description": string;
280
- "hideHeader": boolean;
312
+ interface PhirepassRdpAttributes {
281
313
  "serverHost": string;
282
314
  "serverPort": number;
283
315
  "allowInsecure": boolean;
@@ -285,9 +317,16 @@ declare namespace LocalJSX {
285
317
  "nodeId": string;
286
318
  "serviceId": string;
287
319
  "token": string;
320
+ "username": string;
321
+ "password": string;
322
+ "destination": string;
323
+ "scale": 'fit' | 'full' | 'real';
288
324
  "serverId": string;
289
325
  }
290
- interface PhirepassTerminalAttributes {
326
+ interface PhirepassSftpClientAttributes {
327
+ "name": string;
328
+ "description": string;
329
+ "hideHeader": boolean;
291
330
  "serverHost": string;
292
331
  "serverPort": number;
293
332
  "allowInsecure": boolean;
@@ -297,7 +336,7 @@ declare namespace LocalJSX {
297
336
  "token": string;
298
337
  "serverId": string;
299
338
  }
300
- interface PhirepassVncAttributes {
339
+ interface PhirepassTerminalAttributes {
301
340
  "serverHost": string;
302
341
  "serverPort": number;
303
342
  "allowInsecure": boolean;
@@ -305,24 +344,31 @@ declare namespace LocalJSX {
305
344
  "nodeId": string;
306
345
  "serviceId": string;
307
346
  "token": string;
308
- "scaleViewport": boolean;
309
- "resizeSession": boolean;
310
347
  "serverId": string;
311
348
  }
312
349
 
313
350
  interface IntrinsicElements {
351
+ "phirepass-rdp": Omit<PhirepassRdp, keyof PhirepassRdpAttributes> & { [K in keyof PhirepassRdp & keyof PhirepassRdpAttributes]?: PhirepassRdp[K] } & { [K in keyof PhirepassRdp & keyof PhirepassRdpAttributes as `attr:${K}`]?: PhirepassRdpAttributes[K] } & { [K in keyof PhirepassRdp & keyof PhirepassRdpAttributes as `prop:${K}`]?: PhirepassRdp[K] } & OneOf<"nodeId", PhirepassRdp["nodeId"], PhirepassRdpAttributes["nodeId"]> & OneOf<"serviceId", PhirepassRdp["serviceId"], PhirepassRdpAttributes["serviceId"]> & OneOf<"token", PhirepassRdp["token"], PhirepassRdpAttributes["token"]>;
314
352
  "phirepass-sftp-client": Omit<PhirepassSftpClient, keyof PhirepassSftpClientAttributes> & { [K in keyof PhirepassSftpClient & keyof PhirepassSftpClientAttributes]?: PhirepassSftpClient[K] } & { [K in keyof PhirepassSftpClient & keyof PhirepassSftpClientAttributes as `attr:${K}`]?: PhirepassSftpClientAttributes[K] } & { [K in keyof PhirepassSftpClient & keyof PhirepassSftpClientAttributes as `prop:${K}`]?: PhirepassSftpClient[K] } & OneOf<"nodeId", PhirepassSftpClient["nodeId"], PhirepassSftpClientAttributes["nodeId"]> & OneOf<"serviceId", PhirepassSftpClient["serviceId"], PhirepassSftpClientAttributes["serviceId"]> & OneOf<"token", PhirepassSftpClient["token"], PhirepassSftpClientAttributes["token"]>;
315
353
  "phirepass-terminal": Omit<PhirepassTerminal, keyof PhirepassTerminalAttributes> & { [K in keyof PhirepassTerminal & keyof PhirepassTerminalAttributes]?: PhirepassTerminal[K] } & { [K in keyof PhirepassTerminal & keyof PhirepassTerminalAttributes as `attr:${K}`]?: PhirepassTerminalAttributes[K] } & { [K in keyof PhirepassTerminal & keyof PhirepassTerminalAttributes as `prop:${K}`]?: PhirepassTerminal[K] } & OneOf<"nodeId", PhirepassTerminal["nodeId"], PhirepassTerminalAttributes["nodeId"]> & OneOf<"serviceId", PhirepassTerminal["serviceId"], PhirepassTerminalAttributes["serviceId"]> & OneOf<"token", PhirepassTerminal["token"], PhirepassTerminalAttributes["token"]>;
316
- "phirepass-vnc": Omit<PhirepassVnc, keyof PhirepassVncAttributes> & { [K in keyof PhirepassVnc & keyof PhirepassVncAttributes]?: PhirepassVnc[K] } & { [K in keyof PhirepassVnc & keyof PhirepassVncAttributes as `attr:${K}`]?: PhirepassVncAttributes[K] } & { [K in keyof PhirepassVnc & keyof PhirepassVncAttributes as `prop:${K}`]?: PhirepassVnc[K] } & OneOf<"nodeId", PhirepassVnc["nodeId"], PhirepassVncAttributes["nodeId"]> & OneOf<"serviceId", PhirepassVnc["serviceId"], PhirepassVncAttributes["serviceId"]> & OneOf<"token", PhirepassVnc["token"], PhirepassVncAttributes["token"]>;
317
354
  }
318
355
  }
319
356
  export { LocalJSX as JSX };
320
357
  declare module "@stencil/core" {
321
358
  export namespace JSX {
322
359
  interface IntrinsicElements {
360
+ /**
361
+ * Remote desktop over RDP.
362
+ * Unlike the terminal and SFTP widgets this one does not pipe protocol bytes
363
+ * through the phirepass channel. The channel is used only to authorise the
364
+ * session; the actual RDP stream runs on a second WebSocket opened by IronRDP's
365
+ * own client, because that client speaks RDCleanPath and can set neither
366
+ * headers nor a subprotocol on the socket it opens. See `RDP.md` in
367
+ * `phirepass-rs` for why the session is split across two sockets.
368
+ */
369
+ "phirepass-rdp": LocalJSX.IntrinsicElements["phirepass-rdp"] & JSXBase.HTMLAttributes<HTMLPhirepassRdpElement>;
323
370
  "phirepass-sftp-client": LocalJSX.IntrinsicElements["phirepass-sftp-client"] & JSXBase.HTMLAttributes<HTMLPhirepassSftpClientElement>;
324
371
  "phirepass-terminal": LocalJSX.IntrinsicElements["phirepass-terminal"] & JSXBase.HTMLAttributes<HTMLPhirepassTerminalElement>;
325
- "phirepass-vnc": LocalJSX.IntrinsicElements["phirepass-vnc"] & JSXBase.HTMLAttributes<HTMLPhirepassVncElement>;
326
372
  }
327
373
  }
328
374
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phirepass-widgets",
3
- "version": "0.0.79",
3
+ "version": "0.0.81",
4
4
  "description": "Phirepass widgets for the web application",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -48,7 +48,8 @@
48
48
  },
49
49
  "license": "AGPL-3.0-or-later",
50
50
  "dependencies": {
51
- "@novnc/novnc": "^1.7.0",
51
+ "@devolutions/iron-remote-desktop": "^0.11.0",
52
+ "@devolutions/iron-remote-desktop-rdp": "^0.7.0",
52
53
  "@xterm/addon-fit": "^0.11.0",
53
54
  "@xterm/addon-image": "^0.9.0",
54
55
  "@xterm/addon-search": "^0.16.0",
@@ -56,6 +57,6 @@
56
57
  "@xterm/addon-web-links": "^0.12.0",
57
58
  "@xterm/addon-webgl": "^0.19.0",
58
59
  "@xterm/xterm": "^6.0.0",
59
- "phirepass-channel": "^0.1.295"
60
+ "phirepass-channel": "^0.1.298"
60
61
  }
61
62
  }