@vtj/designer 0.7.30 → 0.7.32

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@vtj/designer",
3
3
  "private": false,
4
- "version": "0.7.30",
4
+ "version": "0.7.32",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "vue-tsc && vite build",
@@ -10,15 +10,17 @@
10
10
  "coverage": "vitest run --coverage"
11
11
  },
12
12
  "dependencies": {
13
- "@vtj/core": "^0.7.30",
14
- "@vtj/icons": "^0.7.30",
15
- "@vtj/renderer": "^0.7.30",
16
- "@vtj/ui": "^0.7.30",
17
- "@vtj/utils": "^0.7.30",
13
+ "@vtj/core": "^0.7.32",
14
+ "@vtj/icons": "^0.7.32",
15
+ "@vtj/renderer": "^0.7.32",
16
+ "@vtj/ui": "^0.7.32",
17
+ "@vtj/utils": "^0.7.32",
18
+ "mockjs": "~1.1.0",
18
19
  "monaco-editor": "~0.47.0"
19
20
  },
20
21
  "devDependencies": {
21
- "@vtj/cli": "^0.7.20",
22
+ "@types/mockjs": "~1.0.10",
23
+ "@vtj/cli": "^0.7.21",
22
24
  "vue": "~3.4.15",
23
25
  "vue-router": "~4.3.0"
24
26
  },
@@ -40,5 +42,5 @@
40
42
  "publishConfig": {
41
43
  "access": "public"
42
44
  },
43
- "gitHead": "229d9d4fd7c80a7400146c253a01d0c6546aa737"
45
+ "gitHead": "2b52c6e2664561d691067d48170d3837f78d5ee5"
44
46
  }
@@ -1,8 +1,8 @@
1
1
  import { Designer, VtjElement } from '../../framework';
2
- import { Dependencie, ApiSchema, NodeModel, BlockModel, DropPosition } from '@vtj/core';
2
+ import { Dependencie, ApiSchema, ProjectConfig, NodeModel, BlockModel, DropPosition } from '@vtj/core';
3
3
  import { Ref, ComputedRef } from 'vue';
4
4
 
5
- export declare function useDesigner(iframe: Ref<HTMLIFrameElement | undefined>, dependencies: Ref<Dependencie[]>, apis: Ref<ApiSchema[]>): {
5
+ export declare function useDesigner(iframe: Ref<HTMLIFrameElement | undefined>, dependencies: Ref<Dependencie[]>, apis: Ref<ApiSchema[]>, config: Ref<ProjectConfig>): {
6
6
  designer: ComputedRef< Designer | null>;
7
7
  dropping: ComputedRef<{
8
8
  style: Record<string, any>;
@@ -7,10 +7,12 @@ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRunt
7
7
  limit: number;
8
8
  }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
9
9
  change: (...args: any[]) => void;
10
+ "update:modelValue": (...args: any[]) => void;
10
11
  }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
11
12
  limit: number;
12
13
  }>>> & {
13
14
  onChange?: ((...args: any[]) => any) | undefined;
15
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
14
16
  }, {
15
17
  limit: number;
16
18
  }, {}>;
@@ -221,6 +221,7 @@ export declare const setters: {
221
221
  };
222
222
  }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
223
223
  change: (...args: any[]) => void;
224
+ "update:modelValue": (...args: any[]) => void;
224
225
  }, string, PublicProps, Readonly< ExtractPropTypes<{
225
226
  modelValue: {
226
227
  type: PropType<any>;
@@ -231,6 +232,7 @@ export declare const setters: {
231
232
  };
232
233
  }>> & {
233
234
  onChange?: ((...args: any[]) => any) | undefined;
235
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
234
236
  }, {
235
237
  limit: number;
236
238
  }, {}>;
@@ -0,0 +1,3 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
2
+ declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{}>>, {}, {}>;
3
+ export default _default;
@@ -0,0 +1,18 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
2
+ import { ApiSchema, ProjectModel } from '@vtj/core';
3
+
4
+ export interface Props {
5
+ model?: ApiSchema;
6
+ project?: ProjectModel | null;
7
+ }
8
+ declare const _default: DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>>, {}, {}>;
9
+ export default _default;
10
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
11
+ type __VLS_TypePropsToRuntimeProps<T> = {
12
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
13
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
14
+ } : {
15
+ type: PropType<T[K]>;
16
+ required: true;
17
+ };
18
+ };
@@ -0,0 +1,3 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
2
+ declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{}>>, {}, {}>;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
2
+ declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{}>>, {}, {}>;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
2
+ declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{}>>, {}, {}>;
3
+ export default _default;
@@ -12,7 +12,6 @@ export declare const widgets: {
12
12
  };
13
13
  icon: {
14
14
  type: PropType<string>;
15
- default: string;
16
15
  };
17
16
  }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
18
17
  link: {
@@ -24,11 +23,9 @@ export declare const widgets: {
24
23
  };
25
24
  icon: {
26
25
  type: PropType<string>;
27
- default: string;
28
26
  };
29
27
  }>>, {
30
28
  text: string;
31
- icon: string;
32
29
  }, {}>;
33
30
  EmptyWidget: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{}>>, {}, {}>;
34
31
  Switcher: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
@@ -117,4 +114,5 @@ export declare const widgets: {
117
114
  url: string;
118
115
  }, {}>;
119
116
  About: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{}>>, {}, {}>;
117
+ ProjectConfig: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{}>>, {}, {}>;
120
118
  };
@@ -6,13 +6,10 @@ export interface Props {
6
6
  }
7
7
  declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
8
8
  text: string;
9
- icon: string;
10
9
  }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
11
10
  text: string;
12
- icon: string;
13
11
  }>>>, {
14
12
  text: string;
15
- icon: string;
16
13
  }, {}>;
17
14
  export default _default;
18
15
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -0,0 +1,3 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
2
+ declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{}>>, {}, {}>;
3
+ export default _default;
@@ -1,7 +1,7 @@
1
1
  import { Engine } from './engine';
2
2
  import { Designer } from './designer';
3
3
  import { Renderer } from './renderer';
4
- import { Dependencie, Material, ApiSchema, Base } from '@vtj/core';
4
+ import { Dependencie, Material, ApiSchema, ProjectConfig, Base } from '@vtj/core';
5
5
  import { Ref, ShallowRef } from 'vue';
6
6
 
7
7
  declare global {
@@ -34,7 +34,7 @@ export declare class Simulator extends Base {
34
34
  engine: Engine;
35
35
  materialPath: string;
36
36
  constructor(options: SimulatorOptions);
37
- init(iframe: Ref<HTMLIFrameElement | undefined>, deps: Ref<Dependencie[]>, apis: Ref<ApiSchema[]>): void;
37
+ init(iframe: Ref<HTMLIFrameElement | undefined>, deps: Ref<Dependencie[]>, apis: Ref<ApiSchema[]>, config: Ref<ProjectConfig>): void;
38
38
  private setup;
39
39
  emitReady(libraryExports?: string[], materialExports?: string[], materialMapLibrary?: Record<string, string>): Promise<void>;
40
40
  createEnv(libraryExports?: string[], materialMapLibrary?: Record<string, string>, materials?: Material[]): SimulatorEnv;
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) 2024, VTJ.PRO All rights reserved.
3
3
  * @name @vtj/designer
4
4
  * @author CHC chenhuachun1549@dingtalk.com
5
- * @version 0.7.29
5
+ * @version 0.7.31
6
6
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
7
7
  */
8
- export declare const version = "0.7.29";
8
+ export declare const version = "0.7.31";