@huanban/rulego-editor-core 1.4.1 → 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-C1TbLgCK.js → editor-core-styles-CwjFPfAo.js} +1203 -507
- 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 +2897 -2115
- package/dist/index.d.ts +33 -10
- package/dist/index.esm.js +1184 -809
- package/dist/index.umd.js +2874 -2092
- 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 +2 -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 +8 -0
- package/dist/standalone/variable-completion-dropdown.d.ts +18 -0
- package/dist/types/component.d.ts +24 -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-CJDytHO9.js +0 -11269
- package/dist/chunks/vendor-logicflow-core-runtime-Cp6IBEjB.js +0 -217
- package/dist/chunks/vendor-logicflow-shared-C7YynLDn.js +0 -4
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RuleChainData } from '../types/rule-chain';
|
|
1
2
|
import { ApiProvider } from '../api/ApiProvider';
|
|
2
3
|
import type { EditorTestCasesStore } from '../core/test-cases';
|
|
3
4
|
export interface EditorContext {
|
|
@@ -9,6 +10,7 @@ export interface EditorContext {
|
|
|
9
10
|
capabilities?: import('../core/editor-capabilities').EditorCapabilities;
|
|
10
11
|
connectionStatus?: import('../core/connection-status').ConnectionStatusStore;
|
|
11
12
|
rootEl?: HTMLElement;
|
|
13
|
+
_dialogProvider?: import('../core/DialogProvider').DialogProvider;
|
|
12
14
|
_activeDrawerWrapper?: HTMLElement | null;
|
|
13
15
|
_activeModalWrapper?: HTMLElement | null;
|
|
14
16
|
components: any[];
|
|
@@ -18,6 +20,12 @@ export interface EditorContext {
|
|
|
18
20
|
t(key: string, params?: Record<string, string>): string;
|
|
19
21
|
exportData(): any;
|
|
20
22
|
loadData(data: any): void;
|
|
23
|
+
openRuleChain?(data: string | RuleChainData): Promise<boolean>;
|
|
24
|
+
requestOpenRuleChain?(data: string | RuleChainData): Promise<boolean>;
|
|
25
|
+
getDraftFingerprint?(): string;
|
|
26
|
+
applyRuleChainDraft?(data: RuleChainData, expectedFingerprint?: string): boolean | Promise<boolean>;
|
|
27
|
+
_markSavedSnapshot?(data: RuleChainData): void;
|
|
28
|
+
_syncChainLifecycle?(action: 'start' | 'stop'): void;
|
|
21
29
|
renderSidebar(): void;
|
|
22
30
|
_escapeHtml(str: string): string;
|
|
23
31
|
_closeDrawer(): void;
|
|
@@ -29,13 +37,27 @@ export interface EditorContext {
|
|
|
29
37
|
acquireSharedConnectionStatuses?(): () => void;
|
|
30
38
|
}
|
|
31
39
|
export interface RunPanelOptions {
|
|
40
|
+
prompt?: string;
|
|
32
41
|
fromNodeId?: string;
|
|
33
42
|
onlyThisNode?: boolean;
|
|
34
43
|
initialMode?: 'form' | 'chat';
|
|
35
44
|
initialTab?: 'response' | 'resp_headers' | 'debug' | 'history' | 'integration';
|
|
36
45
|
section?: string;
|
|
37
46
|
}
|
|
38
|
-
export type SettingsDialogTab = 'user' | 'setting' | 'ai' | 'skills';
|
|
47
|
+
export type SettingsDialogTab = 'user' | 'setting' | 'interface' | 'ai' | 'skills' | 'globalConfig' | (string & {});
|
|
48
|
+
export interface EditorSettingsPane {
|
|
49
|
+
id: string;
|
|
50
|
+
label: string | ((locale: string) => string);
|
|
51
|
+
mount(container: HTMLElement, context: {
|
|
52
|
+
editor: EditorContext;
|
|
53
|
+
signal: AbortSignal;
|
|
54
|
+
readOnly: boolean;
|
|
55
|
+
}): {
|
|
56
|
+
destroy(): void;
|
|
57
|
+
requestClose?(): boolean | Promise<boolean>;
|
|
58
|
+
refreshLocale?(): void;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
39
61
|
export type ComponentManageDialogTab = 'installed' | 'market' | 'dsl' | 'shared';
|
|
40
62
|
export interface SettingsDialogOptions {
|
|
41
63
|
preserveDrawer?: boolean;
|
|
@@ -44,8 +66,9 @@ export interface SettingsDialogOptions {
|
|
|
44
66
|
export declare function normalizeComponentMarketItems(raw: unknown): any[];
|
|
45
67
|
export declare function normalizeComponentsListItems(raw: unknown): any[];
|
|
46
68
|
export declare function showRuleChainSelector(ctx: EditorContext): void;
|
|
47
|
-
export declare function showSettingsDialog(
|
|
69
|
+
export declare function showSettingsDialog(sourceContext: EditorContext, initialTab?: SettingsDialogTab, options?: SettingsDialogOptions): void;
|
|
48
70
|
export declare function showImportDialog(ctx: EditorContext): void;
|
|
49
71
|
export declare function showExportDialog(ctx: EditorContext): void;
|
|
72
|
+
export declare function showDebugLogDialog(ctx: EditorContext): Promise<void>;
|
|
50
73
|
export declare function showRunPanel(ctx: EditorContext, options?: RunPanelOptions): void;
|
|
51
74
|
export declare function showComponentManage(ctx: EditorContext, initialTab?: ComponentManageDialogTab): void;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type GlobalConfigTransportContext } from '../api/GlobalConfigAPI';
|
|
2
|
+
import { type GlobalConfigFetcher } from '../core/global-config';
|
|
3
|
+
export interface GlobalConfigEditorContext extends GlobalConfigTransportContext {
|
|
4
|
+
opts: any;
|
|
5
|
+
core?: any;
|
|
6
|
+
lf?: any;
|
|
7
|
+
capabilities?: {
|
|
8
|
+
editor?: {
|
|
9
|
+
readOnly?: boolean;
|
|
10
|
+
};
|
|
11
|
+
mode?: string;
|
|
12
|
+
};
|
|
13
|
+
rootEl?: HTMLElement;
|
|
14
|
+
_currentTheme?: string;
|
|
15
|
+
_activeModalWrapper?: HTMLElement | null;
|
|
16
|
+
_closeModal?(): void;
|
|
17
|
+
_markDirty?(reason?: string): void;
|
|
18
|
+
t?(key: string, params?: Record<string, string>): string;
|
|
19
|
+
}
|
|
20
|
+
export interface GlobalConfigPanelOptions {
|
|
21
|
+
fetcher?: GlobalConfigFetcher;
|
|
22
|
+
}
|
|
23
|
+
export interface GlobalConfigPanel {
|
|
24
|
+
element: HTMLElement;
|
|
25
|
+
ready: Promise<void>;
|
|
26
|
+
reload(): Promise<void>;
|
|
27
|
+
hasPendingChanges(): boolean;
|
|
28
|
+
requestClose(): Promise<boolean>;
|
|
29
|
+
destroy(): void;
|
|
30
|
+
}
|
|
31
|
+
export interface GlobalConfigDialogOptions extends GlobalConfigPanelOptions {
|
|
32
|
+
delegateToHost?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface ConfigDialogHandle {
|
|
35
|
+
element: HTMLElement;
|
|
36
|
+
close(): void;
|
|
37
|
+
requestClose(): Promise<boolean>;
|
|
38
|
+
}
|
|
39
|
+
export declare function mountGlobalConfigPanel(ctx: GlobalConfigEditorContext, container: HTMLElement, options?: GlobalConfigPanelOptions): GlobalConfigPanel;
|
|
40
|
+
export declare function showGlobalConfigDialog(ctx: GlobalConfigEditorContext, options?: GlobalConfigDialogOptions): (ConfigDialogHandle & {
|
|
41
|
+
panel: GlobalConfigPanel;
|
|
42
|
+
}) | undefined;
|
|
43
|
+
export declare function showNodeLogDialog(ctx: GlobalConfigEditorContext, nodeId: string): ConfigDialogHandle | undefined;
|
|
44
|
+
export declare function showChainLogDialog(ctx: GlobalConfigEditorContext): ConfigDialogHandle | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function registerEditorGroupInteractions(editor: any): () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function injectHostRegionStyles(document: Document): void;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { HuanbanRulegoEditor } from './HuanbanRulegoEditor';
|
|
2
|
+
import type { EditorHeaderBadge } from '../types/editor';
|
|
3
|
+
export declare const EDITOR_REGION_IDS: readonly ["header", "toolbar.top", "workspace.tabs", "dock.left", "dock.right", "dock.bottom", "dock.ai", "toolbar.canvas", "canvas.overlay", "status", "overlay.host"];
|
|
4
|
+
export declare function mergeEditorRendererMap<T>(previous: Record<string, T | undefined> | undefined, patch: Record<string, T | undefined>): Record<string, T>;
|
|
5
|
+
export declare function syncEditorHeaderBadges(header: HTMLElement, badges?: readonly EditorHeaderBadge[]): boolean;
|
|
6
|
+
export declare class EditorHostRegions {
|
|
7
|
+
private readonly editor;
|
|
8
|
+
private readonly regions;
|
|
9
|
+
private readonly mounts;
|
|
10
|
+
private readonly docks;
|
|
11
|
+
private readonly panelViews;
|
|
12
|
+
private readonly outlets;
|
|
13
|
+
private readonly definitions;
|
|
14
|
+
private readonly releasedDefinitions;
|
|
15
|
+
private readonly cleanups;
|
|
16
|
+
private readonly prefix;
|
|
17
|
+
private sequence;
|
|
18
|
+
private resizing;
|
|
19
|
+
private resizingDock;
|
|
20
|
+
private refreshing;
|
|
21
|
+
private queued;
|
|
22
|
+
private destroyed;
|
|
23
|
+
private changingDefinitions;
|
|
24
|
+
private chainId;
|
|
25
|
+
private transportGeneration;
|
|
26
|
+
private transportContext;
|
|
27
|
+
constructor(editor: HuanbanRulegoEditor);
|
|
28
|
+
private readChainId;
|
|
29
|
+
private readTransportContext;
|
|
30
|
+
private queueRefresh;
|
|
31
|
+
refresh(): void;
|
|
32
|
+
private syncDefinitions;
|
|
33
|
+
private createElement;
|
|
34
|
+
private placeRegion;
|
|
35
|
+
private context;
|
|
36
|
+
private syncMount;
|
|
37
|
+
private removeMount;
|
|
38
|
+
private report;
|
|
39
|
+
private button;
|
|
40
|
+
private getDock;
|
|
41
|
+
private getPanelView;
|
|
42
|
+
private removePanelView;
|
|
43
|
+
private panelTitle;
|
|
44
|
+
private syncPanels;
|
|
45
|
+
private regionVisible;
|
|
46
|
+
private syncVisibility;
|
|
47
|
+
private text;
|
|
48
|
+
private label;
|
|
49
|
+
private dimension;
|
|
50
|
+
private startResize;
|
|
51
|
+
private clearMounts;
|
|
52
|
+
destroy(): void;
|
|
53
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { IdentityProvider } from '../core/IdentityProvider';
|
|
2
|
+
export interface EditorLoginOverlayOptions {
|
|
3
|
+
identityProvider: IdentityProvider;
|
|
4
|
+
t?: (key: string, fallback?: string) => string;
|
|
5
|
+
mode?: 'dialog' | 'fullscreen';
|
|
6
|
+
onSuccess?: () => void;
|
|
7
|
+
onDismiss?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export interface EditorLoginOverlay {
|
|
10
|
+
show(container: HTMLElement): void;
|
|
11
|
+
hide(): void;
|
|
12
|
+
isVisible(): boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function createEditorLoginOverlay(options: EditorLoginOverlayOptions): EditorLoginOverlay;
|
|
15
|
+
export declare function injectLoginOverlayStyles(): void;
|
|
@@ -3,12 +3,17 @@ export interface NodePickerOpenOptions {
|
|
|
3
3
|
clientX?: number;
|
|
4
4
|
clientY?: number;
|
|
5
5
|
sourceNodeId?: string;
|
|
6
|
+
sourceAnchorId?: string;
|
|
6
7
|
edgeId?: string;
|
|
8
|
+
loopGroupId?: string;
|
|
7
9
|
excludeInputNodes?: boolean;
|
|
8
10
|
onSelect?: (component: ComponentDefinition, node: unknown) => void;
|
|
9
11
|
}
|
|
10
12
|
export declare function openCommandPalette(editor: any): void;
|
|
11
13
|
export declare function openShortcutHelp(editor: any): void;
|
|
14
|
+
export declare function supportsCanvasConnection(nodeOrComponent: any, direction: 'input' | 'output'): boolean;
|
|
15
|
+
export declare function addPickedNode(editor: any, component: ComponentDefinition, options?: NodePickerOpenOptions): unknown;
|
|
12
16
|
export declare function openNodePicker(editor: any, options?: NodePickerOpenOptions): void;
|
|
13
17
|
export declare function openComponentDocs(editor: any, initialType?: string): Promise<void>;
|
|
18
|
+
export declare function openAboutDialog(editor: any): void;
|
|
14
19
|
export declare function closeSharedOverlay(editor: any): void;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { ServerStatus, ServerStatusState } from '../core/server-status';
|
|
2
|
+
export { createDrawerLocaleController } from './drawer-locale';
|
|
2
3
|
export interface PropertyDrawerContext {
|
|
3
4
|
lf: any;
|
|
4
5
|
core: any;
|
|
5
6
|
opts: any;
|
|
7
|
+
_dialogProvider?: import('../core/DialogProvider').DialogProvider;
|
|
8
|
+
identityProvider?: import('../core/IdentityProvider').IdentityProvider;
|
|
6
9
|
serverStatus?: {
|
|
7
10
|
recordWebSocketStatus: (status: string, closeCode?: number | null, message?: string) => ServerStatus | void;
|
|
8
11
|
setReconnectAttempt?: (attempt: number) => unknown;
|
|
@@ -47,4 +50,3 @@ export interface NodeRelationSummarySection {
|
|
|
47
50
|
export declare function buildNodeRelationSummary(model: any, nodeView: any, ctx?: PropertyDrawerContext): NodeRelationSummarySection[];
|
|
48
51
|
export declare function showNodePropertyDrawer(sourceContext: PropertyDrawerContext, model: any, nodeView: any, fromAdd: boolean): void;
|
|
49
52
|
export declare function showEdgePropertyDrawer(sourceContext: PropertyDrawerContext, edgeModel: any, sourceNodeView: any, fromAdd: boolean, usedRelationTypes?: string[], sourceNodeModel?: any): void;
|
|
50
|
-
export {};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { type RunAnalysisRecord, type RunNodeLog } from '../core/run-analysis';
|
|
2
|
+
import { type JsonPathDiff } from '../core/rule-chain-versions';
|
|
3
|
+
import { type AnalysisI18nOptions, type AnalysisTranslator } from '../defaults/analysis-locales';
|
|
4
|
+
export interface AnalysisEditor {
|
|
5
|
+
opts?: {
|
|
6
|
+
locale?: string;
|
|
7
|
+
theme?: string;
|
|
8
|
+
};
|
|
9
|
+
rootEl?: HTMLElement;
|
|
10
|
+
t?: (key: string, params?: Record<string, string>) => string;
|
|
11
|
+
_activeModalWrapper?: HTMLElement | null;
|
|
12
|
+
_closeModal?: () => void;
|
|
13
|
+
}
|
|
14
|
+
export interface AnalysisViewOptions extends AnalysisI18nOptions {
|
|
15
|
+
theme?: string;
|
|
16
|
+
nodeNames?: Readonly<Record<string, string>>;
|
|
17
|
+
notify?: (message: string, type: 'info' | 'error') => void;
|
|
18
|
+
onNodeSelect?: (nodeId: string) => void;
|
|
19
|
+
}
|
|
20
|
+
export interface AnalysisDialogHandle {
|
|
21
|
+
element: HTMLElement;
|
|
22
|
+
refreshLocale(): void;
|
|
23
|
+
close(): void;
|
|
24
|
+
destroy(): void;
|
|
25
|
+
}
|
|
26
|
+
type AnalysisText = string | (() => string);
|
|
27
|
+
export declare function bindAnalysisLocale(element: Element, update: () => void): void;
|
|
28
|
+
export declare function refreshAnalysisLocale(root: HTMLElement): void;
|
|
29
|
+
export declare function analysisElement<K extends keyof HTMLElementTagNameMap>(tag: K, className?: string, text?: AnalysisText): HTMLElementTagNameMap[K];
|
|
30
|
+
export declare function analysisButton(icon: string, label: AnalysisText, action: () => void, iconOnly?: boolean): HTMLButtonElement;
|
|
31
|
+
export declare function createAnalysisSurface(container: HTMLElement, options?: AnalysisViewOptions): HTMLElement;
|
|
32
|
+
export declare function appendAnalysisJson(parent: HTMLElement, title: AnalysisText, data: unknown, t: AnalysisTranslator, notify?: AnalysisViewOptions['notify']): void;
|
|
33
|
+
export declare function appendAnalysisDiff(parent: HTMLElement, title: AnalysisText, changes: readonly JsonPathDiff[], t: AnalysisTranslator): void;
|
|
34
|
+
export declare function createAnalysisModal(editor: AnalysisEditor, title: AnalysisText, options: AnalysisViewOptions): AnalysisDialogHandle & {
|
|
35
|
+
body: HTMLElement;
|
|
36
|
+
addCleanup(cleanup: () => void): void;
|
|
37
|
+
addLocaleRefresh(refresh: () => void): void;
|
|
38
|
+
};
|
|
39
|
+
export interface RunWaterfallViewOptions extends AnalysisViewOptions {
|
|
40
|
+
logs: readonly RunNodeLog[];
|
|
41
|
+
scaleMs?: number;
|
|
42
|
+
observedUntil?: number;
|
|
43
|
+
}
|
|
44
|
+
export declare function createRunWaterfall(container: HTMLElement, initial: RunWaterfallViewOptions): {
|
|
45
|
+
element: HTMLElement;
|
|
46
|
+
update(options: RunWaterfallViewOptions): void;
|
|
47
|
+
refreshLocale(): void;
|
|
48
|
+
destroy(): void;
|
|
49
|
+
};
|
|
50
|
+
export interface RunComparePanelOptions extends AnalysisViewOptions {
|
|
51
|
+
detailA: RunAnalysisRecord;
|
|
52
|
+
detailB: RunAnalysisRecord;
|
|
53
|
+
}
|
|
54
|
+
export declare function createRunComparePanel(container: HTMLElement, initial: RunComparePanelOptions): {
|
|
55
|
+
element: HTMLElement;
|
|
56
|
+
update(options: RunComparePanelOptions): void;
|
|
57
|
+
refreshLocale(): void;
|
|
58
|
+
destroy(): void;
|
|
59
|
+
};
|
|
60
|
+
export interface RunAnalysisSelectionOptions extends AnalysisViewOptions {
|
|
61
|
+
records: readonly RunAnalysisRecord[];
|
|
62
|
+
loadDetail?: (record: RunAnalysisRecord, signal: AbortSignal) => Promise<RunAnalysisRecord>;
|
|
63
|
+
}
|
|
64
|
+
export declare function createRunAnalysis(container: HTMLElement, initial: RunAnalysisSelectionOptions): {
|
|
65
|
+
element: HTMLElement;
|
|
66
|
+
refreshLocale(): void;
|
|
67
|
+
setRecords(records: readonly RunAnalysisRecord[]): void;
|
|
68
|
+
compare(a: RunAnalysisRecord, b: RunAnalysisRecord): Promise<boolean>;
|
|
69
|
+
destroy(): void;
|
|
70
|
+
};
|
|
71
|
+
export type RunAnalysisDialogOptions = AnalysisViewOptions & ({
|
|
72
|
+
record: RunAnalysisRecord;
|
|
73
|
+
} | {
|
|
74
|
+
detailA: RunAnalysisRecord;
|
|
75
|
+
detailB: RunAnalysisRecord;
|
|
76
|
+
} | {
|
|
77
|
+
records: readonly RunAnalysisRecord[];
|
|
78
|
+
loadDetail?: RunAnalysisSelectionOptions['loadDetail'];
|
|
79
|
+
});
|
|
80
|
+
export declare function showRunAnalysis(editor: AnalysisEditor, options: RunAnalysisDialogOptions): AnalysisDialogHandle;
|
|
81
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { RunComparison, RunComparisonRow, RunComparisonStatus } from '../core/run-analysis';
|
|
2
|
+
export type { RunComparison, RunComparisonRow, RunComparisonStatus };
|
|
3
|
+
export interface RunCompareRunInfo {
|
|
4
|
+
id: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
totalDuration: number | null;
|
|
7
|
+
success: boolean | null;
|
|
8
|
+
error?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface RunCompareOptions {
|
|
11
|
+
comparison: RunComparison;
|
|
12
|
+
runA: RunCompareRunInfo;
|
|
13
|
+
runB: RunCompareRunInfo;
|
|
14
|
+
nodeNames?: Readonly<Record<string, string>>;
|
|
15
|
+
onNodeClick?: (nodeId: string) => void;
|
|
16
|
+
t?: (key: string) => string;
|
|
17
|
+
}
|
|
18
|
+
export declare function renderRunCompare(container: HTMLElement, options: RunCompareOptions): {
|
|
19
|
+
destroy: () => void;
|
|
20
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { RunWaterfall, RunWaterfallRow } from '../core/run-analysis';
|
|
2
|
+
export type { RunWaterfall, RunWaterfallRow };
|
|
3
|
+
export interface RunWaterfallOptions {
|
|
4
|
+
waterfall: RunWaterfall;
|
|
5
|
+
nodeNames?: Readonly<Record<string, string>>;
|
|
6
|
+
onNodeClick?: (nodeId: string) => void;
|
|
7
|
+
t?: (key: string) => string;
|
|
8
|
+
}
|
|
9
|
+
export declare function renderRunWaterfall(container: HTMLElement, options: RunWaterfallOptions): {
|
|
10
|
+
destroy: () => void;
|
|
11
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function showEditorToast(
|
|
1
|
+
export declare function showEditorToast(editor: any, message: string, type?: 'error' | 'info'): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { EditorCapabilities } from '../core/editor-capabilities';
|
|
2
|
+
import type { EditorToolbarOptions, EditorToolbarRegion } from '../core/editor-capabilities';
|
|
3
|
+
export declare const TOOLBAR_ACTION_IDS: Readonly<Record<string, string>>;
|
|
4
|
+
export declare const TOOLBAR_CAPABILITIES: Readonly<Record<string, string>>;
|
|
5
|
+
export declare function toolbarActionLabel(editor: any, action: string, fallback?: string): string;
|
|
6
|
+
export declare function isToolbarItemVisible(options: EditorToolbarOptions | undefined, id: string, region?: EditorToolbarRegion): boolean;
|
|
7
|
+
export declare function applyToolbarPresentation(editor: any, toolbar: HTMLElement, region: 'top' | 'canvas', visibility?: Record<string, boolean>): void;
|
|
8
|
+
export declare const PREVIEW_HIDDEN_ACTIONS: ReadonlySet<string>;
|
|
9
|
+
export declare function resolvePreviewVisibility(capabilities: EditorCapabilities, actionIds: readonly string[]): Record<string, boolean>;
|
|
10
|
+
export declare const PREVIEW_VISIBLE_ACTIONS: ReadonlySet<string>;
|
|
11
|
+
export declare function applyPreviewBadge(toolbar: HTMLElement, capabilities: EditorCapabilities, label?: string): void;
|
|
12
|
+
export declare function isPreviewActionVisible(capabilities: EditorCapabilities, actionId: string): boolean | undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { EditorSaveOptions } from './HuanbanRulegoEditor';
|
|
1
2
|
type ExternalOperationResult = void | boolean | {
|
|
2
3
|
success?: boolean;
|
|
3
4
|
ok?: boolean;
|
|
@@ -9,7 +10,8 @@ type ExternalOperationResult = void | boolean | {
|
|
|
9
10
|
message?: string;
|
|
10
11
|
};
|
|
11
12
|
export declare function isExternalOperationSuccess(result: ExternalOperationResult): boolean;
|
|
12
|
-
export declare function
|
|
13
|
+
export declare function compareSavedRuleChain(expected: unknown, actual: unknown): string[];
|
|
14
|
+
export declare function handleToolbarClick(editor: any, e: Event, fromRegistry?: boolean): void | Promise<void>;
|
|
13
15
|
export declare function updateToolbarHistoryState(editor: any, state?: {
|
|
14
16
|
undoAble?: boolean;
|
|
15
17
|
redoAble?: boolean;
|
|
@@ -21,9 +23,11 @@ export declare function refreshToolbarTexts(editor: any): void;
|
|
|
21
23
|
export declare function refreshSidebarTexts(editor: any): void;
|
|
22
24
|
export declare function currentThemeLabel(editor: any): string;
|
|
23
25
|
export declare function applyTheme(editor: any, themeId: string): void;
|
|
26
|
+
export declare function syncThemeView(editor: any, themeId: string): void;
|
|
24
27
|
export declare function toggleThemeMenu(editor: any, target?: Element | null): void;
|
|
25
28
|
export declare function closeThemeMenu(editor: any): void;
|
|
26
29
|
export declare function refreshThemeDropdown(editor: any): void;
|
|
27
30
|
export declare function cancelPendingEditorSave(editor: any): void;
|
|
31
|
+
export declare function saveEditor(editor: any, options?: EditorSaveOptions, button?: HTMLElement): Promise<boolean>;
|
|
28
32
|
export declare function setupKeyboardShortcuts(editor: any): () => void;
|
|
29
33
|
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { EditorCapabilityInput, EditorCapabilities, EditorUiCapabilities } from '../core/editor-capabilities';
|
|
2
|
+
import type { CanvasGridType } from './canvas-view';
|
|
3
|
+
export type EditorBuiltinSettingsTab = 'interface' | 'user' | 'setting' | 'ai' | 'skills' | 'globalConfig';
|
|
4
|
+
export interface EditorSettingControlOptions {
|
|
5
|
+
visible?: boolean;
|
|
6
|
+
editable?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface EditorSettingsOptions {
|
|
9
|
+
tabs?: Partial<Record<EditorBuiltinSettingsTab | (string & {}), {
|
|
10
|
+
visible?: boolean;
|
|
11
|
+
}>>;
|
|
12
|
+
fields?: Partial<Record<'apiBase' | 'browserConsoleLog', EditorSettingControlOptions>>;
|
|
13
|
+
}
|
|
14
|
+
export interface EditorUiSettingsOptions {
|
|
15
|
+
visible?: boolean;
|
|
16
|
+
editable?: boolean;
|
|
17
|
+
controls?: Record<string, EditorSettingControlOptions | undefined>;
|
|
18
|
+
}
|
|
19
|
+
export interface EditorUiConfiguration {
|
|
20
|
+
capabilities?: {
|
|
21
|
+
ui?: Partial<EditorUiCapabilities>;
|
|
22
|
+
workspace?: Partial<Pick<EditorCapabilities['workspace'], 'topBar' | 'tabs' | 'explorer' | 'palette'>>;
|
|
23
|
+
};
|
|
24
|
+
toolbar?: EditorCapabilityInput['toolbar'];
|
|
25
|
+
header?: EditorCapabilityInput['header'];
|
|
26
|
+
settings?: Pick<EditorSettingsOptions, 'tabs'>;
|
|
27
|
+
toolbarIconOnly?: boolean;
|
|
28
|
+
canvasGridType?: CanvasGridType;
|
|
29
|
+
hideEdgeLabels?: boolean;
|
|
30
|
+
sidebarCollapsed?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface EditorUiSettingsChange {
|
|
33
|
+
configuration: EditorUiConfiguration;
|
|
34
|
+
source: 'settings' | 'reset';
|
|
35
|
+
}
|
|
36
|
+
export declare function mergeEditorSettingsOptions(previous?: EditorSettingsOptions, patch?: EditorSettingsOptions): EditorSettingsOptions;
|
|
37
|
+
export declare function mergeEditorUiSettingsOptions(previous?: EditorUiSettingsOptions, patch?: EditorUiSettingsOptions): EditorUiSettingsOptions;
|
|
38
|
+
export declare function isEditorSettingsTabVisible(options: {
|
|
39
|
+
settings?: EditorSettingsOptions;
|
|
40
|
+
uiSettings?: EditorUiSettingsOptions;
|
|
41
|
+
}, id: string): boolean;
|
|
42
|
+
export declare function pickEditorUiConfiguration(source: Record<string, any>): EditorUiConfiguration;
|
|
43
|
+
export declare class EditorUiSettingsState {
|
|
44
|
+
private baseline;
|
|
45
|
+
private host;
|
|
46
|
+
changed: boolean;
|
|
47
|
+
constructor(options: EditorCapabilityInput & Record<string, any>);
|
|
48
|
+
private capabilityInput;
|
|
49
|
+
updateHost(patch: Record<string, any>): void;
|
|
50
|
+
isLocked(group: 'ui' | 'workspace', key: string): boolean;
|
|
51
|
+
isControlLocked(path: string): boolean;
|
|
52
|
+
private valueAt;
|
|
53
|
+
constrain(patch: EditorUiConfiguration, current?: Record<string, any>): EditorUiConfiguration | null;
|
|
54
|
+
resetPatch(current: Record<string, any>): EditorUiConfiguration;
|
|
55
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { EditorCapabilities } from '../core/editor-capabilities';
|
|
2
|
+
import type { EditorUiConfiguration, EditorUiSettingsOptions } from './editor-ui-configuration';
|
|
3
|
+
export interface UiSettingsContext {
|
|
4
|
+
opts: Record<string, any> & {
|
|
5
|
+
uiSettings?: EditorUiSettingsOptions;
|
|
6
|
+
};
|
|
7
|
+
capabilities: EditorCapabilities;
|
|
8
|
+
core?: {
|
|
9
|
+
eventBus?: {
|
|
10
|
+
on(event: string, handler: () => void): (() => void) | void;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
rootEl?: HTMLElement;
|
|
14
|
+
lf?: any;
|
|
15
|
+
t(key: string): string;
|
|
16
|
+
getUiConfiguration(): EditorUiConfiguration;
|
|
17
|
+
applyUiConfiguration(patch: EditorUiConfiguration): boolean;
|
|
18
|
+
resetUiConfiguration(): boolean;
|
|
19
|
+
isUiSettingLocked(group: 'ui' | 'workspace', key: string): boolean;
|
|
20
|
+
isUiControlLocked?(path: string): boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare function mountEditorUiSettings(editor: UiSettingsContext, container: HTMLElement): {
|
|
23
|
+
element: HTMLDivElement;
|
|
24
|
+
refreshLocale: () => void;
|
|
25
|
+
destroy(): void;
|
|
26
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IdentityProvider } from '../core/IdentityProvider';
|
|
2
|
+
export interface UserMenuContext {
|
|
3
|
+
identityProvider: IdentityProvider;
|
|
4
|
+
rootEl?: HTMLElement | null;
|
|
5
|
+
t(key: string, params?: Record<string, string>): string;
|
|
6
|
+
_showSettingsDialog?(tab?: string): void;
|
|
7
|
+
}
|
|
8
|
+
export declare function renderUserMenu(ctx: UserMenuContext): () => void;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { type RuleChainVersionsAPIOptions } from '../api/RuleChainVersionsAPI';
|
|
2
|
+
import type { RuleChainAPIOptions } from '../api/types';
|
|
3
|
+
import { type RuleChainVersionsFetcher, type RuleChainVersionsController, type RuleChainVersionsControllerOptions, type VersionRollbackResult } from '../core/rule-chain-versions';
|
|
4
|
+
import type { RuleChainData } from '../types/rule-chain';
|
|
5
|
+
import { type AnalysisEditor, type AnalysisViewOptions } from './editor-run-analysis';
|
|
6
|
+
import { type DialogProvider } from '../core/DialogProvider';
|
|
7
|
+
export interface VersionHistoryViewOptions extends AnalysisViewOptions {
|
|
8
|
+
chainId: string;
|
|
9
|
+
fetcher: RuleChainVersionsFetcher;
|
|
10
|
+
pageSize?: number;
|
|
11
|
+
isDirty: () => boolean;
|
|
12
|
+
readonly?: boolean | (() => boolean);
|
|
13
|
+
canRollback?: () => boolean;
|
|
14
|
+
getDraftRevision?: () => unknown;
|
|
15
|
+
confirm?: RuleChainVersionsControllerOptions['confirm'];
|
|
16
|
+
dialogProvider?: DialogProvider;
|
|
17
|
+
applyRollback?: RuleChainVersionsControllerOptions['onRolledBack'];
|
|
18
|
+
onRolledBack?: (result: VersionRollbackResult) => void;
|
|
19
|
+
}
|
|
20
|
+
export interface VersionHistoryView {
|
|
21
|
+
element: HTMLElement;
|
|
22
|
+
controller: RuleChainVersionsController;
|
|
23
|
+
ready: Promise<boolean>;
|
|
24
|
+
refreshLocale(): void;
|
|
25
|
+
destroy(): void;
|
|
26
|
+
}
|
|
27
|
+
export declare function createVersionHistory(container: HTMLElement, options: VersionHistoryViewOptions): VersionHistoryView;
|
|
28
|
+
export interface VersionHistoryEditor extends AnalysisEditor {
|
|
29
|
+
_dialogProvider?: DialogProvider;
|
|
30
|
+
opts?: AnalysisEditor['opts'] & {
|
|
31
|
+
apiBase?: string;
|
|
32
|
+
fetchTimeout?: number;
|
|
33
|
+
fetchHeaders?: RuleChainAPIOptions['headers'];
|
|
34
|
+
customFetch?: RuleChainAPIOptions['customFetch'];
|
|
35
|
+
credentials?: RequestCredentials;
|
|
36
|
+
onApiAuthRequired?: RuleChainAPIOptions['onAuthRequired'];
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
readonly?: boolean;
|
|
39
|
+
mode?: string;
|
|
40
|
+
};
|
|
41
|
+
core?: {
|
|
42
|
+
store: {
|
|
43
|
+
getState(): {
|
|
44
|
+
ruleChain?: {
|
|
45
|
+
id?: string;
|
|
46
|
+
} | null;
|
|
47
|
+
isDirty?: boolean;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
workspace?: {
|
|
52
|
+
getActiveTab(): {
|
|
53
|
+
id: string;
|
|
54
|
+
chainId: string;
|
|
55
|
+
readonly?: boolean;
|
|
56
|
+
} | null;
|
|
57
|
+
};
|
|
58
|
+
capabilities?: {
|
|
59
|
+
editor?: {
|
|
60
|
+
readOnly?: boolean;
|
|
61
|
+
};
|
|
62
|
+
persistence?: {
|
|
63
|
+
saveToServer?: boolean;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
serverStatus?: RuleChainAPIOptions['serverStatus'];
|
|
67
|
+
exportData?(): unknown;
|
|
68
|
+
loadData(data: RuleChainData, options?: {
|
|
69
|
+
preserveWorkspaceTab?: boolean;
|
|
70
|
+
}): void;
|
|
71
|
+
_markSavedSnapshot?(data?: RuleChainData): void;
|
|
72
|
+
}
|
|
73
|
+
export interface VersionHistoryOptions extends Omit<VersionHistoryViewOptions, 'chainId' | 'fetcher' | 'isDirty'> {
|
|
74
|
+
chainId?: string;
|
|
75
|
+
fetcher?: RuleChainVersionsFetcher;
|
|
76
|
+
isDirty?: () => boolean;
|
|
77
|
+
apiOptions?: RuleChainVersionsAPIOptions | (() => RuleChainVersionsAPIOptions);
|
|
78
|
+
}
|
|
79
|
+
export interface VersionHistoryHandle extends VersionHistoryView {
|
|
80
|
+
close(): void;
|
|
81
|
+
}
|
|
82
|
+
export declare function showVersionHistory(editor: VersionHistoryEditor, options?: VersionHistoryOptions): VersionHistoryHandle;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { HuanbanRulegoEditor } from './HuanbanRulegoEditor';
|
|
2
|
+
import type { RuleChainData } from '../types/rule-chain';
|
|
3
|
+
export declare function fetchWorkspaceRuleChain(editor: HuanbanRulegoEditor, id: string, signal?: AbortSignal): Promise<RuleChainData>;
|
|
4
|
+
export declare class EditorWorkspaceShell {
|
|
5
|
+
private readonly editor;
|
|
6
|
+
private readonly tabsEl;
|
|
7
|
+
private readonly navEl;
|
|
8
|
+
private readonly resourceEl;
|
|
9
|
+
private readonly paletteEl;
|
|
10
|
+
private readonly unsubscribe;
|
|
11
|
+
private menu;
|
|
12
|
+
private mode;
|
|
13
|
+
private rows;
|
|
14
|
+
private page;
|
|
15
|
+
private total;
|
|
16
|
+
private hasMore;
|
|
17
|
+
private loading;
|
|
18
|
+
private loaded;
|
|
19
|
+
private error;
|
|
20
|
+
private query;
|
|
21
|
+
private request;
|
|
22
|
+
private generation;
|
|
23
|
+
private timer;
|
|
24
|
+
private destroyed;
|
|
25
|
+
private readonly closingTabs;
|
|
26
|
+
private readonly closeController;
|
|
27
|
+
private tabSignature;
|
|
28
|
+
private resourceSignature;
|
|
29
|
+
private outsideClick;
|
|
30
|
+
private escapeMenu;
|
|
31
|
+
constructor(editor: HuanbanRulegoEditor);
|
|
32
|
+
refresh(): void;
|
|
33
|
+
show(mode: 'components' | 'resources'): void;
|
|
34
|
+
invalidate(): void;
|
|
35
|
+
private renderTabs;
|
|
36
|
+
private handleTabClick;
|
|
37
|
+
closeTab(id: string): Promise<boolean>;
|
|
38
|
+
private showTabMenu;
|
|
39
|
+
private showOpenTabs;
|
|
40
|
+
private closeMany;
|
|
41
|
+
private openMenu;
|
|
42
|
+
private closeMenu;
|
|
43
|
+
private load;
|
|
44
|
+
private renderResources;
|
|
45
|
+
destroy(): void;
|
|
46
|
+
}
|
|
47
|
+
export declare function reportWorkspaceError(editor: HuanbanRulegoEditor, error: unknown): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EDITOR_WORKSPACE_STYLES = "\n.hb_workspace_tabs { display:flex; flex:none; min-width:0; min-height:34px; border-bottom:1px solid var(--hb-border-color); background:var(--hb-bg-toolbar); }\n.hb_workspace_tabs[hidden], .hb_workspace_nav[hidden], .hb_workspace_palette[hidden], .hb_workspace_resources[hidden] { display:none!important; }\n.hb_workspace_tab_list { display:flex; flex:1; min-width:0; overflow-x:auto; scrollbar-width:thin; }\n.hb_workspace_tab { display:flex; align-items:center; flex:none; min-width:100px; max-width:220px; border-right:1px solid var(--hb-border-color); border-top:2px solid transparent; }\n.hb_workspace_tab.is_active { background:var(--hb-bg-canvas,var(--hb-bg-panel)); border-top-color:var(--hb-color-primary); }\n.hb_workspace_tabs button, .hb_workspace_nav button, .hb_workspace_resource_tools button { display:inline-flex; align-items:center; justify-content:center; gap:6px; height:32px; min-width:28px; padding:0 7px; border:0; color:var(--hb-text-secondary); background:transparent; cursor:pointer; font:inherit; }\n.hb_workspace_tab > [role=tab] { min-width:0; flex:1; justify-content:flex-start; }\n.hb_workspace_tab.is_active > [role=tab] { color:var(--hb-text-primary); }\n.hb_workspace_tab_title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n.hb_workspace_tab .hb_control_icon { flex:none; }\n.hb_workspace_tab_close { flex:none; opacity:.7; }\n.hb_workspace_dirty { flex:none; width:6px; height:6px; border-radius:50%; background:var(--hb-color-primary); }\n.hb_workspace_tab_tools { display:flex; flex:none; border-left:1px solid var(--hb-border-color); }\n.hb_workspace_nav { display:flex; flex:none; min-height:34px; border-bottom:1px solid var(--hb-border-color); }\n.hb_workspace_nav button { flex:1 1 auto; min-width:0; padding:0 5px; gap:4px; font-size:12px; border-bottom:2px solid transparent; }\n.hb_workspace_nav button > span:not(.hb_control_icon) { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n.hb_workspace_nav button[aria-selected=true] { color:var(--hb-color-primary); border-bottom-color:var(--hb-color-primary); }\n.hb_workspace_palette, .hb_workspace_resources { display:flex; flex:1; flex-direction:column; min-height:0; overflow:hidden; }\n.hb_workspace_resource_tools { display:flex; align-items:center; gap:3px; padding:6px; flex:none; border-bottom:1px solid var(--hb-border-color); }\n.hb_workspace_resource_tools input { width:0; min-width:0; flex:1; height:28px; padding:0 7px; border:1px solid var(--hb-border-color); border-radius:4px; background:var(--hb-bg-input,var(--hb-bg-panel)); color:var(--hb-text-primary); font:inherit; font-size:12px; }\n.hb_workspace_resource_list { flex:1; min-height:0; overflow:auto; }\n.hb_workspace_resource_list summary { display:flex; align-items:center; gap:6px; min-height:30px; padding:3px 8px; cursor:pointer; color:var(--hb-text-secondary); font-size:11px; font-weight:600; }\n.hb_workspace_resource_list summary::before { content:'\\25B8'; flex:none; }\n.hb_workspace_resource_list details[open] > summary::before { content:'\\25BE'; }\n.hb_workspace_resource_list summary > span { flex:1; overflow-wrap:anywhere; }\n.hb_workspace_resource_list summary small { font-weight:400; }\n.hb_workspace_resource { display:flex; gap:7px; align-items:center; width:100%; min-height:42px; padding:5px 10px; border:0; border-left:2px solid transparent; background:transparent; color:var(--hb-text-primary); cursor:pointer; font:inherit; text-align:left; }\n.hb_workspace_resource > span:not(.hb_control_icon) { flex:1; min-width:0; display:flex; flex-direction:column; }\n.hb_workspace_resource strong { font-size:12px; line-height:17px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }\n.hb_workspace_resource small { color:var(--hb-text-secondary); font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }\n.hb_workspace_resource.is_active { border-left-color:var(--hb-color-primary); background:var(--hb-bg-active,var(--hb-bg-hover)); }\n.hb_workspace_tabs button:hover, .hb_workspace_nav button:hover, .hb_workspace_resource:hover, .hb_workspace_menu button:hover { background:var(--hb-bg-hover); }\n.hb_workspace_tabs button:focus-visible, .hb_workspace_nav button:focus-visible, .hb_workspace_resource:focus-visible, .hb_workspace_menu button:focus-visible { outline:2px solid var(--hb-color-primary); outline-offset:-2px; }\n.hb_workspace_lifecycle { width:6px; height:6px; border-radius:50%; background:var(--hb-text-secondary); flex:none; }\n.hb_workspace_lifecycle.is_running { background:var(--hb-color-success,#2b8a57); }\n.hb_workspace_resource_footer { display:flex; flex:none; flex-wrap:wrap; gap:6px; align-items:center; justify-content:space-between; padding:6px 8px; border-top:1px solid var(--hb-border-color); color:var(--hb-text-secondary); font-size:11px; }\n.hb_workspace_resource_footer button { border:0; background:transparent; color:var(--hb-color-primary); cursor:pointer; font:inherit; }\n.hb_workspace_resource_footer p { width:100%; margin:0; color:var(--hb-color-danger,#b42318); overflow-wrap:anywhere; }\n.hb_workspace_empty { color:var(--hb-text-secondary); padding:12px; font-size:12px; }\n.hb_workspace_menu { position:absolute; z-index:var(--hb-z-context-menu,10000); display:flex; flex-direction:column; padding:4px; min-width:180px; max-width:min(320px,calc(100% - 8px)); max-height:calc(100% - 8px); overflow:auto; border:1px solid var(--hb-border-color); border-radius:6px; background:var(--hb-bg-modal); box-shadow:0 8px 24px #0002; }\n.hb_workspace_menu button { display:flex; flex:none; align-items:center; gap:8px; padding:7px 9px; border:0; border-radius:3px; background:transparent; color:var(--hb-text-primary); font:inherit; font-size:12px; cursor:pointer; text-align:left; }\n.hb_workspace_menu button span:not(.hb_control_icon) { min-width:0; overflow-wrap:anywhere; }\n.huanban_rulego_editor_sidebar.collapsed .hb_workspace_nav, .huanban_rulego_editor_sidebar.collapsed .hb_workspace_palette, .huanban_rulego_editor_sidebar.collapsed .hb_workspace_resources { display:none!important; }\n@media(max-width:600px) { .hb_workspace_tab { min-width:88px; max-width:160px; } }\n";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function bindFieldExpressionPreviews(ctx: any, options: {
|
|
2
|
+
root: HTMLElement;
|
|
3
|
+
nodeId: string;
|
|
4
|
+
getConnections: () => Array<{
|
|
5
|
+
sourceNodeId?: unknown;
|
|
6
|
+
targetNodeId?: unknown;
|
|
7
|
+
}>;
|
|
8
|
+
signal?: AbortSignal;
|
|
9
|
+
}): {
|
|
10
|
+
refresh(): void;
|
|
11
|
+
destroy(): void;
|
|
12
|
+
};
|