@tmagic/editor 1.4.0-beta.1 → 1.4.0

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 (54) hide show
  1. package/dist/style.css +22 -26
  2. package/dist/tmagic-editor.js +977 -798
  3. package/dist/tmagic-editor.umd.cjs +981 -800
  4. package/package.json +11 -11
  5. package/src/components/CodeBlockEditor.vue +75 -101
  6. package/src/components/FloatingBox.vue +58 -38
  7. package/src/components/SplitView.vue +46 -35
  8. package/src/fields/DataSourceFieldSelect.vue +2 -1
  9. package/src/fields/DataSourceFields.vue +55 -30
  10. package/src/fields/DataSourceInput.vue +6 -2
  11. package/src/fields/DataSourceMocks.vue +35 -17
  12. package/src/hooks/index.ts +2 -0
  13. package/src/hooks/use-code-block-edit.ts +1 -1
  14. package/src/hooks/use-editor-content-height.ts +20 -0
  15. package/src/hooks/use-float-box.ts +21 -15
  16. package/src/hooks/use-next-float-box-position.ts +29 -0
  17. package/src/hooks/use-window-rect.ts +20 -0
  18. package/src/layouts/CodeEditor.vue +3 -6
  19. package/src/layouts/Framework.vue +33 -34
  20. package/src/layouts/PropsPanel.vue +37 -0
  21. package/src/layouts/sidebar/Sidebar.vue +17 -15
  22. package/src/layouts/sidebar/code-block/CodeBlockListPanel.vue +1 -3
  23. package/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue +36 -22
  24. package/src/layouts/sidebar/data-source/DataSourceListPanel.vue +1 -6
  25. package/src/layouts/workspace/viewer/NodeListMenu.vue +1 -0
  26. package/src/layouts/workspace/viewer/StageOverlay.vue +3 -1
  27. package/src/services/stageOverlay.ts +2 -2
  28. package/src/services/ui.ts +6 -0
  29. package/src/theme/code-block.scss +0 -19
  30. package/src/theme/component-list-panel.scss +0 -1
  31. package/src/theme/floating-box.scss +2 -2
  32. package/src/theme/icon.scss +7 -1
  33. package/src/theme/layer-panel.scss +0 -1
  34. package/src/theme/props-panel.scss +14 -0
  35. package/src/theme/sidebar.scss +0 -7
  36. package/src/type.ts +6 -6
  37. package/types/components/CodeBlockEditor.vue.d.ts +39 -25
  38. package/types/components/FloatingBox.vue.d.ts +42 -57
  39. package/types/components/SplitView.vue.d.ts +2 -0
  40. package/types/fields/DataSourceFields.vue.d.ts +84 -28
  41. package/types/fields/DataSourceMocks.vue.d.ts +80 -28
  42. package/types/hooks/index.d.ts +2 -0
  43. package/types/hooks/use-code-block-edit.d.ts +16 -11
  44. package/types/hooks/use-data-source-method.d.ts +16 -11
  45. package/types/hooks/use-editor-content-height.d.ts +3 -0
  46. package/types/hooks/use-next-float-box-position.d.ts +9 -0
  47. package/types/hooks/use-window-rect.d.ts +6 -0
  48. package/types/layouts/sidebar/Sidebar.vue.d.ts +1 -1
  49. package/types/layouts/sidebar/code-block/CodeBlockListPanel.vue.d.ts +1 -3
  50. package/types/layouts/sidebar/data-source/DataSourceConfigPanel.vue.d.ts +34 -22
  51. package/types/layouts/sidebar/data-source/DataSourceListPanel.vue.d.ts +2 -15
  52. package/types/services/stageOverlay.d.ts +1 -1
  53. package/types/services/ui.d.ts +6 -0
  54. package/types/type.d.ts +6 -5
@@ -1,34 +1,90 @@
1
- import { type FieldProps } from '@tmagic/form';
2
- declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<FieldProps<{
3
- type: 'data-source-fields';
4
- }>>, {
5
- disabled: boolean;
6
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
1
+ declare const _default: import("vue").DefineComponent<{
2
+ width: import("vue").PropType<number>;
3
+ visible: import("vue").PropType<boolean>;
4
+ visible1: import("vue").PropType<boolean>;
5
+ name: {
6
+ type: import("vue").PropType<string>;
7
+ required: true;
8
+ };
9
+ values: {
10
+ type: import("vue").PropType<any>;
11
+ };
12
+ size: {
13
+ type: import("vue").PropType<"small" | "large" | "default">;
14
+ };
15
+ model: {
16
+ type: import("vue").PropType<any>;
17
+ required: true;
18
+ };
19
+ disabled: {
20
+ type: import("vue").PropType<boolean>;
21
+ default: boolean;
22
+ };
23
+ config: {
24
+ type: import("vue").PropType<{
25
+ type: 'data-source-fields';
26
+ }>;
27
+ required: true;
28
+ };
29
+ initValues: {
30
+ type: import("vue").PropType<any>;
31
+ };
32
+ lastValues: {
33
+ type: import("vue").PropType<Record<string, any>>;
34
+ };
35
+ prop: {
36
+ type: import("vue").PropType<string>;
37
+ required: true;
38
+ };
39
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
40
+ "update:width": (width: number) => void;
41
+ "update:visible": (visible: boolean) => void;
42
+ "update:visible1": (visible1: boolean) => void;
7
43
  change: (...args: any[]) => void;
8
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<FieldProps<{
9
- type: 'data-source-fields';
10
- }>>, {
11
- disabled: boolean;
12
- }>>> & {
44
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
45
+ width: import("vue").PropType<number>;
46
+ visible: import("vue").PropType<boolean>;
47
+ visible1: import("vue").PropType<boolean>;
48
+ name: {
49
+ type: import("vue").PropType<string>;
50
+ required: true;
51
+ };
52
+ values: {
53
+ type: import("vue").PropType<any>;
54
+ };
55
+ size: {
56
+ type: import("vue").PropType<"small" | "large" | "default">;
57
+ };
58
+ model: {
59
+ type: import("vue").PropType<any>;
60
+ required: true;
61
+ };
62
+ disabled: {
63
+ type: import("vue").PropType<boolean>;
64
+ default: boolean;
65
+ };
66
+ config: {
67
+ type: import("vue").PropType<{
68
+ type: 'data-source-fields';
69
+ }>;
70
+ required: true;
71
+ };
72
+ initValues: {
73
+ type: import("vue").PropType<any>;
74
+ };
75
+ lastValues: {
76
+ type: import("vue").PropType<Record<string, any>>;
77
+ };
78
+ prop: {
79
+ type: import("vue").PropType<string>;
80
+ required: true;
81
+ };
82
+ }>> & {
13
83
  onChange?: ((...args: any[]) => any) | undefined;
84
+ "onUpdate:width"?: ((width: number) => any) | undefined;
85
+ "onUpdate:visible"?: ((visible: boolean) => any) | undefined;
86
+ "onUpdate:visible1"?: ((visible1: boolean) => any) | undefined;
14
87
  }, {
15
88
  disabled: boolean;
16
89
  }, {}>;
17
90
  export default _default;
18
- type __VLS_WithDefaults<P, D> = {
19
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
20
- default: D[K];
21
- }> : P[K];
22
- };
23
- type __VLS_Prettify<T> = {
24
- [K in keyof T]: T[K];
25
- } & {};
26
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
27
- type __VLS_TypePropsToOption<T> = {
28
- [K in keyof T]-?: {} extends Pick<T, K> ? {
29
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
30
- } : {
31
- type: import('vue').PropType<T[K]>;
32
- required: true;
33
- };
34
- };
@@ -1,34 +1,86 @@
1
- import { type FieldProps } from '@tmagic/form';
2
- declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<FieldProps<{
3
- type: 'data-source-mocks';
4
- }>>, {
5
- disabled: boolean;
6
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
1
+ declare const _default: import("vue").DefineComponent<{
2
+ width: import("vue").PropType<number>;
3
+ visible: import("vue").PropType<boolean>;
4
+ name: {
5
+ type: import("vue").PropType<string>;
6
+ required: true;
7
+ };
8
+ values: {
9
+ type: import("vue").PropType<any>;
10
+ };
11
+ size: {
12
+ type: import("vue").PropType<"small" | "large" | "default">;
13
+ };
14
+ model: {
15
+ type: import("vue").PropType<any>;
16
+ required: true;
17
+ };
18
+ disabled: {
19
+ type: import("vue").PropType<boolean>;
20
+ default: boolean;
21
+ };
22
+ config: {
23
+ type: import("vue").PropType<{
24
+ type: 'data-source-mocks';
25
+ }>;
26
+ required: true;
27
+ };
28
+ initValues: {
29
+ type: import("vue").PropType<any>;
30
+ };
31
+ lastValues: {
32
+ type: import("vue").PropType<Record<string, any>>;
33
+ };
34
+ prop: {
35
+ type: import("vue").PropType<string>;
36
+ required: true;
37
+ };
38
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
39
+ "update:width": (width: number) => void;
40
+ "update:visible": (visible: boolean) => void;
7
41
  change: (...args: any[]) => void;
8
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<FieldProps<{
9
- type: 'data-source-mocks';
10
- }>>, {
11
- disabled: boolean;
12
- }>>> & {
42
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
43
+ width: import("vue").PropType<number>;
44
+ visible: import("vue").PropType<boolean>;
45
+ name: {
46
+ type: import("vue").PropType<string>;
47
+ required: true;
48
+ };
49
+ values: {
50
+ type: import("vue").PropType<any>;
51
+ };
52
+ size: {
53
+ type: import("vue").PropType<"small" | "large" | "default">;
54
+ };
55
+ model: {
56
+ type: import("vue").PropType<any>;
57
+ required: true;
58
+ };
59
+ disabled: {
60
+ type: import("vue").PropType<boolean>;
61
+ default: boolean;
62
+ };
63
+ config: {
64
+ type: import("vue").PropType<{
65
+ type: 'data-source-mocks';
66
+ }>;
67
+ required: true;
68
+ };
69
+ initValues: {
70
+ type: import("vue").PropType<any>;
71
+ };
72
+ lastValues: {
73
+ type: import("vue").PropType<Record<string, any>>;
74
+ };
75
+ prop: {
76
+ type: import("vue").PropType<string>;
77
+ required: true;
78
+ };
79
+ }>> & {
13
80
  onChange?: ((...args: any[]) => any) | undefined;
81
+ "onUpdate:width"?: ((width: number) => any) | undefined;
82
+ "onUpdate:visible"?: ((visible: boolean) => any) | undefined;
14
83
  }, {
15
84
  disabled: boolean;
16
85
  }, {}>;
17
86
  export default _default;
18
- type __VLS_WithDefaults<P, D> = {
19
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
20
- default: D[K];
21
- }> : P[K];
22
- };
23
- type __VLS_Prettify<T> = {
24
- [K in keyof T]: T[K];
25
- } & {};
26
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
27
- type __VLS_TypePropsToOption<T> = {
28
- [K in keyof T]-?: {} extends Pick<T, K> ? {
29
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
30
- } : {
31
- type: import('vue').PropType<T[K]>;
32
- required: true;
33
- };
34
- };
@@ -2,3 +2,5 @@ export * from './use-code-block-edit';
2
2
  export * from './use-data-source-method';
3
3
  export * from './use-stage';
4
4
  export * from './use-float-box';
5
+ export * from './use-window-rect';
6
+ export * from './use-editor-content-height';
@@ -4,6 +4,8 @@ export declare const useCodeBlockEdit: (codeBlockService?: CodeBlockService) =>
4
4
  codeId: import("vue").Ref<string | undefined>;
5
5
  codeConfig: import("vue").Ref<CodeBlockContent | undefined>;
6
6
  codeBlockEditor: import("vue").Ref<import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
7
+ width: import("vue").PropType<number>;
8
+ visible: import("vue").PropType<boolean>;
7
9
  content: {
8
10
  type: import("vue").PropType<CodeBlockContent>;
9
11
  required: true;
@@ -17,17 +19,20 @@ export declare const useCodeBlockEdit: (codeBlockService?: CodeBlockService) =>
17
19
  dataSourceType: {
18
20
  type: import("vue").PropType<string>;
19
21
  };
20
- slideType: {
21
- type: import("vue").PropType<import("..").SlideType>;
22
- };
23
22
  }>> & {
24
23
  onSubmit?: ((values: CodeBlockContent) => any) | undefined;
24
+ "onUpdate:width"?: ((width: number) => any) | undefined;
25
+ "onUpdate:visible"?: ((visible: boolean) => any) | undefined;
25
26
  }, {
26
27
  show(): Promise<void>;
27
- hide(): void;
28
+ hide(): Promise<void>;
28
29
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
30
+ "update:width": (width: number) => void;
31
+ "update:visible": (visible: boolean) => void;
29
32
  submit: (values: CodeBlockContent) => void;
30
33
  }, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
34
+ width: import("vue").PropType<number>;
35
+ visible: import("vue").PropType<boolean>;
31
36
  content: {
32
37
  type: import("vue").PropType<CodeBlockContent>;
33
38
  required: true;
@@ -41,11 +46,10 @@ export declare const useCodeBlockEdit: (codeBlockService?: CodeBlockService) =>
41
46
  dataSourceType: {
42
47
  type: import("vue").PropType<string>;
43
48
  };
44
- slideType: {
45
- type: import("vue").PropType<import("..").SlideType>;
46
- };
47
49
  }>> & {
48
50
  onSubmit?: ((values: CodeBlockContent) => any) | undefined;
51
+ "onUpdate:width"?: ((width: number) => any) | undefined;
52
+ "onUpdate:visible"?: ((visible: boolean) => any) | undefined;
49
53
  }, {}, true, {}, {}, {
50
54
  P: {};
51
55
  B: {};
@@ -54,6 +58,8 @@ export declare const useCodeBlockEdit: (codeBlockService?: CodeBlockService) =>
54
58
  M: {};
55
59
  Defaults: {};
56
60
  }, Readonly<import("vue").ExtractPropTypes<{
61
+ width: import("vue").PropType<number>;
62
+ visible: import("vue").PropType<boolean>;
57
63
  content: {
58
64
  type: import("vue").PropType<CodeBlockContent>;
59
65
  required: true;
@@ -67,14 +73,13 @@ export declare const useCodeBlockEdit: (codeBlockService?: CodeBlockService) =>
67
73
  dataSourceType: {
68
74
  type: import("vue").PropType<string>;
69
75
  };
70
- slideType: {
71
- type: import("vue").PropType<import("..").SlideType>;
72
- };
73
76
  }>> & {
74
77
  onSubmit?: ((values: CodeBlockContent) => any) | undefined;
78
+ "onUpdate:width"?: ((width: number) => any) | undefined;
79
+ "onUpdate:visible"?: ((visible: boolean) => any) | undefined;
75
80
  }, {
76
81
  show(): Promise<void>;
77
- hide(): void;
82
+ hide(): Promise<void>;
78
83
  }, {}, {}, {}, {}> | undefined>;
79
84
  createCodeBlock: () => Promise<void>;
80
85
  editCode: (id: string) => Promise<void>;
@@ -2,6 +2,8 @@ import type { CodeBlockContent, DataSourceSchema } from '@tmagic/schema';
2
2
  export declare const useDataSourceMethod: () => {
3
3
  codeConfig: import("vue").Ref<CodeBlockContent | undefined>;
4
4
  codeBlockEditor: import("vue").Ref<import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
5
+ width: import("vue").PropType<number>;
6
+ visible: import("vue").PropType<boolean>;
5
7
  content: {
6
8
  type: import("vue").PropType<CodeBlockContent>;
7
9
  required: true;
@@ -15,17 +17,20 @@ export declare const useDataSourceMethod: () => {
15
17
  dataSourceType: {
16
18
  type: import("vue").PropType<string>;
17
19
  };
18
- slideType: {
19
- type: import("vue").PropType<import("..").SlideType>;
20
- };
21
20
  }>> & {
22
21
  onSubmit?: ((values: CodeBlockContent) => any) | undefined;
22
+ "onUpdate:width"?: ((width: number) => any) | undefined;
23
+ "onUpdate:visible"?: ((visible: boolean) => any) | undefined;
23
24
  }, {
24
25
  show(): Promise<void>;
25
- hide(): void;
26
+ hide(): Promise<void>;
26
27
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
28
+ "update:width": (width: number) => void;
29
+ "update:visible": (visible: boolean) => void;
27
30
  submit: (values: CodeBlockContent) => void;
28
31
  }, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
32
+ width: import("vue").PropType<number>;
33
+ visible: import("vue").PropType<boolean>;
29
34
  content: {
30
35
  type: import("vue").PropType<CodeBlockContent>;
31
36
  required: true;
@@ -39,11 +44,10 @@ export declare const useDataSourceMethod: () => {
39
44
  dataSourceType: {
40
45
  type: import("vue").PropType<string>;
41
46
  };
42
- slideType: {
43
- type: import("vue").PropType<import("..").SlideType>;
44
- };
45
47
  }>> & {
46
48
  onSubmit?: ((values: CodeBlockContent) => any) | undefined;
49
+ "onUpdate:width"?: ((width: number) => any) | undefined;
50
+ "onUpdate:visible"?: ((visible: boolean) => any) | undefined;
47
51
  }, {}, true, {}, {}, {
48
52
  P: {};
49
53
  B: {};
@@ -52,6 +56,8 @@ export declare const useDataSourceMethod: () => {
52
56
  M: {};
53
57
  Defaults: {};
54
58
  }, Readonly<import("vue").ExtractPropTypes<{
59
+ width: import("vue").PropType<number>;
60
+ visible: import("vue").PropType<boolean>;
55
61
  content: {
56
62
  type: import("vue").PropType<CodeBlockContent>;
57
63
  required: true;
@@ -65,14 +71,13 @@ export declare const useDataSourceMethod: () => {
65
71
  dataSourceType: {
66
72
  type: import("vue").PropType<string>;
67
73
  };
68
- slideType: {
69
- type: import("vue").PropType<import("..").SlideType>;
70
- };
71
74
  }>> & {
72
75
  onSubmit?: ((values: CodeBlockContent) => any) | undefined;
76
+ "onUpdate:width"?: ((width: number) => any) | undefined;
77
+ "onUpdate:visible"?: ((visible: boolean) => any) | undefined;
73
78
  }, {
74
79
  show(): Promise<void>;
75
- hide(): void;
80
+ hide(): Promise<void>;
76
81
  }, {}, {}, {}, {}> | undefined>;
77
82
  createCode: (model: DataSourceSchema) => Promise<void>;
78
83
  editCode: (model: DataSourceSchema, methodName: string) => Promise<void>;
@@ -0,0 +1,3 @@
1
+ export declare const useEditorContentHeight: () => {
2
+ height: import("vue").Ref<number>;
3
+ };
@@ -0,0 +1,9 @@
1
+ import { Ref } from 'vue';
2
+ import { UiService } from '../services/ui';
3
+ export declare const useNextFloatBoxPosition: (uiService?: UiService, parent?: Ref<HTMLDivElement | null>) => {
4
+ boxPosition: Ref<{
5
+ left: number;
6
+ top: number;
7
+ }>;
8
+ calcBoxPosition: () => void;
9
+ };
@@ -0,0 +1,6 @@
1
+ export declare const useWindowRect: () => {
2
+ rect: {
3
+ width: number;
4
+ height: number;
5
+ };
6
+ };
@@ -1,4 +1,4 @@
1
- import type { MenuButton, MenuComponent, SideBarData } from '../../type';
1
+ import { type MenuButton, type MenuComponent, type SideBarData } from '../../type';
2
2
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
3
3
  data: SideBarData;
4
4
  layerContentMenu: (MenuButton | MenuComponent)[];
@@ -1,11 +1,9 @@
1
1
  import type { Id } from '@tmagic/schema';
2
- import type { CodeBlockListPanelSlots, CodeDeleteErrorType, SlideType } from '../../../type';
2
+ import type { CodeBlockListPanelSlots, CodeDeleteErrorType } from '../../../type';
3
3
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToOption<{
4
4
  customError?: ((id: Id, errorType: CodeDeleteErrorType) => any) | undefined;
5
- slideType?: SlideType | undefined;
6
5
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
7
6
  customError?: ((id: Id, errorType: CodeDeleteErrorType) => any) | undefined;
8
- slideType?: SlideType | undefined;
9
7
  }>>>, {}, {}>, Readonly<CodeBlockListPanelSlots> & CodeBlockListPanelSlots>;
10
8
  export default _default;
11
9
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,29 +1,41 @@
1
- import type { SlideType } from '../../../type';
2
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
3
- title?: string | undefined;
4
- values: any;
5
- disabled: boolean;
6
- slideType?: SlideType | undefined;
7
- }>, {
1
+ declare const _default: import("vue").DefineComponent<{
2
+ visible: import("vue").PropType<boolean>;
3
+ width: import("vue").PropType<number>;
4
+ title: {
5
+ type: import("vue").PropType<string>;
6
+ };
7
+ values: {
8
+ type: import("vue").PropType<any>;
9
+ required: true;
10
+ };
11
+ disabled: {
12
+ type: import("vue").PropType<boolean>;
13
+ required: true;
14
+ };
15
+ }, {
8
16
  show(): void;
9
17
  hide(): void;
10
18
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
+ "update:width": (width: number) => void;
20
+ "update:visible": (visible: boolean) => void;
11
21
  submit: (...args: any[]) => void;
12
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
13
- title?: string | undefined;
14
- values: any;
15
- disabled: boolean;
16
- slideType?: SlideType | undefined;
17
- }>>> & {
22
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
23
+ visible: import("vue").PropType<boolean>;
24
+ width: import("vue").PropType<number>;
25
+ title: {
26
+ type: import("vue").PropType<string>;
27
+ };
28
+ values: {
29
+ type: import("vue").PropType<any>;
30
+ required: true;
31
+ };
32
+ disabled: {
33
+ type: import("vue").PropType<boolean>;
34
+ required: true;
35
+ };
36
+ }>> & {
18
37
  onSubmit?: ((...args: any[]) => any) | undefined;
38
+ "onUpdate:width"?: ((width: number) => any) | undefined;
39
+ "onUpdate:visible"?: ((visible: boolean) => any) | undefined;
19
40
  }, {}, {}>;
20
41
  export default _default;
21
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
22
- type __VLS_TypePropsToOption<T> = {
23
- [K in keyof T]-?: {} extends Pick<T, K> ? {
24
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
25
- } : {
26
- type: import('vue').PropType<T[K]>;
27
- required: true;
28
- };
29
- };
@@ -1,21 +1,8 @@
1
- import type { DataSourceListSlots, SlideType } from '../../../type';
2
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToOption<{
3
- slideType?: SlideType | undefined;
4
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
5
- slideType?: SlideType | undefined;
6
- }>>>, {}, {}>, Readonly<DataSourceListSlots> & DataSourceListSlots>;
1
+ import type { DataSourceListSlots } from '../../../type';
2
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, Readonly<DataSourceListSlots> & DataSourceListSlots>;
7
3
  export default _default;
8
4
  type __VLS_WithTemplateSlots<T, S> = T & {
9
5
  new (): {
10
6
  $slots: S;
11
7
  };
12
8
  };
13
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
14
- type __VLS_TypePropsToOption<T> = {
15
- [K in keyof T]-?: {} extends Pick<T, K> ? {
16
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
17
- } : {
18
- type: import('vue').PropType<T[K]>;
19
- required: true;
20
- };
21
- };
@@ -12,7 +12,7 @@ declare class StageOverlay extends BaseService {
12
12
  constructor();
13
13
  get<K extends keyof StageOverlayState>(name: K): StageOverlayState[K];
14
14
  set<K extends keyof StageOverlayState, T extends StageOverlayState[K]>(name: K, value: T): void;
15
- openOverlay(el: HTMLElement | undefined | null): void;
15
+ openOverlay(el: HTMLElement | null): void;
16
16
  closeOverlay(): void;
17
17
  updateOverlay(): void;
18
18
  createStage(stageOptions?: StageOptions): StageCore;
@@ -37,6 +37,12 @@ declare class Ui extends BaseService {
37
37
  width: number;
38
38
  height: number;
39
39
  };
40
+ frameworkRect: {
41
+ left: number;
42
+ top: number;
43
+ width: number;
44
+ height: number;
45
+ };
40
46
  }[K];
41
47
  zoom(zoom: number): Promise<void>;
42
48
  calcZoom(): Promise<number>;
package/types/type.d.ts CHANGED
@@ -200,6 +200,12 @@ export interface UiState {
200
200
  width: number;
201
201
  height: number;
202
202
  };
203
+ frameworkRect: {
204
+ left: number;
205
+ top: number;
206
+ width: number;
207
+ height: number;
208
+ };
203
209
  }
204
210
  export interface EditorNodeInfo {
205
211
  node: MNode | null;
@@ -323,11 +329,6 @@ export interface SideBarData {
323
329
  /** panel列表 */
324
330
  items: SideItem[];
325
331
  }
326
- /**
327
- * drawer 抽屉
328
- * box 悬浮窗
329
- */
330
- export type SlideType = 'drawer' | 'box';
331
332
  export interface ComponentItem {
332
333
  /** 显示文案 */
333
334
  text: string;