Steven Silvester 7 years ago
parent
commit
d27aa2bf99

+ 5 - 4
packages/application/src/index.ts

@@ -60,7 +60,8 @@ class JupyterLab extends Application<ApplicationShell> {
     if (options.devMode) {
       this.shell.addClass('jp-mod-devMode');
     }
-    let linker = this.linker = new CommandLinker({ commands: this.commands });
+    let linker = new CommandLinker({ commands: this.commands });
+    this.commandLinker = linker;
 
     let items = Private.getDefaultRendererItems();
     let linkHandler = {
@@ -70,7 +71,7 @@ class JupyterLab extends Application<ApplicationShell> {
     };
     this.rendermime = new RenderMime({ items, linkHandler });
 
-    let registry = this.docregistry = new DocumentRegistry();
+    let registry = this.docRegistry = new DocumentRegistry();
     registry.addModelFactory(new TextModelFactory());
     registry.addModelFactory(new Base64ModelFactory());
     registry.addFileType({
@@ -90,7 +91,7 @@ class JupyterLab extends Application<ApplicationShell> {
   /**
    * The document registry instance used by the application.
    */
-  readonly docregistry: DocumentRegistry;
+  readonly docRegistry: DocumentRegistry;
 
   /**
    * The rendermime instance used by the application.
@@ -100,7 +101,7 @@ class JupyterLab extends Application<ApplicationShell> {
   /**
    * The command linker used by the application.
    */
-  readonly linker: CommandLinker;
+  readonly commandLinker: CommandLinker;
 
   /**
    * The information about the application.

+ 1 - 1
packages/application/src/mimerenderers.ts

@@ -75,7 +75,7 @@ function createRendermimePlugin(item: IRenderMime.IExtension): JupyterLabPlugin<
         rendermime: app.rendermime,
         ...item.widgetFactoryOptions,
       });
-      app.docregistry.addWidgetFactory(factory);
+      app.docRegistry.addWidgetFactory(factory);
 
       const factoryName = item.widgetFactoryOptions.name;
       const namespace = `${factoryName}-renderer`;

+ 1 - 0
packages/cells/package.json

@@ -17,6 +17,7 @@
     "@jupyterlab/codeeditor": "^0.7.0",
     "@jupyterlab/codemirror": "^0.7.0",
     "@jupyterlab/coreutils": "^0.7.0",
+    "@jupyterlab/docregistry": "^0.7.0",
     "@jupyterlab/outputarea": "^0.7.0",
     "@jupyterlab/rendermime": "^0.7.0",
     "@jupyterlab/services": "^0.46.0",

+ 5 - 1
packages/cells/src/widget.ts

@@ -31,6 +31,10 @@ import {
   CodeEditor, CodeEditorWrapper
 } from '@jupyterlab/codeeditor';
 
+import {
+  DocumentRegistry
+} from '@jupyterlab/docregistry';
+
 import {
   MimeModel, RenderMime
 } from '@jupyterlab/rendermime';
@@ -166,7 +170,7 @@ const RENDER_TIMEOUT = 1000;
  * A base cell widget.
  */
 export
-class Cell extends Widget implements RenderMime.IReadyWidget {
+class Cell extends Widget implements DocumentRegistry.IReadyWidget {
   /**
    * Construct a new base cell widget.
    */

+ 3 - 7
packages/chatbox-extension/src/index.ts

@@ -21,10 +21,6 @@ import {
   ChatboxPanel
 } from '@jupyterlab/chatbox';
 
-import {
-  RenderMime
-} from '@jupyterlab/rendermime';
-
 
 /**
  * The command IDs used by the chatbox plugin.
@@ -47,7 +43,7 @@ namespace CommandIDs {
 export
 const chatboxPlugin: JupyterLabPlugin<void> = {
   id: 'jupyter.extensions.chatbox',
-  requires: [RenderMime, ICommandPalette, IEditorServices, IDocumentManager, ILayoutRestorer],
+  requires: [ICommandPalette, IEditorServices, IDocumentManager, ILayoutRestorer],
   autoStart: true,
   activate: activateChatbox
 };
@@ -62,7 +58,7 @@ export default chatboxPlugin;
 /**
  * Activate the chatbox extension.
  */
-function activateChatbox(app: JupyterLab, rendermime: RenderMime, palette: ICommandPalette, editorServices: IEditorServices, docManager: IDocumentManager, restorer: ILayoutRestorer): void {
+function activateChatbox(app: JupyterLab, palette: ICommandPalette, editorServices: IEditorServices, docManager: IDocumentManager, restorer: ILayoutRestorer): void {
   const id = 'chatbox';
   let { commands, shell } = app;
   let category = 'Chatbox';
@@ -75,7 +71,7 @@ function activateChatbox(app: JupyterLab, rendermime: RenderMime, palette: IComm
     editorServices.factoryService);
   let contentFactory = new ChatboxPanel.ContentFactory({ editorFactory });
   let panel = new ChatboxPanel({
-    rendermime: rendermime.clone(),
+    rendermime: app.rendermime.clone(),
     contentFactory
   });
 

+ 3 - 3
packages/chatbox/src/chatbox.ts

@@ -47,7 +47,7 @@ import {
 } from '@jupyterlab/coreutils';
 
 import {
-  IRenderMime
+  RenderMime
 } from '@jupyterlab/rendermime';
 
 import {
@@ -681,7 +681,7 @@ class Chatbox extends Widget {
     return { model, rendermime, contentFactory };
   }
 
-  private _rendermime: IRenderMime = null;
+  private _rendermime: RenderMime = null;
   private _content: Panel = null;
   private _log: IObservableList<ChatEntry.IModel> = null;
   private _start: number = null;
@@ -715,7 +715,7 @@ namespace Chatbox {
     /**
      * The mime renderer for the chatbox widget.
      */
-    rendermime: IRenderMime;
+    rendermime: RenderMime;
   }
 
   /**

+ 2 - 2
packages/chatbox/src/panel.ts

@@ -18,7 +18,7 @@ import {
 } from '@jupyterlab/coreutils';
 
 import {
-  IRenderMime
+  RenderMime
 } from '@jupyterlab/rendermime';
 
 import {
@@ -185,7 +185,7 @@ namespace ChatboxPanel {
     /**
      * The rendermime instance used by the panel.
      */
-    rendermime: IRenderMime;
+    rendermime: RenderMime;
 
     /**
      * The content factory for the panel.

+ 1 - 5
packages/console/src/panel.ts

@@ -17,10 +17,6 @@ import {
   RenderMime
 } from '@jupyterlab/rendermime';
 
-import {
-  IRenderMime
-} from '@jupyterlab/rendermime';
-
 import {
   ServiceManager
 } from '@jupyterlab/services';
@@ -188,7 +184,7 @@ namespace ConsolePanel {
     /**
      * The rendermime instance used by the panel.
      */
-    rendermime: IRenderMime;
+    rendermime: RenderMime;
 
     /**
      * The content factory for the panel.

+ 3 - 3
packages/console/src/widget.ts

@@ -20,7 +20,7 @@ import {
 } from '@jupyterlab/coreutils';
 
 import {
-  IRenderMime
+  RenderMime
 } from '@jupyterlab/rendermime';
 
 import {
@@ -181,7 +181,7 @@ class CodeConsole extends Widget {
   /**
    * The rendermime instance used by the console.
    */
-  readonly rendermime: IRenderMime;
+  readonly rendermime: RenderMime;
 
   /**
    * The client session used by the console.
@@ -628,7 +628,7 @@ namespace CodeConsole {
     /**
      * The mime renderer for the console widget.
      */
-    rendermime: IRenderMime;
+    rendermime: RenderMime;
 
     /**
      * The client session for the console widget.

+ 4 - 8
packages/csvviewer-extension/src/index.ts

@@ -2,7 +2,7 @@
 // Distributed under the terms of the Modified BSD License.
 
 import {
-  ILayoutRestorer,JupyterLab, JupyterLabPlugin
+  ILayoutRestorer, JupyterLab, JupyterLabPlugin
 } from '@jupyterlab/application';
 
 import {
@@ -13,10 +13,6 @@ import {
   CSVViewer, CSVViewerFactory
 } from '@jupyterlab/csvviewer';
 
-import {
-  IDocumentRegistry
-} from '@jupyterlab/docregistry';
-
 
 /**
  * The name of the factory that creates CSV widgets.
@@ -30,7 +26,7 @@ const FACTORY = 'Table';
 const plugin: JupyterLabPlugin<void> = {
   activate,
   id: 'jupyter.extensions.csv-handler',
-  requires: [IDocumentRegistry, ILayoutRestorer],
+  requires: [ILayoutRestorer],
   autoStart: true
 };
 
@@ -44,7 +40,7 @@ export default plugin;
 /**
  * Activate the table widget extension.
  */
-function activate(app: JupyterLab, registry: IDocumentRegistry, restorer: ILayoutRestorer): void {
+function activate(app: JupyterLab, restorer: ILayoutRestorer): void {
   const factory = new CSVViewerFactory({
     name: FACTORY,
     fileExtensions: ['.csv'],
@@ -60,7 +56,7 @@ function activate(app: JupyterLab, registry: IDocumentRegistry, restorer: ILayou
     name: widget => widget.context.path
   });
 
-  registry.addWidgetFactory(factory);
+  app.docRegistry.addWidgetFactory(factory);
   factory.widgetCreated.connect((sender, widget) => {
     // Track the widget.
     tracker.add(widget);

+ 5 - 8
packages/docmanager-extension/src/index.ts

@@ -13,10 +13,6 @@ import {
   renameDialog, DocumentManager, IDocumentManager, showErrorMessage
 } from '@jupyterlab/docmanager';
 
-import {
-  IDocumentRegistry
-} from '@jupyterlab/docregistry';
-
 import {
   Contents, Kernel, IServiceManager
 } from '@jupyterlab/services';
@@ -64,8 +60,8 @@ namespace CommandIDs {
 const plugin: JupyterLabPlugin<IDocumentManager> = {
   id: 'jupyter.services.document-manager',
   provides: IDocumentManager,
-  requires: [IServiceManager, IDocumentRegistry, ICommandPalette, IMainMenu],
-  activate: (app: JupyterLab, manager: IServiceManager, registry: IDocumentRegistry, palette: ICommandPalette, mainMenu: IMainMenu): IDocumentManager => {
+  requires: [IServiceManager, ICommandPalette, IMainMenu],
+  activate: (app: JupyterLab, manager: IServiceManager, palette: ICommandPalette, mainMenu: IMainMenu): IDocumentManager => {
     const opener: DocumentManager.IWidgetOpener = {
       open: widget => {
         if (!widget.id) {
@@ -81,10 +77,11 @@ const plugin: JupyterLabPlugin<IDocumentManager> = {
         app.shell.activateById(widget.id);
       }
     };
+    const registry = app.docRegistry;
     const docManager = new DocumentManager({ registry, manager, opener });
 
     // Register the file operations commands.
-    addCommands(app, docManager, registry, palette);
+    addCommands(app, docManager, palette);
 
     return docManager;
   }
@@ -100,7 +97,7 @@ export default plugin;
 /**
  * Add the file operations commands to the application's command registry.
  */
-function addCommands(app: JupyterLab, docManager: IDocumentManager, registry: IDocumentRegistry, palette: ICommandPalette): void {
+function addCommands(app: JupyterLab, docManager: IDocumentManager, palette: ICommandPalette): void {
   const { commands } = app;
   const category = 'File Operations';
   const isEnabled = () => {

+ 0 - 7
packages/docregistry/src/registry.ts

@@ -42,13 +42,6 @@ import {
 } from '@jupyterlab/rendermime';
 
 
-/**
- * The interface for a document registry.
- */
-export
-interface IDocumentRegistry extends DocumentRegistry {}
-
-
 /**
  * The document registry.
  */

+ 4 - 4
packages/faq-extension/src/index.ts

@@ -6,7 +6,7 @@ import {
 } from '@jupyterlab/application';
 
 import {
-  ICommandLinker, ICommandPalette, InstanceTracker
+  ICommandPalette, InstanceTracker
 } from '@jupyterlab/apputils';
 
 import {
@@ -30,7 +30,7 @@ namespace CommandIDs {
 const plugin: JupyterLabPlugin<void> = {
   activate,
   id: 'jupyter.extensions.faq',
-  requires: [ICommandPalette, ICommandLinker, ILayoutRestorer],
+  requires: [ICommandPalette, ILayoutRestorer],
   autoStart: true
 };
 
@@ -44,7 +44,7 @@ export default plugin;
 /**
  * Activate the FAQ plugin.
  */
-function activate(app: JupyterLab, palette: ICommandPalette, linker: ICommandLinker, restorer: ILayoutRestorer): void {
+function activate(app: JupyterLab, palette: ICommandPalette, restorer: ILayoutRestorer): void {
   const category = 'Help';
   const command = CommandIDs.open;
   const model = new FaqModel();
@@ -61,7 +61,7 @@ function activate(app: JupyterLab, palette: ICommandPalette, linker: ICommandLin
   let widget: FaqWidget;
 
   function newWidget(): FaqWidget {
-    let widget = new FaqWidget({ linker });
+    let widget = new FaqWidget({ linker: app.commandLinker });
     widget.model = model;
     widget.id = 'faq';
     widget.title.label = 'FAQ';

+ 3 - 3
packages/faq-extension/src/widget.ts

@@ -2,7 +2,7 @@
 // Distributed under the terms of the Modified BSD License.
 
 import {
-  ICommandLinker, VDomModel, VDomRenderer
+  CommandLinker, VDomModel, VDomRenderer
 } from '@jupyterlab/apputils';
 
 import {
@@ -383,7 +383,7 @@ class FaqWidget extends VDomRenderer<FaqModel> {
     this.dispose();
   }
 
-  private _linker: ICommandLinker;
+  private _linker: CommandLinker;
 }
 
 
@@ -400,6 +400,6 @@ namespace FaqWidget {
     /**
      * A command linker instance.
      */
-    linker: ICommandLinker;
+    linker: CommandLinker;
   }
 }

+ 2 - 2
packages/filebrowser-extension/src/index.ts

@@ -18,7 +18,7 @@ import {
 } from '@jupyterlab/docmanager';
 
 import {
-  DocumentRegistry, IDocumentRegistry
+  DocumentRegistry
 } from '@jupyterlab/docregistry';
 
 import {
@@ -411,7 +411,7 @@ function createMenu(app: JupyterLab): Menu {
  * This function generates temporary commands with an incremented name. These
  * commands are disposed when the menu itself is disposed.
  */
-function createContextMenu(path: string, commands: CommandRegistry, registry: IDocumentRegistry):  Menu {
+function createContextMenu(path: string, commands: CommandRegistry, registry: DocumentRegistry):  Menu {
   const menu = new Menu({ commands });
 
   menu.addItem({ command: CommandIDs.open });

+ 2 - 7
packages/fileeditor-extension/src/index.ts

@@ -21,10 +21,6 @@ import {
    MarkdownCodeBlocks, PathExt
 } from '@jupyterlab/coreutils';
 
-import {
-  IDocumentRegistry
-} from '@jupyterlab/docregistry';
-
 import {
   FileEditor, FileEditorFactory, IEditorTracker
 } from '@jupyterlab/fileeditor';
@@ -82,7 +78,6 @@ const plugin: JupyterLabPlugin<IEditorTracker> = {
   activate,
   id: 'jupyter.services.editor-tracker',
   requires: [
-    IDocumentRegistry,
     ILayoutRestorer,
     IEditorServices,
     ISettingRegistry
@@ -133,7 +128,7 @@ export default plugin;
 /**
  * Activate the editor tracker plugin.
  */
-function activate(app: JupyterLab, registry: IDocumentRegistry, restorer: ILayoutRestorer, editorServices: IEditorServices, settingRegistry: ISettingRegistry, launcher: ILauncher | null): IEditorTracker {
+function activate(app: JupyterLab, restorer: ILayoutRestorer, editorServices: IEditorServices, settingRegistry: ISettingRegistry, launcher: ILauncher | null): IEditorTracker {
   const id = plugin.id;
   const namespace = 'editor';
   const factory = new FileEditorFactory({
@@ -208,7 +203,7 @@ function activate(app: JupyterLab, registry: IDocumentRegistry, restorer: ILayou
     tracker.add(widget);
     updateWidget(widget);
   });
-  registry.addWidgetFactory(factory);
+  app.docRegistry.addWidgetFactory(factory);
 
   // Handle the settings of new widgets.
   tracker.widgetAdded.connect((sender, widget) => {

+ 3 - 7
packages/imageviewer-extension/src/index.ts

@@ -9,10 +9,6 @@ import {
   ICommandPalette, InstanceTracker
 } from '@jupyterlab/apputils';
 
-import {
-  IDocumentRegistry
-} from '@jupyterlab/docregistry';
-
 import {
   ImageViewer, ImageViewerFactory, IImageTracker
 } from '@jupyterlab/imageviewer';
@@ -55,7 +51,7 @@ const plugin: JupyterLabPlugin<IImageTracker> = {
   activate,
   id: 'jupyter.extensions.image-handler',
   provides: IImageTracker,
-  requires: [IDocumentRegistry, ICommandPalette, ILayoutRestorer],
+  requires: [ICommandPalette, ILayoutRestorer],
   autoStart: true
 };
 
@@ -69,7 +65,7 @@ export default plugin;
 /**
  * Activate the image widget extension.
  */
-function activate(app: JupyterLab, registry: IDocumentRegistry, palette: ICommandPalette, restorer: ILayoutRestorer): IImageTracker {
+function activate(app: JupyterLab, palette: ICommandPalette, restorer: ILayoutRestorer): IImageTracker {
   const namespace = 'image-widget';
   const factory = new ImageViewerFactory({
     name: FACTORY,
@@ -87,7 +83,7 @@ function activate(app: JupyterLab, registry: IDocumentRegistry, palette: IComman
     name: widget => widget.context.path
   });
 
-  registry.addWidgetFactory(factory);
+  app.docRegistry.addWidgetFactory(factory);
 
   factory.widgetCreated.connect((sender, widget) => {
     // Notify the instance tracker if restore data needs to update.

+ 3 - 3
packages/inspector/src/handler.ts

@@ -26,7 +26,7 @@ import {
 } from '@jupyterlab/codeeditor';
 
 import {
-  MimeModel, IRenderMime
+  MimeModel, RenderMime
 } from '@jupyterlab/rendermime';
 
 import {
@@ -198,7 +198,7 @@ class InspectionHandler implements IDisposable, IInspector.IInspectable {
   private _ephemeralCleared = new Signal<InspectionHandler, void>(this);
   private _inspected = new Signal<this, IInspector.IInspectorUpdate>(this);
   private _pending = 0;
-  private _rendermime: IRenderMime = null;
+  private _rendermime: RenderMime = null;
   private _standby = true;
 }
 
@@ -221,6 +221,6 @@ namespace InspectionHandler {
     /**
      * The mime renderer for the inspection handler.
      */
-    rendermime: IRenderMime;
+    rendermime: RenderMime;
   }
 }

+ 4 - 12
packages/markdownviewer-extension/src/index.ts

@@ -9,14 +9,6 @@ import {
   InstanceTracker
 } from '@jupyterlab/apputils';
 
-import {
-  IDocumentRegistry
-} from '@jupyterlab/docregistry';
-
-import {
-  IRenderMime
-} from '@jupyterlab/rendermime';
-
 import {
   MarkdownViewer, MarkdownViewerFactory
 } from '@jupyterlab/markdownviewer';
@@ -48,7 +40,7 @@ namespace CommandIDs {
 const plugin: JupyterLabPlugin<void> = {
   activate,
   id: 'jupyter.extensions.rendered-markdown',
-  requires: [IDocumentRegistry, IRenderMime, ILayoutRestorer],
+  requires: [ILayoutRestorer],
   autoStart: true
 };
 
@@ -56,12 +48,12 @@ const plugin: JupyterLabPlugin<void> = {
 /**
  * Activate the markdown plugin.
  */
-function activate(app: JupyterLab, registry: IDocumentRegistry, rendermime: IRenderMime, restorer: ILayoutRestorer) {
+function activate(app: JupyterLab, restorer: ILayoutRestorer) {
     const factory = new MarkdownViewerFactory({
       name: FACTORY,
       fileExtensions: ['.md'],
       readOnly: true,
-      rendermime
+      rendermime: app.rendermime
     });
 
     const { commands } = app;
@@ -82,7 +74,7 @@ function activate(app: JupyterLab, registry: IDocumentRegistry, rendermime: IRen
       tracker.add(widget);
     });
 
-    registry.addWidgetFactory(factory);
+    app.docRegistry.addWidgetFactory(factory);
 
     commands.addCommand(CommandIDs.preview, {
       label: 'Markdown Preview',

+ 6 - 6
packages/markdownviewer/src/widget.ts

@@ -26,7 +26,7 @@ import {
 } from '@jupyterlab/docregistry';
 
 import {
-  MimeModel, IRenderMime
+  MimeModel, RenderMime
 } from '@jupyterlab/rendermime';
 
 
@@ -49,7 +49,7 @@ class MarkdownViewer extends Widget implements DocumentRegistry.IReadyWidget {
   /**
    * Construct a new markdown widget.
    */
-  constructor(context: DocumentRegistry.Context, rendermime: IRenderMime) {
+  constructor(context: DocumentRegistry.Context, rendermime: RenderMime) {
     super();
     this.addClass(MD_CLASS);
     let layout = this.layout = new PanelLayout();
@@ -122,7 +122,7 @@ class MarkdownViewer extends Widget implements DocumentRegistry.IReadyWidget {
   /**
    * Render the markdown content.
    */
-  private _render(): IRenderMime.IReadyWidget {
+  private _render(): DocumentRegistry.IReadyWidget {
     let context = this._context;
     let model = context.model;
     let layout = this.layout as PanelLayout;
@@ -146,7 +146,7 @@ class MarkdownViewer extends Widget implements DocumentRegistry.IReadyWidget {
 
   private _context: DocumentRegistry.Context = null;
   private _monitor: ActivityMonitor<any, any> = null;
-  private _rendermime: IRenderMime = null;
+  private _rendermime: RenderMime = null;
   private _ready = new PromiseDelegate<void>();
 }
 
@@ -171,7 +171,7 @@ class MarkdownViewerFactory extends ABCWidgetFactory<MarkdownViewer, DocumentReg
     return new MarkdownViewer(context, this._rendermime.clone());
   }
 
-  private _rendermime: IRenderMime = null;
+  private _rendermime: RenderMime = null;
 }
 
 
@@ -188,6 +188,6 @@ namespace MarkdownViewerFactory {
     /**
      * A rendermime instance.
      */
-    rendermime: IRenderMime;
+    rendermime: RenderMime;
   }
 }

+ 3 - 12
packages/notebook-extension/src/index.ts

@@ -17,10 +17,6 @@ import {
   IStateDB
 } from '@jupyterlab/coreutils';
 
-import {
-  IDocumentRegistry
-} from '@jupyterlab/docregistry';
-
 import {
   ILauncher
 } from '@jupyterlab/launcher';
@@ -30,10 +26,6 @@ import {
   NotebookModelFactory,  NotebookPanel, NotebookTracker, NotebookWidgetFactory
 } from '@jupyterlab/notebook';
 
-import {
-  IRenderMime
-} from '@jupyterlab/rendermime';
-
 import {
   IServiceManager
 } from '@jupyterlab/services';
@@ -251,9 +243,7 @@ const trackerPlugin: JupyterLabPlugin<INotebookTracker> = {
   id: 'jupyter.services.notebook-tracker',
   provides: INotebookTracker,
   requires: [
-    IDocumentRegistry,
     IServiceManager,
-    IRenderMime,
     IMainMenu,
     ICommandPalette,
     NotebookPanel.IContentFactory,
@@ -372,7 +362,7 @@ function activateCellTools(app: JupyterLab, tracker: INotebookTracker, editorSer
 /**
  * Activate the notebook handler extension.
  */
-function activateNotebookHandler(app: JupyterLab, registry: IDocumentRegistry, services: IServiceManager, rendermime: IRenderMime, mainMenu: IMainMenu, palette: ICommandPalette, contentFactory: NotebookPanel.IContentFactory, editorServices: IEditorServices, restorer: ILayoutRestorer, launcher: ILauncher | null): INotebookTracker {
+function activateNotebookHandler(app: JupyterLab, services: IServiceManager, mainMenu: IMainMenu, palette: ICommandPalette, contentFactory: NotebookPanel.IContentFactory, editorServices: IEditorServices, restorer: ILayoutRestorer, launcher: ILauncher | null): INotebookTracker {
 
   const factory = new NotebookWidgetFactory({
     name: FACTORY,
@@ -381,7 +371,7 @@ function activateNotebookHandler(app: JupyterLab, registry: IDocumentRegistry, s
     defaultFor: ['.ipynb'],
     preferKernel: true,
     canStartKernel: true,
-    rendermime,
+    rendermime: app.rendermime,
     contentFactory,
     mimeTypeService: editorServices.mimeTypeService
   });
@@ -403,6 +393,7 @@ function activateNotebookHandler(app: JupyterLab, registry: IDocumentRegistry, s
     }
   });
 
+  let registry = app.docRegistry;
   registry.addModelFactory(new NotebookModelFactory({}));
   registry.addWidgetFactory(factory);
   registry.addFileType({

+ 3 - 3
packages/notebook/src/panel.ts

@@ -43,7 +43,7 @@ import {
 } from '@jupyterlab/docregistry';
 
 import {
-  IRenderMime
+  RenderMime
 } from '@jupyterlab/rendermime';
 
 import {
@@ -146,7 +146,7 @@ class NotebookPanel extends Widget implements DocumentRegistry.IReadyWidget {
   /**
    * The Rendermime instance used by the widget.
    */
-  readonly rendermime: IRenderMime;
+  readonly rendermime: RenderMime;
 
   /**
    * The notebook used by the widget.
@@ -402,7 +402,7 @@ export namespace NotebookPanel {
     /**
      * The rendermime instance used by the panel.
      */
-    rendermime: IRenderMime;
+    rendermime: RenderMime;
 
     /**
      * The language preference for the model.

+ 3 - 3
packages/notebook/src/widget.ts

@@ -52,7 +52,7 @@ import {
 } from '@jupyterlab/coreutils';
 
 import {
-  IRenderMime
+  RenderMime
 } from '@jupyterlab/rendermime';
 
 import {
@@ -202,7 +202,7 @@ class StaticNotebook extends Widget {
   /**
    * The Rendermime instance used by the widget.
    */
-  readonly rendermime: IRenderMime;
+  readonly rendermime: RenderMime;
 
   /**
    * The model for the widget.
@@ -519,7 +519,7 @@ namespace StaticNotebook {
     /**
      * The rendermime instance used by the widget.
      */
-    rendermime: IRenderMime;
+    rendermime: RenderMime;
 
     /**
      * The language preference for the model.

+ 3 - 3
packages/notebook/src/widgetfactory.ts

@@ -10,7 +10,7 @@ import {
 } from '@jupyterlab/docregistry';
 
 import {
-  IRenderMime
+  RenderMime
 } from '@jupyterlab/rendermime';
 
 import {
@@ -46,7 +46,7 @@ class NotebookWidgetFactory extends ABCWidgetFactory<NotebookPanel, INotebookMod
   /*
    * The rendermime instance.
    */
-  readonly rendermime: IRenderMime;
+  readonly rendermime: RenderMime;
 
   /**
    * The content factory used by the widget factory.
@@ -92,7 +92,7 @@ namespace NotebookWidgetFactory {
      /*
       * A rendermime instance.
       */
-    rendermime: IRenderMime;
+    rendermime: RenderMime;
 
     /**
      * A notebook panel content factory.

+ 3 - 3
packages/outputarea/src/widget.ts

@@ -30,7 +30,7 @@ import {
 } from '@jupyterlab/coreutils';
 
 import {
-  IOutputModel, IRenderMime
+  IOutputModel, RenderMime
 } from '@jupyterlab/rendermime';
 
 import {
@@ -146,7 +146,7 @@ class OutputArea extends Widget {
   /**
    * Te rendermime instance used by the widget.
    */
-  readonly rendermime: IRenderMime;
+  readonly rendermime: RenderMime;
 
   /**
    * A read-only sequence of the chidren widgets in the output area.
@@ -450,7 +450,7 @@ namespace OutputArea {
     /**
      * The rendermime instance used by the widget.
      */
-    rendermime: IRenderMime;
+    rendermime: RenderMime;
   }
 
   /**

+ 2 - 2
packages/tooltip/src/index.ts

@@ -18,7 +18,7 @@ import {
 } from '@jupyterlab/codeeditor';
 
 import {
-  IRenderMime
+  RenderMime
 } from '@jupyterlab/rendermime';
 
 import '../style/index.css';
@@ -75,6 +75,6 @@ namespace ITooltipManager {
     /**
      * The renderer the tooltip uses to render API responses.
      */
-    readonly rendermime: IRenderMime;
+    readonly rendermime: RenderMime;
   }
 }