Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xterm

Package Overview
Dependencies
Maintainers
2
Versions
1092
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xterm - npm Package Compare versions

Comparing version 5.3.0-beta.24 to 5.3.0-beta.25

2

package.json
{
"name": "xterm",
"description": "Full xterm terminal, in your browser",
"version": "5.3.0-beta.24",
"version": "5.3.0-beta.25",
"main": "lib/xterm.js",

@@ -6,0 +6,0 @@ "style": "css/xterm.css",

@@ -14,2 +14,3 @@ /**

import { addDisposableDomListener } from 'browser/Lifecycle';
import { IBuffer } from 'common/buffer/Types';

@@ -80,3 +81,3 @@ const MAX_ROWS_TO_READ = 20;

this._accessibilityContainer.appendChild(this._liveRegion);
this._liveRegionDebouncer = this.register(new TimeBasedDebouncer(this._announceCharacters.bind(this)));
this._liveRegionDebouncer = this.register(new TimeBasedDebouncer(this._renderRows.bind(this)));

@@ -88,3 +89,2 @@ if (!this._terminal.element) {

this.register(this._liveRegionDebouncer);
this.register(this._terminal.onResize(e => this._handleResize(e.rows)));

@@ -173,2 +173,22 @@ this.register(this._terminal.onRender(e => this._refreshRows(e.start, e.end)));

private _renderRows(start: number, end: number): void {
const buffer: IBuffer = this._terminal.buffer;
const setSize = buffer.lines.length.toString();
for (let i = start; i <= end; i++) {
const lineData = buffer.translateBufferLineToString(buffer.ydisp + i, true);
const posInSet = (buffer.ydisp + i + 1).toString();
const element = this._rowElements[i];
if (element) {
if (lineData.length === 0) {
element.innerText = '\u00a0';
} else {
element.textContent = lineData;
}
element.setAttribute('aria-posinset', posInSet);
element.setAttribute('aria-setsize', setSize);
}
}
this._announceCharacters();
}
private _announceCharacters(): void {

@@ -175,0 +195,0 @@ if (this._charsToAnnounce.length === 0) {

@@ -1233,4 +1233,7 @@ /**

}
// IMPORTANT: Fire scroll event before viewport is reset. This ensures embedders get the clear
// scroll event and that the viewport's state will be valid for immediate writes.
this._onScroll.fire({ position: this.buffer.ydisp, source: ScrollSource.TERMINAL });
this.viewport?.reset();
this.refresh(0, this.rows - 1);
this._onScroll.fire({ position: this.buffer.ydisp, source: ScrollSource.TERMINAL });
}

@@ -1259,2 +1262,3 @@

this._decorationService.reset();
this.viewport?.reset();

@@ -1266,3 +1270,2 @@ // reattach

this.refresh(0, this.rows - 1);
this.viewport?.syncScrollArea();
}

@@ -1269,0 +1272,0 @@

@@ -164,3 +164,3 @@ /**

readonly onRequestScrollLines: IEvent<{ amount: number, suppressScrollEvent: boolean }>;
syncScrollArea(immediate?: boolean): void;
syncScrollArea(immediate?: boolean, force?: boolean): void;
getLinesScrolled(ev: WheelEvent): number;

@@ -172,2 +172,3 @@ getBufferElements(startLine: number, endLine?: number): { bufferElements: HTMLElement[], cursorElement?: HTMLElement };

scrollLines(disp: number): void; // todo api name?
reset(): void;
}

@@ -174,0 +175,0 @@

@@ -84,3 +84,3 @@ /**

// Perform this async to ensure the ICharSizeService is ready.
setTimeout(() => this.syncScrollArea(), 0);
setTimeout(() => this.syncScrollArea());
}

@@ -92,2 +92,14 @@

public reset(): void {
this._currentRowHeight = 0;
this._currentDeviceCellHeight = 0;
this._lastRecordedBufferLength = 0;
this._lastRecordedViewportHeight = 0;
this._lastRecordedBufferHeight = 0;
this._lastTouchY = 0;
this._lastScrollTop = 0;
// Sync on next animation frame to ensure the new terminal state is used
this._coreBrowserService.window.requestAnimationFrame(() => this.syncScrollArea());
}
/**

@@ -94,0 +106,0 @@ * Refreshes row height, setting line-height, viewport height and scroll area height if

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc