@ones-editor/editor 0.0.3-beta.32 → 0.0.3-beta.33

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.
Files changed (55) hide show
  1. package/@ones-editor/comments/src/comment-item/comment-item.d.ts +0 -1
  2. package/@ones-editor/comments/src/comments/comments.d.ts +2 -2
  3. package/@ones-editor/comments/src/comments-list/comments-list.d.ts +2 -2
  4. package/@ones-editor/comments/src/comments-list/group-item.d.ts +0 -1
  5. package/@ones-editor/comments/src/comments-list/mini-comment/mini-comments-list.d.ts +1 -1
  6. package/@ones-editor/comments/src/comments-list/mobile-comments-list/mobile-comments-list.d.ts +2 -2
  7. package/@ones-editor/comments/src/types.d.ts +5 -4
  8. package/@ones-editor/core/src/core/doc/doc.d.ts +2 -6
  9. package/@ones-editor/core/src/core/editor/actions/auto-insert-block.d.ts +2 -2
  10. package/@ones-editor/core/src/core/editor/actions/delete-block-text.d.ts +2 -2
  11. package/@ones-editor/core/src/core/editor/actions/insert-block.d.ts +2 -2
  12. package/@ones-editor/core/src/core/editor/actions/insert-text.d.ts +2 -2
  13. package/@ones-editor/core/src/core/editor/editor-dom/dom-events.d.ts +1 -1
  14. package/@ones-editor/core/src/core/editor-doc/editor-doc.d.ts +3 -4
  15. package/@ones-editor/core/src/core/selection/editor-selection.d.ts +2 -2
  16. package/@ones-editor/core/src/core/types.d.ts +7 -9
  17. package/@ones-editor/core/src/i18n/i18n.d.ts +0 -36
  18. package/@ones-editor/core/src/local-doc/index.d.ts +6 -2
  19. package/@ones-editor/core/src/utils/logger/index.d.ts +0 -1
  20. package/@ones-editor/image-embed/src/index.d.ts +1 -2
  21. package/@ones-editor/input-handlers/src/enforce-with-document-title/types.d.ts +0 -1
  22. package/@ones-editor/input-handlers/src/i18n/en-us.d.ts +0 -1
  23. package/@ones-editor/input-handlers/src/i18n/zh-cn.d.ts +0 -1
  24. package/@ones-editor/mathjax/package.json +0 -3
  25. package/@ones-editor/mathjax/src/index.d.ts +1 -2
  26. package/@ones-editor/mathjax/src/mathjax-box/mathjax-editor.d.ts +2 -2
  27. package/@ones-editor/scroll-container/src/index.d.ts +18 -6
  28. package/@ones-editor/sharedb-doc/src/doc/auth-connection.d.ts +3 -3
  29. package/@ones-editor/sharedb-doc/src/doc/sharedb-client.d.ts +3 -3
  30. package/@ones-editor/sharedb-doc/src/doc/sharedb-doc.d.ts +1 -6
  31. package/@ones-editor/sharedb-doc/src/index.d.ts +0 -1
  32. package/@ones-editor/sharedb-doc/src/types.d.ts +2 -3
  33. package/@ones-editor/templates/src/templates/select-template.d.ts +1 -0
  34. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  35. package/@ones-editor/ui/src/tooltips/index.d.ts +0 -4
  36. package/@ones-editor/ui-base/src/command-bar/command-bar.d.ts +0 -1
  37. package/@ones-editor/ui-base/src/command-bar/types.d.ts +0 -5
  38. package/@ones-editor/ui-base/src/dialog/index.d.ts +0 -1
  39. package/@ones-editor/versions/src/types.d.ts +0 -1
  40. package/@ones-editor/versions/src/version-dialog/index.d.ts +1 -3
  41. package/dist/comments/{sharedb-doc-comments-provider.d.ts → comments-provider.d.ts} +6 -3
  42. package/dist/comments/create-comment-editor.d.ts +7 -4
  43. package/dist/index.d.ts +5 -6
  44. package/dist/index.js +160 -158
  45. package/dist/types.d.ts +3 -11
  46. package/package.json +1 -1
  47. package/@ones-editor/image-embed/src/empty-image-converter.d.ts +0 -5
  48. package/@ones-editor/input-handlers/src/markdown-shortcuts/table-converter.d.ts +0 -2
  49. package/@ones-editor/mathjax/src/mathjax-box/convert-mathjax.d.ts +0 -5
  50. package/@ones-editor/ui-base/src/auto-suggest/should-focus-to-editor.d.ts +0 -2
  51. package/@ones-editor/ui-base/src/dialog/types.d.ts +0 -4
  52. package/dist/comments/local-doc-comments-provider.d.ts +0 -18
  53. package/dist/lang/en-us.d.ts +0 -13
  54. package/dist/lang/index.d.ts +0 -1
  55. package/dist/lang/zh-cn.d.ts +0 -13
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Embed, i18n, OnesEditor, OnesEditorUser, OnesEditorUserPermission } from '../@ones-editor/core';
1
+ import { Embed, OnesEditor, OnesEditorUser, OnesEditorUserPermission } from '../@ones-editor/core';
2
2
  import { DrawIoOptions } from '../@ones-editor/drawio-embed';
3
3
  import { MermaidEmbedOptions } from '../@ones-editor/graph-embed';
4
4
  import { ImageOptions } from '../@ones-editor/image-embed';
@@ -10,7 +10,6 @@ import { OnesEditorCommentOptions } from '../@ones-editor/comments';
10
10
  import { ListOptions } from '../@ones-editor/list-block';
11
11
  import { QuickMenuOptions } from '../@ones-editor/ui/src/quick-menu';
12
12
  import { TemplateOptions } from '../@ones-editor/templates';
13
- import { FindDialogOptions, PopoverOptions } from '../@ones-editor/ui-base';
14
13
  export interface RemoteCaretsOptions {
15
14
  onUserChanged?: (editor: OnesEditor, users: OnesEditorUser[]) => void;
16
15
  }
@@ -28,8 +27,6 @@ export type EditorComponentOptions = {
28
27
  quickMenu?: QuickMenuOptions;
29
28
  templates?: TemplateOptions;
30
29
  custom?: Record<string, unknown>;
31
- popover?: PopoverOptions;
32
- findDialog?: FindDialogOptions;
33
30
  };
34
31
  export interface CreateOnesEditorOptions {
35
32
  id?: string;
@@ -38,15 +35,11 @@ export interface CreateOnesEditorOptions {
38
35
  docId: string;
39
36
  permission: OnesEditorUserPermission;
40
37
  token: string;
41
- disableLogout?: boolean;
42
- enableComments?: boolean;
43
- lang?: i18n.LANGS;
44
- onReauth?: (userId: string, docId: string, permission: OnesEditorUserPermission) => Promise<string>;
45
38
  user: {
46
39
  userId: string;
47
40
  displayName: string;
48
41
  avatarUrl: string;
49
- rainbowIndex?: number;
42
+ rainbowIndex: number;
50
43
  };
51
44
  components?: {
52
45
  embeds?: Embed[];
@@ -55,10 +48,9 @@ export interface CreateOnesEditorOptions {
55
48
  }
56
49
  export interface CreateLocalEditorOptions {
57
50
  id?: string;
58
- lang?: i18n.LANGS;
59
51
  components?: {
60
52
  embeds?: Embed[];
61
53
  };
62
- enableComments?: boolean;
54
+ serverUrl?: string;
63
55
  componentsOptions?: EditorComponentOptions;
64
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "0.0.3-beta.32",
3
+ "version": "0.0.3-beta.33",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,5 +0,0 @@
1
- import { OnesEditor, OnesEditorInputHandler } from '../../../@ones-editor/core';
2
- declare class EmptyImageConverterInputHandler implements OnesEditorInputHandler {
3
- handleAfterInsertText(editor: OnesEditor, containerId: string, blockIndex: number, offset: number, text: string): boolean;
4
- }
5
- export default EmptyImageConverterInputHandler;
@@ -1,2 +0,0 @@
1
- import { OnesEditor } from '../../../../@ones-editor/core';
2
- export declare function convertToTable(editor: OnesEditor, containerId: string, blockIndex: number, offset: number): boolean;
@@ -1,5 +0,0 @@
1
- import { OnesEditor, OnesEditorInputHandler } from '../../../../@ones-editor/core';
2
- declare class ConvertEmptyMathjaxBoxInputHandler implements OnesEditorInputHandler {
3
- handleAfterInsertText(editor: OnesEditor, containerId: string, blockIndex: number, offset: number, text: string): boolean;
4
- }
5
- export default ConvertEmptyMathjaxBoxInputHandler;
@@ -1,2 +0,0 @@
1
- import { OnesEditor } from '../../../../@ones-editor/core';
2
- export declare function shouldFocusToEditor(editor: OnesEditor): boolean;
@@ -1,4 +0,0 @@
1
- export interface FindDialogOptions {
2
- popoverTarget?: HTMLElement;
3
- getReferenceClientRect?: (popoverTarget: HTMLElement, dialog: HTMLElement) => DOMRect;
4
- }
@@ -1,18 +0,0 @@
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,13 +0,0 @@
1
- declare const _default: {
2
- placeholder: {
3
- common: {
4
- title: string;
5
- readonlyTitle: string;
6
- content: string;
7
- };
8
- local: {
9
- readonlyTitle: string;
10
- };
11
- };
12
- };
13
- export default _default;
@@ -1 +0,0 @@
1
- export {};
@@ -1,13 +0,0 @@
1
- declare const _default: {
2
- placeholder: {
3
- common: {
4
- title: string;
5
- readonlyTitle: string;
6
- content: string;
7
- };
8
- local: {
9
- readonlyTitle: string;
10
- };
11
- };
12
- };
13
- export default _default;