phirepass-widgets 0.0.40 → 0.0.42

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 (38) hide show
  1. package/dist/cjs/{index-Rxdu9QG2.js → index-DTAHGGCM.js} +111 -44
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/phirepass-sftp-client.cjs.entry.js +225 -3
  4. package/dist/cjs/phirepass-terminal.cjs.entry.js +30 -815
  5. package/dist/cjs/phirepass-widgets.cjs.js +3 -3
  6. package/dist/cjs/protocol-C4R_gGQV.js +801 -0
  7. package/dist/collection/collection-manifest.json +1 -1
  8. package/dist/collection/common/protocol.js +20 -0
  9. package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.css +142 -1
  10. package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.js +509 -1
  11. package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.logo.svg +6 -0
  12. package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.max.svg +8 -0
  13. package/dist/collection/components/phirepass-terminal/phirepass-terminal.js +12 -21
  14. package/dist/collection/phirepass-channel_bg.wasm +0 -0
  15. package/dist/components/index.js +1 -1
  16. package/dist/components/p-DgZMmpg7.js +1 -0
  17. package/dist/components/phirepass-sftp-client.js +1 -1
  18. package/dist/components/phirepass-terminal.js +5 -5
  19. package/dist/esm/{index-C8ZFkLEv.js → index-D6RLmr6w.js} +111 -44
  20. package/dist/esm/loader.js +3 -3
  21. package/dist/esm/phirepass-sftp-client.entry.js +225 -3
  22. package/dist/esm/phirepass-terminal.entry.js +9 -793
  23. package/dist/esm/phirepass-widgets.js +4 -4
  24. package/dist/esm/protocol-DgZMmpg7.js +796 -0
  25. package/dist/phirepass-widgets/p-79a71767.entry.js +1 -0
  26. package/dist/phirepass-widgets/p-D6RLmr6w.js +2 -0
  27. package/dist/phirepass-widgets/p-DgZMmpg7.js +1 -0
  28. package/dist/phirepass-widgets/p-bb70a3bd.entry.js +49 -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 -0
  32. package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.d.ts +42 -0
  33. package/dist/types/components/phirepass-terminal/phirepass-terminal.d.ts +1 -6
  34. package/dist/types/components.d.ts +97 -1
  35. package/package.json +5 -5
  36. package/dist/phirepass-widgets/p-376ef3af.entry.js +0 -1
  37. package/dist/phirepass-widgets/p-C8ZFkLEv.js +0 -2
  38. package/dist/phirepass-widgets/p-fa55ec4a.entry.js +0 -49
@@ -6,7 +6,7 @@
6
6
  "mixins": [],
7
7
  "compiler": {
8
8
  "name": "@stencil/core",
9
- "version": "4.43.3",
9
+ "version": "4.43.4",
10
10
  "typescriptVersion": "5.8.3"
11
11
  },
12
12
  "collections": [],
@@ -1,2 +1,22 @@
1
1
  import { ErrorType } from "phirepass-channel";
2
+ export var ProtocolMessageType;
3
+ (function (ProtocolMessageType) {
4
+ ProtocolMessageType["Error"] = "Error";
5
+ ProtocolMessageType["AuthSuccess"] = "AuthSuccess";
6
+ ProtocolMessageType["TunnelOpened"] = "TunnelOpened";
7
+ ProtocolMessageType["TunnelClosed"] = "TunnelClosed";
8
+ ProtocolMessageType["TunnelData"] = "TunnelData";
9
+ })(ProtocolMessageType || (ProtocolMessageType = {}));
10
+ export var InputMode;
11
+ (function (InputMode) {
12
+ InputMode[InputMode["Username"] = 0] = "Username";
13
+ InputMode[InputMode["Password"] = 1] = "Password";
14
+ InputMode[InputMode["Default"] = 2] = "Default";
15
+ })(InputMode || (InputMode = {}));
16
+ export var ConnectionState;
17
+ (function (ConnectionState) {
18
+ ConnectionState["Disconnected"] = "disconnected";
19
+ ConnectionState["Connected"] = "connected";
20
+ ConnectionState["Error"] = "error";
21
+ })(ConnectionState || (ConnectionState = {}));
2
22
  export { ErrorType as ProtocolMessageError };
@@ -1,3 +1,144 @@
1
1
  :host {
2
- display: block;
2
+ --radius: 0.375rem;
3
+ --card: 220 18% 10%;
4
+ --border: 220 15% 18%;
5
+ --primary: 160 60% 45%;
6
+ --muted-foreground: 220 10% 50%;
7
+
8
+ font-family:
9
+ ui-monospace,
10
+ SFMono-Regular,
11
+ Menlo,
12
+ Monaco,
13
+ Consolas,
14
+ Liberation Mono,
15
+ Courier New,
16
+ monospace;
17
+
18
+ height: 100%;
19
+ width: 100%;
20
+
21
+ border: 1px solid hsl(var(--border));
22
+ background-color: hsl(var(--card));
23
+ border-radius: var(--radius);
24
+ overflow: hidden;
25
+ display: flex;
26
+ flex-direction: column;
27
+ position: relative;
28
+
29
+ .listing {
30
+ flex: 1;
31
+ display: flex;
32
+ flex-direction: column;
33
+ justify-content: space-between;
34
+
35
+ header {
36
+ height: 30px;
37
+ background: rgba(28, 31, 38, 0.6);
38
+ border-bottom: 1px solid hsl(var(--border));
39
+
40
+ display: flex;
41
+ align-items: center;
42
+ justify-content: space-between;
43
+
44
+ .actions {
45
+ display: flex;
46
+ align-items: center;
47
+
48
+ .action {
49
+ cursor: pointer;
50
+ padding: 4px;
51
+ display: flex;
52
+ align-items: center;
53
+ z-index: 1;
54
+
55
+ img {
56
+ height: 14px;
57
+ padding: 4px;
58
+ border-radius: 4px;
59
+ }
60
+
61
+ &:hover {
62
+ background-color: hsl(var(--border) / 0.6);
63
+ }
64
+ }
65
+ }
66
+
67
+ .title {
68
+ color: hsl(var(--primary));
69
+ height: 14px;
70
+ padding: 0 12px;
71
+ display: flex;
72
+ align-items: center;
73
+ font-size: 0.75rem;
74
+ line-height: 1rem;
75
+
76
+ img {
77
+ height: 14px;
78
+ margin-right: 5px;
79
+ }
80
+
81
+ .text {
82
+ display: flex;
83
+ flex-direction: row;
84
+ justify-content: center;
85
+ margin-top: 2px;
86
+
87
+ .name {
88
+ margin-right: 10px;
89
+ }
90
+
91
+ .description {
92
+ color: hsl(var(--muted-foreground));
93
+ }
94
+ }
95
+ }
96
+ }
97
+
98
+ footer {
99
+ height: 25px;
100
+ background: rgba(28, 31, 38, 0.6);
101
+ border-top: 1px solid hsl(var(--border));
102
+ }
103
+ }
104
+
105
+ .creds {
106
+ position: absolute;
107
+ top: 0;
108
+ left: 0;
109
+ height: 100%;
110
+ width: 100%;
111
+ display: flex;
112
+ justify-content: center;
113
+ align-items: center;
114
+
115
+ &.blurred {
116
+ background: rgba(28, 31, 38, 0);
117
+ backdrop-filter: blur(4px);
118
+ }
119
+
120
+ .form {
121
+ display: flex;
122
+ flex-direction: column;
123
+ background: hsl(var(--card));
124
+ width: 200px;
125
+ position: relative;
126
+ background-color: rgba(21, 24, 30, 0.95);
127
+ border: 1px solid hsl(var(--border));
128
+ padding: 20px;
129
+ box-shadow:
130
+ rgba(0, 0, 0, 0) 0px 0px 0px 0px,
131
+ rgba(0, 0, 0, 0) 0px 0px 0px 0px,
132
+ rgba(0, 0, 0, 0.5) 0px 25px 50px -12px;
133
+ }
134
+ }
135
+ }
136
+
137
+ :host(.max) {
138
+ height: 100vh;
139
+ width: 100vw;
140
+ position: fixed;
141
+ top: 0;
142
+ left: 0;
143
+ z-index: 9999;
3
144
  }
@@ -1,7 +1,219 @@
1
1
  import { Host, h } from "@stencil/core";
2
+ import init, { Channel as PhirepassChannel } from "phirepass-channel";
3
+ import svg from "./phirepass-sftp-client.logo.svg";
4
+ import max from "./phirepass-sftp-client.max.svg";
5
+ import { ConnectionState, ProtocolMessageType } from "../../common/protocol";
6
+ // https://sweet-sftp-view.lovable.app/
2
7
  export class PhirepassSftpClient {
8
+ channel;
9
+ domReady = false;
10
+ runtimeReady = false;
11
+ connected = false;
12
+ // private inputMode: InputMode = InputMode.Default;
13
+ // private session_id?: number;
14
+ // private usernameBuffer = "";
15
+ // private passwordBuffer = "";
16
+ name = 'SFTP';
17
+ description = 'Client';
18
+ hideHeader = false;
19
+ serverHost = "phirepass.com";
20
+ serverPort = 443;
21
+ allowInsecure = false;
22
+ heartbeatInterval = 30_000;
23
+ nodeId;
24
+ token;
25
+ onNodeIdChange(newValue, _oldValue) {
26
+ // Handle the change in node_id here
27
+ // console.log(`node_id changed from ${oldValue} to ${newValue}`);
28
+ // Always clear local session state and reset terminal view
29
+ this.reset_session_state();
30
+ // this.terminal.reset();
31
+ // Close existing comms if connected
32
+ if (this.channel && this.channel.is_connected()) {
33
+ this.close_comms();
34
+ }
35
+ // Open new comms for the updated node
36
+ if (newValue) {
37
+ this.open_comms();
38
+ this.channel.connect();
39
+ }
40
+ }
41
+ serverId;
42
+ onServerIdChange(_newValue, _oldValue) {
43
+ this.onNodeIdChange(this.nodeId, this.nodeId);
44
+ }
45
+ maximizeEvent;
46
+ async maximize() {
47
+ this.max = !this.max;
48
+ }
49
+ async minimize() {
50
+ this.max = false;
51
+ }
52
+ connectionStateChanged;
53
+ max = false;
54
+ show_login_screen = false;
55
+ show_login_screen_username = false;
56
+ show_login_screen_password = false;
57
+ toggle_max() {
58
+ this.maximizeEvent?.emit(!this.max);
59
+ }
60
+ async connectedCallback() {
61
+ await init();
62
+ // this.setup_terminal();
63
+ this.open_comms();
64
+ this.runtimeReady = true;
65
+ if (!this.nodeId) {
66
+ console.warn('Prop node_id is not set. Cannot connect to terminal.');
67
+ return;
68
+ }
69
+ this.try_connect();
70
+ }
71
+ componentDidLoad() {
72
+ this.domReady = true;
73
+ this.try_connect();
74
+ }
75
+ async disconnectedCallback() {
76
+ // if (this.resizeDebounceHandle) {
77
+ // clearTimeout(this.resizeDebounceHandle);
78
+ // this.resizeDebounceHandle = undefined;
79
+ // }
80
+ //
81
+ // if (this.resizeObserver) {
82
+ // this.resizeObserver.disconnect();
83
+ // }
84
+ this.connected = false;
85
+ this.domReady = false;
86
+ this.runtimeReady = false;
87
+ this.close_comms();
88
+ // this.destroy_terminal();
89
+ }
90
+ connect() {
91
+ this.connected = true;
92
+ this.channel.connect();
93
+ // const container = this.containerEl;
94
+ // console.log('Attempting to connect terminal to container:', container);
95
+ // if (container) {
96
+ // this.terminal.open(container);
97
+ // console.log('Terminal opened in container');
98
+ // this.connected = true;
99
+ // this.fit_terminal_safely();
100
+ // this.terminal.focus();
101
+ // this.terminal.onData(this.handle_terminal_data.bind(this));
102
+ // this.channel.connect();
103
+ // this.setup_resize_observer();
104
+ // console.log('Terminal connected and ready');
105
+ // }
106
+ }
107
+ try_connect() {
108
+ if (this.connected || !this.domReady || !this.runtimeReady) {
109
+ return;
110
+ }
111
+ if (!this.channel) {
112
+ return;
113
+ }
114
+ this.connect();
115
+ }
116
+ create_web_socket_endpoint() {
117
+ const protocol = this.allowInsecure ? 'ws' : 'wss';
118
+ if (!this.allowInsecure && this.serverPort === 443) {
119
+ return `${protocol}://${this.serverHost}`;
120
+ }
121
+ if (this.allowInsecure && this.serverPort === 80) {
122
+ return `${protocol}://${this.serverHost}`;
123
+ }
124
+ return `${protocol}://${this.serverHost}:${this.serverPort}`;
125
+ }
126
+ handle_error(_error_) {
127
+ //
128
+ }
129
+ handle_auth_success(_auth_) {
130
+ this.clear_creds_buffer();
131
+ this.channel.start_heartbeat(this.heartbeatInterval <= 15_000 ? 30_000 : this.heartbeatInterval);
132
+ this.channel.open_sftp_tunnel(this.nodeId);
133
+ }
134
+ handle_tunnel_opened(_web_) {
135
+ // this.session_id = web.sid;
136
+ // this.terminal.reset();
137
+ // this.fit_terminal_safely();
138
+ // this.send_ssh_terminal_resize();
139
+ }
140
+ handle_tunnel_data(_web_) {
141
+ // TODO
142
+ }
143
+ handle_tunnel_closed(_web_) {
144
+ // this.session_id = undefined;
145
+ // this.inputMode = InputMode.Default;
146
+ this.clear_creds_buffer();
147
+ // this.terminal.reset();
148
+ // this.terminal.writeln("Connection closed.");
149
+ this.close_comms();
150
+ }
151
+ open_comms() {
152
+ if (this.serverId) {
153
+ this.channel = new PhirepassChannel(`${this.create_web_socket_endpoint()}/api/web/ws`, this.nodeId, this.serverId);
154
+ }
155
+ else {
156
+ this.channel = new PhirepassChannel(`${this.create_web_socket_endpoint()}/api/web/ws`, this.nodeId);
157
+ }
158
+ this.channel.on_connection_open(() => {
159
+ this.connectionStateChanged.emit([ConnectionState.Connected]);
160
+ this.channel.authenticate(this.token, this.nodeId);
161
+ });
162
+ this.channel.on_connection_close(() => {
163
+ this.connectionStateChanged.emit([ConnectionState.Disconnected]);
164
+ // this.terminal.reset();
165
+ });
166
+ this.channel.on_connection_error((err) => {
167
+ this.connectionStateChanged.emit([ConnectionState.Error, err]);
168
+ });
169
+ this.channel.on_connection_message((_raw_) => {
170
+ // console.log('>> raw message received', raw);
171
+ });
172
+ this.channel.on_protocol_message((msg) => {
173
+ const { web } = msg.data;
174
+ switch (web.type) {
175
+ case ProtocolMessageType.Error:
176
+ this.handle_error(web);
177
+ break;
178
+ case ProtocolMessageType.AuthSuccess:
179
+ this.handle_auth_success(web);
180
+ break;
181
+ case ProtocolMessageType.TunnelOpened:
182
+ this.handle_tunnel_opened(web);
183
+ break;
184
+ case ProtocolMessageType.TunnelClosed:
185
+ this.handle_tunnel_closed(web);
186
+ break;
187
+ case ProtocolMessageType.TunnelData:
188
+ this.handle_tunnel_data(web);
189
+ break;
190
+ default:
191
+ console.warn('Unknown protocol message type:', web);
192
+ }
193
+ });
194
+ }
195
+ close_comms() {
196
+ this.channel.stop_heartbeat();
197
+ this.channel.disconnect();
198
+ }
199
+ clear_creds_buffer() {
200
+ // this.usernameBuffer = "";
201
+ // this.passwordBuffer = "";
202
+ }
203
+ reset_session_state() {
204
+ // this.session_id = undefined;
205
+ // this.inputMode = InputMode.Default;
206
+ this.clear_creds_buffer();
207
+ }
3
208
  render() {
4
- return (h(Host, { key: 'd03ff09e3636f79d699c7462e121abe7d08c6683' }, h("slot", { key: 'bd7285e70384558e4cbf0600b89a57fa4ec3406d' })));
209
+ return (h(Host, { key: 'ac63e2c701cd09a605d0aaa7396eaec16ff9c3bc', class: {
210
+ 'default': !this.max,
211
+ 'max': this.max,
212
+ } }, h("section", { key: '253dfc510c62ee57a96d574af993e8017475a0c2', class: "listing" }, !this.hideHeader &&
213
+ h("header", { key: '215ddf76ba55641892fc9a758077ba8d1f3a6671' }, h("section", { key: '49541a8d31d8c61e2df84c60348f7426fddec67c', class: "title" }, h("img", { key: '1a86ba6b3de92b35cbd5b1bacfdfee2da6fa6766', src: svg, alt: "SFTP Client" }), h("div", { key: '38d90384978acc8b323ca4c396db7bda54320059', class: "text" }, h("div", { key: 'a94b3fd21025000b620b2bb85aec87198e575bfa', class: "name" }, this.name), h("div", { key: '072c41dc8d05faf77929f8c128bb97b64d8835bf', class: "description" }, this.description))), h("section", { key: '46e575f4ce5f2da0913d2f3aebe025540f1f3688', class: "actions" }, h("div", { key: 'f92d66ab7ab5e9c25a29037c60709c54623194be', class: "action", onClick: () => this.toggle_max() }, h("img", { key: 'e115204a83336fc4b49a30551208b727c3f33be9', src: max, alt: "Maximize" })))), h("main", { key: 'c6bf5ab4e5aa46dcba8e50ec1a9c2feb1f55ea02' }), h("footer", { key: 'ac67a3e0966e3f04bee019162f8174aae58cbf1a' })), h("section", { key: '07e83117470f7f226328703b18f836bd4358cfe9', class: {
214
+ 'creds': true,
215
+ 'blurred': this.show_login_screen,
216
+ } }, this.show_login_screen && h("form", { key: '808209eaba50f10a8ef96163972ad36ea9e3d3e2', class: "form" }, h("div", { key: '9e26efeac2f17d6b4168e1a77da6ef61d325f6e3' }, "SFTP Connection"), h("div", { key: 'f9badb92d4434a16916429a2bedb6e38d2ae647c' }, h("div", { key: '9fb267ba7828cd950b327a17e0ee803dc399c80b' }, "Username"), h("input", { key: '65b34c14292b0bde408861e791f3baa99c4c9a02', type: "text", placeholder: "" })), h("div", { key: 'f1f9def8290dfcde9beff0f61092f6020580b72c' }, h("div", { key: '1c89b71c4126299b7e8e421b05761d2b0424d4ed' }, "Password"), h("input", { key: '17364976158ddaacbb55ed17ee09ec242bcbdce7', type: "password", placeholder: "" })), h("div", { key: '9362acdf153ceeba3c8e8cee0518cf2baeec27e0' }, h("button", { key: 'ebf6c205276a7c3ff34c13e148978be61044ff7a' }, "Connect"))))));
5
217
  }
6
218
  static get is() { return "phirepass-sftp-client"; }
7
219
  static get encapsulation() { return "shadow"; }
@@ -15,4 +227,300 @@ export class PhirepassSftpClient {
15
227
  "$": ["phirepass-sftp-client.css"]
16
228
  };
17
229
  }
230
+ static get properties() {
231
+ return {
232
+ "name": {
233
+ "type": "string",
234
+ "mutable": false,
235
+ "complexType": {
236
+ "original": "string",
237
+ "resolved": "string",
238
+ "references": {}
239
+ },
240
+ "required": false,
241
+ "optional": false,
242
+ "docs": {
243
+ "tags": [],
244
+ "text": ""
245
+ },
246
+ "getter": false,
247
+ "setter": false,
248
+ "reflect": false,
249
+ "attribute": "name",
250
+ "defaultValue": "'SFTP'"
251
+ },
252
+ "description": {
253
+ "type": "string",
254
+ "mutable": false,
255
+ "complexType": {
256
+ "original": "string",
257
+ "resolved": "string",
258
+ "references": {}
259
+ },
260
+ "required": false,
261
+ "optional": false,
262
+ "docs": {
263
+ "tags": [],
264
+ "text": ""
265
+ },
266
+ "getter": false,
267
+ "setter": false,
268
+ "reflect": false,
269
+ "attribute": "description",
270
+ "defaultValue": "'Client'"
271
+ },
272
+ "hideHeader": {
273
+ "type": "boolean",
274
+ "mutable": false,
275
+ "complexType": {
276
+ "original": "boolean",
277
+ "resolved": "boolean",
278
+ "references": {}
279
+ },
280
+ "required": false,
281
+ "optional": false,
282
+ "docs": {
283
+ "tags": [],
284
+ "text": ""
285
+ },
286
+ "getter": false,
287
+ "setter": false,
288
+ "reflect": false,
289
+ "attribute": "hide-header",
290
+ "defaultValue": "false"
291
+ },
292
+ "serverHost": {
293
+ "type": "string",
294
+ "mutable": false,
295
+ "complexType": {
296
+ "original": "string",
297
+ "resolved": "string",
298
+ "references": {}
299
+ },
300
+ "required": false,
301
+ "optional": false,
302
+ "docs": {
303
+ "tags": [],
304
+ "text": ""
305
+ },
306
+ "getter": false,
307
+ "setter": false,
308
+ "reflect": false,
309
+ "attribute": "server-host",
310
+ "defaultValue": "\"phirepass.com\""
311
+ },
312
+ "serverPort": {
313
+ "type": "number",
314
+ "mutable": false,
315
+ "complexType": {
316
+ "original": "number",
317
+ "resolved": "number",
318
+ "references": {}
319
+ },
320
+ "required": false,
321
+ "optional": false,
322
+ "docs": {
323
+ "tags": [],
324
+ "text": ""
325
+ },
326
+ "getter": false,
327
+ "setter": false,
328
+ "reflect": false,
329
+ "attribute": "server-port",
330
+ "defaultValue": "443"
331
+ },
332
+ "allowInsecure": {
333
+ "type": "boolean",
334
+ "mutable": false,
335
+ "complexType": {
336
+ "original": "boolean",
337
+ "resolved": "boolean",
338
+ "references": {}
339
+ },
340
+ "required": false,
341
+ "optional": false,
342
+ "docs": {
343
+ "tags": [],
344
+ "text": ""
345
+ },
346
+ "getter": false,
347
+ "setter": false,
348
+ "reflect": false,
349
+ "attribute": "allow-insecure",
350
+ "defaultValue": "false"
351
+ },
352
+ "heartbeatInterval": {
353
+ "type": "number",
354
+ "mutable": false,
355
+ "complexType": {
356
+ "original": "number",
357
+ "resolved": "number",
358
+ "references": {}
359
+ },
360
+ "required": false,
361
+ "optional": false,
362
+ "docs": {
363
+ "tags": [],
364
+ "text": ""
365
+ },
366
+ "getter": false,
367
+ "setter": false,
368
+ "reflect": false,
369
+ "attribute": "heartbeat-interval",
370
+ "defaultValue": "30_000"
371
+ },
372
+ "nodeId": {
373
+ "type": "string",
374
+ "mutable": false,
375
+ "complexType": {
376
+ "original": "string",
377
+ "resolved": "string",
378
+ "references": {}
379
+ },
380
+ "required": true,
381
+ "optional": false,
382
+ "docs": {
383
+ "tags": [],
384
+ "text": ""
385
+ },
386
+ "getter": false,
387
+ "setter": false,
388
+ "reflect": false,
389
+ "attribute": "node-id"
390
+ },
391
+ "token": {
392
+ "type": "string",
393
+ "mutable": false,
394
+ "complexType": {
395
+ "original": "string",
396
+ "resolved": "string",
397
+ "references": {}
398
+ },
399
+ "required": true,
400
+ "optional": false,
401
+ "docs": {
402
+ "tags": [],
403
+ "text": ""
404
+ },
405
+ "getter": false,
406
+ "setter": false,
407
+ "reflect": false,
408
+ "attribute": "token"
409
+ },
410
+ "serverId": {
411
+ "type": "string",
412
+ "mutable": false,
413
+ "complexType": {
414
+ "original": "string",
415
+ "resolved": "string",
416
+ "references": {}
417
+ },
418
+ "required": false,
419
+ "optional": true,
420
+ "docs": {
421
+ "tags": [],
422
+ "text": ""
423
+ },
424
+ "getter": false,
425
+ "setter": false,
426
+ "reflect": false,
427
+ "attribute": "server-id"
428
+ }
429
+ };
430
+ }
431
+ static get states() {
432
+ return {
433
+ "max": {},
434
+ "show_login_screen": {},
435
+ "show_login_screen_username": {},
436
+ "show_login_screen_password": {}
437
+ };
438
+ }
439
+ static get events() {
440
+ return [{
441
+ "method": "maximizeEvent",
442
+ "name": "maximize",
443
+ "bubbles": true,
444
+ "cancelable": true,
445
+ "composed": true,
446
+ "docs": {
447
+ "tags": [],
448
+ "text": ""
449
+ },
450
+ "complexType": {
451
+ "original": "any",
452
+ "resolved": "any",
453
+ "references": {}
454
+ }
455
+ }, {
456
+ "method": "connectionStateChanged",
457
+ "name": "connectionStateChanged",
458
+ "bubbles": true,
459
+ "cancelable": true,
460
+ "composed": true,
461
+ "docs": {
462
+ "tags": [],
463
+ "text": ""
464
+ },
465
+ "complexType": {
466
+ "original": "[ConnectionState, unknown?]",
467
+ "resolved": "[ConnectionState, unknown?]",
468
+ "references": {
469
+ "ConnectionState": {
470
+ "location": "import",
471
+ "path": "../../common/protocol",
472
+ "id": "src/common/protocol.ts::ConnectionState",
473
+ "referenceLocation": "ConnectionState"
474
+ }
475
+ }
476
+ }
477
+ }];
478
+ }
479
+ static get methods() {
480
+ return {
481
+ "maximize": {
482
+ "complexType": {
483
+ "signature": "() => Promise<void>",
484
+ "parameters": [],
485
+ "references": {
486
+ "Promise": {
487
+ "location": "global",
488
+ "id": "global::Promise"
489
+ }
490
+ },
491
+ "return": "Promise<void>"
492
+ },
493
+ "docs": {
494
+ "text": "",
495
+ "tags": []
496
+ }
497
+ },
498
+ "minimize": {
499
+ "complexType": {
500
+ "signature": "() => Promise<void>",
501
+ "parameters": [],
502
+ "references": {
503
+ "Promise": {
504
+ "location": "global",
505
+ "id": "global::Promise"
506
+ }
507
+ },
508
+ "return": "Promise<void>"
509
+ },
510
+ "docs": {
511
+ "text": "",
512
+ "tags": []
513
+ }
514
+ }
515
+ };
516
+ }
517
+ static get watchers() {
518
+ return [{
519
+ "propName": "nodeId",
520
+ "methodName": "onNodeIdChange"
521
+ }, {
522
+ "propName": "serverId",
523
+ "methodName": "onServerIdChange"
524
+ }];
525
+ }
18
526
  }