@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,11 +1,27 @@
|
|
|
1
1
|
import LogicFlow from '@logicflow/core';
|
|
2
|
-
export
|
|
3
|
-
type
|
|
2
|
+
export { GROUP_NODE_TYPES, getLoopEntryState, getGroupOwnership, inspectGroupBoundary, getGraphDeletionImpact } from '../core/group-protocol';
|
|
3
|
+
type GroupMessageKey = 'onlyRightAnchorOut' | 'notToInput' | 'onlyLeftAnchorIn' | 'groupBoundary';
|
|
4
|
+
type GroupNodeTranslator = (key: GroupMessageKey, fallback: string) => string;
|
|
5
|
+
export interface GroupNodeInteractionContext {
|
|
6
|
+
text: (key: string, fallback: string) => string;
|
|
7
|
+
isReadOnly: () => boolean;
|
|
8
|
+
isPicking: (groupId: string) => boolean;
|
|
9
|
+
clientToCanvas?: (x: number, y: number) => {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
} | undefined;
|
|
13
|
+
}
|
|
14
|
+
export declare function bindGroupNodeInteractions(graphModel: object, context: GroupNodeInteractionContext): () => void;
|
|
4
15
|
export declare function isGroupAppendAllowed(nodeData: {
|
|
5
16
|
type?: string;
|
|
6
17
|
} | null | undefined): boolean;
|
|
7
18
|
export declare function fillGroupNodeFields(lf: any, groupLfId: string): void;
|
|
19
|
+
export declare function setLoopGroupEntry(lf: any, groupId: string, targetId: string, options?: {
|
|
20
|
+
confirmed?: boolean;
|
|
21
|
+
}): boolean;
|
|
22
|
+
export declare function removeGroupMember(lf: any, groupId: string, childId: string, options?: {
|
|
23
|
+
confirmed?: boolean;
|
|
24
|
+
}): boolean;
|
|
8
25
|
export declare function setupGroupEventListeners(lf: any): void;
|
|
9
26
|
export declare function restoreParentGroup(lf: any): number;
|
|
10
27
|
export declare function registerGroupNode(lf: LogicFlow, translate?: GroupNodeTranslator): void;
|
|
11
|
-
export {};
|
|
@@ -4,4 +4,11 @@ export type { IconThemeName };
|
|
|
4
4
|
export interface ResolveIconUrlOptions {
|
|
5
5
|
theme?: string | null;
|
|
6
6
|
}
|
|
7
|
+
export interface ComponentIconSource {
|
|
8
|
+
type?: string | null;
|
|
9
|
+
icon?: string | null;
|
|
10
|
+
category?: string | null;
|
|
11
|
+
}
|
|
12
|
+
export declare function resolveComponentIconPath(component: ComponentIconSource): string;
|
|
13
|
+
export declare function resolveComponentIconUrl(component: ComponentIconSource, optionsOrTheme?: string | ResolveIconUrlOptions): string;
|
|
7
14
|
export declare function resolveIconUrl(iconPath: string, optionsOrTheme?: string | ResolveIconUrlOptions): string;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
export { HuanbanRulegoEditor, applyComponentsRuntimePayloadOptions, normalizeComponentsPayload, normalizeComponentsRawPayload, } from './HuanbanRulegoEditor';
|
|
2
|
-
export type { AIAssistantOpenOptions, EditorSaveHandler, EditorSaveHandlerResult, EditorSaveConflictContext, EditorSaveMode, EditorSaveResult, EditorOptionsUpdateResult, ExternalDataUpdatePolicy, EditorShellPersistenceOptions, EditorRecentComponentsOptions, EditorRunTestCasesOptions, HuanbanRulegoEditorLoadOptions, HuanbanRulegoEditorOptions, } from './HuanbanRulegoEditor';
|
|
3
|
-
export type { ComponentManageDialogTab, SettingsDialogTab } from './editor-dialogs';
|
|
2
|
+
export type { AIAssistantOpenOptions, EditorSaveHandler, EditorSaveHandlerResult, EditorSaveConflictContext, EditorSaveMode, EditorSaveOptions, EditorSaveResult, EditorOptionsUpdateResult, ExternalDataUpdatePolicy, EditorShellPersistenceOptions, EditorRecentComponentsOptions, EditorRunTestCasesOptions, HuanbanRulegoEditorLoadOptions, HuanbanRulegoEditorOptions, } from './HuanbanRulegoEditor';
|
|
3
|
+
export type { ComponentManageDialogTab, SettingsDialogTab, EditorSettingsPane } from './editor-dialogs';
|
|
4
|
+
export type { EditorUiConfiguration, EditorUiSettingsOptions, EditorUiSettingsChange, EditorSettingsOptions, EditorBuiltinSettingsTab, EditorSettingControlOptions } from './editor-ui-configuration';
|
|
5
|
+
export { EDITOR_REGION_IDS } from './editor-host-regions';
|
|
6
|
+
export type { EditorHeaderOptions, EditorHeaderBadge, EditorRegionId, EditorRegionContext, EditorRegionMount, EditorRegionRenderer, EditorRegionRenderers, EditorPanelRenderers, EditorHostPanelDefinition, } from '../types/editor';
|
|
7
|
+
export { createSharedNodeManager } from './shared-node-manager';
|
|
8
|
+
export type { SharedNodeManager, SharedNodeManagerContext } from './shared-node-manager';
|
|
4
9
|
export type { NodePickerOpenOptions } from './editor-overlays';
|
|
5
10
|
export { closeEditorTour, isEditorTourDone, startEditorTour } from './editor-tour';
|
|
6
11
|
export type { EditorTourHandle } from './editor-tour';
|
|
@@ -9,11 +14,18 @@ export type { RuntimeComponentAdapterOptions } from './node-definitions';
|
|
|
9
14
|
export { confirmDrawerUnsavedClose } from './drawer-unsaved-guard';
|
|
10
15
|
export type { DrawerCloseDecision, DrawerGuardI18nContext } from './drawer-unsaved-guard';
|
|
11
16
|
export type { DebugWsCallbacks, DebugWsStatusDetails, DebugWsStatusReason, DebugWebSocketOptions, WsStatus, } from './editor-debug-ws';
|
|
17
|
+
export { renderRunWaterfall } from './editor-run-waterfall';
|
|
18
|
+
export type { RunWaterfallOptions } from './editor-run-waterfall';
|
|
19
|
+
export { renderRunCompare } from './editor-run-compare';
|
|
20
|
+
export type { RunCompareOptions, RunCompareRunInfo } from './editor-run-compare';
|
|
21
|
+
export { renderDebugDataPanel } from './editor-debug-data';
|
|
22
|
+
export type { DebugDataPanelOptions, DebugDataMessage } from './editor-debug-data';
|
|
12
23
|
export { debugLog, setDebug, isDebug } from './logger';
|
|
13
24
|
export { escapeHtml, escapeAttr, setSafeText, safeUrl, safeImageUrl, safeCssColor, sanitizeRichHtml, sanitizeDescription, redactSensitive, formatJsonBounded, parseJsonBounded, } from './security-utils';
|
|
14
|
-
export { DEFAULT_ICON_URL, normalizeIconTheme, resolveIconUrl } from './icon-utils';
|
|
15
|
-
export type { IconThemeName, ResolveIconUrlOptions } from './icon-utils';
|
|
25
|
+
export { DEFAULT_ICON_URL, normalizeIconTheme, resolveIconUrl, resolveComponentIconPath, resolveComponentIconUrl } from './icon-utils';
|
|
26
|
+
export type { ComponentIconSource, IconThemeName, ResolveIconUrlOptions } from './icon-utils';
|
|
16
27
|
export { HUANBAN_FAVICON_DATA_URI, HUANBAN_FAVICON_SVG, HUANBAN_FAVICON_SVG_PATH, HUANBAN_LOGO_DATA_URI, HUANBAN_LOGO_SVG, HUANBAN_LOGO_SVG_PATH, } from './browser-assets';
|
|
17
|
-
export { getCoreThemeDefinition, getCoreThemeVariables, getThemeList, getThemeRuntimeVariables, normalizeEditorTheme, THEME_PRESETS, } from './themes';
|
|
28
|
+
export { AUTO_THEME_ID, getCoreThemeDefinition, getCoreThemeVariables, getThemeList, getThemeRuntimeVariables, isAutoTheme, normalizeEditorTheme, resolveAutoTheme, setupAutoThemeListener, THEME_PRESETS, } from './themes';
|
|
18
29
|
export type { ThemeVars } from './themes';
|
|
19
30
|
export type { RichHtmlPolicy, RedactOptions, FormatJsonBoundedOptions, ParseJsonBoundedOptions, } from './security-utils';
|
|
31
|
+
export { renderUserMenu } from './editor-user-menu';
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
export declare function isEditableShortcutTarget(target: EventTarget | null): boolean;
|
|
2
2
|
export declare function isCodeEditorOwnedShortcut(event: KeyboardEvent): boolean;
|
|
3
|
+
export declare function hasNativeTextSelection(): boolean;
|
|
4
|
+
export declare function isCanvasTarget(target: EventTarget | null, editor: any): boolean;
|
|
5
|
+
export declare function clearNativeTextSelection(): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare function bindMultiSelectPopover(options: {
|
|
2
|
+
box: HTMLElement;
|
|
3
|
+
input: HTMLInputElement;
|
|
4
|
+
popup: HTMLElement;
|
|
5
|
+
owner: HTMLElement;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
multiple?: boolean;
|
|
8
|
+
signal?: AbortSignal;
|
|
9
|
+
onOpen?: () => void;
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
}): {
|
|
12
|
+
toggle: (show?: boolean) => void;
|
|
13
|
+
close: () => void;
|
|
14
|
+
sync: () => void;
|
|
15
|
+
destroy: () => void;
|
|
16
|
+
};
|
|
@@ -6,6 +6,7 @@ export interface CloneNodePropertiesOptions {
|
|
|
6
6
|
layoutY?: number;
|
|
7
7
|
parentGroupId?: string | null;
|
|
8
8
|
preserveParentGroupId?: boolean;
|
|
9
|
+
nodeIdMap?: ReadonlyMap<string, string> | Record<string, string>;
|
|
9
10
|
}
|
|
10
11
|
export declare const CONNECTION_STATUS_RUNTIME_PROPERTY_KEYS: readonly ["connectionState", "connectionMessage", "connectionStale", "connectionLabel", "connectionTooltip", "connectionKind"];
|
|
11
12
|
export declare const NODE_THEME_RUNTIME_PROPERTY_KEY: "__huanbanTheme";
|
|
@@ -12,6 +12,10 @@ export declare function getCategoryKey(rawCat: string): string;
|
|
|
12
12
|
export declare function resolveRuntimeCategoryKey(component: any, _isEndpoint?: boolean): string;
|
|
13
13
|
export declare function getCategoryConfig(cat: string): CategoryConfig;
|
|
14
14
|
export declare function adapterRelationTypeLabel(relationTypes: any, translate?: (value: string) => string): any;
|
|
15
|
+
export declare function getJevRelationTypeOptions(configuration?: Record<string, unknown>, translate?: (value: string) => string): Array<{
|
|
16
|
+
label: string;
|
|
17
|
+
value: string;
|
|
18
|
+
}>;
|
|
15
19
|
export declare function adapterEndpointDefaults(component: any, isEndpoint?: boolean): void;
|
|
16
20
|
export declare function ensureStartNodeComponent(components: any[], label?: string): void;
|
|
17
21
|
export interface RuntimeComponentAdapterOptions {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface NodeTitleLayout {
|
|
2
|
+
width: number;
|
|
3
|
+
textWidth: number;
|
|
4
|
+
label: string;
|
|
5
|
+
title: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function estimateNodeTextWidth(value: string, fontSize?: number): number;
|
|
8
|
+
export declare function layoutNodeTitle(value: unknown, options?: {
|
|
9
|
+
minWidth?: number;
|
|
10
|
+
maxWidth?: number;
|
|
11
|
+
padding?: number;
|
|
12
|
+
measure?: (text: string) => number;
|
|
13
|
+
}): NodeTitleLayout;
|
|
14
|
+
export declare function getNodeEdges(node: any): any[];
|
|
15
|
+
export declare function isExistingOutgoingEdge(node: any, edgeId?: string): boolean;
|
|
16
|
+
export declare function hasOtherConnection(source: any, target: any, edgeId?: string): boolean;
|
|
17
|
+
export declare function canConnectInput(source: any, edgeId?: string): boolean;
|
|
18
|
+
export declare function stripNodePresentationProperties<T extends {
|
|
19
|
+
properties?: Record<string, any>;
|
|
20
|
+
}>(data: T): T;
|
|
21
|
+
export declare function finiteDebugTimestamp(value: unknown): number | undefined;
|
|
@@ -5,5 +5,5 @@ export interface LogicFlowNodeTheme {
|
|
|
5
5
|
export declare function resolveLogicFlowNodeRadius(lf: any): number;
|
|
6
6
|
export declare function deriveDarkNodeBackground(color: string): string;
|
|
7
7
|
export declare function resolveLogicFlowNodeTheme(lf: any): LogicFlowNodeTheme;
|
|
8
|
-
export declare function resolveLogicFlowNodeBackground(lf: any, color: string): string;
|
|
8
|
+
export declare function resolveLogicFlowNodeBackground(lf: any, color: string, view?: Record<string, any>): string;
|
|
9
9
|
export declare function refreshLogicFlowNodeTheme(lf: any, themeName: string): void;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ApiCacheKey, ApiCustomFetch, ApiRequestHeaders } from '../api/types';
|
|
2
|
+
export interface PointTemplateActionsContext {
|
|
3
|
+
opts: {
|
|
4
|
+
apiBase?: string;
|
|
5
|
+
locale?: string;
|
|
6
|
+
theme?: string;
|
|
7
|
+
fetchHeaders?: ApiRequestHeaders;
|
|
8
|
+
customFetch?: ApiCustomFetch;
|
|
9
|
+
fetchTimeout?: number;
|
|
10
|
+
apiCacheKey?: ApiCacheKey;
|
|
11
|
+
};
|
|
12
|
+
t?(key: string, params?: Record<string, string>): string;
|
|
13
|
+
i18n?: {
|
|
14
|
+
getLocale(): string;
|
|
15
|
+
};
|
|
16
|
+
core?: {
|
|
17
|
+
theme?: {
|
|
18
|
+
onChange(callback: (themeName: string, isDark: boolean) => void): () => void;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
_currentTheme?: string;
|
|
22
|
+
capabilities?: {
|
|
23
|
+
editor?: {
|
|
24
|
+
readOnly?: boolean;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
_getTransportGeneration?(): number;
|
|
28
|
+
_propertyDrawerRequestGeneration?: number;
|
|
29
|
+
_activeDrawerWrapper?: HTMLElement | null;
|
|
30
|
+
}
|
|
31
|
+
export interface PointTemplateActionsOptions {
|
|
32
|
+
container: HTMLElement;
|
|
33
|
+
nodeType: string;
|
|
34
|
+
getRows(): readonly Record<string, unknown>[];
|
|
35
|
+
appendRows(rows: Record<string, unknown>[]): void;
|
|
36
|
+
signal?: AbortSignal;
|
|
37
|
+
readOnly?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface PointTemplateActions {
|
|
40
|
+
refreshLocale(): void;
|
|
41
|
+
destroy(): void;
|
|
42
|
+
}
|
|
43
|
+
export declare function mountPointTemplateActions(ctx: PointTemplateActionsContext, options: PointTemplateActionsOptions): PointTemplateActions;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type FieldValidationTranslator } from '../core/field-protocol';
|
|
2
|
+
import type { ComponentField } from '../types/component';
|
|
3
|
+
export declare function collectPropertyFieldDraft(original: Record<string, unknown>, initial: Record<string, unknown>, current: Record<string, unknown>, fields: ComponentField[], touched?: ReadonlySet<string>, parseJsonText?: boolean, parentPath?: string): Record<string, unknown>;
|
|
4
|
+
export declare function readPropertySelectValue(field: ComponentField, raw: unknown, original?: unknown): unknown;
|
|
5
|
+
export declare function validatePropertyFieldValue(field: ComponentField, value: unknown, t?: FieldValidationTranslator): string[];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type LocaleMessages } from '../core/I18nManager';
|
|
2
|
+
export type JevQuestionType = 'choice' | 'noul' | 'score';
|
|
3
|
+
export interface JevQuestionOption {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface JevQuestion {
|
|
9
|
+
id: string;
|
|
10
|
+
type: JevQuestionType | (string & {});
|
|
11
|
+
question: string;
|
|
12
|
+
options?: JevQuestionOption[];
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
}
|
|
15
|
+
export interface QuestionListEditorOptions {
|
|
16
|
+
value?: readonly JevQuestion[] | null;
|
|
17
|
+
readOnly?: boolean;
|
|
18
|
+
theme?: string;
|
|
19
|
+
locale?: string;
|
|
20
|
+
locales?: Record<string, LocaleMessages>;
|
|
21
|
+
t?: (key: string, params?: Record<string, string>) => string;
|
|
22
|
+
label?: string;
|
|
23
|
+
description?: string;
|
|
24
|
+
onChange?: (value: JevQuestion[]) => void;
|
|
25
|
+
onDirty?: () => void;
|
|
26
|
+
confirmDelete?: (message: string, signal: AbortSignal) => boolean | Promise<boolean>;
|
|
27
|
+
}
|
|
28
|
+
export interface QuestionListEditor {
|
|
29
|
+
element: HTMLElement;
|
|
30
|
+
getValue(): JevQuestion[];
|
|
31
|
+
setValue(value: readonly JevQuestion[] | null | undefined): void;
|
|
32
|
+
render(options?: QuestionListEditorOptions): void;
|
|
33
|
+
destroy(): void;
|
|
34
|
+
}
|
|
35
|
+
export declare function mountQuestionListEditor(container: HTMLElement, initial?: QuestionListEditorOptions): QuestionListEditor;
|
|
@@ -9,12 +9,23 @@ export interface SharedNodeManagerContext {
|
|
|
9
9
|
status: 401 | 403;
|
|
10
10
|
url: string;
|
|
11
11
|
}) => void;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
mode?: string;
|
|
15
|
+
};
|
|
16
|
+
readOnly?: boolean;
|
|
17
|
+
capabilities?: {
|
|
18
|
+
editor?: {
|
|
19
|
+
readOnly?: boolean;
|
|
20
|
+
};
|
|
21
|
+
mode?: string;
|
|
12
22
|
};
|
|
13
23
|
components?: unknown[];
|
|
14
24
|
_nodeComponents?: Record<string, unknown>;
|
|
15
25
|
connectionStatus?: Pick<ConnectionStatusStore, 'getState' | 'subscribe'>;
|
|
16
26
|
serverStatus?: import('../core/server-status').ServerStatusStore;
|
|
17
27
|
t(key: string, params?: Record<string, string>): string;
|
|
28
|
+
_dialogProvider?: import('../core/DialogProvider').DialogProvider;
|
|
18
29
|
acquireSharedConnectionStatuses?(): () => void;
|
|
19
30
|
reloadComponents?(options?: {
|
|
20
31
|
forceRefresh?: boolean;
|
|
@@ -24,8 +35,11 @@ export interface SharedNodeManagerContext {
|
|
|
24
35
|
export interface SharedNodeManager {
|
|
25
36
|
activate(): void;
|
|
26
37
|
deactivate(): void;
|
|
38
|
+
reload(): Promise<boolean>;
|
|
39
|
+
refresh(): void;
|
|
27
40
|
destroy(): void;
|
|
28
41
|
isDirty(): boolean;
|
|
29
42
|
requestClose(): Promise<boolean>;
|
|
43
|
+
reload(): Promise<boolean>;
|
|
30
44
|
}
|
|
31
45
|
export declare function createSharedNodeManager(ctx: SharedNodeManagerContext, root: HTMLElement): SharedNodeManager;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ThemeManager } from '../core/ThemeManager';
|
|
2
|
+
type ThemeOwner = {
|
|
3
|
+
core?: {
|
|
4
|
+
theme?: ThemeManager;
|
|
5
|
+
} | null;
|
|
6
|
+
rootEl?: HTMLElement | null;
|
|
7
|
+
_activeDrawerWrapper?: HTMLElement | null;
|
|
8
|
+
_activeModalWrapper?: HTMLElement | null;
|
|
9
|
+
_currentTheme?: string;
|
|
10
|
+
opts?: {
|
|
11
|
+
theme?: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export declare function bindThemeScope(element: HTMLElement, owner?: ThemeOwner | HTMLElement | null): () => void;
|
|
15
|
+
export {};
|
|
@@ -8,6 +8,10 @@ export declare const THEME_PRESETS: Record<string, ThemeVars>;
|
|
|
8
8
|
export declare function getCoreThemeVariables(themeId: string): Record<string, string>;
|
|
9
9
|
export declare function getThemeRuntimeVariables(themeId?: string | null): Record<string, string>;
|
|
10
10
|
export declare function getCoreThemeDefinition(themeId: string): CoreThemeDefinition;
|
|
11
|
+
export declare const AUTO_THEME_ID = "auto";
|
|
12
|
+
export declare function isAutoTheme(theme?: string | null): boolean;
|
|
13
|
+
export declare function resolveAutoTheme(darkTheme?: string, lightTheme?: string): string;
|
|
14
|
+
export declare function setupAutoThemeListener(callback: (resolvedThemeId: string) => void, darkTheme?: string, lightTheme?: string): () => void;
|
|
11
15
|
export declare function normalizeEditorTheme(theme?: string | null): string;
|
|
12
16
|
export declare function getThemeCSS(): string;
|
|
13
17
|
export declare function getThemeList(locale: string): Array<{
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { VariableCompletionItem, VariableCompletionSource } from '../core/variable-completion';
|
|
2
|
+
export interface VariableCompletionDropdownHandle {
|
|
3
|
+
destroy(): void;
|
|
4
|
+
}
|
|
5
|
+
export interface VariableCompletionDropdownOptions {
|
|
6
|
+
signal?: AbortSignal;
|
|
7
|
+
beforeQuery?: () => void;
|
|
8
|
+
getSchemaFields?: () => VariableCompletionItem[];
|
|
9
|
+
getDetail?: (item: VariableCompletionItem) => string;
|
|
10
|
+
}
|
|
11
|
+
export declare function attachVariableCompletion(input: HTMLInputElement | HTMLTextAreaElement, source: VariableCompletionSource, options?: VariableCompletionDropdownOptions): VariableCompletionDropdownHandle;
|
|
12
|
+
export declare function fieldSupportsVariables(field: {
|
|
13
|
+
component?: {
|
|
14
|
+
type?: string;
|
|
15
|
+
};
|
|
16
|
+
type?: string;
|
|
17
|
+
name?: string;
|
|
18
|
+
}): boolean;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export interface FieldValidation {
|
|
2
|
+
type?: 'number' | 'integer' | 'string' | string;
|
|
3
|
+
min?: number;
|
|
4
|
+
max?: number;
|
|
2
5
|
required?: boolean;
|
|
3
6
|
minLength?: number;
|
|
4
7
|
maxLength?: number;
|
|
@@ -9,8 +12,14 @@ export interface FieldValidation {
|
|
|
9
12
|
export type FieldDependencyOperator = 'notEmpty' | 'empty' | 'eq' | 'ne' | 'in' | 'prefix';
|
|
10
13
|
export interface FieldDependency {
|
|
11
14
|
field: string;
|
|
12
|
-
operator
|
|
15
|
+
operator?: FieldDependencyOperator;
|
|
13
16
|
value?: unknown;
|
|
17
|
+
eq?: unknown;
|
|
18
|
+
ne?: unknown;
|
|
19
|
+
in?: unknown[];
|
|
20
|
+
prefix?: string;
|
|
21
|
+
empty?: boolean;
|
|
22
|
+
notEmpty?: boolean;
|
|
14
23
|
}
|
|
15
24
|
export interface FieldAttachment {
|
|
16
25
|
field?: string;
|
|
@@ -33,6 +42,9 @@ export interface ComponentFieldControl {
|
|
|
33
42
|
type?: string;
|
|
34
43
|
caseType?: string;
|
|
35
44
|
source?: string;
|
|
45
|
+
nodePicker?: boolean;
|
|
46
|
+
allowSelf?: boolean;
|
|
47
|
+
requireNode?: boolean;
|
|
36
48
|
onChange?: string;
|
|
37
49
|
options?: ComponentFieldControlOption[];
|
|
38
50
|
multiple?: boolean;
|
|
@@ -42,6 +54,9 @@ export interface ComponentFieldControl {
|
|
|
42
54
|
placeholder?: string;
|
|
43
55
|
disabled?: boolean;
|
|
44
56
|
rows?: number;
|
|
57
|
+
min?: number;
|
|
58
|
+
max?: number;
|
|
59
|
+
step?: number;
|
|
45
60
|
[key: string]: unknown;
|
|
46
61
|
}
|
|
47
62
|
export interface ComponentFieldOption {
|
|
@@ -83,6 +98,10 @@ export interface ComponentField {
|
|
|
83
98
|
options?: ComponentFieldControlOption[];
|
|
84
99
|
rules?: unknown[];
|
|
85
100
|
ref?: 'primary' | 'shared' | string;
|
|
101
|
+
refNodes?: string[];
|
|
102
|
+
poolRefNodes?: string[];
|
|
103
|
+
jsonText?: boolean;
|
|
104
|
+
placeholder?: string;
|
|
86
105
|
tableColumn?: boolean;
|
|
87
106
|
addrPrefix?: string;
|
|
88
107
|
providerType?: 'chat' | 'embedding' | string;
|
|
@@ -110,7 +129,9 @@ export interface ComponentDefinition {
|
|
|
110
129
|
dynamicFields?: DynamicFieldsDefinition;
|
|
111
130
|
capabilities?: Record<string, unknown>;
|
|
112
131
|
relationTypes: string[];
|
|
132
|
+
relationTypeAllowCreate?: boolean;
|
|
113
133
|
color?: string;
|
|
134
|
+
themeColorMode?: 'theme' | 'fixed';
|
|
114
135
|
nodeType?: string;
|
|
115
136
|
notInput?: boolean;
|
|
116
137
|
notOutput?: boolean;
|
package/dist/types/editor.d.ts
CHANGED
|
@@ -5,6 +5,46 @@ import type { FieldCapabilityHandler } from '../core/FieldCapabilityRegistry';
|
|
|
5
5
|
import type { OptionSourceResolver } from '../core/OptionSourceRegistry';
|
|
6
6
|
import type { FieldChangeHandler } from '../core/FieldChangeRegistry';
|
|
7
7
|
import type { ComponentDocProvider } from '../core/ComponentDocService';
|
|
8
|
+
import type { EditorHeaderOptions as HeaderPresentationOptions } from '../core/editor-capabilities';
|
|
9
|
+
import type { EditorDockState } from '../core/editor-dock';
|
|
10
|
+
import type { EditorPanelDefinition, EditorPanelState } from '../core/editor-panel';
|
|
11
|
+
import type { HuanbanRulegoEditor } from '../standalone/HuanbanRulegoEditor';
|
|
12
|
+
export type EditorRegionId = 'header' | 'toolbar.top' | 'workspace.tabs' | 'dock.left' | 'dock.right' | 'dock.bottom' | 'dock.ai' | 'toolbar.canvas' | 'canvas.overlay' | 'status' | 'overlay.host';
|
|
13
|
+
export interface EditorHeaderBadge {
|
|
14
|
+
id: string;
|
|
15
|
+
label: string;
|
|
16
|
+
title?: string;
|
|
17
|
+
visible?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface EditorHeaderOptions extends HeaderPresentationOptions {
|
|
20
|
+
badges?: readonly EditorHeaderBadge[];
|
|
21
|
+
}
|
|
22
|
+
export interface EditorRegionContext {
|
|
23
|
+
editor: HuanbanRulegoEditor;
|
|
24
|
+
regionId: EditorRegionId;
|
|
25
|
+
panelId?: string;
|
|
26
|
+
panel?: EditorPanelDefinition;
|
|
27
|
+
chainId: string | null;
|
|
28
|
+
locale: string;
|
|
29
|
+
theme: string;
|
|
30
|
+
readonly: boolean;
|
|
31
|
+
signal: AbortSignal;
|
|
32
|
+
dockState: Readonly<EditorDockState>;
|
|
33
|
+
panelState: Readonly<EditorPanelState>;
|
|
34
|
+
mountPanel?: (panelId: string, container: HTMLElement) => () => void;
|
|
35
|
+
}
|
|
36
|
+
export interface EditorRegionMount {
|
|
37
|
+
update?(context: EditorRegionContext): void;
|
|
38
|
+
destroy(): void;
|
|
39
|
+
}
|
|
40
|
+
export interface EditorRegionRenderer {
|
|
41
|
+
mount(container: HTMLElement, context: EditorRegionContext): EditorRegionMount;
|
|
42
|
+
}
|
|
43
|
+
export type EditorRegionRenderers = Partial<Record<EditorRegionId, EditorRegionRenderer | undefined>>;
|
|
44
|
+
export type EditorPanelRenderers = Record<string, EditorRegionRenderer | undefined>;
|
|
45
|
+
export interface EditorHostPanelDefinition extends EditorPanelDefinition {
|
|
46
|
+
defaultOpen?: boolean;
|
|
47
|
+
}
|
|
8
48
|
export interface ApiEndpoints {
|
|
9
49
|
componentsApi: string;
|
|
10
50
|
ruleApi: string;
|
|
@@ -55,6 +95,7 @@ export interface AiProviderOption {
|
|
|
55
95
|
[key: string]: unknown;
|
|
56
96
|
}
|
|
57
97
|
export interface EditorOptions {
|
|
98
|
+
exportDataTransform?: (data: RuleChainData) => RuleChainData | void;
|
|
58
99
|
container?: string | HTMLElement;
|
|
59
100
|
url?: string;
|
|
60
101
|
endpoints?: Partial<ApiEndpoints>;
|
|
@@ -2,11 +2,29 @@ export interface RelationOption {
|
|
|
2
2
|
label: string;
|
|
3
3
|
value: string;
|
|
4
4
|
}
|
|
5
|
+
export declare function getEdgeRouterValues(edgeOrModel: any): string[];
|
|
6
|
+
export declare function getEdgeRelationValues(edgeOrModel: any, endpoint?: boolean): string[];
|
|
7
|
+
export declare function getEndpointRouters(nodeModel: any): any[];
|
|
8
|
+
export declare function getEndpointRouterPath(router: any, endpointType?: string): string;
|
|
9
|
+
export declare function getEndpointRouterKey(router: any, endpointType?: string): string;
|
|
5
10
|
export declare function normalizeRelationOptions(relationTypes: unknown): RelationOption[];
|
|
6
11
|
export declare function getSwitchCaseRelationOptions(nodeModel: any): RelationOption[];
|
|
7
12
|
export declare function getMsgTypeSwitchRelationOptions(nodeModel: any): RelationOption[];
|
|
8
13
|
export declare function getEndpointRouterRelationOptions(nodeModel: any): RelationOption[];
|
|
9
|
-
export declare function getRelationOptionsForNode(nodeView: any, nodeModel: any): RelationOption[];
|
|
14
|
+
export declare function getRelationOptionsForNode(nodeView: any, nodeModel: any, currentValues?: string[], translateRelationType?: (value: string) => string): RelationOption[];
|
|
15
|
+
export declare function getAvailableEndpointRouterOptions(edges: any[], nodeModel: any, currentEdgeId?: string): RelationOption[];
|
|
16
|
+
export interface EdgeRelationUpdate {
|
|
17
|
+
model: Record<string, any>;
|
|
18
|
+
text: string;
|
|
19
|
+
removedValues: string[];
|
|
20
|
+
requiresConfirmation: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare function buildEdgeRelationUpdate(edgeOrModel: any, values: string[], options?: {
|
|
23
|
+
endpoint?: boolean;
|
|
24
|
+
nodeView?: any;
|
|
25
|
+
nodeModel?: any;
|
|
26
|
+
splitToken?: string;
|
|
27
|
+
}): EdgeRelationUpdate;
|
|
10
28
|
export declare function resolveRelationLabel(value: unknown, nodeView?: any, nodeModel?: any): string;
|
|
11
29
|
export declare function parseRelationValues(value: unknown, splitToken?: string, relationOptions?: RelationOption[]): string[];
|
|
12
30
|
export declare function parseNodeIds(value: unknown): string[];
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const HUANBAN_RULEGO_EDITOR_VERSION = "
|
|
2
|
-
export declare const EDITOR_VERSION = "
|
|
1
|
+
export declare const HUANBAN_RULEGO_EDITOR_VERSION = "2.0.0";
|
|
2
|
+
export declare const EDITOR_VERSION = "2.0.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@huanban/rulego-editor-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "RuleGo 规则链编辑器核心库 - 框架无关的 Headless 编辑器引擎 + API 抽象层 (WorkflowFetcher)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"@codemirror/theme-one-dark": "^6.1.3",
|
|
68
68
|
"@codemirror/view": "^6.40.0",
|
|
69
69
|
"@lezer/javascript": "^1.5.4",
|
|
70
|
-
"@logicflow/core": "2.
|
|
71
|
-
"@logicflow/extension": "2.1
|
|
70
|
+
"@logicflow/core": "2.2.5",
|
|
71
|
+
"@logicflow/extension": "2.3.1",
|
|
72
72
|
"codemirror": "^6.0.2",
|
|
73
73
|
"croner": "^10.0.1",
|
|
74
74
|
"highlight.js": "^11.11.1",
|
package/vite-chunks.mjs
CHANGED
|
@@ -8,6 +8,10 @@ const CORE_CHUNKS = [
|
|
|
8
8
|
'vendor-logicflow-utils',
|
|
9
9
|
'vendor-codemirror',
|
|
10
10
|
'vendor-jsondiff',
|
|
11
|
+
'vendor-highlight',
|
|
12
|
+
'editor-core-api',
|
|
13
|
+
'editor-core-canvas-nodes',
|
|
14
|
+
'editor-core-settings',
|
|
11
15
|
'editor-core-icons',
|
|
12
16
|
'editor-core-default-components',
|
|
13
17
|
'editor-core-locales',
|
|
@@ -21,6 +25,64 @@ const CORE_CHUNKS = [
|
|
|
21
25
|
'editor-core-standalone',
|
|
22
26
|
]
|
|
23
27
|
|
|
28
|
+
// Keep each dependency layer together. Splitting just its entry module lets
|
|
29
|
+
// Rollup assign shared dependencies to a caller and creates circular chunks.
|
|
30
|
+
// The mutually dependent dialog/toolbar/action modules stay in their existing
|
|
31
|
+
// chunk; these lower-level groups do not import that interaction layer.
|
|
32
|
+
const SOURCE_CHUNK_MODULES = {
|
|
33
|
+
'editor-core-canvas-nodes': [
|
|
34
|
+
'standalone/custom-nodes.ts',
|
|
35
|
+
'core/global-config.ts',
|
|
36
|
+
'core/toolbar-icons.ts',
|
|
37
|
+
'core/group-protocol.ts',
|
|
38
|
+
'utils/relation-utils.ts',
|
|
39
|
+
'standalone/node-definitions.ts',
|
|
40
|
+
'standalone/ai-providers.ts',
|
|
41
|
+
'standalone/logger.ts',
|
|
42
|
+
'standalone/outline-style.ts',
|
|
43
|
+
'standalone/node-renderer-utils.ts',
|
|
44
|
+
'standalone/node-copy.ts',
|
|
45
|
+
'standalone/node-theme.ts',
|
|
46
|
+
'standalone/group-node.ts',
|
|
47
|
+
'standalone/editor-sidebar.ts',
|
|
48
|
+
'core/I18nManager.ts',
|
|
49
|
+
'utils/pinyin-search.ts',
|
|
50
|
+
'core/component-palette.ts',
|
|
51
|
+
'core/virtual-window.ts',
|
|
52
|
+
],
|
|
53
|
+
'editor-core-api': [
|
|
54
|
+
'api/ApiProvider.ts',
|
|
55
|
+
'core/server-status.ts',
|
|
56
|
+
'core/StateStore.ts',
|
|
57
|
+
'api/RuleChainAPI.ts',
|
|
58
|
+
'api/types.ts',
|
|
59
|
+
],
|
|
60
|
+
'editor-core-settings': [
|
|
61
|
+
'standalone/editor-run-analysis.ts',
|
|
62
|
+
'core/run-analysis.ts',
|
|
63
|
+
'core/rule-chain-versions.ts',
|
|
64
|
+
'core/save-conflict.ts',
|
|
65
|
+
'standalone/run-history-format.ts',
|
|
66
|
+
'core/runtime-limits.ts',
|
|
67
|
+
'standalone/editor-toast.ts',
|
|
68
|
+
'standalone/theme-scope.ts',
|
|
69
|
+
'core/ThemeManager.ts',
|
|
70
|
+
'standalone/editor-global-config.ts',
|
|
71
|
+
'api/GlobalConfigAPI.ts',
|
|
72
|
+
'standalone/auth-fetch.ts',
|
|
73
|
+
'standalone/shared-node-manager.ts',
|
|
74
|
+
'standalone/editor-dialog-provider.ts',
|
|
75
|
+
'core/clean-snapshot.ts',
|
|
76
|
+
'standalone/drawer-unsaved-guard.ts',
|
|
77
|
+
'core/DialogProvider.ts',
|
|
78
|
+
'core/dialog-styles.ts',
|
|
79
|
+
'core/connection-status.ts',
|
|
80
|
+
],
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const SOURCE_CHUNKS = new Map(Object.entries(SOURCE_CHUNK_MODULES)
|
|
84
|
+
.flatMap(([chunk, modules]) => modules.map(module => [module, chunk])))
|
|
85
|
+
|
|
24
86
|
/**
|
|
25
87
|
* Packages that should resolve to one host-side instance when a consumer
|
|
26
88
|
* aliases the editor to source during development. This is intentionally
|
|
@@ -91,6 +153,10 @@ export function huanbanRulegoEditorManualChunks(id) {
|
|
|
91
153
|
}
|
|
92
154
|
if (normalized.includes('/node_modules/@codemirror/') || normalized.includes('/node_modules/codemirror/') || normalized.includes('/node_modules/@lezer/')) return 'vendor-codemirror'
|
|
93
155
|
if (normalized.includes('/node_modules/jsondiffpatch/')) return 'vendor-jsondiff'
|
|
156
|
+
if (normalized.includes('/node_modules/highlight.js/')) return 'vendor-highlight'
|
|
157
|
+
|
|
158
|
+
const sourceChunk = SOURCE_CHUNKS.get(normalized.split('/packages/editor-core/src/')[1])
|
|
159
|
+
if (sourceChunk) return sourceChunk
|
|
94
160
|
|
|
95
161
|
if (normalized.includes('/packages/editor-core/src/iconRegistry')) return 'editor-core-icons'
|
|
96
162
|
if (normalized.includes('/packages/editor-core/src/defaults/components')) return 'editor-core-default-components'
|