Merge pull request #4847 from tisilent/add-addon-public-api
Have addons implement their API at compile time
This commit is contained in:
@@ -5,13 +5,14 @@
|
|||||||
* Implements the attach method, that attaches the terminal to a WebSocket stream.
|
* Implements the attach method, that attaches the terminal to a WebSocket stream.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Terminal, IDisposable, ITerminalAddon } from '@xterm/xterm';
|
import type { Terminal, IDisposable, ITerminalAddon } from '@xterm/xterm';
|
||||||
|
import type { AttachAddon as IAttachApi } from '@xterm/addon-attach';
|
||||||
|
|
||||||
interface IAttachOptions {
|
interface IAttachOptions {
|
||||||
bidirectional?: boolean;
|
bidirectional?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class AttachAddon implements ITerminalAddon {
|
export class AttachAddon implements ITerminalAddon , IAttachApi {
|
||||||
private _socket: WebSocket;
|
private _socket: WebSocket;
|
||||||
private _bidirectional: boolean;
|
private _bidirectional: boolean;
|
||||||
private _disposables: IDisposable[] = [];
|
private _disposables: IDisposable[] = [];
|
||||||
|
|||||||
@@ -13,7 +13,12 @@
|
|||||||
"strict": true,
|
"strict": true,
|
||||||
"types": [
|
"types": [
|
||||||
"../../../node_modules/@types/mocha"
|
"../../../node_modules/@types/mocha"
|
||||||
]
|
],
|
||||||
|
"paths": {
|
||||||
|
"@xterm/addon-attach": [
|
||||||
|
"../typings/addon-attach.d.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"./**/*",
|
"./**/*",
|
||||||
|
|||||||
@@ -3,16 +3,17 @@
|
|||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import type { ITerminalAddon, Terminal } from '@xterm/xterm';
|
||||||
|
import type { CanvasAddon as ICanvasApi } from '@xterm/addon-canvas';
|
||||||
import { ICharacterJoinerService, ICharSizeService, ICoreBrowserService, IRenderService, IThemeService } from 'browser/services/Services';
|
import { ICharacterJoinerService, ICharSizeService, ICoreBrowserService, IRenderService, IThemeService } from 'browser/services/Services';
|
||||||
import { ITerminal } from 'browser/Types';
|
import { ITerminal } from 'browser/Types';
|
||||||
import { EventEmitter, forwardEvent } from 'common/EventEmitter';
|
import { EventEmitter, forwardEvent } from 'common/EventEmitter';
|
||||||
import { Disposable, toDisposable } from 'common/Lifecycle';
|
import { Disposable, toDisposable } from 'common/Lifecycle';
|
||||||
import { setTraceLogger } from 'common/services/LogService';
|
import { setTraceLogger } from 'common/services/LogService';
|
||||||
import { IBufferService, IDecorationService, ILogService } from 'common/services/Services';
|
import { IBufferService, IDecorationService, ILogService } from 'common/services/Services';
|
||||||
import { ITerminalAddon, Terminal } from '@xterm/xterm';
|
|
||||||
import { CanvasRenderer } from './CanvasRenderer';
|
import { CanvasRenderer } from './CanvasRenderer';
|
||||||
|
|
||||||
export class CanvasAddon extends Disposable implements ITerminalAddon {
|
export class CanvasAddon extends Disposable implements ITerminalAddon , ICanvasApi {
|
||||||
private _terminal?: Terminal;
|
private _terminal?: Terminal;
|
||||||
private _renderer?: CanvasRenderer;
|
private _renderer?: CanvasRenderer;
|
||||||
|
|
||||||
@@ -65,4 +66,8 @@ export class CanvasAddon extends Disposable implements ITerminalAddon {
|
|||||||
this._renderer = undefined;
|
this._renderer = undefined;
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public clearTextureAtlas(): void {
|
||||||
|
this._renderer?.clearTextureAtlas();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,9 @@
|
|||||||
],
|
],
|
||||||
"browser/*": [
|
"browser/*": [
|
||||||
"../../../src/browser/*"
|
"../../../src/browser/*"
|
||||||
|
],
|
||||||
|
"@xterm/addon-canvas": [
|
||||||
|
"../typings/addon-canvas.d.ts"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Terminal, ITerminalAddon } from '@xterm/xterm';
|
import type { Terminal, ITerminalAddon } from '@xterm/xterm';
|
||||||
|
import type { FitAddon as IFitApi } from '@xterm/addon-fit';
|
||||||
import { IRenderDimensions } from 'browser/renderer/shared/Types';
|
import { IRenderDimensions } from 'browser/renderer/shared/Types';
|
||||||
|
|
||||||
interface ITerminalDimensions {
|
interface ITerminalDimensions {
|
||||||
@@ -21,7 +22,7 @@ interface ITerminalDimensions {
|
|||||||
const MINIMUM_COLS = 2;
|
const MINIMUM_COLS = 2;
|
||||||
const MINIMUM_ROWS = 1;
|
const MINIMUM_ROWS = 1;
|
||||||
|
|
||||||
export class FitAddon implements ITerminalAddon {
|
export class FitAddon implements ITerminalAddon , IFitApi {
|
||||||
private _terminal: Terminal | undefined;
|
private _terminal: Terminal | undefined;
|
||||||
|
|
||||||
public activate(terminal: Terminal): void {
|
public activate(terminal: Terminal): void {
|
||||||
|
|||||||
@@ -17,6 +17,9 @@
|
|||||||
"paths": {
|
"paths": {
|
||||||
"browser/*": [
|
"browser/*": [
|
||||||
"../../../src/browser/*"
|
"../../../src/browser/*"
|
||||||
|
],
|
||||||
|
"@xterm/addon-fit": [
|
||||||
|
"../typings/addon-fit.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,14 +3,14 @@
|
|||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import type { ITerminalAddon, IDisposable } from '@xterm/xterm';
|
||||||
|
import type { ImageAddon as IImageApi } from '@xterm/addon-image';
|
||||||
import { IIPHandler } from './IIPHandler';
|
import { IIPHandler } from './IIPHandler';
|
||||||
import { ITerminalAddon, IDisposable } from '@xterm/xterm';
|
|
||||||
import { ImageRenderer } from './ImageRenderer';
|
import { ImageRenderer } from './ImageRenderer';
|
||||||
import { ImageStorage, CELL_SIZE_DEFAULT } from './ImageStorage';
|
import { ImageStorage, CELL_SIZE_DEFAULT } from './ImageStorage';
|
||||||
import { SixelHandler } from './SixelHandler';
|
import { SixelHandler } from './SixelHandler';
|
||||||
import { ITerminalExt, IImageAddonOptions, IResetHandler } from './Types';
|
import { ITerminalExt, IImageAddonOptions, IResetHandler } from './Types';
|
||||||
|
|
||||||
|
|
||||||
// default values of addon ctor options
|
// default values of addon ctor options
|
||||||
const DEFAULT_OPTIONS: IImageAddonOptions = {
|
const DEFAULT_OPTIONS: IImageAddonOptions = {
|
||||||
enableSizeReports: true,
|
enableSizeReports: true,
|
||||||
@@ -48,7 +48,7 @@ const enum GaStatus {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export class ImageAddon implements ITerminalAddon {
|
export class ImageAddon implements ITerminalAddon , IImageApi {
|
||||||
private _opts: IImageAddonOptions;
|
private _opts: IImageAddonOptions;
|
||||||
private _defaultOpts: IImageAddonOptions;
|
private _defaultOpts: IImageAddonOptions;
|
||||||
private _storage: ImageStorage | undefined;
|
private _storage: ImageStorage | undefined;
|
||||||
|
|||||||
@@ -14,7 +14,8 @@
|
|||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"paths": {
|
"paths": {
|
||||||
"browser/*": [ "../../../src/browser/*" ],
|
"browser/*": [ "../../../src/browser/*" ],
|
||||||
"common/*": [ "../../../src/common/*" ]
|
"common/*": [ "../../../src/common/*" ],
|
||||||
|
"@xterm/addon-image": [ "../typings/addon-image.d.ts" ]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Terminal } from '@xterm/xterm';
|
import type { Terminal } from '@xterm/xterm';
|
||||||
|
import type { LigaturesAddon as ILigaturesApi } from '@xterm/addon-ligatures';
|
||||||
import { enableLigatures } from '.';
|
import { enableLigatures } from '.';
|
||||||
import { ILigatureOptions } from './Types';
|
import { ILigatureOptions } from './Types';
|
||||||
|
|
||||||
@@ -12,7 +13,7 @@ export interface ITerminalAddon {
|
|||||||
dispose(): void;
|
dispose(): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class LigaturesAddon implements ITerminalAddon {
|
export class LigaturesAddon implements ITerminalAddon , ILigaturesApi {
|
||||||
private readonly _fallbackLigatures: string[];
|
private readonly _fallbackLigatures: string[];
|
||||||
|
|
||||||
private _terminal: Terminal | undefined;
|
private _terminal: Terminal | undefined;
|
||||||
|
|||||||
@@ -10,7 +10,12 @@
|
|||||||
"preserveWatchOutput": true,
|
"preserveWatchOutput": true,
|
||||||
"types": [
|
"types": [
|
||||||
"../../../node_modules/@types/mocha"
|
"../../../node_modules/@types/mocha"
|
||||||
]
|
],
|
||||||
|
"paths": {
|
||||||
|
"@xterm/addon-ligatures" : [
|
||||||
|
"../typings/addon-ligatures.d.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"./**/*",
|
"./**/*",
|
||||||
|
|||||||
@@ -15,8 +15,7 @@
|
|||||||
"xterm.js"
|
"xterm.js"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "../../node_modules/.bin/tsc -p .",
|
"prepackage": "../../node_modules/.bin/tsc -p .",
|
||||||
"prepackage": "npm run build",
|
|
||||||
"package": "../../node_modules/.bin/webpack",
|
"package": "../../node_modules/.bin/webpack",
|
||||||
"prepublishOnly": "npm run package"
|
"prepublishOnly": "npm run package"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Terminal, IDisposable, ITerminalAddon, IDecoration } from '@xterm/xterm';
|
import type { Terminal, IDisposable, ITerminalAddon, IDecoration } from '@xterm/xterm';
|
||||||
|
import type { SearchAddon as ISearchApi } from '@xterm/addon-search';
|
||||||
import { EventEmitter } from 'common/EventEmitter';
|
import { EventEmitter } from 'common/EventEmitter';
|
||||||
import { Disposable, toDisposable, disposeArray, MutableDisposable } from 'common/Lifecycle';
|
import { Disposable, toDisposable, disposeArray, MutableDisposable } from 'common/Lifecycle';
|
||||||
|
|
||||||
@@ -61,7 +62,7 @@ const NON_WORD_CHARACTERS = ' ~!@#$%^&*()+`-=[]{}|\\;:"\',./<>?';
|
|||||||
const LINES_CACHE_TIME_TO_LIVE = 15 * 1000; // 15 secs
|
const LINES_CACHE_TIME_TO_LIVE = 15 * 1000; // 15 secs
|
||||||
const DEFAULT_HIGHLIGHT_LIMIT = 1000;
|
const DEFAULT_HIGHLIGHT_LIMIT = 1000;
|
||||||
|
|
||||||
export class SearchAddon extends Disposable implements ITerminalAddon {
|
export class SearchAddon extends Disposable implements ITerminalAddon , ISearchApi {
|
||||||
private _terminal: Terminal | undefined;
|
private _terminal: Terminal | undefined;
|
||||||
private _cachedSearchTerm: string | undefined;
|
private _cachedSearchTerm: string | undefined;
|
||||||
private _highlightedLines: Set<number> = new Set();
|
private _highlightedLines: Set<number> = new Set();
|
||||||
|
|||||||
@@ -17,6 +17,9 @@
|
|||||||
"paths": {
|
"paths": {
|
||||||
"common/*": [
|
"common/*": [
|
||||||
"../../../src/common/*"
|
"../../../src/common/*"
|
||||||
|
],
|
||||||
|
"@xterm/addon-search" : [
|
||||||
|
"../typings/addon-search.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -14,7 +14,10 @@
|
|||||||
"paths": {
|
"paths": {
|
||||||
"common/*": ["../../../src/common/*"],
|
"common/*": ["../../../src/common/*"],
|
||||||
"browser/*": ["../../../src/browser/*"],
|
"browser/*": ["../../../src/browser/*"],
|
||||||
"SerializeAddon": ["../src/SerializeAddon"]
|
"SerializeAddon": ["../src/SerializeAddon"],
|
||||||
|
"@xterm/addon-serialize": [
|
||||||
|
"../typings/addon-serialize.d.ts"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": ["../**/*", "../../../typings/xterm.d.ts"],
|
"include": ["../**/*", "../../../typings/xterm.d.ts"],
|
||||||
|
|||||||
@@ -5,9 +5,10 @@
|
|||||||
* (EXPERIMENTAL) This Addon is still under development
|
* (EXPERIMENTAL) This Addon is still under development
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import type { IBuffer, IBufferCell, IBufferRange, ITerminalAddon, Terminal } from '@xterm/xterm';
|
||||||
|
import type { SerializeAddon as ISerializeApi } from '@xterm/addon-serialize';
|
||||||
import { DEFAULT_ANSI_COLORS } from 'browser/services/ThemeService';
|
import { DEFAULT_ANSI_COLORS } from 'browser/services/ThemeService';
|
||||||
import { IAttributeData, IColor } from 'common/Types';
|
import { IAttributeData, IColor } from 'common/Types';
|
||||||
import { IBuffer, IBufferCell, IBufferRange, ITerminalAddon, Terminal } from '@xterm/xterm';
|
|
||||||
|
|
||||||
function constrain(value: number, low: number, high: number): number {
|
function constrain(value: number, low: number, high: number): number {
|
||||||
return Math.max(low, Math.min(value, high));
|
return Math.max(low, Math.min(value, high));
|
||||||
@@ -411,7 +412,7 @@ class StringSerializeHandler extends BaseSerializeHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class SerializeAddon implements ITerminalAddon {
|
export class SerializeAddon implements ITerminalAddon , ISerializeApi {
|
||||||
private _terminal: Terminal | undefined;
|
private _terminal: Terminal | undefined;
|
||||||
|
|
||||||
public activate(terminal: Terminal): void {
|
public activate(terminal: Terminal): void {
|
||||||
|
|||||||
@@ -17,6 +17,9 @@
|
|||||||
],
|
],
|
||||||
"browser/*": [
|
"browser/*": [
|
||||||
"../../../src/browser/*"
|
"../../../src/browser/*"
|
||||||
|
],
|
||||||
|
"@xterm/addon-serialize": [
|
||||||
|
"../typings/addon-serialize.d.ts"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
|||||||
@@ -11,7 +11,10 @@
|
|||||||
"paths": {
|
"paths": {
|
||||||
"common/*": ["../../../src/common/*"],
|
"common/*": ["../../../src/common/*"],
|
||||||
"browser/*": ["../../../src/browser/*"],
|
"browser/*": ["../../../src/browser/*"],
|
||||||
"UnicodeGraphemeProvider": ["../src/UnicodeGraphemeProvider"]
|
"UnicodeGraphemeProvider": ["../src/UnicodeGraphemeProvider"],
|
||||||
|
"@xterm/addon-unicode-graphemes": [
|
||||||
|
"../typings/addon-unicode-graphemes.d.ts"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": ["../**/*", "../../../typings/xterm.d.ts"],
|
"include": ["../**/*", "../../../typings/xterm.d.ts"],
|
||||||
|
|||||||
@@ -5,11 +5,11 @@
|
|||||||
* UnicodeVersionProvider for V15 with grapeme cluster handleing.
|
* UnicodeVersionProvider for V15 with grapeme cluster handleing.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Terminal, ITerminalAddon, IUnicodeHandling } from '@xterm/xterm';
|
import type { Terminal, ITerminalAddon, IUnicodeHandling } from '@xterm/xterm';
|
||||||
|
import type { UnicodeGraphemesAddon as IUnicodeGraphemesApi } from '@xterm/addon-unicode-graphemes';
|
||||||
import { UnicodeGraphemeProvider } from './UnicodeGraphemeProvider';
|
import { UnicodeGraphemeProvider } from './UnicodeGraphemeProvider';
|
||||||
|
|
||||||
|
export class UnicodeGraphemesAddon implements ITerminalAddon , IUnicodeGraphemesApi {
|
||||||
export class UnicodeGraphemesAddon implements ITerminalAddon {
|
|
||||||
private _provider15Graphemes?: UnicodeGraphemeProvider;
|
private _provider15Graphemes?: UnicodeGraphemeProvider;
|
||||||
private _provider15?: UnicodeGraphemeProvider;
|
private _provider15?: UnicodeGraphemeProvider;
|
||||||
private _unicode?: IUnicodeHandling;
|
private _unicode?: IUnicodeHandling;
|
||||||
|
|||||||
@@ -15,6 +15,9 @@
|
|||||||
"paths": {
|
"paths": {
|
||||||
"common/*": [
|
"common/*": [
|
||||||
"../../../src/common/*"
|
"../../../src/common/*"
|
||||||
|
],
|
||||||
|
"@xterm/addon-unicode-graphemes": [
|
||||||
|
"../typings/addon-unicode-graphemes.d.ts"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"types": [
|
"types": [
|
||||||
|
|||||||
@@ -5,11 +5,11 @@
|
|||||||
* UnicodeVersionProvider for V11.
|
* UnicodeVersionProvider for V11.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Terminal, ITerminalAddon } from '@xterm/xterm';
|
import type { Terminal, ITerminalAddon } from '@xterm/xterm';
|
||||||
|
import type { Unicode11Addon as IUnicode11Api } from '@xterm/addon-unicode11';
|
||||||
import { UnicodeV11 } from './UnicodeV11';
|
import { UnicodeV11 } from './UnicodeV11';
|
||||||
|
|
||||||
|
export class Unicode11Addon implements ITerminalAddon , IUnicode11Api {
|
||||||
export class Unicode11Addon implements ITerminalAddon {
|
|
||||||
public activate(terminal: Terminal): void {
|
public activate(terminal: Terminal): void {
|
||||||
terminal.unicode.register(new UnicodeV11());
|
terminal.unicode.register(new UnicodeV11());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,9 @@
|
|||||||
"paths": {
|
"paths": {
|
||||||
"common/*": [
|
"common/*": [
|
||||||
"../../../src/common/*"
|
"../../../src/common/*"
|
||||||
|
],
|
||||||
|
"@xterm/addon-unicode11": [
|
||||||
|
"../typings/addon-unicode11.d.ts"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"types": [
|
"types": [
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Terminal, ITerminalAddon, IDisposable } from '@xterm/xterm';
|
import type { Terminal, ITerminalAddon, IDisposable } from '@xterm/xterm';
|
||||||
|
import type { WebLinksAddon as IWebLinksApi } from '@xterm/addon-web-links';
|
||||||
import { ILinkProviderOptions, WebLinkProvider } from './WebLinkProvider';
|
import { ILinkProviderOptions, WebLinkProvider } from './WebLinkProvider';
|
||||||
|
|
||||||
// consider everthing starting with http:// or https://
|
// consider everthing starting with http:// or https://
|
||||||
@@ -34,7 +35,7 @@ function handleLink(event: MouseEvent, uri: string): void {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class WebLinksAddon implements ITerminalAddon {
|
export class WebLinksAddon implements ITerminalAddon , IWebLinksApi {
|
||||||
private _terminal: Terminal | undefined;
|
private _terminal: Terminal | undefined;
|
||||||
private _linkProvider: IDisposable | undefined;
|
private _linkProvider: IDisposable | undefined;
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,12 @@
|
|||||||
"strict": true,
|
"strict": true,
|
||||||
"types": [
|
"types": [
|
||||||
"../../../node_modules/@types/mocha"
|
"../../../node_modules/@types/mocha"
|
||||||
]
|
],
|
||||||
|
"paths": {
|
||||||
|
"@xterm/addon-web-links": [
|
||||||
|
"../typings/addon-web-links.d.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"./**/*",
|
"./**/*",
|
||||||
|
|||||||
@@ -3,17 +3,18 @@
|
|||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import type { ITerminalAddon, Terminal } from '@xterm/xterm';
|
||||||
|
import type { WebglAddon as IWebglApi } from '@xterm/addon-webgl';
|
||||||
import { ICharacterJoinerService, ICharSizeService, ICoreBrowserService, IRenderService, IThemeService } from 'browser/services/Services';
|
import { ICharacterJoinerService, ICharSizeService, ICoreBrowserService, IRenderService, IThemeService } from 'browser/services/Services';
|
||||||
import { ITerminal } from 'browser/Types';
|
import { ITerminal } from 'browser/Types';
|
||||||
import { EventEmitter, forwardEvent } from 'common/EventEmitter';
|
import { EventEmitter, forwardEvent } from 'common/EventEmitter';
|
||||||
import { Disposable, toDisposable } from 'common/Lifecycle';
|
import { Disposable, toDisposable } from 'common/Lifecycle';
|
||||||
import { getSafariVersion, isSafari } from 'common/Platform';
|
import { getSafariVersion, isSafari } from 'common/Platform';
|
||||||
import { ICoreService, IDecorationService, ILogService, IOptionsService } from 'common/services/Services';
|
import { ICoreService, IDecorationService, ILogService, IOptionsService } from 'common/services/Services';
|
||||||
import { ITerminalAddon, Terminal } from '@xterm/xterm';
|
|
||||||
import { WebglRenderer } from './WebglRenderer';
|
import { WebglRenderer } from './WebglRenderer';
|
||||||
import { setTraceLogger } from 'common/services/LogService';
|
import { setTraceLogger } from 'common/services/LogService';
|
||||||
|
|
||||||
export class WebglAddon extends Disposable implements ITerminalAddon {
|
export class WebglAddon extends Disposable implements ITerminalAddon , IWebglApi {
|
||||||
private _terminal?: Terminal;
|
private _terminal?: Terminal;
|
||||||
private _renderer?: WebglRenderer;
|
private _renderer?: WebglRenderer;
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,9 @@
|
|||||||
],
|
],
|
||||||
"browser/*": [
|
"browser/*": [
|
||||||
"../../../src/browser/*"
|
"../../../src/browser/*"
|
||||||
|
],
|
||||||
|
"@xterm/addon-webgl": [
|
||||||
|
"../typings/addon-webgl.d.ts"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user