mce 0.32.11 → 0.33.1
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/index.css +1 -1
- package/dist/index.js +6640 -6477
- package/dist/locale/en.d.ts +1 -0
- package/dist/locale/zh-Hans.d.ts +1 -0
- package/dist/mixins/0.config/base.d.ts +4 -0
- package/dist/plugins/frameScroll.d.ts +6 -0
- package/dist/typed-plugins.d.ts +1 -0
- package/dist/utils/overlayClip.d.ts +21 -0
- package/package.json +5 -5
package/dist/locale/en.d.ts
CHANGED
package/dist/locale/zh-Hans.d.ts
CHANGED
|
@@ -17,6 +17,9 @@ declare global {
|
|
|
17
17
|
interface MsaaConfig {
|
|
18
18
|
enabled: boolean;
|
|
19
19
|
}
|
|
20
|
+
interface FxaaConfig {
|
|
21
|
+
enabled: boolean;
|
|
22
|
+
}
|
|
20
23
|
interface WatermarkConfig {
|
|
21
24
|
url?: string;
|
|
22
25
|
width: number;
|
|
@@ -31,6 +34,7 @@ declare global {
|
|
|
31
34
|
pixelGrid: PixelGridConfig;
|
|
32
35
|
pixelate: PixelateConfig;
|
|
33
36
|
msaa: MsaaConfig;
|
|
37
|
+
fxaa: FxaaConfig;
|
|
34
38
|
watermark: WatermarkConfig;
|
|
35
39
|
}
|
|
36
40
|
interface UIConfig {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Element2D, Node } from 'modern-canvas';
|
|
2
|
+
import type { Vector2Like } from 'modern-path2d';
|
|
3
|
+
export declare function clampScroll(v: number, min: number, max: number): number;
|
|
4
|
+
export declare function scrollableFrameUnderPoint(roots: Node[] | undefined, isFrameNode: (n: Node) => boolean, p: Vector2Like): Element2D | undefined;
|
|
5
|
+
declare const _default: import("..").Plugin;
|
|
6
|
+
export default _default;
|
package/dist/typed-plugins.d.ts
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Node } from 'modern-canvas';
|
|
2
|
+
export interface ClipRect {
|
|
3
|
+
left: number;
|
|
4
|
+
top: number;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function overflowClips(el: any): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* 覆盖层框(box) 相对祖先裁剪画板(frameRect) 的 clip-path。二者均为 drawboard 像素坐标。
|
|
11
|
+
* 完全在画板内返回 undefined(不裁);部分溢出返回 inset(...);完全在外返回全裁(隐藏)。
|
|
12
|
+
*/
|
|
13
|
+
export declare function insetClipPath(box: ClipRect, frameRect: ClipRect): string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* 求覆盖层框在其祖先裁剪画板下的 clip-path。
|
|
16
|
+
* @param el 被框住的元素
|
|
17
|
+
* @param box 该元素的 drawboard 像素框
|
|
18
|
+
* @param getAncestorFrame editor.getAncestorFrame
|
|
19
|
+
* @param getFrameRect (frame) => 画板的 drawboard 像素框(getAabb(frame,'drawboard'))
|
|
20
|
+
*/
|
|
21
|
+
export declare function frameClipPath(el: Node | undefined, box: ClipRect, getAncestorFrame: (n?: Node) => any, getFrameRect: (frame: any) => ClipRect): string | undefined;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mce",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.33.1",
|
|
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",
|
|
@@ -55,14 +55,14 @@
|
|
|
55
55
|
"dist"
|
|
56
56
|
],
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@floating-ui/vue": "^2.0.
|
|
58
|
+
"@floating-ui/vue": "^2.0.1",
|
|
59
59
|
"@vueuse/components": "^14.3.0",
|
|
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.27.1",
|
|
64
64
|
"modern-font": "^0.6.3",
|
|
65
|
-
"modern-idoc": "^0.12.
|
|
65
|
+
"modern-idoc": "^0.12.4",
|
|
66
66
|
"modern-text": "^2.2.1",
|
|
67
67
|
"y-protocols": "^1.0.7",
|
|
68
68
|
"yjs": "^13.6.31"
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
94
94
|
"jiti": "^2.7.0",
|
|
95
95
|
"sass-embedded": "^1.100.0",
|
|
96
|
-
"typedoc": "^0.28.
|
|
96
|
+
"typedoc": "^0.28.20"
|
|
97
97
|
},
|
|
98
98
|
"scripts": {
|
|
99
99
|
"build:code": "vite build",
|