瀏覽代碼

Update names after ContentFactory/CSS refactor.

ian-r-rose 8 年之前
父節點
當前提交
cb449557cf
共有 4 個文件被更改,包括 16 次插入16 次删除
  1. 11 11
      packages/chatbox/src/chatbox.ts
  2. 3 3
      packages/chatbox/src/entry.ts
  3. 1 1
      packages/chatbox/src/panel.ts
  4. 1 1
      packages/chatbox/style/index.css

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

@@ -38,8 +38,8 @@ import {
 } from '@jupyterlab/codeeditor';
 
 import {
-  BaseCellWidget,
-  MarkdownCellModel, MarkdownCellWidget
+  Cell,
+  MarkdownCellModel, MarkdownCell
 } from '@jupyterlab/cells';
 
 import {
@@ -172,9 +172,9 @@ class Chatbox extends Widget {
   /*
    * The chatbox input prompt.
    */
-  get prompt(): MarkdownCellWidget | null {
+  get prompt(): MarkdownCell | null {
     let inputLayout = (this._input.layout as PanelLayout);
-    return inputLayout.widgets[0] as MarkdownCellWidget || null;
+    return inputLayout.widgets[0] as MarkdownCell || null;
   }
 
   /**
@@ -647,7 +647,7 @@ class Chatbox extends Widget {
   /**
    * Create the options used to initialize markdown cell widget.
    */
-  private _createMarkdownCellOptions(text: string = ''): MarkdownCellWidget.IOptions {
+  private _createMarkdownCellOptions(text: string = ''): MarkdownCell.IOptions {
     let contentFactory = this.contentFactory.markdownCellContentFactory;
     let model = new MarkdownCellModel({ });
     this._disposables.add(model);
@@ -705,12 +705,12 @@ namespace Chatbox {
     /**
      * The factory for a markdown cell widget.
      */
-    readonly markdownCellContentFactory: BaseCellWidget.IContentFactory;
+    readonly markdownCellContentFactory: Cell.IContentFactory;
 
     /**
      * Create a new cell widget.
      */
-    createCell(options: MarkdownCellWidget.IOptions): MarkdownCellWidget;
+    createCell(options: MarkdownCell.IOptions): MarkdownCell;
 
   }
 
@@ -725,7 +725,7 @@ namespace Chatbox {
     constructor(options: IContentFactoryOptions) {
       this.editorFactory = options.editorFactory;
 
-      this.markdownCellContentFactory = new MarkdownCellWidget.ContentFactory({
+      this.markdownCellContentFactory = new MarkdownCell.ContentFactory({
         editorFactory: this.editorFactory,
       });
     }
@@ -738,13 +738,13 @@ namespace Chatbox {
     /**
      * The factory for a markdown cell widget.
      */
-    readonly markdownCellContentFactory: BaseCellWidget.IContentFactory;
+    readonly markdownCellContentFactory: Cell.IContentFactory;
 
     /**
      * Create a new prompt widget.
      */
-    createCell(options: MarkdownCellWidget.IOptions): MarkdownCellWidget {
-      return new MarkdownCellWidget(options);
+    createCell(options: MarkdownCell.IOptions): MarkdownCell {
+      return new MarkdownCell(options);
     }
   }
   /**

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

@@ -14,7 +14,7 @@ import {
 } from '@jupyterlab/coreutils';
 
 import {
-  MarkdownCellWidget
+  MarkdownCell
 } from '@jupyterlab/cells';
 
 /**
@@ -71,7 +71,7 @@ class ChatEntry extends Widget {
   /**
    * The underlying cell widget for the entry.
    */
-  readonly cell: MarkdownCellWidget;
+  readonly cell: MarkdownCell;
 
   private _badge: Widget = null;
 }
@@ -95,7 +95,7 @@ namespace ChatEntry {
     /**
      * A markdown widget for rendering the entry.
      */
-    cell: MarkdownCellWidget;
+    cell: MarkdownCell;
   }
 
   /**

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

@@ -204,7 +204,7 @@ namespace ChatboxPanel {
     readonly editorFactory: CodeEditor.Factory;
 
     /**
-     * The factory for code chatbox content.
+     * The factory for chatbox content.
      */
     readonly chatboxContentFactory: Chatbox.IContentFactory;
   }

+ 1 - 1
packages/chatbox/style/index.css

@@ -50,7 +50,7 @@
 /**
  * No reason to include space for the In/Out prompt here.
  */
-.jp-Chatbox .jp-Cell-prompt {
+.jp-Chatbox .jp-InputPrompt {
   display: none;
 }