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

@jupyterlab/codeeditor

Package Overview
Dependencies
Maintainers
9
Versions
357
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jupyterlab/codeeditor - npm Package Compare versions

Comparing version 0.15.4 to 0.15.5

4

lib/editor.d.ts

@@ -400,2 +400,6 @@ import { JSONObject } from '@phosphor/coreutils';

getPositionForCoordinate(coordinate: ICoordinate): IPosition | null;
/**
* Inserts a new line at the cursor position and indents it.
*/
newIndentedLine(): void;
}

@@ -402,0 +406,0 @@ /**

28

lib/jsoneditor.js

@@ -17,3 +17,4 @@ "use strict";

var widgets_1 = require("@phosphor/widgets");
var virtualdom_1 = require("@phosphor/virtualdom");
var React = require("react");
var ReactDOM = require("react-dom");
var editor_1 = require("./editor");

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

function JSONEditor(options) {
var _this = _super.call(this, { node: Private.createEditorNode(options) }) || this;
var _this = _super.call(this) || this;
_this._dataDirty = false;

@@ -76,2 +77,4 @@ _this._inputDirty = false;

_this._changeGuard = false;
_this.addClass(JSONEDITOR_CLASS);
ReactDOM.render(Private.createEditorContent(options), _this.node);
var host = _this.editorHostNode;

@@ -399,14 +402,19 @@ var model = new editor_1.CodeEditor.Model();

/**
* Create the node for the JSON Editor.
* Create the JSON Editor node's content.
*/
function createEditorNode(options) {
function createEditorContent(options) {
var revertTitle = 'Revert changes to data';
var confirmTitle = 'Commit changes to data';
var collapseClass = COLLAPSER_CLASS;
if (options.collapsible) {
collapseClass += " " + COLLAPSE_ENABLED_CLASS;
}
return virtualdom_1.VirtualDOM.realize(virtualdom_1.h.div({ className: JSONEDITOR_CLASS }, virtualdom_1.h.div({ className: HEADER_CLASS }, virtualdom_1.h.span({ className: TITLE_CLASS }, options.title || ''), virtualdom_1.h.span({ className: collapseClass }), virtualdom_1.h.span({ className: REVERT_CLASS, title: revertTitle }), virtualdom_1.h.span({ className: COMMIT_CLASS, title: confirmTitle })), virtualdom_1.h.div({ className: HOST_CLASS })));
var title = options.title || '';
var collapseClass = options.collapsible ?
COLLAPSER_CLASS + " " + COLLAPSE_ENABLED_CLASS : COLLAPSER_CLASS;
return (React.createElement(React.Fragment, null,
React.createElement("div", { className: HEADER_CLASS },
React.createElement("span", { className: TITLE_CLASS }, title),
React.createElement("span", { className: collapseClass }),
React.createElement("span", { className: REVERT_CLASS, title: revertTitle }),
React.createElement("span", { className: COMMIT_CLASS, title: confirmTitle })),
React.createElement("div", { className: HOST_CLASS })));
}
Private.createEditorNode = createEditorNode;
Private.createEditorContent = createEditorContent;
})(Private || (Private = {}));
{
"name": "@jupyterlab/codeeditor",
"version": "0.15.4",
"version": "0.15.5",
"description": "JupyterLab - Abstract Code Editor",

@@ -33,4 +33,4 @@ "homepage": "https://github.com/jupyterlab/jupyterlab",

"dependencies": {
"@jupyterlab/coreutils": "^1.0.6",
"@jupyterlab/observables": "^1.0.6",
"@jupyterlab/coreutils": "^1.1.0",
"@jupyterlab/observables": "^1.0.7",
"@phosphor/coreutils": "^1.3.0",

@@ -40,4 +40,5 @@ "@phosphor/disposable": "^1.1.2",

"@phosphor/signaling": "^1.2.2",
"@phosphor/virtualdom": "^1.1.2",
"@phosphor/widgets": "^1.5.0"
"@phosphor/widgets": "^1.5.0",
"react": "~16.2.0",
"react-dom": "~16.2.0"
},

@@ -44,0 +45,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

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