@ones-editor/editor 5.0.3-beta.h1441.1 → 5.0.4-beta.ONES22301801.1

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 { BlockElement, OnesEditorHoveringBlockFinder, OnesEditor } from '../../../@ones-editor/core';
2
2
  export declare class BlockHelperHoveringBlockFinder implements OnesEditorHoveringBlockFinder {
3
+ isInScope(editor: OnesEditor, event: MouseEvent): boolean;
3
4
  findTargetBlock(editor: OnesEditor, event: MouseEvent): BlockElement | null;
4
5
  destroy(): void;
5
6
  }
@@ -9,6 +9,8 @@ export interface OnesEditorHoveringBlockFilter extends OnesEditorCustom {
9
9
  isInBlock: (block: BlockElement, event: MouseEvent) => boolean;
10
10
  }
11
11
  export interface OnesEditorHoveringBlockFinder extends OnesEditorCustom {
12
+ /** Optional cheap scope check; legacy finders may handle events outside the editor. */
13
+ isInScope?: (editor: OnesEditor, event: MouseEvent) => boolean;
12
14
  findTargetBlock: (editor: OnesEditor, event: MouseEvent) => BlockElement | null;
13
15
  }
14
16
  export default class OnesEditorHoveringBlock extends TypedEmitter<OnesEditorHoveringBlockEvents> {
@@ -18,6 +20,8 @@ export default class OnesEditorHoveringBlock extends TypedEmitter<OnesEditorHove
18
20
  hoveringTextChild: TextBlockContentChild | null;
19
21
  private filters;
20
22
  private finders;
23
+ private pendingEvent;
24
+ private animationFrame;
21
25
  constructor(editor: OnesEditor);
22
26
  destroy(): void;
23
27
  addFilter(filter: OnesEditorHoveringBlockFilter): void;
@@ -25,6 +29,9 @@ export default class OnesEditorHoveringBlock extends TypedEmitter<OnesEditorHove
25
29
  hoveringBlockId(): string;
26
30
  private findBlockByFinders;
27
31
  private handleDocumentMouseMove;
32
+ private cancelPendingEvent;
33
+ private flushPendingEvent;
34
+ private processMouseMove;
28
35
  private setHoveringBlock;
29
36
  static get(editor: OnesEditor): OnesEditorHoveringBlock;
30
37
  private getParentTextContentChild;