Merge branch 'master' into decoration-test
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@
|
||||
* Minimal async helpers for xterm.js core.
|
||||
*/
|
||||
|
||||
import { DisposableStore, IDisposable, toDisposable } from 'common/Lifecycle';
|
||||
import { DisposableStore, IDisposable, toDisposable } from './Lifecycle';
|
||||
|
||||
export function timeout(millis: number): Promise<void> {
|
||||
return new Promise(resolve => setTimeout(resolve, millis));
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { CircularList } from 'common/CircularList';
|
||||
import { CircularList } from './CircularList';
|
||||
|
||||
describe('CircularList', () => {
|
||||
describe('push', () => {
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { ICircularList } from 'common/Types';
|
||||
import { Disposable } from 'common/Lifecycle';
|
||||
import { Emitter } from 'common/Event';
|
||||
import { ICircularList } from './Types';
|
||||
import { Disposable } from './Lifecycle';
|
||||
import { Emitter } from './Event';
|
||||
|
||||
export interface IInsertEvent {
|
||||
index: number;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { channels, color, css, rgb, rgba, toPaddedHex, contrastRatio } from 'common/Color';
|
||||
import { channels, color, css, rgb, rgba, toPaddedHex, contrastRatio } from './Color';
|
||||
|
||||
describe('Color', () => {
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { IColor, IColorRGB } from 'common/Types';
|
||||
import { IColor, IColorRGB } from './Types';
|
||||
|
||||
let $r = 0;
|
||||
let $g = 0;
|
||||
|
||||
+18
-18
@@ -21,24 +21,24 @@
|
||||
* http://linux.die.net/man/7/urxvt
|
||||
*/
|
||||
|
||||
import { IInstantiationService, IOptionsService, IBufferService, ILogService, ICharsetService, ICoreService, IMouseStateService, IUnicodeService, LogLevelEnum, ITerminalOptions, IOscLinkService } from 'common/services/Services';
|
||||
import { InstantiationService } from 'common/services/InstantiationService';
|
||||
import { LogService } from 'common/services/LogService';
|
||||
import { BufferService, BufferServiceConstants } from 'common/services/BufferService';
|
||||
import { OptionsService } from 'common/services/OptionsService';
|
||||
import { IDisposable, IAttributeData, ICoreTerminal, IScrollEvent } from 'common/Types';
|
||||
import { CoreService } from 'common/services/CoreService';
|
||||
import { MouseStateService } from 'common/services/MouseStateService';
|
||||
import { UnicodeService } from 'common/services/UnicodeService';
|
||||
import { CharsetService } from 'common/services/CharsetService';
|
||||
import { updateWindowsModeWrappedState } from 'common/WindowsMode';
|
||||
import { IFunctionIdentifier, IParams } from 'common/parser/Types';
|
||||
import { IBufferSet } from 'common/buffer/Types';
|
||||
import { InputHandler } from 'common/InputHandler';
|
||||
import { WriteBuffer } from 'common/input/WriteBuffer';
|
||||
import { OscLinkService } from 'common/services/OscLinkService';
|
||||
import { Emitter, EventUtils, type IEvent } from 'common/Event';
|
||||
import { Disposable, MutableDisposable, toDisposable } from 'common/Lifecycle';
|
||||
import { IInstantiationService, IOptionsService, IBufferService, ILogService, ICharsetService, ICoreService, IMouseStateService, IUnicodeService, LogLevelEnum, ITerminalOptions, IOscLinkService } from './services/Services';
|
||||
import { InstantiationService } from './services/InstantiationService';
|
||||
import { LogService } from './services/LogService';
|
||||
import { BufferService, BufferServiceConstants } from './services/BufferService';
|
||||
import { OptionsService } from './services/OptionsService';
|
||||
import { IDisposable, IAttributeData, ICoreTerminal, IScrollEvent } from './Types';
|
||||
import { CoreService } from './services/CoreService';
|
||||
import { MouseStateService } from './services/MouseStateService';
|
||||
import { UnicodeService } from './services/UnicodeService';
|
||||
import { CharsetService } from './services/CharsetService';
|
||||
import { updateWindowsModeWrappedState } from './WindowsMode';
|
||||
import { IFunctionIdentifier, IParams } from './parser/Types';
|
||||
import { IBufferSet } from './buffer/Types';
|
||||
import { InputHandler } from './InputHandler';
|
||||
import { WriteBuffer } from './input/WriteBuffer';
|
||||
import { OscLinkService } from './services/OscLinkService';
|
||||
import { Emitter, EventUtils, type IEvent } from './Event';
|
||||
import { Disposable, MutableDisposable, toDisposable } from './Lifecycle';
|
||||
|
||||
// Only trigger this warning a single time per session
|
||||
let hasWriteSyncWarnHappened = false;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { Emitter } from 'common/Event';
|
||||
import { Emitter } from './Event';
|
||||
|
||||
describe('Emitter', () => {
|
||||
it('should fire with 0 listeners without error', () => {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
* Simplified from VS Code's event.ts - no leak detection/profiling.
|
||||
*/
|
||||
|
||||
import { IDisposable, DisposableStore, toDisposable } from 'common/Lifecycle';
|
||||
import { IDisposable, DisposableStore, toDisposable } from './Lifecycle';
|
||||
|
||||
export interface IEvent<T> {
|
||||
(listener: (e: T) => any, thisArgs?: any, disposables?: IDisposable[] | DisposableStore): IDisposable;
|
||||
|
||||
@@ -4,19 +4,19 @@
|
||||
*/
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { InputHandler } from 'common/InputHandler';
|
||||
import { IBufferLine, IAttributeData, IColorEvent, ColorRequestType, SpecialColorIndex } from 'common/Types';
|
||||
import { DEFAULT_ATTR_DATA } from 'common/buffer/BufferLine';
|
||||
import { CellData } from 'common/buffer/CellData';
|
||||
import { Attributes, BgFlags, UnderlineStyle } from 'common/buffer/Constants';
|
||||
import { AttributeData, ExtendedAttrs } from 'common/buffer/AttributeData';
|
||||
import { Params } from 'common/parser/Params';
|
||||
import { MockCoreService, MockBufferService, MockOptionsService, MockLogService, MockMouseStateService, MockCharsetService, MockUnicodeService, MockOscLinkService, extendedAttributes } from 'common/TestUtils.test';
|
||||
import { IBufferService, ICoreService, type IOscLinkService } from 'common/services/Services';
|
||||
import { DEFAULT_OPTIONS } from 'common/services/OptionsService';
|
||||
import { BufferService } from 'common/services/BufferService';
|
||||
import { CoreService } from 'common/services/CoreService';
|
||||
import { OscLinkService } from 'common/services/OscLinkService';
|
||||
import { InputHandler } from './InputHandler';
|
||||
import { IBufferLine, IAttributeData, IColorEvent, ColorRequestType, SpecialColorIndex } from './Types';
|
||||
import { DEFAULT_ATTR_DATA } from './buffer/BufferLine';
|
||||
import { CellData } from './buffer/CellData';
|
||||
import { Attributes, BgFlags, UnderlineStyle } from './buffer/Constants';
|
||||
import { AttributeData, ExtendedAttrs } from './buffer/AttributeData';
|
||||
import { Params } from './parser/Params';
|
||||
import { MockCoreService, MockBufferService, MockOptionsService, MockLogService, MockMouseStateService, MockCharsetService, MockUnicodeService, MockOscLinkService, extendedAttributes } from './TestUtils.test';
|
||||
import { IBufferService, ICoreService, type IOscLinkService } from './services/Services';
|
||||
import { DEFAULT_OPTIONS } from './services/OptionsService';
|
||||
import { BufferService } from './services/BufferService';
|
||||
import { CoreService } from './services/CoreService';
|
||||
import { OscLinkService } from './services/OscLinkService';
|
||||
|
||||
|
||||
function getCursor(bufferService: IBufferService): number[] {
|
||||
|
||||
+20
-20
@@ -4,26 +4,26 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { IInputHandler, IAttributeData, IDisposable, IWindowOptions, IColorEvent, IParseStack, ColorIndex, ColorRequestType, SpecialColorIndex } from 'common/Types';
|
||||
import { C0, C1 } from 'common/data/EscapeSequences';
|
||||
import { CHARSETS, DEFAULT_CHARSET } from 'common/data/Charsets';
|
||||
import { EscapeSequenceParser } from 'common/parser/EscapeSequenceParser';
|
||||
import { Disposable } from 'common/Lifecycle';
|
||||
import { StringToUtf32, stringFromCodePoint, Utf8ToUtf32 } from 'common/input/TextDecoder';
|
||||
import { BufferLine, DEFAULT_ATTR_DATA } from 'common/buffer/BufferLine';
|
||||
import { IParsingState, IEscapeSequenceParser, IParams, IFunctionIdentifier } from 'common/parser/Types';
|
||||
import { NULL_CELL_CODE, NULL_CELL_WIDTH, Attributes, FgFlags, BgFlags, Content, UnderlineStyle } from 'common/buffer/Constants';
|
||||
import { CellData } from 'common/buffer/CellData';
|
||||
import { AttributeData } from 'common/buffer/AttributeData';
|
||||
import { ICoreService, IBufferService, IOptionsService, ILogService, IMouseStateService, ICharsetService, IUnicodeService, LogLevelEnum, IOscLinkService } from 'common/services/Services';
|
||||
import { UnicodeService } from 'common/services/UnicodeService';
|
||||
import { OscHandler } from 'common/parser/OscParser';
|
||||
import { DcsHandler } from 'common/parser/DcsParser';
|
||||
import { ApcHandler } from 'common/parser/ApcParser';
|
||||
import { IBuffer } from 'common/buffer/Types';
|
||||
import { parseColor } from 'common/input/XParseColor';
|
||||
import { Emitter } from 'common/Event';
|
||||
import { XTERM_VERSION } from 'common/Version';
|
||||
import { IInputHandler, IAttributeData, IDisposable, IWindowOptions, IColorEvent, IParseStack, ColorIndex, ColorRequestType, SpecialColorIndex } from './Types';
|
||||
import { C0, C1 } from './data/EscapeSequences';
|
||||
import { CHARSETS, DEFAULT_CHARSET } from './data/Charsets';
|
||||
import { EscapeSequenceParser } from './parser/EscapeSequenceParser';
|
||||
import { Disposable } from './Lifecycle';
|
||||
import { StringToUtf32, stringFromCodePoint, Utf8ToUtf32 } from './input/TextDecoder';
|
||||
import { BufferLine, DEFAULT_ATTR_DATA } from './buffer/BufferLine';
|
||||
import { IParsingState, IEscapeSequenceParser, IParams, IFunctionIdentifier } from './parser/Types';
|
||||
import { NULL_CELL_CODE, NULL_CELL_WIDTH, Attributes, FgFlags, BgFlags, Content, UnderlineStyle } from './buffer/Constants';
|
||||
import { CellData } from './buffer/CellData';
|
||||
import { AttributeData } from './buffer/AttributeData';
|
||||
import { ICoreService, IBufferService, IOptionsService, ILogService, IMouseStateService, ICharsetService, IUnicodeService, LogLevelEnum, IOscLinkService } from './services/Services';
|
||||
import { UnicodeService } from './services/UnicodeService';
|
||||
import { OscHandler } from './parser/OscParser';
|
||||
import { DcsHandler } from './parser/DcsParser';
|
||||
import { ApcHandler } from './parser/ApcParser';
|
||||
import { IBuffer } from './buffer/Types';
|
||||
import { parseColor } from './input/XParseColor';
|
||||
import { Emitter } from './Event';
|
||||
import { XTERM_VERSION } from './Version';
|
||||
|
||||
/**
|
||||
* Map collect to glevel. Used in `selectCharset`.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { FourKeyMap, TwoKeyMap } from 'common/MultiKeyMap';
|
||||
import { FourKeyMap, TwoKeyMap } from './MultiKeyMap';
|
||||
|
||||
const strictEqual = assert.strictEqual;
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
*/
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { SortedList } from 'common/SortedList';
|
||||
import { MockLogService } from 'common/TestUtils.test';
|
||||
import { SortedList } from './SortedList';
|
||||
import { MockLogService } from './TestUtils.test';
|
||||
|
||||
const deepStrictEqual = assert.deepStrictEqual;
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { IdleTaskQueue } from 'common/TaskQueue';
|
||||
import type { ILogService } from 'common/services/Services';
|
||||
import { IdleTaskQueue } from './TaskQueue';
|
||||
import type { ILogService } from './services/Services';
|
||||
|
||||
// Work variables to avoid garbage collection.
|
||||
let i = 0;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { LimitedStringBuilder, StringBuilder } from 'common/StringBuilder';
|
||||
import { LimitedStringBuilder, StringBuilder } from './StringBuilder';
|
||||
|
||||
describe('StringBuilder', () => {
|
||||
it('should start empty', () => {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import type { ILogService } from 'common/services/Services';
|
||||
import type { ILogService } from './services/Services';
|
||||
|
||||
interface ITaskQueue {
|
||||
/**
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { IBufferService, ICoreService, ILogService, IOptionsService, ITerminalOptions, IMouseStateService, ICharsetService, UnicodeCharProperties, UnicodeCharWidth, IUnicodeService, IUnicodeVersionProvider, LogLevelEnum, IDecorationService, IInternalDecoration, IOscLinkService, type IBufferResizeEvent } from 'common/services/Services';
|
||||
import { UnicodeService } from 'common/services/UnicodeService';
|
||||
import { DEFAULT_OPTIONS } from 'common/services/OptionsService';
|
||||
import { IBufferSet, IBuffer } from 'common/buffer/Types';
|
||||
import { BufferSet } from 'common/buffer/BufferSet';
|
||||
import { IDecPrivateModes, ICoreMouseEvent, CoreMouseEventType, ICharset, IModes, IAttributeData, IOscLinkData, IDisposable, IBufferLine, IExtendedAttrs } from 'common/Types';
|
||||
import { UnicodeV6 } from 'common/input/UnicodeV6';
|
||||
import { IBufferService, ICoreService, ILogService, IOptionsService, ITerminalOptions, IMouseStateService, ICharsetService, UnicodeCharProperties, UnicodeCharWidth, IUnicodeService, IUnicodeVersionProvider, LogLevelEnum, IDecorationService, IInternalDecoration, IOscLinkService, type IBufferResizeEvent } from './services/Services';
|
||||
import { UnicodeService } from './services/UnicodeService';
|
||||
import { DEFAULT_OPTIONS } from './services/OptionsService';
|
||||
import { IBufferSet, IBuffer } from './buffer/Types';
|
||||
import { BufferSet } from './buffer/BufferSet';
|
||||
import { IDecPrivateModes, ICoreMouseEvent, CoreMouseEventType, ICharset, IModes, IAttributeData, IOscLinkData, IDisposable, IBufferLine, IExtendedAttrs } from './Types';
|
||||
import { UnicodeV6 } from './input/UnicodeV6';
|
||||
import { IDecorationOptions, IDecoration } from '@xterm/xterm';
|
||||
import { Emitter, type IEvent } from 'common/Event';
|
||||
import { CellData } from 'common/buffer/CellData';
|
||||
import { DEFAULT_ATTR, NULL_CELL_CHAR, NULL_CELL_WIDTH } from 'common/buffer/Constants';
|
||||
import { Emitter, type IEvent } from './Event';
|
||||
import { CellData } from './buffer/CellData';
|
||||
import { DEFAULT_ATTR, NULL_CELL_CHAR, NULL_CELL_WIDTH } from './buffer/Constants';
|
||||
|
||||
export function createCellData(attr: number, char: string, width: number): CellData {
|
||||
return CellData.fromCharData([attr, char, width, char.length === 0 ? 0 : char.charCodeAt(0)]);
|
||||
|
||||
+6
-6
@@ -3,13 +3,13 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { IDeleteEvent, IInsertEvent } from 'common/CircularList';
|
||||
import { UnderlineStyle } from 'common/buffer/Constants';
|
||||
import { IBufferSet } from 'common/buffer/Types';
|
||||
import { IParams } from 'common/parser/Types';
|
||||
import { IMouseStateService, ICoreService, IOptionsService, IUnicodeService } from 'common/services/Services';
|
||||
import { IDeleteEvent, IInsertEvent } from './CircularList';
|
||||
import { UnderlineStyle } from './buffer/Constants';
|
||||
import { IBufferSet } from './buffer/Types';
|
||||
import { IParams } from './parser/Types';
|
||||
import { IMouseStateService, ICoreService, IOptionsService, IUnicodeService } from './services/Services';
|
||||
import { IFunctionIdentifier, ITerminalOptions as IPublicTerminalOptions } from '@xterm/xterm';
|
||||
import type { Emitter, IEvent } from 'common/Event';
|
||||
import type { Emitter, IEvent } from './Event';
|
||||
|
||||
export interface ICoreTerminal {
|
||||
mouseStateService: IMouseStateService;
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { CHAR_DATA_CODE_INDEX, NULL_CELL_CODE, WHITESPACE_CELL_CODE } from 'common/buffer/Constants';
|
||||
import { IBufferService } from 'common/services/Services';
|
||||
import { CHAR_DATA_CODE_INDEX, NULL_CELL_CODE, WHITESPACE_CELL_CODE } from './buffer/Constants';
|
||||
import { IBufferService } from './services/Services';
|
||||
|
||||
export function updateWindowsModeWrappedState(bufferService: IBufferService): void {
|
||||
// Winpty does not support wraparound mode which means that lines will never
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { IAttributeData, IColorRGB, IExtendedAttrs } from 'common/Types';
|
||||
import { Attributes, FgFlags, BgFlags, UnderlineStyle, ExtFlags } from 'common/buffer/Constants';
|
||||
import { IAttributeData, IColorRGB, IExtendedAttrs } from '../Types';
|
||||
import { Attributes, FgFlags, BgFlags, UnderlineStyle, ExtFlags } from './Constants';
|
||||
|
||||
export class AttributeData implements IAttributeData {
|
||||
public static toColorRGB(value: number): IColorRGB {
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
*/
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { Buffer } from 'common/buffer/Buffer';
|
||||
import { CircularList } from 'common/CircularList';
|
||||
import { MockOptionsService, MockBufferService, MockLogService, createCellData } from 'common/TestUtils.test';
|
||||
import { BufferLine, DEFAULT_ATTR_DATA } from 'common/buffer/BufferLine';
|
||||
import { BufferLineStringCache } from 'common/buffer/BufferLineStringCache';
|
||||
import { CellData } from 'common/buffer/CellData';
|
||||
import { ExtendedAttrs } from 'common/buffer/AttributeData';
|
||||
import { Buffer } from './Buffer';
|
||||
import { CircularList } from '../CircularList';
|
||||
import { MockOptionsService, MockBufferService, MockLogService, createCellData } from '../TestUtils.test';
|
||||
import { BufferLine, DEFAULT_ATTR_DATA } from './BufferLine';
|
||||
import { BufferLineStringCache } from './BufferLineStringCache';
|
||||
import { CellData } from './CellData';
|
||||
import { ExtendedAttrs } from './AttributeData';
|
||||
|
||||
const INIT_COLS = 80;
|
||||
const INIT_ROWS = 24;
|
||||
|
||||
+14
-14
@@ -3,20 +3,20 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { CircularList, IInsertEvent } from 'common/CircularList';
|
||||
import { Disposable, toDisposable } from 'common/Lifecycle';
|
||||
import { IdleTaskQueue } from 'common/TaskQueue';
|
||||
import { IAttributeData, IBufferLine, ICellData, ICharset } from 'common/Types';
|
||||
import { ExtendedAttrs } from 'common/buffer/AttributeData';
|
||||
import { BufferLine, DEFAULT_ATTR_DATA } from 'common/buffer/BufferLine';
|
||||
import { BufferLineStringCache } from 'common/buffer/BufferLineStringCache';
|
||||
import { getWrappedLineTrimmedLength, reflowLargerApplyNewLayout, reflowLargerCreateNewLayout, reflowLargerGetLinesToRemove, reflowSmallerGetNewLineLengths } from 'common/buffer/BufferReflow';
|
||||
import { CellData } from 'common/buffer/CellData';
|
||||
import { NULL_CELL_CHAR, NULL_CELL_CODE, NULL_CELL_WIDTH, WHITESPACE_CELL_CHAR, WHITESPACE_CELL_CODE, WHITESPACE_CELL_WIDTH } from 'common/buffer/Constants';
|
||||
import { Marker } from 'common/buffer/Marker';
|
||||
import { IBuffer } from 'common/buffer/Types';
|
||||
import { DEFAULT_CHARSET } from 'common/data/Charsets';
|
||||
import { IBufferService, ILogService, IOptionsService } from 'common/services/Services';
|
||||
import { CircularList, IInsertEvent } from '../CircularList';
|
||||
import { Disposable, toDisposable } from '../Lifecycle';
|
||||
import { IdleTaskQueue } from '../TaskQueue';
|
||||
import { IAttributeData, IBufferLine, ICellData, ICharset } from '../Types';
|
||||
import { ExtendedAttrs } from './AttributeData';
|
||||
import { BufferLine, DEFAULT_ATTR_DATA } from './BufferLine';
|
||||
import { BufferLineStringCache } from './BufferLineStringCache';
|
||||
import { getWrappedLineTrimmedLength, reflowLargerApplyNewLayout, reflowLargerCreateNewLayout, reflowLargerGetLinesToRemove, reflowSmallerGetNewLineLengths } from './BufferReflow';
|
||||
import { CellData } from './CellData';
|
||||
import { NULL_CELL_CHAR, NULL_CELL_CODE, NULL_CELL_WIDTH, WHITESPACE_CELL_CHAR, WHITESPACE_CELL_CODE, WHITESPACE_CELL_WIDTH } from './Constants';
|
||||
import { Marker } from './Marker';
|
||||
import { IBuffer } from './Types';
|
||||
import { DEFAULT_CHARSET } from '../data/Charsets';
|
||||
import { IBufferService, ILogService, IOptionsService } from '../services/Services';
|
||||
|
||||
export const MAX_BUFFER_SIZE = 4294967295; // 2^32 - 1
|
||||
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
* Copyright (c) 2018 The xterm.js authors. All rights reserved.
|
||||
* @license MIT
|
||||
*/
|
||||
import { NULL_CELL_CHAR, NULL_CELL_WIDTH, NULL_CELL_CODE, DEFAULT_ATTR, Content, UnderlineStyle, BgFlags, Attributes, FgFlags } from 'common/buffer/Constants';
|
||||
import { BufferLine } from 'common/buffer//BufferLine';
|
||||
import { BufferLineStringCache } from 'common/buffer/BufferLineStringCache';
|
||||
import { CellData } from 'common/buffer/CellData';
|
||||
import { NULL_CELL_CHAR, NULL_CELL_WIDTH, NULL_CELL_CODE, DEFAULT_ATTR, Content, UnderlineStyle, BgFlags, Attributes, FgFlags } from './Constants';
|
||||
import { BufferLine } from './BufferLine';
|
||||
import { BufferLineStringCache } from './BufferLineStringCache';
|
||||
import { CellData } from './CellData';
|
||||
import { CharData, IBufferLine, ICellData } from '../Types';
|
||||
import { assert } from 'chai';
|
||||
import { AttributeData } from 'common/buffer/AttributeData';
|
||||
import { createCellData, NULL_CELL_DATA, extendedAttributes } from 'common/TestUtils.test';
|
||||
import { AttributeData } from './AttributeData';
|
||||
import { createCellData, NULL_CELL_DATA, extendedAttributes } from '../TestUtils.test';
|
||||
|
||||
const TEST_STRING_CACHE = new BufferLineStringCache();
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { CharData, IAttributeData, IBufferLine, ICellData, IExtendedAttrs } from 'common/Types';
|
||||
import { AttributeData } from 'common/buffer/AttributeData';
|
||||
import { CellData } from 'common/buffer/CellData';
|
||||
import { Attributes, BgFlags, CHAR_DATA_ATTR_INDEX, CHAR_DATA_CHAR_INDEX, CHAR_DATA_WIDTH_INDEX, Content, NULL_CELL_CHAR, NULL_CELL_CODE, NULL_CELL_WIDTH, WHITESPACE_CELL_CHAR } from 'common/buffer/Constants';
|
||||
import { stringFromCodePoint } from 'common/input/TextDecoder';
|
||||
import { StringBuilder } from 'common/StringBuilder';
|
||||
import { CharData, IAttributeData, IBufferLine, ICellData, IExtendedAttrs } from '../Types';
|
||||
import { AttributeData } from './AttributeData';
|
||||
import { CellData } from './CellData';
|
||||
import { Attributes, BgFlags, CHAR_DATA_ATTR_INDEX, CHAR_DATA_CHAR_INDEX, CHAR_DATA_WIDTH_INDEX, Content, NULL_CELL_CHAR, NULL_CELL_CODE, NULL_CELL_WIDTH, WHITESPACE_CELL_CHAR } from './Constants';
|
||||
import { stringFromCodePoint } from '../input/TextDecoder';
|
||||
import { StringBuilder } from '../StringBuilder';
|
||||
|
||||
// Buffer memory layout:
|
||||
//
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import type { IBufferLineStringCache, IBufferLineStringCacheEntry } from 'common/buffer/BufferLine';
|
||||
import { disposableTimeout } from 'common/Async';
|
||||
import { Disposable, MutableDisposable, toDisposable, type IDisposable } from 'common/Lifecycle';
|
||||
import type { IBufferLineStringCache, IBufferLineStringCacheEntry } from './BufferLine';
|
||||
import { disposableTimeout } from '../Async';
|
||||
import { Disposable, MutableDisposable, toDisposable, type IDisposable } from '../Lifecycle';
|
||||
|
||||
const enum Constants {
|
||||
CACHE_TTL_MS = 15000
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { getRangeLength } from 'common/buffer/BufferRange';
|
||||
import { getRangeLength } from './BufferRange';
|
||||
import { IBufferRange } from '@xterm/xterm';
|
||||
|
||||
describe('BufferRange', () => {
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
* @license MIT
|
||||
*/
|
||||
import { assert } from 'chai';
|
||||
import { BufferLine } from 'common/buffer/BufferLine';
|
||||
import { BufferLineStringCache } from 'common/buffer/BufferLineStringCache';
|
||||
import { NULL_CELL_CHAR, NULL_CELL_WIDTH, NULL_CELL_CODE } from 'common/buffer/Constants';
|
||||
import { reflowSmallerGetNewLineLengths } from 'common/buffer/BufferReflow';
|
||||
import { BufferLine } from './BufferLine';
|
||||
import { BufferLineStringCache } from './BufferLineStringCache';
|
||||
import { NULL_CELL_CHAR, NULL_CELL_WIDTH, NULL_CELL_CODE } from './Constants';
|
||||
import { reflowSmallerGetNewLineLengths } from './BufferReflow';
|
||||
|
||||
const TEST_STRING_CACHE = new BufferLineStringCache();
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { BufferLine } from 'common/buffer/BufferLine';
|
||||
import { CircularList } from 'common/CircularList';
|
||||
import { IBufferLine, ICellData } from 'common/Types';
|
||||
import { BufferLine } from './BufferLine';
|
||||
import { CircularList } from '../CircularList';
|
||||
import { IBufferLine, ICellData } from '../Types';
|
||||
|
||||
export interface INewLayoutResult {
|
||||
layout: number[];
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
*/
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { BufferSet } from 'common/buffer/BufferSet';
|
||||
import { Buffer } from 'common/buffer/Buffer';
|
||||
import { MockOptionsService, MockBufferService, MockLogService, createCellData } from 'common/TestUtils.test';
|
||||
import { BufferSet } from './BufferSet';
|
||||
import { Buffer } from './Buffer';
|
||||
import { MockOptionsService, MockBufferService, MockLogService, createCellData } from '../TestUtils.test';
|
||||
|
||||
describe('BufferSet', () => {
|
||||
let bufferSet: BufferSet;
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { Disposable, MutableDisposable } from 'common/Lifecycle';
|
||||
import { IAttributeData } from 'common/Types';
|
||||
import { Buffer } from 'common/buffer/Buffer';
|
||||
import { IBuffer, IBufferSet } from 'common/buffer/Types';
|
||||
import { IBufferService, ILogService, IOptionsService } from 'common/services/Services';
|
||||
import { Emitter } from 'common/Event';
|
||||
import { Disposable, MutableDisposable } from '../Lifecycle';
|
||||
import { IAttributeData } from '../Types';
|
||||
import { Buffer } from './Buffer';
|
||||
import { IBuffer, IBufferSet } from './Types';
|
||||
import { IBufferService, ILogService, IOptionsService } from '../services/Services';
|
||||
import { Emitter } from '../Event';
|
||||
|
||||
/**
|
||||
* The BufferSet represents the set of two buffers used by xterm terminals (normal and alt) and
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
* Copyright (c) 2026 The xterm.js authors. All rights reserved.
|
||||
* @license MIT
|
||||
*/
|
||||
import { Attributes, BgFlags, FgFlags, UnderlineStyle } from 'common/buffer/Constants';
|
||||
import { CellData } from 'common/buffer/CellData';
|
||||
import { Attributes, BgFlags, FgFlags, UnderlineStyle } from './Constants';
|
||||
import { CellData } from './CellData';
|
||||
import { assert } from 'chai';
|
||||
|
||||
function createStyledCell(char: string, underlineStyle: UnderlineStyle, underlineColor: number): CellData {
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { CharData, ICellData, IExtendedAttrs } from 'common/Types';
|
||||
import { stringFromCodePoint } from 'common/input/TextDecoder';
|
||||
import { CHAR_DATA_CHAR_INDEX, CHAR_DATA_WIDTH_INDEX, CHAR_DATA_ATTR_INDEX, Content } from 'common/buffer/Constants';
|
||||
import { AttributeData, ExtendedAttrs } from 'common/buffer/AttributeData';
|
||||
import { CharData, ICellData, IExtendedAttrs } from '../Types';
|
||||
import { stringFromCodePoint } from '../input/TextDecoder';
|
||||
import { CHAR_DATA_CHAR_INDEX, CHAR_DATA_WIDTH_INDEX, CHAR_DATA_ATTR_INDEX, Content } from './Constants';
|
||||
import { AttributeData, ExtendedAttrs } from './AttributeData';
|
||||
import type { IBufferCell as IBufferCellApi } from '@xterm/xterm';
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { IDisposable, IMarker } from 'common/Types';
|
||||
import { Emitter } from 'common/Event';
|
||||
import { dispose } from 'common/Lifecycle';
|
||||
import { IDisposable, IMarker } from '../Types';
|
||||
import { Emitter } from '../Event';
|
||||
import { dispose } from '../Lifecycle';
|
||||
|
||||
export class Marker implements IMarker {
|
||||
private static _nextId = 1;
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { IAttributeData, ICircularList, IBufferLine, ICellData, IMarker, ICharset, IDisposable } from 'common/Types';
|
||||
import type { IEvent } from 'common/Event';
|
||||
import { IAttributeData, ICircularList, IBufferLine, ICellData, IMarker, ICharset, IDisposable } from '../Types';
|
||||
import type { IEvent } from '../Event';
|
||||
|
||||
// BufferIndex denotes a position in the buffer: [rowIndex, colIndex]
|
||||
export type BufferIndex = [number, number];
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { ICharset } from 'common/Types';
|
||||
import { ICharset } from '../Types';
|
||||
|
||||
/**
|
||||
* The character sets supported by the terminal. These enable several languages
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { evaluateKeyboardEvent } from 'common/input/Keyboard';
|
||||
import { IKeyboardResult, IKeyboardEvent } from 'common/Types';
|
||||
import { evaluateKeyboardEvent } from './Keyboard';
|
||||
import { IKeyboardResult, IKeyboardEvent } from '../Types';
|
||||
|
||||
/**
|
||||
* A helper function for testing which allows passing in a partial event and defaults will be filled
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { IKeyboardEvent, IKeyboardResult, KeyboardResultType } from 'common/Types';
|
||||
import { C0 } from 'common/data/EscapeSequences';
|
||||
import { IKeyboardEvent, IKeyboardResult, KeyboardResultType } from '../Types';
|
||||
import { C0 } from '../data/EscapeSequences';
|
||||
|
||||
// reg + shift key mappings for digits and special chars
|
||||
const KEYCODE_KEY_MAPPINGS: { [key: number]: [string, string]} = {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { KittyKeyboard, KittyKeyboardEventType, KittyKeyboardFlags } from 'common/input/KittyKeyboard';
|
||||
import { IKeyboardEvent } from 'common/Types';
|
||||
import { KittyKeyboard, KittyKeyboardEventType, KittyKeyboardFlags } from './KittyKeyboard';
|
||||
import { IKeyboardEvent } from '../Types';
|
||||
|
||||
function createEvent(partialEvent: Partial<IKeyboardEvent> = {}): IKeyboardEvent {
|
||||
return {
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
* @see https://sw.kovidgoyal.net/kitty/keyboard-protocol/
|
||||
*/
|
||||
|
||||
import { IKeyboardEvent, IKeyboardResult, KeyboardResultType } from 'common/Types';
|
||||
import { C0 } from 'common/data/EscapeSequences';
|
||||
import { IKeyboardEvent, IKeyboardResult, KeyboardResultType } from '../Types';
|
||||
import { C0 } from '../data/EscapeSequences';
|
||||
|
||||
/**
|
||||
* Kitty keyboard protocol enhancement flags (bitfield).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { StringToUtf32, stringFromCodePoint, Utf8ToUtf32, utf32ToString } from 'common/input/TextDecoder';
|
||||
import { StringToUtf32, stringFromCodePoint, Utf8ToUtf32, utf32ToString } from './TextDecoder';
|
||||
|
||||
|
||||
// convert UTF32 codepoints to string
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { UnicodeV6 } from 'common/input/UnicodeV6';
|
||||
import { UnicodeV6 } from './UnicodeV6';
|
||||
|
||||
it('wcwidth should match all values from the old implementation', function(): void {
|
||||
// new implementation
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
* Copyright (c) 2019 The xterm.js authors. All rights reserved.
|
||||
* @license MIT
|
||||
*/
|
||||
import { IUnicodeVersionProvider, UnicodeCharProperties, UnicodeCharWidth } from 'common/services/Services';
|
||||
import { UnicodeService } from 'common/services/UnicodeService';
|
||||
import { IUnicodeVersionProvider, UnicodeCharProperties, UnicodeCharWidth } from '../services/Services';
|
||||
import { UnicodeService } from '../services/UnicodeService';
|
||||
|
||||
const BMP_COMBINING = [
|
||||
[0x0300, 0x036F], [0x0483, 0x0486], [0x0488, 0x0489],
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
*/
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { Win32InputMode, Win32ControlKeyState } from 'common/input/Win32InputMode';
|
||||
import { IKeyboardEvent, KeyboardResultType } from 'common/Types';
|
||||
import { Win32InputMode, Win32ControlKeyState } from './Win32InputMode';
|
||||
import { IKeyboardEvent, KeyboardResultType } from '../Types';
|
||||
|
||||
type EventOpts = Partial<IKeyboardEvent>;
|
||||
const ev = (opts: EventOpts): IKeyboardEvent => ({
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
* Rc: Repeat count (usually 1)
|
||||
*/
|
||||
|
||||
import { IKeyboardEvent, IKeyboardResult, KeyboardResultType } from 'common/Types';
|
||||
import { C0 } from 'common/data/EscapeSequences';
|
||||
import { IKeyboardEvent, IKeyboardResult, KeyboardResultType } from '../Types';
|
||||
import { C0 } from '../data/EscapeSequences';
|
||||
|
||||
/**
|
||||
* Win32 control key state flags (from Windows API).
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { TimeoutTimer } from 'common/Async';
|
||||
import { Disposable, toDisposable } from 'common/Lifecycle';
|
||||
import { Emitter } from 'common/Event';
|
||||
import { TimeoutTimer } from '../Async';
|
||||
import { Disposable, toDisposable } from '../Lifecycle';
|
||||
import { Emitter } from '../Event';
|
||||
|
||||
const enum Constants {
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { parseColor, toRgbString } from 'common/input/XParseColor';
|
||||
import { parseColor, toRgbString } from './XParseColor';
|
||||
|
||||
describe('XParseColor', () => {
|
||||
describe('parseColor', () => {
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* @license MIT
|
||||
*/
|
||||
import { assert } from 'chai';
|
||||
import { ApcParser, ApcHandler } from 'common/parser/ApcParser';
|
||||
import { StringToUtf32, utf32ToString } from 'common/input/TextDecoder';
|
||||
import { IApcHandler, IFunctionIdentifier } from 'common/parser/Types';
|
||||
import { ApcParser, ApcHandler } from './ApcParser';
|
||||
import { StringToUtf32, utf32ToString } from '../input/TextDecoder';
|
||||
import { IApcHandler, IFunctionIdentifier } from './Types';
|
||||
|
||||
function toUtf32(s: string): Uint32Array {
|
||||
const utf32 = new Uint32Array(s.length);
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { IApcHandler, IHandlerCollection, ApcFallbackHandlerType, IApcParser, ISubParserStackState } from 'common/parser/Types';
|
||||
import { ParserConstants } from 'common/parser/Constants';
|
||||
import { utf32ToString } from 'common/input/TextDecoder';
|
||||
import { IDisposable } from 'common/Types';
|
||||
import { LimitedStringBuilder } from 'common/StringBuilder';
|
||||
import { IApcHandler, IHandlerCollection, ApcFallbackHandlerType, IApcParser, ISubParserStackState } from './Types';
|
||||
import { ParserConstants } from './Constants';
|
||||
import { utf32ToString } from '../input/TextDecoder';
|
||||
import { IDisposable } from '../Types';
|
||||
import { LimitedStringBuilder } from '../StringBuilder';
|
||||
|
||||
const EMPTY_HANDLERS: IApcHandler[] = [];
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
* @license MIT
|
||||
*/
|
||||
import { assert } from 'chai';
|
||||
import { DcsParser, DcsHandler } from 'common/parser/DcsParser';
|
||||
import { IDcsHandler, IParams, IFunctionIdentifier } from 'common/parser/Types';
|
||||
import { utf32ToString, StringToUtf32 } from 'common/input/TextDecoder';
|
||||
import { Params } from 'common/parser/Params';
|
||||
import { DcsParser, DcsHandler } from './DcsParser';
|
||||
import { IDcsHandler, IParams, IFunctionIdentifier } from './Types';
|
||||
import { utf32ToString, StringToUtf32 } from '../input/TextDecoder';
|
||||
import { Params } from './Params';
|
||||
|
||||
function toUtf32(s: string): Uint32Array {
|
||||
const utf32 = new Uint32Array(s.length);
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { IDisposable } from 'common/Types';
|
||||
import { IDcsHandler, IParams, IHandlerCollection, IDcsParser, DcsFallbackHandlerType, ISubParserStackState } from 'common/parser/Types';
|
||||
import { utf32ToString } from 'common/input/TextDecoder';
|
||||
import { Params } from 'common/parser/Params';
|
||||
import { ParserConstants } from 'common/parser/Constants';
|
||||
import { LimitedStringBuilder } from 'common/StringBuilder';
|
||||
import { IDisposable } from '../Types';
|
||||
import { IDcsHandler, IParams, IHandlerCollection, IDcsParser, DcsFallbackHandlerType, ISubParserStackState } from './Types';
|
||||
import { utf32ToString } from '../input/TextDecoder';
|
||||
import { Params } from './Params';
|
||||
import { ParserConstants } from './Constants';
|
||||
import { LimitedStringBuilder } from '../StringBuilder';
|
||||
|
||||
const EMPTY_HANDLERS: IDcsHandler[] = [];
|
||||
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { IParsingState, IParams, ParamsArray, IOscParser, IOscHandler, OscFallbackHandlerType, IFunctionIdentifier, IParserStackState, ParserStackType } from 'common/parser/Types';
|
||||
import { EscapeSequenceParser, TransitionTable, VT500_TRANSITION_TABLE } from 'common/parser/EscapeSequenceParser';
|
||||
import { IParsingState, IParams, ParamsArray, IOscParser, IOscHandler, OscFallbackHandlerType, IFunctionIdentifier, IParserStackState, ParserStackType } from './Types';
|
||||
import { EscapeSequenceParser, TransitionTable, VT500_TRANSITION_TABLE } from './EscapeSequenceParser';
|
||||
import { assert } from 'chai';
|
||||
import { StringToUtf32, stringFromCodePoint, utf32ToString } from 'common/input/TextDecoder';
|
||||
import { ParserState } from 'common/parser/Constants';
|
||||
import { Params } from 'common/parser/Params';
|
||||
import { OscHandler } from 'common/parser/OscParser';
|
||||
import { IDisposable } from 'common/Types';
|
||||
import { DcsHandler } from 'common/parser/DcsParser';
|
||||
import { ApcHandler } from 'common/parser/ApcParser';
|
||||
import { StringToUtf32, stringFromCodePoint, utf32ToString } from '../input/TextDecoder';
|
||||
import { ParserState } from './Constants';
|
||||
import { Params } from './Params';
|
||||
import { OscHandler } from './OscParser';
|
||||
import { IDisposable } from '../Types';
|
||||
import { DcsHandler } from './DcsParser';
|
||||
import { ApcHandler } from './ApcParser';
|
||||
|
||||
|
||||
function r(a: number, b: number): string[] {
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { IParsingState, IDcsHandler, IEscapeSequenceParser, IParams, IOscHandler, IHandlerCollection, CsiHandlerType, OscFallbackHandlerType, IOscParser, EscHandlerType, IDcsParser, DcsFallbackHandlerType, IFunctionIdentifier, ExecuteFallbackHandlerType, CsiFallbackHandlerType, EscFallbackHandlerType, PrintHandlerType, PrintFallbackHandlerType, ExecuteHandlerType, IParserStackState, ParserStackType, ResumableHandlersType, IApcHandler, IApcParser, ApcFallbackHandlerType } from 'common/parser/Types';
|
||||
import { ParserState, ParserAction } from 'common/parser/Constants';
|
||||
import { Disposable, toDisposable } from 'common/Lifecycle';
|
||||
import { IDisposable } from 'common/Types';
|
||||
import { Params } from 'common/parser/Params';
|
||||
import { OscParser } from 'common/parser/OscParser';
|
||||
import { DcsParser } from 'common/parser/DcsParser';
|
||||
import { ApcParser } from 'common/parser/ApcParser';
|
||||
import { IParsingState, IDcsHandler, IEscapeSequenceParser, IParams, IOscHandler, IHandlerCollection, CsiHandlerType, OscFallbackHandlerType, IOscParser, EscHandlerType, IDcsParser, DcsFallbackHandlerType, IFunctionIdentifier, ExecuteFallbackHandlerType, CsiFallbackHandlerType, EscFallbackHandlerType, PrintHandlerType, PrintFallbackHandlerType, ExecuteHandlerType, IParserStackState, ParserStackType, ResumableHandlersType, IApcHandler, IApcParser, ApcFallbackHandlerType } from './Types';
|
||||
import { ParserState, ParserAction } from './Constants';
|
||||
import { Disposable, toDisposable } from '../Lifecycle';
|
||||
import { IDisposable } from '../Types';
|
||||
import { Params } from './Params';
|
||||
import { OscParser } from './OscParser';
|
||||
import { DcsParser } from './DcsParser';
|
||||
import { ApcParser } from './ApcParser';
|
||||
|
||||
/**
|
||||
* VT commands done by the parser
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* @license MIT
|
||||
*/
|
||||
import { assert } from 'chai';
|
||||
import { OscParser, OscHandler } from 'common/parser/OscParser';
|
||||
import { StringToUtf32, utf32ToString } from 'common/input/TextDecoder';
|
||||
import { IOscHandler } from 'common/parser/Types';
|
||||
import { OscParser, OscHandler } from './OscParser';
|
||||
import { StringToUtf32, utf32ToString } from '../input/TextDecoder';
|
||||
import { IOscHandler } from './Types';
|
||||
|
||||
function toUtf32(s: string): Uint32Array {
|
||||
const utf32 = new Uint32Array(s.length);
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { IOscHandler, IHandlerCollection, OscFallbackHandlerType, IOscParser, ISubParserStackState } from 'common/parser/Types';
|
||||
import { OscState, ParserConstants } from 'common/parser/Constants';
|
||||
import { utf32ToString } from 'common/input/TextDecoder';
|
||||
import { IDisposable } from 'common/Types';
|
||||
import { LimitedStringBuilder } from 'common/StringBuilder';
|
||||
import { IOscHandler, IHandlerCollection, OscFallbackHandlerType, IOscParser, ISubParserStackState } from './Types';
|
||||
import { OscState, ParserConstants } from './Constants';
|
||||
import { utf32ToString } from '../input/TextDecoder';
|
||||
import { IDisposable } from '../Types';
|
||||
import { LimitedStringBuilder } from '../StringBuilder';
|
||||
|
||||
const EMPTY_HANDLERS: IOscHandler[] = [];
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* @license MIT
|
||||
*/
|
||||
import { assert } from 'chai';
|
||||
import { Params } from 'common/parser/Params';
|
||||
import { ParamsArray } from 'common/parser/Types';
|
||||
import { Params } from './Params';
|
||||
import { ParamsArray } from './Types';
|
||||
|
||||
class TestParams extends Params {
|
||||
public get subParams(): Int32Array {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Copyright (c) 2019 The xterm.js authors. All rights reserved.
|
||||
* @license MIT
|
||||
*/
|
||||
import { IParams, ParamsArray } from 'common/parser/Types';
|
||||
import { IParams, ParamsArray } from './Types';
|
||||
|
||||
const enum Constants {
|
||||
/**
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { IDisposable } from 'common/Types';
|
||||
import { ParserState } from 'common/parser/Constants';
|
||||
import { IDisposable } from '../Types';
|
||||
import { ParserState } from './Constants';
|
||||
|
||||
|
||||
/** sequence params serialized to js arrays */
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
*/
|
||||
|
||||
import { IBuffer as IBufferApi, IBufferLine as IBufferLineApi, IBufferCell as IBufferCellApi } from '@xterm/xterm';
|
||||
import { IBuffer } from 'common/buffer/Types';
|
||||
import { BufferLineApiView } from 'common/public/BufferLineApiView';
|
||||
import { CellData } from 'common/buffer/CellData';
|
||||
import { IBuffer } from '../buffer/Types';
|
||||
import { BufferLineApiView } from './BufferLineApiView';
|
||||
import { CellData } from '../buffer/CellData';
|
||||
|
||||
export class BufferApiView implements IBufferApi {
|
||||
constructor(
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { CellData } from 'common/buffer/CellData';
|
||||
import { IBufferLine, ICellData } from 'common/Types';
|
||||
import { CellData } from '../buffer/CellData';
|
||||
import { IBufferLine, ICellData } from '../Types';
|
||||
import { IBufferCell as IBufferCellApi, IBufferLine as IBufferLineApi } from '@xterm/xterm';
|
||||
|
||||
export class BufferLineApiView implements IBufferLineApi {
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
*/
|
||||
|
||||
import { IBuffer as IBufferApi, IBufferNamespace as IBufferNamespaceApi } from '@xterm/xterm';
|
||||
import { BufferApiView } from 'common/public/BufferApiView';
|
||||
import { ICoreTerminal } from 'common/Types';
|
||||
import { Disposable } from 'common/Lifecycle';
|
||||
import { Emitter } from 'common/Event';
|
||||
import { BufferApiView } from './BufferApiView';
|
||||
import { ICoreTerminal } from '../Types';
|
||||
import { Disposable } from '../Lifecycle';
|
||||
import { Emitter } from '../Event';
|
||||
|
||||
export class BufferNamespaceApi extends Disposable implements IBufferNamespaceApi {
|
||||
private _normal: BufferApiView;
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { IParams } from 'common/parser/Types';
|
||||
import { IParams } from '../parser/Types';
|
||||
import { IDisposable, IFunctionIdentifier, IParser } from '@xterm/xterm';
|
||||
import { ICoreTerminal } from 'common/Types';
|
||||
import { ICoreTerminal } from '../Types';
|
||||
|
||||
export class ParserApi implements IParser {
|
||||
constructor(private _core: ICoreTerminal) { }
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { ICoreTerminal } from 'common/Types';
|
||||
import { ICoreTerminal } from '../Types';
|
||||
import { IUnicodeHandling, IUnicodeVersionProvider } from '@xterm/xterm';
|
||||
|
||||
export class UnicodeApi implements IUnicodeHandling {
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { Disposable } from 'common/Lifecycle';
|
||||
import { IAttributeData, IBufferLine } from 'common/Types';
|
||||
import { BufferSet } from 'common/buffer/BufferSet';
|
||||
import { IBuffer, IBufferSet } from 'common/buffer/Types';
|
||||
import { IBufferService, ILogService, IOptionsService, type IBufferResizeEvent } from 'common/services/Services';
|
||||
import { Emitter } from 'common/Event';
|
||||
import { Disposable } from '../Lifecycle';
|
||||
import { IAttributeData, IBufferLine } from '../Types';
|
||||
import { BufferSet } from '../buffer/BufferSet';
|
||||
import { IBuffer, IBufferSet } from '../buffer/Types';
|
||||
import { IBufferService, ILogService, IOptionsService, type IBufferResizeEvent } from './Services';
|
||||
import { Emitter } from '../Event';
|
||||
|
||||
export const enum BufferServiceConstants {
|
||||
MINIMUM_COLS = 2, // Less than 2 can mess with wide chars
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { ICharsetService } from 'common/services/Services';
|
||||
import { ICharset } from 'common/Types';
|
||||
import { ICharsetService } from './Services';
|
||||
import { ICharset } from '../Types';
|
||||
|
||||
export class CharsetService implements ICharsetService {
|
||||
public serviceBrand: any;
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { ICoreService } from 'common/services/Services';
|
||||
import { CoreService } from 'common/services/CoreService';
|
||||
import { MockBufferService, MockLogService, MockOptionsService } from 'common/TestUtils.test';
|
||||
import { ICoreService } from './Services';
|
||||
import { CoreService } from './CoreService';
|
||||
import { MockBufferService, MockLogService, MockOptionsService } from '../TestUtils.test';
|
||||
import { assert } from 'chai';
|
||||
|
||||
describe('CoreService', () => {
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { Disposable } from 'common/Lifecycle';
|
||||
import { IDecPrivateModes, IKittyKeyboardState, IModes } from 'common/Types';
|
||||
import { IBufferService, ICoreService, ILogService, IOptionsService } from 'common/services/Services';
|
||||
import { Emitter } from 'common/Event';
|
||||
import { Disposable } from '../Lifecycle';
|
||||
import { IDecPrivateModes, IKittyKeyboardState, IModes } from '../Types';
|
||||
import { IBufferService, ICoreService, ILogService, IOptionsService } from './Services';
|
||||
import { Emitter } from '../Event';
|
||||
|
||||
const DEFAULT_MODES: IModes = Object.freeze({
|
||||
insertMode: false
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { DecorationLineCache, DecorationService } from './DecorationService';
|
||||
import { IMarker } from 'common/Types';
|
||||
import { Disposable } from 'common/Lifecycle';
|
||||
import { Emitter } from 'common/Event';
|
||||
import { MockLogService, MockBufferService, MockOptionsService } from 'common/TestUtils.test';
|
||||
import { Buffer } from 'common/buffer/Buffer';
|
||||
import { DEFAULT_ATTR_DATA } from 'common/buffer/BufferLine';
|
||||
import { IMarker } from '../Types';
|
||||
import { Disposable } from '../Lifecycle';
|
||||
import { Emitter } from '../Event';
|
||||
import { MockLogService, MockBufferService, MockOptionsService } from '../TestUtils.test';
|
||||
import { Buffer } from '../buffer/Buffer';
|
||||
import { DEFAULT_ATTR_DATA } from '../buffer/BufferLine';
|
||||
|
||||
describe('DecorationService', () => {
|
||||
let bufferService: MockBufferService;
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import type { IDeleteEvent, IInsertEvent } from 'common/CircularList';
|
||||
import { MicrotaskTimer } from 'common/Async';
|
||||
import { css } from 'common/Color';
|
||||
import { Disposable, DisposableStore, MutableDisposable, toDisposable } from 'common/Lifecycle';
|
||||
import { IBufferService, IDecorationService, IInternalDecoration, ILogService } from 'common/services/Services';
|
||||
import { SortedList } from 'common/SortedList';
|
||||
import { IColor, ICircularList } from 'common/Types';
|
||||
import type { IDeleteEvent, IInsertEvent } from '../CircularList';
|
||||
import { MicrotaskTimer } from '../Async';
|
||||
import { css } from '../Color';
|
||||
import { Disposable, DisposableStore, MutableDisposable, toDisposable } from '../Lifecycle';
|
||||
import { IBufferService, IDecorationService, IInternalDecoration, ILogService } from './Services';
|
||||
import { SortedList } from '../SortedList';
|
||||
import { IColor, ICircularList } from '../Types';
|
||||
import { IDecoration, IDecorationOptions, IMarker } from '@xterm/xterm';
|
||||
import { Emitter } from 'common/Event';
|
||||
import { Emitter } from '../Event';
|
||||
|
||||
// Work variables to avoid garbage collection
|
||||
let $xmin = 0;
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IInstantiationService, IServiceIdentifier } from 'common/services/Services';
|
||||
import { getServiceDependencies } from 'common/services/ServiceRegistry';
|
||||
import { IInstantiationService, IServiceIdentifier } from './Services';
|
||||
import { getServiceDependencies } from './ServiceRegistry';
|
||||
|
||||
export class ServiceCollection {
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { Disposable } from 'common/Lifecycle';
|
||||
import { ILogService, IOptionsService, LogLevelEnum } from 'common/services/Services';
|
||||
import { Disposable } from '../Lifecycle';
|
||||
import { ILogService, IOptionsService, LogLevelEnum } from './Services';
|
||||
|
||||
type LogType = (message?: any, ...optionalParams: any[]) => void;
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
* Copyright (c) 2019 The xterm.js authors. All rights reserved.
|
||||
* @license MIT
|
||||
*/
|
||||
import { MouseStateService } from 'common/services/MouseStateService';
|
||||
import { MouseStateService } from './MouseStateService';
|
||||
import { assert } from 'chai';
|
||||
import { ICoreMouseEvent, CoreMouseEventType } from 'common/Types';
|
||||
import { ICoreMouseEvent, CoreMouseEventType } from '../Types';
|
||||
|
||||
function toBytes(s: string | undefined): number[] {
|
||||
if (!s) {
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
* Copyright (c) 2019 The xterm.js authors. All rights reserved.
|
||||
* @license MIT
|
||||
*/
|
||||
import { IMouseStateService } from 'common/services/Services';
|
||||
import { ICoreMouseProtocol, ICoreMouseEvent, CoreMouseEncoding, CoreMouseEventType, CoreMouseButton, CoreMouseAction } from 'common/Types';
|
||||
import { Disposable } from 'common/Lifecycle';
|
||||
import { Emitter } from 'common/Event';
|
||||
import { IMouseStateService } from './Services';
|
||||
import { ICoreMouseProtocol, ICoreMouseEvent, CoreMouseEncoding, CoreMouseEventType, CoreMouseButton, CoreMouseAction } from '../Types';
|
||||
import { Disposable } from '../Lifecycle';
|
||||
import { Emitter } from '../Event';
|
||||
|
||||
/**
|
||||
* Supported default protocols.
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
*/
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { OptionsService, DEFAULT_OPTIONS } from 'common/services/OptionsService';
|
||||
import { IDisposable } from 'common/Types';
|
||||
import { OptionsService, DEFAULT_OPTIONS } from './OptionsService';
|
||||
import { IDisposable } from '../Types';
|
||||
|
||||
describe('OptionsService', () => {
|
||||
describe('constructor', () => {
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { Disposable, toDisposable } from 'common/Lifecycle';
|
||||
import { isMac } from 'common/Platform';
|
||||
import { CursorStyle, IDisposable } from 'common/Types';
|
||||
import { FontWeight, IOptionsService, ITerminalOptions } from 'common/services/Services';
|
||||
import { Emitter } from 'common/Event';
|
||||
import { Disposable, toDisposable } from '../Lifecycle';
|
||||
import { isMac } from '../Platform';
|
||||
import { CursorStyle, IDisposable } from '../Types';
|
||||
import { FontWeight, IOptionsService, ITerminalOptions } from './Services';
|
||||
import { Emitter } from '../Event';
|
||||
|
||||
export const DEFAULT_OPTIONS: Readonly<Required<ITerminalOptions>> = {
|
||||
cols: 80,
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
*/
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { AttributeData } from 'common/buffer/AttributeData';
|
||||
import { BufferService } from 'common/services/BufferService';
|
||||
import { OptionsService } from 'common/services/OptionsService';
|
||||
import { OscLinkService } from 'common/services/OscLinkService';
|
||||
import { IBufferService, IOptionsService, IOscLinkService } from 'common/services/Services';
|
||||
import { MockLogService } from 'common/TestUtils.test';
|
||||
import { AttributeData } from '../buffer/AttributeData';
|
||||
import { BufferService } from './BufferService';
|
||||
import { OptionsService } from './OptionsService';
|
||||
import { OscLinkService } from './OscLinkService';
|
||||
import { IBufferService, IOptionsService, IOscLinkService } from './Services';
|
||||
import { MockLogService } from '../TestUtils.test';
|
||||
|
||||
describe('OscLinkService', () => {
|
||||
describe('constructor', () => {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
* Copyright (c) 2022 The xterm.js authors. All rights reserved.
|
||||
* @license MIT
|
||||
*/
|
||||
import { IBufferService, IOscLinkService } from 'common/services/Services';
|
||||
import { IMarker, IOscLinkData } from 'common/Types';
|
||||
import { IBufferService, IOscLinkService } from './Services';
|
||||
import { IMarker, IOscLinkData } from '../Types';
|
||||
|
||||
export class OscLinkService implements IOscLinkService {
|
||||
public serviceBrand: any;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IServiceIdentifier } from 'common/services/Services';
|
||||
import { IServiceIdentifier } from './Services';
|
||||
|
||||
const enum Constants {
|
||||
DI_TARGET = 'di$target',
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
*/
|
||||
|
||||
import type { IDecoration, IDecorationOptions, ILinkHandler, ILogger, IWindowsPty, IOverviewRulerOptions } from '@xterm/xterm';
|
||||
import { CoreMouseEncoding, CoreMouseEventType, CursorInactiveStyle, CursorStyle, IAttributeData, ICharset, IColor, ICoreMouseEvent, ICoreMouseProtocol, IDecPrivateModes, IDisposable, IKittyKeyboardState, IModes, IOscLinkData, IWindowOptions } from 'common/Types';
|
||||
import { IBuffer, IBufferSet } from 'common/buffer/Types';
|
||||
import { createDecorator } from 'common/services/ServiceRegistry';
|
||||
import type { Emitter, IEvent } from 'common/Event';
|
||||
import { CoreMouseEncoding, CoreMouseEventType, CursorInactiveStyle, CursorStyle, IAttributeData, ICharset, IColor, ICoreMouseEvent, ICoreMouseProtocol, IDecPrivateModes, IDisposable, IKittyKeyboardState, IModes, IOscLinkData, IWindowOptions } from '../Types';
|
||||
import { IBuffer, IBufferSet } from '../buffer/Types';
|
||||
import { createDecorator } from './ServiceRegistry';
|
||||
import type { Emitter, IEvent } from '../Event';
|
||||
|
||||
export const IBufferService = createDecorator<IBufferService>('BufferService');
|
||||
export interface IBufferService {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
*/
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { UnicodeService } from 'common/services/UnicodeService';
|
||||
import { IUnicodeVersionProvider } from 'common/services/Services';
|
||||
import { UnicodeService } from './UnicodeService';
|
||||
import { IUnicodeVersionProvider } from './Services';
|
||||
|
||||
class DummyProvider implements IUnicodeVersionProvider {
|
||||
public version = '123';
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { UnicodeV6 } from 'common/input/UnicodeV6';
|
||||
import { IUnicodeService, IUnicodeVersionProvider, UnicodeCharProperties, UnicodeCharWidth } from 'common/services/Services';
|
||||
import { Emitter } from 'common/Event';
|
||||
import { UnicodeV6 } from '../input/UnicodeV6';
|
||||
import { IUnicodeService, IUnicodeVersionProvider, UnicodeCharProperties, UnicodeCharWidth } from './Services';
|
||||
import { Emitter } from '../Event';
|
||||
|
||||
export class UnicodeService implements IUnicodeService {
|
||||
public serviceBrand: any;
|
||||
|
||||
@@ -10,11 +10,7 @@
|
||||
"outDir": "../../out",
|
||||
"types": [
|
||||
"../../node_modules/@types/mocha"
|
||||
],
|
||||
"paths": {
|
||||
"common/*": [ "./../common/*" ],
|
||||
"*": [ "./../*" ]
|
||||
}
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"./**/*",
|
||||
|
||||
Reference in New Issue
Block a user