@cmusei/console-forge 0.20.6 → 0.21.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.
Files changed (54) hide show
  1. package/fesm2022/cmusei-console-forge.mjs +359 -346
  2. package/fesm2022/cmusei-console-forge.mjs.map +1 -1
  3. package/package.json +5 -5
  4. package/types/cmusei-console-forge.d.ts +343 -0
  5. package/index.d.ts +0 -5
  6. package/lib/components/console/console.component.d.ts +0 -59
  7. package/lib/components/console-status/console-status.component.d.ts +0 -12
  8. package/lib/components/console-tile/console-tile.component.d.ts +0 -20
  9. package/lib/components/console-toolbar/console-toolbar.component.d.ts +0 -53
  10. package/lib/components/console-toolbar-default/console-toolbar-default-button/console-toolbar-default-button.component.d.ts +0 -13
  11. package/lib/components/console-toolbar-default/console-toolbar-default.component.d.ts +0 -43
  12. package/lib/config/console-forge-config.d.ts +0 -28
  13. package/lib/config/provide-console-forge.d.ts +0 -4
  14. package/lib/directives/apply-toolbar-theme.directive.d.ts +0 -8
  15. package/lib/directives/class-on-hover.directive.d.ts +0 -10
  16. package/lib/injection/window.injection-token.d.ts +0 -2
  17. package/lib/models/console-client-type.d.ts +0 -1
  18. package/lib/models/console-component-config.d.ts +0 -30
  19. package/lib/models/console-component-network-config.d.ts +0 -5
  20. package/lib/models/console-connection-options.d.ts +0 -7
  21. package/lib/models/console-connection-status.d.ts +0 -1
  22. package/lib/models/console-credentials.d.ts +0 -4
  23. package/lib/models/console-network-connection-request.d.ts +0 -4
  24. package/lib/models/console-network-disconnection-request.d.ts +0 -7
  25. package/lib/models/console-power-request.d.ts +0 -1
  26. package/lib/models/console-supported-features.d.ts +0 -40
  27. package/lib/models/console-toolbar-component-base.d.ts +0 -5
  28. package/lib/models/console-toolbar-context.d.ts +0 -39
  29. package/lib/models/console-toolbar-position.d.ts +0 -1
  30. package/lib/models/console-toolbar-theme.d.ts +0 -1
  31. package/lib/models/console-user-settings.d.ts +0 -13
  32. package/lib/models/log-level.d.ts +0 -6
  33. package/lib/services/blob-downloader.service.d.ts +0 -7
  34. package/lib/services/browser-notifications/browser-notifications.service.d.ts +0 -10
  35. package/lib/services/browser-notifications/send-browser-notification.d.ts +0 -9
  36. package/lib/services/canvas-recorder/canvas-recorder.service.d.ts +0 -14
  37. package/lib/services/canvas-recorder/canvas-recording-settings.d.ts +0 -9
  38. package/lib/services/canvas-recorder/canvas-recording.d.ts +0 -12
  39. package/lib/services/canvas.service.d.ts +0 -9
  40. package/lib/services/clipboard/clipboard.helpers.d.ts +0 -8
  41. package/lib/services/clipboard/clipboard.service.d.ts +0 -21
  42. package/lib/services/console-clients/console-client-factory.service.d.ts +0 -9
  43. package/lib/services/console-clients/console-client.service.d.ts +0 -24
  44. package/lib/services/console-clients/vmware/vmware-console-client.service.d.ts +0 -41
  45. package/lib/services/console-clients/vnc-console-client/vnc-console-client.service.d.ts +0 -36
  46. package/lib/services/full-screen.service.d.ts +0 -13
  47. package/lib/services/logger.service.d.ts +0 -9
  48. package/lib/services/object.helpers.d.ts +0 -4
  49. package/lib/services/pico-css.service.d.ts +0 -8
  50. package/lib/services/user-settings.service.d.ts +0 -15
  51. package/lib/services/uuid.service.d.ts +0 -6
  52. package/lib/shims/vmware-mks.models.d.ts +0 -34
  53. package/lib/shims/vmware-wmks.shim.d.ts +0 -61
  54. package/public-api.d.ts +0 -20
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmusei/console-forge",
3
- "version": "0.20.6",
3
+ "version": "0.21.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/cmu-sei/console-forge.git"
@@ -9,8 +9,8 @@
9
9
  "access": "public"
10
10
  },
11
11
  "peerDependencies": {
12
- "@angular/common": "^19.2.0",
13
- "@angular/core": "^19.2.0",
12
+ "@angular/common": "^21.2.5",
13
+ "@angular/core": "^21.2.5",
14
14
  "@novnc/novnc": "^1.4.0"
15
15
  },
16
16
  "dependencies": {
@@ -19,13 +19,13 @@
19
19
  },
20
20
  "sideEffects": false,
21
21
  "module": "fesm2022/cmusei-console-forge.mjs",
22
- "typings": "index.d.ts",
22
+ "typings": "types/cmusei-console-forge.d.ts",
23
23
  "exports": {
24
24
  "./package.json": {
25
25
  "default": "./package.json"
26
26
  },
27
27
  ".": {
28
- "types": "./index.d.ts",
28
+ "types": "./types/cmusei-console-forge.d.ts",
29
29
  "default": "./fesm2022/cmusei-console-forge.mjs"
30
30
  }
31
31
  }
@@ -0,0 +1,343 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { Signal, InputSignal, OnDestroy, Type, ElementRef, EnvironmentProviders } from '@angular/core';
3
+ import * as _cmusei_console_forge from '@cmusei/console-forge';
4
+
5
+ type ConsoleToolbarPosition = "left" | "right" | "top" | "bottom";
6
+
7
+ type ConsoleToolbarTheme = "light" | "dark" | undefined;
8
+
9
+ interface ConsoleUserSettings {
10
+ console: {
11
+ allowCopyToLocalClipboard: boolean;
12
+ attemptRemoteSessionResize: boolean;
13
+ scaleToCanvasHostSize: boolean;
14
+ };
15
+ toolbar: {
16
+ dockTo: ConsoleToolbarPosition;
17
+ preferTheme: ConsoleToolbarTheme;
18
+ };
19
+ }
20
+
21
+ interface ConsoleCredentials {
22
+ accessTicket?: string;
23
+ password?: string;
24
+ }
25
+
26
+ type ConsoleClientType = "vmware" | "vnc";
27
+
28
+ interface ConsoleComponentConfig {
29
+ /**
30
+ * If true, the client will attempt to set control focus on the console session after connection. Defaults to false.
31
+ */
32
+ autoFocusOnConnect?: boolean;
33
+ /**
34
+ * Specifies the client that will be used to connect to the console (e.g. VNC, VMWare WMKS, etc.) Note that
35
+ * you can configure a default for all ConsoleForge consoles in your app or module by using the `provideConsoleForgeConfig`
36
+ * provider.
37
+ */
38
+ consoleClientType?: ConsoleClientType;
39
+ /**
40
+ * An optional identifier for this console. ConsoleForge doesn't use this value internally at all, but some of its events
41
+ * (e.g. reconnect requests) will return this configuration to you. You may want to set this identifier to something that allows
42
+ * you to uniquely identify the console so you can handle its events as desired.
43
+ */
44
+ consoleId?: string;
45
+ /**
46
+ * An optional username, password, or sessionId to use to authenticate to the console. Configuration here is specific
47
+ * to the protocol being used and the configuration of the target virtual console. See ConsoleForge's documentation
48
+ * for details.
49
+ */
50
+ credentials?: ConsoleCredentials;
51
+ /**
52
+ * The URL of the console's accessible web socket interface.
53
+ */
54
+ url: string;
55
+ }
56
+
57
+ interface ConsoleConnectionOptions {
58
+ autoFocusOnConnect?: boolean;
59
+ backgroundStyle?: string;
60
+ credentials?: ConsoleCredentials;
61
+ hostElement: HTMLElement;
62
+ }
63
+
64
+ type ConsoleConnectionStatus = "connected" | "connecting" | "disconnected";
65
+
66
+ type ConsolePowerRequest = "reboot" | "rebootHard" | "shutdown";
67
+
68
+ interface ConsoleSupportedFeatures {
69
+ /**
70
+ * This is basically a stupid kludge that is only here because VMWare's client has a very weird implementation of "copy".
71
+ *
72
+ * The VMWare "WMKS" client only emits clipboard events after the remote console's clipboard receives new data (i.e. you copy some content on the remote desktop)
73
+ * AND after the console canvas loses focus. That is, no matter how much copying you do, the client doesn't know about until the canvas housing the console
74
+ * is blurred.
75
+ *
76
+ * The downstream effect of this that, unlike with other protocols, we can't gracefully emit events when copies happen or automatically copy to your local
77
+ * clipboard in a reasonable way, because we can't know when the remote copy happened and if you really want it copied to your local CB or not. So when this
78
+ * flag is set to false (VMWare is the only service which does this), we show a panel in the default toolbar that you can manually copy content from and
79
+ * automatically receives the last "copy" event from the console.
80
+ *
81
+ * Yuck.
82
+ */
83
+ clipboardAutomaticLocalCopy: boolean;
84
+ /**
85
+ * Indicates whether the remote console protocol allows us to write content directly to the clipboard of the remote machine.
86
+ */
87
+ clipboardRemoteWrite: boolean;
88
+ /**
89
+ * Indicates whether there remote console offers an on-screen keyboard. (Hint: probably not. As far as we know, VMWare's WMKS is the only one that will do this.)
90
+ */
91
+ onScreenKeyboard: boolean;
92
+ /**
93
+ * Indicates whether the remote console protocol allows us to issue power requests (like restart, reboot, and hard reboot). This is typically a configuration detail
94
+ * of the machine, so we usually have to rely on the protocol-specific service to tell us whether the feature is enabled (see our VNC client, wrapping noVnc, for an example)
95
+ */
96
+ powerManagement: boolean;
97
+ /**
98
+ * NoVNC seems to have a quirk that causes it to lose proper mouse tracking after leaving fullscreen. We're working around this by requesting a reconnection of the console
99
+ * upon exiting. VMWare doesn't seem to need this.
100
+ */
101
+ requireReconnectOnExitingFullscreen?: boolean;
102
+ /**
103
+ * Whether the remote console protocol/library supports a "view/read"-only canvas. If it doesn't, we have to do some CSS/JS hacking in the console component, so
104
+ * we prefer the client lib/protocol's implementation if we can get it.
105
+ */
106
+ viewOnlyMode: boolean;
107
+ }
108
+
109
+ interface ConsoleClientService {
110
+ readonly clientType: ConsoleClientType;
111
+ readonly connectionStatus: Signal<ConsoleConnectionStatus>;
112
+ readonly consoleClipboardUpdated: Signal<string>;
113
+ readonly supportedFeatures: Signal<ConsoleSupportedFeatures>;
114
+ connect(url: string, options: ConsoleConnectionOptions): Promise<void>;
115
+ disconnect(): Promise<void>;
116
+ sendClipboardText(text: string): Promise<void>;
117
+ sendCtrlAltDelete(): Promise<void>;
118
+ sendKeyboardInput(text: string): Promise<void>;
119
+ sendPowerRequest(request: ConsolePowerRequest): Promise<void>;
120
+ setIsViewOnly(isViewOnly: boolean): Promise<void>;
121
+ /**
122
+ * Automatically called by the console component on destroy. Disconnect any clients/websocket usage here
123
+ * (or just do it in your disconnect logic and call that internally in your implementation).
124
+ */
125
+ dispose(): Promise<void>;
126
+ }
127
+
128
+ interface CanvasRecordingSettings {
129
+ id: string;
130
+ stream: MediaStream;
131
+ window: Window;
132
+ mimeType: string;
133
+ chunkLength: number;
134
+ maxDuration: number;
135
+ onStopCallback: () => void;
136
+ }
137
+
138
+ declare class CanvasRecording {
139
+ private readonly chunks;
140
+ private readonly mimeType;
141
+ private readonly recorder;
142
+ private readonly window;
143
+ private stopPromise?;
144
+ private stopResolveFn?;
145
+ readonly settings: CanvasRecordingSettings;
146
+ constructor(settings: CanvasRecordingSettings);
147
+ stop(): Promise<Blob>;
148
+ }
149
+
150
+ interface ConsoleComponentNetworkConfig {
151
+ networks: string[];
152
+ nics: string[];
153
+ currentConnections: Record<string, string>;
154
+ }
155
+
156
+ interface ConsoleNetworkConnectionRequest {
157
+ network: string;
158
+ nic: string;
159
+ }
160
+
161
+ interface ConsoleNetworkDisconnectionRequest {
162
+ /**
163
+ * The which should be disconnected. If this value is falsey, interpret as
164
+ * a request to disconnect all NICs.
165
+ */
166
+ nic?: string;
167
+ }
168
+
169
+ type DeepPartial<T> = {
170
+ [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
171
+ };
172
+
173
+ declare class UserSettingsService {
174
+ private readonly _settings;
175
+ readonly settings: _angular_core.Signal<ConsoleUserSettings>;
176
+ private readonly logger;
177
+ private readonly settingsKey;
178
+ private readonly window;
179
+ constructor();
180
+ patch(patch: DeepPartial<ConsoleUserSettings>): void;
181
+ update(update: Partial<ConsoleUserSettings>): void;
182
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserSettingsService, never>;
183
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<UserSettingsService>;
184
+ }
185
+
186
+ interface ConsoleToolbarContext {
187
+ clipboard: {
188
+ consoleClipboardText: Signal<string>;
189
+ sendTextToConsoleClipboard(text: string): Promise<void>;
190
+ };
191
+ console: {
192
+ copyScreenshot(): Promise<void>;
193
+ recordScreenStart(): void;
194
+ recordScreenStop(): Promise<Blob>;
195
+ sendCtrlAltDel(): Promise<void>;
196
+ sendKeyboardInput(text: string): Promise<void>;
197
+ sendPowerRequest(request: ConsolePowerRequest): Promise<void>;
198
+ sendReconnectRequest(): Promise<void>;
199
+ supportedFeatures: Signal<ConsoleSupportedFeatures>;
200
+ toggleFullscreen(): Promise<void>;
201
+ };
202
+ networks: {
203
+ config: Signal<ConsoleComponentNetworkConfig | undefined>;
204
+ connectionRequested(request: ConsoleNetworkConnectionRequest): void;
205
+ disconnectRequested(request: ConsoleNetworkDisconnectionRequest): void;
206
+ };
207
+ state: {
208
+ activeConsoleRecording: Signal<CanvasRecording | undefined>;
209
+ isConnected: Signal<boolean>;
210
+ isFullscreenAvailable: Signal<boolean>;
211
+ isManualReconnectAvailable: Signal<boolean>;
212
+ isRecordingAvailable: Signal<boolean>;
213
+ isViewOnly: Signal<boolean>;
214
+ };
215
+ userSettings: UserSettingsService;
216
+ }
217
+
218
+ interface ConsoleToolbarComponentBase {
219
+ consoleContext: InputSignal<ConsoleToolbarContext>;
220
+ }
221
+
222
+ declare class ConsoleComponent implements OnDestroy {
223
+ autoConnect: _angular_core.InputSignal<boolean>;
224
+ config: _angular_core.InputSignal<ConsoleComponentConfig>;
225
+ isViewOnly: _angular_core.InputSignal<boolean>;
226
+ networkConfig: _angular_core.InputSignal<ConsoleComponentNetworkConfig | undefined>;
227
+ toolbarComponent: _angular_core.InputSignal<Type<ConsoleToolbarComponentBase> | undefined>;
228
+ toolbarDisabled: _angular_core.InputSignal<boolean>;
229
+ connectionStatusChanged: _angular_core.OutputEmitterRef<ConsoleConnectionStatus | undefined>;
230
+ consoleClipboardUpdated: _angular_core.OutputEmitterRef<string>;
231
+ consoleRecorded: _angular_core.OutputEmitterRef<Blob>;
232
+ ctrlAltDelSent: _angular_core.OutputEmitterRef<void>;
233
+ localClipboardUpdated: _angular_core.OutputEmitterRef<ClipboardItem>;
234
+ networkConnectionRequested: _angular_core.OutputEmitterRef<ConsoleNetworkConnectionRequest>;
235
+ networkDisconnectRequested: _angular_core.OutputEmitterRef<ConsoleNetworkDisconnectionRequest | undefined>;
236
+ powerRequestSent: _angular_core.OutputEmitterRef<ConsolePowerRequest>;
237
+ reconnectRequest: _angular_core.OutputEmitterRef<ConsoleComponentConfig>;
238
+ screenshotCopied: _angular_core.OutputEmitterRef<Blob>;
239
+ private readonly browserNotifications;
240
+ private readonly canvasService;
241
+ private readonly clipboardService;
242
+ private readonly consoleClientFactory;
243
+ private readonly consoleForgeConfig;
244
+ private readonly document;
245
+ private readonly fullscreen;
246
+ private readonly logger;
247
+ private readonly userSettingsService;
248
+ private readonly uuids;
249
+ protected readonly componentContainer: _angular_core.Signal<ElementRef<HTMLElement>>;
250
+ protected readonly consoleHostElement: _angular_core.Signal<ElementRef<HTMLElement>>;
251
+ protected readonly consoleClient: _angular_core.WritableSignal<ConsoleClientService | undefined>;
252
+ protected readonly consoleClientConnectionStatus: _angular_core.Signal<ConsoleConnectionStatus | undefined>;
253
+ protected readonly consoleHostBackgroundStyle: string | undefined;
254
+ protected readonly consoleHostElementId: string;
255
+ protected readonly isRecording: _angular_core.Signal<boolean>;
256
+ protected readonly toolbarEnabled: _angular_core.Signal<false | Type<ConsoleToolbarComponentBase>>;
257
+ protected readonly userSettings: _angular_core.Signal<ConsoleUserSettings>;
258
+ constructor();
259
+ ngOnDestroy(): Promise<void>;
260
+ protected handleConsoleRecordingStarted(): Promise<void>;
261
+ protected handleCtrlAltDelSent(): Promise<void>;
262
+ protected handleFullscreen(): Promise<void>;
263
+ protected handleReconnectRequest(): void;
264
+ protected handleScreenshotCopied(screenshotData: Blob): Promise<Blob>;
265
+ connect(config: ConsoleComponentConfig): Promise<void>;
266
+ disconnect(): Promise<void>;
267
+ private resolveConsoleCanvas;
268
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConsoleComponent, never>;
269
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ConsoleComponent, "cf-console", never, { "autoConnect": { "alias": "autoConnect"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": true; "isSignal": true; }; "isViewOnly": { "alias": "isViewOnly"; "required": false; "isSignal": true; }; "networkConfig": { "alias": "networkConfig"; "required": false; "isSignal": true; }; "toolbarComponent": { "alias": "toolbarComponent"; "required": false; "isSignal": true; }; "toolbarDisabled": { "alias": "toolbarDisabled"; "required": false; "isSignal": true; }; }, { "connectionStatusChanged": "connectionStatusChanged"; "consoleClipboardUpdated": "consoleClipboardUpdated"; "consoleRecorded": "consoleRecorded"; "ctrlAltDelSent": "ctrlAltDelSent"; "localClipboardUpdated": "localClipboardUpdated"; "networkConnectionRequested": "networkConnectionRequested"; "networkDisconnectRequested": "networkDisconnectRequested"; "powerRequestSent": "powerRequestSent"; "reconnectRequest": "reconnectRequest"; "screenshotCopied": "screenshotCopied"; }, never, never, true, never>;
270
+ }
271
+
272
+ declare class ConsoleTileComponent {
273
+ config: _angular_core.InputSignal<ConsoleComponentConfig | undefined>;
274
+ clicked: _angular_core.OutputEmitterRef<ConsoleComponentConfig | undefined>;
275
+ connectionStatus: _angular_core.OutputEmitterRef<ConsoleConnectionStatus>;
276
+ reconnectRequest: _angular_core.OutputEmitterRef<ConsoleComponentConfig | undefined>;
277
+ private readonly cfConfig;
278
+ private readonly consoleClientFactory;
279
+ private readonly consoleHostElement;
280
+ private readonly logger;
281
+ private readonly uuids;
282
+ protected consoleClient?: ConsoleClientService;
283
+ protected readonly consoleClientType: _angular_core.Signal<_cmusei_console_forge.ConsoleClientType | undefined>;
284
+ protected consoleHostElementId: string;
285
+ constructor();
286
+ private connect;
287
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConsoleTileComponent, never>;
288
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ConsoleTileComponent, "cf-console-tile", never, { "config": { "alias": "config"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; "connectionStatus": "connectionStatus"; "reconnectRequest": "reconnectRequest"; }, never, never, true, never>;
289
+ }
290
+
291
+ declare class ClassOnHoverDirective {
292
+ applyClasses: _angular_core.InputSignal<string>;
293
+ directiveHost: ElementRef<any>;
294
+ protected handleMouseEnter(): void;
295
+ protected handleMouseLeave(): void;
296
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClassOnHoverDirective, never>;
297
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ClassOnHoverDirective, "[cfClassOnHover]", never, { "applyClasses": { "alias": "applyClasses"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
298
+ }
299
+
300
+ declare enum LogLevel {
301
+ DEBUG = 0,
302
+ INFO = 1,
303
+ WARNING = 2,
304
+ ERROR = 3
305
+ }
306
+
307
+ declare abstract class ConsoleForgeConfig {
308
+ abstract canvasRecording: {
309
+ autoDownloadCompletedRecordings?: boolean;
310
+ chunkLength?: number;
311
+ frameRate?: number;
312
+ maxDuration?: number;
313
+ mimeType?: string;
314
+ };
315
+ abstract consoleBackgroundStyle?: string;
316
+ abstract defaultConsoleClientType?: ConsoleClientType;
317
+ abstract disabledFeatures: {
318
+ clipboard?: boolean;
319
+ consoleScreenRecord?: boolean;
320
+ manualConsoleReconnect?: boolean;
321
+ networkDisconnection?: boolean;
322
+ };
323
+ abstract logThreshold: LogLevel;
324
+ abstract showBrowserNotificationsOnConsoleEvents: boolean;
325
+ abstract toolbar: {
326
+ component: Type<ConsoleToolbarComponentBase>;
327
+ disabled: boolean;
328
+ };
329
+ }
330
+
331
+ declare function provideConsoleForge(config?: DeepPartial<ConsoleForgeConfig>): EnvironmentProviders;
332
+
333
+ /**
334
+ * Extracts plain text from a ClipboardItem, if available.
335
+ *
336
+ * @param clipboardItem - The ClipboardItem to extract text from.
337
+ * @returns A promise that resolves to the extracted text, or null if no text is present.
338
+ */
339
+ declare function getTextFromClipboardItem(clipboardItem?: ClipboardItem): Promise<string | null>;
340
+ declare function getClipboardItemFromText(text: string): ClipboardItem;
341
+
342
+ export { ClassOnHoverDirective, ConsoleComponent, ConsoleTileComponent, LogLevel, UserSettingsService, getClipboardItemFromText, getTextFromClipboardItem, provideConsoleForge };
343
+ export type { ConsoleClientType, ConsoleComponentConfig, ConsoleComponentNetworkConfig, ConsoleConnectionOptions, ConsoleConnectionStatus, ConsoleCredentials, ConsoleNetworkConnectionRequest, ConsoleNetworkDisconnectionRequest, ConsolePowerRequest, ConsoleSupportedFeatures, ConsoleToolbarComponentBase, ConsoleToolbarContext, ConsoleToolbarPosition };
package/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@cmusei/console-forge" />
5
- export * from './public-api';
@@ -1,59 +0,0 @@
1
- import { ElementRef, OnDestroy, Type } from '@angular/core';
2
- import { ConsoleComponentConfig } from '../../models/console-component-config';
3
- import { ConsoleClientService } from '../../services/console-clients/console-client.service';
4
- import { ConsoleToolbarComponentBase } from '../../models/console-toolbar-component-base';
5
- import { ConsolePowerRequest } from '../../models/console-power-request';
6
- import { ConsoleComponentNetworkConfig } from '../../models/console-component-network-config';
7
- import { ConsoleConnectionStatus } from '../../models/console-connection-status';
8
- import { ConsoleNetworkConnectionRequest } from '../../models/console-network-connection-request';
9
- import { ConsoleNetworkDisconnectionRequest } from '../../models/console-network-disconnection-request';
10
- import * as i0 from "@angular/core";
11
- export declare class ConsoleComponent implements OnDestroy {
12
- autoConnect: import("@angular/core").InputSignal<boolean>;
13
- config: import("@angular/core").InputSignal<ConsoleComponentConfig>;
14
- isViewOnly: import("@angular/core").InputSignal<boolean>;
15
- networkConfig: import("@angular/core").InputSignal<ConsoleComponentNetworkConfig | undefined>;
16
- toolbarComponent: import("@angular/core").InputSignal<Type<ConsoleToolbarComponentBase> | undefined>;
17
- toolbarDisabled: import("@angular/core").InputSignal<boolean>;
18
- connectionStatusChanged: import("@angular/core").OutputEmitterRef<ConsoleConnectionStatus | undefined>;
19
- consoleClipboardUpdated: import("@angular/core").OutputEmitterRef<string>;
20
- consoleRecorded: import("@angular/core").OutputEmitterRef<Blob>;
21
- ctrlAltDelSent: import("@angular/core").OutputEmitterRef<void>;
22
- localClipboardUpdated: import("@angular/core").OutputEmitterRef<ClipboardItem>;
23
- networkConnectionRequested: import("@angular/core").OutputEmitterRef<ConsoleNetworkConnectionRequest>;
24
- networkDisconnectRequested: import("@angular/core").OutputEmitterRef<ConsoleNetworkDisconnectionRequest | undefined>;
25
- powerRequestSent: import("@angular/core").OutputEmitterRef<ConsolePowerRequest>;
26
- reconnectRequest: import("@angular/core").OutputEmitterRef<ConsoleComponentConfig>;
27
- screenshotCopied: import("@angular/core").OutputEmitterRef<Blob>;
28
- private readonly browserNotifications;
29
- private readonly canvasService;
30
- private readonly clipboardService;
31
- private readonly consoleClientFactory;
32
- private readonly consoleForgeConfig;
33
- private readonly document;
34
- private readonly fullscreen;
35
- private readonly logger;
36
- private readonly userSettingsService;
37
- private readonly uuids;
38
- protected readonly componentContainer: import("@angular/core").Signal<ElementRef<HTMLElement>>;
39
- protected readonly consoleHostElement: import("@angular/core").Signal<ElementRef<HTMLElement>>;
40
- protected readonly consoleClient: import("@angular/core").WritableSignal<ConsoleClientService | undefined>;
41
- protected readonly consoleClientConnectionStatus: import("@angular/core").Signal<ConsoleConnectionStatus | undefined>;
42
- protected readonly consoleHostBackgroundStyle: string | undefined;
43
- protected readonly consoleHostElementId: string;
44
- protected readonly isRecording: import("@angular/core").Signal<boolean>;
45
- protected readonly toolbarEnabled: import("@angular/core").Signal<false | Type<ConsoleToolbarComponentBase>>;
46
- protected readonly userSettings: import("@angular/core").Signal<import("../../models/console-user-settings").ConsoleUserSettings>;
47
- constructor();
48
- ngOnDestroy(): Promise<void>;
49
- protected handleConsoleRecordingStarted(): Promise<void>;
50
- protected handleCtrlAltDelSent(): Promise<void>;
51
- protected handleFullscreen(): Promise<void>;
52
- protected handleReconnectRequest(): void;
53
- protected handleScreenshotCopied(screenshotData: Blob): Promise<Blob>;
54
- connect(config: ConsoleComponentConfig): Promise<void>;
55
- disconnect(): Promise<void>;
56
- private resolveConsoleCanvas;
57
- static ɵfac: i0.ɵɵFactoryDeclaration<ConsoleComponent, never>;
58
- static ɵcmp: i0.ɵɵComponentDeclaration<ConsoleComponent, "cf-console", never, { "autoConnect": { "alias": "autoConnect"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": true; "isSignal": true; }; "isViewOnly": { "alias": "isViewOnly"; "required": false; "isSignal": true; }; "networkConfig": { "alias": "networkConfig"; "required": false; "isSignal": true; }; "toolbarComponent": { "alias": "toolbarComponent"; "required": false; "isSignal": true; }; "toolbarDisabled": { "alias": "toolbarDisabled"; "required": false; "isSignal": true; }; }, { "connectionStatusChanged": "connectionStatusChanged"; "consoleClipboardUpdated": "consoleClipboardUpdated"; "consoleRecorded": "consoleRecorded"; "ctrlAltDelSent": "ctrlAltDelSent"; "localClipboardUpdated": "localClipboardUpdated"; "networkConnectionRequested": "networkConnectionRequested"; "networkDisconnectRequested": "networkDisconnectRequested"; "powerRequestSent": "powerRequestSent"; "reconnectRequest": "reconnectRequest"; "screenshotCopied": "screenshotCopied"; }, never, never, true, never>;
59
- }
@@ -1,12 +0,0 @@
1
- import { AfterViewInit } from '@angular/core';
2
- import { ConsoleConnectionStatus } from '../../models/console-connection-status';
3
- import * as i0 from "@angular/core";
4
- export declare class ConsoleStatusComponent implements AfterViewInit {
5
- status: import("@angular/core").InputSignal<ConsoleConnectionStatus | undefined>;
6
- reconnectRequest: import("@angular/core").OutputEmitterRef<void>;
7
- private readonly picoCssService;
8
- private readonly hostElement;
9
- ngAfterViewInit(): Promise<void>;
10
- static ɵfac: i0.ɵɵFactoryDeclaration<ConsoleStatusComponent, never>;
11
- static ɵcmp: i0.ɵɵComponentDeclaration<ConsoleStatusComponent, "cf-console-status", never, { "status": { "alias": "status"; "required": false; "isSignal": true; }; }, { "reconnectRequest": "reconnectRequest"; }, never, never, true, never>;
12
- }
@@ -1,20 +0,0 @@
1
- import { ConsoleComponentConfig } from '../../models/console-component-config';
2
- import { ConsoleClientService } from '../../services/console-clients/console-client.service';
3
- import * as i0 from "@angular/core";
4
- export declare class ConsoleTileComponent {
5
- config: import("@angular/core").InputSignal<ConsoleComponentConfig | undefined>;
6
- clicked: import("@angular/core").OutputEmitterRef<ConsoleComponentConfig | undefined>;
7
- reconnectRequest: import("@angular/core").OutputEmitterRef<ConsoleComponentConfig | undefined>;
8
- private readonly cfConfig;
9
- private readonly consoleClientFactory;
10
- private readonly consoleHostElement;
11
- private readonly logger;
12
- private readonly uuids;
13
- protected consoleClient?: ConsoleClientService;
14
- protected readonly consoleClientType: import("@angular/core").Signal<import("@cmusei/console-forge").ConsoleClientType | undefined>;
15
- protected consoleHostElementId: string;
16
- constructor();
17
- private connect;
18
- static ɵfac: i0.ɵɵFactoryDeclaration<ConsoleTileComponent, never>;
19
- static ɵcmp: i0.ɵɵComponentDeclaration<ConsoleTileComponent, "cf-console-tile", never, { "config": { "alias": "config"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; "reconnectRequest": "reconnectRequest"; }, never, never, true, never>;
20
- }
@@ -1,53 +0,0 @@
1
- import { Type } from '@angular/core';
2
- import { ConsoleClientService } from '../../services/console-clients/console-client.service';
3
- import { ConsoleComponentNetworkConfig } from '../../models/console-component-network-config';
4
- import { ConsoleToolbarContext } from '../../models/console-toolbar-context';
5
- import { ConsoleToolbarComponentBase } from '../../models/console-toolbar-component-base';
6
- import { ConsoleNetworkConnectionRequest } from '../../models/console-network-connection-request';
7
- import { ConsoleNetworkDisconnectionRequest } from '../../models/console-network-disconnection-request';
8
- import { ConsolePowerRequest } from '../../models/console-power-request';
9
- import * as i0 from "@angular/core";
10
- export declare class ConsoleToolbarComponent {
11
- consoleClient: import("@angular/core").InputSignal<ConsoleClientService>;
12
- consoleNetworkConfig: import("@angular/core").InputSignal<ConsoleComponentNetworkConfig | undefined>;
13
- customToolbarComponent: import("@angular/core").InputSignal<Type<ConsoleToolbarComponentBase> | undefined>;
14
- isViewOnly: import("@angular/core").InputSignal<boolean>;
15
- canvasRecordingStarted: import("@angular/core").OutputEmitterRef<void>;
16
- canvasRecordingFinished: import("@angular/core").OutputEmitterRef<Blob>;
17
- ctrlAltDelSent: import("@angular/core").OutputEmitterRef<void>;
18
- keyboardInputSent: import("@angular/core").OutputEmitterRef<string>;
19
- networkConnectionRequested: import("@angular/core").OutputEmitterRef<ConsoleNetworkConnectionRequest>;
20
- networkDisconnectRequested: import("@angular/core").OutputEmitterRef<ConsoleNetworkDisconnectionRequest | undefined>;
21
- powerRequestSent: import("@angular/core").OutputEmitterRef<ConsolePowerRequest>;
22
- reconnectRequestSent: import("@angular/core").OutputEmitterRef<void>;
23
- screenshotCopied: import("@angular/core").OutputEmitterRef<Blob>;
24
- toggleFullscreen: import("@angular/core").OutputEmitterRef<void>;
25
- private readonly blobDownloader;
26
- private readonly canvas;
27
- private readonly canvasRecorder;
28
- private readonly clipboardService;
29
- private readonly config;
30
- private readonly fullscreen;
31
- private readonly logger;
32
- private readonly userSettings;
33
- private readonly window;
34
- private readonly activeConsoleRecording;
35
- private readonly isConnected;
36
- private readonly isManualConsoleReconnectAvailable;
37
- protected readonly toolbarComponentContext: ConsoleToolbarContext;
38
- protected readonly toolbarComponent: import("@angular/core").Signal<Type<ConsoleToolbarComponentBase>>;
39
- constructor();
40
- protected handleCopyScreenshot(): Promise<void>;
41
- protected handleFullscreen(): Promise<void>;
42
- protected handleKeyboardInputSend(text: string): Promise<void>;
43
- protected handleNetworkConnectionRequest(request: ConsoleNetworkConnectionRequest): void;
44
- protected handleNetworkDisconnectionRequest(request?: ConsoleNetworkDisconnectionRequest): void;
45
- protected handleReconnectRequestSent(): Promise<void>;
46
- protected handleRecordScreenStart(): void;
47
- protected handleRecordScreenStop(): Promise<Blob>;
48
- protected handleSendCtrlAltDelete(): Promise<void>;
49
- private handleSendPowerRequest;
50
- protected handleSendTextToClipboard(text: string): Promise<void>;
51
- static ɵfac: i0.ɵɵFactoryDeclaration<ConsoleToolbarComponent, never>;
52
- static ɵcmp: i0.ɵɵComponentDeclaration<ConsoleToolbarComponent, "cf-console-toolbar", never, { "consoleClient": { "alias": "consoleClient"; "required": true; "isSignal": true; }; "consoleNetworkConfig": { "alias": "consoleNetworkConfig"; "required": false; "isSignal": true; }; "customToolbarComponent": { "alias": "customToolbarComponent"; "required": false; "isSignal": true; }; "isViewOnly": { "alias": "isViewOnly"; "required": true; "isSignal": true; }; }, { "canvasRecordingStarted": "canvasRecordingStarted"; "canvasRecordingFinished": "canvasRecordingFinished"; "ctrlAltDelSent": "ctrlAltDelSent"; "keyboardInputSent": "keyboardInputSent"; "networkConnectionRequested": "networkConnectionRequested"; "networkDisconnectRequested": "networkDisconnectRequested"; "powerRequestSent": "powerRequestSent"; "reconnectRequestSent": "reconnectRequestSent"; "screenshotCopied": "screenshotCopied"; "toggleFullscreen": "toggleFullscreen"; }, never, never, true, never>;
53
- }
@@ -1,13 +0,0 @@
1
- import { AfterViewInit } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class ConsoleToolbarDefaultButtonComponent implements AfterViewInit {
4
- clicked: import("@angular/core").OutputEmitterRef<void>;
5
- disabled: import("@angular/core").InputSignal<boolean>;
6
- label: import("@angular/core").InputSignal<string | undefined>;
7
- isOngoing: import("@angular/core").InputSignal<boolean>;
8
- private readonly picoCssService;
9
- private readonly hostElement;
10
- ngAfterViewInit(): Promise<void>;
11
- static ɵfac: i0.ɵɵFactoryDeclaration<ConsoleToolbarDefaultButtonComponent, never>;
12
- static ɵcmp: i0.ɵɵComponentDeclaration<ConsoleToolbarDefaultButtonComponent, "cf-console-toolbar-default-button", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "isOngoing": { "alias": "isOngoing"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, ["*"], true, never>;
13
- }
@@ -1,43 +0,0 @@
1
- import { AfterViewInit, ElementRef } from '@angular/core';
2
- import { ConsoleToolbarContext } from '../../models/console-toolbar-context';
3
- import { ConsoleToolbarComponentBase } from '../../models/console-toolbar-component-base';
4
- import { ConsoleForgeConfig } from '../../config/console-forge-config';
5
- import { ConsolePowerRequest } from '../../models/console-power-request';
6
- import { ConsoleToolbarPosition } from '../../models/console-toolbar-position';
7
- import { ConsoleToolbarTheme } from '../../models/console-toolbar-theme';
8
- import { ConsoleNetworkConnectionRequest } from '../../models/console-network-connection-request';
9
- import * as i0 from "@angular/core";
10
- export declare class ConsoleToolbarDefaultComponent implements AfterViewInit, ConsoleToolbarComponentBase {
11
- consoleContext: import("@angular/core").InputSignal<ConsoleToolbarContext>;
12
- protected isClipboardDialogOpen: boolean;
13
- protected isKeyboardDialogOpen: boolean;
14
- protected isNetworkDialogOpen: boolean;
15
- protected isPowerDialogOpen: boolean;
16
- protected isSettingsDialogOpen: boolean;
17
- protected readonly keyboardInputText: import("@angular/core").ModelSignal<string>;
18
- protected readonly cfConfig: ConsoleForgeConfig;
19
- private readonly clipboardService;
20
- protected readonly clipboardTextInput: import("@angular/core").Signal<ElementRef<any> | undefined>;
21
- private readonly picoCssService;
22
- private readonly hostElement;
23
- constructor();
24
- ngAfterViewInit(): Promise<void>;
25
- protected handleChangeToolbarPosition(position: ConsoleToolbarPosition): void;
26
- protected handleClipboardDialogOpenClose(isOpen: boolean): void;
27
- protected handleClipboardCopyLastText(text: string): void;
28
- protected handleNetworkChangeRequested(request: ConsoleNetworkConnectionRequest): void;
29
- protected handleNetworkDisconnectAllRequested(): void;
30
- protected handleNetworkDialogOpenClose(isOpen: boolean): void;
31
- protected handleRecordToggle(): void;
32
- protected handleSendClipboardText(event: Event, text: string): Promise<void>;
33
- protected handlSendKeyboardCtrlAltDel(): Promise<void>;
34
- protected handleSendKeyboardInput(event: Event, text: string): Promise<void>;
35
- protected handleSendPowerRequest(request: ConsolePowerRequest): Promise<void>;
36
- protected handleSettingsDialogOpenClose(isOpen: boolean): void;
37
- protected handleSettingsAllowLocalClipboardWrite(allow: boolean): void;
38
- protected handleSettingsAttemptRemoteSessionResize(attempt: boolean): void;
39
- protected handleSettingsScaleToContainerHostSize(scaleToCanvasHostSize: boolean): void;
40
- protected handleToolbarThemeChange(theme?: ConsoleToolbarTheme): void;
41
- static ɵfac: i0.ɵɵFactoryDeclaration<ConsoleToolbarDefaultComponent, never>;
42
- static ɵcmp: i0.ɵɵComponentDeclaration<ConsoleToolbarDefaultComponent, "cf-console-toolbar-default", never, { "consoleContext": { "alias": "consoleContext"; "required": true; "isSignal": true; }; "keyboardInputText": { "alias": "keyboardInputText"; "required": false; "isSignal": true; }; }, { "keyboardInputText": "keyboardInputTextChange"; }, never, never, true, never>;
43
- }
@@ -1,28 +0,0 @@
1
- import { Type } from "@angular/core";
2
- import { LogLevel } from "../models/log-level";
3
- import { ConsoleClientType } from "../models/console-client-type";
4
- import { ConsoleToolbarComponentBase } from "../models/console-toolbar-component-base";
5
- export declare abstract class ConsoleForgeConfig {
6
- abstract canvasRecording: {
7
- autoDownloadCompletedRecordings?: boolean;
8
- chunkLength?: number;
9
- frameRate?: number;
10
- maxDuration?: number;
11
- mimeType?: string;
12
- };
13
- abstract consoleBackgroundStyle?: string;
14
- abstract defaultConsoleClientType?: ConsoleClientType;
15
- abstract disabledFeatures: {
16
- clipboard?: boolean;
17
- consoleScreenRecord?: boolean;
18
- manualConsoleReconnect?: boolean;
19
- networkDisconnection?: boolean;
20
- };
21
- abstract logThreshold: LogLevel;
22
- abstract showBrowserNotificationsOnConsoleEvents: boolean;
23
- abstract toolbar: {
24
- component: Type<ConsoleToolbarComponentBase>;
25
- disabled: boolean;
26
- };
27
- }
28
- export declare const defaultCfConfig: ConsoleForgeConfig;
@@ -1,4 +0,0 @@
1
- import { EnvironmentProviders } from "@angular/core";
2
- import { ConsoleForgeConfig } from "./console-forge-config";
3
- import { DeepPartial } from "../services/object.helpers";
4
- export declare function provideConsoleForge(config?: DeepPartial<ConsoleForgeConfig>): EnvironmentProviders;
@@ -1,8 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class ApplyToolbarThemeDirective {
3
- private readonly hostElement;
4
- private readonly userSettings;
5
- constructor();
6
- static ɵfac: i0.ɵɵFactoryDeclaration<ApplyToolbarThemeDirective, never>;
7
- static ɵdir: i0.ɵɵDirectiveDeclaration<ApplyToolbarThemeDirective, "[cfApplyToolbarTheme]", never, {}, {}, never, never, true, never>;
8
- }