@huanban/rulego-editor-react 1.3.18 → 1.4.1

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 (48) hide show
  1. package/README.md +304 -10
  2. package/dist/components/AIAssistant.d.ts +1 -7
  3. package/dist/components/ComponentSidebar.d.ts +13 -52
  4. package/dist/components/ContextMenu.d.ts +1 -59
  5. package/dist/components/CopilotChat.d.ts +27 -22
  6. package/dist/components/DataViewDialog.d.ts +0 -33
  7. package/dist/components/DebugPanel.d.ts +5 -65
  8. package/dist/components/DynamicForm.d.ts +0 -40
  9. package/dist/components/EdgePropertyDrawer.d.ts +0 -35
  10. package/dist/components/EditorConnectionStatus.d.ts +12 -0
  11. package/dist/components/EditorEdgeHoverTools.d.ts +11 -0
  12. package/dist/components/EditorIcon.d.ts +7 -0
  13. package/dist/components/EditorNodeHoverTools.d.ts +16 -0
  14. package/dist/components/EditorPanelDock.d.ts +18 -0
  15. package/dist/components/EditorStatusBar.d.ts +34 -0
  16. package/dist/components/EditorToolbar.d.ts +2 -62
  17. package/dist/components/ImportExportDialog.d.ts +1 -37
  18. package/dist/components/LogViewer.d.ts +0 -29
  19. package/dist/components/MiniMap.d.ts +0 -46
  20. package/dist/components/NodePropertyDrawer.d.ts +19 -102
  21. package/dist/components/ProblemsPanel.d.ts +21 -0
  22. package/dist/components/RuleChainSettings.d.ts +0 -45
  23. package/dist/components/RuleGoEditor.d.ts +37 -147
  24. package/dist/components/RuleMaintenancePanel.d.ts +0 -1
  25. package/dist/components/SearchPanel.d.ts +0 -39
  26. package/dist/components/SearchableSelect.d.ts +0 -1
  27. package/dist/components/ValidationPanel.d.ts +0 -39
  28. package/dist/components/WorkflowExplorer.d.ts +24 -0
  29. package/dist/components/WorkflowInfoPanel.d.ts +1 -36
  30. package/dist/components/WorkflowList.d.ts +2 -69
  31. package/dist/components/WorkspaceTabs.d.ts +17 -0
  32. package/dist/components/properties/AgentOrchestrationProperties.d.ts +2 -1
  33. package/dist/hooks/useBoundStore.d.ts +8 -0
  34. package/dist/hooks/useClipboard.d.ts +2 -63
  35. package/dist/hooks/useEditorCore.d.ts +0 -79
  36. package/dist/hooks/useEditorI18n.d.ts +0 -26
  37. package/dist/hooks/useEditorPanels.d.ts +23 -0
  38. package/dist/hooks/useEditorShell.d.ts +35 -0
  39. package/dist/hooks/useEditorTheme.d.ts +0 -30
  40. package/dist/hooks/useEditorWorkspace.d.ts +25 -0
  41. package/dist/hooks/useKeyboardShortcuts.d.ts +4 -44
  42. package/dist/i18n.d.ts +6 -4
  43. package/dist/index.cjs +17 -0
  44. package/dist/index.d.ts +28 -62
  45. package/dist/index.esm.js +6235 -104685
  46. package/dist/style.css +1 -1
  47. package/package.json +13 -8
  48. package/dist/index.cjs.js +0 -9470
package/dist/index.d.ts CHANGED
@@ -1,60 +1,3 @@
1
- /**
2
- * @file index.ts
3
- * @description @huanban/rulego-editor-react 包入口 — React 适配层
4
- *
5
- * 提供:
6
- * - RuleGoEditor 主组件 (开箱即用)
7
- * - useEditorCore hook (自定义 UI 场景)
8
- * - useEditorTheme hook (主题管理)
9
- * - useEditorI18n hook (国际化)
10
- *
11
- * 兼容性:
12
- * - React 16.8+ (hooks 引入版本)
13
- * - React 17.x / 18.x / 19.x
14
- * - Next.js Pages Router (使用 dynamic import + ssr: false)
15
- * - Next.js App Router (使用 'use client' 指令)
16
- *
17
- * 使用方式 1 — 快速上手:
18
- * ```tsx
19
- * import { RuleGoEditor } from '@huanban/rulego-editor-react'
20
- * import '@huanban/rulego-editor-react/style.css'
21
- *
22
- * function App() {
23
- * return <RuleGoEditor data={chainData} onSave={handleSave} />
24
- * }
25
- * ```
26
- *
27
- * 使用方式 2 — Hooks (自定义 UI):
28
- * ```tsx
29
- * import { useEditorCore, useEditorTheme } from '@huanban/rulego-editor-react'
30
- *
31
- * function MyEditor() {
32
- * const { core, isReady, componentGroups } = useEditorCore({ url: '...' })
33
- * const { setTheme } = useEditorTheme(core)
34
- * // ...
35
- * }
36
- * ```
37
- *
38
- * Next.js Pages Router:
39
- * ```tsx
40
- * import dynamic from 'next/dynamic'
41
- * const Editor = dynamic(
42
- * () => import('@huanban/rulego-editor-react').then(m => ({ default: m.RuleGoEditor })),
43
- * { ssr: false }
44
- * )
45
- * ```
46
- *
47
- * Next.js App Router:
48
- * ```tsx
49
- * 'use client'
50
- * import { RuleGoEditor } from '@huanban/rulego-editor-react'
51
- * ```
52
- *
53
- * @see RuleGoEditor — 主编辑器组件
54
- * @see useEditorCore — 核心 Hook
55
- * @see useEditorTheme — 主题管理 Hook
56
- * @see useEditorI18n — 国际化 Hook
57
- */
58
1
  import '@logicflow/core/dist/index.css';
59
2
  import '@logicflow/extension/dist/index.css';
60
3
  import './styles/components.css';
@@ -67,9 +10,11 @@ export type { NodePropertyDrawerProps, NodeModel, NodeView, FieldDef, } from './
67
10
  export { default as EdgePropertyDrawer } from './components/EdgePropertyDrawer';
68
11
  export type { EdgePropertyDrawerProps, EdgeModel, } from './components/EdgePropertyDrawer';
69
12
  export { default as DebugPanel } from './components/DebugPanel';
70
- export type { DebugPanelProps, DebugLogItem, SendMessageResult, } from './components/DebugPanel';
13
+ export type { DebugPanelProps, DebugPanelDeployResult, DebugLogItem, SendMessageResult, } from './components/DebugPanel';
71
14
  export { default as DataViewDialog } from './components/DataViewDialog';
72
15
  export type { DataViewDialogProps } from './components/DataViewDialog';
16
+ export { EditorIcon } from './components/EditorIcon';
17
+ export type { EditorIconProps } from './components/EditorIcon';
73
18
  export { default as EditorToolbar } from './components/EditorToolbar';
74
19
  export type { EditorToolbarProps, ToolbarButton, } from './components/EditorToolbar';
75
20
  export { default as ContextMenu } from './components/ContextMenu';
@@ -77,8 +22,22 @@ export { getNodeContextMenuItems, getEdgeContextMenuItems, getCanvasContextMenuI
77
22
  export type { ContextMenuProps, ContextMenuItem, ContextMenuTarget, ContextMenuI18nOptions, } from './components/ContextMenu';
78
23
  export { default as MiniMap } from './components/MiniMap';
79
24
  export type { MiniMapProps, MiniMapNode, MiniMapViewport, } from './components/MiniMap';
25
+ export { default as WorkspaceTabs } from './components/WorkspaceTabs';
26
+ export type { WorkspaceTabsProps } from './components/WorkspaceTabs';
27
+ export { default as EditorStatusBar } from './components/EditorStatusBar';
28
+ export type { EditorStatusBarProps, EditorStatusBarGraphLike } from './components/EditorStatusBar';
29
+ export { default as EditorConnectionStatus } from './components/EditorConnectionStatus';
30
+ export type { EditorConnectionStatusProps } from './components/EditorConnectionStatus';
31
+ export { default as EditorPanelDock } from './components/EditorPanelDock';
32
+ export type { EditorPanelDockProps } from './components/EditorPanelDock';
33
+ export { default as EditorNodeHoverTools } from './components/EditorNodeHoverTools';
34
+ export type { EditorNodeHoverToolsProps } from './components/EditorNodeHoverTools';
35
+ export { default as EditorEdgeHoverTools } from './components/EditorEdgeHoverTools';
36
+ export type { EditorEdgeHoverToolsProps } from './components/EditorEdgeHoverTools';
80
37
  export { default as ValidationPanel } from './components/ValidationPanel';
81
38
  export type { ValidationPanelProps, ValidationItem, } from './components/ValidationPanel';
39
+ export { default as ProblemsPanel } from './components/ProblemsPanel';
40
+ export type { ProblemsPanelProps } from './components/ProblemsPanel';
82
41
  export { default as RuleChainSettings } from './components/RuleChainSettings';
83
42
  export type { RuleChainSettingsProps, RuleChainSettingsData, } from './components/RuleChainSettings';
84
43
  export { SearchableSelect } from './components/SearchableSelect';
@@ -89,12 +48,14 @@ export { default as SearchPanel } from './components/SearchPanel';
89
48
  export type { SearchPanelProps, SearchResultItem, } from './components/SearchPanel';
90
49
  export { WorkflowList } from './components/WorkflowList';
91
50
  export type { WorkflowListProps } from './components/WorkflowList';
51
+ export { WorkflowExplorer } from './components/WorkflowExplorer';
52
+ export type { WorkflowExplorerProps } from './components/WorkflowExplorer';
92
53
  export { WorkflowInfoPanel } from './components/WorkflowInfoPanel';
93
54
  export type { WorkflowInfoPanelProps, ExtraTab } from './components/WorkflowInfoPanel';
94
55
  export { RuleMaintenancePanel } from './components/RuleMaintenancePanel';
95
56
  export type { RuleMaintenancePanelProps } from './components/RuleMaintenancePanel';
96
57
  export { CopilotChat } from './components/CopilotChat';
97
- export type { CopilotChatProps } from './components/CopilotChat';
58
+ export type { CopilotChatPersistence, CopilotChatProps, CopilotChatViewMessage } from './components/CopilotChat';
98
59
  export { AIAssistant } from './components/AIAssistant';
99
60
  export type { AIAssistantProps } from './components/AIAssistant';
100
61
  export { DynamicForm } from './components/DynamicForm';
@@ -111,8 +72,13 @@ export { createFrameworkTranslator, normalizeFrameworkLocale, relationTypeLabel,
111
72
  export type { EditorTranslate, FrameworkI18nProps, } from './i18n';
112
73
  export { useKeyboardShortcuts, getShortcutLabel, getDefaultEditorShortcuts, } from './hooks/useKeyboardShortcuts';
113
74
  export type { ShortcutConfig, UseKeyboardShortcutsOptions, } from './hooks/useKeyboardShortcuts';
75
+ export { useEditorWorkspace } from './hooks/useEditorWorkspace';
76
+ export type { UseEditorWorkspaceReturn, UseEditorWorkspaceOptions } from './hooks/useEditorWorkspace';
77
+ export { useConnectionStatus, useEditorDock, useServerStatus } from './hooks/useEditorShell';
78
+ export type { UseConnectionStatusOptions, UseConnectionStatusReturn, UseEditorDockOptions, UseEditorDockReturn, UseServerStatusOptions, UseServerStatusReturn, } from './hooks/useEditorShell';
79
+ export { useEditorPanels } from './hooks/useEditorPanels';
80
+ export type { UseEditorPanelsOptions, UseEditorPanelsReturn } from './hooks/useEditorPanels';
114
81
  export { useClipboard } from './hooks/useClipboard';
115
82
  export type { ClipboardNode, ClipboardCallbacks, ClipboardManager, } from './hooks/useClipboard';
116
- export type { EditorOptions, RuleChainData, RuleChainConfig, RuleNodeConfig, RuleConnectionConfig, RuleEndpointConfig, ComponentDefinition, ComponentGroup, ComponentField, EditorEventMap, EditorEventName, WorkflowItem, PagedResponse, ApiResult, WorkflowFetcher, RuleChainAPIOptions, RuleChainRoutes, WorkflowListIcons, WorkflowInfoIcons, WorkflowTheme, AIAssistantOpenOptions, } from '@huanban/rulego-editor-core';
117
- export { RuleChainAPI, DEFAULT_ROUTES } from '@huanban/rulego-editor-core';
118
- //# sourceMappingURL=index.d.ts.map
83
+ export type { EditorOptions, RuleChainData, RuleChainConfig, RuleNodeConfig, RuleConnectionConfig, RuleEndpointConfig, ComponentDefinition, ComponentGroup, ComponentField, EditorEventMap, EditorEventName, WorkflowItem, PagedResponse, ListAllResult, ApiResult, WorkflowFetcher, RuleChainAPIOptions, RuleChainRoutes, WorkflowListIcons, WorkflowInfoIcons, WorkflowTheme, AIAssistantOpenOptions, ComponentManageDialogTab, SettingsDialogTab, SharedNode, SharedNodeFetcher, EditorChatHistoryMode, EditorPersistenceAdapter, EditorPersistenceNamespace, EditorWorkspaceTab, EditorWorkspaceState, WorkspaceListener, OpenWorkspaceTabInput, CloseWorkspaceTabOptions, CloseWorkspaceTabResult, WorkspaceConflictResolution, WorkspaceConflictResult, EditorDockId, EditorWidthDockId, EditorWidthDockState, EditorHeightDockState, EditorDockState, EditorDockOptions, EditorDockBounds, EditorPanelId, EditorPanelDefinition, EditorPanelState, EditorPanelRegistry, EditorPanelRegistryOptions, ServerStatus, ServerApiStatus, ServerWsStatus, ServerWsEventStatus, ServerStatusState, ServerStatusOptions, ConnectionStatusControllerOptions, ConnectionStatusMap, ConnectionStatusPhase, ConnectionStatusProvider, ConnectionStatusState, ConnectionStatusView, NodeConnectionState, NodeConnectionStatus, } from '@huanban/rulego-editor-core';
84
+ export { RuleChainAPI, DEFAULT_ROUTES, ConnectionStatusController, ConnectionStatusStore, normalizeConnectionStatusMap, resolveConnectionStatusView, } from '@huanban/rulego-editor-core';