phirepass-widgets 0.0.78 → 0.0.80

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 (36) 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-D5iIwePe.js → protocol-DfRfif9I.js} +31 -3
  7. package/dist/collection/collection-manifest.json +1 -0
  8. package/dist/collection/common/protocol.js +1 -0
  9. package/dist/collection/components/phirepass-rdp/phirepass-rdp.css +80 -0
  10. package/dist/collection/components/phirepass-rdp/phirepass-rdp.js +589 -0
  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-y9WE2vrP.js +1 -0
  15. package/dist/components/phirepass-rdp.d.ts +11 -0
  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-DV8elohf.js → protocol-y9WE2vrP.js} +30 -2
  25. package/dist/phirepass-widgets/p-3cc5c346.entry.js +1 -0
  26. package/dist/phirepass-widgets/{p-7227a0f6.entry.js → p-53672ba5.entry.js} +1 -1
  27. package/dist/phirepass-widgets/{p-e6c56b50.entry.js → p-a9c02bf1.entry.js} +2 -2
  28. package/dist/phirepass-widgets/p-y9WE2vrP.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 +147 -0
  34. package/package.json +4 -2
  35. package/dist/components/p-DV8elohf.js +0 -1
  36. package/dist/phirepass-widgets/p-DV8elohf.js +0 -1
@@ -0,0 +1,80 @@
1
+ :host {
2
+ display: block;
3
+ width: 100%;
4
+ height: 100%;
5
+ min-width: 0;
6
+ min-height: 0;
7
+ overflow: hidden;
8
+ position: relative;
9
+ background: #0b1021;
10
+ }
11
+
12
+ .screen {
13
+ width: 100%;
14
+ height: 100%;
15
+ }
16
+
17
+ /* IronRDP renders into its own canvas; never let it force the page to scroll. */
18
+ .screen iron-remote-desktop {
19
+ display: block;
20
+ width: 100%;
21
+ height: 100%;
22
+ }
23
+
24
+ .screen canvas {
25
+ max-width: 100%;
26
+ display: block;
27
+ }
28
+
29
+ .prompt {
30
+ position: absolute;
31
+ inset: 0;
32
+ display: flex;
33
+ flex-direction: column;
34
+ align-items: center;
35
+ justify-content: center;
36
+ gap: 0.5rem;
37
+ background: rgba(11, 16, 33, 0.92);
38
+ color: #e2e8f0;
39
+ font-family: "Berkeley Mono", "Fira Code", "SFMono-Regular", Menlo, monospace;
40
+ font-size: 0.875rem;
41
+ }
42
+
43
+ .prompt input {
44
+ padding: 0.5rem 0.75rem;
45
+ border: 1px solid #334155;
46
+ border-radius: 0.375rem;
47
+ background: #0f172a;
48
+ color: inherit;
49
+ font: inherit;
50
+ min-width: 16rem;
51
+ }
52
+
53
+ .prompt input:focus {
54
+ outline: 2px solid #67e8f9;
55
+ outline-offset: 1px;
56
+ }
57
+
58
+ .prompt button {
59
+ margin-top: 0.5rem;
60
+ padding: 0.5rem 1.25rem;
61
+ border: 0;
62
+ border-radius: 0.375rem;
63
+ background: #67e8f9;
64
+ color: #0b1021;
65
+ font: inherit;
66
+ font-weight: 600;
67
+ cursor: pointer;
68
+ }
69
+
70
+ .status {
71
+ position: absolute;
72
+ inset-inline: 0;
73
+ bottom: 0;
74
+ padding: 0.5rem 0.75rem;
75
+ background: rgba(11, 16, 33, 0.92);
76
+ color: #e2e8f0;
77
+ font-family: "Berkeley Mono", "Fira Code", "SFMono-Regular", Menlo, monospace;
78
+ font-size: 0.8125rem;
79
+ text-align: center;
80
+ }
@@ -0,0 +1,589 @@
1
+ import { Host, h } from "@stencil/core";
2
+ import init, { Channel as PhirepassChannel } from "phirepass-channel";
3
+ import { ConnectionState, ProtocolMessageType, } from "../../common/protocol";
4
+ /**
5
+ * Remote desktop over RDP.
6
+ *
7
+ * Unlike the terminal and SFTP widgets this one does not pipe protocol bytes
8
+ * through the phirepass channel. The channel is used only to authorise the
9
+ * session; the actual RDP stream runs on a second WebSocket opened by IronRDP's
10
+ * own client, because that client speaks RDCleanPath and can set neither
11
+ * headers nor a subprotocol on the socket it opens. See `RDP.md` in
12
+ * `phirepass-rs` for why the session is split across two sockets.
13
+ */
14
+ export class PhirepassRdp {
15
+ channel;
16
+ containerEl;
17
+ ironEl;
18
+ userInteraction;
19
+ domReady = false;
20
+ runtimeReady = false;
21
+ connected = false;
22
+ session_id;
23
+ /** Credentials in force for this session, from props or from the prompt. */
24
+ credentials;
25
+ credentialsPrompt = false;
26
+ statusMessage;
27
+ usernameBuffer = '';
28
+ passwordBuffer = '';
29
+ el;
30
+ serverHost = "phirepass.com";
31
+ serverPort = 443;
32
+ allowInsecure = false;
33
+ heartbeatInterval = 30_000;
34
+ nodeId;
35
+ serviceId;
36
+ token;
37
+ /**
38
+ * Credentials for the remote host. When either is missing the widget
39
+ * prompts for both.
40
+ *
41
+ * They serve two purposes at once: the agent checks them before it
42
+ * authorises the tunnel, and the browser uses them for CredSSP. The agent
43
+ * never logs in with them — it discards them once the tunnel is authorised.
44
+ */
45
+ username;
46
+ password;
47
+ /**
48
+ * What to name the host in the CredSSP service principal (`TERMSRV/...`).
49
+ *
50
+ * The agent dials whatever the node's service settings say, so this is
51
+ * never used for routing. It matters only because some hosts check the SPN,
52
+ * and the browser has no other way to learn the host's real address.
53
+ */
54
+ destination;
55
+ /** `fit` scales the desktop to the widget, `real` keeps 1:1 pixels. */
56
+ scale = 'fit';
57
+ onNodeIdChange(newValue, _oldValue) {
58
+ this.reset_session_state();
59
+ if (this.channel && this.channel.is_connected()) {
60
+ this.close_comms();
61
+ }
62
+ if (newValue) {
63
+ this.open_comms();
64
+ this.channel.connect();
65
+ }
66
+ }
67
+ serverId;
68
+ onServerIdChange(_newValue, _oldValue) {
69
+ this.onNodeIdChange(this.nodeId, this.nodeId);
70
+ }
71
+ connectionStateChanged;
72
+ create_web_socket_endpoint() {
73
+ const protocol = this.allowInsecure ? 'ws' : 'wss';
74
+ if (!this.allowInsecure && this.serverPort === 443) {
75
+ return `${protocol}://${this.serverHost}`;
76
+ }
77
+ if (this.allowInsecure && this.serverPort === 80) {
78
+ return `${protocol}://${this.serverHost}`;
79
+ }
80
+ return `${protocol}://${this.serverHost}:${this.serverPort}`;
81
+ }
82
+ async connectedCallback() {
83
+ await init();
84
+ this.open_comms();
85
+ this.runtimeReady = true;
86
+ if (!this.nodeId) {
87
+ console.warn('Prop node_id is not set. Cannot connect to RDP.');
88
+ return;
89
+ }
90
+ this.try_connect();
91
+ }
92
+ componentDidLoad() {
93
+ this.domReady = true;
94
+ this.try_connect();
95
+ }
96
+ async disconnectedCallback() {
97
+ this.connected = false;
98
+ this.domReady = false;
99
+ this.runtimeReady = false;
100
+ this.close_comms();
101
+ }
102
+ try_connect() {
103
+ if (this.connected || !this.domReady || !this.runtimeReady) {
104
+ return;
105
+ }
106
+ if (!this.containerEl || !this.channel) {
107
+ return;
108
+ }
109
+ this.connect();
110
+ }
111
+ connect() {
112
+ this.connected = true;
113
+ this.channel.connect();
114
+ }
115
+ open_comms() {
116
+ if (this.serverId) {
117
+ this.channel = new PhirepassChannel(`${this.create_web_socket_endpoint()}/api/web/ws`, this.nodeId, this.serverId);
118
+ }
119
+ else {
120
+ this.channel = new PhirepassChannel(`${this.create_web_socket_endpoint()}/api/web/ws`, this.nodeId);
121
+ }
122
+ this.channel.on_connection_open(() => {
123
+ this.connectionStateChanged.emit([ConnectionState.Connected]);
124
+ this.channel.authenticate(this.token, this.nodeId);
125
+ });
126
+ this.channel.on_connection_close(() => {
127
+ this.connectionStateChanged.emit([ConnectionState.Disconnected]);
128
+ this.teardown_client();
129
+ });
130
+ this.channel.on_connection_error((err) => {
131
+ this.connectionStateChanged.emit([ConnectionState.Error, err]);
132
+ });
133
+ this.channel.on_connection_message((_raw_) => {
134
+ // raw frames are handled by on_protocol_message below
135
+ });
136
+ this.channel.on_protocol_message((msg) => {
137
+ const { web } = msg.data;
138
+ switch (web.type) {
139
+ case ProtocolMessageType.Error:
140
+ this.handle_error(web);
141
+ break;
142
+ case ProtocolMessageType.AuthSuccess:
143
+ this.handle_auth_success(web);
144
+ break;
145
+ case ProtocolMessageType.RDPAuthorized:
146
+ this.handle_rdp_authorized(web);
147
+ break;
148
+ case ProtocolMessageType.TunnelClosed:
149
+ this.handle_tunnel_closed(web);
150
+ break;
151
+ default:
152
+ console.warn('Unknown protocol message type:', web);
153
+ }
154
+ });
155
+ }
156
+ close_comms() {
157
+ this.teardown_client();
158
+ if (this.channel) {
159
+ this.channel.stop_heartbeat();
160
+ this.channel.disconnect();
161
+ }
162
+ }
163
+ reset_session_state() {
164
+ this.session_id = undefined;
165
+ this.credentials = undefined;
166
+ this.credentialsPrompt = false;
167
+ this.usernameBuffer = '';
168
+ this.passwordBuffer = '';
169
+ this.statusMessage = undefined;
170
+ }
171
+ /**
172
+ * The channel stays open for the whole session even though no RDP byte ever
173
+ * travels over it: it is what keeps the tunnel registered server-side, and
174
+ * it is where `TunnelClosed` and `Error` arrive.
175
+ */
176
+ handle_auth_success(_auth_) {
177
+ this.channel.start_heartbeat(this.heartbeatInterval <= 15_000 ? 30_000 : this.heartbeatInterval);
178
+ if (this.username && this.password) {
179
+ this.credentials = { username: this.username, password: this.password };
180
+ this.request_tunnel();
181
+ return;
182
+ }
183
+ this.credentialsPrompt = true;
184
+ }
185
+ request_tunnel() {
186
+ if (!this.credentials) {
187
+ return;
188
+ }
189
+ this.statusMessage = undefined;
190
+ this.channel.open_rdp_tunnel(this.nodeId, this.serviceId, this.credentials.username, this.credentials.password);
191
+ }
192
+ /**
193
+ * The tunnel is authorised but nothing has been dialled yet: the agent only
194
+ * reserves `sid`. Handing the ticket to the RDP client is what triggers the
195
+ * TCP + x224 + TLS hop, and the ticket expires 60s from now.
196
+ */
197
+ async handle_rdp_authorized(web) {
198
+ this.session_id = web.sid;
199
+ this.statusMessage = 'Connecting…';
200
+ // Loaded on demand: the RDP client carries a multi-megabyte wasm
201
+ // payload that consumers embedding only the terminal or the SFTP client
202
+ // should never download.
203
+ const [backend] = await Promise.all([
204
+ import('@devolutions/iron-remote-desktop-rdp'),
205
+ // Registers the `iron-remote-desktop` element as a side effect.
206
+ import('@devolutions/iron-remote-desktop'),
207
+ ]);
208
+ // The element may have gone away while the modules were loading.
209
+ if (!this.containerEl || this.session_id !== web.sid) {
210
+ return;
211
+ }
212
+ await backend.init('info');
213
+ if (!this.containerEl || this.session_id !== web.sid) {
214
+ return;
215
+ }
216
+ // Built imperatively rather than in `render()` so `module` is set
217
+ // before the element upgrades — it reads its backend on connect.
218
+ const element = document.createElement('iron-remote-desktop');
219
+ element.module = backend.Backend;
220
+ element.scale = this.scale;
221
+ element.flexcenter = true;
222
+ element.verbose = false;
223
+ element.addEventListener('ready', (event) => {
224
+ const detail = event.detail;
225
+ void this.start_session(detail.irgUserInteraction, web.ticket, backend.enableCredssp(true));
226
+ });
227
+ this.ironEl = element;
228
+ this.containerEl.appendChild(element);
229
+ }
230
+ async start_session(userInteraction, ticket, credssp) {
231
+ this.userInteraction = userInteraction;
232
+ const config = userInteraction
233
+ .configBuilder()
234
+ .withUsername(this.credentials?.username ?? '')
235
+ .withPassword(this.credentials?.password ?? '')
236
+ .withDestination(this.destination ?? this.nodeId)
237
+ .withProxyAddress(`${this.create_web_socket_endpoint()}/api/web/rdp/${this.nodeId}`)
238
+ .withAuthToken(ticket)
239
+ .withExtension(credssp)
240
+ .build();
241
+ try {
242
+ const session = await userInteraction.connect(config);
243
+ userInteraction.setVisibility(true);
244
+ this.statusMessage = undefined;
245
+ const termination = await session.run();
246
+ this.statusMessage = termination.reason();
247
+ }
248
+ catch (err) {
249
+ const message = this.describe_error(err);
250
+ this.statusMessage = message;
251
+ this.connectionStateChanged.emit([ConnectionState.Error, err]);
252
+ }
253
+ }
254
+ /** IronRDP rejects with its own error shape rather than an `Error`. */
255
+ describe_error(err) {
256
+ const iron = err;
257
+ if (iron && typeof iron.backtrace === 'function') {
258
+ return iron.backtrace();
259
+ }
260
+ return err instanceof Error ? err.message : 'Connection failed.';
261
+ }
262
+ handle_tunnel_closed(_web_) {
263
+ this.session_id = undefined;
264
+ this.statusMessage = this.statusMessage ?? 'Connection closed.';
265
+ this.teardown_client();
266
+ this.close_comms();
267
+ }
268
+ handle_error(error) {
269
+ this.statusMessage = error.message;
270
+ this.connectionStateChanged.emit([ConnectionState.Error, error]);
271
+ }
272
+ teardown_client() {
273
+ if (this.userInteraction) {
274
+ try {
275
+ this.userInteraction.shutdown();
276
+ }
277
+ catch (err) {
278
+ console.warn('Failed to shut the RDP session down cleanly:', err);
279
+ }
280
+ this.userInteraction = undefined;
281
+ }
282
+ this.ironEl?.remove();
283
+ this.ironEl = undefined;
284
+ this.credentialsPrompt = false;
285
+ this.usernameBuffer = '';
286
+ this.passwordBuffer = '';
287
+ }
288
+ submit_credentials(event) {
289
+ event.preventDefault();
290
+ this.credentialsPrompt = false;
291
+ this.credentials = { username: this.usernameBuffer, password: this.passwordBuffer };
292
+ this.usernameBuffer = '';
293
+ this.passwordBuffer = '';
294
+ this.request_tunnel();
295
+ }
296
+ render() {
297
+ return (h(Host, { key: '97b198af30e4e4b7ae8cbd0d497dc4f4812615f8' }, h("div", { key: 'f7d01492909a0f3cb6c639345eb70a8e1fbf1b90', class: "screen", ref: (el) => (this.containerEl = el) }), this.credentialsPrompt && (h("form", { key: '1dcfeaa956999dc882943e0d0b49ead8d12840bc', class: "prompt", onSubmit: (event) => this.submit_credentials(event) }, h("label", { key: 'a62e96bfb6b947167f731020c7ab00a1d9a82652', htmlFor: "rdp-username" }, "Windows username"), h("input", { key: '3135d24b62b2b612a11d3cbfd2c19f3cf381e74b', id: "rdp-username", type: "text", autocomplete: "username", autofocus: true, onInput: (event) => (this.usernameBuffer = event.target.value) }), h("label", { key: 'd8b901e0fe81de30e6426f80179d5e8da542effc', htmlFor: "rdp-password" }, "Password"), h("input", { key: '0bfad07c7f5355a8693856b1e6b51df59944a339', id: "rdp-password", type: "password", autocomplete: "current-password", onInput: (event) => (this.passwordBuffer = event.target.value) }), h("button", { key: 'e1cbab525870c34fe85299a8ce883d7069cb4bb8', type: "submit" }, "Connect"))), this.statusMessage && !this.credentialsPrompt && (h("div", { key: '4144cff9e5d6fb637655203bf67a13adaa7feede', class: "status" }, this.statusMessage))));
298
+ }
299
+ static get is() { return "phirepass-rdp"; }
300
+ static get encapsulation() { return "shadow"; }
301
+ static get originalStyleUrls() {
302
+ return {
303
+ "$": ["phirepass-rdp.css"]
304
+ };
305
+ }
306
+ static get styleUrls() {
307
+ return {
308
+ "$": ["phirepass-rdp.css"]
309
+ };
310
+ }
311
+ static get properties() {
312
+ return {
313
+ "serverHost": {
314
+ "type": "string",
315
+ "mutable": false,
316
+ "complexType": {
317
+ "original": "string",
318
+ "resolved": "string",
319
+ "references": {}
320
+ },
321
+ "required": false,
322
+ "optional": false,
323
+ "docs": {
324
+ "tags": [],
325
+ "text": ""
326
+ },
327
+ "getter": false,
328
+ "setter": false,
329
+ "reflect": false,
330
+ "attribute": "server-host",
331
+ "defaultValue": "\"phirepass.com\""
332
+ },
333
+ "serverPort": {
334
+ "type": "number",
335
+ "mutable": false,
336
+ "complexType": {
337
+ "original": "number",
338
+ "resolved": "number",
339
+ "references": {}
340
+ },
341
+ "required": false,
342
+ "optional": false,
343
+ "docs": {
344
+ "tags": [],
345
+ "text": ""
346
+ },
347
+ "getter": false,
348
+ "setter": false,
349
+ "reflect": false,
350
+ "attribute": "server-port",
351
+ "defaultValue": "443"
352
+ },
353
+ "allowInsecure": {
354
+ "type": "boolean",
355
+ "mutable": false,
356
+ "complexType": {
357
+ "original": "boolean",
358
+ "resolved": "boolean",
359
+ "references": {}
360
+ },
361
+ "required": false,
362
+ "optional": false,
363
+ "docs": {
364
+ "tags": [],
365
+ "text": ""
366
+ },
367
+ "getter": false,
368
+ "setter": false,
369
+ "reflect": false,
370
+ "attribute": "allow-insecure",
371
+ "defaultValue": "false"
372
+ },
373
+ "heartbeatInterval": {
374
+ "type": "number",
375
+ "mutable": false,
376
+ "complexType": {
377
+ "original": "number",
378
+ "resolved": "number",
379
+ "references": {}
380
+ },
381
+ "required": false,
382
+ "optional": false,
383
+ "docs": {
384
+ "tags": [],
385
+ "text": ""
386
+ },
387
+ "getter": false,
388
+ "setter": false,
389
+ "reflect": false,
390
+ "attribute": "heartbeat-interval",
391
+ "defaultValue": "30_000"
392
+ },
393
+ "nodeId": {
394
+ "type": "string",
395
+ "mutable": false,
396
+ "complexType": {
397
+ "original": "string",
398
+ "resolved": "string",
399
+ "references": {}
400
+ },
401
+ "required": true,
402
+ "optional": false,
403
+ "docs": {
404
+ "tags": [],
405
+ "text": ""
406
+ },
407
+ "getter": false,
408
+ "setter": false,
409
+ "reflect": false,
410
+ "attribute": "node-id"
411
+ },
412
+ "serviceId": {
413
+ "type": "string",
414
+ "mutable": false,
415
+ "complexType": {
416
+ "original": "string",
417
+ "resolved": "string",
418
+ "references": {}
419
+ },
420
+ "required": true,
421
+ "optional": false,
422
+ "docs": {
423
+ "tags": [],
424
+ "text": ""
425
+ },
426
+ "getter": false,
427
+ "setter": false,
428
+ "reflect": false,
429
+ "attribute": "service-id"
430
+ },
431
+ "token": {
432
+ "type": "string",
433
+ "mutable": false,
434
+ "complexType": {
435
+ "original": "string",
436
+ "resolved": "string",
437
+ "references": {}
438
+ },
439
+ "required": true,
440
+ "optional": false,
441
+ "docs": {
442
+ "tags": [],
443
+ "text": ""
444
+ },
445
+ "getter": false,
446
+ "setter": false,
447
+ "reflect": false,
448
+ "attribute": "token"
449
+ },
450
+ "username": {
451
+ "type": "string",
452
+ "mutable": false,
453
+ "complexType": {
454
+ "original": "string",
455
+ "resolved": "string",
456
+ "references": {}
457
+ },
458
+ "required": false,
459
+ "optional": true,
460
+ "docs": {
461
+ "tags": [],
462
+ "text": "Credentials for the remote host. When either is missing the widget\nprompts for both.\n\nThey serve two purposes at once: the agent checks them before it\nauthorises the tunnel, and the browser uses them for CredSSP. The agent\nnever logs in with them \u2014 it discards them once the tunnel is authorised."
463
+ },
464
+ "getter": false,
465
+ "setter": false,
466
+ "reflect": false,
467
+ "attribute": "username"
468
+ },
469
+ "password": {
470
+ "type": "string",
471
+ "mutable": false,
472
+ "complexType": {
473
+ "original": "string",
474
+ "resolved": "string",
475
+ "references": {}
476
+ },
477
+ "required": false,
478
+ "optional": true,
479
+ "docs": {
480
+ "tags": [],
481
+ "text": ""
482
+ },
483
+ "getter": false,
484
+ "setter": false,
485
+ "reflect": false,
486
+ "attribute": "password"
487
+ },
488
+ "destination": {
489
+ "type": "string",
490
+ "mutable": false,
491
+ "complexType": {
492
+ "original": "string",
493
+ "resolved": "string",
494
+ "references": {}
495
+ },
496
+ "required": false,
497
+ "optional": true,
498
+ "docs": {
499
+ "tags": [],
500
+ "text": "What to name the host in the CredSSP service principal (`TERMSRV/...`).\n\nThe agent dials whatever the node's service settings say, so this is\nnever used for routing. It matters only because some hosts check the SPN,\nand the browser has no other way to learn the host's real address."
501
+ },
502
+ "getter": false,
503
+ "setter": false,
504
+ "reflect": false,
505
+ "attribute": "destination"
506
+ },
507
+ "scale": {
508
+ "type": "string",
509
+ "mutable": false,
510
+ "complexType": {
511
+ "original": "'fit' | 'full' | 'real'",
512
+ "resolved": "\"fit\" | \"full\" | \"real\"",
513
+ "references": {}
514
+ },
515
+ "required": false,
516
+ "optional": false,
517
+ "docs": {
518
+ "tags": [],
519
+ "text": "`fit` scales the desktop to the widget, `real` keeps 1:1 pixels."
520
+ },
521
+ "getter": false,
522
+ "setter": false,
523
+ "reflect": false,
524
+ "attribute": "scale",
525
+ "defaultValue": "'fit'"
526
+ },
527
+ "serverId": {
528
+ "type": "string",
529
+ "mutable": false,
530
+ "complexType": {
531
+ "original": "string",
532
+ "resolved": "string",
533
+ "references": {}
534
+ },
535
+ "required": false,
536
+ "optional": true,
537
+ "docs": {
538
+ "tags": [],
539
+ "text": ""
540
+ },
541
+ "getter": false,
542
+ "setter": false,
543
+ "reflect": false,
544
+ "attribute": "server-id"
545
+ }
546
+ };
547
+ }
548
+ static get states() {
549
+ return {
550
+ "credentialsPrompt": {},
551
+ "statusMessage": {}
552
+ };
553
+ }
554
+ static get events() {
555
+ return [{
556
+ "method": "connectionStateChanged",
557
+ "name": "connectionStateChanged",
558
+ "bubbles": true,
559
+ "cancelable": true,
560
+ "composed": true,
561
+ "docs": {
562
+ "tags": [],
563
+ "text": ""
564
+ },
565
+ "complexType": {
566
+ "original": "[ConnectionState, unknown?]",
567
+ "resolved": "[ConnectionState, unknown?]",
568
+ "references": {
569
+ "ConnectionState": {
570
+ "location": "import",
571
+ "path": "../../common/protocol",
572
+ "id": "src/common/protocol.ts::ConnectionState",
573
+ "referenceLocation": "ConnectionState"
574
+ }
575
+ }
576
+ }
577
+ }];
578
+ }
579
+ static get elementRef() { return "el"; }
580
+ static get watchers() {
581
+ return [{
582
+ "propName": "nodeId",
583
+ "methodName": "onNodeIdChange"
584
+ }, {
585
+ "propName": "serverId",
586
+ "methodName": "onServerIdChange"
587
+ }];
588
+ }
589
+ }