@ones-editor/editor 0.0.3-beta.73 → 0.0.3-beta.75
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/@ones-editor/comments/src/comments-list/group-list.d.ts +3 -1
- package/@ones-editor/core/src/core/containers/root-container.d.ts +2 -1
- package/@ones-editor/core/src/core/types.d.ts +1 -0
- package/@ones-editor/file/src/file-embed/card/index.d.ts +3 -3
- package/@ones-editor/file/src/types.d.ts +1 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/dist/index.js +134 -135
- package/dist/types.d.ts +5 -2
- package/package.json +1 -1
|
@@ -18,7 +18,9 @@ export default class CommentGroupList extends ListBase<CommentWithChildren, Comm
|
|
|
18
18
|
private unbindEvents;
|
|
19
19
|
protected createItem(data: CommentWithChildren, reason: 'init' | 'insert'): CommentGroupItem;
|
|
20
20
|
protected findInsertPos(data: CommentWithChildren): number;
|
|
21
|
-
insertItem(data: CommentWithChildren
|
|
21
|
+
insertItem(data: CommentWithChildren, options?: {
|
|
22
|
+
active: boolean;
|
|
23
|
+
}): CommentGroupItem | null;
|
|
22
24
|
setActiveItem(index: number): void;
|
|
23
25
|
get activeIndex(): number;
|
|
24
26
|
get activeItem(): CommentGroupItem | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnesEditor, ContainerElement } from '../types';
|
|
1
|
+
import { OnesEditor, ContainerElement, BlockElement } from '../types';
|
|
2
2
|
export declare class RootContainer {
|
|
3
3
|
private editor;
|
|
4
4
|
rootContainer: ContainerElement;
|
|
@@ -10,6 +10,7 @@ export declare class RootContainer {
|
|
|
10
10
|
handleContextMenu: (event: Event) => void;
|
|
11
11
|
handleResize: () => void;
|
|
12
12
|
handleClick: (event: MouseEvent) => void;
|
|
13
|
+
handleBlockClick: (event: MouseEvent, block: BlockElement, elem: Element) => void;
|
|
13
14
|
handleDblClick: (event: MouseEvent) => void;
|
|
14
15
|
handleMouseDown: (event: MouseEvent) => void;
|
|
15
16
|
handleMouseMove: (event: MouseEvent) => void;
|
|
@@ -360,6 +360,7 @@ export interface OnesEditorEvents {
|
|
|
360
360
|
'resize': (editor: OnesEditor) => void;
|
|
361
361
|
'load': (editor: OnesEditor, reload: boolean) => void;
|
|
362
362
|
'click': (editor: OnesEditor, event: MouseEvent) => void;
|
|
363
|
+
'clickLink': (editor: OnesEditor, event: MouseEvent, link: Element) => void;
|
|
363
364
|
'beforeClearSelection': (editor: OnesEditor) => void;
|
|
364
365
|
'afterClearSelection': (editor: OnesEditor) => void;
|
|
365
366
|
'blur': (editor: OnesEditor) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BlockContentElement } from '../../../../../@ones-editor/core';
|
|
1
|
+
import { OnesEditor, BlockContentElement } from '../../../../../@ones-editor/core';
|
|
2
2
|
import { FileEmbedData } from '../../types';
|
|
3
|
-
export declare function renderFileCard(content: BlockContentElement, data: FileEmbedData): {
|
|
3
|
+
export declare function renderFileCard(editor: OnesEditor, content: BlockContentElement, data: FileEmbedData): Promise<{
|
|
4
4
|
card: HTMLDivElement;
|
|
5
5
|
downloadButton: HTMLButtonElement;
|
|
6
|
-
}
|
|
6
|
+
}>;
|
|
@@ -19,4 +19,5 @@ export interface FileEmbedData extends DocEmbedData, FileData {
|
|
|
19
19
|
export interface FileOptions {
|
|
20
20
|
onClick?: (editor: OnesEditor, elem: BlockElement | BoxElement, event: MouseEvent) => void;
|
|
21
21
|
onDownloadFile?: (editor: OnesEditor, data: FileData) => void;
|
|
22
|
+
renderFileCardIcon?: (editor: OnesEditor, blockData: FileEmbedData) => Promise<false | HTMLImageElement>;
|
|
22
23
|
}
|