@huanban/rulego-editor-core 1.1.0 → 1.1.2

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 (68) hide show
  1. package/LICENSE +190 -0
  2. package/dist/api/AIManager.d.ts +12 -0
  3. package/dist/api/ApiProvider.d.ts +83 -0
  4. package/dist/api/DebugSocketClient.d.ts +39 -0
  5. package/dist/api/RuleChainAPI.d.ts +5 -1
  6. package/dist/api/StreamParser.d.ts +13 -0
  7. package/dist/api/index.d.ts +5 -1
  8. package/dist/api/response-utils.d.ts +28 -0
  9. package/dist/api/types.d.ts +67 -0
  10. package/dist/core/AutoLayout.d.ts +1 -1
  11. package/dist/core/ComponentRegistry.d.ts +11 -1
  12. package/dist/core/EditorCore.d.ts +23 -1
  13. package/dist/core/I18nManager.d.ts +18 -0
  14. package/dist/core/Optimizations.d.ts +16 -0
  15. package/dist/core/RuleChainChatManager.d.ts +53 -0
  16. package/dist/core/component-payload.d.ts +12 -0
  17. package/dist/core/index.d.ts +4 -2
  18. package/dist/core/runtime-limits.d.ts +35 -0
  19. package/dist/defaults/components.d.ts +4 -23
  20. package/dist/defaults/official-component-fallbacks.d.ts +12 -0
  21. package/dist/extensions/ClipboardExtension.d.ts +28 -0
  22. package/dist/extensions/KeyboardExtension.d.ts +18 -0
  23. package/dist/extensions/MenuExtension.d.ts +29 -0
  24. package/dist/iconRegistry.d.ts +2 -2
  25. package/dist/index.cjs.js +5757 -922
  26. package/dist/index.d.ts +11 -6
  27. package/dist/index.esm.js +75136 -43283
  28. package/dist/index.umd.js +5757 -922
  29. package/dist/models/BaseNodeModel.d.ts +38 -0
  30. package/dist/models/index.d.ts +2 -0
  31. package/dist/nodes/AgentOrchestrationNode.d.ts +41 -0
  32. package/dist/nodes/GroupNode.d.ts +50 -0
  33. package/dist/nodes/HeadlessHtmlNode.d.ts +20 -0
  34. package/dist/nodes/SwitchNode.d.ts +27 -0
  35. package/dist/nodes/UnknownNodeModel.d.ts +24 -0
  36. package/dist/standalone/HuanbanRulegoEditor.d.ts +122 -12
  37. package/dist/standalone/ai-providers.d.ts +7 -0
  38. package/dist/standalone/auth-fetch.d.ts +6 -1
  39. package/dist/standalone/code-editor.d.ts +40 -4
  40. package/dist/standalone/custom-nodes.d.ts +4 -1
  41. package/dist/standalone/editor-context-menu.d.ts +3 -2
  42. package/dist/standalone/editor-debug-ws.d.ts +26 -6
  43. package/dist/standalone/editor-delete.d.ts +4 -0
  44. package/dist/standalone/editor-dialogs.d.ts +27 -4
  45. package/dist/standalone/editor-events.d.ts +2 -1
  46. package/dist/standalone/editor-property-drawers.d.ts +30 -2
  47. package/dist/standalone/editor-route-settings.d.ts +49 -0
  48. package/dist/standalone/editor-sidebar.d.ts +11 -0
  49. package/dist/standalone/editor-toast.d.ts +2 -0
  50. package/dist/standalone/editor-toolbar.d.ts +13 -1
  51. package/dist/standalone/group-node.d.ts +9 -1
  52. package/dist/standalone/index.d.ts +4 -2
  53. package/dist/standalone/layout-scheduler.d.ts +16 -0
  54. package/dist/standalone/lifecycle.d.ts +15 -0
  55. package/dist/standalone/models-dev-catalog.d.ts +53 -0
  56. package/dist/standalone/node-definitions.d.ts +25 -7
  57. package/dist/standalone/official-node-view-patches.d.ts +15 -0
  58. package/dist/standalone/security-utils.d.ts +45 -0
  59. package/dist/test/setup-dom.d.ts +3 -0
  60. package/dist/types/component.d.ts +10 -1
  61. package/dist/types/editor.d.ts +48 -2
  62. package/dist/types/events.d.ts +14 -0
  63. package/dist/types/rule-chain.d.ts +1 -1
  64. package/dist/utils/GraphUtils.d.ts +24 -0
  65. package/dist/utils/index.d.ts +1 -0
  66. package/dist/utils/relation-utils.d.ts +13 -0
  67. package/dist/utils/textUtils.d.ts +13 -0
  68. package/package.json +15 -13
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @file textUtils.ts
3
+ * @description 文本处理相关工具库
4
+ */
5
+ /**
6
+ * 获取字符串的字节长度
7
+ * 中文/全角字符算作 2 个长度,其他算 1 个
8
+ *
9
+ * @param str 输入字符串
10
+ * @returns 长度
11
+ */
12
+ export declare function getBytesLength(str: string): number;
13
+ //# sourceMappingURL=textUtils.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huanban/rulego-editor-core",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "RuleGo 规则链编辑器核心库 - 框架无关的 Headless 编辑器引擎 + API 抽象层 (WorkflowFetcher)",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",
@@ -8,9 +8,9 @@
8
8
  "types": "dist/index.d.ts",
9
9
  "exports": {
10
10
  ".": {
11
+ "types": "./dist/index.d.ts",
11
12
  "import": "./dist/index.esm.js",
12
- "require": "./dist/index.cjs.js",
13
- "types": "./dist/index.d.ts"
13
+ "require": "./dist/index.cjs.js"
14
14
  }
15
15
  },
16
16
  "files": [
@@ -29,16 +29,9 @@
29
29
  "directory": "packages/editor-core"
30
30
  },
31
31
  "homepage": "https://github.com/openclaw/rulego-editor#readme",
32
- "scripts": {
33
- "dev": "vite build --watch",
34
- "build": "vite build && tsc --emitDeclarationOnly --outDir dist",
35
- "test": "vitest run",
36
- "test:watch": "vitest",
37
- "lint": "tsc --noEmit",
38
- "clean": "rm -rf dist"
39
- },
40
32
  "dependencies": {
41
33
  "@codemirror/autocomplete": "^6.20.1",
34
+ "@codemirror/commands": "^6.10.3",
42
35
  "@codemirror/lang-javascript": "^6.2.5",
43
36
  "@codemirror/lang-json": "^6.0.2",
44
37
  "@codemirror/language": "^6.12.2",
@@ -49,6 +42,7 @@
49
42
  "@codemirror/view": "^6.40.0",
50
43
  "@logicflow/core": "2.1.11",
51
44
  "@logicflow/extension": "2.1.11",
45
+ "@lezer/javascript": "^1.5.4",
52
46
  "codemirror": "^6.0.2"
53
47
  },
54
48
  "devDependencies": {
@@ -69,5 +63,13 @@
69
63
  "api-client"
70
64
  ],
71
65
  "author": "HuanBan Team",
72
- "license": "Apache-2.0"
73
- }
66
+ "license": "Apache-2.0",
67
+ "scripts": {
68
+ "dev": "vite build --watch",
69
+ "build": "vite build && tsc --emitDeclarationOnly --outDir dist",
70
+ "test": "vitest run",
71
+ "test:watch": "vitest",
72
+ "lint": "tsc --noEmit",
73
+ "clean": "rm -rf dist"
74
+ }
75
+ }