export type NotebookTheme = "air" | "coffee" | "cotton" | "deep-space" | "glacier" | "ink" | "midnight" | "near-midnight" | "ocean-floor" | "parchment" | "slate" | "stark" | "sun-faded"; export type LightDarkNotebookTheme = { light: NotebookTheme; dark: NotebookTheme; }; export interface NotebookSpec { /** the notebook’s cells, in top-to-bottom document order */ cells?: CellSpec[]; /** the notebook title, if any; extracted from the first h1 */ title?: string; /** the notebook theme(s); defaults to "air" */ theme?: NotebookTheme | LightDarkNotebookTheme; /** if true, don’t allow editing */ readOnly?: boolean; } export interface Notebook extends NotebookSpec { cells: Cell[]; title: NonNullable; theme: NonNullable; readOnly: NonNullable; } export interface CellSpec { /** the unique identifier for this cell */ id: number; /** the committed cell value; defaults to empty */ value?: string; /** the mode; affects how the value is evaluated; defaults to js */ mode?: "js" | "ts" | "ojs" | "md" | "html" | "tex" | "dot" | "sql" | "node" | "python" | "r"; /** if true, the editor will stay open when not focused; defaults to false */ pinned?: boolean; /** if true, implicit display will be suppressed; defaults to false */ hidden?: boolean; /** if present, exposes the cell’s value to the rest of the notebook */ output?: string; /** for data loader cells, how the data is represented */ format?: "text" | "blob" | "buffer" | "json" | "csv" | "tsv" | "jpeg" | "gif" | "webp" | "png" | "arrow" | "parquet" | "html" | "svg" | "xml"; /** for SQL cells, the database to query; use var: to refer to a variable */ database?: string; /** for SQL cells, the oldest allowable age of the cached query result */ since?: Date | string | number; } export interface Cell extends CellSpec { value: NonNullable; mode: NonNullable; pinned: NonNullable; hidden: NonNullable; since?: Date; } export declare function toNotebook({ cells, title, theme, readOnly }: NotebookSpec): Notebook; export declare function toCell({ id, value, mode, pinned, hidden, output, format, database, since }: CellSpec): Cell; export declare function defaultPinned(mode: Cell["mode"]): boolean;