mce 0.32.11 → 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.
@@ -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;
@@ -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;
@@ -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,6 +36,7 @@ import './plugins/edit'
36
36
  import './plugins/flexLayout'
37
37
  import './plugins/formatPaint'
38
38
  import './plugins/frame'
39
+ import './plugins/frameScroll'
39
40
  import './plugins/history'
40
41
  import './plugins/hover'
41
42
  import './plugins/image'
@@ -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.32.11",
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,9 +60,9 @@
60
60
  "@vueuse/core": "^14.3.0",
61
61
  "diff": "^9.0.0",
62
62
  "lodash-es": "^4.18.1",
63
- "modern-canvas": "^0.26.3",
63
+ "modern-canvas": "^0.27.0",
64
64
  "modern-font": "^0.6.3",
65
- "modern-idoc": "^0.12.3",
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"