UNPKG

@jupyterlite/terminal

Version:
52 lines (51 loc) 2.12 kB
import type { Contents, Terminal } from '@jupyterlab/services'; import { ServerConnection } from '@jupyterlab/services'; import type { IExternalCommand, IOutputCallback, IShell, IStdinReply, IStdinRequest } from '@jupyterlite/cockle'; import type { ISignal } from '@lumino/signaling'; import type { ITerminalShell } from './shell'; import type { ILiteTerminalAPIClient } from './tokens'; export declare class LiteTerminalAPIClient implements ILiteTerminalAPIClient { constructor(options?: { serverSettings?: ServerConnection.ISettings; }); /** * Set identifier for communicating with service worker. */ set browsingContextId(browsingContextId: string); /** * Set contents manager used for SharedArrayBuffer DriveFS. */ set contentsManager(contentsManager: Contents.IManager); /** * Function that handles stdin requests received from service worker. */ handleStdin(request: IStdinRequest): Promise<IStdinReply>; get isAvailable(): boolean; readonly serverSettings: ServerConnection.ISettings; startNew(options?: Terminal.ITerminal.IOptions): Promise<Terminal.IModel>; listRunning(): Promise<Terminal.IModel[]>; registerAlias(key: string, value: string): void; registerEnvironmentVariable(key: string, value: string | undefined): void; registerExternalCommand(options: IExternalCommand.IOptions): void; createHeadlessShell(options: { shellId: string; cwd?: string; environment?: { [key: string]: string | undefined; }; outputCallback: IOutputCallback; readyTimeoutMs?: number; }): Promise<IShell>; shutdown(name: string): Promise<void>; get terminalDisposed(): ISignal<this, string>; themeChange(isDarkMode?: boolean): void; protected createShell(options: ITerminalShell.IOptions): Promise<ITerminalShell>; private get _models(); private _nextAvailableName; private _aliases?; private _environment?; private _browsingContextId?; private _contentsManager?; private _externalCommands; private _terminalDisposed; }