@flowgram-vue/fixed-layout-editor 0.2.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/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
4
+ Copyright (c) 2026 Crayon
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/dist/index.cjs ADDED
Binary file
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/preset/fixed-layout-props.ts","../src/utils/compose.ts","../src/types.ts","../src/services/flow-operation-service.ts","../src/services/history-operation-service.ts","../src/plugins/create-operation-plugin.ts","../src/preset/node-serialize.ts","../src/preset/fixed-layout-preset.ts","../src/components/fixed-layout-editor-provider.vue","../src/components/fixed-layout-editor.vue","../src/hooks/use-node-render.ts","../src/hooks/use-playground-tools.ts","../src/hooks/use-client-context.ts"],"names":["PluginContext","FixedLayoutProps","EditorProps","FlowOperationBaseServiceImpl","FlowNodeFormData","isFormModelV2","inject","FlowGroupService","injectable","OperationType","FixedHistoryService","HistoryService","FlowDocument","postConstruct","definePluginCreator","node","createShortcutsPlugin","SelectionService","Command","FlowNodeEntity","createSelectBoxPlugin","createFixedDragPlugin","createDefaultPreset","createVariablePlugin","createFixedHistoryPlugin","createPlaygroundPlugin","FixedLayoutContainerModule","FlowDocumentOptions","FlowDocumentOptionsDefault","ctx","FlowNodesContentLayer","FlowNodesTransformLayer","FlowScrollLimitLayer","FlowScrollBarLayer","createPlaygroundVuePreset","ref","createPluginContextDefault","ClipboardService","Playground","_createBlock","_renderSlot","_mergeProps","_withCtx","_createVNode","PlaygroundEntityContextKey","FlowNodeRenderData","useStartDragNode","usePlayground","FlowNodeBaseType","useService","getNodeForm","useObserve","onBeforeUnmount","usePlaygroundContainer","FlowLayoutDefault","EditorState","DisposableCollection","watch","reactive","computed"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBO,IAAM,wBAAA,GAA2BA;AAiDvBC;AAAA,CAAV,CAAUA,iBAAAA,KAAV;AAIE,EAAMA,kBAAA,OAAA,GAA4B;AAAA,IACvC,GAAGC,kBAAA,CAAY,OAAA;AAAA,IACf,MAAA,EAAQ;AAAA,MACN,iBAAA,EAAmB;AAAA;AACrB,GACF;AAAA,CAAA,EATeD,wBAAA,KAAAA,wBAAA,GAAA,EAAA,CAAA,CAAA;;;AChEV,IAAM,OAAA,GACX,CAAI,MAAA,KACJ,CAAC,MAAsB,IAAA,KAAmB;AACxC,EAAA,MAAM,IAAA,GAAO,MAAA,CAAO,MAAA,CAAO,OAAO,CAAA;AAClC,EAAA,IAAI,CAAC,KAAK,MAAA,EAAQ;AAChB,IAAA,OAAO,IAAA;AAAA,EACT;AACA,EAAA,OAAO,IAAA,CAAK,OAAO,CAAC,GAAA,EAAU,OAAO,EAAA,CAAG,IAAA,EAAM,GAAG,CAAA,EAAG,IAAI,CAAA;AAC1D,CAAA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MAAA,MAAM,MAAA,GAAS,WAAW,MAAA,CAAO,MAAA;AACjC,MAAA,UAAA,CAAW,OAAO,YAAA,CAAa;AAAA,QAC7B,OAAA,EAAS,OAAA,KAAY,MAAA,GAAY,OAAA,GAAU,MAAA,CAAO,OAAA;AAAA,QAClD,OAAA,EAAS,OAAA,KAAY,MAAA,GAAY,OAAA,GAAU,MAAA,CAAO;AAAA,OACnD,CAAA;AAAA,IACH,CAAA;AAAA,IACA,EAAE,WAAW,IAAA;AAAK,GACpB;AAEA,EAAA,OAAOC,YAAA,CAAS;AAAA,IACd,MAAA,EAAQ,YAAA;AAAA,IACR,OAAA,EAAS,aAAA;AAAA,IACT,OAAA,EAAS,aAAA;AAAA,IACT,UAAA,EAAY,gBAAA;AAAA,IACZ,IAAA;AAAA,IACA,YAAYC,YAAA,CAAS,MAAM,cAAc,KAAA,CAAM,IAAA,KAASL,yBAAkB,qBAAqB,CAAA;AAAA,IAC/F,YAAA;AAAA,IACA,OAAA;AAAA,IACA,OAAA;AAAA,IACA,IAAA,EAAM,UAAA;AAAA,IACN,IAAA,EAAM,UAAA;AAAA,IACN,eAAA;AAAA,IACA,kBAAA,EAAoB;AAAA,GACrB,CAAA;AACH;ACtLO,SAAS,gBAAA,GAA6C;AAC3D,EAAA,OAAOL,kBAAqCjD,oBAAa,CAAA;AAC3D","file":"index.cjs","sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { SelectBoxPluginOptions } from '@flowgram-vue/select-box-plugin';\nimport { FixedHistoryPluginOptions, HistoryService } from '@flowgram-vue/fixed-history-plugin';\nimport { type FixDragPluginOptions } from '@flowgram-vue/fixed-drag-plugin';\nimport {\n ClipboardService,\n EditorPluginContext,\n EditorProps,\n FlowDocument,\n FlowDocumentJSON,\n FlowLayoutDefault,\n SelectionService,\n PluginContext,\n FlowNodeEntity,\n FlowTransitionLine,\n FlowTransitionLabel,\n} from '@flowgram-vue/editor';\n\nimport { FlowOperationService } from '../types';\n\nexport const FixedLayoutPluginContext = PluginContext;\n\nexport interface FixedLayoutPluginTools {\n fitView: (easing?: boolean) => Promise<void>;\n}\nexport interface FixedLayoutPluginContext extends EditorPluginContext {\n document: FlowDocument;\n /**\n * 提供对画布节点相关操作方法, 并 支持 redo/undo\n */\n operation: FlowOperationService;\n clipboard: ClipboardService;\n selection: SelectionService;\n history: HistoryService;\n tools: FixedLayoutPluginTools;\n}\n\n/**\n * 固定布局配置\n */\nexport interface FixedLayoutProps extends EditorProps<FixedLayoutPluginContext, FlowDocumentJSON> {\n /**\n * SelectBox config\n */\n selectBox?: SelectBoxPluginOptions;\n /**\n * Drag/Drop config\n */\n dragdrop?: FixDragPluginOptions<FixedLayoutPluginContext>;\n /**\n * Redo/Undo enable\n */\n history?: FixedHistoryPluginOptions<FixedLayoutPluginContext> & { disableShortcuts?: boolean };\n /**\n * vertical or horizontal layout\n */\n defaultLayout?: FlowLayoutDefault | string; // 默认布局\n /**\n * Customize the node line\n * 自定义节点线条\n */\n formatNodeLines?: (node: FlowNodeEntity, lines: FlowTransitionLine[]) => FlowTransitionLine[];\n /**\n * Custom node label\n * 自定义节点 label\n */\n formatNodeLabels?: (node: FlowNodeEntity, lines: FlowTransitionLabel[]) => FlowTransitionLabel[];\n}\n\nexport namespace FixedLayoutProps {\n /**\n * 默认配置\n */\n export const DEFAULT: FixedLayoutProps = {\n ...EditorProps.DEFAULT,\n scroll: {\n enableScrollLimit: true,\n },\n } as FixedLayoutProps;\n}\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { FlowNodeEntity } from '@flowgram-vue/editor';\n\nexport type ComposeListItem<T> = (node: FlowNodeEntity, data: T[]) => T[];\n\nexport const compose =\n <T>(fnList: (ComposeListItem<T> | undefined)[]) =>\n (node: FlowNodeEntity, data: T[]): T[] => {\n const list = fnList.filter(Boolean) as ComposeListItem<T>[];\n if (!list.length) {\n return data;\n }\n return list.reduce((acc: T[], fn) => fn(node, acc), data);\n };\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport {\n FlowNodeEntity,\n FlowNodeEntityOrId,\n FlowOperationBaseService,\n} from '@flowgram-vue/editor';\n\nexport interface FlowOperationService extends FlowOperationBaseService {\n /**\n * 创建分组\n * @param nodes 节点列表\n */\n createGroup(nodes: FlowNodeEntity[]): FlowNodeEntity | undefined;\n /**\n * 取消分组\n * @param groupNode\n */\n ungroup(groupNode: FlowNodeEntity): void;\n /**\n * 开始事务\n */\n startTransaction(): void;\n /**\n * 结束事务\n */\n endTransaction(): void;\n /**\n * 修改表单数据\n * @param node 节点\n * @param path 属性路径\n * @param value 值\n */\n setFormValue(node: FlowNodeEntityOrId, path: string, value: unknown): void;\n}\n\nexport const FlowOperationService = Symbol('FlowOperationService');\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { inject, injectable } from 'inversify';\nimport {\n FlowGroupService,\n FlowNodeEntity,\n FlowNodeEntityOrId,\n FlowNodeFormData,\n FlowOperationBaseServiceImpl,\n FormModel,\n FormModelV2,\n isFormModelV2,\n} from '@flowgram-vue/editor';\n\nimport { FlowOperationService } from '../types';\n\n@injectable()\nexport class FlowOperationServiceImpl\n extends FlowOperationBaseServiceImpl\n implements FlowOperationService\n{\n @inject(FlowGroupService)\n protected groupService: FlowGroupService;\n\n createGroup(nodes: FlowNodeEntity[]): FlowNodeEntity | undefined {\n return this.groupService.createGroup(nodes);\n }\n\n ungroup(groupNode: FlowNodeEntity): void {\n return this.groupService.ungroup(groupNode);\n }\n\n setFormValue(nodeOrId: FlowNodeEntityOrId, path: string, value: unknown): void {\n const node = this.toNodeEntity(nodeOrId);\n const formModel = node?.getData(FlowNodeFormData)?.getFormModel<FormModel | FormModelV2>();\n\n if (!formModel) {\n return;\n }\n\n if (isFormModelV2(formModel)) {\n (formModel as FormModelV2).setValueIn(path, value);\n } else {\n const formItem = (formModel as FormModel).getFormItemByPath(path);\n\n if (!formItem) {\n return;\n }\n formItem.value = value;\n }\n }\n\n startTransaction(): void {}\n\n endTransaction(): void {}\n}\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { inject, injectable, postConstruct } from 'inversify';\nimport { HistoryService } from '@flowgram-vue/history';\nimport { FixedHistoryService } from '@flowgram-vue/fixed-history-plugin';\nimport {\n AddBlockConfig,\n AddOrDeleteNodeValue,\n FlowDocument,\n FlowNodeEntity,\n FlowNodeEntityOrId,\n FlowNodeJSON,\n FlowOperation,\n MoveChildNodesOperationValue,\n OnNodeAddEvent,\n OperationType,\n} from '@flowgram-vue/editor';\n\nimport { FlowOperationService } from '../types';\nimport { FlowOperationServiceImpl } from './flow-operation-service';\n\n@injectable()\nexport class HistoryOperationServiceImpl\n extends FlowOperationServiceImpl\n implements FlowOperationService\n{\n @inject(FixedHistoryService)\n protected fixedHistoryService: FixedHistoryService;\n\n @inject(HistoryService)\n protected historyService: HistoryService;\n\n @inject(FlowDocument)\n protected document: FlowDocument;\n\n @postConstruct()\n protected init() {\n this.toDispose.push(this.onNodeAdd(this.handleNodeAdd.bind(this)));\n }\n\n addFromNode(fromNode: FlowNodeEntityOrId, nodeJSON: FlowNodeJSON): FlowNodeEntity {\n return this.fixedHistoryService.addFromNode(fromNode, nodeJSON);\n }\n\n addBlock(\n target: FlowNodeEntityOrId,\n blockJSON: FlowNodeJSON,\n config: AddBlockConfig = {}\n ): FlowNodeEntity {\n const { parent, index } = config;\n return this.fixedHistoryService.addBlock(target, blockJSON, parent, index);\n }\n\n deleteNode(nodeOrId: FlowNodeEntityOrId): void {\n const node = this.toNodeEntity(nodeOrId);\n if (!node) {\n return;\n }\n this.fixedHistoryService.deleteNode(node);\n }\n\n deleteNodes(nodes: FlowNodeEntityOrId[]): void {\n const nodesEntities = nodes.map((node) =>\n typeof node === 'string' ? this.document.getNode(node) : node\n ) as FlowNodeEntity[];\n return this.fixedHistoryService.deleteNodes(nodesEntities);\n }\n\n startTransaction(): void {\n this.historyService.startTransaction();\n }\n\n endTransaction(): void {\n this.historyService.endTransaction();\n }\n\n apply(operation: FlowOperation) {\n this.historyService.pushOperation(operation);\n }\n\n protected doMoveNode(node: FlowNodeEntity, newParent: FlowNodeEntity, index: number) {\n const fromParentId = node.parent?.id;\n\n if (!fromParentId) {\n return;\n }\n\n const value: MoveChildNodesOperationValue = {\n nodeIds: [this.toId(node)],\n fromParentId: node.parent.id,\n toParentId: this.toId(newParent),\n fromIndex: this.getNodeIndex(node),\n toIndex: index,\n };\n\n return this.historyService.pushOperation({\n type: OperationType.moveChildNodes,\n value,\n });\n }\n\n protected handleNodeAdd({ data: addNodeData }: OnNodeAddEvent): FlowNodeEntity {\n const { parent, index, hidden, originParent, ...nodeJSON } = addNodeData;\n const value: AddOrDeleteNodeValue = {\n data: nodeJSON,\n parentId: parent?.id,\n index,\n hidden,\n };\n\n return this.historyService.pushOperation(\n {\n type: OperationType.addNode,\n value: value,\n uri: this.fixedHistoryService.config.getNodeURI(nodeJSON.id),\n },\n {\n noApply: true,\n }\n );\n }\n}\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { definePluginCreator } from '@flowgram-vue/core';\n\nimport { FlowOperationService } from '../types';\nimport { HistoryOperationServiceImpl } from '../services/history-operation-service';\nimport { FlowOperationServiceImpl } from '../services/flow-operation-service';\nimport { FixedLayoutProps } from '../preset';\n\nexport const createOperationPlugin = definePluginCreator<FixedLayoutProps>({\n onBind: ({ bind }, opts) => {\n bind(FlowOperationService)\n .to(opts?.history?.enable ? HistoryOperationServiceImpl : FlowOperationServiceImpl)\n .inSingletonScope();\n },\n onDispose: ctx => {\n const flowOperationService = ctx.container.get<FlowOperationService>(FlowOperationService);\n flowOperationService.dispose();\n },\n});\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { FlowNodeEntity, FlowNodeJSON, FlowNodeFormData } from '@flowgram-vue/editor';\n\nimport { FixedLayoutProps } from './fixed-layout-props';\n\nexport function fromNodeJSON(\n opts: FixedLayoutProps,\n node: FlowNodeEntity,\n json: FlowNodeJSON,\n isFirstCreate: boolean\n) {\n json = opts.fromNodeJSON ? opts.fromNodeJSON(node, json, isFirstCreate) : json;\n const formData = node.getData(FlowNodeFormData)!;\n // 如果没有使用表单引擎,将 data 数据填入 extInfo\n if (!formData) {\n if (json.data) {\n node.updateExtInfo(json.data, true);\n }\n } else {\n const defaultFormMeta = opts.nodeEngine?.createDefaultFormMeta?.(node);\n\n const formMeta = node.getNodeRegistry()?.formMeta || defaultFormMeta;\n\n if (formMeta) {\n if (isFirstCreate) {\n formData.createForm(formMeta, json.data);\n } else {\n formData.updateFormValues(json.data);\n }\n }\n }\n}\n\nexport function toNodeJSON(opts: FixedLayoutProps, node: FlowNodeEntity): FlowNodeJSON {\n const nodesMap: Record<string, FlowNodeJSON> = {};\n let startNodeJSON: FlowNodeJSON;\n node.document.traverse((node) => {\n const isSystemNode = node.id.startsWith('$');\n if (isSystemNode) return;\n const formData = node.getData(FlowNodeFormData);\n let formJSON =\n formData && formData.formModel && formData.formModel.initialized\n ? formData.toJSON()\n : undefined;\n let nodeJSON: FlowNodeJSON = {\n id: node.id,\n type: node.flowNodeType,\n data: formData ? formJSON : node.getExtInfo(),\n blocks: [],\n };\n if (opts.toNodeJSON) {\n nodeJSON = opts.toNodeJSON(node, nodeJSON);\n }\n if (!startNodeJSON) startNodeJSON = nodeJSON;\n let { parent } = node;\n if (parent && parent.id.startsWith('$')) {\n parent = parent.originParent;\n }\n const parentJSON = parent ? nodesMap[parent.id] : undefined;\n if (parentJSON) {\n parentJSON.blocks?.push(nodeJSON);\n }\n nodesMap[node.id] = nodeJSON;\n }, node);\n\n // @ts-ignore\n return startNodeJSON;\n}\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { createSelectBoxPlugin } from '@flowgram-vue/select-box-plugin';\nimport { FixedLayoutContainerModule } from '@flowgram-vue/fixed-layout-core';\nimport { FixedHistoryService, createFixedHistoryPlugin } from '@flowgram-vue/fixed-history-plugin';\nimport { createFixedDragPlugin } from '@flowgram-vue/fixed-drag-plugin';\nimport {\n PluginsProvider,\n createDefaultPreset,\n createVariablePlugin,\n createPlaygroundPlugin,\n createShortcutsPlugin,\n SelectionService,\n Command,\n Plugin,\n FlowDocument,\n FlowNodeEntity,\n FlowDocumentOptionsDefault,\n FlowDocumentOptions,\n FlowNodesContentLayer,\n FlowNodesTransformLayer,\n FlowScrollBarLayer,\n FlowScrollLimitLayer,\n createPlaygroundVuePreset,\n} from '@flowgram-vue/editor';\n\nimport { compose } from '../utils/compose';\nimport { FlowOperationService } from '../types';\nimport { createOperationPlugin } from '../plugins/create-operation-plugin';\nimport { fromNodeJSON, toNodeJSON } from './node-serialize';\nimport { FixedLayoutPluginContext, FixedLayoutProps } from './fixed-layout-props';\n\nexport function createFixedLayoutPreset(\n opts: FixedLayoutProps\n): PluginsProvider<FixedLayoutPluginContext> {\n return (ctx: FixedLayoutPluginContext) => {\n opts = { ...FixedLayoutProps.DEFAULT, ...opts };\n let plugins: Plugin[] = [createOperationPlugin(opts)];\n /**\n * 注册默认的快捷键\n */\n plugins.push(\n createShortcutsPlugin({\n registerShortcuts(registry) {\n const selection = ctx.get<SelectionService>(SelectionService);\n registry.addHandlers({\n commandId: Command.Default.DELETE,\n shortcuts: ['backspace', 'delete'],\n isEnabled: () =>\n selection.selection.length > 0 && !ctx.playground.config.readonlyOrDisabled,\n execute: () => {\n // TODO 这里要判断 CurrentEditor\n const nodes = selection.selection.filter(\n (entity) => entity instanceof FlowNodeEntity\n ) as FlowNodeEntity[];\n\n const flowOperationService = ctx.get<FlowOperationService>(FlowOperationService);\n flowOperationService.deleteNodes(nodes);\n selection.selection = selection.selection.filter((s) => !s.disposed);\n },\n });\n\n if (opts?.history?.enable) {\n const fixedHistoryService = ctx.get<FixedHistoryService>(FixedHistoryService);\n\n if (!opts.history.disableShortcuts) {\n registry.addHandlers({\n commandId: Command.Default.UNDO,\n shortcuts: ['meta z', 'ctrl z'],\n isEnabled: () => true,\n execute: () => {\n fixedHistoryService.undo();\n },\n });\n registry.addHandlers({\n commandId: Command.Default.REDO,\n shortcuts: ['meta shift z', 'ctrl shift z'],\n isEnabled: () => true,\n execute: () => {\n fixedHistoryService.redo();\n },\n });\n }\n }\n },\n }),\n /**\n * 圈选逻辑实现\n */\n createSelectBoxPlugin({\n canSelect: (e) =>\n // 需满足以下条件:\n // - 鼠标左键\n e.button === 0 &&\n !(ctx.get(FlowDocument) as FlowDocument).renderState.config.nodeHoveredId,\n ...(opts.selectBox || {}),\n }),\n /**\n * 固定布局拖拽逻辑实现\n */\n createFixedDragPlugin((opts.dragdrop || {}) as Parameters<typeof createFixedDragPlugin>[0])\n );\n /**\n * 加载默认编辑器配置\n */\n plugins = createDefaultPreset(opts, plugins)(ctx);\n /**\n * 注册 变量系统\n */\n if (opts.variableEngine?.enable) {\n plugins.push(\n createVariablePlugin({\n ...opts.variableEngine,\n layout: 'fixed',\n })\n );\n }\n /**\n * 注册 历史记录\n */\n if (opts.history?.enable) {\n plugins.push(createFixedHistoryPlugin(opts.history as Parameters<typeof createFixedHistoryPlugin>[0]));\n }\n /*\n * 加载固定布局画布模块\n * */\n plugins.push(\n createPlaygroundPlugin<FixedLayoutPluginContext>({\n containerModules: [FixedLayoutContainerModule],\n onBind(bindConfig) {\n if (!bindConfig.isBound(FlowDocumentOptions)) {\n bindConfig.bind(FlowDocumentOptions).toConstantValue({\n ...FlowDocumentOptionsDefault,\n defaultLayout: opts.defaultLayout,\n toNodeJSON: (node) => toNodeJSON(opts, node),\n fromNodeJSON: (node, json, isFirstCreate) =>\n fromNodeJSON(opts, node, json, isFirstCreate),\n allNodesDefaultExpanded: opts.allNodesDefaultExpanded,\n } as FlowDocumentOptions);\n }\n },\n onInit: (ctx) => {\n ctx.playground.registerLayers(\n FlowNodesContentLayer, // 节点内容渲染\n FlowNodesTransformLayer // 节点位置偏移计算\n );\n // 劫持节点线条\n if (opts.formatNodeLines) {\n ctx.document.options.formatNodeLines = compose([\n ctx.document.options.formatNodeLines,\n opts.formatNodeLines,\n ]);\n }\n // 劫持节点 label\n if (opts.formatNodeLabels) {\n ctx.document.options.formatNodeLabels = compose([\n ctx.document.options.formatNodeLabels,\n opts.formatNodeLabels,\n ]);\n }\n if (opts.scroll?.enableScrollLimit) {\n // 控制滚动范围\n ctx.playground.registerLayer(FlowScrollLimitLayer);\n }\n if (!opts.scroll?.disableScrollBar) {\n // 控制条\n ctx.playground.registerLayer(FlowScrollBarLayer);\n }\n if (opts.scroll?.disableScroll) {\n ctx.playground.config.scrollDisable = true;\n }\n if (opts.nodeRegistries) {\n ctx.document.registerFlowNodes(...opts.nodeRegistries);\n }\n },\n })\n );\n\n return createPlaygroundVuePreset(opts, plugins)(ctx);\n };\n}\n","<script setup lang=\"ts\">\n/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\nimport { interfaces } from 'inversify';\nimport { HistoryService } from '@flowgram-vue/history';\nimport {\n FlowDocument,\n createPluginContextDefault,\n PlaygroundVueProvider,\n ClipboardService,\n SelectionService,\n Playground,\n} from '@flowgram-vue/editor';\nimport { ref } from 'vue';\n\nimport { FlowOperationService } from '../types';\nimport {\n createFixedLayoutPreset,\n type FixedLayoutPluginContext,\n type FixedLayoutPluginTools,\n type FixedLayoutProps,\n} from '../preset';\n\ndefineOptions({ name: 'FixedLayoutEditorProvider' });\n\nconst props = defineProps<FixedLayoutProps>();\nconst providerRef = ref<FixedLayoutPluginContext | null>(null);\n\nconst preset = createFixedLayoutPreset(props);\n\nconst customPluginContext = (container: interfaces.Container) =>\n ({\n ...createPluginContextDefault(container),\n get document(): FlowDocument {\n return container.get<FlowDocument>(FlowDocument);\n },\n get operation(): FlowOperationService {\n return container.get<FlowOperationService>(FlowOperationService);\n },\n get clipboard(): ClipboardService {\n return container.get<ClipboardService>(ClipboardService);\n },\n get selection(): SelectionService {\n return container.get<SelectionService>(SelectionService);\n },\n get history(): HistoryService {\n return container.get<HistoryService>(HistoryService);\n },\n get tools(): FixedLayoutPluginTools {\n return {\n fitView: (easing?: boolean) => {\n const playgroundConfig = container.get<Playground>(Playground).config;\n const doc = container.get(FlowDocument);\n return playgroundConfig.fitView(doc.root.bounds, easing, 30);\n },\n };\n },\n }) as FixedLayoutPluginContext;\n\ndefineExpose({\n get playground() {\n return providerRef.value?.playground as FixedLayoutPluginContext['playground'];\n },\n get container() {\n return providerRef.value?.container as FixedLayoutPluginContext['container'];\n },\n get document() {\n return providerRef.value?.document as FixedLayoutPluginContext['document'];\n },\n get operation() {\n return providerRef.value?.operation as FixedLayoutPluginContext['operation'];\n },\n get clipboard() {\n return providerRef.value?.clipboard as FixedLayoutPluginContext['clipboard'];\n },\n get selection() {\n return providerRef.value?.selection as FixedLayoutPluginContext['selection'];\n },\n get history() {\n return providerRef.value?.history as FixedLayoutPluginContext['history'];\n },\n get tools() {\n return providerRef.value?.tools as FixedLayoutPluginContext['tools'];\n },\n get: ((identifier) => providerRef.value?.get(identifier)) as FixedLayoutPluginContext['get'],\n getAll: ((identifier) =>\n providerRef.value?.getAll(identifier) ?? []) as FixedLayoutPluginContext['getAll'],\n});\n</script>\n\n<template>\n <PlaygroundVueProvider\n ref=\"providerRef\"\n :plugins=\"preset\"\n :custom-plugin-context=\"customPluginContext\"\n :parent-container=\"props.parentContainer\"\n >\n <slot />\n </PlaygroundVueProvider>\n</template>\n","<script setup lang=\"ts\">\n/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\nimport { EditorRenderer } from '@flowgram-vue/editor';\nimport { ref } from 'vue';\n\nimport { type FixedLayoutPluginContext, type FixedLayoutProps } from '../preset';\nimport FixedLayoutEditorProvider from './fixed-layout-editor-provider.vue';\n\ndefineOptions({ name: 'FixedLayoutEditor' });\n\nconst props = defineProps<FixedLayoutProps>();\nconst providerRef = ref<FixedLayoutPluginContext | null>(null);\n\ndefineExpose({\n get playground() {\n return providerRef.value?.playground as FixedLayoutPluginContext['playground'];\n },\n get container() {\n return providerRef.value?.container as FixedLayoutPluginContext['container'];\n },\n get document() {\n return providerRef.value?.document as FixedLayoutPluginContext['document'];\n },\n get operation() {\n return providerRef.value?.operation as FixedLayoutPluginContext['operation'];\n },\n get clipboard() {\n return providerRef.value?.clipboard as FixedLayoutPluginContext['clipboard'];\n },\n get selection() {\n return providerRef.value?.selection as FixedLayoutPluginContext['selection'];\n },\n get history() {\n return providerRef.value?.history as FixedLayoutPluginContext['history'];\n },\n get tools() {\n return providerRef.value?.tools as FixedLayoutPluginContext['tools'];\n },\n get: ((identifier) => providerRef.value?.get(identifier)) as FixedLayoutPluginContext['get'],\n getAll: ((identifier) =>\n providerRef.value?.getAll(identifier) ?? []) as FixedLayoutPluginContext['getAll'],\n});\n</script>\n\n<template>\n <FixedLayoutEditorProvider ref=\"providerRef\" v-bind=\"props\">\n <EditorRenderer>\n <slot />\n </EditorRenderer>\n </FixedLayoutEditorProvider>\n</template>\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { inject, onBeforeUnmount } from 'vue';\n\nimport { useObserve } from '@flowgram-vue/reactive';\nimport { useStartDragNode } from '@flowgram-vue/fixed-drag-plugin';\nimport {\n usePlayground,\n FlowNodeBaseType,\n FlowNodeEntity,\n FlowNodeRenderData,\n useService,\n type Disposable,\n PlaygroundEntityContextKey,\n type NodeFormProps,\n getNodeForm,\n} from '@flowgram-vue/editor';\n\nimport { FlowOperationService } from '../types';\n\nexport interface NodeRenderReturnType {\n id: string;\n type: string | number;\n /**\n * 节点 data 数据\n */\n data: any;\n /**\n * 更新节点 data 数据\n */\n updateData: (newData: any) => void;\n /**\n * BlockOrderIcon节点,一般用于分支的第一个占位节点\n */\n isBlockOrderIcon: boolean;\n /**\n * BlockIcon 节点,一般用于带有分支的占位节点\n */\n isBlockIcon: boolean;\n /**\n * 当前节点 (如果是 icon 则会返回它的父节点)\n */\n node: FlowNodeEntity;\n /**\n * 是否在拖拽中\n */\n dragging: boolean;\n /**\n * 节点是否激活\n */\n activated: boolean;\n /**\n * 节点是否展开\n */\n expanded: boolean;\n /**\n * 触发拖拽\n * @param e\n */\n startDrag: (e: MouseEvent) => void;\n /**\n * 鼠标进入, 主要用于控制 activated 状态\n */\n onMouseEnter: (e: MouseEvent) => void;\n /**\n * 鼠标离开, 主要用于控制 activated 状态\n */\n onMouseLeave: (e: MouseEvent) => void;\n\n /**\n * 渲染表单,只有节点引擎开启才能使用\n */\n form: NodeFormProps<any> | undefined;\n\n /**\n * 获取节点的扩展数据\n */\n getExtInfo<T = any>(): T;\n\n /**\n * 更新节点的扩展数据\n * @param extInfo\n */\n updateExtInfo<T = any>(extInfo: T, fullUpdate?: boolean): void;\n\n /**\n * 展开/收起节点\n * @param expanded\n */\n toggleExpand(): void;\n\n /**\n * 删除节点\n */\n deleteNode: () => void;\n /**\n * 全局 readonly 状态\n */\n readonly: boolean;\n}\n\n/**\n * Provides methods related to node rendering\n * @param nodeFromProps\n */\nexport function useNodeRender(nodeFromProps?: FlowNodeEntity): NodeRenderReturnType {\n const renderNode =\n nodeFromProps || (inject(PlaygroundEntityContextKey, undefined) as FlowNodeEntity);\n const nodeCache = { current: undefined as FlowNodeEntity | undefined };\n const renderData = renderNode.getData<FlowNodeRenderData>(FlowNodeRenderData)!;\n const { startDrag: startDragOrigin, dragOffset } = useStartDragNode();\n const playground = usePlayground();\n const isBlockOrderIcon = renderNode.flowNodeType === FlowNodeBaseType.BLOCK_ORDER_ICON;\n const isBlockIcon = renderNode.flowNodeType === FlowNodeBaseType.BLOCK_ICON;\n const formValueDependRef = { current: false };\n formValueDependRef.current = false;\n const node =\n (isBlockOrderIcon || isBlockIcon ? renderNode.parent! : renderNode) || nodeCache.current!;\n nodeCache.current = node;\n const operationService = useService<FlowOperationService>(FlowOperationService);\n const deleteNode = () => {\n operationService.deleteNode(node);\n };\n\n const startDrag = (e: MouseEvent) => {\n startDragOrigin(\n e,\n { dragStartEntity: renderNode },\n { dragOffsetX: dragOffset.x, dragOffsetY: dragOffset.y }\n );\n };\n\n const onMouseEnter = (_e: MouseEvent) => {\n renderData.toggleMouseEnter();\n };\n\n const onMouseLeave = (_e: MouseEvent) => {\n renderData.toggleMouseLeave();\n };\n\n const toggleExpand = () => {\n renderData.toggleExpand();\n };\n\n const getExtInfo = () => node.getExtInfo() as any;\n const updateExtInfo = (data: any, fullUpdate?: boolean) => {\n node.updateExtInfo(data, fullUpdate);\n };\n const form = getNodeForm(node);\n const formState = useObserve<any>(form?.state);\n\n let extInfoDispose: Disposable | undefined;\n if (isBlockIcon || isBlockOrderIcon) {\n extInfoDispose = renderNode.parent!.onExtInfoChange(() => renderNode.renderData.fireChange());\n }\n const formValuesDispose = form?.onFormValuesChange(() => {\n if (formValueDependRef.current) {\n renderData.fireChange();\n }\n });\n onBeforeUnmount(() => {\n extInfoDispose?.dispose();\n formValuesDispose?.dispose();\n });\n\n const readonly = playground.config.readonly;\n\n return {\n id: node.id,\n type: node.flowNodeType,\n get data() {\n if (form) {\n formValueDependRef.current = true;\n return form.values;\n }\n return getExtInfo();\n },\n updateData(values: any) {\n if (form) {\n form.updateFormValues(values);\n } else {\n updateExtInfo(values, true);\n }\n },\n node,\n isBlockOrderIcon,\n isBlockIcon,\n get activated() {\n return renderData.activated;\n },\n readonly,\n get expanded() {\n return renderData.expanded;\n },\n get dragging() {\n return renderData.dragging;\n },\n startDrag,\n deleteNode,\n onMouseEnter,\n onMouseLeave,\n getExtInfo,\n updateExtInfo,\n toggleExpand,\n get form() {\n if (!form) return undefined;\n return {\n ...form,\n get values() {\n formValueDependRef.current = true;\n return form.values!;\n },\n get state() {\n return formState;\n },\n };\n },\n };\n}\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { computed, onBeforeUnmount, reactive, ref, watch } from 'vue';\n\nimport { DisposableCollection } from '@flowgram-vue/utils';\nimport { HistoryService } from '@flowgram-vue/history';\nimport {\n FlowDocument,\n FlowLayoutDefault,\n FlowNodeRenderData,\n PlaygroundInteractiveType,\n EditorState,\n usePlayground,\n usePlaygroundContainer,\n useService,\n} from '@flowgram-vue/editor';\n\nexport interface PlaygroundToolsPropsType {\n /**\n * 最大缩放比,默认 2\n */\n maxZoom?: number;\n /**\n * 最小缩放比,默认 0.25\n */\n minZoom?: number;\n}\n\nexport interface PlaygroundTools {\n /**\n * 缩放 zoom 大小比例\n */\n zoom: number;\n /**\n * 放大\n */\n zoomin: (easing?: boolean) => void;\n /**\n * 缩小\n */\n zoomout: (easing?: boolean) => void;\n /**\n * 设置缩放比例\n * @param zoom\n */\n updateZoom: (newZoom: number, easing?: boolean, easingDuration?: number) => void;\n /**\n * 自适应视区\n */\n fitView: (easing?: boolean, easingDuration?: number, padding?: number) => Promise<void>;\n /**\n * 是否垂直布局\n */\n isVertical: boolean;\n /**\n * 切换布局, 如果不传入则直接切换\n */\n changeLayout: (layout?: FlowLayoutDefault) => void;\n\n /** 交互模式:鼠标 or 触控板 */\n interactiveType: PlaygroundInteractiveType;\n setInteractiveType: (type: PlaygroundInteractiveType) => void;\n /**\n * 是否可 redo\n */\n canRedo: boolean;\n /**\n * 是否可 undo\n */\n canUndo: boolean;\n /**\n * redo\n */\n redo: () => void;\n /**\n * undo\n */\n undo: () => void;\n}\n\nexport function usePlaygroundTools(props?: PlaygroundToolsPropsType): PlaygroundTools {\n const { maxZoom, minZoom } = props || {};\n const playground = usePlayground();\n const container = usePlaygroundContainer();\n const historyService = container.isBound(HistoryService)\n ? container.get(HistoryService)\n : undefined;\n const doc = useService<FlowDocument>(FlowDocument);\n const interactiveType = ref<PlaygroundInteractiveType>('PAD');\n const zoom = ref(1);\n const currentLayout = ref(doc.layout);\n const canUndo = ref(false);\n const canRedo = ref(false);\n\n const handleFitView = (easing?: boolean, easingDuration?: number, padding?: number) => {\n padding = padding || 30;\n return playground.config.fitView(doc.root.bounds, easing, padding, easingDuration);\n };\n\n const changeLayout = (newLayout?: FlowLayoutDefault) => {\n const allNodes = doc.getAllNodes();\n newLayout =\n newLayout ||\n (doc.layout.name === FlowLayoutDefault.HORIZONTAL_FIXED_LAYOUT\n ? FlowLayoutDefault.VERTICAL_FIXED_LAYOUT\n : FlowLayoutDefault.HORIZONTAL_FIXED_LAYOUT);\n allNodes.map((node) => {\n const renderData = node.getData(FlowNodeRenderData);\n renderData.node.classList.add('gedit-transition-ease');\n });\n setTimeout(() => {\n handleFitView();\n }, 10);\n setTimeout(() => {\n allNodes.map((node) => {\n const renderData = node.getData(FlowNodeRenderData);\n renderData.node.classList.remove('gedit-transition-ease');\n });\n }, 500);\n doc.setLayout(newLayout);\n currentLayout.value = doc.layout;\n };\n\n const handleZoomOut = (easing?: boolean) => {\n playground?.config.zoomout(easing);\n };\n\n const handleZoomIn = (easing?: boolean) => {\n playground?.config.zoomin(easing);\n };\n\n const handleUpdateZoom = (value: number, easing?: boolean, easingDuration?: number) => {\n playground.config.updateZoom(value, easing, easingDuration);\n };\n\n const handleUndo = () => historyService?.undo();\n const handleRedo = () => historyService?.redo();\n\n function handleUpdateInteractiveType(nextType: PlaygroundInteractiveType) {\n if (nextType === 'MOUSE') {\n playground.editorState.changeState(EditorState.STATE_MOUSE_FRIENDLY_SELECT.id);\n } else if (nextType === 'PAD') {\n playground.editorState.changeState(EditorState.STATE_SELECT.id);\n }\n interactiveType.value = nextType;\n }\n\n const dispose = new DisposableCollection();\n if (playground) {\n dispose.push(playground.onZoom((z) => (zoom.value = z)));\n }\n if (historyService) {\n dispose.push(\n historyService.undoRedoService.onChange(() => {\n canUndo.value = historyService.canUndo();\n canRedo.value = historyService.canRedo();\n })\n );\n }\n onBeforeUnmount(() => dispose.dispose());\n\n watch(\n () => [maxZoom, minZoom],\n () => {\n const config = playground.config.config;\n playground.config.updateConfig({\n maxZoom: maxZoom !== undefined ? maxZoom : config.maxZoom,\n minZoom: minZoom !== undefined ? minZoom : config.minZoom,\n });\n },\n { immediate: true }\n );\n\n return reactive({\n zoomin: handleZoomIn,\n zoomout: handleZoomOut,\n fitView: handleFitView,\n updateZoom: handleUpdateZoom,\n zoom,\n isVertical: computed(() => currentLayout.value.name === FlowLayoutDefault.VERTICAL_FIXED_LAYOUT),\n changeLayout,\n canRedo,\n canUndo,\n undo: handleUndo,\n redo: handleRedo,\n interactiveType,\n setInteractiveType: handleUpdateInteractiveType,\n }) as PlaygroundTools;\n}\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { useService, PluginContext } from '@flowgram-vue/editor';\n\nimport { FixedLayoutPluginContext } from '../preset';\n\nexport function useClientContext(): FixedLayoutPluginContext {\n return useService<FixedLayoutPluginContext>(PluginContext);\n}\n"]}
@@ -0,0 +1 @@
1
+ export * from '../src/index';
package/dist/index.js ADDED
Binary file
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/preset/fixed-layout-props.ts","../src/utils/compose.ts","../src/types.ts","../src/services/flow-operation-service.ts","../src/services/history-operation-service.ts","../src/plugins/create-operation-plugin.ts","../src/preset/node-serialize.ts","../src/preset/fixed-layout-preset.ts","../src/components/fixed-layout-editor-provider.vue","../src/components/fixed-layout-editor.vue","../src/hooks/use-node-render.ts","../src/hooks/use-playground-tools.ts","../src/hooks/use-client-context.ts"],"names":["FixedLayoutProps","inject","FlowDocument","injectable","FlowNodeFormData","node","SelectionService","FlowNodeEntity","FixedHistoryService","ctx","ClipboardService","HistoryService","_createBlock","_renderSlot","ref","_mergeProps","_withCtx","_createVNode","usePlayground","useService","FlowLayoutDefault","FlowNodeRenderData","onBeforeUnmount","PluginContext"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;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AAA,GACrB,CAAA;AACH;ACtLO,SAAS,gBAAA,GAA6C;AAC3D,EAAA,OAAOD,WAAqCI,aAAa,CAAA;AAC3D","file":"index.js","sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { SelectBoxPluginOptions } from '@flowgram-vue/select-box-plugin';\nimport { FixedHistoryPluginOptions, HistoryService } from '@flowgram-vue/fixed-history-plugin';\nimport { type FixDragPluginOptions } from '@flowgram-vue/fixed-drag-plugin';\nimport {\n ClipboardService,\n EditorPluginContext,\n EditorProps,\n FlowDocument,\n FlowDocumentJSON,\n FlowLayoutDefault,\n SelectionService,\n PluginContext,\n FlowNodeEntity,\n FlowTransitionLine,\n FlowTransitionLabel,\n} from '@flowgram-vue/editor';\n\nimport { FlowOperationService } from '../types';\n\nexport const FixedLayoutPluginContext = PluginContext;\n\nexport interface FixedLayoutPluginTools {\n fitView: (easing?: boolean) => Promise<void>;\n}\nexport interface FixedLayoutPluginContext extends EditorPluginContext {\n document: FlowDocument;\n /**\n * 提供对画布节点相关操作方法, 并 支持 redo/undo\n */\n operation: FlowOperationService;\n clipboard: ClipboardService;\n selection: SelectionService;\n history: HistoryService;\n tools: FixedLayoutPluginTools;\n}\n\n/**\n * 固定布局配置\n */\nexport interface FixedLayoutProps extends EditorProps<FixedLayoutPluginContext, FlowDocumentJSON> {\n /**\n * SelectBox config\n */\n selectBox?: SelectBoxPluginOptions;\n /**\n * Drag/Drop config\n */\n dragdrop?: FixDragPluginOptions<FixedLayoutPluginContext>;\n /**\n * Redo/Undo enable\n */\n history?: FixedHistoryPluginOptions<FixedLayoutPluginContext> & { disableShortcuts?: boolean };\n /**\n * vertical or horizontal layout\n */\n defaultLayout?: FlowLayoutDefault | string; // 默认布局\n /**\n * Customize the node line\n * 自定义节点线条\n */\n formatNodeLines?: (node: FlowNodeEntity, lines: FlowTransitionLine[]) => FlowTransitionLine[];\n /**\n * Custom node label\n * 自定义节点 label\n */\n formatNodeLabels?: (node: FlowNodeEntity, lines: FlowTransitionLabel[]) => FlowTransitionLabel[];\n}\n\nexport namespace FixedLayoutProps {\n /**\n * 默认配置\n */\n export const DEFAULT: FixedLayoutProps = {\n ...EditorProps.DEFAULT,\n scroll: {\n enableScrollLimit: true,\n },\n } as FixedLayoutProps;\n}\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { FlowNodeEntity } from '@flowgram-vue/editor';\n\nexport type ComposeListItem<T> = (node: FlowNodeEntity, data: T[]) => T[];\n\nexport const compose =\n <T>(fnList: (ComposeListItem<T> | undefined)[]) =>\n (node: FlowNodeEntity, data: T[]): T[] => {\n const list = fnList.filter(Boolean) as ComposeListItem<T>[];\n if (!list.length) {\n return data;\n }\n return list.reduce((acc: T[], fn) => fn(node, acc), data);\n };\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport {\n FlowNodeEntity,\n FlowNodeEntityOrId,\n FlowOperationBaseService,\n} from '@flowgram-vue/editor';\n\nexport interface FlowOperationService extends FlowOperationBaseService {\n /**\n * 创建分组\n * @param nodes 节点列表\n */\n createGroup(nodes: FlowNodeEntity[]): FlowNodeEntity | undefined;\n /**\n * 取消分组\n * @param groupNode\n */\n ungroup(groupNode: FlowNodeEntity): void;\n /**\n * 开始事务\n */\n startTransaction(): void;\n /**\n * 结束事务\n */\n endTransaction(): void;\n /**\n * 修改表单数据\n * @param node 节点\n * @param path 属性路径\n * @param value 值\n */\n setFormValue(node: FlowNodeEntityOrId, path: string, value: unknown): void;\n}\n\nexport const FlowOperationService = Symbol('FlowOperationService');\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { inject, injectable } from 'inversify';\nimport {\n FlowGroupService,\n FlowNodeEntity,\n FlowNodeEntityOrId,\n FlowNodeFormData,\n FlowOperationBaseServiceImpl,\n FormModel,\n FormModelV2,\n isFormModelV2,\n} from '@flowgram-vue/editor';\n\nimport { FlowOperationService } from '../types';\n\n@injectable()\nexport class FlowOperationServiceImpl\n extends FlowOperationBaseServiceImpl\n implements FlowOperationService\n{\n @inject(FlowGroupService)\n protected groupService: FlowGroupService;\n\n createGroup(nodes: FlowNodeEntity[]): FlowNodeEntity | undefined {\n return this.groupService.createGroup(nodes);\n }\n\n ungroup(groupNode: FlowNodeEntity): void {\n return this.groupService.ungroup(groupNode);\n }\n\n setFormValue(nodeOrId: FlowNodeEntityOrId, path: string, value: unknown): void {\n const node = this.toNodeEntity(nodeOrId);\n const formModel = node?.getData(FlowNodeFormData)?.getFormModel<FormModel | FormModelV2>();\n\n if (!formModel) {\n return;\n }\n\n if (isFormModelV2(formModel)) {\n (formModel as FormModelV2).setValueIn(path, value);\n } else {\n const formItem = (formModel as FormModel).getFormItemByPath(path);\n\n if (!formItem) {\n return;\n }\n formItem.value = value;\n }\n }\n\n startTransaction(): void {}\n\n endTransaction(): void {}\n}\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { inject, injectable, postConstruct } from 'inversify';\nimport { HistoryService } from '@flowgram-vue/history';\nimport { FixedHistoryService } from '@flowgram-vue/fixed-history-plugin';\nimport {\n AddBlockConfig,\n AddOrDeleteNodeValue,\n FlowDocument,\n FlowNodeEntity,\n FlowNodeEntityOrId,\n FlowNodeJSON,\n FlowOperation,\n MoveChildNodesOperationValue,\n OnNodeAddEvent,\n OperationType,\n} from '@flowgram-vue/editor';\n\nimport { FlowOperationService } from '../types';\nimport { FlowOperationServiceImpl } from './flow-operation-service';\n\n@injectable()\nexport class HistoryOperationServiceImpl\n extends FlowOperationServiceImpl\n implements FlowOperationService\n{\n @inject(FixedHistoryService)\n protected fixedHistoryService: FixedHistoryService;\n\n @inject(HistoryService)\n protected historyService: HistoryService;\n\n @inject(FlowDocument)\n protected document: FlowDocument;\n\n @postConstruct()\n protected init() {\n this.toDispose.push(this.onNodeAdd(this.handleNodeAdd.bind(this)));\n }\n\n addFromNode(fromNode: FlowNodeEntityOrId, nodeJSON: FlowNodeJSON): FlowNodeEntity {\n return this.fixedHistoryService.addFromNode(fromNode, nodeJSON);\n }\n\n addBlock(\n target: FlowNodeEntityOrId,\n blockJSON: FlowNodeJSON,\n config: AddBlockConfig = {}\n ): FlowNodeEntity {\n const { parent, index } = config;\n return this.fixedHistoryService.addBlock(target, blockJSON, parent, index);\n }\n\n deleteNode(nodeOrId: FlowNodeEntityOrId): void {\n const node = this.toNodeEntity(nodeOrId);\n if (!node) {\n return;\n }\n this.fixedHistoryService.deleteNode(node);\n }\n\n deleteNodes(nodes: FlowNodeEntityOrId[]): void {\n const nodesEntities = nodes.map((node) =>\n typeof node === 'string' ? this.document.getNode(node) : node\n ) as FlowNodeEntity[];\n return this.fixedHistoryService.deleteNodes(nodesEntities);\n }\n\n startTransaction(): void {\n this.historyService.startTransaction();\n }\n\n endTransaction(): void {\n this.historyService.endTransaction();\n }\n\n apply(operation: FlowOperation) {\n this.historyService.pushOperation(operation);\n }\n\n protected doMoveNode(node: FlowNodeEntity, newParent: FlowNodeEntity, index: number) {\n const fromParentId = node.parent?.id;\n\n if (!fromParentId) {\n return;\n }\n\n const value: MoveChildNodesOperationValue = {\n nodeIds: [this.toId(node)],\n fromParentId: node.parent.id,\n toParentId: this.toId(newParent),\n fromIndex: this.getNodeIndex(node),\n toIndex: index,\n };\n\n return this.historyService.pushOperation({\n type: OperationType.moveChildNodes,\n value,\n });\n }\n\n protected handleNodeAdd({ data: addNodeData }: OnNodeAddEvent): FlowNodeEntity {\n const { parent, index, hidden, originParent, ...nodeJSON } = addNodeData;\n const value: AddOrDeleteNodeValue = {\n data: nodeJSON,\n parentId: parent?.id,\n index,\n hidden,\n };\n\n return this.historyService.pushOperation(\n {\n type: OperationType.addNode,\n value: value,\n uri: this.fixedHistoryService.config.getNodeURI(nodeJSON.id),\n },\n {\n noApply: true,\n }\n );\n }\n}\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { definePluginCreator } from '@flowgram-vue/core';\n\nimport { FlowOperationService } from '../types';\nimport { HistoryOperationServiceImpl } from '../services/history-operation-service';\nimport { FlowOperationServiceImpl } from '../services/flow-operation-service';\nimport { FixedLayoutProps } from '../preset';\n\nexport const createOperationPlugin = definePluginCreator<FixedLayoutProps>({\n onBind: ({ bind }, opts) => {\n bind(FlowOperationService)\n .to(opts?.history?.enable ? HistoryOperationServiceImpl : FlowOperationServiceImpl)\n .inSingletonScope();\n },\n onDispose: ctx => {\n const flowOperationService = ctx.container.get<FlowOperationService>(FlowOperationService);\n flowOperationService.dispose();\n },\n});\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { FlowNodeEntity, FlowNodeJSON, FlowNodeFormData } from '@flowgram-vue/editor';\n\nimport { FixedLayoutProps } from './fixed-layout-props';\n\nexport function fromNodeJSON(\n opts: FixedLayoutProps,\n node: FlowNodeEntity,\n json: FlowNodeJSON,\n isFirstCreate: boolean\n) {\n json = opts.fromNodeJSON ? opts.fromNodeJSON(node, json, isFirstCreate) : json;\n const formData = node.getData(FlowNodeFormData)!;\n // 如果没有使用表单引擎,将 data 数据填入 extInfo\n if (!formData) {\n if (json.data) {\n node.updateExtInfo(json.data, true);\n }\n } else {\n const defaultFormMeta = opts.nodeEngine?.createDefaultFormMeta?.(node);\n\n const formMeta = node.getNodeRegistry()?.formMeta || defaultFormMeta;\n\n if (formMeta) {\n if (isFirstCreate) {\n formData.createForm(formMeta, json.data);\n } else {\n formData.updateFormValues(json.data);\n }\n }\n }\n}\n\nexport function toNodeJSON(opts: FixedLayoutProps, node: FlowNodeEntity): FlowNodeJSON {\n const nodesMap: Record<string, FlowNodeJSON> = {};\n let startNodeJSON: FlowNodeJSON;\n node.document.traverse((node) => {\n const isSystemNode = node.id.startsWith('$');\n if (isSystemNode) return;\n const formData = node.getData(FlowNodeFormData);\n let formJSON =\n formData && formData.formModel && formData.formModel.initialized\n ? formData.toJSON()\n : undefined;\n let nodeJSON: FlowNodeJSON = {\n id: node.id,\n type: node.flowNodeType,\n data: formData ? formJSON : node.getExtInfo(),\n blocks: [],\n };\n if (opts.toNodeJSON) {\n nodeJSON = opts.toNodeJSON(node, nodeJSON);\n }\n if (!startNodeJSON) startNodeJSON = nodeJSON;\n let { parent } = node;\n if (parent && parent.id.startsWith('$')) {\n parent = parent.originParent;\n }\n const parentJSON = parent ? nodesMap[parent.id] : undefined;\n if (parentJSON) {\n parentJSON.blocks?.push(nodeJSON);\n }\n nodesMap[node.id] = nodeJSON;\n }, node);\n\n // @ts-ignore\n return startNodeJSON;\n}\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { createSelectBoxPlugin } from '@flowgram-vue/select-box-plugin';\nimport { FixedLayoutContainerModule } from '@flowgram-vue/fixed-layout-core';\nimport { FixedHistoryService, createFixedHistoryPlugin } from '@flowgram-vue/fixed-history-plugin';\nimport { createFixedDragPlugin } from '@flowgram-vue/fixed-drag-plugin';\nimport {\n PluginsProvider,\n createDefaultPreset,\n createVariablePlugin,\n createPlaygroundPlugin,\n createShortcutsPlugin,\n SelectionService,\n Command,\n Plugin,\n FlowDocument,\n FlowNodeEntity,\n FlowDocumentOptionsDefault,\n FlowDocumentOptions,\n FlowNodesContentLayer,\n FlowNodesTransformLayer,\n FlowScrollBarLayer,\n FlowScrollLimitLayer,\n createPlaygroundVuePreset,\n} from '@flowgram-vue/editor';\n\nimport { compose } from '../utils/compose';\nimport { FlowOperationService } from '../types';\nimport { createOperationPlugin } from '../plugins/create-operation-plugin';\nimport { fromNodeJSON, toNodeJSON } from './node-serialize';\nimport { FixedLayoutPluginContext, FixedLayoutProps } from './fixed-layout-props';\n\nexport function createFixedLayoutPreset(\n opts: FixedLayoutProps\n): PluginsProvider<FixedLayoutPluginContext> {\n return (ctx: FixedLayoutPluginContext) => {\n opts = { ...FixedLayoutProps.DEFAULT, ...opts };\n let plugins: Plugin[] = [createOperationPlugin(opts)];\n /**\n * 注册默认的快捷键\n */\n plugins.push(\n createShortcutsPlugin({\n registerShortcuts(registry) {\n const selection = ctx.get<SelectionService>(SelectionService);\n registry.addHandlers({\n commandId: Command.Default.DELETE,\n shortcuts: ['backspace', 'delete'],\n isEnabled: () =>\n selection.selection.length > 0 && !ctx.playground.config.readonlyOrDisabled,\n execute: () => {\n // TODO 这里要判断 CurrentEditor\n const nodes = selection.selection.filter(\n (entity) => entity instanceof FlowNodeEntity\n ) as FlowNodeEntity[];\n\n const flowOperationService = ctx.get<FlowOperationService>(FlowOperationService);\n flowOperationService.deleteNodes(nodes);\n selection.selection = selection.selection.filter((s) => !s.disposed);\n },\n });\n\n if (opts?.history?.enable) {\n const fixedHistoryService = ctx.get<FixedHistoryService>(FixedHistoryService);\n\n if (!opts.history.disableShortcuts) {\n registry.addHandlers({\n commandId: Command.Default.UNDO,\n shortcuts: ['meta z', 'ctrl z'],\n isEnabled: () => true,\n execute: () => {\n fixedHistoryService.undo();\n },\n });\n registry.addHandlers({\n commandId: Command.Default.REDO,\n shortcuts: ['meta shift z', 'ctrl shift z'],\n isEnabled: () => true,\n execute: () => {\n fixedHistoryService.redo();\n },\n });\n }\n }\n },\n }),\n /**\n * 圈选逻辑实现\n */\n createSelectBoxPlugin({\n canSelect: (e) =>\n // 需满足以下条件:\n // - 鼠标左键\n e.button === 0 &&\n !(ctx.get(FlowDocument) as FlowDocument).renderState.config.nodeHoveredId,\n ...(opts.selectBox || {}),\n }),\n /**\n * 固定布局拖拽逻辑实现\n */\n createFixedDragPlugin((opts.dragdrop || {}) as Parameters<typeof createFixedDragPlugin>[0])\n );\n /**\n * 加载默认编辑器配置\n */\n plugins = createDefaultPreset(opts, plugins)(ctx);\n /**\n * 注册 变量系统\n */\n if (opts.variableEngine?.enable) {\n plugins.push(\n createVariablePlugin({\n ...opts.variableEngine,\n layout: 'fixed',\n })\n );\n }\n /**\n * 注册 历史记录\n */\n if (opts.history?.enable) {\n plugins.push(createFixedHistoryPlugin(opts.history as Parameters<typeof createFixedHistoryPlugin>[0]));\n }\n /*\n * 加载固定布局画布模块\n * */\n plugins.push(\n createPlaygroundPlugin<FixedLayoutPluginContext>({\n containerModules: [FixedLayoutContainerModule],\n onBind(bindConfig) {\n if (!bindConfig.isBound(FlowDocumentOptions)) {\n bindConfig.bind(FlowDocumentOptions).toConstantValue({\n ...FlowDocumentOptionsDefault,\n defaultLayout: opts.defaultLayout,\n toNodeJSON: (node) => toNodeJSON(opts, node),\n fromNodeJSON: (node, json, isFirstCreate) =>\n fromNodeJSON(opts, node, json, isFirstCreate),\n allNodesDefaultExpanded: opts.allNodesDefaultExpanded,\n } as FlowDocumentOptions);\n }\n },\n onInit: (ctx) => {\n ctx.playground.registerLayers(\n FlowNodesContentLayer, // 节点内容渲染\n FlowNodesTransformLayer // 节点位置偏移计算\n );\n // 劫持节点线条\n if (opts.formatNodeLines) {\n ctx.document.options.formatNodeLines = compose([\n ctx.document.options.formatNodeLines,\n opts.formatNodeLines,\n ]);\n }\n // 劫持节点 label\n if (opts.formatNodeLabels) {\n ctx.document.options.formatNodeLabels = compose([\n ctx.document.options.formatNodeLabels,\n opts.formatNodeLabels,\n ]);\n }\n if (opts.scroll?.enableScrollLimit) {\n // 控制滚动范围\n ctx.playground.registerLayer(FlowScrollLimitLayer);\n }\n if (!opts.scroll?.disableScrollBar) {\n // 控制条\n ctx.playground.registerLayer(FlowScrollBarLayer);\n }\n if (opts.scroll?.disableScroll) {\n ctx.playground.config.scrollDisable = true;\n }\n if (opts.nodeRegistries) {\n ctx.document.registerFlowNodes(...opts.nodeRegistries);\n }\n },\n })\n );\n\n return createPlaygroundVuePreset(opts, plugins)(ctx);\n };\n}\n","<script setup lang=\"ts\">\n/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\nimport { interfaces } from 'inversify';\nimport { HistoryService } from '@flowgram-vue/history';\nimport {\n FlowDocument,\n createPluginContextDefault,\n PlaygroundVueProvider,\n ClipboardService,\n SelectionService,\n Playground,\n} from '@flowgram-vue/editor';\nimport { ref } from 'vue';\n\nimport { FlowOperationService } from '../types';\nimport {\n createFixedLayoutPreset,\n type FixedLayoutPluginContext,\n type FixedLayoutPluginTools,\n type FixedLayoutProps,\n} from '../preset';\n\ndefineOptions({ name: 'FixedLayoutEditorProvider' });\n\nconst props = defineProps<FixedLayoutProps>();\nconst providerRef = ref<FixedLayoutPluginContext | null>(null);\n\nconst preset = createFixedLayoutPreset(props);\n\nconst customPluginContext = (container: interfaces.Container) =>\n ({\n ...createPluginContextDefault(container),\n get document(): FlowDocument {\n return container.get<FlowDocument>(FlowDocument);\n },\n get operation(): FlowOperationService {\n return container.get<FlowOperationService>(FlowOperationService);\n },\n get clipboard(): ClipboardService {\n return container.get<ClipboardService>(ClipboardService);\n },\n get selection(): SelectionService {\n return container.get<SelectionService>(SelectionService);\n },\n get history(): HistoryService {\n return container.get<HistoryService>(HistoryService);\n },\n get tools(): FixedLayoutPluginTools {\n return {\n fitView: (easing?: boolean) => {\n const playgroundConfig = container.get<Playground>(Playground).config;\n const doc = container.get(FlowDocument);\n return playgroundConfig.fitView(doc.root.bounds, easing, 30);\n },\n };\n },\n }) as FixedLayoutPluginContext;\n\ndefineExpose({\n get playground() {\n return providerRef.value?.playground as FixedLayoutPluginContext['playground'];\n },\n get container() {\n return providerRef.value?.container as FixedLayoutPluginContext['container'];\n },\n get document() {\n return providerRef.value?.document as FixedLayoutPluginContext['document'];\n },\n get operation() {\n return providerRef.value?.operation as FixedLayoutPluginContext['operation'];\n },\n get clipboard() {\n return providerRef.value?.clipboard as FixedLayoutPluginContext['clipboard'];\n },\n get selection() {\n return providerRef.value?.selection as FixedLayoutPluginContext['selection'];\n },\n get history() {\n return providerRef.value?.history as FixedLayoutPluginContext['history'];\n },\n get tools() {\n return providerRef.value?.tools as FixedLayoutPluginContext['tools'];\n },\n get: ((identifier) => providerRef.value?.get(identifier)) as FixedLayoutPluginContext['get'],\n getAll: ((identifier) =>\n providerRef.value?.getAll(identifier) ?? []) as FixedLayoutPluginContext['getAll'],\n});\n</script>\n\n<template>\n <PlaygroundVueProvider\n ref=\"providerRef\"\n :plugins=\"preset\"\n :custom-plugin-context=\"customPluginContext\"\n :parent-container=\"props.parentContainer\"\n >\n <slot />\n </PlaygroundVueProvider>\n</template>\n","<script setup lang=\"ts\">\n/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\nimport { EditorRenderer } from '@flowgram-vue/editor';\nimport { ref } from 'vue';\n\nimport { type FixedLayoutPluginContext, type FixedLayoutProps } from '../preset';\nimport FixedLayoutEditorProvider from './fixed-layout-editor-provider.vue';\n\ndefineOptions({ name: 'FixedLayoutEditor' });\n\nconst props = defineProps<FixedLayoutProps>();\nconst providerRef = ref<FixedLayoutPluginContext | null>(null);\n\ndefineExpose({\n get playground() {\n return providerRef.value?.playground as FixedLayoutPluginContext['playground'];\n },\n get container() {\n return providerRef.value?.container as FixedLayoutPluginContext['container'];\n },\n get document() {\n return providerRef.value?.document as FixedLayoutPluginContext['document'];\n },\n get operation() {\n return providerRef.value?.operation as FixedLayoutPluginContext['operation'];\n },\n get clipboard() {\n return providerRef.value?.clipboard as FixedLayoutPluginContext['clipboard'];\n },\n get selection() {\n return providerRef.value?.selection as FixedLayoutPluginContext['selection'];\n },\n get history() {\n return providerRef.value?.history as FixedLayoutPluginContext['history'];\n },\n get tools() {\n return providerRef.value?.tools as FixedLayoutPluginContext['tools'];\n },\n get: ((identifier) => providerRef.value?.get(identifier)) as FixedLayoutPluginContext['get'],\n getAll: ((identifier) =>\n providerRef.value?.getAll(identifier) ?? []) as FixedLayoutPluginContext['getAll'],\n});\n</script>\n\n<template>\n <FixedLayoutEditorProvider ref=\"providerRef\" v-bind=\"props\">\n <EditorRenderer>\n <slot />\n </EditorRenderer>\n </FixedLayoutEditorProvider>\n</template>\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { inject, onBeforeUnmount } from 'vue';\n\nimport { useObserve } from '@flowgram-vue/reactive';\nimport { useStartDragNode } from '@flowgram-vue/fixed-drag-plugin';\nimport {\n usePlayground,\n FlowNodeBaseType,\n FlowNodeEntity,\n FlowNodeRenderData,\n useService,\n type Disposable,\n PlaygroundEntityContextKey,\n type NodeFormProps,\n getNodeForm,\n} from '@flowgram-vue/editor';\n\nimport { FlowOperationService } from '../types';\n\nexport interface NodeRenderReturnType {\n id: string;\n type: string | number;\n /**\n * 节点 data 数据\n */\n data: any;\n /**\n * 更新节点 data 数据\n */\n updateData: (newData: any) => void;\n /**\n * BlockOrderIcon节点,一般用于分支的第一个占位节点\n */\n isBlockOrderIcon: boolean;\n /**\n * BlockIcon 节点,一般用于带有分支的占位节点\n */\n isBlockIcon: boolean;\n /**\n * 当前节点 (如果是 icon 则会返回它的父节点)\n */\n node: FlowNodeEntity;\n /**\n * 是否在拖拽中\n */\n dragging: boolean;\n /**\n * 节点是否激活\n */\n activated: boolean;\n /**\n * 节点是否展开\n */\n expanded: boolean;\n /**\n * 触发拖拽\n * @param e\n */\n startDrag: (e: MouseEvent) => void;\n /**\n * 鼠标进入, 主要用于控制 activated 状态\n */\n onMouseEnter: (e: MouseEvent) => void;\n /**\n * 鼠标离开, 主要用于控制 activated 状态\n */\n onMouseLeave: (e: MouseEvent) => void;\n\n /**\n * 渲染表单,只有节点引擎开启才能使用\n */\n form: NodeFormProps<any> | undefined;\n\n /**\n * 获取节点的扩展数据\n */\n getExtInfo<T = any>(): T;\n\n /**\n * 更新节点的扩展数据\n * @param extInfo\n */\n updateExtInfo<T = any>(extInfo: T, fullUpdate?: boolean): void;\n\n /**\n * 展开/收起节点\n * @param expanded\n */\n toggleExpand(): void;\n\n /**\n * 删除节点\n */\n deleteNode: () => void;\n /**\n * 全局 readonly 状态\n */\n readonly: boolean;\n}\n\n/**\n * Provides methods related to node rendering\n * @param nodeFromProps\n */\nexport function useNodeRender(nodeFromProps?: FlowNodeEntity): NodeRenderReturnType {\n const renderNode =\n nodeFromProps || (inject(PlaygroundEntityContextKey, undefined) as FlowNodeEntity);\n const nodeCache = { current: undefined as FlowNodeEntity | undefined };\n const renderData = renderNode.getData<FlowNodeRenderData>(FlowNodeRenderData)!;\n const { startDrag: startDragOrigin, dragOffset } = useStartDragNode();\n const playground = usePlayground();\n const isBlockOrderIcon = renderNode.flowNodeType === FlowNodeBaseType.BLOCK_ORDER_ICON;\n const isBlockIcon = renderNode.flowNodeType === FlowNodeBaseType.BLOCK_ICON;\n const formValueDependRef = { current: false };\n formValueDependRef.current = false;\n const node =\n (isBlockOrderIcon || isBlockIcon ? renderNode.parent! : renderNode) || nodeCache.current!;\n nodeCache.current = node;\n const operationService = useService<FlowOperationService>(FlowOperationService);\n const deleteNode = () => {\n operationService.deleteNode(node);\n };\n\n const startDrag = (e: MouseEvent) => {\n startDragOrigin(\n e,\n { dragStartEntity: renderNode },\n { dragOffsetX: dragOffset.x, dragOffsetY: dragOffset.y }\n );\n };\n\n const onMouseEnter = (_e: MouseEvent) => {\n renderData.toggleMouseEnter();\n };\n\n const onMouseLeave = (_e: MouseEvent) => {\n renderData.toggleMouseLeave();\n };\n\n const toggleExpand = () => {\n renderData.toggleExpand();\n };\n\n const getExtInfo = () => node.getExtInfo() as any;\n const updateExtInfo = (data: any, fullUpdate?: boolean) => {\n node.updateExtInfo(data, fullUpdate);\n };\n const form = getNodeForm(node);\n const formState = useObserve<any>(form?.state);\n\n let extInfoDispose: Disposable | undefined;\n if (isBlockIcon || isBlockOrderIcon) {\n extInfoDispose = renderNode.parent!.onExtInfoChange(() => renderNode.renderData.fireChange());\n }\n const formValuesDispose = form?.onFormValuesChange(() => {\n if (formValueDependRef.current) {\n renderData.fireChange();\n }\n });\n onBeforeUnmount(() => {\n extInfoDispose?.dispose();\n formValuesDispose?.dispose();\n });\n\n const readonly = playground.config.readonly;\n\n return {\n id: node.id,\n type: node.flowNodeType,\n get data() {\n if (form) {\n formValueDependRef.current = true;\n return form.values;\n }\n return getExtInfo();\n },\n updateData(values: any) {\n if (form) {\n form.updateFormValues(values);\n } else {\n updateExtInfo(values, true);\n }\n },\n node,\n isBlockOrderIcon,\n isBlockIcon,\n get activated() {\n return renderData.activated;\n },\n readonly,\n get expanded() {\n return renderData.expanded;\n },\n get dragging() {\n return renderData.dragging;\n },\n startDrag,\n deleteNode,\n onMouseEnter,\n onMouseLeave,\n getExtInfo,\n updateExtInfo,\n toggleExpand,\n get form() {\n if (!form) return undefined;\n return {\n ...form,\n get values() {\n formValueDependRef.current = true;\n return form.values!;\n },\n get state() {\n return formState;\n },\n };\n },\n };\n}\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { computed, onBeforeUnmount, reactive, ref, watch } from 'vue';\n\nimport { DisposableCollection } from '@flowgram-vue/utils';\nimport { HistoryService } from '@flowgram-vue/history';\nimport {\n FlowDocument,\n FlowLayoutDefault,\n FlowNodeRenderData,\n PlaygroundInteractiveType,\n EditorState,\n usePlayground,\n usePlaygroundContainer,\n useService,\n} from '@flowgram-vue/editor';\n\nexport interface PlaygroundToolsPropsType {\n /**\n * 最大缩放比,默认 2\n */\n maxZoom?: number;\n /**\n * 最小缩放比,默认 0.25\n */\n minZoom?: number;\n}\n\nexport interface PlaygroundTools {\n /**\n * 缩放 zoom 大小比例\n */\n zoom: number;\n /**\n * 放大\n */\n zoomin: (easing?: boolean) => void;\n /**\n * 缩小\n */\n zoomout: (easing?: boolean) => void;\n /**\n * 设置缩放比例\n * @param zoom\n */\n updateZoom: (newZoom: number, easing?: boolean, easingDuration?: number) => void;\n /**\n * 自适应视区\n */\n fitView: (easing?: boolean, easingDuration?: number, padding?: number) => Promise<void>;\n /**\n * 是否垂直布局\n */\n isVertical: boolean;\n /**\n * 切换布局, 如果不传入则直接切换\n */\n changeLayout: (layout?: FlowLayoutDefault) => void;\n\n /** 交互模式:鼠标 or 触控板 */\n interactiveType: PlaygroundInteractiveType;\n setInteractiveType: (type: PlaygroundInteractiveType) => void;\n /**\n * 是否可 redo\n */\n canRedo: boolean;\n /**\n * 是否可 undo\n */\n canUndo: boolean;\n /**\n * redo\n */\n redo: () => void;\n /**\n * undo\n */\n undo: () => void;\n}\n\nexport function usePlaygroundTools(props?: PlaygroundToolsPropsType): PlaygroundTools {\n const { maxZoom, minZoom } = props || {};\n const playground = usePlayground();\n const container = usePlaygroundContainer();\n const historyService = container.isBound(HistoryService)\n ? container.get(HistoryService)\n : undefined;\n const doc = useService<FlowDocument>(FlowDocument);\n const interactiveType = ref<PlaygroundInteractiveType>('PAD');\n const zoom = ref(1);\n const currentLayout = ref(doc.layout);\n const canUndo = ref(false);\n const canRedo = ref(false);\n\n const handleFitView = (easing?: boolean, easingDuration?: number, padding?: number) => {\n padding = padding || 30;\n return playground.config.fitView(doc.root.bounds, easing, padding, easingDuration);\n };\n\n const changeLayout = (newLayout?: FlowLayoutDefault) => {\n const allNodes = doc.getAllNodes();\n newLayout =\n newLayout ||\n (doc.layout.name === FlowLayoutDefault.HORIZONTAL_FIXED_LAYOUT\n ? FlowLayoutDefault.VERTICAL_FIXED_LAYOUT\n : FlowLayoutDefault.HORIZONTAL_FIXED_LAYOUT);\n allNodes.map((node) => {\n const renderData = node.getData(FlowNodeRenderData);\n renderData.node.classList.add('gedit-transition-ease');\n });\n setTimeout(() => {\n handleFitView();\n }, 10);\n setTimeout(() => {\n allNodes.map((node) => {\n const renderData = node.getData(FlowNodeRenderData);\n renderData.node.classList.remove('gedit-transition-ease');\n });\n }, 500);\n doc.setLayout(newLayout);\n currentLayout.value = doc.layout;\n };\n\n const handleZoomOut = (easing?: boolean) => {\n playground?.config.zoomout(easing);\n };\n\n const handleZoomIn = (easing?: boolean) => {\n playground?.config.zoomin(easing);\n };\n\n const handleUpdateZoom = (value: number, easing?: boolean, easingDuration?: number) => {\n playground.config.updateZoom(value, easing, easingDuration);\n };\n\n const handleUndo = () => historyService?.undo();\n const handleRedo = () => historyService?.redo();\n\n function handleUpdateInteractiveType(nextType: PlaygroundInteractiveType) {\n if (nextType === 'MOUSE') {\n playground.editorState.changeState(EditorState.STATE_MOUSE_FRIENDLY_SELECT.id);\n } else if (nextType === 'PAD') {\n playground.editorState.changeState(EditorState.STATE_SELECT.id);\n }\n interactiveType.value = nextType;\n }\n\n const dispose = new DisposableCollection();\n if (playground) {\n dispose.push(playground.onZoom((z) => (zoom.value = z)));\n }\n if (historyService) {\n dispose.push(\n historyService.undoRedoService.onChange(() => {\n canUndo.value = historyService.canUndo();\n canRedo.value = historyService.canRedo();\n })\n );\n }\n onBeforeUnmount(() => dispose.dispose());\n\n watch(\n () => [maxZoom, minZoom],\n () => {\n const config = playground.config.config;\n playground.config.updateConfig({\n maxZoom: maxZoom !== undefined ? maxZoom : config.maxZoom,\n minZoom: minZoom !== undefined ? minZoom : config.minZoom,\n });\n },\n { immediate: true }\n );\n\n return reactive({\n zoomin: handleZoomIn,\n zoomout: handleZoomOut,\n fitView: handleFitView,\n updateZoom: handleUpdateZoom,\n zoom,\n isVertical: computed(() => currentLayout.value.name === FlowLayoutDefault.VERTICAL_FIXED_LAYOUT),\n changeLayout,\n canRedo,\n canUndo,\n undo: handleUndo,\n redo: handleRedo,\n interactiveType,\n setInteractiveType: handleUpdateInteractiveType,\n }) as PlaygroundTools;\n}\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { useService, PluginContext } from '@flowgram-vue/editor';\n\nimport { FixedLayoutPluginContext } from '../preset';\n\nexport function useClientContext(): FixedLayoutPluginContext {\n return useService<FixedLayoutPluginContext>(PluginContext);\n}\n"]}
package/index.css ADDED
@@ -0,0 +1,176 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ :root {
7
+ --g-selection-background: #4d53e8;
8
+ --g-editor-background: #f2f3f5;
9
+ --g-playground-select: var(--g-selection-background);
10
+ --g-playground-hover: var(--g-selection-background);
11
+ --g-playground-line: var(--g-selection-background);
12
+ --g-playground-blur: #999;
13
+ --g-playground-selectBox-outline: var(--g-selection-background);
14
+ --g-playground-selectBox-background: rgba(141, 144, 231, 0.1);
15
+ --g-playground-select-hover-background: rgba(77, 83, 232, 0.1);
16
+ --g-playground-select-control-size: 12px;
17
+ }
18
+
19
+ .gedit-playground {
20
+ position: absolute;
21
+ width: 100%;
22
+ height: 100%;
23
+ left: 0;
24
+ top: 0;
25
+ z-index: 10;
26
+ overflow: hidden;
27
+ user-select: none;
28
+ outline: none;
29
+ box-sizing: border-box;
30
+ background-color: var(--g-editor-background);
31
+ }
32
+
33
+ .gedit-playground .flow-lines-container {
34
+ overflow: visible;
35
+ }
36
+
37
+ .gedit-transition-ease {
38
+ transition: left, top 0.3s ease;
39
+ }
40
+
41
+ .gedit-playground-scroll-right {
42
+ position: absolute;
43
+ right: 2px;
44
+ height: 100vh;
45
+ width: 7px;
46
+ z-index: 10;
47
+ }
48
+
49
+ .gedit-playground-scroll-bottom {
50
+ position: absolute;
51
+ bottom: 2px;
52
+ width: 100vw;
53
+ height: 7px;
54
+ z-index: 10;
55
+ }
56
+
57
+ .gedit-playground-scroll-right-block {
58
+ position: absolute;
59
+ opacity: 0.3;
60
+ border-radius: 3.5px;
61
+ }
62
+
63
+ .gedit-playground-scroll-right-block:hover {
64
+ opacity: 0.6;
65
+ }
66
+
67
+ .gedit-playground-scroll-bottom-block {
68
+ position: absolute;
69
+ opacity: 0.3;
70
+ border-radius: 3.5px;
71
+ }
72
+
73
+ .gedit-playground-scroll-bottom-block:hover {
74
+ opacity: 0.6;
75
+ }
76
+
77
+ .gedit-playground-scroll-hidden {
78
+ opacity: 0;
79
+ }
80
+
81
+ .gedit-playground-loading {
82
+ position: absolute;
83
+ color: white;
84
+ left: 50%;
85
+ top: 50%;
86
+ z-index: 100;
87
+ display: flex;
88
+ justify-content: center;
89
+ align-items: center;
90
+ transition: opacity 0.8s;
91
+ flex-direction: column;
92
+ text-align: center;
93
+ opacity: 0.8;
94
+ }
95
+
96
+ .gedit-hidden {
97
+ display: none;
98
+ }
99
+
100
+ .gedit-playground-pipeline {
101
+ position: absolute;
102
+ overflow: visible;
103
+ width: 100%;
104
+ height: 100%;
105
+ left: 0;
106
+ top: 0;
107
+ }
108
+
109
+ .gedit-playground-pipeline::before {
110
+ content: '';
111
+ position: absolute;
112
+ width: 1px;
113
+ height: 100%;
114
+ left: 0;
115
+ top: 0;
116
+ }
117
+
118
+ .gedit-playground-layer {
119
+ position: absolute;
120
+ overflow: visible;
121
+ }
122
+
123
+ .gedit-selector-box {
124
+ position: absolute;
125
+ left: 0;
126
+ top: 0;
127
+ width: 0;
128
+ height: 0;
129
+ z-index: 33;
130
+ outline: 1px solid var(--g-playground-selectBox-outline);
131
+ background-color: var(--g-playground-selectBox-background);
132
+ }
133
+
134
+ .gedit-selector-box-block {
135
+ position: absolute;
136
+ left: 0;
137
+ top: 0;
138
+ width: 0;
139
+ height: 0;
140
+ z-index: 9999;
141
+ display: none;
142
+ background-color: rgba(0, 0, 0, 0);
143
+ }
144
+
145
+ .gedit-selector-bounds-background {
146
+ position: absolute;
147
+ left: 0;
148
+ top: 0;
149
+ width: 0;
150
+ height: 0;
151
+ outline: 1px solid var(--g-playground-selectBox-outline);
152
+ background-color: #f0f4ff;
153
+ }
154
+
155
+ .gedit-selector-bounds-foreground {
156
+ position: absolute;
157
+ left: 0;
158
+ top: 0;
159
+ width: 0;
160
+ height: 0;
161
+ z-index: 33;
162
+ background: rgba(255, 255, 255, 0);
163
+ }
164
+
165
+ .gedit-flow-activity-node {
166
+ position: absolute;
167
+ }
168
+
169
+ .gedit-grid-svg {
170
+ display: block;
171
+ position: absolute;
172
+ left: 20px;
173
+ top: 20px;
174
+ width: 0;
175
+ height: 0;
176
+ }
package/package.json ADDED
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "@flowgram-vue/fixed-layout-editor",
3
+ "version": "0.2.0",
4
+ "type": "module",
5
+ "license": "MIT",
6
+ "homepage": "https://flowgram.ai/",
7
+ "repository": "https://github.com/Crayon-hua/flowgram-vue",
8
+ "description": "Vue fixed-layout editor for FlowGram.",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.cjs"
14
+ },
15
+ "./index.css": "./index.css"
16
+ },
17
+ "main": "./dist/index.cjs",
18
+ "module": "./dist/index.js",
19
+ "types": "./dist/index.d.ts",
20
+ "files": [
21
+ "src",
22
+ "dist",
23
+ "index.css"
24
+ ],
25
+ "dependencies": {
26
+ "inversify": "^6.0.1",
27
+ "reflect-metadata": "~0.2.2",
28
+ "@flowgram-vue/core": "0.2.0",
29
+ "@flowgram-vue/fixed-history-plugin": "0.2.0",
30
+ "@flowgram-vue/history": "0.2.0",
31
+ "@flowgram-vue/fixed-drag-plugin": "0.2.0",
32
+ "@flowgram-vue/select-box-plugin": "0.2.0",
33
+ "@flowgram-vue/editor": "0.2.0",
34
+ "@flowgram-vue/utils": "0.2.0",
35
+ "@flowgram-vue/fixed-layout-core": "0.2.0",
36
+ "@flowgram-vue/reactive": "0.2.0"
37
+ },
38
+ "peerDependencies": {
39
+ "vue": "^3.3.0"
40
+ },
41
+ "devDependencies": {
42
+ "@types/bezier-js": "4.1.3",
43
+ "@types/lodash-es": "^4.17.12",
44
+ "@types/node": "^20",
45
+ "@vitejs/plugin-vue": "^6.0.1",
46
+ "@vitest/coverage-v8": "^3.2.4",
47
+ "@vue/test-utils": "^2.4.6",
48
+ "eslint": "^9.0.0",
49
+ "jsdom": "^26.1.0",
50
+ "typescript": "^5.8.3",
51
+ "vitest": "^3.2.4",
52
+ "vue": "^3.5.18",
53
+ "@flowgram-vue/build-config": "0.2.0",
54
+ "@flowgram-vue/ts-config": "0.2.0",
55
+ "@flowgram-vue/eslint-config": "0.2.0"
56
+ },
57
+ "publishConfig": {
58
+ "access": "public",
59
+ "registry": "https://registry.npmjs.org/"
60
+ },
61
+ "scripts": {
62
+ "build": "flowgram-build",
63
+ "test": "vitest run",
64
+ "test:cov": "vitest run --coverage",
65
+ "lint": "eslint .",
66
+ "ts-check": "tsc --noEmit",
67
+ "type-check": "tsc --noEmit",
68
+ "build:fast": "flowgram-build --fast",
69
+ "build:watch": "flowgram-build --watch"
70
+ }
71
+ }