import { TraverseElementDetail } from '@p-lc/uidl-utils'; import { AnyEditorPlugin, EditorDefaultPropertiesExtHkt, EditorDefaultPropertiesExtHktPlugin, EditorRawPlugin } from '../../types'; import { editorPluginEmitter } from '../editor-plugin-emitter'; import { UidlStoreUidl, editorPluginUidlStore, editorPluginUidlStoreEdit } from '../uidl-store-plugins'; import { editorPluginUidlUtilsConfig } from '../uidl-utils-config-plugins'; /** * 编辑器元素仓库查找插件属性扩展高等类型 */ export interface EditorPluginElementStoreFindPropertiesExtHkt { editor: { /** * 元素仓库 */ elementStore: { /** * 元素详情缓存表 */ elementDetailCacheMap: Map>>; /** * 元素名称集合 */ elementNameSet: Set; /** * 将被缓存的 UIDL */ uidlToBeCached: UidlStoreUidl | null; /** * 已缓存的 UIDL */ cachedUidl: UidlStoreUidl | null; /** * 刷新查找缓存 */ refreshFindCache(): void; /** * 查找元素详情 * @param id 元素 ID */ findElementDetail(id: string): TraverseElementDetail> | null; /** * 是否有元素名称 * @param name 元素名称 */ hasElementName(name: string): boolean; /** * 生成元素名称 * @param componentName 组件名称 */ generateElementName(componentName: string): string; /** * 是子元素 * @param parentId 父元素 ID * @param childId 子元素 ID * @param deep 深度判断,默认 true */ isChildElement(parentId: string, childId: string, deep?: boolean): boolean; /** * 获取父元素 ID * @param id 元素 ID */ getParentElementId(id?: string | null): string | null; }; }; } /** * EditorPluginElementStoreFindPropertiesExtHkt 辅助类型 */ export interface $EditorPluginElementStoreFindPropertiesExtHkt extends EditorDefaultPropertiesExtHkt { type: EditorPluginElementStoreFindPropertiesExtHkt>; } /** * 编辑器元素仓库查找插件 */ export declare const editorPluginElementStoreFind: EditorRawPlugin<$EditorPluginElementStoreFindPropertiesExtHkt, typeof editorPluginUidlStore | typeof editorPluginUidlStoreEdit | typeof editorPluginEmitter | typeof editorPluginUidlUtilsConfig>; //# sourceMappingURL=editor-plugin-element-store-find.d.ts.map