@xterm/xterm 5.4.0-beta.30 → 5.4.0-beta.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/xterm.js +1 -1
- package/lib/xterm.js.map +1 -1
- package/package.json +1 -1
- package/src/browser/public/Terminal.ts +3 -0
- package/src/browser/services/RenderService.ts +1 -1
- package/src/common/CoreTerminal.ts +4 -0
- package/src/headless/Terminal.ts +4 -0
- package/src/headless/public/Terminal.ts +3 -0
- package/typings/xterm.d.ts +12 -0
package/package.json
CHANGED
|
@@ -138,6 +138,9 @@ export class Terminal extends Disposable implements ITerminalApi {
|
|
|
138
138
|
public focus(): void {
|
|
139
139
|
this._core.focus();
|
|
140
140
|
}
|
|
141
|
+
public input(data: string, wasUserInput: boolean = true): void {
|
|
142
|
+
this._core.input(data, wasUserInput);
|
|
143
|
+
}
|
|
141
144
|
public resize(columns: number, rows: number): void {
|
|
142
145
|
this._verifyIntegers(columns, rows);
|
|
143
146
|
this._core.resize(columns, rows);
|
|
@@ -247,7 +247,7 @@ export class RenderService extends Disposable implements IRenderService {
|
|
|
247
247
|
return;
|
|
248
248
|
}
|
|
249
249
|
if (this._isPaused) {
|
|
250
|
-
this._pausedResizeTask.set(() => this._renderer.value
|
|
250
|
+
this._pausedResizeTask.set(() => this._renderer.value?.handleResize(cols, rows));
|
|
251
251
|
} else {
|
|
252
252
|
this._renderer.value.handleResize(cols, rows);
|
|
253
253
|
}
|
|
@@ -168,6 +168,10 @@ export abstract class CoreTerminal extends Disposable implements ICoreTerminal {
|
|
|
168
168
|
this._writeBuffer.writeSync(data, maxSubsequentCalls);
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
+
public input(data: string, wasUserInput: boolean = true): void {
|
|
172
|
+
this.coreService.triggerDataEvent(data, wasUserInput);
|
|
173
|
+
}
|
|
174
|
+
|
|
171
175
|
public resize(x: number, y: number): void {
|
|
172
176
|
if (isNaN(x) || isNaN(y)) {
|
|
173
177
|
return;
|
package/src/headless/Terminal.ts
CHANGED
|
@@ -134,6 +134,9 @@ export class Terminal extends Disposable implements ITerminalApi {
|
|
|
134
134
|
this._publicOptions[propName] = options[propName];
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
+
public input(data: string, wasUserInput: boolean = true): void {
|
|
138
|
+
this._core.input(data, wasUserInput);
|
|
139
|
+
}
|
|
137
140
|
public resize(columns: number, rows: number): void {
|
|
138
141
|
this._verifyIntegers(columns, rows);
|
|
139
142
|
this._core.resize(columns, rows);
|
package/typings/xterm.d.ts
CHANGED
|
@@ -963,6 +963,18 @@ declare module '@xterm/xterm' {
|
|
|
963
963
|
*/
|
|
964
964
|
focus(): void;
|
|
965
965
|
|
|
966
|
+
/**
|
|
967
|
+
* Input data to application side. The data is treated the same way input
|
|
968
|
+
* typed into the terminal would (ie. the {@link onData} event will fire).
|
|
969
|
+
* @param data The data to forward to the application.
|
|
970
|
+
* @param wasUserInput Whether the input is genuine user input. This is true
|
|
971
|
+
* by default and triggers additionalbehavior like focus or selection
|
|
972
|
+
* clearing. Set this to false if the data sent should not be treated like
|
|
973
|
+
* user input would, for example passing an escape sequence to the
|
|
974
|
+
* application.
|
|
975
|
+
*/
|
|
976
|
+
input(data: string, wasUserInput?: boolean): void;
|
|
977
|
+
|
|
966
978
|
/**
|
|
967
979
|
* Resizes the terminal. It's best practice to debounce calls to resize,
|
|
968
980
|
* this will help ensure that the pty can respond to the resize event
|