@huanban/rulego-editor-core 1.3.10 → 1.3.12

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.
@@ -168,12 +168,16 @@ export interface HuanbanRulegoEditorOptions {
168
168
  initialTab?: SettingsDialogTab;
169
169
  apiBase?: string;
170
170
  baseUrl?: string;
171
+ browserConsoleLog?: boolean;
171
172
  }) => void;
172
173
  /** 内置设置弹窗保存系统设置后触发 */
173
174
  onSettingsSubmit?: (data: {
174
175
  apiBase: string;
175
176
  baseUrl: string;
177
+ browserConsoleLog?: boolean;
176
178
  }) => void;
179
+ /** 示例/宿主调试日志是否允许输出到浏览器 console;核心仅在设置弹窗中透传该偏好 */
180
+ browserConsoleLog?: boolean;
177
181
  /** 内置设置弹窗点击登录时触发;未提供时仅提示宿主接入 */
178
182
  onLoginClick?: () => void;
179
183
  /** 是否在工具栏显示「导出」按钮, 默认 true (已有导出功能则显示增强弹窗) */
@@ -554,22 +558,22 @@ export declare class HuanbanRulegoEditor {
554
558
  */
555
559
  private _autoLoadComponents;
556
560
  /**
557
- * 通用数据请求方法 — 优先从 API 加载, 失败自动回退到 mock 文件
561
+ * 通用数据请求方法 — 只从真实 API 加载,失败直接 reject。
558
562
  *
559
563
  * @param apiBase - API 基础地址 (如 'http://127.0.0.1:9090/api/v1')
560
564
  * @param path - 请求路径 (如 '/components')
561
- * @param mockFile - 本地 mock 文件路径 (如 'mock/components.json')
565
+ * @param legacyFallbackFile - 旧版本兼容参数,当前不再读取本地替代数据
562
566
  * @param timeout - 超时毫秒数, 默认 5000
563
567
  * @param headers - 可选的自定义请求头 (如认证 Token)
564
568
  * @returns Promise<any> 解析后的 JSON 数据
565
569
  *
566
570
  * @example
567
571
  * ```js
568
- * HuanbanRulegoEditor.fetchData('http://api.example.com', '/components', 'mock/components.json')
572
+ * HuanbanRulegoEditor.fetchData('http://api.example.com/api/v1', '/components')
569
573
  * .then(data => console.log(data))
570
574
  * ```
571
575
  */
572
- static fetchData(apiBase: string, path: string, mockFile: string, timeout?: number, headers?: Record<string, string>): Promise<unknown>;
576
+ static fetchData(apiBase: string, path: string, legacyFallbackFile?: string, timeout?: number, headers?: Record<string, string>): Promise<unknown>;
573
577
  /**
574
578
  * 开启/关闭编辑器内部调试日志
575
579
  *
@@ -0,0 +1,3 @@
1
+ export declare const HUANBAN_RULEGO_EDITOR_VERSION = "1.3.12";
2
+ export declare const EDITOR_VERSION = "1.3.12";
3
+ //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huanban/rulego-editor-core",
3
- "version": "1.3.10",
3
+ "version": "1.3.12",
4
4
  "description": "RuleGo 规则链编辑器核心库 - 框架无关的 Headless 编辑器引擎 + API 抽象层 (WorkflowFetcher)",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",