UNPKG

jupyterlab-emrys

Version:

A computational environment for Jupyter. Powered by Emrys

60 lines (59 loc) 1.64 kB
// Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. "use strict"; var _1 = require('./'); /** * The code inspector extension. */ exports.inspectorExtension = { id: 'jupyter.extensions.inspector', activate: activateInspector }; /** * A service providing an interface to the code inspector. */ exports.inspectorProvider = { id: 'jupyter.services.inspector', provides: _1.Inspector, resolve: function () { return Private.inspector; } }; /** * Activate the console extension. */ function activateInspector(app) { var inspector = Private.inspector; inspector.id = 'jp-inspector'; inspector.title.text = 'Inspector'; // Rank has been chosen somewhat arbitrarily to guarantee the inspector is // at least not the first item in the application sidebar. app.shell.addToRightArea(inspector, { rank: 3 }); return Promise.resolve(void 0); } /** * A namespace for private data. */ var Private; (function (Private) { /** * The default set of inspector items added to the inspector panel. */ var defaultInspectorItems = [ { className: 'jp-HintsInspectorItem', name: 'Hints', rank: 2, type: 'hints' }, { className: 'jp-DetailsInspectorItem', name: 'Details', rank: 1, remembers: true, type: 'details' } ]; /** * The default singleton instance of the code inspector. */ Private.inspector = new _1.Inspector({ items: defaultInspectorItems }); })(Private || (Private = {}));