import { NodeFormProps } from '@flowgram.ai/node'; export * from '@flowgram.ai/node'; export { FormModelV2 as FormModel } from '@flowgram.ai/node'; export * from '@flowgram.ai/utils'; import * as _flowgram_ai_core from '@flowgram.ai/core'; import { PluginContext, Plugin, PluginsProvider, Playground, PlaygroundConfigRevealOpts } from '@flowgram.ai/core'; export * from '@flowgram.ai/core'; export { PlaygroundReactRenderer as EditorRenderer } from '@flowgram.ai/core'; import { FlowDocument, FlowDocumentJSON, FlowNodeRegistry, FlowNodeType, FlowNodeEntity, FlowNodeJSON } from '@flowgram.ai/document'; export * from '@flowgram.ai/document'; export * from '@flowgram.ai/renderer'; import { FlowNodeScope, VariablePluginOptions } from '@flowgram.ai/variable-plugin'; export * from '@flowgram.ai/variable-plugin'; export * from '@flowgram.ai/shortcuts-plugin'; import { NodeCorePluginOptions } from '@flowgram.ai/node-core-plugin'; export * from '@flowgram.ai/node-core-plugin'; import { I18nPluginOptions } from '@flowgram.ai/i18n-plugin'; export * from '@flowgram.ai/i18n-plugin'; export { ReactiveBaseState, ReactiveState, Tracker, observe, useObserve, useReactiveState, useReadonlyReactiveState } from '@flowgram.ai/reactive'; export { AsyncContainerModule, Container, ContainerModule, inject, injectable, interfaces, multiInject, named, postConstruct } from 'inversify'; import { FormMetaOrFormMetaGenerator, FormItem, FormModel } from '@flowgram.ai/form-core'; export { FlowNodeFormData, NodeRender, NodeRenderProps } from '@flowgram.ai/form-core'; export { Errors, FeedbackLevel, Field, FieldArray, FieldArrayRenderProps, FieldError, FieldName, FieldRenderProps, FieldState, FieldWarning, Form, FormControl, FormRenderProps, FormState, IField, IFieldArray, IForm, Validate, ValidateTrigger, Warnings, useCurrentField, useCurrentFieldState, useField, useFieldValidate, useForm, useWatch } from '@flowgram.ai/form'; import { ReduxDevToolPluginOptions } from '@flowgram.ai/redux-devtool-plugin'; import { SelectionService, PlaygroundReactProps } from '@flowgram.ai/playground-react'; export { createPlaygroundReactPreset } from '@flowgram.ai/playground-react'; import { MaterialsPluginOptions } from '@flowgram.ai/materials-plugin'; import { HistoryPluginOptions } from '@flowgram.ai/history'; import * as React from 'react'; import React__default from 'react'; export * from '@flowgram.ai/node-variable-plugin'; /** * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates * SPDX-License-Identifier: MIT */ declare module '@flowgram.ai/document' { interface FlowNodeEntity { form: NodeFormProps | undefined; scope: FlowNodeScope | undefined; privateScope: FlowNodeScope | undefined; } } interface EditorPluginContext extends PluginContext { document: FlowDocument; selection: SelectionService; } interface EditorProps extends PlaygroundReactProps { /** * Initialize data * 初始化数据 */ initialData?: JSON; /** * whether it is readonly * 是否为 readonly */ readonly?: boolean; /** * node registries * 节点定义 */ nodeRegistries?: FlowNodeRegistry[]; /** * Get the default node registry, which will be merged with the 'nodeRegistries' * 提供默认的节点注册,这个会和 nodeRegistries 做合并 */ getNodeDefaultRegistry?: (type: FlowNodeType) => FlowNodeRegistry; /** * Node engine configuration */ nodeEngine?: NodeCorePluginOptions & { /** * Default formMeta */ createDefaultFormMeta?: (node: FlowNodeEntity) => FormMetaOrFormMetaGenerator; /** * Enable node engine */ enable?: boolean; }; /** * By default, all nodes are expanded * 默认是否展开所有节点 */ allNodesDefaultExpanded?: boolean; /** * Canvas material, Used to customize react components * 画布物料, 用于自定义 react 组件 */ materials?: MaterialsPluginOptions; /** * 画布数据加载完成, 请使用 onAllLayersRendered 替代 * @deprecated * */ onLoad?: (ctx: CTX) => void; /** * 是否开启变量引擎 * Variable engine enable */ variableEngine?: VariablePluginOptions; /** * Redo/Undo enable */ history?: HistoryPluginOptions & { disableShortcuts?: boolean; }; /** * redux devtool configuration */ reduxDevTool?: ReduxDevToolPluginOptions; /** * Scroll configuration * 滚动配置 */ scroll?: { enableScrollLimit?: boolean; disableScrollBar?: boolean; disableScroll?: boolean; }; /** * Node data transformation, called by ctx.document.fromJSON * 节点数据转换, 由 ctx.document.fromJSON 调用 * @param node - current node * @param json - Current node json data */ toNodeJSON?(node: FlowNodeEntity, json: FlowNodeJSON): FlowNodeJSON; /** * Node data transformation, called by ctx.document.toJSON * 节点数据转换, 由 ctx.document.toJSON 调用 * @param node - current node * @param json - Current node json data * @param isFirstCreate - Whether it is created for the first time, If document.fromJSON is recalled, but the node already exists, isFirstCreate is false */ fromNodeJSON?(node: FlowNodeEntity, json: FlowNodeJSON, isFirstCreate: boolean): FlowNodeJSON; /** * Canvas internal constant customization * 画布内部常量自定义 */ constants?: Record; /** * i18n * 国际化 */ i18n?: I18nPluginOptions; } declare namespace EditorProps { /** * 默认配置 */ const DEFAULT: EditorProps; } /** * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates * SPDX-License-Identifier: MIT */ declare function createDefaultPreset(opts: EditorProps, plugins?: Plugin[]): PluginsProvider; /** * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates * SPDX-License-Identifier: MIT */ declare const EditorProvider: React__default.FC; /** * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates * SPDX-License-Identifier: MIT */ /** * 画布编辑器 * @param props * @constructor */ declare const Editor: React__default.FC; /** * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates * SPDX-License-Identifier: MIT */ interface HighLightOptions { padding?: number; overlayClassName?: string; } declare function highlightFormItem(formItem: FormItem, options?: HighLightOptions): HTMLDivElement | undefined; interface HighlightProps { form: FormModel; path: string; } declare function useHighlight(props: HighlightProps): React.MutableRefObject | null; /** * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates * SPDX-License-Identifier: MIT */ type FocusNodeCanvasOptions = PlaygroundConfigRevealOpts; interface FocusNodeFormItemOptions { canvas?: FocusNodeCanvasOptions; highlight?: boolean | HighLightOptions; } declare class NodeFocusService { readonly playground: Playground; protected previousOverlay: HTMLDivElement | undefined; protected currentPromise: Promise | undefined; highlightNodeFormItem(formItem: FormItem, options?: HighLightOptions): void; focusNodeFormItem(formItem: FormItem, options?: FocusNodeFormItemOptions): Promise; } /** * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates * SPDX-License-Identifier: MIT */ declare class NodeClient { nodeFocusService: NodeFocusService; } /** * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates * SPDX-License-Identifier: MIT */ interface FocusNodeOptions { zoom?: PlaygroundConfigRevealOpts['zoom']; easing?: PlaygroundConfigRevealOpts['easing']; easingDuration?: PlaygroundConfigRevealOpts['easingDuration']; scrollToCenter?: PlaygroundConfigRevealOpts['scrollToCenter']; } declare class FlowEditorClient { readonly nodeClient: NodeClient; readonly playground: Playground; focusNodeFormItem(formItem: FormItem, options?: FocusNodeFormItemOptions): void; focusNode(node: FlowNodeEntity, options?: FocusNodeOptions): void; } /** * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates * SPDX-License-Identifier: MIT */ declare const createFlowEditorClientPlugin: _flowgram_ai_core.PluginCreator<{}>; declare const createFlowEditorClientPlugins: () => _flowgram_ai_core.Plugin<{}>[]; /** * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates * SPDX-License-Identifier: MIT */ declare function useFlowEditor(): FlowEditorClient; export { Editor, type EditorPluginContext, EditorProps, EditorProvider, FlowEditorClient, type FocusNodeCanvasOptions, type FocusNodeFormItemOptions, type HighLightOptions, NodeClient, NodeFocusService, createDefaultPreset, createFlowEditorClientPlugin, createFlowEditorClientPlugins, highlightFormItem, useFlowEditor, useHighlight };