mce 0.32.10 → 0.33.0
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/Selection.vue.d.ts +5 -5
- package/dist/components/TextEditor.vue.d.ts +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +6196 -5979
- package/dist/locale/en.d.ts +2 -0
- package/dist/locale/zh-Hans.d.ts +2 -0
- package/dist/mixins/0.config/base.d.ts +4 -0
- package/dist/plugins/frameScroll.d.ts +6 -0
- package/dist/plugins/transform.d.ts +1 -1
- package/dist/typed-plugins.d.ts +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/overlayClip.d.ts +21 -0
- package/dist/utils/readonly.d.ts +6 -0
- package/dist/utils/readonly.test.d.ts +1 -0
- package/dist/web-components/TextEditor.d.ts +3 -1
- package/package.json +4 -4
package/dist/locale/en.d.ts
CHANGED
|
@@ -130,6 +130,7 @@ declare const _default: {
|
|
|
130
130
|
creator: string;
|
|
131
131
|
memoryManager: string;
|
|
132
132
|
toolbelt: string;
|
|
133
|
+
fxaa: string;
|
|
133
134
|
msaa: string;
|
|
134
135
|
pixelate: string;
|
|
135
136
|
layers: string;
|
|
@@ -149,6 +150,7 @@ declare const _default: {
|
|
|
149
150
|
flipVertical: string;
|
|
150
151
|
toggleSelectionVisible: string;
|
|
151
152
|
toggleSelectionLock: string;
|
|
153
|
+
clickToUnlock: string;
|
|
152
154
|
layerOrder: string;
|
|
153
155
|
bringToFront: string;
|
|
154
156
|
bringForward: string;
|
package/dist/locale/zh-Hans.d.ts
CHANGED
|
@@ -130,6 +130,7 @@ declare const _default: {
|
|
|
130
130
|
creator: string;
|
|
131
131
|
memoryManager: string;
|
|
132
132
|
toolbelt: string;
|
|
133
|
+
fxaa: string;
|
|
133
134
|
msaa: string;
|
|
134
135
|
pixelate: string;
|
|
135
136
|
layers: string;
|
|
@@ -149,6 +150,7 @@ declare const _default: {
|
|
|
149
150
|
flipVertical: string;
|
|
150
151
|
toggleSelectionVisible: string;
|
|
151
152
|
toggleSelectionLock: string;
|
|
153
|
+
clickToUnlock: string;
|
|
152
154
|
layerOrder: string;
|
|
153
155
|
bringToFront: string;
|
|
154
156
|
bringForward: string;
|
|
@@ -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;
|
|
@@ -36,7 +36,7 @@ declare global {
|
|
|
36
36
|
direction?: string;
|
|
37
37
|
}
|
|
38
38
|
interface Commands {
|
|
39
|
-
editElement: () => void;
|
|
39
|
+
editElement: (event?: MouseEvent) => void;
|
|
40
40
|
getTransform: () => TransformValue;
|
|
41
41
|
setTransform: (type: TransformType, value: Partial<TransformValue>, options?: TransformOptions) => void;
|
|
42
42
|
move: (direction: MoveDirection, distance?: number) => void;
|
package/dist/typed-plugins.d.ts
CHANGED
package/dist/utils/index.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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -68,8 +68,10 @@ export declare class TextEditor extends HTMLElement implements PropertyAccessor
|
|
|
68
68
|
protected _updateDomSelection(): void;
|
|
69
69
|
protected _update(): void;
|
|
70
70
|
protected _bindEventListeners(): void;
|
|
71
|
-
pointerDown(e?: MouseEvent | PointerEvent): boolean;
|
|
71
|
+
pointerDown(e?: MouseEvent | PointerEvent, positionOnly?: boolean): boolean;
|
|
72
72
|
selectAll(): void;
|
|
73
|
+
/** 重新聚焦隐藏 textarea,但不改变当前选区(用于进入编辑后保留点击处光标)。 */
|
|
74
|
+
focus(): void;
|
|
73
75
|
attributeChangedCallback(name: string, _oldValue: any, newValue: any): void;
|
|
74
76
|
protected _emit(type: string, detail?: any): boolean;
|
|
75
77
|
protected _renderSelectRange(): void;
|
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.0",
|
|
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,10 +60,10 @@
|
|
|
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.0",
|
|
64
64
|
"modern-font": "^0.6.3",
|
|
65
|
-
"modern-idoc": "^0.12.
|
|
66
|
-
"modern-text": "^2.1
|
|
65
|
+
"modern-idoc": "^0.12.4",
|
|
66
|
+
"modern-text": "^2.2.1",
|
|
67
67
|
"y-protocols": "^1.0.7",
|
|
68
68
|
"yjs": "^13.6.31"
|
|
69
69
|
},
|