@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
@@ -7,15 +7,11 @@ export default class OnesEditorTooltip {
7
7
  currentInstance: Instance | null;
8
8
  attributeName: string;
9
9
  attributeDesc: string;
10
- private observer;
11
- private observerCallback;
12
10
  constructor(editor: OnesEditor);
13
11
  createContent: (reference: Element) => string | HTMLDivElement;
14
12
  visible(): boolean | undefined;
15
13
  hide(): void;
16
14
  destroy(): void;
17
- private createObserver;
18
- private destroyObserver;
19
15
  handleDocumentMouseDown: () => void;
20
16
  handleDocumentMouseUp: () => void;
21
17
  handleShown: (a: Instance) => void;
@@ -13,7 +13,6 @@ export default abstract class CommandBar extends TypedEmitter<CommandBarEvents>
13
13
  constructor(items: CommandItem[], closeable?: Closeable, options?: CommandBarOptions);
14
14
  close(): void;
15
15
  click(item: CommandItem, target: HTMLElement): void;
16
- createPopperOptions(): Partial<import("@popperjs/core").Options>;
17
16
  destroy(): void;
18
17
  abstract readonly isVisible: boolean;
19
18
  get isSubCommandBar(): boolean;
@@ -52,10 +52,5 @@ export interface CommandBarOptions {
52
52
  autoClose?: boolean;
53
53
  classes?: string[];
54
54
  disablePageScroll?: boolean;
55
- refuseOverflow?: boolean;
56
- overflowBoundary?: Element;
57
55
  }
58
56
  export type CreateManualCommandBarFunction = (parentItem: CommandItem, closeable: Closeable, options?: CommandBarOptions) => AbstractManualCommandBar;
59
- export type PopoverOptions = {
60
- overflowBoundary?: Element;
61
- };
@@ -1,4 +1,3 @@
1
1
  import ManualCloseDialog from './manual-close-dialog';
2
2
  import type { ManualCloseDialogOptions } from './manual-close-dialog';
3
- export * from './types';
4
3
  export { ManualCloseDialog, ManualCloseDialogOptions };
@@ -1,6 +1,5 @@
1
1
  import type { OnesEditor, DocVersion, OnesEditorDocHistoryData, OnesEditorDoc } from '../../../@ones-editor/core';
2
2
  export interface VersionDialogOptions {
3
- container: HTMLElement;
4
3
  hideActions?: boolean;
5
4
  hideNonVersionedOps?: boolean;
6
5
  hideOps?: boolean;
@@ -1,5 +1,3 @@
1
1
  import { OnesEditor } from '../../../../@ones-editor/core';
2
2
  import type { OnesEditorVersionsProvider, VersionDialogOptions } from '../types';
3
- export declare function showVersionDialog(editor: OnesEditor, versionProvider: OnesEditorVersionsProvider, options: VersionDialogOptions): {
4
- setShowOps: (showOps: boolean) => void;
5
- };
3
+ export declare function showVersionDialog(editor: OnesEditor, versionProvider: OnesEditorVersionsProvider, options: VersionDialogOptions): void;
@@ -1,11 +1,14 @@
1
1
  import { OnesEditorCommentsEvents, OnesEditorCommentsProvider } from '../../@ones-editor/comments';
2
2
  import { DocObject, LocalDoc, OnesEditor, OnesEditorComment } from '../../@ones-editor/core';
3
- import { ShareDBDocCallbacks } from '../../@ones-editor/sharedb-doc';
3
+ import { AuthMessage, ShareDBDocCallbacks } from '../../@ones-editor/sharedb-doc';
4
+ import { CreateOnesEditorOptions } from '../types';
4
5
  export default class ShareDBDocCommentsProvider implements OnesEditorCommentsProvider, ShareDBDocCallbacks {
5
6
  private editor;
7
+ private rootEditorCreateOptions;
6
8
  private listeners;
7
9
  private doc;
8
- constructor(editor: OnesEditor);
10
+ constructor(editor: OnesEditor, rootEditorCreateOptions: CreateOnesEditorOptions);
11
+ getAuth(): AuthMessage;
9
12
  getComments(): OnesEditorComment[];
10
13
  getComment(id: string): OnesEditorComment;
11
14
  getCommentDoc(commentId: string): DocObject;
@@ -17,5 +20,5 @@ export default class ShareDBDocCommentsProvider implements OnesEditorCommentsPro
17
20
  onUpdateComment(commentId: string, local: boolean): void;
18
21
  addListener(callback: OnesEditorCommentsEvents): void;
19
22
  removeListener(callback: OnesEditorCommentsEvents): void;
20
- createCommentEditor(parent: HTMLElement, childDoc: LocalDoc): OnesEditor;
23
+ createCommentEditor(parent: HTMLElement, localDoc: LocalDoc): OnesEditor;
21
24
  }
@@ -1,11 +1,14 @@
1
- import { LocalDoc, OnesEditor, OnesEditorUser, OnesEditorDoc } from '../../@ones-editor/core';
1
+ import { ShareDBDoc } from '../../@ones-editor/sharedb-doc';
2
+ import { LocalDoc, OnesEditor, OnesEditorUser } from '../../@ones-editor/core';
3
+ import { CreateOnesEditorOptions } from '../types';
2
4
  export interface RemoteCaretsOptions {
3
5
  onUserChanged?: (editor: OnesEditor, users: OnesEditorUser[]) => void;
4
6
  }
5
7
  interface EditorOptions {
6
8
  root: HTMLElement;
7
- childDoc: LocalDoc;
8
- doc: OnesEditorDoc;
9
+ localDoc: LocalDoc;
10
+ rootEditorCreateOptions: CreateOnesEditorOptions;
11
+ shareDBDoc: ShareDBDoc;
9
12
  }
10
- export declare function createCommentEditor({ root, childDoc, doc }: EditorOptions): OnesEditor;
13
+ export declare function createCommentEditor({ root, localDoc, rootEditorCreateOptions, shareDBDoc }: EditorOptions): OnesEditor;
11
14
  export {};
package/dist/index.d.ts CHANGED
@@ -1,21 +1,20 @@
1
- import { OnesEditor, DocObject, OnesEditorDoc } from '../@ones-editor/core';
1
+ import { OnesEditor, DocObject } from '../@ones-editor/core';
2
2
  import { VersionDialogOptions } from '../@ones-editor/versions';
3
3
  import { CreateLocalEditorOptions, CreateOnesEditorOptions } from './types';
4
- import './lang';
5
4
  export * from '../@ones-editor/core';
6
5
  export * from '../@ones-editor/sharedb-doc';
7
6
  export * from '../@ones-editor/table-block';
8
7
  export * from '../@ones-editor/code-block';
9
8
  export * from '../@ones-editor/input-handlers';
10
9
  export * from '../@ones-editor/ui';
10
+ export { Popup } from '../@ones-editor/ui-base';
11
11
  export * from '../@ones-editor/drawio-embed';
12
12
  export * from '../@ones-editor/block-resizer';
13
13
  export { editorAddComment } from '../@ones-editor/comments';
14
14
  export { editorShowFindDialog } from '../@ones-editor/find-dialog';
15
15
  export * from '../@ones-editor/toc';
16
+ export * from '../@ones-editor/embed-block-helper';
16
17
  export * from './types';
17
18
  export declare function createOnesEditor(root: HTMLElement, options: CreateOnesEditorOptions): Promise<OnesEditor>;
18
- export declare function createLocalEditor(root: HTMLElement, docData: DocObject | OnesEditorDoc, options: CreateLocalEditorOptions): Promise<OnesEditor>;
19
- export declare function showDocVersions(editor: OnesEditor, options: VersionDialogOptions): {
20
- setShowOps: (showOps: boolean) => void;
21
- };
19
+ export declare function createLocalEditor(root: HTMLElement, docData: DocObject, options: CreateLocalEditorOptions): Promise<OnesEditor>;
20
+ export declare function showDocVersions(editor: OnesEditor, options: VersionDialogOptions): void;