@ones-editor/editor 0.0.3-beta.29 → 0.0.3-beta.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@ones-editor/comments/src/comment-item/comment-item.d.ts +1 -0
- package/@ones-editor/comments/src/comments-list/group-item.d.ts +1 -0
- package/@ones-editor/comments/src/types.d.ts +0 -2
- package/@ones-editor/core/src/core/types.d.ts +1 -0
- package/@ones-editor/image-embed/src/empty-image-converter.d.ts +5 -0
- package/@ones-editor/image-embed/src/index.d.ts +2 -1
- package/@ones-editor/input-handlers/src/markdown-shortcuts/table-converter.d.ts +2 -0
- package/@ones-editor/mathjax/package.json +3 -0
- package/@ones-editor/mathjax/src/index.d.ts +2 -1
- package/@ones-editor/mathjax/src/mathjax-box/convert-mathjax.d.ts +5 -0
- package/@ones-editor/mathjax/src/mathjax-box/mathjax-editor.d.ts +2 -2
- package/@ones-editor/sharedb-doc/src/index.d.ts +1 -0
- package/@ones-editor/templates/src/templates/select-template.d.ts +0 -1
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui-base/src/auto-suggest/should-focus-to-editor.d.ts +2 -0
- package/dist/comments/create-comment-editor.d.ts +4 -7
- package/dist/comments/local-doc-comments-provider.d.ts +18 -0
- package/dist/comments/{comments-provider.d.ts → sharedb-doc-comments-provider.d.ts} +3 -6
- package/dist/index.js +152 -152
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { LocalDoc, OnesEditor, OnesEditorUser } from '../../@ones-editor/core';
|
|
3
|
-
import { CreateOnesEditorOptions } from '../types';
|
|
1
|
+
import { LocalDoc, OnesEditor, OnesEditorUser, OnesEditorDoc } from '../../@ones-editor/core';
|
|
4
2
|
export interface RemoteCaretsOptions {
|
|
5
3
|
onUserChanged?: (editor: OnesEditor, users: OnesEditorUser[]) => void;
|
|
6
4
|
}
|
|
7
5
|
interface EditorOptions {
|
|
8
6
|
root: HTMLElement;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
shareDBDoc: ShareDBDoc;
|
|
7
|
+
childDoc: LocalDoc;
|
|
8
|
+
doc: OnesEditorDoc;
|
|
12
9
|
}
|
|
13
|
-
export declare function createCommentEditor({ root,
|
|
10
|
+
export declare function createCommentEditor({ root, childDoc, doc }: EditorOptions): OnesEditor;
|
|
14
11
|
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { OnesEditorCommentsEvents, OnesEditorCommentsProvider } from '../../@ones-editor/comments';
|
|
2
|
+
import { DocObject, LocalDoc, OnesEditor, OnesEditorComment, OnesEditorDoc } from '../../@ones-editor/core';
|
|
3
|
+
export default class LocalDocCommentsProvider implements OnesEditorCommentsProvider {
|
|
4
|
+
private editor;
|
|
5
|
+
private localDoc;
|
|
6
|
+
private listeners;
|
|
7
|
+
constructor(editor: OnesEditor, localDoc: OnesEditorDoc);
|
|
8
|
+
get doc(): DocObject;
|
|
9
|
+
getComments(): OnesEditorComment[];
|
|
10
|
+
getComment(commentId: string): OnesEditorComment;
|
|
11
|
+
getCommentDoc(commentId: string): DocObject;
|
|
12
|
+
addListener(callback: OnesEditorCommentsEvents): void;
|
|
13
|
+
removeListener(callback: OnesEditorCommentsEvents): void;
|
|
14
|
+
localCreateComment(comment: OnesEditorComment, doc: DocObject): void;
|
|
15
|
+
localDeleteComment(commentId: string): void;
|
|
16
|
+
localUpdateComment(comment: OnesEditorComment, doc: DocObject): void;
|
|
17
|
+
createCommentEditor(parent: HTMLElement, childDoc: LocalDoc): OnesEditor;
|
|
18
|
+
}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { OnesEditorCommentsEvents, OnesEditorCommentsProvider } from '../../@ones-editor/comments';
|
|
2
2
|
import { DocObject, LocalDoc, OnesEditor, OnesEditorComment } from '../../@ones-editor/core';
|
|
3
|
-
import {
|
|
4
|
-
import { CreateOnesEditorOptions } from '../types';
|
|
3
|
+
import { ShareDBDocCallbacks } from '../../@ones-editor/sharedb-doc';
|
|
5
4
|
export default class ShareDBDocCommentsProvider implements OnesEditorCommentsProvider, ShareDBDocCallbacks {
|
|
6
5
|
private editor;
|
|
7
|
-
private rootEditorCreateOptions;
|
|
8
6
|
private listeners;
|
|
9
7
|
private doc;
|
|
10
|
-
constructor(editor: OnesEditor
|
|
11
|
-
getAuth(): AuthMessage;
|
|
8
|
+
constructor(editor: OnesEditor);
|
|
12
9
|
getComments(): OnesEditorComment[];
|
|
13
10
|
getComment(id: string): OnesEditorComment;
|
|
14
11
|
getCommentDoc(commentId: string): DocObject;
|
|
@@ -20,5 +17,5 @@ export default class ShareDBDocCommentsProvider implements OnesEditorCommentsPro
|
|
|
20
17
|
onUpdateComment(commentId: string, local: boolean): void;
|
|
21
18
|
addListener(callback: OnesEditorCommentsEvents): void;
|
|
22
19
|
removeListener(callback: OnesEditorCommentsEvents): void;
|
|
23
|
-
createCommentEditor(parent: HTMLElement,
|
|
20
|
+
createCommentEditor(parent: HTMLElement, childDoc: LocalDoc): OnesEditor;
|
|
24
21
|
}
|