import { UidlComponent } from '@p-lc/uidl'; import { AnyEditorPlugin, EditorDefaultPropertiesExtHkt, EditorDefaultPropertiesExtHktPlugin, EditorRawPlugin } from '../../types'; import { PdStore } from '../pd-store-plugins'; import { editorPluginUidlUtilsConfig } from '../uidl-utils-config-plugins'; import { editorPluginUidlStore } from './editor-plugin-uidl-store'; import { editorPluginUidlStoreEdit } from './editor-plugin-uidl-store-edit'; /** * 编辑器 UIDL 仓库组件插件属性扩展高等类型 */ export interface EditorPluginUidlStoreComponentsPropertiesExtHkt { editor: { /** * PD 仓库,防止循环引用 */ pdStore: PdStore; /** * UIDL 仓库 */ uidlStore: { /** * 创建 UIDL 组件,修改 UIDL * @param pkgName 包名 * @param componentType 组件类型 */ createUidlComponent(pkgName: string, componentType: string): UidlComponent; /** * 清理 UIDL 组件 */ clearUidlComponents(): void; /** * 获取 UIDL 组件 * @param elementType 元素类型 */ getUidlComponent(elementType: string): UidlComponent; /** * 获取元素类型 * @param pkgName 包名 * @param componentType 组件类型 */ getElementType(pkgName: string, componentType: string): string | null; /** * 获取元素类型,不存在就抛出异常 * @param pkgName 包名 * @param componentType 组件类型 */ getElementTypeOrThrow(pkgName: string, componentType: string): string; /** * 确保元素类型 * @param pkgName 包名 * @param componentType 组件类型 */ ensureElementType(pkgName: string, componentType: string): string; }; }; } /** * EditorPluginUidlStoreComponentsPropertiesExtHkt 辅助类型 */ export interface $EditorPluginUidlStoreComponentsPropertiesExtHkt extends EditorDefaultPropertiesExtHkt { type: EditorPluginUidlStoreComponentsPropertiesExtHkt>; } /** * 编辑器 UIDL 仓库组件插件 */ export declare const editorPluginUidlStoreComponents: EditorRawPlugin<$EditorPluginUidlStoreComponentsPropertiesExtHkt, typeof editorPluginUidlStore | typeof editorPluginUidlStoreEdit | typeof editorPluginUidlUtilsConfig>; //# sourceMappingURL=editor-plugin-uidl-store-components.d.ts.map