mce 0.13.9 → 0.13.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.
Files changed (35) hide show
  1. package/dist/components/SmartGuides.vue.d.ts +3 -0
  2. package/dist/components/icon/ComponentIcon.d.ts +21 -0
  3. package/dist/components/icon/SvgIcon.d.ts +21 -0
  4. package/dist/components/icon/index.d.ts +3 -0
  5. package/dist/components/icon/makeIconProps.d.ts +9 -0
  6. package/dist/components/shared/FloatPanel.vue.d.ts +2 -2
  7. package/dist/components/shared/Layout.vue.d.ts +1 -1
  8. package/dist/components/shared/LayoutItem.vue.d.ts +1 -1
  9. package/dist/components/shared/Overlay.vue.d.ts +2 -2
  10. package/dist/components/timeline/Trackhead.vue.d.ts +2 -2
  11. package/dist/composables/icon.d.ts +0 -51
  12. package/dist/editor.d.ts +7 -18
  13. package/dist/index.css +298 -298
  14. package/dist/index.d.ts +2 -0
  15. package/dist/index.js +5616 -5484
  16. package/dist/mixin.d.ts +3 -0
  17. package/dist/mixins/0.config/base.d.ts +0 -3
  18. package/dist/mixins/0.context.d.ts +1 -0
  19. package/dist/mixins.d.ts +1 -1
  20. package/dist/plugin.d.ts +29 -0
  21. package/dist/plugins/frames.d.ts +2 -0
  22. package/dist/plugins/hover.d.ts +2 -0
  23. package/dist/plugins/layers.d.ts +9 -0
  24. package/dist/plugins/madeWith.d.ts +9 -0
  25. package/dist/plugins/menu.d.ts +1 -1
  26. package/dist/plugins/panels.d.ts +3 -2
  27. package/dist/plugins/ruler.d.ts +9 -0
  28. package/dist/plugins/scroll.d.ts +3 -2
  29. package/dist/plugins/select.d.ts +1 -1
  30. package/dist/plugins/{auxiliary.d.ts → smartGuides.d.ts} +4 -3
  31. package/dist/plugins.d.ts +1 -1
  32. package/dist/typed-plugins.d.ts +6 -1
  33. package/package.json +2 -2
  34. /package/dist/components/{Auxiliary.vue.d.ts → Panels.vue.d.ts} +0 -0
  35. /package/dist/components/{shared → icon}/Icon.vue.d.ts +0 -0
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,21 @@
1
+ export declare const ComponentIcon: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ icon: {
3
+ type: (ObjectConstructor | ArrayConstructor | StringConstructor | FunctionConstructor)[];
4
+ };
5
+ tag: {
6
+ type: (ObjectConstructor | StringConstructor | FunctionConstructor)[];
7
+ default: string;
8
+ };
9
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
10
+ [key: string]: any;
11
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
12
+ icon: {
13
+ type: (ObjectConstructor | ArrayConstructor | StringConstructor | FunctionConstructor)[];
14
+ };
15
+ tag: {
16
+ type: (ObjectConstructor | StringConstructor | FunctionConstructor)[];
17
+ default: string;
18
+ };
19
+ }>> & Readonly<{}>, {
20
+ tag: string | Function | Record<string, any>;
21
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,21 @@
1
+ export declare const SvgIcon: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ icon: {
3
+ type: (ObjectConstructor | ArrayConstructor | StringConstructor | FunctionConstructor)[];
4
+ };
5
+ tag: {
6
+ type: (ObjectConstructor | StringConstructor | FunctionConstructor)[];
7
+ default: string;
8
+ };
9
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
10
+ [key: string]: any;
11
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
12
+ icon: {
13
+ type: (ObjectConstructor | ArrayConstructor | StringConstructor | FunctionConstructor)[];
14
+ };
15
+ tag: {
16
+ type: (ObjectConstructor | StringConstructor | FunctionConstructor)[];
17
+ default: string;
18
+ };
19
+ }>> & Readonly<{}>, {
20
+ tag: string | Function | Record<string, any>;
21
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,3 @@
1
+ export * from './ComponentIcon';
2
+ export { default as Icon } from './Icon.vue';
3
+ export * from './SvgIcon';
@@ -0,0 +1,9 @@
1
+ export declare function makeIconProps(): {
2
+ icon: {
3
+ type: (ObjectConstructor | ArrayConstructor | StringConstructor | FunctionConstructor)[];
4
+ };
5
+ tag: {
6
+ type: (ObjectConstructor | StringConstructor | FunctionConstructor)[];
7
+ default: string;
8
+ };
9
+ };
@@ -7,9 +7,9 @@ type __VLS_ModelProps = {
7
7
  modelValue?: boolean;
8
8
  };
9
9
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
10
- declare var __VLS_20: {};
10
+ declare var __VLS_21: {};
11
11
  type __VLS_Slots = {} & {
12
- default?: (props: typeof __VLS_20) => any;
12
+ default?: (props: typeof __VLS_21) => any;
13
13
  };
14
14
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
15
  "update:modelValue": (value: boolean | undefined) => any;
@@ -38,7 +38,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
38
38
  default: null;
39
39
  };
40
40
  }>> & Readonly<{}>, {
41
- style: string | unknown[] | Record<string, any>;
41
+ style: string | Record<string, any> | unknown[];
42
42
  fullHeight: boolean;
43
43
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
44
44
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -55,7 +55,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
55
55
  };
56
56
  }>> & Readonly<{}>, {
57
57
  size: string | number;
58
- style: string | unknown[] | Record<string, any>;
58
+ style: string | Record<string, any> | unknown[];
59
59
  order: string | number;
60
60
  modelValue: boolean;
61
61
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -34,8 +34,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
34
34
  contentEl: Readonly<import("vue").ShallowRef<HTMLDivElement | null>>;
35
35
  updateLocation: () => void;
36
36
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
37
- "click:outside": (event: MouseEvent) => any;
38
37
  "update:modelValue": (val: boolean) => any;
38
+ "click:outside": (event: MouseEvent) => any;
39
39
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
40
40
  location: import("vue").PropType<import("@floating-ui/vue").Side | import("@floating-ui/vue").AlignedPlacement>;
41
41
  offset: NumberConstructor;
@@ -56,8 +56,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
56
56
  default: boolean;
57
57
  };
58
58
  }>> & Readonly<{
59
- "onClick:outside"?: ((event: MouseEvent) => any) | undefined;
60
59
  "onUpdate:modelValue"?: ((val: boolean) => any) | undefined;
60
+ "onClick:outside"?: ((event: MouseEvent) => any) | undefined;
61
61
  }>, {
62
62
  attach: string | boolean | Element | null | undefined;
63
63
  middlewares: ("shift" | "flip" | "offset")[];
@@ -1,6 +1,6 @@
1
- import type { Element2D } from 'modern-canvas';
1
+ import type { Node } from 'modern-canvas';
2
2
  type __VLS_Props = {
3
- node: Element2D;
3
+ node: Node;
4
4
  };
5
5
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
6
  declare const _default: typeof __VLS_export;
@@ -1,56 +1,5 @@
1
1
  import type { Component, MaybeRefOrGetter } from 'vue';
2
2
  export type IconValue = string | (string | [path: string, opacity: number])[] | Component;
3
- export declare function makeIconProps(): {
4
- icon: {
5
- type: (ObjectConstructor | ArrayConstructor | StringConstructor | FunctionConstructor)[];
6
- };
7
- tag: {
8
- type: (ObjectConstructor | StringConstructor | FunctionConstructor)[];
9
- default: string;
10
- };
11
- };
12
- export declare const MceSvgIcon: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
13
- icon: {
14
- type: (ObjectConstructor | ArrayConstructor | StringConstructor | FunctionConstructor)[];
15
- };
16
- tag: {
17
- type: (ObjectConstructor | StringConstructor | FunctionConstructor)[];
18
- default: string;
19
- };
20
- }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
21
- [key: string]: any;
22
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
23
- icon: {
24
- type: (ObjectConstructor | ArrayConstructor | StringConstructor | FunctionConstructor)[];
25
- };
26
- tag: {
27
- type: (ObjectConstructor | StringConstructor | FunctionConstructor)[];
28
- default: string;
29
- };
30
- }>> & Readonly<{}>, {
31
- tag: string | Function | Record<string, any>;
32
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
33
- export declare const MceComponentIcon: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
34
- icon: {
35
- type: (ObjectConstructor | ArrayConstructor | StringConstructor | FunctionConstructor)[];
36
- };
37
- tag: {
38
- type: (ObjectConstructor | StringConstructor | FunctionConstructor)[];
39
- default: string;
40
- };
41
- }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
42
- [key: string]: any;
43
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
44
- icon: {
45
- type: (ObjectConstructor | ArrayConstructor | StringConstructor | FunctionConstructor)[];
46
- };
47
- tag: {
48
- type: (ObjectConstructor | StringConstructor | FunctionConstructor)[];
49
- default: string;
50
- };
51
- }>> & Readonly<{}>, {
52
- tag: string | Function | Record<string, any>;
53
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
54
3
  export declare function useIcon(props: MaybeRefOrGetter<IconValue | undefined>): {
55
4
  iconData: import("vue").ComputedRef<{
56
5
  component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
package/dist/editor.d.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  import type { RemovableRef } from '@vueuse/core';
2
2
  import type { ObservableEvents } from 'modern-idoc';
3
3
  import type { App, InjectionKey } from 'vue';
4
+ import type { Mixin } from './mixin';
5
+ import type { OverlayPluginComponent, PanelPluginComponent, Plugin, PluginComponent, PluginObject } from './plugin';
4
6
  import { Observable } from 'modern-idoc';
5
7
  export interface Options extends Mce.Options {
6
8
  debug?: boolean;
7
- showMadeWith?: boolean;
8
9
  plugins?: Plugin[];
9
10
  configCacheInLocal?: boolean;
10
11
  }
@@ -15,13 +16,17 @@ export interface Events extends Mce.Events, ObservableEvents {
15
16
  export declare class Editor extends Observable<Events> {
16
17
  static injectionKey: InjectionKey<Editor>;
17
18
  debug: import("vue").Ref<boolean, boolean>;
18
- showMadeWith: import("vue").Ref<boolean, boolean>;
19
19
  config: RemovableRef<Mce.Config>;
20
20
  onEmit?: <K extends keyof Events & string>(event: K, ...args: Events[K]) => void;
21
21
  plugins: Map<string, PluginObject>;
22
+ typedPlugins: import("vue").ComputedRef<{
23
+ overlay: OverlayPluginComponent[];
24
+ panel: PanelPluginComponent[];
25
+ }>;
22
26
  protected _setups: (() => void | Promise<void>)[];
23
27
  constructor(options?: Options);
24
28
  protected _setupObservable(): void;
29
+ getPlugins: (type: PluginComponent["type"]) => PluginComponent[];
25
30
  log: (...args: any[]) => void;
26
31
  emit: <K extends keyof Events & string>(event: K, ...args: Events[K]) => this;
27
32
  protected _setupOptions(options: Options): void;
@@ -31,19 +36,3 @@ export declare class Editor extends Observable<Events> {
31
36
  setup: () => Promise<void>;
32
37
  install: (app: App) => void;
33
38
  }
34
- export interface PluginObject {
35
- name: string;
36
- ignore?: boolean | (() => boolean);
37
- events?: {
38
- [K in keyof Events]: (...args: Events[K]) => void;
39
- };
40
- commands?: Mce.Command[];
41
- hotkeys?: Mce.Hotkey[];
42
- loaders?: Mce.Loader[];
43
- exporters?: Mce.Exporter[];
44
- setup?: () => void | Promise<void>;
45
- }
46
- export type Plugin = PluginObject | ((editor: Editor, options: Options) => PluginObject);
47
- export declare function definePlugin(cb: Plugin): Plugin;
48
- export type Mixin = (editor: Editor, options: Options) => (() => (void | Promise<void>)) | Mixin[] | Record<string, any> | undefined | void;
49
- export declare function defineMixin(cb: Mixin): Mixin;