@huanban/rulego-editor-vue 1.1.2 → 1.1.3

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.
@@ -1,4 +1,4 @@
1
- import type { LocaleMessages } from '@huanban/rulego-editor-core';
1
+ import { type LocaleMessages } from '@huanban/rulego-editor-core';
2
2
  import type { EditorTranslate } from '../i18n';
3
3
  export interface ComponentField {
4
4
  name: string;
@@ -28,6 +28,7 @@ export interface ComponentSidebarProps {
28
28
  locale?: string;
29
29
  messages?: LocaleMessages;
30
30
  t?: EditorTranslate;
31
+ theme?: string;
31
32
  }
32
33
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ComponentSidebarProps>, {
33
34
  collapsed: boolean;
@@ -1,4 +1,4 @@
1
- import type { LocaleMessages } from '@huanban/rulego-editor-core';
1
+ import type { AiProviderOption, LocaleMessages } from '@huanban/rulego-editor-core';
2
2
  import type { EditorTranslate } from '../i18n';
3
3
  export type FieldOption = string | {
4
4
  label?: string;
@@ -70,6 +70,7 @@ export interface FieldDef {
70
70
  options?: FieldOption[];
71
71
  fields?: FieldDef[];
72
72
  ref?: string;
73
+ providerType?: string;
73
74
  disabled?: boolean;
74
75
  rules?: unknown[];
75
76
  }
@@ -106,13 +107,32 @@ export interface NodePropertyDrawerProps {
106
107
  apiBase?: string;
107
108
  rulePageSize?: number;
108
109
  fetchRuleChains?: (params: RuleChainFetchParams) => Promise<RuleChainFetchResult | RuleChainOptionSource[] | unknown>;
110
+ componentsPayload?: Record<string, unknown>;
111
+ componentPayload?: Record<string, unknown>;
112
+ builtinTools?: unknown[];
113
+ tools?: unknown[];
114
+ skillPath?: string;
115
+ fetchBuiltinTools?: (params: {
116
+ signal?: AbortSignal;
117
+ }) => Promise<unknown>;
118
+ onOpenAiAssistant?: (options: {
119
+ section?: string;
120
+ }) => void;
121
+ aiProviders?: AiProviderOption[];
122
+ aiEmbeddingProviders?: AiProviderOption[];
109
123
  }
110
124
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<NodePropertyDrawerProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
111
125
  submit: (model: NodeModel) => void;
112
126
  close: () => void;
127
+ openAiAssistant: (options: {
128
+ section?: string;
129
+ }) => void;
113
130
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<NodePropertyDrawerProps>>> & Readonly<{
114
131
  onClose?: (() => any) | undefined;
115
132
  onSubmit?: ((model: NodeModel) => any) | undefined;
133
+ onOpenAiAssistant?: ((options: {
134
+ section?: string;
135
+ }) => any) | undefined;
116
136
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
117
137
  declare const _default: typeof __VLS_export;
118
138
  export default _default;
@@ -16,6 +16,8 @@ export interface RuleGoEditorProps {
16
16
  className?: string;
17
17
  /** 额外内联样式 — 对齐 React 版 style prop */
18
18
  customStyle?: Record<string, string | number>;
19
+ /** 初始/受控主题;支持 default/dark/nature/elegant/tech/modern,兼容 light/blue */
20
+ theme?: string;
19
21
  /**
20
22
  * 自定义无头节点渲染器
21
23
  * 当使用 HeadlessHtmlNode 时,核心引擎会派发 `node:html-mount` 事件。
@@ -35,6 +37,7 @@ export interface RuleGoEditorRef {
35
37
  openSettings: (initialTab?: 'user' | 'setting' | 'ai' | 'skills') => void;
36
38
  openAiAssistant: (options?: AIAssistantOpenOptions) => void;
37
39
  closeAiAssistant: () => void;
40
+ setTheme: (theme: string) => void;
38
41
  }
39
42
  export declare const RuleGoEditor: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
40
43
  options: {
@@ -65,6 +68,10 @@ export declare const RuleGoEditor: import("vue").DefineComponent<import("vue").E
65
68
  type: PropType<Record<string, string | number>>;
66
69
  default: () => {};
67
70
  };
71
+ theme: {
72
+ type: StringConstructor;
73
+ default: undefined;
74
+ };
68
75
  renderNode: {
69
76
  type: PropType<(type: string, data: any, model: any) => any>;
70
77
  default: undefined;
@@ -100,6 +107,10 @@ export declare const RuleGoEditor: import("vue").DefineComponent<import("vue").E
100
107
  type: PropType<Record<string, string | number>>;
101
108
  default: () => {};
102
109
  };
110
+ theme: {
111
+ type: StringConstructor;
112
+ default: undefined;
113
+ };
103
114
  renderNode: {
104
115
  type: PropType<(type: string, data: any, model: any) => any>;
105
116
  default: undefined;
@@ -107,6 +118,7 @@ export declare const RuleGoEditor: import("vue").DefineComponent<import("vue").E
107
118
  }>> & Readonly<{}>, {
108
119
  data: RuleChainData | null;
109
120
  components: RawComponentData;
121
+ theme: string;
110
122
  options: Partial<HuanbanRulegoEditorOptions>;
111
123
  height: string | number;
112
124
  width: string | number;
@@ -0,0 +1,45 @@
1
+ import type { SchemaEditorRow } from '@huanban/rulego-editor-core';
2
+ type TranslateFn = (key: string, fallback?: string, params?: Record<string, string | number>) => string;
3
+ type __VLS_Props = {
4
+ rows: SchemaEditorRow[];
5
+ parentPath?: string;
6
+ translate: TranslateFn;
7
+ };
8
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
9
+ parentPath: string;
10
+ }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ "update-row": (parentPath: string, index: number, patch: Partial<SchemaEditorRow>) => void;
12
+ "add-row": (parentPath: string) => void;
13
+ "remove-row": (parentPath: string, index: number) => void;
14
+ "move-row": (parentPath: string, index: number, direction: 1 | -1) => void;
15
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
16
+ parentPath: string;
17
+ }>>> & Readonly<{
18
+ "onUpdate-row"?: ((parentPath: string, index: number, patch: Partial<SchemaEditorRow>) => any) | undefined;
19
+ "onAdd-row"?: ((parentPath: string) => any) | undefined;
20
+ "onRemove-row"?: ((parentPath: string, index: number) => any) | undefined;
21
+ "onMove-row"?: ((parentPath: string, index: number, direction: 1 | -1) => any) | undefined;
22
+ }>, {
23
+ parentPath: string;
24
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
25
+ declare const _default: typeof __VLS_export;
26
+ export default _default;
27
+ type __VLS_TypePropsToOption<T> = {
28
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
29
+ type: import('vue').PropType<Required<T>[K]>;
30
+ } : {
31
+ type: import('vue').PropType<T[K]>;
32
+ required: true;
33
+ };
34
+ };
35
+ type __VLS_WithDefaults<P, D> = {
36
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
37
+ default: D[K];
38
+ }> : P[K];
39
+ };
40
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
41
+ [K in keyof T]: T[K];
42
+ } : {
43
+ [K in keyof T as K]: T[K];
44
+ }) & {};
45
+ //# sourceMappingURL=ToolSchemaEditor.vue.d.ts.map
@@ -72,8 +72,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
72
72
  onError?: ((error: Error) => any) | undefined;
73
73
  onRefresh?: (() => any) | undefined;
74
74
  }>, {
75
- className: string;
76
75
  theme: WorkflowTheme;
76
+ className: string;
77
77
  defaultTab: string;
78
78
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
79
79
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -107,8 +107,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
107
107
  showCreate: boolean;
108
108
  showRefresh: boolean;
109
109
  }>>> & Readonly<{}>, {
110
- className: string;
111
110
  theme: WorkflowTheme;
111
+ className: string;
112
112
  pageSize: number;
113
113
  showSearch: boolean;
114
114
  showCreate: boolean;