@ones-editor/editor 0.0.3-beta.130 → 0.0.3-beta.132

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 (31) hide show
  1. package/@ones-editor/block-resizer/src/index.d.ts +0 -1
  2. package/@ones-editor/comments/src/comments-list/mini-comment/group-list.d.ts +0 -1
  3. package/@ones-editor/comments/src/locale/ja-jp.d.ts +0 -3
  4. package/@ones-editor/comments/src/locale/zh-cn.d.ts +0 -1
  5. package/@ones-editor/core/src/core/types.d.ts +2 -1
  6. package/@ones-editor/file/src/index.d.ts +0 -1
  7. package/@ones-editor/file/src/types.d.ts +1 -0
  8. package/@ones-editor/find-dialog/src/doc/doc-handler.d.ts +15 -0
  9. package/@ones-editor/find-dialog/src/find-dialog.d.ts +4 -1
  10. package/@ones-editor/find-dialog/src/highlights/highligh-text.d.ts +3 -0
  11. package/@ones-editor/find-dialog/src/highlights/highlight-dom.d.ts +1 -0
  12. package/@ones-editor/graph-embed/src/helper/graph-block-commands.d.ts +0 -1
  13. package/@ones-editor/media-embed/src/core/video-resizer.d.ts +0 -1
  14. package/@ones-editor/mention/src/index.d.ts +0 -1
  15. package/@ones-editor/mention/src/mention.d.ts +0 -1
  16. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  17. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest-menu.d.ts +2 -1
  18. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest.d.ts +2 -0
  19. package/@ones-editor/ui-base/src/command-bar/command-bar.d.ts +2 -0
  20. package/@ones-editor/ui-base/src/command-bar/types.d.ts +2 -1
  21. package/dist/index.d.ts +1 -0
  22. package/dist/index.js +149 -175
  23. package/package.json +1 -1
  24. package/@ones-editor/file/src/locale/en-us.d.ts +0 -6
  25. package/@ones-editor/file/src/locale/index.d.ts +0 -1
  26. package/@ones-editor/file/src/locale/ja-jp.d.ts +0 -6
  27. package/@ones-editor/file/src/locale/zh-cn.d.ts +0 -6
  28. package/@ones-editor/mention/src/locale/en-us.d.ts +0 -6
  29. package/@ones-editor/mention/src/locale/index.d.ts +0 -1
  30. package/@ones-editor/mention/src/locale/ja-jp.d.ts +0 -6
  31. package/@ones-editor/mention/src/locale/zh-cn.d.ts +0 -6
@@ -19,7 +19,6 @@ export declare class BlockResizer extends TypedEmitter<BlockResizerEvents> {
19
19
  enableResize(block: BlockElement, resizableElement?: HTMLElement): void;
20
20
  disableResize(): void;
21
21
  update(block: BlockElement, resizableElement?: HTMLElement): void;
22
- updateResizer(): void;
23
22
  getBlock(): BlockElement | null;
24
23
  destroy(): void;
25
24
  private getResizableElement;
@@ -6,7 +6,6 @@ export declare class MiniGroupList extends ListBase<MiniCommentGroup, MiniGroupI
6
6
  protected editor: OnesEditor;
7
7
  protected commentsProvider: OnesEditorCommentsProvider;
8
8
  constructor(editor: OnesEditor, commentsProvider: OnesEditorCommentsProvider, parent: HTMLElement);
9
- private fixListOps;
10
9
  protected createItem(data: MiniCommentGroup): MiniGroupItem;
11
10
  protected findInsertPos(): number;
12
11
  private handleDocChanged;
@@ -15,10 +15,7 @@ declare const _default: {
15
15
  replyTitle: string;
16
16
  isFirst: string;
17
17
  isLast: string;
18
- more: string;
19
18
  comment: string;
20
- command: string;
21
- quickMenuCommand: string;
22
19
  };
23
20
  };
24
21
  export default _default;
@@ -15,7 +15,6 @@ declare const _default: {
15
15
  replyTitle: string;
16
16
  isFirst: string;
17
17
  isLast: string;
18
- more: string;
19
18
  comment: string;
20
19
  command: string;
21
20
  quickMenuCommand: string;
@@ -56,7 +56,6 @@ export interface BoxCommands {
56
56
  }
57
57
  export interface BoxProperties {
58
58
  boxCommands?: Record<string, BoxCommands>;
59
- abstract?: string;
60
59
  }
61
60
  export interface Box {
62
61
  boxType: string;
@@ -384,6 +383,7 @@ export interface OnesEditorOptionalOptions {
384
383
  components?: OnesEditorComponents;
385
384
  colors?: string[];
386
385
  scrollContainer?: HTMLElement;
386
+ enableComments?: boolean;
387
387
  settingsProvider?: OnesEditorSettingsProvider;
388
388
  }
389
389
  export interface OnesEditorOptions {
@@ -391,6 +391,7 @@ export interface OnesEditorOptions {
391
391
  componentsOptions: {
392
392
  [index: string]: unknown;
393
393
  };
394
+ enableComments?: boolean;
394
395
  scrollContainer?: HTMLElement;
395
396
  }
396
397
  export interface OnesEditorComponents {
@@ -1,5 +1,4 @@
1
1
  import FileBox from './file-box';
2
2
  import FileEmbed from './file-embed';
3
- import './locale';
4
3
  export * from './types';
5
4
  export { FileBox, FileEmbed };
@@ -20,4 +20,5 @@ export interface FileOptions {
20
20
  onClick?: (editor: OnesEditor, elem: BlockElement | BoxElement, event: MouseEvent) => void;
21
21
  onDownloadFile?: (editor: OnesEditor, data: FileData) => void;
22
22
  renderFileCardIcon?: (editor: OnesEditor, blockData: FileEmbedData) => Promise<false | HTMLImageElement>;
23
+ onGetFileDownloadUrl?: (editor: OnesEditor, data: FileBoxData | FileEmbedData) => Promise<string | undefined>;
23
24
  }
@@ -0,0 +1,15 @@
1
+ import { TypedEmitter } from 'tiny-typed-emitter';
2
+ import type { OnesEditorDocCallbacks, OnesEditor, DocBlockTextActions, BlockElement, DocBlock } from '../../../../@ones-editor/core';
3
+ interface DocEvent {
4
+ onDocChanged: (changedBlock: BlockElement) => void;
5
+ onDocInserted: () => void;
6
+ onDocDeleted: (deletedBlock: BlockElement) => void;
7
+ }
8
+ declare class FindDialogDocHandler extends TypedEmitter<DocEvent> implements OnesEditorDocCallbacks {
9
+ private editor;
10
+ constructor(editor: OnesEditor);
11
+ onUpdateBlockText(containerId: string, blockIndex: number, actions: DocBlockTextActions): void;
12
+ onInsertBlock(containerId: string, blockIndex: number, blockData: DocBlock, local: boolean): void;
13
+ onDeleteBlock(containerId: string, blockIndex: number, local: boolean): void;
14
+ }
15
+ export default FindDialogDocHandler;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="lodash" />
2
2
  import { ManualCloseDialog } from '../../../@ones-editor/ui-base';
3
- import { OnesEditor } from '../../../@ones-editor/core';
3
+ import { OnesEditor, BlockElement } from '../../../@ones-editor/core';
4
4
  export default class FindDialog {
5
5
  private editor;
6
6
  dialog: ManualCloseDialog | null;
@@ -25,6 +25,9 @@ export default class FindDialog {
25
25
  constructor(editor: OnesEditor);
26
26
  handleFindChanged: () => void;
27
27
  handleCompositionEnd: () => void;
28
+ handleDocChanged: (changedBlock: BlockElement) => void;
29
+ handleDocInserted: () => void;
30
+ handleDocDeleted: (deletedBlock: BlockElement) => void;
28
31
  handleInput: (event: Event) => void;
29
32
  handleFind: () => void;
30
33
  findNext(options: {
@@ -3,6 +3,9 @@ export declare function clearAllReplaceResultHighlight(editor: OnesEditor): void
3
3
  export declare function clearAllHighlights(editor: OnesEditor, options?: {
4
4
  keepReplaceResult?: boolean;
5
5
  }): void;
6
+ export declare function clearHighlightsInBlock(editor: OnesEditor, block: BlockElement, options?: {
7
+ keepReplaceResult?: boolean;
8
+ }): void;
6
9
  export declare function getCurrentHighlighIndex(editor: OnesEditor): number;
7
10
  export declare function gotoFirstHighlight(editor: OnesEditor): number;
8
11
  export declare function gotoNextHighlight(editor: OnesEditor): number;
@@ -1,6 +1,7 @@
1
1
  import { BlockElement, OnesEditor } from '../../../../@ones-editor/core';
2
2
  export declare function isHighlight(elem: HTMLElement): boolean;
3
3
  export declare function getAllHighlights(editor: OnesEditor): HTMLElement[];
4
+ export declare function getHighlightsInBlock(editor: OnesEditor, block: BlockElement): HTMLElement[];
4
5
  export declare function getAllReplaceResultHighlights(editor: OnesEditor): HTMLElement[];
5
6
  export declare function getBlockHighlight(block: BlockElement): HTMLElement[];
6
7
  export declare function clearBlockHighlight(block: BlockElement): void;
@@ -18,6 +18,5 @@ export declare function getGraphEmbedBlockProperties(editor: OnesEditor, block:
18
18
  blockCommands: {
19
19
  'hovering-toolbar': GraphBlockCommands;
20
20
  };
21
- abstract: string;
22
21
  };
23
22
  export {};
@@ -7,7 +7,6 @@ export default class VideoResizer {
7
7
  destroy(): void;
8
8
  private handleHoveringBlockChange;
9
9
  private getVideoElement;
10
- updateResizer(block: BlockElement): void;
11
10
  disableBlockResize(block: BlockElement): void;
12
11
  enableBlockResize(block: BlockElement, resizableElement: HTMLElement): void;
13
12
  private handleResizing;
@@ -2,6 +2,5 @@ import OnesEditorMention from './mention';
2
2
  import MentionBox from './mention-box';
3
3
  import OnesEditorBlockMention from './block-mention';
4
4
  import './mention-style.scss';
5
- import './locale';
6
5
  export { OnesEditorMention, MentionBox, OnesEditorBlockMention };
7
6
  export * from './types';
@@ -6,7 +6,6 @@ export default class OnesEditorMention implements OnesEditorCustom {
6
6
  private options;
7
7
  suggest: OnesEditorAutoSuggest;
8
8
  constructor(editor: OnesEditor, options: MentionOptions);
9
- onClose: () => void;
10
9
  destroy(): void;
11
10
  onShow: (suggest: OnesEditorAutoSuggest, containerId: string, blockIndex: number, offset: number) => boolean;
12
11
  onClickItem: (menu: OnesEditorAutoSuggest, item: CommandItem, anchor: AutoSuggestAnchor) => void;