@ones-editor/editor 0.0.3-beta.145 → 0.0.3-beta.147
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/block-menu/src/block-menu/index.d.ts +1 -2
- package/@ones-editor/comments/src/comment-item/comment-item.d.ts +1 -0
- package/@ones-editor/comments/src/comment-item/mobile-comment-item/mobile-comment-item.d.ts +1 -0
- package/@ones-editor/core/src/utils/abbreviation.d.ts +13 -0
- package/@ones-editor/core/src/utils/index.d.ts +1 -0
- package/@ones-editor/media-embed/src/core/media.d.ts +1 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/versions/src/locale/en-us.d.ts +0 -1
- package/@ones-editor/versions/src/locale/ja-jp.d.ts +0 -1
- package/@ones-editor/versions/src/locale/zh-cn.d.ts +0 -1
- package/dist/index.js +151 -148
- package/package.json +1 -1
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { BlockElement, OnesEditor, CommandItem } from '../../../../@ones-editor/core';
|
|
2
|
-
import type { ManualShowCommandBarOptions } from '../../../../@ones-editor/ui-base';
|
|
3
2
|
export default class BlockMenu {
|
|
4
3
|
private editor;
|
|
5
4
|
private menu;
|
|
6
5
|
currentBlock: BlockElement | null;
|
|
7
6
|
private commandBlock;
|
|
8
7
|
constructor(editor: OnesEditor);
|
|
9
|
-
show(target: HTMLElement
|
|
8
|
+
show(target: HTMLElement): void;
|
|
10
9
|
isInMenu(eventTarget: EventTarget | null): boolean;
|
|
11
10
|
handleShow: () => void;
|
|
12
11
|
handleClose: () => void;
|
|
@@ -10,6 +10,7 @@ export declare class MobileCommentItem {
|
|
|
10
10
|
private components;
|
|
11
11
|
constructor(editor: OnesEditor, commentsProvider: OnesEditorCommentsProvider, comment: OnesEditorComment);
|
|
12
12
|
private get doc();
|
|
13
|
+
private createAvatar;
|
|
13
14
|
createItem(): {
|
|
14
15
|
mobileCommentEditor: CommentEditor;
|
|
15
16
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare function hashCode(str: string): number;
|
|
2
|
+
/**
|
|
3
|
+
* 用户名缩写
|
|
4
|
+
* @param name 用户名
|
|
5
|
+
* @param maxLength 最大展示长度
|
|
6
|
+
* @returns 缩写
|
|
7
|
+
* 规则:
|
|
8
|
+
* 1. 中日韩字符,从后往前取
|
|
9
|
+
* 2. 英文字符、特殊字符、数字,从前往后取,如果有空格比如 `Mike Tracy` 取 MT
|
|
10
|
+
* 3. emoji,从后往前取
|
|
11
|
+
* 4. 默认处理从前取
|
|
12
|
+
*/
|
|
13
|
+
export declare function abbreviation(name: string, maxLength?: number): string;
|
|
@@ -23,6 +23,7 @@ export declare class Media extends TypedEmitter<MediaEvent> {
|
|
|
23
23
|
getResourceUrl(url: string): string;
|
|
24
24
|
setFullScreen(): void;
|
|
25
25
|
removeFullScreen(): void;
|
|
26
|
+
updateBlockAlign(blockData: MediaBlockData, content: BlockContentElement): void;
|
|
26
27
|
render(blockData: MediaBlockData, content: BlockContentElement): void;
|
|
27
28
|
setAbstract(abstract: MediaAbstract): void;
|
|
28
29
|
destroy: () => void;
|