1 | import * as nbformat from '@jupyterlab/nbformat';
|
2 | import { IRenderMime } from '@jupyterlab/rendermime-interfaces';
|
3 | import { PartialJSONObject, ReadonlyPartialJSONObject } from '@lumino/coreutils';
|
4 | import { ISignal } from '@lumino/signaling';
|
5 |
|
6 |
|
7 |
|
8 | export interface IAttachmentModel extends IRenderMime.IMimeModel {
|
9 | |
10 |
|
11 |
|
12 | readonly changed: ISignal<this, void>;
|
13 | |
14 |
|
15 |
|
16 | dispose(): void;
|
17 | |
18 |
|
19 |
|
20 | toJSON(): nbformat.IMimeBundle;
|
21 | }
|
22 |
|
23 |
|
24 |
|
25 | export declare namespace IAttachmentModel {
|
26 | |
27 |
|
28 |
|
29 | interface IOptions {
|
30 | |
31 |
|
32 |
|
33 | value: nbformat.IMimeBundle;
|
34 | }
|
35 | }
|
36 |
|
37 |
|
38 |
|
39 | export declare class AttachmentModel implements IAttachmentModel {
|
40 | |
41 |
|
42 |
|
43 | constructor(options: IAttachmentModel.IOptions);
|
44 | /**
|
45 | * A signal emitted when the attachment model changes.
|
46 | */
|
47 | get changed(): ISignal<this, void>;
|
48 | /**
|
49 | * Dispose of the resources used by the attachment model.
|
50 | */
|
51 | dispose(): void;
|
52 | /**
|
53 | * The data associated with the model.
|
54 | */
|
55 | get data(): ReadonlyPartialJSONObject;
|
56 | /**
|
57 | * The metadata associated with the model.
|
58 | */
|
59 | get metadata(): ReadonlyPartialJSONObject;
|
60 | /**
|
61 | * Set the data associated with the model.
|
62 | *
|
63 | * #### Notes
|
64 | * Depending on the implementation of the mime model,
|
65 | * this call may or may not have deferred effects,
|
66 | */
|
67 | setData(options: IRenderMime.IMimeModel.ISetDataOptions): void;
|
68 | /**
|
69 | * Serialize the model to JSON.
|
70 | */
|
71 | toJSON(): nbformat.IMimeBundle;
|
72 | readonly trusted: boolean;
|
73 | /**
|
74 | * Update an observable JSON object using a readonly JSON object.
|
75 | */
|
76 | private _updateObservable;
|
77 | private _changed;
|
78 | private _raw;
|
79 | private _rawData;
|
80 | private _data;
|
81 | }
|
82 | /**
|
83 | * The namespace for AttachmentModel statics.
|
84 | */
|
85 | export declare namespace AttachmentModel {
|
86 | |
87 |
|
88 |
|
89 |
|
90 |
|
91 |
|
92 |
|
93 | function getData(bundle: nbformat.IMimeBundle): PartialJSONObject;
|
94 | }
|