@vtj/designer 0.13.24 → 0.13.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.
Files changed (34) hide show
  1. package/dist/Editor-CDMLuXiC.js +4 -0
  2. package/dist/index-C-YTrhCA.js +31541 -0
  3. package/dist/index.mjs +53 -52
  4. package/dist/style.css +1 -1
  5. package/package.json +11 -8
  6. package/types/components/hooks/index.d.ts +2 -0
  7. package/types/components/hooks/useDesigner.d.ts +9 -1
  8. package/types/components/hooks/useDevtools.d.ts +9 -0
  9. package/types/components/hooks/useHotkeys.d.ts +38 -0
  10. package/types/components/shared/panel.d.ts +2 -2
  11. package/types/components/shared/viewport.d.ts +4 -2
  12. package/types/components/widgets/actions/index.d.ts +6 -2
  13. package/types/components/widgets/ai/index.d.ts +5 -5
  14. package/types/components/widgets/ai/json-input.d.ts +2 -2
  15. package/types/components/widgets/apis/form.d.ts +10 -7
  16. package/types/components/widgets/designer/index.d.ts +70 -1
  17. package/types/components/widgets/devtools/index.d.ts +1176 -0
  18. package/types/components/widgets/docs/index.d.ts +5 -5
  19. package/types/components/widgets/history/index.d.ts +3 -1
  20. package/types/components/widgets/hotkeys/index.d.ts +3 -0
  21. package/types/components/widgets/index.d.ts +1267 -20
  22. package/types/components/widgets/market/index.d.ts +5 -5
  23. package/types/components/widgets/scripts/group.d.ts +2 -2
  24. package/types/constants.d.ts +3 -0
  25. package/types/framework/designer.d.ts +1 -3
  26. package/types/framework/index.d.ts +0 -1
  27. package/types/framework/simulator.d.ts +3 -3
  28. package/types/framework/state.d.ts +1 -0
  29. package/types/framework/types.d.ts +3 -1
  30. package/types/version.d.ts +2 -2
  31. package/types/wrappers/setter.d.ts +1 -1
  32. package/dist/Editor-CLb3krdP.js +0 -4
  33. package/dist/index-4n90R5tK.js +0 -25611
  34. package/types/framework/devtools.d.ts +0 -28
@@ -20,8 +20,8 @@ declare const _default: DefineComponent<{}, {
20
20
  readonly header?: boolean | undefined;
21
21
  readonly collapsable?: boolean | undefined;
22
22
  readonly menus?: ActionMenuItem[] | undefined;
23
- readonly onCommand?: ((...args: any[]) => any) | undefined;
24
23
  readonly onRefresh?: ((...args: any[]) => any) | undefined;
24
+ readonly onCommand?: ((...args: any[]) => any) | undefined;
25
25
  readonly onPlus?: ((...args: any[]) => any) | undefined;
26
26
  readonly onBack?: ((...args: any[]) => any) | undefined;
27
27
  readonly onEdit?: ((...args: any[]) => any) | undefined;
@@ -606,11 +606,11 @@ declare const _default: DefineComponent<{}, {
606
606
  $root: ComponentPublicInstance | null;
607
607
  $parent: ComponentPublicInstance | null;
608
608
  $host: Element | null;
609
- $emit: ((event: "command", ...args: any[]) => void) & ((event: "refresh", ...args: any[]) => void) & ((event: "plus", ...args: any[]) => void) & ((event: "back", ...args: any[]) => void) & ((event: "edit", ...args: any[]) => void) & ((event: "remove", ...args: any[]) => void) & ((event: "save", ...args: any[]) => void);
609
+ $emit: ((event: "refresh", ...args: any[]) => void) & ((event: "command", ...args: any[]) => void) & ((event: "plus", ...args: any[]) => void) & ((event: "back", ...args: any[]) => void) & ((event: "edit", ...args: any[]) => void) & ((event: "remove", ...args: any[]) => void) & ((event: "save", ...args: any[]) => void);
610
610
  $el: any;
611
611
  $options: ComponentOptionsBase<Readonly< Props> & Readonly<{
612
- onCommand?: ((...args: any[]) => any) | undefined;
613
612
  onRefresh?: ((...args: any[]) => any) | undefined;
613
+ onCommand?: ((...args: any[]) => any) | undefined;
614
614
  onPlus?: ((...args: any[]) => any) | undefined;
615
615
  onBack?: ((...args: any[]) => any) | undefined;
616
616
  onEdit?: ((...args: any[]) => any) | undefined;
@@ -622,8 +622,8 @@ declare const _default: DefineComponent<{}, {
622
622
  autoScrollToBottom: (diff?: number) => void;
623
623
  scrollToTop: () => void;
624
624
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
625
- command: (...args: any[]) => void;
626
625
  refresh: (...args: any[]) => void;
626
+ command: (...args: any[]) => void;
627
627
  plus: (...args: any[]) => void;
628
628
  back: (...args: any[]) => void;
629
629
  edit: (...args: any[]) => void;
@@ -656,8 +656,8 @@ declare const _default: DefineComponent<{}, {
656
656
  menus: ActionMenuItem[];
657
657
  header: boolean;
658
658
  }> & Omit<Readonly< Props> & Readonly<{
659
- onCommand?: ((...args: any[]) => any) | undefined;
660
659
  onRefresh?: ((...args: any[]) => any) | undefined;
660
+ onCommand?: ((...args: any[]) => any) | undefined;
661
661
  onPlus?: ((...args: any[]) => any) | undefined;
662
662
  onBack?: ((...args: any[]) => any) | undefined;
663
663
  onEdit?: ((...args: any[]) => any) | undefined;
@@ -55,9 +55,9 @@ declare function __VLS_template(): {
55
55
  readonly size?: BaseSize | undefined;
56
56
  readonly name?: string | undefined;
57
57
  readonly props?: Record<string, any> | undefined;
58
+ readonly error?: string | undefined;
58
59
  readonly width?: string | number | undefined;
59
60
  readonly label?: string | undefined;
60
- readonly error?: string | undefined;
61
61
  readonly options?: FieldOption[] | FieldOptionsLoader | undefined;
62
62
  readonly disabled?: boolean | undefined;
63
63
  readonly placeholder?: string | null | undefined;
@@ -611,9 +611,9 @@ declare const __VLS_component: DefineComponent<Props, {}, {}, {}, {}, ComponentO
611
611
  readonly size?: BaseSize | undefined;
612
612
  readonly name?: string | undefined;
613
613
  readonly props?: Record<string, any> | undefined;
614
+ readonly error?: string | undefined;
614
615
  readonly width?: string | number | undefined;
615
616
  readonly label?: string | undefined;
616
- readonly error?: string | undefined;
617
617
  readonly options?: FieldOption[] | FieldOptionsLoader | undefined;
618
618
  readonly disabled?: boolean | undefined;
619
619
  readonly placeholder?: string | null | undefined;
@@ -1,3 +1,4 @@
1
+ import { Dependencie } from '@vtj/core';
1
2
  export declare const MOBILE_SIZE: {
2
3
  width: number;
3
4
  height: number;
@@ -48,3 +49,5 @@ export declare const SESSION_ID_KEY = "SESSION_ID__";
48
49
  export declare const STATE_KEY = "ENGINE_STATE__";
49
50
  export declare const MAX_TOKENS: number;
50
51
  export declare const GET_TOKENS_LINK = "https://lcdp.vtj.pro/page/17ikytmh";
52
+ export declare const HOT_KEYS_DEP: Dependencie;
53
+ export declare const DEVTOOLS_DEP: Dependencie;
@@ -2,7 +2,6 @@ import { Ref, ShallowRef } from 'vue';
2
2
  import { Context } from '@vtj/renderer';
3
3
  import { Dependencie, DropPosition, MaterialDescription, MaterialSlot, NodeModel, BlockModel } from '@vtj/core';
4
4
  import { Engine } from './engine';
5
- import { DevTools } from './devtools';
6
5
  export declare function createSlotsPicker(name: string, slots: MaterialSlot[]): Promise<MaterialSlot>;
7
6
  export interface VtjElement extends HTMLElement {
8
7
  __vtj__?: string;
@@ -19,7 +18,6 @@ export declare class Designer {
19
18
  engine: Engine;
20
19
  contentWindow: Window;
21
20
  dependencies: Ref<Dependencie[]>;
22
- devtools: DevTools;
23
21
  private proxied;
24
22
  document: Document | null;
25
23
  hover: ShallowRef<DesignHelper | null>;
@@ -28,7 +26,7 @@ export declare class Designer {
28
26
  dragging: MaterialDescription | null;
29
27
  draggingNode: NodeModel | null;
30
28
  lines: ShallowRef<DOMRect[]>;
31
- constructor(engine: Engine, contentWindow: Window, dependencies: Ref<Dependencie[]>, devtools: DevTools);
29
+ constructor(engine: Engine, contentWindow: Window, dependencies: Ref<Dependencie[]>);
32
30
  private bind;
33
31
  private bindEvents;
34
32
  private unbindEvents;
@@ -4,6 +4,5 @@ export * from './assets';
4
4
  export * from './simulator';
5
5
  export * from './renderer';
6
6
  export * from './designer';
7
- export * from './devtools';
8
7
  export * from './openapi';
9
8
  export * from './state';
@@ -4,13 +4,14 @@ import { Provider } from '@vtj/renderer';
4
4
  import { Renderer } from './renderer';
5
5
  import { Designer } from './designer';
6
6
  import { Engine } from './engine';
7
- import { DevTools } from './devtools';
8
7
  declare global {
9
8
  interface Window {
10
9
  __simulator__: Simulator;
11
10
  Vue?: any;
12
11
  VueRouter?: any;
13
12
  ElementPlus?: any;
13
+ hotkeys?: any;
14
+ VueDevtools?: any;
14
15
  }
15
16
  }
16
17
  export interface SimulatorEnv {
@@ -39,12 +40,11 @@ export declare class Simulator extends Base {
39
40
  engine: Engine;
40
41
  materialPath: string;
41
42
  rendered: Ref<symbol>;
42
- devtools: DevTools;
43
43
  enhance?: EnhanceConfig;
44
44
  constructor(options: SimulatorOptions);
45
45
  init(iframe: Ref<HTMLIFrameElement | undefined>, deps: Ref<Dependencie[]>, apis: Ref<ApiSchema[]>, meta: Ref<MetaSchema[]>, config: Ref<ProjectConfig>, uniConfig: Ref<UniConfig>, global: Ref<GlobalConfig>, i18n: Ref<I18nConfig>): void;
46
46
  private createGlobalCss;
47
- private initUniFeatures;
47
+ private initFeatures;
48
48
  private setup;
49
49
  emitReady(libraryExports?: string[], materialExports?: string[], materialMapLibrary?: Record<string, string>, libraryLocaleMap?: Record<string, string>): Promise<void>;
50
50
  createEnv(libraryExports?: string[], materialMapLibrary?: Record<string, string>, materials?: Material[], libraryLocaleMap?: Record<string, string>): SimulatorEnv;
@@ -43,6 +43,7 @@ export declare class State {
43
43
  private __state;
44
44
  private __isDark;
45
45
  constructor();
46
+ private saveDevtoolsTheme;
46
47
  reset(): void;
47
48
  private save;
48
49
  get outlineEnabled(): any;
@@ -6,7 +6,9 @@ export type VueComponent = Record<string, any> | VNode | DefineComponent<any, an
6
6
  */
7
7
  export declare enum WidgetGroup {
8
8
  Block = "block",
9
- Node = "node"
9
+ Node = "node",
10
+ Left = "left",
11
+ Right = "right"
10
12
  }
11
13
  /**
12
14
  * 区域类型
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) 2025, VTJ.PRO All rights reserved.
3
3
  * @name @vtj/designer
4
4
  * @author CHC chenhuachun1549@dingtalk.com
5
- * @version 0.13.23
5
+ * @version 0.13.25
6
6
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
7
7
  */
8
- export declare const version = "0.13.23";
8
+ export declare const version = "0.13.25";
@@ -94,11 +94,11 @@ export declare const SetterWrapper: DefineComponent<ExtractPropTypes<{
94
94
  onRemove?: ((...args: any[]) => any) | undefined;
95
95
  }>, {
96
96
  value: string | number | boolean | Record<string, any> | unknown[];
97
+ current: BlockModel | null;
97
98
  context: Context | null;
98
99
  setters: string | MaterialSetter | (string | MaterialSetter)[];
99
100
  options: unknown[];
100
101
  disabled: boolean;
101
- current: BlockModel | null;
102
102
  removable: boolean;
103
103
  variable: boolean;
104
104
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
@@ -1,4 +0,0 @@
1
- import { _ as f } from "./index-4n90R5tK.js";
2
- export {
3
- f as default
4
- };