+1
-1
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import { CircularList } from './common/CircularList';
|
import { CircularList } from './common/CircularList';
|
||||||
import { CharData, ITerminal, IBuffer, IBufferLine } from './Types';
|
import { CharData, ITerminal, IBuffer, IBufferLine } from './Types';
|
||||||
import { EventEmitter } from './EventEmitter';
|
import { EventEmitter } from './common/EventEmitter';
|
||||||
import { IMarker } from 'xterm';
|
import { IMarker } from 'xterm';
|
||||||
import { BufferLine } from './BufferLine';
|
import { BufferLine } from './BufferLine';
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import { ITerminal, IBufferSet } from './Types';
|
import { ITerminal, IBufferSet } from './Types';
|
||||||
import { Buffer } from './Buffer';
|
import { Buffer } from './Buffer';
|
||||||
import { EventEmitter } from './EventEmitter';
|
import { EventEmitter } from './common/EventEmitter';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The BufferSet represents the set of two buffers used by xterm terminals (normal and alt) and
|
* The BufferSet represents the set of two buffers used by xterm terminals (normal and alt) and
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
import { IMouseZoneManager } from './ui/Types';
|
import { IMouseZoneManager } from './ui/Types';
|
||||||
import { ILinkHoverEvent, ILinkMatcher, LinkMatcherHandler, LinkHoverEventTypes, ILinkMatcherOptions, ILinkifier, ITerminal, IBufferLine } from './Types';
|
import { ILinkHoverEvent, ILinkMatcher, LinkMatcherHandler, LinkHoverEventTypes, ILinkMatcherOptions, ILinkifier, ITerminal, IBufferLine } from './Types';
|
||||||
import { MouseZone } from './ui/MouseZoneManager';
|
import { MouseZone } from './ui/MouseZoneManager';
|
||||||
import { EventEmitter } from './EventEmitter';
|
import { EventEmitter } from './common/EventEmitter';
|
||||||
import { CHAR_DATA_ATTR_INDEX } from './Buffer';
|
import { CHAR_DATA_ATTR_INDEX } from './Buffer';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,11 +3,12 @@
|
|||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ITerminal, ISelectionManager, IBuffer, CharData, XtermListener, IBufferLine } from './Types';
|
import { ITerminal, ISelectionManager, IBuffer, CharData, IBufferLine } from './Types';
|
||||||
|
import { XtermListener } from './common/Types';
|
||||||
import { MouseHelper } from './utils/MouseHelper';
|
import { MouseHelper } from './utils/MouseHelper';
|
||||||
import * as Browser from './shared/utils/Browser';
|
import * as Browser from './shared/utils/Browser';
|
||||||
import { CharMeasure } from './ui/CharMeasure';
|
import { CharMeasure } from './ui/CharMeasure';
|
||||||
import { EventEmitter } from './EventEmitter';
|
import { EventEmitter } from './common/EventEmitter';
|
||||||
import { SelectionModel } from './SelectionModel';
|
import { SelectionModel } from './SelectionModel';
|
||||||
import { CHAR_DATA_WIDTH_INDEX, CHAR_DATA_CHAR_INDEX, CHAR_DATA_CODE_INDEX } from './Buffer';
|
import { CHAR_DATA_WIDTH_INDEX, CHAR_DATA_CHAR_INDEX, CHAR_DATA_CODE_INDEX } from './Buffer';
|
||||||
import { AltClickHandler } from './handlers/AltClickHandler';
|
import { AltClickHandler } from './handlers/AltClickHandler';
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@ import { IRenderer } from './renderer/Types';
|
|||||||
import { BufferSet } from './BufferSet';
|
import { BufferSet } from './BufferSet';
|
||||||
import { Buffer, MAX_BUFFER_SIZE, DEFAULT_ATTR, NULL_CELL_CODE, NULL_CELL_WIDTH, NULL_CELL_CHAR } from './Buffer';
|
import { Buffer, MAX_BUFFER_SIZE, DEFAULT_ATTR, NULL_CELL_CODE, NULL_CELL_WIDTH, NULL_CELL_CHAR } from './Buffer';
|
||||||
import { CompositionHelper } from './CompositionHelper';
|
import { CompositionHelper } from './CompositionHelper';
|
||||||
import { EventEmitter } from './EventEmitter';
|
import { EventEmitter } from './common/EventEmitter';
|
||||||
import { Viewport } from './Viewport';
|
import { Viewport } from './Viewport';
|
||||||
import { rightClickHandler, moveTextAreaUnderMouseCursor, pasteHandler, copyHandler } from './handlers/Clipboard';
|
import { rightClickHandler, moveTextAreaUnderMouseCursor, pasteHandler, copyHandler } from './handlers/Clipboard';
|
||||||
import { C0 } from './common/data/EscapeSequences';
|
import { C0 } from './common/data/EscapeSequences';
|
||||||
|
|||||||
+1
-15
@@ -7,11 +7,10 @@ import { Terminal as PublicTerminal, ITerminalOptions as IPublicTerminalOptions,
|
|||||||
import { IColorSet, IRenderer } from './renderer/Types';
|
import { IColorSet, IRenderer } from './renderer/Types';
|
||||||
import { IMouseZoneManager } from './ui/Types';
|
import { IMouseZoneManager } from './ui/Types';
|
||||||
import { ICharset } from './core/Types';
|
import { ICharset } from './core/Types';
|
||||||
|
import { ICircularList } from './common/Types';
|
||||||
|
|
||||||
export type CustomKeyEventHandler = (event: KeyboardEvent) => boolean;
|
export type CustomKeyEventHandler = (event: KeyboardEvent) => boolean;
|
||||||
|
|
||||||
export type XtermListener = (...args: any[]) => void;
|
|
||||||
|
|
||||||
export type CharData = [number, string, number, number];
|
export type CharData = [number, string, number, number];
|
||||||
export type LineData = CharData[];
|
export type LineData = CharData[];
|
||||||
|
|
||||||
@@ -295,19 +294,6 @@ export interface IBufferSet extends IEventEmitter {
|
|||||||
activateAltBuffer(): void;
|
activateAltBuffer(): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ICircularList<T> extends IEventEmitter {
|
|
||||||
length: number;
|
|
||||||
maxLength: number;
|
|
||||||
|
|
||||||
get(index: number): T;
|
|
||||||
set(index: number, value: T): void;
|
|
||||||
push(value: T): void;
|
|
||||||
pop(): T;
|
|
||||||
splice(start: number, deleteCount: number, ...items: T[]): void;
|
|
||||||
trimStart(count: number): void;
|
|
||||||
shiftElements(start: number, count: number, offset: number): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ISelectionManager {
|
export interface ISelectionManager {
|
||||||
selectionText: string;
|
selectionText: string;
|
||||||
selectionStart: [number, number];
|
selectionStart: [number, number];
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { EventEmitter } from '../EventEmitter';
|
import { EventEmitter } from './EventEmitter';
|
||||||
import { ICircularList } from '../Types';
|
import { ICircularList } from './Types';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a circular list; a list with a maximum size that wraps around when push is called,
|
* Represents a circular list; a list with a maximum size that wraps around when push is called,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import { XtermListener } from './Types';
|
import { XtermListener } from './Types';
|
||||||
import { IEventEmitter, IDisposable } from 'xterm';
|
import { IEventEmitter, IDisposable } from 'xterm';
|
||||||
import { Disposable } from './common/Lifecycle';
|
import { Disposable } from './Lifecycle';
|
||||||
|
|
||||||
export class EventEmitter extends Disposable implements IEventEmitter, IDisposable {
|
export class EventEmitter extends Disposable implements IEventEmitter, IDisposable {
|
||||||
private _events: {[type: string]: XtermListener[]};
|
private _events: {[type: string]: XtermListener[]};
|
||||||
@@ -3,6 +3,10 @@
|
|||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { IEventEmitter } from 'xterm';
|
||||||
|
|
||||||
|
export type XtermListener = (...args: any[]) => void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A keyboard event interface which does not depend on the DOM, KeyboardEvent implicitly extends
|
* A keyboard event interface which does not depend on the DOM, KeyboardEvent implicitly extends
|
||||||
* this event.
|
* this event.
|
||||||
@@ -16,3 +20,16 @@ export interface IKeyboardEvent {
|
|||||||
key: string;
|
key: string;
|
||||||
type: string;
|
type: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ICircularList<T> extends IEventEmitter {
|
||||||
|
length: number;
|
||||||
|
maxLength: number;
|
||||||
|
|
||||||
|
get(index: number): T;
|
||||||
|
set(index: number, value: T): void;
|
||||||
|
push(value: T): void;
|
||||||
|
pop(): T;
|
||||||
|
splice(start: number, deleteCount: number, ...items: T[]): void;
|
||||||
|
trimStart(count: number): void;
|
||||||
|
shiftElements(start: number, count: number, offset: number): void;
|
||||||
|
}
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ITerminal, ICircularList, IBufferLine } from '../Types';
|
import { ITerminal, IBufferLine } from '../Types';
|
||||||
|
import { ICircularList } from '../common/Types';
|
||||||
import { C0 } from '../common/data/EscapeSequences';
|
import { C0 } from '../common/data/EscapeSequences';
|
||||||
|
|
||||||
const enum Direction {
|
const enum Direction {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import { ColorManager } from './ColorManager';
|
|||||||
import { IRenderLayer, IColorSet, IRenderer, IRenderDimensions, ICharacterJoinerRegistry } from './Types';
|
import { IRenderLayer, IColorSet, IRenderer, IRenderDimensions, ICharacterJoinerRegistry } from './Types';
|
||||||
import { ITerminal, CharacterJoinerHandler } from '../Types';
|
import { ITerminal, CharacterJoinerHandler } from '../Types';
|
||||||
import { LinkRenderLayer } from './LinkRenderLayer';
|
import { LinkRenderLayer } from './LinkRenderLayer';
|
||||||
import { EventEmitter } from '../EventEmitter';
|
import { EventEmitter } from '../common/EventEmitter';
|
||||||
import { RenderDebouncer } from '../ui/RenderDebouncer';
|
import { RenderDebouncer } from '../ui/RenderDebouncer';
|
||||||
import { ScreenDprMonitor } from '../ui/ScreenDprMonitor';
|
import { ScreenDprMonitor } from '../ui/ScreenDprMonitor';
|
||||||
import { ITheme } from 'xterm';
|
import { ITheme } from 'xterm';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
import { IRenderer, IRenderDimensions, IColorSet } from '../Types';
|
import { IRenderer, IRenderDimensions, IColorSet } from '../Types';
|
||||||
import { ITerminal, CharacterJoinerHandler } from '../../Types';
|
import { ITerminal, CharacterJoinerHandler } from '../../Types';
|
||||||
import { ITheme } from 'xterm';
|
import { ITheme } from 'xterm';
|
||||||
import { EventEmitter } from '../../EventEmitter';
|
import { EventEmitter } from '../../common/EventEmitter';
|
||||||
import { ColorManager } from '../ColorManager';
|
import { ColorManager } from '../ColorManager';
|
||||||
import { RenderDebouncer } from '../../ui/RenderDebouncer';
|
import { RenderDebouncer } from '../../ui/RenderDebouncer';
|
||||||
import { BOLD_CLASS, ITALIC_CLASS, CURSOR_CLASS, DomRendererRowFactory } from './DomRendererRowFactory';
|
import { BOLD_CLASS, ITALIC_CLASS, CURSOR_CLASS, DomRendererRowFactory } from './DomRendererRowFactory';
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { ICharMeasure, ITerminalOptions } from '../Types';
|
import { ICharMeasure, ITerminalOptions } from '../Types';
|
||||||
import { EventEmitter } from '../EventEmitter';
|
import { EventEmitter } from '../common/EventEmitter';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utility class that measures the size of a character. Measurements are done in
|
* Utility class that measures the size of a character. Measurements are done in
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { IColorSet, IRenderer, IRenderDimensions, IColorManager } from '../renderer/Types';
|
import { IColorSet, IRenderer, IRenderDimensions, IColorManager } from '../renderer/Types';
|
||||||
import { IInputHandlingTerminal, IViewport, ICompositionHelper, ITerminal, IBuffer, IBufferSet, IBrowser, ICharMeasure, ISelectionManager, ITerminalOptions, ICircularList, ILinkifier, IMouseHelper, ILinkMatcherOptions, XtermListener, CharacterJoinerHandler, IBufferLine } from '../Types';
|
import { IInputHandlingTerminal, IViewport, ICompositionHelper, ITerminal, IBuffer, IBufferSet, IBrowser, ICharMeasure, ISelectionManager, ITerminalOptions, ILinkifier, IMouseHelper, ILinkMatcherOptions, CharacterJoinerHandler, IBufferLine } from '../Types';
|
||||||
|
import { ICircularList, XtermListener } from '../common/Types';
|
||||||
import { Buffer } from '../Buffer';
|
import { Buffer } from '../Buffer';
|
||||||
import * as Browser from '../shared/utils/Browser';
|
import * as Browser from '../shared/utils/Browser';
|
||||||
import { ITheme, IDisposable, IMarker } from 'xterm';
|
import { ITheme, IDisposable, IMarker } from 'xterm';
|
||||||
|
|||||||
Reference in New Issue
Block a user