@jupyterlab/notebook 4.1.0-alpha.2 → 4.1.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/actions.d.ts CHANGED
@@ -56,6 +56,13 @@ export declare class NotebookActions {
56
56
  notebook: Notebook;
57
57
  lastCell: Cell;
58
58
  }>;
59
+ /**
60
+ * A signal that emits when a cell's output is cleared.
61
+ */
62
+ static get outputCleared(): ISignal<any, {
63
+ notebook: Notebook;
64
+ cell: Cell;
65
+ }>;
59
66
  /**
60
67
  * A private constructor for the `NotebookActions` class.
61
68
  *
@@ -184,6 +191,22 @@ export declare namespace NotebookActions {
184
191
  * All markdown cells will be rendered.
185
192
  */
186
193
  function run(notebook: Notebook, sessionContext?: ISessionContext, sessionDialogs?: ISessionContextDialogs, translator?: ITranslator): Promise<boolean>;
194
+ /**
195
+ * Run specified cells.
196
+ *
197
+ * @param notebook - The target notebook widget.
198
+ * @param cells - The cells to run.
199
+ * @param sessionContext - The client session object.
200
+ * @param sessionDialogs - The session dialogs.
201
+ * @param translator - The application translator.
202
+ *
203
+ * #### Notes
204
+ * The existing selection will be preserved.
205
+ * The mode will be changed to command.
206
+ * An execution error will prevent the remaining code cells from executing.
207
+ * All markdown cells will be rendered.
208
+ */
209
+ function runCells(notebook: Notebook, cells: readonly Cell[], sessionContext?: ISessionContext, sessionDialogs?: ISessionContextDialogs, translator?: ITranslator): Promise<boolean>;
187
210
  /**
188
211
  * Run the selected cell(s) and advance to the next cell.
189
212
  *
@@ -625,4 +648,30 @@ export declare namespace NotebookActions {
625
648
  * No dialog will be presented if the notebook is already trusted.
626
649
  */
627
650
  function trust(notebook: Notebook, translator?: ITranslator): Promise<void>;
651
+ /**
652
+ * If the notebook has an active cell, focus it.
653
+ *
654
+ * @param notebook The target notebook widget
655
+ * @param options Optional options to change the behavior of this function
656
+ * @param options.waitUntilReady If true, do not call focus until activeCell.ready is resolved
657
+ * @param options.preventScroll If true, do not scroll the active cell into view
658
+ *
659
+ * @returns a promise that resolves when focus has been called on the active
660
+ * cell's node.
661
+ *
662
+ * #### Notes
663
+ * By default, waits until after the active cell has been attached unless
664
+ * called with { waitUntilReady: false }
665
+ */
666
+ function focusActiveCell(notebook: Notebook, options?: {
667
+ waitUntilReady?: boolean;
668
+ preventScroll?: boolean;
669
+ }): Promise<void>;
670
+ function accessPreviousHistory(notebook: Notebook): Promise<void>;
671
+ /**
672
+ * Access next notebook history.
673
+ *
674
+ * @param notebook - The target notebook widget.
675
+ */
676
+ function accessNextHistory(notebook: Notebook): Promise<void>;
628
677
  }