mce 0.13.2 → 0.13.4

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.
@@ -29,8 +29,8 @@ declare const _default: {
29
29
  cut: string;
30
30
  copy: string;
31
31
  copyAs: string;
32
+ 'copyAs:png': string;
32
33
  'copyAs:svg': string;
33
- 'copyAs:json': string;
34
34
  paste: string;
35
35
  duplicate: string;
36
36
  delete: string;
@@ -30,8 +30,8 @@ declare const _default: {
30
30
  cut: string;
31
31
  copy: string;
32
32
  copyAs: string;
33
+ 'copyAs:png': string;
33
34
  'copyAs:svg': string;
34
- 'copyAs:json': string;
35
35
  paste: string;
36
36
  duplicate: string;
37
37
  delete: string;
@@ -1,8 +1,8 @@
1
- import type { Element2D } from 'modern-canvas';
1
+ import { Element2D } from 'modern-canvas';
2
2
  declare global {
3
3
  namespace Mce {
4
4
  interface Editor {
5
- textFontSizeToFit: (element: Element2D) => void;
5
+ textFontSizeToFit: (element: Element2D, scale?: number) => void;
6
6
  textToFit: (element: Element2D, typography?: Mce.TypographyStrategy) => void;
7
7
  }
8
8
  }
@@ -7,9 +7,10 @@ declare global {
7
7
  paste: [event: KeyboardEvent];
8
8
  duplicate: [event: KeyboardEvent];
9
9
  }
10
+ type CopySource = string | Blob | Record<string, any>[];
10
11
  type PasteSource = DataTransfer | ClipboardItem[];
11
12
  interface Commands {
12
- copy: (data?: any) => Promise<void>;
13
+ copy: (source?: CopySource) => Promise<void>;
13
14
  cut: () => Promise<void>;
14
15
  paste: (source?: PasteSource) => Promise<void>;
15
16
  duplicate: () => void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mce",
3
3
  "type": "module",
4
- "version": "0.13.2",
4
+ "version": "0.13.4",
5
5
  "description": "The headless canvas editor framework. only the ESM.",
6
6
  "author": "wxm",
7
7
  "license": "MIT",