mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
fix 'Can't resolve 'xterm' in xterm.js/addons/xterm-addon-serialize/out'
This commit is contained in:
+2
-1
@@ -51,7 +51,8 @@ const clientConfig = {
|
||||
extensions: [ '.tsx', '.ts', '.js' ],
|
||||
alias: {
|
||||
common: path.resolve('./out/common'),
|
||||
browser: path.resolve('./out/browser')
|
||||
browser: path.resolve('./out/browser'),
|
||||
xterm$: path.resolve('./out/public/Terminal.js')
|
||||
}
|
||||
},
|
||||
output: {
|
||||
|
||||
+2
-1
@@ -9,7 +9,8 @@
|
||||
"xterm-addon-attach": ["../addons/xterm-addon-attach"],
|
||||
"xterm-addon-fit": ["../addons/xterm-addon-fit"],
|
||||
"xterm-addon-search": ["../addons/xterm-addon-search"],
|
||||
"xterm-addon-web-links": ["../addons/xterm-addon-web-links"]
|
||||
"xterm-addon-web-links": ["../addons/xterm-addon-web-links"],
|
||||
"xterm-addon-serialize": ["../addons/xterm-addon-serialize"]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
|
||||
+10
-10
@@ -223,7 +223,7 @@ class BufferLineApiView implements IBufferLineApi {
|
||||
|
||||
const COLOR_MASK = Attributes.CM_MASK | Attributes.RGB_MASK;
|
||||
|
||||
class CellColorApi implements ICellColorApi {
|
||||
export class CellColor implements ICellColorApi {
|
||||
readonly type: 'default' | 'rgb' | 'palette16' | 'palette256';
|
||||
readonly value: number = 0;
|
||||
|
||||
@@ -248,7 +248,7 @@ class CellColorApi implements ICellColorApi {
|
||||
return [-1, -1, -1];
|
||||
}
|
||||
|
||||
public static getDefault(): ICellColorApi { return new CellColorApi('default', 0); }
|
||||
public static getDefault(): ICellColorApi { return new CellColor('default', 0); }
|
||||
}
|
||||
|
||||
class BufferCellApiView implements IBufferCellApi {
|
||||
@@ -260,14 +260,14 @@ class BufferCellApiView implements IBufferCellApi {
|
||||
const cell = this._cell;
|
||||
const value = cell.fg & COLOR_MASK;
|
||||
if (cell.isFgDefault()) {
|
||||
return new CellColorApi('default', 0);
|
||||
return new CellColor('default', 0);
|
||||
} else if (cell.isFgPalette()) {
|
||||
switch (cell.getFgColorMode()) {
|
||||
case Attributes.CM_P16: return new CellColorApi('palette16', value);
|
||||
case Attributes.CM_P256: return new CellColorApi('palette256', value);
|
||||
case Attributes.CM_P16: return new CellColor('palette16', value);
|
||||
case Attributes.CM_P256: return new CellColor('palette256', value);
|
||||
}
|
||||
} else if (cell.isFgRGB()) {
|
||||
return new CellColorApi('rgb', value);
|
||||
return new CellColor('rgb', value);
|
||||
}
|
||||
throw new Error('Invalid foregroundColor');
|
||||
}
|
||||
@@ -275,14 +275,14 @@ class BufferCellApiView implements IBufferCellApi {
|
||||
const cell = this._cell;
|
||||
const value = cell.bg & COLOR_MASK;
|
||||
if (cell.isBgDefault()) {
|
||||
return new CellColorApi('default', 0);
|
||||
return new CellColor('default', 0);
|
||||
} else if (cell.isBgPalette()) {
|
||||
switch (cell.getBgColorMode()) {
|
||||
case Attributes.CM_P16: return new CellColorApi('palette16', value);
|
||||
case Attributes.CM_P256: return new CellColorApi('palette256', value);
|
||||
case Attributes.CM_P16: return new CellColor('palette16', value);
|
||||
case Attributes.CM_P256: return new CellColor('palette256', value);
|
||||
}
|
||||
} else if (cell.isBgRGB()) {
|
||||
return new CellColorApi('rgb', value);
|
||||
return new CellColor('rgb', value);
|
||||
}
|
||||
throw new Error('Invalid backgroundColor');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user