jupyter-js-notebook
Advanced tools
Comparing version 0.4.1 to 0.4.2
@@ -1,3 +0,3 @@ | ||
import { IInputAreaModel } from 'jupyter-js-input-area'; | ||
import { IOutputAreaModel } from 'jupyter-js-output-area'; | ||
import { IInputAreaModel } from '../input-area'; | ||
import { IOutputAreaModel } from '../output-area'; | ||
import { IObservableList } from 'phosphor-observablelist'; | ||
@@ -4,0 +4,0 @@ import { IChangedArgs, Property } from 'phosphor-properties'; |
import { IChangedArgs } from 'phosphor-properties'; | ||
import { Widget } from 'phosphor-widget'; | ||
import { ICodeCellModel, IMarkdownCellModel, ICellModel } from './model'; | ||
import { InputAreaWidget, IInputAreaModel } from 'jupyter-js-input-area'; | ||
import { OutputAreaWidget, IOutputAreaModel } from 'jupyter-js-output-area'; | ||
import { InputAreaWidget, IInputAreaModel } from '../input-area'; | ||
import { OutputAreaWidget, IOutputAreaModel } from '../output-area'; | ||
/** | ||
@@ -7,0 +7,0 @@ * A base cell widget. |
@@ -11,4 +11,4 @@ // Copyright (c) Jupyter Development Team. | ||
var phosphor_panel_1 = require('phosphor-panel'); | ||
var jupyter_js_input_area_1 = require('jupyter-js-input-area'); | ||
var jupyter_js_output_area_1 = require('jupyter-js-output-area'); | ||
var input_area_1 = require('../input-area'); | ||
var output_area_1 = require('../output-area'); | ||
var marked = require('marked'); | ||
@@ -42,4 +42,4 @@ /** | ||
this._model = model; | ||
this.input = new jupyter_js_input_area_1.InputAreaWidget(model.input); | ||
this.output = new jupyter_js_output_area_1.OutputAreaWidget(model.output); | ||
this.input = new input_area_1.InputAreaWidget(model.input); | ||
this.output = new output_area_1.OutputAreaWidget(model.output); | ||
this.layout.addChild(this.input); | ||
@@ -55,3 +55,3 @@ this.layout.addChild(this.output); | ||
this.input.dispose(); // removes from children | ||
this.input = new jupyter_js_input_area_1.InputAreaWidget(input); | ||
this.input = new input_area_1.InputAreaWidget(input); | ||
this.layout.insertChild(0, this.input); | ||
@@ -65,3 +65,3 @@ }; | ||
this.output.dispose(); | ||
this.output = new jupyter_js_output_area_1.OutputAreaWidget(output); | ||
this.output = new output_area_1.OutputAreaWidget(output); | ||
this.layout.insertChild(1, this.output); | ||
@@ -106,3 +106,3 @@ }; | ||
model.input.textEditor.mimetype = 'text/x-gfm'; | ||
this.input = new jupyter_js_input_area_1.InputAreaWidget(model.input); | ||
this.input = new input_area_1.InputAreaWidget(model.input); | ||
this.rendered = new phosphor_widget_1.Widget(); | ||
@@ -146,3 +146,3 @@ if (model.rendered) { | ||
this.input.dispose(); | ||
this.input = new jupyter_js_input_area_1.InputAreaWidget(input); | ||
this.input = new input_area_1.InputAreaWidget(input); | ||
if (this._model.rendered) { | ||
@@ -149,0 +149,0 @@ this.renderInput(); |
@@ -1,2 +0,2 @@ | ||
import { ICellModel, ICodeCellModel, IMarkdownCellModel } from 'jupyter-js-cells'; | ||
import { ICellModel, ICodeCellModel, IMarkdownCellModel } from '../cells'; | ||
import { IObservableList } from 'phosphor-observablelist'; | ||
@@ -3,0 +3,0 @@ import { ISignal, Signal } from 'phosphor-signaling'; |
@@ -1,2 +0,2 @@ | ||
var jupyter_js_cells_1 = require('jupyter-js-cells'); | ||
var cells_1 = require('../cells'); | ||
var phosphor_observablelist_1 = require('phosphor-observablelist'); | ||
@@ -125,3 +125,3 @@ var phosphor_signaling_1 = require('phosphor-signaling'); | ||
NotebookModel.prototype.createCodeCell = function (source) { | ||
var cell = new jupyter_js_cells_1.CodeCellModel(); | ||
var cell = new cells_1.CodeCellModel(); | ||
return cell; | ||
@@ -133,3 +133,3 @@ }; | ||
NotebookModel.prototype.createMarkdownCell = function (source) { | ||
var cell = new jupyter_js_cells_1.MarkdownCellModel(); | ||
var cell = new cells_1.MarkdownCellModel(); | ||
return cell; | ||
@@ -136,0 +136,0 @@ }; |
import { INotebookModel } from './model'; | ||
import { OutputModel } from 'jupyter-js-output-area'; | ||
import { OutputModel } from '../output-area'; | ||
import { NBData, Output } from './nbformat'; | ||
@@ -4,0 +4,0 @@ /** |
// Copyright (c) Jupyter Development Team. | ||
// Distributed under the terms of the Modified BSD License. | ||
'use strict'; | ||
var jupyter_js_cells_1 = require('jupyter-js-cells'); | ||
var jupyter_js_input_area_1 = require('jupyter-js-input-area'); | ||
var cells_1 = require('../cells'); | ||
var input_area_1 = require('../input-area'); | ||
var jupyter_js_editor_1 = require('jupyter-js-editor'); | ||
var jupyter_js_output_area_1 = require('jupyter-js-output-area'); | ||
var output_area_1 = require('../output-area'); | ||
var nbformat_1 = require('./nbformat'); | ||
@@ -16,7 +16,7 @@ /** | ||
data.content.cells.forEach(function (c) { | ||
var input = new jupyter_js_input_area_1.InputAreaModel(); | ||
var input = new input_area_1.InputAreaModel(); | ||
input.textEditor = new jupyter_js_editor_1.EditorModel(); | ||
input.textEditor.text = c.source; | ||
if (nbformat_1.isMarkdownCell(c)) { | ||
var cell = new jupyter_js_cells_1.MarkdownCellModel(); | ||
var cell = new cells_1.MarkdownCellModel(); | ||
cell.input = input; | ||
@@ -27,5 +27,5 @@ cell.rendered = true; | ||
else if (nbformat_1.isCodeCell(c)) { | ||
var cell = new jupyter_js_cells_1.CodeCellModel(); | ||
var cell = new cells_1.CodeCellModel(); | ||
cell.input = input; | ||
var outputArea = new jupyter_js_output_area_1.OutputAreaModel(); | ||
var outputArea = new output_area_1.OutputAreaModel(); | ||
cell.output = outputArea; | ||
@@ -49,3 +49,3 @@ for (var i = 0; i < c.outputs.length; i++) { | ||
if (nbformat_1.isDisplayData(out)) { | ||
var outmodel = new jupyter_js_output_area_1.DisplayDataModel(); | ||
var outmodel = new output_area_1.DisplayDataModel(); | ||
outmodel.data = out.data; | ||
@@ -56,9 +56,9 @@ outmodel.metadata = out.metadata; | ||
else if (nbformat_1.isStream(out)) { | ||
var outmodel = new jupyter_js_output_area_1.StreamModel(); | ||
var outmodel = new output_area_1.StreamModel(); | ||
switch (out.name) { | ||
case 'stdout': | ||
outmodel.name = jupyter_js_output_area_1.StreamName.StdOut; | ||
outmodel.name = output_area_1.StreamName.StdOut; | ||
break; | ||
case 'stderr': | ||
outmodel.name = jupyter_js_output_area_1.StreamName.StdErr; | ||
outmodel.name = output_area_1.StreamName.StdErr; | ||
break; | ||
@@ -72,3 +72,3 @@ default: | ||
else if (nbformat_1.isJupyterError(out)) { | ||
var outmodel = new jupyter_js_output_area_1.ExecuteErrorModel(); | ||
var outmodel = new output_area_1.ExecuteErrorModel(); | ||
outmodel.ename = out.ename; | ||
@@ -80,3 +80,3 @@ outmodel.evalue = out.evalue; | ||
else if (nbformat_1.isExecuteResult(out)) { | ||
var outmodel = new jupyter_js_output_area_1.ExecuteResultModel(); | ||
var outmodel = new output_area_1.ExecuteResultModel(); | ||
outmodel.data = out.data; | ||
@@ -83,0 +83,0 @@ outmodel.executionCount = out.execution_count; |
@@ -5,3 +5,3 @@ import { IChangedArgs } from 'phosphor-properties'; | ||
import { INotebookModel } from './model'; | ||
import { ICellModel } from 'jupyter-js-cells'; | ||
import { ICellModel } from '../cells'; | ||
/** | ||
@@ -8,0 +8,0 @@ * A widget for a notebook. |
@@ -12,3 +12,3 @@ // Copyright (c) Jupyter Development Team. | ||
var phosphor_panel_1 = require('phosphor-panel'); | ||
var jupyter_js_cells_1 = require('jupyter-js-cells'); | ||
var cells_1 = require('../cells'); | ||
var phosphor_disposable_1 = require('phosphor-disposable'); | ||
@@ -31,8 +31,8 @@ /** | ||
switch (c.type) { | ||
case jupyter_js_cells_1.CellType.Code: | ||
w = new jupyter_js_cells_1.CodeCellWidget(c); | ||
case cells_1.CellType.Code: | ||
w = new cells_1.CodeCellWidget(c); | ||
w.addClass('jp-nbCell'); | ||
break; | ||
case jupyter_js_cells_1.CellType.Markdown: | ||
w = new jupyter_js_cells_1.MarkdownCellWidget(c); | ||
case cells_1.CellType.Markdown: | ||
w = new cells_1.MarkdownCellWidget(c); | ||
w.addClass('jp-nbCell'); | ||
@@ -59,3 +59,3 @@ break; | ||
var cell = _this._model.cells.get(i); | ||
if (jupyter_js_cells_1.isMarkdownCell(cell) && cell.rendered) { | ||
if (cells_1.isMarkdownCell(cell) && cell.rendered) { | ||
cell.rendered = false; | ||
@@ -62,0 +62,0 @@ } |
{ | ||
"name": "jupyter-js-notebook", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "Notebook widget for Jupyter", | ||
@@ -10,6 +10,3 @@ "main": "lib/index.js", | ||
"diff-match-patch": "^1.0.0", | ||
"jupyter-js-cells": "^0.2.6", | ||
"jupyter-js-editor": "^0.1.10", | ||
"jupyter-js-input-area": "^0.0.6", | ||
"jupyter-js-output-area": "^0.3.1", | ||
"marked": "^0.3.5", | ||
@@ -16,0 +13,0 @@ "phosphor-disposable": "^1.0.5", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
12
0
84619
33
2556
- Removedjupyter-js-cells@^0.2.6
- Removedjupyter-js-input-area@^0.0.6
- Removedjupyter-js-output-area@^0.3.1
- Removedjupyter-js-cells@0.2.8(transitive)
- Removedjupyter-js-input-area@0.0.6(transitive)
- Removedjupyter-js-output-area@0.3.3(transitive)