@ones-editor/editor 2.2.15-beta.2 → 2.2.15-beta.3

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.
@@ -15,7 +15,7 @@ export default class CommentGroupList extends ListBase<CommentWithChildren, Comm
15
15
  constructor(editor: OnesEditor, commentsProvider: OnesEditorCommentsProvider, parent: HTMLElement);
16
16
  destroy(): void;
17
17
  dispatchScroll: import("lodash").DebouncedFunc<() => void>;
18
- updateItemsLayout(): void;
18
+ updateItemsLayout(dispatchScroll?: boolean): void;
19
19
  private bindEvents;
20
20
  private unbindEvents;
21
21
  protected createItem(data: CommentWithChildren, reason: 'init' | 'insert'): CommentGroupItem;
@@ -1,3 +1,3 @@
1
1
  import { BlockElement, OnesEditor } from '../../../types';
2
2
  import EditorSimpleSelectionRange from '../../../selection/range/simple-range';
3
- export declare function getTextBlockRangeFromPoint(editor: OnesEditor, block: BlockElement, xOrign: number, yOrign: number): EditorSimpleSelectionRange | null;
3
+ export declare function getTextBlockRangeFromPoint(editor: OnesEditor, block: BlockElement, xOrign: number, yOrign: number, dragging?: boolean): EditorSimpleSelectionRange | null;
@@ -1,3 +1,4 @@
1
+ import { IUserOptions } from '../../../utils/animate-scroll';
1
2
  import { OnesEditor, SimpleBlockPosition } from '../../types';
2
3
  export declare function editorGetClientHeight(editor: OnesEditor): number;
3
4
  export declare function editorGetClientTop(editor: OnesEditor): number;
@@ -6,7 +7,5 @@ export declare function editorGetVisibleRect(editor: OnesEditor): DOMRect;
6
7
  export declare function isBlockPositionVisible(editor: OnesEditor, pos: SimpleBlockPosition): boolean;
7
8
  export declare function scrollIntoView(editor: OnesEditor, target: HTMLElement, options?: {
8
9
  animation?: boolean;
9
- verticalOffset?: number;
10
- elementToScroll?: HTMLElement;
11
- }): void;
10
+ } & Pick<IUserOptions, 'elementToScroll' | 'verticalOffset' | 'speed'>): void;
12
11
  export declare function editorScrollIntoView(editor: OnesEditor): void;
@@ -1,4 +1,4 @@
1
1
  import { SelectionRange, OnesEditor } from '../types';
2
2
  import EditorSimpleSelectionRange from './range/simple-range';
3
- export declare function getBlockRangeFromPoint(editor: OnesEditor, pointX: number, pointY: number): SelectionRange | null;
3
+ export declare function getBlockRangeFromPoint(editor: OnesEditor, pointX: number, pointY: number, dragging?: boolean): SelectionRange | null;
4
4
  export declare function getBlockNearestRangeFromPoint(editor: OnesEditor, x: number, y: number): EditorSimpleSelectionRange | null;
@@ -261,7 +261,7 @@ export interface Block {
261
261
  blockKind: BlockKind;
262
262
  createBlockContent: (editor: OnesEditor, path: BlockPath, container: ContainerElement, blockElement: BlockElement, blockData: DocBlock) => BlockContentElement;
263
263
  getBlockTextLength: (block: BlockElement) => number;
264
- getRangeFromPoint: (editor: OnesEditor, block: BlockElement, x: number, y: number) => SelectionRange | null;
264
+ getRangeFromPoint: (editor: OnesEditor, block: BlockElement, x: number, y: number, dragging?: boolean) => SelectionRange | null;
265
265
  moveCaret: (editor: OnesEditor, block: BlockElement, position: SimpleBlockPosition, direction: MoveDirection) => SimpleBlockPosition | null;
266
266
  getCaretRect: (block: BlockElement, pos: SimpleBlockPosition) => DOMRect;
267
267
  updateSelection: (editor: OnesEditor, block: BlockElement, from: BlockPosition, to: BlockPosition) => void;