diff --git a/.eslintrc.json b/.eslintrc.json index 5d5061d55..41767bedf 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -45,6 +45,15 @@ "allowExpressions": true } ], + "@typescript-eslint/explicit-member-accessibility": [ + "error", + { + "accessibility": "explicit", + "overrides": { + "constructors": "off" + } + } + ], "@typescript-eslint/indent": [ "error", 2 diff --git a/addons/xterm-addon-serialize/benchmark/SerializeAddon.benchmark.ts b/addons/xterm-addon-serialize/benchmark/SerializeAddon.benchmark.ts index 3fa00c0c0..fbc16e03d 100644 --- a/addons/xterm-addon-serialize/benchmark/SerializeAddon.benchmark.ts +++ b/addons/xterm-addon-serialize/benchmark/SerializeAddon.benchmark.ts @@ -11,7 +11,7 @@ import { Terminal } from 'public/Terminal'; import { SerializeAddon } from 'SerializeAddon'; class TestTerminal extends Terminal { - writeSync(data: string): void { + public writeSync(data: string): void { (this as any)._core.writeSync(data); } } diff --git a/addons/xterm-addon-serialize/src/SerializeAddon.ts b/addons/xterm-addon-serialize/src/SerializeAddon.ts index 445c48602..d89177429 100644 --- a/addons/xterm-addon-serialize/src/SerializeAddon.ts +++ b/addons/xterm-addon-serialize/src/SerializeAddon.ts @@ -15,7 +15,7 @@ function constrain(value: number, low: number, high: number): number { abstract class BaseSerializeHandler { constructor(private _buffer: IBuffer) { } - serialize(startRow: number, endRow: number): string { + public serialize(startRow: number, endRow: number): string { // we need two of them to flip between old and new cell const cell1 = this._buffer.getNullCell(); const cell2 = this._buffer.getNullCell(); diff --git a/addons/xterm-addon-web-links/src/WebLinkProvider.ts b/addons/xterm-addon-web-links/src/WebLinkProvider.ts index 5f6460bf9..563108d29 100644 --- a/addons/xterm-addon-web-links/src/WebLinkProvider.ts +++ b/addons/xterm-addon-web-links/src/WebLinkProvider.ts @@ -15,7 +15,7 @@ export class WebLinkProvider implements ILinkProvider { } - provideLink(position: IBufferCellPosition, callback: (link: ILink | undefined) => void): void { + public provideLink(position: IBufferCellPosition, callback: (link: ILink | undefined) => void): void { callback(LinkComputer.computeLink(position, this._regex, this._terminal, this._handler)); } } diff --git a/addons/xterm-addon-webgl/src/WebglRenderer.ts b/addons/xterm-addon-webgl/src/WebglRenderer.ts index b06ff3c38..8d52a35e6 100644 --- a/addons/xterm-addon-webgl/src/WebglRenderer.ts +++ b/addons/xterm-addon-webgl/src/WebglRenderer.ts @@ -16,7 +16,7 @@ import { Disposable } from 'common/Lifecycle'; import { NULL_CELL_CODE } from 'common/buffer/Constants'; import { Terminal, IEvent } from 'xterm'; import { IRenderLayer } from './renderLayer/Types'; -import { IRenderDimensions, IRenderer, IRequestRefreshRowsEvent } from 'browser/renderer/Types'; +import { IRenderDimensions, IRenderer, IRequestRedrawEvent } from 'browser/renderer/Types'; import { IColorSet } from 'browser/Types'; import { EventEmitter } from 'common/EventEmitter'; import { CellData } from 'common/buffer/CellData'; @@ -39,8 +39,8 @@ export class WebglRenderer extends Disposable implements IRenderer { private _core: ITerminal; private _isAttached: boolean; - private _onRequestRefreshRows = new EventEmitter(); - public get onRequestRefreshRows(): IEvent { return this._onRequestRefreshRows.event; } + private _onRequestRedraw = new EventEmitter(); + public get onRequestRedraw(): IEvent { return this._onRequestRedraw.event; } constructor( private _terminal: Terminal, @@ -53,7 +53,7 @@ export class WebglRenderer extends Disposable implements IRenderer { this._renderLayers = [ new LinkRenderLayer(this._core.screenElement, 2, this._colors, this._core), - new CursorRenderLayer(this._core.screenElement, 3, this._colors, this._onRequestRefreshRows) + new CursorRenderLayer(this._core.screenElement, 3, this._colors, this._onRequestRedraw) ]; this.dimensions = { scaledCharWidth: 0, @@ -178,7 +178,7 @@ export class WebglRenderer extends Disposable implements IRenderer { this._rectangleRenderer.updateSelection(this._model.selection, columnSelectMode); this._glyphRenderer.updateSelection(this._model, columnSelectMode); - this._onRequestRefreshRows.fire({ start: 0, end: this._terminal.rows - 1 }); + this._onRequestRedraw.fire({ start: 0, end: this._terminal.rows - 1 }); } public onCursorMove(): void { diff --git a/addons/xterm-addon-webgl/src/renderLayer/CursorRenderLayer.ts b/addons/xterm-addon-webgl/src/renderLayer/CursorRenderLayer.ts index 75201f47d..b2e834d30 100644 --- a/addons/xterm-addon-webgl/src/renderLayer/CursorRenderLayer.ts +++ b/addons/xterm-addon-webgl/src/renderLayer/CursorRenderLayer.ts @@ -8,7 +8,7 @@ import { BaseRenderLayer } from './BaseRenderLayer'; import { ICellData } from 'common/Types'; import { CellData } from 'common/buffer/CellData'; import { IColorSet } from 'browser/Types'; -import { IRenderDimensions, IRequestRefreshRowsEvent } from 'browser/renderer/Types'; +import { IRenderDimensions, IRequestRedrawEvent } from 'browser/renderer/Types'; import { IEventEmitter } from 'common/EventEmitter'; interface ICursorState { @@ -34,7 +34,7 @@ export class CursorRenderLayer extends BaseRenderLayer { container: HTMLElement, zIndex: number, colors: IColorSet, - private _onRequestRefreshRowsEvent: IEventEmitter + private _onRequestRefreshRowsEvent: IEventEmitter ) { super(container, 'cursor', zIndex, true, colors); this._state = { diff --git a/package.json b/package.json index 31771a888..cfd83fc98 100644 --- a/package.json +++ b/package.json @@ -40,14 +40,14 @@ "@types/debug": "^4.1.5", "@types/deep-equal": "^1.0.1", "@types/glob": "^7.1.1", - "@types/jsdom": "^16.2.0", + "@types/jsdom": "^16.2.1", "@types/mocha": "^7.0.2", "@types/node": "^10.17.17", "@types/utf8": "^2.1.6", - "@types/webpack": "^4.41.10", - "@types/ws": "^7.2.3", - "@typescript-eslint/eslint-plugin": "^2.27.0", - "@typescript-eslint/parser": "^2.27.0", + "@types/webpack": "^4.41.11", + "@types/ws": "^7.2.4", + "@typescript-eslint/eslint-plugin": "^2.28.0", + "@typescript-eslint/parser": "^2.28.0", "chai": "^4.2.0", "deep-equal": "^2.0.2", "eslint": "^6.8.0", @@ -61,7 +61,7 @@ "nyc": "^15.0.1", "playwright-core": "^0.11.1", "source-map-loader": "^0.2.4", - "ts-loader": "^6.0.4", + "ts-loader": "^7.0.0", "typescript": "3.8", "utf8": "^3.0.0", "webpack": "^4.35.3", diff --git a/src/InputHandler.test.ts b/src/InputHandler.test.ts index 9b3320b67..84d4dae51 100644 --- a/src/InputHandler.test.ts +++ b/src/InputHandler.test.ts @@ -34,7 +34,7 @@ function getLines(term: TestTerminal, limit: number = term.rows): string[] { } class TestInputHandler extends InputHandler { - get curAttrData(): IAttributeData { return (this as any)._curAttrData; } + public get curAttrData(): IAttributeData { return (this as any)._curAttrData; } } describe('InputHandler', () => { diff --git a/src/InputHandler.ts b/src/InputHandler.ts index 95738f651..3717256e8 100644 --- a/src/InputHandler.ts +++ b/src/InputHandler.ts @@ -137,15 +137,15 @@ class DECRQSS implements IDcsHandler { private _optionsService: IOptionsService ) { } - hook(params: IParams): void { + public hook(params: IParams): void { this._data = new Uint32Array(0); } - put(data: Uint32Array, start: number, end: number): void { + public put(data: Uint32Array, start: number, end: number): void { this._data = concat(this._data, data.subarray(start, end)); } - unhook(success: boolean): void { + public unhook(success: boolean): void { if (!success) { this._data = new Uint32Array(0); return; diff --git a/src/Terminal.test.ts b/src/Terminal.test.ts index 84879b764..e2bd4d56c 100644 --- a/src/Terminal.test.ts +++ b/src/Terminal.test.ts @@ -1416,14 +1416,14 @@ class TestLinkifier extends Linkifier { } class TestMouseZoneManager implements IMouseZoneManager { - dispose(): void { + public dispose(): void { } public clears: number = 0; public zones: IMouseZone[] = []; - add(zone: IMouseZone): void { + public add(zone: IMouseZone): void { this.zones.push(zone); } - clearAll(): void { + public clearAll(): void { this.clears++; } } diff --git a/src/Terminal.ts b/src/Terminal.ts index ee2261151..ea6898775 100644 --- a/src/Terminal.ts +++ b/src/Terminal.ts @@ -543,7 +543,7 @@ export class Terminal extends Disposable implements ITerminal, IDisposable, IInp const renderer = this._createRenderer(); this._renderService = this._instantiationService.createInstance(RenderService, renderer, this.rows, this.screenElement); this._instantiationService.setService(IRenderService, this._renderService); - this._renderService.onRender(e => this._onRender.fire(e)); + this._renderService.onRenderedBufferChange(e => this._onRender.fire(e)); this.onResize(e => this._renderService.resize(e.cols, e.rows)); this._soundService = this._instantiationService.createInstance(SoundService); diff --git a/src/TestUtils.test.ts b/src/TestUtils.test.ts index 5d8347abb..cac0a43de 100644 --- a/src/TestUtils.test.ts +++ b/src/TestUtils.test.ts @@ -3,7 +3,7 @@ * @license MIT */ -import { IRenderer, IRenderDimensions, CharacterJoinerHandler, IRequestRefreshRowsEvent } from 'browser/renderer/Types'; +import { IRenderer, IRenderDimensions, CharacterJoinerHandler, IRequestRedrawEvent } from 'browser/renderer/Types'; import { IInputHandlingTerminal, ICompositionHelper, ITerminal, IBrowser, ITerminalOptions } from './Types'; import { IBuffer, IBufferStringIterator, IBufferSet } from 'common/buffer/Types'; import { IBufferLine, ICellData, IAttributeData, ICircularList, XtermListener, ICharset } from 'common/Types'; @@ -19,342 +19,342 @@ import { IParams, IFunctionIdentifier } from 'common/parser/Types'; import { ISelectionService } from 'browser/services/Services'; export class TestTerminal extends Terminal { - get curAttrData(): IAttributeData { return (this as any)._inputHandler._curAttrData; } - keyDown(ev: any): boolean { return this._keyDown(ev); } - keyPress(ev: any): boolean { return this._keyPress(ev); } + public get curAttrData(): IAttributeData { return (this as any)._inputHandler._curAttrData; } + public keyDown(ev: any): boolean { return this._keyDown(ev); } + public keyPress(ev: any): boolean { return this._keyPress(ev); } } export class MockTerminal implements ITerminal { - onBlur: IEvent; - onFocus: IEvent; - onA11yChar: IEvent; - onA11yTab: IEvent; - onCursorMove: IEvent; - onLineFeed: IEvent; - onSelectionChange: IEvent; - onData: IEvent; - onBinary: IEvent; - onTitleChange: IEvent; - onScroll: IEvent; - onKey: IEvent<{ key: string, domEvent: KeyboardEvent }>; - onRender: IEvent<{ start: number, end: number }>; - onResize: IEvent<{ cols: number, rows: number }>; - markers: IMarker[]; - optionsService: IOptionsService; - unicodeService: IUnicodeService; - addMarker(cursorYOffset: number): IMarker { + public onBlur: IEvent; + public onFocus: IEvent; + public onA11yChar: IEvent; + public onA11yTab: IEvent; + public onCursorMove: IEvent; + public onLineFeed: IEvent; + public onSelectionChange: IEvent; + public onData: IEvent; + public onBinary: IEvent; + public onTitleChange: IEvent; + public onScroll: IEvent; + public onKey: IEvent<{ key: string, domEvent: KeyboardEvent }>; + public onRender: IEvent<{ start: number, end: number }>; + public onResize: IEvent<{ cols: number, rows: number }>; + public markers: IMarker[]; + public optionsService: IOptionsService; + public unicodeService: IUnicodeService; + public addMarker(cursorYOffset: number): IMarker { throw new Error('Method not implemented.'); } - selectLines(start: number, end: number): void { + public selectLines(start: number, end: number): void { throw new Error('Method not implemented.'); } - scrollToLine(line: number): void { + public scrollToLine(line: number): void { throw new Error('Method not implemented.'); } - static string: any; - setOption(key: any, value: any): void { + public static string: any; + public setOption(key: any, value: any): void { throw new Error('Method not implemented.'); } - blur(): void { + public blur(): void { throw new Error('Method not implemented.'); } - focus(): void { + public focus(): void { throw new Error('Method not implemented.'); } - resize(columns: number, rows: number): void { + public resize(columns: number, rows: number): void { throw new Error('Method not implemented.'); } - writeln(data: string): void { + public writeln(data: string): void { throw new Error('Method not implemented.'); } - paste(data: string): void { + public paste(data: string): void { throw new Error('Method not implemented.'); } - open(parent: HTMLElement): void { + public open(parent: HTMLElement): void { throw new Error('Method not implemented.'); } - attachCustomKeyEventHandler(customKeyEventHandler: (event: KeyboardEvent) => boolean): void { + public attachCustomKeyEventHandler(customKeyEventHandler: (event: KeyboardEvent) => boolean): void { throw new Error('Method not implemented.'); } - addCsiHandler(id: IFunctionIdentifier, callback: (params: IParams) => boolean): IDisposable { + public addCsiHandler(id: IFunctionIdentifier, callback: (params: IParams) => boolean): IDisposable { throw new Error('Method not implemented.'); } - addDcsHandler(id: IFunctionIdentifier, callback: (data: string, param: IParams) => boolean): IDisposable { + public addDcsHandler(id: IFunctionIdentifier, callback: (data: string, param: IParams) => boolean): IDisposable { throw new Error('Method not implemented.'); } - addEscHandler(id: IFunctionIdentifier, handler: () => boolean): IDisposable { + public addEscHandler(id: IFunctionIdentifier, handler: () => boolean): IDisposable { throw new Error('Method not implemented.'); } - addOscHandler(ident: number, callback: (data: string) => boolean): IDisposable { + public addOscHandler(ident: number, callback: (data: string) => boolean): IDisposable { throw new Error('Method not implemented.'); } - registerLinkMatcher(regex: RegExp, handler: (event: MouseEvent, uri: string) => boolean | void, options?: ILinkMatcherOptions): number { + public registerLinkMatcher(regex: RegExp, handler: (event: MouseEvent, uri: string) => boolean | void, options?: ILinkMatcherOptions): number { throw new Error('Method not implemented.'); } - deregisterLinkMatcher(matcherId: number): void { + public deregisterLinkMatcher(matcherId: number): void { throw new Error('Method not implemented.'); } - registerLinkProvider(linkProvider: ILinkProvider): IDisposable { + public registerLinkProvider(linkProvider: ILinkProvider): IDisposable { throw new Error('Method not implemented.'); } - hasSelection(): boolean { + public hasSelection(): boolean { throw new Error('Method not implemented.'); } - getSelection(): string { + public getSelection(): string { throw new Error('Method not implemented.'); } - getSelectionPosition(): ISelectionPosition | undefined { + public getSelectionPosition(): ISelectionPosition | undefined { throw new Error('Method not implemented.'); } - clearSelection(): void { + public clearSelection(): void { throw new Error('Method not implemented.'); } - select(column: number, row: number, length: number): void { + public select(column: number, row: number, length: number): void { throw new Error('Method not implemented.'); } - selectAll(): void { + public selectAll(): void { throw new Error('Method not implemented.'); } - dispose(): void { + public dispose(): void { throw new Error('Method not implemented.'); } - scrollPages(pageCount: number): void { + public scrollPages(pageCount: number): void { throw new Error('Method not implemented.'); } - scrollToTop(): void { + public scrollToTop(): void { throw new Error('Method not implemented.'); } - scrollToBottom(): void { + public scrollToBottom(): void { throw new Error('Method not implemented.'); } - clear(): void { + public clear(): void { throw new Error('Method not implemented.'); } - write(data: string): void { + public write(data: string): void { throw new Error('Method not implemented.'); } - writeUtf8(data: Uint8Array): void { + public writeUtf8(data: Uint8Array): void { throw new Error('Method not implemented.'); } - bracketedPasteMode: boolean; - renderer: IRenderer; - linkifier: ILinkifier; - linkifier2: ILinkifier2; - isFocused: boolean; - options: ITerminalOptions = {}; - element: HTMLElement; - screenElement: HTMLElement; - rowContainer: HTMLElement; - selectionContainer: HTMLElement; - selectionService: ISelectionService; - textarea: HTMLTextAreaElement; - rows: number; - cols: number; - browser: IBrowser = Browser; - writeBuffer: string[]; - children: HTMLElement[]; - cursorHidden: boolean; - cursorState: number; - scrollback: number; - buffers: IBufferSet; - buffer: IBuffer; - viewport: IViewport; - applicationCursor: boolean; - handler(data: string): void { + public bracketedPasteMode: boolean; + public renderer: IRenderer; + public linkifier: ILinkifier; + public linkifier2: ILinkifier2; + public isFocused: boolean; + public options: ITerminalOptions = {}; + public element: HTMLElement; + public screenElement: HTMLElement; + public rowContainer: HTMLElement; + public selectionContainer: HTMLElement; + public selectionService: ISelectionService; + public textarea: HTMLTextAreaElement; + public rows: number; + public cols: number; + public browser: IBrowser = Browser; + public writeBuffer: string[]; + public children: HTMLElement[]; + public cursorHidden: boolean; + public cursorState: number; + public scrollback: number; + public buffers: IBufferSet; + public buffer: IBuffer; + public viewport: IViewport; + public applicationCursor: boolean; + public handler(data: string): void { throw new Error('Method not implemented.'); } - on(event: string, callback: (...args: any[]) => void): void { + public on(event: string, callback: (...args: any[]) => void): void { throw new Error('Method not implemented.'); } - off(type: string, listener: XtermListener): void { + public off(type: string, listener: XtermListener): void { throw new Error('Method not implemented.'); } - addDisposableListener(type: string, handler: XtermListener): IDisposable { + public addDisposableListener(type: string, handler: XtermListener): IDisposable { throw new Error('Method not implemented.'); } - scrollLines(disp: number, suppressScrollEvent: boolean): void { + public scrollLines(disp: number, suppressScrollEvent: boolean): void { throw new Error('Method not implemented.'); } - scrollToRow(absoluteRow: number): number { + public scrollToRow(absoluteRow: number): number { throw new Error('Method not implemented.'); } - cancel(ev: Event, force?: boolean): void { + public cancel(ev: Event, force?: boolean): void { throw new Error('Method not implemented.'); } - log(text: string): void { + public log(text: string): void { throw new Error('Method not implemented.'); } - emit(event: string, data: any): void { + public emit(event: string, data: any): void { throw new Error('Method not implemented.'); } - reset(): void { + public reset(): void { throw new Error('Method not implemented.'); } - showCursor(): void { + public showCursor(): void { throw new Error('Method not implemented.'); } - refresh(start: number, end: number): void { + public refresh(start: number, end: number): void { throw new Error('Method not implemented.'); } - registerCharacterJoiner(handler: CharacterJoinerHandler): number { return 0; } - deregisterCharacterJoiner(joinerId: number): void { } + public registerCharacterJoiner(handler: CharacterJoinerHandler): number { return 0; } + public deregisterCharacterJoiner(joinerId: number): void { } } export class MockInputHandlingTerminal implements IInputHandlingTerminal { - onA11yCharEmitter: EventEmitter; - onA11yTabEmitter: EventEmitter; - insertMode: boolean; - bracketedPasteMode: boolean; - sendFocus: boolean; - buffers: IBufferSet; - buffer: IBuffer = new MockBuffer(); - viewport: IViewport; - scroll(eraseAttr: IAttributeData, isWrapped?: boolean): void { + public onA11yCharEmitter: EventEmitter; + public onA11yTabEmitter: EventEmitter; + public insertMode: boolean; + public bracketedPasteMode: boolean; + public sendFocus: boolean; + public buffers: IBufferSet; + public buffer: IBuffer = new MockBuffer(); + public viewport: IViewport; + public scroll(eraseAttr: IAttributeData, isWrapped?: boolean): void { throw new Error('Method not implemented.'); } - is(term: string): boolean { + public is(term: string): boolean { throw new Error('Method not implemented.'); } - resize(x: number, y: number): void { + public resize(x: number, y: number): void { throw new Error('Method not implemented.'); } - showCursor(): void { + public showCursor(): void { throw new Error('Method not implemented.'); } - handler(data: string): void { + public handler(data: string): void { throw new Error('Method not implemented.'); } - handleTitle(title: string): void { + public handleTitle(title: string): void { throw new Error('Method not implemented.'); } } export class MockBuffer implements IBuffer { - markers: IMarker[]; - addMarker(y: number): IMarker { + public markers: IMarker[]; + public addMarker(y: number): IMarker { throw new Error('Method not implemented.'); } - isCursorInViewport: boolean; - lines: ICircularList; - ydisp: number; - ybase: number; - hasScrollback: boolean; - y: number; - x: number; - tabs: any; - scrollBottom: number; - scrollTop: number; - savedY: number; - savedX: number; - savedCharset: ICharset | null; - savedCurAttrData = new AttributeData(); - translateBufferLineToString(lineIndex: number, trimRight: boolean, startCol?: number, endCol?: number): string { + public isCursorInViewport: boolean; + public lines: ICircularList; + public ydisp: number; + public ybase: number; + public hasScrollback: boolean; + public y: number; + public x: number; + public tabs: any; + public scrollBottom: number; + public scrollTop: number; + public savedY: number; + public savedX: number; + public savedCharset: ICharset | null; + public savedCurAttrData = new AttributeData(); + public translateBufferLineToString(lineIndex: number, trimRight: boolean, startCol?: number, endCol?: number): string { return Buffer.prototype.translateBufferLineToString.apply(this, arguments); } - getWrappedRangeForLine(y: number): { first: number, last: number } { + public getWrappedRangeForLine(y: number): { first: number, last: number } { return Buffer.prototype.getWrappedRangeForLine.apply(this, arguments); } - nextStop(x?: number): number { + public nextStop(x?: number): number { throw new Error('Method not implemented.'); } - prevStop(x?: number): number { + public prevStop(x?: number): number { throw new Error('Method not implemented.'); } - setLines(lines: ICircularList): void { + public setLines(lines: ICircularList): void { this.lines = lines; } - getBlankLine(attr: IAttributeData, isWrapped?: boolean): IBufferLine { + public getBlankLine(attr: IAttributeData, isWrapped?: boolean): IBufferLine { return Buffer.prototype.getBlankLine.apply(this, arguments); } - stringIndexToBufferIndex(lineIndex: number, stringIndex: number): number[] { + public stringIndexToBufferIndex(lineIndex: number, stringIndex: number): number[] { return Buffer.prototype.stringIndexToBufferIndex.apply(this, arguments); } - iterator(trimRight: boolean, startIndex?: number, endIndex?: number): IBufferStringIterator { + public iterator(trimRight: boolean, startIndex?: number, endIndex?: number): IBufferStringIterator { return Buffer.prototype.iterator.apply(this, arguments); } - getNullCell(attr?: IAttributeData): ICellData { + public getNullCell(attr?: IAttributeData): ICellData { throw new Error('Method not implemented.'); } - getWhitespaceCell(attr?: IAttributeData): ICellData { + public getWhitespaceCell(attr?: IAttributeData): ICellData { throw new Error('Method not implemented.'); } } export class MockRenderer implements IRenderer { - onRequestRefreshRows: IEvent; - onCanvasResize: IEvent<{ width: number, height: number }>; - onRender: IEvent<{ start: number, end: number }>; - dispose(): void { + public onRequestRedraw: IEvent; + public onCanvasResize: IEvent<{ width: number, height: number }>; + public onRender: IEvent<{ start: number, end: number }>; + public dispose(): void { throw new Error('Method not implemented.'); } - colorManager: IColorManager; - on(type: string, listener: XtermListener): void { + public colorManager: IColorManager; + public on(type: string, listener: XtermListener): void { throw new Error('Method not implemented.'); } - off(type: string, listener: XtermListener): void { + public off(type: string, listener: XtermListener): void { throw new Error('Method not implemented.'); } - emit(type: string, data?: any): void { + public emit(type: string, data?: any): void { throw new Error('Method not implemented.'); } - addDisposableListener(type: string, handler: XtermListener): IDisposable { + public addDisposableListener(type: string, handler: XtermListener): IDisposable { throw new Error('Method not implemented.'); } - dimensions: IRenderDimensions; - setColors(colors: IColorSet): void { + public dimensions: IRenderDimensions; + public setColors(colors: IColorSet): void { throw new Error('Method not implemented.'); } - onResize(cols: number, rows: number): void { } - onCharSizeChanged(): void { } - onBlur(): void { } - onFocus(): void { } - onSelectionChanged(start: [number, number], end: [number, number]): void { } - onCursorMove(): void { } - onOptionsChanged(): void { } - onDevicePixelRatioChange(): void { } - clear(): void { } - renderRows(start: number, end: number): void { } - registerCharacterJoiner(handler: CharacterJoinerHandler): number { return 0; } - deregisterCharacterJoiner(): boolean { return true; } + public onResize(cols: number, rows: number): void { } + public onCharSizeChanged(): void { } + public onBlur(): void { } + public onFocus(): void { } + public onSelectionChanged(start: [number, number], end: [number, number]): void { } + public onCursorMove(): void { } + public onOptionsChanged(): void { } + public onDevicePixelRatioChange(): void { } + public clear(): void { } + public renderRows(start: number, end: number): void { } + public registerCharacterJoiner(handler: CharacterJoinerHandler): number { return 0; } + public deregisterCharacterJoiner(): boolean { return true; } } export class MockViewport implements IViewport { - dispose(): void { + public dispose(): void { throw new Error('Method not implemented.'); } - scrollBarWidth: number = 0; - onThemeChange(colors: IColorSet): void { + public scrollBarWidth: number = 0; + public onThemeChange(colors: IColorSet): void { throw new Error('Method not implemented.'); } - onWheel(ev: WheelEvent): boolean { + public onWheel(ev: WheelEvent): boolean { throw new Error('Method not implemented.'); } - onTouchStart(ev: TouchEvent): void { + public onTouchStart(ev: TouchEvent): void { throw new Error('Method not implemented.'); } - onTouchMove(ev: TouchEvent): boolean { + public onTouchMove(ev: TouchEvent): boolean { throw new Error('Method not implemented.'); } - syncScrollArea(): void { } - getLinesScrolled(ev: WheelEvent): number { + public syncScrollArea(): void { } + public getLinesScrolled(ev: WheelEvent): number { throw new Error('Method not implemented.'); } } export class MockCompositionHelper implements ICompositionHelper { - compositionstart(): void { + public compositionstart(): void { throw new Error('Method not implemented.'); } - compositionupdate(ev: CompositionEvent): void { + public compositionupdate(ev: CompositionEvent): void { throw new Error('Method not implemented.'); } - compositionend(): void { + public compositionend(): void { throw new Error('Method not implemented.'); } - updateCompositionElements(dontRecurse?: boolean): void { + public updateCompositionElements(dontRecurse?: boolean): void { throw new Error('Method not implemented.'); } - keydown(ev: KeyboardEvent): boolean { + public keydown(ev: KeyboardEvent): boolean { return true; } } diff --git a/src/browser/Linkifier.test.ts b/src/browser/Linkifier.test.ts index f107d646d..c0dc6bf6d 100644 --- a/src/browser/Linkifier.test.ts +++ b/src/browser/Linkifier.test.ts @@ -24,14 +24,14 @@ class TestLinkifier extends Linkifier { } class TestMouseZoneManager implements IMouseZoneManager { - dispose(): void { + public dispose(): void { } public clears: number = 0; public zones: IMouseZone[] = []; - add(zone: IMouseZone): void { + public add(zone: IMouseZone): void { this.zones.push(zone); } - clearAll(): void { + public clearAll(): void { this.clears++; } } diff --git a/src/browser/Linkifier2.ts b/src/browser/Linkifier2.ts index 893677188..7030e5d2b 100644 --- a/src/browser/Linkifier2.ts +++ b/src/browser/Linkifier2.ts @@ -50,7 +50,7 @@ export class Linkifier2 implements ILinkifier2 { this._renderService = renderService; this._element.addEventListener('mousemove', this._onMouseMove.bind(this)); - this._element.addEventListener('click', this._onMouseDown.bind(this)); + this._element.addEventListener('click', this._onClick.bind(this)); } private _onMouseMove(event: MouseEvent): void { @@ -125,7 +125,7 @@ export class Linkifier2 implements ILinkifier2 { }); } - private _onMouseDown(event: MouseEvent): void { + private _onClick(event: MouseEvent): void { if (!this._element || !this._mouseService || !this._currentLink) { return; } @@ -173,7 +173,7 @@ export class Linkifier2 implements ILinkifier2 { // Add listener for rerendering if (this._renderService) { - this._linkCacheDisposables.push(this._renderService.onRender(e => { + this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(e => { this._clearCurrentLink(e.start + 1 + this._bufferService.buffer.ydisp, e.end + 1 + this._bufferService.buffer.ydisp); })); } diff --git a/src/browser/MouseZoneManager.ts b/src/browser/MouseZoneManager.ts index d697c1334..59b6b0f1d 100644 --- a/src/browser/MouseZoneManager.ts +++ b/src/browser/MouseZoneManager.ts @@ -7,9 +7,7 @@ import { Disposable } from 'common/Lifecycle'; import { addDisposableDomListener } from 'browser/Lifecycle'; import { IMouseService, ISelectionService } from 'browser/services/Services'; import { IMouseZoneManager, IMouseZone } from 'browser/Types'; -import { IBufferService } from 'common/services/Services'; - -const HOVER_DURATION = 500; +import { IBufferService, IOptionsService } from 'common/services/Services'; /** * The MouseZoneManager allows components to register zones within the terminal @@ -37,7 +35,8 @@ export class MouseZoneManager extends Disposable implements IMouseZoneManager { private readonly _screenElement: HTMLElement, @IBufferService private readonly _bufferService: IBufferService, @IMouseService private readonly _mouseService: IMouseService, - @ISelectionService private readonly _selectionService: ISelectionService + @ISelectionService private readonly _selectionService: ISelectionService, + @IOptionsService private readonly _optionsService: IOptionsService ) { super(); @@ -151,7 +150,7 @@ export class MouseZoneManager extends Disposable implements IMouseZoneManager { } // Restart the tooltip timeout - this._tooltipTimeout = setTimeout(() => this._onTooltip(e), HOVER_DURATION); + this._tooltipTimeout = window.setTimeout(() => this._onTooltip(e), this._optionsService.options.linkTooltipHoverDuration); } private _onTooltip(e: MouseEvent): void { diff --git a/src/browser/TestUtils.test.ts b/src/browser/TestUtils.test.ts index 3e304bcfc..96d1eae09 100644 --- a/src/browser/TestUtils.test.ts +++ b/src/browser/TestUtils.test.ts @@ -9,15 +9,15 @@ import { IRenderDimensions, IRenderer, CharacterJoinerHandler } from 'browser/re import { IColorSet } from 'browser/Types'; export class MockCharSizeService implements ICharSizeService { - serviceBrand: any; - get hasValidSize(): boolean { return this.width > 0 && this.height > 0; } - onCharSizeChange: IEvent = new EventEmitter().event; + public serviceBrand: any; + public get hasValidSize(): boolean { return this.width > 0 && this.height > 0; } + public onCharSizeChange: IEvent = new EventEmitter().event; constructor(public width: number, public height: number) {} - measure(): void {} + public measure(): void {} } export class MockMouseService implements IMouseService { - serviceBrand: any; + public serviceBrand: any; public getCoords(event: {clientX: number, clientY: number}, element: HTMLElement, colCount: number, rowCount: number, isSelection?: boolean): [number, number] | undefined { throw new Error('Not implemented'); } @@ -28,11 +28,11 @@ export class MockMouseService implements IMouseService { } export class MockRenderService implements IRenderService { - serviceBrand: any; - onDimensionsChange: IEvent = new EventEmitter().event; - onRender: IEvent<{ start: number, end: number }, void> = new EventEmitter<{ start: number, end: number }>().event; - onRefreshRequest: IEvent<{ start: number, end: number}, void> = new EventEmitter<{ start: number, end: number }>().event; - dimensions: IRenderDimensions = { + public serviceBrand: any; + public onDimensionsChange: IEvent = new EventEmitter().event; + public onRenderedBufferChange: IEvent<{ start: number, end: number }, void> = new EventEmitter<{ start: number, end: number }>().event; + public onRefreshRequest: IEvent<{ start: number, end: number}, void> = new EventEmitter<{ start: number, end: number }>().event; + public dimensions: IRenderDimensions = { scaledCharWidth: 0, scaledCharHeight: 0, scaledCellWidth: 0, @@ -46,52 +46,52 @@ export class MockRenderService implements IRenderService { actualCellWidth: 0, actualCellHeight: 0 }; - refreshRows(start: number, end: number): void { + public refreshRows(start: number, end: number): void { throw new Error('Method not implemented.'); } - resize(cols: number, rows: number): void { + public resize(cols: number, rows: number): void { throw new Error('Method not implemented.'); } - changeOptions(): void { + public changeOptions(): void { throw new Error('Method not implemented.'); } - setRenderer(renderer: IRenderer): void { + public setRenderer(renderer: IRenderer): void { throw new Error('Method not implemented.'); } - setColors(colors: IColorSet): void { + public setColors(colors: IColorSet): void { throw new Error('Method not implemented.'); } - onDevicePixelRatioChange(): void { + public onDevicePixelRatioChange(): void { throw new Error('Method not implemented.'); } - onResize(cols: number, rows: number): void { + public onResize(cols: number, rows: number): void { throw new Error('Method not implemented.'); } - onCharSizeChanged(): void { + public onCharSizeChanged(): void { throw new Error('Method not implemented.'); } - onBlur(): void { + public onBlur(): void { throw new Error('Method not implemented.'); } - onFocus(): void { + public onFocus(): void { throw new Error('Method not implemented.'); } - onSelectionChanged(start: [number, number], end: [number, number], columnSelectMode: boolean): void { + public onSelectionChanged(start: [number, number], end: [number, number], columnSelectMode: boolean): void { throw new Error('Method not implemented.'); } - onCursorMove(): void { + public onCursorMove(): void { throw new Error('Method not implemented.'); } - clear(): void { + public clear(): void { throw new Error('Method not implemented.'); } - registerCharacterJoiner(handler: CharacterJoinerHandler): number { + public registerCharacterJoiner(handler: CharacterJoinerHandler): number { throw new Error('Method not implemented.'); } - deregisterCharacterJoiner(joinerId: number): boolean { + public deregisterCharacterJoiner(joinerId: number): boolean { throw new Error('Method not implemented.'); } - dispose(): void { + public dispose(): void { throw new Error('Method not implemented.'); } } diff --git a/src/browser/renderer/CursorRenderLayer.ts b/src/browser/renderer/CursorRenderLayer.ts index 607180ae0..d358d580b 100644 --- a/src/browser/renderer/CursorRenderLayer.ts +++ b/src/browser/renderer/CursorRenderLayer.ts @@ -3,7 +3,7 @@ * @license MIT */ -import { IRenderDimensions, IRequestRefreshRowsEvent } from 'browser/renderer/Types'; +import { IRenderDimensions, IRequestRedrawEvent } from 'browser/renderer/Types'; import { BaseRenderLayer } from 'browser/renderer/BaseRenderLayer'; import { ICellData } from 'common/Types'; import { CellData } from 'common/buffer/CellData'; @@ -36,9 +36,9 @@ export class CursorRenderLayer extends BaseRenderLayer { zIndex: number, colors: IColorSet, rendererId: number, - private _onRequestRefreshRowsEvent: IEventEmitter, - readonly bufferService: IBufferService, - readonly optionsService: IOptionsService, + private _onRequestRedraw: IEventEmitter, + bufferService: IBufferService, + optionsService: IOptionsService, private readonly _coreService: ICoreService, private readonly _coreBrowserService: ICoreBrowserService ) { @@ -83,14 +83,14 @@ export class CursorRenderLayer extends BaseRenderLayer { if (this._cursorBlinkStateManager) { this._cursorBlinkStateManager.pause(); } - this._onRequestRefreshRowsEvent.fire({ start: this._bufferService.buffer.y, end: this._bufferService.buffer.y }); + this._onRequestRedraw.fire({ start: this._bufferService.buffer.y, end: this._bufferService.buffer.y }); } public onFocus(): void { if (this._cursorBlinkStateManager) { this._cursorBlinkStateManager.resume(); } else { - this._onRequestRefreshRowsEvent.fire({ start: this._bufferService.buffer.y, end: this._bufferService.buffer.y }); + this._onRequestRedraw.fire({ start: this._bufferService.buffer.y, end: this._bufferService.buffer.y }); } } @@ -107,7 +107,7 @@ export class CursorRenderLayer extends BaseRenderLayer { } // Request a refresh from the terminal as management of rendering is being // moved back to the terminal - this._onRequestRefreshRowsEvent.fire({ start: this._bufferService.buffer.y, end: this._bufferService.buffer.y }); + this._onRequestRedraw.fire({ start: this._bufferService.buffer.y, end: this._bufferService.buffer.y }); } public onCursorMove(): void { diff --git a/src/browser/renderer/LinkRenderLayer.ts b/src/browser/renderer/LinkRenderLayer.ts index 73e9f85f0..33f80cdc3 100644 --- a/src/browser/renderer/LinkRenderLayer.ts +++ b/src/browser/renderer/LinkRenderLayer.ts @@ -20,8 +20,8 @@ export class LinkRenderLayer extends BaseRenderLayer { rendererId: number, linkifier: ILinkifier, linkifier2: ILinkifier2, - readonly bufferService: IBufferService, - readonly optionsService: IOptionsService + bufferService: IBufferService, + optionsService: IOptionsService ) { super(container, 'link', zIndex, true, colors, rendererId, bufferService, optionsService); linkifier.onLinkHover(e => this._onLinkHover(e)); diff --git a/src/browser/renderer/Renderer.ts b/src/browser/renderer/Renderer.ts index a1161d4f2..0856553f1 100644 --- a/src/browser/renderer/Renderer.ts +++ b/src/browser/renderer/Renderer.ts @@ -6,7 +6,7 @@ import { TextRenderLayer } from 'browser/renderer/TextRenderLayer'; import { SelectionRenderLayer } from 'browser/renderer/SelectionRenderLayer'; import { CursorRenderLayer } from 'browser/renderer/CursorRenderLayer'; -import { IRenderLayer, IRenderer, IRenderDimensions, CharacterJoinerHandler, ICharacterJoinerRegistry, IRequestRefreshRowsEvent } from 'browser/renderer/Types'; +import { IRenderLayer, IRenderer, IRenderDimensions, CharacterJoinerHandler, ICharacterJoinerRegistry, IRequestRedrawEvent } from 'browser/renderer/Types'; import { LinkRenderLayer } from 'browser/renderer/LinkRenderLayer'; import { CharacterJoinerRegistry } from 'browser/renderer/CharacterJoinerRegistry'; import { Disposable } from 'common/Lifecycle'; @@ -27,19 +27,19 @@ export class Renderer extends Disposable implements IRenderer { public dimensions: IRenderDimensions; - private _onRequestRefreshRows = new EventEmitter(); - public get onRequestRefreshRows(): IEvent { return this._onRequestRefreshRows.event; } + private _onRequestRedraw = new EventEmitter(); + public get onRequestRedraw(): IEvent { return this._onRequestRedraw.event; } constructor( private _colors: IColorSet, private readonly _screenElement: HTMLElement, - readonly linkifier: ILinkifier, - readonly linkifier2: ILinkifier2, + linkifier: ILinkifier, + linkifier2: ILinkifier2, @IBufferService private readonly _bufferService: IBufferService, @ICharSizeService private readonly _charSizeService: ICharSizeService, @IOptionsService private readonly _optionsService: IOptionsService, - @ICoreService readonly coreService: ICoreService, - @ICoreBrowserService readonly coreBrowserService: ICoreBrowserService + @ICoreService coreService: ICoreService, + @ICoreBrowserService coreBrowserService: ICoreBrowserService ) { super(); const allowTransparency = this._optionsService.options.allowTransparency; @@ -49,7 +49,7 @@ export class Renderer extends Disposable implements IRenderer { new TextRenderLayer(this._screenElement, 0, this._colors, this._characterJoinerRegistry, allowTransparency, this._id, this._bufferService, _optionsService), new SelectionRenderLayer(this._screenElement, 1, this._colors, this._id, this._bufferService, _optionsService), new LinkRenderLayer(this._screenElement, 2, this._colors, this._id, linkifier, linkifier2, this._bufferService, _optionsService), - new CursorRenderLayer(this._screenElement, 3, this._colors, this._id, this._onRequestRefreshRows, this._bufferService, _optionsService, coreService, coreBrowserService) + new CursorRenderLayer(this._screenElement, 3, this._colors, this._id, this._onRequestRedraw, this._bufferService, _optionsService, coreService, coreBrowserService) ]; this.dimensions = { scaledCharWidth: 0, diff --git a/src/browser/renderer/SelectionRenderLayer.ts b/src/browser/renderer/SelectionRenderLayer.ts index 5cd2fd913..257944fcb 100644 --- a/src/browser/renderer/SelectionRenderLayer.ts +++ b/src/browser/renderer/SelectionRenderLayer.ts @@ -23,8 +23,8 @@ export class SelectionRenderLayer extends BaseRenderLayer { zIndex: number, colors: IColorSet, rendererId: number, - readonly bufferService: IBufferService, - readonly optionsService: IOptionsService + bufferService: IBufferService, + optionsService: IOptionsService ) { super(container, 'selection', zIndex, true, colors, rendererId, bufferService, optionsService); this._clearState(); diff --git a/src/browser/renderer/TextRenderLayer.ts b/src/browser/renderer/TextRenderLayer.ts index fee261f60..67f0d4842 100644 --- a/src/browser/renderer/TextRenderLayer.ts +++ b/src/browser/renderer/TextRenderLayer.ts @@ -36,8 +36,8 @@ export class TextRenderLayer extends BaseRenderLayer { characterJoinerRegistry: ICharacterJoinerRegistry, alpha: boolean, rendererId: number, - readonly bufferService: IBufferService, - readonly optionsService: IOptionsService + bufferService: IBufferService, + optionsService: IOptionsService ) { super(container, 'text', zIndex, alpha, colors, rendererId, bufferService, optionsService); this._state = new GridCache(); diff --git a/src/browser/renderer/Types.d.ts b/src/browser/renderer/Types.d.ts index b4c321a19..02c62ab2e 100644 --- a/src/browser/renderer/Types.d.ts +++ b/src/browser/renderer/Types.d.ts @@ -24,7 +24,7 @@ export interface IRenderDimensions { actualCellHeight: number; } -export interface IRequestRefreshRowsEvent { +export interface IRequestRedrawEvent { start: number; end: number; } @@ -36,7 +36,11 @@ export interface IRequestRefreshRowsEvent { export interface IRenderer extends IDisposable { readonly dimensions: IRenderDimensions; - readonly onRequestRefreshRows: IEvent; + /** + * Fires when the renderer is requesting to be redrawn on the next animation + * frame but is _not_ a result of content changing (eg. selection changes). + */ + readonly onRequestRedraw: IEvent; dispose(): void; setColors(colors: IColorSet): void; diff --git a/src/browser/renderer/dom/DomRenderer.ts b/src/browser/renderer/dom/DomRenderer.ts index f8ad717bd..a2e370fc4 100644 --- a/src/browser/renderer/dom/DomRenderer.ts +++ b/src/browser/renderer/dom/DomRenderer.ts @@ -3,7 +3,7 @@ * @license MIT */ -import { IRenderer, IRenderDimensions, CharacterJoinerHandler, IRequestRefreshRowsEvent } from 'browser/renderer/Types'; +import { IRenderer, IRenderDimensions, CharacterJoinerHandler, IRequestRedrawEvent } from 'browser/renderer/Types'; import { BOLD_CLASS, ITALIC_CLASS, CURSOR_CLASS, CURSOR_STYLE_BLOCK_CLASS, CURSOR_BLINK_CLASS, CURSOR_STYLE_BAR_CLASS, CURSOR_STYLE_UNDERLINE_CLASS, DomRendererRowFactory } from 'browser/renderer/dom/DomRendererRowFactory'; import { INVERTED_DEFAULT_COLOR } from 'browser/renderer/atlas/Constants'; import { Disposable } from 'common/Lifecycle'; @@ -39,8 +39,7 @@ export class DomRenderer extends Disposable implements IRenderer { public dimensions: IRenderDimensions; - private _onRequestRefreshRows = new EventEmitter(); - public get onRequestRefreshRows(): IEvent { return this._onRequestRefreshRows.event; } + public get onRequestRedraw(): IEvent { return new EventEmitter().event; } constructor( private _colors: IColorSet, diff --git a/src/browser/services/CharSizeService.ts b/src/browser/services/CharSizeService.ts index 0749a4204..7623109ce 100644 --- a/src/browser/services/CharSizeService.ts +++ b/src/browser/services/CharSizeService.ts @@ -8,7 +8,7 @@ import { IEvent, EventEmitter } from 'common/EventEmitter'; import { ICharSizeService } from 'browser/services/Services'; export class CharSizeService implements ICharSizeService { - serviceBrand: any; + public serviceBrand: any; public width: number = 0; public height: number = 0; @@ -20,8 +20,8 @@ export class CharSizeService implements ICharSizeService { public get onCharSizeChange(): IEvent { return this._onCharSizeChange.event; } constructor( - readonly document: Document, - readonly parentElement: HTMLElement, + document: Document, + parentElement: HTMLElement, @IOptionsService private readonly _optionsService: IOptionsService ) { this._measureStrategy = new DomMeasureStrategy(document, parentElement, this._optionsService); diff --git a/src/browser/services/CoreBrowserService.ts b/src/browser/services/CoreBrowserService.ts index e585f44ab..e3207d7bb 100644 --- a/src/browser/services/CoreBrowserService.ts +++ b/src/browser/services/CoreBrowserService.ts @@ -6,7 +6,7 @@ import { ICoreBrowserService } from './Services'; export class CoreBrowserService implements ICoreBrowserService { - serviceBrand: any; + public serviceBrand: any; constructor( private _textarea: HTMLTextAreaElement diff --git a/src/browser/services/MouseService.ts b/src/browser/services/MouseService.ts index b0f8c3580..39df63839 100644 --- a/src/browser/services/MouseService.ts +++ b/src/browser/services/MouseService.ts @@ -7,7 +7,7 @@ import { ICharSizeService, IRenderService, IMouseService } from './Services'; import { getCoords, getRawByteCoords } from 'browser/input/Mouse'; export class MouseService implements IMouseService { - serviceBrand: any; + public serviceBrand: any; constructor( @IRenderService private readonly _renderService: IRenderService, diff --git a/src/browser/services/RenderService.ts b/src/browser/services/RenderService.ts index 2949c2c50..d7ff58147 100644 --- a/src/browser/services/RenderService.ts +++ b/src/browser/services/RenderService.ts @@ -14,20 +14,21 @@ import { IOptionsService } from 'common/services/Services'; import { ICharSizeService, IRenderService } from 'browser/services/Services'; export class RenderService extends Disposable implements IRenderService { - serviceBrand: any; + public serviceBrand: any; private _renderDebouncer: RenderDebouncer; private _screenDprMonitor: ScreenDprMonitor; private _isPaused: boolean = false; private _needsFullRefresh: boolean = false; + private _isNextRenderRedrawOnly: boolean = true; private _canvasWidth: number = 0; private _canvasHeight: number = 0; private _onDimensionsChange = new EventEmitter(); public get onDimensionsChange(): IEvent { return this._onDimensionsChange.event; } private _onRender = new EventEmitter<{ start: number, end: number }>(); - public get onRender(): IEvent<{ start: number, end: number }> { return this._onRender.event; } + public get onRenderedBufferChange(): IEvent<{ start: number, end: number }> { return this._onRender.event; } private _onRefreshRequest = new EventEmitter<{ start: number, end: number }>(); public get onRefreshRequest(): IEvent<{ start: number, end: number }> { return this._onRefreshRequest.event; } @@ -36,9 +37,9 @@ export class RenderService extends Disposable implements IRenderService { constructor( private _renderer: IRenderer, private _rowCount: number, - readonly screenElement: HTMLElement, - @IOptionsService readonly optionsService: IOptionsService, - @ICharSizeService readonly charSizeService: ICharSizeService + screenElement: HTMLElement, + @IOptionsService optionsService: IOptionsService, + @ICharSizeService charSizeService: ICharSizeService ) { super(); this._renderDebouncer = new RenderDebouncer((start, end) => this._renderRows(start, end)); @@ -52,7 +53,7 @@ export class RenderService extends Disposable implements IRenderService { this.register(charSizeService.onCharSizeChange(() => this.onCharSizeChanged())); // No need to register this as renderer is explicitly disposed in RenderService.dispose - this._renderer.onRequestRefreshRows(e => this.refreshRows(e.start, e.end)); + this._renderer.onRequestRedraw(e => this.refreshRows(e.start, e.end, true)); // dprchange should handle this case, we need this as well for browsers that don't support the // matchMedia query. @@ -75,17 +76,23 @@ export class RenderService extends Disposable implements IRenderService { } } - public refreshRows(start: number, end: number): void { + public refreshRows(start: number, end: number, isRedrawOnly: boolean = false): void { if (this._isPaused) { this._needsFullRefresh = true; return; } + if (!isRedrawOnly) { + this._isNextRenderRedrawOnly = false; + } this._renderDebouncer.refresh(start, end, this._rowCount); } private _renderRows(start: number, end: number): void { this._renderer.renderRows(start, end); - this._onRender.fire({ start, end }); + if (!this._isNextRenderRedrawOnly) { + this._onRender.fire({ start, end }); + } + this._isNextRenderRedrawOnly = true; } public resize(cols: number, rows: number): void { @@ -116,7 +123,7 @@ export class RenderService extends Disposable implements IRenderService { // TODO: RenderService should be the only one to dispose the renderer this._renderer.dispose(); this._renderer = renderer; - this._renderer.onRequestRefreshRows(e => this.refreshRows(e.start, e.end)); + this._renderer.onRequestRedraw(e => this.refreshRows(e.start, e.end, true)); this.refreshRows(0, this._rowCount - 1); } diff --git a/src/browser/services/SelectionService.ts b/src/browser/services/SelectionService.ts index 45424d164..43875f1b2 100644 --- a/src/browser/services/SelectionService.ts +++ b/src/browser/services/SelectionService.ts @@ -67,7 +67,7 @@ export const enum SelectionMode { * when the selection is ready to be redrawn (on an animation frame). */ export class SelectionService implements ISelectionService { - serviceBrand: any; + public serviceBrand: any; protected _model: SelectionModel; diff --git a/src/browser/services/Services.ts b/src/browser/services/Services.ts index 785fec34e..3754e6fed 100644 --- a/src/browser/services/Services.ts +++ b/src/browser/services/Services.ts @@ -43,7 +43,11 @@ export interface IRenderService extends IDisposable { serviceBrand: any; onDimensionsChange: IEvent; - onRender: IEvent<{ start: number, end: number }>; + /** + * Fires when buffer changes are rendered. This does not fire when only cursor + * or selections are rendered. + */ + onRenderedBufferChange: IEvent<{ start: number, end: number }>; onRefreshRequest: IEvent<{ start: number, end: number }>; dimensions: IRenderDimensions; diff --git a/src/browser/services/SoundService.ts b/src/browser/services/SoundService.ts index 1772c7504..4b54c9990 100644 --- a/src/browser/services/SoundService.ts +++ b/src/browser/services/SoundService.ts @@ -7,11 +7,11 @@ import { IOptionsService } from 'common/services/Services'; import { ISoundService } from 'browser/services/Services'; export class SoundService implements ISoundService { - serviceBrand: any; + public serviceBrand: any; private static _audioContext: AudioContext; - static get audioContext(): AudioContext | null { + public static get audioContext(): AudioContext | null { if (!SoundService._audioContext) { const audioContextCtor: typeof AudioContext = (window).AudioContext || (window).webkitAudioContext; if (!audioContextCtor) { diff --git a/src/common/TestUtils.test.ts b/src/common/TestUtils.test.ts index cf0979f76..7e024140a 100644 --- a/src/common/TestUtils.test.ts +++ b/src/common/TestUtils.test.ts @@ -13,7 +13,7 @@ import { IDecPrivateModes, ICoreMouseEvent, CoreMouseEventType, ICharset } from import { UnicodeV6 } from 'common/input/UnicodeV6'; export class MockBufferService implements IBufferService { - serviceBrand: any; + public serviceBrand: any; public get buffer(): IBuffer { return this.buffers.active; } public buffers: IBufferSet = {} as any; constructor( @@ -23,86 +23,86 @@ export class MockBufferService implements IBufferService { ) { this.buffers = new BufferSet(optionsService, this); } - resize(cols: number, rows: number): void { + public resize(cols: number, rows: number): void { this.cols = cols; this.rows = rows; } - reset(): void {} + public reset(): void {} } export class MockCoreMouseService implements ICoreMouseService { - activeEncoding: string = ''; - activeProtocol: string = ''; - addEncoding(name: string): void {} - addProtocol(name: string): void {} - reset(): void {} - triggerMouseEvent(event: ICoreMouseEvent): boolean { return false; } - onProtocolChange: IEvent = new EventEmitter().event; - explainEvents(events: CoreMouseEventType): {[event: string]: boolean} { + public activeEncoding: string = ''; + public activeProtocol: string = ''; + public addEncoding(name: string): void {} + public addProtocol(name: string): void {} + public reset(): void {} + public triggerMouseEvent(event: ICoreMouseEvent): boolean { return false; } + public onProtocolChange: IEvent = new EventEmitter().event; + public explainEvents(events: CoreMouseEventType): {[event: string]: boolean} { throw new Error('Method not implemented.'); } } export class MockCharsetService implements ICharsetService { - serviceBrand: any; - charset: ICharset | undefined; - glevel: number = 0; - charsets: ReadonlyArray = []; - reset(): void {} - setgLevel(g: number): void {} - setgCharset(g: number, charset: ICharset): void {} + public serviceBrand: any; + public charset: ICharset | undefined; + public glevel: number = 0; + public charsets: ReadonlyArray = []; + public reset(): void {} + public setgLevel(g: number): void {} + public setgCharset(g: number, charset: ICharset): void {} } export class MockCoreService implements ICoreService { - serviceBrand: any; - isCursorInitialized: boolean = false; - isCursorHidden: boolean = false; - isFocused: boolean = false; - decPrivateModes: IDecPrivateModes = { + public serviceBrand: any; + public isCursorInitialized: boolean = false; + public isCursorHidden: boolean = false; + public isFocused: boolean = false; + public decPrivateModes: IDecPrivateModes = { applicationCursorKeys: false, applicationKeypad: false, origin: false, wraparound: true }; - onData: IEvent = new EventEmitter().event; - onUserInput: IEvent = new EventEmitter().event; - onBinary: IEvent = new EventEmitter().event; - reset(): void {} - triggerDataEvent(data: string, wasUserInput?: boolean): void {} - triggerBinaryEvent(data: string): void {} + public onData: IEvent = new EventEmitter().event; + public onUserInput: IEvent = new EventEmitter().event; + public onBinary: IEvent = new EventEmitter().event; + public reset(): void {} + public triggerDataEvent(data: string, wasUserInput?: boolean): void {} + public triggerBinaryEvent(data: string): void {} } export class MockDirtyRowService implements IDirtyRowService { - serviceBrand: any; - start: number = 0; - end: number = 0; - clearRange(): void {} - markDirty(y: number): void {} - markRangeDirty(y1: number, y2: number): void {} - markAllDirty(): void {} + public serviceBrand: any; + public start: number = 0; + public end: number = 0; + public clearRange(): void {} + public markDirty(y: number): void {} + public markRangeDirty(y1: number, y2: number): void {} + public markAllDirty(): void {} } export class MockLogService implements ILogService { - serviceBrand: any; - debug(message: any, ...optionalParams: any[]): void {} - info(message: any, ...optionalParams: any[]): void {} - warn(message: any, ...optionalParams: any[]): void {} - error(message: any, ...optionalParams: any[]): void {} + public serviceBrand: any; + public debug(message: any, ...optionalParams: any[]): void {} + public info(message: any, ...optionalParams: any[]): void {} + public warn(message: any, ...optionalParams: any[]): void {} + public error(message: any, ...optionalParams: any[]): void {} } export class MockOptionsService implements IOptionsService { - serviceBrand: any; - options: ITerminalOptions = clone(DEFAULT_OPTIONS); - onOptionChange: IEvent = new EventEmitter().event; + public serviceBrand: any; + public options: ITerminalOptions = clone(DEFAULT_OPTIONS); + public onOptionChange: IEvent = new EventEmitter().event; constructor(testOptions?: IPartialTerminalOptions) { if (testOptions) { Object.keys(testOptions).forEach(key => this.options[key] = (testOptions)[key]); } } - setOption(key: string, value: T): void { + public setOption(key: string, value: T): void { throw new Error('Method not implemented.'); } - getOption(key: string): T { + public getOption(key: string): T { throw new Error('Method not implemented.'); } } @@ -110,14 +110,14 @@ export class MockOptionsService implements IOptionsService { // defaults to V6 always to keep tests passing export class MockUnicodeService implements IUnicodeService { private _provider = new UnicodeV6(); - register(provider: IUnicodeVersionProvider): void { + public register(provider: IUnicodeVersionProvider): void { throw new Error('Method not implemented.'); } - versions: string[] = []; - activeVersion: string = ''; - onChange: IEvent = new EventEmitter().event; - wcwidth = (codepoint: number): number => this._provider.wcwidth(codepoint); - getStringCellWidth(s: string): number { + public versions: string[] = []; + public activeVersion: string = ''; + public onChange: IEvent = new EventEmitter().event; + public wcwidth = (codepoint: number): number => this._provider.wcwidth(codepoint); + public getStringCellWidth(s: string): number { throw new Error('Method not implemented.'); } } diff --git a/src/common/buffer/AttributeData.ts b/src/common/buffer/AttributeData.ts index 0b2679ee4..52bd0b15b 100644 --- a/src/common/buffer/AttributeData.ts +++ b/src/common/buffer/AttributeData.ts @@ -7,14 +7,15 @@ import { IAttributeData, IColorRGB } from 'common/Types'; import { Attributes, FgFlags, BgFlags } from 'common/buffer/Constants'; export class AttributeData implements IAttributeData { - static toColorRGB(value: number): IColorRGB { + public static toColorRGB(value: number): IColorRGB { return [ value >>> Attributes.RED_SHIFT & 255, value >>> Attributes.GREEN_SHIFT & 255, value & 255 ]; } - static fromColorRGB(value: IColorRGB): number { + + public static fromColorRGB(value: IColorRGB): number { return (value[0] & 255) << Attributes.RED_SHIFT | (value[1] & 255) << Attributes.GREEN_SHIFT | value[2] & 255; } diff --git a/src/common/buffer/BufferSet.ts b/src/common/buffer/BufferSet.ts index 50e6e5050..26fc1d09f 100644 --- a/src/common/buffer/BufferSet.ts +++ b/src/common/buffer/BufferSet.ts @@ -27,8 +27,8 @@ export class BufferSet implements IBufferSet { * @param _terminal - The terminal the BufferSet will belong to */ constructor( - readonly optionsService: IOptionsService, - readonly bufferService: IBufferService + optionsService: IOptionsService, + bufferService: IBufferService ) { this._normal = new Buffer(true, optionsService, bufferService); this._normal.fillViewportRows(); diff --git a/src/common/input/TextDecoder.ts b/src/common/input/TextDecoder.ts index 397d25a78..6ecab011d 100644 --- a/src/common/input/TextDecoder.ts +++ b/src/common/input/TextDecoder.ts @@ -64,7 +64,7 @@ export class StringToUtf32 { * the provided input data does not exceed the size of `target`. * Returns the number of written codepoints in `target`. */ - decode(input: string, target: Uint32Array): number { + public decode(input: string, target: Uint32Array): number { const length = input.length; if (!length) { @@ -132,7 +132,7 @@ export class Utf8ToUtf32 { * the provided data chunk does not exceed the size of `target`. * Returns the number of written codepoints in `target`. */ - decode(input: Uint8Array, target: Uint32Array): number { + public decode(input: Uint8Array, target: Uint32Array): number { const length = input.length; if (!length) { diff --git a/src/common/parser/DcsParser.test.ts b/src/common/parser/DcsParser.test.ts index 4d6dce110..dbabb4fac 100644 --- a/src/common/parser/DcsParser.test.ts +++ b/src/common/parser/DcsParser.test.ts @@ -55,13 +55,13 @@ function identifier(id: IFunctionIdentifier): number { class TestHandler implements IDcsHandler { constructor(public output: any[], public msg: string, public returnFalse: boolean = false) {} - hook(params: IParams): void { + public hook(params: IParams): void { this.output.push([this.msg, 'HOOK', params.toArray()]); } - put(data: Uint32Array, start: number, end: number): void { + public put(data: Uint32Array, start: number, end: number): void { this.output.push([this.msg, 'PUT', utf32ToString(data, start, end)]); } - unhook(success: boolean): void | boolean { + public unhook(success: boolean): void | boolean { this.output.push([this.msg, 'UNHOOK', success]); if (this.returnFalse) { return false; diff --git a/src/common/parser/EscapeSequenceParser.test.ts b/src/common/parser/EscapeSequenceParser.test.ts index 3b6910a60..8254212b2 100644 --- a/src/common/parser/EscapeSequenceParser.test.ts +++ b/src/common/parser/EscapeSequenceParser.test.ts @@ -41,16 +41,16 @@ class MockOscPutParser implements IOscParser { this._fallback(id, 'END', this.data.slice(this.data.indexOf(';') + 1)); } } - addHandler(ident: number, handler: IOscHandler): IDisposable { + public addHandler(ident: number, handler: IOscHandler): IDisposable { throw new Error('not implemented'); } - setHandler(ident: number, handler: IOscHandler): void { + public setHandler(ident: number, handler: IOscHandler): void { throw new Error('not implemented'); } - clearHandler(ident: number): void { + public clearHandler(ident: number): void { throw new Error('not implemented'); } - setHandlerFallback(handler: OscFallbackHandlerType): void { + public setHandlerFallback(handler: OscFallbackHandlerType): void { this._fallback = handler; } } diff --git a/src/common/parser/OscParser.test.ts b/src/common/parser/OscParser.test.ts index 6969d6f33..127bd83a7 100644 --- a/src/common/parser/OscParser.test.ts +++ b/src/common/parser/OscParser.test.ts @@ -17,13 +17,13 @@ function toUtf32(s: string): Uint32Array { class TestHandler implements IOscHandler { constructor(public id: number, public output: any[], public msg: string, public returnFalse: boolean = false) {} - start(): void { + public start(): void { this.output.push([this.msg, this.id, 'START']); } - put(data: Uint32Array, start: number, end: number): void { + public put(data: Uint32Array, start: number, end: number): void { this.output.push([this.msg, this.id, 'PUT', utf32ToString(data, start, end)]); } - end(success: boolean): void | boolean { + public end(success: boolean): void | boolean { this.output.push([this.msg, this.id, 'END', success]); if (this.returnFalse) { return false; diff --git a/src/common/services/BufferService.ts b/src/common/services/BufferService.ts index c7b6afce4..1b6da7922 100644 --- a/src/common/services/BufferService.ts +++ b/src/common/services/BufferService.ts @@ -11,7 +11,7 @@ export const MINIMUM_COLS = 2; // Less than 2 can mess with wide chars export const MINIMUM_ROWS = 1; export class BufferService implements IBufferService { - serviceBrand: any; + public serviceBrand: any; public cols: number; public rows: number; diff --git a/src/common/services/CharsetService.ts b/src/common/services/CharsetService.ts index 5d20628f3..47a015f6f 100644 --- a/src/common/services/CharsetService.ts +++ b/src/common/services/CharsetService.ts @@ -7,7 +7,7 @@ import { ICharsetService } from 'common/services/Services'; import { ICharset } from 'common/Types'; export class CharsetService implements ICharsetService { - serviceBrand: any; + public serviceBrand: any; public charset: ICharset | undefined; public charsets: ICharset[] = []; diff --git a/src/common/services/CoreService.ts b/src/common/services/CoreService.ts index 883266ec5..2f0ff72f6 100644 --- a/src/common/services/CoreService.ts +++ b/src/common/services/CoreService.ts @@ -16,7 +16,7 @@ const DEFAULT_DEC_PRIVATE_MODES: IDecPrivateModes = Object.freeze({ }); export class CoreService implements ICoreService { - serviceBrand: any; + public serviceBrand: any; public isCursorInitialized: boolean = false; public isCursorHidden: boolean = false; diff --git a/src/common/services/DirtyRowService.ts b/src/common/services/DirtyRowService.ts index 0f2f14f50..1c43b67ef 100644 --- a/src/common/services/DirtyRowService.ts +++ b/src/common/services/DirtyRowService.ts @@ -6,7 +6,7 @@ import { IBufferService, IDirtyRowService } from 'common/services/Services'; export class DirtyRowService implements IDirtyRowService { - serviceBrand: any; + public serviceBrand: any; private _start!: number; private _end!: number; diff --git a/src/common/services/InstantiationService.ts b/src/common/services/InstantiationService.ts index dd011d981..e5727fa6d 100644 --- a/src/common/services/InstantiationService.ts +++ b/src/common/services/InstantiationService.ts @@ -22,21 +22,21 @@ export class ServiceCollection { } } - set(id: IServiceIdentifier, instance: T): T { + public set(id: IServiceIdentifier, instance: T): T { const result = this._entries.get(id); this._entries.set(id, instance); return result; } - forEach(callback: (id: IServiceIdentifier, instance: any) => any): void { + public forEach(callback: (id: IServiceIdentifier, instance: any) => any): void { this._entries.forEach((value, key) => callback(key, value)); } - has(id: IServiceIdentifier): boolean { + public has(id: IServiceIdentifier): boolean { return this._entries.has(id); } - get(id: IServiceIdentifier): T | undefined { + public get(id: IServiceIdentifier): T | undefined { return this._entries.get(id); } } diff --git a/src/common/services/LogService.ts b/src/common/services/LogService.ts index 4f48d8fe6..3c0ccaf14 100644 --- a/src/common/services/LogService.ts +++ b/src/common/services/LogService.ts @@ -39,7 +39,7 @@ const optionsKeyToLogLevel: { [key: string]: LogLevel } = { const LOG_PREFIX = 'xterm.js: '; export class LogService implements ILogService { - serviceBrand: any; + public serviceBrand: any; private _logLevel!: LogLevel; @@ -71,25 +71,25 @@ export class LogService implements ILogService { type.call(console, LOG_PREFIX + message, ...optionalParams); } - debug(message: string, ...optionalParams: any[]): void { + public debug(message: string, ...optionalParams: any[]): void { if (this._logLevel <= LogLevel.DEBUG) { this._log(console.log, message, optionalParams); } } - info(message: string, ...optionalParams: any[]): void { + public info(message: string, ...optionalParams: any[]): void { if (this._logLevel <= LogLevel.INFO) { this._log(console.info, message, optionalParams); } } - warn(message: string, ...optionalParams: any[]): void { + public warn(message: string, ...optionalParams: any[]): void { if (this._logLevel <= LogLevel.WARN) { this._log(console.warn, message, optionalParams); } } - error(message: string, ...optionalParams: any[]): void { + public error(message: string, ...optionalParams: any[]): void { if (this._logLevel <= LogLevel.ERROR) { this._log(console.error, message, optionalParams); } diff --git a/src/common/services/OptionsService.ts b/src/common/services/OptionsService.ts index 44a55d33d..a3cc05b60 100644 --- a/src/common/services/OptionsService.ts +++ b/src/common/services/OptionsService.ts @@ -31,6 +31,7 @@ export const DEFAULT_OPTIONS: ITerminalOptions = Object.freeze({ fontWeight: 'normal', fontWeightBold: 'bold', lineHeight: 1.0, + linkTooltipHoverDuration: 500, letterSpacing: 0, logLevel: 'info', scrollback: 1000, @@ -60,7 +61,7 @@ export const DEFAULT_OPTIONS: ITerminalOptions = Object.freeze({ const CONSTRUCTOR_ONLY_OPTIONS = ['cols', 'rows']; export class OptionsService implements IOptionsService { - serviceBrand: any; + public serviceBrand: any; public options: ITerminalOptions; diff --git a/src/common/services/Services.ts b/src/common/services/Services.ts index fc9f9e203..0f3ab374f 100644 --- a/src/common/services/Services.ts +++ b/src/common/services/Services.ts @@ -262,6 +262,7 @@ export interface ITerminalOptions { fontWeightBold: FontWeight; letterSpacing: number; lineHeight: number; + linkTooltipHoverDuration: number; logLevel: LogLevel; macOptionIsMeta: boolean; macOptionClickForcesSelection: boolean; diff --git a/src/common/services/UnicodeService.test.ts b/src/common/services/UnicodeService.test.ts index cb03b09b0..a2c4b6367 100644 --- a/src/common/services/UnicodeService.test.ts +++ b/src/common/services/UnicodeService.test.ts @@ -8,8 +8,8 @@ import { UnicodeService } from 'common/services/UnicodeService'; import { IUnicodeVersionProvider } from 'common/services/Services'; class DummyProvider implements IUnicodeVersionProvider { - version = '123'; - wcwidth(n: number): 0 | 1 | 2 { + public version = '123'; + public wcwidth(n: number): 0 | 1 | 2 { return 2; } } diff --git a/src/public/AddonManager.test.ts b/src/public/AddonManager.test.ts index 8198ce316..ea2290954 100644 --- a/src/public/AddonManager.test.ts +++ b/src/public/AddonManager.test.ts @@ -24,11 +24,11 @@ describe('AddonManager', () => { it('should call addon constructor', () => { let called = false; class Addon implements ITerminalAddon { - activate(terminal: any): void { + public activate(terminal: any): void { assert.equal(terminal, 'foo', 'The first constructor arg should be Terminal'); called = true; } - dispose(): void { } + public dispose(): void { } } manager.loadAddon('foo' as any, new Addon()); assert.equal(called, true); @@ -39,8 +39,8 @@ describe('AddonManager', () => { it('should dispose all loaded addons', () => { let called = 0; class Addon implements ITerminalAddon { - activate(): void {} - dispose(): void { called++; } + public activate(): void {} + public dispose(): void { called++; } } manager.loadAddon(null, new Addon()); manager.loadAddon(null, new Addon()); diff --git a/typings/xterm.d.ts b/typings/xterm.d.ts index 9445d0754..79379058c 100644 --- a/typings/xterm.d.ts +++ b/typings/xterm.d.ts @@ -118,7 +118,7 @@ declare module 'xterm' { fontWeightBold?: FontWeight; /** - * The spacing in whole pixels between characters.. + * The spacing in whole pixels between characters. */ letterSpacing?: number; @@ -127,6 +127,13 @@ declare module 'xterm' { */ lineHeight?: number; + /** + * The duration in milliseconds before link tooltip events fire when + * hovering on a link. + * @deprecated This will be removed when the link matcher API is removed. + */ + linkTooltipHoverDuration?: number; + /** * What log level to use, this will log for all levels below and including * what is set: @@ -305,7 +312,8 @@ declare module 'xterm' { validationCallback?: (uri: string, callback: (isValid: boolean) => void) => void; /** - * A callback that fires when the mouse hovers over a link for a moment. + * A callback that fires when the mouse hovers over a link for a period of + * time (defined by {@link ITerminalOptions.linkTooltipHoverDuration}). */ tooltipCallback?: (event: MouseEvent, uri: string, location: IViewportRange) => boolean | void; diff --git a/yarn.lock b/yarn.lock index fb86558ba..86e751692 100644 --- a/yarn.lock +++ b/yarn.lock @@ -253,10 +253,10 @@ "@types/minimatch" "*" "@types/node" "*" -"@types/jsdom@^16.2.0": - version "16.2.0" - resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-16.2.0.tgz#5a371a2efc1e0feec02c4bd2b3ce689e6ae691a2" - integrity sha512-I+qrFCzB97VlGJgvzGEwcUqmajpwqwTalmMvVfgJqFRVsY80lcCEQEGLJuVvge+whQyB1xcqTstAdxJshVVq0g== +"@types/jsdom@^16.2.1": + version "16.2.1" + resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-16.2.1.tgz#9e6eee6a578f74eed5997558ab430dbc11aac753" + integrity sha512-KCEq427OsWfpX7FRyEMb3i2XIuz8Pt3XPls4nmX0iMTDJWsHD4Kzoa3v4Uv9c9IDf11ALeHUtPcyAjTz/HV03Q== dependencies: "@types/node" "*" "@types/parse5" "*" @@ -352,10 +352,10 @@ "@types/source-list-map" "*" source-map "^0.6.1" -"@types/webpack@^4.41.10": - version "4.41.10" - resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.41.10.tgz#2e1f6b3508a249854efe3dcc7690905ac5ee10be" - integrity sha512-vIy0qaq8AjOjZLuFPqpo7nAJzcoVXMdw3mvpNN07Uvdy0p1IpJeLNBe3obdRP7FX2jIusDE7z1pZa0A6qYUgnA== +"@types/webpack@^4.41.11": + version "4.41.11" + resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.41.11.tgz#7b7f725397d3b630bede05415d34e9ff30d9771f" + integrity sha512-PtEZISfBMWL05qOpZN19hztZPt0rPuGQh5sbBP3bB4RrJgzdb0SScn47hdcMaoN1IgaU7NZWeDO6reFcKTK2iQ== dependencies: "@types/anymatch" "*" "@types/node" "*" @@ -364,47 +364,47 @@ "@types/webpack-sources" "*" source-map "^0.6.0" -"@types/ws@^7.2.3": - version "7.2.3" - resolved "https://registry.yarnpkg.com/@types/ws/-/ws-7.2.3.tgz#a3add56077ac6cc9396b9502c7252a1635922032" - integrity sha512-VT/GK7nvDA7lfHy40G3LKM+ICqmdIsBLBHGXcWD97MtqQEjNMX+7Gudo8YGpaSlYdTX7IFThhCE8Jx09HegymQ== +"@types/ws@^7.2.4": + version "7.2.4" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-7.2.4.tgz#b3859f7b9c243b220efac9716ec42c716a72969d" + integrity sha512-9S6Ask71vujkVyeEXKxjBSUV8ZUB0mjL5la4IncBoheu04bDaYyUKErh1BQcY9+WzOUOiKqz/OnpJHYckbMfNg== dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^2.27.0": - version "2.27.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.27.0.tgz#e479cdc4c9cf46f96b4c287755733311b0d0ba4b" - integrity sha512-/my+vVHRN7zYgcp0n4z5A6HAK7bvKGBiswaM5zIlOQczsxj/aiD7RcgD+dvVFuwFaGh5+kM7XA6Q6PN0bvb1tw== +"@typescript-eslint/eslint-plugin@^2.28.0": + version "2.28.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.28.0.tgz#4431bc6d3af41903e5255770703d4e55a0ccbdec" + integrity sha512-w0Ugcq2iatloEabQP56BRWJowliXUP5Wv6f9fKzjJmDW81hOTBxRoJ4LoEOxRpz9gcY51Libytd2ba3yLmSOfg== dependencies: - "@typescript-eslint/experimental-utils" "2.27.0" + "@typescript-eslint/experimental-utils" "2.28.0" functional-red-black-tree "^1.0.1" regexpp "^3.0.0" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@2.27.0": - version "2.27.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.27.0.tgz#801a952c10b58e486c9a0b36cf21e2aab1e9e01a" - integrity sha512-vOsYzjwJlY6E0NJRXPTeCGqjv5OHgRU1kzxHKWJVPjDYGbPgLudBXjIlc+OD1hDBZ4l1DLbOc5VjofKahsu9Jw== +"@typescript-eslint/experimental-utils@2.28.0": + version "2.28.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.28.0.tgz#1fd0961cd8ef6522687b4c562647da6e71f8833d" + integrity sha512-4SL9OWjvFbHumM/Zh/ZeEjUFxrYKtdCi7At4GyKTbQlrj1HcphIDXlje4Uu4cY+qzszR5NdVin4CCm6AXCjd6w== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/typescript-estree" "2.27.0" + "@typescript-eslint/typescript-estree" "2.28.0" eslint-scope "^5.0.0" eslint-utils "^2.0.0" -"@typescript-eslint/parser@^2.27.0": - version "2.27.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.27.0.tgz#d91664335b2c46584294e42eb4ff35838c427287" - integrity sha512-HFUXZY+EdwrJXZo31DW4IS1ujQW3krzlRjBrFRrJcMDh0zCu107/nRfhk/uBasO8m0NVDbBF5WZKcIUMRO7vPg== +"@typescript-eslint/parser@^2.28.0": + version "2.28.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.28.0.tgz#bb761286efd2b0714761cab9d0ee5847cf080385" + integrity sha512-RqPybRDquui9d+K86lL7iPqH6Dfp9461oyqvlXMNtap+PyqYbkY5dB7LawQjDzot99fqzvS0ZLZdfe+1Bt3Jgw== dependencies: "@types/eslint-visitor-keys" "^1.0.0" - "@typescript-eslint/experimental-utils" "2.27.0" - "@typescript-eslint/typescript-estree" "2.27.0" + "@typescript-eslint/experimental-utils" "2.28.0" + "@typescript-eslint/typescript-estree" "2.28.0" eslint-visitor-keys "^1.1.0" -"@typescript-eslint/typescript-estree@2.27.0": - version "2.27.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.27.0.tgz#a288e54605412da8b81f1660b56c8b2e42966ce8" - integrity sha512-t2miCCJIb/FU8yArjAvxllxbTiyNqaXJag7UOpB5DVoM3+xnjeOngtqlJkLRnMtzaRcJhe3CIR9RmL40omubhg== +"@typescript-eslint/typescript-estree@2.28.0": + version "2.28.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.28.0.tgz#d34949099ff81092c36dc275b6a1ea580729ba00" + integrity sha512-HDr8MP9wfwkiuqzRVkuM3BeDrOC4cKbO5a6BymZBHUt5y/2pL0BXD6I/C/ceq2IZoHWhcASk+5/zo+dwgu9V8Q== dependencies: debug "^4.1.1" eslint-visitor-keys "^1.1.0" @@ -5440,10 +5440,10 @@ triple-beam@^1.2.0, triple-beam@^1.3.0: resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.3.0.tgz#a595214c7298db8339eeeee083e4d10bd8cb8dd9" integrity sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw== -ts-loader@^6.0.4: - version "6.2.2" - resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-6.2.2.tgz#dffa3879b01a1a1e0a4b85e2b8421dc0dfff1c58" - integrity sha512-HDo5kXZCBml3EUPcc7RlZOV/JGlLHwppTLEHb3SHnr5V7NXD4klMEkrhJe5wgRbaWsSXi+Y1SIBN/K9B6zWGWQ== +ts-loader@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-7.0.0.tgz#7c74dfa8956e3e33b91d98d4ed7b6f7575c35c25" + integrity sha512-qq9iPK235Xf/uPS1I72CIwB8qpbW0rys3entnXO+rIo2km50lMmeHKCNn1m047W6Sk4kceF6n5NWEnq/V8xdYQ== dependencies: chalk "^2.3.0" enhanced-resolve "^4.0.0"