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

xterm-addon-webgl

Package Overview
Dependencies
Maintainers
1
Versions
345
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xterm-addon-webgl - npm Package Compare versions

Comparing version 0.14.0-beta.44 to 0.14.0-beta.45

2

package.json
{
"name": "xterm-addon-webgl",
"version": "0.14.0-beta.44",
"version": "0.14.0-beta.45",
"author": {

@@ -5,0 +5,0 @@ "name": "The xterm.js authors",

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

import { Disposable, toDisposable } from 'common/Lifecycle';
import { IOptionsService } from 'common/services/Services';

@@ -37,2 +38,3 @@ export abstract class BaseRenderLayer extends Disposable implements IRenderLayer {

protected readonly _coreBrowserService: ICoreBrowserService,
protected readonly _optionsService: IOptionsService,
protected readonly _themeService: IThemeService

@@ -98,3 +100,3 @@ ) {

}
this._charAtlas = acquireTextureAtlas(terminal, colorSet, this._deviceCellWidth, this._deviceCellHeight, this._deviceCharWidth, this._deviceCharHeight, this._coreBrowserService.dpr);
this._charAtlas = acquireTextureAtlas(terminal, this._optionsService.rawOptions, colorSet, this._deviceCellWidth, this._deviceCellHeight, this._deviceCharWidth, this._deviceCharHeight, this._coreBrowserService.dpr);
this._charAtlas.warmUp();

@@ -101,0 +103,0 @@ }

@@ -42,6 +42,6 @@ /**

private readonly _coreService: ICoreService,
themeService: IThemeService,
optionsService: IOptionsService
optionsService: IOptionsService,
themeService: IThemeService
) {
super(terminal, container, 'cursor', zIndex, true, coreBrowserService, themeService);
super(terminal, container, 'cursor', zIndex, true, coreBrowserService, optionsService, themeService);
this._state = {

@@ -217,3 +217,3 @@ x: 0,

this._ctx.fillStyle = this._themeService.colors.cursor.css;
this._fillLeftLineAtCell(x, y, terminal.options.cursorWidth);
this._fillLeftLineAtCell(x, y, this._optionsService.rawOptions.cursorWidth);
this._ctx.restore();

@@ -220,0 +220,0 @@ }

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

import { ILinkifier2, ILinkifierEvent } from 'browser/Types';
import { IOptionsService } from 'common/services/Services';
import { Terminal } from 'xterm';

@@ -24,5 +25,6 @@ import { BaseRenderLayer } from './BaseRenderLayer';

coreBrowserService: ICoreBrowserService,
optionsService: IOptionsService,
themeService: IThemeService
) {
super(terminal, container, 'link', zIndex, true, coreBrowserService, themeService);
super(terminal, container, 'link', zIndex, true, coreBrowserService, optionsService, themeService);

@@ -29,0 +31,0 @@ this.register(linkifier2.onShowLinkUnderline(e => this._handleShowLinkUnderline(e)));

@@ -70,3 +70,3 @@ /**

private readonly _decorationService: IDecorationService,
optionsService: IOptionsService,
private readonly _optionsService: IOptionsService,
private readonly _themeService: IThemeService,

@@ -84,4 +84,4 @@ preserveDrawingBuffer?: boolean

this._renderLayers = [
new LinkRenderLayer(this._core.screenElement!, 2, this._terminal, this._core.linkifier2, this._coreBrowserService, this._themeService),
new CursorRenderLayer(_terminal, this._core.screenElement!, 3, this._onRequestRedraw, this._coreBrowserService, coreService, this._themeService, optionsService)
new LinkRenderLayer(this._core.screenElement!, 2, this._terminal, this._core.linkifier2, this._coreBrowserService, _optionsService, this._themeService),
new CursorRenderLayer(_terminal, this._core.screenElement!, 3, this._onRequestRedraw, this._coreBrowserService, coreService, _optionsService, this._themeService)
];

@@ -91,3 +91,3 @@ this.dimensions = createRenderDimensions();

this._updateDimensions();
this.register(optionsService.onOptionChange(() => this._handleOptionsChanged()));
this.register(_optionsService.onOptionChange(() => this._handleOptionsChanged()));

@@ -265,2 +265,3 @@ this._canvas = document.createElement('canvas');

this._terminal,
this._optionsService.rawOptions,
this._themeService.colors,

@@ -476,14 +477,14 @@ this.dimensions.device.cell.width,

// will always be larger than device char height.
this.dimensions.device.cell.height = Math.floor(this.dimensions.device.char.height * this._terminal.options.lineHeight);
this.dimensions.device.cell.height = Math.floor(this.dimensions.device.char.height * this._optionsService.rawOptions.lineHeight);
// Calculate the y offset within a cell that glyph should draw at in order for it to be centered
// correctly within the cell.
this.dimensions.device.char.top = this._terminal.options.lineHeight === 1 ? 0 : Math.round((this.dimensions.device.cell.height - this.dimensions.device.char.height) / 2);
this.dimensions.device.char.top = this._optionsService.rawOptions.lineHeight === 1 ? 0 : Math.round((this.dimensions.device.cell.height - this.dimensions.device.char.height) / 2);
// Calculate the device cell width, taking the letterSpacing into account.
this.dimensions.device.cell.width = this.dimensions.device.char.width + Math.round(this._terminal.options.letterSpacing);
this.dimensions.device.cell.width = this.dimensions.device.char.width + Math.round(this._optionsService.rawOptions.letterSpacing);
// Calculate the x offset with a cell that text should draw from in order for it to be centered
// correctly within the cell.
this.dimensions.device.char.left = Math.floor(this._terminal.options.letterSpacing / 2);
this.dimensions.device.char.left = Math.floor(this._optionsService.rawOptions.letterSpacing / 2);

@@ -490,0 +491,0 @@ // Recalculate the canvas dimensions, the device dimensions define the actual number of pixel in

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