create-node-variable-plugin.ts 596 B

12345678910111213141516171819
  1. /**
  2. * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
  3. * SPDX-License-Identifier: MIT
  4. */
  5. // import { FormManager } from '@flowgram.ai/form-core';
  6. import { NodeManager } from '@flowgram.ai/form-core';
  7. import { definePluginCreator } from '@flowgram.ai/core';
  8. import { withNodeVariables } from './with-node-variables';
  9. // import { withNodeVariables } from './with-node-variables';
  10. export const createNodeVariablePlugin = definePluginCreator({
  11. onInit(ctx) {
  12. const nodeManager = ctx.get<NodeManager>(NodeManager);
  13. nodeManager.registerNodeRenderHoc(withNodeVariables);
  14. },
  15. });