import * as commutable from "@nteract/commutable"; import * as Immutable from "immutable"; import { CellId } from "@nteract/commutable"; import { NotebookModel } from "@nteract/types"; /** * Returns the cellMap within a given NotebookModel. Returns an empty * Immutable.Map if no cellMap exists in the NotebookModel. * * @param model The notebook model to extract the cell map from * * @returns The cell map within the notebook or an empty map */ export declare const cellMap: (model: NotebookModel) => Immutable.Map; /** * Returns the cell within a notebook with a particular ID. Returns * undefined if no cell with that ID is found in the model * * @param model The notebook model to extract the cell from * @param { id: CellId } The ID of the cell to extract * * @returns Undefined or a cell with the given ID */ export declare const cellById: (model: NotebookModel, { id }: { id: CellId; }) => Immutable.RecordOf | Immutable.RecordOf | Immutable.RecordOf | undefined; /** * Returns the cell order within a notebook. Returns an empty list if the * notebook contains no cellOrder. * * @param model The notebook model to extract the cell order list from * * @returns The cell order within a notebook or an empty list */ export declare const cellOrder: (model: NotebookModel) => Immutable.List; /** * Returns the ID of the focused cell within a notebook. * * @param model The notebook to extract the focused cell from * * @returns The ID of the focused cell */ export declare const cellFocused: (model: NotebookModel) => CellId | null | undefined; /** * Returns the CellId of the cell with the currently focused editor within * the notebook. * * @param model The notebook to extract the focused editor from * * @returns The ID of the cell with the currently focused editor */ export declare const editorFocusedId: (model: NotebookModel) => CellId | null | undefined; /** * Returns a list of CellIds above the currently focused cell in a notebook or the given cell ID. * * @param model The notebook to extract the code cells from * @param cellId The reference cell ID. Defaults to the currently focused cell * * @returns The IDs of cells above the reference cell */ export declare const codeCellIdsAbove: (model: NotebookModel, cellId?: string | null | undefined) => Immutable.List; /** * Returns a list of CellIds below the currently focused cell in a notebook or the given cell ID. * * @param model The notebook to extract the code cells from * @param cellId The reference cell ID. Defaults to the currently focused cell * * @returns The IDs of cells below the reference cell */ export declare const codeCellIdsBelow: (model: NotebookModel, cellId?: string | null | undefined) => Immutable.List; /** * Returns the CellIds of the hidden cells in a notebook. */ export declare const hiddenCellIds: (model: NotebookModel) => Immutable.List; /** * Returns the CellIds of the cells with hidden outputs in the * notebook. */ export declare const idsOfHiddenOutputs: (model: NotebookModel) => Immutable.List; /** * Returns a transient version of the cell map within a notebook. This cell * map is a copy of the original cell map that is transient. * * @param model The notebook to extract the transient cell map from * * @returns The tranisent cell map */ export declare const transientCellMap: (model: NotebookModel) => any; export declare const cellPromptsById: (model: NotebookModel, { id }: { id: CellId; }) => Immutable.List | Immutable.List; /** * Returns the CellIds of the code cells within a notebook. */ export declare const codeCellIds: (model: NotebookModel) => Immutable.List; /** * Returns the metadata of a notebook. Returns an empty Immutable.Map if * no metadata is defined. * * @param model The notebook to extract the metadata from * * @returns An empty Map or a Map containing the metadata of the notebook */ export declare const metadata: (model: NotebookModel) => Immutable.Map; /** * Returns the GitHub username the user has authenticated through. */ export declare const githubUsername: import("reselect").OutputSelector, any, (res: Immutable.Map) => any>; /** * Returns the ID of the GitHub Gist the notebook has been recently published * to. */ export declare const gistId: import("reselect").OutputSelector, any, (res: Immutable.Map) => any>; export declare const notebook: (model: NotebookModel) => commutable.ImmutableNotebook; export declare const savedNotebook: (model: NotebookModel) => commutable.ImmutableNotebook; /** * Returns true if the notebook differs from the version saved to disk, and * false otherwise. */ export declare const isDirty: import("reselect").OutputSelector, boolean, (res1: commutable.ImmutableNotebook, res2: commutable.ImmutableNotebook) => boolean>; /** * Returns the JSON representation of the notebook. */ export declare const asJSON: import("reselect").OutputSelector, import("@nteract/commutable/lib/v4").NotebookV4, (res: commutable.ImmutableNotebook) => import("@nteract/commutable/lib/v4").NotebookV4>; /** * Returns the stringified version of a notebook. Returns an empty string * if no notebookJS exists. Note that this is called asString instead of * toString so that REPLs don't think of this as the representation of this * module. */ export declare const asString: import("reselect").OutputSelector, string, (res: import("@nteract/commutable/lib/v4").NotebookV4) => string>; /** * Returns the CodeMirror mode of the current notebook. This value can be used * to initialize the `mode` option in CodeMirror. Returns `text` if no mode * is set. */ export declare const codeMirrorMode: import("reselect").OutputSelector, any, (res: Immutable.Map) => any>; /** * Returns the display name of the kernel the notebook is currently * running against. */ export declare const displayName: import("reselect").OutputSelector, any, (res: Immutable.Map) => any>;