@ones-editor/editor 2.1.0-beta.5 → 2.1.0-beta.7

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "2.1.0-beta.5",
3
+ "version": "2.1.0-beta.7",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,17 +0,0 @@
1
- import { DocObject, EditorSimpleSelectionRange, OnesEditor, OnesEditorComment } from '../../../../@ones-editor/core';
2
- export interface AddCommentToOldVersionBody {
3
- avatarUrl: string;
4
- containerId: string;
5
- startBlockId: string;
6
- startOffset: number;
7
- endBlockId: string;
8
- endOffset: number;
9
- commentId?: string;
10
- commentGroupId?: string;
11
- comment: DocObject;
12
- abstract?: string;
13
- }
14
- export declare function addCommentToOldVersion(editor: OnesEditor, version: number, range: EditorSimpleSelectionRange, comment: OnesEditorComment, commentDoc: DocObject): Promise<void>;
15
- export declare function replyCommentToOldVersion(editor: OnesEditor, version: number, comment: OnesEditorComment, commentDoc: DocObject): Promise<unknown>;
16
- export declare function updateCommentToOldDoc(editor: OnesEditor, version: number, commentId: string, commentDoc: DocObject): Promise<unknown>;
17
- export declare function deleteCommentFromOldDoc(editor: OnesEditor, version: number, commentId: string): Promise<unknown>;
@@ -1,22 +0,0 @@
1
- import { BlockElement, CommandItem, OnesEditor, OnesEditorBlockHook, SelectionRange, TextBlockContentChild } from '../../../../@ones-editor/core';
2
- import { ReadonlyCommandOptions, ReadonlyToolbarCommandProvider } from './types';
3
- export declare class AddCommentToOldDocCommandProvider implements ReadonlyToolbarCommandProvider, OnesEditorBlockHook {
4
- private editor;
5
- private version;
6
- private localCreatedComments;
7
- constructor(editor: OnesEditor, version: number);
8
- getTextCommands(editor: OnesEditor, range: SelectionRange): CommandItem[];
9
- executeCommand(editor: OnesEditor, command: CommandItem, options: ReadonlyCommandOptions): void;
10
- onCreateComment(commentId: string, local: boolean): Promise<void>;
11
- onDeleteComment(commentId: string, local: boolean): Promise<void>;
12
- onUpdateComment(commentId: string, local: boolean): Promise<void>;
13
- hideToolbar(editor: OnesEditor): void;
14
- commands(editor: OnesEditor, blockElement: BlockElement, child: TextBlockContentChild | null): {
15
- group: string;
16
- commands: {
17
- id: string;
18
- name: string;
19
- }[];
20
- executeCommand: (editor: OnesEditor, block: BlockElement, item: CommandItem, child: TextBlockContentChild | null) => void;
21
- } | undefined;
22
- }
@@ -1,30 +0,0 @@
1
- /// <reference types="lodash" />
2
- import { BlockElement, CommandItem, OnesEditor, OnesEditorCustom, SelectionRange, TextBlockContentChild } from '../../../../@ones-editor/core';
3
- import { AbstractCommandBar, ManualToolbar } from '../../../../@ones-editor/ui-base';
4
- import type { ReadonlyToolbarCommandProvider } from './types';
5
- export declare class ReadonlyToolbar implements OnesEditorCustom {
6
- private editor;
7
- toolbar: ManualToolbar;
8
- toolbarType: 'text' | 'object';
9
- mouseDown: boolean;
10
- hoveringBlock: BlockElement | null;
11
- hoveringTextChild: TextBlockContentChild | null;
12
- oldRange: SelectionRange | null;
13
- providers: ReadonlyToolbarCommandProvider[];
14
- constructor(editor: OnesEditor);
15
- destroy(): void;
16
- addProvider(provider: ReadonlyToolbarCommandProvider): void;
17
- isInBlock(block: BlockElement, event: MouseEvent): boolean;
18
- handleButtonClick: (toolbar: AbstractCommandBar, item: CommandItem) => void;
19
- handleClose: () => void;
20
- handleClosing: (bar: unknown, event: MouseEvent) => boolean;
21
- bindEvents(): void;
22
- unbindEvents(): void;
23
- handleDocumentMouseDown: (event: MouseEvent) => void;
24
- handleDocumentMouseUp: () => void;
25
- handleSelectionChange: import("lodash").DebouncedFunc<(editor: OnesEditor) => void>;
26
- private handleHoveringBlockChildChange;
27
- groupCommands: (allCommands: CommandItem[]) => CommandItem[];
28
- showTextToolbar(reason: string): void;
29
- showObjectToolbar(event: MouseEvent | null): void;
30
- }
@@ -1,12 +0,0 @@
1
- import { BlockElement, CommandItem, OnesEditor, SelectionRange, TextBlockContentChild } from '../../../../@ones-editor/core';
2
- import { CommandBar } from '../../../../@ones-editor/ui-base';
3
- export interface ReadonlyCommandOptions {
4
- hoveringBlock: BlockElement | null;
5
- hoveringTextChild: TextBlockContentChild | null;
6
- bar: CommandBar;
7
- }
8
- export interface ReadonlyToolbarCommandProvider {
9
- getTextCommands?: (editor: OnesEditor, range: SelectionRange) => CommandItem[];
10
- destroy?: () => void;
11
- executeCommand: (editor: OnesEditor, command: CommandItem, options: ReadonlyCommandOptions) => void;
12
- }
@@ -1,7 +0,0 @@
1
- import { BlockCommands, BlockElement, CommandItem, OnesEditor, OnesEditorBlockHook, TextBlockContentChild } from '../../../../@ones-editor/core';
2
- export declare class LinkCommands implements OnesEditorBlockHook {
3
- private editor;
4
- constructor(editor: OnesEditor);
5
- commands(editor: OnesEditor, block: BlockElement, child: TextBlockContentChild | null): BlockCommands | undefined;
6
- executeCommand: (editor: OnesEditor, block: BlockElement, item: CommandItem, child: TextBlockContentChild | null) => void;
7
- }