1 | import type { ISharedNotebook } from '@jupyter/ydoc';
|
2 | import { DocumentRegistry } from '@jupyterlab/docregistry';
|
3 | import { Contents } from '@jupyterlab/services';
|
4 | import { INotebookModel } from './model';
|
5 |
|
6 |
|
7 |
|
8 | export declare class NotebookModelFactory implements DocumentRegistry.IModelFactory<INotebookModel> {
|
9 | |
10 |
|
11 |
|
12 | constructor(options?: NotebookModelFactory.IOptions);
|
13 | /**
|
14 | * Define the disableDocumentWideUndoRedo property.
|
15 | *
|
16 | * @experimental
|
17 | * @alpha
|
18 | */
|
19 | get disableDocumentWideUndoRedo(): boolean;
|
20 | set disableDocumentWideUndoRedo(disableDocumentWideUndoRedo: boolean);
|
21 | /**
|
22 | * The name of the model.
|
23 | */
|
24 | get name(): string;
|
25 | /**
|
26 | * The content type of the file.
|
27 | */
|
28 | get contentType(): Contents.ContentType;
|
29 | /**
|
30 | * The format of the file.
|
31 | */
|
32 | get fileFormat(): Contents.FileFormat;
|
33 | /**
|
34 | * Whether the model is collaborative or not.
|
35 | */
|
36 | get collaborative(): boolean;
|
37 | /**
|
38 | * Get whether the model factory has been disposed.
|
39 | */
|
40 | get isDisposed(): boolean;
|
41 | /**
|
42 | * Dispose of the model factory.
|
43 | */
|
44 | dispose(): void;
|
45 | /**
|
46 | * Create a new model for a given path.
|
47 | *
|
48 | * @param options Model options.
|
49 | *
|
50 | * @returns A new document model.
|
51 | */
|
52 | createNew(options?: DocumentRegistry.IModelOptions<ISharedNotebook>): INotebookModel;
|
53 | /**
|
54 | * Get the preferred kernel language given a path.
|
55 | */
|
56 | preferredLanguage(path: string): string;
|
57 | /**
|
58 | * Defines if the document can be undo/redo.
|
59 | */
|
60 | private _disableDocumentWideUndoRedo;
|
61 | private _disposed;
|
62 | private _collaborative;
|
63 | }
|
64 | /**
|
65 | * The namespace for notebook model factory statics.
|
66 | */
|
67 | export declare namespace NotebookModelFactory {
|
68 | |
69 |
|
70 |
|
71 | interface IOptions {
|
72 | |
73 |
|
74 |
|
75 | collaborative?: boolean;
|
76 | |
77 |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 | disableDocumentWideUndoRedo?: boolean;
|
85 | }
|
86 | }
|