Compare commits

...
Author SHA1 Message Date
Cursor AgentandDaniel Imms 18100d32fb Use src/ imports in addons; bundle test output via esbuild
Addons no longer import from out/ or out-esbuild in source. TypeScript
and editors resolve ../../../src/common|browser directly. Addon unit test
artifacts bundle those dependencies from source (platform node, npm
packages external).

Reverts preserveConstEnums; const enums are handled in bundled output.

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
2026-05-28 01:28:31 +00:00
Cursor AgentandDaniel Imms 07bdaf8767 Add Node smoke tests for @xterm/headless package
Verify CJS and ESM bundles load, accept writes, expose buffer API,
resize, and dispose. Add npm run test-headless-node script.

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
2026-05-28 01:23:21 +00:00
Cursor AgentandDaniel Imms 584954b4fb Fix addon and dist builds after path mapping removal
Import shared core from ../../../out/common|browser in addons so tsc
and runtime agree. Enable preserveConstEnums so const enums remain in
compiled out/ for addon consumers.

Build xterm esbuild before addons so out-esbuild exists for parallel
addon jobs. Verified: npm run setup, esbuild-demo-client, package.

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
2026-05-28 01:08:32 +00:00
Cursor AgentandDaniel Imms 9a96b27566 Remove TypeScript path mappings in favor of relative imports
Replace common/*, browser/*, and headless/* path-mapped imports with
relative paths across src/, addons/, test/, and demo/. Remove paths
from all tsconfig.json files and include addon typings directly.

Addon sources import shared code via out-esbuild/ so unit tests resolve
compiled modules with runtime const enums. Fix benchmark bare imports
and normalize corrupted tsconfig formatting.

Resolves #5896

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
2026-05-28 01:01:25 +00:00
Cursor AgentandDaniel Imms a04941a936 fix: repair corrupted tsconfig.json files from regex script
- Fix malformed skipLibCheck and types array closing braces
- Repair broken include arrays and trailing commas
- Add addon typings to addon src includes (paths not restored)
- Normalize formatting to valid JSON with 2-space indent

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
2026-05-28 00:52:24 +00:00
Daniel Imms 91fcb46a1a Merge pull request #5955 from xtermjs/cursor/gitignore-cursor-logs-5a86
Ignore .cursor/*.log files in git
2026-05-27 16:25:02 -07:00
Cursor AgentandDaniel Imms 1d569f873d Ignore .cursor/*.log files in git
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
2026-05-27 23:22:32 +00:00
Daniel Imms db244ea5a8 Merge pull request #5954 from xtermjs/cursor/align-headless-marker-alt-buffer-2866
Allow markers on alt buffer in headless terminal
2026-05-27 14:51:35 -07:00
Cursor AgentandDaniel Imms fdcd1c2720 Align xterm-headless marker JSDoc with xterm.d.ts
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
2026-05-27 21:46:20 +00:00
Cursor AgentandDaniel Imms 57b48f6048 Allow markers on alt buffer in headless terminal
Remove the alt-buffer guard in headless registerMarker so behavior
matches the browser terminal. Update headless public API and typings
to return IMarker instead of IMarker | undefined.

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
2026-05-27 21:28:36 +00:00
Daniel Imms ec0c93fd5a Merge pull request #5950 from xtermjs/cursor/writebuffer-dispose-timeout-124c
Cancel WriteBuffer innerWrite timers on dispose
2026-05-27 14:14:41 -07:00
Daniel Imms be339bf796 Merge pull request #5947 from xtermjs/cursor/decoration-bucket-merge-loop-7132
Avoid spread when merging decoration line buckets
2026-05-27 13:15:37 -07:00
Daniel Imms 7294124736 Merge pull request #5945 from xtermjs/cursor/bufferline-stringbuilder-5939-79f8
Use StringBuilder in BufferLine.translateToString
2026-05-27 13:11:02 -07:00
Daniel Imms 2c3fad39af Merge pull request #5948 from xtermjs/cursor/hoist-get-current-link-id-e29d
Hoist _getCurrentLinkId() in print() loop
2026-05-27 13:09:09 -07:00
Cursor AgentandDaniel Imms edb4f89dd8 Add WriteBuffer regression tests for dispose and hot paths
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
2026-05-27 20:00:06 +00:00
Cursor AgentandDaniel Imms 224c113b64 Move linkId declaration above use site in print loop
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
2026-05-27 19:36:45 +00:00
Cursor AgentandDaniel Imms 3e0c7d18e5 Register WriteBuffer cleanup via toDisposable in constructor
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
2026-05-27 19:35:58 +00:00
Daniel Imms 95d9224b8c Merge pull request #5946 from xtermjs/cursor/fix-duplicate-buildnumber-guard-cbb8
Fix duplicate buildNumber guard in Windows ConPTY logic
2026-05-27 12:34:08 -07:00
Cursor AgentandDaniel Imms 7499a2181d Use DisposableStore.isDisposed instead of duplicate flag
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
2026-05-27 19:34:08 +00:00
Daniel Imms 7dc820f5fa Merge pull request #5949 from xtermjs/cursor/rename-headless-register-marker-22c3
Rename headless core addMarker → registerMarker
2026-05-27 12:33:02 -07:00
Cursor AgentandDaniel Imms e59a6c1f7b Reuse shared StringBuilder in BufferLine.translateToString
Avoid per-call allocation when translating many lines in sequence by
resetting a module-level work StringBuilder before and after each use.

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
2026-05-27 19:31:00 +00:00
Daniel Imms f3e2c08a5d Merge pull request #5944 from xtermjs/cursor/buffer-reflow-single-loop-sum-705e
perf: use single loop for cellsNeeded sum in BufferReflow
2026-05-27 12:28:08 -07:00
Daniel Imms b138bf38d0 Merge pull request #5943 from xtermjs/cursor/remove-duplicate-defineproperty-57b2
Remove duplicate Object.defineProperty loop in headless Terminal
2026-05-27 12:26:36 -07:00
Cursor AgentandDaniel Imms c6e4627b45 Hoist _getCurrentLinkId() in print() loop
Avoid calling _getCurrentLinkId() twice per codepoint when a hyperlink
is active by reading the link id once before the print loop.

Fixes #5940

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
2026-05-27 18:18:24 +00:00
Cursor AgentandDaniel Imms d91045dc5f Cancel WriteBuffer innerWrite timers on dispose
Guard _innerWrite and public write methods after disposal so pending
setTimeout continuations cannot run against a disposed terminal.

Fixes #5936

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
2026-05-27 18:18:22 +00:00
Cursor AgentandDaniel Imms 41dfdba2cf Avoid spread when merging decoration line buckets
Replace existing.push(...bucket) with an indexed loop in
_mergeLineBucket to avoid intermediate array allocations during
buffer trim/insert/delete re-indexing.

Reuse _mergeLineBucket in _handleBufferLinesTrim for consistency.

Fixes #5941

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
2026-05-27 18:18:13 +00:00
Cursor AgentandDaniel Imms ba33decb68 Rename headless core addMarker to registerMarker
Align headless Terminal core API with browser CoreBrowserTerminal
and the public registerMarker naming.

Fixes #5938

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
2026-05-27 18:18:01 +00:00
Cursor AgentandDaniel Imms 17e3b84bcc perf: use single loop for cellsNeeded sum in BufferReflow
Replace map().reduce() with one accumulator loop in
reflowSmallerGetNewLineLengths to avoid allocating an intermediate
array when summing wrapped line trimmed lengths.

Fixes #5942

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
2026-05-27 18:17:17 +00:00
Cursor AgentandDaniel Imms 182ff2f635 Remove duplicate Object.defineProperty loop in headless Terminal
The constructor defined property getters/setters twice on _publicOptions;
the first block was immediately overwritten by the second. Align with the
browser public Terminal implementation.

Fixes #5935

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
2026-05-27 18:17:08 +00:00
Cursor AgentandDaniel Imms bcb4e5298b Fix duplicate buildNumber guard in Windows ConPTY logic
The windowsPty option change handler checked buildNumber twice
instead of requiring both backend and buildNumber to be defined.
This aligns with Buffer.ts and ensures ConPTY wrapping heuristics
are evaluated only when both fields are present.

Fixes #5934

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
2026-05-27 18:16:54 +00:00
Cursor AgentandDaniel Imms 42facac2d9 Use StringBuilder in BufferLine.translateToString
Replace O(n²) string concatenation in the translate loop with
StringBuilder.append, matching the pattern used elsewhere in the project.

Fixes #5939

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
2026-05-27 18:16:51 +00:00
252 changed files with 1204 additions and 1207 deletions
+1
View File
@@ -24,6 +24,7 @@ test-results/
# Tracing/debug files
.cursor/nal-trace/
.cursor/*.log
# Keep bundled code out of Git
dist/
+3 -7
View File
@@ -13,15 +13,11 @@
"strict": true,
"types": [
"../../../node_modules/@types/mocha"
],
"paths": {
"@xterm/addon-attach": [
"../typings/addon-attach.d.ts"
]
}
]
},
"include": [
"./**/*",
"../../../typings/xterm.d.ts"
"../../../typings/xterm.d.ts",
"../typings/addon-attach.d.ts"
]
}
+1 -12
View File
@@ -3,23 +3,12 @@
"module": "commonjs",
"target": "ESNext",
"lib": [
"es2021",
"es2021"
],
"rootDir": ".",
"outDir": "../out-test",
"sourceMap": true,
"removeComments": true,
"paths": {
"common/*": [
"../../../src/common/*"
],
"browser/*": [
"../../../src/browser/*"
],
"*": [
"./*"
]
},
"strict": true,
"types": [
"../../../node_modules/@types/node"
+6 -2
View File
@@ -2,7 +2,11 @@
"files": [],
"include": [],
"references": [
{ "path": "./src" },
{ "path": "./test" }
{
"path": "./src"
},
{
"path": "./test"
}
]
}
+3 -10
View File
@@ -13,19 +13,12 @@
"strict": true,
"types": [
"../../../node_modules/@types/mocha"
],
"paths": {
"browser/*": [
"../../../src/browser/*"
],
"@xterm/addon-clipboard": [
"../typings/addon-clipboard.d.ts"
]
}
]
},
"include": [
"./**/*",
"../../../typings/xterm.d.ts"
"../../../typings/xterm.d.ts",
"../typings/addon-clipboard.d.ts"
],
"references": [
{
+1 -12
View File
@@ -3,23 +3,12 @@
"module": "commonjs",
"target": "ESNext",
"lib": [
"es2021",
"es2021"
],
"rootDir": ".",
"outDir": "../out-test",
"sourceMap": true,
"removeComments": true,
"paths": {
"common/*": [
"../../../src/common/*"
],
"browser/*": [
"../../../src/browser/*"
],
"*": [
"./*"
]
},
"strict": true,
"types": [
"../../../node_modules/@types/node"
+6 -2
View File
@@ -2,7 +2,11 @@
"files": [],
"include": [],
"references": [
{ "path": "./src" },
{ "path": "./test" }
{
"path": "./src"
},
{
"path": "./test"
}
]
}
+1 -1
View File
@@ -5,7 +5,7 @@
import type { Terminal, ITerminalAddon, IRenderDimensions } from '@xterm/xterm';
import type { FitAddon as IFitApi } from '@xterm/addon-fit';
import { ViewportConstants } from 'browser/shared/Constants';
import { ViewportConstants } from '../../../src/browser/shared/Constants';
interface ITerminalDimensions {
/**
+3 -10
View File
@@ -13,19 +13,12 @@
"strict": true,
"types": [
"../../../node_modules/@types/mocha"
],
"paths": {
"browser/*": [
"../../../src/browser/*"
],
"@xterm/addon-fit": [
"../typings/addon-fit.d.ts"
]
}
]
},
"include": [
"./**/*",
"../../../typings/xterm.d.ts"
"../../../typings/xterm.d.ts",
"../typings/addon-fit.d.ts"
],
"references": [
{
+1 -12
View File
@@ -3,23 +3,12 @@
"module": "commonjs",
"target": "ESNext",
"lib": [
"es2021",
"es2021"
],
"rootDir": ".",
"outDir": "../out-test",
"sourceMap": true,
"removeComments": true,
"paths": {
"common/*": [
"../../../src/common/*"
],
"browser/*": [
"../../../src/browser/*"
],
"*": [
"./*"
]
},
"strict": true,
"types": [
"../../../node_modules/@types/node"
+6 -2
View File
@@ -2,7 +2,11 @@
"files": [],
"include": [],
"references": [
{ "path": "./src" },
{ "path": "./test" }
{
"path": "./src"
},
{
"path": "./test"
}
]
}
+1 -1
View File
@@ -5,7 +5,7 @@
import type { ITerminalAddon, IDisposable } from '@xterm/xterm';
import type { ImageAddon as IImageApi } from '@xterm/addon-image';
import { Emitter, type IEvent } from 'common/Event';
import { Emitter, type IEvent } from '../../../src/common/Event';
import { IIPHandler } from './IIPHandler';
import { ImageRenderer } from './ImageRenderer';
import { ImageStorage, CELL_SIZE_DEFAULT } from './ImageStorage';
+1 -1
View File
@@ -6,7 +6,7 @@
import { toRGBA8888 } from 'sixel/lib/Colors';
import { IDisposable } from '@xterm/xterm';
import { ICellSize, ImageLayer, ITerminalExt, IImageSpec, IRenderDimensions, IRenderService } from './Types';
import { Disposable, MutableDisposable, toDisposable } from 'common/Lifecycle';
import { Disposable, MutableDisposable, toDisposable } from '../../../src/common/Lifecycle';
const enum Constants {
PLACEHOLDER_LENGTH = 4096,
+7 -7
View File
@@ -6,13 +6,13 @@
import { IDisposable, IMarker, Terminal } from '@xterm/xterm';
// private imports from base repo we build against
import { Attributes, BgFlags, Content, ExtFlags, UnderlineStyle } from 'common/buffer/Constants';
import type { AttributeData } from 'common/buffer/AttributeData';
import type { IParams, IDcsHandler, IOscHandler, IApcHandler, IEscapeSequenceParser } from 'common/parser/Types';
import type { IBufferLine, IExtendedAttrs, IInputHandler } from 'common/Types';
import type { ITerminal, ReadonlyColorSet } from 'browser/Types';
import type { IRenderDimensions } from 'browser/renderer/shared/Types';
import type { ICoreBrowserService, IRenderService, IThemeService } from 'browser/services/Services';
import { Attributes, BgFlags, Content, ExtFlags, UnderlineStyle } from '../../../src/common/buffer/Constants';
import type { AttributeData } from '../../../src/common/buffer/AttributeData';
import type { IParams, IDcsHandler, IOscHandler, IApcHandler, IEscapeSequenceParser } from '../../../src/common/parser/Types';
import type { IBufferLine, IExtendedAttrs, IInputHandler } from '../../../src/common/Types';
import type { ITerminal, ReadonlyColorSet } from '../../../src/browser/Types';
import type { IRenderDimensions } from '../../../src/browser/renderer/shared/Types';
import type { ICoreBrowserService, IRenderService, IThemeService } from '../../../src/browser/services/Services';
export const enum Cell {
CONTENT = 0, // codepoint and wcwidth information (enum Content)
+9 -10
View File
@@ -10,20 +10,19 @@
"preserveWatchOutput": true,
"types": [
"../../../node_modules/@types/mocha"
],
"paths": {
"browser/*": [ "../../../src/browser/*" ],
"common/*": [ "../../../src/common/*" ],
"@xterm/addon-image": [ "../typings/addon-image.d.ts" ],
"*": [ "./*" ]
}
]
},
"include": [
"./**/*",
"../../../typings/xterm.d.ts"
"../../../typings/xterm.d.ts",
"../typings/addon-image.d.ts"
],
"references": [
{ "path": "../../../src/browser" },
{ "path": "../../../src/common" }
{
"path": "../../../src/browser"
},
{
"path": "../../../src/common"
}
]
}
+1 -12
View File
@@ -3,23 +3,12 @@
"module": "commonjs",
"target": "ESNext",
"lib": [
"es2021",
"es2021"
],
"rootDir": ".",
"outDir": "../out-test",
"sourceMap": true,
"removeComments": true,
"paths": {
"common/*": [
"../../../src/common/*"
],
"browser/*": [
"../../../src/browser/*"
],
"*": [
"./*"
]
},
"strict": true,
"types": [
"../../../node_modules/@types/node"
+6 -2
View File
@@ -2,7 +2,11 @@
"files": [],
"include": [],
"references": [
{ "path": "./src" },
{ "path": "./test" }
{
"path": "./src"
},
{
"path": "./test"
}
]
}
+3 -8
View File
@@ -10,17 +10,12 @@
"preserveWatchOutput": true,
"types": [
"../../../node_modules/@types/mocha",
// HACK: src shouldn't use node types but it's needed for index.test.ts
"../../../node_modules/@types/node"
],
"paths": {
"@xterm/addon-ligatures" : [
"../typings/addon-ligatures.d.ts"
]
}
]
},
"include": [
"./**/*",
"../../../typings/xterm.d.ts"
"../../../typings/xterm.d.ts",
"../typings/addon-ligatures.d.ts"
]
}
@@ -10,11 +10,6 @@
"sourceMap": true,
"removeComments": true,
"strict": true,
"paths": {
"*": [
"./*"
]
},
"types": [
"../../../node_modules/@types/mocha",
"../../../node_modules/@types/node"
+6 -2
View File
@@ -2,7 +2,11 @@
"files": [],
"include": [],
"references": [
{ "path": "./src" },
{ "path": "./test" }
{
"path": "./src"
},
{
"path": "./test"
}
]
}
+1 -1
View File
@@ -5,7 +5,7 @@
import type { Terminal, ITerminalAddon, IDisposable } from '@xterm/xterm';
import type { ProgressAddon as IProgressApi, IProgressState } from '@xterm/addon-progress';
import type { Emitter, IEvent } from 'common/Event';
import type { Emitter, IEvent } from '../../../src/common/Event';
const enum ProgressType {
+3 -13
View File
@@ -13,22 +13,12 @@
"strict": true,
"types": [
"../../../node_modules/@types/mocha"
],
"paths": {
"common/*": [
"../../../src/common/*"
],
"browser/*": [
"../../../src/browser/*"
],
"@xterm/addon-progress": [
"../typings/addon-progress.d.ts"
]
}
]
},
"include": [
"./**/*",
"../../../typings/xterm.d.ts"
"../../../typings/xterm.d.ts",
"../typings/addon-progress.d.ts"
],
"references": [
{
+1 -12
View File
@@ -3,23 +3,12 @@
"module": "commonjs",
"target": "ESNext",
"lib": [
"es2021",
"es2021"
],
"rootDir": ".",
"outDir": "../out-test",
"sourceMap": true,
"removeComments": true,
"paths": {
"common/*": [
"../../../src/common/*"
],
"browser/*": [
"../../../src/browser/*"
],
"*": [
"./*"
]
},
"strict": true,
"types": [
"../../../node_modules/@types/node"
+6 -2
View File
@@ -2,7 +2,11 @@
"files": [],
"include": [],
"references": [
{ "path": "./src" },
{ "path": "./test" }
{
"path": "./src"
},
{
"path": "./test"
}
]
}
+1 -1
View File
@@ -5,7 +5,7 @@
import type { Terminal, IDisposable, IDecoration } from '@xterm/xterm';
import type { ISearchDecorationOptions } from '@xterm/addon-search';
import { dispose, Disposable, toDisposable } from 'common/Lifecycle';
import { dispose, Disposable, toDisposable } from '../../../src/common/Lifecycle';
import type { ISearchResult } from './SearchEngine';
/**
+3 -3
View File
@@ -5,9 +5,9 @@
import type { Terminal, IDisposable, ITerminalAddon } from '@xterm/xterm';
import type { SearchAddon as ISearchApi, ISearchOptions, ISearchAddonOptions, ISearchResultChangeEvent, ISearchDecorationOptions } from '@xterm/addon-search';
import { Emitter, type IEvent } from 'common/Event';
import { Disposable, MutableDisposable, toDisposable } from 'common/Lifecycle';
import { disposableTimeout } from 'common/Async';
import { Emitter, type IEvent } from '../../../src/common/Event';
import { Disposable, MutableDisposable, toDisposable } from '../../../src/common/Lifecycle';
import { disposableTimeout } from '../../../src/common/Async';
import { SearchLineCache } from './SearchLineCache';
import { SearchState } from './SearchState';
import { SearchEngine, type ISearchResult } from './SearchEngine';
+2 -2
View File
@@ -5,9 +5,9 @@
import { assert } from 'chai';
import { SearchEngine } from './SearchEngine';
import { SearchLineCache } from './SearchLineCache';
import { Terminal } from 'browser/public/Terminal';
import { Terminal } from '../../../src/browser/public/Terminal';
import type { ISearchOptions } from '@xterm/addon-search';
import { DisposableStore } from 'common/Lifecycle';
import { DisposableStore } from '../../../src/common/Lifecycle';
function writeP(terminal: Terminal, data: string): Promise<void> {
return new Promise(r => terminal.write(data, r));
@@ -4,8 +4,8 @@
*/
import { assert } from 'chai';
import { SearchLineCache, LineCacheEntry } from './SearchLineCache';
import { Terminal } from 'browser/public/Terminal';
import { timeout } from 'common/Async';
import { Terminal } from '../../../src/browser/public/Terminal';
import { timeout } from '../../../src/common/Async';
function writeP(terminal: Terminal, data: string): Promise<void> {
return new Promise(r => terminal.write(data, r));
+2 -2
View File
@@ -4,8 +4,8 @@
*/
import type { Terminal } from '@xterm/xterm';
import { combinedDisposable, Disposable, MutableDisposable, toDisposable } from 'common/Lifecycle';
import { disposableTimeout } from 'common/Async';
import { combinedDisposable, Disposable, MutableDisposable, toDisposable } from '../../../src/common/Lifecycle';
import { disposableTimeout } from '../../../src/common/Async';
export type LineCacheEntry = [
/**
@@ -5,8 +5,8 @@
import type { ISearchResultChangeEvent } from '@xterm/addon-search';
import type { IDisposable } from '@xterm/xterm';
import { Emitter, type IEvent } from 'common/Event';
import { Disposable } from 'common/Lifecycle';
import { Emitter, type IEvent } from '../../../src/common/Event';
import { Disposable } from '../../../src/common/Lifecycle';
import type { ISearchResult } from './SearchEngine';
/**
+4 -14
View File
@@ -4,7 +4,7 @@
"target": "es2021",
"lib": [
"dom",
"es2021",
"es2021"
],
"rootDir": ".",
"outDir": "../out",
@@ -13,22 +13,12 @@
"strict": true,
"types": [
"../../../node_modules/@types/mocha"
],
"paths": {
"common/*": [
"../../../src/common/*"
],
"browser/*": [
"../../../src/browser/*"
],
"@xterm/addon-search" : [
"../typings/addon-search.d.ts"
]
}
]
},
"include": [
"./**/*",
"../../../typings/xterm.d.ts"
"../../../typings/xterm.d.ts",
"../typings/addon-search.d.ts"
],
"references": [
{
+1 -12
View File
@@ -3,23 +3,12 @@
"module": "commonjs",
"target": "ESNext",
"lib": [
"es2021",
"es2021"
],
"rootDir": ".",
"outDir": "../out-test",
"sourceMap": true,
"removeComments": true,
"paths": {
"common/*": [
"../../../src/common/*"
],
"browser/*": [
"../../../src/browser/*"
],
"*": [
"./*"
]
},
"strict": true,
"types": [
"../../../node_modules/@types/node"
+6 -2
View File
@@ -2,7 +2,11 @@
"files": [],
"include": [],
"references": [
{ "path": "./src" },
{ "path": "./test" }
{
"path": "./src"
},
{
"path": "./test"
}
]
}
@@ -6,9 +6,9 @@
import { perfContext, before, ThroughputRuntimeCase } from 'xterm-benchmark';
import { spawn } from 'node-pty';
import { Utf8ToUtf32, stringFromCodePoint } from 'common/input/TextDecoder';
import { Terminal } from 'browser/public/Terminal';
import { SerializeAddon } from 'SerializeAddon';
import { Utf8ToUtf32, stringFromCodePoint } from '../../../src/common/input/TextDecoder';
import { Terminal } from '../../../src/browser/public/Terminal';
import { SerializeAddon } from '../src/SerializeAddon';
class TestTerminal extends Terminal {
public writeSync(data: string): void {
+18 -14
View File
@@ -6,24 +6,28 @@
],
"rootDir": "..",
"outDir": "../out-benchmark",
"types": ["../../../node_modules/@types/node"],
"types": [
"../../../node_modules/@types/node"
],
"moduleResolution": "node",
"strict": false,
"target": "es2021",
"module": "commonjs",
"paths": {
"common/*": ["../../../src/common/*"],
"browser/*": ["../../../src/browser/*"],
"SerializeAddon": ["../src/SerializeAddon"],
"@xterm/addon-serialize": [
"../typings/addon-serialize.d.ts"
]
}
"module": "commonjs"
},
"include": ["../**/*", "../../../typings/xterm.d.ts"],
"exclude": ["../../../**/*test.ts", "../../**/*api.ts"],
"include": [
"../**/*",
"../../../typings/xterm.d.ts"
],
"exclude": [
"../../../**/*test.ts",
"../../**/*api.ts"
],
"references": [
{ "path": "../../../src/common" },
{ "path": "../../../src/browser" }
{
"path": "../../../src/common"
},
{
"path": "../../../src/browser"
}
]
}
@@ -6,10 +6,10 @@
import jsdom = require('jsdom');
import { assert } from 'chai';
import { SerializeAddon } from './SerializeAddon';
import { Terminal } from 'browser/public/Terminal';
import { SelectionModel } from 'browser/selection/SelectionModel';
import { IBufferService } from 'common/services/Services';
import { ThemeService } from 'browser/services/ThemeService';
import { Terminal } from '../../../src/browser/public/Terminal';
import { SelectionModel } from '../../../src/browser/selection/SelectionModel';
import { IBufferService } from '../../../src/common/services/Services';
import { ThemeService } from '../../../src/browser/services/ThemeService';
function sgr(...seq: string[]): string {
return `\x1b[${seq.join(';')}m`;
+3 -3
View File
@@ -7,9 +7,9 @@
import type { IBuffer, IBufferCell, IBufferRange, ITerminalAddon, Terminal } from '@xterm/xterm';
import type { IHTMLSerializeOptions, SerializeAddon as ISerializeApi, ISerializeOptions, ISerializeRange } from '@xterm/addon-serialize';
import { IAttributeData, IColor } from 'common/Types';
import { DEFAULT_ANSI_COLORS } from 'browser/Types';
import { UnderlineStyle } from 'common/buffer/Constants';
import { IAttributeData, IColor } from '../../../src/common/Types';
import { DEFAULT_ANSI_COLORS } from '../../../src/browser/Types';
import { UnderlineStyle } from '../../../src/common/buffer/Constants';
function constrain(value: number, low: number, high: number): number {
return Math.max(low, Math.min(value, high));
+2 -12
View File
@@ -10,17 +10,6 @@
"outDir": "../out",
"sourceMap": true,
"removeComments": true,
"paths": {
"common/*": [
"../../../src/common/*"
],
"browser/*": [
"../../../src/browser/*"
],
"@xterm/addon-serialize": [
"../typings/addon-serialize.d.ts"
]
},
"strict": true,
"skipLibCheck": true,
"types": [
@@ -29,7 +18,8 @@
},
"include": [
"./**/*",
"../../../typings/xterm.d.ts"
"../../../typings/xterm.d.ts",
"../typings/addon-serialize.d.ts"
],
"references": [
{
+1 -9
View File
@@ -3,20 +3,12 @@
"module": "commonjs",
"target": "ESNext",
"lib": [
"es2021",
"es2021"
],
"rootDir": ".",
"outDir": "../out-test",
"sourceMap": true,
"removeComments": true,
"paths": {
"common/*": [
"../../../src/common/*"
],
"browser/*": [
"../../../src/browser/*"
]
},
"strict": true,
"types": [
"../../../node_modules/@types/node"
+9 -3
View File
@@ -2,8 +2,14 @@
"files": [],
"include": [],
"references": [
{ "path": "./src" },
{ "path": "./test" },
{ "path": "./benchmark" }
{
"path": "./src"
},
{
"path": "./test"
},
{
"path": "./benchmark"
}
]
}
@@ -6,9 +6,9 @@
import { perfContext, before, ThroughputRuntimeCase } from 'xterm-benchmark';
import { spawn } from 'node-pty';
import { Utf8ToUtf32, stringFromCodePoint } from 'common/input/TextDecoder';
import { CoreBrowserTerminal } from 'browser/CoreBrowserTerminal';
import { UnicodeGraphemeProvider } from 'UnicodeGraphemeProvider';
import { Utf8ToUtf32, stringFromCodePoint } from '../../../src/common/input/TextDecoder';
import { CoreBrowserTerminal } from '../../../src/browser/CoreBrowserTerminal';
import { UnicodeGraphemeProvider } from '../src/UnicodeGraphemeProvider';
function fakedAddonLoad(terminal: any): void {
@@ -1,26 +1,33 @@
{
"compilerOptions": {
"lib": ["dom", "es6"],
"lib": [
"dom",
"es6"
],
"rootDir": "..",
"outDir": "../out-benchmark",
"types": ["../../../node_modules/@types/node"],
"types": [
"../../../node_modules/@types/node"
],
"moduleResolution": "node",
"strict": false,
"target": "es2015",
"module": "commonjs",
"paths": {
"common/*": ["../../../src/common/*"],
"browser/*": ["../../../src/browser/*"],
"UnicodeGraphemeProvider": ["../src/UnicodeGraphemeProvider"],
"@xterm/addon-unicode-graphemes": [
"../typings/addon-unicode-graphemes.d.ts"
]
}
"module": "commonjs"
},
"include": ["../**/*", "../../../typings/xterm.d.ts"],
"exclude": ["../../../**/*test.ts", "../../**/*api.ts"],
"include": [
"../**/*",
"../../../typings/xterm.d.ts"
],
"exclude": [
"../../../**/*test.ts",
"../../**/*api.ts"
],
"references": [
{ "path": "../../../src/common" },
{ "path": "../../../src/browser" }
{
"path": "../../../src/common"
},
{
"path": "../../../src/browser"
}
]
}
@@ -4,8 +4,8 @@
*/
import { IUnicodeVersionProvider } from '@xterm/xterm';
import { UnicodeCharProperties, UnicodeCharWidth } from 'common/services/Services';
import { UnicodeService } from 'common/services/UnicodeService';
import { UnicodeCharProperties, UnicodeCharWidth } from '../../../src/common/services/Services';
import { UnicodeService } from '../../../src/common/services/UnicodeService';
import * as UC from './third-party/UnicodeProperties';
export class UnicodeGraphemeProvider implements IUnicodeVersionProvider {
@@ -11,21 +11,14 @@
"sourceMap": true,
"removeComments": true,
"strict": true,
"paths": {
"common/*": [
"../../../src/common/*"
],
"@xterm/addon-unicode-graphemes": [
"../typings/addon-unicode-graphemes.d.ts"
]
},
"types": [
"../../../node_modules/@types/mocha"
]
},
"include": [
"./**/*",
"../../../typings/xterm.d.ts"
"../../../typings/xterm.d.ts",
"../typings/addon-unicode-graphemes.d.ts"
],
"references": [
{
@@ -3,20 +3,12 @@
"module": "commonjs",
"target": "ESNext",
"lib": [
"es2021",
"es2021"
],
"rootDir": ".",
"outDir": "../out-test",
"sourceMap": true,
"removeComments": true,
"paths": {
"common/*": [
"../../../src/common/*"
],
"browser/*": [
"../../../src/browser/*"
]
},
"strict": true,
"types": [
"../../../node_modules/@types/node"
+9 -3
View File
@@ -2,8 +2,14 @@
"files": [],
"include": [],
"references": [
{ "path": "./src" },
{ "path": "./test" },
{ "path": "./benchmark" }
{
"path": "./src"
},
{
"path": "./test"
},
{
"path": "./benchmark"
}
]
}
+2 -2
View File
@@ -4,8 +4,8 @@
*/
import { IUnicodeVersionProvider } from '@xterm/xterm';
import { UnicodeCharProperties, UnicodeCharWidth } from 'common/services/Services';
import { UnicodeService } from 'common/services/UnicodeService';
import { UnicodeCharProperties, UnicodeCharWidth } from '../../../src/common/services/Services';
import { UnicodeService } from '../../../src/common/services/UnicodeService';
const BMP_COMBINING = [
[0x0300, 0x036F], [0x0483, 0x0489], [0x0591, 0x05BD],
+2 -12
View File
@@ -11,24 +11,14 @@
"sourceMap": true,
"removeComments": true,
"strict": true,
"paths": {
"common/*": [
"../../../src/common/*"
],
"@xterm/addon-unicode11": [
"../typings/addon-unicode11.d.ts"
],
"*": [
"./*"
]
},
"types": [
"../../../node_modules/@types/mocha"
]
},
"include": [
"./**/*",
"../../../typings/xterm.d.ts"
"../../../typings/xterm.d.ts",
"../typings/addon-unicode11.d.ts"
],
"references": [
{
+1 -12
View File
@@ -3,23 +3,12 @@
"module": "commonjs",
"target": "ESNext",
"lib": [
"es2021",
"es2021"
],
"rootDir": ".",
"outDir": "../out-test",
"sourceMap": true,
"removeComments": true,
"paths": {
"common/*": [
"../../../src/common/*"
],
"browser/*": [
"../../../src/browser/*"
],
"*": [
"./*"
]
},
"strict": true,
"types": [
"../../../node_modules/@types/node"
+6 -2
View File
@@ -2,7 +2,11 @@
"files": [],
"include": [],
"references": [
{ "path": "./src" },
{ "path": "./test" }
{
"path": "./src"
},
{
"path": "./test"
}
]
}
+3 -7
View File
@@ -14,15 +14,11 @@
"strict": true,
"types": [
"../../../node_modules/@types/mocha"
],
"paths": {
"@xterm/addon-web-fonts": [
"../typings/addon-web-fonts.d.ts"
]
}
]
},
"include": [
"./**/*",
"../../../typings/xterm.d.ts"
"../../../typings/xterm.d.ts",
"../typings/addon-web-fonts.d.ts"
]
}
+1 -13
View File
@@ -3,24 +3,12 @@
"module": "commonjs",
"target": "es2021",
"lib": [
"es2021",
"es2021"
],
// "downlevelIteration": true,
"rootDir": ".",
"outDir": "../out-test",
"sourceMap": true,
"removeComments": true,
"paths": {
"common/*": [
"../../../src/common/*"
],
"browser/*": [
"../../../src/browser/*"
],
"*": [
"./*"
]
},
"strict": true,
"types": [
"../../../node_modules/@types/node"
+6 -2
View File
@@ -2,7 +2,11 @@
"files": [],
"include": [],
"references": [
{ "path": "./src" },
{ "path": "./test" }
{
"path": "./src"
},
{
"path": "./test"
}
]
}
+3 -7
View File
@@ -13,15 +13,11 @@
"strict": true,
"types": [
"../../../node_modules/@types/mocha"
],
"paths": {
"@xterm/addon-web-links": [
"../typings/addon-web-links.d.ts"
]
}
]
},
"include": [
"./**/*",
"../../../typings/xterm.d.ts"
"../../../typings/xterm.d.ts",
"../typings/addon-web-links.d.ts"
]
}
+1 -13
View File
@@ -3,24 +3,12 @@
"module": "commonjs",
"target": "es2021",
"lib": [
"es2021",
"es2021"
],
// "downlevelIteration": true,
"rootDir": ".",
"outDir": "../out-test",
"sourceMap": true,
"removeComments": true,
"paths": {
"common/*": [
"../../../src/common/*"
],
"browser/*": [
"../../../src/browser/*"
],
"*": [
"./*"
]
},
"strict": true,
"types": [
"../../../node_modules/@types/node"
+6 -2
View File
@@ -2,7 +2,11 @@
"files": [],
"include": [],
"references": [
{ "path": "./src" },
{ "path": "./test" }
{
"path": "./src"
},
{
"path": "./test"
}
]
}
+8 -8
View File
@@ -1,12 +1,12 @@
import { ISelectionRenderModel } from 'browser/renderer/shared/Types';
import { ICoreBrowserService, IThemeService } from 'browser/services/Services';
import { ReadonlyColorSet } from 'browser/Types';
import { Attributes, BgFlags, ExtFlags, FgFlags, NULL_CELL_CODE, UnderlineStyle } from 'common/buffer/Constants';
import { IDecorationService, IOptionsService } from 'common/services/Services';
import { ICellData } from 'common/Types';
import { ISelectionRenderModel } from '../../../src/browser/renderer/shared/Types';
import { ICoreBrowserService, IThemeService } from '../../../src/browser/services/Services';
import { ReadonlyColorSet } from '../../../src/browser/Types';
import { Attributes, BgFlags, ExtFlags, FgFlags, NULL_CELL_CODE, UnderlineStyle } from '../../../src/common/buffer/Constants';
import { IDecorationService, IOptionsService } from '../../../src/common/services/Services';
import { ICellData } from '../../../src/common/Types';
import { Terminal } from '@xterm/xterm';
import { rgba } from 'common/Color';
import { treatGlyphAsBackgroundColor } from 'browser/renderer/shared/RendererUtils';
import { rgba } from '../../../src/common/Color';
import { treatGlyphAsBackgroundColor } from '../../../src/browser/renderer/shared/RendererUtils';
import { blockPatternCodepoints } from './customGlyphs/CustomGlyphDefinitions';
// Work variables to avoid garbage collection
+2 -2
View File
@@ -5,10 +5,10 @@
import { TextureAtlas } from './TextureAtlas';
import { ITerminalOptions, Terminal } from '@xterm/xterm';
import { ITerminal, ReadonlyColorSet } from 'browser/Types';
import { ITerminal, ReadonlyColorSet } from '../../../src/browser/Types';
import { ICharAtlasConfig, ITextureAtlas } from './Types';
import { generateConfig, configEquals } from './CharAtlasUtils';
import type { ILogService } from 'common/services/Services';
import type { ILogService } from '../../../src/common/services/Services';
interface ITextureAtlasCacheEntry {
atlas: ITextureAtlas;
@@ -6,8 +6,8 @@
import { assert } from 'chai';
import { configEquals } from './CharAtlasUtils';
import { ICharAtlasConfig } from './Types';
import { NULL_COLOR } from 'common/Color';
import { IColor } from 'common/Types';
import { NULL_COLOR } from '../../../src/common/Color';
import { IColor } from '../../../src/common/Types';
function createTestConfig(overrides: Partial<ICharAtlasConfig> = {}): ICharAtlasConfig {
const color: IColor = { css: '#ffffff', rgba: 0xffffffff };
+3 -3
View File
@@ -4,10 +4,10 @@
*/
import { ICharAtlasConfig } from './Types';
import { Attributes } from 'common/buffer/Constants';
import { Attributes } from '../../../src/common/buffer/Constants';
import { ITerminalOptions } from '@xterm/xterm';
import { IColorSet, ReadonlyColorSet } from 'browser/Types';
import { NULL_COLOR } from 'common/Color';
import { IColorSet, ReadonlyColorSet } from '../../../src/browser/Types';
import { NULL_COLOR } from '../../../src/common/Color';
export function generateConfig(deviceCellWidth: number, deviceCellHeight: number, deviceCharWidth: number, deviceCharHeight: number, options: Required<ITerminalOptions>, colors: ReadonlyColorSet, devicePixelRatio: number, deviceMaxTextureSize: number, customGlyphs: boolean = true): ICharAtlasConfig {
// null out some fields that don't matter
+1 -1
View File
@@ -3,7 +3,7 @@
* @license MIT
*/
import { isFirefox, isLegacyEdge } from 'common/Platform';
import { isFirefox, isLegacyEdge } from '../../../src/common/Platform';
export const DIM_OPACITY = 0.5;
// The text baseline is set conditionally by browser. Using 'ideographic' for Firefox or Legacy Edge
@@ -3,8 +3,8 @@
* @license MIT
*/
import { RendererConstants } from 'browser/renderer/shared/Constants';
import { ICoreBrowserService } from 'browser/services/Services';
import { RendererConstants } from '../../../src/browser/renderer/shared/Constants';
import { ICoreBrowserService } from '../../../src/browser/services/Services';
const enum Constants {
/**
@@ -3,7 +3,7 @@
* @license MIT
*/
import { toDisposable, IDisposable } from 'common/Lifecycle';
import { toDisposable, IDisposable } from '../../../src/common/Lifecycle';
export function observeDevicePixelDimensions(element: HTMLElement, parentWindow: Window & typeof globalThis, callback: (deviceWidth: number, deviceHeight: number) => void): IDisposable {
// Observe any resizes to the element and extract the actual pixel size of the element if the
+5 -5
View File
@@ -3,14 +3,14 @@
* @license MIT
*/
import { TextureAtlas } from './TextureAtlas';
import { IRenderDimensions } from 'browser/renderer/shared/Types';
import { NULL_CELL_CODE } from 'common/buffer/Constants';
import { Disposable, toDisposable } from 'common/Lifecycle';
import { IRenderDimensions } from '../../../src/browser/renderer/shared/Types';
import { NULL_CELL_CODE } from '../../../src/common/buffer/Constants';
import { Disposable, toDisposable } from '../../../src/common/Lifecycle';
import { Terminal } from '@xterm/xterm';
import { IRenderModel, IWebGL2RenderingContext, IWebGLVertexArrayObject, type IRasterizedGlyph, type ITextureAtlas } from './Types';
import { createProgram, GLTexture, PROJECTION_MATRIX } from './WebglUtils';
import type { ILogService, IOptionsService } from 'common/services/Services';
import { allowRescaling, throwIfFalsy } from 'browser/renderer/shared/RendererUtils';
import type { ILogService, IOptionsService } from '../../../src/common/services/Services';
import { allowRescaling, throwIfFalsy } from '../../../src/browser/renderer/shared/RendererUtils';
interface IVertices {
attributes: Float32Array;
+8 -8
View File
@@ -3,18 +3,18 @@
* @license MIT
*/
import { IRenderDimensions } from 'browser/renderer/shared/Types';
import { IThemeService } from 'browser/services/Services';
import { ReadonlyColorSet } from 'browser/Types';
import { Attributes, FgFlags } from 'common/buffer/Constants';
import { Disposable, toDisposable } from 'common/Lifecycle';
import { IColor } from 'common/Types';
import { IRenderDimensions } from '../../../src/browser/renderer/shared/Types';
import { IThemeService } from '../../../src/browser/services/Services';
import { ReadonlyColorSet } from '../../../src/browser/Types';
import { Attributes, FgFlags } from '../../../src/common/buffer/Constants';
import { Disposable, toDisposable } from '../../../src/common/Lifecycle';
import { IColor } from '../../../src/common/Types';
import { Terminal } from '@xterm/xterm';
import { RenderModelConstants } from './RenderModel';
import { IRenderModel, IWebGL2RenderingContext, IWebGLVertexArrayObject } from './Types';
import { createProgram, expandFloat32Array, PROJECTION_MATRIX } from './WebglUtils';
import { throwIfFalsy } from 'browser/renderer/shared/RendererUtils';
import type { ILogService } from 'common/services/Services';
import { throwIfFalsy } from '../../../src/browser/renderer/shared/RendererUtils';
import type { ILogService } from '../../../src/common/services/Services';
const enum VertexAttribLocations {
POSITION = 0,
+2 -2
View File
@@ -4,8 +4,8 @@
*/
import { ICursorRenderModel, IRenderModel } from './Types';
import { ISelectionRenderModel } from 'browser/renderer/shared/Types';
import { createSelectionRenderModel } from 'browser/renderer/shared/SelectionRenderModel';
import { ISelectionRenderModel } from '../../../src/browser/renderer/shared/Types';
import { createSelectionRenderModel } from '../../../src/browser/renderer/shared/SelectionRenderModel';
export const enum RenderModelConstants {
INDICIES_PER_CELL = 4,
+10 -10
View File
@@ -3,19 +3,19 @@
* @license MIT
*/
import { IColorContrastCache } from 'browser/Types';
import { IColorContrastCache } from '../../../src/browser/Types';
import { DIM_OPACITY, TEXT_BASELINE } from './Constants';
import { tryDrawCustomGlyph } from './customGlyphs/CustomGlyphRasterizer';
import { computeNextVariantOffset, treatGlyphAsBackgroundColor, isPowerlineGlyph, isRestrictedPowerlineGlyph, throwIfFalsy } from 'browser/renderer/shared/RendererUtils';
import { computeNextVariantOffset, treatGlyphAsBackgroundColor, isPowerlineGlyph, isRestrictedPowerlineGlyph, throwIfFalsy } from '../../../src/browser/renderer/shared/RendererUtils';
import { IBoundingBox, ICharAtlasConfig, IRasterizedGlyph, ITextureAtlas } from './Types';
import { NULL_COLOR, channels, color, rgba } from 'common/Color';
import { FourKeyMap } from 'common/MultiKeyMap';
import { IdleTaskQueue } from 'common/TaskQueue';
import { IColor } from 'common/Types';
import { AttributeData } from 'common/buffer/AttributeData';
import { Attributes, DEFAULT_COLOR, DEFAULT_EXT, UnderlineStyle } from 'common/buffer/Constants';
import { ILogService, IUnicodeService } from 'common/services/Services';
import { Emitter } from 'common/Event';
import { NULL_COLOR, channels, color, rgba } from '../../../src/common/Color';
import { FourKeyMap } from '../../../src/common/MultiKeyMap';
import { IdleTaskQueue } from '../../../src/common/TaskQueue';
import { IColor } from '../../../src/common/Types';
import { AttributeData } from '../../../src/common/buffer/AttributeData';
import { Attributes, DEFAULT_COLOR, DEFAULT_EXT, UnderlineStyle } from '../../../src/common/buffer/Constants';
import { ILogService, IUnicodeService } from '../../../src/common/services/Services';
import { Emitter } from '../../../src/common/Event';
/**
* A shared object which is used to draw nothing for a particular cell.
+4 -4
View File
@@ -4,10 +4,10 @@
*/
import { FontWeight } from '@xterm/xterm';
import { IColorSet } from 'browser/Types';
import { ISelectionRenderModel } from 'browser/renderer/shared/Types';
import { CursorInactiveStyle, CursorStyle, type IDisposable } from 'common/Types';
import type { IEvent } from 'common/Event';
import { IColorSet } from '../../../src/browser/Types';
import { ISelectionRenderModel } from '../../../src/browser/renderer/shared/Types';
import { CursorInactiveStyle, CursorStyle, type IDisposable } from '../../../src/common/Types';
import type { IEvent } from '../../../src/common/Event';
export interface IRenderModel {
cells: Uint32Array;
+6 -6
View File
@@ -5,14 +5,14 @@
import type { ITerminalAddon, Terminal } from '@xterm/xterm';
import type { IWebglAddonOptions, WebglAddon as IWebglApi } from '@xterm/addon-webgl';
import { ICharacterJoinerService, ICharSizeService, ICoreBrowserService, IRenderService, IThemeService } from 'browser/services/Services';
import { ITerminal } from 'browser/Types';
import { Disposable, toDisposable } from 'common/Lifecycle';
import { getSafariVersion, isSafari } from 'common/Platform';
import { ICoreService, IDecorationService, ILogService, IOptionsService } from 'common/services/Services';
import { ICharacterJoinerService, ICharSizeService, ICoreBrowserService, IRenderService, IThemeService } from '../../../src/browser/services/Services';
import { ITerminal } from '../../../src/browser/Types';
import { Disposable, toDisposable } from '../../../src/common/Lifecycle';
import { getSafariVersion, isSafari } from '../../../src/common/Platform';
import { ICoreService, IDecorationService, ILogService, IOptionsService } from '../../../src/common/services/Services';
import { IWebGL2RenderingContext } from './Types';
import { WebglRenderer } from './WebglRenderer';
import { Emitter, EventUtils } from 'common/Event';
import { Emitter, EventUtils } from '../../../src/common/Event';
export class WebglAddon extends Disposable implements ITerminalAddon, IWebglApi {
private _terminal?: Terminal;
+13 -13
View File
@@ -3,19 +3,19 @@
* @license MIT
*/
import { ITerminal } from 'browser/Types';
import { ITerminal } from '../../../src/browser/Types';
import { CellColorResolver } from './CellColorResolver';
import { acquireTextureAtlas, removeTerminalFromCache } from './CharAtlasCache';
import { CursorBlinkStateManager } from './CursorBlinkStateManager';
import { observeDevicePixelDimensions } from './DevicePixelObserver';
import { IRenderDimensions, IRenderer, IRequestRedrawEvent } from 'browser/renderer/shared/Types';
import { ICharSizeService, ICharacterJoinerService, ICoreBrowserService, IThemeService } from 'browser/services/Services';
import { CharData, IBufferLine, ICellData } from 'common/Types';
import { AttributeData } from 'common/buffer/AttributeData';
import { CellData } from 'common/buffer/CellData';
import { Attributes, Content, FgFlags, NULL_CELL_CHAR, NULL_CELL_CODE } from 'common/buffer/Constants';
import { TextBlinkStateManager } from 'browser/renderer/shared/TextBlinkStateManager';
import { ICoreService, IDecorationService, ILogService, IOptionsService } from 'common/services/Services';
import { IRenderDimensions, IRenderer, IRequestRedrawEvent } from '../../../src/browser/renderer/shared/Types';
import { ICharSizeService, ICharacterJoinerService, ICoreBrowserService, IThemeService } from '../../../src/browser/services/Services';
import { CharData, IBufferLine, ICellData } from '../../../src/common/Types';
import { AttributeData } from '../../../src/common/buffer/AttributeData';
import { CellData } from '../../../src/common/buffer/CellData';
import { Attributes, Content, FgFlags, NULL_CELL_CHAR, NULL_CELL_CODE } from '../../../src/common/buffer/Constants';
import { TextBlinkStateManager } from '../../../src/browser/renderer/shared/TextBlinkStateManager';
import { ICoreService, IDecorationService, ILogService, IOptionsService } from '../../../src/common/services/Services';
import { Terminal } from '@xterm/xterm';
import { GlyphRenderer } from './GlyphRenderer';
import { RectangleRenderer } from './RectangleRenderer';
@@ -23,10 +23,10 @@ import { COMBINED_CHAR_BIT_MASK, RenderModel, RenderModelConstants } from './Ren
import { IWebGL2RenderingContext, type ITextureAtlas } from './Types';
import { LinkRenderLayer } from './renderLayer/LinkRenderLayer';
import { IRenderLayer } from './renderLayer/Types';
import { Emitter, EventUtils } from 'common/Event';
import { addDisposableListener } from 'browser/Dom';
import { combinedDisposable, Disposable, MutableDisposable, toDisposable } from 'common/Lifecycle';
import { createRenderDimensions } from 'browser/renderer/shared/RendererUtils';
import { Emitter, EventUtils } from '../../../src/common/Event';
import { addDisposableListener } from '../../../src/browser/Dom';
import { combinedDisposable, Disposable, MutableDisposable, toDisposable } from '../../../src/common/Lifecycle';
import { createRenderDimensions } from '../../../src/browser/renderer/shared/RendererUtils';
const enum Constants {
MERGE_RETRY_LIMIT = 32
+2 -2
View File
@@ -3,8 +3,8 @@
* @license MIT
*/
import { throwIfFalsy } from 'browser/renderer/shared/RendererUtils';
import type { ILogService } from 'common/services/Services';
import { throwIfFalsy } from '../../../src/browser/renderer/shared/RendererUtils';
import type { ILogService } from '../../../src/common/services/Services';
/**
* A matrix that when multiplies will translate 0-1 coordinates (left to right,
@@ -3,8 +3,8 @@
* @license MIT
*/
import { throwIfFalsy } from 'browser/renderer/shared/RendererUtils';
import type { ILogService } from 'common/services/Services';
import { throwIfFalsy } from '../../../../src/browser/renderer/shared/RendererUtils';
import type { ILogService } from '../../../../src/common/services/Services';
import { customGlyphDefinitions } from './CustomGlyphDefinitions';
import { CustomGlyphDefinitionType, CustomGlyphScaleType, CustomGlyphVectorType, type CustomGlyphDefinitionPart, type CustomGlyphPathDrawFunctionDefinition, type CustomGlyphPatternDefinition, type ICustomGlyphSolidOctantBlockVector, type ICustomGlyphVectorShape } from './Types';
@@ -3,16 +3,16 @@
* @license MIT
*/
import { ReadonlyColorSet } from 'browser/Types';
import { ReadonlyColorSet } from '../../../../src/browser/Types';
import { acquireTextureAtlas } from '../CharAtlasCache';
import { IRenderDimensions } from 'browser/renderer/shared/Types';
import { ICoreBrowserService, IThemeService } from 'browser/services/Services';
import { Disposable, toDisposable } from 'common/Lifecycle';
import { CellData } from 'common/buffer/CellData';
import { IOptionsService } from 'common/services/Services';
import { IRenderDimensions } from '../../../../src/browser/renderer/shared/Types';
import { ICoreBrowserService, IThemeService } from '../../../../src/browser/services/Services';
import { Disposable, toDisposable } from '../../../../src/common/Lifecycle';
import { CellData } from '../../../../src/common/buffer/CellData';
import { IOptionsService } from '../../../../src/common/services/Services';
import { Terminal } from '@xterm/xterm';
import { IRenderLayer } from './Types';
import { throwIfFalsy } from 'browser/renderer/shared/RendererUtils';
import { throwIfFalsy } from '../../../../src/browser/renderer/shared/RendererUtils';
import { TEXT_BASELINE } from '../Constants';
import type { ITextureAtlas } from '../Types';
@@ -4,11 +4,11 @@
*/
import { is256Color } from '../CharAtlasUtils';
import { INVERTED_DEFAULT_COLOR } from 'browser/renderer/shared/Constants';
import { IRenderDimensions } from 'browser/renderer/shared/Types';
import { ICoreBrowserService, IThemeService } from 'browser/services/Services';
import { ILinkifier2, ILinkifierEvent } from 'browser/Types';
import { IOptionsService } from 'common/services/Services';
import { INVERTED_DEFAULT_COLOR } from '../../../../src/browser/renderer/shared/Constants';
import { IRenderDimensions } from '../../../../src/browser/renderer/shared/Types';
import { ICoreBrowserService, IThemeService } from '../../../../src/browser/services/Services';
import { ILinkifier2, ILinkifierEvent } from '../../../../src/browser/Types';
import { IOptionsService } from '../../../../src/common/services/Services';
import { Terminal } from '@xterm/xterm';
import { BaseRenderLayer } from './BaseRenderLayer';
+1 -1
View File
@@ -4,7 +4,7 @@
*/
import { IDisposable, Terminal } from '@xterm/xterm';
import { IRenderDimensions } from 'browser/renderer/shared/Types';
import { IRenderDimensions } from '../../../../src/browser/renderer/shared/Types';
export interface IRenderLayer extends IDisposable {
/**
+2 -15
View File
@@ -10,20 +10,6 @@
"outDir": "../out",
"sourceMap": true,
"removeComments": true,
"paths": {
"common/*": [
"../../../src/common/*"
],
"browser/*": [
"../../../src/browser/*"
],
"@xterm/addon-webgl": [
"../typings/addon-webgl.d.ts"
],
"*": [
"./*"
]
},
"strict": true,
"downlevelIteration": true,
"experimentalDecorators": true,
@@ -33,7 +19,8 @@
},
"include": [
"./**/*",
"../../../typings/xterm.d.ts"
"../../../typings/xterm.d.ts",
"../typings/addon-webgl.d.ts"
],
"references": [
{
+1 -12
View File
@@ -3,23 +3,12 @@
"module": "commonjs",
"target": "ESNext",
"lib": [
"es2021",
"es2021"
],
"rootDir": ".",
"outDir": "../out-test",
"sourceMap": true,
"removeComments": true,
"paths": {
"common/*": [
"../../../src/common/*"
],
"browser/*": [
"../../../src/browser/*"
],
"*": [
"./*"
]
},
"strict": true,
"types": [
"../../../node_modules/@types/node",
+6 -2
View File
@@ -2,7 +2,11 @@
"files": [],
"include": [],
"references": [
{ "path": "./src" },
{ "path": "./test" }
{
"path": "./src"
},
{
"path": "./test"
}
]
}
+10 -3
View File
@@ -107,13 +107,20 @@ if (config.addon) {
};
outConfig = {
...outConfig,
bundle: true,
platform: 'node',
packages: 'external',
entryPoints: [`addons/addon-${config.addon}/src/**/*.ts`],
outdir: `addons/addon-${config.addon}/out-esbuild/`
outdir: `addons/addon-${config.addon}/out-esbuild/`,
// Public API stays external; src/common|browser are bundled from source.
external: ['@xterm/xterm', '@xterm/headless', '@xterm/addon-*'],
};
// Playwright suites only (not run by unit tests); keep unbundled.
outTestConfig = {
...outConfig,
format: 'cjs',
sourcemap: true,
entryPoints: [`addons/addon-${config.addon}/test/**/*.ts`],
outdir: `addons/addon-${config.addon}/out-esbuild-test/`
outdir: `addons/addon-${config.addon}/out-esbuild-test/`,
};
if (config.addon === 'ligatures') {
+15 -4
View File
@@ -7,19 +7,30 @@ import { argv } from "process";
/** @type {{cp: import("child_process").ChildProcessByStdio<any, any, any>, name: string}[]} */
const jobs = [];
// Core job
jobs.push(createJob('xterm', []));
// Core job must finish before addons (addon tests resolve src/* via out-esbuild).
const xtermJob = createJob('xterm', []);
const xtermCode = await new Promise(r => {
xtermJob.cp.on('exit', code => {
log(`Finished \x1b[32m${xtermJob.name}\x1b[0m${code ? ' \x1b[31mwith errors\x1b[0m' : ''}`);
r(code ?? 1);
});
});
if (xtermCode !== 0) {
process.exit(xtermCode);
}
// Addon jobs
const addons = (await readdir('addons')).filter(e => e.startsWith('addon-')).map(e => e.replace('addon-', ''));
/** @type {{cp: import("child_process").ChildProcessByStdio<any, any, any>, name: string}[]} */
const addonJobs = [];
for (const addon of addons) {
jobs.push(createJob(`xterm-addon-${addon}`, [`--addon=${addon}`]));
addonJobs.push(createJob(`xterm-addon-${addon}`, [`--addon=${addon}`]));
}
// Demo job - This requires the others to be built so it's not included when building all
// jobs.push(createJob('demo-client', [`--demo-client`]));
await Promise.all(jobs.map((job, i) => {
await Promise.all(addonJobs.map(job => {
return new Promise(r => {
job.cp.on('exit', code => {
log(`Finished \x1b[32m${job.name}\x1b[0m${code ? ' \x1b[31mwith errors\x1b[0m' : ''}`);
+1 -1
View File
@@ -8,7 +8,7 @@ const path = require('path');
const COVERAGE_LINES_THRESHOLD = 40;
// Add `out` to the NODE_PATH so absolute paths can be resolved.
// Add `out-esbuild` to NODE_PATH for any remaining non-relative requires in test bundles.
const env = { ...process.env };
env.NODE_PATH = path.resolve(__dirname, '../out-esbuild');
@@ -6,7 +6,7 @@
import { BaseWindow } from './baseWindow';
import type { Terminal, ITheme } from '@xterm/xterm';
import type { IControlWindow } from '../controlBar';
import type { AddonCollection } from 'types';
import type { AddonCollection } from '../../types';
const xtermjsTheme: ITheme = Object.freeze({
foreground: '#F8F8F8',
+1 -1
View File
@@ -7,7 +7,7 @@ import { writeUnicodeTable } from '../../unicodeTable';
import type { IControlWindow } from '../controlBar';
import { BaseWindow } from './baseWindow';
import type { IDisposable, Terminal } from '@xterm/xterm';
import type { AddonCollection } from 'types';
import type { AddonCollection } from '../../types';
export class TestWindow extends BaseWindow implements IControlWindow {
public readonly id = 'test';
+1 -17
View File
@@ -6,23 +6,7 @@
"rootDir": ".",
"sourceMap": true,
"strict": true,
"skipLibCheck": true,
"paths": {
"@xterm/addon-attach": ["../../addons/addon-attach"],
"@xterm/addon-clipboard": ["../../addons/addon-clipboard"],
"@xterm/addon-fit": ["../../addons/addon-fit"],
"@xterm/addon-image": ["../../addons/addon-image"],
"@xterm/addon-progress": ["../../addons/addon-progress"],
"@xterm/addon-search": ["../../addons/addon-search"],
"@xterm/addon-serialize": ["../../addons/addon-serialize"],
"@xterm/addon-web-fonts": ["../../addons/addon-web-fonts"],
"@xterm/addon-web-links": ["../../addons/addon-web-links"],
"@xterm/addon-webgl": ["../../addons/addon-webgl"],
"@xterm/addon-unicode11": ["../../addons/addon-unicode11"],
"@xterm/addon-unicode-graphemes": ["../../addons/addon-unicode-graphemes"],
"@xterm/addon-ligatures": ["../../addons/addon-ligatures"],
"*": ["./*"]
}
"skipLibCheck": true
},
"include": [
"./**/*",
+1 -1
View File
@@ -9,6 +9,6 @@
"skipLibCheck": true
},
"include": [
"./**/*",
"./**/*"
]
}
+6 -2
View File
@@ -1,7 +1,11 @@
{
"references": [
{ "path": "./client" },
{ "path": "./server" }
{
"path": "./client"
},
{
"path": "./server"
}
],
"files": []
}
+5 -7
View File
@@ -3,15 +3,13 @@
"description": "A headless terminal component that runs in Node.js",
"version": "6.0.0",
"main": "lib-headless/xterm-headless.js",
"module": "lib-headless/xterm-headless.mjs",
"module": "lib/xterm.mjs",
"types": "typings/xterm-headless.d.ts",
"exports": {
"types": "./typings/xterm-headless.d.ts",
"import": "./lib-headless/xterm-headless.mjs",
"require": "./lib-headless/xterm-headless.js"
},
"repository": "https://github.com/xtermjs/xterm.js",
"license": "MIT",
"workspaces": [
"addons/*"
],
"keywords": [
"cli",
"command-line",
@@ -27,4 +25,4 @@
"webgl",
"xterm"
]
}
}
+39
View File
@@ -0,0 +1,39 @@
/**
* Smoke test: @xterm/headless loads and runs in Node.js (require).
*/
const { strictEqual } = require('node:assert');
const { Terminal } = require('./lib-headless/xterm-headless.js');
function writeSync(term, data) {
return new Promise(resolve => term.write(data, resolve));
}
function lineEquals(term, index, text) {
strictEqual(term.buffer.active.getLine(index).translateToString(true), text);
}
(async () => {
const term = new Terminal({ cols: 80, rows: 24, allowProposedApi: true });
strictEqual(term.cols, 80);
strictEqual(term.rows, 24);
await writeSync(term, 'hello from node');
lineEquals(term, 0, 'hello from node');
await writeSync(term, 'foo');
await writeSync(term, 'bar');
await writeSync(term, '文');
lineEquals(term, 0, 'hello from nodefoobar文');
term.resize(60, 15);
strictEqual(term.cols, 60);
strictEqual(term.rows, 15);
term.dispose();
strictEqual(term._core._store.isDisposed, true);
console.log('headless package (CJS): load, write, buffer, resize, dispose OK');
})().catch(err => {
console.error(err);
process.exit(1);
});
+29
View File
@@ -0,0 +1,29 @@
/**
* Smoke test: @xterm/headless loads and runs in Node.js (ESM + CJS).
*/
import { createRequire } from 'node:module';
import { strictEqual } from 'node:assert';
const require = createRequire(import.meta.url);
function writeSync(term, data) {
return new Promise(resolve => term.write(data, resolve));
}
function lineEquals(term, index, text) {
strictEqual(term.buffer.active.getLine(index).translateToString(true), text);
}
const { Terminal: TerminalEsm } = await import('./lib-headless/xterm-headless.mjs');
const termEsm = new TerminalEsm({ cols: 80, rows: 24 });
await writeSync(termEsm, 'esm ok');
lineEquals(termEsm, 0, 'esm ok');
termEsm.dispose();
const { Terminal: TerminalCjs } = require('./lib-headless/xterm-headless.js');
const termCjs = new TerminalCjs({ cols: 40, rows: 10 });
await writeSync(termCjs, 'cjs ok');
lineEquals(termCjs, 0, 'cjs ok');
termCjs.dispose();
console.log('headless package: ESM and CJS load, write, and buffer read OK');
+2
View File
@@ -72,6 +72,8 @@
"prepackage-headless": "npm run esbuild-package-headless-only",
"package-headless": "webpack --config ./webpack.config.headless.js",
"postpackage-headless": "node ./bin/package_headless.js",
"test-headless-node": "node headless/test-node-load.cjs && node headless/test-node-load.mjs",
"pretest-headless-node": "npm run build && npm run esbuild-package-headless-only && webpack --config ./webpack.config.headless.js",
"prepublishOnly": "npm run package"
},
"devDependencies": {
+8 -8
View File
@@ -3,14 +3,14 @@
* @license MIT
*/
import * as Strings from 'browser/LocalizableStrings';
import { ITerminal, IRenderDebouncer } from 'browser/Types';
import { TimeBasedDebouncer } from 'browser/TimeBasedDebouncer';
import { Disposable, toDisposable } from 'common/Lifecycle';
import { ICoreBrowserService, IRenderService } from 'browser/services/Services';
import { IBuffer } from 'common/buffer/Types';
import { IInstantiationService } from 'common/services/Services';
import { addDisposableListener } from 'browser/Dom';
import * as Strings from './LocalizableStrings';
import { ITerminal, IRenderDebouncer } from './Types';
import { TimeBasedDebouncer } from './TimeBasedDebouncer';
import { Disposable, toDisposable } from '../common/Lifecycle';
import { ICoreBrowserService, IRenderService } from './services/Services';
import { IBuffer } from '../common/buffer/Types';
import { IInstantiationService } from '../common/services/Services';
import { addDisposableListener } from './Dom';
const enum Constants {
MAX_ROWS_TO_READ = 20
+1 -1
View File
@@ -4,7 +4,7 @@
*/
import { assert } from 'chai';
import * as Clipboard from 'browser/Clipboard';
import * as Clipboard from './Clipboard';
describe('evaluatePastedTextProcessing', () => {
it('should replace carriage return and/or line feed with carriage return', () => {
+2 -2
View File
@@ -3,8 +3,8 @@
* @license MIT
*/
import { ISelectionService } from 'browser/services/Services';
import { ICoreService, IOptionsService } from 'common/services/Services';
import { ISelectionService } from './services/Services';
import { ICoreService, IOptionsService } from '../common/services/Services';
/**
* Prepares text to be pasted into the terminal by normalizing the line endings
+1 -1
View File
@@ -4,7 +4,7 @@
*/
import { assert } from 'chai';
import { ColorContrastCache } from 'browser/ColorContrastCache';
import { ColorContrastCache } from './ColorContrastCache';
describe('ColorContrastCache', () => {
let cache: ColorContrastCache;
+3 -3
View File
@@ -3,9 +3,9 @@
* @license MIT
*/
import { IColorContrastCache } from 'browser/Types';
import { IColor } from 'common/Types';
import { TwoKeyMap } from 'common/MultiKeyMap';
import { IColorContrastCache } from './Types';
import { IColor } from '../common/Types';
import { TwoKeyMap } from '../common/MultiKeyMap';
export class ColorContrastCache implements IColorContrastCache {
private _color: TwoKeyMap</* bg */number, /* fg */number, IColor | null> = new TwoKeyMap();
+34 -34
View File
@@ -22,43 +22,43 @@
*/
import { IDecoration, IDecorationOptions, IDisposable, ILinkProvider, IMarker, IRenderDimensions as IRenderDimensionsApi } from '@xterm/xterm';
import { copyHandler, handlePasteEvent, moveTextAreaUnderMouseCursor, paste, rightClickHandler } from 'browser/Clipboard';
import * as Strings from 'browser/LocalizableStrings';
import { OscLinkProvider } from 'browser/OscLinkProvider';
import { CharacterJoinerHandler, CustomKeyEventHandler, CustomWheelEventHandler, IBrowser, IBufferRange, ICompositionHelper, ILinkifier2, ITerminal } from 'browser/Types';
import { Viewport } from 'browser/Viewport';
import { BufferDecorationRenderer } from 'browser/decorations/BufferDecorationRenderer';
import { OverviewRulerRenderer } from 'browser/decorations/OverviewRulerRenderer';
import { CompositionHelper } from 'browser/input/CompositionHelper';
import { DomRenderer } from 'browser/renderer/dom/DomRenderer';
import { IRenderer } from 'browser/renderer/shared/Types';
import { CharSizeService } from 'browser/services/CharSizeService';
import { CharacterJoinerService } from 'browser/services/CharacterJoinerService';
import { CoreBrowserService } from 'browser/services/CoreBrowserService';
import { LinkProviderService } from 'browser/services/LinkProviderService';
import { MouseCoordsService } from 'browser/services/MouseCoordsService';
import { MouseService } from 'browser/services/MouseService';
import { RenderService } from 'browser/services/RenderService';
import { SelectionService } from 'browser/services/SelectionService';
import { ICharSizeService, ICharacterJoinerService, ICoreBrowserService, IKeyboardService, ILinkProviderService, IMouseCoordsService, IMouseService, IRenderService, ISelectionService, IThemeService } from 'browser/services/Services';
import { ThemeService } from 'browser/services/ThemeService';
import { KeyboardService } from 'browser/services/KeyboardService';
import { channels, color, rgb } from 'common/Color';
import { CoreTerminal } from 'common/CoreTerminal';
import * as Browser from 'common/Platform';
import { ColorRequestType, IColorEvent, ITerminalOptions, KeyboardResultType, SpecialColorIndex } from 'common/Types';
import { DEFAULT_ATTR_DATA } from 'common/buffer/BufferLine';
import { IBuffer } from 'common/buffer/Types';
import { C0, C1ESCAPED } from 'common/data/EscapeSequences';
import { toRgbString } from 'common/input/XParseColor';
import { DecorationService } from 'common/services/DecorationService';
import { IDecorationService } from 'common/services/Services';
import { copyHandler, handlePasteEvent, moveTextAreaUnderMouseCursor, paste, rightClickHandler } from './Clipboard';
import * as Strings from './LocalizableStrings';
import { OscLinkProvider } from './OscLinkProvider';
import { CharacterJoinerHandler, CustomKeyEventHandler, CustomWheelEventHandler, IBrowser, IBufferRange, ICompositionHelper, ILinkifier2, ITerminal } from './Types';
import { Viewport } from './Viewport';
import { BufferDecorationRenderer } from './decorations/BufferDecorationRenderer';
import { OverviewRulerRenderer } from './decorations/OverviewRulerRenderer';
import { CompositionHelper } from './input/CompositionHelper';
import { DomRenderer } from './renderer/dom/DomRenderer';
import { IRenderer } from './renderer/shared/Types';
import { CharSizeService } from './services/CharSizeService';
import { CharacterJoinerService } from './services/CharacterJoinerService';
import { CoreBrowserService } from './services/CoreBrowserService';
import { LinkProviderService } from './services/LinkProviderService';
import { MouseCoordsService } from './services/MouseCoordsService';
import { MouseService } from './services/MouseService';
import { RenderService } from './services/RenderService';
import { SelectionService } from './services/SelectionService';
import { ICharSizeService, ICharacterJoinerService, ICoreBrowserService, IKeyboardService, ILinkProviderService, IMouseCoordsService, IMouseService, IRenderService, ISelectionService, IThemeService } from './services/Services';
import { ThemeService } from './services/ThemeService';
import { KeyboardService } from './services/KeyboardService';
import { channels, color, rgb } from '../common/Color';
import { CoreTerminal } from '../common/CoreTerminal';
import * as Browser from '../common/Platform';
import { ColorRequestType, IColorEvent, ITerminalOptions, KeyboardResultType, SpecialColorIndex } from '../common/Types';
import { DEFAULT_ATTR_DATA } from '../common/buffer/BufferLine';
import { IBuffer } from '../common/buffer/Types';
import { C0, C1ESCAPED } from '../common/data/EscapeSequences';
import { toRgbString } from '../common/input/XParseColor';
import { DecorationService } from '../common/services/DecorationService';
import { IDecorationService } from '../common/services/Services';
import { WindowsOptionsReportType } from '../common/InputHandler';
import { AccessibilityManager } from './AccessibilityManager';
import { Linkifier } from './Linkifier';
import { Emitter, EventUtils, type IEvent } from 'common/Event';
import { addDisposableListener } from 'browser/Dom';
import { MutableDisposable, toDisposable } from 'common/Lifecycle';
import { Emitter, EventUtils, type IEvent } from '../common/Event';
import { addDisposableListener } from './Dom';
import { MutableDisposable, toDisposable } from '../common/Lifecycle';
export class CoreBrowserTerminal extends CoreTerminal implements ITerminal {
public textarea: HTMLTextAreaElement | undefined;
+2 -2
View File
@@ -5,8 +5,8 @@
* Minimal DOM helpers for xterm.js browser code.
*/
import { IntervalTimer } from 'common/Async';
import { IDisposable } from 'common/Lifecycle';
import { IntervalTimer } from '../common/Async';
import { IDisposable } from '../common/Lifecycle';
export function getWindow(e: Node | UIEvent | undefined | null): Window {
const candidateNode = e as Node | undefined | null;
+4 -4
View File
@@ -4,11 +4,11 @@
*/
import { assert } from 'chai';
import { IBufferService } from 'common/services/Services';
import { IBufferService } from '../common/services/Services';
import { Linkifier } from './Linkifier';
import { MockBufferService } from 'common/TestUtils.test';
import { ILink } from 'browser/Types';
import { LinkProviderService } from 'browser/services/LinkProviderService';
import { MockBufferService } from '../common/TestUtils.test';
import { ILink } from './Types';
import { LinkProviderService } from './services/LinkProviderService';
import jsdom = require('jsdom');
class TestLinkifier2 extends Linkifier {
+6 -6
View File
@@ -3,13 +3,13 @@
* @license MIT
*/
import { IBufferCellPosition, ILink, ILinkDecorations, ILinkWithState, ILinkifier2, ILinkifierEvent } from 'browser/Types';
import { Disposable, dispose, toDisposable } from 'common/Lifecycle';
import { IDisposable } from 'common/Types';
import { IBufferService } from 'common/services/Services';
import { IBufferCellPosition, ILink, ILinkDecorations, ILinkWithState, ILinkifier2, ILinkifierEvent } from './Types';
import { Disposable, dispose, toDisposable } from '../common/Lifecycle';
import { IDisposable } from '../common/Types';
import { IBufferService } from '../common/services/Services';
import { ILinkProviderService, IMouseCoordsService, IRenderService } from './services/Services';
import { Emitter } from 'common/Event';
import { addDisposableListener } from 'browser/Dom';
import { Emitter } from '../common/Event';
import { addDisposableListener } from './Dom';
export class Linkifier extends Disposable implements ILinkifier2 {
public get currentLink(): ILinkWithState | undefined { return this._currentLink; }
+5 -5
View File
@@ -4,11 +4,11 @@
*/
import { assert } from 'chai';
import { OscLinkProvider } from 'browser/OscLinkProvider';
import { ILink } from 'browser/Types';
import { createCellData, MockBufferService, MockOptionsService } from 'common/TestUtils.test';
import { IBufferService, IOscLinkService } from 'common/services/Services';
import { IBufferLine, IOscLinkData } from 'common/Types';
import { OscLinkProvider } from './OscLinkProvider';
import { ILink } from './Types';
import { createCellData, MockBufferService, MockOptionsService } from '../common/TestUtils.test';
import { IBufferService, IOscLinkService } from '../common/services/Services';
import { IBufferLine, IOscLinkData } from '../common/Types';
class TestOscLinkService implements IOscLinkService {
public serviceBrand: any;

Some files were not shown because too many files have changed in this diff Show More