mce 0.32.9 → 0.32.11

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.
@@ -149,6 +149,7 @@ declare const _default: {
149
149
  flipVertical: string;
150
150
  toggleSelectionVisible: string;
151
151
  toggleSelectionLock: string;
152
+ clickToUnlock: string;
152
153
  layerOrder: string;
153
154
  bringToFront: string;
154
155
  bringForward: string;
@@ -149,6 +149,7 @@ declare const _default: {
149
149
  flipVertical: string;
150
150
  toggleSelectionVisible: string;
151
151
  toggleSelectionLock: string;
152
+ clickToUnlock: string;
152
153
  layerOrder: string;
153
154
  bringToFront: string;
154
155
  bringForward: string;
@@ -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;
@@ -17,6 +17,7 @@ export * from './line';
17
17
  export * from './lottie';
18
18
  export * from './png';
19
19
  export * from './propsFactory';
20
+ export * from './readonly';
20
21
  export * from './registry';
21
22
  export * from './remapTextSelection';
22
23
  export * from './saveAs';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 命令在只读模式下是否放行。
3
+ *
4
+ * @param command 命令名(可含 `:` 参数,如 `copyAs:png`、`togglePanel:layers`,按冒号前基名判定)
5
+ */
6
+ export declare function isReadonlySafeCommand(command: string): boolean;
@@ -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.32.9",
4
+ "version": "0.32.11",
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",
@@ -63,7 +63,7 @@
63
63
  "modern-canvas": "^0.26.3",
64
64
  "modern-font": "^0.6.3",
65
65
  "modern-idoc": "^0.12.3",
66
- "modern-text": "^2.1.5",
66
+ "modern-text": "^2.2.1",
67
67
  "y-protocols": "^1.0.7",
68
68
  "yjs": "^13.6.31"
69
69
  },