@vervedoc/core 3.3.15 → 3.3.17
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/README.md +181 -528
- package/dist/assets/{editor-worker-CG2Et0Mg.js → editor-worker-Ck24954m.js} +111 -106
- package/dist/assets/{editor-worker-CG2Et0Mg.js.map → editor-worker-Ck24954m.js.map} +1 -1
- package/dist/core.js +6726 -4602
- package/dist/core.js.map +1 -1
- package/dist/core.umd.cjs +79 -24
- package/dist/core.umd.cjs.map +1 -1
- package/package.json +7 -6
- package/dist/shortcut.d.ts +0 -60
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vervedoc/core",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.17",
|
|
4
4
|
"description": "VerveDoc Core 核心编辑器库(Canvas 2D 高性能实现)",
|
|
5
5
|
"author": "wanghe",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,12 +39,13 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@vervedoc/i18n": "^1.0.1",
|
|
42
|
-
"@vervedoc/docx-editor-schema": "^1.0.
|
|
42
|
+
"@vervedoc/docx-editor-schema": "^1.0.14",
|
|
43
|
+
"@vervedoc/docx-editor-transform": "^1.0.14",
|
|
44
|
+
"@vervedoc/docx-editor-view": "^1.0.11",
|
|
45
|
+
"@vervedoc/docx-editor-commands": "^1.0.6",
|
|
43
46
|
"@vervedoc/docx-editor-state": "^1.0.4",
|
|
44
|
-
"@vervedoc/docx-editor-
|
|
45
|
-
"@vervedoc/docx-editor-
|
|
46
|
-
"@vervedoc/docx-editor-commands": "^1.0.5",
|
|
47
|
-
"@vervedoc/docx-editor-history": "^1.0.9"
|
|
47
|
+
"@vervedoc/docx-editor-history": "^1.0.9",
|
|
48
|
+
"@vervedoc/docx-editor-keymap": "^1.0.6"
|
|
48
49
|
},
|
|
49
50
|
"scripts": {
|
|
50
51
|
"clean": "node -e \"const fs = require('fs'); if(fs.existsSync('dist')) fs.rmSync('dist', {recursive: true})\"",
|
package/dist/shortcut.d.ts
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { Draw } from '@vervedoc/docx-editor-view';
|
|
2
|
-
import { Command, CommandAdapt } from '@vervedoc/docx-editor-transform';
|
|
3
|
-
import { RangeManager } from '@vervedoc/docx-editor-state';
|
|
4
|
-
/** 快捷键处理器依赖注入接口 */
|
|
5
|
-
export interface ShortcutDeps {
|
|
6
|
-
/** 获取 Draw 视图实例 */
|
|
7
|
-
getDraw: () => Draw;
|
|
8
|
-
/** 获取 Command 命令实例 */
|
|
9
|
-
getCommand: () => Command;
|
|
10
|
-
dispatchCommand: (command: string, ...args: any[]) => any;
|
|
11
|
-
/** 获取 RangeManager 选区管理器 */
|
|
12
|
-
getRange: () => RangeManager;
|
|
13
|
-
/** 获取 CommandAdapt 适配器(可能未初始化) */
|
|
14
|
-
getAdapt: () => CommandAdapt | null;
|
|
15
|
-
}
|
|
16
|
-
/** 键盘快捷键处理器,分编辑/光标/格式/历史四组 */
|
|
17
|
-
export declare class ShortcutHandler {
|
|
18
|
-
/** 依赖注入 */
|
|
19
|
-
private deps;
|
|
20
|
-
/**
|
|
21
|
-
* 构造快捷键处理器
|
|
22
|
-
* @param deps 依赖注入对象
|
|
23
|
-
*/
|
|
24
|
-
constructor(deps: ShortcutDeps);
|
|
25
|
-
/**
|
|
26
|
-
* 处理键盘事件,依次尝试编辑/光标/格式/历史四组快捷键
|
|
27
|
-
* @param e 键盘事件
|
|
28
|
-
*/
|
|
29
|
-
handle: (e: KeyboardEvent) => void;
|
|
30
|
-
/**
|
|
31
|
-
* 处理编辑类快捷键(复制/剪切/粘贴/全选/删除/Enter/Tab/Escape)
|
|
32
|
-
* @param e 键盘事件
|
|
33
|
-
* @param adapt 命令适配器
|
|
34
|
-
* @param draw 视图实例
|
|
35
|
-
* @returns 是否已处理该事件
|
|
36
|
-
*/
|
|
37
|
-
private handleEditKeys;
|
|
38
|
-
/**
|
|
39
|
-
* 处理光标移动快捷键(方向键/Home/End/PageUp/PageDown,含 Ctrl 词移动/文档首尾)
|
|
40
|
-
* @param e 键盘事件
|
|
41
|
-
* @param adapt 命令适配器
|
|
42
|
-
* @param draw 视图实例
|
|
43
|
-
* @returns 是否已处理该事件
|
|
44
|
-
*/
|
|
45
|
-
private handleCursorKeys;
|
|
46
|
-
/**
|
|
47
|
-
* 处理格式快捷键(加粗/斜体/下划线/删除线/字号/对齐/列表/标题/清除格式)
|
|
48
|
-
* @param e 键盘事件
|
|
49
|
-
* @param command 命令实例
|
|
50
|
-
* @returns 是否已处理该事件
|
|
51
|
-
*/
|
|
52
|
-
private handleFormatKeys;
|
|
53
|
-
/**
|
|
54
|
-
* 处理历史快捷键(撤销/重做/分页)
|
|
55
|
-
* @param e 键盘事件
|
|
56
|
-
* @param command 命令实例
|
|
57
|
-
* @returns 是否已处理该事件
|
|
58
|
-
*/
|
|
59
|
-
private handleHistoryKeys;
|
|
60
|
-
}
|