New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@jupyterlab/terminal

Package Overview
Dependencies
Maintainers
4
Versions
382
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jupyterlab/terminal - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

4

lib/index.d.ts
import { CommandRegistry } from '@phosphor/commands';
import { Token } from '@phosphor/coreutils';
import { IInstanceTracker } from '@jupyterlab/apputils';
import { TerminalWidget } from './widget';
import { Terminal } from './widget';
export * from './widget';

@@ -9,3 +9,3 @@ /**

*/
export interface ITerminalTracker extends IInstanceTracker<TerminalWidget> {
export interface ITerminalTracker extends IInstanceTracker<Terminal> {
}

@@ -12,0 +12,0 @@ /**

@@ -30,3 +30,3 @@ "use strict";

execute: function () {
var options = widget_1.TerminalWidget.defaultOptions;
var options = widget_1.Terminal.defaultOptions;
if (options.fontSize < 72) {

@@ -42,3 +42,3 @@ options.fontSize++;

execute: function () {
var options = widget_1.TerminalWidget.defaultOptions;
var options = widget_1.Terminal.defaultOptions;
if (options.fontSize > 9) {

@@ -55,3 +55,3 @@ options.fontSize--;

execute: function () {
var options = widget_1.TerminalWidget.defaultOptions;
var options = widget_1.Terminal.defaultOptions;
if (options.background === 'black') {

@@ -58,0 +58,0 @@ options.background = 'white';

@@ -7,3 +7,3 @@ import { TerminalSession } from '@jupyterlab/services';

*/
export declare class TerminalWidget extends Widget {
export declare class Terminal extends Widget {
/**

@@ -14,3 +14,3 @@ * Construct a new terminal widget.

*/
constructor(options?: TerminalWidget.IOptions);
constructor(options?: Terminal.IOptions);
/**

@@ -128,5 +128,5 @@ * The terminal session associated with the widget.

/**
* The namespace for `TerminalWidget` class statics.
* The namespace for `Terminal` class statics.
*/
export declare namespace TerminalWidget {
export declare namespace Terminal {
/**

@@ -133,0 +133,0 @@ * Options for the terminal widget.

@@ -22,7 +22,7 @@ "use strict";

*/
var TERMINAL_CLASS = 'jp-TerminalWidget';
var TERMINAL_CLASS = 'jp-Terminal';
/**
* The class name added to a terminal body.
*/
var TERMINAL_BODY_CLASS = 'jp-TerminalWidget-body';
var TERMINAL_BODY_CLASS = 'jp-Terminal-body';
/**

@@ -39,4 +39,4 @@ * The number of rows to use in the dummy terminal.

*/
var TerminalWidget = (function (_super) {
__extends(TerminalWidget, _super);
var Terminal = (function (_super) {
__extends(Terminal, _super);
/**

@@ -47,3 +47,3 @@ * Construct a new terminal widget.

*/
function TerminalWidget(options) {
function Terminal(options) {
if (options === void 0) { options = {}; }

@@ -75,11 +75,11 @@ var _this = _super.call(this) || this;

// Initialize settings.
var defaults = TerminalWidget.defaultOptions;
var defaults = Terminal.defaultOptions;
_this._fontSize = options.fontSize || defaults.fontSize;
_this._background = options.background || defaults.background;
_this._color = options.color || defaults.color;
_this.id = "jp-TerminalWidget-" + Private.id++;
_this.id = "jp-Terminal-" + Private.id++;
_this.title.label = 'Terminal';
return _this;
}
Object.defineProperty(TerminalWidget.prototype, "session", {
Object.defineProperty(Terminal.prototype, "session", {
/**

@@ -112,3 +112,3 @@ * The terminal session associated with the widget.

});
Object.defineProperty(TerminalWidget.prototype, "fontSize", {
Object.defineProperty(Terminal.prototype, "fontSize", {
/**

@@ -134,3 +134,3 @@ * Get the font size of the terminal in pixels.

});
Object.defineProperty(TerminalWidget.prototype, "background", {
Object.defineProperty(Terminal.prototype, "background", {
/**

@@ -156,3 +156,3 @@ * Get the background color of the terminal.

});
Object.defineProperty(TerminalWidget.prototype, "color", {
Object.defineProperty(Terminal.prototype, "color", {
/**

@@ -181,3 +181,3 @@ * Get the text color of the terminal.

*/
TerminalWidget.prototype.dispose = function () {
Terminal.prototype.dispose = function () {
this._session = null;

@@ -193,3 +193,3 @@ this._sheet = null;

*/
TerminalWidget.prototype.refresh = function () {
Terminal.prototype.refresh = function () {
var _this = this;

@@ -211,3 +211,3 @@ if (!this._session) {

*/
TerminalWidget.prototype.processMessage = function (msg) {
Terminal.prototype.processMessage = function (msg) {
_super.prototype.processMessage.call(this, msg);

@@ -225,3 +225,3 @@ switch (msg.type) {

*/
TerminalWidget.prototype.onAfterAttach = function (msg) {
Terminal.prototype.onAfterAttach = function (msg) {
this.update();

@@ -232,3 +232,3 @@ };

*/
TerminalWidget.prototype.onAfterShow = function (msg) {
Terminal.prototype.onAfterShow = function (msg) {
this.update();

@@ -239,3 +239,3 @@ };

*/
TerminalWidget.prototype.onCloseRequest = function (msg) {
Terminal.prototype.onCloseRequest = function (msg) {
_super.prototype.onCloseRequest.call(this, msg);

@@ -247,3 +247,3 @@ this.dispose();

*/
TerminalWidget.prototype.onResize = function (msg) {
Terminal.prototype.onResize = function (msg) {
this._offsetWidth = msg.width;

@@ -257,3 +257,3 @@ this._offsetHeight = msg.height;

*/
TerminalWidget.prototype.onUpdateRequest = function (msg) {
Terminal.prototype.onUpdateRequest = function (msg) {
if (!this.isVisible) {

@@ -275,3 +275,3 @@ return;

*/
TerminalWidget.prototype.onFitRequest = function (msg) {
Terminal.prototype.onFitRequest = function (msg) {
var resize = widgets_1.Widget.ResizeMessage.UnknownSize;

@@ -283,3 +283,3 @@ messaging_1.MessageLoop.sendMessage(this, resize);

*/
TerminalWidget.prototype.onActivateRequest = function (msg) {
Terminal.prototype.onActivateRequest = function (msg) {
this._term.focus();

@@ -290,5 +290,5 @@ };

*/
TerminalWidget.prototype._initializeTerm = function () {
Terminal.prototype._initializeTerm = function () {
var _this = this;
this._term.open(this.node);
this._term.open(this.node, false);
this._term.element.classList.add(TERMINAL_BODY_CLASS);

@@ -310,3 +310,3 @@ this._term.on('data', function (data) {

*/
TerminalWidget.prototype._onMessage = function (sender, msg) {
Terminal.prototype._onMessage = function (sender, msg) {
switch (msg.type) {

@@ -326,3 +326,3 @@ case 'stdout':

*/
TerminalWidget.prototype._snapTermSizing = function () {
Terminal.prototype._snapTermSizing = function () {
this._term.element.style.fontSize = this.fontSize + "px";

@@ -340,3 +340,3 @@ var node = this._dummyTerm;

*/
TerminalWidget.prototype._resizeTerminal = function () {
Terminal.prototype._resizeTerminal = function () {
var offsetWidth = this._offsetWidth;

@@ -363,3 +363,3 @@ var offsetHeight = this._offsetHeight;

*/
TerminalWidget.prototype._setSessionSize = function () {
Terminal.prototype._setSessionSize = function () {
if (this._session) {

@@ -375,3 +375,3 @@ this._session.send({

*/
TerminalWidget.prototype._setStyle = function () {
Terminal.prototype._setStyle = function () {
// Set the fg and bg colors of the terminal and cursor.

@@ -381,13 +381,13 @@ this._sheet.innerHTML = ("\n #" + this.node.id + " {\n background: " + this._background + ";\n color: " + this._color + ";\n }\n #" + this.node.id + " .xterm-viewport, #" + this.node.id + " .xterm-rows {\n background-color: " + this._background + ";\n color: " + this._color + ";\n }\n #" + this.node.id + " .terminal.focus .terminal-cursor.blinking {\n animation: " + this.node.id + "-blink-cursor 1.2s infinite step-end;\n }\n @keyframes " + this.node.id + "-blink-cursor {\n 0% {\n background-color: " + this._color + ";\n color: " + this._background + ";\n }\n 50% {\n background-color: transparent;\n color: " + this._color + ";\n }\n }\n ");

};
return TerminalWidget;
return Terminal;
}(widgets_1.Widget));
exports.TerminalWidget = TerminalWidget;
exports.Terminal = Terminal;
/**
* The namespace for `TerminalWidget` class statics.
* The namespace for `Terminal` class statics.
*/
(function (TerminalWidget) {
(function (Terminal) {
/**
* The default options used for creating terminals.
*/
TerminalWidget.defaultOptions = {
Terminal.defaultOptions = {
background: 'black',

@@ -398,4 +398,4 @@ color: 'white',

};
})(TerminalWidget = exports.TerminalWidget || (exports.TerminalWidget = {}));
exports.TerminalWidget = TerminalWidget;
})(Terminal = exports.Terminal || (exports.Terminal = {}));
exports.Terminal = Terminal;
/**

@@ -415,3 +415,3 @@ * A namespace for private data.

else {
config.cursorBlink = TerminalWidget.defaultOptions.cursorBlink;
config.cursorBlink = Terminal.defaultOptions.cursorBlink;
}

@@ -418,0 +418,0 @@ return config;

{
"name": "@jupyterlab/terminal",
"version": "0.4.0",
"version": "0.5.0",
"description": "JupyterLab - Terminal Emulator Widget",

@@ -16,10 +16,10 @@ "main": "lib/index.js",

"dependencies": {
"@jupyterlab/apputils": "^0.4.0",
"@jupyterlab/services": "^0.43.0",
"@phosphor/commands": "^1.0.0",
"@phosphor/coreutils": "^1.0.0",
"@phosphor/domutils": "^1.0.0",
"@phosphor/messaging": "^1.0.0",
"@phosphor/widgets": "^1.0.0",
"xterm": "^2.4.0"
"@jupyterlab/apputils": "^0.5.0",
"@jupyterlab/services": "^0.44.0",
"@phosphor/commands": "^1.2.0",
"@phosphor/coreutils": "^1.1.0",
"@phosphor/domutils": "^1.1.0",
"@phosphor/messaging": "^1.2.0",
"@phosphor/widgets": "^1.2.0",
"xterm": "^2.6.0"
},

@@ -26,0 +26,0 @@ "devDependencies": {

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