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

jupyter-js-notebook

Package Overview
Dependencies
Maintainers
2
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jupyter-js-notebook - npm Package Compare versions

Comparing version 0.14.0 to 0.15.0

4

lib/cells/widget.d.ts

@@ -87,2 +87,6 @@ import { Message } from 'phosphor-messaging';

/**
* Handle `after-attach` messages.
*/
protected onAfterAttach(msg: Message): void;
/**
* Change handler for model updates.

@@ -89,0 +93,0 @@ */

@@ -215,2 +215,8 @@ // Copyright (c) Jupyter Development Team.

/**
* Handle `after-attach` messages.
*/
MarkdownCellWidget.prototype.onAfterAttach = function (msg) {
this.update();
};
/**
* Change handler for model updates.

@@ -217,0 +223,0 @@ */

@@ -308,2 +308,3 @@ // Copyright (c) Jupyter Development Team.

if (cells_1.isMarkdownCellModel(cell)) {
cell.rendered = false;
cell.trusted = true;

@@ -444,2 +445,3 @@ cell.rendered = true;

name: 'mode',
changed: modeChanged,
notify: NotebookModelPrivate.stateChangedSignal,

@@ -460,2 +462,16 @@ });

});
/**
* Handle a change in mode.
*/
function modeChanged(model, mode) {
var cells = model.cells;
for (var i = 0; i < cells.length; i++) {
var cell = cells.get(i);
if (i === model.activeCellIndex || model.isSelected(cell)) {
if (cells_1.isMarkdownCellModel(cell)) {
cell.rendered = mode === 'edit';
}
}
}
}
/*

@@ -462,0 +478,0 @@ * Handle a change to the model session.

15

lib/notebook/widget.d.ts

@@ -9,5 +9,5 @@ import { Message } from 'phosphor-messaging';

/**
* A widget which contains a toolbar and a notebook.
* A panel which contains a toolbar and a notebook.
*/
export declare class NotebookPane extends Widget {
export declare class NotebookPanel extends Widget {
/**

@@ -22,3 +22,3 @@ * Create a new toolbar for the pane.

/**
* Construct a notebook pane widget.
* Construct a notebook panel.
*/

@@ -40,4 +40,13 @@ constructor(manager: NotebookManager);

notebook: NotebookWidget;
/**
* Get the manager used by the widget.
*/
manager: NotebookManager;
/**
* Dispose of the resources held by the widget.
*/
dispose(): void;
private _toolbar;
private _notebook;
private _manager;
}

@@ -44,0 +53,0 @@ /**

@@ -24,5 +24,5 @@ // Copyright (c) Jupyter Development Team.

/**
* The class name added to notebook panes.
* The class name added to notebook panels.
*/
var NB_PANE = 'jp-Notebook-pane';
var NB_PANEL = 'jp-Notebook-panel';
/**

@@ -117,14 +117,16 @@ * The class name added to notebook widget cells.

/**
* A widget which contains a toolbar and a notebook.
* A panel which contains a toolbar and a notebook.
*/
var NotebookPane = (function (_super) {
__extends(NotebookPane, _super);
var NotebookPanel = (function (_super) {
__extends(NotebookPanel, _super);
/**
* Construct a notebook pane widget.
* Construct a notebook panel.
*/
function NotebookPane(manager) {
function NotebookPanel(manager) {
_super.call(this);
this._toolbar = null;
this._notebook = null;
this.addClass(NB_PANE);
this._manager = null;
this.addClass(NB_PANEL);
this._manager = manager;
var constructor = this.constructor;

@@ -134,8 +136,7 @@ this._toolbar = constructor.createToolbar(manager);

var layout = this.layout;
layout.insertChild(0, this._toolbar);
var container = new phosphor_widget_1.Widget();
layout.addChild(this._toolbar);
var container = new phosphor_panel_1.Panel();
container.addClass(NB_CONTAINER);
container.layout = new phosphor_panel_1.PanelLayout();
this._notebook = constructor.createNotebook(manager.model);
container.layout.addChild(this._notebook);
container.addChild(this._notebook);
layout.addChild(container);

@@ -146,3 +147,3 @@ }

*/
NotebookPane.createToolbar = function (manager) {
NotebookPanel.createToolbar = function (manager) {
return new NotebookToolbar(manager);

@@ -153,6 +154,6 @@ };

*/
NotebookPane.createNotebook = function (model) {
NotebookPanel.createNotebook = function (model) {
return new NotebookWidget(model);
};
Object.defineProperty(NotebookPane.prototype, "toolbar", {
Object.defineProperty(NotebookPanel.prototype, "toolbar", {
/**

@@ -170,3 +171,3 @@ * Get the toolbar used by the widget.

});
Object.defineProperty(NotebookPane.prototype, "notebook", {
Object.defineProperty(NotebookPanel.prototype, "notebook", {
/**

@@ -184,5 +185,24 @@ * Get the notebook used by the widget.

});
return NotebookPane;
Object.defineProperty(NotebookPanel.prototype, "manager", {
/**
* Get the manager used by the widget.
*/
get: function () {
return this._manager;
},
enumerable: true,
configurable: true
});
/**
* Dispose of the resources held by the widget.
*/
NotebookPanel.prototype.dispose = function () {
this._toolbar = null;
this._notebook = null;
this._manager = null;
_super.prototype.dispose.call(this);
};
return NotebookPanel;
}(phosphor_widget_1.Widget));
exports.NotebookPane = NotebookPane;
exports.NotebookPanel = NotebookPanel;
/**

@@ -189,0 +209,0 @@ * A widget holding the notebook cells.

{
"name": "jupyter-js-notebook",
"version": "0.14.0",
"version": "0.15.0",
"description": "Notebook widget for Jupyter",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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