Comparing version 3.15.0-beta2 to 3.15.0-beta20
{ | ||
"name": "xterm", | ||
"description": "Full xterm terminal, in your browser", | ||
"version": "3.15.0-beta2", | ||
"version": "3.15.0-beta20", | ||
"main": "lib/xterm.js", | ||
@@ -9,2 +9,17 @@ "types": "typings/xterm.d.ts", | ||
"license": "MIT", | ||
"scripts": { | ||
"prepackage": "npm run build", | ||
"package": "webpack", | ||
"start": "node demo/start", | ||
"lint": "tslint 'src/**/*.ts' './demo/**/*.ts' './addons/**/*.ts'", | ||
"test": "npm run test-unit", | ||
"posttest": "npm run lint", | ||
"test-api": "mocha \"**/*.api.js\"", | ||
"test-unit": "node ./bin/test.js", | ||
"build": "tsc -b ./tsconfig.all.json", | ||
"prepare": "npm run build", | ||
"prepublishOnly": "npm run package", | ||
"watch": "tsc -b -w ./tsconfig.all.json --preserveWatchOutput", | ||
"clean": "rm -rf lib out addons/*/lib" | ||
}, | ||
"devDependencies": { | ||
@@ -19,2 +34,3 @@ "@types/chai": "^3.4.34", | ||
"@types/webpack": "^4.4.11", | ||
"@types/ws": "^6.0.1", | ||
"chai": "3.5.0", | ||
@@ -36,23 +52,4 @@ "express": "4.13.4", | ||
"webpack-cli": "^3.1.0", | ||
"xterm-addon-attach": "0.1.0-beta8", | ||
"xterm-addon-search": "0.1.0-beta4", | ||
"xterm-addon-web-links": "0.1.0-beta6" | ||
}, | ||
"scripts": { | ||
"prepackage": "npm run build", | ||
"package": "webpack", | ||
"start": "node demo/start", | ||
"start-debug": "node --inspect-brk demo/start", | ||
"start-zmodem": "node demo/zmodem/app", | ||
"lint": "tslint 'src/**/*.ts' './demo/**/*.ts'", | ||
"test-unit": "node ./bin/test.js", | ||
"test": "npm run test-unit", | ||
"posttest": "npm run lint", | ||
"test-api": "mocha \"**/*.api.js\"", | ||
"build": "tsc -b ./src/tsconfig.all.json", | ||
"prepare": "npm run build", | ||
"prepublishOnly": "npm run package", | ||
"coveralls": "nyc report --reporter=text-lcov | coveralls", | ||
"watch": "tsc -b -w ./src/tsconfig.all.json --preserveWatchOutput" | ||
"ws": "^7.0.0" | ||
} | ||
} |
@@ -9,3 +9,3 @@ /** | ||
*/ | ||
export function clone<T>(val: T, depth: number = 5): T | null { | ||
export function clone<T>(val: T, depth: number = 5): T { | ||
if (typeof val !== 'object') { | ||
@@ -15,7 +15,2 @@ return val; | ||
// cloning null always returns null | ||
if (val === null) { | ||
return null; | ||
} | ||
// If we're cloning an array, use an array as the base, otherwise use an object | ||
@@ -26,3 +21,3 @@ const clonedObject: any = Array.isArray(val) ? [] : {}; | ||
// Recursively clone eack item unless we're at the maximum depth | ||
clonedObject[key] = depth <= 1 ? val[key] : clone(val[key], depth - 1); | ||
clonedObject[key] = depth <= 1 ? val[key] : (val[key] ? clone(val[key], depth - 1) : val[key]); | ||
} | ||
@@ -29,0 +24,0 @@ |
@@ -8,8 +8,5 @@ { | ||
], | ||
"baseUrl": "..", | ||
"paths": { | ||
"common/*": [ "./common/*" ] | ||
} | ||
"baseUrl": ".." | ||
}, | ||
"include": [ "./**/*" ] | ||
} |
@@ -10,4 +10,3 @@ { | ||
"paths": { | ||
"common/*": [ "./common/*" ], | ||
"core/*": [ "./core/*" ] | ||
"common/*": [ "./common/*" ] | ||
} | ||
@@ -14,0 +13,0 @@ }, |
@@ -232,2 +232,14 @@ /** | ||
}); | ||
describe('SM: Set Mode', () => { | ||
describe('CSI ? Pm h', () => { | ||
it('Pm = 2004, Set bracketed paste mode', async function(): Promise<any> { | ||
assert.equal(await simulatePaste('foo'), 'foo'); | ||
await page.evaluate(`window.term.write('\x1b[?2004h')`); | ||
assert.equal(await simulatePaste('bar'), '\x1b[200~bar\x1b[201~'); | ||
await page.evaluate(`window.term.write('\x1b[?2004l')`); | ||
assert.equal(await simulatePaste('baz'), 'baz'); | ||
}); | ||
}); | ||
}); | ||
}); | ||
@@ -253,1 +265,14 @@ }); | ||
} | ||
async function simulatePaste(text: string): Promise<string> { | ||
const id = Math.floor(Math.random() * 1000000); | ||
await page.evaluate(` | ||
(function () { | ||
window.term.onData(e => window.result_${id} = e); | ||
const clipboardData = new DataTransfer(); | ||
clipboardData.setData('text/plain', '${text}'); | ||
window.term.textarea.dispatchEvent(new ClipboardEvent('paste', { clipboardData })); | ||
})(); | ||
`); | ||
return await page.evaluate(`window.result_${id}`); | ||
} |
@@ -124,5 +124,2 @@ /** | ||
} | ||
public destroy(): void { | ||
this._core.destroy(); | ||
} | ||
public scrollLines(amount: number): void { | ||
@@ -153,3 +150,3 @@ this._core.scrollLines(amount); | ||
public getOption(key: 'bellSound' | 'bellStyle' | 'cursorStyle' | 'fontFamily' | 'fontWeight' | 'fontWeightBold' | 'rendererType' | 'termName'): string; | ||
public getOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'enableBold' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'screenKeys' | 'useFlowControl' | 'visualBell'): boolean; | ||
public getOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'screenKeys' | 'useFlowControl' | 'visualBell'): boolean; | ||
public getOption(key: 'colors'): string[]; | ||
@@ -160,3 +157,3 @@ public getOption(key: 'cols' | 'fontSize' | 'letterSpacing' | 'lineHeight' | 'rows' | 'tabStopWidth' | 'scrollback'): number; | ||
public getOption(key: any): any { | ||
return this._core.getOption(key); | ||
return this._core.optionsService.getOption(key); | ||
} | ||
@@ -167,3 +164,3 @@ public setOption(key: 'bellSound' | 'fontFamily' | 'termName', value: string): void; | ||
public setOption(key: 'cursorStyle', value: 'block' | 'underline' | 'bar'): void; | ||
public setOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'enableBold' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'screenKeys' | 'useFlowControl' | 'visualBell', value: boolean): void; | ||
public setOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'screenKeys' | 'useFlowControl' | 'visualBell', value: boolean): void; | ||
public setOption(key: 'colors', value: string[]): void; | ||
@@ -176,3 +173,3 @@ public setOption(key: 'fontSize' | 'letterSpacing' | 'lineHeight' | 'tabStopWidth' | 'scrollback', value: number): void; | ||
public setOption(key: any, value: any): void { | ||
this._core.setOption(key, value); | ||
this._core.optionsService.setOption(key, value); | ||
} | ||
@@ -179,0 +176,0 @@ public refresh(start: number, end: number): void { |
@@ -9,3 +9,3 @@ /** | ||
export default abstract class BaseCharAtlas implements IDisposable { | ||
export abstract class BaseCharAtlas implements IDisposable { | ||
private _didWarmUp: boolean = false; | ||
@@ -12,0 +12,0 @@ |
@@ -8,15 +8,7 @@ /** | ||
import { generateConfig, configEquals } from './CharAtlasUtils'; | ||
import BaseCharAtlas from './BaseCharAtlas'; | ||
import DynamicCharAtlas from './DynamicCharAtlas'; | ||
import NoneCharAtlas from './NoneCharAtlas'; | ||
import StaticCharAtlas from './StaticCharAtlas'; | ||
import { BaseCharAtlas } from './BaseCharAtlas'; | ||
import { DynamicCharAtlas } from './DynamicCharAtlas'; | ||
import { ICharAtlasConfig } from './Types'; | ||
import { IColorSet } from 'ui/Types'; | ||
const charAtlasImplementations = { | ||
'none': NoneCharAtlas, | ||
'static': StaticCharAtlas, | ||
'dynamic': DynamicCharAtlas | ||
}; | ||
interface ICharAtlasCacheEntry { | ||
@@ -76,3 +68,3 @@ atlas: BaseCharAtlas; | ||
const newEntry: ICharAtlasCacheEntry = { | ||
atlas: new charAtlasImplementations[terminal.options.experimentalCharAtlas]( | ||
atlas: new DynamicCharAtlas( | ||
document, | ||
@@ -79,0 +71,0 @@ newConfig |
@@ -24,3 +24,2 @@ /** | ||
return { | ||
type: terminal.options.experimentalCharAtlas, | ||
devicePixelRatio: window.devicePixelRatio, | ||
@@ -44,4 +43,3 @@ scaledCharWidth, | ||
} | ||
return a.type === b.type && | ||
a.devicePixelRatio === b.devicePixelRatio && | ||
return a.devicePixelRatio === b.devicePixelRatio && | ||
a.fontFamily === b.fontFamily && | ||
@@ -48,0 +46,0 @@ a.fontSize === b.fontSize && |
@@ -7,6 +7,5 @@ /** | ||
import { DIM_OPACITY, IGlyphIdentifier, INVERTED_DEFAULT_COLOR, ICharAtlasConfig } from './Types'; | ||
import BaseCharAtlas from './BaseCharAtlas'; | ||
import { BaseCharAtlas } from './BaseCharAtlas'; | ||
import { DEFAULT_ANSI_COLORS } from 'ui/ColorManager'; | ||
import { clearColor } from './CharAtlasGenerator'; | ||
import LRUMap from './LRUMap'; | ||
import { LRUMap } from './LRUMap'; | ||
import { isFirefox, isSafari } from 'common/Platform'; | ||
@@ -58,3 +57,3 @@ import { IColor } from 'ui/Types'; | ||
export default class DynamicCharAtlas extends BaseCharAtlas { | ||
export class DynamicCharAtlas extends BaseCharAtlas { | ||
// An ordered map that we're using to keep track of where each glyph is in the atlas texture. | ||
@@ -333,1 +332,39 @@ // It's ordered so that we can determine when to remove the old entries. | ||
} | ||
// This is used for debugging the renderer, just swap out `new DynamicCharAtlas` with | ||
// `new NoneCharAtlas`. | ||
export class NoneCharAtlas extends BaseCharAtlas { | ||
constructor(document: Document, config: ICharAtlasConfig) { | ||
super(); | ||
} | ||
public draw( | ||
ctx: CanvasRenderingContext2D, | ||
glyph: IGlyphIdentifier, | ||
x: number, | ||
y: number | ||
): boolean { | ||
return false; | ||
} | ||
} | ||
/** | ||
* Makes a partiicular rgb color in an ImageData completely transparent. | ||
* @returns True if the result is "empty", meaning all pixels are fully transparent. | ||
*/ | ||
function clearColor(imageData: ImageData, color: IColor): boolean { | ||
let isEmpty = true; | ||
const r = color.rgba >>> 24; | ||
const g = color.rgba >>> 16 & 0xFF; | ||
const b = color.rgba >>> 8 & 0xFF; | ||
for (let offset = 0; offset < imageData.data.length; offset += 4) { | ||
if (imageData.data[offset] === r && | ||
imageData.data[offset + 1] === g && | ||
imageData.data[offset + 2] === b) { | ||
imageData.data[offset + 3] = 0; | ||
} else { | ||
isEmpty = false; | ||
} | ||
} | ||
return isEmpty; | ||
} |
@@ -13,3 +13,3 @@ /** | ||
export default class LRUMap<T> { | ||
export class LRUMap<T> { | ||
private _map: { [key: number]: ILinkedListNode<T> } = {}; | ||
@@ -16,0 +16,0 @@ private _head: ILinkedListNode<T> = null; |
@@ -25,3 +25,2 @@ /** | ||
export interface ICharAtlasConfig { | ||
type: 'none' | 'static' | 'dynamic'; | ||
devicePixelRatio: number; | ||
@@ -28,0 +27,0 @@ fontSize: number; |
@@ -11,3 +11,3 @@ /** | ||
import { DIM_OPACITY, INVERTED_DEFAULT_COLOR, IGlyphIdentifier } from './atlas/Types'; | ||
import BaseCharAtlas from './atlas/BaseCharAtlas'; | ||
import { BaseCharAtlas } from './atlas/BaseCharAtlas'; | ||
import { acquireCharAtlas } from './atlas/CharAtlasCache'; | ||
@@ -292,3 +292,3 @@ import { CellData, AttributeData, WHITESPACE_CELL_CHAR, WHITESPACE_CELL_CODE } from 'core/buffer/BufferLine'; | ||
this._currentGlyphIdentifier.fg = fg; | ||
this._currentGlyphIdentifier.bold = cell.isBold() && terminal.options.enableBold; | ||
this._currentGlyphIdentifier.bold = !!cell.isBold(); | ||
this._currentGlyphIdentifier.dim = !!cell.isDim(); | ||
@@ -321,3 +321,3 @@ this._currentGlyphIdentifier.italic = !!cell.isItalic(); | ||
this._ctx.save(); | ||
this._ctx.font = this._getFont(terminal, cell.isBold() && terminal.options.enableBold, !!cell.isItalic()); | ||
this._ctx.font = this._getFont(terminal, !!cell.isBold(), !!cell.isItalic()); | ||
this._ctx.textBaseline = 'middle'; | ||
@@ -324,0 +324,0 @@ |
@@ -80,3 +80,3 @@ /** | ||
if (this._workCell.isBold() && this._terminalOptions.enableBold) { | ||
if (this._workCell.isBold()) { | ||
charElement.classList.add(BOLD_CLASS); | ||
@@ -108,4 +108,3 @@ } | ||
let fg = this._workCell.getFgColor(); | ||
if (this._workCell.isBold() && fg < 8 && !swapColor && | ||
this._terminalOptions.enableBold && this._terminalOptions.drawBoldTextInBrightColors) { | ||
if (this._workCell.isBold() && fg < 8 && !swapColor && this._terminalOptions.drawBoldTextInBrightColors) { | ||
fg += 8; | ||
@@ -112,0 +111,0 @@ } |
@@ -14,2 +14,3 @@ /** | ||
import { CharacterJoinerHandler } from '../Types'; | ||
import { IOptionsService } from 'common/options/Types'; | ||
@@ -37,3 +38,4 @@ export class RenderCoordinator extends Disposable { | ||
private _rowCount: number, | ||
screenElement: HTMLElement | ||
screenElement: HTMLElement, | ||
optionsService: IOptionsService | ||
) { | ||
@@ -48,2 +50,4 @@ super(); | ||
this.register(optionsService.onOptionChange(() => this._renderer.onOptionsChanged())); | ||
// dprchange should handle this case, we need this as well for browsers that don't support the | ||
@@ -150,6 +154,2 @@ // matchMedia query. | ||
public onOptionsChanged(): void { | ||
this._renderer.onOptionsChanged(); | ||
} | ||
public clear(): void { | ||
@@ -156,0 +156,0 @@ this._renderer.clear(); |
@@ -8,8 +8,2 @@ /** | ||
// Source: https://freesound.org/people/altemark/sounds/45759/ | ||
// This sound is released under the Creative Commons Attribution 3.0 Unported | ||
// (CC BY 3.0) license. It was created by 'altemark'. No modifications have been | ||
// made, apart from the conversion to base64. | ||
export const DEFAULT_BELL_SOUND = 'data:audio/wav;base64,UklGRigBAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQQBAADpAFgCwAMlBZoG/wdmCcoKRAypDQ8PbRDBEQQTOxRtFYcWlBePGIUZXhoiG88bcBz7HHIdzh0WHlMeZx51HmkeUx4WHs8dah0AHXwc3hs9G4saxRnyGBIYGBcQFv8U4RPAEoYRQBACD70NWwwHC6gJOwjWBloF7gOBAhABkf8b/qv8R/ve+Xf4Ife79W/0JfPZ8Z/wde9N7ijtE+wU6xvqM+lb6H7nw+YX5mrlxuQz5Mzje+Ma49fioeKD4nXiYeJy4pHitOL04j/jn+MN5IPkFOWs5U3mDefM55/ogOl36m7rdOyE7abuyu8D8Unyj/Pg9D/2qfcb+Yn6/vuK/Qj/lAAlAg=='; | ||
export class SoundManager implements ISoundManager { | ||
@@ -16,0 +10,0 @@ private static _audioContext: AudioContext; |
@@ -8,3 +8,2 @@ /** | ||
import * as cp from 'child_process'; | ||
import * as glob from 'glob'; | ||
@@ -15,3 +14,2 @@ import * as fs from 'fs'; | ||
import * as pty from 'node-pty'; | ||
import { assert } from 'chai'; | ||
import { Terminal } from './Terminal'; | ||
@@ -159,14 +157,1 @@ import { IViewport } from './Types'; | ||
} | ||
describe('typings', () => { | ||
it('should throw no compile errors', function (): void { | ||
this.timeout(20000); | ||
let tsc = path.join(__dirname, '..', 'node_modules', '.bin', 'tsc'); | ||
if (process.platform === 'win32') { | ||
tsc += '.cmd'; | ||
} | ||
const fixtureDir = path.join(__dirname, '..', 'fixtures', 'typings-test'); | ||
const result = cp.spawnSync(tsc, { cwd: fixtureDir }); | ||
assert.equal(result.status, 0, `build did not succeed:\nstdout: ${result.stdout.toString()}\nstderr: ${result.stderr.toString()}\n`); | ||
}); | ||
}); |
150
src/Types.ts
@@ -11,2 +11,3 @@ /** | ||
import { IColorSet } from 'ui/Types'; | ||
import { IOptionsService } from 'common/options/Types'; | ||
@@ -76,3 +77,2 @@ export type CustomKeyEventHandler = (event: KeyboardEvent) => boolean; | ||
error(text: string, data?: any): void; | ||
setOption(key: string, value: any): void; | ||
tabSet(): void; | ||
@@ -209,3 +209,2 @@ handler(data: string): void; | ||
cursorState: number; | ||
options: ITerminalOptions; | ||
buffer: IBuffer; | ||
@@ -218,2 +217,5 @@ buffers: IBufferSet; | ||
applicationCursor: boolean; | ||
optionsService: IOptionsService; | ||
// TODO: We should remove options once components adopt optionsService | ||
options: ITerminalOptions; | ||
@@ -264,3 +266,2 @@ handler(data: string): void; | ||
dispose(): void; | ||
destroy(): void; | ||
scrollLines(amount: number): void; | ||
@@ -274,4 +275,2 @@ scrollPages(pageCount: number): void; | ||
writeUtf8(data: Uint8Array): void; | ||
getOption(key: string): any; | ||
setOption(key: string, value: any): void; | ||
refresh(start: number, end: number): void; | ||
@@ -444,143 +443,2 @@ reset(): void; | ||
/** | ||
* Internal states of EscapeSequenceParser. | ||
*/ | ||
export const enum ParserState { | ||
GROUND = 0, | ||
ESCAPE = 1, | ||
ESCAPE_INTERMEDIATE = 2, | ||
CSI_ENTRY = 3, | ||
CSI_PARAM = 4, | ||
CSI_INTERMEDIATE = 5, | ||
CSI_IGNORE = 6, | ||
SOS_PM_APC_STRING = 7, | ||
OSC_STRING = 8, | ||
DCS_ENTRY = 9, | ||
DCS_PARAM = 10, | ||
DCS_IGNORE = 11, | ||
DCS_INTERMEDIATE = 12, | ||
DCS_PASSTHROUGH = 13 | ||
} | ||
/** | ||
* Internal actions of EscapeSequenceParser. | ||
*/ | ||
export const enum ParserAction { | ||
IGNORE = 0, | ||
ERROR = 1, | ||
PRINT = 2, | ||
EXECUTE = 3, | ||
OSC_START = 4, | ||
OSC_PUT = 5, | ||
OSC_END = 6, | ||
CSI_DISPATCH = 7, | ||
PARAM = 8, | ||
COLLECT = 9, | ||
ESC_DISPATCH = 10, | ||
CLEAR = 11, | ||
DCS_HOOK = 12, | ||
DCS_PUT = 13, | ||
DCS_UNHOOK = 14 | ||
} | ||
/** | ||
* Internal state of EscapeSequenceParser. | ||
* Used as argument of the error handler to allow | ||
* introspection at runtime on parse errors. | ||
* Return it with altered values to recover from | ||
* faulty states (not yet supported). | ||
* Set `abort` to `true` to abort the current parsing. | ||
*/ | ||
export interface IParsingState { | ||
// position in parse string | ||
position: number; | ||
// actual character code | ||
code: number; | ||
// current parser state | ||
currentState: ParserState; | ||
// print buffer start index (-1 for not set) | ||
print: number; | ||
// dcs buffer start index (-1 for not set) | ||
dcs: number; | ||
// osc string buffer | ||
osc: string; | ||
// collect buffer with intermediate characters | ||
collect: string; | ||
// params buffer | ||
params: number[]; | ||
// should abort (default: false) | ||
abort: boolean; | ||
} | ||
/** | ||
* DCS handler signature for EscapeSequenceParser. | ||
* EscapeSequenceParser handles DCS commands via separate | ||
* subparsers that get hook/unhooked and can handle | ||
* arbitrary amount of data. | ||
* | ||
* On entering a DSC sequence `hook` is called by | ||
* `EscapeSequenceParser`. Use it to initialize or reset | ||
* states needed to handle the current DCS sequence. | ||
* Note: A DCS parser is only instantiated once, therefore | ||
* you cannot rely on the ctor to reinitialize state. | ||
* | ||
* EscapeSequenceParser will call `put` several times if the | ||
* parsed data got split, therefore you might have to collect | ||
* `data` until `unhook` is called. | ||
* Note: `data` is borrowed, if you cannot process the data | ||
* in chunks you have to copy it, doing otherwise will lead to | ||
* data losses or corruption. | ||
* | ||
* `unhook` marks the end of the current DCS sequence. | ||
*/ | ||
export interface IDcsHandler { | ||
hook(collect: string, params: number[], flag: number): void; | ||
put(data: Uint32Array, start: number, end: number): void; | ||
unhook(): void; | ||
} | ||
/** | ||
* EscapeSequenceParser interface. | ||
*/ | ||
export interface IEscapeSequenceParser extends IDisposable { | ||
/** | ||
* Reset the parser to its initial state (handlers are kept). | ||
*/ | ||
reset(): void; | ||
/** | ||
* Parse string `data`. | ||
* @param data The data to parse. | ||
*/ | ||
parse(data: Uint32Array, length: number): void; | ||
setPrintHandler(callback: (data: Uint32Array, start: number, end: number) => void): void; | ||
clearPrintHandler(): void; | ||
setExecuteHandler(flag: string, callback: () => void): void; | ||
clearExecuteHandler(flag: string): void; | ||
setExecuteHandlerFallback(callback: (code: number) => void): void; | ||
setCsiHandler(flag: string, callback: (params: number[], collect: string) => void): void; | ||
clearCsiHandler(flag: string): void; | ||
setCsiHandlerFallback(callback: (collect: string, params: number[], flag: number) => void): void; | ||
addCsiHandler(flag: string, callback: (params: number[], collect: string) => boolean): IDisposable; | ||
addOscHandler(ident: number, callback: (data: string) => boolean): IDisposable; | ||
setEscHandler(collectAndFlag: string, callback: () => void): void; | ||
clearEscHandler(collectAndFlag: string): void; | ||
setEscHandlerFallback(callback: (collect: string, flag: number) => void): void; | ||
setOscHandler(ident: number, callback: (data: string) => void): void; | ||
clearOscHandler(ident: number): void; | ||
setOscHandlerFallback(callback: (identifier: number, data: string) => void): void; | ||
setDcsHandler(collectAndFlag: string, handler: IDcsHandler): void; | ||
clearDcsHandler(collectAndFlag: string): void; | ||
setDcsHandlerFallback(handler: IDcsHandler): void; | ||
setErrorHandler(callback: (state: IParsingState) => IParsingState): void; | ||
clearErrorHandler(): void; | ||
} | ||
export interface IMouseZoneManager extends IDisposable { | ||
@@ -587,0 +445,0 @@ add(zone: IMouseZone): void; |
@@ -14,4 +14,3 @@ { | ||
"paths": { | ||
"common/*": [ "./common/*" ], | ||
"ui/*": [ "./ui/*" ] | ||
"common/*": [ "./common/*" ] | ||
} | ||
@@ -18,0 +17,0 @@ }, |
@@ -80,27 +80,2 @@ /** | ||
/** | ||
* Whether to enable the rendering of bold text. | ||
* | ||
* @deprecated Use fontWeight and fontWeightBold instead. | ||
*/ | ||
enableBold?: boolean; | ||
/** | ||
* What character atlas implementation to use. The character atlas caches drawn characters, | ||
* speeding up rendering significantly. However, it can introduce some minor rendering | ||
* artifacts. | ||
* | ||
* - 'none': Don't use an atlas. | ||
* - 'static': Generate an atlas when the terminal starts or is reconfigured. This atlas will | ||
* only contain ASCII characters in 16 colors. | ||
* - 'dynamic': Generate an atlas using a LRU cache as characters are requested. Limited to | ||
* ASCII characters (for now), but supports 256 colors. For characters covered by the static | ||
* cache, it's slightly slower in comparison, since there's more overhead involved in | ||
* managing the cache. | ||
* | ||
* Currently defaults to 'static'. This option may be removed in the future. If it is, passed | ||
* parameters will be ignored. | ||
*/ | ||
experimentalCharAtlas?: 'none' | 'static' | 'dynamic'; | ||
/** | ||
* The font size used to render text. | ||
@@ -711,9 +686,2 @@ */ | ||
/** | ||
* Destroys the terminal and detaches it from the DOM. | ||
* | ||
* @deprecated Use dispose() instead. | ||
*/ | ||
destroy(): void; | ||
/** | ||
* Scroll the display of the terminal | ||
@@ -780,3 +748,3 @@ * @param amount The number of lines to scroll down (negative scroll up). | ||
*/ | ||
getOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'enableBold' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'screenKeys' | 'useFlowControl' | 'visualBell' | 'windowsMode'): boolean; | ||
getOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'screenKeys' | 'useFlowControl' | 'visualBell' | 'windowsMode'): boolean; | ||
/** | ||
@@ -832,3 +800,3 @@ * Retrieves an option's value from the terminal. | ||
*/ | ||
setOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'enableBold' | 'macOptionIsMeta' | 'popOnBell' | 'rightClickSelectsWord' | 'screenKeys' | 'useFlowControl' | 'visualBell' | 'windowsMode', value: boolean): void; | ||
setOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'macOptionIsMeta' | 'popOnBell' | 'rightClickSelectsWord' | 'screenKeys' | 'useFlowControl' | 'visualBell' | 'windowsMode', value: boolean): void; | ||
/** | ||
@@ -989,3 +957,3 @@ * Sets an option on the terminal. | ||
*/ | ||
getCell(x: number): IBufferCell; | ||
getCell(x: number): IBufferCell | undefined; | ||
@@ -992,0 +960,0 @@ /** |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
1650288
26
1
0
81
17109