mce 0.29.2 → 0.29.4
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/dist/components/LineEditor.vue.d.ts +9 -0
- package/dist/components/Selection.vue.d.ts +2 -2
- package/dist/editor.d.ts +2 -1
- package/dist/index.css +1 -1
- package/dist/index.js +7452 -7187
- package/dist/mixins/snapper.d.ts +0 -3
- package/dist/plugin.d.ts +8 -1
- package/dist/plugins/shape.d.ts +5 -0
- package/dist/plugins/tool.d.ts +1 -1
- package/dist/utils/arrow.d.ts +2 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/line.d.ts +11 -0
- package/package.json +2 -2
- /package/dist/components/{Drawing.vue.d.ts → ToolOptions.vue.d.ts} +0 -0
package/dist/mixins/snapper.d.ts
CHANGED
package/dist/plugin.d.ts
CHANGED
|
@@ -35,6 +35,11 @@ export declare function isDialogComponent<T extends {
|
|
|
35
35
|
}>(c: T): c is T & PluginDialogComponent;
|
|
36
36
|
export interface PluginObject {
|
|
37
37
|
name: string;
|
|
38
|
+
/**
|
|
39
|
+
* 注册时机:`pre` 最先、`post` 最后,省略为普通顺序(按文件名字母序)。
|
|
40
|
+
* 影响事件监听执行顺序——如 smartGuides 用 `post` 确保在 transform 吸附移动元素后再算辅助线。
|
|
41
|
+
*/
|
|
42
|
+
enforce?: 'pre' | 'post';
|
|
38
43
|
ignore?: () => boolean;
|
|
39
44
|
events?: {
|
|
40
45
|
[K in keyof Events]: (...args: Events[K]) => void;
|
|
@@ -50,4 +55,6 @@ export interface PluginObject {
|
|
|
50
55
|
setup?: () => void | Promise<void>;
|
|
51
56
|
}
|
|
52
57
|
export type Plugin = PluginObject | ((editor: Editor, options: Options) => PluginObject);
|
|
53
|
-
export declare function definePlugin(cb: Plugin
|
|
58
|
+
export declare function definePlugin(cb: Plugin, options?: {
|
|
59
|
+
enforce?: 'pre' | 'post';
|
|
60
|
+
}): Plugin;
|
package/dist/plugins/shape.d.ts
CHANGED
package/dist/plugins/tool.d.ts
CHANGED
package/dist/utils/arrow.d.ts
CHANGED
|
@@ -10,5 +10,7 @@ export interface ArrowPathOptions {
|
|
|
10
10
|
endMarker?: ArrowMarker;
|
|
11
11
|
roundValues?: boolean;
|
|
12
12
|
}
|
|
13
|
+
export declare const TAPERED_ARROW_VERTEX_COUNT = 7;
|
|
14
|
+
export declare function getTaperedArrowPath(p1: Point, p2: Point, width: number): string;
|
|
13
15
|
export declare function getArrowPath(p1: Point, p2: Point, options?: ArrowPathOptions): string;
|
|
14
16
|
export {};
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Element2D } from 'modern-canvas';
|
|
2
|
+
export interface LineShapeInfo {
|
|
3
|
+
kind: 'line' | 'arrow';
|
|
4
|
+
}
|
|
5
|
+
export interface LinePoint {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function parseLineShape(el: Element2D): LineShapeInfo | null;
|
|
10
|
+
export declare function getLineEndpoints(el: Element2D): [LinePoint, LinePoint] | null;
|
|
11
|
+
export declare function getTaperedArrowWidth(el: Element2D): number;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mce",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.29.
|
|
4
|
+
"version": "0.29.4",
|
|
5
5
|
"description": "A headless infinite canvas editor framework built on WebGL rendering, supports exporting to image, video, and PPT. Only the ESM.",
|
|
6
6
|
"author": "wxm",
|
|
7
7
|
"license": "MIT",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@vueuse/core": "^14.3.0",
|
|
61
61
|
"diff": "^9.0.0",
|
|
62
62
|
"lodash-es": "^4.18.1",
|
|
63
|
-
"modern-canvas": "^0.24.
|
|
63
|
+
"modern-canvas": "^0.24.9",
|
|
64
64
|
"modern-font": "^0.6.1",
|
|
65
65
|
"modern-idoc": "^0.12.1",
|
|
66
66
|
"modern-text": "^2.0.9",
|
|
File without changes
|