@huanban/rulego-editor-core 1.4.2 → 2.0.0
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.
- package/README.md +20 -8
- package/dist/ai/ai-chat-options.d.ts +12 -0
- package/dist/api/AIAssistantAPI.d.ts +29 -0
- package/dist/api/AIManager.d.ts +7 -1
- package/dist/api/ApiProvider.d.ts +17 -4
- package/dist/api/DebugSocketClient.d.ts +2 -0
- package/dist/api/GlobalConfigAPI.d.ts +35 -0
- package/dist/api/IoTPointTemplateAPI.d.ts +32 -0
- package/dist/api/MarketplaceAPI.d.ts +39 -0
- package/dist/api/RuleChainAPI.d.ts +23 -4
- package/dist/api/RuleChainVersionsAPI.d.ts +28 -0
- package/dist/api/SkillsAPI.d.ts +31 -0
- package/dist/api/UserAPI.d.ts +39 -0
- package/dist/api/extended-api-shared.d.ts +25 -0
- package/dist/api/index.d.ts +19 -2
- package/dist/api/public-api.test-d.d.ts +87 -0
- package/dist/api/response-utils.d.ts +1 -0
- package/dist/api/types.d.ts +86 -14
- package/dist/chunks/editor-core-api-BQiYFuIO.js +1157 -0
- package/dist/chunks/editor-core-canvas-nodes-BE9eN51s.js +6921 -0
- package/dist/chunks/editor-core-code-editor-DFm5Owtv.js +660 -0
- package/dist/chunks/{editor-core-default-components-BjF65lar.js → editor-core-default-components-BsNP8ma1.js} +98 -98
- package/dist/chunks/editor-core-dialogs-D9YHvzys.js +12009 -0
- package/dist/chunks/{editor-core-locales-i6o28vm2.js → editor-core-locales-CsqTh7Wh.js} +1723 -11
- package/dist/chunks/{editor-core-node-patches-BJTT3TuX.js → editor-core-node-patches-Dbi8XYxu.js} +633 -184
- package/dist/chunks/{editor-core-node-views-BOaPVdmN.js → editor-core-node-views-C8FQYC3E.js} +39 -29
- package/dist/chunks/editor-core-property-drawers-Bqmp9B_J.js +9562 -0
- package/dist/chunks/editor-core-settings-DcGCJSc7.js +4161 -0
- package/dist/chunks/editor-core-standalone-C7pzm8ZB.js +10013 -0
- package/dist/chunks/{editor-core-styles-DFhXz0vB.js → editor-core-styles-CwjFPfAo.js} +967 -510
- package/dist/chunks/vendor-highlight-acC2fLd8.js +5868 -0
- package/dist/chunks/vendor-logicflow-core-runtime-DpsWXOGl.js +4 -0
- package/dist/chunks/vendor-logicflow-shared-C_kIdBKO.js +4 -0
- package/dist/core/ActionRegistry.d.ts +4 -2
- package/dist/core/DataAdapter.d.ts +17 -1
- package/dist/core/DialogProvider.d.ts +33 -0
- package/dist/core/EditorCore.d.ts +16 -3
- package/dist/core/FieldCapabilityRegistry.d.ts +4 -1
- package/dist/core/FieldChangeRegistry.d.ts +3 -1
- package/dist/core/I18nManager.d.ts +1 -1
- package/dist/core/IdentityProvider.d.ts +32 -0
- package/dist/core/OptionSourceRegistry.d.ts +4 -1
- package/dist/core/PropertyControlRegistry.d.ts +29 -0
- package/dist/core/ThemeManager.d.ts +7 -0
- package/dist/core/anchored-popover.d.ts +16 -0
- package/dist/core/assistant-dsl.d.ts +18 -0
- package/dist/core/business-log-config.d.ts +18 -0
- package/dist/core/clean-snapshot.d.ts +14 -0
- package/dist/core/component-localization.d.ts +17 -0
- package/dist/core/component-palette.d.ts +3 -0
- package/dist/core/connection-status.d.ts +11 -0
- package/dist/core/dialog-styles.d.ts +1 -0
- package/dist/core/editor-capabilities.d.ts +82 -1
- package/dist/core/editor-edge-anchors.d.ts +16 -0
- package/dist/core/endpoint-protocol.d.ts +15 -0
- package/dist/core/expression-preview.d.ts +6 -0
- package/dist/core/field-protocol.d.ts +19 -4
- package/dist/core/global-config.d.ts +47 -0
- package/dist/core/global-search.d.ts +31 -0
- package/dist/core/group-protocol.d.ts +56 -0
- package/dist/core/identity-provider-default.d.ts +32 -0
- package/dist/core/index.d.ts +31 -5
- package/dist/core/keymap.d.ts +10 -0
- package/dist/core/payload-kv.d.ts +7 -0
- package/dist/core/rule-chain-versions.d.ts +143 -0
- package/dist/core/run-analysis.d.ts +126 -0
- package/dist/core/runtime-field-dictionary.d.ts +3 -0
- package/dist/core/save-conflict.d.ts +1 -0
- package/dist/core/server-status.d.ts +1 -0
- package/dist/core/toolbar-icons.d.ts +1 -1
- package/dist/core/variable-completion.d.ts +13 -0
- package/dist/core/websocket-auth.d.ts +2 -0
- package/dist/defaults/analysis-locales.d.ts +241 -0
- package/dist/defaults/component-locale-categories.d.ts +14 -0
- package/dist/defaults/component-locale-data.d.ts +4 -0
- package/dist/defaults/component-locale-en-US.d.ts +10 -0
- package/dist/defaults/component-locale-summaries.d.ts +15 -0
- package/dist/defaults/component-locale-zh-CN.d.ts +10 -0
- package/dist/defaults/editor-shell-locales.d.ts +290 -0
- package/dist/defaults/example-chain.d.ts +2 -0
- package/dist/defaults/field-interaction-locales.d.ts +19 -0
- package/dist/defaults/global-config-locales.d.ts +166 -0
- package/dist/defaults/official-component-fallbacks.d.ts +2 -1
- package/dist/defaults/point-template-locales.d.ts +64 -0
- package/dist/index.cjs +2856 -2086
- package/dist/index.d.ts +33 -10
- package/dist/index.esm.js +1182 -810
- package/dist/index.umd.js +2850 -2080
- package/dist/nodes/UnknownNodeModel.d.ts +12 -1
- package/dist/standalone/HuanbanRulegoEditor.d.ts +145 -13
- package/dist/standalone/auth-fetch.d.ts +1 -0
- package/dist/standalone/auth-ui-defaults.d.ts +15 -0
- package/dist/standalone/code-editor.d.ts +7 -5
- package/dist/standalone/connection-status-binding.d.ts +3 -2
- package/dist/standalone/custom-nodes.d.ts +13 -0
- package/dist/standalone/drawer-locale.d.ts +12 -0
- package/dist/standalone/drawer-unsaved-guard.d.ts +6 -1
- package/dist/standalone/dynamic-field-browse.d.ts +25 -0
- package/dist/standalone/edge-label-quick-editor.d.ts +2 -1
- package/dist/standalone/editor-actions.d.ts +1 -0
- package/dist/standalone/editor-canvas-anchors.d.ts +19 -0
- package/dist/standalone/editor-canvas-shortcuts.d.ts +1 -0
- package/dist/standalone/editor-chain-info.d.ts +1 -0
- package/dist/standalone/editor-debug-data.d.ts +18 -0
- package/dist/standalone/editor-debug-ws.d.ts +2 -0
- package/dist/standalone/editor-delete.d.ts +5 -3
- package/dist/standalone/editor-dialog-provider.d.ts +3 -0
- package/dist/standalone/editor-dialogs.d.ts +25 -2
- package/dist/standalone/editor-global-config.d.ts +44 -0
- package/dist/standalone/editor-group-interactions.d.ts +1 -0
- package/dist/standalone/editor-host-region-styles.d.ts +1 -0
- package/dist/standalone/editor-host-regions.d.ts +53 -0
- package/dist/standalone/editor-login.d.ts +15 -0
- package/dist/standalone/editor-overlays.d.ts +5 -0
- package/dist/standalone/editor-property-drawers.d.ts +3 -1
- package/dist/standalone/editor-run-analysis.d.ts +81 -0
- package/dist/standalone/editor-run-compare.d.ts +20 -0
- package/dist/standalone/editor-run-waterfall.d.ts +11 -0
- package/dist/standalone/editor-toast.d.ts +1 -1
- package/dist/standalone/editor-toolbar-presentation.d.ts +12 -0
- package/dist/standalone/editor-toolbar.d.ts +5 -1
- package/dist/standalone/editor-ui-configuration.d.ts +55 -0
- package/dist/standalone/editor-ui-settings.d.ts +26 -0
- package/dist/standalone/editor-user-menu.d.ts +8 -0
- package/dist/standalone/editor-version-history.d.ts +82 -0
- package/dist/standalone/editor-workspace-shell.d.ts +47 -0
- package/dist/standalone/editor-workspace-styles.d.ts +1 -0
- package/dist/standalone/field-expression-preview.d.ts +12 -0
- package/dist/standalone/group-node.d.ts +19 -3
- package/dist/standalone/icon-utils.d.ts +7 -0
- package/dist/standalone/index.d.ts +17 -5
- package/dist/standalone/keyboard-events.d.ts +3 -0
- package/dist/standalone/multi-select-popover.d.ts +16 -0
- package/dist/standalone/node-copy.d.ts +1 -0
- package/dist/standalone/node-definitions.d.ts +4 -0
- package/dist/standalone/node-renderer-utils.d.ts +21 -0
- package/dist/standalone/node-theme.d.ts +1 -1
- package/dist/standalone/point-template-actions.d.ts +43 -0
- package/dist/standalone/property-field-draft.d.ts +5 -0
- package/dist/standalone/question-list-editor.d.ts +35 -0
- package/dist/standalone/shared-node-manager.d.ts +14 -0
- package/dist/standalone/single-select-popover.d.ts +6 -0
- package/dist/standalone/theme-scope.d.ts +15 -0
- package/dist/standalone/themes.d.ts +4 -0
- package/dist/standalone/variable-completion-dropdown.d.ts +18 -0
- package/dist/types/component.d.ts +22 -1
- package/dist/types/editor.d.ts +41 -0
- package/dist/utils/relation-utils.d.ts +19 -1
- package/dist/version.d.ts +2 -2
- package/package.json +3 -3
- package/vite-chunks.mjs +66 -0
- package/dist/chunks/editor-core-code-editor-CRki2wA_.js +0 -512
- package/dist/chunks/editor-core-dialogs-BMWb0WRN.js +0 -17228
- package/dist/chunks/editor-core-property-drawers-BPh-jj1b.js +0 -7998
- package/dist/chunks/editor-core-standalone-Cls7lcgT.js +0 -11302
- package/dist/chunks/vendor-logicflow-core-runtime-Cp6IBEjB.js +0 -217
- package/dist/chunks/vendor-logicflow-shared-C7YynLDn.js +0 -4
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { BaseNodeModel } from '../models/BaseNodeModel';
|
|
2
2
|
export declare class UnknownNodeModel extends BaseNodeModel {
|
|
3
3
|
setAttributes(): void;
|
|
4
|
-
getNodeStyle():
|
|
4
|
+
getNodeStyle(): {
|
|
5
|
+
[x: string]: unknown;
|
|
6
|
+
fill?: string | undefined;
|
|
7
|
+
stroke?: string | undefined;
|
|
8
|
+
strokeWidth?: number | undefined;
|
|
9
|
+
radius?: number | undefined;
|
|
10
|
+
rx?: number | undefined;
|
|
11
|
+
ry?: number | undefined;
|
|
12
|
+
width?: number | undefined;
|
|
13
|
+
height?: number | undefined;
|
|
14
|
+
path?: string | undefined;
|
|
15
|
+
};
|
|
5
16
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import LogicFlow from '@logicflow/core';
|
|
2
2
|
import { EditorCore } from '../core/EditorCore';
|
|
3
|
-
import {
|
|
3
|
+
import type { DebugWebSocketOptions } from './editor-debug-ws';
|
|
4
|
+
import { I18nManager, type LocaleMessages } from '../core/I18nManager';
|
|
4
5
|
import { EditorDockStore } from '../core/editor-dock';
|
|
5
|
-
import type { EditorDockPersistenceState, EditorPersistenceAdapter, EditorPersistenceMigrationContext, EditorPersistenceNamespace } from '../core/editor-dock';
|
|
6
|
+
import type { EditorDockPersistenceState, EditorDockOptions, EditorPersistenceAdapter, EditorPersistenceMigrationContext, EditorPersistenceNamespace } from '../core/editor-dock';
|
|
6
7
|
import { EditorPanelRegistry } from '../core/editor-panel';
|
|
7
8
|
import { RecentComponentsStore } from '../core/recent-components';
|
|
8
9
|
import type { RecentComponentsPersistenceOptions } from '../core/recent-components';
|
|
@@ -12,24 +13,35 @@ import type { EditorPanelPersistenceState } from '../core/editor-panel';
|
|
|
12
13
|
import { EditorWorkspace } from '../core/EditorWorkspace';
|
|
13
14
|
import { ServerStatusStore } from '../core/server-status';
|
|
14
15
|
import { ConnectionStatusController, ConnectionStatusStore } from '../core/connection-status';
|
|
15
|
-
import type {
|
|
16
|
-
import type {
|
|
16
|
+
import type { DialogProvider } from '../core/DialogProvider';
|
|
17
|
+
import type { EditorUiConfiguration, EditorUiSettingsChange, EditorUiSettingsOptions, EditorSettingsOptions } from './editor-ui-configuration';
|
|
18
|
+
import type { EditorCapabilities, EditorCapabilitiesOverride, EditorMode, EditorToolbarOptions } from '../core/editor-capabilities';
|
|
19
|
+
import type { AiProviderOption, EditorOptions, EditorHeaderOptions, EditorHostPanelDefinition, EditorRegionRenderers, EditorPanelRenderers } from '../types/editor';
|
|
17
20
|
import type { FieldChangeHandler } from '../core/FieldChangeRegistry';
|
|
21
|
+
import type { PropertyControlRenderer } from '../core/PropertyControlRegistry';
|
|
18
22
|
import type { RuleChainData } from '../types/rule-chain';
|
|
19
23
|
import type { ComponentDefinition, RawComponentData } from '../types/component';
|
|
20
24
|
import type { DiagnosticItem } from '../core/topology-rules';
|
|
21
|
-
import type { ComponentManageDialogTab, SettingsDialogTab } from './editor-dialogs';
|
|
25
|
+
import type { ComponentManageDialogTab, SettingsDialogTab, EditorSettingsPane } from './editor-dialogs';
|
|
22
26
|
import type { CanvasGridType } from './canvas-view';
|
|
23
27
|
import type { AutoLayoutOptions } from '../core/AutoLayout';
|
|
24
28
|
import { ApiProvider } from '../api/ApiProvider';
|
|
25
|
-
import type {
|
|
29
|
+
import type { IdentityProvider } from '../core/IdentityProvider';
|
|
30
|
+
import type { ApiCacheKey, WorkflowFetcher } from '../api/types';
|
|
26
31
|
import type { ApiAuthRequiredHandler } from '../api/types';
|
|
27
|
-
import type { EditorActionSource } from '../core/ActionRegistry';
|
|
32
|
+
import type { EditorAction, EditorActionSource } from '../core/ActionRegistry';
|
|
28
33
|
import { type NodePickerOpenOptions } from './editor-overlays';
|
|
34
|
+
import { EditorWorkspaceShell } from './editor-workspace-shell';
|
|
35
|
+
import type { RuleChainVersionsFetcher } from '../core/rule-chain-versions';
|
|
36
|
+
import type { GlobalConfigFetcher } from '../core/global-config';
|
|
29
37
|
export declare function normalizeComponentsRawPayload(data: unknown): unknown;
|
|
30
38
|
export declare function normalizeComponentsPayload(data: unknown): ComponentDefinition[];
|
|
31
39
|
export declare function applyComponentsRuntimePayloadOptions(opts: Record<string, any>, data: unknown): unknown;
|
|
32
40
|
export type EditorSaveMode = 'builtin' | 'host';
|
|
41
|
+
export interface EditorSaveOptions {
|
|
42
|
+
draft?: boolean;
|
|
43
|
+
preserveState?: boolean;
|
|
44
|
+
}
|
|
33
45
|
export type ExternalDataUpdatePolicy = 'replace' | 'preserve-dirty';
|
|
34
46
|
export interface EditorShellPersistenceOptions {
|
|
35
47
|
adapter: EditorPersistenceAdapter;
|
|
@@ -72,16 +84,17 @@ export type EditorSaveHandlerResult = void | boolean | {
|
|
|
72
84
|
msg?: string;
|
|
73
85
|
message?: string;
|
|
74
86
|
};
|
|
75
|
-
export type EditorSaveHandler = (data: RuleChainData) => EditorSaveHandlerResult | Promise<EditorSaveHandlerResult>;
|
|
87
|
+
export type EditorSaveHandler = (data: RuleChainData, intent?: EditorSaveOptions) => EditorSaveHandlerResult | Promise<EditorSaveHandlerResult>;
|
|
76
88
|
export interface HuanbanRulegoEditorOptions {
|
|
77
89
|
container: string | HTMLElement;
|
|
78
90
|
apiBase?: string;
|
|
91
|
+
apiPrefix?: string;
|
|
79
92
|
wsUrl?: string;
|
|
80
93
|
wsBase?: string;
|
|
81
94
|
wsRoot?: string;
|
|
82
95
|
debugWsUrl?: string;
|
|
83
96
|
debugWsBase?: string;
|
|
84
|
-
debugWsOptions?:
|
|
97
|
+
debugWsOptions?: DebugWebSocketOptions;
|
|
85
98
|
debugWsMaxReconnects?: number;
|
|
86
99
|
debugWsMaxLifetimeReconnects?: number;
|
|
87
100
|
debugWsReconnectBaseDelayMs?: number;
|
|
@@ -94,7 +107,11 @@ export interface HuanbanRulegoEditorOptions {
|
|
|
94
107
|
onAuthExpired?: (response: Response) => void;
|
|
95
108
|
onApiAuthRequired?: ApiAuthRequiredHandler;
|
|
96
109
|
clearToken?: () => void;
|
|
110
|
+
identityProvider?: IdentityProvider;
|
|
111
|
+
showLoginOverlay?: boolean;
|
|
112
|
+
showUserMenu?: boolean;
|
|
97
113
|
enableConnectionStatus?: boolean;
|
|
114
|
+
visible?: boolean;
|
|
98
115
|
data?: RuleChainData | null;
|
|
99
116
|
dataUpdatePolicy?: ExternalDataUpdatePolicy;
|
|
100
117
|
components?: RawComponentData;
|
|
@@ -110,6 +127,13 @@ export interface HuanbanRulegoEditorOptions {
|
|
|
110
127
|
lfOptions?: Record<string, unknown>;
|
|
111
128
|
lfPlugins?: any[];
|
|
112
129
|
coreOptions?: Partial<EditorOptions>;
|
|
130
|
+
exportDataTransform?: EditorOptions['exportDataTransform'];
|
|
131
|
+
onNodeConfigRequest?: (node: any, definition: any) => boolean;
|
|
132
|
+
settingsPanes?: EditorSettingsPane[];
|
|
133
|
+
settings?: EditorSettingsOptions;
|
|
134
|
+
uiSettings?: EditorUiSettingsOptions;
|
|
135
|
+
onUiSettingsChange?: (change: EditorUiSettingsChange) => void;
|
|
136
|
+
dialogProvider?: DialogProvider;
|
|
113
137
|
canvasGridType?: CanvasGridType;
|
|
114
138
|
hideEdgeLabels?: boolean;
|
|
115
139
|
fieldChangeContributions?: Record<string, FieldChangeHandler>;
|
|
@@ -118,6 +142,16 @@ export interface HuanbanRulegoEditorOptions {
|
|
|
118
142
|
testCases?: EditorRunTestCasesOptions;
|
|
119
143
|
mode?: EditorMode;
|
|
120
144
|
capabilities?: EditorCapabilitiesOverride;
|
|
145
|
+
toolbar?: EditorToolbarOptions;
|
|
146
|
+
header?: EditorHeaderOptions;
|
|
147
|
+
regions?: EditorRegionRenderers;
|
|
148
|
+
panels?: readonly EditorHostPanelDefinition[];
|
|
149
|
+
panelRenderers?: EditorPanelRenderers;
|
|
150
|
+
dock?: Omit<EditorDockOptions, 'persistence'>;
|
|
151
|
+
showWorkspaceTabs?: boolean;
|
|
152
|
+
workflowFetcher?: WorkflowFetcher;
|
|
153
|
+
versionsFetcher?: RuleChainVersionsFetcher;
|
|
154
|
+
globalConfigFetcher?: GlobalConfigFetcher;
|
|
121
155
|
disabled?: boolean;
|
|
122
156
|
showToolbar?: boolean;
|
|
123
157
|
toolbarTitle?: string;
|
|
@@ -125,6 +159,7 @@ export interface HuanbanRulegoEditorOptions {
|
|
|
125
159
|
toolbarIconOnly?: boolean;
|
|
126
160
|
showSidebar?: boolean;
|
|
127
161
|
sidebarWidth?: number;
|
|
162
|
+
sidebarLabelLines?: 1 | 2;
|
|
128
163
|
sidebarCollapsed?: boolean;
|
|
129
164
|
sidebarVirtualization?: {
|
|
130
165
|
enabled?: boolean;
|
|
@@ -134,6 +169,7 @@ export interface HuanbanRulegoEditorOptions {
|
|
|
134
169
|
overscan?: number;
|
|
135
170
|
};
|
|
136
171
|
showInfoButton?: boolean;
|
|
172
|
+
showChainSecrets?: boolean;
|
|
137
173
|
showAiChatButton?: boolean;
|
|
138
174
|
showDebugConsoleButton?: boolean;
|
|
139
175
|
showClearDebugHighlightButton?: boolean;
|
|
@@ -181,14 +217,18 @@ export interface HuanbanRulegoEditorOptions {
|
|
|
181
217
|
onImportDSL?: (data: RuleChainData) => void;
|
|
182
218
|
showRunButton?: boolean;
|
|
183
219
|
onRunClick?: (chainId: string) => void;
|
|
220
|
+
onFlow?: (phase: 'start' | 'end', chainId: string) => void;
|
|
184
221
|
showTraceButton?: boolean;
|
|
185
222
|
onTraceClick?: (chainInfo: any) => void;
|
|
186
223
|
showComponentManage?: boolean;
|
|
187
224
|
onComponentManage?: (initialTab?: ComponentManageDialogTab) => void;
|
|
188
225
|
locale?: string;
|
|
226
|
+
messages?: Record<string, LocaleMessages>;
|
|
227
|
+
autoLoadLocales?: boolean;
|
|
189
228
|
theme?: string;
|
|
190
229
|
onLocaleChange?: (locale: string) => void;
|
|
191
230
|
showDebugTab?: boolean;
|
|
231
|
+
showPropertyDialogOnDndAdd?: boolean;
|
|
192
232
|
showDeployButton?: boolean;
|
|
193
233
|
showRestartButton?: boolean;
|
|
194
234
|
showReloadButton?: boolean;
|
|
@@ -224,6 +264,7 @@ export interface HuanbanRulegoEditorOptions {
|
|
|
224
264
|
runHistoryUrl?: string;
|
|
225
265
|
}
|
|
226
266
|
export interface AIAssistantOpenOptions {
|
|
267
|
+
prompt?: string;
|
|
227
268
|
fromNodeId?: string;
|
|
228
269
|
onlyThisNode?: boolean;
|
|
229
270
|
section?: string;
|
|
@@ -242,14 +283,28 @@ export declare class HuanbanRulegoEditor {
|
|
|
242
283
|
readonly connectionStatus: ConnectionStatusStore;
|
|
243
284
|
readonly connectionStatusController: ConnectionStatusController;
|
|
244
285
|
readonly apiProvider: ApiProvider;
|
|
286
|
+
private activeIdentityProvider;
|
|
287
|
+
private defaultIdentityProvider?;
|
|
288
|
+
get identityProvider(): IdentityProvider;
|
|
289
|
+
private loginOverlay;
|
|
290
|
+
private _cleanupAuthChange;
|
|
245
291
|
capabilities: EditorCapabilities;
|
|
292
|
+
private uiSettingsState?;
|
|
293
|
+
private applyingUiConfiguration;
|
|
294
|
+
private hostRegions;
|
|
246
295
|
rootEl: HTMLElement | null;
|
|
247
296
|
canvasEl: HTMLElement | null;
|
|
248
297
|
sidebarEl: HTMLElement | null;
|
|
249
298
|
sidebarGroupsEl: HTMLElement | null;
|
|
250
299
|
searchInputEl: HTMLInputElement | null;
|
|
251
|
-
|
|
252
|
-
|
|
300
|
+
private activeDrawerWrapper;
|
|
301
|
+
private releaseDrawerTheme;
|
|
302
|
+
get _activeDrawerWrapper(): HTMLElement | null;
|
|
303
|
+
set _activeDrawerWrapper(wrapper: HTMLElement | null);
|
|
304
|
+
private activeModalWrapper;
|
|
305
|
+
private releaseModalTheme;
|
|
306
|
+
get _activeModalWrapper(): HTMLElement | null;
|
|
307
|
+
set _activeModalWrapper(wrapper: HTMLElement | null);
|
|
253
308
|
private statusNodes;
|
|
254
309
|
private statusEdges;
|
|
255
310
|
private statusUpdateTime;
|
|
@@ -260,6 +315,15 @@ export declare class HuanbanRulegoEditor {
|
|
|
260
315
|
private aiAssistantUnread;
|
|
261
316
|
private workspaceTabId;
|
|
262
317
|
private savedSnapshotJson;
|
|
318
|
+
private workspaceSavedSnapshots;
|
|
319
|
+
private readonly flashAnimations;
|
|
320
|
+
private readonly hostActions;
|
|
321
|
+
private readonly removedActions;
|
|
322
|
+
private workspaceRestorePending;
|
|
323
|
+
private openChainController;
|
|
324
|
+
private openChainGeneration;
|
|
325
|
+
private readonly workspaceViewports;
|
|
326
|
+
_workspaceShell: EditorWorkspaceShell | null;
|
|
263
327
|
private isFlushingPendingDrawer;
|
|
264
328
|
private isLoadingDataIntoCanvas;
|
|
265
329
|
private diagnosticItems;
|
|
@@ -272,6 +336,12 @@ export declare class HuanbanRulegoEditor {
|
|
|
272
336
|
private componentRebindEligible;
|
|
273
337
|
private destroyed;
|
|
274
338
|
private transportGeneration;
|
|
339
|
+
private _dirtySuppression;
|
|
340
|
+
private saveAuthorityGeneration;
|
|
341
|
+
private canonicalComponents;
|
|
342
|
+
private componentLocales;
|
|
343
|
+
private localeController;
|
|
344
|
+
private savingAll;
|
|
275
345
|
components: ComponentDefinition[];
|
|
276
346
|
readonly recentComponents: RecentComponentsStore;
|
|
277
347
|
readonly testCases: EditorTestCasesStore;
|
|
@@ -279,31 +349,55 @@ export declare class HuanbanRulegoEditor {
|
|
|
279
349
|
opts: HuanbanRulegoEditorOptions;
|
|
280
350
|
i18n: I18nManager;
|
|
281
351
|
_currentTheme: string;
|
|
352
|
+
_themeRuntimeBound: boolean;
|
|
353
|
+
private _cleanupThemeRuntime;
|
|
282
354
|
private _cleanupShortcuts;
|
|
283
355
|
private _cleanupContextMenu;
|
|
284
356
|
private _cleanupEdgeLabelQuickEditor;
|
|
285
357
|
private _cleanupBridgeEvents;
|
|
286
358
|
private _cleanupCoreState;
|
|
287
359
|
private _cleanupConnectionStatus;
|
|
360
|
+
private _cleanupGroupInteractions;
|
|
361
|
+
private _cleanupCanvasShortcuts;
|
|
288
362
|
private _cleanupFullscreenState;
|
|
363
|
+
private _cleanupUserMenu;
|
|
364
|
+
private _showUserMenu;
|
|
289
365
|
_themeMenuBindTimer: ReturnType<typeof setTimeout> | null;
|
|
290
366
|
_themeMenuOutsideClickHandler: ((event: MouseEvent) => void) | null;
|
|
291
367
|
_miniMapVisible: boolean;
|
|
368
|
+
_dialogProvider: DialogProvider;
|
|
369
|
+
private ownedDialogProvider?;
|
|
292
370
|
_clipboard: any[];
|
|
293
371
|
_isAutoLayouting: boolean;
|
|
294
372
|
_pendingAutoOptimize: boolean;
|
|
295
373
|
constructor(options: HuanbanRulegoEditorOptions);
|
|
296
374
|
t(key: string, params?: Record<string, string | number>): string;
|
|
297
375
|
setLocale(locale: string): void;
|
|
376
|
+
registerLocale(locale: string, messages: LocaleMessages): void;
|
|
377
|
+
setLocales(payload: unknown, locale?: string): void;
|
|
378
|
+
reloadLocales(): Promise<boolean>;
|
|
298
379
|
setTheme(theme: string): void;
|
|
380
|
+
refreshTheme(): void;
|
|
299
381
|
registerFieldChangeHandler(name: string, handler: FieldChangeHandler, overwrite?: boolean): void;
|
|
382
|
+
registerPropertyComponent(type: string, renderer: PropertyControlRenderer, overwrite?: boolean): void;
|
|
383
|
+
resolvePropertyComponent(type: string): PropertyControlRenderer | undefined;
|
|
384
|
+
unregisterPropertyComponent(type: string): boolean;
|
|
300
385
|
unregisterFieldChangeHandler(name: string): boolean;
|
|
301
386
|
getTheme(): string;
|
|
302
387
|
_getTransportGeneration(): number;
|
|
388
|
+
_getSaveAuthorityGeneration(): number;
|
|
303
389
|
getI18n(): I18nManager;
|
|
304
390
|
get runtimeFields(): import("..").RuntimeFieldDictionary | null;
|
|
305
391
|
updateOptions(patch: Partial<Omit<HuanbanRulegoEditorOptions, 'container'>>): EditorOptionsUpdateResult;
|
|
306
392
|
private _syncRuntimeOptionUi;
|
|
393
|
+
getUiConfiguration(): EditorUiConfiguration;
|
|
394
|
+
isUiSettingLocked(group: 'ui' | 'workspace', key: string): boolean;
|
|
395
|
+
isUiControlLocked(path: string): boolean;
|
|
396
|
+
applyUiConfiguration(patch: EditorUiConfiguration): boolean;
|
|
397
|
+
resetUiConfiguration(): boolean;
|
|
398
|
+
private _applyUiConfiguration;
|
|
399
|
+
private _syncUiSettingsAccess;
|
|
400
|
+
private _syncHeader;
|
|
307
401
|
toggleMiniMap(): void;
|
|
308
402
|
toggleNodeSearch(): void;
|
|
309
403
|
_searchNodes(keyword: string): number;
|
|
@@ -312,6 +406,8 @@ export declare class HuanbanRulegoEditor {
|
|
|
312
406
|
private _startInitialDataLoadGate;
|
|
313
407
|
private _bindCoreStateSync;
|
|
314
408
|
private _prepareForChainSwitch;
|
|
409
|
+
private _resolveWorkspaceCapabilities;
|
|
410
|
+
private _applyWorkspaceCapabilities;
|
|
315
411
|
private createDOM;
|
|
316
412
|
private _renderCanvasToolbar;
|
|
317
413
|
private handleToolbarClick;
|
|
@@ -337,8 +433,9 @@ export declare class HuanbanRulegoEditor {
|
|
|
337
433
|
private _showEdgePropertyDrawer;
|
|
338
434
|
_closeDrawer(): void;
|
|
339
435
|
_closeModal(): void;
|
|
436
|
+
private _reconcileDirtyAfterSuppression;
|
|
340
437
|
_markDirty(reason?: string): void;
|
|
341
|
-
_markSavedSnapshot(data?: RuleChainData | null): void;
|
|
438
|
+
_markSavedSnapshot(data?: RuleChainData | null, canvasSnapshot?: RuleChainData): void;
|
|
342
439
|
_getSavedSnapshot(): RuleChainData | null;
|
|
343
440
|
_markSavedSnapshotFromCanvas(): void;
|
|
344
441
|
private _flushPendingDrawerChanges;
|
|
@@ -353,21 +450,43 @@ export declare class HuanbanRulegoEditor {
|
|
|
353
450
|
_showRuleChainSelector(): void;
|
|
354
451
|
updateStatusBar(): void;
|
|
355
452
|
loadComponents(components: RawComponentData): void;
|
|
453
|
+
private _applyComponentCatalog;
|
|
356
454
|
reloadComponents(options?: {
|
|
357
455
|
forceRefresh?: boolean;
|
|
358
456
|
}): Promise<boolean>;
|
|
359
457
|
refreshConnectionStatuses(): void;
|
|
458
|
+
setVisible(visible: boolean): void;
|
|
360
459
|
acquireSharedConnectionStatuses(): () => void;
|
|
361
460
|
private _requestConnectionStatuses;
|
|
362
461
|
loadData(data: RuleChainData, options?: HuanbanRulegoEditorLoadOptions): void;
|
|
363
462
|
activateWorkspaceTab(tabId: string): boolean;
|
|
463
|
+
captureWorkspaceDraft(): boolean;
|
|
464
|
+
openRuleChain(chain: string | RuleChainData): Promise<boolean>;
|
|
465
|
+
resetRuleChain(): Promise<boolean>;
|
|
466
|
+
requestOpenRuleChain(chain: string | RuleChainData): Promise<boolean>;
|
|
467
|
+
newRuleChain(root?: boolean): Promise<boolean>;
|
|
468
|
+
renameWorkspaceRuleChain(tabId: string): Promise<boolean>;
|
|
469
|
+
closeWorkspaceTab(tabId: string): Promise<boolean>;
|
|
470
|
+
clearWorkspaceCanvas(): void;
|
|
471
|
+
save(options?: EditorSaveOptions): Promise<boolean>;
|
|
472
|
+
showVersionHistory(): void;
|
|
473
|
+
saveAll(): Promise<boolean>;
|
|
474
|
+
render(data: RuleChainData): void;
|
|
475
|
+
getData(): RuleChainData | null;
|
|
476
|
+
openChain(chain: string | RuleChainData): Promise<boolean>;
|
|
477
|
+
isDirty(): boolean;
|
|
478
|
+
getDraftFingerprint(): string;
|
|
479
|
+
applyRuleChainDraft(data: RuleChainData, expectedFingerprint?: string): Promise<boolean>;
|
|
480
|
+
flashNodes(ids: string[]): void;
|
|
364
481
|
loadImportedData(data: RuleChainData): void;
|
|
365
482
|
autoLayout(options?: AutoLayoutOptions): void;
|
|
366
483
|
_updateChainStatus(ruleChain?: import('../types/rule-chain').RuleChainConfig | null): void;
|
|
367
484
|
_updateDeployToolbarAction(ruleChain?: import('../types/rule-chain').RuleChainConfig | null): void;
|
|
368
485
|
exportData(): RuleChainData | null;
|
|
486
|
+
private _exportCanvasData;
|
|
369
487
|
exportAndLog(): void;
|
|
370
488
|
toggleSidebar(): void;
|
|
489
|
+
setSidebarExpanded(expanded: boolean): void;
|
|
371
490
|
fitView(): void;
|
|
372
491
|
_showImportDialog(): void;
|
|
373
492
|
_showExportDialog(): void;
|
|
@@ -377,10 +496,18 @@ export declare class HuanbanRulegoEditor {
|
|
|
377
496
|
initialMode?: 'form' | 'chat';
|
|
378
497
|
initialTab?: 'response' | 'resp_headers' | 'debug' | 'history' | 'integration';
|
|
379
498
|
section?: string;
|
|
499
|
+
prompt?: string;
|
|
380
500
|
}): void;
|
|
381
501
|
_showSettingsDialog(initialTab?: SettingsDialogTab): void;
|
|
382
502
|
openSettings(initialTab?: SettingsDialogTab): void;
|
|
503
|
+
openGlobalConfig(): void;
|
|
504
|
+
showNodeLogSettings(nodeId: string): void;
|
|
505
|
+
showChainLogSettings(): void;
|
|
383
506
|
invokeAction(id: string, source?: EditorActionSource): Promise<boolean>;
|
|
507
|
+
listActions(): EditorAction[];
|
|
508
|
+
addAction(action: EditorAction): void;
|
|
509
|
+
removeAction(id: string): boolean;
|
|
510
|
+
_isActionRemoved(id: string): boolean;
|
|
384
511
|
openCommandPalette(): void;
|
|
385
512
|
openShortcutHelp(): void;
|
|
386
513
|
startTour(): boolean;
|
|
@@ -389,7 +516,9 @@ export declare class HuanbanRulegoEditor {
|
|
|
389
516
|
openComponentDocs(initialType?: string): Promise<void>;
|
|
390
517
|
closeOverlay(): void;
|
|
391
518
|
closeAllOverlays(): void;
|
|
392
|
-
openAiAssistant(options?: AIAssistantOpenOptions):
|
|
519
|
+
openAiAssistant(options?: AIAssistantOpenOptions): boolean;
|
|
520
|
+
openChat(prompt?: string): boolean;
|
|
521
|
+
switchChatChain(chain?: string | RuleChainData): Promise<boolean>;
|
|
393
522
|
closeAiAssistant(): void;
|
|
394
523
|
_showComponentManage(initialTab?: ComponentManageDialogTab): void;
|
|
395
524
|
openComponentManager(initialTab?: ComponentManageDialogTab): void;
|
|
@@ -397,6 +526,9 @@ export declare class HuanbanRulegoEditor {
|
|
|
397
526
|
showChainInfo(): void;
|
|
398
527
|
private _showChainInfoDrawer;
|
|
399
528
|
_escapeHtml(text: string): string;
|
|
529
|
+
private _syncIdentityContext;
|
|
530
|
+
private _refreshUserMenu;
|
|
531
|
+
private _showLoginOverlay;
|
|
400
532
|
destroy(): void;
|
|
401
533
|
private _autoLoadComponents;
|
|
402
534
|
static fetchData(apiBase: string, path: string, legacyFallbackFile?: string, timeout?: number, headers?: Record<string, string>): Promise<unknown>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { IdentityProvider } from '../core/IdentityProvider';
|
|
2
|
+
export interface AuthUiOptions {
|
|
3
|
+
identityProvider?: IdentityProvider;
|
|
4
|
+
onApiAuthRequired?: unknown;
|
|
5
|
+
onAuthExpired?: unknown;
|
|
6
|
+
fetchHeaders?: unknown;
|
|
7
|
+
showLoginOverlay?: boolean;
|
|
8
|
+
showUserMenu?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface AuthUiDefaults {
|
|
11
|
+
hostHandlesAuth: boolean;
|
|
12
|
+
showLoginOverlay: boolean;
|
|
13
|
+
showUserMenu: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function resolveAuthUiDefaults(options: AuthUiOptions): AuthUiDefaults;
|
|
@@ -26,6 +26,9 @@ export interface CodeEditorOptions {
|
|
|
26
26
|
value?: string;
|
|
27
27
|
name?: string;
|
|
28
28
|
}>;
|
|
29
|
+
getGlobalVars?: () => CodeEditorOptions['globalVars'];
|
|
30
|
+
chainVars?: string[];
|
|
31
|
+
getChainVars?: () => string[] | undefined;
|
|
29
32
|
}
|
|
30
33
|
export interface CodeEditorInstance {
|
|
31
34
|
getValue(): string;
|
|
@@ -37,11 +40,10 @@ export declare function createRulegoCompletionSource(options?: {
|
|
|
37
40
|
mode?: CodeEditorCompletionMode;
|
|
38
41
|
schemaCompletions?: CodeEditorCompletionItem[];
|
|
39
42
|
getSchemaCompletions?: () => CodeEditorCompletionItem[] | undefined;
|
|
40
|
-
globalVars?:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}>;
|
|
43
|
+
globalVars?: CodeEditorOptions['globalVars'];
|
|
44
|
+
getGlobalVars?: CodeEditorOptions['getGlobalVars'];
|
|
45
|
+
chainVars?: string[];
|
|
46
|
+
getChainVars?: CodeEditorOptions['getChainVars'];
|
|
45
47
|
}): CompletionSource;
|
|
46
48
|
export declare function createCodeEditor(options: CodeEditorOptions): CodeEditorInstance;
|
|
47
49
|
export declare function validateCode(code: string, lang: CodeEditorLang): true | string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { ConnectionStatusState, ConnectionStatusStore } from '../core/connection-status';
|
|
2
|
+
import type { DirtySuppression } from '../core/clean-snapshot';
|
|
2
3
|
export interface ConnectionStatusBindingHost {
|
|
3
4
|
lf: any;
|
|
4
5
|
connectionStatus: ConnectionStatusStore;
|
|
5
6
|
t?: (key: string) => string;
|
|
6
7
|
}
|
|
7
|
-
export declare function applyConnectionStatusSnapshot(host: ConnectionStatusBindingHost, state: ConnectionStatusState): void;
|
|
8
|
-
export declare function bindConnectionStatusToLogicFlow(host: ConnectionStatusBindingHost): () => void;
|
|
8
|
+
export declare function applyConnectionStatusSnapshot(host: ConnectionStatusBindingHost, state: ConnectionStatusState, suppression?: DirtySuppression | null): void;
|
|
9
|
+
export declare function bindConnectionStatusToLogicFlow(host: ConnectionStatusBindingHost, suppression?: DirtySuppression | null): () => void;
|
|
@@ -1,3 +1,16 @@
|
|
|
1
1
|
import LogicFlow from '@logicflow/core';
|
|
2
|
+
import type { DiagnosticItem } from '../core/topology-rules';
|
|
2
3
|
export type CustomNodeTranslator = (key: string, fallback: string) => string;
|
|
4
|
+
export interface NodeRuntimeAppearance {
|
|
5
|
+
status?: 'processing' | 'success' | 'error';
|
|
6
|
+
durationMs?: number;
|
|
7
|
+
diagnostics?: readonly DiagnosticItem[];
|
|
8
|
+
debugHighlight?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const NODE_APPEARANCE_EVENT = "rulego-editor:appearance-change";
|
|
11
|
+
export declare function setNodeRuntimeAppearance(model: any, patch: NodeRuntimeAppearance): void;
|
|
12
|
+
export declare function getNodeRuntimeAppearance(model: any): NodeRuntimeAppearance;
|
|
13
|
+
export declare function applyNodeStatusStyle<T extends Record<string, any>>(model: any, style: T): T;
|
|
14
|
+
export declare function renderNodeSelectionOutline(model: any): any | null;
|
|
15
|
+
export declare function renderNodeDecorations(model: any, text: CustomNodeTranslator, offset?: number): any[];
|
|
3
16
|
export declare function registerCustomElements(lf: LogicFlow, translate?: CustomNodeTranslator): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface DrawerLocaleContext {
|
|
2
|
+
t(key: string, params?: Record<string, string>): string;
|
|
3
|
+
}
|
|
4
|
+
interface DrawerLocaleController<T extends DrawerLocaleContext> {
|
|
5
|
+
sourceContext: T;
|
|
6
|
+
context: T;
|
|
7
|
+
recordResolved(key: string, params: Record<string, string> | undefined, fallback: string | undefined, value: string): string;
|
|
8
|
+
refresh(root: HTMLElement): void;
|
|
9
|
+
}
|
|
10
|
+
export declare function getDrawerLocaleController<T extends DrawerLocaleContext>(context: T): DrawerLocaleController<T> | undefined;
|
|
11
|
+
export declare function createDrawerLocaleController<T extends DrawerLocaleContext>(inputContext: T): DrawerLocaleController<T>;
|
|
12
|
+
export {};
|
|
@@ -2,6 +2,9 @@ export type DrawerCloseDecision = 'save' | 'discard' | 'cancel';
|
|
|
2
2
|
export interface DrawerGuardI18nContext {
|
|
3
3
|
t(key: string, params?: Record<string, string>): string;
|
|
4
4
|
_activeDrawerWrapper?: HTMLElement | null;
|
|
5
|
+
themeOwner?: HTMLElement | null;
|
|
6
|
+
guardOwner?: object;
|
|
7
|
+
signal?: AbortSignal;
|
|
5
8
|
}
|
|
6
9
|
export interface DrawerSnapshotOptions {
|
|
7
10
|
selector?: string;
|
|
@@ -10,4 +13,6 @@ export interface DrawerSnapshotOptions {
|
|
|
10
13
|
}
|
|
11
14
|
export declare function captureDrawerFormSnapshot(root: ParentNode, options?: DrawerSnapshotOptions): string;
|
|
12
15
|
export declare function isDrawerFormDirty(root: ParentNode, initialSnapshot: string, options?: DrawerSnapshotOptions): boolean;
|
|
13
|
-
export declare function confirmDrawerUnsavedClose(ctx: DrawerGuardI18nContext
|
|
16
|
+
export declare function confirmDrawerUnsavedClose(ctx: DrawerGuardI18nContext & {
|
|
17
|
+
_dialogProvider?: import('../core/DialogProvider').DialogProvider;
|
|
18
|
+
}): Promise<DrawerCloseDecision>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
interface BrowseContext {
|
|
2
|
+
opts: any;
|
|
3
|
+
core?: any;
|
|
4
|
+
capabilities?: {
|
|
5
|
+
editor?: {
|
|
6
|
+
readOnly?: boolean;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
i18n?: {
|
|
10
|
+
getLocale(): string;
|
|
11
|
+
};
|
|
12
|
+
_currentTheme?: string;
|
|
13
|
+
t?(key: string): string;
|
|
14
|
+
}
|
|
15
|
+
export declare function renderDynamicBrowseInput(ctx: BrowseContext, field: any, input: string): string;
|
|
16
|
+
export declare function bindDynamicFieldBrowse(ctx: BrowseContext, options: {
|
|
17
|
+
root: HTMLElement;
|
|
18
|
+
getConfiguration: () => Record<string, unknown>;
|
|
19
|
+
signal?: AbortSignal;
|
|
20
|
+
readOnly?: () => boolean;
|
|
21
|
+
}): {
|
|
22
|
+
destroy(): void;
|
|
23
|
+
refreshLocale(): void;
|
|
24
|
+
};
|
|
25
|
+
export {};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export declare function applyEdgeLabelValues(editor: any, edgeModel: any, values: string[]): boolean
|
|
1
|
+
export declare function applyEdgeLabelValues(editor: any, edgeModel: any, values: string[]): Promise<boolean>;
|
|
2
|
+
export declare function confirmEndpointBindingRemoval(editor: any, removed: string[]): Promise<boolean>;
|
|
2
3
|
export declare function setupEdgeLabelQuickEditor(editor: any): () => void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { EditorActionSource, EditorSelectionSnapshot } from '../core/ActionRegistry';
|
|
2
|
+
export declare function isEditorActionAllowed(editor: any, id: string): boolean;
|
|
2
3
|
export declare function getEditorSelectionSnapshot(editor: any): EditorSelectionSnapshot;
|
|
3
4
|
export declare function registerDefaultEditorActions(editor: any): void;
|
|
4
5
|
export declare function invokeEditorAction(editor: any, id: string, source?: EditorActionSource): Promise<boolean>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface CanvasOutputAnchor {
|
|
2
|
+
id: string;
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
type?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
edgeAddable?: boolean;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
export declare function getCanvasOutputAnchors(node: any): CanvasOutputAnchor[];
|
|
12
|
+
export declare function getCanvasSourceAnchor(node: any, anchorId: string): CanvasOutputAnchor | undefined;
|
|
13
|
+
export declare function getCanvasAnchorDirection(node: any, anchor: {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
}): {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function setupCanvasShortcuts(editor: any): () => void;
|
|
@@ -3,6 +3,7 @@ export interface ChainInfoContext {
|
|
|
3
3
|
opts: any;
|
|
4
4
|
t(key: string, params?: Record<string, string>): string;
|
|
5
5
|
_escapeHtml(str: string): string;
|
|
6
|
+
_dialogProvider?: import('../core/DialogProvider').DialogProvider;
|
|
6
7
|
_activeDrawerWrapper?: HTMLElement | null;
|
|
7
8
|
_activeModalWrapper?: HTMLElement | null;
|
|
8
9
|
_closeDrawer(): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface DebugDataMessage {
|
|
2
|
+
msg?: unknown;
|
|
3
|
+
metadata?: Record<string, string>;
|
|
4
|
+
msgType?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface DebugDataPanelOptions {
|
|
7
|
+
data: {
|
|
8
|
+
input?: DebugDataMessage;
|
|
9
|
+
output?: DebugDataMessage;
|
|
10
|
+
};
|
|
11
|
+
nodeId: string;
|
|
12
|
+
nodeName: string;
|
|
13
|
+
t?: (key: string) => string;
|
|
14
|
+
notify?: (message: string, type?: 'success' | 'error' | 'info') => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function renderDebugDataPanel(container: HTMLElement, options: DebugDataPanelOptions): {
|
|
17
|
+
destroy: () => void;
|
|
18
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type WebSocketTokenProvider } from '../core/websocket-auth';
|
|
1
2
|
export type WsStatus = 'connecting' | 'live' | 'reconnecting' | 'disconnected' | 'error';
|
|
2
3
|
export type DebugWsStatusReason = 'connecting' | 'connected' | 'socket-error' | 'socket-closed' | 'reconnecting' | 'max-reconnects' | 'manual-stop' | 'destroy';
|
|
3
4
|
export interface DebugWsStatusDetails {
|
|
@@ -13,6 +14,7 @@ export interface DebugWebSocketOptions {
|
|
|
13
14
|
wsUrl?: string;
|
|
14
15
|
wsBase?: string;
|
|
15
16
|
wsRoot?: string;
|
|
17
|
+
getToken?: WebSocketTokenProvider;
|
|
16
18
|
maxReconnects?: number;
|
|
17
19
|
maxLifetimeReconnects?: number;
|
|
18
20
|
reconnectBaseDelayMs?: number;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export interface DeleteGraphElementsOptions {
|
|
2
2
|
requireConfirm?: boolean;
|
|
3
3
|
action?: 'delete' | 'disconnect' | 'cancelNewEdge';
|
|
4
|
+
prepare?: () => (() => void);
|
|
4
5
|
}
|
|
5
|
-
export declare function
|
|
6
|
+
export declare function confirmEditorGraphChange(editor: any, message: string): Promise<boolean>;
|
|
7
|
+
export declare function confirmGraphElementsDelete(editor: any, nodes?: any[], edges?: any[], options?: DeleteGraphElementsOptions): Promise<boolean>;
|
|
6
8
|
export declare function canDeleteNodesWithInputGuard(editor: any, selectedNodes: any[]): boolean;
|
|
7
|
-
export declare function deleteGraphElementsWithInputGuard(editor: any, nodes?: any[], edges?: any[], options?: DeleteGraphElementsOptions): boolean
|
|
8
|
-
export declare function deleteSelectedElementsWithInputGuard(editor: any): boolean
|
|
9
|
+
export declare function deleteGraphElementsWithInputGuard(editor: any, nodes?: any[], edges?: any[], options?: DeleteGraphElementsOptions): Promise<boolean>;
|
|
10
|
+
export declare function deleteSelectedElementsWithInputGuard(editor: any): Promise<boolean>;
|