@ones-editor/editor 2.2.8-beta.8 → 2.2.10-beta.2

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.
@@ -6,7 +6,7 @@ declare class DomEventHandler {
6
6
  name: string;
7
7
  handler: DomEventCallback;
8
8
  data: unknown;
9
- constructor(editor: OnesEditor, dom: Element | Document | Window, name: string, handler: DomEventCallback, data: unknown, options?: boolean | AddEventListenerOptions);
9
+ constructor(editor: OnesEditor, dom: Element | Document | Window, name: string, handler: DomEventCallback, data: unknown);
10
10
  handleEvent: (event: Event) => void;
11
11
  destroy(): void;
12
12
  }
@@ -15,7 +15,7 @@ export declare class EditorDomEvents {
15
15
  handlers: Map<Element | Document | Window, DomEventHandler[]>;
16
16
  constructor(editor: OnesEditor);
17
17
  destroy(): void;
18
- addEventListener<T = Event>(element: Element | Document | Window, eventName: string, eventHandler: DomEventCallback<T>, data?: unknown, options?: boolean | AddEventListenerOptions): void;
18
+ addEventListener<T = Event>(element: Element | Document | Window, eventName: string, eventHandler: DomEventCallback<T>, data?: unknown): void;
19
19
  removeEventListener(element: Element | Document | Window | null, eventName: string | null, eventHandler: DomEventCallback): void;
20
20
  removeAllListeners(element: Element | Document | Window, eventName?: string): void;
21
21
  }
@@ -1,4 +1,3 @@
1
- import { IUserOptions } from '../../../utils/animate-scroll';
2
1
  import { OnesEditor, SimpleBlockPosition } from '../../types';
3
2
  export declare function editorGetClientHeight(editor: OnesEditor): number;
4
3
  export declare function editorGetClientTop(editor: OnesEditor): number;
@@ -7,5 +6,7 @@ export declare function editorGetVisibleRect(editor: OnesEditor): DOMRect;
7
6
  export declare function isBlockPositionVisible(editor: OnesEditor, pos: SimpleBlockPosition): boolean;
8
7
  export declare function scrollIntoView(editor: OnesEditor, target: HTMLElement, options?: {
9
8
  animation?: boolean;
10
- } & Pick<IUserOptions, 'elementToScroll' | 'verticalOffset' | 'speed'>): void;
9
+ verticalOffset?: number;
10
+ elementToScroll?: HTMLElement;
11
+ }): void;
11
12
  export declare function editorScrollIntoView(editor: OnesEditor): void;
@@ -513,7 +513,7 @@ export interface CloneBlockResultInfo {
513
513
  boxIdMap: Map<string, string>;
514
514
  }
515
515
  export interface OnesEditorDomEvents extends OnesEditorCustom {
516
- addEventListener: <T = Event>(element: Element | Document | Window, eventName: string, eventHandler: (editor: OnesEditor, event: T) => void, options?: boolean | AddEventListenerOptions) => void;
516
+ addEventListener: <T = Event>(element: Element | Document | Window, eventName: string, eventHandler: (editor: OnesEditor, event: T) => void) => void;
517
517
  removeEventListener: (element: Element | Document | Window | null, eventName: string | null, eventHandler: (editor: OnesEditor, event: Event) => void) => void;
518
518
  removeAllListeners: (element: Element | Document | Window, eventName?: string) => void;
519
519
  }
@@ -3,4 +3,3 @@ export declare function isLetter(str: string): boolean;
3
3
  export declare function isSpace(str: string): boolean;
4
4
  export declare function isCJK(str: string): boolean;
5
5
  export declare function trimChar(s: string, char: string): string;
6
- export declare function isFunction(functionToCheck: unknown): functionToCheck is () => unknown;