@ones-editor/editor 0.0.7-beta.38 → 0.0.7-beta.39

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
+ /// <reference types="lodash" />
1
2
  import { OnesEditorInput, OnesEditor, OnesEditorInputHandler, OnesEditorUndoAction, RemoteChangeType, PasteOptions } from '../types';
2
3
  import { DocObject } from '../doc';
3
4
  export interface EditorInputCallbacks {
@@ -19,12 +20,15 @@ export interface EditorInputCallbacks {
19
20
  defaultHandleKeydown: (editor: OnesEditor, event: KeyboardEvent) => boolean;
20
21
  destroy: () => void;
21
22
  pasteDoc: (doc: DocObject) => Promise<void>;
23
+ forEach: (callback: (handler: OnesEditorInputHandler) => void) => void;
22
24
  }
23
25
  export declare class EditorInput implements OnesEditorInput {
24
26
  editor: OnesEditor;
25
27
  composing: boolean;
28
+ composeJustEnd: boolean;
26
29
  callbacks: EditorInputCallbacks;
27
30
  inputElement: HTMLInputElement;
31
+ clearComposeJustEnd: import("lodash").DebouncedFunc<() => void>;
28
32
  constructor(editor: OnesEditor, callbacks: EditorInputCallbacks);
29
33
  destroy(): void;
30
34
  getInput(): HTMLInputElement;
@@ -47,4 +51,5 @@ export declare class EditorInput implements OnesEditorInput {
47
51
  removeHandler(handler: OnesEditorInputHandler): void;
48
52
  defaultInsertText(editor: OnesEditor, containerId: string, blockIndex: number, offset: number, text: string): void;
49
53
  defaultHandleKeydown(editor: OnesEditor, event: KeyboardEvent): boolean;
54
+ forEach(callback: (handler: OnesEditorInputHandler) => void): void;
50
55
  }
@@ -8,7 +8,7 @@ export declare class RootContainer {
8
8
  private bindEvents;
9
9
  private unbindEvents;
10
10
  destroy(): void;
11
- handleContextMenu: (event: Event) => void;
11
+ handleContextMenu: (event: MouseEvent) => void;
12
12
  handleResize: () => void;
13
13
  handleClick: (event: MouseEvent) => void;
14
14
  handleBlockClick: (event: MouseEvent, block: BlockElement, elem: Element) => void;
@@ -1,3 +1,3 @@
1
1
  import { DocObject } from '../../doc';
2
- import { ContainerElement, OnesEditor } from '../../types';
3
- export declare function editorReplaceContainer(editor: OnesEditor, container: ContainerElement, doc: DocObject): void;
2
+ import { CloneBlockResultInfo, ContainerElement, OnesEditor } from '../../types';
3
+ export declare function editorReplaceContainer(editor: OnesEditor, container: ContainerElement, doc: DocObject, cloneDocResult: CloneBlockResultInfo): void;
@@ -28,4 +28,5 @@ export declare class EditorInputHandlers implements EditorInputCallbacks {
28
28
  pasteDoc(doc: DocObject): Promise<void>;
29
29
  private pasteDocs;
30
30
  destroy(): void;
31
+ forEach(cb: (handler: OnesEditorInputHandler) => void): void;
31
32
  }
@@ -1,4 +1,5 @@
1
1
  import { TypedEmitter } from 'tiny-typed-emitter';
2
+ import { DebouncedFunc } from 'lodash';
2
3
  import { DocBlock, DocBlockAttributes, DocBlocks, DocBlockText, DocBlockTextAttributes, DocBox, DocEmbedBlock, DocEmbedData, DocInsertion, DocObject, InsertBlockOptions, OnesEditorDoc, OnesEditorDocRange } from './doc';
3
4
  export type ContainerElement = HTMLDivElement & {
4
5
  __neverUse: 'ContainerElement';
@@ -567,6 +568,7 @@ export type PasteOptions = {
567
568
  };
568
569
  export interface OnesEditorInput {
569
570
  readonly inputElement: HTMLInputElement;
571
+ composeJustEnd: boolean;
570
572
  destroy: () => void;
571
573
  focus: () => void;
572
574
  handleDocumentSelectionChange: () => void;
@@ -579,8 +581,10 @@ export interface OnesEditorInput {
579
581
  handlePasteText: (text: string, options?: PasteOptions) => void;
580
582
  addHandler: (handler: OnesEditorInputHandler) => void;
581
583
  removeHandler: (handler: OnesEditorInputHandler) => void;
584
+ forEach: (cb: (handler: OnesEditorInputHandler) => void) => void;
582
585
  defaultInsertText: (editor: OnesEditor, containerId: string, blockIndex: number, offset: number, text: string) => void;
583
586
  defaultHandleKeydown: (editor: OnesEditor, event: KeyboardEvent) => boolean;
587
+ clearComposeJustEnd: DebouncedFunc<() => void>;
584
588
  }
585
589
  export interface OnesEditorSelectionHandler {
586
590
  isSelecting: () => boolean;
@@ -1,2 +1,2 @@
1
- import { BlockElement, DocObject, OnesEditor } from '../../../../../@ones-editor/core';
2
- export declare function pasteTableInTableBlock(editor: OnesEditor, doc: DocObject, tableBlock: BlockElement, destCell: HTMLTableCellElement): void;
1
+ import { BlockElement, DocObject, OnesEditor, CloneBlockResultInfo } from '../../../../../@ones-editor/core';
2
+ export declare function pasteTableInTableBlock(editor: OnesEditor, doc: DocObject, tableBlock: BlockElement, destCell: HTMLTableCellElement, cloneDocResult: CloneBlockResultInfo): void;