@jupyterlab/codeeditor
Advanced tools
Comparing version 1.0.0-alpha.6 to 1.0.0-alpha.7
@@ -1,7 +0,5 @@ | ||
"use strict"; | ||
// Copyright (c) Jupyter Development Team. | ||
// Distributed under the terms of the Modified BSD License. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const signaling_1 = require("@phosphor/signaling"); | ||
const observables_1 = require("@jupyterlab/observables"); | ||
import { Signal } from '@phosphor/signaling'; | ||
import { ModelDB } from '@jupyterlab/observables'; | ||
/** | ||
@@ -15,3 +13,3 @@ * A namespace for code editors. | ||
*/ | ||
var CodeEditor; | ||
export var CodeEditor; | ||
(function (CodeEditor) { | ||
@@ -35,3 +33,3 @@ /** | ||
this._isDisposed = false; | ||
this._mimeTypeChanged = new signaling_1.Signal(this); | ||
this._mimeTypeChanged = new Signal(this); | ||
options = options || {}; | ||
@@ -42,3 +40,3 @@ if (options.modelDB) { | ||
else { | ||
this.modelDB = new observables_1.ModelDB(); | ||
this.modelDB = new ModelDB(); | ||
} | ||
@@ -98,3 +96,3 @@ let value = this.modelDB.createString('value'); | ||
this.value.text = ''; | ||
signaling_1.Signal.clearData(this); | ||
Signal.clearData(this); | ||
} | ||
@@ -128,2 +126,2 @@ _onMimeTypeChanged(mimeType, args) { | ||
}; | ||
})(CodeEditor = exports.CodeEditor || (exports.CodeEditor = {})); | ||
})(CodeEditor || (CodeEditor = {})); |
@@ -1,4 +0,2 @@ | ||
"use strict"; | ||
// Copyright (c) Jupyter Development Team. | ||
// Distributed under the terms of the Modified BSD License. | ||
Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -1,4 +0,1 @@ | ||
import { Token } from '@phosphor/coreutils'; | ||
import { IEditorFactoryService } from './factory'; | ||
import { IEditorMimeTypeService } from './mimetype'; | ||
import '../style/index.css'; | ||
@@ -10,18 +7,2 @@ export * from './editor'; | ||
export * from './mimetype'; | ||
/** | ||
* Code editor services token. | ||
*/ | ||
export declare const IEditorServices: Token<IEditorServices>; | ||
/** | ||
* Code editor services. | ||
*/ | ||
export interface IEditorServices { | ||
/** | ||
* The code editor factory. | ||
*/ | ||
readonly factoryService: IEditorFactoryService; | ||
/** | ||
* The editor mime type service. | ||
*/ | ||
readonly mimeTypeService: IEditorMimeTypeService; | ||
} | ||
export * from './tokens'; |
@@ -1,18 +0,8 @@ | ||
"use strict"; | ||
// Copyright (c) Jupyter Development Team. | ||
// Distributed under the terms of the Modified BSD License. | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const coreutils_1 = require("@phosphor/coreutils"); | ||
require("../style/index.css"); | ||
__export(require("./editor")); | ||
__export(require("./jsoneditor")); | ||
__export(require("./widget")); | ||
__export(require("./mimetype")); | ||
/* tslint:disable */ | ||
/** | ||
* Code editor services token. | ||
*/ | ||
exports.IEditorServices = new coreutils_1.Token('@jupyterlab/codeeditor:IEditorServices'); | ||
import '../style/index.css'; | ||
export * from './editor'; | ||
export * from './jsoneditor'; | ||
export * from './widget'; | ||
export * from './mimetype'; | ||
export * from './tokens'; |
@@ -1,8 +0,6 @@ | ||
"use strict"; | ||
// Copyright (c) Jupyter Development Team. | ||
// Distributed under the terms of the Modified BSD License. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const coreutils_1 = require("@phosphor/coreutils"); | ||
const widgets_1 = require("@phosphor/widgets"); | ||
const editor_1 = require("./editor"); | ||
import { JSONExt } from '@phosphor/coreutils'; | ||
import { Widget } from '@phosphor/widgets'; | ||
import { CodeEditor } from './editor'; | ||
/** | ||
@@ -35,3 +33,3 @@ * The class name added to a JSONEditor instance. | ||
*/ | ||
class JSONEditor extends widgets_1.Widget { | ||
export class JSONEditor extends Widget { | ||
/** | ||
@@ -45,3 +43,3 @@ * Construct a new JSON editor. | ||
this._source = null; | ||
this._originalValue = coreutils_1.JSONExt.emptyObject; | ||
this._originalValue = JSONExt.emptyObject; | ||
this._changeGuard = false; | ||
@@ -63,3 +61,3 @@ this.addClass(JSONEDITOR_CLASS); | ||
this.node.appendChild(this.editorHostNode); | ||
let model = new editor_1.CodeEditor.Model(); | ||
let model = new CodeEditor.Model(); | ||
model.value.text = 'No data!'; | ||
@@ -177,3 +175,3 @@ model.mimeType = 'application/json'; | ||
this._inputDirty = | ||
!this._changeGuard && !coreutils_1.JSONExt.deepEqual(value, this._originalValue); | ||
!this._changeGuard && !JSONExt.deepEqual(value, this._originalValue); | ||
} | ||
@@ -234,3 +232,3 @@ catch (err) { | ||
for (let key in user) { | ||
if (!coreutils_1.JSONExt.deepEqual(user[key], old[key] || null)) { | ||
if (!JSONExt.deepEqual(user[key], old[key] || null)) { | ||
source.set(key, user[key]); | ||
@@ -260,3 +258,3 @@ } | ||
model.value.text = 'No data!'; | ||
this._originalValue = coreutils_1.JSONExt.emptyObject; | ||
this._originalValue = JSONExt.emptyObject; | ||
} | ||
@@ -278,2 +276,1 @@ else { | ||
} | ||
exports.JSONEditor = JSONEditor; |
@@ -1,9 +0,7 @@ | ||
"use strict"; | ||
// Copyright (c) Jupyter Development Team. | ||
// Distributed under the terms of the Modified BSD License. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
* A namespace for `IEditorMimeTypeService`. | ||
*/ | ||
var IEditorMimeTypeService; | ||
export var IEditorMimeTypeService; | ||
(function (IEditorMimeTypeService) { | ||
@@ -14,2 +12,2 @@ /** | ||
IEditorMimeTypeService.defaultMimeType = 'text/plain'; | ||
})(IEditorMimeTypeService = exports.IEditorMimeTypeService || (exports.IEditorMimeTypeService = {})); | ||
})(IEditorMimeTypeService || (IEditorMimeTypeService = {})); |
@@ -1,6 +0,4 @@ | ||
"use strict"; | ||
// Copyright (c) Jupyter Development Team. | ||
// Distributed under the terms of the Modified BSD License. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const widgets_1 = require("@phosphor/widgets"); | ||
import { Widget } from '@phosphor/widgets'; | ||
/** | ||
@@ -26,3 +24,3 @@ * The class name added to an editor widget that has a primary selection. | ||
*/ | ||
class CodeEditorWrapper extends widgets_1.Widget { | ||
export class CodeEditorWrapper extends Widget { | ||
/** | ||
@@ -246,3 +244,2 @@ * Construct a new code editor widget. | ||
} | ||
exports.CodeEditorWrapper = CodeEditorWrapper; | ||
/** | ||
@@ -249,0 +246,0 @@ * A namespace for private functionality. |
{ | ||
"name": "@jupyterlab/codeeditor", | ||
"version": "1.0.0-alpha.6", | ||
"version": "1.0.0-alpha.7", | ||
"description": "JupyterLab - Abstract Code Editor", | ||
@@ -9,2 +9,6 @@ "homepage": "https://github.com/jupyterlab/jupyterlab", | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/jupyterlab/jupyterlab.git" | ||
}, | ||
"license": "BSD-3-Clause", | ||
@@ -23,6 +27,2 @@ "author": "Project Jupyter", | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/jupyterlab/jupyterlab.git" | ||
}, | ||
"scripts": { | ||
@@ -36,4 +36,4 @@ "build": "tsc -b", | ||
"dependencies": { | ||
"@jupyterlab/coreutils": "^3.0.0-alpha.6", | ||
"@jupyterlab/observables": "^2.2.0-alpha.6", | ||
"@jupyterlab/coreutils": "^3.0.0-alpha.7", | ||
"@jupyterlab/observables": "^2.2.0-alpha.7", | ||
"@phosphor/coreutils": "^1.3.0", | ||
@@ -54,3 +54,3 @@ "@phosphor/disposable": "^1.1.2", | ||
}, | ||
"gitHead": "25152cd7c0a2d2d3d020dcd59451c236e9ecc6ab" | ||
"gitHead": "f8e210a027f6545b426caf4ab64c75a1e1619a44" | ||
} |
18
49841
1586