mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Merge remote-tracking branch 'origin/master' into remove_shared_folder
This commit is contained in:
+1
-1
@@ -39,7 +39,7 @@
|
||||
"ts-loader": "^4.5.0",
|
||||
"tslint": "^5.9.1",
|
||||
"tslint-consistent-codestyle": "^1.13.0",
|
||||
"typescript": "3.0",
|
||||
"typescript": "3.1",
|
||||
"vinyl-buffer": "^1.0.0",
|
||||
"vinyl-source-stream": "^1.1.0",
|
||||
"webpack": "^4.17.1",
|
||||
|
||||
+3
-3
@@ -29,7 +29,7 @@ import { Buffer, MAX_BUFFER_SIZE, DEFAULT_ATTR, NULL_CELL_CODE, NULL_CELL_WIDTH,
|
||||
import { CompositionHelper } from './CompositionHelper';
|
||||
import { EventEmitter } from './common/EventEmitter';
|
||||
import { Viewport } from './Viewport';
|
||||
import { rightClickHandler, moveTextAreaUnderMouseCursor, pasteHandler, copyHandler } from './handlers/Clipboard';
|
||||
import { rightClickHandler, moveTextAreaUnderMouseCursor, pasteHandler, copyHandler } from './ui/Clipboard';
|
||||
import { C0 } from './common/data/EscapeSequences';
|
||||
import { InputHandler } from './InputHandler';
|
||||
import { Renderer } from './renderer/Renderer';
|
||||
@@ -1157,9 +1157,9 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
|
||||
*/
|
||||
public updateCursorStyle(ev: KeyboardEvent): void {
|
||||
if (this.selectionManager && this.selectionManager.shouldColumnSelect(ev)) {
|
||||
this.element.classList.add('xterm-cursor-crosshair');
|
||||
this.element.classList.add('column-select');
|
||||
} else {
|
||||
this.element.classList.remove('xterm-cursor-crosshair');
|
||||
this.element.classList.remove('column-select');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,22 +8,13 @@ import { isFirefox, isSafari } from '../../core/Platform';
|
||||
import { IColor } from '../Types';
|
||||
import { ICharAtlasConfig, CHAR_ATLAS_CELL_SPACING } from './Types';
|
||||
|
||||
declare const Promise: any;
|
||||
|
||||
export interface IOffscreenCanvas {
|
||||
width: number;
|
||||
height: number;
|
||||
getContext(type: '2d', config?: Canvas2DContextAttributes): CanvasRenderingContext2D;
|
||||
transferToImageBitmap(): ImageBitmap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a char atlas.
|
||||
* @param context The window or worker context.
|
||||
* @param canvasFactory A function to generate a canvas with a width or height.
|
||||
* @param config The config for the new char atlas.
|
||||
*/
|
||||
export function generateStaticCharAtlasTexture(context: Window, canvasFactory: (width: number, height: number) => HTMLCanvasElement | IOffscreenCanvas, config: ICharAtlasConfig): HTMLCanvasElement | Promise<ImageBitmap> {
|
||||
export function generateStaticCharAtlasTexture(context: Window, canvasFactory: (width: number, height: number) => HTMLCanvasElement, config: ICharAtlasConfig): HTMLCanvasElement | Promise<ImageBitmap> {
|
||||
const cellWidth = config.scaledCharWidth + CHAR_ATLAS_CELL_SPACING;
|
||||
const cellHeight = config.scaledCharHeight + CHAR_ATLAS_CELL_SPACING;
|
||||
const canvas = canvasFactory(
|
||||
@@ -101,12 +92,7 @@ export function generateStaticCharAtlasTexture(context: Window, canvasFactory: (
|
||||
// performance (tested on v55).
|
||||
if (!('createImageBitmap' in context) || isFirefox || isSafari) {
|
||||
// Don't attempt to clear background colors if createImageBitmap is not supported
|
||||
if (canvas instanceof HTMLCanvasElement) {
|
||||
// Just return the HTMLCanvas if it's a HTMLCanvasElement
|
||||
return canvas;
|
||||
}
|
||||
// Transfer to an ImageBitmap is this is an OffscreenCanvas
|
||||
return new Promise((r: (bitmap: ImageBitmap) => void) => r(canvas.transferToImageBitmap()));
|
||||
return canvas;
|
||||
}
|
||||
|
||||
const charAtlasImageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
|
||||
|
||||
@@ -19,7 +19,7 @@ export type ScreenDprListener = (newDevicePixelRatio?: number, oldDevicePixelRat
|
||||
*/
|
||||
export class ScreenDprMonitor extends Disposable {
|
||||
private _currentDevicePixelRatio: number;
|
||||
private _outerListener: MediaQueryListListener;
|
||||
private _outerListener: (this: MediaQueryList, ev: MediaQueryListEvent) => any;
|
||||
private _listener: ScreenDprListener;
|
||||
private _resolutionMediaMatchList: MediaQueryList;
|
||||
|
||||
|
||||
+1
-1
@@ -139,7 +139,7 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.xterm.xterm-cursor-crosshair {
|
||||
.xterm.column-select.focus {
|
||||
/* Column selection mode */
|
||||
cursor: crosshair;
|
||||
}
|
||||
|
||||
@@ -6716,10 +6716,10 @@ typedarray@^0.0.6, typedarray@~0.0.5:
|
||||
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
|
||||
|
||||
typescript@3.0:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.3.tgz#4853b3e275ecdaa27f78fda46dc273a7eb7fc1c8"
|
||||
integrity sha512-kk80vLW9iGtjMnIv11qyxLqZm20UklzuR2tL0QAnDIygIUIemcZMxlMWudl9OOt76H3ntVzcTiddQ1/pAAJMYg==
|
||||
typescript@3.1:
|
||||
version "3.1.6"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.1.6.tgz#b6543a83cfc8c2befb3f4c8fba6896f5b0c9be68"
|
||||
integrity sha512-tDMYfVtvpb96msS1lDX9MEdHrW4yOuZ4Kdc4Him9oU796XldPYF/t2+uKoX0BBa0hXXwDlqYQbXY5Rzjzc5hBA==
|
||||
|
||||
uglify-es@^3.3.4:
|
||||
version "3.3.9"
|
||||
|
||||
Reference in New Issue
Block a user