Skip to content

Commit e8510e0

Browse files
authored
Improves API (#133)
1 parent df7669a commit e8510e0

File tree

2 files changed

+1
-42
lines changed

2 files changed

+1
-42
lines changed

docs/source/custom.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ On the other side, to export a back-end model, we have to use the entry points p
1717
my_document = "my_module.my_file:YCustomDocument"
1818
```
1919

20-
You can find an example of a custom document in the [JupyterCAD extension](https://github.com/QuantStack/jupytercad). With an implementation of a new document model [here](https://github.com/QuantStack/jupytercad/blob/main/jupytercad/jcad_ydoc.py) and registering it [here](https://github.com/QuantStack/jupytercad/blob/main/setup.cfg).
20+
You can find an example of a custom document in the [JupyterCAD extension](https://github.com/QuantStack/jupytercad). With an implementation of a new document model [here](https://github.com/QuantStack/jupytercad/blob/main/jupytercad/jcad_ydoc.py) and registering it [here](https://github.com/QuantStack/jupytercad/blob/main/pyproject.toml).

javascript/src/api.ts

-41
Original file line numberDiff line numberDiff line change
@@ -41,47 +41,6 @@ export type MapChanges = Map<
4141
}
4242
>;
4343

44-
/**
45-
* A factory interface for creating `ISharedDocument` objects.
46-
*/
47-
export interface IFactory {
48-
/**
49-
* Create a new `ISharedDocument` instance.
50-
*
51-
* It should return `undefined` if the factory is not able to create a `ISharedDocument`.
52-
*/
53-
createNew(options: IFactory.IOptions): ISharedDocument | undefined;
54-
}
55-
56-
/**
57-
* The namespace for `IFactory`.
58-
*/
59-
export namespace IFactory {
60-
/**
61-
* The options used to instantiate a ISharedDocument
62-
*/
63-
export interface IOptions {
64-
/**
65-
* The path of the file.
66-
*/
67-
path: string;
68-
/**
69-
* The format of the document.
70-
*/
71-
format: string;
72-
/**
73-
* The content type of the document.
74-
*/
75-
contentType: string;
76-
/**
77-
* Wether the document is collaborative or not.
78-
*
79-
* The default value is `true`.
80-
*/
81-
collaborative?: boolean;
82-
}
83-
}
84-
8544
/**
8645
* ISharedBase defines common operations that can be performed on any shared object.
8746
*/

0 commit comments

Comments
 (0)