diff --git a/.eslintrc.json b/.eslintrc.json index 0ccafafbf4..9ba5012081 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -14,29 +14,29 @@ "test/api/tsconfig.json", "test/benchmark/tsconfig.json", "test/playwright/tsconfig.json", - "addons/xterm-addon-attach/src/tsconfig.json", - "addons/xterm-addon-attach/test/tsconfig.json", - "addons/xterm-addon-canvas/src/tsconfig.json", - "addons/xterm-addon-canvas/test/tsconfig.json", - "addons/xterm-addon-fit/src/tsconfig.json", - "addons/xterm-addon-fit/test/tsconfig.json", - "addons/xterm-addon-image/src/tsconfig.json", - "addons/xterm-addon-image/test/tsconfig.json", - "addons/xterm-addon-ligatures/src/tsconfig.json", - "addons/xterm-addon-search/src/tsconfig.json", - "addons/xterm-addon-search/test/tsconfig.json", - "addons/xterm-addon-serialize/src/tsconfig.json", - "addons/xterm-addon-serialize/test/tsconfig.json", - "addons/xterm-addon-serialize/benchmark/tsconfig.json", - "addons/xterm-addon-unicode11/src/tsconfig.json", - "addons/xterm-addon-unicode11/test/tsconfig.json", - "addons/xterm-addon-unicode-graphemes/src/tsconfig.json", - "addons/xterm-addon-unicode-graphemes/test/tsconfig.json", - "addons/xterm-addon-unicode-graphemes/benchmark/tsconfig.json", - "addons/xterm-addon-web-links/src/tsconfig.json", - "addons/xterm-addon-web-links/test/tsconfig.json", - "addons/xterm-addon-webgl/src/tsconfig.json", - "addons/xterm-addon-webgl/test/tsconfig.json" + "addons/addon-attach/src/tsconfig.json", + "addons/addon-attach/test/tsconfig.json", + "addons/addon-canvas/src/tsconfig.json", + "addons/addon-canvas/test/tsconfig.json", + "addons/addon-fit/src/tsconfig.json", + "addons/addon-fit/test/tsconfig.json", + "addons/addon-image/src/tsconfig.json", + "addons/addon-image/test/tsconfig.json", + "addons/addon-ligatures/src/tsconfig.json", + "addons/addon-search/src/tsconfig.json", + "addons/addon-search/test/tsconfig.json", + "addons/addon-serialize/src/tsconfig.json", + "addons/addon-serialize/test/tsconfig.json", + "addons/addon-serialize/benchmark/tsconfig.json", + "addons/addon-unicode11/src/tsconfig.json", + "addons/addon-unicode11/test/tsconfig.json", + "addons/addon-unicode-graphemes/src/tsconfig.json", + "addons/addon-unicode-graphemes/test/tsconfig.json", + "addons/addon-unicode-graphemes/benchmark/tsconfig.json", + "addons/addon-web-links/src/tsconfig.json", + "addons/addon-web-links/test/tsconfig.json", + "addons/addon-webgl/src/tsconfig.json", + "addons/addon-webgl/test/tsconfig.json" ], "sourceType": "module" }, diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eea525d063..0a64b6a7cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,28 +26,28 @@ jobs: zip -r compressed-build \ ./out/* \ ./out-test/* \ - ./addons/xterm-addon-attach/out/* \ - ./addons/xterm-addon-attach/out-test/* \ - ./addons/xterm-addon-canvas/out/* \ - ./addons/xterm-addon-canvas/out-test/* \ - ./addons/xterm-addon-fit/out/* \ - ./addons/xterm-addon-fit/out-test/* \ - ./addons/xterm-addon-image/out/* \ - ./addons/xterm-addon-image/out-test/* \ - ./addons/xterm-addon-ligatures/out/* \ - ./addons/xterm-addon-ligatures/out-test/* \ - ./addons/xterm-addon-search/out/* \ - ./addons/xterm-addon-search/out-test/* \ - ./addons/xterm-addon-serialize/out/* \ - ./addons/xterm-addon-serialize/out-test/* \ - ./addons/xterm-addon-unicode11/out/* \ - ./addons/xterm-addon-unicode11/out-test/* \ - ./addons/xterm-addon-unicode-graphemes/out/* \ - ./addons/xterm-addon-unicode-graphemes/out-test/* \ - ./addons/xterm-addon-web-links/out/* \ - ./addons/xterm-addon-web-links/out-test/* \ - ./addons/xterm-addon-webgl/out/* \ - ./addons/xterm-addon-webgl/out-test/* + ./addons/addon-attach/out/* \ + ./addons/addon-attach/out-test/* \ + ./addons/addon-canvas/out/* \ + ./addons/addon-canvas/out-test/* \ + ./addons/addon-fit/out/* \ + ./addons/addon-fit/out-test/* \ + ./addons/addon-image/out/* \ + ./addons/addon-image/out-test/* \ + ./addons/addon-ligatures/out/* \ + ./addons/addon-ligatures/out-test/* \ + ./addons/addon-search/out/* \ + ./addons/addon-search/out-test/* \ + ./addons/addon-serialize/out/* \ + ./addons/addon-serialize/out-test/* \ + ./addons/addon-unicode11/out/* \ + ./addons/addon-unicode11/out-test/* \ + ./addons/addon-unicode-graphemes/out/* \ + ./addons/addon-unicode-graphemes/out-test/* \ + ./addons/addon-web-links/out/* \ + ./addons/addon-web-links/out-test/* \ + ./addons/addon-webgl/out/* \ + ./addons/addon-webgl/out-test/* - name: Upload artifacts uses: actions/upload-artifact@v3 with: @@ -265,10 +265,10 @@ jobs: run: yarn build-demo - name: Integration tests (core) # Tests use 50% workers to reduce flakiness run: yarn test-playwright-${{ matrix.browser }} --workers=50% --forbid-only --suite=core - - name: Integration tests (xterm-addon-canvas) - run: yarn test-playwright-${{ matrix.browser }} --workers=50% --forbid-only --suite=xterm-addon-canvas - - name: Integration tests (xterm-addon-webgl) - run: yarn test-playwright-${{ matrix.browser }} --workers=50% --forbid-only --suite=xterm-addon-webgl + - name: Integration tests (addon-canvas) + run: yarn test-playwright-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-canvas + - name: Integration tests (addon-webgl) + run: yarn test-playwright-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-webgl test-api: needs: build @@ -306,3 +306,41 @@ jobs: ls -R - name: Integration tests (${{ matrix.browser }}) run: yarn test-api-${{ matrix.browser }} --headless --forbid-only + + release-dry-run: + needs: build + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18] + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }}.x + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }}.x + cache: 'yarn' + - name: Install dependencies + run: | + yarn --frozen-lockfile + yarn install-addons + - name: Install playwright + run: npx playwright install + - uses: actions/download-artifact@v3 + with: + name: build-artifacts + - name: Unzip artifacts + shell: bash + run: | + if [ "$RUNNER_OS" == "Windows" ]; then + pwsh -Command "7z x compressed-build.zip -aoa -o${{ github.workspace }}" + else + unzip -o compressed-build.zip + fi + ls -R + - name: Package headless + run: | + yarn package-headless + node ./bin/package_headless.js + - name: Publish to npm (dry run) + run: node ./bin/publish.js --dry diff --git a/README.md b/README.md index 0abcd32cf5..7514e76c4e 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ To start using xterm.js on your browser, add the `xterm.js` and `xterm.css` to t The recommended way to load xterm.js is via the ES6 module syntax: ```javascript -import { Terminal } from 'xterm'; +import { Terminal } from '@xterm/xterm'; ``` ### Addons @@ -59,14 +59,14 @@ import { Terminal } from 'xterm'; Addons are separate modules that extend the `Terminal` by building on the [xterm.js API](https://github.com/xtermjs/xterm.js/blob/master/typings/xterm.d.ts). To use an addon, you first need to install it in your project: ```bash -npm i -S xterm-addon-web-links +npm i -S @xterm/addon-web-links ``` Then import the addon, instantiate it and call `Terminal.loadAddon`: ```ts -import { Terminal } from 'xterm'; -import { WebLinksAddon } from 'xterm-addon-web-links'; +import { Terminal } from '@xterm/xterm'; +import { WebLinksAddon } from '@xterm/addon-web-links'; const terminal = new Terminal(); // Load WebLinksAddon on terminal, this is all that's needed to get web links @@ -76,10 +76,15 @@ terminal.loadAddon(new WebLinksAddon()); The xterm.js team maintains the following addons, but anyone can build them: -- [`xterm-addon-attach`](https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-attach): Attaches to a server running a process via a websocket -- [`xterm-addon-fit`](https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-fit): Fits the terminal to the containing element -- [`xterm-addon-search`](https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-search): Adds search functionality -- [`xterm-addon-web-links`](https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-web-links): Adds web link detection and interaction +- [`@xterm/addon-attach`](https://github.com/xtermjs/xterm.js/tree/master/addons/addon-attach): Attaches to a server running a process via a websocket +- [`@xterm/addon-canvas`](https://github.com/xtermjs/xterm.js/tree/master/addons/addon-canvas): Renders xterm.js using a `canvas` element's 2d context +- [`@xterm/addon-fit`](https://github.com/xtermjs/xterm.js/tree/master/addons/addon-fit): Fits the terminal to the containing element +- [`@xterm/addon-image`](https://github.com/xtermjs/xterm.js/tree/master/addons/addon-image): Adds image support +- [`@xterm/addon-search`](https://github.com/xtermjs/xterm.js/tree/master/addons/addon-search): Adds search functionality +- [`@xterm/addon-serialize`](https://github.com/xtermjs/xterm.js/tree/master/addons/addon-serialize): Serializes the terminal's buffer to a VT sequences or HTML +- [`@xterm/addon-unicode11`](https://github.com/xtermjs/xterm.js/tree/master/addons/addon-unicode11): Updates character widths to their unicode11 values +- [`@xterm/addon-web-links`](https://github.com/xtermjs/xterm.js/tree/master/addons/addon-web-links): Adds web link detection and interaction +- [`@xterm/addon-webgl`](https://github.com/xtermjs/xterm.js/tree/master/addons/addon-webgl): Renders xterm.js using a `canvas` element's webgl2 context ## Browser Support diff --git a/addons/xterm-addon-attach/.gitignore b/addons/addon-attach/.gitignore similarity index 100% rename from addons/xterm-addon-attach/.gitignore rename to addons/addon-attach/.gitignore diff --git a/addons/xterm-addon-attach/.npmignore b/addons/addon-attach/.npmignore similarity index 100% rename from addons/xterm-addon-attach/.npmignore rename to addons/addon-attach/.npmignore diff --git a/addons/xterm-addon-attach/LICENSE b/addons/addon-attach/LICENSE similarity index 100% rename from addons/xterm-addon-attach/LICENSE rename to addons/addon-attach/LICENSE diff --git a/addons/xterm-addon-attach/README.md b/addons/addon-attach/README.md similarity index 61% rename from addons/xterm-addon-attach/README.md rename to addons/addon-attach/README.md index 67ebf17b0e..fa123fe288 100644 --- a/addons/xterm-addon-attach/README.md +++ b/addons/addon-attach/README.md @@ -1,22 +1,22 @@ -## xterm-addon-attach +## @xterm/addon-attach An addon for [xterm.js](https://github.com/xtermjs/xterm.js) that enables attaching to a web socket. This addon requires xterm.js v4+. ### Install ```bash -npm install --save xterm-addon-attach +npm install --save @xterm/addon-attach ``` ### Usage ```ts -import { Terminal } from 'xterm'; -import { AttachAddon } from 'xterm-addon-attach'; +import { Terminal } from '@xterm/xterm'; +import { AttachAddon } from '@xterm/addon-attach'; const terminal = new Terminal(); const attachAddon = new AttachAddon(webSocket); terminal.loadAddon(attachAddon); ``` -See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/xterm-addon-attach/typings/xterm-addon-attach.d.ts) for more advanced usage. +See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/addon-attach/typings/addon-attach.d.ts) for more advanced usage. diff --git a/addons/xterm-addon-attach/package.json b/addons/addon-attach/package.json similarity index 77% rename from addons/xterm-addon-attach/package.json rename to addons/addon-attach/package.json index be92fc66ea..8e5a413e5e 100644 --- a/addons/xterm-addon-attach/package.json +++ b/addons/addon-attach/package.json @@ -1,13 +1,13 @@ { - "name": "xterm-addon-attach", + "name": "@xterm/addon-attach", "version": "0.9.0", "author": { "name": "The xterm.js authors", "url": "https://xtermjs.org/" }, - "main": "lib/xterm-addon-attach.js", - "types": "typings/xterm-addon-attach.d.ts", - "repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-attach", + "main": "lib/addon-attach.js", + "types": "typings/addon-attach.d.ts", + "repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/addon-attach", "license": "MIT", "keywords": [ "terminal", diff --git a/addons/xterm-addon-attach/src/AttachAddon.ts b/addons/addon-attach/src/AttachAddon.ts similarity index 97% rename from addons/xterm-addon-attach/src/AttachAddon.ts rename to addons/addon-attach/src/AttachAddon.ts index 7fd8df29ab..756e03d9d4 100644 --- a/addons/xterm-addon-attach/src/AttachAddon.ts +++ b/addons/addon-attach/src/AttachAddon.ts @@ -5,7 +5,7 @@ * Implements the attach method, that attaches the terminal to a WebSocket stream. */ -import { Terminal, IDisposable, ITerminalAddon } from 'xterm'; +import { Terminal, IDisposable, ITerminalAddon } from '@xterm/xterm'; interface IAttachOptions { bidirectional?: boolean; diff --git a/addons/xterm-addon-attach/src/tsconfig.json b/addons/addon-attach/src/tsconfig.json similarity index 100% rename from addons/xterm-addon-attach/src/tsconfig.json rename to addons/addon-attach/src/tsconfig.json diff --git a/addons/xterm-addon-attach/test/AttachAddon.api.ts b/addons/addon-attach/test/AttachAddon.api.ts similarity index 100% rename from addons/xterm-addon-attach/test/AttachAddon.api.ts rename to addons/addon-attach/test/AttachAddon.api.ts diff --git a/addons/xterm-addon-attach/test/tsconfig.json b/addons/addon-attach/test/tsconfig.json similarity index 100% rename from addons/xterm-addon-attach/test/tsconfig.json rename to addons/addon-attach/test/tsconfig.json diff --git a/addons/xterm-addon-attach/tsconfig.json b/addons/addon-attach/tsconfig.json similarity index 100% rename from addons/xterm-addon-attach/tsconfig.json rename to addons/addon-attach/tsconfig.json diff --git a/addons/xterm-addon-attach/typings/xterm-addon-attach.d.ts b/addons/addon-attach/typings/addon-attach.d.ts similarity index 82% rename from addons/xterm-addon-attach/typings/xterm-addon-attach.d.ts rename to addons/addon-attach/typings/addon-attach.d.ts index 2956b9d906..4e1b2fc3ba 100644 --- a/addons/xterm-addon-attach/typings/xterm-addon-attach.d.ts +++ b/addons/addon-attach/typings/addon-attach.d.ts @@ -3,9 +3,9 @@ * @license MIT */ -import { Terminal, ITerminalAddon } from 'xterm'; +import { Terminal, ITerminalAddon } from '@xterm/xterm'; -declare module 'xterm-addon-attach' { +declare module '@xterm/addon-attach' { export interface IAttachOptions { /** * Whether input should be written to the backend. Defaults to `true`. diff --git a/addons/xterm-addon-attach/webpack.config.js b/addons/addon-attach/webpack.config.js similarity index 92% rename from addons/xterm-addon-attach/webpack.config.js rename to addons/addon-attach/webpack.config.js index 65996f19cf..599bb14204 100644 --- a/addons/xterm-addon-attach/webpack.config.js +++ b/addons/addon-attach/webpack.config.js @@ -6,7 +6,7 @@ const path = require('path'); const addonName = 'AttachAddon'; -const mainFile = 'xterm-addon-attach.js'; +const mainFile = 'addon-attach.js'; module.exports = { entry: `./out/${addonName}.js`, diff --git a/addons/xterm-addon-canvas/.gitignore b/addons/addon-canvas/.gitignore similarity index 100% rename from addons/xterm-addon-canvas/.gitignore rename to addons/addon-canvas/.gitignore diff --git a/addons/xterm-addon-canvas/.npmignore b/addons/addon-canvas/.npmignore similarity index 100% rename from addons/xterm-addon-canvas/.npmignore rename to addons/addon-canvas/.npmignore diff --git a/addons/xterm-addon-canvas/LICENSE b/addons/addon-canvas/LICENSE similarity index 100% rename from addons/xterm-addon-canvas/LICENSE rename to addons/addon-canvas/LICENSE diff --git a/addons/addon-canvas/README.md b/addons/addon-canvas/README.md new file mode 100644 index 0000000000..502ade258e --- /dev/null +++ b/addons/addon-canvas/README.md @@ -0,0 +1,28 @@ +## @xterm/addon-canvas + +An addon for [xterm.js](https://github.com/xtermjs/xterm.js) that enables a canvas-based renderer using a 2d context to draw. This addon requires xterm.js v5+. + +The purpose of this addon is to be used as a fallback for the [webgl addon](https://www.npmjs.com/package/@xterm/addon-webgl) when better performance is desired over the default DOM renderer, but WebGL2 isn't supported or performant for some reason. + +### Install + +```bash +npm install --save @xterm/addon-canvas +``` + +### Usage + +```ts +import { Terminal } from '@xterm/xterm'; +import { CanvasAddon } from '@xterm/addon-canvas'; + +const terminal = new Terminal(); +terminal.open(element); +terminal.loadAddon(new CanvasAddon()); +``` + +See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/addon-canvas/typings/addon-canvas.d.ts) for more advanced usage. + +### See also + +- [@xterm/addon-webgl](https://www.npmjs.com/package/@xterm/addon-webgl) A renderer for xterm.js that uses WebGL diff --git a/addons/xterm-addon-canvas/package.json b/addons/addon-canvas/package.json similarity index 80% rename from addons/xterm-addon-canvas/package.json rename to addons/addon-canvas/package.json index eefdf3751d..a614c28116 100644 --- a/addons/xterm-addon-canvas/package.json +++ b/addons/addon-canvas/package.json @@ -1,13 +1,13 @@ { - "name": "xterm-addon-canvas", + "name": "@xterm/addon-canvas", "version": "0.5.0", "author": { "name": "The xterm.js authors", "url": "https://xtermjs.org/" }, - "main": "lib/xterm-addon-canvas.js", - "types": "typings/xterm-addon-canvas.d.ts", - "repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-canvas", + "main": "lib/addon-canvas.js", + "types": "typings/addon-canvas.d.ts", + "repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/addon-canvas", "license": "MIT", "keywords": [ "terminal", diff --git a/addons/xterm-addon-canvas/src/BaseRenderLayer.ts b/addons/addon-canvas/src/BaseRenderLayer.ts similarity index 99% rename from addons/xterm-addon-canvas/src/BaseRenderLayer.ts rename to addons/addon-canvas/src/BaseRenderLayer.ts index 62fe71a744..0e85901a50 100644 --- a/addons/xterm-addon-canvas/src/BaseRenderLayer.ts +++ b/addons/addon-canvas/src/BaseRenderLayer.ts @@ -19,7 +19,7 @@ import { ICellData } from 'common/Types'; import { CellData } from 'common/buffer/CellData'; import { WHITESPACE_CELL_CODE } from 'common/buffer/Constants'; import { IBufferService, IDecorationService, IOptionsService } from 'common/services/Services'; -import { Terminal } from 'xterm'; +import { Terminal } from '@xterm/xterm'; import { IRenderLayer } from './Types'; export abstract class BaseRenderLayer extends Disposable implements IRenderLayer { diff --git a/addons/xterm-addon-canvas/src/CanvasAddon.ts b/addons/addon-canvas/src/CanvasAddon.ts similarity index 98% rename from addons/xterm-addon-canvas/src/CanvasAddon.ts rename to addons/addon-canvas/src/CanvasAddon.ts index 91438a4c87..6cfa2d46d1 100644 --- a/addons/xterm-addon-canvas/src/CanvasAddon.ts +++ b/addons/addon-canvas/src/CanvasAddon.ts @@ -9,7 +9,7 @@ import { EventEmitter, forwardEvent } from 'common/EventEmitter'; import { Disposable, toDisposable } from 'common/Lifecycle'; import { setTraceLogger } from 'common/services/LogService'; import { IBufferService, IDecorationService, ILogService } from 'common/services/Services'; -import { ITerminalAddon, Terminal } from 'xterm'; +import { ITerminalAddon, Terminal } from '@xterm/xterm'; import { CanvasRenderer } from './CanvasRenderer'; export class CanvasAddon extends Disposable implements ITerminalAddon { diff --git a/addons/xterm-addon-canvas/src/CanvasRenderer.ts b/addons/addon-canvas/src/CanvasRenderer.ts similarity index 99% rename from addons/xterm-addon-canvas/src/CanvasRenderer.ts rename to addons/addon-canvas/src/CanvasRenderer.ts index cd05f92169..40b89546fc 100644 --- a/addons/xterm-addon-canvas/src/CanvasRenderer.ts +++ b/addons/addon-canvas/src/CanvasRenderer.ts @@ -12,7 +12,7 @@ import { ICharSizeService, ICharacterJoinerService, ICoreBrowserService, IThemeS import { EventEmitter, forwardEvent } from 'common/EventEmitter'; import { Disposable, toDisposable } from 'common/Lifecycle'; import { IBufferService, ICoreService, IDecorationService, IOptionsService } from 'common/services/Services'; -import { Terminal } from 'xterm'; +import { Terminal } from '@xterm/xterm'; import { CursorRenderLayer } from './CursorRenderLayer'; import { LinkRenderLayer } from './LinkRenderLayer'; import { SelectionRenderLayer } from './SelectionRenderLayer'; diff --git a/addons/xterm-addon-canvas/src/CursorRenderLayer.ts b/addons/addon-canvas/src/CursorRenderLayer.ts similarity index 99% rename from addons/xterm-addon-canvas/src/CursorRenderLayer.ts rename to addons/addon-canvas/src/CursorRenderLayer.ts index c5174f8659..adc1db189f 100644 --- a/addons/xterm-addon-canvas/src/CursorRenderLayer.ts +++ b/addons/addon-canvas/src/CursorRenderLayer.ts @@ -12,7 +12,7 @@ import { isFirefox } from 'common/Platform'; import { ICellData } from 'common/Types'; import { CellData } from 'common/buffer/CellData'; import { IBufferService, ICoreService, IDecorationService, IOptionsService } from 'common/services/Services'; -import { Terminal } from 'xterm'; +import { Terminal } from '@xterm/xterm'; import { BaseRenderLayer } from './BaseRenderLayer'; interface ICursorState { diff --git a/addons/xterm-addon-canvas/src/GridCache.test.ts b/addons/addon-canvas/src/GridCache.test.ts similarity index 100% rename from addons/xterm-addon-canvas/src/GridCache.test.ts rename to addons/addon-canvas/src/GridCache.test.ts diff --git a/addons/xterm-addon-canvas/src/GridCache.ts b/addons/addon-canvas/src/GridCache.ts similarity index 100% rename from addons/xterm-addon-canvas/src/GridCache.ts rename to addons/addon-canvas/src/GridCache.ts diff --git a/addons/xterm-addon-canvas/src/LinkRenderLayer.ts b/addons/addon-canvas/src/LinkRenderLayer.ts similarity index 98% rename from addons/xterm-addon-canvas/src/LinkRenderLayer.ts rename to addons/addon-canvas/src/LinkRenderLayer.ts index 882f7d8c2e..1cdf71c2fc 100644 --- a/addons/xterm-addon-canvas/src/LinkRenderLayer.ts +++ b/addons/addon-canvas/src/LinkRenderLayer.ts @@ -9,7 +9,7 @@ import { INVERTED_DEFAULT_COLOR } from 'browser/renderer/shared/Constants'; import { IRenderDimensions } from 'browser/renderer/shared/Types'; import { ICoreBrowserService, IThemeService } from 'browser/services/Services'; import { IBufferService, IDecorationService, IOptionsService } from 'common/services/Services'; -import { Terminal } from 'xterm'; +import { Terminal } from '@xterm/xterm'; import { BaseRenderLayer } from './BaseRenderLayer'; export class LinkRenderLayer extends BaseRenderLayer { diff --git a/addons/xterm-addon-canvas/src/SelectionRenderLayer.ts b/addons/addon-canvas/src/SelectionRenderLayer.ts similarity index 99% rename from addons/xterm-addon-canvas/src/SelectionRenderLayer.ts rename to addons/addon-canvas/src/SelectionRenderLayer.ts index 10950868fb..01612a1d29 100644 --- a/addons/xterm-addon-canvas/src/SelectionRenderLayer.ts +++ b/addons/addon-canvas/src/SelectionRenderLayer.ts @@ -7,7 +7,7 @@ import { IRenderDimensions } from 'browser/renderer/shared/Types'; import { BaseRenderLayer } from './BaseRenderLayer'; import { IBufferService, IDecorationService, IOptionsService } from 'common/services/Services'; import { ICoreBrowserService, IThemeService } from 'browser/services/Services'; -import { Terminal } from 'xterm'; +import { Terminal } from '@xterm/xterm'; interface ISelectionState { start?: [number, number]; diff --git a/addons/xterm-addon-canvas/src/TextRenderLayer.ts b/addons/addon-canvas/src/TextRenderLayer.ts similarity index 99% rename from addons/xterm-addon-canvas/src/TextRenderLayer.ts rename to addons/addon-canvas/src/TextRenderLayer.ts index 46d052f30b..43c33d64ae 100644 --- a/addons/xterm-addon-canvas/src/TextRenderLayer.ts +++ b/addons/addon-canvas/src/TextRenderLayer.ts @@ -11,7 +11,7 @@ import { AttributeData } from 'common/buffer/AttributeData'; import { CellData } from 'common/buffer/CellData'; import { Content, NULL_CELL_CODE } from 'common/buffer/Constants'; import { IBufferService, IDecorationService, IOptionsService } from 'common/services/Services'; -import { Terminal } from 'xterm'; +import { Terminal } from '@xterm/xterm'; import { BaseRenderLayer } from './BaseRenderLayer'; import { GridCache } from './GridCache'; diff --git a/addons/xterm-addon-canvas/src/Types.d.ts b/addons/addon-canvas/src/Types.d.ts similarity index 100% rename from addons/xterm-addon-canvas/src/Types.d.ts rename to addons/addon-canvas/src/Types.d.ts diff --git a/addons/xterm-addon-canvas/src/tsconfig.json b/addons/addon-canvas/src/tsconfig.json similarity index 100% rename from addons/xterm-addon-canvas/src/tsconfig.json rename to addons/addon-canvas/src/tsconfig.json diff --git a/addons/xterm-addon-canvas/test/CanvasRenderer.test.ts b/addons/addon-canvas/test/CanvasRenderer.test.ts similarity index 100% rename from addons/xterm-addon-canvas/test/CanvasRenderer.test.ts rename to addons/addon-canvas/test/CanvasRenderer.test.ts diff --git a/addons/xterm-addon-canvas/test/playwright.config.ts b/addons/addon-canvas/test/playwright.config.ts similarity index 100% rename from addons/xterm-addon-canvas/test/playwright.config.ts rename to addons/addon-canvas/test/playwright.config.ts diff --git a/addons/xterm-addon-canvas/test/tsconfig.json b/addons/addon-canvas/test/tsconfig.json similarity index 100% rename from addons/xterm-addon-canvas/test/tsconfig.json rename to addons/addon-canvas/test/tsconfig.json diff --git a/addons/xterm-addon-canvas/tsconfig.json b/addons/addon-canvas/tsconfig.json similarity index 100% rename from addons/xterm-addon-canvas/tsconfig.json rename to addons/addon-canvas/tsconfig.json diff --git a/addons/xterm-addon-canvas/typings/xterm-addon-canvas.d.ts b/addons/addon-canvas/typings/addon-canvas.d.ts similarity index 90% rename from addons/xterm-addon-canvas/typings/xterm-addon-canvas.d.ts rename to addons/addon-canvas/typings/addon-canvas.d.ts index c983825c27..a679f0a5ca 100644 --- a/addons/xterm-addon-canvas/typings/xterm-addon-canvas.d.ts +++ b/addons/addon-canvas/typings/addon-canvas.d.ts @@ -3,9 +3,9 @@ * @license MIT */ -import { Terminal, ITerminalAddon, IEvent } from 'xterm'; +import { Terminal, ITerminalAddon, IEvent } from '@xterm/xterm'; -declare module 'xterm-addon-canvas' { +declare module '@xterm/addon-canvas' { /** * An xterm.js addon that provides search functionality. */ diff --git a/addons/xterm-addon-canvas/webpack.config.js b/addons/addon-canvas/webpack.config.js similarity index 94% rename from addons/xterm-addon-canvas/webpack.config.js rename to addons/addon-canvas/webpack.config.js index 9c98760a1e..9daa08f9b2 100644 --- a/addons/xterm-addon-canvas/webpack.config.js +++ b/addons/addon-canvas/webpack.config.js @@ -6,7 +6,7 @@ const path = require('path'); const addonName = 'CanvasAddon'; -const mainFile = 'xterm-addon-canvas.js'; +const mainFile = 'addon-canvas.js'; module.exports = { entry: `./out/${addonName}.js`, diff --git a/addons/xterm-addon-fit/.gitignore b/addons/addon-fit/.gitignore similarity index 100% rename from addons/xterm-addon-fit/.gitignore rename to addons/addon-fit/.gitignore diff --git a/addons/xterm-addon-fit/.npmignore b/addons/addon-fit/.npmignore similarity index 100% rename from addons/xterm-addon-fit/.npmignore rename to addons/addon-fit/.npmignore diff --git a/addons/xterm-addon-fit/LICENSE b/addons/addon-fit/LICENSE similarity index 100% rename from addons/xterm-addon-fit/LICENSE rename to addons/addon-fit/LICENSE diff --git a/addons/xterm-addon-fit/README.md b/addons/addon-fit/README.md similarity index 66% rename from addons/xterm-addon-fit/README.md rename to addons/addon-fit/README.md index 321b2cf709..076e512716 100644 --- a/addons/xterm-addon-fit/README.md +++ b/addons/addon-fit/README.md @@ -1,18 +1,18 @@ -## xterm-addon-fit +## @xterm/addon-fit An addon for [xterm.js](https://github.com/xtermjs/xterm.js) that enables fitting the terminal's dimensions to a containing element. This addon requires xterm.js v4+. ### Install ```bash -npm install --save xterm-addon-fit +npm install --save @xterm/addon-fit ``` ### Usage ```ts -import { Terminal } from 'xterm'; -import { FitAddon } from 'xterm-addon-fit'; +import { Terminal } from '@xterm/xterm'; +import { FitAddon } from '@xterm/addon-fit'; const terminal = new Terminal(); const fitAddon = new FitAddon(); @@ -21,4 +21,4 @@ terminal.open(containerElement); fitAddon.fit(); ``` -See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/xterm-addon-fit/typings/xterm-addon-fit.d.ts) for more advanced usage. +See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/addon-fit/typings/addon-fit.d.ts) for more advanced usage. diff --git a/addons/xterm-addon-fit/package.json b/addons/addon-fit/package.json similarity index 79% rename from addons/xterm-addon-fit/package.json rename to addons/addon-fit/package.json index b2652aaeaf..046ef4d874 100644 --- a/addons/xterm-addon-fit/package.json +++ b/addons/addon-fit/package.json @@ -1,13 +1,13 @@ { - "name": "xterm-addon-fit", + "name": "@xterm/addon-fit", "version": "0.8.0", "author": { "name": "The xterm.js authors", "url": "https://xtermjs.org/" }, - "main": "lib/xterm-addon-fit.js", - "types": "typings/xterm-addon-fit.d.ts", - "repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-fit", + "main": "lib/addon-fit.js", + "types": "typings/addon-fit.d.ts", + "repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/addon-fit", "license": "MIT", "keywords": [ "terminal", diff --git a/addons/xterm-addon-fit/src/FitAddon.ts b/addons/addon-fit/src/FitAddon.ts similarity index 98% rename from addons/xterm-addon-fit/src/FitAddon.ts rename to addons/addon-fit/src/FitAddon.ts index f724546218..c634ea8f19 100644 --- a/addons/xterm-addon-fit/src/FitAddon.ts +++ b/addons/addon-fit/src/FitAddon.ts @@ -3,7 +3,7 @@ * @license MIT */ -import { Terminal, ITerminalAddon } from 'xterm'; +import { Terminal, ITerminalAddon } from '@xterm/xterm'; import { IRenderDimensions } from 'browser/renderer/shared/Types'; interface ITerminalDimensions { diff --git a/addons/xterm-addon-fit/src/tsconfig.json b/addons/addon-fit/src/tsconfig.json similarity index 100% rename from addons/xterm-addon-fit/src/tsconfig.json rename to addons/addon-fit/src/tsconfig.json diff --git a/addons/xterm-addon-fit/test/FitAddon.api.ts b/addons/addon-fit/test/FitAddon.api.ts similarity index 100% rename from addons/xterm-addon-fit/test/FitAddon.api.ts rename to addons/addon-fit/test/FitAddon.api.ts diff --git a/addons/xterm-addon-fit/test/tsconfig.json b/addons/addon-fit/test/tsconfig.json similarity index 100% rename from addons/xterm-addon-fit/test/tsconfig.json rename to addons/addon-fit/test/tsconfig.json diff --git a/addons/xterm-addon-fit/tsconfig.json b/addons/addon-fit/tsconfig.json similarity index 100% rename from addons/xterm-addon-fit/tsconfig.json rename to addons/addon-fit/tsconfig.json diff --git a/addons/xterm-addon-fit/typings/xterm-addon-fit.d.ts b/addons/addon-fit/typings/addon-fit.d.ts similarity index 92% rename from addons/xterm-addon-fit/typings/xterm-addon-fit.d.ts rename to addons/addon-fit/typings/addon-fit.d.ts index 2d1b8f1df6..e3d20e29f5 100644 --- a/addons/xterm-addon-fit/typings/xterm-addon-fit.d.ts +++ b/addons/addon-fit/typings/addon-fit.d.ts @@ -3,9 +3,9 @@ * @license MIT */ -import { Terminal, ITerminalAddon } from 'xterm'; +import { Terminal, ITerminalAddon } from '@xterm/xterm'; -declare module 'xterm-addon-fit' { +declare module '@xterm/addon-fit' { /** * An xterm.js addon that enables resizing the terminal to the dimensions of * its containing element. diff --git a/addons/xterm-addon-fit/webpack.config.js b/addons/addon-fit/webpack.config.js similarity index 93% rename from addons/xterm-addon-fit/webpack.config.js rename to addons/addon-fit/webpack.config.js index 4b5421504d..e220668c74 100644 --- a/addons/xterm-addon-fit/webpack.config.js +++ b/addons/addon-fit/webpack.config.js @@ -6,7 +6,7 @@ const path = require('path'); const addonName = 'FitAddon'; -const mainFile = 'xterm-addon-fit.js'; +const mainFile = 'addon-fit.js'; module.exports = { entry: `./out/${addonName}.js`, diff --git a/addons/xterm-addon-image/.gitignore b/addons/addon-image/.gitignore similarity index 100% rename from addons/xterm-addon-image/.gitignore rename to addons/addon-image/.gitignore diff --git a/addons/xterm-addon-image/.npmignore b/addons/addon-image/.npmignore similarity index 100% rename from addons/xterm-addon-image/.npmignore rename to addons/addon-image/.npmignore diff --git a/addons/xterm-addon-image/LICENSE b/addons/addon-image/LICENSE similarity index 100% rename from addons/xterm-addon-image/LICENSE rename to addons/addon-image/LICENSE diff --git a/addons/xterm-addon-image/README.md b/addons/addon-image/README.md similarity index 98% rename from addons/xterm-addon-image/README.md rename to addons/addon-image/README.md index 686df9b48e..9fd327e380 100644 --- a/addons/xterm-addon-image/README.md +++ b/addons/addon-image/README.md @@ -1,4 +1,4 @@ -## xterm-addon-image +## @xterm/addon-image Inline image output in xterm.js. Supports SIXEL and iTerm's inline image protocol (IIP). @@ -9,15 +9,15 @@ Inline image output in xterm.js. Supports SIXEL and iTerm's inline image protoco ### Install from npm ```bash -npm install --save xterm-addon-image +npm install --save @xterm/addon-image ``` ### Usage ```ts -import { Terminal } from 'xterm'; -import { ImageAddon, IImageAddonOptions } from 'xterm-addon-image'; +import { Terminal } from '@xterm/xterm'; +import { ImageAddon, IImageAddonOptions } from '@xterm/addon-image'; // customize as needed (showing addon defaults) const customSettings: IImageAddonOptions = { @@ -227,5 +227,5 @@ _How can I adjust the memory usage?_ - 0.1.2 bugfix: reset clear flag - 0.1.1 bugfixes: - clear sticky image tiles on render - - create xterm-addon-image folder from bootstrap.sh + - create folder from bootstrap.sh - fix peer dependency in package.json diff --git a/addons/xterm-addon-image/fixture/endless.sh b/addons/addon-image/fixture/endless.sh old mode 100755 new mode 100644 similarity index 100% rename from addons/xterm-addon-image/fixture/endless.sh rename to addons/addon-image/fixture/endless.sh diff --git a/addons/xterm-addon-image/fixture/example.png b/addons/addon-image/fixture/example.png similarity index 100% rename from addons/xterm-addon-image/fixture/example.png rename to addons/addon-image/fixture/example.png diff --git a/addons/xterm-addon-image/fixture/gcrglf.sh b/addons/addon-image/fixture/gcrglf.sh old mode 100755 new mode 100644 similarity index 100% rename from addons/xterm-addon-image/fixture/gcrglf.sh rename to addons/addon-image/fixture/gcrglf.sh diff --git a/addons/xterm-addon-image/fixture/growing_rect.js b/addons/addon-image/fixture/growing_rect.js similarity index 100% rename from addons/xterm-addon-image/fixture/growing_rect.js rename to addons/addon-image/fixture/growing_rect.js diff --git a/addons/xterm-addon-image/fixture/iip/palette.iip b/addons/addon-image/fixture/iip/palette.iip similarity index 100% rename from addons/xterm-addon-image/fixture/iip/palette.iip rename to addons/addon-image/fixture/iip/palette.iip diff --git a/addons/xterm-addon-image/fixture/iip/spinfox.iip b/addons/addon-image/fixture/iip/spinfox.iip similarity index 100% rename from addons/xterm-addon-image/fixture/iip/spinfox.iip rename to addons/addon-image/fixture/iip/spinfox.iip diff --git a/addons/xterm-addon-image/fixture/iip/w3c_gif.iip b/addons/addon-image/fixture/iip/w3c_gif.iip similarity index 100% rename from addons/xterm-addon-image/fixture/iip/w3c_gif.iip rename to addons/addon-image/fixture/iip/w3c_gif.iip diff --git a/addons/xterm-addon-image/fixture/iip/w3c_jpg.iip b/addons/addon-image/fixture/iip/w3c_jpg.iip similarity index 100% rename from addons/xterm-addon-image/fixture/iip/w3c_jpg.iip rename to addons/addon-image/fixture/iip/w3c_jpg.iip diff --git a/addons/xterm-addon-image/fixture/iip/w3c_png.iip b/addons/addon-image/fixture/iip/w3c_png.iip similarity index 100% rename from addons/xterm-addon-image/fixture/iip/w3c_png.iip rename to addons/addon-image/fixture/iip/w3c_png.iip diff --git a/addons/xterm-addon-image/fixture/inspect_palette.sh b/addons/addon-image/fixture/inspect_palette.sh old mode 100755 new mode 100644 similarity index 100% rename from addons/xterm-addon-image/fixture/inspect_palette.sh rename to addons/addon-image/fixture/inspect_palette.sh diff --git a/addons/xterm-addon-image/fixture/overdraw.sh b/addons/addon-image/fixture/overdraw.sh old mode 100755 new mode 100644 similarity index 100% rename from addons/xterm-addon-image/fixture/overdraw.sh rename to addons/addon-image/fixture/overdraw.sh diff --git a/addons/xterm-addon-image/fixture/palette.blob b/addons/addon-image/fixture/palette.blob similarity index 100% rename from addons/xterm-addon-image/fixture/palette.blob rename to addons/addon-image/fixture/palette.blob diff --git a/addons/xterm-addon-image/fixture/palette.png b/addons/addon-image/fixture/palette.png similarity index 100% rename from addons/xterm-addon-image/fixture/palette.png rename to addons/addon-image/fixture/palette.png diff --git a/addons/xterm-addon-image/fixture/palette.sixel b/addons/addon-image/fixture/palette.sixel similarity index 100% rename from addons/xterm-addon-image/fixture/palette.sixel rename to addons/addon-image/fixture/palette.sixel diff --git a/addons/xterm-addon-image/fixture/testimages/agfa-makernotes.jpg b/addons/addon-image/fixture/testimages/agfa-makernotes.jpg similarity index 100% rename from addons/xterm-addon-image/fixture/testimages/agfa-makernotes.jpg rename to addons/addon-image/fixture/testimages/agfa-makernotes.jpg diff --git a/addons/xterm-addon-image/fixture/testimages/iphone_hdr_YES.jpg b/addons/addon-image/fixture/testimages/iphone_hdr_YES.jpg similarity index 100% rename from addons/xterm-addon-image/fixture/testimages/iphone_hdr_YES.jpg rename to addons/addon-image/fixture/testimages/iphone_hdr_YES.jpg diff --git a/addons/xterm-addon-image/fixture/testimages/nikon-e950.jpg b/addons/addon-image/fixture/testimages/nikon-e950.jpg similarity index 100% rename from addons/xterm-addon-image/fixture/testimages/nikon-e950.jpg rename to addons/addon-image/fixture/testimages/nikon-e950.jpg diff --git a/addons/xterm-addon-image/fixture/testimages/sony-alpha-6000.jpg b/addons/addon-image/fixture/testimages/sony-alpha-6000.jpg similarity index 100% rename from addons/xterm-addon-image/fixture/testimages/sony-alpha-6000.jpg rename to addons/addon-image/fixture/testimages/sony-alpha-6000.jpg diff --git a/addons/xterm-addon-image/fixture/testimages/spinfox.png b/addons/addon-image/fixture/testimages/spinfox.png similarity index 100% rename from addons/xterm-addon-image/fixture/testimages/spinfox.png rename to addons/addon-image/fixture/testimages/spinfox.png diff --git a/addons/xterm-addon-image/fixture/testimages/w3c_home.gif b/addons/addon-image/fixture/testimages/w3c_home.gif similarity index 100% rename from addons/xterm-addon-image/fixture/testimages/w3c_home.gif rename to addons/addon-image/fixture/testimages/w3c_home.gif diff --git a/addons/xterm-addon-image/fixture/testimages/w3c_home.jpg b/addons/addon-image/fixture/testimages/w3c_home.jpg similarity index 100% rename from addons/xterm-addon-image/fixture/testimages/w3c_home.jpg rename to addons/addon-image/fixture/testimages/w3c_home.jpg diff --git a/addons/xterm-addon-image/fixture/testimages/w3c_home.png b/addons/addon-image/fixture/testimages/w3c_home.png similarity index 100% rename from addons/xterm-addon-image/fixture/testimages/w3c_home.png rename to addons/addon-image/fixture/testimages/w3c_home.png diff --git a/addons/xterm-addon-image/fixture/testimages/w3c_home_2.gif b/addons/addon-image/fixture/testimages/w3c_home_2.gif similarity index 100% rename from addons/xterm-addon-image/fixture/testimages/w3c_home_2.gif rename to addons/addon-image/fixture/testimages/w3c_home_2.gif diff --git a/addons/xterm-addon-image/fixture/testimages/w3c_home_2.jpg b/addons/addon-image/fixture/testimages/w3c_home_2.jpg similarity index 100% rename from addons/xterm-addon-image/fixture/testimages/w3c_home_2.jpg rename to addons/addon-image/fixture/testimages/w3c_home_2.jpg diff --git a/addons/xterm-addon-image/fixture/testimages/w3c_home_2.png b/addons/addon-image/fixture/testimages/w3c_home_2.png similarity index 100% rename from addons/xterm-addon-image/fixture/testimages/w3c_home_2.png rename to addons/addon-image/fixture/testimages/w3c_home_2.png diff --git a/addons/xterm-addon-image/fixture/testimages/w3c_home_256.gif b/addons/addon-image/fixture/testimages/w3c_home_256.gif similarity index 100% rename from addons/xterm-addon-image/fixture/testimages/w3c_home_256.gif rename to addons/addon-image/fixture/testimages/w3c_home_256.gif diff --git a/addons/xterm-addon-image/fixture/testimages/w3c_home_256.jpg b/addons/addon-image/fixture/testimages/w3c_home_256.jpg similarity index 100% rename from addons/xterm-addon-image/fixture/testimages/w3c_home_256.jpg rename to addons/addon-image/fixture/testimages/w3c_home_256.jpg diff --git a/addons/xterm-addon-image/fixture/testimages/w3c_home_256.png b/addons/addon-image/fixture/testimages/w3c_home_256.png similarity index 100% rename from addons/xterm-addon-image/fixture/testimages/w3c_home_256.png rename to addons/addon-image/fixture/testimages/w3c_home_256.png diff --git a/addons/xterm-addon-image/fixture/testimages/w3c_home_animation.gif b/addons/addon-image/fixture/testimages/w3c_home_animation.gif similarity index 100% rename from addons/xterm-addon-image/fixture/testimages/w3c_home_animation.gif rename to addons/addon-image/fixture/testimages/w3c_home_animation.gif diff --git a/addons/xterm-addon-image/fixture/testimages/w3c_home_gray.gif b/addons/addon-image/fixture/testimages/w3c_home_gray.gif similarity index 100% rename from addons/xterm-addon-image/fixture/testimages/w3c_home_gray.gif rename to addons/addon-image/fixture/testimages/w3c_home_gray.gif diff --git a/addons/xterm-addon-image/fixture/testimages/w3c_home_gray.jpg b/addons/addon-image/fixture/testimages/w3c_home_gray.jpg similarity index 100% rename from addons/xterm-addon-image/fixture/testimages/w3c_home_gray.jpg rename to addons/addon-image/fixture/testimages/w3c_home_gray.jpg diff --git a/addons/xterm-addon-image/fixture/testimages/w3c_home_gray.png b/addons/addon-image/fixture/testimages/w3c_home_gray.png similarity index 100% rename from addons/xterm-addon-image/fixture/testimages/w3c_home_gray.png rename to addons/addon-image/fixture/testimages/w3c_home_gray.png diff --git a/addons/xterm-addon-image/fixture/textcursor.sh b/addons/addon-image/fixture/textcursor.sh old mode 100755 new mode 100644 similarity index 100% rename from addons/xterm-addon-image/fixture/textcursor.sh rename to addons/addon-image/fixture/textcursor.sh diff --git a/addons/xterm-addon-image/package.json b/addons/addon-image/package.json similarity index 80% rename from addons/xterm-addon-image/package.json rename to addons/addon-image/package.json index b07b5b6bdc..4b0f8cdc4b 100644 --- a/addons/xterm-addon-image/package.json +++ b/addons/addon-image/package.json @@ -1,13 +1,13 @@ { - "name": "xterm-addon-image", + "name": "@xterm/addon-image", "version": "0.6.0", "author": { "name": "The xterm.js authors", "url": "https://xtermjs.org/" }, - "main": "lib/xterm-addon-image.js", - "types": "typings/xterm-addon-image.d.ts", - "repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-image", + "main": "lib/addon-image.js", + "types": "typings/addon-image.d.ts", + "repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/addon-image", "license": "MIT", "keywords": [ "terminal", diff --git a/addons/xterm-addon-image/src/IIPHandler.ts b/addons/addon-image/src/IIPHandler.ts similarity index 100% rename from addons/xterm-addon-image/src/IIPHandler.ts rename to addons/addon-image/src/IIPHandler.ts diff --git a/addons/xterm-addon-image/src/IIPHeaderParser.test.ts b/addons/addon-image/src/IIPHeaderParser.test.ts similarity index 100% rename from addons/xterm-addon-image/src/IIPHeaderParser.test.ts rename to addons/addon-image/src/IIPHeaderParser.test.ts diff --git a/addons/xterm-addon-image/src/IIPHeaderParser.ts b/addons/addon-image/src/IIPHeaderParser.ts similarity index 100% rename from addons/xterm-addon-image/src/IIPHeaderParser.ts rename to addons/addon-image/src/IIPHeaderParser.ts diff --git a/addons/xterm-addon-image/src/IIPMetrics.test.ts b/addons/addon-image/src/IIPMetrics.test.ts similarity index 94% rename from addons/xterm-addon-image/src/IIPMetrics.test.ts rename to addons/addon-image/src/IIPMetrics.test.ts index 688d8d3921..8ad5f05c85 100644 --- a/addons/xterm-addon-image/src/IIPMetrics.test.ts +++ b/addons/addon-image/src/IIPMetrics.test.ts @@ -36,7 +36,7 @@ const TEST_IMAGES: [string, IMetrics][] = [ describe('IIPMetrics', () => { it('bunch of testimages', () => { for (let i = 0; i < TEST_IMAGES.length; ++i) { - const imageData = fs.readFileSync('./addons/xterm-addon-image/fixture/testimages/' + TEST_IMAGES[i][0]); + const imageData = fs.readFileSync('./addons/addon-image/fixture/testimages/' + TEST_IMAGES[i][0]); assert.deepStrictEqual(imageType(imageData), TEST_IMAGES[i][1]); } }); diff --git a/addons/xterm-addon-image/src/IIPMetrics.ts b/addons/addon-image/src/IIPMetrics.ts similarity index 100% rename from addons/xterm-addon-image/src/IIPMetrics.ts rename to addons/addon-image/src/IIPMetrics.ts diff --git a/addons/xterm-addon-image/src/ImageAddon.ts b/addons/addon-image/src/ImageAddon.ts similarity index 99% rename from addons/xterm-addon-image/src/ImageAddon.ts rename to addons/addon-image/src/ImageAddon.ts index bb633e6b25..f02ec31170 100644 --- a/addons/xterm-addon-image/src/ImageAddon.ts +++ b/addons/addon-image/src/ImageAddon.ts @@ -4,7 +4,7 @@ */ import { IIPHandler } from './IIPHandler'; -import { ITerminalAddon, IDisposable } from 'xterm'; +import { ITerminalAddon, IDisposable } from '@xterm/xterm'; import { ImageRenderer } from './ImageRenderer'; import { ImageStorage, CELL_SIZE_DEFAULT } from './ImageStorage'; import { SixelHandler } from './SixelHandler'; diff --git a/addons/xterm-addon-image/src/ImageRenderer.ts b/addons/addon-image/src/ImageRenderer.ts similarity index 99% rename from addons/xterm-addon-image/src/ImageRenderer.ts rename to addons/addon-image/src/ImageRenderer.ts index 9b528efed1..214a2e6bd0 100644 --- a/addons/xterm-addon-image/src/ImageRenderer.ts +++ b/addons/addon-image/src/ImageRenderer.ts @@ -4,7 +4,7 @@ */ import { toRGBA8888 } from 'sixel/lib/Colors'; -import { IDisposable } from 'xterm'; +import { IDisposable } from '@xterm/xterm'; import { ICellSize, ITerminalExt, IImageSpec, IRenderDimensions, IRenderService } from './Types'; import { Disposable, MutableDisposable, toDisposable } from 'common/Lifecycle'; diff --git a/addons/xterm-addon-image/src/ImageStorage.ts b/addons/addon-image/src/ImageStorage.ts similarity index 99% rename from addons/xterm-addon-image/src/ImageStorage.ts rename to addons/addon-image/src/ImageStorage.ts index 97eef8521a..8b3891ee0a 100644 --- a/addons/xterm-addon-image/src/ImageStorage.ts +++ b/addons/addon-image/src/ImageStorage.ts @@ -3,7 +3,7 @@ * @license MIT */ -import { IDisposable } from 'xterm'; +import { IDisposable } from '@xterm/xterm'; import { ImageRenderer } from './ImageRenderer'; import { ITerminalExt, IExtendedAttrsImage, IImageAddonOptions, IImageSpec, IBufferLineExt, BgFlags, Cell, Content, ICellSize, ExtFlags, Attributes, UnderlineStyle } from './Types'; diff --git a/addons/xterm-addon-image/src/SixelHandler.ts b/addons/addon-image/src/SixelHandler.ts similarity index 100% rename from addons/xterm-addon-image/src/SixelHandler.ts rename to addons/addon-image/src/SixelHandler.ts diff --git a/addons/xterm-addon-image/src/Types.d.ts b/addons/addon-image/src/Types.d.ts similarity index 98% rename from addons/xterm-addon-image/src/Types.d.ts rename to addons/addon-image/src/Types.d.ts index 62f4481ae6..60de0f3d2e 100644 --- a/addons/xterm-addon-image/src/Types.d.ts +++ b/addons/addon-image/src/Types.d.ts @@ -3,7 +3,7 @@ * @license MIT */ -import { IDisposable, IMarker, Terminal } from 'xterm'; +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'; diff --git a/addons/xterm-addon-image/src/tsconfig.json b/addons/addon-image/src/tsconfig.json similarity index 100% rename from addons/xterm-addon-image/src/tsconfig.json rename to addons/addon-image/src/tsconfig.json diff --git a/addons/xterm-addon-image/test/ImageAddon.api.ts b/addons/addon-image/test/ImageAddon.api.ts similarity index 95% rename from addons/xterm-addon-image/test/ImageAddon.api.ts rename to addons/addon-image/test/ImageAddon.api.ts index 43334bbb09..776e96bfd0 100644 --- a/addons/xterm-addon-image/test/ImageAddon.api.ts +++ b/addons/addon-image/test/ImageAddon.api.ts @@ -39,7 +39,7 @@ interface IDimensions { // image: 640 x 80, 512 color const TESTDATA: ITestData = (() => { - const data8 = readFileSync('./addons/xterm-addon-image/fixture/palette.blob'); + const data8 = readFileSync('./addons/addon-image/fixture/palette.blob'); const data32 = new Uint32Array(data8.buffer); const palette = new Set(); for (let i = 0; i < data32.length; ++i) palette.add(data32[i]); @@ -58,11 +58,11 @@ const SIXEL_SEQ_0 = introducer(0) + TESTDATA.sixel + FINALIZER; // NOTE: the data is loaded as string for easier transport through playwright const TESTDATA_IIP: [string, [number, number]][] = [ - [readFileSync('./addons/xterm-addon-image/fixture/iip/palette.iip', { encoding: 'utf-8' }), [640, 80]], - [readFileSync('./addons/xterm-addon-image/fixture/iip/spinfox.iip', { encoding: 'utf-8' }), [148, 148]], - [readFileSync('./addons/xterm-addon-image/fixture/iip/w3c_gif.iip', { encoding: 'utf-8' }), [72, 48]], - [readFileSync('./addons/xterm-addon-image/fixture/iip/w3c_jpg.iip', { encoding: 'utf-8' }), [72, 48]], - [readFileSync('./addons/xterm-addon-image/fixture/iip/w3c_png.iip', { encoding: 'utf-8' }), [72, 48]] + [readFileSync('./addons/addon-image/fixture/iip/palette.iip', { encoding: 'utf-8' }), [640, 80]], + [readFileSync('./addons/addon-image/fixture/iip/spinfox.iip', { encoding: 'utf-8' }), [148, 148]], + [readFileSync('./addons/addon-image/fixture/iip/w3c_gif.iip', { encoding: 'utf-8' }), [72, 48]], + [readFileSync('./addons/addon-image/fixture/iip/w3c_jpg.iip', { encoding: 'utf-8' }), [72, 48]], + [readFileSync('./addons/addon-image/fixture/iip/w3c_png.iip', { encoding: 'utf-8' }), [72, 48]] ]; describe('ImageAddon', () => { diff --git a/addons/xterm-addon-image/test/tsconfig.json b/addons/addon-image/test/tsconfig.json similarity index 100% rename from addons/xterm-addon-image/test/tsconfig.json rename to addons/addon-image/test/tsconfig.json diff --git a/addons/xterm-addon-image/tsconfig.json b/addons/addon-image/tsconfig.json similarity index 100% rename from addons/xterm-addon-image/tsconfig.json rename to addons/addon-image/tsconfig.json diff --git a/addons/xterm-addon-image/typings/xterm-addon-image.d.ts b/addons/addon-image/typings/addon-image.d.ts similarity index 97% rename from addons/xterm-addon-image/typings/xterm-addon-image.d.ts rename to addons/addon-image/typings/addon-image.d.ts index 94dc6f6587..48ba488cfa 100644 --- a/addons/xterm-addon-image/typings/xterm-addon-image.d.ts +++ b/addons/addon-image/typings/addon-image.d.ts @@ -3,9 +3,9 @@ * @license MIT */ -import { Terminal, ITerminalAddon } from 'xterm'; +import { Terminal, ITerminalAddon } from '@xterm/xterm'; -declare module 'xterm-addon-image' { +declare module '@xterm/addon-image' { export interface IImageAddonOptions { /** * Enable size reports in windowOptions: @@ -37,7 +37,7 @@ declare module 'xterm-addon-image' { * * Note: `storageLimit` bytes are calculated from images by multiplying the pixels with 4 * (4 channels with one byte, images are stored as RGBA8888). - * + * * Default is 2^16 (4096 x 4096 pixels). */ pixelLimit?: number; diff --git a/addons/xterm-addon-image/webpack.config.js b/addons/addon-image/webpack.config.js similarity index 93% rename from addons/xterm-addon-image/webpack.config.js rename to addons/addon-image/webpack.config.js index fff66bec50..bcd52db2d1 100644 --- a/addons/xterm-addon-image/webpack.config.js +++ b/addons/addon-image/webpack.config.js @@ -6,7 +6,7 @@ const path = require('path'); const addonName = 'ImageAddon'; -const mainFile = 'xterm-addon-image.js'; +const mainFile = 'addon-image.js'; const addon = { entry: `./out/${addonName}.js`, diff --git a/addons/xterm-addon-ligatures/.gitignore b/addons/addon-ligatures/.gitignore similarity index 100% rename from addons/xterm-addon-ligatures/.gitignore rename to addons/addon-ligatures/.gitignore diff --git a/addons/xterm-addon-ligatures/.npmignore b/addons/addon-ligatures/.npmignore similarity index 100% rename from addons/xterm-addon-ligatures/.npmignore rename to addons/addon-ligatures/.npmignore diff --git a/addons/xterm-addon-ligatures/LICENSE b/addons/addon-ligatures/LICENSE similarity index 100% rename from addons/xterm-addon-ligatures/LICENSE rename to addons/addon-ligatures/LICENSE diff --git a/addons/xterm-addon-ligatures/README.md b/addons/addon-ligatures/README.md similarity index 93% rename from addons/xterm-addon-ligatures/README.md rename to addons/addon-ligatures/README.md index fad2a7efab..3b5521e0d9 100644 --- a/addons/xterm-addon-ligatures/README.md +++ b/addons/addon-ligatures/README.md @@ -1,4 +1,4 @@ -## xterm-addon-ligatures +## @xterm/addon-ligatures Add support for programming ligatures to [xterm.js] when running in environments with access to [Node.js] APIs (such as [Electron]). @@ -10,14 +10,14 @@ Add support for programming ligatures to [xterm.js] when running in environments ### Install ```bash -npm install --save xterm-addon-ligatures +npm install --save @xterm/addon-ligatures ``` ### Usage ```ts -import { Terminal } from 'xterm'; -import { LigaturesAddon } from 'xterm-addon-ligatures'; +import { Terminal } from '@xterm/xterm'; +import { LigaturesAddon } from '@xterm/addon-ligatures'; const terminal = new Terminal(); const ligaturesAddon = new LigaturesAddon(); diff --git a/addons/xterm-addon-ligatures/bin/download-fonts.js b/addons/addon-ligatures/bin/download-fonts.js similarity index 100% rename from addons/xterm-addon-ligatures/bin/download-fonts.js rename to addons/addon-ligatures/bin/download-fonts.js diff --git a/addons/xterm-addon-ligatures/package.json b/addons/addon-ligatures/package.json similarity index 86% rename from addons/xterm-addon-ligatures/package.json rename to addons/addon-ligatures/package.json index 57c0cd5653..c62f9e08af 100644 --- a/addons/xterm-addon-ligatures/package.json +++ b/addons/addon-ligatures/package.json @@ -1,14 +1,14 @@ { - "name": "xterm-addon-ligatures", + "name": "@xterm/addon-ligatures", "version": "0.7.0", "description": "Add support for programming ligatures to xterm.js", "author": { "name": "The xterm.js authors", "url": "https://xtermjs.org/" }, - "main": "lib/xterm-addon-ligatures.js", - "types": "typings/xterm-addon-ligatures.d.ts", - "repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-ligatures", + "main": "lib/addon-ligatures.js", + "types": "typings/addon-ligatures.d.ts", + "repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/addon-ligatures", "engines": { "node": ">8.0.0" }, diff --git a/addons/xterm-addon-ligatures/src/LigaturesAddon.ts b/addons/addon-ligatures/src/LigaturesAddon.ts similarity index 97% rename from addons/xterm-addon-ligatures/src/LigaturesAddon.ts rename to addons/addon-ligatures/src/LigaturesAddon.ts index c4586b3890..27e8fcf365 100644 --- a/addons/xterm-addon-ligatures/src/LigaturesAddon.ts +++ b/addons/addon-ligatures/src/LigaturesAddon.ts @@ -3,7 +3,7 @@ * @license MIT */ -import { Terminal } from 'xterm'; +import { Terminal } from '@xterm/xterm'; import { enableLigatures } from '.'; import { ILigatureOptions } from './Types'; diff --git a/addons/xterm-addon-ligatures/src/Types.d.ts b/addons/addon-ligatures/src/Types.d.ts similarity index 100% rename from addons/xterm-addon-ligatures/src/Types.d.ts rename to addons/addon-ligatures/src/Types.d.ts diff --git a/addons/xterm-addon-ligatures/src/font.ts b/addons/addon-ligatures/src/font.ts similarity index 100% rename from addons/xterm-addon-ligatures/src/font.ts rename to addons/addon-ligatures/src/font.ts diff --git a/addons/xterm-addon-ligatures/src/index.test.ts b/addons/addon-ligatures/src/index.test.ts similarity index 99% rename from addons/xterm-addon-ligatures/src/index.test.ts rename to addons/addon-ligatures/src/index.test.ts index c7bf09cefd..c6aead98a4 100644 --- a/addons/xterm-addon-ligatures/src/index.test.ts +++ b/addons/addon-ligatures/src/index.test.ts @@ -11,7 +11,7 @@ import * as fontLigatures from 'font-ligatures'; import * as ligatureSupport from '.'; -describe('xterm-addon-ligatures', () => { +describe('LigaturesAddon', () => { let onRefresh: sinon.SinonStub; let term: MockTerminal; diff --git a/addons/xterm-addon-ligatures/src/index.ts b/addons/addon-ligatures/src/index.ts similarity index 98% rename from addons/xterm-addon-ligatures/src/index.ts rename to addons/addon-ligatures/src/index.ts index 8267562658..bd8ff215f3 100644 --- a/addons/xterm-addon-ligatures/src/index.ts +++ b/addons/addon-ligatures/src/index.ts @@ -3,7 +3,7 @@ * @license MIT */ -import type { Terminal } from 'xterm'; +import type { Terminal } from '@xterm/xterm'; import { Font } from 'font-ligatures'; import load from './font'; diff --git a/addons/xterm-addon-ligatures/src/parse.test.ts b/addons/addon-ligatures/src/parse.test.ts similarity index 100% rename from addons/xterm-addon-ligatures/src/parse.test.ts rename to addons/addon-ligatures/src/parse.test.ts diff --git a/addons/xterm-addon-ligatures/src/parse.ts b/addons/addon-ligatures/src/parse.ts similarity index 100% rename from addons/xterm-addon-ligatures/src/parse.ts rename to addons/addon-ligatures/src/parse.ts diff --git a/addons/xterm-addon-ligatures/src/tsconfig.json b/addons/addon-ligatures/src/tsconfig.json similarity index 100% rename from addons/xterm-addon-ligatures/src/tsconfig.json rename to addons/addon-ligatures/src/tsconfig.json diff --git a/addons/xterm-addon-ligatures/tsconfig.json b/addons/addon-ligatures/tsconfig.json similarity index 100% rename from addons/xterm-addon-ligatures/tsconfig.json rename to addons/addon-ligatures/tsconfig.json diff --git a/addons/xterm-addon-ligatures/typings/xterm-addon-ligatures.d.ts b/addons/addon-ligatures/typings/addon-ligatures.d.ts similarity index 89% rename from addons/xterm-addon-ligatures/typings/xterm-addon-ligatures.d.ts rename to addons/addon-ligatures/typings/addon-ligatures.d.ts index 4d8fbdf0ef..2fd4f3e741 100644 --- a/addons/xterm-addon-ligatures/typings/xterm-addon-ligatures.d.ts +++ b/addons/addon-ligatures/typings/addon-ligatures.d.ts @@ -2,15 +2,15 @@ * Copyright (c) 2018 The xterm.js authors. All rights reserved. * @license MIT * - * This contains the type declarations for the xterm-addon-ligatures library. + * This contains the type declarations for the @xterm/addon-ligatures library. * Note that some interfaces may differ between this file and the actual * implementation in src/, that's because this file declares the *public* API * which is intended to be stable and consumed by external programs. */ -import { Terminal, ITerminalAddon } from 'xterm'; +import { Terminal, ITerminalAddon } from '@xterm/xterm'; -declare module 'xterm-addon-ligatures' { +declare module '@xterm/addon-ligatures' { /** * An xterm.js addon that enables web links. */ diff --git a/addons/xterm-addon-ligatures/webpack.config.js b/addons/addon-ligatures/webpack.config.js similarity index 95% rename from addons/xterm-addon-ligatures/webpack.config.js rename to addons/addon-ligatures/webpack.config.js index 5aeebe2e96..6ec7f42d02 100644 --- a/addons/xterm-addon-ligatures/webpack.config.js +++ b/addons/addon-ligatures/webpack.config.js @@ -6,7 +6,7 @@ const path = require('path'); const addonName = 'LigaturesAddon'; -const mainFile = 'xterm-addon-ligatures.js'; +const mainFile = 'addon-ligatures.js'; module.exports = { entry: `./out/${addonName}.js`, diff --git a/addons/xterm-addon-ligatures/yarn.lock b/addons/addon-ligatures/yarn.lock similarity index 100% rename from addons/xterm-addon-ligatures/yarn.lock rename to addons/addon-ligatures/yarn.lock diff --git a/addons/xterm-addon-search/.gitignore b/addons/addon-search/.gitignore similarity index 100% rename from addons/xterm-addon-search/.gitignore rename to addons/addon-search/.gitignore diff --git a/addons/xterm-addon-search/.npmignore b/addons/addon-search/.npmignore similarity index 100% rename from addons/xterm-addon-search/.npmignore rename to addons/addon-search/.npmignore diff --git a/addons/xterm-addon-search/LICENSE b/addons/addon-search/LICENSE similarity index 100% rename from addons/xterm-addon-search/LICENSE rename to addons/addon-search/LICENSE diff --git a/addons/xterm-addon-search/README.md b/addons/addon-search/README.md similarity index 62% rename from addons/xterm-addon-search/README.md rename to addons/addon-search/README.md index 91bcc34b67..fab0b03f59 100644 --- a/addons/xterm-addon-search/README.md +++ b/addons/addon-search/README.md @@ -1,18 +1,18 @@ -## xterm-addon-search +## @xterm/addon-search An addon for [xterm.js](https://github.com/xtermjs/xterm.js) that enables searching the buffer. This addon requires xterm.js v4+. ### Install ```bash -npm install --save xterm-addon-search +npm install --save @xterm/addon-search ``` ### Usage ```ts -import { Terminal } from 'xterm'; -import { SearchAddon } from 'xterm-addon-search'; +import { Terminal } from '@xterm/xterm'; +import { SearchAddon } from '@xterm/addon-search'; const terminal = new Terminal(); const searchAddon = new SearchAddon(); @@ -20,4 +20,4 @@ terminal.loadAddon(searchAddon); searchAddon.findNext('foo'); ``` -See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/xterm-addon-search/typings/xterm-addon-search.d.ts) for more advanced usage. +See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/addon-search/typings/addon-search.d.ts) for more advanced usage. diff --git a/addons/xterm-addon-search/fixtures/issue-2444 b/addons/addon-search/fixtures/issue-2444 similarity index 100% rename from addons/xterm-addon-search/fixtures/issue-2444 rename to addons/addon-search/fixtures/issue-2444 diff --git a/addons/xterm-addon-search/package.json b/addons/addon-search/package.json similarity index 77% rename from addons/xterm-addon-search/package.json rename to addons/addon-search/package.json index f846874df3..9fab82afb4 100644 --- a/addons/xterm-addon-search/package.json +++ b/addons/addon-search/package.json @@ -1,13 +1,13 @@ { - "name": "xterm-addon-search", + "name": "@xterm/addon-search", "version": "0.13.0", "author": { "name": "The xterm.js authors", "url": "https://xtermjs.org/" }, - "main": "lib/xterm-addon-search.js", - "types": "typings/xterm-addon-search.d.ts", - "repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-search", + "main": "lib/addon-search.js", + "types": "typings/addon-search.d.ts", + "repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/addon-search", "license": "MIT", "keywords": [ "terminal", diff --git a/addons/xterm-addon-search/src/SearchAddon.ts b/addons/addon-search/src/SearchAddon.ts similarity index 99% rename from addons/xterm-addon-search/src/SearchAddon.ts rename to addons/addon-search/src/SearchAddon.ts index c176a6f25b..2e83b0ad97 100644 --- a/addons/xterm-addon-search/src/SearchAddon.ts +++ b/addons/addon-search/src/SearchAddon.ts @@ -3,7 +3,7 @@ * @license MIT */ -import { Terminal, IDisposable, ITerminalAddon, IDecoration } from 'xterm'; +import { Terminal, IDisposable, ITerminalAddon, IDecoration } from '@xterm/xterm'; import { EventEmitter } from 'common/EventEmitter'; import { Disposable, toDisposable, disposeArray, MutableDisposable } from 'common/Lifecycle'; diff --git a/addons/xterm-addon-search/src/tsconfig.json b/addons/addon-search/src/tsconfig.json similarity index 100% rename from addons/xterm-addon-search/src/tsconfig.json rename to addons/addon-search/src/tsconfig.json diff --git a/addons/xterm-addon-search/test/SearchAddon.api.ts b/addons/addon-search/test/SearchAddon.api.ts similarity index 100% rename from addons/xterm-addon-search/test/SearchAddon.api.ts rename to addons/addon-search/test/SearchAddon.api.ts diff --git a/addons/xterm-addon-search/test/tsconfig.json b/addons/addon-search/test/tsconfig.json similarity index 100% rename from addons/xterm-addon-search/test/tsconfig.json rename to addons/addon-search/test/tsconfig.json diff --git a/addons/xterm-addon-search/tsconfig.json b/addons/addon-search/tsconfig.json similarity index 100% rename from addons/xterm-addon-search/tsconfig.json rename to addons/addon-search/tsconfig.json diff --git a/addons/xterm-addon-search/typings/xterm-addon-search.d.ts b/addons/addon-search/typings/addon-search.d.ts similarity index 97% rename from addons/xterm-addon-search/typings/xterm-addon-search.d.ts rename to addons/addon-search/typings/addon-search.d.ts index 3a3b7c89b4..282004a2ae 100644 --- a/addons/xterm-addon-search/typings/xterm-addon-search.d.ts +++ b/addons/addon-search/typings/addon-search.d.ts @@ -3,9 +3,9 @@ * @license MIT */ -import { Terminal, ITerminalAddon, IEvent } from 'xterm'; +import { Terminal, ITerminalAddon, IEvent } from '@xterm/xterm'; -declare module 'xterm-addon-search' { +declare module '@xterm/addon-search' { /** * Options for a search. */ diff --git a/addons/xterm-addon-search/webpack.config.js b/addons/addon-search/webpack.config.js similarity index 94% rename from addons/xterm-addon-search/webpack.config.js rename to addons/addon-search/webpack.config.js index 30526812e4..a770f93f50 100644 --- a/addons/xterm-addon-search/webpack.config.js +++ b/addons/addon-search/webpack.config.js @@ -6,7 +6,7 @@ const path = require('path'); const addonName = 'SearchAddon'; -const mainFile = 'xterm-addon-search.js'; +const mainFile = 'addon-search.js'; module.exports = { entry: `./out/${addonName}.js`, diff --git a/addons/xterm-addon-serialize/.gitignore b/addons/addon-serialize/.gitignore similarity index 100% rename from addons/xterm-addon-serialize/.gitignore rename to addons/addon-serialize/.gitignore diff --git a/addons/xterm-addon-serialize/.npmignore b/addons/addon-serialize/.npmignore similarity index 100% rename from addons/xterm-addon-serialize/.npmignore rename to addons/addon-serialize/.npmignore diff --git a/addons/xterm-addon-serialize/README.md b/addons/addon-serialize/README.md similarity index 74% rename from addons/xterm-addon-serialize/README.md rename to addons/addon-serialize/README.md index 12e0ac8761..f011689354 100644 --- a/addons/xterm-addon-serialize/README.md +++ b/addons/addon-serialize/README.md @@ -1,4 +1,4 @@ -## xterm-addon-serialize +## @xterm/addon-serialize An addon for [xterm.js](https://github.com/xtermjs/xterm.js) that enables xterm.js to serialize a terminal framebuffer into string or html. This addon requires xterm.js v4+. @@ -7,14 +7,14 @@ An addon for [xterm.js](https://github.com/xtermjs/xterm.js) that enables xterm. ### Install ```bash -npm install --save xterm-addon-serialize +npm install --save @xterm/addon-serialize ``` ### Usage ```ts import { Terminal } from "xterm"; -import { SerializeAddon } from "xterm-addon-serialize"; +import { SerializeAddon } from "@xterm/addon-serialize"; const terminal = new Terminal(); const serializeAddon = new SerializeAddon(); @@ -25,7 +25,7 @@ terminal.write("something...", () => { }); ``` -See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/xterm-addon-serialize/typings/xterm-addon-serialize.d.ts) for more advanced usage. +See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/addon-serialize/typings/addon-serialize.d.ts) for more advanced usage. ### Benchmark @@ -35,8 +35,8 @@ See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/xterm- $ git clone https://github.com/xtermjs/xterm.js.git $ cd xterm.js $ yarn -$ cd addons/xterm-addon-serialize +$ cd addons/addon-serialize $ yarn benchmark && yarn benchmark-baseline -$ # change some code in `xterm-addon-serialize` +$ # change some code in `@xterm/addon-serialize` $ yarn benchmark-eval ``` diff --git a/addons/xterm-addon-serialize/benchmark/SerializeAddon.benchmark.ts b/addons/addon-serialize/benchmark/SerializeAddon.benchmark.ts similarity index 100% rename from addons/xterm-addon-serialize/benchmark/SerializeAddon.benchmark.ts rename to addons/addon-serialize/benchmark/SerializeAddon.benchmark.ts diff --git a/addons/xterm-addon-serialize/benchmark/benchmark.json b/addons/addon-serialize/benchmark/benchmark.json similarity index 100% rename from addons/xterm-addon-serialize/benchmark/benchmark.json rename to addons/addon-serialize/benchmark/benchmark.json diff --git a/addons/xterm-addon-serialize/benchmark/tsconfig.json b/addons/addon-serialize/benchmark/tsconfig.json similarity index 100% rename from addons/xterm-addon-serialize/benchmark/tsconfig.json rename to addons/addon-serialize/benchmark/tsconfig.json diff --git a/addons/xterm-addon-serialize/package.json b/addons/addon-serialize/package.json similarity index 86% rename from addons/xterm-addon-serialize/package.json rename to addons/addon-serialize/package.json index 8f9148659a..c95bc5312d 100644 --- a/addons/xterm-addon-serialize/package.json +++ b/addons/addon-serialize/package.json @@ -1,13 +1,13 @@ { - "name": "xterm-addon-serialize", + "name": "@xterm/addon-serialize", "version": "0.11.0", "author": { "name": "The xterm.js authors", "url": "https://xtermjs.org/" }, - "main": "lib/xterm-addon-serialize.js", - "types": "typings/xterm-addon-serialize.d.ts", - "repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-serialize", + "main": "lib/addon-serialize.js", + "types": "typings/addon-serialize.d.ts", + "repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/addon-serialize", "license": "MIT", "keywords": [ "terminal", diff --git a/addons/xterm-addon-serialize/src/SerializeAddon.test.ts b/addons/addon-serialize/src/SerializeAddon.test.ts similarity index 99% rename from addons/xterm-addon-serialize/src/SerializeAddon.test.ts rename to addons/addon-serialize/src/SerializeAddon.test.ts index 75148ab9c4..d41cfa12ed 100644 --- a/addons/xterm-addon-serialize/src/SerializeAddon.test.ts +++ b/addons/addon-serialize/src/SerializeAddon.test.ts @@ -44,7 +44,7 @@ class TestSelectionService { } } -describe('xterm-addon-serialize', () => { +describe('SerializeAddon', () => { let dom: jsdom.JSDOM; let window: jsdom.DOMWindow; diff --git a/addons/xterm-addon-serialize/src/SerializeAddon.ts b/addons/addon-serialize/src/SerializeAddon.ts similarity index 99% rename from addons/xterm-addon-serialize/src/SerializeAddon.ts rename to addons/addon-serialize/src/SerializeAddon.ts index 7a2db0893b..bb62779bb1 100644 --- a/addons/xterm-addon-serialize/src/SerializeAddon.ts +++ b/addons/addon-serialize/src/SerializeAddon.ts @@ -7,7 +7,7 @@ import { DEFAULT_ANSI_COLORS } from 'browser/services/ThemeService'; import { IAttributeData, IColor } from 'common/Types'; -import { IBuffer, IBufferCell, IBufferRange, ITerminalAddon, Terminal } from 'xterm'; +import { IBuffer, IBufferCell, IBufferRange, ITerminalAddon, Terminal } from '@xterm/xterm'; function constrain(value: number, low: number, high: number): number { return Math.max(low, Math.min(value, high)); diff --git a/addons/xterm-addon-serialize/src/tsconfig.json b/addons/addon-serialize/src/tsconfig.json similarity index 100% rename from addons/xterm-addon-serialize/src/tsconfig.json rename to addons/addon-serialize/src/tsconfig.json diff --git a/addons/xterm-addon-serialize/test/SerializeAddon.api.ts b/addons/addon-serialize/test/SerializeAddon.api.ts similarity index 100% rename from addons/xterm-addon-serialize/test/SerializeAddon.api.ts rename to addons/addon-serialize/test/SerializeAddon.api.ts diff --git a/addons/xterm-addon-serialize/test/tsconfig.json b/addons/addon-serialize/test/tsconfig.json similarity index 100% rename from addons/xterm-addon-serialize/test/tsconfig.json rename to addons/addon-serialize/test/tsconfig.json diff --git a/addons/xterm-addon-serialize/tsconfig.json b/addons/addon-serialize/tsconfig.json similarity index 100% rename from addons/xterm-addon-serialize/tsconfig.json rename to addons/addon-serialize/tsconfig.json diff --git a/addons/xterm-addon-serialize/typings/xterm-addon-serialize.d.ts b/addons/addon-serialize/typings/addon-serialize.d.ts similarity index 96% rename from addons/xterm-addon-serialize/typings/xterm-addon-serialize.d.ts rename to addons/addon-serialize/typings/addon-serialize.d.ts index 4cb6283db0..0b127b5061 100644 --- a/addons/xterm-addon-serialize/typings/xterm-addon-serialize.d.ts +++ b/addons/addon-serialize/typings/addon-serialize.d.ts @@ -3,9 +3,9 @@ * @license MIT */ -import { Terminal, ITerminalAddon } from 'xterm'; +import { Terminal, ITerminalAddon } from '@xterm/xterm'; -declare module 'xterm-addon-serialize' { +declare module '@xterm/addon-serialize' { /** * An xterm.js addon that enables serialization of terminal contents. */ diff --git a/addons/xterm-addon-serialize/webpack.config.js b/addons/addon-serialize/webpack.config.js similarity index 94% rename from addons/xterm-addon-serialize/webpack.config.js rename to addons/addon-serialize/webpack.config.js index fee297d85a..bd08ca3745 100644 --- a/addons/xterm-addon-serialize/webpack.config.js +++ b/addons/addon-serialize/webpack.config.js @@ -6,7 +6,7 @@ const path = require('path'); const addonName = 'SerializeAddon'; -const mainFile = 'xterm-addon-serialize.js'; +const mainFile = 'addon-serialize.js'; module.exports = { entry: `./out/${addonName}.js`, diff --git a/addons/xterm-addon-unicode-graphemes/.gitignore b/addons/addon-unicode-graphemes/.gitignore similarity index 100% rename from addons/xterm-addon-unicode-graphemes/.gitignore rename to addons/addon-unicode-graphemes/.gitignore diff --git a/addons/xterm-addon-unicode-graphemes/.npmignore b/addons/addon-unicode-graphemes/.npmignore similarity index 100% rename from addons/xterm-addon-unicode-graphemes/.npmignore rename to addons/addon-unicode-graphemes/.npmignore diff --git a/addons/xterm-addon-unicode-graphemes/LICENSE b/addons/addon-unicode-graphemes/LICENSE similarity index 100% rename from addons/xterm-addon-unicode-graphemes/LICENSE rename to addons/addon-unicode-graphemes/LICENSE diff --git a/addons/xterm-addon-unicode-graphemes/README.md b/addons/addon-unicode-graphemes/README.md similarity index 80% rename from addons/xterm-addon-unicode-graphemes/README.md rename to addons/addon-unicode-graphemes/README.md index 5b8679f8e6..6e717c2694 100644 --- a/addons/xterm-addon-unicode-graphemes/README.md +++ b/addons/addon-unicode-graphemes/README.md @@ -1,4 +1,4 @@ -## xterm-addon-unicode-graphemes +## @xterm/addon-unicode-graphemes ⚠️ **This addon is currently experimental and may introduce unexpected and non-standard behavior** @@ -13,8 +13,8 @@ This addon is not yet published to npm ### Usage ```ts -import { Terminal } from 'xterm'; -import { UnicodeGraphemesAddon } from 'xterm-addon-unicode-graphemes'; +import { Terminal } from '@xterm/xterm'; +import { UnicodeGraphemesAddon } from '@xterm/addon-unicode-graphemes'; const terminal = new Terminal(); const unicodeGraphemesAddon = new UnicodeGraphemesAddon(); diff --git a/addons/xterm-addon-unicode-graphemes/benchmark/UnicodeGraphemeAddon.benchmark.ts b/addons/addon-unicode-graphemes/benchmark/UnicodeGraphemeAddon.benchmark.ts similarity index 100% rename from addons/xterm-addon-unicode-graphemes/benchmark/UnicodeGraphemeAddon.benchmark.ts rename to addons/addon-unicode-graphemes/benchmark/UnicodeGraphemeAddon.benchmark.ts diff --git a/addons/xterm-addon-unicode-graphemes/benchmark/benchmark.json b/addons/addon-unicode-graphemes/benchmark/benchmark.json similarity index 100% rename from addons/xterm-addon-unicode-graphemes/benchmark/benchmark.json rename to addons/addon-unicode-graphemes/benchmark/benchmark.json diff --git a/addons/xterm-addon-unicode-graphemes/benchmark/tsconfig.json b/addons/addon-unicode-graphemes/benchmark/tsconfig.json similarity index 100% rename from addons/xterm-addon-unicode-graphemes/benchmark/tsconfig.json rename to addons/addon-unicode-graphemes/benchmark/tsconfig.json diff --git a/addons/xterm-addon-unicode-graphemes/package.json b/addons/addon-unicode-graphemes/package.json similarity index 84% rename from addons/xterm-addon-unicode-graphemes/package.json rename to addons/addon-unicode-graphemes/package.json index 38ea7271f2..5e270025cd 100644 --- a/addons/xterm-addon-unicode-graphemes/package.json +++ b/addons/addon-unicode-graphemes/package.json @@ -1,13 +1,13 @@ { - "name": "xterm-addon-unicode-graphemes", + "name": "@xterm/addon-unicode-graphemes", "version": "0.1.0", "author": { "name": "The xterm.js authors", "url": "https://xtermjs.org/" }, - "main": "lib/xterm-addon-unicode-graphemes.js", - "types": "typings/xterm-addon-unicode-graphemes.d.ts", - "repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-unicode-graphemes", + "main": "lib/addon-unicode-graphemes.js", + "types": "typings/addon-unicode-graphemes.d.ts", + "repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/addon-unicode-graphemes", "license": "MIT", "keywords": [ "terminal", diff --git a/addons/xterm-addon-unicode-graphemes/src/UnicodeGraphemeProvider.ts b/addons/addon-unicode-graphemes/src/UnicodeGraphemeProvider.ts similarity index 97% rename from addons/xterm-addon-unicode-graphemes/src/UnicodeGraphemeProvider.ts rename to addons/addon-unicode-graphemes/src/UnicodeGraphemeProvider.ts index 39fbec8407..3d5717a0f6 100644 --- a/addons/xterm-addon-unicode-graphemes/src/UnicodeGraphemeProvider.ts +++ b/addons/addon-unicode-graphemes/src/UnicodeGraphemeProvider.ts @@ -3,7 +3,7 @@ * @license MIT */ -import { IUnicodeVersionProvider } from 'xterm'; +import { IUnicodeVersionProvider } from '@xterm/xterm'; import { UnicodeCharProperties, UnicodeCharWidth } from 'common/services/Services'; import { UnicodeService } from 'common/services/UnicodeService'; import * as UC from './third-party/UnicodeProperties'; diff --git a/addons/xterm-addon-unicode-graphemes/src/UnicodeGraphemesAddon.ts b/addons/addon-unicode-graphemes/src/UnicodeGraphemesAddon.ts similarity index 93% rename from addons/xterm-addon-unicode-graphemes/src/UnicodeGraphemesAddon.ts rename to addons/addon-unicode-graphemes/src/UnicodeGraphemesAddon.ts index 80290edfd6..714f223b23 100644 --- a/addons/xterm-addon-unicode-graphemes/src/UnicodeGraphemesAddon.ts +++ b/addons/addon-unicode-graphemes/src/UnicodeGraphemesAddon.ts @@ -5,7 +5,7 @@ * UnicodeVersionProvider for V15 with grapeme cluster handleing. */ -import { Terminal, ITerminalAddon, IUnicodeHandling } from 'xterm'; +import { Terminal, ITerminalAddon, IUnicodeHandling } from '@xterm/xterm'; import { UnicodeGraphemeProvider } from './UnicodeGraphemeProvider'; diff --git a/addons/xterm-addon-unicode-graphemes/src/third-party/UnicodeProperties.ts b/addons/addon-unicode-graphemes/src/third-party/UnicodeProperties.ts similarity index 100% rename from addons/xterm-addon-unicode-graphemes/src/third-party/UnicodeProperties.ts rename to addons/addon-unicode-graphemes/src/third-party/UnicodeProperties.ts diff --git a/addons/xterm-addon-unicode-graphemes/src/third-party/tiny-inflate.ts b/addons/addon-unicode-graphemes/src/third-party/tiny-inflate.ts similarity index 100% rename from addons/xterm-addon-unicode-graphemes/src/third-party/tiny-inflate.ts rename to addons/addon-unicode-graphemes/src/third-party/tiny-inflate.ts diff --git a/addons/xterm-addon-unicode-graphemes/src/third-party/unicode-trie.ts b/addons/addon-unicode-graphemes/src/third-party/unicode-trie.ts similarity index 100% rename from addons/xterm-addon-unicode-graphemes/src/third-party/unicode-trie.ts rename to addons/addon-unicode-graphemes/src/third-party/unicode-trie.ts diff --git a/addons/xterm-addon-unicode-graphemes/src/tsconfig.json b/addons/addon-unicode-graphemes/src/tsconfig.json similarity index 100% rename from addons/xterm-addon-unicode-graphemes/src/tsconfig.json rename to addons/addon-unicode-graphemes/src/tsconfig.json diff --git a/addons/xterm-addon-unicode-graphemes/test/UnicodeGraphemesAddon.api.ts b/addons/addon-unicode-graphemes/test/UnicodeGraphemesAddon.api.ts similarity index 100% rename from addons/xterm-addon-unicode-graphemes/test/UnicodeGraphemesAddon.api.ts rename to addons/addon-unicode-graphemes/test/UnicodeGraphemesAddon.api.ts diff --git a/addons/xterm-addon-unicode-graphemes/test/tsconfig.json b/addons/addon-unicode-graphemes/test/tsconfig.json similarity index 100% rename from addons/xterm-addon-unicode-graphemes/test/tsconfig.json rename to addons/addon-unicode-graphemes/test/tsconfig.json diff --git a/addons/xterm-addon-unicode-graphemes/tsconfig.json b/addons/addon-unicode-graphemes/tsconfig.json similarity index 100% rename from addons/xterm-addon-unicode-graphemes/tsconfig.json rename to addons/addon-unicode-graphemes/tsconfig.json diff --git a/addons/xterm-addon-unicode-graphemes/typings/xterm-addon-unicode-graphemes.d.ts b/addons/addon-unicode-graphemes/typings/addon-unicode-graphemes.d.ts similarity index 70% rename from addons/xterm-addon-unicode-graphemes/typings/xterm-addon-unicode-graphemes.d.ts rename to addons/addon-unicode-graphemes/typings/addon-unicode-graphemes.d.ts index 3ab25aa007..9443f1c885 100644 --- a/addons/xterm-addon-unicode-graphemes/typings/xterm-addon-unicode-graphemes.d.ts +++ b/addons/addon-unicode-graphemes/typings/addon-unicode-graphemes.d.ts @@ -3,9 +3,9 @@ * @license MIT */ -import { Terminal, ITerminalAddon } from 'xterm'; +import { Terminal, ITerminalAddon } from '@xterm/xterm'; -declare module 'xterm-addon-unicode-graphemes' { +declare module '@xterm/addon-unicode-graphemes' { export class UnicodeGraphemesAddon implements ITerminalAddon { constructor(); public activate(terminal: Terminal): void; diff --git a/addons/xterm-addon-unicode-graphemes/webpack.config.js b/addons/addon-unicode-graphemes/webpack.config.js similarity index 92% rename from addons/xterm-addon-unicode-graphemes/webpack.config.js rename to addons/addon-unicode-graphemes/webpack.config.js index 89abf53aad..6a80bdea60 100644 --- a/addons/xterm-addon-unicode-graphemes/webpack.config.js +++ b/addons/addon-unicode-graphemes/webpack.config.js @@ -6,7 +6,7 @@ const path = require('path'); const addonName = 'UnicodeGraphemesAddon'; -const mainFile = 'xterm-addon-unicode-graphemes.js'; +const mainFile = 'addon-unicode-graphemes.js'; module.exports = { entry: `./out/${addonName}.js`, diff --git a/addons/xterm-addon-unicode11/.gitignore b/addons/addon-unicode11/.gitignore similarity index 100% rename from addons/xterm-addon-unicode11/.gitignore rename to addons/addon-unicode11/.gitignore diff --git a/addons/xterm-addon-unicode11/.npmignore b/addons/addon-unicode11/.npmignore similarity index 100% rename from addons/xterm-addon-unicode11/.npmignore rename to addons/addon-unicode11/.npmignore diff --git a/addons/xterm-addon-unicode11/LICENSE b/addons/addon-unicode11/LICENSE similarity index 100% rename from addons/xterm-addon-unicode11/LICENSE rename to addons/addon-unicode11/LICENSE diff --git a/addons/xterm-addon-unicode11/README.md b/addons/addon-unicode11/README.md similarity index 63% rename from addons/xterm-addon-unicode11/README.md rename to addons/addon-unicode11/README.md index ec01203e91..ccfe77cf76 100644 --- a/addons/xterm-addon-unicode11/README.md +++ b/addons/addon-unicode11/README.md @@ -1,18 +1,18 @@ -## xterm-addon-unicode11 +## @xterm/addon-unicode11 An addon providing Unicode version 11 rules for xterm.js. ### Install ```bash -npm install --save xterm-addon-unicode11 +npm install --save @xterm/addon-unicode11 ``` ### Usage ```ts -import { Terminal } from 'xterm'; -import { Unicode11Addon } from 'xterm-addon-unicode11'; +import { Terminal } from '@xterm/xterm'; +import { Unicode11Addon } from '@xterm/addon-unicode11'; const terminal = new Terminal(); const unicode11Addon = new Unicode11Addon(); diff --git a/addons/xterm-addon-unicode11/package.json b/addons/addon-unicode11/package.json similarity index 76% rename from addons/xterm-addon-unicode11/package.json rename to addons/addon-unicode11/package.json index d187d8edc8..b54f9ab4a8 100644 --- a/addons/xterm-addon-unicode11/package.json +++ b/addons/addon-unicode11/package.json @@ -1,13 +1,13 @@ { - "name": "xterm-addon-unicode11", + "name": "@xterm/addon-unicode11", "version": "0.6.0", "author": { "name": "The xterm.js authors", "url": "https://xtermjs.org/" }, - "main": "lib/xterm-addon-unicode11.js", - "types": "typings/xterm-addon-unicode11.d.ts", - "repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-unicode11", + "main": "lib/addon-unicode11.js", + "types": "typings/addon-unicode11.d.ts", + "repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/addon-unicode11", "license": "MIT", "keywords": [ "terminal", diff --git a/addons/xterm-addon-unicode11/src/Unicode11Addon.ts b/addons/addon-unicode11/src/Unicode11Addon.ts similarity index 86% rename from addons/xterm-addon-unicode11/src/Unicode11Addon.ts rename to addons/addon-unicode11/src/Unicode11Addon.ts index d4ddf77eed..03672fbff1 100644 --- a/addons/xterm-addon-unicode11/src/Unicode11Addon.ts +++ b/addons/addon-unicode11/src/Unicode11Addon.ts @@ -5,7 +5,7 @@ * UnicodeVersionProvider for V11. */ -import { Terminal, ITerminalAddon } from 'xterm'; +import { Terminal, ITerminalAddon } from '@xterm/xterm'; import { UnicodeV11 } from './UnicodeV11'; diff --git a/addons/xterm-addon-unicode11/src/UnicodeV11.ts b/addons/addon-unicode11/src/UnicodeV11.ts similarity index 99% rename from addons/xterm-addon-unicode11/src/UnicodeV11.ts rename to addons/addon-unicode11/src/UnicodeV11.ts index c1ef08c169..79568960a0 100644 --- a/addons/xterm-addon-unicode11/src/UnicodeV11.ts +++ b/addons/addon-unicode11/src/UnicodeV11.ts @@ -3,7 +3,7 @@ * @license MIT */ -import { IUnicodeVersionProvider } from 'xterm'; +import { IUnicodeVersionProvider } from '@xterm/xterm'; import { UnicodeCharProperties, UnicodeCharWidth } from 'common/services/Services'; import { UnicodeService } from 'common/services/UnicodeService'; diff --git a/addons/xterm-addon-unicode11/src/tsconfig.json b/addons/addon-unicode11/src/tsconfig.json similarity index 100% rename from addons/xterm-addon-unicode11/src/tsconfig.json rename to addons/addon-unicode11/src/tsconfig.json diff --git a/addons/xterm-addon-unicode11/test/Unicode11Addon.api.ts b/addons/addon-unicode11/test/Unicode11Addon.api.ts similarity index 100% rename from addons/xterm-addon-unicode11/test/Unicode11Addon.api.ts rename to addons/addon-unicode11/test/Unicode11Addon.api.ts diff --git a/addons/xterm-addon-unicode11/test/tsconfig.json b/addons/addon-unicode11/test/tsconfig.json similarity index 100% rename from addons/xterm-addon-unicode11/test/tsconfig.json rename to addons/addon-unicode11/test/tsconfig.json diff --git a/addons/xterm-addon-unicode11/tsconfig.json b/addons/addon-unicode11/tsconfig.json similarity index 100% rename from addons/xterm-addon-unicode11/tsconfig.json rename to addons/addon-unicode11/tsconfig.json diff --git a/addons/xterm-addon-unicode11/typings/xterm-addon-unicode11.d.ts b/addons/addon-unicode11/typings/addon-unicode11.d.ts similarity index 71% rename from addons/xterm-addon-unicode11/typings/xterm-addon-unicode11.d.ts rename to addons/addon-unicode11/typings/addon-unicode11.d.ts index 1d0dce1b1b..74bd288dda 100644 --- a/addons/xterm-addon-unicode11/typings/xterm-addon-unicode11.d.ts +++ b/addons/addon-unicode11/typings/addon-unicode11.d.ts @@ -3,9 +3,9 @@ * @license MIT */ -import { Terminal, ITerminalAddon } from 'xterm'; +import { Terminal, ITerminalAddon } from '@xterm/xterm'; -declare module 'xterm-addon-unicode11' { +declare module '@xterm/addon-unicode11' { export class Unicode11Addon implements ITerminalAddon { constructor(); public activate(terminal: Terminal): void; diff --git a/addons/xterm-addon-unicode11/webpack.config.js b/addons/addon-unicode11/webpack.config.js similarity index 94% rename from addons/xterm-addon-unicode11/webpack.config.js rename to addons/addon-unicode11/webpack.config.js index 10c0adc3c3..1913481d2c 100644 --- a/addons/xterm-addon-unicode11/webpack.config.js +++ b/addons/addon-unicode11/webpack.config.js @@ -6,7 +6,7 @@ const path = require('path'); const addonName = 'Unicode11Addon'; -const mainFile = 'xterm-addon-unicode11.js'; +const mainFile = 'addon-unicode11.js'; module.exports = { entry: `./out/${addonName}.js`, diff --git a/addons/xterm-addon-web-links/.gitignore b/addons/addon-web-links/.gitignore similarity index 100% rename from addons/xterm-addon-web-links/.gitignore rename to addons/addon-web-links/.gitignore diff --git a/addons/xterm-addon-web-links/.npmignore b/addons/addon-web-links/.npmignore similarity index 100% rename from addons/xterm-addon-web-links/.npmignore rename to addons/addon-web-links/.npmignore diff --git a/addons/xterm-addon-web-links/LICENSE b/addons/addon-web-links/LICENSE similarity index 100% rename from addons/xterm-addon-web-links/LICENSE rename to addons/addon-web-links/LICENSE diff --git a/addons/xterm-addon-web-links/README.md b/addons/addon-web-links/README.md similarity index 55% rename from addons/xterm-addon-web-links/README.md rename to addons/addon-web-links/README.md index e53f4edf79..16dfa57181 100644 --- a/addons/xterm-addon-web-links/README.md +++ b/addons/addon-web-links/README.md @@ -1,21 +1,21 @@ -## xterm-addon-web-links +## @xterm/addon-web-links An addon for [xterm.js](https://github.com/xtermjs/xterm.js) that enables web links. This addon requires xterm.js v4+. ### Install ```bash -npm install --save xterm-addon-web-links +npm install --save @xterm/addon-web-links ``` ### Usage ```ts -import { Terminal } from 'xterm'; -import { WebLinksAddon } from 'xterm-addon-web-links'; +import { Terminal } from '@xterm/xterm'; +import { WebLinksAddon } from '@xterm/addon-web-links'; const terminal = new Terminal(); terminal.loadAddon(new WebLinksAddon()); ``` -See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/xterm-addon-web-links/typings/xterm-addon-web-links.d.ts) for more advanced usage. +See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/addon-web-links/typings/addon-web-links.d.ts) for more advanced usage. diff --git a/addons/xterm-addon-web-links/package.json b/addons/addon-web-links/package.json similarity index 76% rename from addons/xterm-addon-web-links/package.json rename to addons/addon-web-links/package.json index 783ee7e01a..e1d60b022c 100644 --- a/addons/xterm-addon-web-links/package.json +++ b/addons/addon-web-links/package.json @@ -1,13 +1,13 @@ { - "name": "xterm-addon-web-links", + "name": "@xterm/addon-web-links", "version": "0.9.0", "author": { "name": "The xterm.js authors", "url": "https://xtermjs.org/" }, - "main": "lib/xterm-addon-web-links.js", - "types": "typings/xterm-addon-web-links.d.ts", - "repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-web-links", + "main": "lib/addon-web-links.js", + "types": "typings/addon-web-links.d.ts", + "repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/addon-web-links", "license": "MIT", "keywords": [ "terminal", diff --git a/addons/xterm-addon-web-links/src/WebLinkProvider.ts b/addons/addon-web-links/src/WebLinkProvider.ts similarity index 99% rename from addons/xterm-addon-web-links/src/WebLinkProvider.ts rename to addons/addon-web-links/src/WebLinkProvider.ts index 1c9486f5b4..25dd983c9b 100644 --- a/addons/xterm-addon-web-links/src/WebLinkProvider.ts +++ b/addons/addon-web-links/src/WebLinkProvider.ts @@ -3,7 +3,7 @@ * @license MIT */ -import { ILinkProvider, ILink, Terminal, IViewportRange, IBufferLine } from 'xterm'; +import { ILinkProvider, ILink, Terminal, IViewportRange, IBufferLine } from '@xterm/xterm'; export interface ILinkProviderOptions { hover?(event: MouseEvent, text: string, location: IViewportRange): void; diff --git a/addons/xterm-addon-web-links/src/WebLinksAddon.ts b/addons/addon-web-links/src/WebLinksAddon.ts similarity index 96% rename from addons/xterm-addon-web-links/src/WebLinksAddon.ts rename to addons/addon-web-links/src/WebLinksAddon.ts index 5c956cec36..701a658e93 100644 --- a/addons/xterm-addon-web-links/src/WebLinksAddon.ts +++ b/addons/addon-web-links/src/WebLinksAddon.ts @@ -3,7 +3,7 @@ * @license MIT */ -import { Terminal, ITerminalAddon, IDisposable } from 'xterm'; +import { Terminal, ITerminalAddon, IDisposable } from '@xterm/xterm'; import { ILinkProviderOptions, WebLinkProvider } from './WebLinkProvider'; // consider everthing starting with http:// or https:// diff --git a/addons/xterm-addon-web-links/src/tsconfig.json b/addons/addon-web-links/src/tsconfig.json similarity index 100% rename from addons/xterm-addon-web-links/src/tsconfig.json rename to addons/addon-web-links/src/tsconfig.json diff --git a/addons/xterm-addon-web-links/test/WebLinksAddon.api.ts b/addons/addon-web-links/test/WebLinksAddon.api.ts similarity index 100% rename from addons/xterm-addon-web-links/test/WebLinksAddon.api.ts rename to addons/addon-web-links/test/WebLinksAddon.api.ts diff --git a/addons/xterm-addon-web-links/test/tsconfig.json b/addons/addon-web-links/test/tsconfig.json similarity index 100% rename from addons/xterm-addon-web-links/test/tsconfig.json rename to addons/addon-web-links/test/tsconfig.json diff --git a/addons/xterm-addon-web-links/tsconfig.json b/addons/addon-web-links/tsconfig.json similarity index 100% rename from addons/xterm-addon-web-links/tsconfig.json rename to addons/addon-web-links/tsconfig.json diff --git a/addons/xterm-addon-web-links/typings/xterm-addon-web-links.d.ts b/addons/addon-web-links/typings/addon-web-links.d.ts similarity index 91% rename from addons/xterm-addon-web-links/typings/xterm-addon-web-links.d.ts rename to addons/addon-web-links/typings/addon-web-links.d.ts index dc69d73240..4ae4934ef5 100644 --- a/addons/xterm-addon-web-links/typings/xterm-addon-web-links.d.ts +++ b/addons/addon-web-links/typings/addon-web-links.d.ts @@ -4,9 +4,9 @@ */ -import { Terminal, ITerminalAddon, IViewportRange } from 'xterm'; +import { Terminal, ITerminalAddon, IViewportRange } from '@xterm/xterm'; -declare module 'xterm-addon-web-links' { +declare module '@xterm/addon-web-links' { /** * An xterm.js addon that enables web links. */ diff --git a/addons/xterm-addon-web-links/webpack.config.js b/addons/addon-web-links/webpack.config.js similarity index 92% rename from addons/xterm-addon-web-links/webpack.config.js rename to addons/addon-web-links/webpack.config.js index fd87d07e82..4484dbf604 100644 --- a/addons/xterm-addon-web-links/webpack.config.js +++ b/addons/addon-web-links/webpack.config.js @@ -6,7 +6,7 @@ const path = require('path'); const addonName = 'WebLinksAddon'; -const mainFile = 'xterm-addon-web-links.js'; +const mainFile = 'addon-web-links.js'; module.exports = { entry: `./out/${addonName}.js`, diff --git a/addons/xterm-addon-webgl/.gitignore b/addons/addon-webgl/.gitignore similarity index 100% rename from addons/xterm-addon-webgl/.gitignore rename to addons/addon-webgl/.gitignore diff --git a/addons/xterm-addon-webgl/.npmignore b/addons/addon-webgl/.npmignore similarity index 100% rename from addons/xterm-addon-webgl/.npmignore rename to addons/addon-webgl/.npmignore diff --git a/addons/xterm-addon-webgl/LICENSE b/addons/addon-webgl/LICENSE similarity index 100% rename from addons/xterm-addon-webgl/LICENSE rename to addons/addon-webgl/LICENSE diff --git a/addons/xterm-addon-webgl/README.md b/addons/addon-webgl/README.md similarity index 71% rename from addons/xterm-addon-webgl/README.md rename to addons/addon-webgl/README.md index 5dee6b622c..05d753e86e 100644 --- a/addons/xterm-addon-webgl/README.md +++ b/addons/addon-webgl/README.md @@ -1,25 +1,25 @@ -## xterm-addon-webgl +## @xterm/addon-webgl An addon for [xterm.js](https://github.com/xtermjs/xterm.js) that enables a WebGL2-based renderer. This addon requires xterm.js v4+. ### Install ```bash -npm install --save xterm-addon-webgl +npm install --save @xterm/addon-webgl ``` ### Usage ```ts -import { Terminal } from 'xterm'; -import { WebglAddon } from 'xterm-addon-webgl'; +import { Terminal } from '@xterm/xterm'; +import { WebglAddon } from '@xterm/addon-webgl'; const terminal = new Terminal(); terminal.open(element); terminal.loadAddon(new WebglAddon()); ``` -See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/xterm-addon-webgl/typings/xterm-addon-webgl.d.ts) for more advanced usage. +See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/addon-webgl/typings/addon-webgl.d.ts) for more advanced usage. ### Handling Context Loss @@ -38,4 +38,4 @@ Read more about handling WebGL context losses on the [Khronos wiki](https://www. ### See also -- [xterm-addon-canvas](https://www.npmjs.com/package/xterm-addon-canvas) A renderer for xterm.js that uses a 2d canvas that can be used as a fallback when WebGL is not available +- [@xterm/addon-canvas](https://www.npmjs.com/package/@xterm/addon-canvas) A renderer for xterm.js that uses a 2d canvas that can be used as a fallback when WebGL is not available diff --git a/addons/xterm-addon-webgl/package.json b/addons/addon-webgl/package.json similarity index 80% rename from addons/xterm-addon-webgl/package.json rename to addons/addon-webgl/package.json index 1458effc52..f52f8b59b4 100644 --- a/addons/xterm-addon-webgl/package.json +++ b/addons/addon-webgl/package.json @@ -1,13 +1,13 @@ { - "name": "xterm-addon-webgl", + "name": "@xterm/addon-webgl", "version": "0.16.0", "author": { "name": "The xterm.js authors", "url": "https://xtermjs.org/" }, - "main": "lib/xterm-addon-webgl.js", - "types": "typings/xterm-addon-webgl.d.ts", - "repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-webgl", + "main": "lib/addon-webgl.js", + "types": "typings/addon-webgl.d.ts", + "repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/addon-webgl", "license": "MIT", "keywords": [ "terminal", diff --git a/addons/xterm-addon-webgl/src/GlyphRenderer.ts b/addons/addon-webgl/src/GlyphRenderer.ts similarity index 99% rename from addons/xterm-addon-webgl/src/GlyphRenderer.ts rename to addons/addon-webgl/src/GlyphRenderer.ts index e0669102d5..1fb0e18c54 100644 --- a/addons/xterm-addon-webgl/src/GlyphRenderer.ts +++ b/addons/addon-webgl/src/GlyphRenderer.ts @@ -8,7 +8,7 @@ import { TextureAtlas } from 'browser/renderer/shared/TextureAtlas'; import { IRasterizedGlyph, IRenderDimensions, ITextureAtlas } from 'browser/renderer/shared/Types'; import { NULL_CELL_CODE } from 'common/buffer/Constants'; import { Disposable, toDisposable } from 'common/Lifecycle'; -import { Terminal } from 'xterm'; +import { Terminal } from '@xterm/xterm'; import { IRenderModel, IWebGL2RenderingContext, IWebGLVertexArrayObject } from './Types'; import { createProgram, GLTexture, PROJECTION_MATRIX } from './WebglUtils'; diff --git a/addons/xterm-addon-webgl/src/RectangleRenderer.ts b/addons/addon-webgl/src/RectangleRenderer.ts similarity index 99% rename from addons/xterm-addon-webgl/src/RectangleRenderer.ts rename to addons/addon-webgl/src/RectangleRenderer.ts index 5e9c364eb4..2a1f53928c 100644 --- a/addons/xterm-addon-webgl/src/RectangleRenderer.ts +++ b/addons/addon-webgl/src/RectangleRenderer.ts @@ -10,7 +10,7 @@ import { ReadonlyColorSet } from 'browser/Types'; import { Attributes, FgFlags } from 'common/buffer/Constants'; import { Disposable, toDisposable } from 'common/Lifecycle'; import { IColor } from 'common/Types'; -import { Terminal } from 'xterm'; +import { Terminal } from '@xterm/xterm'; import { RENDER_MODEL_BG_OFFSET, RENDER_MODEL_FG_OFFSET, RENDER_MODEL_INDICIES_PER_CELL } from './RenderModel'; import { IRenderModel, IWebGL2RenderingContext, IWebGLVertexArrayObject } from './Types'; import { createProgram, expandFloat32Array, PROJECTION_MATRIX } from './WebglUtils'; diff --git a/addons/xterm-addon-webgl/src/RenderModel.ts b/addons/addon-webgl/src/RenderModel.ts similarity index 100% rename from addons/xterm-addon-webgl/src/RenderModel.ts rename to addons/addon-webgl/src/RenderModel.ts diff --git a/addons/xterm-addon-webgl/src/TypedArray.test.ts b/addons/addon-webgl/src/TypedArray.test.ts similarity index 100% rename from addons/xterm-addon-webgl/src/TypedArray.test.ts rename to addons/addon-webgl/src/TypedArray.test.ts diff --git a/addons/xterm-addon-webgl/src/TypedArray.ts b/addons/addon-webgl/src/TypedArray.ts similarity index 100% rename from addons/xterm-addon-webgl/src/TypedArray.ts rename to addons/addon-webgl/src/TypedArray.ts diff --git a/addons/xterm-addon-webgl/src/Types.d.ts b/addons/addon-webgl/src/Types.d.ts similarity index 100% rename from addons/xterm-addon-webgl/src/Types.d.ts rename to addons/addon-webgl/src/Types.d.ts diff --git a/addons/xterm-addon-webgl/src/WebglAddon.ts b/addons/addon-webgl/src/WebglAddon.ts similarity index 98% rename from addons/xterm-addon-webgl/src/WebglAddon.ts rename to addons/addon-webgl/src/WebglAddon.ts index 3e091f0b87..3e2925c569 100644 --- a/addons/xterm-addon-webgl/src/WebglAddon.ts +++ b/addons/addon-webgl/src/WebglAddon.ts @@ -9,7 +9,7 @@ import { EventEmitter, forwardEvent } from 'common/EventEmitter'; import { Disposable, toDisposable } from 'common/Lifecycle'; import { getSafariVersion, isSafari } from 'common/Platform'; import { ICoreService, IDecorationService, ILogService, IOptionsService } from 'common/services/Services'; -import { ITerminalAddon, Terminal } from 'xterm'; +import { ITerminalAddon, Terminal } from '@xterm/xterm'; import { WebglRenderer } from './WebglRenderer'; import { setTraceLogger } from 'common/services/LogService'; diff --git a/addons/xterm-addon-webgl/src/WebglRenderer.ts b/addons/addon-webgl/src/WebglRenderer.ts similarity index 99% rename from addons/xterm-addon-webgl/src/WebglRenderer.ts rename to addons/addon-webgl/src/WebglRenderer.ts index 5174998452..9b7d56df58 100644 --- a/addons/xterm-addon-webgl/src/WebglRenderer.ts +++ b/addons/addon-webgl/src/WebglRenderer.ts @@ -19,7 +19,7 @@ import { AttributeData } from 'common/buffer/AttributeData'; import { CellData } from 'common/buffer/CellData'; import { Attributes, Content, NULL_CELL_CHAR, NULL_CELL_CODE } from 'common/buffer/Constants'; import { ICoreService, IDecorationService, IOptionsService } from 'common/services/Services'; -import { Terminal } from 'xterm'; +import { Terminal } from '@xterm/xterm'; import { GlyphRenderer } from './GlyphRenderer'; import { RectangleRenderer } from './RectangleRenderer'; import { COMBINED_CHAR_BIT_MASK, RENDER_MODEL_BG_OFFSET, RENDER_MODEL_EXT_OFFSET, RENDER_MODEL_FG_OFFSET, RENDER_MODEL_INDICIES_PER_CELL, RenderModel } from './RenderModel'; diff --git a/addons/xterm-addon-webgl/src/WebglUtils.ts b/addons/addon-webgl/src/WebglUtils.ts similarity index 100% rename from addons/xterm-addon-webgl/src/WebglUtils.ts rename to addons/addon-webgl/src/WebglUtils.ts diff --git a/addons/xterm-addon-webgl/src/renderLayer/BaseRenderLayer.ts b/addons/addon-webgl/src/renderLayer/BaseRenderLayer.ts similarity index 99% rename from addons/xterm-addon-webgl/src/renderLayer/BaseRenderLayer.ts rename to addons/addon-webgl/src/renderLayer/BaseRenderLayer.ts index 11f96ed8cf..93e0fcb1ad 100644 --- a/addons/xterm-addon-webgl/src/renderLayer/BaseRenderLayer.ts +++ b/addons/addon-webgl/src/renderLayer/BaseRenderLayer.ts @@ -12,7 +12,7 @@ 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 { Terminal } from 'xterm'; +import { Terminal } from '@xterm/xterm'; import { IRenderLayer } from './Types'; export abstract class BaseRenderLayer extends Disposable implements IRenderLayer { diff --git a/addons/xterm-addon-webgl/src/renderLayer/LinkRenderLayer.ts b/addons/addon-webgl/src/renderLayer/LinkRenderLayer.ts similarity index 98% rename from addons/xterm-addon-webgl/src/renderLayer/LinkRenderLayer.ts rename to addons/addon-webgl/src/renderLayer/LinkRenderLayer.ts index aefc9f6ed9..0aaf5e70e3 100644 --- a/addons/xterm-addon-webgl/src/renderLayer/LinkRenderLayer.ts +++ b/addons/addon-webgl/src/renderLayer/LinkRenderLayer.ts @@ -9,7 +9,7 @@ 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 { Terminal } from 'xterm'; +import { Terminal } from '@xterm/xterm'; import { BaseRenderLayer } from './BaseRenderLayer'; export class LinkRenderLayer extends BaseRenderLayer { diff --git a/addons/xterm-addon-webgl/src/renderLayer/Types.ts b/addons/addon-webgl/src/renderLayer/Types.ts similarity index 96% rename from addons/xterm-addon-webgl/src/renderLayer/Types.ts rename to addons/addon-webgl/src/renderLayer/Types.ts index 3dbdfd9c53..feeceb145b 100644 --- a/addons/xterm-addon-webgl/src/renderLayer/Types.ts +++ b/addons/addon-webgl/src/renderLayer/Types.ts @@ -3,7 +3,7 @@ * @license MIT */ -import { IDisposable, Terminal } from 'xterm'; +import { IDisposable, Terminal } from '@xterm/xterm'; import { IRenderDimensions } from 'browser/renderer/shared/Types'; export interface IRenderLayer extends IDisposable { diff --git a/addons/xterm-addon-webgl/src/tsconfig.json b/addons/addon-webgl/src/tsconfig.json similarity index 100% rename from addons/xterm-addon-webgl/src/tsconfig.json rename to addons/addon-webgl/src/tsconfig.json diff --git a/addons/xterm-addon-webgl/test/WebglRenderer.test.ts b/addons/addon-webgl/test/WebglRenderer.test.ts similarity index 100% rename from addons/xterm-addon-webgl/test/WebglRenderer.test.ts rename to addons/addon-webgl/test/WebglRenderer.test.ts diff --git a/addons/xterm-addon-webgl/test/playwright.config.ts b/addons/addon-webgl/test/playwright.config.ts similarity index 100% rename from addons/xterm-addon-webgl/test/playwright.config.ts rename to addons/addon-webgl/test/playwright.config.ts diff --git a/addons/xterm-addon-webgl/test/tsconfig.json b/addons/addon-webgl/test/tsconfig.json similarity index 100% rename from addons/xterm-addon-webgl/test/tsconfig.json rename to addons/addon-webgl/test/tsconfig.json diff --git a/addons/xterm-addon-webgl/tsconfig.json b/addons/addon-webgl/tsconfig.json similarity index 100% rename from addons/xterm-addon-webgl/tsconfig.json rename to addons/addon-webgl/tsconfig.json diff --git a/addons/xterm-addon-webgl/typings/xterm-addon-webgl.d.ts b/addons/addon-webgl/typings/addon-webgl.d.ts similarity index 91% rename from addons/xterm-addon-webgl/typings/xterm-addon-webgl.d.ts rename to addons/addon-webgl/typings/addon-webgl.d.ts index 79108e0de0..8c5604210a 100644 --- a/addons/xterm-addon-webgl/typings/xterm-addon-webgl.d.ts +++ b/addons/addon-webgl/typings/addon-webgl.d.ts @@ -3,9 +3,9 @@ * @license MIT */ -import { Terminal, ITerminalAddon, IEvent } from 'xterm'; +import { Terminal, ITerminalAddon, IEvent } from '@xterm/xterm'; -declare module 'xterm-addon-webgl' { +declare module '@xterm/addon-webgl' { /** * An xterm.js addon that provides search functionality. */ diff --git a/addons/xterm-addon-webgl/webpack.config.js b/addons/addon-webgl/webpack.config.js similarity index 94% rename from addons/xterm-addon-webgl/webpack.config.js rename to addons/addon-webgl/webpack.config.js index 578b110263..f31ffd513e 100644 --- a/addons/xterm-addon-webgl/webpack.config.js +++ b/addons/addon-webgl/webpack.config.js @@ -6,7 +6,7 @@ const path = require('path'); const addonName = 'WebglAddon'; -const mainFile = 'xterm-addon-webgl.js'; +const mainFile = 'addon-webgl.js'; module.exports = { entry: `./out/${addonName}.js`, diff --git a/addons/xterm-addon-canvas/README.md b/addons/xterm-addon-canvas/README.md deleted file mode 100644 index bffac96ed9..0000000000 --- a/addons/xterm-addon-canvas/README.md +++ /dev/null @@ -1,28 +0,0 @@ -## xterm-addon-canvas - -An addon for [xterm.js](https://github.com/xtermjs/xterm.js) that enables a canvas-based renderer using a 2d context to draw. This addon requires xterm.js v5+. - -The purpose of this addon is to be used as a fallback for the [webgl addon](https://www.npmjs.com/package/xterm-addon-webgl) when better performance is desired over the default DOM renderer, but WebGL2 isn't supported or performant for some reason. - -### Install - -```bash -npm install --save xterm-addon-canvas -``` - -### Usage - -```ts -import { Terminal } from 'xterm'; -import { CanvasAddon } from 'xterm-addon-canvas'; - -const terminal = new Terminal(); -terminal.open(element); -terminal.loadAddon(new CanvasAddon()); -``` - -See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/xterm-addon-canvas/typings/xterm-addon-canvas.d.ts) for more advanced usage. - -### See also - -- [xterm-addon-webgl](https://www.npmjs.com/package/xterm-addon-webgl) A renderer for xterm.js that uses WebGL diff --git a/bin/package_headless.js b/bin/package_headless.js index d002a95ecd..6f891f05c9 100644 --- a/bin/package_headless.js +++ b/bin/package_headless.js @@ -14,7 +14,7 @@ console.log('> headless/package.json'); const xtermPackageJson = require('../package.json'); const xtermHeadlessPackageJson = { ...xtermPackageJson, - name: 'xterm-headless', + name: '@xterm/headless', description: 'A headless terminal component that runs in Node.js', main: 'lib-headless/xterm-headless.js', types: 'typings/xterm-headless.d.ts', diff --git a/bin/publish.js b/bin/publish.js index e9c7c3e810..4d60342d71 100644 --- a/bin/publish.js +++ b/bin/publish.js @@ -27,24 +27,26 @@ if (changedFiles.some(e => e.search(/^addons\//) === -1)) { // Publish addons if any files were changed inside of the addon const addonPackageDirs = [ - path.resolve(__dirname, '../addons/xterm-addon-attach'), - path.resolve(__dirname, '../addons/xterm-addon-canvas'), - path.resolve(__dirname, '../addons/xterm-addon-fit'), - // path.resolve(__dirname, '../addons/xterm-addon-image'), - path.resolve(__dirname, '../addons/xterm-addon-ligatures'), - path.resolve(__dirname, '../addons/xterm-addon-search'), - path.resolve(__dirname, '../addons/xterm-addon-serialize'), - path.resolve(__dirname, '../addons/xterm-addon-unicode11'), - path.resolve(__dirname, '../addons/xterm-addon-web-links'), - path.resolve(__dirname, '../addons/xterm-addon-webgl') + path.resolve(__dirname, '../addons/addon-attach'), + path.resolve(__dirname, '../addons/addon-canvas'), + path.resolve(__dirname, '../addons/addon-fit'), + // path.resolve(__dirname, '../addons/addon-image'), + path.resolve(__dirname, '../addons/addon-ligatures'), + path.resolve(__dirname, '../addons/addon-search'), + path.resolve(__dirname, '../addons/addon-serialize'), + path.resolve(__dirname, '../addons/addon-unicode11'), + // path.resolve(__dirname, '../addons/addon-unicode-graphemes'), + path.resolve(__dirname, '../addons/addon-web-links'), + path.resolve(__dirname, '../addons/addon-webgl') ]; console.log(`Checking if addons need to be published`); for (const p of addonPackageDirs) { const addon = path.basename(p); - if (changedFiles.some(e => e.includes(addon))) { + // TODO: Uncomment after first publish + // if (changedFiles.some(e => e.includes(addon))) { console.log(`Try publish ${addon}`); checkAndPublishPackage(p); - } + // } } // Publish website if it's a stable release @@ -56,8 +58,9 @@ function checkAndPublishPackage(packageDir) { const packageJson = require(path.join(packageDir, 'package.json')); // Determine if this is a stable or beta release - const publishedVersions = getPublishedVersions(packageJson); - const isStableRelease = !publishedVersions.includes(packageJson.version); + // TODO: Uncomment after first publish + // const publishedVersions = getPublishedVersions(packageJson); + const isStableRelease = false; // !publishedVersions.includes(packageJson.version); // Get the next version let nextVersion = isStableRelease ? packageJson.version : getNextBetaVersion(packageJson); @@ -70,7 +73,7 @@ function checkAndPublishPackage(packageDir) { fs.writeFileSync(packageJsonFile, JSON.stringify(packageJson, null, 2)); // Publish - const args = ['publish']; + const args = ['publish', '--access', 'public']; if (!isStableRelease) { args.push('--tag', 'beta'); } @@ -94,8 +97,7 @@ function checkAndPublishPackage(packageDir) { function getNextBetaVersion(packageJson) { if (!/^\d+\.\d+\.\d+$/.exec(packageJson.version)) { - console.error('The package.json version must be of the form x.y.z'); - process.exit(1); + throw new Error('The package.json version must be of the form x.y.z'); } const tag = 'beta'; const stableVersion = packageJson.version.split('.'); @@ -116,6 +118,9 @@ function getNextBetaVersion(packageJson) { function getPublishedVersions(packageJson, version, tag) { const versionsProcess = cp.spawnSync('npm', ['view', packageJson.name, 'versions', '--json']); const versionsJson = JSON.parse(versionsProcess.stdout); + if (!versionsJson || !Array.isArray(versionsJson) || versionsJson.length === 0) { + return []; + } if (tag) { return versionsJson.filter(v => !v.search(new RegExp(`${version}-${tag}.[0-9]+`))); } diff --git a/bin/test_playwright.js b/bin/test_playwright.js index 02c2a76327..0cd6f85cf6 100644 --- a/bin/test_playwright.js +++ b/bin/test_playwright.js @@ -19,8 +19,8 @@ while (argv.some(e => e.startsWith('--suite='))) { let configs = [ { name: 'core', path: 'out-test/playwright/playwright.config.js' }, - { name: 'xterm-addon-canvas', path: 'addons/xterm-addon-canvas/out-test/playwright.config.js' }, - { name: 'xterm-addon-webgl', path: 'addons/xterm-addon-webgl/out-test/playwright.config.js' } + { name: 'addon-canvas', path: 'addons/addon-canvas/out-test/playwright.config.js' }, + { name: 'addon-webgl', path: 'addons/addon-webgl/out-test/playwright.config.js' } ]; if (suiteFilter) { diff --git a/demo/client.ts b/demo/client.ts index a1145ab9a8..7e0830a583 100644 --- a/demo/client.ts +++ b/demo/client.ts @@ -10,41 +10,41 @@ // Use tsc version (yarn watch) import { Terminal } from '../out/browser/public/Terminal'; -import { AttachAddon } from '../addons/xterm-addon-attach/out/AttachAddon'; -import { CanvasAddon } from '../addons/xterm-addon-canvas/out/CanvasAddon'; -import { FitAddon } from '../addons/xterm-addon-fit/out/FitAddon'; -import { SearchAddon, ISearchOptions } from '../addons/xterm-addon-search/out/SearchAddon'; -import { SerializeAddon } from '../addons/xterm-addon-serialize/out/SerializeAddon'; -import { WebLinksAddon } from '../addons/xterm-addon-web-links/out/WebLinksAddon'; -import { WebglAddon } from '../addons/xterm-addon-webgl/out/WebglAddon'; -import { Unicode11Addon } from '../addons/xterm-addon-unicode11/out/Unicode11Addon'; -import { UnicodeGraphemesAddon } from '../addons/xterm-addon-unicode-graphemes/out/UnicodeGraphemesAddon'; -import { LigaturesAddon } from '../addons/xterm-addon-ligatures/out/LigaturesAddon'; +import { AttachAddon } from '../addons/addon-attach/out/AttachAddon'; +import { CanvasAddon } from '../addons/addon-canvas/out/CanvasAddon'; +import { FitAddon } from '../addons/addon-fit/out/FitAddon'; +import { SearchAddon, ISearchOptions } from '../addons/addon-search/out/SearchAddon'; +import { SerializeAddon } from '../addons/addon-serialize/out/SerializeAddon'; +import { WebLinksAddon } from '../addons/addon-web-links/out/WebLinksAddon'; +import { WebglAddon } from '../addons/addon-webgl/out/WebglAddon'; +import { Unicode11Addon } from '../addons/addon-unicode11/out/Unicode11Addon'; +import { UnicodeGraphemesAddon } from '../addons/addon-unicode-graphemes/out/UnicodeGraphemesAddon'; +import { LigaturesAddon } from '../addons/addon-ligatures/out/LigaturesAddon'; // Playwright/WebKit on Windows does not support WebAssembly https://stackoverflow.com/q/62311688/1156119 -import type { ImageAddonType, IImageAddonOptions } from '../addons/xterm-addon-image/out/ImageAddon'; +import type { ImageAddonType, IImageAddonOptions } from '../addons/addon-image/out/ImageAddon'; let ImageAddon: ImageAddonType | undefined; // eslint-disable-line @typescript-eslint/naming-convention if ('WebAssembly' in window) { - const imageAddon = require('../addons/xterm-addon-image/out/ImageAddon'); + const imageAddon = require('../addons/addon-image/out/ImageAddon'); ImageAddon = imageAddon.ImageAddon; } // Use webpacked version (yarn package) // import { Terminal } from '../lib/xterm'; -// import { AttachAddon } from 'xterm-addon-attach'; -// import { FitAddon } from 'xterm-addon-fit'; -// import { ImageAddon } from 'xterm-addon-image'; -// import { SearchAddon, ISearchOptions } from 'xterm-addon-search'; -// import { SerializeAddon } from 'xterm-addon-serialize'; -// import { WebLinksAddon } from 'xterm-addon-web-links'; -// import { WebglAddon } from 'xterm-addon-webgl'; -// import { Unicode11Addon } from 'xterm-addon-unicode11'; -// import { UnicodeGraphemesAddon } from 'xterm-addon-unicode-graphemes'; -// import { LigaturesAddon } from 'xterm-addon-ligatures'; +// import { AttachAddon } from '@xterm/addon-attach'; +// import { FitAddon } from '@xterm/addon-fit'; +// import { ImageAddon } from '@xterm/addon-image'; +// import { SearchAddon, ISearchOptions } from '@xterm/addon-search'; +// import { SerializeAddon } from '@xterm/addon-serialize'; +// import { WebLinksAddon } from '@xterm/addon-web-links'; +// import { WebglAddon } from '@@xterm/addon-webgl'; +// import { Unicode11Addon } from '@xterm/addon-unicode11'; +// import { UnicodeGraphemesAddon } from '@xterm/addon-unicode-graphemes'; +// import { LigaturesAddon } from '@xterm/addon-ligatures'; // Pulling in the module's types relies on the above, it's looks a // little weird here as we're importing "this" module -import { Terminal as TerminalType, ITerminalOptions } from 'xterm'; +import { Terminal as TerminalType, ITerminalOptions } from '@xterm/xterm'; export interface IWindowWithTerminal extends Window { term: TerminalType; diff --git a/demo/tsconfig.json b/demo/tsconfig.json index f728f20e9c..f0aebb1f3b 100644 --- a/demo/tsconfig.json +++ b/demo/tsconfig.json @@ -6,13 +6,13 @@ "sourceMap": true, "baseUrl": ".", "paths": { - "xterm-addon-attach": ["../addons/xterm-addon-attach"], - "xterm-addon-fit": ["../addons/xterm-addon-fit"], - "xterm-addon-image": ["../addons/xterm-addon-image"], - "xterm-addon-search": ["../addons/xterm-addon-search"], - "xterm-addon-serialize": ["../addons/xterm-addon-serialize"], - "xterm-addon-web-links": ["../addons/xterm-addon-web-links"], - "xterm-addon-webgl": ["../addons/xterm-addon-webgl"] + "addon-attach": ["../addons/addon-attach"], + "addon-fit": ["../addons/addon-fit"], + "addon-image": ["../addons/addon-image"], + "addon-search": ["../addons/addon-search"], + "addon-serialize": ["../addons/addon-serialize"], + "addon-web-links": ["../addons/addon-web-links"], + "addon-webgl": ["../addons/addon-webgl"] } }, "include": [ diff --git a/headless/README.md b/headless/README.md index 1d2d61568c..205fd79c55 100644 --- a/headless/README.md +++ b/headless/README.md @@ -15,7 +15,7 @@ npm install xterm-headless Then import as you would a regular node package. The recommended way to load `xterm-headless` is with TypeScript and the ES6 module syntax: ```javascript -import { Terminal } from 'xterm-headless'; +import { Terminal } from '@xterm/headless'; ``` ## API diff --git a/package.json b/package.json index 70e0f4a961..d0510e5d1a 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "xterm", + "name": "@xterm/xterm", "description": "Full xterm terminal, in your browser", "version": "5.3.0", "main": "lib/xterm.js", diff --git a/src/browser/Terminal.ts b/src/browser/Terminal.ts index b64c3b1d97..0413b9062c 100644 --- a/src/browser/Terminal.ts +++ b/src/browser/Terminal.ts @@ -54,7 +54,7 @@ import { evaluateKeyboardEvent } from 'common/input/Keyboard'; import { toRgbString } from 'common/input/XParseColor'; import { DecorationService } from 'common/services/DecorationService'; import { IDecorationService } from 'common/services/Services'; -import { IDecoration, IDecorationOptions, IDisposable, ILinkProvider, IMarker } from 'xterm'; +import { IDecoration, IDecorationOptions, IDisposable, ILinkProvider, IMarker } from '@xterm/xterm'; import { WindowsOptionsReportType } from '../common/InputHandler'; import { AccessibilityManager } from './AccessibilityManager'; diff --git a/src/browser/Terminal2.test.ts b/src/browser/Terminal2.test.ts index 4965e8f361..abbb42d3cd 100644 --- a/src/browser/Terminal2.test.ts +++ b/src/browser/Terminal2.test.ts @@ -9,7 +9,7 @@ import * as os from 'os'; import * as fs from 'fs'; import * as pty from 'node-pty'; import { Terminal } from 'browser/Terminal'; -import { IDisposable } from 'xterm'; +import { IDisposable } from '@xterm/xterm'; // all test files expect terminal in 80x25 const COLS = 80; diff --git a/src/browser/TestUtils.test.ts b/src/browser/TestUtils.test.ts index d557cd989f..7e43017a0c 100644 --- a/src/browser/TestUtils.test.ts +++ b/src/browser/TestUtils.test.ts @@ -3,7 +3,7 @@ * @license MIT */ -import { IDisposable, IMarker, ILinkProvider, IDecorationOptions, IDecoration } from 'xterm'; +import { IDisposable, IMarker, ILinkProvider, IDecorationOptions, IDecoration } from '@xterm/xterm'; import { IEvent, EventEmitter } from 'common/EventEmitter'; import { ICharacterJoinerService, ICharSizeService, ICoreBrowserService, IMouseService, IRenderService, ISelectionService, IThemeService } from 'browser/services/Services'; import { IRenderDimensions, IRenderer, IRequestRedrawEvent } from 'browser/renderer/shared/Types'; diff --git a/src/browser/Types.d.ts b/src/browser/Types.d.ts index f2b5e220f4..b1f31b205b 100644 --- a/src/browser/Types.d.ts +++ b/src/browser/Types.d.ts @@ -6,7 +6,7 @@ import { IEvent } from 'common/EventEmitter'; import { CharData, IColor, ICoreTerminal, ITerminalOptions } from 'common/Types'; import { IBuffer } from 'common/buffer/Types'; -import { IDisposable, Terminal as ITerminalApi } from 'xterm'; +import { IDisposable, Terminal as ITerminalApi } from '@xterm/xterm'; import { IMouseService, IRenderService } from './services/Services'; /** diff --git a/src/browser/public/Terminal.ts b/src/browser/public/Terminal.ts index 2c75d7b808..6f009f74f2 100644 --- a/src/browser/public/Terminal.ts +++ b/src/browser/public/Terminal.ts @@ -13,7 +13,7 @@ import { AddonManager } from 'common/public/AddonManager'; import { BufferNamespaceApi } from 'common/public/BufferNamespaceApi'; import { ParserApi } from 'common/public/ParserApi'; import { UnicodeApi } from 'common/public/UnicodeApi'; -import { IBufferNamespace as IBufferNamespaceApi, IDecoration, IDecorationOptions, IDisposable, ILinkProvider, ILocalizableStrings, IMarker, IModes, IParser, ITerminalAddon, Terminal as ITerminalApi, ITerminalInitOnlyOptions, IUnicodeHandling } from 'xterm'; +import { IBufferNamespace as IBufferNamespaceApi, IDecoration, IDecorationOptions, IDisposable, ILinkProvider, ILocalizableStrings, IMarker, IModes, IParser, ITerminalAddon, Terminal as ITerminalApi, ITerminalInitOnlyOptions, IUnicodeHandling } from '@xterm/xterm'; /** * The set of options that only have an effect when set in the Terminal constructor. diff --git a/src/browser/renderer/shared/CellColorResolver.ts b/src/browser/renderer/shared/CellColorResolver.ts index 66e6a344e0..72a9fa3038 100644 --- a/src/browser/renderer/shared/CellColorResolver.ts +++ b/src/browser/renderer/shared/CellColorResolver.ts @@ -4,7 +4,7 @@ import { ReadonlyColorSet } from 'browser/Types'; import { Attributes, BgFlags, FgFlags } from 'common/buffer/Constants'; import { IDecorationService } from 'common/services/Services'; import { ICellData } from 'common/Types'; -import { Terminal } from 'xterm'; +import { Terminal } from '@xterm/xterm'; // Work variables to avoid garbage collection let $fg = 0; diff --git a/src/browser/renderer/shared/CharAtlasCache.ts b/src/browser/renderer/shared/CharAtlasCache.ts index 6734391295..0a8714832a 100644 --- a/src/browser/renderer/shared/CharAtlasCache.ts +++ b/src/browser/renderer/shared/CharAtlasCache.ts @@ -4,7 +4,7 @@ */ import { TextureAtlas } from 'browser/renderer/shared/TextureAtlas'; -import { ITerminalOptions, Terminal } from 'xterm'; +import { ITerminalOptions, Terminal } from '@xterm/xterm'; import { ITerminal, ReadonlyColorSet } from 'browser/Types'; import { ICharAtlasConfig, ITextureAtlas } from 'browser/renderer/shared/Types'; import { generateConfig, configEquals } from 'browser/renderer/shared/CharAtlasUtils'; diff --git a/src/browser/renderer/shared/CharAtlasUtils.ts b/src/browser/renderer/shared/CharAtlasUtils.ts index 955bd4e6e2..f8fe9104fb 100644 --- a/src/browser/renderer/shared/CharAtlasUtils.ts +++ b/src/browser/renderer/shared/CharAtlasUtils.ts @@ -5,7 +5,7 @@ import { ICharAtlasConfig } from './Types'; import { Attributes } from 'common/buffer/Constants'; -import { ITerminalOptions } from 'xterm'; +import { ITerminalOptions } from '@xterm/xterm'; import { IColorSet, ReadonlyColorSet } from 'browser/Types'; import { NULL_COLOR } from 'common/Color'; diff --git a/src/browser/renderer/shared/SelectionRenderModel.ts b/src/browser/renderer/shared/SelectionRenderModel.ts index db37577885..1568ad8b95 100644 --- a/src/browser/renderer/shared/SelectionRenderModel.ts +++ b/src/browser/renderer/shared/SelectionRenderModel.ts @@ -4,7 +4,7 @@ */ import { ISelectionRenderModel } from 'browser/renderer/shared/Types'; -import { Terminal } from 'xterm'; +import { Terminal } from '@xterm/xterm'; class SelectionRenderModel implements ISelectionRenderModel { public hasSelection!: boolean; diff --git a/src/browser/renderer/shared/Types.d.ts b/src/browser/renderer/shared/Types.d.ts index a7e55e72cd..029ac88aac 100644 --- a/src/browser/renderer/shared/Types.d.ts +++ b/src/browser/renderer/shared/Types.d.ts @@ -3,7 +3,7 @@ * @license MIT */ -import { FontWeight, Terminal } from 'xterm'; +import { FontWeight, Terminal } from '@xterm/xterm'; import { IColorSet } from 'browser/Types'; import { IDisposable } from 'common/Types'; import { IEvent } from 'common/EventEmitter'; diff --git a/src/common/InputHandler.ts b/src/common/InputHandler.ts index b5c91bfba7..a3b8fbecdb 100644 --- a/src/common/InputHandler.ts +++ b/src/common/InputHandler.ts @@ -49,7 +49,7 @@ const GLEVEL: { [key: string]: number } = { '(': 0, ')': 1, '*': 2, '+': 3, '-': /** * Document xterm VT features here that are currently unsupported */ -// @vt: #E[Supported via xterm-addon-image.] DCS SIXEL "SIXEL Graphics" "DCS Ps ; Ps ; Ps ; q Pt ST" "Draw SIXEL image." +// @vt: #E[Supported via @xterm/addon-image.] DCS SIXEL "SIXEL Graphics" "DCS Ps ; Ps ; Ps ; q Pt ST" "Draw SIXEL image." // @vt: #N DCS DECUDK "User Defined Keys" "DCS Ps ; Ps \| Pt ST" "Definitions for user-defined keys." // @vt: #N DCS XTGETTCAP "Request Terminfo String" "DCS + q Pt ST" "Request Terminfo String." // @vt: #N DCS XTSETTCAP "Set Terminfo Data" "DCS + p Pt ST" "Set Terminfo Data." diff --git a/src/common/TestUtils.test.ts b/src/common/TestUtils.test.ts index 8e57664e97..39e13fbac3 100644 --- a/src/common/TestUtils.test.ts +++ b/src/common/TestUtils.test.ts @@ -12,7 +12,7 @@ import { IBufferSet, IBuffer } from 'common/buffer/Types'; import { BufferSet } from 'common/buffer/BufferSet'; import { IDecPrivateModes, ICoreMouseEvent, CoreMouseEventType, ICharset, IModes, IAttributeData, IOscLinkData, IDisposable } from 'common/Types'; import { UnicodeV6 } from 'common/input/UnicodeV6'; -import { IDecorationOptions, IDecoration } from 'xterm'; +import { IDecorationOptions, IDecoration } from '@xterm/xterm'; export class MockBufferService implements IBufferService { public serviceBrand: any; diff --git a/src/common/Types.d.ts b/src/common/Types.d.ts index fc8fdf4e61..14dee97212 100644 --- a/src/common/Types.d.ts +++ b/src/common/Types.d.ts @@ -9,7 +9,7 @@ import { Attributes, UnderlineStyle } from 'common/buffer/Constants'; // eslint- import { IBufferSet } from 'common/buffer/Types'; import { IParams } from 'common/parser/Types'; import { ICoreMouseService, ICoreService, IOptionsService, IUnicodeService } from 'common/services/Services'; -import { IFunctionIdentifier, ITerminalOptions as IPublicTerminalOptions } from 'xterm'; +import { IFunctionIdentifier, ITerminalOptions as IPublicTerminalOptions } from '@xterm/xterm'; export interface ICoreTerminal { coreMouseService: ICoreMouseService; diff --git a/src/common/buffer/BufferRange.test.ts b/src/common/buffer/BufferRange.test.ts index 69aacd994e..15d1b83176 100644 --- a/src/common/buffer/BufferRange.test.ts +++ b/src/common/buffer/BufferRange.test.ts @@ -5,7 +5,7 @@ import { assert } from 'chai'; import { getRangeLength } from 'common/buffer/BufferRange'; -import { IBufferRange } from 'xterm'; +import { IBufferRange } from '@xterm/xterm'; describe('BufferRange', () => { describe('getRangeLength', () => { diff --git a/src/common/buffer/BufferRange.ts b/src/common/buffer/BufferRange.ts index a49cf48112..aa7ee4050a 100644 --- a/src/common/buffer/BufferRange.ts +++ b/src/common/buffer/BufferRange.ts @@ -3,7 +3,7 @@ * @license MIT */ -import { IBufferRange } from 'xterm'; +import { IBufferRange } from '@xterm/xterm'; export function getRangeLength(range: IBufferRange, bufferCols: number): number { if (range.start.y > range.end.y) { diff --git a/src/common/public/AddonManager.test.ts b/src/common/public/AddonManager.test.ts index e947976ac3..239952eec6 100644 --- a/src/common/public/AddonManager.test.ts +++ b/src/common/public/AddonManager.test.ts @@ -5,7 +5,7 @@ import { assert } from 'chai'; import { AddonManager, ILoadedAddon } from './AddonManager'; -import { ITerminalAddon } from 'xterm'; +import { ITerminalAddon } from '@xterm/xterm'; class TestAddonManager extends AddonManager { public get addons(): ILoadedAddon[] { diff --git a/src/common/public/AddonManager.ts b/src/common/public/AddonManager.ts index af04a26964..9a36e2a0ee 100644 --- a/src/common/public/AddonManager.ts +++ b/src/common/public/AddonManager.ts @@ -3,7 +3,7 @@ * @license MIT */ -import { ITerminalAddon, IDisposable, Terminal } from 'xterm'; +import { ITerminalAddon, IDisposable, Terminal } from '@xterm/xterm'; export interface ILoadedAddon { instance: ITerminalAddon; diff --git a/src/common/public/BufferApiView.ts b/src/common/public/BufferApiView.ts index ca9ef2d8f4..834cedbee4 100644 --- a/src/common/public/BufferApiView.ts +++ b/src/common/public/BufferApiView.ts @@ -3,7 +3,7 @@ * @license MIT */ -import { IBuffer as IBufferApi, IBufferLine as IBufferLineApi, IBufferCell as IBufferCellApi } from 'xterm'; +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'; diff --git a/src/common/public/BufferLineApiView.ts b/src/common/public/BufferLineApiView.ts index 60375015d6..560dd0bfd9 100644 --- a/src/common/public/BufferLineApiView.ts +++ b/src/common/public/BufferLineApiView.ts @@ -5,7 +5,7 @@ import { CellData } from 'common/buffer/CellData'; import { IBufferLine, ICellData } from 'common/Types'; -import { IBufferCell as IBufferCellApi, IBufferLine as IBufferLineApi } from 'xterm'; +import { IBufferCell as IBufferCellApi, IBufferLine as IBufferLineApi } from '@xterm/xterm'; export class BufferLineApiView implements IBufferLineApi { constructor(private _line: IBufferLine) { } diff --git a/src/common/public/BufferNamespaceApi.ts b/src/common/public/BufferNamespaceApi.ts index aeaa4ac841..cef0ed164b 100644 --- a/src/common/public/BufferNamespaceApi.ts +++ b/src/common/public/BufferNamespaceApi.ts @@ -3,7 +3,7 @@ * @license MIT */ -import { IBuffer as IBufferApi, IBufferNamespace as IBufferNamespaceApi } from 'xterm'; +import { IBuffer as IBufferApi, IBufferNamespace as IBufferNamespaceApi } from '@xterm/xterm'; import { BufferApiView } from 'common/public/BufferApiView'; import { EventEmitter } from 'common/EventEmitter'; import { ICoreTerminal } from 'common/Types'; diff --git a/src/common/public/ParserApi.ts b/src/common/public/ParserApi.ts index 67df4be532..afcc01beb9 100644 --- a/src/common/public/ParserApi.ts +++ b/src/common/public/ParserApi.ts @@ -4,7 +4,7 @@ */ import { IParams } from 'common/parser/Types'; -import { IDisposable, IFunctionIdentifier, IParser } from 'xterm'; +import { IDisposable, IFunctionIdentifier, IParser } from '@xterm/xterm'; import { ICoreTerminal } from 'common/Types'; export class ParserApi implements IParser { diff --git a/src/common/public/UnicodeApi.ts b/src/common/public/UnicodeApi.ts index 8a669a0528..ec9bd1f776 100644 --- a/src/common/public/UnicodeApi.ts +++ b/src/common/public/UnicodeApi.ts @@ -4,7 +4,7 @@ */ import { ICoreTerminal } from 'common/Types'; -import { IUnicodeHandling, IUnicodeVersionProvider } from 'xterm'; +import { IUnicodeHandling, IUnicodeVersionProvider } from '@xterm/xterm'; export class UnicodeApi implements IUnicodeHandling { constructor(private _core: ICoreTerminal) { } diff --git a/src/common/services/DecorationService.ts b/src/common/services/DecorationService.ts index 36faa5094b..da75915276 100644 --- a/src/common/services/DecorationService.ts +++ b/src/common/services/DecorationService.ts @@ -9,7 +9,7 @@ import { Disposable, toDisposable } from 'common/Lifecycle'; import { IDecorationService, IInternalDecoration } from 'common/services/Services'; import { SortedList } from 'common/SortedList'; import { IColor } from 'common/Types'; -import { IDecoration, IDecorationOptions, IMarker } from 'xterm'; +import { IDecoration, IDecorationOptions, IMarker } from '@xterm/xterm'; // Work variables to avoid garbage collection let $xmin = 0; diff --git a/src/common/services/Services.ts b/src/common/services/Services.ts index 6ac73e37a9..304e8cbb4c 100644 --- a/src/common/services/Services.ts +++ b/src/common/services/Services.ts @@ -7,7 +7,7 @@ import { IEvent, IEventEmitter } from 'common/EventEmitter'; import { IBuffer, IBufferSet } from 'common/buffer/Types'; import { IDecPrivateModes, ICoreMouseEvent, CoreMouseEncoding, ICoreMouseProtocol, CoreMouseEventType, ICharset, IWindowOptions, IModes, IAttributeData, ScrollSource, IDisposable, IColor, CursorStyle, CursorInactiveStyle, IOscLinkData } from 'common/Types'; import { createDecorator } from 'common/services/ServiceRegistry'; -import { IDecorationOptions, IDecoration, ILinkHandler, IWindowsPty, ILogger } from 'xterm'; +import { IDecorationOptions, IDecoration, ILinkHandler, IWindowsPty, ILogger } from '@xterm/xterm'; export const IBufferService = createDecorator('BufferService'); export interface IBufferService { diff --git a/src/headless/public/Terminal.test.ts b/src/headless/public/Terminal.test.ts index f869a991d2..2175c6684f 100644 --- a/src/headless/public/Terminal.test.ts +++ b/src/headless/public/Terminal.test.ts @@ -5,7 +5,7 @@ import { deepStrictEqual, strictEqual, throws } from 'assert'; import { Terminal } from 'headless/public/Terminal'; -import { ITerminalOptions } from 'xterm-headless'; +import { ITerminalOptions } from '@xterm/headless'; let term: Terminal; diff --git a/src/headless/public/Terminal.ts b/src/headless/public/Terminal.ts index b018d37caf..df202660f8 100644 --- a/src/headless/public/Terminal.ts +++ b/src/headless/public/Terminal.ts @@ -7,7 +7,7 @@ import { IEvent } from 'common/EventEmitter'; import { BufferNamespaceApi } from 'common/public/BufferNamespaceApi'; import { ParserApi } from 'common/public/ParserApi'; import { UnicodeApi } from 'common/public/UnicodeApi'; -import { IBufferNamespace as IBufferNamespaceApi, IMarker, IModes, IParser, ITerminalAddon, ITerminalInitOnlyOptions, IUnicodeHandling, Terminal as ITerminalApi } from 'xterm-headless'; +import { IBufferNamespace as IBufferNamespaceApi, IMarker, IModes, IParser, ITerminalAddon, ITerminalInitOnlyOptions, IUnicodeHandling, Terminal as ITerminalApi } from '@xterm/headless'; import { Terminal as TerminalCore } from 'headless/Terminal'; import { AddonManager } from 'common/public/AddonManager'; import { ITerminalOptions } from 'common/Types'; diff --git a/src/headless/tsconfig.json b/src/headless/tsconfig.json index b579af97c0..e48c4fd5b6 100644 --- a/src/headless/tsconfig.json +++ b/src/headless/tsconfig.json @@ -17,7 +17,7 @@ }, "include": [ "./**/*", - "../../typings/xterm.d.ts", // common/Types.d.ts imports from 'xterm' + "../../typings/xterm.d.ts", // common/Types.d.ts imports from '@xterm/xterm' "../../typings/xterm-headless.d.ts" ], "references": [ diff --git a/test/api/TestUtils.ts b/test/api/TestUtils.ts index 288a3c0719..9ebf67b6a1 100644 --- a/test/api/TestUtils.ts +++ b/test/api/TestUtils.ts @@ -5,7 +5,7 @@ import * as playwright from '@playwright/test'; import deepEqual = require('deep-equal'); -import { ITerminalInitOnlyOptions, ITerminalOptions } from 'xterm'; +import { ITerminalInitOnlyOptions, ITerminalOptions } from '@xterm/xterm'; import { deepStrictEqual } from 'assert'; export async function pollFor(page: playwright.Page, evalOrFn: string | (() => Promise), val: T, preFn?: () => Promise, maxDuration?: number): Promise { diff --git a/test/playwright/MouseTracking.test.ts b/test/playwright/MouseTracking.test.ts index dbce55cde8..1cefd7cd19 100644 --- a/test/playwright/MouseTracking.test.ts +++ b/test/playwright/MouseTracking.test.ts @@ -4,7 +4,7 @@ */ import { test } from '@playwright/test'; import { deepStrictEqual, ok, strictEqual } from 'assert'; -import type { IDisposable } from 'xterm'; +import type { IDisposable } from '@xterm/xterm'; import { createTestContext, ITestContext, openTerminal, pollFor } from './TestUtils'; let ctx: ITestContext; diff --git a/test/playwright/Parser.test.ts b/test/playwright/Parser.test.ts index 42406270b4..b793b00eef 100644 --- a/test/playwright/Parser.test.ts +++ b/test/playwright/Parser.test.ts @@ -4,7 +4,7 @@ */ import { test } from '@playwright/test'; import { deepStrictEqual, ok, strictEqual } from 'assert'; -import type { IDisposable } from 'xterm'; +import type { IDisposable } from '@xterm/xterm'; import { createTestContext, ITestContext, openTerminal, pollFor } from './TestUtils'; let ctx: ITestContext; diff --git a/test/playwright/SharedRendererTests.ts b/test/playwright/SharedRendererTests.ts index eaa54d129f..377be16314 100644 --- a/test/playwright/SharedRendererTests.ts +++ b/test/playwright/SharedRendererTests.ts @@ -5,7 +5,7 @@ import { IImage32, decodePng } from '@lunapaint/png-codec'; import { LocatorScreenshotOptions, test } from '@playwright/test'; -import { ITheme } from 'xterm'; +import { ITheme } from '@xterm/xterm'; import { ITestContext, MaybeAsync, openTerminal, pollFor, pollForApproximate } from './TestUtils'; export interface ISharedRendererTestContext { diff --git a/test/playwright/TestUtils.ts b/test/playwright/TestUtils.ts index 0a51757fac..3e925f79c9 100644 --- a/test/playwright/TestUtils.ts +++ b/test/playwright/TestUtils.ts @@ -10,7 +10,7 @@ import type { IRenderService } from 'browser/services/Services'; import type { ICoreTerminal, IMarker } from 'common/Types'; import * as playwright from '@playwright/test'; import { PageFunction } from 'playwright-core/types/structs'; -import { IBuffer, IBufferCell, IBufferLine, IBufferNamespace, IBufferRange, IDecoration, IDecorationOptions, IModes, ITerminalInitOnlyOptions, ITerminalOptions, Terminal } from 'xterm'; +import { IBuffer, IBufferCell, IBufferLine, IBufferNamespace, IBufferRange, IDecoration, IDecorationOptions, IModes, ITerminalInitOnlyOptions, ITerminalOptions, Terminal } from '@xterm/xterm'; import { EventEmitter } from '../../out/common/EventEmitter'; export interface ITestContext { diff --git a/tsconfig.all.json b/tsconfig.all.json index 5d8af629c0..e2028479d5 100644 --- a/tsconfig.all.json +++ b/tsconfig.all.json @@ -7,16 +7,16 @@ { "path": "./test/api" }, { "path": "./test/benchmark" }, { "path": "./test/playwright" }, - { "path": "./addons/xterm-addon-attach" }, - { "path": "./addons/xterm-addon-canvas" }, - { "path": "./addons/xterm-addon-fit" }, - { "path": "./addons/xterm-addon-image" }, - { "path": "./addons/xterm-addon-ligatures" }, - { "path": "./addons/xterm-addon-search" }, - { "path": "./addons/xterm-addon-serialize" }, - { "path": "./addons/xterm-addon-unicode11" }, - { "path": "./addons/xterm-addon-unicode-graphemes" }, - { "path": "./addons/xterm-addon-web-links" }, - { "path": "./addons/xterm-addon-webgl" } + { "path": "./addons/addon-attach" }, + { "path": "./addons/addon-canvas" }, + { "path": "./addons/addon-fit" }, + { "path": "./addons/addon-image" }, + { "path": "./addons/addon-ligatures" }, + { "path": "./addons/addon-search" }, + { "path": "./addons/addon-serialize" }, + { "path": "./addons/addon-unicode11" }, + { "path": "./addons/addon-unicode-graphemes" }, + { "path": "./addons/addon-web-links" }, + { "path": "./addons/addon-webgl" } ] } diff --git a/typings/xterm-headless.d.ts b/typings/xterm-headless.d.ts index 99aa8237fe..f8cef382f3 100644 --- a/typings/xterm-headless.d.ts +++ b/typings/xterm-headless.d.ts @@ -7,7 +7,7 @@ * to be stable and consumed by external programs. */ -declare module 'xterm-headless' { +declare module '@xterm/headless' { /** * A string representing log level. */ diff --git a/typings/xterm.d.ts b/typings/xterm.d.ts index b8c1145549..70b0c6d71f 100644 --- a/typings/xterm.d.ts +++ b/typings/xterm.d.ts @@ -9,7 +9,7 @@ /// -declare module 'xterm' { +declare module '@xterm/xterm' { /** * A string or number representing text font weight. */