@ones-editor/editor 0.0.3-beta.66 → 0.0.3-beta.68

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,5 +1,6 @@
1
1
  import BlockLockerHook from './hook';
2
2
  import './style.scss';
3
3
  import './i18n';
4
+ import BlockLockerPasteHandler from './paste-handler';
4
5
  export * from './helper';
5
- export { BlockLockerHook };
6
+ export { BlockLockerHook, BlockLockerPasteHandler };
@@ -0,0 +1,4 @@
1
+ import { DocObject, OnesEditor, OnesEditorInputHandler } from '../../../@ones-editor/core';
2
+ export default class BlockLockerPasteHandler implements OnesEditorInputHandler {
3
+ handleBeforePasteDoc(editor: OnesEditor, doc: DocObject): Promise<boolean>;
4
+ }
@@ -1,3 +1,3 @@
1
1
  import { BlockElement, OnesEditor } from '../../../../../@ones-editor/core';
2
2
  import { BlockMenuItem } from './types';
3
- export declare function getBlockCommandItems(editor: OnesEditor, block: BlockElement): BlockMenuItem[];
3
+ export declare function getBlockCommandItems(editor: OnesEditor, block: BlockElement, excludes?: Set<string>): BlockMenuItem[];
@@ -1,5 +1,5 @@
1
1
  import { OnesEditorDocRange } from '../../doc';
2
- import { OnesEditor, SelectionRange, SelectedBlock, ContainerElement } from '../../types';
2
+ import { OnesEditor, SelectionRange, SelectedBlock, ContainerElement, SimpleSelectionRange } from '../../types';
3
3
  import { EditorSimpleBlockPosition } from '../editor-position';
4
4
  interface SimpleRangeOptions {
5
5
  anchor: EditorSimpleBlockPosition;
@@ -26,5 +26,6 @@ export default class EditorSimpleSelectionRange implements SelectionRange {
26
26
  getFocusedPos(): EditorSimpleBlockPosition;
27
27
  clone(): EditorSimpleSelectionRange;
28
28
  toDocRange(): OnesEditorDocRange;
29
+ static from(editor: OnesEditor, other: SimpleSelectionRange): EditorSimpleSelectionRange;
29
30
  }
30
31
  export {};
@@ -27,4 +27,5 @@ export declare function getElementOffset(el: Element): {
27
27
  };
28
28
  export declare function findTarget(event: Event, cssSelector: string): Element | null;
29
29
  export declare function findEventTargetBlock(event: Event): Element | null;
30
+ export declare function isElementVisible(element: Element | null): boolean;
30
31
  export {};
@@ -10,4 +10,5 @@ export default class TableRowColumnToolbar {
10
10
  destroy(): void;
11
11
  handleSelectionChange: (bar: AbstractCommandBar, id: string) => void;
12
12
  handleClick: (bar: AbstractCommandBar, item: CommandItem, elem: HTMLElement) => void;
13
+ handleToolbarClose: () => void;
13
14
  }
@@ -11,6 +11,7 @@ export default class TextCommandProvider implements OnesEditorCommandProvider {
11
11
  executeCommand(editor: OnesEditor, block: BlockElement, range: SelectionRange, item: BlockCommandItem, params: CommandParams, result: CommandResult): boolean;
12
12
  private executeCommandOnEmptyText;
13
13
  private getCommandsOnEmptyText;
14
+ private setCommandsStates;
14
15
  getEmptyBlockTextAttributes(editor: OnesEditor, blockId: string): DocBlockTextAttributes | undefined;
15
16
  private handleChangeColor;
16
17
  private handleBeforePopupPalette;