@ones-editor/editor 2.8.37 → 2.8.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,5 +1,5 @@
1
1
  import { OnesEditorDocRange } from '../../doc';
2
- import { OnesEditor, SelectionRange, SelectedBlock, ContainerElement, SimpleSelectionRange } from '../../types';
2
+ import { OnesEditor, SelectionRange, SelectedBlock, ContainerElement, SimpleSelectionRange, SimpleBlockPosition } from '../../types';
3
3
  import { EditorSimpleBlockPosition } from '../editor-position';
4
4
  interface SimpleRangeOptions {
5
5
  anchor: EditorSimpleBlockPosition;
@@ -13,7 +13,7 @@ export default class EditorSimpleSelectionRange implements SelectionRange {
13
13
  constructor(editor: OnesEditor, options: SimpleRangeOptions);
14
14
  isCollapsed(): boolean;
15
15
  isEqual(other: SelectionRange): boolean;
16
- isSimple(): boolean;
16
+ isSimple(): this is SimpleBlockPosition;
17
17
  isReverse(): boolean;
18
18
  getEditor(): OnesEditor;
19
19
  get start(): EditorSimpleBlockPosition;
@@ -583,6 +583,8 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
583
583
  getParentContainer: (block: BlockElement) => ContainerElement;
584
584
  reloadBlock: (block: BlockElement) => void;
585
585
  contains: (node: Node) => boolean;
586
+ scrollable: () => boolean;
587
+ setScrollable: (scrollable: boolean) => void;
586
588
  getSelectedText: () => string;
587
589
  clearSelectedContents: () => void;
588
590
  insertBlock: (containerId: string, blockIndex: number, blockData: DocBlock, newRange?: OnesEditorDocRange, options?: InsertBlockOptions) => BlockElement;
@@ -4,5 +4,6 @@ export declare class CommentItem implements ToolbarItem {
4
4
  id: string;
5
5
  name: string;
6
6
  icon: string;
7
+ adding: boolean;
7
8
  onClick(editor: OnesEditor, item: ToolbarItem): void;
8
9
  }
@@ -15,6 +15,7 @@ export interface AutoConnectionEvents {
15
15
  writeConflictError: (error: Error) => void;
16
16
  maxUsersError: () => void;
17
17
  requestReloadError: (error: Error) => void;
18
+ opReceived: () => void;
18
19
  ready: () => void;
19
20
  }
20
21
  export declare class AuthConnection extends TypedEmitter<AutoConnectionEvents> {
@@ -8,6 +8,6 @@ export declare class EditStatus {
8
8
  private dirtyTimeout;
9
9
  private waitingForSave;
10
10
  constructor(options: EditStatusOptions);
11
- setStatus(status: 'clean' | 'dirty'): void;
11
+ setStatus(status: 'clean' | 'dirty' | 'busy'): void;
12
12
  destroy(): void;
13
13
  }
@@ -26,6 +26,7 @@ export default class ShareDBDoc extends EventCallbacks<ShareDBDocCallbacks> impl
26
26
  private handleReload;
27
27
  private handleReset;
28
28
  private handleWriteConflictError;
29
+ private handleOpReceived;
29
30
  private setStatus;
30
31
  initEvents(): void;
31
32
  clearEvents(): void;