@tmagic/editor 1.2.0-beta.25 → 1.2.0-beta.26

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.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.2.0-beta.25",
2
+ "version": "1.2.0-beta.26",
3
3
  "name": "@tmagic/editor",
4
4
  "type": "module",
5
5
  "sideEffects": [
@@ -46,12 +46,12 @@
46
46
  "dependencies": {
47
47
  "@babel/core": "^7.18.0",
48
48
  "@element-plus/icons-vue": "^2.0.9",
49
- "@tmagic/core": "1.2.0-beta.25",
50
- "@tmagic/design": "1.2.0-beta.25",
51
- "@tmagic/form": "1.2.0-beta.25",
52
- "@tmagic/schema": "1.2.0-beta.25",
53
- "@tmagic/stage": "1.2.0-beta.25",
54
- "@tmagic/utils": "1.2.0-beta.25",
49
+ "@tmagic/core": "1.2.0-beta.26",
50
+ "@tmagic/design": "1.2.0-beta.26",
51
+ "@tmagic/form": "1.2.0-beta.26",
52
+ "@tmagic/schema": "1.2.0-beta.26",
53
+ "@tmagic/stage": "1.2.0-beta.26",
54
+ "@tmagic/utils": "1.2.0-beta.26",
55
55
  "buffer": "^6.0.3",
56
56
  "color": "^3.1.3",
57
57
  "events": "^3.3.0",
@@ -63,8 +63,8 @@
63
63
  "vue": "^3.2.37"
64
64
  },
65
65
  "peerDependencies": {
66
- "@tmagic/design": "1.2.0-beta.25",
67
- "@tmagic/form": "1.2.0-beta.25",
66
+ "@tmagic/design": "1.2.0-beta.26",
67
+ "@tmagic/form": "1.2.0-beta.26",
68
68
  "monaco-editor": "^0.34.0",
69
69
  "vue": "^3.2.37"
70
70
  },
@@ -81,6 +81,6 @@
81
81
  "typescript": "^4.7.4",
82
82
  "vite": "^3.1.3",
83
83
  "vite-plugin-vue-setup-extend": "^0.4.0",
84
- "vue-tsc": "^1.0.10"
84
+ "vue-tsc": "^1.0.11"
85
85
  }
86
86
  }
package/src/Editor.vue CHANGED
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <Framework :code-options="codeOptions">
3
3
  <template #nav>
4
- <slot name="nav" :editorService="editorService"><NavMenu :data="menu"></NavMenu></slot>
4
+ <slot name="nav" :editorService="editorService"><TMagicNavMenu :data="menu"></TMagicNavMenu></slot>
5
5
  </template>
6
6
 
7
7
  <template #sidebar>
@@ -96,7 +96,7 @@ export default defineComponent({
96
96
  name: 'm-editor',
97
97
 
98
98
  components: {
99
- NavMenu,
99
+ TMagicNavMenu: NavMenu,
100
100
  Sidebar,
101
101
  Workspace,
102
102
  PropsPanel,
@@ -218,6 +218,10 @@ export default defineComponent({
218
218
  updateDragEl: {
219
219
  type: Function as PropType<UpdateDragEl>,
220
220
  },
221
+
222
+ disabledDragStart: {
223
+ type: Boolean,
224
+ },
221
225
  },
222
226
 
223
227
  emits: ['props-panel-mounted', 'update:modelValue'],
@@ -351,6 +355,7 @@ export default defineComponent({
351
355
  containerHighlightClassName: props.containerHighlightClassName,
352
356
  containerHighlightDuration: props.containerHighlightDuration,
353
357
  containerHighlightType: props.containerHighlightType,
358
+ disabledDragStart: props.disabledDragStart,
354
359
  }),
355
360
  );
356
361
 
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="m-editor-nav-menu" :style="{ height: `${height}px` }">
3
3
  <div v-for="key in keys" :class="`menu-${key}`" :key="key" :style="`width: ${columnWidth?.[key]}px`">
4
- <tool-button :data="item" v-for="(item, index) in buttons[key]" :key="index"></tool-button>
4
+ <ToolButton :data="item" v-for="(item, index) in buttons[key]" :key="index"></ToolButton>
5
5
  </div>
6
6
  </div>
7
7
  </template>
@@ -581,9 +581,20 @@ class Editor extends BaseService {
581
581
 
582
582
  if (!Array.isArray(config)) return;
583
583
 
584
+ const node = this.get<MNode>('node');
585
+
586
+ let parent: MContainer | undefined = undefined;
587
+ // 粘贴的组件为当前选中组件的副本时,则添加到当前选中组件的父组件中
588
+ if (config.length === 1 && config[0].id === node.id) {
589
+ parent = this.get<MContainer>('parent');
590
+ if (parent.type === NodeType.ROOT) {
591
+ parent = this.get<MPage>('page');
592
+ }
593
+ }
594
+
584
595
  const pasteConfigs = await this.doPaste(config, position);
585
596
 
586
- return this.add(pasteConfigs, this.get('parent'));
597
+ return this.add(pasteConfigs, parent);
587
598
  }
588
599
 
589
600
  public async doPaste(config: MNode[], position: PastePosition = {}): Promise<MNode[]> {
@@ -83,14 +83,22 @@
83
83
  }
84
84
 
85
85
  .code-editor-dialog {
86
- .el-dialog__body {
86
+ .tmagic-design-card {
87
+ .t-card__header {
88
+ display: block;
89
+ }
90
+ }
91
+
92
+ .el-dialog__body,
93
+ .t-dialog__body {
87
94
  height: 90%;
88
95
  padding-top: 10px;
89
96
  }
90
- .el-card {
97
+ .tmagic-design-card {
91
98
  height: 100%;
92
99
  background: #fff;
93
- .el-card__body {
100
+ .el-card__body,
101
+ .t-card__body {
94
102
  height: 100%;
95
103
  background: #fff;
96
104
  }
@@ -1,4 +1,4 @@
1
- .ui-component-panel {
1
+ .ui-component-panel.tmagic-design-collapse {
2
2
  height: 100%;
3
3
  border-top: 0 !important;
4
4
  margin-top: 48px;
@@ -19,14 +19,15 @@
19
19
  }
20
20
  }
21
21
 
22
- .el-collapse-item {
22
+ .tmagic-design-collapse-item {
23
23
  > div:first-of-type {
24
24
  border-bottom: 1px solid $--border-color;
25
25
  margin-bottom: 10px;
26
26
  }
27
27
  }
28
28
 
29
- .el-collapse-item__header {
29
+ .el-collapse-item__header,
30
+ .t-collapse-panel__header {
30
31
  background: $--sidebar-content-background-color;
31
32
  color: $--font-color;
32
33
  height: 25px;
@@ -40,11 +41,13 @@
40
41
  }
41
42
  }
42
43
 
43
- .el-collapse-item__wrap {
44
+ .el-collapse-item__wrap,
45
+ .t-collapse-panel__body {
44
46
  background: $--sidebar-content-background-color;
45
47
  border-bottom: 0;
46
48
 
47
- .el-collapse-item__content {
49
+ .el-collapse-item__content,
50
+ .t-collapse-panel__content {
48
51
  padding: 10px;
49
52
  display: flex;
50
53
  flex-wrap: wrap;
package/src/type.ts CHANGED
@@ -62,6 +62,7 @@ export interface StageOptions {
62
62
  containerHighlightClassName: string;
63
63
  containerHighlightDuration: number;
64
64
  containerHighlightType: ContainerHighlightType;
65
+ disabledDragStart?: boolean;
65
66
  render: (stage: StageCore) => HTMLDivElement | Promise<HTMLDivElement>;
66
67
  moveableOptions: MoveableOptions | ((config?: CustomizeMoveableOptionsCallbackConfig) => MoveableOptions);
67
68
  canSelect: (el: HTMLElement) => boolean | Promise<boolean>;
@@ -26,6 +26,7 @@ export const useStage = (stageOptions: StageOptions) => {
26
26
  containerHighlightClassName: stageOptions.containerHighlightClassName,
27
27
  containerHighlightDuration: stageOptions.containerHighlightDuration,
28
28
  containerHighlightType: stageOptions.containerHighlightType,
29
+ disabledDragStart: stageOptions.disabledDragStart,
29
30
  canSelect: (el, event, stop) => {
30
31
  const elCanSelect = stageOptions.canSelect(el);
31
32
  // 在组件联动过程中不能再往下选择,返回并触发 ui-select
@@ -102,6 +102,9 @@ declare const _default: import("vue").DefineComponent<{
102
102
  updateDragEl: {
103
103
  type: PropType<UpdateDragEl>;
104
104
  };
105
+ disabledDragStart: {
106
+ type: BooleanConstructor;
107
+ };
105
108
  }, Services, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "props-panel-mounted")[], "update:modelValue" | "props-panel-mounted", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
106
109
  /** 页面初始值 */
107
110
  modelValue: {
@@ -200,6 +203,9 @@ declare const _default: import("vue").DefineComponent<{
200
203
  updateDragEl: {
201
204
  type: PropType<UpdateDragEl>;
202
205
  };
206
+ disabledDragStart: {
207
+ type: BooleanConstructor;
208
+ };
203
209
  }>> & {
204
210
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
205
211
  "onProps-panel-mounted"?: ((...args: any[]) => any) | undefined;
@@ -222,5 +228,6 @@ declare const _default: import("vue").DefineComponent<{
222
228
  containerHighlightClassName: string;
223
229
  containerHighlightDuration: number;
224
230
  containerHighlightType: ContainerHighlightType;
231
+ disabledDragStart: boolean;
225
232
  }>;
226
233
  export default _default;
@@ -1,113 +1,21 @@
1
1
  import { Id } from '@tmagic/schema';
2
- declare const _default: {
3
- new (...args: any[]): {
4
- $: import("vue").ComponentInternalInstance;
5
- $data: {};
6
- $props: Partial<{
7
- editable: boolean;
8
- autoSaveDraft: boolean;
9
- }> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
10
- /** 代码id */
11
- id: Id;
12
- /** 代码内容 */
13
- content: string;
14
- /** 是否可编辑 */
15
- editable?: boolean | undefined;
16
- /** 是否自动保存草稿 */
17
- autoSaveDraft?: boolean | undefined;
18
- /** 编辑器参数 */
19
- codeOptions?: Object | undefined;
20
- /** 编辑器语言 */
21
- language?: string | undefined;
22
- }>, {
23
- editable: boolean;
24
- autoSaveDraft: boolean;
25
- }>>> & {
26
- onSave?: ((...args: any[]) => any) | undefined;
27
- onClose?: ((...args: any[]) => any) | undefined;
28
- onSaveAndClose?: ((...args: any[]) => any) | undefined;
29
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "editable" | "autoSaveDraft">;
30
- $attrs: {
31
- [x: string]: unknown;
32
- };
33
- $refs: {
34
- [x: string]: unknown;
35
- };
36
- $slots: Readonly<{
37
- [name: string]: import("vue").Slot | undefined;
38
- }>;
39
- $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
40
- $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
41
- $emit: (event: "save" | "close" | "saveAndClose", ...args: any[]) => void;
42
- $el: any;
43
- $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
44
- /** 代码id */
45
- id: Id;
46
- /** 代码内容 */
47
- content: string;
48
- /** 是否可编辑 */
49
- editable?: boolean | undefined;
50
- /** 是否自动保存草稿 */
51
- autoSaveDraft?: boolean | undefined;
52
- /** 编辑器参数 */
53
- codeOptions?: Object | undefined;
54
- /** 编辑器语言 */
55
- language?: string | undefined;
56
- }>, {
57
- editable: boolean;
58
- autoSaveDraft: boolean;
59
- }>>> & {
60
- onSave?: ((...args: any[]) => any) | undefined;
61
- onClose?: ((...args: any[]) => any) | undefined;
62
- onSaveAndClose?: ((...args: any[]) => any) | undefined;
63
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("save" | "close" | "saveAndClose")[], string, {
64
- editable: boolean;
65
- autoSaveDraft: boolean;
66
- }> & {
67
- beforeCreate?: ((() => void) | (() => void)[]) | undefined;
68
- created?: ((() => void) | (() => void)[]) | undefined;
69
- beforeMount?: ((() => void) | (() => void)[]) | undefined;
70
- mounted?: ((() => void) | (() => void)[]) | undefined;
71
- beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
72
- updated?: ((() => void) | (() => void)[]) | undefined;
73
- activated?: ((() => void) | (() => void)[]) | undefined;
74
- deactivated?: ((() => void) | (() => void)[]) | undefined;
75
- beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
76
- beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
77
- destroyed?: ((() => void) | (() => void)[]) | undefined;
78
- unmounted?: ((() => void) | (() => void)[]) | undefined;
79
- renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
80
- renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
81
- errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
82
- };
83
- $forceUpdate: () => void;
84
- $nextTick: typeof import("vue").nextTick;
85
- $watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
86
- } & Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
87
- /** 代码id */
88
- id: Id;
89
- /** 代码内容 */
90
- content: string;
91
- /** 是否可编辑 */
92
- editable?: boolean | undefined;
93
- /** 是否自动保存草稿 */
94
- autoSaveDraft?: boolean | undefined;
95
- /** 编辑器参数 */
96
- codeOptions?: Object | undefined;
97
- /** 编辑器语言 */
98
- language?: string | undefined;
99
- }>, {
100
- editable: boolean;
101
- autoSaveDraft: boolean;
102
- }>>> & {
103
- onSave?: ((...args: any[]) => any) | undefined;
104
- onClose?: ((...args: any[]) => any) | undefined;
105
- onSaveAndClose?: ((...args: any[]) => any) | undefined;
106
- } & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
107
- __isFragment?: undefined;
108
- __isTeleport?: undefined;
109
- __isSuspense?: undefined;
110
- } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
+ /** 代码id */
4
+ id: Id;
5
+ /** 代码内容 */
6
+ content: string;
7
+ /** 是否可编辑 */
8
+ editable?: boolean | undefined;
9
+ /** 是否自动保存草稿 */
10
+ autoSaveDraft?: boolean | undefined;
11
+ /** 编辑器参数 */
12
+ codeOptions?: Object | undefined;
13
+ /** 编辑器语言 */
14
+ language?: string | undefined;
15
+ }>, {
16
+ editable: boolean;
17
+ autoSaveDraft: boolean;
18
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("save" | "close" | "saveAndClose")[], "save" | "close" | "saveAndClose", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
111
19
  /** 代码id */
112
20
  id: Id;
113
21
  /** 代码内容 */
@@ -127,10 +35,10 @@ declare const _default: {
127
35
  onSave?: ((...args: any[]) => any) | undefined;
128
36
  onClose?: ((...args: any[]) => any) | undefined;
129
37
  onSaveAndClose?: ((...args: any[]) => any) | undefined;
130
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("save" | "close" | "saveAndClose")[], "save" | "close" | "saveAndClose", {
38
+ }, {
131
39
  editable: boolean;
132
40
  autoSaveDraft: boolean;
133
- }> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
41
+ }>;
134
42
  export default _default;
135
43
  declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
136
44
  declare type __VLS_TypePropsToRuntimeProps<T> = {
@@ -1,87 +1,14 @@
1
- import { nextTick } from 'vue';
2
1
  import { MenuButton, MenuComponent } from '../type';
3
- declare const _default: {
4
- new (...args: any[]): {
5
- $: import("vue").ComponentInternalInstance;
6
- $data: {};
7
- $props: Partial<{
8
- menuData: (MenuButton | MenuComponent)[];
9
- isSubMenu: boolean;
10
- }> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
11
- menuData?: (MenuButton | MenuComponent)[] | undefined;
12
- isSubMenu?: boolean | undefined;
13
- }>, {
14
- menuData: () => never[];
15
- isSubMenu: boolean;
16
- }>>> & {
17
- onHide?: ((...args: any[]) => any) | undefined;
18
- onShow?: ((...args: any[]) => any) | undefined;
19
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "menuData" | "isSubMenu">;
20
- $attrs: {
21
- [x: string]: unknown;
22
- };
23
- $refs: {
24
- [x: string]: unknown;
25
- };
26
- $slots: Readonly<{
27
- [name: string]: import("vue").Slot | undefined;
28
- }>;
29
- $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
30
- $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
31
- $emit: (event: "hide" | "show", ...args: any[]) => void;
32
- $el: any;
33
- $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
34
- menuData?: (MenuButton | MenuComponent)[] | undefined;
35
- isSubMenu?: boolean | undefined;
36
- }>, {
37
- menuData: () => never[];
38
- isSubMenu: boolean;
39
- }>>> & {
40
- onHide?: ((...args: any[]) => any) | undefined;
41
- onShow?: ((...args: any[]) => any) | undefined;
42
- }, {
43
- hide: () => void;
44
- show: (e: MouseEvent) => void;
45
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("hide" | "show")[], string, {
46
- menuData: (MenuButton | MenuComponent)[];
47
- isSubMenu: boolean;
48
- }> & {
49
- beforeCreate?: ((() => void) | (() => void)[]) | undefined;
50
- created?: ((() => void) | (() => void)[]) | undefined;
51
- beforeMount?: ((() => void) | (() => void)[]) | undefined;
52
- mounted?: ((() => void) | (() => void)[]) | undefined;
53
- beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
54
- updated?: ((() => void) | (() => void)[]) | undefined;
55
- activated?: ((() => void) | (() => void)[]) | undefined;
56
- deactivated?: ((() => void) | (() => void)[]) | undefined;
57
- beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
58
- beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
59
- destroyed?: ((() => void) | (() => void)[]) | undefined;
60
- unmounted?: ((() => void) | (() => void)[]) | undefined;
61
- renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
62
- renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
63
- errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
64
- };
65
- $forceUpdate: () => void;
66
- $nextTick: typeof nextTick;
67
- $watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
68
- } & Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
69
- menuData?: (MenuButton | MenuComponent)[] | undefined;
70
- isSubMenu?: boolean | undefined;
71
- }>, {
72
- menuData: () => never[];
73
- isSubMenu: boolean;
74
- }>>> & {
75
- onHide?: ((...args: any[]) => any) | undefined;
76
- onShow?: ((...args: any[]) => any) | undefined;
77
- } & import("vue").ShallowUnwrapRef<{
78
- hide: () => void;
79
- show: (e: MouseEvent) => void;
80
- }> & {} & import("vue").ComponentCustomProperties;
81
- __isFragment?: undefined;
82
- __isTeleport?: undefined;
83
- __isSuspense?: undefined;
84
- } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
+ menuData?: (MenuButton | MenuComponent)[] | undefined;
4
+ isSubMenu?: boolean | undefined;
5
+ }>, {
6
+ menuData: () => never[];
7
+ isSubMenu: boolean;
8
+ }>, {
9
+ hide: () => void;
10
+ show: (e: MouseEvent) => void;
11
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("hide" | "show")[], "hide" | "show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
85
12
  menuData?: (MenuButton | MenuComponent)[] | undefined;
86
13
  isSubMenu?: boolean | undefined;
87
14
  }>, {
@@ -91,12 +18,9 @@ declare const _default: {
91
18
  onHide?: ((...args: any[]) => any) | undefined;
92
19
  onShow?: ((...args: any[]) => any) | undefined;
93
20
  }, {
94
- hide: () => void;
95
- show: (e: MouseEvent) => void;
96
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("hide" | "show")[], "hide" | "show", {
97
21
  menuData: (MenuButton | MenuComponent)[];
98
22
  isSubMenu: boolean;
99
- }> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
23
+ }>;
100
24
  export default _default;
101
25
  declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
102
26
  declare type __VLS_TypePropsToRuntimeProps<T> = {
@@ -1,92 +1,15 @@
1
1
  import { Id } from '@tmagic/schema';
2
- declare const _default: {
3
- new (...args: any[]): {
4
- $: import("vue").ComponentInternalInstance;
5
- $data: {};
6
- $props: Partial<{
7
- editable: boolean;
8
- autoSaveDraft: boolean;
9
- }> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
10
- id: Id;
11
- name: string;
12
- content: string;
13
- editable?: boolean | undefined;
14
- autoSaveDraft?: boolean | undefined;
15
- codeOptions?: object | undefined;
16
- }>, {
17
- editable: boolean;
18
- autoSaveDraft: boolean;
19
- }>>> & {
20
- onChange?: ((...args: any[]) => any) | undefined;
21
- "onField-input"?: ((...args: any[]) => any) | undefined;
22
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "editable" | "autoSaveDraft">;
23
- $attrs: {
24
- [x: string]: unknown;
25
- };
26
- $refs: {
27
- [x: string]: unknown;
28
- };
29
- $slots: Readonly<{
30
- [name: string]: import("vue").Slot | undefined;
31
- }>;
32
- $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
33
- $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
34
- $emit: (event: "change" | "field-input", ...args: any[]) => void;
35
- $el: any;
36
- $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
37
- id: Id;
38
- name: string;
39
- content: string;
40
- editable?: boolean | undefined;
41
- autoSaveDraft?: boolean | undefined;
42
- codeOptions?: object | undefined;
43
- }>, {
44
- editable: boolean;
45
- autoSaveDraft: boolean;
46
- }>>> & {
47
- onChange?: ((...args: any[]) => any) | undefined;
48
- "onField-input"?: ((...args: any[]) => any) | undefined;
49
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "field-input")[], string, {
50
- editable: boolean;
51
- autoSaveDraft: boolean;
52
- }> & {
53
- beforeCreate?: ((() => void) | (() => void)[]) | undefined;
54
- created?: ((() => void) | (() => void)[]) | undefined;
55
- beforeMount?: ((() => void) | (() => void)[]) | undefined;
56
- mounted?: ((() => void) | (() => void)[]) | undefined;
57
- beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
58
- updated?: ((() => void) | (() => void)[]) | undefined;
59
- activated?: ((() => void) | (() => void)[]) | undefined;
60
- deactivated?: ((() => void) | (() => void)[]) | undefined;
61
- beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
62
- beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
63
- destroyed?: ((() => void) | (() => void)[]) | undefined;
64
- unmounted?: ((() => void) | (() => void)[]) | undefined;
65
- renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
66
- renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
67
- errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
68
- };
69
- $forceUpdate: () => void;
70
- $nextTick: typeof import("vue").nextTick;
71
- $watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
72
- } & Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
73
- id: Id;
74
- name: string;
75
- content: string;
76
- editable?: boolean | undefined;
77
- autoSaveDraft?: boolean | undefined;
78
- codeOptions?: object | undefined;
79
- }>, {
80
- editable: boolean;
81
- autoSaveDraft: boolean;
82
- }>>> & {
83
- onChange?: ((...args: any[]) => any) | undefined;
84
- "onField-input"?: ((...args: any[]) => any) | undefined;
85
- } & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
86
- __isFragment?: undefined;
87
- __isTeleport?: undefined;
88
- __isSuspense?: undefined;
89
- } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
+ id: Id;
4
+ name: string;
5
+ content: string;
6
+ editable?: boolean | undefined;
7
+ autoSaveDraft?: boolean | undefined;
8
+ codeOptions?: object | undefined;
9
+ }>, {
10
+ editable: boolean;
11
+ autoSaveDraft: boolean;
12
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "field-input")[], "change" | "field-input", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
90
13
  id: Id;
91
14
  name: string;
92
15
  content: string;
@@ -99,10 +22,10 @@ declare const _default: {
99
22
  }>>> & {
100
23
  onChange?: ((...args: any[]) => any) | undefined;
101
24
  "onField-input"?: ((...args: any[]) => any) | undefined;
102
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "field-input")[], "change" | "field-input", {
25
+ }, {
103
26
  editable: boolean;
104
27
  autoSaveDraft: boolean;
105
- }> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
28
+ }>;
106
29
  export default _default;
107
30
  declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
108
31
  declare type __VLS_TypePropsToRuntimeProps<T> = {