Skip to content

Commit 387ec93

Browse files
committed
Merge remote-tracking branch 'upstream/master' into anthonykim1/scaffoldKittyAddon
2 parents 6b64660 + 4388a4a commit 387ec93

54 files changed

Lines changed: 484 additions & 120 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/hooks/setupRepo.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"hooks": {
3+
"SessionStart": [
4+
{
5+
"type": "command",
6+
"command": "npm run agent:setup-repo"
7+
}
8+
]
9+
}
10+
}

addons/addon-attach/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"xterm.js"
1717
],
1818
"scripts": {
19-
"build": "../../node_modules/.bin/tsc -p .",
19+
"build": "../../node_modules/.bin/tsgo -p .",
2020
"prepackage": "npm run build",
2121
"package": "../../node_modules/.bin/webpack",
2222
"prepublishOnly": "npm run package",

addons/addon-attach/test/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@
99
"outDir": "../out-test",
1010
"sourceMap": true,
1111
"removeComments": true,
12-
"baseUrl": ".",
1312
"paths": {
1413
"common/*": [
1514
"../../../src/common/*"
1615
],
1716
"browser/*": [
1817
"../../../src/browser/*"
18+
],
19+
"*": [
20+
"./*"
1921
]
2022
},
2123
"strict": true,

addons/addon-clipboard/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"xterm.js"
1717
],
1818
"scripts": {
19-
"build": "../../node_modules/.bin/tsc -p .",
19+
"build": "../../node_modules/.bin/tsgo -p .",
2020
"prepackage": "npm run build",
2121
"package": "../../node_modules/.bin/webpack",
2222
"prepublishOnly": "npm run package",

addons/addon-clipboard/test/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@
99
"outDir": "../out-test",
1010
"sourceMap": true,
1111
"removeComments": true,
12-
"baseUrl": ".",
1312
"paths": {
1413
"common/*": [
1514
"../../../src/common/*"
1615
],
1716
"browser/*": [
1817
"../../../src/browser/*"
18+
],
19+
"*": [
20+
"./*"
1921
]
2022
},
2123
"strict": true,

addons/addon-fit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"xterm.js"
1717
],
1818
"scripts": {
19-
"build": "../../node_modules/.bin/tsc -p .",
19+
"build": "../../node_modules/.bin/tsgo -p .",
2020
"prepackage": "npm run build",
2121
"package": "../../node_modules/.bin/webpack",
2222
"prepublishOnly": "npm run package",

addons/addon-fit/test/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@
99
"outDir": "../out-test",
1010
"sourceMap": true,
1111
"removeComments": true,
12-
"baseUrl": ".",
1312
"paths": {
1413
"common/*": [
1514
"../../../src/common/*"
1615
],
1716
"browser/*": [
1817
"../../../src/browser/*"
18+
],
19+
"*": [
20+
"./*"
1921
]
2022
},
2123
"strict": true,

addons/addon-image/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"xterm.js"
1919
],
2020
"scripts": {
21-
"prepackage": "../../node_modules/.bin/tsc -p .",
21+
"prepackage": "../../node_modules/.bin/tsgo -p .",
2222
"package": "../../node_modules/.bin/webpack",
2323
"prepublishOnly": "npm run package",
2424
"start": "node ../../demo/start"

addons/addon-image/src/IIPHandler.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
*/
55
import { IImageAddonOptions, IOscHandler, IResetHandler, ITerminalExt } from './Types';
66
import { ImageRenderer } from './ImageRenderer';
7-
import { ImageStorage, CELL_SIZE_DEFAULT } from './ImageStorage';
7+
import { IIPImageStorage } from './IIPImageStorage';
8+
import { CELL_SIZE_DEFAULT } from './ImageStorage';
89
import Base64Decoder from 'xterm-wasm-parts/lib/base64/Base64Decoder.wasm';
910
import { HeaderParser, IHeaderFields, HeaderState } from './IIPHeaderParser';
1011
import { imageType, UNSUPPORTED_TYPE } from './IIPMetrics';
@@ -40,7 +41,7 @@ export class IIPHandler implements IOscHandler, IResetHandler {
4041
constructor(
4142
private readonly _opts: IImageAddonOptions,
4243
private readonly _renderer: ImageRenderer,
43-
private readonly _storage: ImageStorage,
44+
private readonly _storage: IIPImageStorage,
4445
private readonly _coreTerminal: ITerminalExt
4546
) {
4647
const maxEncodedBytes = Math.ceil(this._opts.iipSizeLimit * 4 / 3);
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/**
2+
* Copyright (c) 2023 The xterm.js authors. All rights reserved.
3+
* @license MIT
4+
*/
5+
6+
import { ImageStorage } from './ImageStorage';
7+
8+
/**
9+
* IIP (iTerm Image Protocol) specific image storage controller.
10+
*
11+
* Wraps the shared ImageStorage with IIP protocol semantics:
12+
* - Always uses scrolling mode (cursor advances with image)
13+
*/
14+
export class IIPImageStorage {
15+
constructor(
16+
private readonly _storage: ImageStorage
17+
) {}
18+
19+
/**
20+
* Add an IIP image to storage.
21+
* Always uses scrolling mode — cursor advances past the image.
22+
*/
23+
public addImage(img: HTMLCanvasElement | ImageBitmap): void {
24+
this._storage.addImage(img, true);
25+
}
26+
}

0 commit comments

Comments
 (0)