@ones-editor/editor 0.0.3-beta.97 → 0.0.3-beta.98

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 (45) hide show
  1. package/@ones-editor/comments/src/types.d.ts +2 -0
  2. package/@ones-editor/dividing-line-embed/src/i18n/en-us.d.ts +1 -0
  3. package/@ones-editor/dividing-line-embed/src/i18n/ja-jp.d.ts +1 -0
  4. package/@ones-editor/dividing-line-embed/src/i18n/zh-cn.d.ts +1 -0
  5. package/@ones-editor/graph-embed/src/helper/graph-block-commands.d.ts +1 -1
  6. package/@ones-editor/graph-embed/src/lang/en-us.d.ts +7 -5
  7. package/@ones-editor/graph-embed/src/lang/ja-jp.d.ts +10 -0
  8. package/@ones-editor/graph-embed/src/lang/zh-cn.d.ts +3 -3
  9. package/@ones-editor/list-block/src/start/fix-start-by-list.d.ts +9 -0
  10. package/@ones-editor/media-embed/src/core/media.d.ts +2 -0
  11. package/@ones-editor/mention/src/mention.d.ts +1 -10
  12. package/@ones-editor/mention/src/types.d.ts +12 -1
  13. package/@ones-editor/sharedb-doc/src/doc/comments.d.ts +0 -1
  14. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  15. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest-menu.d.ts +13 -10
  16. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest.d.ts +3 -1
  17. package/@ones-editor/ui-base/src/auto-suggest/editor-auto-suggest-menu.d.ts +12 -0
  18. package/@ones-editor/ui-base/src/command-bar/fixed-toolbar.d.ts +12 -0
  19. package/@ones-editor/ui-base/src/command-bar/index.d.ts +2 -1
  20. package/@ones-editor/ui-base/src/command-bar/init-toolbar-item.d.ts +6 -0
  21. package/@ones-editor/ui-base/src/command-bar/types.d.ts +1 -0
  22. package/@ones-editor/ui-base/src/dropdown/index.d.ts +41 -0
  23. package/@ones-editor/ui-base/src/icons/index.d.ts +2 -1
  24. package/@ones-editor/ui-base/src/index.d.ts +1 -0
  25. package/@ones-editor/versions/src/history-doc/history-doc.d.ts +4 -4
  26. package/@ones-editor/versions/src/index.d.ts +1 -1
  27. package/@ones-editor/versions/src/locale/en-us.d.ts +5 -0
  28. package/@ones-editor/versions/src/locale/zh-cn.d.ts +5 -0
  29. package/@ones-editor/versions/src/types.d.ts +3 -6
  30. package/@ones-editor/versions/src/utils/index.d.ts +2 -2
  31. package/@ones-editor/versions/src/version-dialog/index.d.ts +20 -4
  32. package/@ones-editor/versions/src/version-dialog/play-history.d.ts +1 -2
  33. package/@ones-editor/versions/src/version-dialog/size-limit-textarea.d.ts +21 -0
  34. package/@ones-editor/versions/src/version-dialog/version-helper.d.ts +3 -0
  35. package/@ones-editor/versions/src/version-dialog/version-info-header.d.ts +12 -0
  36. package/@ones-editor/versions/src/version-dialog/version-list.d.ts +14 -9
  37. package/@ones-editor/versions/src/version-dialog/versions-dropdown.d.ts +25 -0
  38. package/dist/comments/local-doc-comments-provider.d.ts +1 -0
  39. package/dist/comments/sharedb-doc-comments-provider.d.ts +1 -0
  40. package/dist/index.d.ts +3 -4
  41. package/dist/index.js +157 -154
  42. package/dist/types.d.ts +1 -1
  43. package/package.json +1 -1
  44. package/@ones-editor/graph-embed/src/lang/utils.d.ts +0 -3
  45. package/@ones-editor/versions/src/version-dialog/actions-buttons.d.ts +0 -17
@@ -17,6 +17,7 @@ export interface OnesEditorCommentOptions {
17
17
  pullThreshold?: number;
18
18
  onUpdateLayout?: (editor: OnesEditor, data: CommentData) => void;
19
19
  onCommentCountChange?: (count: number) => void;
20
+ onCommentEditorClick?: (editor: OnesEditor, event: MouseEvent) => void;
20
21
  }
21
22
  export interface OnesEditorCommentsEvents {
22
23
  onCreateComment: (commentId: string, local: boolean) => void;
@@ -33,6 +34,7 @@ export interface OnesEditorCommentsProvider {
33
34
  addListener: (callback: OnesEditorCommentsEvents) => void;
34
35
  removeListener: (callback: OnesEditorCommentsEvents) => void;
35
36
  createCommentEditor: (parent: HTMLElement, doc: LocalDoc) => OnesEditor;
37
+ allowEdit: (comment: OnesEditorComment) => boolean;
36
38
  }
37
39
  export interface CommentWithChildren extends OnesEditorComment {
38
40
  children: OnesEditorComment[];
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  dividingLine: {
3
3
  type: string;
4
+ abstract: string;
4
5
  };
5
6
  };
6
7
  export default _default;
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  dividingLine: {
3
3
  type: string;
4
+ abstract: string;
4
5
  };
5
6
  };
6
7
  export default _default;
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  dividingLine: {
3
3
  type: string;
4
+ abstract: string;
4
5
  };
5
6
  };
6
7
  export default _default;
@@ -1,5 +1,5 @@
1
- import type { BlockElement, CommandItem, OnesEditor } from '../../../../@ones-editor/core';
2
1
  import { StandardEmbedBlockCommands } from '../../../../@ones-editor/embed-block-helper';
2
+ import type { BlockElement, CommandItem, OnesEditor } from '../../../../@ones-editor/core';
3
3
  import type { StandardEmbedBlockProperties } from '../../../../@ones-editor/embed-block-helper';
4
4
  export type PresetCommandId = 'edit' | 'help';
5
5
  export type GraphType = 'mermaid' | 'flowchart' | 'plantuml';
@@ -1,8 +1,10 @@
1
1
  declare const _default: {
2
- invalid: string;
3
- empty: string;
4
- flowchart: {};
5
- mermaid: {};
6
- plantuml: {};
2
+ graph: {
3
+ invalid: string;
4
+ empty: string;
5
+ edit: string;
6
+ comment: string;
7
+ help: string;
8
+ };
7
9
  };
8
10
  export default _default;
@@ -0,0 +1,10 @@
1
+ declare const _default: {
2
+ graph: {
3
+ invalid: string;
4
+ empty: string;
5
+ edit: string;
6
+ comment: string;
7
+ help: string;
8
+ };
9
+ };
10
+ export default _default;
@@ -2,9 +2,9 @@ declare const _default: {
2
2
  graph: {
3
3
  invalid: string;
4
4
  empty: string;
5
- flowchart: {};
6
- mermaid: {};
7
- plantuml: {};
5
+ edit: string;
6
+ comment: string;
7
+ help: string;
8
8
  };
9
9
  };
10
10
  export default _default;
@@ -11,3 +11,12 @@ export declare class FixStartByList {
11
11
  constructor(editor: OnesEditor, list: BlockElement, options?: FixStartByListOptions | undefined);
12
12
  fix(): void;
13
13
  }
14
+ export declare class FixStartByBlock {
15
+ private editor;
16
+ listStart: number;
17
+ listNextBrothers: BlockElement[];
18
+ constructor(editor: OnesEditor, block: BlockElement, options?: FixStartByListOptions & {
19
+ start: number;
20
+ });
21
+ fix(): void;
22
+ }
@@ -21,6 +21,8 @@ export declare class Media extends TypedEmitter<MediaEvent> {
21
21
  handleUploadFile: (file: File) => Promise<void>;
22
22
  renderEmpty(blockData: MediaBlockData): void;
23
23
  getResourceUrl(url: string): string;
24
+ setFullScreen(): void;
25
+ removeFullScreen(): void;
24
26
  render(blockData: MediaBlockData, content: BlockContentElement): void;
25
27
  setAbstract(abstract: MediaAbstract): void;
26
28
  destroy: () => void;
@@ -1,15 +1,6 @@
1
1
  import { CommandItem, OnesEditor, OnesEditorCustom } from '../../../@ones-editor/core';
2
2
  import { AutoSuggestAnchor, OnesEditorAutoSuggest } from '../../../@ones-editor/ui-base';
3
- export type OnesEditorMentionUser = {
4
- userId: string;
5
- displayName: string;
6
- avatarUrl: string;
7
- element?: HTMLElement;
8
- email?: string;
9
- };
10
- export type MentionOptions = {
11
- queryUsers: (editor: OnesEditor, text: string) => Promise<OnesEditorMentionUser[]>;
12
- };
3
+ import { MentionOptions } from './types';
13
4
  export default class OnesEditorMention implements OnesEditorCustom {
14
5
  private editor;
15
6
  private options;
@@ -1,6 +1,17 @@
1
- import { DocBox } from '../../../@ones-editor/core';
1
+ import { DocBox, OnesEditor } from '../../../@ones-editor/core';
2
2
  export interface MentionBoxData extends DocBox {
3
3
  iconUrl: string;
4
4
  text: string;
5
5
  mentionId: string;
6
6
  }
7
+ export type OnesEditorMentionUser = {
8
+ userId: string;
9
+ displayName: string;
10
+ avatarUrl: string;
11
+ element?: HTMLElement;
12
+ email?: string;
13
+ };
14
+ export type MentionOptions = {
15
+ enableFirstBlock?: boolean;
16
+ queryUsers: (editor: OnesEditor, text: string) => Promise<OnesEditorMentionUser[]>;
17
+ };
@@ -9,7 +9,6 @@ export interface ShareDBDocCommentBase {
9
9
  created: number;
10
10
  modified: number;
11
11
  blocks?: DocBlocks;
12
- doc?: DocObject;
13
12
  }
14
13
  export type ShareDBDocComment = ShareDBDocCommentBase & {
15
14
  [index: string]: DocBlocks;