mce 0.13.16 → 0.14.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.
@@ -22,6 +22,7 @@ declare const _default: {
22
22
  polygon: string;
23
23
  star: string;
24
24
  image: string;
25
+ pen: string;
25
26
  pencil: string;
26
27
  file: string;
27
28
  new: string;
@@ -23,6 +23,7 @@ declare const _default: {
23
23
  polygon: string;
24
24
  star: string;
25
25
  image: string;
26
+ pen: string;
26
27
  pencil: string;
27
28
  file: string;
28
29
  new: string;
@@ -1,4 +1,4 @@
1
- import type { Ref } from 'vue';
1
+ import type { Reactive } from 'vue';
2
2
  declare global {
3
3
  namespace Mce {
4
4
  type CommandHandle = (...args: any[]) => any;
@@ -12,7 +12,7 @@ declare global {
12
12
  interface Events extends CommandEvents {
13
13
  }
14
14
  interface Editor {
15
- commands: Ref<Map<string, Command>>;
15
+ commands: Reactive<Map<string, Command>>;
16
16
  registerCommand: (value: Command | Command[]) => void;
17
17
  unregisterCommand: (command: string) => void;
18
18
  exec: <K extends keyof Commands>(command: K & string, ...args: Parameters<Commands[K]>) => ReturnType<Commands[K]>;
@@ -1,4 +1,4 @@
1
- import type { Ref, WritableComputedRef } from 'vue';
1
+ import type { Reactive, WritableComputedRef } from 'vue';
2
2
  declare global {
3
3
  namespace Mce {
4
4
  interface Hotkeys {
@@ -26,7 +26,7 @@ declare global {
26
26
  }
27
27
  interface Editor {
28
28
  hotkeysData: WritableComputedRef<HotkeyData[]>;
29
- hotkeys: Ref<Map<string, Hotkey>>;
29
+ hotkeys: Reactive<Map<string, Hotkey>>;
30
30
  registerHotkey: (value: Hotkey | Hotkey[]) => void;
31
31
  unregisterHotkey: (command: string) => void;
32
32
  getKbd: (command: string) => string;
@@ -1,5 +1,5 @@
1
1
  import type { Element2D } from 'modern-canvas';
2
- import type { Ref } from 'vue';
2
+ import type { Reactive, Ref } from 'vue';
3
3
  declare global {
4
4
  namespace Mce {
5
5
  type ExportOnProgress = (progress: number) => void;
@@ -16,7 +16,7 @@ declare global {
16
16
  handle: ExporterHandle;
17
17
  }
18
18
  interface Editor {
19
- exporters: Ref<Map<string, Exporter>>;
19
+ exporters: Reactive<Map<string, Exporter>>;
20
20
  registerExporter: (value: Exporter | Exporter[]) => void;
21
21
  unregisterExporter: (name: string) => void;
22
22
  export: <K extends keyof Exporters>(name: K, options?: ExportOptions) => Exporters[K];
@@ -1,5 +1,5 @@
1
1
  import type { NormalizedElement } from 'modern-idoc';
2
- import type { Ref } from 'vue';
2
+ import type { Reactive } from 'vue';
3
3
  declare global {
4
4
  namespace Mce {
5
5
  interface Loader {
@@ -9,7 +9,7 @@ declare global {
9
9
  load: (source: any) => Promise<NormalizedElement | NormalizedElement[]>;
10
10
  }
11
11
  interface Editor {
12
- loaders: Ref<Map<string, Loader>>;
12
+ loaders: Reactive<Map<string, Loader>>;
13
13
  registerLoader: (value: Loader | Loader[]) => void;
14
14
  unregisterLoader: (name: string) => void;
15
15
  canLoad: (source: any) => Promise<boolean>;
@@ -14,9 +14,9 @@ declare global {
14
14
  }
15
15
  interface Editor {
16
16
  drawingTools: Reactive<Map<string, Mce.DrawingTool>>;
17
+ activeDrawingTool: Ref<Mce.DrawingTool>;
17
18
  registerDrawingTool: (tool: Mce.DrawingTool | Mce.DrawingTool[]) => void;
18
19
  unregisterDrawingTool: (tool: string) => void;
19
- activeDrawingTool: Ref<Mce.DrawingTool>;
20
20
  setActiveDrawingTool: (tool: string | keyof DrawingTools | undefined) => void;
21
21
  }
22
22
  }
@@ -1,6 +1,7 @@
1
1
  declare global {
2
2
  namespace Mce {
3
3
  interface DrawingTools {
4
+ pen: [];
4
5
  pencil: [];
5
6
  }
6
7
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mce",
3
3
  "type": "module",
4
- "version": "0.13.16",
4
+ "version": "0.14.1",
5
5
  "description": "The headless canvas editor framework. only the ESM.",
6
6
  "author": "wxm",
7
7
  "license": "MIT",
@@ -56,14 +56,14 @@
56
56
  ],
57
57
  "dependencies": {
58
58
  "@floating-ui/vue": "^1.1.9",
59
- "@vueuse/components": "^14.0.0",
60
- "@vueuse/core": "^14.0.0",
59
+ "@vueuse/components": "^14.1.0",
60
+ "@vueuse/core": "^14.1.0",
61
61
  "diff": "^8.0.2",
62
62
  "file-saver": "^2.0.5",
63
63
  "lodash-es": "^4.17.21",
64
- "modern-canvas": "^0.13.4",
64
+ "modern-canvas": "^0.14.3",
65
65
  "modern-font": "^0.4.4",
66
- "modern-idoc": "^0.10.5",
66
+ "modern-idoc": "^0.10.6",
67
67
  "modern-text": "^1.10.4",
68
68
  "yjs": "^13.6.27"
69
69
  },