import * as _flowgram_ai_core from '@flowgram.ai/core'; import { WorkflowNodeEntity } from '@flowgram.ai/free-layout-core'; /** * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates * SPDX-License-Identifier: MIT */ interface StackingContext { hoveredEntityID?: string; selectedNodes: WorkflowNodeEntity[]; selectedIDs: Set; sortNodes: (nodes: WorkflowNodeEntity[]) => WorkflowNodeEntity[]; } interface StackContextManagerOptions { sortNodes: (nodes: WorkflowNodeEntity[]) => WorkflowNodeEntity[]; } type FreeStackPluginOptions = Partial; /** * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates * SPDX-License-Identifier: MIT */ declare const createFreeStackPlugin: _flowgram_ai_core.PluginCreator>; /** * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates * SPDX-License-Identifier: MIT */ declare class StackingContextManager { private readonly document; private readonly entityManager; private readonly pipelineRenderer; private readonly pipelineRegistry; private readonly hoverService; private readonly selectService; readonly node: HTMLDivElement; private options; private disposers; constructor(); init(options?: Partial): void; ready(): void; dispose(): void; /** * 触发计算 * 10ms内仅计算一次 */ private compute; private _compute; private get nodes(); private get lines(); private get context(); private mountListener; private onZoom; private onHover; private onEntityChange; private onSelect; } /** * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates * SPDX-License-Identifier: MIT */ declare const BASE_Z_INDEX = 8; /** * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates * SPDX-License-Identifier: MIT */ declare class StackingComputing { private currentLevel; private topLevel; private maxLevel; private nodeIndexes; private nodeLevel; private lineLevel; private selectedNodeParentSet; private context; compute(params: { root: WorkflowNodeEntity; nodes: WorkflowNodeEntity[]; context: StackingContext; }): { /** 节点层级 */ nodeLevel: Map; /** 线条层级 */ lineLevel: Map; /** 正常渲染的最高层级 */ topLevel: number; /** 选中计算叠加后可能计算出的最高层级 */ maxLevel: number; }; private clearCache; private computeNodeIndexesMap; private computeSelectedNodeParentSet; private getNodeParents; private computeTopLevel; private layerHandler; private sortNodes; private getNodesAllLines; private isHigherFirstLine; private getLevel; private levelIncrease; } export { BASE_Z_INDEX, type FreeStackPluginOptions, type StackContextManagerOptions, StackingComputing, type StackingContext, StackingContextManager, createFreeStackPlugin };