mce 0.24.0 → 0.24.2
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 +6 -11
- package/dist/components/shared/Cropper.vue.d.ts +2 -2
- package/dist/index.css +2 -1913
- package/dist/index.js +16201 -20573
- package/dist/mixins/snapper.d.ts +1 -0
- package/dist/plugins/smartGuides.d.ts +3 -1
- package/dist/utils/console.d.ts +13 -2
- package/dist/utils/smartGuides-geometry.d.ts +36 -0
- package/package.json +6 -7
package/dist/mixins/snapper.d.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
export type { BoundingBox, Box, Line, LinePair, LinePairType, LineType } from '../utils/smartGuides-geometry';
|
|
2
|
+
export { createLine, findDistancePairs, flipType, isLeftTopLine, toBoundingBox } from '../utils/smartGuides-geometry';
|
|
3
|
+
declare const _default: import("..").Plugin;
|
|
2
4
|
export default _default;
|
package/dist/utils/console.d.ts
CHANGED
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function
|
|
1
|
+
type LogFn = (...args: any[]) => void;
|
|
2
|
+
export declare function setDebug(value: boolean): void;
|
|
3
|
+
export declare const logger: {
|
|
4
|
+
/** 仅当 `options.debug` 为 true 才输出;trace/dev 用。 */
|
|
5
|
+
debug: LogFn;
|
|
6
|
+
/** 常规可见事件(如加载完成、状态变化)。 */
|
|
7
|
+
info: LogFn;
|
|
8
|
+
/** 可恢复问题(配置异常、回退路径、未知 clipboard 类型等)。 */
|
|
9
|
+
warn: LogFn;
|
|
10
|
+
/** 异常 / 失败的操作(mixin/plugin setup 失败、CRDT 事务异常等)。 */
|
|
11
|
+
error: LogFn;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Aabb2D } from 'modern-canvas';
|
|
2
|
+
export type LineType = 'vt' | 'vm' | 'vb' | 'hl' | 'hm' | 'hr';
|
|
3
|
+
export interface Line {
|
|
4
|
+
pos: number;
|
|
5
|
+
type: LineType;
|
|
6
|
+
box?: Box;
|
|
7
|
+
}
|
|
8
|
+
export interface Box {
|
|
9
|
+
id: number | string;
|
|
10
|
+
vt: Line;
|
|
11
|
+
vm: Line;
|
|
12
|
+
vb: Line;
|
|
13
|
+
hl: Line;
|
|
14
|
+
hm: Line;
|
|
15
|
+
hr: Line;
|
|
16
|
+
}
|
|
17
|
+
export type LinePairType = 'distance' | 'alignment' | 'spacing' | 'area';
|
|
18
|
+
export interface LinePair {
|
|
19
|
+
source: Line;
|
|
20
|
+
target: Line;
|
|
21
|
+
type: LinePairType;
|
|
22
|
+
distance: number;
|
|
23
|
+
_ctx?: Record<string, any>;
|
|
24
|
+
}
|
|
25
|
+
export interface BoundingBox {
|
|
26
|
+
left: number;
|
|
27
|
+
top: number;
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
rotate?: number;
|
|
31
|
+
}
|
|
32
|
+
export declare function createLine(pos: number, type: LineType, box?: Box): Line;
|
|
33
|
+
export declare function toBoundingBox(value: Line | Box): Aabb2D;
|
|
34
|
+
export declare function flipType(type: string): LineType;
|
|
35
|
+
export declare function isLeftTopLine(line: Line): boolean;
|
|
36
|
+
export declare function findDistancePairs(box: Box, boxes: Box[]): LinePair[];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mce",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.24.
|
|
4
|
+
"version": "0.24.2",
|
|
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,12 +60,12 @@
|
|
|
60
60
|
"@vueuse/core": "^14.3.0",
|
|
61
61
|
"diff": "^9.0.0",
|
|
62
62
|
"lodash-es": "^4.18.1",
|
|
63
|
-
"modern-canvas": "^0.
|
|
63
|
+
"modern-canvas": "^0.23.5",
|
|
64
64
|
"modern-font": "^0.6.0",
|
|
65
|
-
"modern-idoc": "^0.11.
|
|
66
|
-
"modern-text": "^2.0.
|
|
65
|
+
"modern-idoc": "^0.11.9",
|
|
66
|
+
"modern-text": "^2.0.4",
|
|
67
67
|
"y-protocols": "^1.0.7",
|
|
68
|
-
"yjs": "^13.6.
|
|
68
|
+
"yjs": "^13.6.31"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"echarts": "^5 || ^6",
|
|
@@ -97,8 +97,7 @@
|
|
|
97
97
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
98
98
|
"jiti": "^2.7.0",
|
|
99
99
|
"sass-embedded": "^1.100.0",
|
|
100
|
-
"typedoc": "^0.28.19"
|
|
101
|
-
"typedoc-plugin-markdown": "^4.11.0"
|
|
100
|
+
"typedoc": "^0.28.19"
|
|
102
101
|
},
|
|
103
102
|
"scripts": {
|
|
104
103
|
"build:code": "vite build",
|