@ones-editor/editor 1.1.16-beta.2 → 1.1.16-beta.21

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.
@@ -1,3 +1,4 @@
1
1
  import { BlockElement, OnesEditor } from '../../../../../@ones-editor/core';
2
2
  import { DocCodeBlockData } from '../code-block-data';
3
3
  export declare function createCodeBlockHeader(editor: OnesEditor, block: BlockElement, codeData: DocCodeBlockData): void;
4
+ export declare function getCodeBlockHeader(block: BlockElement): HTMLElement;
@@ -56,6 +56,7 @@ export default class FindDialog {
56
56
  private showReplace;
57
57
  private hideSearchResult;
58
58
  private showSearchResult;
59
+ private handleDocumentKeyDown;
59
60
  show(options?: {
60
61
  showFindAndReplace: boolean;
61
62
  }): void;
@@ -1,4 +1,4 @@
1
- import { BlockElement, CommandItem, OnesEditor, OnesEditorCustom } from '../../../../@ones-editor/core';
1
+ import { BlockElement, OnesEditor, OnesEditorCustom } from '../../../../@ones-editor/core';
2
2
  export declare class HeadingBlockCollapseButton implements OnesEditorCustom {
3
3
  private editor;
4
4
  constructor(editor: OnesEditor);
@@ -7,8 +7,5 @@ export declare class HeadingBlockCollapseButton implements OnesEditorCustom {
7
7
  handleHoverBlock: (hoveringBlock: BlockElement | null, oldHoveringBlock: BlockElement | null) => void;
8
8
  handleClick: (editor: OnesEditor, event: MouseEvent) => void;
9
9
  showCollapseButtons(): void;
10
- handleBeforeExecCommand: (editor: OnesEditor, command: CommandItem, option: {
11
- source: string;
12
- }) => void;
13
10
  destroy(): void;
14
11
  }
@@ -1,4 +1,4 @@
1
1
  import './locale';
2
- import { autoShowHideTemplates } from './templates/select-template';
2
+ import { autoShowHideTemplates, hideTemplates, showTemplates } from './templates/select-template';
3
3
  export * from './templates/types';
4
- export { autoShowHideTemplates };
4
+ export { autoShowHideTemplates, hideTemplates, showTemplates };
@@ -1,7 +1,11 @@
1
+ /// <reference types="lodash" />
1
2
  import { OnesEditor } from '../../../../@ones-editor/core';
2
3
  import './select-templates.scss';
3
4
  interface ShowTemplatesOptions {
4
5
  reset?: boolean;
5
6
  }
7
+ declare function showTemplatesCore(editor: OnesEditor, options?: ShowTemplatesOptions): void;
8
+ export declare const showTemplates: import("lodash").DebouncedFunc<typeof showTemplatesCore>;
9
+ export declare function hideTemplates(editor: OnesEditor): void;
6
10
  export declare function autoShowHideTemplates(editor: OnesEditor, options?: ShowTemplatesOptions): void;
7
11
  export {};
@@ -11,4 +11,5 @@ export interface TemplateOptions {
11
11
  onChooseTemplate?: (editor: OnesEditor) => void;
12
12
  onApplyTemplate?: (editor: OnesEditor, template: DocTemplate) => Promise<void>;
13
13
  onTemplateChooserStatusChanged?: (editor: OnesEditor, cardContainer: HTMLElement | null, status: 'visible' | 'hide') => void;
14
+ onBeforeTemplateShow?: (editor: OnesEditor) => boolean;
14
15
  }
@@ -18,6 +18,7 @@ export interface BlocksGenerator {
18
18
  addHyperlinkParagraph(link: string | undefined, title?: string): void;
19
19
  addOtherEmbedBlock(embedType: string, embedData: any): Promise<void>;
20
20
  addTableMatrix(colsWidth: number[], matrix: CalcCell[][], data: DocObject): Promise<void>;
21
+ addVirtualBlock(blockId: string, data: DocObject, maxWidth: number): Promise<void>;
21
22
  addEmptyParagraph(): void;
22
23
  }
23
24
  export declare function convertBlocksOfDoc(parent: string, // 父节点,暂时只有list block需要这个