import React from "react"; import type { PropertyEditorProps } from "../../type"; import { ComponentData } from "../../parsers"; import { MultiVariantEditor, MultiVariantEditorState, VariantOption } from "./multi-variant-editor"; export interface Props extends PropertyEditorProps { /** 允许使用的组件类型名称, 默认为全部 */ typeNames?: string[]; } type ValueType = "string" | "component" | "array"; interface State extends MultiVariantEditorState { } /** * React 节点编辑器:值可为「字符串 / 组件数据 / 组件数据数组」三种形态之一。 * 形态切换与状态管理由基类 MultiVariantEditor 提供,本类只声明形态判定与每种形态的渲染。 */ export declare class ReactNodeEditor extends MultiVariantEditor { protected defaultVariant: ValueType; protected variantOptions: VariantOption[]; protected emptyValue(): string | ComponentData | ComponentData[]; protected getVariant(value: string | ComponentData | ComponentData[] | undefined): ValueType | undefined; static getValueType(value: string | ComponentData | ComponentData[] | undefined): string | undefined; protected renderVariant(variant: ValueType, value?: string | ComponentData | ComponentData[]): React.ReactNode; protected renderStringEditor(value?: any): React.JSX.Element; protected renderComponentEditor(value?: any): React.JSX.Element; protected renderComponentArrayEditor(value?: any): React.JSX.Element; } export {};